Merge: Move sensors and Dalvik related services from mnit to android (and fixes)
authorJean Privat <jean@pryen.org>
Tue, 10 Jun 2014 19:10:59 +0000 (15:10 -0400)
committerJean Privat <jean@pryen.org>
Tue, 10 Jun 2014 19:10:59 +0000 (15:10 -0400)
Pull-Request: #487
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>

118 files changed:
.gitignore
lib/android/native_app_glue.nit
lib/app.nit
lib/geometry/boxes.nit
lib/geometry/quadtree.nit [new file with mode: 0644]
lib/html.nit
lib/mnit/opengles1.nit
lib/mnit/tileset.nit [new file with mode: 0644]
lib/mnit_android/android_app.nit
lib/mnit_display.nit
lib/mnit_linux/linux_app.nit
lib/mnit_linux/linux_assets.nit
lib/ropes_debug.nit [new file with mode: 0644]
lib/standard/file.nit
lib/standard/ropes.nit
lib/standard/standard.nit
lib/standard/stream.nit
lib/standard/string.nit
share/nitdoc/css/Nitdoc.GitHub.css
share/nitdoc/css/Nitdoc.QuickSearch.css
share/nitdoc/css/main.css [deleted file]
share/nitdoc/css/nitdoc.bootstrap.css [new file with mode: 0644]
share/nitdoc/css/nitdoc.css [new file with mode: 0644]
share/nitdoc/js/nitdoc.js
share/nitdoc/js/plugins/folding.js [deleted file]
share/nitdoc/js/plugins/github.js
share/nitdoc/js/plugins/github/loginbox.js
share/nitdoc/js/plugins/quicksearch.js
share/nitdoc/less/nitdoc_template.less [new file with mode: 0644]
share/nitdoc/resources/icons/const_private.png [deleted file]
share/nitdoc/resources/icons/const_protected.png [deleted file]
share/nitdoc/resources/icons/const_public.png [deleted file]
share/nitdoc/resources/icons/copy.png [deleted file]
share/nitdoc/resources/icons/meth_private.png [deleted file]
share/nitdoc/resources/icons/meth_protected.png [deleted file]
share/nitdoc/resources/icons/meth_public.png [deleted file]
share/nitdoc/resources/icons/vtype_private.png [deleted file]
share/nitdoc/resources/icons/vtype_protected.png [deleted file]
share/nitdoc/resources/icons/vtype_public.png [deleted file]
share/nitdoc/vendors/bootstrap/css/bootstrap.min.css [new file with mode: 0644]
share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.eot [new file with mode: 0644]
share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.svg [new file with mode: 0644]
share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.ttf [new file with mode: 0644]
share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff [new file with mode: 0644]
share/nitdoc/vendors/bootstrap/js/bootstrap.min.js [new file with mode: 0644]
share/nitdoc/vendors/jquery/jquery-1.11.1.min.js [new file with mode: 0644]
share/nitdoc/vendors/jquery/jquery-ui-1.10.4.custom.min.js [new file with mode: 0644]
src/astutil.nit
src/debugger.nit
src/doc/doc.nit [new file with mode: 0644]
src/doc/doc_model.nit [new file with mode: 0644]
src/doc/doc_pages.nit [new file with mode: 0644]
src/doc/doc_templates.nit [new file with mode: 0644]
src/doc_template.nit [deleted file]
src/highlight.nit
src/markdown.nit
src/metrics/static_types_metrics.nit
src/model/mdoc.nit
src/model/model.nit
src/model_utils.nit
src/modelbuilder.nit
src/modelize_class.nit
src/modelize_property.nit
src/nitdoc.nit
src/nitlight.nit
src/nitni/nitni_base.nit
src/nitni/nitni_callbacks.nit
src/parser/lexer_work.nit
src/parser/parser_work.nit
src/parser_util.nit
src/test_markdown.nit
src/typing.nit
tests/base_error_class_kind.nit [new file with mode: 0644]
tests/base_error_class_kind2.nit [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt1.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt10.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt11.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt12.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt13.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt14.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt15.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt2.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt3.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt4.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt5.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt6.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt7.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt8.res [new file with mode: 0644]
tests/sav/base_error_class_kind2_alt9.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt1.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt10.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt11.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt12.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt13.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt14.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt15.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt2.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt3.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt4.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt5.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt6.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt7.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt8.res [new file with mode: 0644]
tests/sav/base_error_class_kind_alt9.res [new file with mode: 0644]
tests/sav/nitdoc_args1.res
tests/sav/nitlight_args1.res
tests/sav/test_ffi_c_operators.res
tests/sav/test_flatrope.res [new file with mode: 0644]
tests/sav/test_markdown_args1.res
tests/sav/test_parser_args7.res
tests/sav/test_ropes.res [new file with mode: 0644]
tests/sav/test_text.res [new file with mode: 0644]
tests/sav/test_text_alt1.res [new file with mode: 0644]
tests/sav/test_text_alt2.res [new file with mode: 0644]
tests/test_ffi_c_operators.nit
tests/test_flatrope.nit [new file with mode: 0644]
tests/test_ropes.nit [new file with mode: 0644]
tests/test_text.nit [new file with mode: 0644]

index 12fcc43..eed3179 100644 (file)
@@ -25,7 +25,6 @@ src/version.nit
 src/callgrind.*
 src/*.log
 src/*.dot
-src/doc
 src/*.dat
 src/*.gnu
 src/*.bin
index 9e9aabf..50368de 100644 (file)
@@ -123,7 +123,7 @@ extern class NativeActivity in "Java" `{ android.app.NativeActivity `}
 end
 
 redef class App
-       redef init
+       redef fun setup
        do
                var native_app_glue = native_app_glue
                native_app_glue.user_data = self
index bd74daa..3e2d737 100644 (file)
@@ -27,6 +27,10 @@ module app
 class App
        protected init do end
 
+       # Starts the internal setup of graphical and other stuff
+       # Is called just before run
+       protected fun setup do end
+
        # Main entry point of your application
        fun run do end
 
@@ -49,4 +53,5 @@ class App
 end
 
 protected fun app: App do return once new App
+app.setup
 app.run
index 61af367..1596c1e 100644 (file)
@@ -74,6 +74,15 @@ interface Boxed[N: Numeric]
                return self.left <= other.right and other.left <= self.right and
                        self.top >= other.bottom and other.top >= self.bottom
        end
+
+       # Create a bounding box that englobes the actual bounding box.
+       # `dist` is the distance between the inner boundaries and the outer boundaries.
+       # ~~~
+       # var p = new Point[Int](5,10)
+       # var b = p.padded(3)
+       # assert b.top == 2 and b.bot = 8 and b.left == 7 and b.right == 13
+       # ~~~
+       fun padded(dist: N): Box[N] do return new Box[N].lrtb(left - dist, right + dist, top + dist, bottom - dist)
 end
 
 # A 2d bounded object and an implementation of `Boxed`
@@ -201,6 +210,8 @@ interface Boxed3d[N: Numeric]
                return super and (not other isa Boxed3d[N] or
                        (self.back <= other.front and other.back <= self.front))
        end
+
+       redef fun padded(dist: N): Box3d[N] do return new Box3d[N].lrtbfb(left - dist, right + dist, top + dist, bottom - dist, front + dist, back - dist)
 end
 
 # A 3d bounded object and an implementation of Boxed
@@ -317,3 +328,31 @@ redef class ILine3d[N]
        redef fun front do return point_left.z.min(point_right.z)
        redef fun back do return point_left.z.max(point_right.z)
 end
+
+# Base for all data structures containing multiple Boxed Objects
+interface BoxedCollection[E: Boxed[Numeric]]
+       super SimpleCollection[E]
+
+       # returns all the items overlapping with `region`
+       fun items_overlapping(region :Boxed[Numeric]): SimpleCollection[E] is abstract
+end
+
+# A BoxedCollection implemented with an array, linear performances for searching but really
+# fast for creation and filling
+class BoxedArray[E: Boxed[Numeric]]
+       super BoxedCollection[E]
+
+       private var data: Array[E] = new Array[E]
+
+       redef fun add(item: E) do data.add(item)
+       redef fun items_overlapping(item: Boxed[Numeric]): SimpleCollection[E]
+       do
+               var arr = new Array[E]
+               for i in data do
+                       if i.intersects(item) then arr.add(i)
+               end
+               return arr
+       end
+
+       redef fun iterator do return data.iterator
+end
diff --git a/lib/geometry/quadtree.nit b/lib/geometry/quadtree.nit
new file mode 100644 (file)
index 0000000..97c0783
--- /dev/null
@@ -0,0 +1,247 @@
+# This file is part of NIT (http://www.nitlanguage.org).
+#
+# Copyright 2014 Romain Chanoir <romain.chanoir@viacesi.fr>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# QuadTree API mostly used for 2 dimensional collision detection
+# The QuadTree data structure partition a 2D space by recursively
+# subdividing it into 4 regions when it's capacity is reached
+# This module introduce 2 principal implementation of the structure,
+# the static and the dynamic QuadTree
+module quadtree
+
+import boxes
+import pipeline
+
+# Abstract QuadTree implementing most of the basic functions
+# and introducing specific QuadTree data
+abstract class QuadTree[E: Boxed[Numeric]]
+       super BoxedCollection[E]
+
+       protected var center: nullable Point[Numeric]
+       var data: Array[E] = new Array[E]
+
+       #  ________________
+       #  |       |       |
+       #  |   1   |   2   |
+       #  |-------|-------|
+       #  |   0   |   3   |
+       #  |_______|_______|
+
+       protected var child0: nullable QuadTree[E]
+       protected var child1: nullable QuadTree[E]
+       protected var child2: nullable QuadTree[E]
+       protected var child3: nullable QuadTree[E]
+
+       # represent the threshold before subdividing the node
+       protected var item_limit = 4
+       protected var parent_node: nullable QuadTree[E]
+
+       # create the quadtree and set the item limit for each node
+       init(limit: Int)
+       do
+               self.item_limit = limit
+       end
+
+       # create a node, giving him self as a parent. Used to create children nodes
+       init with_parent(limit: Int, parent: QuadTree[E])
+       do
+               init(limit)
+               self.parent_node = parent
+       end
+
+       redef fun items_overlapping(region :Boxed[Numeric]): SimpleCollection[E] do
+        var res = new Array[E]
+        items_overlapping_in(region,res)
+        return res
+     end  
+
+       # add the item to the tree, create children if the limit is reached
+       redef fun add(item: E) do if self.is_leaf then self.data.add(item) else add_to_children(item)
+
+       private fun add_to_children(item: Boxed[Numeric])
+       do
+               if self.child0 != null then
+                       if self.center.x > item.right then
+                               if self.center.y > item.top then
+                                       child0.add(item)
+                               else if self.center.y < item.bottom then
+                                       child1.add(item)
+                               else
+                                       self.data.add(item)
+                               end
+                       else if self.center.x < item.left then
+                               if self.center.y > item.top then
+                                       child3.add(item)
+                               else if self.center.y < item.bottom then
+                                       child2.add(item)
+                               else
+                                       self.data.add(item)
+                               end
+                       else if self.center.y > item.top then
+                               self.data.add(item)
+                       else if self.center.y < item.bottom then
+                                       self.data.add(item)
+                       else
+                               self.data.add(item)
+                       end
+               end
+       end
+
+       redef fun is_empty: Bool do return data.is_empty and (self.is_leaf or (child0.is_empty and child1.is_empty and child2.is_empty and child3.is_empty))
+
+       # Return whether or not the Node is a leaf of the tree
+       fun is_leaf: Bool do return child0 == null
+
+       #     var dquadtree = new DQuadTree[Point[Int]](2)
+       #     var p1 = new Point[Int](0,0)
+       #     var p2 = new Point[Int](0,9)
+       #     var p3 = new Point[Int](9,0)
+       #     dquadtree.add(p1)
+       #     dquadtree.add(p2)
+       #     dquadtree.add(p3)
+       #     var result = dquadtree.items_overlapping(p3)
+       #     assert result.length == 1
+       #     result.clear
+       #     var p4 = new Point[Int](9,9)
+       #     result = dquadtree.items_overlapping(p4)
+       #     assert result.length == 0
+       #     result = dquadtree.items_overlapping(p4.padded(10))
+       #     assert result.length == 3
+       fun items_overlapping_in(region: Boxed[Numeric], mdata: SimpleCollection[E])
+       do
+               if self.is_leaf and data.length >= item_limit then
+                       subdivide
+                       var data_copy = data
+                       data = new Array[E]
+                       #add to the right Node
+                       for d in data_copy do
+                               add_to_children(d)
+                       end
+               end
+               for i in data do if i.intersects(region) then mdata.add(i)
+               if self.child0 != null then
+                       if self.center.x > region.right then
+                               if self.center.y > region.top then
+                                       child0.items_overlapping_in(region, mdata)
+                               else if self.center.y < region.bottom then
+                                       child1.items_overlapping_in(region, mdata)
+                               else
+                                       child0.items_overlapping_in(region,mdata)
+                                       child1.items_overlapping_in(region, mdata)
+                               end
+                       else if self.center.x < region.left then
+                               if self.center.y > region.top then
+                                       child3.items_overlapping_in(region, mdata)
+                               else if self.center.y < region.bottom then
+                                       child2.items_overlapping_in(region, mdata)
+                               else
+                                       child3.items_overlapping_in(region, mdata)
+                                       child2.items_overlapping_in(region, mdata)
+                               end
+                       else if self.center.y > region.top then
+                               child0.items_overlapping_in(region, mdata)
+                               child3.items_overlapping_in(region, mdata)
+                       else if self.center.y < region.bottom then
+                               child1.items_overlapping_in(region, mdata)
+                               child2.items_overlapping_in(region, mdata)
+                       else
+                               child0.items_overlapping_in(region, mdata)
+                               child1.items_overlapping_in(region, mdata)
+                               child2.items_overlapping_in(region, mdata)
+                               child3.items_overlapping_in(region, mdata)
+                       end
+               end
+       end
+
+       # this function is responsible of the creation of the children,
+       # depending on your needs
+       protected fun subdivide is abstract
+
+       redef fun iterator do if self.is_leaf then return data.iterator else return data.iterator + child0.iterator + child1.iterator + child2.iterator + child3.iterator
+end
+
+# A dynamic implementation of the quadtree data structure
+# the center of the parent node is determined by the average
+# values of the data it contains when the item limit is reached
+class DQuadTree[E: Boxed[Numeric]]
+       super QuadTree[E]
+
+       redef fun subdivide
+       do
+               self.center = new Point[Numeric](average_x, average_y)
+               child0 = new DQuadTree[E].with_parent(self.item_limit, self)
+               child1 = new DQuadTree[E].with_parent(self.item_limit, self)
+               child2 = new DQuadTree[E].with_parent(self.item_limit, self)
+               child3 = new DQuadTree[E].with_parent(self.item_limit, self)
+       end
+
+       # average x of data in this node
+       fun average_x: Numeric
+       do
+               var x_total = data.first.left.zero
+               for data in self.data do
+                       x_total += (data.left + data.right)/x_total.value_of(2)
+               end
+               return x_total/x_total.value_of(self.data.length)
+       end
+
+       # average y of data in this node
+       fun average_y: Numeric
+       do
+               var y_total = data.first.left.zero
+               for data in self.data do
+                       y_total += (data.left + data.right)/y_total.value_of(2)
+               end
+               return y_total/y_total.value_of(self.data.length)
+       end
+end
+
+# Static implementation of the quadtree structure.
+# You need to specify a zone when creating the quadtree,
+# which will be the zone corresponding to the root node.
+# each subdivision cut the space in 4 equal regions from
+# the center of the parent node
+class SQuadTree[E: Boxed[Numeric]]
+       super QuadTree[E]
+       
+       # the width of the current node of the QuadTree
+       var width: Numeric
+       # the height of the current node of the QuadTree
+       var height: Numeric
+
+       init(l: Int, c: Point[Numeric], w: Numeric, h: Numeric)
+       do
+               self.item_limit = l
+               self.center = c
+               self.width = w
+               self.height = h
+       end
+
+       init with_parent(l: Int, c: Point[Numeric], w: Numeric, h: Numeric, p: QuadTree[E])
+       do
+               init(l, c, w, h)
+               self.parent_node = p
+       end
+
+       redef fun subdivide
+       do
+               var two = self.center.x.value_of(2)
+               var tree = self.center.x.value_of(3)
+               child0 = new SQuadTree[E].with_parent(self.item_limit, new Point[Numeric](self.center.x/two, self.center.y/two), self.width/two, self.height/two, self)
+               child1 = new SQuadTree[E].with_parent(self.item_limit, new Point[Numeric](self.center.x/two, (self.center.y*tree)/two), self.width/two, self.height/two, self)
+               child2 = new SQuadTree[E].with_parent(self.item_limit, new Point[Numeric]((self.center.x*tree)/two, (self.center.y*tree)/two), self.width/two, self.height/two, self)
+               child3 = new SQuadTree[E].with_parent(self.item_limit, new Point[Numeric]((self.center.x*tree)/two, self.center.y/two), self.width/two, self.height/two, self)
+       end
+end
index d6c8092..4fc8530 100644 (file)
@@ -194,7 +194,25 @@ class HTMLTag
        #     var ul = new HTMLTag("ul")
        #     ul.add(new HTMLTag("li"))
        #     assert ul.write_to_string    == "<ul><li></li></ul>"
-       fun add(child: HTMLTag) do children.add(child)
+       # returns `self` for fluent programming
+       fun add(child: HTMLTag): HTMLTag
+       do
+               children.add(child)
+               return self
+       end
+
+       # Create a new HTMLTag child and return it
+       #
+       #     var ul = new HTMLTag("ul")
+       #     ul.open("li").append("1").append("2")
+       #     ul.open("li").append("3").append("4")
+       #     assert ul.write_to_string    == "<ul><li>12</li><li>34</li></ul>"
+       fun open(tag: String): HTMLTag
+       do
+               var res = new HTMLTag(tag)
+               add(res)
+               return res
+       end
 
        # List of children HTML elements
        var children: Set[HTMLTag] = new HashSet[HTMLTag]
index a0233fa..dd5af2d 100644 (file)
@@ -421,6 +421,14 @@ class Opengles1Display
                glClearColor( r, g, b, a );
                glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        `}
+
+       # Set the current color applied to all drawing
+       #
+       # require: r, g, b, a in [0.0 .. 1.0]
+       fun color(r, g, b, a: Float) `{ glColor4f(r, g, b, a); `}
+
+       # Reset the current color to opaque white
+       fun reset_color `{ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); `}
 end
 
 extern class Opengles1Image in "C" `{struct mnit_opengles_Texture *`}
diff --git a/lib/mnit/tileset.nit b/lib/mnit/tileset.nit
new file mode 100644 (file)
index 0000000..7b473f3
--- /dev/null
@@ -0,0 +1,125 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Manage images that are tileset or glyphset (for bitmap fonts)
+module tileset
+
+import mnit_display
+
+# Efficienly retrieve tiles in a big image
+class TileSet
+       # The image containing the tileset
+       var image: Image
+
+       # The witdh of a tile
+       var width: Int
+
+       # The height of a tile
+       var height: Int
+
+       init(image: Image, width: Int, height: Int)
+       do
+               self.image = image
+               self.width = width
+               self.height = height
+
+               self.nb_cols = image.width / width
+               self.nb_rows = image.height / height
+
+               for j in [0..nb_rows[ do
+                       for i in [0..nb_cols[ do
+                               subimages.add image.subimage(i*width,j*height,width,height)
+                       end
+               end
+       end
+
+       # The number of columns of tiles in the image
+       var nb_cols: Int
+
+       # The number of rows of tiles in the image
+       var nb_rows: Int
+
+       # Cache for images of tiles
+       private var subimages = new Array[Image]
+
+       # The subimage of given tile
+       # Aborts if x or y are out of bound
+       fun [](x,y: Int): Image
+       do
+               assert x >= 0 and x < nb_cols and y >= 0 and y <= nb_rows else print "{x}x{y}<?{nb_cols}x{nb_rows}"
+               var idx = x + y * nb_cols
+               return subimages[idx]
+       end
+end
+
+# A monospace bitmap font where glyphs are stored in a tileset
+class TileSetFont
+       super TileSet
+
+       # Each caracter in the image
+       # in left->right, then top->bottom order
+       # Use space (' ') for holes in the tileset
+       var chars: String
+
+       init(image: Image, width: Int, height: Int, chars: String)
+       do
+               super
+               self.chars = chars
+       end
+
+       # Additional space to insert horizontally between characters
+       # A negave value will display tile overlaped
+       var hspace: Int writable = 0
+
+       # Additional space to insert vertically between characters
+       # A negave value will display tile overlaped
+       var vspace: Int writable = 0
+
+       # The glyph (tile) associated to the caracter `c` according to `chars`
+       # Returns null if `c` is not in `chars`
+       fun char(c: Char): nullable Image
+       do
+               var i = chars.index_of(c)
+               if i == -1 then return null
+               return subimages[i]
+       end
+end
+
+redef class Display
+       # Blit the text using a monospace bitmap font
+       # '\n' are rendered as carriage return
+       fun text(text: String, font: TileSetFont, x, y: Int)
+       do
+               var cx = x
+               var cy = y
+               var sw = font.width + font.hspace
+               var sh = font.height + font.vspace
+               for c in text.chars do
+                       if c == '\n' then
+                               cx = x
+                               cy += sh
+                               continue
+                       end
+                       if c == ' ' then
+                               cx += sw
+                               continue
+                       end
+                       var image = font.char(c)
+                       if image != null then
+                               blit(image, cx, cy)
+                       end
+                       cx += sw
+               end
+       end
+end
index 8ca123c..c25e56a 100644 (file)
@@ -199,7 +199,7 @@ extern class AndroidKeyEvent in "C" `{AInputEvent *`}
                return 0;
        `}
 
-       fun is_back_key: Bool do return key_code == 2
+       fun is_back_key: Bool do return key_code == 4
        fun is_menu_key: Bool do return key_code == 82
        fun is_search_key: Bool do return key_code == 84
 end
index 26a4bde..f04dadc 100644 (file)
@@ -61,6 +61,17 @@ interface Drawable
        # Draw image on self, for top left position
        fun blit( image: I, x, y: Int ) is abstract
 
+       # Draw image on self, for top left position but scaled
+       # the width and height of the target rectangle is specified
+       fun blit_scaled(image: Image, x, y, w, h: Int)
+       do
+               var fx = x.to_f
+               var fy = y.to_f
+               var fx2 = fx + w.to_f
+               var fy2 = fy + h.to_f
+               blit_stretched(image, fx, fy, fx, fy2, fx2, fy2, fx2, fy)
+       end
+
        # Draw image, centered at position
        fun blit_centered( image: I, x, y: Int ) is abstract
 
@@ -71,8 +82,13 @@ interface Drawable
        fun blit_rotated_scaled( image: I, x, y, angle, scale: Float ) is abstract
 
        # Draw image by specifying the positon of each image corners
-       # Corners are in clockwise order stating top right
-       # a is top right, b is bottom right, c is bottom left and d is top left
+       # Corners are in counter-clockwise order stating top left
+       # a is top left, b is bottom left, c is bottom right and d is top right
+       # ~~~
+       # a-d
+       # | |
+       # b-c
+       # ~~~
        fun blit_stretched( image: I, ax, ay, bx, by, cx, cy, dx, dy: Float )
                is abstract
 
index 5534d5a..4b599ed 100644 (file)
@@ -29,7 +29,7 @@ redef class App
        redef type D: Opengles1Display
        redef type I: Opengles1Image
 
-       redef init
+       redef fun setup
        do
                display = new Opengles1Display
 
index 9247991..2c75bb5 100644 (file)
@@ -22,7 +22,7 @@ import linux_app
 redef class App
        var assets_dir: String
 
-       redef init
+       redef fun setup
        do
                assets_dir = sys.program_name.dirname + "/../assets/"
 
diff --git a/lib/ropes_debug.nit b/lib/ropes_debug.nit
new file mode 100644 (file)
index 0000000..b9ba5ab
--- /dev/null
@@ -0,0 +1,76 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2004-2008 Jean Privat <jean@pryen.org>
+# Copyright 2006-2008 Floréal Morandat <morandat@lirmm.fr>
+#
+# This file is free software, which comes along with NIT.  This software 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.  You can modify it is you want,  provided this header
+# is kept unaltered, and a notification of the changes is added.
+# You  are  allowed  to  redistribute it and sell it, alone or is a part of
+# another product.
+
+# Exposes methods for debugging ropes when needed.
+module ropes_debug
+
+intrude import ::standard::ropes
+import ::standard
+
+redef class Rope
+       # Writes self as a dot file on the hard drive
+       fun to_dot(filepath: String): String is abstract
+end
+
+redef class RopeNode
+       # Generates a dot string
+       fun to_dot(s: String): String is abstract
+end
+
+redef class Leaf
+       redef fun to_dot(s): String
+       do
+               s += "n{object_id} [label = \"{str}\" shape = rect];\n"
+               s += "n{str.object_id} -> n{object_id} [label = \"contains\"];\n"
+               s = str.to_dot(s)
+               return s
+       end
+end
+
+redef class Concat
+       redef fun to_dot(s): String
+       do
+               s += "n{object_id} [label = {length}];\n"
+               if left != null then
+                       s += "n{object_id} -> n{left.object_id} [label = \"left\"];\n"
+                       s = left.to_dot(s)
+               end
+               if right != null then
+                       s += "n{object_id} -> n{right.object_id} [label = \"right\"];\n"
+                       s = right.to_dot(s)
+               end
+               return s
+       end
+end
+
+redef class FlatString
+       fun to_dot(s: String): String
+       do
+               return s + "n{object_id} [label=\"FlatString\\nindex_from = {index_from}\\nindex_to = {index_to}\\nNativeString = {items.to_s_with_length(items.cstring_length)}\"];\n"
+       end
+end
+
+redef class RopeString
+       redef fun to_dot(filepath: String)
+       do
+               var of = new OFStream.open(filepath)
+               var ret: String = new RopeString.from("digraph g \{\n")
+               ret = root.to_dot(ret).as(RopeString)
+               ret += "\}\n"
+               ret.write_to(of)
+               of.close
+               return ret
+       end
+end
+
+
index 27b2626..f82a1fd 100644 (file)
@@ -16,7 +16,7 @@
 module file
 
 intrude import stream
-intrude import string
+intrude import ropes
 import string_search
 import time
 
@@ -134,7 +134,11 @@ class OFStream
        redef fun write(s)
        do
                assert _writable
-               write_native(s.to_cstring, s.length)
+               if s isa FlatText then
+                       write_native(s.to_cstring, s.length)
+               else
+                       for i in s.substrings do write_native(i.to_cstring, i.length)
+               end
        end
 
        redef fun is_writable do return _writable
index 5758afd..45c1cbd 100644 (file)
 # A rope is a kind of string but instead of being flat, it relies on a binary tree structure to store data.
 module ropes
 
-import file
 intrude import string
 
-# Structure, tuple containing a LeafNode and an Int
-# Used for methods like [] or has/has_only
-private class TupleLeafNodePos
-       private var curr_node: LeafNode
-       private var corrected_pos: Int
-       private var visit_stack: List[TupleVisitNode]
+# Used when searching for a particular node
+# Returns the path to the node from the root of the rope
+# Also, the node and the offset for seeked position in the rope
+private class Path
+       # Leaf found
+       var leaf: Leaf
+       # Offset in leaf
+       var offset: Int
+       # Stack of the nodes traversed, and the path used
+       var stack: List[PathElement]
 end
 
-# Abstract class, represents all the services offered by both mutable and immutable ropes
-abstract class Rope
-       super Comparable
-       super StringCapable
-
-       # Cached version of self as a flat String
-       private var str_representation: nullable String = null
-
-       redef type OTHER: Rope
+# An element for a Path, has the concat node and whether or not
+# left or right child was visited.
+private class PathElement
+       # Visited node
+       var node: Concat
+       # Was the left child visited ?
+       var left = false
+       # Was the right child visited ?
+       var right = false
+end
 
-       # The first node of the hierarchy
-       private var parent_node: RopeNode
+# A node for a Rope
+private abstract class RopeNode
+       # Length of the node
+       var length = 0
+end
 
-       # Needed by the compiler to avoid producing an error with constructors in subclasses
-       init do
-               self.parent_node = new ConcatNode
-       end
+# Node that represents a concatenation between two nodes (of any RopeNode type)
+private class Concat
+       super RopeNode
 
-       # Initializes a new Rope with a text embedded in directly
-       init with_string(str: String) do
-               self.parent_node = new ConcatNode
-               parent_node.as(ConcatNode).right_child = new LeafNode(str)
-               parent_node.as(ConcatNode).update_data
-       end
+       # Left child of the node
+       var _left: nullable RopeNode = null
+       # Right child of the node
+       var _right: nullable RopeNode = null
 
-       # Returns a view on the rope
-       fun chars: SequenceRead[Char]
-       do
-               return new CharRopeView(self)
-       end
+       fun left: nullable RopeNode do return _left
+       fun right: nullable RopeNode do return _right
 
-       # Gets the total length of the Rope
-       fun length: Int
+       fun left=(l: RopeNode)
        do
-               return parent_node.length
+               _left = l
+               length = l.length
+               if _right != null then length += _right.length
        end
 
-       # Returns a flat version of self
-       redef fun to_s
+       fun right=(r: RopeNode)
        do
-               if self.str_representation == null then flatten
-               return str_representation.as(not null)
+               _right = r
+               length = r.length
+               if _left != null then length += _left.length
        end
+end
 
-       # Stores a flat version of self in cache
-       private fun flatten: FlatString
-       do
-               var native_final_str = calloc_string(length + 1)
-
-               native_final_str[length] = '\0'
-
-               var offset = 0
-
-               var iter = new DFSRopeLeafIterator(self)
-
-               while iter.is_ok do
-                       iter.item.value.as(FlatString).items.copy_to(native_final_str, iter.item.value.length, 0, offset)
-                       offset += iter.item.value.length
-                       iter.next
-               end
+# Leaf of a Rope, contains a FlatString
+private class Leaf
+       super RopeNode
 
-               return native_final_str.to_s_with_length(length)
-       end
+       # Encapsulated FlatString in the leaf node
+       var str: FlatString
 
-       # Gets a node containing the substring to seek the char at the require position
-       private fun get_node_for_pos(position: Int): TupleLeafNodePos
-       do
-               assert position >= 0 and position < self.length
-
-               var curr_node: nullable RopeNode = parent_node
-
-               var visit_stack = new List[TupleVisitNode]
-
-               var curr_visit_tuple: TupleVisitNode
-
-               loop
-                       if curr_node isa ConcatNode then
-                               curr_visit_tuple = new TupleVisitNode(curr_node)
-                               if curr_node.left_child != null and position < curr_node.left_child.length then
-                                       curr_visit_tuple.left_visited = true
-                                       curr_node = curr_node.left_child
-                               else if curr_node.right_child != null then
-                                       curr_visit_tuple.left_visited = true
-                                       curr_visit_tuple.right_visited = true
-                                       if curr_node.left_child != null then position -= curr_node.left_child.length
-                                       curr_node = curr_node.right_child
-                               else
-                                       print "Fatal Error"
-                                       abort
-                               end
-                               visit_stack.push(curr_visit_tuple)
-                       else if curr_node isa LeafNode then
-                               return new TupleLeafNodePos(curr_node, position, visit_stack)
-                       end
-               end
+       init(val: FlatString) do
+               self.str = val
+               length = str.length
        end
 
-       # Concats two ropes and returns a new one
-       fun +(other: Rope): Rope do
-               var new_rope = new BufferRope
+end
 
-               var first_iter = new DFSRopeLeafIterator(self)
+# Basic structure, binary tree with a root node.
+#
+# Also shared services by subsequent implementations.
+abstract class Rope
+       super Text
 
-               while first_iter.is_ok do
-                       new_rope.append(first_iter.item.value)
-                       first_iter.next
-               end
+       # Root node, entry point of a Rope.
+       private var root: RopeNode
 
-               var second_iter = new DFSRopeLeafIterator(other)
+       # Cached version of self as a flat String
+       private var str_representation: nullable NativeString = null
 
-               while second_iter.is_ok do
-                       new_rope.append(second_iter.item.value)
-                       second_iter.next
-               end
+       # Empty Rope
+       init do from("")
 
-               return new_rope
+       # Creates a new Rope with `s` as root
+       init from(s: String) do
+               if s isa RopeString then root = s.root else root = new Leaf(s.as(FlatString))
        end
 
-       # Returns a copy of several ropes concatenated
-       #
-       # Is equivalent to a chain of + operations
-       # Except this one is optimized for performance
-       fun multi_concat(ropes: Rope...): Rope
+       private init from_root(r: RopeNode)
        do
-               var new_rope = new BufferRope
+               root = r
+       end
 
-               var self_iter = self.iterator
-               while self_iter.is_ok do
-                       new_rope.append(self_iter.item.value)
-                       self_iter.next
-               end
+       redef fun length do return root.length
 
-               for i in ropes do
-                       var iter = i.iterator
-                       while iter.is_ok do
-                               new_rope.append(iter.item.value)
-                               iter.next
-                       end
-               end
+       # Iterator on the nodes of the rope, in forward postfix order
+       private fun postfix(from: Int): Postfix do return new Postfix.from(self, from)
 
-               return new_rope
-       end
+       # Iterator on the leaves of the rope, forward order
+       private fun leaves(from: Int): LeavesIterator do return new LeavesIterator(self, from)
 
-       # Appends the content of self multiple times in a new Rope object
-       fun *(repeats: Int): Rope do
+       # Iterator on the substrings from 0, in forward order
+       redef fun substrings do return new SubstringsIterator(self, 0)
 
-               var new_rope = new BufferRope
+       # Iterator on the substrings, starting at position `from`, in forward order
+       fun substrings_from(from: Int): IndexedIterator[Text] do return new SubstringsIterator(self, from)
 
-               var str = self.to_s
+       # Iterator on the nodes of the rope, in backwards postfix order
+       private fun reverse_postfix(from: Int): ReversePostfix do return new ReversePostfix.from(self, from)
 
-               for i in [1 .. repeats] do new_rope.append(str)
+       # Iterator on the leaves of the rope, backwards order
+       private fun reverse_leaves(from: Int): ReverseLeavesIterator do return new ReverseLeavesIterator(self,from)
 
-               return new_rope
-       end
+       # Iterator on the substrings, in reverse order
+       fun reverse_substrings: IndexedIterator[Text] do return new ReverseSubstringsIterator(self, length-1)
 
-       # Returns an iterator on self
-       #
-       # Unsafe modifications on a MutableRope
-       #
-       private fun iterator: Iterator[LeafNode] do return new DFSRopeLeafIterator(self)
+       # Iterator on the substrings, in reverse order, starting iteration at position `from`
+       fun reverse_substrings_from(from: Int): IndexedIterator[Text] do return new ReverseSubstringsIterator(self, from)
 
-       # Creates a subrope.
-       #
-       # var rope = (new BufferRope).append("abcd")
-       #
-       #       assert rope.subrope(1, 2)         ==  "bc"
-       #       assert rope.subrope(-1, )         ==  "a"
-       #       assert rope.subrope(1, 0)         ==  ""
-       #       assert rope.subrope(2, 5)         ==  "cd"
-       #
-       # A `index_from` index < 0 will be replaced by 0.
-       # Unless a `count` value is > 0 at the same time.
-       # In this case, `index_from += count` and `count -= index_from`.
-       #
-       fun subrope(index_from: Int, count: Int): Rope
+       redef fun output
        do
-               assert count >= 0
-
-               if index_from < 0 then
-                       count += index_from
-                       if count < 0 then count = 0
-                       index_from = 0
+               for i in substrings do
+                       i.output
                end
+       end
 
-               if count - index_from >= self.length then count = length - index_from
+       redef fun to_cstring
+       do
+               if str_representation != null then return str_representation.as(not null)
 
-               var buffer = new BufferRope
+               var native_final_str = calloc_string(length + 1)
 
-               var iter = new DFSRopeLeafIterator.with_index(self, index_from)
+               native_final_str[length] = '\0'
 
-               var curr_subrope_index = index_from - iter.pos
+               if self.length == 0 then
+                       str_representation = native_final_str
+                       return native_final_str
+               end
 
-               while iter.is_ok do
-                       if count == 0 then break
-                       if curr_subrope_index > 0 then
-                               if count >= iter.item.value.length then
-                                       buffer.append(iter.item.value.substring(curr_subrope_index, count))
-                                       count -= iter.item.value.length - curr_subrope_index
-                                       curr_subrope_index = 0
-                               else
-                                       buffer.append(iter.item.value.substring(curr_subrope_index, count))
-                                       break
-                               end
-                       else
-                               if count >= iter.item.value.length then
-                                       buffer.append(iter.item.value)
-                                       count -= iter.item.value.length
-                               else
-                                       buffer.append(iter.item.value.substring(0, count))
-                                       break
-                               end
-                       end
+               var offset = 0
 
-                       iter.next
+               for i in substrings do
+                       var str = i.flatten
+                       if str isa FlatString then str.items.copy_to(native_final_str, str.length, str.index_from, offset)
+                       offset += i.length
                end
 
-               return buffer
-       end
+               str_representation = native_final_str
 
-       # Returns an upper (capitalized) version of self
-       fun to_upper: Rope
-       do
-               var new_rope = new BufferRope
-               var iter = new DFSRopeLeafIterator(self)
-               while iter.is_ok do
-                       new_rope.append(iter.item.value.to_upper)
-                       iter.next
-               end
-               return new_rope
+               return native_final_str
        end
 
-       # Returns a lower (minuscule) version of self
-       fun to_lower: Rope
+       # Path to the Leaf for `position`
+       private fun node_at(position: Int): Path
        do
-               var new_rope = new BufferRope
-               var iter = new DFSRopeLeafIterator(self)
-               while iter.is_ok do
-                       new_rope.append(iter.item.value.to_lower)
-                       iter.next
-               end
-               return new_rope
+               assert position >= 0 and position < length
+               return get_node_from(root.as(not null), 0, position, new List[PathElement])
        end
 
-       ############################################################################
-       #                       Comparable Refined Methods                         #
-       ############################################################################
-
-       # Compares the current Rope to another object (either another rope or a String)
-       redef fun == (other)
+       # Builds the path to Leaf at position `seek_pos`
+       private fun get_node_from(node: RopeNode, curr_pos: Int, seek_pos: Int, stack: List[PathElement]): Path
        do
-               if other == null or not (other isa Rope or other isa FlatText) then return false
-               var self_iter = new RopeCharIterator(self)
-               if other isa Rope then
-                       if self.length != other.length then return false
-                       var other_iterator = new RopeCharIterator(other)
-                       while self_iter.is_ok do
-                               if self_iter.item != other_iterator.item then return false
-                               self_iter.next
-                               other_iterator.next
-                       end
-               else if other isa FlatText then
-                       var pos = 0
-                       if self.length != other.length then return false
-                       while self_iter.is_ok do
-                               if self_iter.item != other[pos] then return false
-                               pos += 1
-                               self_iter.next
+               assert curr_pos >= 0
+               if node isa Leaf then return new Path(node, seek_pos - curr_pos, stack)
+               node = node.as(Concat)
+
+               if node.left != null then
+                       var next_pos = curr_pos + node.left.length
+                       stack.add(new PathElement(node))
+                       if next_pos > seek_pos then
+                               stack.last.left = true
+                               return get_node_from(node.left.as(not null), curr_pos, seek_pos, stack)
                        end
+                       stack.last.right = true
+                       return get_node_from(node.right.as(not null), next_pos, seek_pos, stack)
+               else
+                       var vis = new PathElement(node)
+                       vis.right = true
+                       stack.add(vis)
+                       return get_node_from(node.right.as(not null), curr_pos, seek_pos, stack)
                end
-               return true
        end
 
-       # Checks if self is lesser than other
-       #
-       # Comparison done in lexicographical order
-       # i.e. 'aa' < 'b'
-       #
-       redef fun <(other)
+       redef fun ==(o)
        do
-               var other_iter = other.chars.iterator
-               for i in self.chars do
-                       if not other_iter.is_ok then return false
-                       if i < other_iter.item then return true
-                       if i > other_iter.item then return false
-                       other_iter.next
+               if not o isa Text then return false
+               if o.length != self.length then return false
+               var oit = o.chars.iterator
+               for i in self.chars.iterator do
+                       if i != oit.item then return false
+                       oit.next
                end
-               if other_iter.is_ok then return true
-               return false
+               return true
        end
-
 end
 
-# Rope that can be modified
-#
-# /!\ Non Thread-safe /!\
-#
-class BufferRope
+# Rope that cannot be modified
+class RopeString
        super Rope
+       super String
 
-       var is_dirty: Bool = false
+       redef fun to_s do return self
 
-       init
-       do
-               super
-       end
+       redef fun empty do return once new RopeString.from("")
 
-       redef init with_string(str)
-       do
-               super
-       end
-
-       ############################################################################
-       #                         Tree Balancing Methods                           #
-       ############################################################################
+       redef var chars: SequenceRead[Char] = new RopeStringChars(self)
 
-       # Performs a right rotation on a node of the Rope
-       #
-       #              Root                Pivot
-       #             /    \              /     \
-       #           Pivot Leaf3     =>  Leaf1  Root
-       #          /     \                    /   \
-       #       Leaf1   Leaf2              Leaf2  Leaf3
-       private fun rotate_right(root: ConcatNode)
+       redef fun reversed
        do
-               assert root.left_child != null
-               var pivot = root.left_child.as(ConcatNode)
-               var root_new_left = pivot.right_child
-               var root_parent = root.parent
-
-               root.left_child = root_new_left
-               pivot.right_child = root
-               if root_parent == null then
-                       self.parent_node = pivot
-                       pivot.parent = null
-                       return
+               var ret = empty.as(RopeString)
+               for i in substrings do
+                       ret = ret.prepend(i.reversed.to_s).as(RopeString)
                end
-
-               if root_parent.left_child == root then
-                       root_parent.left_child = pivot
-               else
-                       root_parent.right_child = pivot
-               end
-
-               root.update_data
-               pivot.update_data
-               root_parent.update_data
+               return ret
        end
 
-       # Performs a left rotation on a node of the Rope
-       #
-       #      Root                    Pivot
-       #     /    \                  /     \
-       #  Leaf1  Pivot        =>   Root   Leaf3
-       #        /     \           /    \
-       #      Leaf2  Leaf3      Leaf1 Leaf2
-       private fun rotate_left(root: ConcatNode)
+       redef fun to_upper
        do
-               assert root.right_child != null
-               var pivot = root.right_child.as(ConcatNode)
-               var root_new_right = pivot.left_child
-               var root_parent = root.parent
-
-               root.right_child = root_new_right
-               pivot.left_child = root
-               if root_parent == null then
-                       self.parent_node = pivot
-                       pivot.parent = null
-                       return
+               var ret = empty
+               for i in substrings do
+                       ret += i.to_upper
                end
-
-               if root_parent.left_child == root then
-                       root_parent.left_child = pivot
-               else
-                       root_parent.right_child = pivot
-               end
-
-               root.update_data
-               pivot.update_data
-               root_parent.update_data
+               return ret
        end
 
-       # Shortcut method to balance a node and its parents
-       # based on the rules of the AVL Tree
-       private fun balance_from_node(parent_node: nullable ConcatNode)
+       redef fun to_lower
        do
-               while parent_node != null do
-                       parent_node.update_data
-                       var node_balance = parent_node.balance_factor
-                       if node_balance < -1 or node_balance > 1 then
-                               balance_node(parent_node)
-                       end
-                       parent_node = parent_node.parent
+               var ret = empty
+               for i in substrings do
+                       ret += i.to_lower
                end
+               return ret
        end
 
-       # Performs rotations to balance a node according to AVL Tree rules
-       private fun balance_node(node: ConcatNode)
+       redef fun +(o) do return insert_at(o.to_s, length)
+
+       redef fun *(n)
        do
-               var balance_factor = node.balance_factor
-               if balance_factor < -1 then
-                       var right_balance = node.right_child.balance_factor
-                       if right_balance < 0 then
-                               rotate_left(node)
-                       else
-                               rotate_right(node.right_child.as(ConcatNode))
-                               rotate_left(node)
-                       end
-               else
-                       var left_balance = node.left_child.balance_factor
-                       if left_balance > 0 then
-                               rotate_right(node)
-                       else
-                               rotate_left(node.left_child.as(ConcatNode))
-                               rotate_right(node)
-                       end
+               var ret = new RopeString.from("")
+               for i in [0..n[ do
+                       ret = (ret + self).as(RopeString)
                end
+               return ret
        end
 
-       ############################################################################
-       #                      BufferRope exclusive Methods                        #
-       ############################################################################
-
-       # Appends a new Collection[Char] at the end of the current rope
-       fun append(str: String): BufferRope
+       # Inserts a String `str` at position `pos`
+       redef fun insert_at(str, pos)
        do
-               var last_node = parent_node
-
-               while last_node isa ConcatNode and last_node.right_child != null do
-                       last_node = last_node.right_child.as(not null)
-               end
-
-               if last_node isa ConcatNode then
-                       last_node.right_child = new LeafNode(str.to_s)
-               else if last_node isa LeafNode then
-                       var last_node_parent = last_node.parent
-                       var new_concat = new ConcatNode
-                       last_node_parent.right_child = new_concat
-                       new_concat.left_child = last_node
-                       new_concat.right_child = new LeafNode(str.to_s)
-                       last_node = new_concat
-               else
-                       print "Fatal Error, please report to the developers for more insight."
-                       abort
-               end
+               if str.length == 0 then return self
+               if self.length == 0 then return new RopeString.from(str)
 
-               balance_from_node(last_node)
+               assert pos >= 0 and pos <= length
 
-               is_dirty = true
+               if pos == length then return append(str).as(RopeString)
 
-               return self
-       end
+               var path = node_at(pos)
 
-       # Variatic function to append several collections of Chars
-       fun append_multi(strs: String...): BufferRope
-       do
-               for i in strs do
-                       append(i)
-               end
-               return self
-       end
+               var last_concat = new Concat
 
-       # Adds a new Collection[Char] at the beginning of the rope
-       fun prepend(str: String): BufferRope
-       do
-               var curr_node = parent_node
-
-               while curr_node isa ConcatNode and curr_node.left_child != null do
-                       curr_node = curr_node.left_child.as(not null)
-               end
-
-               if curr_node isa ConcatNode then
-                       curr_node.left_child = new LeafNode(str.to_s)
-               else if curr_node isa LeafNode then
-                       var parent = curr_node.parent
-                       var new_concat = new ConcatNode
-                       var new_leaf = new LeafNode(str.to_s)
-                       new_concat.left_child = new_leaf
-                       new_concat.right_child = curr_node
-                       parent.left_child = new_concat
-                       curr_node = new_concat
+               if path.offset == 0 then
+                       last_concat.right = path.leaf
+                       if str isa FlatString then last_concat.left = new Leaf(str) else last_concat.left = str.as(RopeString).root
+               else if path.offset == path.leaf.length then
+                       if str isa FlatString then last_concat.right = new Leaf(str) else last_concat.right = str.as(RopeString).root
+                       last_concat.left = path.leaf
                else
-                       print "Fatal Error"
-                       abort
+                       var s = path.leaf.str
+                       var l_half = s.substring(0, s.length - path.offset)
+                       var r_half = s.substring_from(s.length - path.offset)
+                       var cct = new Concat
+                       cct.right = new Leaf(r_half.as(FlatString))
+                       last_concat.left = new Leaf(l_half.as(FlatString))
+                       if str isa FlatString then last_concat.right = new Leaf(str) else last_concat.right = str.as(RopeString).root
+                       cct.left = last_concat
+                       last_concat = cct
+               end
+
+               for i in path.stack.reverse_iterator do
+                       var nod = new Concat
+                       if i.left then
+                               nod.right = i.node.right.as(not null)
+                               nod.left = last_concat
+                       else
+                               nod.left = i.node.left.as(not null)
+                               nod.right = last_concat
+                       end
+                       last_concat = nod
                end
 
-               balance_from_node(curr_node)
+               return new RopeString.from_root(last_concat)
+       end
 
-               is_dirty = true
+       # Adds `s` at the beginning of self
+       redef fun prepend(s) do return insert_at(s, 0)
 
-               return self
+       # Adds `s` at the end of self
+       redef fun append(s)
+       do
+               if self.is_empty then return s
+               return new RopeString.from_root(append_to_path(root,s))
        end
 
-       # Variatic function to prepend several collections of Chars
-       fun prepend_multi(strs: String...): BufferRope
+       # Builds a new path from root to the rightmost node with s appended
+       private fun append_to_path(node: RopeNode, s: String): RopeNode
        do
-               for i in strs do
-                       prepend(i)
+               var cct = new Concat
+               if node isa Leaf then
+                       cct.left = node
+                       if s isa FlatString then cct.right = new Leaf(s) else cct.right = s.as(RopeString).root
+               else if node isa Concat then
+                       var right = node.right
+                       if node.left != null then cct.left = node.left.as(not null)
+                       if right == null then
+                               if s isa FlatString then cct.right = new Leaf(s) else cct.right = s.as(RopeString).root
+                       else
+                               cct.right = append_to_path(right, s)
+                       end
                end
-               return self
+               return cct
        end
 
-       # Adds the content of `str` after self, does not create a new rope object
-       fun concat(str: Rope): Rope
+       # O(log(n))
+       #
+       #     var rope = new RopeString.from("abcd")
+       #     assert rope.substring(1, 2)         ==  "bc"
+       #     assert rope.substring(-1, 2)         ==  "a"
+       #     assert rope.substring(1, 0)         ==  ""
+       #     assert rope.substring(2, 5)         ==  "cd"
+       #
+       redef fun substring(pos, len)
        do
-               var other_iter = new DFSRopeLeafIterator(str)
-
-               var modif_list = new List[String]
-
-               while other_iter.is_ok do
-                       modif_list.push(other_iter.item.value)
-                       other_iter.next
+               if pos < 0 then
+                       len += pos
+                       pos = 0
                end
 
-               while modif_list.length > 0 do
-                       self.append(modif_list.shift)
-               end
+               if pos + len > length then len = length - pos
 
-               if not is_dirty then is_dirty = true
+               if len <= 0 then return new RopeString.from("")
 
-               return self
-       end
+               var path = node_at(pos)
 
-       # Returns the content of the current BufferRope object as an ImmutableRope
-       fun freeze: ImmutableRope
-       do
-               var buffer_rope = new BufferRope
-               var new_rope = new ImmutableRope
+               var lf = path.leaf
+               var offset = path.offset
+
+               if path.leaf.str.length - offset > len then lf = new Leaf(lf.str.substring(offset,len).as(FlatString)) else lf = new Leaf(lf.str.substring_from(offset).as(FlatString))
 
-               var iter = new DFSRopeLeafIterator(self)
+               var nod: RopeNode = lf
 
-               while iter.is_ok do
-                       buffer_rope.append(iter.item.value)
-                       iter.next
+               for i in path.stack.reverse_iterator do
+                       if i.right then continue
+                       var tmp = new Concat
+                       tmp.left = nod
+                       var r = i.node.right
+                       if r != null then tmp.right = r
+                       nod = tmp
                end
 
-               new_rope.parent_node = buffer_rope.parent_node
+               var ret = new RopeString
+               ret.root = nod
 
-               if not is_dirty then new_rope.str_representation = self.str_representation
+               path = ret.node_at(len-1)
 
-               return new_rope
-       end
+               offset = path.offset
+               nod = new Leaf(path.leaf.str.substring(0, offset+1).as(FlatString))
 
-       # Unsafe method to convert self as an ImmutableRope
-       #
-       # To be used internally only
-       private fun to_immutable: ImmutableRope
-       do
-               var immutable_self = new ImmutableRope
-               immutable_self.parent_node = self.parent_node
-               return immutable_self
-       end
+               for i in path.stack.reverse_iterator do
+                       if i.left then continue
+                       var tmp = new Concat
+                       tmp.right = nod
+                       var l = i.node.left
+                       if l != null then tmp.left = l
+                       nod = tmp
+               end
 
-       ############################################################################
-       #                          Rope refined Methods                            #
-       ############################################################################
+               ret.root = nod
 
-       redef fun subrope(index_from: Int, count: Int): BufferRope
-       do
-               return super.as(BufferRope)
+               return ret
        end
+end
 
-       redef fun *(repeats: Int): BufferRope
-       do
-               return super.as(BufferRope)
-       end
+redef class FlatString
 
-       redef fun +(other: Rope): BufferRope
-       do
-               return super.as(BufferRope)
-       end
+       redef fun append(s) do return (new RopeString.from(self)) + s
 
-       redef fun multi_concat(ropes: Rope...): BufferRope
-       do
-               return super.as(BufferRope)
-       end
+       redef fun prepend(s) do return (new RopeString.from(self)).prepend(s)
 
-       # Refines to add a cache method, calculates only once for every modification
-       # the string representation for self
-       redef fun to_s
+       redef fun insert_at(s, pos)
        do
-               if self.str_representation == null or is_dirty then
-                       self.str_representation = flatten
-                       is_dirty = false
-               end
-               return self.str_representation.as(not null)
+               if pos == 0 then return prepend(s)
+               if pos == length then return append(s)
+
+               var l = substring(0,pos)
+               var r = substring_from(pos)
+               var ret: String = new RopeString.from(l)
+               ret += s
+               return ret + r
        end
 
 end
 
-# Rope that cannot be modified
-class ImmutableRope
-       super Rope
+private class RopeStringChars
+       super SequenceRead[Char]
 
-       init
-       do
-               super
-       end
+       var tgt: Rope
 
-       redef init with_string(str)
+       redef fun [](pos)
        do
-               super
+               assert pos < tgt.length
+               var path = tgt.node_at(pos)
+               return path.leaf.str.chars[path.offset]
        end
 
-       ############################################################################
-       #                          Rope refined Methods                            #
-       ############################################################################
+       redef fun iterator do return iterator_from(0)
 
-       redef fun subrope(index_from: Int, count: Int): ImmutableRope
-       do
-               return (super.as(BufferRope)).to_immutable
-       end
+       redef fun iterator_from(pos) do return new RopeCharIterator(tgt, pos)
 
-       redef fun *(repeats: Int): ImmutableRope
-       do
-               return (super.as(BufferRope)).to_immutable
-       end
+       redef fun reverse_iterator do return reverse_iterator_from(tgt.length-1)
 
-       redef fun +(other: Rope): ImmutableRope
-       do
-               return (super.as(BufferRope)).to_immutable
-       end
+       redef fun reverse_iterator_from(pos) do return new ReverseRopeCharIterator(tgt, pos)
+end
 
-       redef fun multi_concat(ropes: Rope...): ImmutableRope
+# Used to iterate on a Rope
+private class IteratorElement
+
+       init(e: RopeNode)
        do
-               return (super.as(BufferRope)).to_immutable
+               if e isa Leaf then
+                       left = true
+                       right = true
+               end
+               node = e
        end
 
+       # The node being visited
+       var node: RopeNode
+       # If the node has a left child, was it visited ?
+       var left = false
+       # If the node has a right child, was it visited ?
+       var right = false
+       # Was the current node visited ?
+       var done = false
 end
 
-############################################
-#            Rope view classes             #
-############################################
+# Simple Postfix iterator on the nodes of a Rope
+private class Postfix
+       super IndexedIterator[RopeNode]
 
-class CharRopeView
-       super SequenceRead[Char]
+       # Target Rope to iterate on
+       var target: Rope
+
+       # Current position in Rope
+       var pos: Int
 
-       # Targeted Rope for the view
-       private var target: Rope
+       # Visited nodes
+       var stack = new List[IteratorElement]
 
-       init(tgt: Rope)
+       init from(tgt: Rope, pos: Int)
        do
                self.target = tgt
+               self.pos = pos
+               if pos < 0 or pos >= tgt.length then return
+               var path = tgt.node_at(pos)
+               self.pos -= path.offset
+               for i in path.stack do
+                       var item = new IteratorElement(i.node)
+                       item.left = true
+                       if i.right then item.right = true
+                       stack.push item
+               end
+               var item = new IteratorElement(path.leaf)
+               item.done = true
+               stack.push item
        end
 
-       redef fun [](position)
+       redef fun item
        do
-               var tuple = target.get_node_for_pos(position)
-               return tuple.curr_node.value[tuple.corrected_pos]
+               assert is_ok
+               return stack.last.node
        end
 
-       redef fun first do return self[0]
+       redef fun is_ok do return not stack.is_empty
 
-       redef fun index_of(char)
-       do
-               var intern_iter = new RopeCharIterator(target)
-               while intern_iter.is_ok do
-                       if intern_iter.item == char then return intern_iter.index
-                       intern_iter.next
-               end
-               return -1
-       end
+       redef fun index do return pos
 
-       redef fun iterator do
-               return new RopeCharIterator(target)
+       redef fun next do
+               if stack.is_empty then return
+               if pos > target.length-1 then
+                       stack.clear
+                       return
+               end
+               var lst = stack.last
+               if lst.done then
+                       if lst.node isa Leaf then
+                               pos += lst.node.length
+                       end
+                       stack.pop
+                       next
+                       return
+               end
+               if not lst.left then
+                       lst.left = true
+                       var nod = lst.node
+                       if nod isa Concat and nod.left != null then
+                               stack.push(new IteratorElement(nod.left.as(not null)))
+                               next
+                               return
+                       end
+               end
+               if not lst.right then
+                       lst.right = true
+                       var nod = lst.node
+                       if nod isa Concat and nod.right != null then
+                               stack.push(new IteratorElement(nod.right.as(not null)))
+                               next
+                               return
+                       end
+               end
+               lst.done = true
        end
+end
 
-       redef fun last do return self[self.length-1]
+# Iterates on the leaves (substrings) of the Rope
+class LeavesIterator
+       super IndexedIterator[Leaf]
 
-       redef fun length do return target.length
+       private var nodes: Postfix
 
-       redef fun count(item)
+       init(tgt: Rope, pos: Int)
        do
-               var count = 0
-               var iter = self.iterator
-
-               for i in self do
-                       if i == item then count += 1
-               end
-
-               return count
+               nodes = tgt.postfix(pos)
        end
 
-       redef fun has_only(item)
-       do
-               for i in self do
-                       if i != item then return false
-               end
-               return true
-       end
-
-       redef fun is_empty do return length == 0
+       redef fun is_ok do return nodes.is_ok
 
-       redef fun to_a do
-               return to_s.to_a
+       redef fun item
+       do
+               assert is_ok
+               return nodes.item.as(Leaf)
        end
 
-       redef fun to_s do
-               return target.to_s
-       end
+       redef fun index do return nodes.index
 
-       redef fun ==(other)
+       redef fun next
        do
-               if not other isa SequenceRead[Char] then return false
-
-               if self.length != other then return false
-
-               var iter = other.iterator
-
-               for i in self do
-                       if i != iter.item then return false
-                       iter.next
+               while nodes.is_ok do
+                       nodes.next
+                       if nodes.is_ok and nodes.item isa Leaf then break
                end
-
-               return true
        end
-
 end
 
-###########################################
-#            Iterator classes             #
-###########################################
-
-# A tuple representing the state of a node for a tree parsing algorithm
-private class TupleVisitNode
+# Uses the leaves and calculates a new substring on each iteration
+class SubstringsIterator
+       super IndexedIterator[Text]
 
-       init(tgt: ConcatNode)
-       do
-               self.node = tgt
-       end
-
-       private var node: ConcatNode
+       private var nodes: IndexedIterator[Leaf]
 
-       private var left_visited = false
-       private var right_visited = false
-
-end
+       # Current position in Rope
+       var pos: Int
 
-# Any kind of iterator parsing a Rope for LeafNodes
-private abstract class RopeIterator
-       super IndexedIterator[LeafNode]
+       # Current substring, computed from the current Leaf and indexes
+       var substring: Text
 
-       # Rope meant to be visited
-       private var _target: Rope
+       init(tgt: Rope, pos: Int)
+       do
+               nodes = tgt.leaves(pos)
+               self.pos = pos
+               if pos < 0 or pos >= tgt.length then return
+               make_substring
+       end
 
-       private fun target: Rope do return self._target
+       # Compute the bounds of the current substring and makes the substring
+       private fun make_substring
+       do
+               substring = nodes.item.str
+               var min = 0
+               var length = substring.length
+               if nodes.index < pos then
+                       min = pos - nodes.index
+               end
+               substring = substring.substring(min, length)
+       end
 
-       # Position in target
-       private var pos = 0
+       redef fun is_ok do return nodes.is_ok
 
-       init(tgt: Rope)
+       redef fun item
        do
-               self._target = tgt
+               assert is_ok
+               return substring
        end
 
-       init with_index(tgt: Rope, index: Int)
+       redef fun index do return pos
+
+       redef fun next
        do
-               self._target = tgt
+               pos += substring.length
+               nodes.next
+               if nodes.is_ok then make_substring
        end
 
 end
 
-# Iterator returning the content of a rope one char at a time
 class RopeCharIterator
        super IndexedIterator[Char]
 
-       # The iterator used to visit the rope
-       private var sub_str_iter: DFSRopeLeafIterator
+       var substrings: IndexedIterator[Text]
 
-       # The current position in the rope
-       private var abs_pos = 0
+       var pos: Int
 
-       # The position in the current substring
-       private var sub_pos: Int = 0
+       var max: Int
 
-       # The substring contained in the current node visited by `sub_str_iter`
-       private var curr_substring: nullable String
+       var substr_iter: IndexedIterator[Char]
 
-       init(tgt: Rope)
+       init(tgt: Rope, from: Int)
        do
-               sub_str_iter = new DFSRopeLeafIterator(tgt)
-               if sub_str_iter.is_ok then curr_substring = sub_str_iter.item.value
+               substrings = tgt.substrings_from(from)
+               max = tgt.length - 1
+               if not substrings.is_ok then
+                       pos = tgt.length
+                       return
+               end
+               pos = from
+               substr_iter = substrings.item.chars.iterator
        end
 
-       redef fun item do return curr_substring[sub_pos]
+       redef fun item do return substr_iter.item
 
-       redef fun is_ok
-       do
-               if sub_str_iter.is_ok then return true
-               if not sub_str_iter.is_ok and curr_substring != null and sub_pos < curr_substring.length then return true
-               return false
-       end
+       redef fun is_ok do return pos <= max
+
+       redef fun index do return pos
 
        redef fun next
        do
-               assert is_ok
-               if sub_pos < curr_substring.length - 1 then
-                       sub_pos += 1
-               else
-                       sub_str_iter.next
-                       if sub_str_iter.is_ok then
-                               curr_substring = sub_str_iter.item.value
-                               sub_pos = 0
-                       else
-                               sub_pos = curr_substring.length
+               pos += 1
+               if substr_iter.is_ok then
+                       substr_iter.next
+               end
+               if not substr_iter.is_ok then
+                       substrings.next
+                       if substrings.is_ok then
+                               substr_iter = substrings.item.chars.iterator
                        end
                end
-               abs_pos += 1
        end
-
-       redef fun index do return abs_pos
-
 end
 
-# Special kind of iterator
-#
-# Performs a Depth-First Search on RopeLeaf items
-#
-private class DFSRopeLeafIterator
-       super RopeIterator
+private class ReversePostfix
+       super IndexedIterator[RopeNode]
 
-       # Stack of the visited nodes in the rope
-       private var visit_stack = new List[TupleVisitNode]
+       var target: Rope
 
-       # The leaf node being visited by the iterator
-       private var curr_leaf: nullable LeafNode
+       var pos: Int
 
-       init(tgt: Rope)
-       do
-               super
+       var min = 0
 
-               var first_node = target.parent_node
+       var stack = new List[IteratorElement]
 
-               if first_node isa ConcatNode then
-                       visit_stack.push(new TupleVisitNode(first_node))
-               else if first_node isa LeafNode then
-                       curr_leaf = first_node
-                       return
+       init from(tgt: Rope, pos: Int)
+       do
+               self.pos = pos
+               target = tgt
+               if pos < 0 or pos >= tgt.length then return
+               var path = tgt.node_at(pos)
+               self.pos -= path.offset
+               for i in path.stack do
+                       var elemt = new IteratorElement(i.node)
+                       elemt.right = true
+                       if i.left then
+                               elemt.left = true
+                       end
+                       stack.push elemt
                end
-
-               next_body
+               stack.push(new IteratorElement(path.leaf))
+               stack.last.done = true
        end
 
-       # Creates a new iterator on `tgt` starting at `index`
-       redef init with_index(tgt: Rope, index: Int)
-       do
-               super
-
-               var returned_tuple = target.get_node_for_pos(index)
-               curr_leaf = returned_tuple.curr_node
-               visit_stack = returned_tuple.visit_stack
-               pos = index - returned_tuple.corrected_pos
+       redef fun item do
+               assert is_ok
+               return stack.last.node
        end
 
-       redef fun is_ok do return curr_leaf != null
+       redef fun is_ok do return not stack.is_empty
+
+       redef fun index do return pos
 
        redef fun next
        do
-               assert is_ok
-               pos += curr_leaf.value.length
-               next_body
+               if stack.is_empty then return
+               if pos < min then
+                       stack.clear
+                       return
+               end
+               var lst = stack.last
+               if lst.done then
+                       stack.pop
+                       next
+                       return
+               end
+               if not lst.right then
+                       var nod = lst.node.as(Concat)
+                       var rgt = nod.right
+                       lst.right = true
+                       if rgt != null then
+                               stack.push(new IteratorElement(rgt))
+                               next
+                               return
+                       end
+               end
+               if not lst.left then
+                       var nod = lst.node.as(Concat)
+                       var lft = nod.left
+                       lst.left = true
+                       if lft != null then
+                               stack.push(new IteratorElement(lft))
+                               next
+                               return
+                       end
+               end
+               if lst.node isa Leaf then pos -= lst.node.length
+               lst.done = true
        end
+end
 
-       private fun next_body
-       do
-               var next_node: nullable RopeNode
-               while not visit_stack.is_empty do
-                       var curr_concat_tuple = visit_stack.last
-                       if not curr_concat_tuple.left_visited then
-
-                               curr_concat_tuple.left_visited = true
-
-                               next_node = curr_concat_tuple.node.left_child
-
-                               if next_node == null then continue
-
-                               if next_node isa ConcatNode then
-                                       visit_stack.push(new TupleVisitNode(next_node))
-                               else if next_node isa LeafNode then
-                                       curr_leaf = next_node
-                                       return
-                               end
-
-                       else if not curr_concat_tuple.right_visited then
+private class ReverseLeavesIterator
+       super IndexedIterator[Leaf]
 
-                               curr_concat_tuple.right_visited = true
+       var nodes: ReversePostfix
 
-                               next_node = curr_concat_tuple.node.right_child
+       init(tgt: Rope, from: Int)
+       do
+               nodes = tgt.reverse_postfix(from)
+       end
 
-                               if next_node == null then continue
+       redef fun is_ok do return nodes.is_ok
 
-                               if next_node isa ConcatNode then
-                                       visit_stack.push(new TupleVisitNode(next_node))
-                               else if next_node isa LeafNode then
-                                       curr_leaf = next_node
-                                       return
-                               end
+       redef fun item do
+               assert is_ok
+               return nodes.item.as(Leaf)
+       end
 
-                       else
-                               visit_stack.pop
-                       end
+       redef fun next do
+               while nodes.is_ok do
+                       nodes.next
+                       if nodes.is_ok then if nodes.item isa Leaf then break
                end
-               self.curr_leaf = null
        end
 
-       redef fun item
-       do
-               assert is_ok
-               return curr_leaf.as(not null)
-       end
+       redef fun index do return nodes.index
 
 end
 
-###########################################
-#              Node classes               #
-###########################################
-
-# A node for a Rope
-private abstract class RopeNode
-
-       private var _length = 0
-
-       private var parent: nullable ConcatNode = null
-
-       private var height = 0
-
-       # The balance factor of a node, if it is a Leaf, it equals its length
-       # Else, it will be equal to the difference between the height on the left and on the right
-       private fun balance_factor: Int do return height end
+private class ReverseSubstringsIterator
+       super IndexedIterator[Text]
 
-       fun length: Int do return _length
+       var leaves: ReverseLeavesIterator
 
-       private fun length=(len: Int)
-       do
-               _length = len
-       end
-end
-
-# Node that represents a concatenation between two nodes (of any RopeNode type)
-private class ConcatNode
-       super RopeNode
+       var pos: Int
 
-       private var _left_child: nullable RopeNode = null
-       private var _right_child: nullable RopeNode = null
+       var str: Text
 
-       private fun left_child: nullable RopeNode
+       init(tgt: Rope, from: Int)
        do
-               if _left_child != null then
-                       return _left_child
-               else
-                       return null
-               end
+               leaves = tgt.reverse_leaves(from)
+               pos = from
+               if not leaves.is_ok then return
+               str = leaves.item.str
+               make_substring
        end
 
-       private fun right_child: nullable RopeNode
+       fun make_substring
        do
-               if _right_child != null then
-                       return _right_child
-               else
-                       return null
-               end
+               if pos >= (leaves.index + str.length - 1) then return
+               str = str.substring(0, (pos - leaves.index + 1))
        end
 
-       private fun left_child=(new_node: nullable RopeNode)
-       do
-               self._left_child = new_node
-               new_node.parent = self
-               update_data
-       end
+       redef fun is_ok do return leaves.is_ok
 
-       private fun right_child=(new_node: nullable RopeNode)
-       do
-               self._right_child = new_node
-               new_node.parent = self
-               update_data
+       redef fun item do
+               assert is_ok
+               return str
        end
 
-       # Updates the internal data of the current node
-       #
-       # Concretely, updates the length and the height of the node
-       private fun update_data
-       do
-               self.length = 0
-               self.height = 1
-               if left_child != null then
-                       self.length += left_child.length
-                       if left_child.height + 1 > self.height then self.height = left_child.height + 1
-               end
-               if right_child != null then
-                       self.length += right_child.length
-                       if right_child.height + 1 > self.height then self.height = right_child.height + 1
-               end
-       end
+       redef fun index do return pos
 
-       # Computes and returns the balance factor (used for AVL trees)
-       #
-       # Formula : left.height - right.height
-       redef private fun balance_factor
-       do
-               var left_height = 0
-               var right_height = 0
-               if left_child != null then left_height = left_child.height
-               if right_child != null then right_height = right_child.height
-               return left_height - right_height
+       redef fun next do
+               pos -= str.length
+               leaves.next
+               if not leaves.is_ok then return
+               str = leaves.item.str
+               make_substring
        end
 end
 
-# A leaf node contains a substring of some sort
-private class LeafNode
-       super RopeNode
+private class ReverseRopeCharIterator
+       super IndexedIterator[Char]
 
-       # Encapsulated string in the leaf node
-       private var _value: String
+       var substrs: IndexedIterator[Text]
 
-       init(val: String)
-       do
-               self._value = val.to_s
-               self.length = val.length
-       end
+       var pos: Int
 
-       private fun value: String do return self._value
+       var subiter: IndexedIterator[Char]
 
-       private fun value= (val: String)
+       init(tgt: Rope, from: Int)
        do
-               _value = val
+               substrs = tgt.reverse_substrings_from(from)
+               if not substrs.is_ok then
+                       pos = -1
+                       return
+               end
+               subiter = substrs.item.chars.reverse_iterator
+               pos = from
        end
-end
 
-#####################################################
-#            Foreign classes refinement             #
-#####################################################
+       redef fun is_ok do return pos >= 0
 
-redef class String
-       redef fun ==(other)
-       do
-               if other isa Rope then
-                       return other == self
-               else
-                       return super
-               end
+       redef fun item do
+               assert is_ok
+               return subiter.item
        end
-end
 
-redef class Buffer
-       redef fun ==(other)
-       do
-               if other isa Rope then
-                       return other == self
-               else
-                       return super
+       redef fun index do return pos
+
+       redef fun next do
+               pos -= 1
+               if subiter.is_ok then subiter.next
+               if not subiter.is_ok then
+                       if substrs.is_ok then substrs.next
+                       if substrs.is_ok then subiter = substrs.item.chars.reverse_iterator
                end
        end
 end
+
index 6297038..85d28c9 100644 (file)
@@ -22,7 +22,7 @@ import string_search
 import file
 import exec
 import stream
-import string
+import ropes
 import collection
 import math
 import kernel
index 507ba8d..504396a 100644 (file)
@@ -13,7 +13,7 @@
 # Input and output streams of characters
 module stream
 
-import string
+intrude import ropes
 
 in "C" `{
        #include <unistd.h>
@@ -136,6 +136,29 @@ redef class Text
        redef fun write_to(stream) do stream.write(self)
 end
 
+redef class RopeNode
+       super Streamable
+end
+
+redef class Leaf
+
+       redef fun write_to(s) do s.write(str)
+end
+
+redef class Concat
+
+       redef fun write_to(s)
+       do
+               if left != null then left.write_to(s)
+               if right != null then right.write_to(s)
+       end
+end
+
+redef class RopeString
+
+       redef fun write_to(s) do root.write_to(s)
+end
+
 # Input streams with a buffer
 abstract class BufferedIStream
        super IStream
index 59a286d..fcc1f1b 100644 (file)
@@ -59,6 +59,9 @@ abstract class Text
        # In this case, `from += count` and `count -= from`.
        fun substring(from: Int, count: Int): SELFTYPE is abstract
 
+       # Iterates on the substrings of self if any
+       fun substrings: Iterator[Text] is abstract
+
        # Concatenates `o` to `self`
        #
        #     assert "hello" + "world"  == "helloworld"
@@ -609,6 +612,28 @@ abstract class String
 
        redef fun to_s do return self
 
+       fun append(s: String): SELFTYPE is abstract
+
+       fun prepend(s: String): SELFTYPE is abstract
+
+       fun insert_at(s: String, pos: Int): SELFTYPE is abstract
+end
+
+private class FlatSubstringsIter
+       super Iterator[FlatText]
+
+       var tgt: nullable FlatText
+
+       init(tgt: FlatText) do self.tgt = tgt
+
+       redef fun item do
+               assert is_ok
+               return tgt.as(not null)
+       end
+
+       redef fun is_ok do return tgt != null
+
+       redef fun next do tgt = null
 end
 
 # Immutable strings of characters.
@@ -616,8 +641,6 @@ class FlatString
        super FlatText
        super String
 
-       redef type SELFTYPE: FlatString
-
        # Index in _items of the start of the string
        private var index_from: Int
 
@@ -876,6 +899,8 @@ class FlatString
 
                return hash_cache.as(not null)
        end
+
+       redef fun substrings do return new FlatSubstringsIter(self)
 end
 
 private class FlatStringReverseIterator
@@ -1011,6 +1036,8 @@ class FlatBuffer
 
        private var capacity: Int = 0
 
+       redef fun substrings do return new FlatSubstringsIter(self)
+
        redef fun []=(index, item)
        do
                is_dirty = true
index bba519c..a2d675f 100644 (file)
  * Nitdoc Github Login Box\r
  */\r
 \r
-#nitdoc-github-li {\r
-       float: left;\r
-       padding: 0;\r
-       margin: -2px 5px 5px 15px;\r
-}\r
-\r
 #nitdoc-github-li.current {\r
        color: #999;\r
 }\r
 \r
-#nitdoc-github-li .nitdoc-github-li-img {\r
-       width: 20px;\r
+#nitdoc-github-li .glyphicon {\r
        cursor: pointer;\r
 }\r
 \r
        text-align:center;\r
 }\r
 \r
-#nitdoc-github-loginbox input {\r
-       width: 212px;\r
-       height: 20px;\r
-       padding: 3px;\r
-       margin: 5px 0px 5px 0px;\r
-       color: black;\r
-       font-style: normal;\r
-       font-size: 12px;\r
-       border: 1px solid #CCC;\r
-}\r
-\r
-#nitdoc-github-loginbox button {\r
-       margin-top: 15px;\r
-       width: 220px;\r
-       font-weight: bold;\r
-}\r
-\r
 #nitdoc-github-loginbox h4 {\r
        display: block;\r
        width: 100%;\r
        color: #0D8921;\r
 }\r
 \r
-/* \r
- * Nitdoc Github buttons\r
- */\r
-\r
-.nitdoc-github-button {\r
-       display: inline-block;\r
-       cursor: pointer;\r
-       background-color: #92C929;\r
-       background-image: -webkit-gradient(linear, left top, left bottom, from(#92C929), to(#1d7900)); /* Saf4+, Chrome */\r
-       background-image: -webkit-linear-gradient(top, #92C929, #1d7900); /* Chrome 10+, Saf5.1+ */\r
-       background-image:    -moz-linear-gradient(top, #92C929, #1d7900); /* FF3.6 */\r
-       background-image:     -ms-linear-gradient(top, #92C929, #1d7900); /* IE10 */\r
-       background-image:      -o-linear-gradient(top, #92C929, #1d7900); /* Opera 11.10+ */\r
-       background-image:         linear-gradient(top, #92C929, #1d7900);\r
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#92C929', EndColorStr='#1d7900'); /* IE6–IE9 */\r
-       border-radius: 2px;\r
-       -moz-border-radius: 2px;\r
-       -webkit-border-radius: 2px;\r
-       -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;\r
-       box-shadow: 0px 2px 4px rgba(0,0,0, .2);\r
-       -moz-box-shadow: 0px 2px 4px rgba(0,0,0, .2);\r
-       -webkit-box-shadow: 0px 2px 4px rgba(0,0,0, .2);\r
-       text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);\r
-       -moz-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);\r
-       -webkit-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);\r
-       border: 1px solid #1d7900;\r
-       color: #fff;\r
-       font-size: 14px;\r
-       padding: 5px 7px 5px 7px;\r
-       text-align: center;\r
-}\r
-\r
-button.nitdoc-github-button[disabled=disabled] {\r
-       background-color: #999999;\r
-       background-image: -webkit-gradient(linear, left top, left bottom, from(#999999), to(#333333)); /* Saf4+, Chrome */\r
-       background-image: -webkit-linear-gradient(top, #999999, #333333); /* Chrome 10+, Saf5.1+ */\r
-       background-image:    -moz-linear-gradient(top, #999999, #333333); /* FF3.6 */\r
-       background-image:     -ms-linear-gradient(top, #999999, #333333); /* IE10 */\r
-       background-image:      -o-linear-gradient(top, #999999, #333333); /* Opera 11.10+ */\r
-       background-image:         linear-gradient(top, #999999, #333333);\r
-       filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#999999', EndColorStr='#333333'); /* IE6–IE9 */\r
-       border: 1px solid #333333;\r
-}\r
-\r
-button.nitdoc-github-button img {\r
-       margin-right: 7px;\r
-       margin-bottom: -3px;\r
-       height: 16px;\r
-       width: 16px;\r
-}\r
-\r
 /* Comment editing */\r
 \r
 .nitdoc-github-commentbox {\r
index 42b3925..81bba5d 100644 (file)
  * Nitdoc Quick Search JS module \r
  */\r
 \r
-#nitdoc-qs-li {\r
-       float: right;\r
-       padding: 0;\r
-       margin: 0;\r
-}\r
-\r
 #nitdoc-qs-field {\r
        width: 300px;\r
-}\r
-\r
-#nitdoc-qs-field.nitdoc-qs-field-notused {\r
-       color: #999;\r
-       font-style: italic;\r
+       margin-top: 3px;\r
 }\r
 \r
 #nitdoc-qs-table {\r
diff --git a/share/nitdoc/css/main.css b/share/nitdoc/css/main.css
deleted file mode 100644 (file)
index 4659036..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-/* General */\r
-\r
-body {\r
-       font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif;\r
-}\r
-\r
-a {\r
-       color: #333;\r
-       text-decoration: none;\r
-}\r
-\r
-a:hover {\r
-       color: #0D8921;\r
-}\r
-\r
-ul {\r
-       list-style-type: square;\r
-}\r
-\r
-pre, code {\r
-       white-space: pre;\r
-       font-family: monospace;\r
-       font-size: 1em;\r
-}\r
-\r
-.description div.comment {\r
-       background: #EEE;\r
-       color: black;\r
-       overflow: auto;\r
-       padding: 0 0 0 12px;\r
-       margin: 1em 0 0 0;\r
-}\r
-\r
-.description textarea.baseComment {\r
-       display: none;\r
-}\r
-\r
-hr {\r
-       background-color: #DDD;\r
-       height: 1px;\r
-       border: 0;\r
-}\r
-\r
-div.clear {\r
-       clear: both;\r
-}\r
-\r
-/* Titles */\r
-\r
-h1, h2, h3, h4, h5 {\r
-       font-family: Verdana, Geneva, sans-serif;\r
-       color: #6C6C6C;\r
-       font-weight: normal;\r
-}\r
-\r
-h1 {\r
-       font-size: 300%;\r
-       margin: 0 0 10px 0;\r
-}\r
-\r
-h3 {\r
-       font-weight: bold;\r
-}\r
-\r
-/* Page display */\r
-\r
-html {\r
-       height: 100%;\r
-       overflow: hidden;\r
-}\r
-\r
-body {\r
-       height: 100%;\r
-       margin: 0;\r
-}\r
-\r
-header {\r
-       position: fixed;\r
-       z-index: 50;\r
-       left: 0;\r
-       right: 0;\r
-}\r
-\r
-.page {\r
-       margin: auto;\r
-       height: 100%;\r
-}\r
-\r
-.sidebar {\r
-       position: fixed;\r
-       z-index: 10;\r
-       top: 50px;\r
-       bottom: 1em;\r
-       width: 250px;\r
-       overflow-y:     scroll;\r
-}\r
-\r
-.sidebar nav:last-child {\r
-       margin-bottom: 0;\r
-}\r
-\r
-.content {\r
-       position: fixed;\r
-       z-index: 10;\r
-       top: 50px;\r
-       bottom: 1em;\r
-       left: 0;\r
-       right: 0;\r
-       margin-left: 265px;\r
-       overflow-y:     scroll;\r
-       margin-right: 5px;\r
-       padding-right: 10px;\r
-}\r
-\r
-.content.fullpage {\r
-       margin-left: 20px;\r
-       width: auto;\r
-}\r
-\r
-.page.footed .content, .page.footed .sidebar {\r
-       bottom: 2em;\r
-}\r
-\r
-footer {\r
-       position: fixed;\r
-       z-index: 50;\r
-       bottom: 0;\r
-       width: 100%;\r
-}\r
-\r
-/* Webkit scroll bars */\r
-\r
-.sidebar {\r
-    overflow-y: hidden;\r
-}\r
-\r
-.sidebar:hover {\r
-    overflow-y: scroll;\r
-}\r
-\r
-.sidebar::-webkit-scrollbar, .content::-webkit-scrollbar {\r
-    width: 10px;\r
-}\r
-\r
-.sidebar::-webkit-scrollbar-thumb, .content::-webkit-scrollbar-thumb {\r
-       background: #CCC;\r
-       -webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,0.10),inset 0 -1px 0 rgba(0,0,0,0.07);\r
-}\r
-\r
-.sidebar::-webkit-scrollbar-thumb:hover, .content::-webkit-scrollbar-thumb:hover {\r
-       background: #999;\r
-}\r
-\r
-.sidebar::-webkit-scrollbar-corner, .content::-webkit-scrollbar-corner {\r
-       background: transparent;\r
-}\r
-\r
-.sidebar::-webkit-scrollbar-button, .content::-webkit-scrollbar-button {\r
-       width: 0;\r
-       height: 0;\r
-       display: none;\r
-}\r
-\r
-/* Header, Footer */\r
-\r
-header nav ul {\r
-       padding: 0;\r
-       list-style-type: none;\r
-       margin: auto;\r
-}\r
-\r
-header nav ul li {\r
-       display: inline;\r
-       padding: 3px 6px;\r
-       margin: auto 5px;\r
-       color: #999;\r
-}\r
-\r
-footer {\r
-       text-align: center;\r
-       padding-bottom: 10px;\r
-       color: #CCC;\r
-}\r
-\r
-/* Main menu */\r
-\r
-header nav.main {\r
-       background: #f1f1f1;\r
-       border-bottom: 1px solid #ddd;\r
-       padding: 7px 0;\r
-}\r
-\r
-header nav.main ul li.current {\r
-       background: #0D8921;\r
-       border-radius: 2px;\r
-       -moz-border-radius: 2px;\r
-       -webkit-border-radius: 2px;\r
-       border: 1px solid #1d7900;\r
-       color: #fff;\r
-       text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);\r
-       -moz-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);\r
-       -webkit-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);\r
-}\r
-\r
-/* Sidebar */\r
-\r
-.sidebar nav {\r
-       margin: 20px;\r
-       width: 208px;\r
-       border: 1px solid #ddd;\r
-}\r
-\r
-.sidebar nav:first-child {\r
-       margin-top: 0;\r
-}\r
-\r
-.sidebar nav h3 {\r
-       margin: 0;\r
-       padding: 5px;\r
-       background: #f1f1f1;\r
-       font-size: 1em;\r
-       -webkit-touch-callout: none;\r
-       -webkit-user-select: none;\r
-       -khtml-user-select: none;\r
-       -moz-user-select: none;\r
-       -ms-user-select: none;\r
-       user-select: none;\r
-}\r
-\r
-.sidebar nav h4 {\r
-       font-weight: bold;\r
-       color: #555555;\r
-       margin: 10px 0 0 10px;\r
-       font-size: 12px;\r
-}\r
-\r
-.sidebar nav h4:last-child {\r
-       margin-bottom: 5px;\r
-}\r
-\r
-.sidebar nav ul {\r
-       margin: 10px;\r
-       padding: 0;\r
-       list-style-type: none;\r
-}\r
-\r
-.sidebar nav ul li {\r
-       overflow: hidden;\r
-       color: #CCC;\r
-}\r
-\r
-/* Content */\r
-\r
-.content article {\r
-       color: #6C6C6C;\r
-       background-repeat: no-repeat;\r
-       background-position: left 7px;\r
-       margin: 20px 0;\r
-       padding: 5px 20px;\r
-}\r
-\r
-.content article h3 {\r
-       margin: 0;\r
-       font-weight: bold;\r
-       color: #333;\r
-}\r
-\r
-.content article.graph {\r
-       text-align: center;\r
-}\r
-\r
-.content article.modules,\r
-.content article.classes,\r
-.content article.properties {\r
-       float: left;\r
-       width: 250px;\r
-       overflow: hidden;\r
-}\r
-\r
-.content article.overview ul,\r
-.content article.modules ul,\r
-.content article.classes ul,\r
-.content article.properties ul {\r
-       list-style-type: none;\r
-       padding: 0;\r
-}\r
-\r
-.content article.properties ul ul {\r
-       padding-left: 10px;\r
-}\r
-\r
-nav ul li span {\r
-       color: #CCC;\r
-       text-align: center;\r
-       font-family: monospace;\r
-       margin-right: 5px;\r
-}\r
-\r
-.content article.modules ul code,\r
-.content article.classes ul code,\r
-.content article.properties ul code {\r
-       font-weight: normal;\r
-}\r
-\r
-.content section.summary h2, .content section.summary article{\r
-       color: #000000;\r
-}\r
-\r
-.content section.summary article h3{\r
-       font-weight: bold;\r
-       color: #555;\r
-}\r
-\r
-.content article:target {\r
-       background-color: #FFF3C2;\r
-       color: black;\r
-}\r
-\r
-.content .subtitle {\r
-       color: #6C6C6C;\r
-}\r
-\r
-.content a {\r
-       color: #0D8921;\r
-}\r
-\r
-.content a:hover {\r
-       color: #333;\r
-}\r
-\r
-.info {\r
-       color: #6C6C6C;\r
-}\r
-\r
-.info a {\r
-       color: #333;\r
-}\r
-\r
-.info a:hover {\r
-       color: #0D8921;\r
-}\r
-\r
-\r
-article .info .code {\r
-       float: right;\r
-}\r
-\r
-.description .inheritance {\r
-       text-align: right;\r
-       margin: 2px;\r
-\r
-}\r
-\r
-.content .concern-doc {\r
-       border-bottom: 1px dashed #CCC;\r
-       padding: 5px 0;\r
-       color: #6C6C6C;\r
-}\r
-\r
-.content section.concerns {\r
-       padding: 10px;\r
-       border: 1px solid #ccc;\r
-\r
-}\r
-\r
-.content section.concerns h2 {\r
-       margin-top: 0;\r
-}\r
-\r
-.content section.concerns ul {\r
-    list-style-type: none;\r
-    padding-left: 0;\r
-    margin: 0;\r
-}\r
-\r
-.content section.concerns li {\r
-    margin-top: 10px;\r
-}\r
-\r
-.content section.concerns ul ul {\r
-    padding-left: 20px;\r
-}\r
-\r
-.content section.concerns ul ul li {\r
-    margin-top: 0;\r
-}\r
-\r
-.content section.methods h3.concern-toplevel {\r
-       padding: 10px;\r
-       border: 1px solid #ccc;\r
-       color: #6C6C6C;\r
-}\r
-\r
-.show-code {\r
-       margin: 0;\r
-}\r
-\r
-/* Icons */\r
-\r
-.type.public, .interface.public, .abstract.class.public { background-image: url('../resources/icons/vtype_public.png')}\r
-.type.protected, .interface.protected, .abstract.class.protected { background-image: url('../resources/icons/vtype_protected.png')}\r
-.type.private, .interface.private, .abstract.class.private { background-image: url('../resources/icons/vtype_private.png')}\r
-.init.public, .enum.public { background-image: url('../resources/icons/const_public.png')}\r
-.init.protected, .enum.protected { background-image: url('../resources/icons/const_protected.png')}\r
-.init.private, .enum.private { background-image: url('../resources/icons/const_private.png')}\r
-.fun.public, .class.public, .extern.public { background-image: url('../resources/icons/meth_public.png')}\r
-.fun.protected, .class.protected, .extern.protected { background-image: url('../resources/icons/meth_protected.png')}\r
-.fun.private, .class.private, .extern.private { background-image: url('../resources/icons/meth_private.png')}\r
-\r
-/* Form elements */\r
-\r
-input[type=text] {\r
-       border: 1px solid #CCC;\r
-       padding: 1px 2px;\r
-}\r
-\r
-nav.main input[type=text] {\r
-       margin: -2px 10px;\r
-       color: black;\r
-       font-style: normal;\r
-}\r
-\r
-/* New comments style */\r
-\r
-.nitdoc {\r
-  background: #F7F7F7;\r
-  padding: 5px;\r
-  color: black;\r
-  overflow: auto;\r
-}\r
-\r
-.nitdoc pre {\r
-  background: #EEE;\r
-}\r
-\r
-.nitdoc code {\r
-  background: #DDD;\r
-  padding: 0 1px;\r
-}\r
-\r
-.nitdoc pre code {\r
-       background: none;\r
-}\r
-\r
-.nitdoc .synopsys, .nitdoc p:first-child {\r
-       font-weight: bold;\r
-       color: #6c6c6c;\r
-}\r
-\r
-.rawcode {\r
-}\r
-\r
-.nitcode a { color: inherit; text-decoration: inherit; } /* hide links */\r
-.nitcode a:hover { text-decoration: underline; } /* underline links */\r
-.nitcode span[title]:hover { text-decoration: underline; } /* underline titles */\r
-/* lexical raw tokens. independent of usage or semantic: */\r
-.nitcode .nc_c { color: gray; font-style: italic; } /* comment */\r
-.nitcode .nc_d { color: #3D8127; font-style: italic; } /* documentation comments */\r
-.nitcode .nc_k { font-weight: bold; } /* keyword */\r
-.nitcode .nc_o {} /* operator */\r
-.nitcode .nc_i {} /* standard identifier */\r
-.nitcode .nc_t { color: #445588; font-weight: bold; } /* type/class identifier */\r
-.nitcode .nc_a { color: #445588; font-style: italic; } /* old style attribute identifier */\r
-.nitcode .nc_l { color: #009999; } /* char and number literal */\r
-.nitcode .nc_s { color: #8F1546; } /* string literal */\r
-/* syntactic token usage. added because of their position in the AST */\r
-.nitcode .nc_ast { color: blue; } /* assert label */\r
-.nitcode .nc_la { color: blue; } /* break/continue label */\r
-.nitcode .nc_m { color: #445588; } /* module name */\r
-/* syntactic groups */\r
-.nitcode .nc_def { font-weight: bold; color: blue; } /* name used in a definition */\r
-.nitcode .nc_def.nc_a { color: blue; } /* name used in a attribute definition */\r
-.nitcode .nc_def.nc_t { color: blue; } /* name used in a class or vt definition */\r
-.nitcode .nc_ss { color: #9E6BEB; } /* superstrings */\r
-.nitcode .nc_cdef {} /* A whole class definition */\r
-.nitcode .nc_pdef {} /* A whole property definition */\r
-/* semantic token usage */\r
-.nitcode .nc_v { font-style: italic; } /* local variable or parameter */\r
-.nitcode .nc_vt { font-style: italic; } /* virtual type or formal type */\r
-\r
-.nitcode .nc_error { border: 1px red solid;} /* not used */\r
-\r
diff --git a/share/nitdoc/css/nitdoc.bootstrap.css b/share/nitdoc/css/nitdoc.bootstrap.css
new file mode 100644 (file)
index 0000000..0351b6f
--- /dev/null
@@ -0,0 +1,5784 @@
+/*!
+ * Bootstrap v3.1.1
+ *
+ * Copyright 2014 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world by @mdo and @fat.
+ * BootSwatchr built and provided by @DrewStrickland
+ */
+/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
+html {
+  font-family: sans-serif;
+  -ms-text-size-adjust: 100%;
+  -webkit-text-size-adjust: 100%;
+}
+body {
+  margin: 0;
+}
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+  display: block;
+}
+audio,
+canvas,
+progress,
+video {
+  display: inline-block;
+  vertical-align: baseline;
+}
+audio:not([controls]) {
+  display: none;
+  height: 0;
+}
+[hidden],
+template {
+  display: none;
+}
+a {
+  background: transparent;
+}
+a:active,
+a:hover {
+  outline: 0;
+}
+abbr[title] {
+  border-bottom: 1px dotted;
+}
+b,
+strong {
+  font-weight: bold;
+}
+dfn {
+  font-style: italic;
+}
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+mark {
+  background: #ff0;
+  color: #000;
+}
+small {
+  font-size: 80%;
+}
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+sup {
+  top: -0.5em;
+}
+sub {
+  bottom: -0.25em;
+}
+img {
+  border: 0;
+}
+svg:not(:root) {
+  overflow: hidden;
+}
+figure {
+  margin: 1em 40px;
+}
+hr {
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  height: 0;
+}
+pre {
+  overflow: auto;
+}
+code,
+kbd,
+pre,
+samp {
+  font-family: monospace, monospace;
+  font-size: 1em;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+  color: inherit;
+  font: inherit;
+  margin: 0;
+}
+button {
+  overflow: visible;
+}
+button,
+select {
+  text-transform: none;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  -webkit-appearance: button;
+  cursor: pointer;
+}
+button[disabled],
+html input[disabled] {
+  cursor: default;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  border: 0;
+  padding: 0;
+}
+input {
+  line-height: normal;
+}
+input[type="checkbox"],
+input[type="radio"] {
+  box-sizing: border-box;
+  padding: 0;
+}
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+input[type="search"] {
+  -webkit-appearance: textfield;
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  box-sizing: content-box;
+}
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+fieldset {
+  border: 1px solid #c0c0c0;
+  margin: 0 2px;
+  padding: 0.35em 0.625em 0.75em;
+}
+legend {
+  border: 0;
+  padding: 0;
+}
+textarea {
+  overflow: auto;
+}
+optgroup {
+  font-weight: bold;
+}
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+td,
+th {
+  padding: 0;
+}
+@media print {
+  * {
+    text-shadow: none !important;
+    color: #000 !important;
+    background: transparent !important;
+    box-shadow: none !important;
+  }
+  a,
+  a:visited {
+    text-decoration: underline;
+  }
+  a[href]:after {
+    content: " (" attr(href) ")";
+  }
+  abbr[title]:after {
+    content: " (" attr(title) ")";
+  }
+  a[href^="javascript:"]:after,
+  a[href^="#"]:after {
+    content: "";
+  }
+  pre,
+  blockquote {
+    border: 1px solid #999;
+    page-break-inside: avoid;
+  }
+  thead {
+    display: table-header-group;
+  }
+  tr,
+  img {
+    page-break-inside: avoid;
+  }
+  img {
+    max-width: 100% !important;
+  }
+  p,
+  h2,
+  h3 {
+    orphans: 3;
+    widows: 3;
+  }
+  h2,
+  h3 {
+    page-break-after: avoid;
+  }
+  select {
+    background: #fff !important;
+  }
+  .navbar {
+    display: none;
+  }
+  .table td,
+  .table th {
+    background-color: #fff !important;
+  }
+  .btn > .caret,
+  .dropup > .btn > .caret {
+    border-top-color: #000 !important;
+  }
+  .label {
+    border: 1px solid #000;
+  }
+  .table {
+    border-collapse: collapse !important;
+  }
+  .table-bordered th,
+  .table-bordered td {
+    border: 1px solid #ddd !important;
+  }
+}
+* {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+*:before,
+*:after {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+html {
+  font-size: 62.5%;
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+body {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 14px;
+  line-height: 1.428571429;
+  color: #333333;
+  background-color: #ffffff;
+}
+input,
+button,
+select,
+textarea {
+  font-family: inherit;
+  font-size: inherit;
+  line-height: inherit;
+}
+a {
+  color: #222222;
+  text-decoration: none;
+}
+a:hover,
+a:focus {
+  color: #0d8921;
+  text-decoration: underline;
+}
+a:focus {
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+figure {
+  margin: 0;
+}
+img {
+  vertical-align: middle;
+}
+.img-responsive,
+.thumbnail > img,
+.thumbnail a > img,
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+  display: block;
+  max-width: 100%;
+  height: auto;
+}
+.img-rounded {
+  border-radius: 4px;
+}
+.img-thumbnail {
+  padding: 4px;
+  line-height: 1.428571429;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  border-radius: 3px;
+  -webkit-transition: all 0.2s ease-in-out;
+  transition: all 0.2s ease-in-out;
+  display: inline-block;
+  max-width: 100%;
+  height: auto;
+}
+.img-circle {
+  border-radius: 50%;
+}
+hr {
+  margin-top: 20px;
+  margin-bottom: 20px;
+  border: 0;
+  border-top: 1px solid #eeeeee;
+}
+.sr-only {
+  position: absolute;
+  width: 1px;
+  height: 1px;
+  margin: -1px;
+  padding: 0;
+  overflow: hidden;
+  clip: rect(0, 0, 0, 0);
+  border: 0;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
+  font-family: inherit;
+  font-weight: 500;
+  line-height: 1.1;
+  color: inherit;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small,
+h1 .small,
+h2 .small,
+h3 .small,
+h4 .small,
+h5 .small,
+h6 .small,
+.h1 .small,
+.h2 .small,
+.h3 .small,
+.h4 .small,
+.h5 .small,
+.h6 .small {
+  font-weight: normal;
+  line-height: 1;
+  color: #999999;
+}
+h1,
+.h1,
+h2,
+.h2,
+h3,
+.h3 {
+  margin-top: 20px;
+  margin-bottom: 10px;
+}
+h1 small,
+.h1 small,
+h2 small,
+.h2 small,
+h3 small,
+.h3 small,
+h1 .small,
+.h1 .small,
+h2 .small,
+.h2 .small,
+h3 .small,
+.h3 .small {
+  font-size: 65%;
+}
+h4,
+.h4,
+h5,
+.h5,
+h6,
+.h6 {
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+h4 small,
+.h4 small,
+h5 small,
+.h5 small,
+h6 small,
+.h6 small,
+h4 .small,
+.h4 .small,
+h5 .small,
+.h5 .small,
+h6 .small,
+.h6 .small {
+  font-size: 75%;
+}
+h1,
+.h1 {
+  font-size: 36px;
+}
+h2,
+.h2 {
+  font-size: 30px;
+}
+h3,
+.h3 {
+  font-size: 24px;
+}
+h4,
+.h4 {
+  font-size: 18px;
+}
+h5,
+.h5 {
+  font-size: 14px;
+}
+h6,
+.h6 {
+  font-size: 12px;
+}
+p {
+  margin: 0 0 10px;
+}
+.lead {
+  margin-bottom: 20px;
+  font-size: 16px;
+  font-weight: 200;
+  line-height: 1.4;
+}
+@media (min-width: 768px) {
+  .lead {
+    font-size: 21px;
+  }
+}
+small,
+.small {
+  font-size: 85%;
+}
+cite {
+  font-style: normal;
+}
+.text-left {
+  text-align: left;
+}
+.text-right {
+  text-align: right;
+}
+.text-center {
+  text-align: center;
+}
+.text-justify {
+  text-align: justify;
+}
+.text-muted {
+  color: #999999;
+}
+.text-primary {
+  color: #0d8921;
+}
+a.text-primary:hover {
+  color: #095a16;
+}
+.text-success {
+  color: #5cb85c;
+}
+a.text-success:hover {
+  color: #449d44;
+}
+.text-info {
+  color: #6c6c6c;
+}
+a.text-info:hover {
+  color: #525252;
+}
+.text-warning {
+  color: #f0ad4e;
+}
+a.text-warning:hover {
+  color: #ec971f;
+}
+.text-danger {
+  color: #d9534f;
+}
+a.text-danger:hover {
+  color: #c9302c;
+}
+.bg-primary {
+  color: #fff;
+  background-color: #0d8921;
+}
+a.bg-primary:hover {
+  background-color: #095a16;
+}
+.bg-success {
+  background-color: #eaf6ea;
+}
+a.bg-success:hover {
+  background-color: #c7e6c7;
+}
+.bg-info {
+  background-color: #ececec;
+}
+a.bg-info:hover {
+  background-color: #d2d2d2;
+}
+.bg-warning {
+  background-color: #fef9f3;
+}
+a.bg-warning:hover {
+  background-color: #fae3c4;
+}
+.bg-danger {
+  background-color: #f9e2e2;
+}
+a.bg-danger:hover {
+  background-color: #f0b9b8;
+}
+.page-header {
+  padding-bottom: 9px;
+  margin: 40px 0 20px;
+  border-bottom: 1px solid #eeeeee;
+}
+ul,
+ol {
+  margin-top: 0;
+  margin-bottom: 10px;
+}
+ul ul,
+ol ul,
+ul ol,
+ol ol {
+  margin-bottom: 0;
+}
+.list-unstyled {
+  padding-left: 0;
+  list-style: none;
+}
+.list-inline {
+  padding-left: 0;
+  list-style: none;
+  margin-left: -5px;
+}
+.list-inline > li {
+  display: inline-block;
+  padding-left: 5px;
+  padding-right: 5px;
+}
+dl {
+  margin-top: 0;
+  margin-bottom: 20px;
+}
+dt,
+dd {
+  line-height: 1.428571429;
+}
+dt {
+  font-weight: bold;
+}
+dd {
+  margin-left: 0;
+}
+@media (min-width: 768px) {
+  .dl-horizontal dt {
+    float: left;
+    width: 160px;
+    clear: left;
+    text-align: right;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  .dl-horizontal dd {
+    margin-left: 180px;
+  }
+}
+abbr[title],
+abbr[data-original-title] {
+  cursor: help;
+  border-bottom: 1px dotted #999999;
+}
+.initialism {
+  font-size: 90%;
+  text-transform: uppercase;
+}
+blockquote {
+  padding: 10px 20px;
+  margin: 0 0 20px;
+  font-size: 17.5px;
+  border-left: 5px solid #eeeeee;
+}
+blockquote p:last-child,
+blockquote ul:last-child,
+blockquote ol:last-child {
+  margin-bottom: 0;
+}
+blockquote footer,
+blockquote small,
+blockquote .small {
+  display: block;
+  font-size: 80%;
+  line-height: 1.428571429;
+  color: #999999;
+}
+blockquote footer:before,
+blockquote small:before,
+blockquote .small:before {
+  content: '\2014 \00A0';
+}
+.blockquote-reverse,
+blockquote.pull-right {
+  padding-right: 15px;
+  padding-left: 0;
+  border-right: 5px solid #eeeeee;
+  border-left: 0;
+  text-align: right;
+}
+.blockquote-reverse footer:before,
+blockquote.pull-right footer:before,
+.blockquote-reverse small:before,
+blockquote.pull-right small:before,
+.blockquote-reverse .small:before,
+blockquote.pull-right .small:before {
+  content: '';
+}
+.blockquote-reverse footer:after,
+blockquote.pull-right footer:after,
+.blockquote-reverse small:after,
+blockquote.pull-right small:after,
+.blockquote-reverse .small:after,
+blockquote.pull-right .small:after {
+  content: '\00A0 \2014';
+}
+blockquote:before,
+blockquote:after {
+  content: "";
+}
+address {
+  margin-bottom: 20px;
+  font-style: normal;
+  line-height: 1.428571429;
+}
+code,
+kbd,
+pre,
+samp {
+  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+}
+code {
+  padding: 2px 4px;
+  font-size: 90%;
+  color: #c7254e;
+  background-color: #f9f2f4;
+  white-space: nowrap;
+  border-radius: 3px;
+}
+kbd {
+  padding: 2px 4px;
+  font-size: 90%;
+  color: #ffffff;
+  background-color: #333333;
+  border-radius: 2px;
+  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+pre {
+  display: block;
+  padding: 9.5px;
+  margin: 0 0 10px;
+  font-size: 13px;
+  line-height: 1.428571429;
+  word-break: break-all;
+  word-wrap: break-word;
+  color: #333333;
+  background-color: #f5f5f5;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+}
+pre code {
+  padding: 0;
+  font-size: inherit;
+  color: inherit;
+  white-space: pre-wrap;
+  background-color: transparent;
+  border-radius: 0;
+}
+.pre-scrollable {
+  max-height: 340px;
+  overflow-y: scroll;
+}
+.container {
+  margin-right: auto;
+  margin-left: auto;
+  padding-left: 15px;
+  padding-right: 15px;
+}
+@media (min-width: 768px) {
+  .container {
+    width: 750px;
+  }
+}
+@media (min-width: 992px) {
+  .container {
+    width: 970px;
+  }
+}
+@media (min-width: 1200px) {
+  .container {
+    width: 1170px;
+  }
+}
+.container-fluid {
+  margin-right: auto;
+  margin-left: auto;
+  padding-left: 15px;
+  padding-right: 15px;
+}
+.row {
+  margin-left: -15px;
+  margin-right: -15px;
+}
+.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+  position: relative;
+  min-height: 1px;
+  padding-left: 15px;
+  padding-right: 15px;
+}
+.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
+  float: left;
+}
+.col-xs-12 {
+  width: 100%;
+}
+.col-xs-11 {
+  width: 91.66666666666666%;
+}
+.col-xs-10 {
+  width: 83.33333333333334%;
+}
+.col-xs-9 {
+  width: 75%;
+}
+.col-xs-8 {
+  width: 66.66666666666666%;
+}
+.col-xs-7 {
+  width: 58.333333333333336%;
+}
+.col-xs-6 {
+  width: 50%;
+}
+.col-xs-5 {
+  width: 41.66666666666667%;
+}
+.col-xs-4 {
+  width: 33.33333333333333%;
+}
+.col-xs-3 {
+  width: 25%;
+}
+.col-xs-2 {
+  width: 16.666666666666664%;
+}
+.col-xs-1 {
+  width: 8.333333333333332%;
+}
+.col-xs-pull-12 {
+  right: 100%;
+}
+.col-xs-pull-11 {
+  right: 91.66666666666666%;
+}
+.col-xs-pull-10 {
+  right: 83.33333333333334%;
+}
+.col-xs-pull-9 {
+  right: 75%;
+}
+.col-xs-pull-8 {
+  right: 66.66666666666666%;
+}
+.col-xs-pull-7 {
+  right: 58.333333333333336%;
+}
+.col-xs-pull-6 {
+  right: 50%;
+}
+.col-xs-pull-5 {
+  right: 41.66666666666667%;
+}
+.col-xs-pull-4 {
+  right: 33.33333333333333%;
+}
+.col-xs-pull-3 {
+  right: 25%;
+}
+.col-xs-pull-2 {
+  right: 16.666666666666664%;
+}
+.col-xs-pull-1 {
+  right: 8.333333333333332%;
+}
+.col-xs-pull-0 {
+  right: 0%;
+}
+.col-xs-push-12 {
+  left: 100%;
+}
+.col-xs-push-11 {
+  left: 91.66666666666666%;
+}
+.col-xs-push-10 {
+  left: 83.33333333333334%;
+}
+.col-xs-push-9 {
+  left: 75%;
+}
+.col-xs-push-8 {
+  left: 66.66666666666666%;
+}
+.col-xs-push-7 {
+  left: 58.333333333333336%;
+}
+.col-xs-push-6 {
+  left: 50%;
+}
+.col-xs-push-5 {
+  left: 41.66666666666667%;
+}
+.col-xs-push-4 {
+  left: 33.33333333333333%;
+}
+.col-xs-push-3 {
+  left: 25%;
+}
+.col-xs-push-2 {
+  left: 16.666666666666664%;
+}
+.col-xs-push-1 {
+  left: 8.333333333333332%;
+}
+.col-xs-push-0 {
+  left: 0%;
+}
+.col-xs-offset-12 {
+  margin-left: 100%;
+}
+.col-xs-offset-11 {
+  margin-left: 91.66666666666666%;
+}
+.col-xs-offset-10 {
+  margin-left: 83.33333333333334%;
+}
+.col-xs-offset-9 {
+  margin-left: 75%;
+}
+.col-xs-offset-8 {
+  margin-left: 66.66666666666666%;
+}
+.col-xs-offset-7 {
+  margin-left: 58.333333333333336%;
+}
+.col-xs-offset-6 {
+  margin-left: 50%;
+}
+.col-xs-offset-5 {
+  margin-left: 41.66666666666667%;
+}
+.col-xs-offset-4 {
+  margin-left: 33.33333333333333%;
+}
+.col-xs-offset-3 {
+  margin-left: 25%;
+}
+.col-xs-offset-2 {
+  margin-left: 16.666666666666664%;
+}
+.col-xs-offset-1 {
+  margin-left: 8.333333333333332%;
+}
+.col-xs-offset-0 {
+  margin-left: 0%;
+}
+@media (min-width: 768px) {
+  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
+    float: left;
+  }
+  .col-sm-12 {
+    width: 100%;
+  }
+  .col-sm-11 {
+    width: 91.66666666666666%;
+  }
+  .col-sm-10 {
+    width: 83.33333333333334%;
+  }
+  .col-sm-9 {
+    width: 75%;
+  }
+  .col-sm-8 {
+    width: 66.66666666666666%;
+  }
+  .col-sm-7 {
+    width: 58.333333333333336%;
+  }
+  .col-sm-6 {
+    width: 50%;
+  }
+  .col-sm-5 {
+    width: 41.66666666666667%;
+  }
+  .col-sm-4 {
+    width: 33.33333333333333%;
+  }
+  .col-sm-3 {
+    width: 25%;
+  }
+  .col-sm-2 {
+    width: 16.666666666666664%;
+  }
+  .col-sm-1 {
+    width: 8.333333333333332%;
+  }
+  .col-sm-pull-12 {
+    right: 100%;
+  }
+  .col-sm-pull-11 {
+    right: 91.66666666666666%;
+  }
+  .col-sm-pull-10 {
+    right: 83.33333333333334%;
+  }
+  .col-sm-pull-9 {
+    right: 75%;
+  }
+  .col-sm-pull-8 {
+    right: 66.66666666666666%;
+  }
+  .col-sm-pull-7 {
+    right: 58.333333333333336%;
+  }
+  .col-sm-pull-6 {
+    right: 50%;
+  }
+  .col-sm-pull-5 {
+    right: 41.66666666666667%;
+  }
+  .col-sm-pull-4 {
+    right: 33.33333333333333%;
+  }
+  .col-sm-pull-3 {
+    right: 25%;
+  }
+  .col-sm-pull-2 {
+    right: 16.666666666666664%;
+  }
+  .col-sm-pull-1 {
+    right: 8.333333333333332%;
+  }
+  .col-sm-pull-0 {
+    right: 0%;
+  }
+  .col-sm-push-12 {
+    left: 100%;
+  }
+  .col-sm-push-11 {
+    left: 91.66666666666666%;
+  }
+  .col-sm-push-10 {
+    left: 83.33333333333334%;
+  }
+  .col-sm-push-9 {
+    left: 75%;
+  }
+  .col-sm-push-8 {
+    left: 66.66666666666666%;
+  }
+  .col-sm-push-7 {
+    left: 58.333333333333336%;
+  }
+  .col-sm-push-6 {
+    left: 50%;
+  }
+  .col-sm-push-5 {
+    left: 41.66666666666667%;
+  }
+  .col-sm-push-4 {
+    left: 33.33333333333333%;
+  }
+  .col-sm-push-3 {
+    left: 25%;
+  }
+  .col-sm-push-2 {
+    left: 16.666666666666664%;
+  }
+  .col-sm-push-1 {
+    left: 8.333333333333332%;
+  }
+  .col-sm-push-0 {
+    left: 0%;
+  }
+  .col-sm-offset-12 {
+    margin-left: 100%;
+  }
+  .col-sm-offset-11 {
+    margin-left: 91.66666666666666%;
+  }
+  .col-sm-offset-10 {
+    margin-left: 83.33333333333334%;
+  }
+  .col-sm-offset-9 {
+    margin-left: 75%;
+  }
+  .col-sm-offset-8 {
+    margin-left: 66.66666666666666%;
+  }
+  .col-sm-offset-7 {
+    margin-left: 58.333333333333336%;
+  }
+  .col-sm-offset-6 {
+    margin-left: 50%;
+  }
+  .col-sm-offset-5 {
+    margin-left: 41.66666666666667%;
+  }
+  .col-sm-offset-4 {
+    margin-left: 33.33333333333333%;
+  }
+  .col-sm-offset-3 {
+    margin-left: 25%;
+  }
+  .col-sm-offset-2 {
+    margin-left: 16.666666666666664%;
+  }
+  .col-sm-offset-1 {
+    margin-left: 8.333333333333332%;
+  }
+  .col-sm-offset-0 {
+    margin-left: 0%;
+  }
+}
+@media (min-width: 992px) {
+  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
+    float: left;
+  }
+  .col-md-12 {
+    width: 100%;
+  }
+  .col-md-11 {
+    width: 91.66666666666666%;
+  }
+  .col-md-10 {
+    width: 83.33333333333334%;
+  }
+  .col-md-9 {
+    width: 75%;
+  }
+  .col-md-8 {
+    width: 66.66666666666666%;
+  }
+  .col-md-7 {
+    width: 58.333333333333336%;
+  }
+  .col-md-6 {
+    width: 50%;
+  }
+  .col-md-5 {
+    width: 41.66666666666667%;
+  }
+  .col-md-4 {
+    width: 33.33333333333333%;
+  }
+  .col-md-3 {
+    width: 25%;
+  }
+  .col-md-2 {
+    width: 16.666666666666664%;
+  }
+  .col-md-1 {
+    width: 8.333333333333332%;
+  }
+  .col-md-pull-12 {
+    right: 100%;
+  }
+  .col-md-pull-11 {
+    right: 91.66666666666666%;
+  }
+  .col-md-pull-10 {
+    right: 83.33333333333334%;
+  }
+  .col-md-pull-9 {
+    right: 75%;
+  }
+  .col-md-pull-8 {
+    right: 66.66666666666666%;
+  }
+  .col-md-pull-7 {
+    right: 58.333333333333336%;
+  }
+  .col-md-pull-6 {
+    right: 50%;
+  }
+  .col-md-pull-5 {
+    right: 41.66666666666667%;
+  }
+  .col-md-pull-4 {
+    right: 33.33333333333333%;
+  }
+  .col-md-pull-3 {
+    right: 25%;
+  }
+  .col-md-pull-2 {
+    right: 16.666666666666664%;
+  }
+  .col-md-pull-1 {
+    right: 8.333333333333332%;
+  }
+  .col-md-pull-0 {
+    right: 0%;
+  }
+  .col-md-push-12 {
+    left: 100%;
+  }
+  .col-md-push-11 {
+    left: 91.66666666666666%;
+  }
+  .col-md-push-10 {
+    left: 83.33333333333334%;
+  }
+  .col-md-push-9 {
+    left: 75%;
+  }
+  .col-md-push-8 {
+    left: 66.66666666666666%;
+  }
+  .col-md-push-7 {
+    left: 58.333333333333336%;
+  }
+  .col-md-push-6 {
+    left: 50%;
+  }
+  .col-md-push-5 {
+    left: 41.66666666666667%;
+  }
+  .col-md-push-4 {
+    left: 33.33333333333333%;
+  }
+  .col-md-push-3 {
+    left: 25%;
+  }
+  .col-md-push-2 {
+    left: 16.666666666666664%;
+  }
+  .col-md-push-1 {
+    left: 8.333333333333332%;
+  }
+  .col-md-push-0 {
+    left: 0%;
+  }
+  .col-md-offset-12 {
+    margin-left: 100%;
+  }
+  .col-md-offset-11 {
+    margin-left: 91.66666666666666%;
+  }
+  .col-md-offset-10 {
+    margin-left: 83.33333333333334%;
+  }
+  .col-md-offset-9 {
+    margin-left: 75%;
+  }
+  .col-md-offset-8 {
+    margin-left: 66.66666666666666%;
+  }
+  .col-md-offset-7 {
+    margin-left: 58.333333333333336%;
+  }
+  .col-md-offset-6 {
+    margin-left: 50%;
+  }
+  .col-md-offset-5 {
+    margin-left: 41.66666666666667%;
+  }
+  .col-md-offset-4 {
+    margin-left: 33.33333333333333%;
+  }
+  .col-md-offset-3 {
+    margin-left: 25%;
+  }
+  .col-md-offset-2 {
+    margin-left: 16.666666666666664%;
+  }
+  .col-md-offset-1 {
+    margin-left: 8.333333333333332%;
+  }
+  .col-md-offset-0 {
+    margin-left: 0%;
+  }
+}
+@media (min-width: 1200px) {
+  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
+    float: left;
+  }
+  .col-lg-12 {
+    width: 100%;
+  }
+  .col-lg-11 {
+    width: 91.66666666666666%;
+  }
+  .col-lg-10 {
+    width: 83.33333333333334%;
+  }
+  .col-lg-9 {
+    width: 75%;
+  }
+  .col-lg-8 {
+    width: 66.66666666666666%;
+  }
+  .col-lg-7 {
+    width: 58.333333333333336%;
+  }
+  .col-lg-6 {
+    width: 50%;
+  }
+  .col-lg-5 {
+    width: 41.66666666666667%;
+  }
+  .col-lg-4 {
+    width: 33.33333333333333%;
+  }
+  .col-lg-3 {
+    width: 25%;
+  }
+  .col-lg-2 {
+    width: 16.666666666666664%;
+  }
+  .col-lg-1 {
+    width: 8.333333333333332%;
+  }
+  .col-lg-pull-12 {
+    right: 100%;
+  }
+  .col-lg-pull-11 {
+    right: 91.66666666666666%;
+  }
+  .col-lg-pull-10 {
+    right: 83.33333333333334%;
+  }
+  .col-lg-pull-9 {
+    right: 75%;
+  }
+  .col-lg-pull-8 {
+    right: 66.66666666666666%;
+  }
+  .col-lg-pull-7 {
+    right: 58.333333333333336%;
+  }
+  .col-lg-pull-6 {
+    right: 50%;
+  }
+  .col-lg-pull-5 {
+    right: 41.66666666666667%;
+  }
+  .col-lg-pull-4 {
+    right: 33.33333333333333%;
+  }
+  .col-lg-pull-3 {
+    right: 25%;
+  }
+  .col-lg-pull-2 {
+    right: 16.666666666666664%;
+  }
+  .col-lg-pull-1 {
+    right: 8.333333333333332%;
+  }
+  .col-lg-pull-0 {
+    right: 0%;
+  }
+  .col-lg-push-12 {
+    left: 100%;
+  }
+  .col-lg-push-11 {
+    left: 91.66666666666666%;
+  }
+  .col-lg-push-10 {
+    left: 83.33333333333334%;
+  }
+  .col-lg-push-9 {
+    left: 75%;
+  }
+  .col-lg-push-8 {
+    left: 66.66666666666666%;
+  }
+  .col-lg-push-7 {
+    left: 58.333333333333336%;
+  }
+  .col-lg-push-6 {
+    left: 50%;
+  }
+  .col-lg-push-5 {
+    left: 41.66666666666667%;
+  }
+  .col-lg-push-4 {
+    left: 33.33333333333333%;
+  }
+  .col-lg-push-3 {
+    left: 25%;
+  }
+  .col-lg-push-2 {
+    left: 16.666666666666664%;
+  }
+  .col-lg-push-1 {
+    left: 8.333333333333332%;
+  }
+  .col-lg-push-0 {
+    left: 0%;
+  }
+  .col-lg-offset-12 {
+    margin-left: 100%;
+  }
+  .col-lg-offset-11 {
+    margin-left: 91.66666666666666%;
+  }
+  .col-lg-offset-10 {
+    margin-left: 83.33333333333334%;
+  }
+  .col-lg-offset-9 {
+    margin-left: 75%;
+  }
+  .col-lg-offset-8 {
+    margin-left: 66.66666666666666%;
+  }
+  .col-lg-offset-7 {
+    margin-left: 58.333333333333336%;
+  }
+  .col-lg-offset-6 {
+    margin-left: 50%;
+  }
+  .col-lg-offset-5 {
+    margin-left: 41.66666666666667%;
+  }
+  .col-lg-offset-4 {
+    margin-left: 33.33333333333333%;
+  }
+  .col-lg-offset-3 {
+    margin-left: 25%;
+  }
+  .col-lg-offset-2 {
+    margin-left: 16.666666666666664%;
+  }
+  .col-lg-offset-1 {
+    margin-left: 8.333333333333332%;
+  }
+  .col-lg-offset-0 {
+    margin-left: 0%;
+  }
+}
+table {
+  max-width: 100%;
+  background-color: transparent;
+}
+th {
+  text-align: left;
+}
+.table {
+  width: 100%;
+  margin-bottom: 20px;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+  padding: 8px;
+  line-height: 1.428571429;
+  vertical-align: top;
+  border-top: 1px solid #dddddd;
+}
+.table > thead > tr > th {
+  vertical-align: bottom;
+  border-bottom: 2px solid #dddddd;
+}
+.table > caption + thead > tr:first-child > th,
+.table > colgroup + thead > tr:first-child > th,
+.table > thead:first-child > tr:first-child > th,
+.table > caption + thead > tr:first-child > td,
+.table > colgroup + thead > tr:first-child > td,
+.table > thead:first-child > tr:first-child > td {
+  border-top: 0;
+}
+.table > tbody + tbody {
+  border-top: 2px solid #dddddd;
+}
+.table .table {
+  background-color: #ffffff;
+}
+.table-condensed > thead > tr > th,
+.table-condensed > tbody > tr > th,
+.table-condensed > tfoot > tr > th,
+.table-condensed > thead > tr > td,
+.table-condensed > tbody > tr > td,
+.table-condensed > tfoot > tr > td {
+  padding: 5px;
+}
+.table-bordered {
+  border: 1px solid #dddddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+  border: 1px solid #dddddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+  border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-child(odd) > td,
+.table-striped > tbody > tr:nth-child(odd) > th {
+  background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover > td,
+.table-hover > tbody > tr:hover > th {
+  background-color: #f5f5f5;
+}
+table col[class*="col-"] {
+  position: static;
+  float: none;
+  display: table-column;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+  position: static;
+  float: none;
+  display: table-cell;
+}
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+  background-color: #f5f5f5;
+}
+.table-hover > tbody > tr > td.active:hover,
+.table-hover > tbody > tr > th.active:hover,
+.table-hover > tbody > tr.active:hover > td,
+.table-hover > tbody > tr.active:hover > th {
+  background-color: #e8e8e8;
+}
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+  background-color: #eaf6ea;
+}
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td,
+.table-hover > tbody > tr.success:hover > th {
+  background-color: #d8eed8;
+}
+.table > thead > tr > td.info,
+.table > tbody > tr > td.info,
+.table > tfoot > tr > td.info,
+.table > thead > tr > th.info,
+.table > tbody > tr > th.info,
+.table > tfoot > tr > th.info,
+.table > thead > tr.info > td,
+.table > tbody > tr.info > td,
+.table > tfoot > tr.info > td,
+.table > thead > tr.info > th,
+.table > tbody > tr.info > th,
+.table > tfoot > tr.info > th {
+  background-color: #ececec;
+}
+.table-hover > tbody > tr > td.info:hover,
+.table-hover > tbody > tr > th.info:hover,
+.table-hover > tbody > tr.info:hover > td,
+.table-hover > tbody > tr.info:hover > th {
+  background-color: #dfdfdf;
+}
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+  background-color: #fef9f3;
+}
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td,
+.table-hover > tbody > tr.warning:hover > th {
+  background-color: #fceedb;
+}
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+  background-color: #f9e2e2;
+}
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td,
+.table-hover > tbody > tr.danger:hover > th {
+  background-color: #f4cecd;
+}
+@media (max-width: 767px) {
+  .table-responsive {
+    width: 100%;
+    margin-bottom: 15px;
+    overflow-y: hidden;
+    overflow-x: scroll;
+    -ms-overflow-style: -ms-autohiding-scrollbar;
+    border: 1px solid #dddddd;
+    -webkit-overflow-scrolling: touch;
+  }
+  .table-responsive > .table {
+    margin-bottom: 0;
+  }
+  .table-responsive > .table > thead > tr > th,
+  .table-responsive > .table > tbody > tr > th,
+  .table-responsive > .table > tfoot > tr > th,
+  .table-responsive > .table > thead > tr > td,
+  .table-responsive > .table > tbody > tr > td,
+  .table-responsive > .table > tfoot > tr > td {
+    white-space: nowrap;
+  }
+  .table-responsive > .table-bordered {
+    border: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:first-child,
+  .table-responsive > .table-bordered > tbody > tr > th:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+  .table-responsive > .table-bordered > thead > tr > td:first-child,
+  .table-responsive > .table-bordered > tbody > tr > td:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+    border-left: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:last-child,
+  .table-responsive > .table-bordered > tbody > tr > th:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+  .table-responsive > .table-bordered > thead > tr > td:last-child,
+  .table-responsive > .table-bordered > tbody > tr > td:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+    border-right: 0;
+  }
+  .table-responsive > .table-bordered > tbody > tr:last-child > th,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+  .table-responsive > .table-bordered > tbody > tr:last-child > td,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+    border-bottom: 0;
+  }
+}
+fieldset {
+  padding: 0;
+  margin: 0;
+  border: 0;
+  min-width: 0;
+}
+legend {
+  display: block;
+  width: 100%;
+  padding: 0;
+  margin-bottom: 20px;
+  font-size: 21px;
+  line-height: inherit;
+  color: #333333;
+  border: 0;
+  border-bottom: 1px solid #e5e5e5;
+}
+label {
+  display: inline-block;
+  margin-bottom: 5px;
+  font-weight: bold;
+}
+input[type="search"] {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+input[type="radio"],
+input[type="checkbox"] {
+  margin: 4px 0 0;
+  margin-top: 1px \9;
+  /* IE8-9 */
+  line-height: normal;
+}
+input[type="file"] {
+  display: block;
+}
+input[type="range"] {
+  display: block;
+  width: 100%;
+}
+select[multiple],
+select[size] {
+  height: auto;
+}
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+output {
+  display: block;
+  padding-top: 3px;
+  font-size: 14px;
+  line-height: 1.428571429;
+  color: #555555;
+}
+.form-control {
+  display: block;
+  width: 100%;
+  height: 26px;
+  padding: 2px 5px;
+  font-size: 14px;
+  line-height: 1.428571429;
+  color: #555555;
+  background-color: #ffffff;
+  background-image: none;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.form-control:focus {
+  border-color: #6c6c6c;
+  outline: 0;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(108, 108, 108, 0.6);
+  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(108, 108, 108, 0.6);
+}
+.form-control::-moz-placeholder {
+  color: #999999;
+  opacity: 1;
+}
+.form-control:-ms-input-placeholder {
+  color: #999999;
+}
+.form-control::-webkit-input-placeholder {
+  color: #999999;
+}
+.form-control[disabled],
+.form-control[readonly],
+fieldset[disabled] .form-control {
+  cursor: not-allowed;
+  background-color: #eeeeee;
+  opacity: 1;
+}
+textarea.form-control {
+  height: auto;
+}
+input[type="search"] {
+  -webkit-appearance: none;
+}
+input[type="date"] {
+  line-height: 26px;
+}
+.form-group {
+  margin-bottom: 15px;
+}
+.radio,
+.checkbox {
+  display: block;
+  min-height: 20px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+  padding-left: 20px;
+}
+.radio label,
+.checkbox label {
+  display: inline;
+  font-weight: normal;
+  cursor: pointer;
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+  float: left;
+  margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+  margin-top: -5px;
+}
+.radio-inline,
+.checkbox-inline {
+  display: inline-block;
+  padding-left: 20px;
+  margin-bottom: 0;
+  vertical-align: middle;
+  font-weight: normal;
+  cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+  margin-top: 0;
+  margin-left: 10px;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+.radio[disabled],
+.radio-inline[disabled],
+.checkbox[disabled],
+.checkbox-inline[disabled],
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"],
+fieldset[disabled] .radio,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox,
+fieldset[disabled] .checkbox-inline {
+  cursor: not-allowed;
+}
+.input-sm {
+  height: 22px;
+  padding: 1px 5px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 2px;
+}
+select.input-sm {
+  height: 22px;
+  line-height: 22px;
+}
+textarea.input-sm,
+select[multiple].input-sm {
+  height: auto;
+}
+.input-lg {
+  height: 36px;
+  padding: 5px 10px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 4px;
+}
+select.input-lg {
+  height: 36px;
+  line-height: 36px;
+}
+textarea.input-lg,
+select[multiple].input-lg {
+  height: auto;
+}
+.has-feedback {
+  position: relative;
+}
+.has-feedback .form-control {
+  padding-right: 32.5px;
+}
+.has-feedback .form-control-feedback {
+  position: absolute;
+  top: 25px;
+  right: 0;
+  display: block;
+  width: 26px;
+  height: 26px;
+  line-height: 26px;
+  text-align: center;
+}
+.has-success .help-block,
+.has-success .control-label,
+.has-success .radio,
+.has-success .checkbox,
+.has-success .radio-inline,
+.has-success .checkbox-inline {
+  color: #5cb85c;
+}
+.has-success .form-control {
+  border-color: #5cb85c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.has-success .form-control:focus {
+  border-color: #449d44;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #a3d7a3;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #a3d7a3;
+}
+.has-success .input-group-addon {
+  color: #5cb85c;
+  border-color: #5cb85c;
+  background-color: #eaf6ea;
+}
+.has-success .form-control-feedback {
+  color: #5cb85c;
+}
+.has-warning .help-block,
+.has-warning .control-label,
+.has-warning .radio,
+.has-warning .checkbox,
+.has-warning .radio-inline,
+.has-warning .checkbox-inline {
+  color: #f0ad4e;
+}
+.has-warning .form-control {
+  border-color: #f0ad4e;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.has-warning .form-control:focus {
+  border-color: #ec971f;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #f8d9ac;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #f8d9ac;
+}
+.has-warning .input-group-addon {
+  color: #f0ad4e;
+  border-color: #f0ad4e;
+  background-color: #fef9f3;
+}
+.has-warning .form-control-feedback {
+  color: #f0ad4e;
+}
+.has-error .help-block,
+.has-error .control-label,
+.has-error .radio,
+.has-error .checkbox,
+.has-error .radio-inline,
+.has-error .checkbox-inline {
+  color: #d9534f;
+}
+.has-error .form-control {
+  border-color: #d9534f;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.has-error .form-control:focus {
+  border-color: #c9302c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #eba5a3;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #eba5a3;
+}
+.has-error .input-group-addon {
+  color: #d9534f;
+  border-color: #d9534f;
+  background-color: #f9e2e2;
+}
+.has-error .form-control-feedback {
+  color: #d9534f;
+}
+.form-control-static {
+  margin-bottom: 0;
+}
+.help-block {
+  display: block;
+  margin-top: 5px;
+  margin-bottom: 10px;
+  color: #737373;
+}
+@media (min-width: 768px) {
+  .form-inline .form-group {
+    display: inline-block;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .form-control {
+    display: inline-block;
+    width: auto;
+    vertical-align: middle;
+  }
+  .form-inline .input-group > .form-control {
+    width: 100%;
+  }
+  .form-inline .control-label {
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .radio,
+  .form-inline .checkbox {
+    display: inline-block;
+    margin-top: 0;
+    margin-bottom: 0;
+    padding-left: 0;
+    vertical-align: middle;
+  }
+  .form-inline .radio input[type="radio"],
+  .form-inline .checkbox input[type="checkbox"] {
+    float: none;
+    margin-left: 0;
+  }
+  .form-inline .has-feedback .form-control-feedback {
+    top: 0;
+  }
+}
+.form-horizontal .control-label,
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+  margin-top: 0;
+  margin-bottom: 0;
+  padding-top: 3px;
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox {
+  min-height: 23px;
+}
+.form-horizontal .form-group {
+  margin-left: -15px;
+  margin-right: -15px;
+}
+.form-horizontal .form-control-static {
+  padding-top: 3px;
+}
+@media (min-width: 768px) {
+  .form-horizontal .control-label {
+    text-align: right;
+  }
+}
+.form-horizontal .has-feedback .form-control-feedback {
+  top: 0;
+  right: 15px;
+}
+.btn {
+  display: inline-block;
+  margin-bottom: 0;
+  font-weight: normal;
+  text-align: center;
+  vertical-align: middle;
+  cursor: pointer;
+  background-image: none;
+  border: 1px solid transparent;
+  white-space: nowrap;
+  padding: 2px 5px;
+  font-size: 14px;
+  line-height: 1.428571429;
+  border-radius: 3px;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+.btn:focus,
+.btn:active:focus,
+.btn.active:focus {
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+.btn:hover,
+.btn:focus {
+  color: #333333;
+  text-decoration: none;
+}
+.btn:active,
+.btn.active {
+  outline: 0;
+  background-image: none;
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+  cursor: not-allowed;
+  pointer-events: none;
+  opacity: 0.65;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.btn-default {
+  color: #333333;
+  background-color: #ffffff;
+  border-color: #cccccc;
+}
+.btn-default:hover,
+.btn-default:focus,
+.btn-default:active,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+  color: #333333;
+  background-color: #ebebeb;
+  border-color: #adadad;
+}
+.btn-default:active,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+  background-image: none;
+}
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+  background-color: #ffffff;
+  border-color: #cccccc;
+}
+.btn-default .badge {
+  color: #ffffff;
+  background-color: #333333;
+}
+.btn-primary {
+  color: #ffffff;
+  background-color: #0d8921;
+  border-color: #0b721b;
+}
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary:active,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+  color: #ffffff;
+  background-color: #096418;
+  border-color: #053a0e;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+  background-image: none;
+}
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+  background-color: #0d8921;
+  border-color: #0b721b;
+}
+.btn-primary .badge {
+  color: #0d8921;
+  background-color: #ffffff;
+}
+.btn-success {
+  color: #ffffff;
+  background-color: #5cb85c;
+  border-color: #4cae4c;
+}
+.btn-success:hover,
+.btn-success:focus,
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+  color: #ffffff;
+  background-color: #47a447;
+  border-color: #398439;
+}
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+  background-image: none;
+}
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+  background-color: #5cb85c;
+  border-color: #4cae4c;
+}
+.btn-success .badge {
+  color: #5cb85c;
+  background-color: #ffffff;
+}
+.btn-info {
+  color: #ffffff;
+  background-color: #6c6c6c;
+  border-color: #5f5f5f;
+}
+.btn-info:hover,
+.btn-info:focus,
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+  color: #ffffff;
+  background-color: #585858;
+  border-color: #414141;
+}
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+  background-image: none;
+}
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+  background-color: #6c6c6c;
+  border-color: #5f5f5f;
+}
+.btn-info .badge {
+  color: #6c6c6c;
+  background-color: #ffffff;
+}
+.btn-warning {
+  color: #ffffff;
+  background-color: #f0ad4e;
+  border-color: #eea236;
+}
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning:active,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+  color: #ffffff;
+  background-color: #ed9c28;
+  border-color: #d58512;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+  background-image: none;
+}
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+  background-color: #f0ad4e;
+  border-color: #eea236;
+}
+.btn-warning .badge {
+  color: #f0ad4e;
+  background-color: #ffffff;
+}
+.btn-danger {
+  color: #ffffff;
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+  color: #ffffff;
+  background-color: #d2322d;
+  border-color: #ac2925;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+  background-image: none;
+}
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+.btn-danger .badge {
+  color: #d9534f;
+  background-color: #ffffff;
+}
+.btn-link {
+  color: #222222;
+  font-weight: normal;
+  cursor: pointer;
+  border-radius: 0;
+}
+.btn-link,
+.btn-link:active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+  background-color: transparent;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+  border-color: transparent;
+}
+.btn-link:hover,
+.btn-link:focus {
+  color: #0d8921;
+  text-decoration: underline;
+  background-color: transparent;
+}
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+  color: #999999;
+  text-decoration: none;
+}
+.btn-lg,
+.btn-group-lg > .btn {
+  padding: 5px 10px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 4px;
+}
+.btn-sm,
+.btn-group-sm > .btn {
+  padding: 1px 5px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 2px;
+}
+.btn-xs,
+.btn-group-xs > .btn {
+  padding: 0px 3px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 2px;
+}
+.btn-block {
+  display: block;
+  width: 100%;
+  padding-left: 0;
+  padding-right: 0;
+}
+.btn-block + .btn-block {
+  margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+  width: 100%;
+}
+.fade {
+  opacity: 0;
+  -webkit-transition: opacity 0.15s linear;
+  transition: opacity 0.15s linear;
+}
+.fade.in {
+  opacity: 1;
+}
+.collapse {
+  display: none;
+}
+.collapse.in {
+  display: block;
+}
+.collapsing {
+  position: relative;
+  height: 0;
+  overflow: hidden;
+  -webkit-transition: height 0.35s ease;
+  transition: height 0.35s ease;
+}
+@font-face {
+  font-family: 'Glyphicons Halflings';
+  src: url('../fonts/glyphicons-halflings-regular.eot');
+  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
+}
+.glyphicon {
+  position: relative;
+  top: 1px;
+  display: inline-block;
+  font-family: 'Glyphicons Halflings';
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+.glyphicon-asterisk:before {
+  content: "\2a";
+}
+.glyphicon-plus:before {
+  content: "\2b";
+}
+.glyphicon-euro:before {
+  content: "\20ac";
+}
+.glyphicon-minus:before {
+  content: "\2212";
+}
+.glyphicon-cloud:before {
+  content: "\2601";
+}
+.glyphicon-envelope:before {
+  content: "\2709";
+}
+.glyphicon-pencil:before {
+  content: "\270f";
+}
+.glyphicon-glass:before {
+  content: "\e001";
+}
+.glyphicon-music:before {
+  content: "\e002";
+}
+.glyphicon-search:before {
+  content: "\e003";
+}
+.glyphicon-heart:before {
+  content: "\e005";
+}
+.glyphicon-star:before {
+  content: "\e006";
+}
+.glyphicon-star-empty:before {
+  content: "\e007";
+}
+.glyphicon-user:before {
+  content: "\e008";
+}
+.glyphicon-film:before {
+  content: "\e009";
+}
+.glyphicon-th-large:before {
+  content: "\e010";
+}
+.glyphicon-th:before {
+  content: "\e011";
+}
+.glyphicon-th-list:before {
+  content: "\e012";
+}
+.glyphicon-ok:before {
+  content: "\e013";
+}
+.glyphicon-remove:before {
+  content: "\e014";
+}
+.glyphicon-zoom-in:before {
+  content: "\e015";
+}
+.glyphicon-zoom-out:before {
+  content: "\e016";
+}
+.glyphicon-off:before {
+  content: "\e017";
+}
+.glyphicon-signal:before {
+  content: "\e018";
+}
+.glyphicon-cog:before {
+  content: "\e019";
+}
+.glyphicon-trash:before {
+  content: "\e020";
+}
+.glyphicon-home:before {
+  content: "\e021";
+}
+.glyphicon-file:before {
+  content: "\e022";
+}
+.glyphicon-time:before {
+  content: "\e023";
+}
+.glyphicon-road:before {
+  content: "\e024";
+}
+.glyphicon-download-alt:before {
+  content: "\e025";
+}
+.glyphicon-download:before {
+  content: "\e026";
+}
+.glyphicon-upload:before {
+  content: "\e027";
+}
+.glyphicon-inbox:before {
+  content: "\e028";
+}
+.glyphicon-play-circle:before {
+  content: "\e029";
+}
+.glyphicon-repeat:before {
+  content: "\e030";
+}
+.glyphicon-refresh:before {
+  content: "\e031";
+}
+.glyphicon-list-alt:before {
+  content: "\e032";
+}
+.glyphicon-lock:before {
+  content: "\e033";
+}
+.glyphicon-flag:before {
+  content: "\e034";
+}
+.glyphicon-headphones:before {
+  content: "\e035";
+}
+.glyphicon-volume-off:before {
+  content: "\e036";
+}
+.glyphicon-volume-down:before {
+  content: "\e037";
+}
+.glyphicon-volume-up:before {
+  content: "\e038";
+}
+.glyphicon-qrcode:before {
+  content: "\e039";
+}
+.glyphicon-barcode:before {
+  content: "\e040";
+}
+.glyphicon-tag:before {
+  content: "\e041";
+}
+.glyphicon-tags:before {
+  content: "\e042";
+}
+.glyphicon-book:before {
+  content: "\e043";
+}
+.glyphicon-bookmark:before {
+  content: "\e044";
+}
+.glyphicon-print:before {
+  content: "\e045";
+}
+.glyphicon-camera:before {
+  content: "\e046";
+}
+.glyphicon-font:before {
+  content: "\e047";
+}
+.glyphicon-bold:before {
+  content: "\e048";
+}
+.glyphicon-italic:before {
+  content: "\e049";
+}
+.glyphicon-text-height:before {
+  content: "\e050";
+}
+.glyphicon-text-width:before {
+  content: "\e051";
+}
+.glyphicon-align-left:before {
+  content: "\e052";
+}
+.glyphicon-align-center:before {
+  content: "\e053";
+}
+.glyphicon-align-right:before {
+  content: "\e054";
+}
+.glyphicon-align-justify:before {
+  content: "\e055";
+}
+.glyphicon-list:before {
+  content: "\e056";
+}
+.glyphicon-indent-left:before {
+  content: "\e057";
+}
+.glyphicon-indent-right:before {
+  content: "\e058";
+}
+.glyphicon-facetime-video:before {
+  content: "\e059";
+}
+.glyphicon-picture:before {
+  content: "\e060";
+}
+.glyphicon-map-marker:before {
+  content: "\e062";
+}
+.glyphicon-adjust:before {
+  content: "\e063";
+}
+.glyphicon-tint:before {
+  content: "\e064";
+}
+.glyphicon-edit:before {
+  content: "\e065";
+}
+.glyphicon-share:before {
+  content: "\e066";
+}
+.glyphicon-check:before {
+  content: "\e067";
+}
+.glyphicon-move:before {
+  content: "\e068";
+}
+.glyphicon-step-backward:before {
+  content: "\e069";
+}
+.glyphicon-fast-backward:before {
+  content: "\e070";
+}
+.glyphicon-backward:before {
+  content: "\e071";
+}
+.glyphicon-play:before {
+  content: "\e072";
+}
+.glyphicon-pause:before {
+  content: "\e073";
+}
+.glyphicon-stop:before {
+  content: "\e074";
+}
+.glyphicon-forward:before {
+  content: "\e075";
+}
+.glyphicon-fast-forward:before {
+  content: "\e076";
+}
+.glyphicon-step-forward:before {
+  content: "\e077";
+}
+.glyphicon-eject:before {
+  content: "\e078";
+}
+.glyphicon-chevron-left:before {
+  content: "\e079";
+}
+.glyphicon-chevron-right:before {
+  content: "\e080";
+}
+.glyphicon-plus-sign:before {
+  content: "\e081";
+}
+.glyphicon-minus-sign:before {
+  content: "\e082";
+}
+.glyphicon-remove-sign:before {
+  content: "\e083";
+}
+.glyphicon-ok-sign:before {
+  content: "\e084";
+}
+.glyphicon-question-sign:before {
+  content: "\e085";
+}
+.glyphicon-info-sign:before {
+  content: "\e086";
+}
+.glyphicon-screenshot:before {
+  content: "\e087";
+}
+.glyphicon-remove-circle:before {
+  content: "\e088";
+}
+.glyphicon-ok-circle:before {
+  content: "\e089";
+}
+.glyphicon-ban-circle:before {
+  content: "\e090";
+}
+.glyphicon-arrow-left:before {
+  content: "\e091";
+}
+.glyphicon-arrow-right:before {
+  content: "\e092";
+}
+.glyphicon-arrow-up:before {
+  content: "\e093";
+}
+.glyphicon-arrow-down:before {
+  content: "\e094";
+}
+.glyphicon-share-alt:before {
+  content: "\e095";
+}
+.glyphicon-resize-full:before {
+  content: "\e096";
+}
+.glyphicon-resize-small:before {
+  content: "\e097";
+}
+.glyphicon-exclamation-sign:before {
+  content: "\e101";
+}
+.glyphicon-gift:before {
+  content: "\e102";
+}
+.glyphicon-leaf:before {
+  content: "\e103";
+}
+.glyphicon-fire:before {
+  content: "\e104";
+}
+.glyphicon-eye-open:before {
+  content: "\e105";
+}
+.glyphicon-eye-close:before {
+  content: "\e106";
+}
+.glyphicon-warning-sign:before {
+  content: "\e107";
+}
+.glyphicon-plane:before {
+  content: "\e108";
+}
+.glyphicon-calendar:before {
+  content: "\e109";
+}
+.glyphicon-random:before {
+  content: "\e110";
+}
+.glyphicon-comment:before {
+  content: "\e111";
+}
+.glyphicon-magnet:before {
+  content: "\e112";
+}
+.glyphicon-chevron-up:before {
+  content: "\e113";
+}
+.glyphicon-chevron-down:before {
+  content: "\e114";
+}
+.glyphicon-retweet:before {
+  content: "\e115";
+}
+.glyphicon-shopping-cart:before {
+  content: "\e116";
+}
+.glyphicon-folder-close:before {
+  content: "\e117";
+}
+.glyphicon-folder-open:before {
+  content: "\e118";
+}
+.glyphicon-resize-vertical:before {
+  content: "\e119";
+}
+.glyphicon-resize-horizontal:before {
+  content: "\e120";
+}
+.glyphicon-hdd:before {
+  content: "\e121";
+}
+.glyphicon-bullhorn:before {
+  content: "\e122";
+}
+.glyphicon-bell:before {
+  content: "\e123";
+}
+.glyphicon-certificate:before {
+  content: "\e124";
+}
+.glyphicon-thumbs-up:before {
+  content: "\e125";
+}
+.glyphicon-thumbs-down:before {
+  content: "\e126";
+}
+.glyphicon-hand-right:before {
+  content: "\e127";
+}
+.glyphicon-hand-left:before {
+  content: "\e128";
+}
+.glyphicon-hand-up:before {
+  content: "\e129";
+}
+.glyphicon-hand-down:before {
+  content: "\e130";
+}
+.glyphicon-circle-arrow-right:before {
+  content: "\e131";
+}
+.glyphicon-circle-arrow-left:before {
+  content: "\e132";
+}
+.glyphicon-circle-arrow-up:before {
+  content: "\e133";
+}
+.glyphicon-circle-arrow-down:before {
+  content: "\e134";
+}
+.glyphicon-globe:before {
+  content: "\e135";
+}
+.glyphicon-wrench:before {
+  content: "\e136";
+}
+.glyphicon-tasks:before {
+  content: "\e137";
+}
+.glyphicon-filter:before {
+  content: "\e138";
+}
+.glyphicon-briefcase:before {
+  content: "\e139";
+}
+.glyphicon-fullscreen:before {
+  content: "\e140";
+}
+.glyphicon-dashboard:before {
+  content: "\e141";
+}
+.glyphicon-paperclip:before {
+  content: "\e142";
+}
+.glyphicon-heart-empty:before {
+  content: "\e143";
+}
+.glyphicon-link:before {
+  content: "\e144";
+}
+.glyphicon-phone:before {
+  content: "\e145";
+}
+.glyphicon-pushpin:before {
+  content: "\e146";
+}
+.glyphicon-usd:before {
+  content: "\e148";
+}
+.glyphicon-gbp:before {
+  content: "\e149";
+}
+.glyphicon-sort:before {
+  content: "\e150";
+}
+.glyphicon-sort-by-alphabet:before {
+  content: "\e151";
+}
+.glyphicon-sort-by-alphabet-alt:before {
+  content: "\e152";
+}
+.glyphicon-sort-by-order:before {
+  content: "\e153";
+}
+.glyphicon-sort-by-order-alt:before {
+  content: "\e154";
+}
+.glyphicon-sort-by-attributes:before {
+  content: "\e155";
+}
+.glyphicon-sort-by-attributes-alt:before {
+  content: "\e156";
+}
+.glyphicon-unchecked:before {
+  content: "\e157";
+}
+.glyphicon-expand:before {
+  content: "\e158";
+}
+.glyphicon-collapse-down:before {
+  content: "\e159";
+}
+.glyphicon-collapse-up:before {
+  content: "\e160";
+}
+.glyphicon-log-in:before {
+  content: "\e161";
+}
+.glyphicon-flash:before {
+  content: "\e162";
+}
+.glyphicon-log-out:before {
+  content: "\e163";
+}
+.glyphicon-new-window:before {
+  content: "\e164";
+}
+.glyphicon-record:before {
+  content: "\e165";
+}
+.glyphicon-save:before {
+  content: "\e166";
+}
+.glyphicon-open:before {
+  content: "\e167";
+}
+.glyphicon-saved:before {
+  content: "\e168";
+}
+.glyphicon-import:before {
+  content: "\e169";
+}
+.glyphicon-export:before {
+  content: "\e170";
+}
+.glyphicon-send:before {
+  content: "\e171";
+}
+.glyphicon-floppy-disk:before {
+  content: "\e172";
+}
+.glyphicon-floppy-saved:before {
+  content: "\e173";
+}
+.glyphicon-floppy-remove:before {
+  content: "\e174";
+}
+.glyphicon-floppy-save:before {
+  content: "\e175";
+}
+.glyphicon-floppy-open:before {
+  content: "\e176";
+}
+.glyphicon-credit-card:before {
+  content: "\e177";
+}
+.glyphicon-transfer:before {
+  content: "\e178";
+}
+.glyphicon-cutlery:before {
+  content: "\e179";
+}
+.glyphicon-header:before {
+  content: "\e180";
+}
+.glyphicon-compressed:before {
+  content: "\e181";
+}
+.glyphicon-earphone:before {
+  content: "\e182";
+}
+.glyphicon-phone-alt:before {
+  content: "\e183";
+}
+.glyphicon-tower:before {
+  content: "\e184";
+}
+.glyphicon-stats:before {
+  content: "\e185";
+}
+.glyphicon-sd-video:before {
+  content: "\e186";
+}
+.glyphicon-hd-video:before {
+  content: "\e187";
+}
+.glyphicon-subtitles:before {
+  content: "\e188";
+}
+.glyphicon-sound-stereo:before {
+  content: "\e189";
+}
+.glyphicon-sound-dolby:before {
+  content: "\e190";
+}
+.glyphicon-sound-5-1:before {
+  content: "\e191";
+}
+.glyphicon-sound-6-1:before {
+  content: "\e192";
+}
+.glyphicon-sound-7-1:before {
+  content: "\e193";
+}
+.glyphicon-copyright-mark:before {
+  content: "\e194";
+}
+.glyphicon-registration-mark:before {
+  content: "\e195";
+}
+.glyphicon-cloud-download:before {
+  content: "\e197";
+}
+.glyphicon-cloud-upload:before {
+  content: "\e198";
+}
+.glyphicon-tree-conifer:before {
+  content: "\e199";
+}
+.glyphicon-tree-deciduous:before {
+  content: "\e200";
+}
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  margin-left: 2px;
+  vertical-align: middle;
+  border-top: 4px solid;
+  border-right: 4px solid transparent;
+  border-left: 4px solid transparent;
+}
+.dropdown {
+  position: relative;
+}
+.dropdown-toggle:focus {
+  outline: 0;
+}
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  display: none;
+  float: left;
+  min-width: 160px;
+  padding: 5px 0;
+  margin: 2px 0 0;
+  list-style: none;
+  font-size: 14px;
+  background-color: #ffffff;
+  border: 1px solid #cccccc;
+  border: 1px solid rgba(0, 0, 0, 0.15);
+  border-radius: 3px;
+  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+  background-clip: padding-box;
+}
+.dropdown-menu.pull-right {
+  right: 0;
+  left: auto;
+}
+.dropdown-menu .divider {
+  height: 1px;
+  margin: 9px 0;
+  overflow: hidden;
+  background-color: #e5e5e5;
+}
+.dropdown-menu > li > a {
+  display: block;
+  padding: 3px 20px;
+  clear: both;
+  font-weight: normal;
+  line-height: 1.428571429;
+  color: #333333;
+  white-space: nowrap;
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+  text-decoration: none;
+  color: #262626;
+  background-color: #f5f5f5;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+  color: #ffffff;
+  text-decoration: none;
+  outline: 0;
+  background-color: #0d8921;
+}
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  color: #999999;
+}
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  text-decoration: none;
+  background-color: transparent;
+  background-image: none;
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  cursor: not-allowed;
+}
+.open > .dropdown-menu {
+  display: block;
+}
+.open > a {
+  outline: 0;
+}
+.dropdown-menu-right {
+  left: auto;
+  right: 0;
+}
+.dropdown-menu-left {
+  left: 0;
+  right: auto;
+}
+.dropdown-header {
+  display: block;
+  padding: 3px 20px;
+  font-size: 12px;
+  line-height: 1.428571429;
+  color: #999999;
+}
+.dropdown-backdrop {
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  top: 0;
+  z-index: 990;
+}
+.pull-right > .dropdown-menu {
+  right: 0;
+  left: auto;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+  border-top: 0;
+  border-bottom: 4px solid;
+  content: "";
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 1px;
+}
+@media (min-width: 768px) {
+  .navbar-right .dropdown-menu {
+    left: auto;
+    right: 0;
+  }
+  .navbar-right .dropdown-menu-left {
+    left: 0;
+    right: auto;
+  }
+}
+.btn-group,
+.btn-group-vertical {
+  position: relative;
+  display: inline-block;
+  vertical-align: middle;
+}
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+  position: relative;
+  float: left;
+}
+.btn-group > .btn:hover,
+.btn-group-vertical > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus,
+.btn-group > .btn:active,
+.btn-group-vertical > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn.active {
+  z-index: 2;
+}
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus {
+  outline: none;
+}
+.btn-group .btn + .btn,
+.btn-group .btn + .btn-group,
+.btn-group .btn-group + .btn,
+.btn-group .btn-group + .btn-group {
+  margin-left: -1px;
+}
+.btn-toolbar {
+  margin-left: -5px;
+}
+.btn-toolbar .btn-group,
+.btn-toolbar .input-group {
+  float: left;
+}
+.btn-toolbar > .btn,
+.btn-toolbar > .btn-group,
+.btn-toolbar > .input-group {
+  margin-left: 5px;
+}
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+  border-radius: 0;
+}
+.btn-group > .btn:first-child {
+  margin-left: 0;
+}
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+  border-bottom-right-radius: 0;
+  border-top-right-radius: 0;
+}
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+  border-bottom-left-radius: 0;
+  border-top-left-radius: 0;
+}
+.btn-group > .btn-group {
+  float: left;
+}
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+  border-radius: 0;
+}
+.btn-group > .btn-group:first-child > .btn:last-child,
+.btn-group > .btn-group:first-child > .dropdown-toggle {
+  border-bottom-right-radius: 0;
+  border-top-right-radius: 0;
+}
+.btn-group > .btn-group:last-child > .btn:first-child {
+  border-bottom-left-radius: 0;
+  border-top-left-radius: 0;
+}
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+  outline: 0;
+}
+.btn-group > .btn + .dropdown-toggle {
+  padding-left: 8px;
+  padding-right: 8px;
+}
+.btn-group > .btn-lg + .dropdown-toggle {
+  padding-left: 12px;
+  padding-right: 12px;
+}
+.btn-group.open .dropdown-toggle {
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+.btn-group.open .dropdown-toggle.btn-link {
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.btn .caret {
+  margin-left: 0;
+}
+.btn-lg .caret {
+  border-width: 5px 5px 0;
+  border-bottom-width: 0;
+}
+.dropup .btn-lg .caret {
+  border-width: 0 5px 5px;
+}
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group,
+.btn-group-vertical > .btn-group > .btn {
+  display: block;
+  float: none;
+  width: 100%;
+  max-width: 100%;
+}
+.btn-group-vertical > .btn-group > .btn {
+  float: none;
+}
+.btn-group-vertical > .btn + .btn,
+.btn-group-vertical > .btn + .btn-group,
+.btn-group-vertical > .btn-group + .btn,
+.btn-group-vertical > .btn-group + .btn-group {
+  margin-top: -1px;
+  margin-left: 0;
+}
+.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+  border-radius: 0;
+}
+.btn-group-vertical > .btn:first-child:not(:last-child) {
+  border-top-right-radius: 3px;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn:last-child:not(:first-child) {
+  border-bottom-left-radius: 3px;
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+  border-radius: 0;
+}
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+.btn-group-justified {
+  display: table;
+  width: 100%;
+  table-layout: fixed;
+  border-collapse: separate;
+}
+.btn-group-justified > .btn,
+.btn-group-justified > .btn-group {
+  float: none;
+  display: table-cell;
+  width: 1%;
+}
+.btn-group-justified > .btn-group .btn {
+  width: 100%;
+}
+[data-toggle="buttons"] > .btn > input[type="radio"],
+[data-toggle="buttons"] > .btn > input[type="checkbox"] {
+  display: none;
+}
+.input-group {
+  position: relative;
+  display: table;
+  border-collapse: separate;
+}
+.input-group[class*="col-"] {
+  float: none;
+  padding-left: 0;
+  padding-right: 0;
+}
+.input-group .form-control {
+  position: relative;
+  z-index: 2;
+  float: left;
+  width: 100%;
+  margin-bottom: 0;
+}
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+  height: 36px;
+  padding: 5px 10px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 4px;
+}
+select.input-group-lg > .form-control,
+select.input-group-lg > .input-group-addon,
+select.input-group-lg > .input-group-btn > .btn {
+  height: 36px;
+  line-height: 36px;
+}
+textarea.input-group-lg > .form-control,
+textarea.input-group-lg > .input-group-addon,
+textarea.input-group-lg > .input-group-btn > .btn,
+select[multiple].input-group-lg > .form-control,
+select[multiple].input-group-lg > .input-group-addon,
+select[multiple].input-group-lg > .input-group-btn > .btn {
+  height: auto;
+}
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+  height: 22px;
+  padding: 1px 5px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 2px;
+}
+select.input-group-sm > .form-control,
+select.input-group-sm > .input-group-addon,
+select.input-group-sm > .input-group-btn > .btn {
+  height: 22px;
+  line-height: 22px;
+}
+textarea.input-group-sm > .form-control,
+textarea.input-group-sm > .input-group-addon,
+textarea.input-group-sm > .input-group-btn > .btn,
+select[multiple].input-group-sm > .form-control,
+select[multiple].input-group-sm > .input-group-addon,
+select[multiple].input-group-sm > .input-group-btn > .btn {
+  height: auto;
+}
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+  display: table-cell;
+}
+.input-group-addon:not(:first-child):not(:last-child),
+.input-group-btn:not(:first-child):not(:last-child),
+.input-group .form-control:not(:first-child):not(:last-child) {
+  border-radius: 0;
+}
+.input-group-addon,
+.input-group-btn {
+  width: 1%;
+  white-space: nowrap;
+  vertical-align: middle;
+}
+.input-group-addon {
+  padding: 2px 5px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1;
+  color: #555555;
+  text-align: center;
+  background-color: #eeeeee;
+  border: 1px solid #cccccc;
+  border-radius: 3px;
+}
+.input-group-addon.input-sm {
+  padding: 1px 5px;
+  font-size: 12px;
+  border-radius: 2px;
+}
+.input-group-addon.input-lg {
+  padding: 5px 10px;
+  font-size: 18px;
+  border-radius: 4px;
+}
+.input-group-addon input[type="radio"],
+.input-group-addon input[type="checkbox"] {
+  margin-top: 0;
+}
+.input-group .form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
+  border-bottom-right-radius: 0;
+  border-top-right-radius: 0;
+}
+.input-group-addon:first-child {
+  border-right: 0;
+}
+.input-group .form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
+  border-bottom-left-radius: 0;
+  border-top-left-radius: 0;
+}
+.input-group-addon:last-child {
+  border-left: 0;
+}
+.input-group-btn {
+  position: relative;
+  font-size: 0;
+  white-space: nowrap;
+}
+.input-group-btn > .btn {
+  position: relative;
+}
+.input-group-btn > .btn + .btn {
+  margin-left: -1px;
+}
+.input-group-btn > .btn:hover,
+.input-group-btn > .btn:focus,
+.input-group-btn > .btn:active {
+  z-index: 2;
+}
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group {
+  margin-right: -1px;
+}
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group {
+  margin-left: -1px;
+}
+.nav {
+  margin-bottom: 0;
+  padding-left: 0;
+  list-style: none;
+}
+.nav > li {
+  position: relative;
+  display: block;
+}
+.nav > li > a {
+  position: relative;
+  display: block;
+  padding: 5px 10px;
+}
+.nav > li > a:hover,
+.nav > li > a:focus {
+  text-decoration: none;
+  background-color: #eeeeee;
+}
+.nav > li.disabled > a {
+  color: #999999;
+}
+.nav > li.disabled > a:hover,
+.nav > li.disabled > a:focus {
+  color: #999999;
+  text-decoration: none;
+  background-color: transparent;
+  cursor: not-allowed;
+}
+.nav .open > a,
+.nav .open > a:hover,
+.nav .open > a:focus {
+  background-color: #eeeeee;
+  border-color: #222222;
+}
+.nav .nav-divider {
+  height: 1px;
+  margin: 9px 0;
+  overflow: hidden;
+  background-color: #e5e5e5;
+}
+.nav > li > a > img {
+  max-width: none;
+}
+.nav-tabs {
+  border-bottom: 1px solid #dddddd;
+}
+.nav-tabs > li {
+  float: left;
+  margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+  margin-right: 2px;
+  line-height: 1.428571429;
+  border: 1px solid transparent;
+  border-radius: 3px 3px 0 0;
+}
+.nav-tabs > li > a:hover {
+  border-color: #eeeeee #eeeeee #dddddd;
+}
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+  color: #555555;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  border-bottom-color: transparent;
+  cursor: default;
+}
+.nav-tabs.nav-justified {
+  width: 100%;
+  border-bottom: 0;
+}
+.nav-tabs.nav-justified > li {
+  float: none;
+}
+.nav-tabs.nav-justified > li > a {
+  text-align: center;
+  margin-bottom: 5px;
+}
+.nav-tabs.nav-justified > .dropdown .dropdown-menu {
+  top: auto;
+  left: auto;
+}
+@media (min-width: 768px) {
+  .nav-tabs.nav-justified > li {
+    display: table-cell;
+    width: 1%;
+  }
+  .nav-tabs.nav-justified > li > a {
+    margin-bottom: 0;
+  }
+}
+.nav-tabs.nav-justified > li > a {
+  margin-right: 0;
+  border-radius: 3px;
+}
+.nav-tabs.nav-justified > .active > a,
+.nav-tabs.nav-justified > .active > a:hover,
+.nav-tabs.nav-justified > .active > a:focus {
+  border: 1px solid #dddddd;
+}
+@media (min-width: 768px) {
+  .nav-tabs.nav-justified > li > a {
+    border-bottom: 1px solid #dddddd;
+    border-radius: 3px 3px 0 0;
+  }
+  .nav-tabs.nav-justified > .active > a,
+  .nav-tabs.nav-justified > .active > a:hover,
+  .nav-tabs.nav-justified > .active > a:focus {
+    border-bottom-color: #ffffff;
+  }
+}
+.nav-pills > li {
+  float: left;
+}
+.nav-pills > li > a {
+  border-radius: 3px;
+}
+.nav-pills > li + li {
+  margin-left: 2px;
+}
+.nav-pills > li.active > a,
+.nav-pills > li.active > a:hover,
+.nav-pills > li.active > a:focus {
+  color: #ffffff;
+  background-color: #0d8921;
+}
+.nav-stacked > li {
+  float: none;
+}
+.nav-stacked > li + li {
+  margin-top: 2px;
+  margin-left: 0;
+}
+.nav-justified {
+  width: 100%;
+}
+.nav-justified > li {
+  float: none;
+}
+.nav-justified > li > a {
+  text-align: center;
+  margin-bottom: 5px;
+}
+.nav-justified > .dropdown .dropdown-menu {
+  top: auto;
+  left: auto;
+}
+@media (min-width: 768px) {
+  .nav-justified > li {
+    display: table-cell;
+    width: 1%;
+  }
+  .nav-justified > li > a {
+    margin-bottom: 0;
+  }
+}
+.nav-tabs-justified {
+  border-bottom: 0;
+}
+.nav-tabs-justified > li > a {
+  margin-right: 0;
+  border-radius: 3px;
+}
+.nav-tabs-justified > .active > a,
+.nav-tabs-justified > .active > a:hover,
+.nav-tabs-justified > .active > a:focus {
+  border: 1px solid #dddddd;
+}
+@media (min-width: 768px) {
+  .nav-tabs-justified > li > a {
+    border-bottom: 1px solid #dddddd;
+    border-radius: 3px 3px 0 0;
+  }
+  .nav-tabs-justified > .active > a,
+  .nav-tabs-justified > .active > a:hover,
+  .nav-tabs-justified > .active > a:focus {
+    border-bottom-color: #ffffff;
+  }
+}
+.tab-content > .tab-pane {
+  display: none;
+}
+.tab-content > .active {
+  display: block;
+}
+.nav-tabs .dropdown-menu {
+  margin-top: -1px;
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+.navbar {
+  position: relative;
+  min-height: 30px;
+  margin-bottom: 20px;
+  border: 1px solid transparent;
+}
+@media (min-width: 768px) {
+  .navbar {
+    border-radius: 3px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-header {
+    float: left;
+  }
+}
+.navbar-collapse {
+  max-height: 340px;
+  overflow-x: visible;
+  padding-right: 15px;
+  padding-left: 15px;
+  border-top: 1px solid transparent;
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
+  -webkit-overflow-scrolling: touch;
+}
+.navbar-collapse.in {
+  overflow-y: auto;
+}
+@media (min-width: 768px) {
+  .navbar-collapse {
+    width: auto;
+    border-top: 0;
+    box-shadow: none;
+  }
+  .navbar-collapse.collapse {
+    display: block !important;
+    height: auto !important;
+    padding-bottom: 0;
+    overflow: visible !important;
+  }
+  .navbar-collapse.in {
+    overflow-y: visible;
+  }
+  .navbar-fixed-top .navbar-collapse,
+  .navbar-static-top .navbar-collapse,
+  .navbar-fixed-bottom .navbar-collapse {
+    padding-left: 0;
+    padding-right: 0;
+  }
+}
+.container > .navbar-header,
+.container-fluid > .navbar-header,
+.container > .navbar-collapse,
+.container-fluid > .navbar-collapse {
+  margin-right: -15px;
+  margin-left: -15px;
+}
+@media (min-width: 768px) {
+  .container > .navbar-header,
+  .container-fluid > .navbar-header,
+  .container > .navbar-collapse,
+  .container-fluid > .navbar-collapse {
+    margin-right: 0;
+    margin-left: 0;
+  }
+}
+.navbar-static-top {
+  z-index: 1000;
+  border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+  .navbar-static-top {
+    border-radius: 0;
+  }
+}
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  position: fixed;
+  right: 0;
+  left: 0;
+  z-index: 1030;
+}
+@media (min-width: 768px) {
+  .navbar-fixed-top,
+  .navbar-fixed-bottom {
+    border-radius: 0;
+  }
+}
+.navbar-fixed-top {
+  top: 0;
+  border-width: 0 0 1px;
+}
+.navbar-fixed-bottom {
+  bottom: 0;
+  margin-bottom: 0;
+  border-width: 1px 0 0;
+}
+.navbar-brand {
+  float: left;
+  padding: 5px 15px;
+  font-size: 18px;
+  line-height: 20px;
+  height: 30px;
+}
+.navbar-brand:hover,
+.navbar-brand:focus {
+  text-decoration: none;
+}
+@media (min-width: 768px) {
+  .navbar > .container .navbar-brand,
+  .navbar > .container-fluid .navbar-brand {
+    margin-left: -15px;
+  }
+}
+.navbar-toggle {
+  position: relative;
+  float: right;
+  margin-right: 15px;
+  padding: 9px 10px;
+  margin-top: -2px;
+  margin-bottom: -2px;
+  background-color: transparent;
+  background-image: none;
+  border: 1px solid transparent;
+  border-radius: 3px;
+}
+.navbar-toggle:focus {
+  outline: none;
+}
+.navbar-toggle .icon-bar {
+  display: block;
+  width: 22px;
+  height: 2px;
+  border-radius: 1px;
+}
+.navbar-toggle .icon-bar + .icon-bar {
+  margin-top: 4px;
+}
+@media (min-width: 768px) {
+  .navbar-toggle {
+    display: none;
+  }
+}
+.navbar-nav {
+  margin: 2.5px -15px;
+}
+.navbar-nav > li > a {
+  padding-top: 10px;
+  padding-bottom: 10px;
+  line-height: 20px;
+}
+@media (max-width: 767px) {
+  .navbar-nav .open .dropdown-menu {
+    position: static;
+    float: none;
+    width: auto;
+    margin-top: 0;
+    background-color: transparent;
+    border: 0;
+    box-shadow: none;
+  }
+  .navbar-nav .open .dropdown-menu > li > a,
+  .navbar-nav .open .dropdown-menu .dropdown-header {
+    padding: 5px 15px 5px 25px;
+  }
+  .navbar-nav .open .dropdown-menu > li > a {
+    line-height: 20px;
+  }
+  .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-nav .open .dropdown-menu > li > a:focus {
+    background-image: none;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-nav {
+    float: left;
+    margin: 0;
+  }
+  .navbar-nav > li {
+    float: left;
+  }
+  .navbar-nav > li > a {
+    padding-top: 5px;
+    padding-bottom: 5px;
+  }
+  .navbar-nav.navbar-right:last-child {
+    margin-right: -15px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-left {
+    float: left !important;
+  }
+  .navbar-right {
+    float: right !important;
+  }
+}
+.navbar-form {
+  margin-left: -15px;
+  margin-right: -15px;
+  padding: 10px 15px;
+  border-top: 1px solid transparent;
+  border-bottom: 1px solid transparent;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+  margin-top: 2px;
+  margin-bottom: 2px;
+}
+@media (min-width: 768px) {
+  .navbar-form .form-group {
+    display: inline-block;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .form-control {
+    display: inline-block;
+    width: auto;
+    vertical-align: middle;
+  }
+  .navbar-form .input-group > .form-control {
+    width: 100%;
+  }
+  .navbar-form .control-label {
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .radio,
+  .navbar-form .checkbox {
+    display: inline-block;
+    margin-top: 0;
+    margin-bottom: 0;
+    padding-left: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .radio input[type="radio"],
+  .navbar-form .checkbox input[type="checkbox"] {
+    float: none;
+    margin-left: 0;
+  }
+  .navbar-form .has-feedback .form-control-feedback {
+    top: 0;
+  }
+}
+@media (max-width: 767px) {
+  .navbar-form .form-group {
+    margin-bottom: 5px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-form {
+    width: auto;
+    border: 0;
+    margin-left: 0;
+    margin-right: 0;
+    padding-top: 0;
+    padding-bottom: 0;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+  }
+  .navbar-form.navbar-right:last-child {
+    margin-right: -15px;
+  }
+}
+.navbar-nav > li > .dropdown-menu {
+  margin-top: 0;
+  border-top-right-radius: 0;
+  border-top-left-radius: 0;
+}
+.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.navbar-btn {
+  margin-top: 2px;
+  margin-bottom: 2px;
+}
+.navbar-btn.btn-sm {
+  margin-top: 4px;
+  margin-bottom: 4px;
+}
+.navbar-btn.btn-xs {
+  margin-top: 4px;
+  margin-bottom: 4px;
+}
+.navbar-text {
+  margin-top: 5px;
+  margin-bottom: 5px;
+}
+@media (min-width: 768px) {
+  .navbar-text {
+    float: left;
+    margin-left: 15px;
+    margin-right: 15px;
+  }
+  .navbar-text.navbar-right:last-child {
+    margin-right: 0;
+  }
+}
+.navbar-default {
+  background-color: #f1f1f1;
+  border-color: #e0e0e0;
+}
+.navbar-default .navbar-brand {
+  color: #333333;
+}
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+  color: #1a1a1a;
+  background-color: transparent;
+}
+.navbar-default .navbar-text {
+  color: #333333;
+}
+.navbar-default .navbar-nav > li > a {
+  color: #333333;
+}
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+  color: #0d8921;
+  background-color: transparent;
+}
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+  color: #ffffff;
+  background-color: #0d8921;
+}
+.navbar-default .navbar-nav > .disabled > a,
+.navbar-default .navbar-nav > .disabled > a:hover,
+.navbar-default .navbar-nav > .disabled > a:focus {
+  color: #cccccc;
+  background-color: transparent;
+}
+.navbar-default .navbar-toggle {
+  border-color: #dddddd;
+}
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+  background-color: #dddddd;
+}
+.navbar-default .navbar-toggle .icon-bar {
+  background-color: #888888;
+}
+.navbar-default .navbar-collapse,
+.navbar-default .navbar-form {
+  border-color: #e0e0e0;
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+  background-color: #0d8921;
+  color: #ffffff;
+}
+@media (max-width: 767px) {
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+    color: #333333;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+    color: #0d8921;
+    background-color: transparent;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+    color: #ffffff;
+    background-color: #0d8921;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+    color: #cccccc;
+    background-color: transparent;
+  }
+}
+.navbar-default .navbar-link {
+  color: #333333;
+}
+.navbar-default .navbar-link:hover {
+  color: #0d8921;
+}
+.navbar-inverse {
+  background-color: #222222;
+  border-color: #080808;
+}
+.navbar-inverse .navbar-brand {
+  color: #999999;
+}
+.navbar-inverse .navbar-brand:hover,
+.navbar-inverse .navbar-brand:focus {
+  color: #ffffff;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-text {
+  color: #999999;
+}
+.navbar-inverse .navbar-nav > li > a {
+  color: #999999;
+}
+.navbar-inverse .navbar-nav > li > a:hover,
+.navbar-inverse .navbar-nav > li > a:focus {
+  color: #ffffff;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-nav > .active > a,
+.navbar-inverse .navbar-nav > .active > a:hover,
+.navbar-inverse .navbar-nav > .active > a:focus {
+  color: #ffffff;
+  background-color: #080808;
+}
+.navbar-inverse .navbar-nav > .disabled > a,
+.navbar-inverse .navbar-nav > .disabled > a:hover,
+.navbar-inverse .navbar-nav > .disabled > a:focus {
+  color: #444444;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-toggle {
+  border-color: #333333;
+}
+.navbar-inverse .navbar-toggle:hover,
+.navbar-inverse .navbar-toggle:focus {
+  background-color: #333333;
+}
+.navbar-inverse .navbar-toggle .icon-bar {
+  background-color: #ffffff;
+}
+.navbar-inverse .navbar-collapse,
+.navbar-inverse .navbar-form {
+  border-color: #101010;
+}
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .open > a:hover,
+.navbar-inverse .navbar-nav > .open > a:focus {
+  background-color: #080808;
+  color: #ffffff;
+}
+@media (max-width: 767px) {
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
+    border-color: #080808;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
+    background-color: #080808;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
+    color: #999999;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
+    color: #ffffff;
+    background-color: transparent;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
+    color: #ffffff;
+    background-color: #080808;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+    color: #444444;
+    background-color: transparent;
+  }
+}
+.navbar-inverse .navbar-link {
+  color: #999999;
+}
+.navbar-inverse .navbar-link:hover {
+  color: #ffffff;
+}
+.breadcrumb {
+  padding: 8px 15px;
+  margin-bottom: 20px;
+  list-style: none;
+  background-color: #f5f5f5;
+  border-radius: 3px;
+}
+.breadcrumb > li {
+  display: inline-block;
+}
+.breadcrumb > li + li:before {
+  content: "/\00a0";
+  padding: 0 5px;
+  color: #cccccc;
+}
+.breadcrumb > .active {
+  color: #999999;
+}
+.pagination {
+  display: inline-block;
+  padding-left: 0;
+  margin: 20px 0;
+  border-radius: 3px;
+}
+.pagination > li {
+  display: inline;
+}
+.pagination > li > a,
+.pagination > li > span {
+  position: relative;
+  float: left;
+  padding: 2px 5px;
+  line-height: 1.428571429;
+  text-decoration: none;
+  color: #222222;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  margin-left: -1px;
+}
+.pagination > li:first-child > a,
+.pagination > li:first-child > span {
+  margin-left: 0;
+  border-bottom-left-radius: 3px;
+  border-top-left-radius: 3px;
+}
+.pagination > li:last-child > a,
+.pagination > li:last-child > span {
+  border-bottom-right-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.pagination > li > a:hover,
+.pagination > li > span:hover,
+.pagination > li > a:focus,
+.pagination > li > span:focus {
+  color: #0d8921;
+  background-color: #eeeeee;
+  border-color: #dddddd;
+}
+.pagination > .active > a,
+.pagination > .active > span,
+.pagination > .active > a:hover,
+.pagination > .active > span:hover,
+.pagination > .active > a:focus,
+.pagination > .active > span:focus {
+  z-index: 2;
+  color: #ffffff;
+  background-color: #0d8921;
+  border-color: #0d8921;
+  cursor: default;
+}
+.pagination > .disabled > span,
+.pagination > .disabled > span:hover,
+.pagination > .disabled > span:focus,
+.pagination > .disabled > a,
+.pagination > .disabled > a:hover,
+.pagination > .disabled > a:focus {
+  color: #999999;
+  background-color: #ffffff;
+  border-color: #dddddd;
+  cursor: not-allowed;
+}
+.pagination-lg > li > a,
+.pagination-lg > li > span {
+  padding: 5px 10px;
+  font-size: 18px;
+}
+.pagination-lg > li:first-child > a,
+.pagination-lg > li:first-child > span {
+  border-bottom-left-radius: 4px;
+  border-top-left-radius: 4px;
+}
+.pagination-lg > li:last-child > a,
+.pagination-lg > li:last-child > span {
+  border-bottom-right-radius: 4px;
+  border-top-right-radius: 4px;
+}
+.pagination-sm > li > a,
+.pagination-sm > li > span {
+  padding: 1px 5px;
+  font-size: 12px;
+}
+.pagination-sm > li:first-child > a,
+.pagination-sm > li:first-child > span {
+  border-bottom-left-radius: 2px;
+  border-top-left-radius: 2px;
+}
+.pagination-sm > li:last-child > a,
+.pagination-sm > li:last-child > span {
+  border-bottom-right-radius: 2px;
+  border-top-right-radius: 2px;
+}
+.pager {
+  padding-left: 0;
+  margin: 20px 0;
+  list-style: none;
+  text-align: center;
+}
+.pager li {
+  display: inline;
+}
+.pager li > a,
+.pager li > span {
+  display: inline-block;
+  padding: 5px 14px;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  border-radius: 15px;
+}
+.pager li > a:hover,
+.pager li > a:focus {
+  text-decoration: none;
+  background-color: #eeeeee;
+}
+.pager .next > a,
+.pager .next > span {
+  float: right;
+}
+.pager .previous > a,
+.pager .previous > span {
+  float: left;
+}
+.pager .disabled > a,
+.pager .disabled > a:hover,
+.pager .disabled > a:focus,
+.pager .disabled > span {
+  color: #999999;
+  background-color: #ffffff;
+  cursor: not-allowed;
+}
+.label {
+  display: inline;
+  padding: .2em .6em .3em;
+  font-size: 75%;
+  font-weight: bold;
+  line-height: 1;
+  color: #ffffff;
+  text-align: center;
+  white-space: nowrap;
+  vertical-align: baseline;
+  border-radius: .25em;
+}
+.label[href]:hover,
+.label[href]:focus {
+  color: #ffffff;
+  text-decoration: none;
+  cursor: pointer;
+}
+.label:empty {
+  display: none;
+}
+.btn .label {
+  position: relative;
+  top: -1px;
+}
+.label-default {
+  background-color: #999999;
+}
+.label-default[href]:hover,
+.label-default[href]:focus {
+  background-color: #808080;
+}
+.label-primary {
+  background-color: #0d8921;
+}
+.label-primary[href]:hover,
+.label-primary[href]:focus {
+  background-color: #095a16;
+}
+.label-success {
+  background-color: #5cb85c;
+}
+.label-success[href]:hover,
+.label-success[href]:focus {
+  background-color: #449d44;
+}
+.label-info {
+  background-color: #6c6c6c;
+}
+.label-info[href]:hover,
+.label-info[href]:focus {
+  background-color: #525252;
+}
+.label-warning {
+  background-color: #f0ad4e;
+}
+.label-warning[href]:hover,
+.label-warning[href]:focus {
+  background-color: #ec971f;
+}
+.label-danger {
+  background-color: #d9534f;
+}
+.label-danger[href]:hover,
+.label-danger[href]:focus {
+  background-color: #c9302c;
+}
+.badge {
+  display: inline-block;
+  min-width: 10px;
+  padding: 3px 7px;
+  font-size: 12px;
+  font-weight: bold;
+  color: #ffffff;
+  line-height: 1;
+  vertical-align: baseline;
+  white-space: nowrap;
+  text-align: center;
+  background-color: #999999;
+  border-radius: 10px;
+}
+.badge:empty {
+  display: none;
+}
+.btn .badge {
+  position: relative;
+  top: -1px;
+}
+.btn-xs .badge {
+  top: 0;
+  padding: 1px 5px;
+}
+a.badge:hover,
+a.badge:focus {
+  color: #ffffff;
+  text-decoration: none;
+  cursor: pointer;
+}
+a.list-group-item.active > .badge,
+.nav-pills > .active > a > .badge {
+  color: #222222;
+  background-color: #ffffff;
+}
+.nav-pills > li > a > .badge {
+  margin-left: 3px;
+}
+.jumbotron {
+  padding: 20px;
+  margin-bottom: 20px;
+  color: inherit;
+  background-color: #eeeeee;
+}
+.jumbotron h1,
+.jumbotron .h1 {
+  color: inherit;
+}
+.jumbotron p {
+  margin-bottom: 10px;
+  font-size: 17px;
+  font-weight: 200;
+}
+.container .jumbotron {
+  border-radius: 4px;
+}
+.jumbotron .container {
+  max-width: 100%;
+}
+@media screen and (min-width: 768px) {
+  .jumbotron {
+    padding-top: 32px;
+    padding-bottom: 32px;
+  }
+  .container .jumbotron {
+    padding-left: 40px;
+    padding-right: 40px;
+  }
+  .jumbotron h1,
+  .jumbotron .h1 {
+    font-size: 63px;
+  }
+}
+.thumbnail {
+  display: block;
+  padding: 4px;
+  margin-bottom: 20px;
+  line-height: 1.428571429;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  border-radius: 3px;
+  -webkit-transition: all 0.2s ease-in-out;
+  transition: all 0.2s ease-in-out;
+}
+.thumbnail > img,
+.thumbnail a > img {
+  margin-left: auto;
+  margin-right: auto;
+}
+a.thumbnail:hover,
+a.thumbnail:focus,
+a.thumbnail.active {
+  border-color: #222222;
+}
+.thumbnail .caption {
+  padding: 9px;
+  color: #333333;
+}
+.alert {
+  padding: 15px;
+  margin-bottom: 20px;
+  border: 1px solid transparent;
+  border-radius: 3px;
+}
+.alert h4 {
+  margin-top: 0;
+  color: inherit;
+}
+.alert .alert-link {
+  font-weight: bold;
+}
+.alert > p,
+.alert > ul {
+  margin-bottom: 0;
+}
+.alert > p + p {
+  margin-top: 5px;
+}
+.alert-dismissable {
+  padding-right: 35px;
+}
+.alert-dismissable .close {
+  position: relative;
+  top: -2px;
+  right: -21px;
+  color: inherit;
+}
+.alert-success {
+  background-color: #eaf6ea;
+  border-color: #bcdfb5;
+  color: #5cb85c;
+}
+.alert-success hr {
+  border-top-color: #acd7a3;
+}
+.alert-success .alert-link {
+  color: #449d44;
+}
+.alert-info {
+  background-color: #ececec;
+  border-color: #d2d2d2;
+  color: #6c6c6c;
+}
+.alert-info hr {
+  border-top-color: #c5c5c5;
+}
+.alert-info .alert-link {
+  color: #525252;
+}
+.alert-warning {
+  background-color: #fef9f3;
+  border-color: #fadac4;
+  color: #f0ad4e;
+}
+.alert-warning hr {
+  border-top-color: #f8ccac;
+}
+.alert-warning .alert-link {
+  color: #ec971f;
+}
+.alert-danger {
+  background-color: #f9e2e2;
+  border-color: #f0b8c0;
+  color: #d9534f;
+}
+.alert-danger hr {
+  border-top-color: #eba3ad;
+}
+.alert-danger .alert-link {
+  color: #c9302c;
+}
+@-webkit-keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+@keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+.progress {
+  overflow: hidden;
+  height: 20px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border-radius: 3px;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+}
+.progress-bar {
+  float: left;
+  width: 0%;
+  height: 100%;
+  font-size: 12px;
+  line-height: 20px;
+  color: #ffffff;
+  text-align: center;
+  background-color: #0d8921;
+  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+  -webkit-transition: width 0.6s ease;
+  transition: width 0.6s ease;
+}
+.progress-striped .progress-bar {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-size: 40px 40px;
+}
+.progress.active .progress-bar {
+  -webkit-animation: progress-bar-stripes 2s linear infinite;
+  animation: progress-bar-stripes 2s linear infinite;
+}
+.progress-bar-success {
+  background-color: #5cb85c;
+}
+.progress-striped .progress-bar-success {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-bar-info {
+  background-color: #6c6c6c;
+}
+.progress-striped .progress-bar-info {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-bar-warning {
+  background-color: #f0ad4e;
+}
+.progress-striped .progress-bar-warning {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-bar-danger {
+  background-color: #d9534f;
+}
+.progress-striped .progress-bar-danger {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.media,
+.media-body {
+  overflow: hidden;
+  zoom: 1;
+}
+.media,
+.media .media {
+  margin-top: 15px;
+}
+.media:first-child {
+  margin-top: 0;
+}
+.media-object {
+  display: block;
+}
+.media-heading {
+  margin: 0 0 5px;
+}
+.media > .pull-left {
+  margin-right: 10px;
+}
+.media > .pull-right {
+  margin-left: 10px;
+}
+.media-list {
+  padding-left: 0;
+  list-style: none;
+}
+.list-group {
+  margin-bottom: 20px;
+  padding-left: 0;
+}
+.list-group-item {
+  position: relative;
+  display: block;
+  padding: 10px 15px;
+  margin-bottom: -1px;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+}
+.list-group-item:first-child {
+  border-top-right-radius: 3px;
+  border-top-left-radius: 3px;
+}
+.list-group-item:last-child {
+  margin-bottom: 0;
+  border-bottom-right-radius: 3px;
+  border-bottom-left-radius: 3px;
+}
+.list-group-item > .badge {
+  float: right;
+}
+.list-group-item > .badge + .badge {
+  margin-right: 5px;
+}
+a.list-group-item {
+  color: #555555;
+}
+a.list-group-item .list-group-item-heading {
+  color: #333333;
+}
+a.list-group-item:hover,
+a.list-group-item:focus {
+  text-decoration: none;
+  background-color: #f5f5f5;
+}
+a.list-group-item.active,
+a.list-group-item.active:hover,
+a.list-group-item.active:focus {
+  z-index: 2;
+  color: #ffffff;
+  background-color: #0d8921;
+  border-color: #0d8921;
+}
+a.list-group-item.active .list-group-item-heading,
+a.list-group-item.active:hover .list-group-item-heading,
+a.list-group-item.active:focus .list-group-item-heading {
+  color: inherit;
+}
+a.list-group-item.active .list-group-item-text,
+a.list-group-item.active:hover .list-group-item-text,
+a.list-group-item.active:focus .list-group-item-text {
+  color: #71f185;
+}
+.list-group-item-success {
+  color: #5cb85c;
+  background-color: #eaf6ea;
+}
+a.list-group-item-success {
+  color: #5cb85c;
+}
+a.list-group-item-success .list-group-item-heading {
+  color: inherit;
+}
+a.list-group-item-success:hover,
+a.list-group-item-success:focus {
+  color: #5cb85c;
+  background-color: #d8eed8;
+}
+a.list-group-item-success.active,
+a.list-group-item-success.active:hover,
+a.list-group-item-success.active:focus {
+  color: #fff;
+  background-color: #5cb85c;
+  border-color: #5cb85c;
+}
+.list-group-item-info {
+  color: #6c6c6c;
+  background-color: #ececec;
+}
+a.list-group-item-info {
+  color: #6c6c6c;
+}
+a.list-group-item-info .list-group-item-heading {
+  color: inherit;
+}
+a.list-group-item-info:hover,
+a.list-group-item-info:focus {
+  color: #6c6c6c;
+  background-color: #dfdfdf;
+}
+a.list-group-item-info.active,
+a.list-group-item-info.active:hover,
+a.list-group-item-info.active:focus {
+  color: #fff;
+  background-color: #6c6c6c;
+  border-color: #6c6c6c;
+}
+.list-group-item-warning {
+  color: #f0ad4e;
+  background-color: #fef9f3;
+}
+a.list-group-item-warning {
+  color: #f0ad4e;
+}
+a.list-group-item-warning .list-group-item-heading {
+  color: inherit;
+}
+a.list-group-item-warning:hover,
+a.list-group-item-warning:focus {
+  color: #f0ad4e;
+  background-color: #fceedb;
+}
+a.list-group-item-warning.active,
+a.list-group-item-warning.active:hover,
+a.list-group-item-warning.active:focus {
+  color: #fff;
+  background-color: #f0ad4e;
+  border-color: #f0ad4e;
+}
+.list-group-item-danger {
+  color: #d9534f;
+  background-color: #f9e2e2;
+}
+a.list-group-item-danger {
+  color: #d9534f;
+}
+a.list-group-item-danger .list-group-item-heading {
+  color: inherit;
+}
+a.list-group-item-danger:hover,
+a.list-group-item-danger:focus {
+  color: #d9534f;
+  background-color: #f4cecd;
+}
+a.list-group-item-danger.active,
+a.list-group-item-danger.active:hover,
+a.list-group-item-danger.active:focus {
+  color: #fff;
+  background-color: #d9534f;
+  border-color: #d9534f;
+}
+.list-group-item-heading {
+  margin-top: 0;
+  margin-bottom: 5px;
+}
+.list-group-item-text {
+  margin-bottom: 0;
+  line-height: 1.3;
+}
+.panel {
+  margin-bottom: 20px;
+  background-color: #ffffff;
+  border: 1px solid transparent;
+  border-radius: 3px;
+  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.panel-body {
+  padding: 15px;
+}
+.panel-heading {
+  padding: 10px 15px;
+  border-bottom: 1px solid transparent;
+  border-top-right-radius: 2px;
+  border-top-left-radius: 2px;
+}
+.panel-heading > .dropdown .dropdown-toggle {
+  color: inherit;
+}
+.panel-title {
+  margin-top: 0;
+  margin-bottom: 0;
+  font-size: 16px;
+  color: inherit;
+}
+.panel-title > a {
+  color: inherit;
+}
+.panel-footer {
+  padding: 10px 15px;
+  background-color: #f5f5f5;
+  border-top: 1px solid #dddddd;
+  border-bottom-right-radius: 2px;
+  border-bottom-left-radius: 2px;
+}
+.panel > .list-group {
+  margin-bottom: 0;
+}
+.panel > .list-group .list-group-item {
+  border-width: 1px 0;
+  border-radius: 0;
+}
+.panel > .list-group:first-child .list-group-item:first-child {
+  border-top: 0;
+  border-top-right-radius: 2px;
+  border-top-left-radius: 2px;
+}
+.panel > .list-group:last-child .list-group-item:last-child {
+  border-bottom: 0;
+  border-bottom-right-radius: 2px;
+  border-bottom-left-radius: 2px;
+}
+.panel-heading + .list-group .list-group-item:first-child {
+  border-top-width: 0;
+}
+.panel > .table,
+.panel > .table-responsive > .table {
+  margin-bottom: 0;
+}
+.panel > .table:first-child,
+.panel > .table-responsive:first-child > .table:first-child {
+  border-top-right-radius: 2px;
+  border-top-left-radius: 2px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
+.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
+  border-top-left-radius: 2px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
+.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
+  border-top-right-radius: 2px;
+}
+.panel > .table:last-child,
+.panel > .table-responsive:last-child > .table:last-child {
+  border-bottom-right-radius: 2px;
+  border-bottom-left-radius: 2px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
+.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
+  border-bottom-left-radius: 2px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
+.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
+  border-bottom-right-radius: 2px;
+}
+.panel > .panel-body + .table,
+.panel > .panel-body + .table-responsive {
+  border-top: 1px solid #dddddd;
+}
+.panel > .table > tbody:first-child > tr:first-child th,
+.panel > .table > tbody:first-child > tr:first-child td {
+  border-top: 0;
+}
+.panel > .table-bordered,
+.panel > .table-responsive > .table-bordered {
+  border: 0;
+}
+.panel > .table-bordered > thead > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
+.panel > .table-bordered > tbody > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
+.panel > .table-bordered > tfoot > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+.panel > .table-bordered > thead > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
+.panel > .table-bordered > tbody > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
+.panel > .table-bordered > tfoot > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+  border-left: 0;
+}
+.panel > .table-bordered > thead > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
+.panel > .table-bordered > tbody > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
+.panel > .table-bordered > tfoot > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+.panel > .table-bordered > thead > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
+.panel > .table-bordered > tbody > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
+.panel > .table-bordered > tfoot > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+  border-right: 0;
+}
+.panel > .table-bordered > thead > tr:first-child > td,
+.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
+.panel > .table-bordered > tbody > tr:first-child > td,
+.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
+.panel > .table-bordered > thead > tr:first-child > th,
+.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
+.panel > .table-bordered > tbody > tr:first-child > th,
+.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
+  border-bottom: 0;
+}
+.panel > .table-bordered > tbody > tr:last-child > td,
+.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
+.panel > .table-bordered > tfoot > tr:last-child > td,
+.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
+.panel > .table-bordered > tbody > tr:last-child > th,
+.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
+.panel > .table-bordered > tfoot > tr:last-child > th,
+.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
+  border-bottom: 0;
+}
+.panel > .table-responsive {
+  border: 0;
+  margin-bottom: 0;
+}
+.panel-group {
+  margin-bottom: 20px;
+}
+.panel-group .panel {
+  margin-bottom: 0;
+  border-radius: 3px;
+  overflow: hidden;
+}
+.panel-group .panel + .panel {
+  margin-top: 5px;
+}
+.panel-group .panel-heading {
+  border-bottom: 0;
+}
+.panel-group .panel-heading + .panel-collapse .panel-body {
+  border-top: 1px solid #dddddd;
+}
+.panel-group .panel-footer {
+  border-top: 0;
+}
+.panel-group .panel-footer + .panel-collapse .panel-body {
+  border-bottom: 1px solid #dddddd;
+}
+.panel-default {
+  border-color: #dddddd;
+}
+.panel-default > .panel-heading {
+  color: #333333;
+  background-color: #f5f5f5;
+  border-color: #dddddd;
+}
+.panel-default > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #dddddd;
+}
+.panel-default > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #dddddd;
+}
+.panel-primary {
+  border-color: #0d8921;
+}
+.panel-primary > .panel-heading {
+  color: #ffffff;
+  background-color: #0d8921;
+  border-color: #0d8921;
+}
+.panel-primary > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #0d8921;
+}
+.panel-primary > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #0d8921;
+}
+.panel-success {
+  border-color: #bcdfb5;
+}
+.panel-success > .panel-heading {
+  color: #5cb85c;
+  background-color: #eaf6ea;
+  border-color: #bcdfb5;
+}
+.panel-success > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #bcdfb5;
+}
+.panel-success > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #bcdfb5;
+}
+.panel-info {
+  border-color: #d2d2d2;
+}
+.panel-info > .panel-heading {
+  color: #6c6c6c;
+  background-color: #ececec;
+  border-color: #d2d2d2;
+}
+.panel-info > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #d2d2d2;
+}
+.panel-info > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #d2d2d2;
+}
+.panel-warning {
+  border-color: #fadac4;
+}
+.panel-warning > .panel-heading {
+  color: #f0ad4e;
+  background-color: #fef9f3;
+  border-color: #fadac4;
+}
+.panel-warning > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #fadac4;
+}
+.panel-warning > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #fadac4;
+}
+.panel-danger {
+  border-color: #f0b8c0;
+}
+.panel-danger > .panel-heading {
+  color: #d9534f;
+  background-color: #f9e2e2;
+  border-color: #f0b8c0;
+}
+.panel-danger > .panel-heading + .panel-collapse .panel-body {
+  border-top-color: #f0b8c0;
+}
+.panel-danger > .panel-footer + .panel-collapse .panel-body {
+  border-bottom-color: #f0b8c0;
+}
+.well {
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border: 1px solid #e3e3e3;
+  border-radius: 3px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.well blockquote {
+  border-color: #ddd;
+  border-color: rgba(0, 0, 0, 0.15);
+}
+.well-lg {
+  padding: 24px;
+  border-radius: 4px;
+}
+.well-sm {
+  padding: 9px;
+  border-radius: 2px;
+}
+.close {
+  float: right;
+  font-size: 21px;
+  font-weight: bold;
+  line-height: 1;
+  color: #000000;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.2;
+  filter: alpha(opacity=20);
+}
+.close:hover,
+.close:focus {
+  color: #000000;
+  text-decoration: none;
+  cursor: pointer;
+  opacity: 0.5;
+  filter: alpha(opacity=50);
+}
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
+.modal-open {
+  overflow: hidden;
+}
+.modal {
+  display: none;
+  overflow: auto;
+  overflow-y: scroll;
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1050;
+  -webkit-overflow-scrolling: touch;
+  outline: 0;
+}
+.modal.fade .modal-dialog {
+  -webkit-transform: translate(0, -25%);
+  -ms-transform: translate(0, -25%);
+  transform: translate(0, -25%);
+  -webkit-transition: -webkit-transform 0.3s ease-out;
+  -moz-transition: -moz-transform 0.3s ease-out;
+  -o-transition: -o-transform 0.3s ease-out;
+  transition: transform 0.3s ease-out;
+}
+.modal.in .modal-dialog {
+  -webkit-transform: translate(0, 0);
+  -ms-transform: translate(0, 0);
+  transform: translate(0, 0);
+}
+.modal-dialog {
+  position: relative;
+  width: auto;
+  margin: 10px;
+}
+.modal-content {
+  position: relative;
+  background-color: #ffffff;
+  border: 1px solid #999999;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  border-radius: 4px;
+  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+  background-clip: padding-box;
+  outline: none;
+}
+.modal-backdrop {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1040;
+  background-color: #000000;
+}
+.modal-backdrop.fade {
+  opacity: 0;
+  filter: alpha(opacity=0);
+}
+.modal-backdrop.in {
+  opacity: 0.5;
+  filter: alpha(opacity=50);
+}
+.modal-header {
+  padding: 15px;
+  border-bottom: 1px solid #e5e5e5;
+  min-height: 16.428571429px;
+}
+.modal-header .close {
+  margin-top: -2px;
+}
+.modal-title {
+  margin: 0;
+  line-height: 1.428571429;
+}
+.modal-body {
+  position: relative;
+  padding: 20px;
+}
+.modal-footer {
+  margin-top: 15px;
+  padding: 19px 20px 20px;
+  text-align: right;
+  border-top: 1px solid #e5e5e5;
+}
+.modal-footer .btn + .btn {
+  margin-left: 5px;
+  margin-bottom: 0;
+}
+.modal-footer .btn-group .btn + .btn {
+  margin-left: -1px;
+}
+.modal-footer .btn-block + .btn-block {
+  margin-left: 0;
+}
+@media (min-width: 768px) {
+  .modal-dialog {
+    width: 600px;
+    margin: 30px auto;
+  }
+  .modal-content {
+    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+  }
+  .modal-sm {
+    width: 300px;
+  }
+}
+@media (min-width: 992px) {
+  .modal-lg {
+    width: 900px;
+  }
+}
+.tooltip {
+  position: absolute;
+  z-index: 1030;
+  display: block;
+  visibility: visible;
+  font-size: 12px;
+  line-height: 1.4;
+  opacity: 0;
+  filter: alpha(opacity=0);
+}
+.tooltip.in {
+  opacity: 0.9;
+  filter: alpha(opacity=90);
+}
+.tooltip.top {
+  margin-top: -3px;
+  padding: 5px 0;
+}
+.tooltip.right {
+  margin-left: 3px;
+  padding: 0 5px;
+}
+.tooltip.bottom {
+  margin-top: 3px;
+  padding: 5px 0;
+}
+.tooltip.left {
+  margin-left: -3px;
+  padding: 0 5px;
+}
+.tooltip-inner {
+  max-width: 200px;
+  padding: 3px 8px;
+  color: #ffffff;
+  text-align: center;
+  text-decoration: none;
+  background-color: #000000;
+  border-radius: 3px;
+}
+.tooltip-arrow {
+  position: absolute;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+}
+.tooltip.top .tooltip-arrow {
+  bottom: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-width: 5px 5px 0;
+  border-top-color: #000000;
+}
+.tooltip.top-left .tooltip-arrow {
+  bottom: 0;
+  left: 5px;
+  border-width: 5px 5px 0;
+  border-top-color: #000000;
+}
+.tooltip.top-right .tooltip-arrow {
+  bottom: 0;
+  right: 5px;
+  border-width: 5px 5px 0;
+  border-top-color: #000000;
+}
+.tooltip.right .tooltip-arrow {
+  top: 50%;
+  left: 0;
+  margin-top: -5px;
+  border-width: 5px 5px 5px 0;
+  border-right-color: #000000;
+}
+.tooltip.left .tooltip-arrow {
+  top: 50%;
+  right: 0;
+  margin-top: -5px;
+  border-width: 5px 0 5px 5px;
+  border-left-color: #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+  top: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-width: 0 5px 5px;
+  border-bottom-color: #000000;
+}
+.tooltip.bottom-left .tooltip-arrow {
+  top: 0;
+  left: 5px;
+  border-width: 0 5px 5px;
+  border-bottom-color: #000000;
+}
+.tooltip.bottom-right .tooltip-arrow {
+  top: 0;
+  right: 5px;
+  border-width: 0 5px 5px;
+  border-bottom-color: #000000;
+}
+.popover {
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 1010;
+  display: none;
+  max-width: 276px;
+  padding: 1px;
+  text-align: left;
+  background-color: #ffffff;
+  background-clip: padding-box;
+  border: 1px solid #cccccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  border-radius: 4px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  white-space: normal;
+}
+.popover.top {
+  margin-top: -10px;
+}
+.popover.right {
+  margin-left: 10px;
+}
+.popover.bottom {
+  margin-top: 10px;
+}
+.popover.left {
+  margin-left: -10px;
+}
+.popover-title {
+  margin: 0;
+  padding: 8px 14px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 18px;
+  background-color: #f7f7f7;
+  border-bottom: 1px solid #ebebeb;
+  border-radius: 5px 5px 0 0;
+}
+.popover-content {
+  padding: 9px 14px;
+}
+.popover > .arrow,
+.popover > .arrow:after {
+  position: absolute;
+  display: block;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+}
+.popover > .arrow {
+  border-width: 11px;
+}
+.popover > .arrow:after {
+  border-width: 10px;
+  content: "";
+}
+.popover.top > .arrow {
+  left: 50%;
+  margin-left: -11px;
+  border-bottom-width: 0;
+  border-top-color: #999999;
+  border-top-color: rgba(0, 0, 0, 0.25);
+  bottom: -11px;
+}
+.popover.top > .arrow:after {
+  content: " ";
+  bottom: 1px;
+  margin-left: -10px;
+  border-bottom-width: 0;
+  border-top-color: #ffffff;
+}
+.popover.right > .arrow {
+  top: 50%;
+  left: -11px;
+  margin-top: -11px;
+  border-left-width: 0;
+  border-right-color: #999999;
+  border-right-color: rgba(0, 0, 0, 0.25);
+}
+.popover.right > .arrow:after {
+  content: " ";
+  left: 1px;
+  bottom: -10px;
+  border-left-width: 0;
+  border-right-color: #ffffff;
+}
+.popover.bottom > .arrow {
+  left: 50%;
+  margin-left: -11px;
+  border-top-width: 0;
+  border-bottom-color: #999999;
+  border-bottom-color: rgba(0, 0, 0, 0.25);
+  top: -11px;
+}
+.popover.bottom > .arrow:after {
+  content: " ";
+  top: 1px;
+  margin-left: -10px;
+  border-top-width: 0;
+  border-bottom-color: #ffffff;
+}
+.popover.left > .arrow {
+  top: 50%;
+  right: -11px;
+  margin-top: -11px;
+  border-right-width: 0;
+  border-left-color: #999999;
+  border-left-color: rgba(0, 0, 0, 0.25);
+}
+.popover.left > .arrow:after {
+  content: " ";
+  right: 1px;
+  border-right-width: 0;
+  border-left-color: #ffffff;
+  bottom: -10px;
+}
+.carousel {
+  position: relative;
+}
+.carousel-inner {
+  position: relative;
+  overflow: hidden;
+  width: 100%;
+}
+.carousel-inner > .item {
+  display: none;
+  position: relative;
+  -webkit-transition: 0.6s ease-in-out left;
+  transition: 0.6s ease-in-out left;
+}
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+  line-height: 1;
+}
+.carousel-inner > .active,
+.carousel-inner > .next,
+.carousel-inner > .prev {
+  display: block;
+}
+.carousel-inner > .active {
+  left: 0;
+}
+.carousel-inner > .next,
+.carousel-inner > .prev {
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.carousel-inner > .next {
+  left: 100%;
+}
+.carousel-inner > .prev {
+  left: -100%;
+}
+.carousel-inner > .next.left,
+.carousel-inner > .prev.right {
+  left: 0;
+}
+.carousel-inner > .active.left {
+  left: -100%;
+}
+.carousel-inner > .active.right {
+  left: 100%;
+}
+.carousel-control {
+  position: absolute;
+  top: 0;
+  left: 0;
+  bottom: 0;
+  width: 15%;
+  opacity: 0.5;
+  filter: alpha(opacity=50);
+  font-size: 20px;
+  color: #ffffff;
+  text-align: center;
+  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+}
+.carousel-control.left {
+  background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0%), color-stop(rgba(0, 0, 0, 0.0001) 100%));
+  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
+}
+.carousel-control.right {
+  left: auto;
+  right: 0;
+  background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0%), color-stop(rgba(0, 0, 0, 0.5) 100%));
+  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
+}
+.carousel-control:hover,
+.carousel-control:focus {
+  outline: none;
+  color: #ffffff;
+  text-decoration: none;
+  opacity: 0.9;
+  filter: alpha(opacity=90);
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-left,
+.carousel-control .glyphicon-chevron-right {
+  position: absolute;
+  top: 50%;
+  z-index: 5;
+  display: inline-block;
+}
+.carousel-control .icon-prev,
+.carousel-control .glyphicon-chevron-left {
+  left: 50%;
+}
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-right {
+  right: 50%;
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next {
+  width: 20px;
+  height: 20px;
+  margin-top: -10px;
+  margin-left: -10px;
+  font-family: serif;
+}
+.carousel-control .icon-prev:before {
+  content: '\2039';
+}
+.carousel-control .icon-next:before {
+  content: '\203a';
+}
+.carousel-indicators {
+  position: absolute;
+  bottom: 10px;
+  left: 50%;
+  z-index: 15;
+  width: 60%;
+  margin-left: -30%;
+  padding-left: 0;
+  list-style: none;
+  text-align: center;
+}
+.carousel-indicators li {
+  display: inline-block;
+  width: 10px;
+  height: 10px;
+  margin: 1px;
+  text-indent: -999px;
+  border: 1px solid #ffffff;
+  border-radius: 10px;
+  cursor: pointer;
+  background-color: #000 \9;
+  background-color: rgba(0, 0, 0, 0);
+}
+.carousel-indicators .active {
+  margin: 0;
+  width: 12px;
+  height: 12px;
+  background-color: #ffffff;
+}
+.carousel-caption {
+  position: absolute;
+  left: 15%;
+  right: 15%;
+  bottom: 20px;
+  z-index: 10;
+  padding-top: 20px;
+  padding-bottom: 20px;
+  color: #ffffff;
+  text-align: center;
+  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+}
+.carousel-caption .btn {
+  text-shadow: none;
+}
+@media screen and (min-width: 768px) {
+  .carousel-control .glyphicon-chevron-left,
+  .carousel-control .glyphicon-chevron-right,
+  .carousel-control .icon-prev,
+  .carousel-control .icon-next {
+    width: 30px;
+    height: 30px;
+    margin-top: -15px;
+    margin-left: -15px;
+    font-size: 30px;
+  }
+  .carousel-caption {
+    left: 20%;
+    right: 20%;
+    padding-bottom: 30px;
+  }
+  .carousel-indicators {
+    bottom: 20px;
+  }
+}
+.clearfix:before,
+.clearfix:after,
+.container:before,
+.container:after,
+.container-fluid:before,
+.container-fluid:after,
+.row:before,
+.row:after,
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after,
+.btn-toolbar:before,
+.btn-toolbar:after,
+.btn-group-vertical > .btn-group:before,
+.btn-group-vertical > .btn-group:after,
+.nav:before,
+.nav:after,
+.navbar:before,
+.navbar:after,
+.navbar-header:before,
+.navbar-header:after,
+.navbar-collapse:before,
+.navbar-collapse:after,
+.pager:before,
+.pager:after,
+.panel-body:before,
+.panel-body:after,
+.modal-footer:before,
+.modal-footer:after {
+  content: " ";
+  display: table;
+}
+.clearfix:after,
+.container:after,
+.container-fluid:after,
+.row:after,
+.form-horizontal .form-group:after,
+.btn-toolbar:after,
+.btn-group-vertical > .btn-group:after,
+.nav:after,
+.navbar:after,
+.navbar-header:after,
+.navbar-collapse:after,
+.pager:after,
+.panel-body:after,
+.modal-footer:after {
+  clear: both;
+}
+.center-block {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+.pull-right {
+  float: right !important;
+}
+.pull-left {
+  float: left !important;
+}
+.hide {
+  display: none !important;
+}
+.show {
+  display: block !important;
+}
+.invisible {
+  visibility: hidden;
+}
+.text-hide {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0;
+}
+.hidden {
+  display: none !important;
+  visibility: hidden !important;
+}
+.affix {
+  position: fixed;
+}
+@-ms-viewport {
+  width: device-width;
+}
+.visible-xs,
+.visible-sm,
+.visible-md,
+.visible-lg {
+  display: none !important;
+}
+@media (max-width: 767px) {
+  .visible-xs {
+    display: block !important;
+  }
+  table.visible-xs {
+    display: table;
+  }
+  tr.visible-xs {
+    display: table-row !important;
+  }
+  th.visible-xs,
+  td.visible-xs {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .visible-sm {
+    display: block !important;
+  }
+  table.visible-sm {
+    display: table;
+  }
+  tr.visible-sm {
+    display: table-row !important;
+  }
+  th.visible-sm,
+  td.visible-sm {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .visible-md {
+    display: block !important;
+  }
+  table.visible-md {
+    display: table;
+  }
+  tr.visible-md {
+    display: table-row !important;
+  }
+  th.visible-md,
+  td.visible-md {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 1200px) {
+  .visible-lg {
+    display: block !important;
+  }
+  table.visible-lg {
+    display: table;
+  }
+  tr.visible-lg {
+    display: table-row !important;
+  }
+  th.visible-lg,
+  td.visible-lg {
+    display: table-cell !important;
+  }
+}
+@media (max-width: 767px) {
+  .hidden-xs {
+    display: none !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .hidden-sm {
+    display: none !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .hidden-md {
+    display: none !important;
+  }
+}
+@media (min-width: 1200px) {
+  .hidden-lg {
+    display: none !important;
+  }
+}
+.visible-print {
+  display: none !important;
+}
+@media print {
+  .visible-print {
+    display: block !important;
+  }
+  table.visible-print {
+    display: table;
+  }
+  tr.visible-print {
+    display: table-row !important;
+  }
+  th.visible-print,
+  td.visible-print {
+    display: table-cell !important;
+  }
+}
+@media print {
+  .hidden-print {
+    display: none !important;
+  }
+}
diff --git a/share/nitdoc/css/nitdoc.css b/share/nitdoc/css/nitdoc.css
new file mode 100644 (file)
index 0000000..77c96be
--- /dev/null
@@ -0,0 +1,266 @@
+body {
+       text-align: justify;
+}
+
+a:hover {
+       text-decoration: none;
+}
+
+ul li .label {
+       padding: 1px 4px;
+       font-size: 70%;
+       vertical-align: middle;
+       border-radius: .25em;
+       margin: 3px;
+       font-family: monospace;
+}
+
+#sidebar .panel {
+       margin-bottom: 10px;
+       color: #666;
+       box-shadow: none;
+}
+
+#sidebar .panel a {
+       color: #666;
+}
+
+#sidebar .panel a:hover {
+       color: #333;
+}
+
+#sidebar .panel-heading {
+       padding: 3px 0 0 0;
+       font-size: 16px;
+}
+
+#sidebar .panel-body {
+       padding: 0;
+}
+
+#sidebar .panel-body ul>li>a {
+       padding: 0;
+}
+
+#sidebar .panel-body ul>li {
+       padding: 0 0 0 15px;
+       font-size: 15px;
+}
+
+#sidebar .panel-body ul ul>li {
+       padding: 0 0 0 30px;
+       font-size: 14px;
+}
+
+#sidebar .panel-body ul .list-labeled>li {
+       padding: 0 0 0 10px;
+       font-size: 14px;
+}
+
+#sidebar .panel-body ul ul ul>li {
+       padding: 0 0 0 45px;
+       font-size: 13px;
+}
+
+#sidebar .panel-heading a:hover, #sidebar .panel ul a:hover {
+       color: #0d8921;
+       background-color: transparent;
+}
+
+#content {
+       position: fixed;
+       top: 30px;
+       bottom: 0;
+       left: 10px;
+       right: 15px;
+}
+
+#content>.col {
+       height: 100%;
+       overflow: hidden;
+}
+
+#content>.col:hover {
+       overflow-y: scroll;
+}
+
+#content>.col::-webkit-scrollbar {
+    width: 7px;
+       height: 7px;
+}
+
+#content>.col::-webkit-scrollbar-thumb {
+       background: #CCC;
+       -webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,0.10),inset 0 -1px 0 rgba(0,0,0,0.07);
+}
+
+#content>.col::-webkit-scrollbar-thumb:hover {
+       background: #999;
+}
+
+#content>.col::-webkit-scrollbar-corner {
+       background: transparent;
+}
+
+#content>.col::-webkit-scrollbar-button {
+       width: 0;
+       height: 0;
+       display: none;
+}
+
+#content article {
+       padding: 10px 0px;
+}
+
+#content article:target {
+       padding-left: 10px;
+       margin-left: -10px;
+       border-left: 2px solid #0d8921;
+}
+
+.footer {
+       padding: 10px;
+       margin: 20px 0;
+}
+
+.subtitle {
+       margin-bottom: 25px;
+}
+
+.signature span.glyphicon {
+       margin: 0 10px 5px 0;
+       font-size: 55%;
+       vertical-align: middle;
+}
+
+.signature a, .list-definition a {
+       color: #0d8921;
+}
+
+.info {
+       color: #888;
+}
+
+.info a {
+       color: #666;
+}
+
+.info a:hover {
+       color: #333;
+}
+
+.graph {
+       text-align: center;
+}
+
+.synopsys {
+       margin: 5px 0;
+       font-size: 16px;
+       font-weight: bold;
+       line-height: 1.4;
+}
+
+.public {
+       color: #5cb85c;
+}
+
+.protected {
+       color: #f0ad4e;
+}
+
+.private {
+       color: #a94442;
+}
+
+.nitcode a { color: inherit; text-decoration: inherit; } /* hide links */
+.nitcode a:hover { text-decoration: underline; } /* underline links */
+.nitcode span[title]:hover { text-decoration: underline; } /* underline titles */
+/* lexical raw tokens. independent of usage or semantic: */
+.nitcode .nc_c { color: gray; font-style: italic; } /* comment */
+.nitcode .nc_d { color: #3D8127; font-style: italic; } /* documentation comments */
+.nitcode .nc_k { font-weight: bold; } /* keyword */
+.nitcode .nc_o {} /* operator */
+.nitcode .nc_i {} /* standard identifier */
+.nitcode .nc_t { color: #445588; font-weight: bold; } /* type/class identifier */
+.nitcode .nc_a { color: #445588; font-style: italic; } /* old style attribute identifier */
+.nitcode .nc_l { color: #009999; } /* char and number literal */
+.nitcode .nc_s { color: #8F1546; } /* string literal */
+/* syntactic token usage. added because of their position in the AST */
+.nitcode .nc_ast { color: blue; } /* assert label */
+.nitcode .nc_la { color: blue; } /* break/continue label */
+.nitcode .nc_m { color: #445588; } /* module name */
+/* syntactic groups */
+.nitcode .nc_def { font-weight: bold; color: blue; } /* name used in a definition */
+.nitcode .nc_def.nc_a { color: blue; } /* name used in a attribute definition */
+.nitcode .nc_def.nc_t { color: blue; } /* name used in a class or vt definition */
+.nitcode .nc_ss { color: #9E6BEB; } /* superstrings */
+.nitcode .nc_cdef {} /* A whole class definition */
+.nitcode .nc_pdef {} /* A whole property definition */
+/* semantic token usage */
+.nitcode .nc_v { font-style: italic; } /* local variable or parameter */
+.nitcode .nc_vt { font-style: italic; } /* virtual type or formal type */
+
+.nitcode .nc_error { border: 1px red solid;} /* not used */
+
+
+#sidebar .summary .nav>li>a {
+       padding: 2px 0 0 15px;
+       font-size: 15px;
+       border-left: 2px solid transparent;
+}
+
+#sidebar .summary .nav .nav>li>a {
+       padding: 2px 0 0 30px;
+       font-size: 14px;
+       border-left: 2px solid transparent;
+}
+
+#sidebar .summary .nav .nav .nav>li>a {
+       padding: 1px 0 0 45px;
+       font-size: 13px;
+}
+
+#sidebar .summary .nav .nav .nav .nav>li>a {
+       padding: 1px 0 0 60px;
+       font-size: 12px;
+}
+
+#sidebar .summary .nav>.active>a,
+#sidebar .summary .nav>.active>a:hover,
+#sidebar .summary .nav>li>a:hover {
+       color: #0d8921;
+       background-color: transparent;
+}
+
+#sidebar .summary .nav>.active>a,
+#sidebar .summary .nav .nav>.active>a,
+#sidebar .summary .nav .nav>.active>a:hover {
+       color: #0d8921;
+       border-left: 2px solid #0d8921;
+       margin-left: 0px;
+}
+
+#sidebar .summary .nav .nav>li>a:hover {
+       color: #0d8921;
+       border-left: 1px solid #0d8921;
+       margin-left: 1px;
+       background-color: transparent;
+}
+
+.label:empty {
+       display:inline;
+}
+
+.label.intro:before {
+       content: "I";
+}
+.label.redef:before {
+       content: "R";
+}
+.label.inherit:before {
+       content: "H";
+}
+
+.list-definition .list-definition {
+       margin-left: 30px;
+}
index 73d33a4..0c90d58 100644 (file)
@@ -9,18 +9,17 @@ require.config({
                quicksearchList: searchList,
                jQueryUI: "jquery-ui",
     },
-       shim: {
+       /*shim: {
                "jQueryUI": {
                    export: "$",
                    deps: ['jquery']
                }
-       }
+       }*/
 });
 
 // nitdoc main module
 define([
-       "plugins/folding",
-       "plugins/filtering",
+       //"plugins/filtering",
        "plugins/quicksearch",
        "plugins/github",
 ], function() {});
diff --git a/share/nitdoc/js/plugins/folding.js b/share/nitdoc/js/plugins/folding.js
deleted file mode 100644 (file)
index 9d58e3b..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/* This file is part of NIT ( http://www.nitlanguage.org ).\r
-\r
-   Licensed under the Apache License, Version 2.0 (the "License");\r
-   you may not use this file except in compliance with the License.\r
-   You may obtain a copy of the License at\r
-\r
-   http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-   Unless required by applicable law or agreed to in writing, software\r
-   distributed under the License is distributed on an "AS IS" BASIS,\r
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-   See the License for the specific language governing permissions and\r
-   limitations under the License.\r
-\r
-   Documentation generator for the nit language.\r
-   Generate API documentation in HTML format from nit source code.\r
-*/\r
-\r
-/*\r
- * Nitdoc Folding\r
- *\r
- * Allow user to fold sidebar blocks\r
- */\r
-define([\r
-       'jquery',\r
-       'jQueryUI'\r
-], function($) {\r
-       $.widget("nitdoc.folding", {\r
-\r
-               options: {\r
-                       foldText: "-",\r
-                       unfoldText: "+",\r
-                       linkHolder: "h3",\r
-                       linkClass: "nitdoc-ui-fold",\r
-                       linkCSS: {\r
-                               "cursor": "pointer"\r
-                       }\r
-               },\r
-\r
-               _create: function() {\r
-                       this._foldLink = $("<a/>")\r
-                               .addClass(this.options.linkClass)\r
-                               .text(this.options.foldText);\r
-\r
-                       this.element.find(this.options.linkHolder)\r
-                       .prepend(this._foldLink)\r
-                       .css(this.options.linkCSS)\r
-                       .toggle(\r
-                               $.proxy(this._fold, this),\r
-                               $.proxy(this._unfold, this)\r
-                       );\r
-               },\r
-\r
-               _fold: function(event) {\r
-                       this._foldLink.text(this.options.unfoldText);\r
-                       this.element.find(this.options.linkHolder).nextAll().toggle();\r
-               },\r
-\r
-               _unfold: function() {\r
-                       this._foldLink.text(this.options.foldText);\r
-                       this.element.find(this.options.linkHolder).nextAll().toggle();\r
-               }\r
-       });\r
-\r
-       $(".sidebar nav").folding();\r
-});\r
index 84ad4f2..c77c0d0 100644 (file)
@@ -46,11 +46,21 @@ define([
                        this.origin = this._parseUpstream(upstream);\r
                        this._initMarked();\r
                        // Add github menu\r
-                       $("nav.main ul").append(\r
-                               $("<li/>")\r
-                               .attr("id", "nitdoc-github-li")\r
+                       $("#topmenu>.container-fluid").append(\r
+                               $("<a/>")\r
+                               .attr({\r
+                                       "id": "nitdoc-github-li",\r
+                                       "type": "button",\r
+                                       "class": "navbar-btn navbar-right btn-link",\r
+                                       "href": "#",\r
+                                       "data-container": "body",\r
+                                       "data-toggle": "popover",\r
+                                       "data-placement": "bottom",\r
+                                       "data-content": "bottom",\r
+                                       "data-html": "true",\r
+                               })\r
                                .loginbox()\r
-                               .loginbox("displayLogin")\r
+                               //.loginbox("displayLogin")\r
                                .bind("loginbox_logoff", function() {\r
                                        GithubUI.disactivate();\r
                                })\r
@@ -124,7 +134,7 @@ define([
                                                .modalbox("open");\r
                                        } else if(isok == "error:sha") {\r
                                                $("<p/>")\r
-                                               .text("The provided Github repository must contain the base commit '" + UI.origin.sha + "'.")\r
+                                               .text("The provided Github repository must contain the base commit '" + this.origin.sha + "'.")\r
                                                .modalbox({\r
                                                        title: "Github base commit error",\r
                                                        isError: true\r
index 119b5e8..55fbffe 100644 (file)
@@ -40,16 +40,16 @@ define([
 \r
                _create: function() {\r
                        this.element.append(\r
-                               $("<a/>")\r
-                               .append(\r
-                                       $("<img/>")\r
-                                       .attr({\r
-                                               src: this.options.icon,\r
-                                               alt: this.options.iconAlt\r
-                                       })\r
-                                       .addClass("nitdoc-github-li-img")\r
-                               )\r
-                               .click($.proxy(this.toggle, this))\r
+                               $("<span/>")\r
+                               .addClass("glyphicon glyphicon-off")\r
+                               //.click($.proxy(this.toggle, this))\r
+                               .attr({\r
+                                       "data-container": "body",\r
+                                       "data-toggle": "popover",\r
+                                       "data-placement": "bottom",\r
+                                       "data-content": "bottom",\r
+                                       "data-html": "true",\r
+                               })\r
                        );\r
 \r
                        this.content = $("<div/>");\r
@@ -133,56 +133,77 @@ define([
                                $("<form/>")\r
                                .keyup($.proxy(this._doFormChange, this))\r
                                .append(\r
-                                       $("<label/>")\r
-                                       .attr("for", "nitdoc-github-login-field")\r
-                                       .append(this.options.usernameTxt)\r
-                               )\r
-                               .append(\r
-                                       $("<input/>")\r
-                                       .attr({\r
-                                               id: "nitdoc-github-login-field",\r
-                                               type: "text"\r
-                                       })\r
-                               )\r
-                               .append(\r
-                                       $("<label/>")\r
-                                       .attr("for", "nitdoc-github-password-field")\r
-                                       .append(this.options.passwordTxt)\r
-                               )\r
-                               .append(\r
-                                       $("<input/>")\r
-                                       .attr({\r
-                                               id: "nitdoc-github-password-field",\r
-                                               type: "password"\r
-                                       })\r
-                               )\r
-                               .append(\r
-                                       $("<label/>")\r
-                                       .attr("for", "nitdoc-github-repo-field")\r
-                                       .append(this.options.repoTxt)\r
+                                       $("<div/>")\r
+                                       .addClass("form-group")\r
+                                       .append(\r
+                                               $("<label/>")\r
+                                               .attr("for", "nitdoc-github-login-field")\r
+                                               .append(this.options.usernameTxt)\r
+                                       )\r
+                                       .addClass("form-group")\r
+                                       .append(\r
+                                               $("<input/>")\r
+                                               .attr({\r
+                                                       id: "nitdoc-github-login-field",\r
+                                                       type: "text",\r
+                                                       "class": "form-control"\r
+                                               })\r
+                                       )\r
                                )\r
                                .append(\r
-                                       $("<input/>")\r
-                                       .attr({\r
-                                               id: "nitdoc-github-repo-field",\r
-                                               type: "text"\r
-                                       })\r
+                                       $("<div/>")\r
+                                       .addClass("form-group")\r
+                                       .append(\r
+                                               $("<label/>")\r
+                                               .attr("for", "nitdoc-github-password-field")\r
+                                               .append(this.options.passwordTxt)\r
+                                       )\r
+                                       .append(\r
+                                               $("<input/>")\r
+                                               .attr({\r
+                                                       id: "nitdoc-github-password-field",\r
+                                                       type: "password",\r
+                                                       "class": "form-control"\r
+                                               })\r
+                                       )\r
                                )\r
                                .append(\r
-                                       $("<label/>")\r
-                                       .attr("for", "nitdoc-github-branch-field")\r
-                                       .append(this.options.branchTxt)\r
+                                       $("<div/>")\r
+                                       .addClass("form-group")\r
+                                       .append(\r
+                                               $("<label/>")\r
+                                               .attr("for", "nitdoc-github-repo-field")\r
+                                               .append(this.options.repoTxt)\r
+                                       )\r
+                                       .append(\r
+                                               $("<input/>")\r
+                                               .attr({\r
+                                                       id: "nitdoc-github-repo-field",\r
+                                                       type: "text",\r
+                                                       "class": "form-control"\r
+                                               })\r
+                                       )\r
                                )\r
                                .append(\r
-                                       $("<input/>")\r
-                                       .attr({\r
-                                               id: "nitdoc-github-branch-field",\r
-                                               type: "text"\r
-                                       })\r
+                                       $("<div/>")\r
+                                       .addClass("form-group")\r
+                                       .append(\r
+                                               $("<label/>")\r
+                                               .attr("for", "nitdoc-github-branch-field")\r
+                                               .append(this.options.branchTxt)\r
+                                       )\r
+                                       .append(\r
+                                               $("<input/>")\r
+                                               .attr({\r
+                                                       id: "nitdoc-github-branch-field",\r
+                                                       type: "text",\r
+                                                       "class": "form-control"\r
+                                               })\r
+                                       )\r
                                )\r
                                .append(\r
                                        $("<button/>")\r
-                                       .addClass("nitdoc-github-button")\r
+                                       .addClass("nitdoc-github-button btn btn-primary btn-lg pull-right")\r
                                        .attr("disabled", "disabled")\r
                                        .append(\r
                                                $("<img/>")\r
index c4cd682..12c124a 100644 (file)
@@ -29,10 +29,8 @@ define([
 
                options: {
                        list: {}, // List of raw results generated by nitdoc tool
-                       fieldNotUsedClass: "nitdoc-qs-field-notused",
                        fieldAttrs: {
                                autocomplete: "off",
-                               value: "quick search..."
                        },
                        tableID: "nitdoc-qs-table",
                        tableCSS: {
@@ -56,11 +54,8 @@ define([
                _create: function() {
                        this.element
                                .attr(this.options.fieldAttrs)
-                               .addClass(this.options.fieldNotUsedClass)
                                .keydown($.proxy(this._doKeyDown, this))
                                .keyup($.proxy(this._doKeyUp, this))
-                               .focusout($.proxy(this._doFocusOut, this))
-                               .focusin($.proxy(this._doFocusIn, this));
 
                        this._table = $("<table/>")
                                .attr("id", this.options.tableID)
@@ -93,28 +88,14 @@ define([
                                        break;
                                case 13: // Enter
                                        this._loadResult();
-                                       break;
+                                       return false;
                                case 27: // Escape
                                        this.element.blur();
                                        this.closeTable();
-                                       break;
+                                       return true;
                                default: // Other keys
                                        utils.delayEvent($.proxy(this.search, this));
-                                       break;
-                       }
-               },
-
-               _doFocusOut: function() {
-                       if(this.element.val() == "") {
-                               this.element.addClass(this.options.fieldNotUsedClass);
-                               this.element.val(this.options.fieldAttrs.value);
-                       }
-               },
-
-               _doFocusIn: function() {
-                       if(this.element.val() == this.options.fieldAttrs.value) {
-                               this.element.removeClass(this.options.fieldNotUsedClass);
-                               this.element.val("");
+                                       return true;
                        }
                },
 
@@ -378,16 +359,21 @@ define([
        });
 
        var searchField = $("<input/>")
-       .addClass("nitdoc-qs-field-notused")
+       .addClass("form-control input-sm")
        .attr({
                id: "nitdoc-qs-field",
                type: "text",
+               placeholder: "Search..."
        })
 
-       $("nav.main ul").append(
-               $("<li/>")
-                       .attr("id", "nitdoc-qs-li")
-                       .append(searchField)
+       $("#topmenu>.container-fluid").append(
+               $("<div>")
+               .addClass("navbar-form navbar-right")
+               .append(
+                       $("<div>")
+                       .addClass("form-group")
+                       .append(searchField)
+               )
        );
 
        searchField.quicksearch({
diff --git a/share/nitdoc/less/nitdoc_template.less b/share/nitdoc/less/nitdoc_template.less
new file mode 100644 (file)
index 0000000..abaf3ee
--- /dev/null
@@ -0,0 +1,830 @@
+//
+// Variables
+// --------------------------------------------------
+
+
+//== Colors
+//
+//## Gray and brand colors for use across Bootstrap.
+
+@gray-darker:            lighten(#000, 13.5%); // #222
+@gray-dark:              lighten(#000, 20%);   // #333
+@gray:                   lighten(#000, 33.5%); // #555
+@gray-light:             lighten(#000, 60%);   // #999
+@gray-lighter:           lighten(#000, 93.5%); // #eee
+
+@brand-primary:         #0D8921;
+@brand-success:         #5cb85c;
+@brand-info:            #6C6C6C;
+@brand-warning:         #f0ad4e;
+@brand-danger:          #d9534f;
+
+
+//== Scaffolding
+//
+// ## Settings for some of the most global styles.
+
+//** Background color for `<body>`.
+@body-bg:               #fff;
+//** Global text color on `<body>`.
+@text-color:            @gray-dark;
+
+//** Global textual link color.
+@link-color:            @gray-darker;
+//** Link hover color set via `darken()` function.
+@link-hover-color:      @brand-primary;
+
+
+//== Typography
+//
+//## Font, line-height, and color for body text, headings, and more.
+
+@font-family-sans-serif:  "Helvetica Neue", Helvetica, Arial, sans-serif;
+@font-family-serif:       Georgia, "Times New Roman", Times, serif;
+//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
+@font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace;
+@font-family-base:        @font-family-sans-serif;
+
+@font-size-base:          14px;
+@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
+@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
+
+@font-size-h1:            floor((@font-size-base * 2.6)); // ~36px
+@font-size-h2:            floor((@font-size-base * 2.15)); // ~30px
+@font-size-h3:            ceil((@font-size-base * 1.7)); // ~24px
+@font-size-h4:            ceil((@font-size-base * 1.25)); // ~18px
+@font-size-h5:            @font-size-base;
+@font-size-h6:            ceil((@font-size-base * 0.85)); // ~12px
+
+//** Unit-less `line-height` for use in components like buttons.
+@line-height-base:        1.428571429; // 20/14
+//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
+@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
+
+//** By default, this inherits from the `<body>`.
+@headings-font-family:    inherit;
+@headings-font-weight:    500;
+@headings-line-height:    1.1;
+@headings-color:          inherit;
+
+
+//-- Iconography
+//
+//## Specify custom locations of the include Glyphicons icon font. Useful for those including Bootstrap via Bower.
+
+@icon-font-path:          "../fonts/";
+@icon-font-name:          "glyphicons-halflings-regular";
+@icon-font-svg-id:        "glyphicons_halflingsregular";
+
+//== Components
+//
+//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
+
+@padding-base-vertical:     2px;
+@padding-base-horizontal:   5px;
+
+@padding-large-vertical:    5px;
+@padding-large-horizontal:  10px;
+
+@padding-small-vertical:    1px;
+@padding-small-horizontal:  5px;
+
+@padding-xs-vertical:       0px;
+@padding-xs-horizontal:     3px;
+
+@line-height-large:         1.33;
+@line-height-small:         1.5;
+
+@border-radius-base:        3px;
+@border-radius-large:       4px;
+@border-radius-small:       2px;
+
+//** Global color for active items (e.g., navs or dropdowns).
+@component-active-color:    #fff;
+//** Global background color for active items (e.g., navs or dropdowns).
+@component-active-bg:       @brand-primary;
+
+//** Width of the `border` for generating carets that indicator dropdowns.
+@caret-width-base:          4px;
+//** Carets increase slightly in size for larger components.
+@caret-width-large:         5px;
+
+
+//== Tables
+//
+//## Customizes the `.table` component with basic values, each used across all table variations.
+
+//** Padding for `<th>`s and `<td>`s.
+@table-cell-padding:            8px;
+//** Padding for cells in `.table-condensed`.
+@table-condensed-cell-padding:  5px;
+
+//** Default background color used for all tables.
+@table-bg:                      transparent;
+//** Background color used for `.table-striped`.
+@table-bg-accent:               #f9f9f9;
+//** Background color used for `.table-hover`.
+@table-bg-hover:                #f5f5f5;
+@table-bg-active:               @table-bg-hover;
+
+//** Border color for table and cell borders.
+@table-border-color:            #ddd;
+
+
+//== Buttons
+//
+//## For each of Bootstrap's buttons, define text, background and border color.
+
+@btn-font-weight:                normal;
+
+@btn-default-color:              #333;
+@btn-default-bg:                 #fff;
+@btn-default-border:             #ccc;
+
+@btn-primary-color:              #fff;
+@btn-primary-bg:                 @brand-primary;
+@btn-primary-border:             darken(@btn-primary-bg, 5%);
+
+@btn-success-color:              #fff;
+@btn-success-bg:                 @brand-success;
+@btn-success-border:             darken(@btn-success-bg, 5%);
+
+@btn-info-color:                 #fff;
+@btn-info-bg:                    @brand-info;
+@btn-info-border:                darken(@btn-info-bg, 5%);
+
+@btn-warning-color:              #fff;
+@btn-warning-bg:                 @brand-warning;
+@btn-warning-border:             darken(@btn-warning-bg, 5%);
+
+@btn-danger-color:               #fff;
+@btn-danger-bg:                  @brand-danger;
+@btn-danger-border:              darken(@btn-danger-bg, 5%);
+
+@btn-link-disabled-color:        @gray-light;
+
+
+//== Forms
+//
+//##
+
+//** `<input>` background color
+@input-bg:                       #fff;
+//** `<input disabled>` background color
+@input-bg-disabled:              @gray-lighter;
+
+//** Text color for `<input>`s
+@input-color:                    @gray;
+//** `<input>` border color
+@input-border:                   #ccc;
+//** `<input>` border radius
+@input-border-radius:            @border-radius-base;
+//** Border color for inputs on focus
+@input-border-focus:             @brand-info;
+
+//** Placeholder text color
+@input-color-placeholder:        @gray-light;
+
+//** Default `.form-control` height
+@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
+//** Large `.form-control` height
+@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
+//** Small `.form-control` height
+@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
+
+@legend-color:                   @gray-dark;
+@legend-border-color:            #e5e5e5;
+
+//** Background color for textual input addons
+@input-group-addon-bg:           @gray-lighter;
+//** Border color for textual input addons
+@input-group-addon-border-color: @input-border;
+
+
+//== Dropdowns
+//
+//## Dropdown menu container and contents.
+
+//** Background for the dropdown menu.
+@dropdown-bg:                    #fff;
+//** Dropdown menu `border-color`.
+@dropdown-border:                rgba(0,0,0,.15);
+//** Dropdown menu `border-color` **for IE8**.
+@dropdown-fallback-border:       #ccc;
+//** Divider color for between dropdown items.
+@dropdown-divider-bg:            #e5e5e5;
+
+//** Dropdown link text color.
+@dropdown-link-color:            @gray-dark;
+//** Hover color for dropdown links.
+@dropdown-link-hover-color:      darken(@gray-dark, 5%);
+//** Hover background for dropdown links.
+@dropdown-link-hover-bg:         #f5f5f5;
+
+//** Active dropdown menu item text color.
+@dropdown-link-active-color:     @component-active-color;
+//** Active dropdown menu item background color.
+@dropdown-link-active-bg:        @component-active-bg;
+
+//** Disabled dropdown menu item background color.
+@dropdown-link-disabled-color:   @gray-light;
+
+//** Text color for headers within dropdown menus.
+@dropdown-header-color:          @gray-light;
+
+// Note: Deprecated @dropdown-caret-color as of v3.1.0
+@dropdown-caret-color:           #000;
+
+
+//-- Z-index master list
+//
+// Warning: Avoid customizing these values. They're used for a bird's eye view
+// of components dependent on the z-axis and are designed to all work together.
+//
+// Note: These variables are not generated into the Customizer.
+
+@zindex-navbar:            1000;
+@zindex-dropdown:          1000;
+@zindex-popover:           1010;
+@zindex-tooltip:           1030;
+@zindex-navbar-fixed:      1030;
+@zindex-modal-background:  1040;
+@zindex-modal:             1050;
+
+
+//== Media queries breakpoints
+//
+//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
+
+// Extra small screen / phone
+// Note: Deprecated @screen-xs and @screen-phone as of v3.0.1
+@screen-xs:                  480px;
+@screen-xs-min:              @screen-xs;
+@screen-phone:               @screen-xs-min;
+
+// Small screen / tablet
+// Note: Deprecated @screen-sm and @screen-tablet as of v3.0.1
+@screen-sm:                  768px;
+@screen-sm-min:              @screen-sm;
+@screen-tablet:              @screen-sm-min;
+
+// Medium screen / desktop
+// Note: Deprecated @screen-md and @screen-desktop as of v3.0.1
+@screen-md:                  992px;
+@screen-md-min:              @screen-md;
+@screen-desktop:             @screen-md-min;
+
+// Large screen / wide desktop
+// Note: Deprecated @screen-lg and @screen-lg-desktop as of v3.0.1
+@screen-lg:                  1200px;
+@screen-lg-min:              @screen-lg;
+@screen-lg-desktop:          @screen-lg-min;
+
+// So media queries don't overlap when required, provide a maximum
+@screen-xs-max:              (@screen-sm-min - 1);
+@screen-sm-max:              (@screen-md-min - 1);
+@screen-md-max:              (@screen-lg-min - 1);
+
+
+//== Grid system
+//
+//## Define your custom responsive grid.
+
+//** Number of columns in the grid.
+@grid-columns:              12;
+//** Padding between columns. Gets divided in half for the left and right.
+@grid-gutter-width:         30px;
+// Navbar collapse
+//** Point at which the navbar becomes uncollapsed.
+@grid-float-breakpoint:     @screen-sm-min;
+//** Point at which the navbar begins collapsing.
+@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
+
+
+//== Container sizes
+//
+//## Define the maximum width of `.container` for different screen sizes.
+
+// Small screen / tablet
+@container-tablet:             ((720px + @grid-gutter-width));
+//** For `@screen-sm-min` and up.
+@container-sm:                 @container-tablet;
+
+// Medium screen / desktop
+@container-desktop:            ((940px + @grid-gutter-width));
+//** For `@screen-md-min` and up.
+@container-md:                 @container-desktop;
+
+// Large screen / wide desktop
+@container-large-desktop:      ((1140px + @grid-gutter-width));
+//** For `@screen-lg-min` and up.
+@container-lg:                 @container-large-desktop;
+
+
+//== Navbar
+//
+//##
+
+// Basics of a navbar
+@navbar-height:                    30px;
+@navbar-margin-bottom:             @line-height-computed;
+@navbar-border-radius:             @border-radius-base;
+@navbar-padding-horizontal:        floor((@grid-gutter-width / 2));
+@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
+@navbar-collapse-max-height:       340px;
+
+@navbar-default-color:             #333;
+@navbar-default-bg:                #f1f1f1;
+@navbar-default-border:            darken(@navbar-default-bg, 6.5%);
+
+// Navbar links
+@navbar-default-link-color:                #333;
+@navbar-default-link-hover-color:          @brand-primary;
+@navbar-default-link-hover-bg:             transparent;
+@navbar-default-link-active-color:         #fff;
+@navbar-default-link-active-bg:            @brand-primary;
+@navbar-default-link-disabled-color:       #ccc;
+@navbar-default-link-disabled-bg:          transparent;
+
+// Navbar brand label
+@navbar-default-brand-color:               @navbar-default-link-color;
+@navbar-default-brand-hover-color:         darken(@navbar-default-brand-color, 10%);
+@navbar-default-brand-hover-bg:            transparent;
+
+// Navbar toggle
+@navbar-default-toggle-hover-bg:           #ddd;
+@navbar-default-toggle-icon-bar-bg:        #888;
+@navbar-default-toggle-border-color:       #ddd;
+
+
+// Inverted navbar
+// Reset inverted navbar basics
+@navbar-inverse-color:                      @gray-light;
+@navbar-inverse-bg:                         #222;
+@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
+
+// Inverted navbar links
+@navbar-inverse-link-color:                 @gray-light;
+@navbar-inverse-link-hover-color:           #fff;
+@navbar-inverse-link-hover-bg:              transparent;
+@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
+@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
+@navbar-inverse-link-disabled-color:        #444;
+@navbar-inverse-link-disabled-bg:           transparent;
+
+// Inverted navbar brand label
+@navbar-inverse-brand-color:                @navbar-inverse-link-color;
+@navbar-inverse-brand-hover-color:          #fff;
+@navbar-inverse-brand-hover-bg:             transparent;
+
+// Inverted navbar toggle
+@navbar-inverse-toggle-hover-bg:            #333;
+@navbar-inverse-toggle-icon-bar-bg:         #fff;
+@navbar-inverse-toggle-border-color:        #333;
+
+
+//== Navs
+//
+//##
+
+//=== Shared nav styles
+@nav-link-padding:                          5px 10px;
+@nav-link-hover-bg:                         @gray-lighter;
+
+@nav-disabled-link-color:                   @gray-light;
+@nav-disabled-link-hover-color:             @gray-light;
+
+@nav-open-link-hover-color:                 #fff;
+
+//== Tabs
+@nav-tabs-border-color:                     #ddd;
+
+@nav-tabs-link-hover-border-color:          @gray-lighter;
+
+@nav-tabs-active-link-hover-bg:             @body-bg;
+@nav-tabs-active-link-hover-color:          @gray;
+@nav-tabs-active-link-hover-border-color:   #ddd;
+
+@nav-tabs-justified-link-border-color:            #ddd;
+@nav-tabs-justified-active-link-border-color:     @body-bg;
+
+//== Pills
+@nav-pills-border-radius:                   @border-radius-base;
+@nav-pills-active-link-hover-bg:            @component-active-bg;
+@nav-pills-active-link-hover-color:         @component-active-color;
+
+
+//== Pagination
+//
+//##
+
+@pagination-color:                     @link-color;
+@pagination-bg:                        #fff;
+@pagination-border:                    #ddd;
+
+@pagination-hover-color:               @link-hover-color;
+@pagination-hover-bg:                  @gray-lighter;
+@pagination-hover-border:              #ddd;
+
+@pagination-active-color:              #fff;
+@pagination-active-bg:                 @brand-primary;
+@pagination-active-border:             @brand-primary;
+
+@pagination-disabled-color:            @gray-light;
+@pagination-disabled-bg:               #fff;
+@pagination-disabled-border:           #ddd;
+
+
+//== Pager
+//
+//##
+
+@pager-bg:                             @pagination-bg;
+@pager-border:                         @pagination-border;
+@pager-border-radius:                  15px;
+
+@pager-hover-bg:                       @pagination-hover-bg;
+
+@pager-active-bg:                      @pagination-active-bg;
+@pager-active-color:                   @pagination-active-color;
+
+@pager-disabled-color:                 @pagination-disabled-color;
+
+
+//== Jumbotron
+//
+//##
+
+@jumbotron-padding:              20px;
+@jumbotron-color:                inherit;
+@jumbotron-bg:                   @gray-lighter;
+@jumbotron-heading-color:        inherit;
+@jumbotron-font-size:            ceil((@font-size-base * 1.2));
+
+
+//== Form states and alerts
+//
+//## Define colors for form feedback states and, by default, alerts.
+
+@state-success-text:             @brand-success;
+@state-success-bg:               lighten(@brand-success, 40%);
+@state-success-border:           darken(spin(@state-success-bg, -10), 15%);
+
+@state-info-text:                @brand-info;
+@state-info-bg:                  lighten(@brand-info, 50%);
+@state-info-border:              darken(spin(@state-info-bg, -10), 10%);
+
+@state-warning-text:             @brand-warning;
+@state-warning-bg:               lighten(@brand-warning, 35%);
+@state-warning-border:           darken(spin(@state-warning-bg, -10), 10%);
+
+@state-danger-text:              @brand-danger;
+@state-danger-bg:                lighten(@brand-danger, 35%);
+@state-danger-border:            darken(spin(@state-danger-bg, -10), 10%);
+
+
+//== Tooltips
+//
+//##
+
+//** Tooltip max width
+@tooltip-max-width:           200px;
+//** Tooltip text color
+@tooltip-color:               #fff;
+//** Tooltip background color
+@tooltip-bg:                  #000;
+@tooltip-opacity:             .9;
+
+//** Tooltip arrow width
+@tooltip-arrow-width:         5px;
+//** Tooltip arrow color
+@tooltip-arrow-color:         @tooltip-bg;
+
+
+//== Popovers
+//
+//##
+
+//** Popover body background color
+@popover-bg:                          #fff;
+//** Popover maximum width
+@popover-max-width:                   276px;
+//** Popover border color
+@popover-border-color:                rgba(0,0,0,.2);
+//** Popover fallback border color
+@popover-fallback-border-color:       #ccc;
+
+//** Popover title background color
+@popover-title-bg:                    darken(@popover-bg, 3%);
+
+//** Popover arrow width
+@popover-arrow-width:                 10px;
+//** Popover arrow color
+@popover-arrow-color:                 #fff;
+
+//** Popover outer arrow width
+@popover-arrow-outer-width:           (@popover-arrow-width + 1);
+//** Popover outer arrow color
+@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
+//** Popover outer arrow fallback color
+@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
+
+
+//== Labels
+//
+//##
+
+//** Default label background color
+@label-default-bg:            @gray-light;
+//** Primary label background color
+@label-primary-bg:            @brand-primary;
+//** Success label background color
+@label-success-bg:            @brand-success;
+//** Info label background color
+@label-info-bg:               @brand-info;
+//** Warning label background color
+@label-warning-bg:            @brand-warning;
+//** Danger label background color
+@label-danger-bg:             @brand-danger;
+
+//** Default label text color
+@label-color:                 #fff;
+//** Default text color of a linked label
+@label-link-hover-color:      #fff;
+
+
+//== Modals
+//
+//##
+
+//** Padding applied to the modal body
+@modal-inner-padding:         20px;
+
+//** Padding applied to the modal title
+@modal-title-padding:         15px;
+//** Modal title line-height
+@modal-title-line-height:     @line-height-base;
+
+//** Background color of modal content area
+@modal-content-bg:                             #fff;
+//** Modal content border color
+@modal-content-border-color:                   rgba(0,0,0,.2);
+//** Modal content border color **for IE8**
+@modal-content-fallback-border-color:          #999;
+
+//** Modal backdrop background color
+@modal-backdrop-bg:           #000;
+//** Modal backdrop opacity
+@modal-backdrop-opacity:      .5;
+//** Modal header border color
+@modal-header-border-color:   #e5e5e5;
+//** Modal footer border color
+@modal-footer-border-color:   @modal-header-border-color;
+
+@modal-lg:                    900px;
+@modal-md:                    600px;
+@modal-sm:                    300px;
+
+
+//== Alerts
+//
+//## Define alert colors, border radius, and padding.
+
+@alert-padding:               15px;
+@alert-border-radius:         @border-radius-base;
+@alert-link-font-weight:      bold;
+
+@alert-success-bg:            @state-success-bg;
+@alert-success-text:          @state-success-text;
+@alert-success-border:        @state-success-border;
+
+@alert-info-bg:               @state-info-bg;
+@alert-info-text:             @state-info-text;
+@alert-info-border:           @state-info-border;
+
+@alert-warning-bg:            @state-warning-bg;
+@alert-warning-text:          @state-warning-text;
+@alert-warning-border:        @state-warning-border;
+
+@alert-danger-bg:             @state-danger-bg;
+@alert-danger-text:           @state-danger-text;
+@alert-danger-border:         @state-danger-border;
+
+
+//== Progress bars
+//
+//##
+
+//** Background color of the whole progress component
+@progress-bg:                 #f5f5f5;
+//** Progress bar text color
+@progress-bar-color:          #fff;
+
+//** Default progress bar color
+@progress-bar-bg:             @brand-primary;
+//** Success progress bar color
+@progress-bar-success-bg:     @brand-success;
+//** Warning progress bar color
+@progress-bar-warning-bg:     @brand-warning;
+//** Danger progress bar color
+@progress-bar-danger-bg:      @brand-danger;
+//** Info progress bar color
+@progress-bar-info-bg:        @brand-info;
+
+
+//== List group
+//
+//##
+
+//** Background color on `.list-group-item`
+@list-group-bg:                 #fff;
+//** `.list-group-item` border color
+@list-group-border:             #ddd;
+//** List group border radius
+@list-group-border-radius:      @border-radius-base;
+
+//** Background color of single list elements on hover
+@list-group-hover-bg:           #f5f5f5;
+//** Text color of active list elements
+@list-group-active-color:       @component-active-color;
+//** Background color of active list elements
+@list-group-active-bg:          @component-active-bg;
+//** Border color of active list elements
+@list-group-active-border:      @list-group-active-bg;
+@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
+
+@list-group-link-color:         #555;
+@list-group-link-heading-color: #333;
+
+
+//== Panels
+//
+//##
+
+@panel-bg:                    #fff;
+@panel-body-padding:          15px;
+@panel-border-radius:         @border-radius-base;
+
+//** Border color for elements within panels
+@panel-inner-border:          #ddd;
+@panel-footer-bg:             #f5f5f5;
+
+@panel-default-text:          @gray-dark;
+@panel-default-border:        #ddd;
+@panel-default-heading-bg:    #f5f5f5;
+
+@panel-primary-text:          #fff;
+@panel-primary-border:        @brand-primary;
+@panel-primary-heading-bg:    @brand-primary;
+
+@panel-success-text:          @state-success-text;
+@panel-success-border:        @state-success-border;
+@panel-success-heading-bg:    @state-success-bg;
+
+@panel-info-text:             @state-info-text;
+@panel-info-border:           @state-info-border;
+@panel-info-heading-bg:       @state-info-bg;
+
+@panel-warning-text:          @state-warning-text;
+@panel-warning-border:        @state-warning-border;
+@panel-warning-heading-bg:    @state-warning-bg;
+
+@panel-danger-text:           @state-danger-text;
+@panel-danger-border:         @state-danger-border;
+@panel-danger-heading-bg:     @state-danger-bg;
+
+
+//== Thumbnails
+//
+//##
+
+//** Padding around the thumbnail image
+@thumbnail-padding:           4px;
+//** Thumbnail background color
+@thumbnail-bg:                @body-bg;
+//** Thumbnail border color
+@thumbnail-border:            #ddd;
+//** Thumbnail border radius
+@thumbnail-border-radius:     @border-radius-base;
+
+//** Custom text color for thumbnail captions
+@thumbnail-caption-color:     @text-color;
+//** Padding around the thumbnail caption
+@thumbnail-caption-padding:   9px;
+
+
+//== Wells
+//
+//##
+
+@well-bg:                     #f5f5f5;
+@well-border:                 darken(@well-bg, 7%);
+
+
+//== Badges
+//
+//##
+
+@badge-color:                 #fff;
+//** Linked badge text color on hover
+@badge-link-hover-color:      #fff;
+@badge-bg:                    @gray-light;
+
+//** Badge text color in active nav link
+@badge-active-color:          @link-color;
+//** Badge background color in active nav link
+@badge-active-bg:             #fff;
+
+@badge-font-weight:           bold;
+@badge-line-height:           1;
+@badge-border-radius:         10px;
+
+
+//== Breadcrumbs
+//
+//##
+
+@breadcrumb-padding-vertical:   8px;
+@breadcrumb-padding-horizontal: 15px;
+//** Breadcrumb background color
+@breadcrumb-bg:                 #f5f5f5;
+//** Breadcrumb text color
+@breadcrumb-color:              #ccc;
+//** Text color of current page in the breadcrumb
+@breadcrumb-active-color:       @gray-light;
+//** Textual separator for between breadcrumb elements
+@breadcrumb-separator:          "/";
+
+
+//== Carousel
+//
+//##
+
+@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
+
+@carousel-control-color:                      #fff;
+@carousel-control-width:                      15%;
+@carousel-control-opacity:                    .5;
+@carousel-control-font-size:                  20px;
+
+@carousel-indicator-active-bg:                #fff;
+@carousel-indicator-border-color:             #fff;
+
+@carousel-caption-color:                      #fff;
+
+
+//== Close
+//
+//##
+
+@close-font-weight:           bold;
+@close-color:                 #000;
+@close-text-shadow:           0 1px 0 #fff;
+
+
+//== Code
+//
+//##
+
+@code-color:                  #c7254e;
+@code-bg:                     #f9f2f4;
+
+@kbd-color:                   #fff;
+@kbd-bg:                      #333;
+
+@pre-bg:                      #f5f5f5;
+@pre-color:                   @gray-dark;
+@pre-border-color:            #ccc;
+@pre-scrollable-max-height:   340px;
+
+
+//== Type
+//
+//##
+
+//** Text muted color
+@text-muted:                  @gray-light;
+//** Abbreviations and acronyms border color
+@abbr-border-color:           @gray-light;
+//** Headings small color
+@headings-small-color:        @gray-light;
+//** Blockquote small color
+@blockquote-small-color:      @gray-light;
+//** Blockquote font size
+@blockquote-font-size:        (@font-size-base * 1.25);
+//** Blockquote border color
+@blockquote-border-color:     @gray-lighter;
+//** Page header border color
+@page-header-border-color:    @gray-lighter;
+
+
+//== Miscellaneous
+//
+//##
+
+//** Horizontal line color.
+@hr-border:                   @gray-lighter;
+
+//** Horizontal offset for forms and lists.
+@component-offset-horizontal: 180px;
+
diff --git a/share/nitdoc/resources/icons/const_private.png b/share/nitdoc/resources/icons/const_private.png
deleted file mode 100644 (file)
index 53def84..0000000
Binary files a/share/nitdoc/resources/icons/const_private.png and /dev/null differ
diff --git a/share/nitdoc/resources/icons/const_protected.png b/share/nitdoc/resources/icons/const_protected.png
deleted file mode 100644 (file)
index 99530e3..0000000
Binary files a/share/nitdoc/resources/icons/const_protected.png and /dev/null differ
diff --git a/share/nitdoc/resources/icons/const_public.png b/share/nitdoc/resources/icons/const_public.png
deleted file mode 100644 (file)
index 393f130..0000000
Binary files a/share/nitdoc/resources/icons/const_public.png and /dev/null differ
diff --git a/share/nitdoc/resources/icons/copy.png b/share/nitdoc/resources/icons/copy.png
deleted file mode 100644 (file)
index f1d9599..0000000
Binary files a/share/nitdoc/resources/icons/copy.png and /dev/null differ
diff --git a/share/nitdoc/resources/icons/meth_private.png b/share/nitdoc/resources/icons/meth_private.png
deleted file mode 100644 (file)
index 0217515..0000000
Binary files a/share/nitdoc/resources/icons/meth_private.png and /dev/null differ
diff --git a/share/nitdoc/resources/icons/meth_protected.png b/share/nitdoc/resources/icons/meth_protected.png
deleted file mode 100644 (file)
index eb20e7c..0000000
Binary files a/share/nitdoc/resources/icons/meth_protected.png and /dev/null differ
diff --git a/share/nitdoc/resources/icons/meth_public.png b/share/nitdoc/resources/icons/meth_public.png
deleted file mode 100644 (file)
index e5906ee..0000000
Binary files a/share/nitdoc/resources/icons/meth_public.png and /dev/null differ
diff --git a/share/nitdoc/resources/icons/vtype_private.png b/share/nitdoc/resources/icons/vtype_private.png
deleted file mode 100644 (file)
index b526812..0000000
Binary files a/share/nitdoc/resources/icons/vtype_private.png and /dev/null differ
diff --git a/share/nitdoc/resources/icons/vtype_protected.png b/share/nitdoc/resources/icons/vtype_protected.png
deleted file mode 100644 (file)
index f3515e7..0000000
Binary files a/share/nitdoc/resources/icons/vtype_protected.png and /dev/null differ
diff --git a/share/nitdoc/resources/icons/vtype_public.png b/share/nitdoc/resources/icons/vtype_public.png
deleted file mode 100644 (file)
index a70354d..0000000
Binary files a/share/nitdoc/resources/icons/vtype_public.png and /dev/null differ
diff --git a/share/nitdoc/vendors/bootstrap/css/bootstrap.min.css b/share/nitdoc/vendors/bootstrap/css/bootstrap.min.css
new file mode 100644 (file)
index 0000000..679272d
--- /dev/null
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}}
\ No newline at end of file
diff --git a/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.eot b/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.eot
new file mode 100644 (file)
index 0000000..4a4ca86
Binary files /dev/null and b/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.eot differ
diff --git a/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.svg b/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.svg
new file mode 100644 (file)
index 0000000..e3e2dc7
--- /dev/null
@@ -0,0 +1,229 @@
+<?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="glyphicons_halflingsregular" horiz-adv-x="1200" >
+<font-face units-per-em="1200" ascent="960" descent="-240" />
+<missing-glyph horiz-adv-x="500" />
+<glyph />
+<glyph />
+<glyph unicode="&#xd;" />
+<glyph unicode=" " />
+<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" />
+<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" />
+<glyph unicode="&#xa0;" />
+<glyph unicode="&#x2000;" horiz-adv-x="652" />
+<glyph unicode="&#x2001;" horiz-adv-x="1304" />
+<glyph unicode="&#x2002;" horiz-adv-x="652" />
+<glyph unicode="&#x2003;" horiz-adv-x="1304" />
+<glyph unicode="&#x2004;" horiz-adv-x="434" />
+<glyph unicode="&#x2005;" horiz-adv-x="326" />
+<glyph unicode="&#x2006;" horiz-adv-x="217" />
+<glyph unicode="&#x2007;" horiz-adv-x="217" />
+<glyph unicode="&#x2008;" horiz-adv-x="163" />
+<glyph unicode="&#x2009;" horiz-adv-x="260" />
+<glyph unicode="&#x200a;" horiz-adv-x="72" />
+<glyph unicode="&#x202f;" horiz-adv-x="260" />
+<glyph unicode="&#x205f;" horiz-adv-x="326" />
+<glyph unicode="&#x20ac;" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" />
+<glyph unicode="&#x2212;" d="M200 400h900v300h-900v-300z" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#x2601;" d="M-14 494q0 -80 56.5 -137t135.5 -57h750q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5z" />
+<glyph unicode="&#x2709;" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" />
+<glyph unicode="&#x270f;" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" />
+<glyph unicode="&#xe001;" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" />
+<glyph unicode="&#xe002;" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q18 -55 86 -75.5t147 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" />
+<glyph unicode="&#xe003;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" />
+<glyph unicode="&#xe005;" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" />
+<glyph unicode="&#xe006;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1z" />
+<glyph unicode="&#xe007;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" />
+<glyph unicode="&#xe008;" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" />
+<glyph unicode="&#xe009;" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" />
+<glyph unicode="&#xe010;" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe011;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe012;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe013;" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" />
+<glyph unicode="&#xe014;" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" />
+<glyph unicode="&#xe015;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" />
+<glyph unicode="&#xe016;" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" />
+<glyph unicode="&#xe017;" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" />
+<glyph unicode="&#xe018;" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" />
+<glyph unicode="&#xe019;" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" />
+<glyph unicode="&#xe020;" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" />
+<glyph unicode="&#xe021;" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" />
+<glyph unicode="&#xe022;" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" />
+<glyph unicode="&#xe023;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 500v400h100 v-300h200v-100h-300z" />
+<glyph unicode="&#xe024;" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" />
+<glyph unicode="&#xe025;" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" />
+<glyph unicode="&#xe026;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM188 600q0 -170 121 -291t291 -121t291 121t121 291t-121 291t-291 121 t-291 -121t-121 -291zM350 600h150v300h200v-300h150l-250 -300z" />
+<glyph unicode="&#xe027;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM350 600l250 300 l250 -300h-150v-300h-200v300h-150z" />
+<glyph unicode="&#xe028;" d="M0 25v475l200 700h800l199 -700l1 -475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" />
+<glyph unicode="&#xe029;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 397v401 l297 -200z" />
+<glyph unicode="&#xe030;" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" />
+<glyph unicode="&#xe031;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" />
+<glyph unicode="&#xe032;" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" />
+<glyph unicode="&#xe033;" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" />
+<glyph unicode="&#xe034;" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" />
+<glyph unicode="&#xe035;" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" />
+<glyph unicode="&#xe036;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" />
+<glyph unicode="&#xe037;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" />
+<glyph unicode="&#xe038;" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" />
+<glyph unicode="&#xe039;" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" />
+<glyph unicode="&#xe040;" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" />
+<glyph unicode="&#xe041;" d="M0 700l1 475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" />
+<glyph unicode="&#xe042;" d="M1 700l1 475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" />
+<glyph unicode="&#xe043;" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" />
+<glyph unicode="&#xe044;" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" />
+<glyph unicode="&#xe045;" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" />
+<glyph unicode="&#xe046;" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" />
+<glyph unicode="&#xe047;" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140l116 -317h-340 z" />
+<glyph unicode="&#xe048;" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 14t-49 14.5v71l471 -1q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111 t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" />
+<glyph unicode="&#xe049;" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" />
+<glyph unicode="&#xe050;" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " />
+<glyph unicode="&#xe051;" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" />
+<glyph unicode="&#xe052;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
+<glyph unicode="&#xe053;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
+<glyph unicode="&#xe054;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe055;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe056;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe057;" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" />
+<glyph unicode="&#xe058;" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" />
+<glyph unicode="&#xe059;" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" />
+<glyph unicode="&#xe060;" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " />
+<glyph unicode="&#xe062;" d="M148 745q0 124 60.5 231.5t165 172t226.5 64.5q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262zM342 772q0 -107 75.5 -182.5t181.5 -75.5 q107 0 182.5 75.5t75.5 182.5t-75.5 182t-182.5 75t-182 -75.5t-75 -181.5z" />
+<glyph unicode="&#xe063;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM173 600q0 -177 125.5 -302t301.5 -125v854q-176 0 -301.5 -125 t-125.5 -302z" />
+<glyph unicode="&#xe064;" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 139t-64 210zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" />
+<glyph unicode="&#xe065;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM995 1015l113 -113l113 113l-21 85l-92 28z" />
+<glyph unicode="&#xe066;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" />
+<glyph unicode="&#xe067;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q61 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l567 567l-137 137l-430 -431l-146 147z" />
+<glyph unicode="&#xe068;" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" />
+<glyph unicode="&#xe069;" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe070;" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe071;" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" />
+<glyph unicode="&#xe072;" d="M200 0l900 550l-900 550v-1100z" />
+<glyph unicode="&#xe073;" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
+<glyph unicode="&#xe074;" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
+<glyph unicode="&#xe075;" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" />
+<glyph unicode="&#xe076;" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" />
+<glyph unicode="&#xe077;" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" />
+<glyph unicode="&#xe078;" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" />
+<glyph unicode="&#xe079;" d="M185 599l592 -592l240 240l-353 353l353 353l-240 240z" />
+<glyph unicode="&#xe080;" d="M272 194l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1l-592 -591z" />
+<glyph unicode="&#xe081;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" />
+<glyph unicode="&#xe082;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h600v200h-600v-200z" />
+<glyph unicode="&#xe083;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM246 459l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141l-141 142l-212 -213l141 -141 z" />
+<glyph unicode="&#xe084;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" />
+<glyph unicode="&#xe085;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM364 700h143q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5 q19 0 30 -10t11 -26q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-50 0 -90.5 -12t-75 -38.5t-53.5 -74.5t-19 -114zM500 300h200v100h-200 v-100z" />
+<glyph unicode="&#xe086;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200v100h-200v-100z" />
+<glyph unicode="&#xe087;" d="M0 500v200h195q31 125 98.5 199.5t206.5 100.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206h200v-206 q149 48 201 206h-201v200h200q-25 74 -75.5 127t-124.5 77v-204h-200v203q-75 -23 -130 -77t-79 -126h209v-200h-210z" />
+<glyph unicode="&#xe088;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM356 465l135 135 l-135 135l109 109l135 -135l135 135l109 -109l-135 -135l135 -135l-109 -109l-135 135l-135 -135z" />
+<glyph unicode="&#xe089;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM322 537l141 141 l87 -87l204 205l142 -142l-346 -345z" />
+<glyph unicode="&#xe090;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -115 62 -215l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5zM391 245q97 -59 209 -59q171 0 292.5 121.5t121.5 292.5 q0 112 -59 209z" />
+<glyph unicode="&#xe091;" d="M0 547l600 453v-300h600v-300h-600v-301z" />
+<glyph unicode="&#xe092;" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" />
+<glyph unicode="&#xe093;" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" />
+<glyph unicode="&#xe094;" d="M104 600h296v600h300v-600h298l-449 -600z" />
+<glyph unicode="&#xe095;" d="M0 200q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453l-600 -448v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5z" />
+<glyph unicode="&#xe096;" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" />
+<glyph unicode="&#xe097;" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -141l-295 -295l129 -130h-400z" />
+<glyph unicode="&#xe101;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5h-207q-21 0 -33 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" />
+<glyph unicode="&#xe102;" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111q1 1 1 6.5t-1.5 15t-3.5 17.5l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6 h-111v-100zM100 0h400v400h-400v-400zM200 900q-3 0 14 48t36 96l18 47l213 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" />
+<glyph unicode="&#xe103;" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" />
+<glyph unicode="&#xe104;" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5 t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5t8 -43t6 -39.5 t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" />
+<glyph unicode="&#xe105;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" />
+<glyph unicode="&#xe106;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM120 600q210 -282 393 -336l37 141q-107 18 -178.5 101.5t-71.5 193.5 q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68l-14 26zM780 161l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40 q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" />
+<glyph unicode="&#xe107;" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 34 -48 36.5t-48 -29.5l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" />
+<glyph unicode="&#xe108;" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -20 -13 -28.5t-32 0.5l-94 78h-222l-94 -78q-19 -9 -32 -0.5t-13 28.5 v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" />
+<glyph unicode="&#xe109;" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" />
+<glyph unicode="&#xe110;" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" />
+<glyph unicode="&#xe111;" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" />
+<glyph unicode="&#xe112;" d="M100 600v200h300v-250q0 -113 6 -145q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5 t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" />
+<glyph unicode="&#xe113;" d="M-30 411l227 -227l352 353l353 -353l226 227l-578 579z" />
+<glyph unicode="&#xe114;" d="M70 797l580 -579l578 579l-226 227l-353 -353l-352 353z" />
+<glyph unicode="&#xe115;" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-198l299 -283l299 283h-200v600h-796z" />
+<glyph unicode="&#xe116;" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15 t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" />
+<glyph unicode="&#xe117;" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" />
+<glyph unicode="&#xe118;" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" />
+<glyph unicode="&#xe119;" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" />
+<glyph unicode="&#xe120;" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" />
+<glyph unicode="&#xe121;" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" />
+<glyph unicode="&#xe122;" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM100 500v250v8v8v7t0.5 7t1.5 5.5t2 5t3 4t4.5 3.5t6 1.5t7.5 0.5h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35 q-55 337 -55 351zM1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" />
+<glyph unicode="&#xe123;" d="M74 350q0 21 13.5 35.5t33.5 14.5h18l117 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5q-18 -36 -18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-8 -3 -23 -8.5 t-65 -20t-103 -25t-132.5 -19.5t-158.5 -9q-125 0 -245.5 20.5t-178.5 40.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" />
+<glyph unicode="&#xe124;" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" />
+<glyph unicode="&#xe125;" d="M0 200h200v600h-200v-600zM300 275q0 -75 100 -75h61q124 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400z M400 300v375l150 213l100 212h50v-175l-50 -225h450v-125l-250 -375h-214l-136 100h-100z" />
+<glyph unicode="&#xe126;" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q124 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63zM400 525l150 -212l100 -213h50v175l-50 225h450v125l-250 375h-214l-136 -100h-100v-375z" />
+<glyph unicode="&#xe127;" d="M8 200v600h200v-600h-200zM308 275v525q0 17 14 35.5t28 28.5l14 9l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341 q-7 0 -90 81t-83 94zM408 289l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83l-339 -236v-503z" />
+<glyph unicode="&#xe128;" d="M-101 651q0 72 54 110t139 38l302 -1l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6l365 -230q7 -4 17 -10.5t26.5 -26t16.5 -36.5v-526q0 -13 -86 -93.5t-94 -80.5h-341q-16 0 -29.5 20t-19.5 41l-130 339h-107q-84 0 -139 39t-55 111zM-1 601h222 q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l107 89v502l-343 237l-87 -83l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100zM1000 201v600h200v-600h-200z" />
+<glyph unicode="&#xe129;" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6.5v7.5v6.5v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294l-89 -100h-503zM400 0v200h600v-200h-600z" />
+<glyph unicode="&#xe130;" d="M2 585q-16 -31 6 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85q0 -51 -0.5 -153.5t-0.5 -148.5q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM77 565l236 339h503 l89 -100v-294l-340 -130q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" />
+<glyph unicode="&#xe131;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM298 701l2 -201h300l-2 -194l402 294l-402 298v-197h-300z" />
+<glyph unicode="&#xe132;" d="M0 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5zM200 600l402 -294l-2 194h300l2 201h-300v197z" />
+<glyph unicode="&#xe133;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600h200v-300h200v300h200l-300 400z" />
+<glyph unicode="&#xe134;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600l300 -400l300 400h-200v300h-200v-300h-200z" />
+<glyph unicode="&#xe135;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM254 780q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60 q12 0 23 -5.5t23 -15t20 -13.5q24 -12 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q104 -3 221 112q30 29 47 47t34.5 49t20.5 62q-14 9 -37 9.5t-36 7.5q-14 7 -49 15t-52 19q-9 0 -39.5 -0.5 t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5 q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 39 2 44q31 -13 58 -14.5t39 3.5l11 4q7 36 -16.5 53.5t-64.5 28.5t-56 23q-19 -3 -37 0 q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6q-15 -3 -45.5 0.5t-45.5 -2.5q-21 -7 -52 -26.5t-34 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5zM518 916q3 12 16 30t16 25q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -24 17 -66.5t17 -43.5 q-9 2 -31 5t-36 5t-32 8t-30 14zM692 1003h1h-1z" />
+<glyph unicode="&#xe136;" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" />
+<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" />
+<glyph unicode="&#xe138;" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" />
+<glyph unicode="&#xe139;" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" />
+<glyph unicode="&#xe140;" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" />
+<glyph unicode="&#xe141;" d="M0 596q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 596q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM291 655 q0 23 15.5 38.5t38.5 15.5t39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM514 609q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5 q22 0 38 -16t16 -39t-16 -39t-38 -16q-14 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5zM800 655q0 22 16 38t39 16t38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39z" />
+<glyph unicode="&#xe142;" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -78.5 -16.5t-67.5 -51.5l-389 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23 q38 0 53 -36q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60 l517 511q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163z" />
+<glyph unicode="&#xe143;" d="M80 784q0 131 98.5 229.5t230.5 98.5q143 0 241 -129q103 129 246 129q129 0 226 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-197 -191 -293 -322l-17 -23l-16 23q-43 58 -100 122.5t-92 99.5t-101 100q-71 70 -104.5 105.5t-77 89.5t-61 99 t-17.5 91zM250 784q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203l12 12q64 62 97.5 97t64.5 79t31 72q0 71 -48 119.5t-105 48.5q-74 0 -132 -83l-118 -171l-114 174q-51 80 -123 80q-60 0 -109.5 -49.5t-49.5 -118.5z" />
+<glyph unicode="&#xe144;" d="M57 353q0 -95 66 -159l141 -142q68 -66 159 -66q93 0 159 66l283 283q66 66 66 159t-66 159l-141 141q-8 9 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141q7 -7 19 -17l105 105 l-212 212l389 389l247 -247l-95 -96l18 -17q47 -49 77 -100l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" />
+<glyph unicode="&#xe145;" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" />
+<glyph unicode="&#xe146;" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" />
+<glyph unicode="&#xe148;" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335q-6 1 -15.5 4t-11.5 3q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5 v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5 zM700 237q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" />
+<glyph unicode="&#xe149;" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -28 16.5 -69.5t28 -62.5t41.5 -72h241v-100h-197q8 -50 -2.5 -115 t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q33 1 103 -16t103 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221z" />
+<glyph unicode="&#xe150;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" />
+<glyph unicode="&#xe151;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" />
+<glyph unicode="&#xe152;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" />
+<glyph unicode="&#xe153;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" />
+<glyph unicode="&#xe154;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" />
+<glyph unicode="&#xe155;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" />
+<glyph unicode="&#xe156;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" />
+<glyph unicode="&#xe157;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" />
+<glyph unicode="&#xe158;" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" />
+<glyph unicode="&#xe159;" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" />
+<glyph unicode="&#xe160;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" />
+<glyph unicode="&#xe161;" d="M0 400v300h300v200l400 -350l-400 -350v200h-300zM500 0v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400z" />
+<glyph unicode="&#xe162;" d="M217 519q8 -19 31 -19h302q-155 -438 -160 -458q-5 -21 4 -32l9 -8h9q14 0 26 15q11 13 274.5 321.5t264.5 308.5q14 19 5 36q-8 17 -31 17l-301 -1q1 4 78 219.5t79 227.5q2 15 -5 27l-9 9h-9q-15 0 -25 -16q-4 -6 -98 -111.5t-228.5 -257t-209.5 -237.5q-16 -19 -6 -41 z" />
+<glyph unicode="&#xe163;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300zM600 400v300h300v200l400 -350l-400 -350v200h-300z " />
+<glyph unicode="&#xe164;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98l-78 73l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5 v-300zM496 709l353 342l-149 149h500v-500l-149 149l-342 -353z" />
+<glyph unicode="&#xe165;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM406 600 q0 80 57 137t137 57t137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137z" />
+<glyph unicode="&#xe166;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 800l445 -500l450 500h-295v400h-300v-400h-300zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe167;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 700h300v-300h300v300h295l-445 500zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe168;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 705l305 -305l596 596l-154 155l-442 -442l-150 151zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe169;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 988l97 -98l212 213l-97 97zM200 400l697 1l3 699l-250 -239l-149 149l-212 -212l149 -149zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe170;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM200 612l212 -212l98 97l-213 212zM300 1200l239 -250l-149 -149l212 -212l149 148l249 -237l-1 697zM900 150h100v50h-100v-50z" />
+<glyph unicode="&#xe171;" d="M23 415l1177 784v-1079l-475 272l-310 -393v416h-392zM494 210l672 938l-672 -712v-226z" />
+<glyph unicode="&#xe172;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200z" />
+<glyph unicode="&#xe173;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120l-126 -127h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM581 306l123 123l120 -120l353 352l123 -123l-475 -476zM600 1000h100v200h-100v-200z" />
+<glyph unicode="&#xe174;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170l-298 -298h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200zM700 133l170 170l-170 170l127 127l170 -170l170 170l127 -128l-170 -169l170 -170 l-127 -127l-170 170l-170 -170z" />
+<glyph unicode="&#xe175;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300l300 -300l300 300h-200v300h-200v-300h-200zM600 1000v200h100v-200h-100z" />
+<glyph unicode="&#xe176;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200l-298 -298h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300h200v-300h200v300h200l-300 300zM600 1000v200h100v-200h-100z" />
+<glyph unicode="&#xe177;" d="M0 250q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200v-550zM0 900h1200v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 300v200h400v-200h-400z" />
+<glyph unicode="&#xe178;" d="M0 400l300 298v-198h400v-200h-400v-198zM100 800v200h100v-200h-100zM300 800v200h100v-200h-100zM500 800v200h400v198l300 -298l-300 -298v198h-400zM800 300v200h100v-200h-100zM1000 300h100v200h-100v-200z" />
+<glyph unicode="&#xe179;" d="M100 700v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300l50 100l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447zM800 597q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5 t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v1106q0 31 -18 40.5t-44 -7.5l-276 -116q-25 -17 -43.5 -51.5t-18.5 -65.5v-359z" />
+<glyph unicode="&#xe180;" d="M100 0h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5 t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56z" />
+<glyph unicode="&#xe181;" d="M0 300q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM100 100h400l200 200h105l295 98v-298h-425l-100 -100h-375zM100 300v200h300v-200h-300zM100 600v200h300v-200h-300z M100 1000h400l200 -200v-98l295 98h105v200h-425l-100 100h-375zM700 402v163l400 133v-163z" />
+<glyph unicode="&#xe182;" d="M16.5 974.5q0.5 -21.5 16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q17 18 13.5 41t-22.5 37l-192 136q-19 14 -45 12t-42 -19l-118 -118q-142 101 -268 227t-227 268l118 118q17 17 20 41.5t-11 44.5 l-139 194q-14 19 -36.5 22t-40.5 -14l-162 -162q-1 -11 -0.5 -32.5z" />
+<glyph unicode="&#xe183;" d="M0 50v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5t30 -27.5t12 -24l1 -10v-50l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-20 0 -35 14.5t-15 35.5zM0 712 q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40 t-53.5 -36.5t-31 -27.5l-9 -10v-200z" />
+<glyph unicode="&#xe184;" d="M100 0v100h1100v-100h-1100zM175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250z" />
+<glyph unicode="&#xe185;" d="M100 0h300v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400zM500 0v1000q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300zM900 0v700q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300z" />
+<glyph unicode="&#xe186;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
+<glyph unicode="&#xe187;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h100v200h100v-200h100v500h-100v-200h-100v200h-100v-500zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
+<glyph unicode="&#xe188;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v100h-200v300h200v100h-300v-500zM600 300h300v100h-200v300h200v100h-300v-500z" />
+<glyph unicode="&#xe189;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 550l300 -150v300zM600 400l300 150l-300 150v-300z" />
+<glyph unicode="&#xe190;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300v500h700v-500h-700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM575 549 q0 -65 27 -107t68 -42h130v300h-130q-38 0 -66.5 -43t-28.5 -108z" />
+<glyph unicode="&#xe191;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
+<glyph unicode="&#xe192;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v400h-200v100h-100v-500zM301 400v200h100v-200h-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
+<glyph unicode="&#xe193;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 700v100h300v-300h-99v-100h-100v100h99v200h-200zM201 300v100h100v-100h-100zM601 300v100h100v-100h-100z M700 700v100h200v-500h-100v400h-100z" />
+<glyph unicode="&#xe194;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 500v200 l100 100h300v-100h-300v-200h300v-100h-300z" />
+<glyph unicode="&#xe195;" d="M0 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 400v400h300 l100 -100v-100h-100v100h-200v-100h200v-100h-200v-100h-100zM700 400v100h100v-100h-100z" />
+<glyph unicode="&#xe197;" d="M-14 494q0 -80 56.5 -137t135.5 -57h222v300h400v-300h128q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200h200v300h200v-300h200 l-300 -300z" />
+<glyph unicode="&#xe198;" d="M-14 494q0 -80 56.5 -137t135.5 -57h8l414 414l403 -403q94 26 154.5 104.5t60.5 178.5q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200l300 300 l300 -300h-200v-300h-200v300h-200z" />
+<glyph unicode="&#xe199;" d="M100 200h400v-155l-75 -45h350l-75 45v155h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170z" />
+<glyph unicode="&#xe200;" d="M121 700q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350l-75 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5 t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -11.5t1 -11.5q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5z" />
+</font>
+</defs></svg> 
\ No newline at end of file
diff --git a/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.ttf b/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.ttf
new file mode 100644 (file)
index 0000000..67fa00b
Binary files /dev/null and b/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.ttf differ
diff --git a/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff b/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff
new file mode 100644 (file)
index 0000000..8c54182
Binary files /dev/null and b/share/nitdoc/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff differ
diff --git a/share/nitdoc/vendors/bootstrap/js/bootstrap.min.js b/share/nitdoc/vendors/bootstrap/js/bootstrap.min.js
new file mode 100644 (file)
index 0000000..850ba56
--- /dev/null
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.1.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
++function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed.bs.alert").remove()}var c=a(this),d=c.attr("data-target");d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));var e=a(d);b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close.bs.alert"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.one(a.support.transition.end,f).emulateTransitionEnd(150):f()};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){b=="loadingText"?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");c.prop("type")=="radio"&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f=typeof c=="object"&&c;e||d.data("bs.button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();if(b>this.$items.length-1||b<0)return;return this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){if(this.sliding)return;return this.slide("next")},b.prototype.prev=function(){if(this.sliding)return;return this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});this.$element.trigger(j);if(j.isDefaultPrevented())return;return this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(d.css("transition-duration").slice(0,-1)*1e3)):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),typeof c=="object"&&c),g=typeof c=="string"?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),typeof c=="number"?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),c.data()),g=c.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=c.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){function e(d){a(b).remove(),a(c).each(function(){var b=f(a(this)),c={relatedTarget:this};if(!b.hasClass("open"))return;b.trigger(d=a.Event("hide.bs.dropdown",c));if(d.isDefaultPrevented())return;b.removeClass("open").trigger("hidden.bs.dropdown",c)})}function f(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}"use strict";var b=".dropdown-backdrop",c="[data-toggle=dropdown]",d=function(b){a(b).on("click.bs.dropdown",this.toggle)};d.prototype.toggle=function(b){var c=a(this);if(c.is(".disabled, :disabled"))return;var d=f(c),g=d.hasClass("open");e();if(!g){"ontouchstart"in document.documentElement&&!d.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",e);var h={relatedTarget:this};d.trigger(b=a.Event("show.bs.dropdown",h));if(b.isDefaultPrevented())return;d.toggleClass("open").trigger("shown.bs.dropdown",h),c.focus()}return!1},d.prototype.keydown=function(b){if(!/(38|40|27)/.test(b.keyCode))return;var d=a(this);b.preventDefault(),b.stopPropagation();if(d.is(".disabled, :disabled"))return;var e=f(d),g=e.hasClass("open");if(!g||g&&b.keyCode==27)return b.which==27&&e.find(c).focus(),d.click();var h=" li:not(.divider):visible a",i=e.find("[role=menu]"+h+", [role=listbox]"+h);if(!i.length)return;var j=i.index(i.filter(":focus"));b.keyCode==38&&j>0&&j--,b.keyCode==40&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),e=c.data("bs.dropdown");e||c.data("bs.dropdown",e=new d(this)),typeof b=="string"&&e[b].call(c)})},a.fn.dropdown.Constructor=d,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",c,d.prototype.toggle).on("keydown.bs.dropdown.data-api",c+", [role=menu], [role=listbox]",d.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d);if(this.isShown||d.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)})},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]!==a.target&&!this.$element.has(a.target).length&&this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){a.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){if(a.target!==a.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),typeof c=="object"&&c);f||e.data("bs.modal",f=new b(this,g)),typeof c=="string"?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);var e=this.options.trigger.split(" ");for(var f=e.length;f--;){var g=e[f];if(g=="click")this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if(g!="manual"){var h=g=="hover"?"mouseenter":"focusin",i=g=="hover"?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="in";if(!c.options.delay||!c.options.delay.show)return c.show();c.timeout=setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="out";if(!c.options.delay||!c.options.delay.hide)return c.hide();c.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e=typeof this.options.placement=="function"?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n=this.options.container=="body"?window.innerWidth:k.outerWidth(),o=this.options.container=="body"?window.innerHeight:k.outerHeight(),p=this.options.container=="body"?0:k.offset().left;e=e=="bottom"&&h.top+h.height+j-m>o?"top":e=="top"&&h.top-m-j<0?"bottom":e=="right"&&h.right+i>n?"left":e=="left"&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;c=="top"&&k!=g&&(d=!0,b.top=b.top+g-k);if(/bottom|top/.test(c)){var l=0;b.left<0&&(l=b.left*-2,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function e(){b.hoverState!="in"&&c.detach(),b.$element.trigger("hidden.bs."+b.type)}var b=this,c=this.tip(),d=a.Event("hide.bs."+this.type);this.$element.trigger(d);if(d.isDefaultPrevented())return;return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?c.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),this.hoverState=null,this},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return a=="bottom"?{top:b.top+b.height,left:b.left+b.width/2-c/2}:a=="top"?{top:b.top-d,left:b.left+b.width/2-c/2}:a=="left"?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f=typeof c=="object"&&c;if(!e&&c=="destroy")return;e||d.data("bs.tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?typeof c=="string"?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||(typeof b.content=="function"?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f=typeof c=="object"&&c;if(!e&&c=="destroy")return;e||d.data("bs.popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});b.trigger(f);if(f.isDefaultPrevented())return;var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})},b.prototype.activate=function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g).emulateTransitionEnd(150):g(),e.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;this.affixed=="top"&&(e.top+=d),typeof f!="object"&&(h=g=f),typeof g=="function"&&(g=f.top(this.$element)),typeof h=="function"&&(h=f.bottom(this.$element));var i=this.unpin!=null&&d+this.unpin<=e.top?!1:h!=null&&e.top+this.$element.height()>=c-h?"bottom":g!=null&&d<=g?"top":!1;if(this.affixed===i)return;this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k);if(k.isDefaultPrevented())return;this.affixed=i,this.unpin=i=="bottom"?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),i=="bottom"&&this.$element.offset({top:c-h-this.$element.height()})};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f=typeof c=="object"&&c;e||d.data("bs.affix",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in"))return;var b=a.Event("show.bs.collapse");this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])},b.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in"))return;var b=a.Event("hide.bs.collapse");this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!a.support.transition)return d.call(this);this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350)},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),typeof c=="object"&&c);!e&&f.toggle&&c=="show"&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":c.data(),i=c.attr("data-parent"),j=i&&a(i);if(!g||!g.transitioning)j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(c).addClass("collapsed"),c[f.hasClass("in")?"addClass":"removeClass"]("collapsed");f.collapse(h)})}(jQuery),+function(a){function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}"use strict",b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this,d=this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,c=b-this.$scrollElement.height(),d=this.offsets,e=this.targets,f=this.activeTarget,g;if(a>=c)return f!=(g=e.last()[0])&&this.activate(g);if(f&&a<=d[0])return f!=(g=e[0])&&this.activate(g);for(g=d.length;g--;)f!=e[g]&&a>=d[g]&&(!d[g+1]||a<=d[g+1])&&this.activate(e[g])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f=typeof c=="object"&&c;e||d.data("bs.scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(a.style[c]!==undefined)return{end:b[c]};return!1}"use strict",a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery)
\ No newline at end of file
diff --git a/share/nitdoc/vendors/jquery/jquery-1.11.1.min.js b/share/nitdoc/vendors/jquery/jquery-1.11.1.min.js
new file mode 100644 (file)
index 0000000..ab28a24
--- /dev/null
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
+if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={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:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
+},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.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(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,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":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/share/nitdoc/vendors/jquery/jquery-ui-1.10.4.custom.min.js b/share/nitdoc/vendors/jquery/jquery-ui-1.10.4.custom.min.js
new file mode 100644 (file)
index 0000000..3bf623d
--- /dev/null
@@ -0,0 +1,6 @@
+/*! jQuery UI - v1.10.4 - 2014-05-17
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js
+* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
+
+(function(t,e){function n(e,n){var r,s,o,a=e.nodeName.toLowerCase();return"area"===a?(r=e.parentNode,s=r.name,e.href&&s&&"map"===r.nodeName.toLowerCase()?(o=t("img[usemap=#"+s+"]")[0],!!o&&i(o)):!1):(/input|select|textarea|button|object/.test(a)?!e.disabled:"a"===a?e.href||n:n)&&i(e)}function i(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var r=0,s=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(n,i){return"number"==typeof n?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),i&&i.call(e)},n)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(n){if(n!==e)return this.css("zIndex",n);if(this.length)for(var i,r,s=t(this[0]);s.length&&s[0]!==document;){if(i=s.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(r=parseInt(s.css("zIndex"),10),!isNaN(r)&&0!==r))return r;s=s.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++r)})},removeUniqueId:function(){return this.each(function(){s.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,i){return!!t.data(e,i[3])},focusable:function(e){return n(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var i=t.attr(e,"tabindex"),r=isNaN(i);return(r||i>=0)&&n(e,!r)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(n,i){function r(e,n,i,r){return t.each(s,function(){n-=parseFloat(t.css(e,"padding"+this))||0,i&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),r&&(n-=parseFloat(t.css(e,"margin"+this))||0)}),n}var s="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(n){return n===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,r(this,n)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,r(this,e,!0,n)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(n){return arguments.length?e.call(this,t.camelCase(n)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,n,i){var r,s=t.ui[e].prototype;for(r in i)s.plugins[r]=s.plugins[r]||[],s.plugins[r].push([n,i[r]])},call:function(t,e,n){var i,r=t.plugins[e];if(r&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(i=0;r.length>i;i++)t.options[r[i][0]]&&r[i][1].apply(t.element,n)}},hasScroll:function(e,n){if("hidden"===t(e).css("overflow"))return!1;var i=n&&"left"===n?"scrollLeft":"scrollTop",r=!1;return e[i]>0?!0:(e[i]=1,r=e[i]>0,e[i]=0,r)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,r,h,a,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},r=t[c][i],h=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new h(t,i)},t.extend(h,r,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new s,a.options=t.widget.extend({},a.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),h.prototype=t.widget.extend(a,{widgetEventPrefix:r?a.widgetEventPrefix||i:i},l,{constructor:h,namespace:c,widgetName:i,widgetFullName:o}),r?(t.each(r._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,h,i._proto)}),delete r._childConstructors):s._childConstructors.push(h),t.widget.bridge(i,h)},t.widget.extend=function(i){for(var n,o,r=s.call(arguments,1),h=0,a=r.length;a>h;h++)for(n in r[h])o=r[h][n],r[h].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(r){var h="string"==typeof r,a=s.call(arguments,1),l=this;return r=!h&&a.length?t.widget.extend.apply(null,[r].concat(a)):r,h?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,a),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(r||{})._init():t.data(this,o,new n(r,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,r,h=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(h={},n=i.split("."),i=n.shift(),n.length){for(o=h[i]=t.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)o[n[r]]=o[n[r]]||{},o=o[n[r]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];h[i]=s}return this._setOptions(h),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,h){function a(){return i||r.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof h?r[h]:h).apply(r,arguments):e}"string"!=typeof h&&(a.guid=h.guid=h.guid||a.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+r.eventNamespace,u=l[2];u?o.delegate(u,c,a):s.bind(c,a)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,r=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var r,h=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),r=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),r&&t.effects&&t.effects.effect[h]?s[e](n):h!==e&&s[h]?s[h](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){return!0===e.data(n.target,t.widgetName+".preventClickEvent")?(e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var i=this,s=1===n.which,o="string"==typeof this.options.cancel&&n.target.nodeName?e(n.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(n)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=this._mouseStart(n)!==!1,!this._mouseStarted)?(n.preventDefault(),!0):(!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,s,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),k=(e.collision||"flip").split(" "),D={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),D[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(D.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),x=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")+w.height,I=t.extend({},v),P=i(D.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-=d:"center"===e.my[1]&&(I.top-=d/2),I.left+=P[0],I.top+=P[1],t.support.offsetFractions||(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[k[i]]&&t.ui.position[k[i]][s](I,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:x,collisionHeight:C,offset:[o[0]+P[0],o[1]+P[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>o?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>g&&g>r(n+o)&&(h.vertical="middle"),h.important=a(r(i),r(s))>a(r(n),r(o))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?h>0&&0>=l?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+o-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?h>0&&0>=l?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+o-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-a-o,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-a-o,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)e.style[o]=s[o];e.appendChild(r),i=a||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);
\ No newline at end of file
index c671e87..7257c3f 100644 (file)
@@ -278,13 +278,13 @@ private class PTokenVisitor
                else
                        p = last_token.common_parent(n)
                end
-               assert p isa Prod
-
-               # And apply it to detached tokens between `last_token` and `n`
-               var c = n.prev_token
-               while c != null and c.parent == null do
-                       c.parent = p
-                       c = c.prev_token
+               if p isa Prod then
+                       # And apply it to detached tokens between `last_token` and `n`
+                       var c = n.prev_token
+                       while c != null and c.parent == null do
+                               c.parent = p
+                               c = c.prev_token
+                       end
                end
 
                self.last_token = n
index c1ca4fb..697f86b 100644 (file)
@@ -647,13 +647,12 @@ class Debugger
 
                        var keys = map_of_instances.iterator
 
-                       print "Variables collection : \n"
+                       var self_var = seek_variable("self", frame)
+                       print "self: {self_var.to_s}"
 
                        for instance in map_of_instances.keys do
-                               print "Variable {instance.to_s}, Instance {map_of_instances[instance].to_s}"
+                               print "{instance.to_s}: {map_of_instances[instance].to_s}"
                        end
-
-                       print "\nEnd of current instruction \n"
                else if parts_of_command[1] == "stack" then
                        print self.stack_trace
                else if parts_of_command[1].chars.has('[') and parts_of_command[1].chars.has(']') then
@@ -992,20 +991,18 @@ class Debugger
        # If it is a primitive type, its value is directly printed
        fun print_instance(instance: Instance)
        do
-               print "Printing innards of a variable"
-
                if instance isa MutableInstance then
-                       var attributes = instance.attributes
-                       print "Object : {instance}"
+                       print "\{"
+                       print "\ttype : {instance},"
 
-                       for current_attribute in attributes.keys do
-                               print "Attribute : {current_attribute.to_s} \nValeur : {attributes[current_attribute].to_s}"
-                       end
+                       printn("\t")
+
+                       print instance.attributes.join(",\n\t"," : ")
+
+                       print "\}"
                else
-                       print "Found variable {instance}"
+                       print "{instance}"
                end
-
-               print "Stopping printing innards of a variable"
        end
 
        # Prints the attributes demanded in a SequenceRead
diff --git a/src/doc/doc.nit b/src/doc/doc.nit
new file mode 100644 (file)
index 0000000..19443b4
--- /dev/null
@@ -0,0 +1,19 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Nitdoc page generation
+module doc
+
+import doc_pages
+
diff --git a/src/doc/doc_model.nit b/src/doc/doc_model.nit
new file mode 100644 (file)
index 0000000..2efa7c4
--- /dev/null
@@ -0,0 +1,565 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Nitdoc model template parts generation
+module doc_model
+
+import model_utils
+import modelize_property
+import markdown
+import doc_templates
+
+redef class MDoc
+       # Comment synopsys HTML escaped
+       fun short_comment: String do return content.first.html_escape
+
+       # Full comment HTML escaped
+       fun full_comment: String do return content.join("\n").html_escape
+
+       # Synopsys in a template
+       fun tpl_short_comment: Streamable do return short_markdown
+
+       # Full comment in a template
+       fun tpl_comment: Streamable do return full_markdown
+end
+
+redef class Location
+       # Github url based on this location
+       fun github(gitdir: String): String do
+               var base_dir = getcwd.join_path(gitdir).simplify_path
+               var file_loc = getcwd.join_path(file.filename).simplify_path
+               var gith_loc = file_loc.substring(base_dir.length + 1, file_loc.length)
+               return "{gith_loc}:{line_start},{column_start}--{line_end},{column_end}"
+       end
+end
+
+redef class MEntity
+       # HTML Escaped name
+       fun nitdoc_name: String is abstract
+
+       # HTML anchor to this entity in a nitdoc page
+       fun nitdoc_anchor: String is abstract
+
+       # URL of this entity Nitdoc page
+       fun nitdoc_url: String is abstract
+
+       # A template link to the mentity `nitdoc_anchor`
+       fun tpl_anchor: TplLink is abstract
+
+       # A template link to the mentity `nitdoc_url`
+       fun tpl_link: TplLink is abstract
+
+       # A template signature that contains modifiers and parameters
+       fun tpl_declaration: Template is abstract
+
+       # A template namespace
+       fun tpl_namespace: Template is abstract
+
+       # A template definition of the mentity
+       # include name, sysnopsys, comment and namespace
+       fun tpl_definition: TplDefinition is abstract
+end
+
+redef class MProject
+       fun nitdoc_mdoc: nullable MDoc do
+               if mdoc != null then return mdoc
+               if root == null then return null
+               if root.mdoc != null then return root.mdoc
+               if not root.mmodules.is_empty then return root.mmodules.first.mdoc
+               return null
+       end
+
+       redef fun nitdoc_name do return name.html_escape
+       redef fun nitdoc_anchor do return "PRJ_{nitdoc_name}"
+
+       redef fun nitdoc_url do
+               if root != null and not root.mmodules.is_empty then return root.mmodules.first.nitdoc_url
+               return "project_{name}.html"
+       end
+
+       redef fun tpl_anchor do
+               var tpl = new TplLink("#{nitdoc_anchor}", nitdoc_name)
+               var mdoc = nitdoc_mdoc
+               if mdoc != null then
+                       tpl.title = mdoc.short_comment
+               end
+               return tpl
+       end
+
+       redef fun tpl_link do
+               var tpl = new TplLink(nitdoc_url, nitdoc_name)
+               var mdoc = nitdoc_mdoc
+               if mdoc != null then
+                       tpl.title = mdoc.short_comment
+               end
+               return tpl
+       end
+
+       redef fun tpl_declaration do
+               var tpl = new Template
+               tpl.add "<span>project "
+               tpl.add tpl_link
+               tpl.add "</span>"
+               return tpl
+       end
+
+       redef fun tpl_namespace do return tpl_link
+
+       redef fun tpl_definition do
+               var tpl = new TplDefinition
+               tpl.namespace = tpl_namespace
+               var mdoc = nitdoc_mdoc
+               if mdoc != null then
+                       tpl.comment = mdoc.tpl_comment
+               end
+               return tpl
+       end
+
+       fun tpl_article: TplArticle do
+               var article = new TplArticle.with_title(nitdoc_anchor, tpl_link)
+               article.title_classes.add "signature"
+               article.subtitle = tpl_declaration
+               article.summary_title = nitdoc_name
+               article.content = tpl_definition
+               return article
+       end
+end
+
+redef class MGroup
+       redef fun tpl_link do return mmodules.first.tpl_link
+
+       redef fun tpl_namespace do
+               if mproject == null then return tpl_link
+               if mproject.root != self then
+                       var tpl = new Template
+                       tpl.add mproject.tpl_namespace
+                       tpl.add "::"
+                       tpl.add self.tpl_link
+                       return tpl
+               else
+                       return mproject.tpl_namespace
+               end
+       end
+end
+
+redef class MModule
+       # Is the mmodule created by nitdoc for internal purpose?
+       var is_fictive: Bool writable = false
+
+       # Full namespace of this module
+       fun full_namespace: String do
+               if public_owner != null then
+                       return "{public_owner.nitdoc_name}::{nitdoc_name}"
+               end
+               return nitdoc_name
+       end
+
+       redef fun nitdoc_name do return name.html_escape
+
+       redef fun nitdoc_url do
+               var res = new FlatBuffer
+               res.append("module_")
+               var mowner = public_owner
+               if mowner != null then
+                       res.append("{public_owner.name}_")
+               end
+               res.append("{self.name}.html")
+               return res.to_s
+       end
+
+       redef fun nitdoc_anchor: String do
+               var res = new FlatBuffer
+               res.append("MOD_")
+               var mowner = public_owner
+               if mowner != null then
+                       res.append("{public_owner.nitdoc_name}_")
+               end
+               res.append(nitdoc_name)
+               return res.to_s
+       end
+
+       redef fun tpl_anchor do
+               var tpl = new TplLink("#{nitdoc_anchor}", nitdoc_name)
+               if mdoc != null then
+                       tpl.title = mdoc.short_comment
+               end
+               return tpl
+       end
+
+       redef fun tpl_link do
+               var tpl = new TplLink(nitdoc_url, nitdoc_name)
+               if mdoc != null then
+                       tpl.title = mdoc.short_comment
+               end
+               return tpl
+       end
+
+       redef fun tpl_declaration do
+               var tpl = new Template
+               tpl.add "<span>module "
+               tpl.add tpl_namespace
+               tpl.add "</span>"
+               return tpl
+       end
+
+       redef fun tpl_namespace do
+               var tpl = new Template
+               if mgroup != null and mgroup.mmodules.first != self then
+                       tpl.add mgroup.tpl_namespace
+                       tpl.add "::"
+               end
+               tpl.add "<span>"
+               tpl.add tpl_link
+               tpl.add "</span>"
+               return tpl
+       end
+
+       redef fun tpl_definition do
+               var tpl = new TplDefinition
+               tpl.namespace = tpl_namespace
+               if mdoc != null then
+                       tpl.comment = mdoc.tpl_comment
+               end
+               return tpl
+       end
+
+       fun tpl_article: TplArticle do
+               var article = new TplArticle.with_title(nitdoc_anchor, tpl_link)
+               article.title_classes.add "signature"
+               article.subtitle = tpl_declaration
+               article.summary_title = nitdoc_name
+               article.content = tpl_definition
+               return article
+       end
+
+       fun tpl_list_item: TplListItem do
+               var lnk = new Template
+               lnk.add tpl_link
+               if mdoc != null then
+                       lnk.add ": "
+                       lnk.add mdoc.short_comment
+               end
+               return new TplListItem.with_content(lnk)
+       end
+end
+
+redef class MClass
+       redef fun nitdoc_name do return name.html_escape
+       redef fun nitdoc_url do return "class_{public_owner}_{name}.html"
+       redef fun nitdoc_anchor do return "CLASS_{public_owner.nitdoc_name}_{nitdoc_name}"
+
+       redef fun tpl_anchor do
+               var tpl = new TplLink("#{nitdoc_anchor}", nitdoc_name)
+               if intro.mdoc != null then
+                       tpl.title = intro.mdoc.short_comment
+               end
+               return tpl
+       end
+
+       redef fun tpl_link do
+               var tpl = new TplLink(nitdoc_url, nitdoc_name)
+               if intro.mdoc != null then
+                       tpl.title = intro.mdoc.short_comment
+               end
+               return tpl
+       end
+
+       redef fun tpl_declaration do return intro.tpl_declaration
+
+       redef fun tpl_namespace do
+               var tpl = new Template
+               tpl.add intro_mmodule.tpl_namespace
+               tpl.add "::<span>"
+               tpl.add tpl_link
+               tpl.add "</span>"
+               return tpl
+       end
+
+       fun tpl_list_item: TplListItem do
+               var lnk = new Template
+               lnk.add tpl_link
+               if intro.mdoc != null then
+                       lnk.add ": "
+                       lnk.add intro.mdoc.short_comment
+               end
+               return new TplListItem.with_content(lnk)
+       end
+
+       fun tpl_signature: Template do
+               var tpl = new Template
+               if arity > 0 then
+                       tpl.add "["
+                       tpl.add intro.parameter_names.join(", ")
+                       tpl.add "]"
+               end
+               return tpl
+       end
+end
+
+redef class MClassDef
+       redef fun nitdoc_name do return mclass.nitdoc_name
+
+       redef fun tpl_link do return mclass.tpl_link
+
+       redef fun tpl_namespace do
+               var tpl = new Template
+               tpl.add mmodule.tpl_namespace
+               tpl.add "::<span>"
+               tpl.add mclass.tpl_link
+               tpl.add "</span>"
+               return tpl
+       end
+
+       redef fun tpl_declaration do
+               var tpl = new Template
+               tpl.add tpl_modifiers
+               tpl.add tpl_link
+               tpl.add tpl_signature
+               return tpl
+       end
+
+       fun tpl_signature: Template do
+               var tpl = new Template
+               if not parameter_names.is_empty then
+                       tpl.add "["
+                       for i in [0..parameter_names.length[ do
+                               tpl.add "{parameter_names[i]}: "
+                               tpl.add bound_mtype.arguments[i].tpl_signature
+                               if i < parameter_names.length - 1 then tpl.add ", "
+                       end
+                       tpl.add "]"
+               end
+               return tpl
+       end
+
+       redef fun tpl_definition do
+               var tpl = new TplClassDefinition
+               tpl.namespace = tpl_namespace
+               if mdoc != null then
+                       tpl.comment = mdoc.tpl_comment
+               end
+               return tpl
+       end
+
+       fun tpl_css_classes: Set[String] do
+               var set = new HashSet[String]
+               if is_intro then set.add "intro"
+               set.add_all mclass.intro.modifiers
+               set.add_all modifiers
+               return set
+       end
+
+       fun tpl_modifiers: Template do
+               var tpl = new Template
+               for modifier in modifiers do
+                       if modifier == "public" then continue
+                       tpl.add "{modifier} "
+               end
+               return tpl
+       end
+end
+
+redef class MProperty
+       redef fun nitdoc_name do return name.html_escape
+
+       redef fun tpl_namespace do
+               var tpl = new Template
+               tpl.add intro_mclassdef.mclass.tpl_namespace
+               tpl.add "::<span>"
+               tpl.add intro.tpl_link
+               tpl.add "</span>"
+               return tpl
+       end
+
+       redef fun tpl_declaration do return intro.tpl_declaration
+
+       fun tpl_signature: Template do return new Template
+end
+
+redef class MPropDef
+       redef fun nitdoc_url do return "{mclassdef.mclass.nitdoc_url}#{nitdoc_anchor}"
+
+       redef fun nitdoc_anchor do
+               return "PROP_{mclassdef.mclass.public_owner.nitdoc_name}_{mproperty.name.to_cmangle}"
+       end
+
+       redef fun tpl_anchor do
+               var tpl = new TplLink("#{nitdoc_anchor}", mproperty.nitdoc_name)
+               if mproperty.intro.mdoc != null then
+                       tpl.title = mproperty.intro.mdoc.short_comment
+               end
+               return tpl
+       end
+
+       redef fun tpl_link do
+               var tpl = new TplLink(nitdoc_url, mproperty.nitdoc_name)
+               if mproperty.intro.mdoc != null then
+                       tpl.title = mproperty.intro.mdoc.short_comment
+               end
+               return tpl
+       end
+
+       redef fun tpl_namespace do
+               var tpl = new Template
+               tpl.add mclassdef.tpl_namespace
+               tpl.add "::"
+               tpl.add mproperty.name
+               return tpl
+       end
+
+       redef fun tpl_definition do
+               var tpl = new TplDefinition
+               tpl.namespace = mclassdef.tpl_namespace
+               if mdoc != null then
+                       tpl.comment = mdoc.tpl_comment
+               end
+               return tpl
+       end
+
+       redef fun tpl_declaration do
+               var tpl = new Template
+               tpl.add tpl_modifiers
+               tpl.add tpl_link
+               tpl.add tpl_signature
+               return tpl
+       end
+
+       fun tpl_css_classes: Set[String] do
+               var set = new HashSet[String]
+               if is_intro then set.add "intro"
+               set.add_all mproperty.intro.modifiers
+               set.add_all modifiers
+               return set
+       end
+
+       fun tpl_modifiers: Template do
+               var tpl = new Template
+               for modifier in modifiers do
+                       if modifier == "public" then continue
+                       tpl.add "{modifier} "
+               end
+               return tpl
+       end
+
+       fun tpl_signature: Template do return new Template
+end
+
+redef class MMethod
+       redef fun tpl_signature do
+               var tpl = new Template
+               var params = new Array[String]
+               for param in intro.msignature.mparameters do
+                       params.add param.name
+               end
+               if not params.is_empty then
+                       tpl.add "("
+                       tpl.add params.join(", ")
+                       tpl.add ")"
+               end
+               return tpl
+       end
+end
+
+redef class MMethodDef
+       redef fun tpl_signature do return msignature.tpl_signature
+end
+
+redef class MVirtualTypeProp
+       redef fun tpl_link do return mvirtualtype.tpl_link
+       redef fun tpl_signature do return tpl_link
+end
+
+redef class MVirtualTypeDef
+       redef fun tpl_signature do
+               var tpl = new Template
+               tpl.add ": "
+               tpl.add bound.tpl_signature
+               return tpl
+       end
+end
+
+redef class MType
+       fun tpl_signature: Template is abstract
+end
+
+redef class MClassType
+       redef fun tpl_link do return mclass.tpl_link
+       redef fun tpl_signature do return tpl_link
+end
+
+redef class MNullableType
+       redef fun tpl_signature do
+               var tpl = new Template
+               tpl.add "nullable "
+               tpl.add mtype.tpl_signature
+               return tpl
+       end
+end
+
+redef class MGenericType
+       redef fun tpl_signature do
+               var tpl = new Template
+               tpl.add tpl_link
+               tpl.add "["
+               for i in [0..arguments.length[ do
+                       tpl.add arguments[i].tpl_signature
+                       if i < arguments.length - 1 then tpl.add ", "
+               end
+               tpl.add "]"
+               return tpl
+       end
+end
+
+redef class MParameterType
+       redef fun tpl_link do
+               var name = mclass.intro.parameter_names[rank]
+               return new TplLink.with_title("{mclass.nitdoc_url}#FT_{name}", name, "formal type")
+       end
+       redef fun tpl_signature do return tpl_link
+end
+
+redef class MVirtualType
+       redef fun tpl_link do return mproperty.intro.tpl_link
+       redef fun tpl_signature do return tpl_link
+end
+
+redef class MSignature
+       redef fun tpl_signature do
+               var tpl = new Template
+               if not mparameters.is_empty then
+                       tpl.add "("
+                       for i in [0..mparameters.length[ do
+                               tpl.add mparameters[i].tpl_signature
+                               if i < mparameters.length - 1 then tpl.add ", "
+                       end
+                       tpl.add ")"
+               end
+               if return_mtype != null then
+                       tpl.add ": "
+                       tpl.add return_mtype.tpl_signature
+               end
+               return tpl
+       end
+end
+
+redef class MParameter
+       fun tpl_signature: Template do
+               var tpl = new Template
+               tpl.add "{name}: "
+               tpl.add mtype.tpl_signature
+               if is_vararg then tpl.add "..."
+               return tpl
+       end
+end
+
diff --git a/src/doc/doc_pages.nit b/src/doc/doc_pages.nit
new file mode 100644 (file)
index 0000000..e41cae2
--- /dev/null
@@ -0,0 +1,1143 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Nitdoc page generation
+module doc_pages
+
+import doc_model
+
+# The NitdocContext contains all the knowledge used for doc generation
+class NitdocContext
+       private var opt_dir = new OptionString("output directory", "-d", "--dir")
+       private var opt_source = new OptionString("link for source (%f for filename, %l for first line, %L for last line)", "--source")
+       private var opt_sharedir = new OptionString("directory containing nitdoc assets", "--sharedir")
+       private var opt_shareurl = new OptionString("use shareurl instead of copy shared files", "--shareurl")
+       private var opt_nodot = new OptionBool("do not generate graphes with graphviz", "--no-dot")
+       private var opt_private = new OptionBool("also generate private API", "--private")
+
+       private var opt_custom_title = new OptionString("custom title for homepage", "--custom-title")
+       private var opt_custom_menu = new OptionString("custom items added in top menu (each item must be enclosed in 'li' tags)", "--custom-menu-items")
+       private var opt_custom_intro = new OptionString("custom intro text for homepage", "--custom-overview-text")
+       private var opt_custom_footer = new OptionString("custom footer text", "--custom-footer-text")
+
+       private var opt_github_upstream = new OptionString("Git branch where edited commits will be pulled into (ex: user:repo:branch)", "--github-upstream")
+       private var opt_github_base_sha1 = new OptionString("Git sha1 of base commit used to create pull request", "--github-base-sha1")
+       private var opt_github_gitdir = new OptionString("Git working directory used to resolve path name (ex: /home/me/myproject/)", "--github-gitdir")
+
+       private var opt_piwik_tracker = new OptionString("Piwik tracker URL (ex: nitlanguage.org/piwik/)", "--piwik-tracker")
+       private var opt_piwik_site_id = new OptionString("Piwik site ID", "--piwik-site-id")
+
+       private var toolcontext = new ToolContext
+       private var mbuilder: ModelBuilder
+       private var mainmodule: MModule
+       private var output_dir: String
+       private var min_visibility: MVisibility
+
+       init do
+               var opts = toolcontext.option_context
+               opts.add_option(opt_dir, opt_source, opt_sharedir, opt_shareurl, opt_nodot, opt_private)
+               opts.add_option(opt_custom_title, opt_custom_footer, opt_custom_intro, opt_custom_menu)
+               opts.add_option(opt_github_upstream, opt_github_base_sha1, opt_github_gitdir)
+               opts.add_option(opt_piwik_tracker, opt_piwik_site_id)
+
+               var tpl = new Template
+               tpl.add "Usage: nitdoc [OPTION]... <file.nit>...\n"
+               tpl.add "Generates HTML pages of API documentation from Nit source files."
+               toolcontext.tooldescription = tpl.write_to_string
+               toolcontext.process_options(args)
+
+               self.process_options
+               self.parse(toolcontext.option_context.rest)
+       end
+
+       private fun process_options do
+               if opt_private.value then
+                       min_visibility = none_visibility
+               else
+                       min_visibility = protected_visibility
+               end
+               var gh_upstream = opt_github_upstream.value
+               var gh_base_sha = opt_github_base_sha1.value
+               var gh_gitdir = opt_github_gitdir.value
+               if not gh_upstream == null or not gh_base_sha == null or not gh_gitdir == null then
+                       if gh_upstream == null or gh_base_sha == null or gh_gitdir == null then
+                               print "Error: Options {opt_github_upstream.names.first}, {opt_github_base_sha1.names.first} and {opt_github_gitdir.names.first} are required to enable the GitHub plugin"
+                               abort
+                       end
+               end
+       end
+
+       private fun parse(arguments: Array[String]) do
+               var model = new Model
+               mbuilder = new ModelBuilder(model, toolcontext)
+               var mmodules = mbuilder.parse(arguments)
+               if mmodules.is_empty then return
+               mbuilder.run_phases
+               if mmodules.length == 1 then
+                       mainmodule = mmodules.first
+               else
+                       mainmodule = new MModule(model, null, "<main>", new Location(null, 0, 0, 0, 0))
+                       mainmodule.is_fictive = true
+                       mainmodule.set_imported_mmodules(mmodules)
+               end
+       end
+
+       fun generate_nitdoc do
+               init_output_dir
+               overview
+               search
+               modules
+               classes
+               quicksearch_list
+       end
+
+       private fun init_output_dir do
+               # location output dir
+               var output_dir = opt_dir.value
+               if output_dir == null then
+                       output_dir = "doc"
+               end
+               self.output_dir = output_dir
+               # create destination dir if it's necessary
+               if not output_dir.file_exists then output_dir.mkdir
+               # locate share dir
+               var sharedir = opt_sharedir.value
+               if sharedir == null then
+                       var dir = toolcontext.nit_dir
+                       if dir == null then
+                               print "Error: Cannot locate nitdoc share files. Uses --sharedir or envvar NIT_DIR"
+                               abort
+                       end
+                       sharedir = "{dir}/share/nitdoc"
+                       if not sharedir.file_exists then
+                               print "Error: Cannot locate nitdoc share files. Uses --sharedir or envvar NIT_DIR"
+                               abort
+                       end
+               end
+               # copy shared files
+               if opt_shareurl.value == null then
+                       sys.system("cp -r {sharedir.to_s}/* {output_dir.to_s}/")
+               else
+                       sys.system("cp -r {sharedir.to_s}/resources/ {output_dir.to_s}/resources/")
+               end
+
+       end
+
+       private fun overview do
+               var overviewpage = new NitdocOverview(self)
+               overviewpage.render.write_to_file("{output_dir.to_s}/index.html")
+       end
+
+       private fun search do
+               var searchpage = new NitdocSearch(self)
+               searchpage.render.write_to_file("{output_dir.to_s}/search.html")
+       end
+
+       private fun modules do
+               for mmodule in mbuilder.model.mmodules do
+                       if mmodule.name == "<main>" then continue
+                       var modulepage = new NitdocModule(mmodule, self)
+                       modulepage.render.write_to_file("{output_dir.to_s}/{mmodule.nitdoc_url}")
+               end
+       end
+
+       private fun classes do
+               for mclass in mbuilder.model.mclasses do
+                       var classpage = new NitdocClass(mclass, self)
+                       classpage.render.write_to_file("{output_dir.to_s}/{mclass.nitdoc_url}")
+               end
+       end
+
+       private fun quicksearch_list do
+               var quicksearch = new QuickSearch(self)
+               quicksearch.render.write_to_file("{output_dir.to_s}/quicksearch-list.js")
+       end
+end
+
+# Nitdoc QuickSearch list generator
+#
+# Create a JSON object containing links to:
+#  * modules
+#  * mclasses
+#  * mpropdefs
+# All entities are grouped by name to make the research easier.
+class QuickSearch
+
+       private var mmodules = new HashSet[MModule]
+       private var mclasses = new HashSet[MClass]
+       private var mpropdefs = new HashMap[String, Set[MPropDef]]
+
+       init(ctx: NitdocContext) do
+               for mmodule in ctx.mbuilder.model.mmodules do
+                       if mmodule.name == "<main>" then continue
+                       mmodules.add mmodule
+               end
+               for mclass in ctx.mbuilder.model.mclasses do
+                       if mclass.visibility < ctx.min_visibility then continue
+                       mclasses.add mclass
+               end
+               for mproperty in ctx.mbuilder.model.mproperties do
+                       if mproperty.visibility < ctx.min_visibility then continue
+                       if mproperty isa MAttribute then continue
+                       if not mpropdefs.has_key(mproperty.name) then
+                               mpropdefs[mproperty.name] = new HashSet[MPropDef]
+                       end
+                       mpropdefs[mproperty.name].add_all(mproperty.mpropdefs)
+               end
+       end
+
+       fun render: Template do
+               var tpl = new Template
+               tpl.add "var nitdocQuickSearchRawList=\{ "
+               for mmodule in mmodules do
+                       tpl.add "\"{mmodule.name}\":["
+                       tpl.add "\{txt:\"{mmodule.full_name}\",url:\"{mmodule.nitdoc_url}\"\},"
+                       tpl.add "],"
+               end
+               for mclass in mclasses do
+                       var full_name = mclass.intro.mmodule.full_name
+                       tpl.add "\"{mclass.name}\":["
+                       tpl.add "\{txt:\"{full_name}\",url:\"{mclass.nitdoc_url}\"\},"
+                       tpl.add "],"
+               end
+               for mproperty, mprops in mpropdefs do
+                       tpl.add "\"{mproperty}\":["
+                       for mpropdef in mprops do
+                               var full_name = mpropdef.mclassdef.mclass.full_name
+                               tpl.add "\{txt:\"{full_name}\",url:\"{mpropdef.nitdoc_url}\"\},"
+                       end
+                       tpl.add "],"
+               end
+               tpl.add " \};"
+               return tpl
+       end
+end
+
+# Nitdoc base page
+# Define page structure and properties
+abstract class NitdocPage
+
+       private var ctx: NitdocContext
+       private var model: Model
+
+       init(ctx: NitdocContext) do
+               self.ctx = ctx
+               self.model = ctx.mbuilder.model
+       end
+
+       # Render the page as a html template
+       fun render: Template do
+               var shareurl = "."
+               if ctx.opt_shareurl.value != null then
+                       shareurl = ctx.opt_shareurl.value.as(not null)
+               end
+
+               # build page
+               var tpl = tpl_page
+               tpl.title = tpl_title
+               tpl.shareurl = shareurl
+               tpl.topmenu = tpl_topmenu
+               tpl_content
+               tpl.footer = ctx.opt_custom_footer.value
+               tpl.body_attrs.add(new TagAttribute("data-bootstrap-share", shareurl))
+               tpl.sidebar = tpl_sidebar
+
+               # piwik tracking
+               var tracker_url = ctx.opt_piwik_tracker.value
+               var site_id = ctx.opt_piwik_site_id.value
+               if tracker_url != null and site_id != null then
+                       tpl.scripts.add new TplPiwikScript(tracker_url, site_id)
+               end
+               return tpl
+       end
+
+       # Build page template
+       fun tpl_page: TplPage is abstract
+
+       # Build page sidebar if any
+       fun tpl_sidebar: nullable TplSidebar do return null
+
+       # Build page title string
+       fun tpl_title: String do
+               if ctx.opt_custom_title.value != null then
+                       return ctx.opt_custom_title.value.to_s
+               end
+               return "Nitdoc"
+       end
+
+       # Build top menu template
+       fun tpl_topmenu: TplTopMenu do
+               var topmenu = new TplTopMenu
+               var custom_elt = ctx.opt_custom_menu.value
+               if custom_elt != null then topmenu.add_raw(custom_elt)
+               return topmenu
+       end
+
+       # Build page content template
+       fun tpl_content is abstract
+
+       # Clickable graphviz image using dot format
+       # return null if no graph for this page
+       fun tpl_graph(dot: FlatBuffer, name: String, title: String): nullable TplArticle do
+               if ctx.opt_nodot.value then return null
+               var output_dir = ctx.output_dir
+               var file = new OFStream.open("{output_dir}/{name}.dot")
+               file.write(dot)
+               file.close
+               sys.system("\{ test -f {output_dir}/{name}.png && test -f {output_dir}/{name}.s.dot && diff {output_dir}/{name}.dot {output_dir}/{name}.s.dot >/dev/null 2>&1 ; \} || \{ cp {output_dir}/{name}.dot {output_dir}/{name}.s.dot && dot -Tpng -o{output_dir}/{name}.png -Tcmapx -o{output_dir}/{name}.map {output_dir}/{name}.s.dot ; \}")
+               var fmap = new IFStream.open("{output_dir}/{name}.map")
+               var map = fmap.read_all
+               fmap.close
+
+               var article = new TplArticle.with_title("graph", title)
+               var content = new Template
+               content.add "<img src='{name}.png' usemap='#{name}' style='margin:auto' alt='{title}'/>"
+               content.add map
+               article.content = content
+               return article
+       end
+
+       # A (source) link template for a given location
+       fun tpl_showsource(location: nullable Location): nullable String
+       do
+               if location == null then return null
+               var source = ctx.opt_source.value
+               if source == null then return "({location.file.filename.simplify_path})"
+               # THIS IS JUST UGLY ! (but there is no replace yet)
+               var x = source.split_with("%f")
+               source = x.join(location.file.filename.simplify_path)
+               x = source.split_with("%l")
+               source = x.join(location.line_start.to_s)
+               x = source.split_with("%L")
+               source = x.join(location.line_end.to_s)
+               source = source.simplify_path
+               return " (<a target='_blank' title='Show source' href=\"{source.to_s}\">source</a>)"
+       end
+
+       # MClassDef description template
+       fun tpl_mclass_article(mclass: MClass, mclassdefs: Array[MClassDef]): TplArticle do
+               var article = new TplArticle(mclass.nitdoc_anchor)
+               var title = new Template
+               var icon = new TplIcon.with_icon("tag")
+               icon.css_classes.add_all(mclass.intro.tpl_css_classes)
+               title.add icon
+               title.add mclass.tpl_link
+               title.add mclass.intro.tpl_signature
+               article.title = title
+               article.title_classes.add "signature"
+               article.subtitle = mclass.tpl_declaration
+               article.summary_title = "{mclass.nitdoc_name}{mclass.tpl_signature.write_to_string}"
+               #article.subtitle = new Template
+               #article.subtitle.add mprop.intro.tpl_modifiers
+               #article.subtitle.add mprop.intro.tpl_namespace
+               var content = new Template
+
+               if not mclassdefs.has(mclass.intro) then
+                       # add intro synopsys
+                       var intro = mclass.intro
+                       var location = intro.location
+                       var sourcelink = tpl_showsource(location)
+                       var intro_def = intro.tpl_definition
+                       intro_def.location = sourcelink
+                       content.add intro_def
+               end
+               ctx.mainmodule.linearize_mclassdefs(mclassdefs)
+               for mclassdef in mclassdefs do
+                       # add mclassdef full description
+                       var location = mclassdef.location
+                       var sourcelink = tpl_showsource(location)
+                       var prop_def = mclassdef.tpl_definition.as(TplClassDefinition)
+                       prop_def.location = sourcelink
+                       for mpropdef in mclassdef.mpropdefs do
+                               var intro = mpropdef.mproperty.intro
+                               if mpropdef isa MAttributeDef then continue
+                               if mpropdef.mproperty.visibility < ctx.min_visibility then continue
+
+                               var lnk = new Template
+                               lnk.add new TplLabel.with_classes(mpropdef.tpl_css_classes.to_a)
+                               lnk.add mpropdef.tpl_link
+                               if intro.mdoc != null then
+                                       lnk.add ": "
+                                       lnk.add intro.mdoc.short_comment
+                               end
+                               if mpropdef.is_intro then
+                                       prop_def.intros.add new TplListItem.with_content(lnk)
+                               else
+                                       prop_def.redefs.add new TplListItem.with_content(lnk)
+                               end
+                       end
+                       content.add prop_def
+               end
+               article.content = content
+               return article
+       end
+
+       # MProp description template
+       fun tpl_mprop_article(mprop: MProperty, mpropdefs: Array[MPropDef]): TplArticle do
+               var article = new TplArticle(mprop.intro.nitdoc_anchor)
+               var icon = new TplIcon.with_icon("tag")
+               icon.css_classes.add_all(mprop.intro.tpl_css_classes)
+               var title = new Template
+               title.add icon
+               title.add mprop.nitdoc_name
+               title.add mprop.intro.tpl_signature
+               article.title = title
+               article.title_classes.add "signature"
+               article.subtitle = mprop.tpl_declaration
+               article.summary_title = mprop.nitdoc_name
+               #article.subtitle = new Template
+               #article.subtitle.add mprop.intro.tpl_modifiers
+               #article.subtitle.add mprop.intro.tpl_namespace
+               var content = new Template
+
+               if not mpropdefs.has(mprop.intro) then
+                       # add intro synopsys
+                       var intro = mprop.intro
+                       var location = intro.location
+                       var sourcelink = tpl_showsource(location)
+                       var intro_def = intro.tpl_definition
+                       intro_def.location = sourcelink
+                       content.add intro_def
+               end
+
+               ctx.mainmodule.linearize_mpropdefs(mpropdefs)
+               for mpropdef in mpropdefs do
+                       # add mpropdef description
+                       var location = mpropdef.location
+                       var sourcelink = tpl_showsource(location)
+                       var prop_def = mpropdef.tpl_definition
+                       prop_def.location = sourcelink
+                       content.add prop_def
+               end
+               article.content = content
+               return article
+       end
+end
+
+# The overview page
+# Display a list of modules contained in program
+class NitdocOverview
+       super NitdocPage
+
+       init(ctx: NitdocContext) do super(ctx)
+
+       private var page = new TplPage
+       redef fun tpl_page do return page
+
+       private var sidebar = new TplSidebar
+       redef fun tpl_sidebar do return sidebar
+
+       redef fun tpl_title do
+               if ctx.opt_custom_title.value != null then
+                       return ctx.opt_custom_title.value.to_s
+               else
+                       return "Overview"
+               end
+       end
+
+       redef fun tpl_topmenu do
+               var topmenu = super
+               topmenu.add_link("#", "Overview", true)
+               topmenu.add_link("search.html", "Index", false)
+               return topmenu
+       end
+
+       # intro text
+       private fun tpl_intro: TplSection do
+               var section = new TplSection.with_title("overview", tpl_title)
+               var article = new TplArticle("intro")
+               if ctx.opt_custom_intro.value != null then
+                       article.content = ctx.opt_custom_intro.value.to_s
+               end
+               section.add_child article
+               return section
+       end
+
+       # projects list
+       private fun tpl_projects(section: TplSection) do
+               # Projects list
+               var ssection = new TplSection.with_title("projects", "Projects")
+               for mproject in model.mprojects do
+                       ssection.add_child mproject.tpl_article
+               end
+               section.add_child ssection
+       end
+
+       redef fun tpl_content do
+               var top = tpl_intro
+               tpl_projects(top)
+               tpl_page.add_section top
+       end
+end
+
+# The search page
+# Display a list of modules, classes and properties
+class NitdocSearch
+       super NitdocPage
+
+       init(ctx: NitdocContext) do super(ctx)
+
+       private var page = new TplPage
+       redef fun tpl_page do return page
+
+       redef fun tpl_title do return "Index"
+
+       redef fun tpl_topmenu do
+               var topmenu = super
+               topmenu.add_link("index.html", "Overview", false)
+               topmenu.add_link("#", "Index", true)
+               return topmenu
+       end
+
+       redef fun tpl_content do
+               var tpl = new TplSearchPage("search_all")
+               var section = new TplSection("search")
+               # title
+               tpl.title = "Index"
+               # modules list
+               for mmodule in modules_list do
+                       tpl.modules.add mmodule.tpl_link
+               end
+               # classes list
+               for mclass in classes_list do
+                       tpl.classes.add mclass.tpl_link
+               end
+               # properties list
+               for mproperty in mprops_list do
+                       var m = new Template
+                       m.add mproperty.intro.tpl_link
+                       m.add " ("
+                       m.add mproperty.intro.mclassdef.mclass.tpl_link
+                       m.add ")"
+                       tpl.props.add m
+               end
+               section.add_child tpl
+               tpl_page.add_section section
+       end
+
+       # Extract mmodule list to display (sorted by name)
+       private fun modules_list: Array[MModule] do
+               var sorted = new Array[MModule]
+               for mmodule in ctx.mbuilder.model.mmodule_importation_hierarchy do
+                       if mmodule.name == "<main>" then continue
+                       sorted.add mmodule
+               end
+               var sorter = new MModuleNameSorter
+               sorter.sort(sorted)
+               return sorted
+       end
+
+       # Extract mclass list to display (sorted by name)
+       private fun classes_list: Array[MClass] do
+               var sorted = new Array[MClass]
+               for mclass in ctx.mbuilder.model.mclasses do
+                       if mclass.visibility < ctx.min_visibility then continue
+                       sorted.add mclass
+               end
+               var sorter = new MClassNameSorter
+               sorter.sort(sorted)
+               return sorted
+       end
+
+       # Extract mproperty list to display (sorted by name)
+       private fun mprops_list: Array[MProperty] do
+               var sorted = new Array[MProperty]
+               for mproperty in ctx.mbuilder.model.mproperties do
+                       if mproperty.visibility < ctx.min_visibility then continue
+                       if mproperty isa MAttribute then continue
+                       sorted.add mproperty
+               end
+               var sorter = new MPropertyNameSorter
+               sorter.sort(sorted)
+               return sorted
+       end
+end
+
+# A module page
+# Display the list of introduced and redefined classes in module
+class NitdocModule
+       super NitdocPage
+
+       private var mmodule: MModule
+
+       init(mmodule: MModule, ctx: NitdocContext) do
+               self.mmodule = mmodule
+               super(ctx)
+       end
+
+       private var page = new TplPage
+       redef fun tpl_page do return page
+
+       private var sidebar = new TplSidebar
+       redef fun tpl_sidebar do return sidebar
+
+       redef fun tpl_title do return "{mmodule.nitdoc_name}"
+
+       redef fun tpl_topmenu do
+               var topmenu = super
+               topmenu.add_link("index.html", "Overview", false)
+               topmenu.add_link("#", "{mmodule.nitdoc_name}", true)
+               topmenu.add_link("search.html", "Index", false)
+               return topmenu
+       end
+
+       # intro text
+       private fun tpl_intro: TplSection do
+               var section = new TplSection.with_title(mmodule.nitdoc_anchor, tpl_title)
+               section.subtitle = mmodule.tpl_declaration
+
+               var article = new TplArticle("intro")
+               var def = mmodule.tpl_definition
+               var location = mmodule.location
+               def.location = tpl_showsource(location)
+               article.content = def
+               section.add_child article
+               return section
+       end
+
+       # inheritance section
+       private fun tpl_inheritance(parent: TplSection) do
+               # Extract relevent modules
+               var nested = mmodule.in_nesting.direct_greaters.to_a
+               var imports = mmodule.in_importation.greaters
+               if imports.length > 10 then imports = mmodule.in_importation.direct_greaters
+               var clients = mmodule.in_importation.smallers
+               if clients.length > 10 then clients = mmodule.in_importation.direct_smallers
+
+               # Display lists
+               var sorter = new MModuleNameSorter
+               var section = new TplSection.with_title("inheritance", "Inheritance")
+
+               # Graph
+               var mmodules = new HashSet[MModule]
+               mmodules.add_all nested
+               mmodules.add_all imports
+               if clients.length < 10 then mmodules.add_all clients
+               mmodules.add mmodule
+               var graph = tpl_dot(mmodules)
+               if graph != null then section.add_child graph
+
+               # nested modules
+               if not nested.is_empty then
+                       var lst = nested.to_a
+                       sorter.sort lst
+                       section.add_child tpl_list("nesting", "Nested modules", lst)
+               end
+
+               # Imports
+               var lst = new Array[MModule]
+               for dep in imports do
+                       if dep.is_fictive then continue
+                       if dep == mmodule then continue
+                       lst.add(dep)
+               end
+               if not lst.is_empty then
+                       sorter.sort lst
+                       section.add_child tpl_list("imports", "Imports", lst)
+               end
+
+               # Clients
+               lst = new Array[MModule]
+               for dep in clients do
+                       if dep.is_fictive then continue
+                       if dep == mmodule then continue
+                       lst.add(dep)
+               end
+               if not lst.is_empty then
+                       sorter.sort lst
+                       section.add_child tpl_list("clients", "Clients", lst)
+               end
+
+               parent.add_child section
+       end
+
+       private fun tpl_list(id: String, title: String, mmodules: Array[MModule]): TplArticle do
+               var article = new TplArticle.with_title(id, title)
+               var list = new TplList.with_classes(["list-unstyled", "list-definition"])
+               for mmodule in mmodules do list.elts.add mmodule.tpl_list_item
+               article.content = list
+               return article
+       end
+
+       private fun tpl_mclasses(parent: TplSection) do
+               var sorter = new MClassNameSorter
+               var mclassdefs = new HashSet[MClassDef]
+               mclassdefs.add_all mmodule.in_nesting_intro_mclassdefs(ctx.min_visibility)
+               mclassdefs.add_all mmodule.in_nesting_redef_mclassdefs(ctx.min_visibility)
+               var mclasses2mdefs = sort_by_mclass(mclassdefs)
+               var sorted_mclasses = mclasses2mdefs.keys.to_a
+               sorter.sort sorted_mclasses
+
+               # intros
+               var section = new TplSection.with_title("intros", "Introductions")
+               var intros = mmodule.in_nesting_intro_mclasses(ctx.min_visibility)
+               var sorted_intros = intros.to_a
+               sorter.sort(sorted_intros)
+               for mclass in sorted_intros do
+                       if not mclasses2mdefs.has_key(mclass) then continue
+                       section.add_child tpl_mclass_article(mclass, mclasses2mdefs[mclass].to_a)
+               end
+               parent.add_child section
+
+               # redefs
+               section = new TplSection.with_title("redefs", "Refinements")
+               var redefs = mmodule.in_nesting_redef_mclasses(ctx.min_visibility).to_a
+               sorter.sort(redefs)
+               for mclass in redefs do
+                       if intros.has(mclass) then continue
+                       if not mclasses2mdefs.has_key(mclass) then continue
+                       section.add_child tpl_mclass_article(mclass, mclasses2mdefs[mclass].to_a)
+               end
+               parent.add_child section
+       end
+
+       redef fun tpl_content do
+               var top = tpl_intro
+               tpl_inheritance(top)
+               tpl_mclasses(top)
+               tpl_page.add_section top
+       end
+
+       # Genrate dot hierarchy for class inheritance
+       fun tpl_dot(mmodules: Collection[MModule]): nullable TplArticle do
+               var poset = new POSet[MModule]
+               for mmodule in mmodules do
+                       if mmodule.is_fictive then continue
+                       poset.add_node mmodule
+                       for omodule in mmodules do
+                               if mmodule.is_fictive then continue
+                               poset.add_node mmodule
+                               if mmodule.in_importation < omodule then
+                                       poset.add_edge(mmodule, omodule)
+                               end
+                       end
+               end
+               # build graph
+               var op = new FlatBuffer
+               var name = "dep_{mmodule.name}"
+               op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n")
+               for mmodule in poset do
+                       if mmodule == self.mmodule then
+                               op.append("\"{mmodule.name}\"[shape=box,margin=0.03];\n")
+                       else
+                               op.append("\"{mmodule.name}\"[URL=\"{mmodule.nitdoc_url}\"];\n")
+                       end
+                       for omodule in poset[mmodule].direct_greaters do
+                               op.append("\"{mmodule.name}\"->\"{omodule.name}\";\n")
+                       end
+               end
+               op.append("\}\n")
+               return tpl_graph(op, name, "Dependency graph")
+       end
+
+       private fun sort_by_mclass(mclassdefs: Collection[MClassDef]): Map[MClass, Set[MClassDef]] do
+               var map = new HashMap[MClass, Set[MClassDef]]
+               for mclassdef in mclassdefs do
+                       var mclass = mclassdef.mclass
+                       if not map.has_key(mclass) then map[mclass] = new HashSet[MClassDef]
+                       map[mclass].add mclassdef
+               end
+               return map
+       end
+end
+
+# A class page
+# Display a list properties defined or redefined for this class
+class NitdocClass
+       super NitdocPage
+
+       private var mclass: MClass
+       private var mprops2mdefs: Map[MProperty, Set[MPropDef]]
+
+       init(mclass: MClass, ctx: NitdocContext) do
+               self.mclass = mclass
+               super(ctx)
+               var mpropdefs = new HashSet[MPropDef]
+               mpropdefs.add_all mclass.intro_mpropdefs(ctx.min_visibility)
+               mpropdefs.add_all mclass.redef_mpropdefs(ctx.min_visibility)
+               mprops2mdefs = sort_by_mproperty(mpropdefs)
+       end
+
+       private var page = new TplPage
+       redef fun tpl_page do return page
+
+       private var sidebar = new TplSidebar
+       redef fun tpl_sidebar do return sidebar
+
+       redef fun tpl_title do return "{mclass.nitdoc_name}{mclass.tpl_signature.write_to_string}"
+
+       redef fun tpl_topmenu do
+               var topmenu = super
+               var mmodule: MModule
+               if mclass.public_owner == null then
+                       mmodule = mclass.intro_mmodule
+               else
+                       mmodule = mclass.public_owner.as(not null)
+               end
+               topmenu.add_link("index.html", "Overview", false)
+               topmenu.add_link("{mmodule.nitdoc_url}", "{mmodule.nitdoc_name}", false)
+               topmenu.add_link("#", "{mclass.nitdoc_name}", true)
+               topmenu.add_link("search.html", "Index", false)
+               return topmenu
+       end
+
+       # Property list to display in sidebar
+       fun tpl_sidebar_properties do
+               var kind_map = sort_by_kind(mclass_inherited_mprops)
+               var summary = new TplList.with_classes(["list-unstyled"])
+
+               tpl_sidebar_list("Virtual types", kind_map["type"].to_a, summary)
+               tpl_sidebar_list("Constructors", kind_map["init"].to_a, summary)
+               tpl_sidebar_list("Methods", kind_map["fun"].to_a, summary)
+               tpl_sidebar.boxes.add new TplSideBox.with_content("All properties", summary)
+       end
+
+       var mprop_sorter = new MPropertyNameSorter
+
+       private fun tpl_sidebar_list(name: String, mprops: Array[MProperty], summary: TplList) do
+               if mprops.is_empty then return
+               mprop_sorter.sort(mprops)
+               var entry = new TplListItem.with_content(name)
+               var list = new TplList.with_classes(["list-unstyled", "list-labeled"])
+               for mprop in mprops do
+                       list.add_li tpl_sidebar_item(mprop)
+               end
+               entry.append list
+               summary.elts.add entry
+       end
+
+       private fun tpl_sidebar_item(mprop: MProperty): Template do
+               var classes = mprop.intro.tpl_css_classes.to_a
+               if not mprops2mdefs.has_key(mprop) then
+                       classes.add "inherit"
+                       var lnk = new Template
+                       lnk.add new TplLabel.with_classes(classes)
+                       lnk.add mprop.intro.tpl_link
+                       return lnk
+               end
+               var defs = mprops2mdefs[mprop]
+               if defs.has(mprop.intro) then
+                       classes.add "intro"
+               else
+                       classes.add "redef"
+               end
+               var lnk = new Template
+               lnk.add new TplLabel.with_classes(classes)
+               lnk.add mprop.intro.tpl_anchor
+               return lnk
+       end
+
+       private fun tpl_intro: TplSection do
+               var section = new TplSection.with_title(mclass.nitdoc_anchor, tpl_title)
+               section.subtitle = mclass.tpl_declaration
+               var article = new TplArticle("intro")
+               var intro = mclass.intro
+               var def = intro.tpl_definition
+               var location = intro.location
+               def.location = tpl_showsource(location)
+               article.content = def
+               section.add_child article
+               return section
+       end
+
+       private fun tpl_concerns(section: TplSection) do
+               var mmodules = collect_mmodules(mprops2mdefs.keys)
+               var owner_map = sort_by_public_owner(mmodules)
+               var owners = owner_map.keys.to_a
+
+               if not owners.is_empty then
+                       var article = new TplArticle.with_title("concerns", "Concerns")
+                       var module_sorter = new MModuleNameSorter
+                       module_sorter.sort owners
+                       var list = new TplList.with_classes(["list-unstyled", "list-definition"])
+                       for owner in owners do
+                               var li = new Template
+                               li.add owner.tpl_anchor
+                               if owner.mdoc != null then
+                                       li.add ": "
+                                       li.add owner.mdoc.short_comment
+                               end
+                               var smmodules = owner_map[owner].to_a
+                               #if not smmodules.length >= 1 then
+                                       var slist = new TplList.with_classes(["list-unstyled", "list-definition"])
+                                       module_sorter.sort smmodules
+                                       for mmodule in smmodules do
+                                               if mmodule == owner then continue
+                                               var sli = new Template
+                                               sli.add mmodule.tpl_anchor
+                                               if mmodule.mdoc != null then
+                                                       sli.add ": "
+                                                       sli.add mmodule.mdoc.short_comment
+                                               end
+                                               slist.add_li(sli)
+                                       end
+                                       li.add slist
+                                       list.add_li li
+                               #end
+                       end
+                       article.content = list
+                       section.add_child article
+               end
+       end
+
+       private fun tpl_inheritance(parent: TplSection) do
+               # parents
+               var hparents = new HashSet[MClass]
+               for c in mclass.in_hierarchy(ctx.mainmodule).direct_greaters do
+                       if c.visibility < ctx.min_visibility then continue
+                       hparents.add c
+               end
+
+               # ancestors
+               var hancestors = new HashSet[MClass]
+               for c in mclass.in_hierarchy(ctx.mainmodule).greaters do
+                       if c == mclass then continue
+                       if c.visibility < ctx.min_visibility then continue
+                       if hparents.has(c) then continue
+                       hancestors.add c
+               end
+
+               # children
+               var hchildren = new HashSet[MClass]
+               for c in mclass.in_hierarchy(ctx.mainmodule).direct_smallers do
+                       if c.visibility < ctx.min_visibility then continue
+                       hchildren.add c
+               end
+
+               # descendants
+               var hdescendants = new HashSet[MClass]
+               for c in mclass.in_hierarchy(ctx.mainmodule).smallers do
+                       if c == mclass then continue
+                       if c.visibility < ctx.min_visibility then continue
+                       if hchildren.has(c) then continue
+                       hdescendants.add c
+               end
+
+               # Display lists
+               var sorter = new MClassNameSorter
+               var section = new TplSection.with_title("inheritance", "Inheritance")
+
+               # Graph
+               var mclasses = new HashSet[MClass]
+               mclasses.add_all hancestors
+               mclasses.add_all hparents
+               if hchildren.length < 10 then mclasses.add_all hchildren
+               if hdescendants.length < 10 then mclasses.add_all hdescendants
+               mclasses.add mclass
+               var graph = tpl_dot(mclasses)
+               if graph != null then section.add_child graph
+
+               # parents
+               if not hparents.is_empty then
+                       var lst = hparents.to_a
+                       sorter.sort lst
+                       section.add_child tpl_list("parents", "Parents", lst)
+               end
+
+               # ancestors
+               if not hancestors.is_empty then
+                       var lst = hancestors.to_a
+                       sorter.sort lst
+                       section.add_child tpl_list("ancestors", "Ancestors", lst)
+               end
+
+               # children
+               if not hchildren.is_empty and hchildren.length < 15 then
+                       var lst = hchildren.to_a
+                       sorter.sort lst
+                       section.add_child tpl_list("children", "Children", lst)
+               end
+
+               # descendants
+               if not hdescendants.is_empty and hchildren.length < 15 then
+                       var lst = hdescendants.to_a
+                       sorter.sort lst
+                       section.add_child tpl_list("descendants", "Descendants", lst)
+               end
+
+               parent.add_child section
+       end
+
+       private fun tpl_list(id: String, title: String, elts: Array[MClass]): TplArticle do
+               var article = new TplArticle.with_title(id, title)
+               var list = new TplList.with_classes(["list-unstyled", "list-definition"])
+               for elt in elts do list.elts.add elt.tpl_list_item
+               article.content = list
+               return article
+       end
+
+       private fun tpl_properties(parent: TplSection) do
+               var mod_map = sort_by_mmodule(mprops2mdefs.keys)
+               var owner_map = sort_by_public_owner(mod_map.keys)
+               var owners = owner_map.keys.to_a
+
+               for owner in owners do
+                       var section = new TplSection(owner.nitdoc_anchor)
+                       var title = new Template
+                       title.add "Introductions in "
+                       title.add owner.tpl_link
+                       section.title = title
+                       section.summary_title = "In {owner.nitdoc_name}"
+                       for mmodule in owner_map[owner] do
+                               # properties
+                               var mprops = mod_map[mmodule]
+                               var sorter = new MPropertyNameSorter
+                               var kind_map = sort_by_kind(mprops)
+
+                               # virtual types
+                               var elts = kind_map["type"].to_a
+                               sorter.sort(elts)
+                               for elt in elts do
+                                       var defs = mprops2mdefs[elt].to_a
+                                       section.add_child tpl_mprop_article(elt, defs)
+                               end
+
+                               # constructors
+                               elts = kind_map["init"].to_a
+                               sorter.sort(elts)
+                               for elt in elts do
+                                       var defs = mprops2mdefs[elt].to_a
+                                       section.add_child tpl_mprop_article(elt, defs)
+                               end
+
+                               # methods
+                               elts = kind_map["fun"].to_a
+                               sorter.sort(elts)
+                               for elt in elts do
+                                       var defs = mprops2mdefs[elt].to_a
+                                       section.add_child tpl_mprop_article(elt, defs)
+                               end
+                       end
+                       parent.add_child section
+               end
+       end
+
+       redef fun tpl_content do
+               tpl_sidebar_properties
+               var top = tpl_intro
+               tpl_concerns(top)
+               tpl_inheritance(top)
+               tpl_properties(top)
+               tpl_page.add_section top
+       end
+
+       private fun sort_by_mproperty(mpropdefs: Collection[MPropDef]): Map[MProperty, Set[MPropDef]] do
+               var map = new HashMap[MProperty, Set[MPropDef]]
+               for mpropdef in mpropdefs do
+                       var mproperty = mpropdef.mproperty
+                       if not map.has_key(mproperty) then map[mproperty] = new HashSet[MPropDef]
+                       map[mproperty].add mpropdef
+               end
+               return map
+       end
+
+       private fun sort_by_mmodule(mprops: Collection[MProperty]): Map[MModule, Set[MProperty]] do
+               var map = new HashMap[MModule, Set[MProperty]]
+               for mprop in mprops do
+                       var mpropdefs = mprops2mdefs[mprop].to_a
+                       ctx.mainmodule.linearize_mpropdefs(mpropdefs)
+                       var mmodule = mpropdefs.first.mclassdef.mmodule
+                       if not map.has_key(mmodule) then map[mmodule] = new HashSet[MProperty]
+                       map[mmodule].add mprop
+               end
+               return map
+       end
+
+       private fun sort_by_kind(mprops: Collection[MProperty]): Map[String, Set[MProperty]] do
+               var map = new HashMap[String, Set[MProperty]]
+               map["type"] = new HashSet[MProperty]
+               map["init"] = new HashSet[MProperty]
+               map["fun"] = new HashSet[MProperty]
+               for mprop in mprops do
+                       if mprop isa MVirtualTypeProp then
+                               map["type"].add mprop
+                       else if mprop isa MMethod then
+                               if mprop.is_init then
+                                       map["init"].add mprop
+                               else
+                                       map["fun"].add mprop
+                               end
+                       end
+               end
+               return map
+       end
+
+       private fun mclass_inherited_mprops: Set[MProperty] do
+               var res = new HashSet[MProperty]
+               var local = mclass.local_mproperties(ctx.min_visibility)
+               for mprop in mclass.inherited_mproperties(ctx.mainmodule, ctx.min_visibility) do
+                       if local.has(mprop) then continue
+                       #if mprop isa MMethod and mprop.is_init then continue
+                       if mprop.intro.mclassdef.mclass.name == "Object" and
+                               (mprop.visibility == protected_visibility or
+                               mprop.intro.mclassdef.mmodule.name != "kernel") then continue
+                       res.add mprop
+               end
+               res.add_all local
+               return res
+       end
+
+       private fun collect_mmodules(mprops: Collection[MProperty]): Set[MModule] do
+               var res = new HashSet[MModule]
+               for mprop in mprops do
+                       if mprops2mdefs.has_key(mprop) then
+                               for mpropdef in mprops2mdefs[mprop] do res.add mpropdef.mclassdef.mmodule
+                       end
+               end
+               return res
+       end
+
+       private fun sort_by_public_owner(mmodules: Collection[MModule]): Map[MModule, Set[MModule]] do
+               var map = new HashMap[MModule, Set[MModule]]
+               for mmodule in mmodules do
+                       var owner = mmodule
+                       if mmodule.public_owner != null then owner = mmodule.public_owner.as(not null)
+                       if not map.has_key(owner) then map[owner] = new HashSet[MModule]
+                       map[owner].add mmodule
+               end
+               return map
+       end
+
+       # Generate dot hierarchy for classes
+       fun tpl_dot(mclasses: Collection[MClass]): nullable TplArticle do
+               var poset = new POSet[MClass]
+
+               for mclass in mclasses do
+                       poset.add_node mclass
+                       for oclass in mclasses do
+                               poset.add_node oclass
+                               if mclass.in_hierarchy(ctx.mainmodule) < oclass then
+                                       poset.add_edge(mclass, oclass)
+                               end
+                       end
+               end
+
+               var op = new FlatBuffer
+               var name = "dep_{mclass.name}"
+               op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n")
+               for c in poset do
+                       if c == mclass then
+                               op.append("\"{c.name}\"[shape=box,margin=0.03];\n")
+                       else
+                               op.append("\"{c.name}\"[URL=\"{c.nitdoc_url}\"];\n")
+                       end
+                       for c2 in poset[c].direct_greaters do
+                               op.append("\"{c.name}\"->\"{c2.name}\";\n")
+                       end
+               end
+               op.append("\}\n")
+               return tpl_graph(op, name, "Inheritance graph")
+       end
+end
+
diff --git a/src/doc/doc_templates.nit b/src/doc/doc_templates.nit
new file mode 100644 (file)
index 0000000..788cb85
--- /dev/null
@@ -0,0 +1,811 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# HTML templates used by Nitdoc to generate API documentation
+# Pages are assembled using `Template`
+module doc_templates
+
+import template
+
+# A documentation page
+class TplPage
+       super Template
+
+       # Page title in HTML header
+       var title: String writable
+
+       # Directory where css, js and other assets can be found
+       var shareurl: String writable
+
+       # Attributes of the body tag element
+       var body_attrs = new Array[TagAttribute]
+
+       # Top menu template if any
+       var topmenu: TplTopMenu writable
+
+       # Sidebar template if any
+       var sidebar: nullable TplSidebar writable
+
+       # Content of the page in form a TplSection
+       var sections = new Array[TplSection]
+
+       # Footer content if any
+       var footer: nullable Streamable writable
+
+       # JS scripts to append at the end of the body
+       var scripts = new Array[TplScript]
+
+       init do end
+
+       # Add a section to this page
+       fun add_section(section: TplSection) do
+               sections.add section
+       end
+
+       # Render the html header
+       private fun render_head do
+               add "<!DOCTYPE html>"
+               add "<head>"
+               add " <meta charset='utf-8'/>"
+               add " <!--link rel='stylesheet' href='{shareurl}/css/Nitdoc.UI.css' type='text/css'/-->"
+               add " <link rel='stylesheet' href='{shareurl}/vendors/bootstrap/css/bootstrap.min.css'/>"
+               add " <link rel='stylesheet' href='{shareurl}/css/nitdoc.bootstrap.css'/>"
+               add " <link rel='stylesheet' href='{shareurl}/css/nitdoc.css'/>"
+               add " <link rel='stylesheet' href='{shareurl}/css/Nitdoc.QuickSearch.css'/>"
+               add " <link rel='stylesheet' href='{shareurl}/css/Nitdoc.ModalBox.css'/>"
+               add " <link rel='stylesheet' href='{shareurl}/css/Nitdoc.GitHub.css'/>"
+               add " <title>{title}</title>"
+               add "</head>"
+               add "<body"
+               for attr in body_attrs do add attr
+               add ">"
+       end
+
+       # Render the topmenu template
+       private fun render_topmenu do
+               add " <div class='row'>"
+               add topmenu
+               add " </div>"
+       end
+
+       # Render the sidebar
+       # Sidebar is automatically populated with a summary of all sections
+       fun render_sidebar do
+               if sidebar == null then return
+               var summary = new TplSummary.with_order(0)
+               for section in sections do
+                       section.render_summary summary
+               end
+               sidebar.boxes.add summary
+               add sidebar.as(not null)
+       end
+       # Render the footer and content
+       private fun render_content do
+               for section in sections do add section
+               if footer != null then
+                       add "<div class='well footer'>"
+                       add footer.as(not null)
+                       add "</div>"
+               end
+       end
+
+       # Render JS scripts
+       private fun render_footer do
+               add "<script src='{shareurl}/vendors/jquery/jquery-1.11.1.min.js'></script>"
+               add "<script src='{shareurl}/vendors/jquery/jquery-ui-1.10.4.custom.min.js'></script>"
+               add "<script src='{shareurl}/vendors/bootstrap/js/bootstrap.min.js'></script>"
+               add "<script data-main='{shareurl}/js/nitdoc' src='{shareurl}/js/lib/require.js'</script>"
+               for script in scripts do add script
+               add """<script>
+                       $(function () {
+                               $("[data-toggle='tooltip']").tooltip();
+                               $("[data-toggle='popover']").popover();
+                       });
+               </script>"""
+               add "</body>"
+               add "</html>"
+       end
+
+       # Render the whole page
+       redef fun rendering do
+               render_head
+               add "<div class='container-fluid'>"
+               render_topmenu
+               add " <div class='row' id='content'>"
+               if sidebar != null then
+                       add "<div class='col col-xs-3 col-lg-2'>"
+                       render_sidebar
+                       add "</div>"
+                       add "<div class='col col-xs-9 col-lg-10' data-spy='scroll' data-target='.summary'>"
+                       render_content
+                       add "</div>"
+               else
+                       add "<div class='col col-xs-12'>"
+                       render_content
+                       add "</div>"
+               end
+               add " </div>"
+               add "</div>"
+               render_footer
+       end
+end
+
+#########################
+# general layout elements
+#########################
+
+# Top menu bar template
+class TplTopMenu
+       super Template
+
+       # Elements of the topmenu
+       private var elts = new Array[Streamable]
+
+       # Add a new link to the menu
+       fun add_link(href, name: String, is_active: Bool) do
+               var tpl = new Template
+               tpl.add "<li"
+               if is_active then
+                       tpl.add " class='active'"
+               end
+               tpl.add ">"
+               tpl.add new TplLink(href, name)
+               tpl.add "</li>"
+               add_raw(tpl)
+       end
+
+       # Add a raw content to the menu
+       fun add_raw(content: Streamable) do
+               elts.add content
+       end
+
+       redef fun rendering do
+               add "<nav id='topmenu' class='navbar navbar-default navbar-fixed-top' role='navigation'>"
+               add " <div class='container-fluid'>"
+               if not elts.is_empty then
+                       add "<ul class='nav navbar-nav'>"
+                       for elt in elts do add(elt)
+                       add "</ul>"
+               end
+               add " </div>"
+               add "</nav>"
+       end
+end
+
+# A sidebar template
+class TplSidebar
+       super Template
+
+       # Sidebar contains sidebar element templates called boxes
+       var boxes = new Array[TplSidebarElt]
+
+       # Sort boxes by order priority
+       private fun order_boxes do
+               var sorter = new OrderComparator
+               sorter.sort(boxes)
+       end
+
+       redef fun rendering do
+               if boxes.is_empty then return
+               order_boxes
+               add "<div id='sidebar'>"
+               for box in boxes do add box
+               add "</div>"
+       end
+end
+
+# Comparator used to sort boxes by order
+private class OrderComparator
+       super Comparator[TplSidebarElt]
+
+       redef fun compare(a, b) do
+               if a.order < b.order then return -1
+               if a.order > b.order then return 1
+               return 0
+       end
+end
+
+# Something that can be put in the sidebar
+class TplSidebarElt
+       super Template
+
+       # Order of the box in the sidebar
+       var order: Int = 1
+
+       init with_order(order: Int) do self.order = order
+end
+
+# Agenericbox that can be added to sidebar
+class TplSideBox
+       super TplSidebarElt
+
+       # Title of the box to display
+       # Title is also a placeholder for the collapse link
+       var title: String
+
+       # Box HTML id
+       # equals to `title.to_cmangle` by default
+       # Used for collapsing
+       var id: String
+
+       # Content to display in the box
+       # box will not be rendered if the content is null
+       var content: nullable Streamable writable
+
+       # Is the box opened by default
+       # otherwise, the user will have to clic on the title to display the content
+       var is_open writable = false
+
+       init(title: String) do
+               self.title = title
+               self.id = title.to_cmangle
+       end
+
+       init with_content(title: String, content: Streamable) do
+               init(title)
+               self.content = content
+       end
+
+       redef fun rendering do
+               if content == null then return
+               var open = ""
+               if is_open then open = "in"
+               add "<div class='panel'>"
+               add " <div class='panel-heading'>"
+               add "  <a data-toggle='collapse' data-parent='#sidebar' data-target='#box_{id}' href='#'>"
+               add title
+               add "  </a>"
+               add " </div>"
+               add " <div id='box_{id}' class='panel-body collapse {open}'>"
+               add content.as(not null)
+               add " </div>"
+               add "</div>"
+       end
+end
+
+# Something that can go on a summary template
+class TplSummaryElt
+       super Template
+
+       # Add an element to the summary
+       fun add_child(child: TplSummaryElt) is abstract
+end
+
+# A summary that can go on the sidebar
+# If the page contains a sidebar, the summary is automatically placed
+# on top of the sidebarauto-generated
+# summary contains anchors to all sections displayed in the page
+class TplSummary
+       super TplSidebarElt
+       super TplSummaryElt
+
+       # Summary elements to display
+       var children = new Array[TplSummaryElt]
+
+       redef fun add_child(child) do children.add child
+
+       redef fun rendering do
+               if children.is_empty then return
+               add "<div class='panel'>"
+               add " <div class='panel-heading'>"
+               add "  <a data-toggle='collapse' data-parent='#sidebar' data-target='#box-sum' href='#'>"
+               add "Summary"
+               add "  </a>"
+               add " </div>"
+               add " <div id='box-sum' class='summary collapse in'>"
+               add " <ul class='nav'>"
+               for entry in children do add entry
+               add " </ul>"
+               add " </div>"
+               add "</div>"
+       end
+end
+
+# A summary entry
+class TplSummaryEntry
+       super TplSummaryElt
+
+       # Text to display
+       var text: Streamable
+
+       # Children of this entry
+       # Will be displayed as a tree
+       var children = new Array[TplSummaryElt]
+
+       init(text: Streamable) do self.text = text
+
+       redef fun add_child(child) do children.add child
+
+       redef fun rendering do
+               add "<li>"
+               add text
+               if not children.is_empty then
+                       add "<ul class='nav'>"
+                       for entry in children do add entry
+                       add "</ul>"
+               end
+               add "</li>"
+       end
+end
+
+# Something that can go in a section
+# Sections are automatically collected to populate the menu
+class TplSectionElt
+       super Template
+
+       # HTML anchor id
+       var id: String
+
+       # Title to display if any
+       # if both `title` and `summary_title` are null then
+       # the section will not appear in the summary
+       var title: nullable Streamable writable
+
+       # Subtitle to display if any
+       var subtitle: nullable Streamable writable
+
+       # Title that appear in the summary
+       # if null use `title` instead
+       var summary_title: nullable String writable
+
+       # Parent section of this section if any
+       var parent: nullable TplSection
+
+       init(id: String) do self.id = id
+
+       init with_title(id: String, title: Streamable) do
+               init(id)
+               self.title = title
+       end
+
+       # Level <hX> for HTML heading
+       protected fun hlvl: Int do
+               if parent == null then return 1
+               return parent.hlvl + 1
+       end
+
+       # Render this section in the summary
+       protected fun render_summary(parent: TplSummaryElt) is abstract
+
+       # Is the section empty (no content at all)
+       fun is_empty: Bool is abstract
+end
+
+# A HTML <section> element
+class TplSection
+       super TplSectionElt
+
+       # Elements contained by this section
+       var children = new Array[TplSectionElt]
+
+       # Add an element in this section
+       fun add_child(child: TplSectionElt) do
+               child.parent = self
+               children.add child
+       end
+
+       redef fun is_empty: Bool do return children.is_empty
+
+       redef fun render_summary(parent) do
+               if is_empty then return
+               var title = summary_title
+               if title == null and self.title != null then title = self.title.write_to_string
+               if title == null then return
+               var lnk = new TplLink("#{id}", title)
+               var entry = new TplSummaryEntry(lnk)
+               for child in children do
+                       child.render_summary(entry)
+               end
+               parent.add_child entry
+       end
+
+       redef fun rendering do
+               if is_empty then return
+               add "<section id='{id}'>"
+               if title != null then
+                       var lvl = hlvl
+                       add "<h{lvl}>"
+                       add title.as(not null)
+                       add "</h{lvl}>"
+               end
+               if subtitle != null then
+                       add "<div class='info subtitle'>"
+                       add subtitle.as(not null)
+                       add "</div>"
+               end
+               for child in children do
+                       add child
+               end
+               add "</section>"
+       end
+end
+
+# A page article that can go in a section
+class TplArticle
+       super TplSectionElt
+
+       # Content for this article
+       var content: nullable Streamable writable = null
+
+       # CSS classes to apply on the article title heading element
+       var title_classes = new Array[String]
+
+       redef fun render_summary(parent) do
+               if is_empty then return
+               var title = summary_title
+               if title == null and self.title != null then title = self.title.write_to_string
+               if title == null then return
+               var lnk = new TplLink("#{id}", title)
+               parent.add_child new TplSummaryEntry(lnk)
+       end
+
+       redef fun rendering do
+               add "<article id='{id}'>"
+               if title != null then
+                       var lvl = hlvl
+                       add "<h{lvl} class='{title_classes.join(" ")}'>"
+                       add title.as(not null)
+                       add "</h{lvl}>"
+               end
+               if subtitle != null then
+                       add "<div class='info subtitle'>"
+                       add subtitle.as(not null)
+                       add "</div>"
+               end
+               if content != null then
+                       add content.as(not null)
+               end
+               add """</article>"""
+       end
+
+       redef fun is_empty: Bool do return content == null
+end
+
+# A module / class / prop definition
+class TplDefinition
+       super Template
+
+       # Comment to display
+       var comment: nullable Streamable writable
+
+       # Namespace for this definition
+       var namespace: Streamable writable
+
+       # Location link to display
+       var location: nullable Streamable writable
+
+       init do end
+
+       private fun render_info do
+               add "<div class='info text-right'>"
+               if comment == null then
+                       add "<span class=\"noComment\">no comment for </span>"
+               end
+               add namespace
+               if location != null then
+                       add " "
+                       add location.as(not null)
+               end
+               add "</div>"
+       end
+
+       private fun render_comment do
+               if comment != null then add comment.as(not null)
+       end
+
+       redef fun rendering do
+               add "<div class='definition'>"
+               render_comment
+               render_info
+               add "</div>"
+       end
+end
+
+# Class definition
+class TplClassDefinition
+       super TplDefinition
+
+       var intros = new Array[TplListElt]
+       var redefs = new Array[TplListElt]
+
+       init do end
+
+       redef fun rendering do
+               add "<div class='definition'>"
+               render_comment
+               render_info
+               render_list("Introduces", intros)
+               render_list("Redefines", redefs)
+               add "</div>"
+       end
+
+       private fun render_list(name: String, elts: Array[TplListElt]) do
+               if elts.is_empty then return
+               add "<h5>{name}</h5>"
+               add "<ul class='list-unstyled list-definition'>"
+               for elt in elts do add elt
+               add "</ul>"
+       end
+end
+
+# Layout for Search page
+class TplSearchPage
+       super TplSectionElt
+
+       var modules = new Array[Streamable]
+       var classes = new Array[Streamable]
+       var props = new Array[Streamable]
+
+       redef fun rendering do
+               if title != null then add "<h1>{title}</h1>"
+               add "<div class='container-fluid'>"
+               add " <div class='row'>"
+               if not modules.is_empty then
+                       add "<div class='col-xs-4'>"
+                       add "<h3>Modules</h3>"
+                       add "<ul>"
+                       for m in modules do
+                               add "<li>"
+                               add m
+                               add "</li>"
+                       end
+                       add "</ul>"
+                       add "</div>"
+               end
+               if not classes.is_empty then
+                       add "<div class='col-xs-4'>"
+                       add "<h3>Classes</h3>"
+                       add "<ul>"
+                       for c in classes do
+                               add "<li>"
+                               add c
+                               add "</li>"
+                       end
+                       add "</ul>"
+                       add "</div>"
+               end
+               if not props.is_empty then
+                       add "<div class='col-xs-4'>"
+                       add "<h3>Properties</h3>"
+                       add "<ul>"
+                       for p in props do
+                               add "<li>"
+                               add p
+                               add "</li>"
+                       end
+                       add "</ul>"
+                       add "</div>"
+               end
+               add " </div>"
+               add "</div>"
+       end
+end
+
+#####################
+# Basiv HTML elements
+#####################
+
+# A html link <a>
+class TplLink
+       super Template
+
+       # Link href
+       var href: String writable
+
+       # Text to display in the link
+       var text: String writable
+
+       # Optional title
+       var title: nullable String writable
+
+       init(href, text: String) do
+               self.href = href
+               self.text = text
+       end
+
+       init with_title(href, text, title: String) do
+               init(href, text)
+               self.title = title
+       end
+
+       redef fun rendering do
+               add "<a href=\""
+               add href
+               add "\""
+               if title != null then
+                       add " title=\""
+                       add title.as(not null)
+                       add "\""
+               end
+               add ">"
+               add text
+               add "</a>"
+       end
+end
+
+# A <ul> list
+class TplList
+       super TplListElt
+
+       # Elements contained in this list
+       # can be <li> or <ul> elements
+       var elts = new Array[TplListElt]
+
+       # CSS classes of the <ul> element
+       var css_classes = new Array[String]
+
+       # Add content wrapped in a <li> element
+       fun add_li(content: Streamable) do elts.add new TplListItem.with_content(content)
+
+       init do end
+
+       init with_classes(classes: Array[String]) do self.css_classes = classes
+
+       redef fun rendering do
+               if elts.is_empty then return
+               add "<ul class='{css_classes.join(" ")}'>"
+               for elt in elts do add elt
+               add "</ul>"
+       end
+end
+
+# Something that can be added to a TplList
+class TplListElt
+       super Template
+end
+
+# A list item <li>
+class TplListItem
+       super TplListElt
+
+       # Content of the list item
+       var content = new Template
+
+       # CSS classes of the <li> element
+       var css_classes = new Array[String]
+
+       init do end
+
+       init with_content(content: Streamable) do append(content)
+
+       init with_classes(content: Streamable, classes: Array[String]) do
+               with_content(content)
+               css_classes = classes
+       end
+
+       # Append `content` to the item
+       # similar to `self.content.add`
+       fun append(content: Streamable) do self.content.add content
+
+       redef fun rendering do
+               add "<li class='"
+               for cls in css_classes do add " {cls}"
+               add "'>"
+               add content
+               add "</li>"
+       end
+end
+
+# A label with a text content
+class TplLabel
+       super Template
+
+       # Content of the label if any
+       var content: nullable Streamable
+
+       # CSS classes of the <span> element
+       var css_classes = new Array[String]
+
+       init do end
+       init with_content(content: Streamable) do self.content = content
+       init with_classes(classes: Array[String]) do self.css_classes = classes
+
+       redef fun rendering do
+               add "<span class='label {css_classes.join(" ")}'>"
+               if content != null then add content.as(not null)
+               add "</span>"
+       end
+end
+
+# A label with an icon
+class TplIcon
+       super TplLabel
+
+       # Bootsrap icon name
+       # see: http://getbootstrap.com/components/#glyphicons
+       var icon: String
+
+       init with_icon(icon: String) do self.icon = icon
+
+       redef fun rendering do
+               add "<span class='glyphicon glyphicon-{icon} {css_classes.join(" ")}'>"
+               if content != null then add content.as(not null)
+               add "</span>"
+       end
+end
+
+# A HTML tag attribute
+#  `<tag attr="value">`
+class TagAttribute
+       super Template
+
+       var name: String
+       var value: nullable String
+
+       init(name: String, value: nullable String) do
+               self.name = name
+               self.value = value
+       end
+
+       redef fun rendering do
+               if value == null then
+                       add(" {name}")
+               else
+                       add(" {name}=\"{value}\"")
+               end
+       end
+end
+
+# Javacript template
+class TplScript
+       super Template
+
+       var attrs = new Array[TagAttribute]
+       var content: nullable Streamable writable
+
+       init do
+               attrs.add(new TagAttribute("type", "text/javascript"))
+       end
+
+       protected fun render_content do
+               if content != null then add content.as(not null)
+       end
+
+       redef fun rendering do
+               add "<script"
+               for attr in attrs do add attr
+               add ">"
+               render_content
+               add "</script>"
+       end
+end
+
+# JS script for Piwik Tracker
+class TplPiwikScript
+       super TplScript
+
+       var tracker_url: String
+       var site_id: String
+
+       init(tracker_url, site_id: String) do
+               super
+               self.tracker_url = tracker_url
+               self.site_id = site_id
+       end
+
+       redef fun render_content do
+               add "<!-- Piwik -->"
+               add "var _paq = _paq || [];"
+               add " _paq.push([\"trackPageView\"]);"
+               add " _paq.push([\"enableLinkTracking\"]);"
+               add "(function() \{"
+               add " var u=((\"https:\" == document.location.protocol) ? \"https\" : \"http\") + \"://{tracker_url}\";"
+               add " _paq.push([\"setTrackerUrl\", u+\"piwik.php\"]);"
+               add " _paq.push([\"setSiteId\", \"{site_id}\"]);"
+               add " var d=document, g=d.createElement(\"script\"), s=d.getElementsByTagName(\"script\")[0]; g.type=\"text/javascript\";"
+               add " g.defer=true; g.async=true; g.src=u+\"piwik.js\"; s.parentNode.insertBefore(g,s);"
+               add "\})();"
+       end
+end
+
diff --git a/src/doc_template.nit b/src/doc_template.nit
deleted file mode 100644 (file)
index 5084b01..0000000
+++ /dev/null
@@ -1,724 +0,0 @@
-# This file is part of NIT ( http://www.nitlanguage.org ).
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# HTML templates used by Nitdoc to generate API documentation
-# Pages are assembled using `Template`
-module doc_template
-
-import template
-
-# Full Nitdoc page template
-class TplNitdocPage
-       super Template
-
-       var head: TplHead writable
-       var body_attrs = new Array[TagAttribute] # attributes for body tag element
-       var topmenu: TplTopMenu writable
-       var sidebar: nullable TplSidebar writable
-       var content: Streamable writable
-       var footer: nullable TplFooter writable
-       var scripts = new Array[TplScript] # js scripts appended to body
-       init do end
-
-       redef fun rendering do
-               add "<!DOCTYPE html>"
-               add "<head>"
-               add head
-               add "</head>"
-               add "<body"
-               for attr in body_attrs do add attr
-               add ">"
-               add topmenu
-               if footer != null then
-                       add "<div class='page footed'>"
-               else
-                       add "<div class='page'>"
-               end
-               if sidebar != null then
-                       add sidebar.as(not null)
-               end
-               add content
-               add "</div>"
-               if footer != null then
-                       add footer.as(not null)
-               end
-               for script in scripts do
-                       add script
-               end
-               add "</body>"
-               add "</html>"
-       end
-end
-
-# general layout elements
-
-# <head> tag
-class TplHead
-       super Template
-
-       var title: String
-       var shareurl: String
-
-       init(title, shareurl: String) do
-               self.title = title
-               self.shareurl = shareurl
-       end
-
-       redef fun rendering do
-               add """
-<meta charset="utf-8"/>
-<link rel="stylesheet" href="{{{shareurl}}}/css/main.css" type="text/css"/>
-<link rel="stylesheet" href="{{{shareurl}}}/css/Nitdoc.UI.css" type="text/css"/>
-<link rel="stylesheet" href="{{{shareurl}}}/css/Nitdoc.QuickSearch.css" type="text/css"/>
-<link rel="stylesheet" href="{{{shareurl}}}/css/Nitdoc.GitHub.css" type="text/css"/>
-<link rel="stylesheet" href="{{{shareurl}}}/css/Nitdoc.ModalBox.css" type="text/css"/>
-<title>{{{title}}}</title>"""
-       end
-end
-
-# Top bar menu
-class TplTopMenu
-       super Template
-
-       private var elts = new Array[Streamable]
-
-       redef fun rendering do
-               add "<header>"
-               add "<nav class='main'>"
-               if not elts.is_empty then
-                       add "<ul>"
-                       for elt in elts do add(elt)
-                       add "</ul>"
-               end
-               add "</nav>"
-               add "</header>"
-       end
-
-       fun add_elt(href, name: String, is_active: Bool) do
-               elts.add(new TplTopMenuElt(href, name, is_active))
-       end
-
-       fun add_raw(content: Streamable) do
-               elts.add(content)
-       end
-end
-
-# A topmenu element
-private class TplTopMenuElt
-       super Template
-
-       var href: String
-       var name: String
-       var is_active: Bool
-
-       init(href, name: String, is_active: Bool) do
-               self.href = href
-               self.name = name
-               self.is_active = is_active
-       end
-
-       redef fun rendering do
-               if is_active then
-                       add """<li class="current">{{{name}}}</li>"""
-               else
-                       add """<li><a href="{{{href}}}">{{{name}}}</a></li>"""
-               end
-       end
-end
-
-# <footer> element
-class TplFooter
-       super Template
-
-       var content: Streamable writable
-
-       init(content: Streamable) do self.content = content
-
-       redef fun rendering do
-               add "<footer>"
-               add content
-               add "</footer>"
-       end
-end
-
-# sidebar layout
-
-# Sidebar <div>
-class TplSidebar
-       super Template
-
-       var boxes = new Array[TplSidebarBox]
-
-       redef fun rendering do
-               add """"<div class="sidebar">"""
-               for box in boxes do add box
-               add "</div>"
-       end
-end
-
-# A box that can be added to sidebar
-class TplSidebarBox
-       super Template
-
-       var name: String
-       var elts = new Array[TplSidebarGroup]
-
-       init(name: String) do self.name = name
-
-       redef fun rendering do
-               add """<nav class"properties filterable">"""
-               add """    <h3>{{{name}}}</h3>"""
-               for elt in elts do add elt
-               add "</nav>"
-       end
-end
-
-# A sidebar box group
-class TplSidebarGroup
-       super Template
-
-       var name: String
-       private var elts = new Array[Template]
-
-       init(name: String) do self.name = name
-
-       redef fun rendering do
-               if elts.is_empty then return
-               add "<h4>{name}</h4>"
-               add "<ul>"
-               for elt in elts do add elt
-               add "</ul>"
-       end
-
-       fun add_elt(content: Streamable, classes: Array[Streamable]) do
-               var tpl = new Template
-               tpl.add "<li {classes.join(" ")}>"
-               tpl.add content
-               tpl.add "</li>"
-               elts.add(tpl)
-       end
-
-       fun add_bullet(text, title, content: Streamable, classes: Array[Streamable]) do
-               var tpl = new Template
-               tpl.add "<span title='{title}'>{text}</span>"
-               tpl.add content
-               add_elt(tpl, classes)
-       end
-end
-
-# page layouts
-
-# Layout for Overview page
-class TplOverviewPage
-       super Template
-
-       var title: nullable Streamable writable
-       var text: nullable Streamable writable
-       var graph: nullable TplGraph writable
-       var modules = new Array[Streamable]
-       init do end
-
-       redef fun rendering do
-               add "<div class='content fullpage'>"
-               if title != null then add "<h1>{title}</h1>"
-               if text != null then add "<article class='overview'>{text}</article>"
-
-               if not modules.is_empty then
-                       add "<article class='overview'>"
-                       add "<h2>Modules</h2>"
-                       add "<ul>"
-                       for m in modules do
-                               add "<li>"
-                               add m
-                               add "</li>"
-                       end
-                       add "</ul>"
-               end
-               if not graph == null then add graph.as(not null)
-               add "</article>"
-               add "</div>"
-       end
-end
-
-# Layout for Search page
-class TplSearchPage
-       super Template
-
-       var title: nullable Streamable writable
-       var modules = new Array[Streamable]
-       var classes = new Array[Streamable]
-       var props = new Array[Streamable]
-       init do end
-
-       redef fun rendering do
-               add "<div class='content fullpage'>"
-               if title != null then add "<h1>{title}</h1>"
-               if not modules.is_empty then
-                       add "<article class='modules filterable'>"
-                       add "<h2>Modules</h2>"
-                       add "<ul>"
-                       for m in modules do
-                               add "<li>"
-                               add m
-                               add "</li>"
-                       end
-                       add "</ul>"
-                       add "</article>"
-               end
-               if not classes.is_empty then
-                       add "<article class='classes filterable'>"
-                       add "<h2>Classes</h2>"
-                       add "<ul>"
-                       for c in classes do
-                               add "<li>"
-                               add c
-                               add "</li>"
-                       end
-                       add "</ul>"
-                       add "</article>"
-               end
-               if not props.is_empty then
-                       add "<article class='properties filterable'>"
-                       add "<h2>Properties</h2>"
-                       add "<ul>"
-                       for p in props do
-                               add "<li>"
-                               add p
-                               add "</li>"
-                       end
-                       add "</ul>"
-                       add "</article>"
-               end
-               add "</div>"
-       end
-end
-
-# Layout for Module page
-class TplModulePage
-       super Template
-
-       var title: nullable Streamable writable
-       var subtitle: nullable Streamable writable
-       var definition: nullable TplDefinition writable
-       var graph: nullable TplGraph writable
-       var intros = new Array[TplArticle]
-       var redefs = new Array[TplArticle]
-       init do end
-
-       redef fun rendering do
-               add "<div class='content'>"
-               if title != null then
-                       add "<h1>"
-                       add title.as(not null)
-                       add "</h1>"
-               end
-               if subtitle != null then
-                       add "<div class='subtitle info'>"
-                       add subtitle.as(not null)
-                       add "</div>"
-               end
-               if definition != null then add definition.as(not null)
-               if graph != null then add graph.as(not null)
-               if not intros.is_empty then
-                       add "<section class='classes'>"
-                       add "<h2 class='section-header'>Introduced classes</h2>"
-                       for intro in intros do add intro
-                       add "</section>"
-               end
-               if not redefs.is_empty then
-                       add "<section class='classes'>"
-                       add "<h2 class='section-header'>Refined classes</h2>"
-                       for rdef in redefs do add rdef
-                       add "</section>"
-               end
-               add "</div>"
-       end
-end
-
-# Layout for Class page
-class TplClassPage
-       super Template
-
-       var title: nullable Streamable writable
-       var subtitle: nullable Streamable writable
-       var definition: nullable TplDefinition writable
-       var graph: nullable TplGraph writable
-       var concerns: nullable TplConcernList writable
-       var types = new Array[TplArticle]
-       var inits = new Array[TplArticle]
-       var methods = new Array[Streamable]
-
-       init do end
-
-       redef fun rendering do
-               add "<div class='content'>"
-               if title != null then
-                       add "<h1>"
-                       add title.as(not null)
-                       add "</h1>"
-               end
-               if subtitle != null then
-                       add "<div class='subtitle info'>"
-                       add subtitle.as(not null)
-                       add "</div>"
-               end
-               if definition != null then add definition.as(not null)
-               if graph != null then add graph.as(not null)
-
-               if concerns != null then
-                       add "<section class='concerns'>"
-                       add "<h2 class='section-header'>Concerns</h2>"
-                       add concerns.as(not null)
-                       add "</section>"
-               end
-               if not types.is_empty then
-                       add "<section class='types'>"
-                       add"<h2>Virtual Types</h2>"
-                       for t in types do add t
-                       add "</section>"
-               end
-               if not inits.is_empty then
-                       add "<section class='constructors'>"
-                       add"<h2>Constructors</h2>"
-                       for i in inits do add i
-                       add "</section>"
-               end
-               if not methods.is_empty then
-                       add "<section class='methods'>"
-                       add"<h2>Methods</h2>"
-                       for m in methods do add m
-                       add "</section>"
-               end
-               add "</div>"
-       end
-end
-
-# layout parts
-
-# A HTML tag attribute
-#  `<tag attr="value">`
-class TagAttribute
-       super Template
-
-       var name: String
-       var value: nullable String
-
-       init(name: String, value: nullable String) do
-               self.name = name
-               self.value = value
-       end
-
-       redef fun rendering do
-               if value == null then
-                       add(" {name}")
-               else
-                       add(" {name}=\"{value}\"")
-               end
-       end
-end
-
-# JS Script template
-class TplScript
-       super Template
-
-       var attrs = new Array[TagAttribute]
-       var content: nullable Streamable writable
-
-       init do
-               attrs.add(new TagAttribute("type", "text/javascript"))
-       end
-
-       redef fun rendering do
-               add "<script"
-               for attr in attrs do add attr
-               add ">"
-               if content != null then add content.as(not null)
-               add "</script>"
-       end
-end
-
-# JS script for Piwik Tracker
-class TplPiwikScript
-       super TplScript
-
-       var tracker_url: String
-       var site_id: String
-
-       init(tracker_url, site_id: String) do
-               super
-               self.tracker_url = tracker_url
-               self.site_id = site_id
-       end
-
-       redef fun rendering do
-               var tpl = new Template
-               tpl.add "<!-- Piwik -->"
-               tpl.add "var _paq = _paq || [];"
-               tpl.add " _paq.push([\"trackPageView\"]);"
-               tpl.add " _paq.push([\"enableLinkTracking\"]);"
-               tpl.add "(function() \{"
-               tpl.add " var u=((\"https:\" == document.location.protocol) ? \"https\" : \"http\") + \"://{tracker_url}\";"
-               tpl.add " _paq.push([\"setTrackerUrl\", u+\"piwik.php\"]);"
-               tpl.add " _paq.push([\"setSiteId\", \"{site_id}\"]);"
-               tpl.add " var d=document, g=d.createElement(\"script\"), s=d.getElementsByTagName(\"script\")[0]; g.type=\"text/javascript\";"
-               tpl.add " g.defer=true; g.async=true; g.src=u+\"piwik.js\"; s.parentNode.insertBefore(g,s);"
-               tpl.add "\})();"
-               content = tpl
-               super
-       end
-end
-
-# Graph image with clicable map
-class TplGraph
-       super Template
-
-       var name: String
-       var alt: String
-       var map: String
-
-       init(name, alt, map: String) do
-               self.name = name
-               self.alt = alt
-               self.map = map
-       end
-
-       redef fun rendering do
-               add "<article class='graph'>"
-               add "<img src='{name}.png' usemap='#{name}' style='margin:auto' alt='{alt}'/>"
-               add "</article>"
-               add map
-       end
-end
-
-# A page article (used for module, class, prop description)
-class TplArticle
-       super Template
-
-       var id: String writable
-       var classes = new HashSet[String]
-       var title: Template writable
-       var subtitle: Template writable
-       var content: nullable Template writable
-
-       init do end
-
-       redef fun rendering do
-               add "<article class='{classes.join(" ")}' id='{id}'>"
-               add "<h3 class='signature'>"
-               add title
-               add "</h3>"
-               add "<div class='info'>"
-               add subtitle
-               add "</div>"
-               if content != null then
-                       add content.as(not null)
-               end
-               add "</article>"
-       end
-end
-
-# A module / class / prop definition
-# Contains:
-# * namespace of the definition
-# * comment
-# * link to location
-class TplDefinition
-       super Template
-
-       var comment: nullable TplComment writable
-       var namespace: Streamable writable
-       var location: nullable Streamable writable
-       var github_area: nullable TplGithubArea writable
-
-       init do end
-
-       redef fun rendering do
-               add "<div class='description'>"
-               if github_area != null then
-                       add github_area.as(not null)
-               end
-               if comment == null then
-                       add "<p class='info inheritance'>"
-                       add "<span class=\"noComment\">no comment for </span>"
-               else
-                       add comment.as(not null)
-                       add "<p class='info inheritance'>"
-               end
-               add "definition in "
-               add namespace
-               if location != null then
-                       add " "
-                       add location.as(not null)
-               end
-               add "</p>"
-               add "</div>"
-       end
-end
-
-# Textarea used by Github comment edition plugin to store comments
-class TplGithubArea
-       super Template
-
-       var raw_comment: String writable
-       var raw_namespace: String writable
-       var location: String writable
-
-       init(raw_comment, raw_namespace, location: String) do
-               self.raw_comment = raw_comment
-               self.raw_namespace = raw_namespace
-               self.location = location
-       end
-
-       redef fun rendering do
-               add "<textarea"
-               add " class='baseComment'"
-               add " data-comment-namespace='{raw_namespace}'"
-               add " data-comment-location='{location}'>"
-               add raw_comment
-               add "</textarea>"
-       end
-end
-
-# Comment box
-class TplComment
-       super Template
-
-       var comment: Streamable writable
-
-       init(comment: Streamable) do self.comment = comment
-
-       redef fun rendering do
-               add "<div class='comment'>"
-               add comment
-               add "</div>"
-       end
-end
-
-# Comment box (for synopsys)
-class TplShortComment
-       super TplComment
-
-       redef fun rendering do
-               add "<div class='comment'>"
-               add "<div class='nitdoc'>"
-               add comment
-               add "</div>"
-               add "</div>"
-       end
-end
-
-# A html link (with optional title)
-class TplLink
-       super Template
-
-       var href: String writable
-       var text: String writable
-       var title: nullable String writable
-
-       init do end
-
-       redef fun rendering do
-               add "<a href=\""
-               add href
-               add "\""
-               if title != null then
-                       add " title=\""
-                       add title.as(not null)
-                       add "\""
-               end
-               add ">"
-               add text
-               add "</a>"
-       end
-end
-
-# Element to display in concerns list
-class TplConcernElt
-       super Template
-end
-
-# List of concerns
-class TplConcernList
-       super TplConcernElt
-
-       var elts = new Array[TplConcernElt]
-
-       redef fun rendering do
-               if elts.is_empty then return
-               add "<ul>"
-               for elt in elts do
-                       add elt
-               end
-               add "</ul>"
-       end
-end
-
-# Element of a list of concerns
-class TplConcernListElt
-       super TplConcernElt
-
-       var anchor: String writable
-       var name: String writable
-       var comment: nullable String writable
-
-       init do end
-
-       redef fun rendering do
-               add "<li>"
-               add "<a href=\"{anchor}\">{name}</a>"
-               if comment != null then
-                       add ": {comment.as(not null)}"
-               end
-               add "</li>"
-       end
-end
-
-# Section for topconcern
-class TplTopConcern
-       super Template
-
-       var anchor: String writable
-       var concern: TplLink writable
-
-       init do end
-
-       redef fun rendering do
-               add "<a id=\"{anchor}\"></a>"
-               add "<h3 class=\"concern-toplevel\">Methods refined in "
-               add concern
-               add "</h3>"
-       end
-end
-
-# Section for subconcern
-class TplConcern
-       super Template
-
-       var anchor: String writable
-       var concern: TplLink writable
-       var comment: nullable String writable
-
-       init do end
-
-       redef fun rendering do
-               add "<a id=\"{anchor}\"></a>"
-               add "<p class=\"concern-doc\">"
-               add concern
-               if comment != null then
-                       add ": "
-                       add comment.as(not null)
-               end
-               add "</p>"
-       end
-end
index c44773c..cd400bd 100644 (file)
@@ -17,46 +17,19 @@ module highlight
 
 import modelize_property
 import frontend
-import parser_util
 import html
+import pipeline
+import astutil
 
 # Visitor used to produce a HTML tree based on a AST on a `Source`
 class HighlightVisitor
-       super Visitor
-
        # The root of the HTML hierarchy
        var html = new HTMLTag("span")
 
-       private var token_head: HTMLTag
-
-       private var prod_head: HTMLTag
-
-       private var prod_root: nullable HTMLTag
-
        # Is the HTML include a nested `<span class"{type_of_node}">` element for each `ANode` of the AST?
        # Used to have a really huge and verbose HTML (mainly for debug)
        var with_ast writable = false
 
-       # Enter in a new node
-       # Exit is automatic
-       fun enter(n: HTMLTag)
-       do
-               if prod_root != null then
-                       prod_head.add(n)
-                       prod_head = n
-               else
-                       prod_root = n
-                       prod_head = n
-               end
-       end
-
-       # The position in the source file.
-       # Used to print parts of the source betwen tokens of the AST
-       private var pos = 0
-
-       # The line position in the source file.
-       private var line_pos = 0
-
        # The first line to generate, null if start at the first line
        var first_line: nullable Int writable = null
 
@@ -66,88 +39,125 @@ class HighlightVisitor
        init
        do
                html.add_class("nitcode")
-               token_head = html
-               prod_head = html
        end
 
-       # Used to remember the first node, thus knowing when the whole visit is over
-       private var first_node: nullable ANode
-
-       private var seen_token = new HashSet[Token]
-
-       private fun process_upto_token(node: Token)
-       do
-               # recursively process previous tokens
-               var prev = node.prev_token
-               if prev != null and not seen_token.has(prev) then
-                       process_upto_token(prev)
-                       prev.accept_highlight_visitor(self)
-               end
-
-               # Add text between `last_token` and `node`
-               var pstart = node.location.pstart
-               var line_start = node.location.line_start
-               var line_end = node.location.line_end
-               if pos < pstart and (first_line == null or first_line <= line_start) and (last_line == null or last_line >= line_end) then
-                       var text = node.location.file.string.substring(pos, pstart-pos)
-                       token_head.append(text)
-                       #node.debug("WRT: {token_head.classes} << '{text.escape_to_c}' ")
-               end
-               pos = node.location.pend + 1
-               if pos < pstart then
-                       node.debug("pos={pos}, pstart={pstart}, pend={node.location.pend}")
-               end
-
-               seen_token.add node
-       end
+       fun enter_visit(n: ANode)
+       do
+               n.parentize_tokens
+               var s = n.location.file
+               htmlize(s.first_token.as(not null), s.last_token.as(not null))
+       end
+
+       # Produce HTML between two tokens
+       protected fun htmlize(first_token, last_token: Token)
+       do
+               var stack2 = new Array[HTMLTag]
+               var stack = new Array[Prod]
+               var closes = new Array[Prod]
+               var line = 0
+               var c: nullable Token = first_token
+               var hv = new HighlightVisitor
+               while c != null do
+                       var starting
+
+                       # Handle start of line
+                       var cline = c.location.line_start
+                       if cline != line then
+                               # Handle starting block productions,
+                               # Because c could be a detached token, get prods in
+                               # the first AST token
+                               var c0 = c.first_token_in_line
+                               starting = null
+                               if c0 != null then starting = c0.starting_prods
+                               if starting != null then for p in starting do
+                                       if not p.is_block then continue
+                                       var tag = p.make_tag(hv)
+                                       if tag == null then continue
+                                       tag.add_class("foldable")
+                                       var infobox = p.infobox(hv)
+                                       if infobox != null then tag.attach_infobox(infobox)
+                                       stack2.add(html)
+                                       html.add tag
+                                       html = tag
+                                       stack.add(p)
+                               end
 
-       # Dubuging method
-       private fun where(node: ANode, tag: String)
-       do
-               var pr = prod_root
-               if pr == null then
-                       node.debug "{tag}-> {token_head.classes} : {prod_head.classes}"
-               else
-                       node.debug "{tag}-> {token_head.classes} : {pr.classes}..{prod_head.classes}"
-               end
-       end
+                               # Add a div for the whole line
+                               var tag = new HTMLTag("span")
+                               tag.attrs["id"] = "L{cline}"
+                               tag.classes.add "line"
+                               stack2.add(html)
+                               html.add tag
+                               html = tag
+                               line = cline
+                       end
 
-       redef fun visit(node)
-       do
-               if first_node == null then first_node = node
+                       # Add the blank, verbatim
+                       html.add_raw_html c.blank_before
+
+                       # Handle starting span production
+                       starting = c.starting_prods
+                       if starting != null then for p in starting do
+                               if not p.is_span then continue
+                               var tag = p.make_tag(hv)
+                               if tag == null then continue
+                               var infobox = p.infobox(hv)
+                               if infobox != null then tag.attach_infobox(infobox)
+                               stack2.add(html)
+                               html.add tag
+                               html = tag
+                               stack.add(p)
+                       end
 
-               if node isa Token then
-                       process_upto_token(node)
+                       # Add the token
+                       if c isa TEol then 
+                               html.append "\n"
+                       else
+                               var tag = c.make_tag(hv)
+                               var pa = c.parent
+                               var infobox = null
+                               if c isa TId or c isa TClassid or c isa TAttrid or c isa TokenLiteral or c isa TokenOperator then
+                                       assert c != null
+                                       if pa != null then infobox = pa.decorate_tag(hv, tag, c)
+                               else if c isa TComment and pa isa ADoc then
+                                       infobox = pa.decorate_tag(hv, tag, c)
+                               end
+                               if infobox != null then tag.attach_infobox(infobox)
+                               html.add tag
+                       end
 
-                       #where(node, "TOK")
-                       var pr = prod_root
-                       if pr != null then
-                               #node.debug("ADD: {token_head.classes} << {pr.classes} ")
-                               token_head.add(pr)
-                               token_head = prod_head
-                               prod_root = null
+                       # Handle ending span productions
+                       var ending = c.ending_prods
+                       if ending != null then for p in ending do
+                               if not p.is_span then continue
+                               if stack.is_empty or p != stack.last then continue
+                               stack.pop
+                               html = stack2.pop
                        end
-               end
 
-               var oldph = prod_head
-               #where(node, " IN")
-               node.accept_highlight_visitor(self)
-               #where(node, "OUT")
-               var pr = prod_root
-               if pr == null then
-                       assert token_head == prod_head
-               else
-                       assert token_head != prod_head
-                       token_head.add(pr)
-                       prod_root = null
-               end
-               prod_head = oldph
-               token_head = oldph
-               #where(node, " IS")
+                       # Handle end of line and end of file
+                       var n = c.next_token
+                       if c == last_token then n = null
+                       if n == null or n.location.line_start != line  then
+                               # closes the line div
+                               html = stack2.pop
+
+                               # close the block production divs
+                               var c0 = c.last_token_in_line
+                               ending = null
+                               if c0 != null then ending = c0.ending_prods
+                               if ending != null then for p in ending do
+                                       if not p.is_block then continue
+                                       if stack.is_empty or p != stack.last then continue
+                                       stack.pop
+                                       html = stack2.pop
+                               end
+                       end
 
-               if node == first_node then
-                       html.append(node.location.file.string.substring_from(pos))
+                       c = n
                end
+               assert stack.is_empty
+               assert stack2.is_empty
        end
 
        # Return a default CSS content related to CSS classes used in the `html` tree.
@@ -155,9 +165,12 @@ class HighlightVisitor
        fun css_content: String
        do
                return """
-.nitcode a { color: inherit; text-decoration: inherit; } /* hide links */
-.nitcode a:hover { text-decoration: underline; } /* underline links */
-.nitcode span[title]:hover { text-decoration: underline; } /* underline titles */
+.nitcode a { color: inherit; cursor:pointer; }
+.nitcode .popupable:hover { text-decoration: underline; cursor:help; } /* underline titles */
+pre.nitcode .foldable { display: block } /* for block productions*/
+pre.nitcode .line{ display: block } /* for lines */
+pre.nitcode .line:hover{ background-color: #FFFFE0; } /* current line */
+.nitcode :target { background-color: #FFF3C2 } /* target highlight*/
 /* lexical raw tokens. independent of usage or semantic: */
 .nitcode .nc_c { color: gray; font-style: italic; } /* comment */
 .nitcode .nc_d { color: #3D8127; font-style: italic; } /* documentation comments */
@@ -184,71 +197,432 @@ class HighlightVisitor
 .nitcode .nc_vt { font-style: italic; } /* virtual type or formal type */
 
 .nitcode .nc_error { border: 1px red solid;} /* not used */
+.popover { max-width: 800px !important; }
 """
        end
+
+       # Additional content to inject in the <head> tag
+       # Note: does not include `css_content`; handle it yourself.
+       fun head_content: String
+       do
+               return """<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">\n"""
+       end
+
+       # Additional content to inject just before the closing </body> tag
+       fun foot_content: String
+       do
+               return """
+<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
+<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
+<script>$(".popupable").popover({html:true, placement:'top'})/*initialize bootstrap popover*/</script>"""
+       end
 end
 
-redef class ANode
-       private fun accept_highlight_visitor(v: HighlightVisitor)
+redef class HTMLTag
+       # Attach the infobox to the node by using BootStrap popover
+       fun attach_infobox(infobox: HInfoBox)
        do
-               if v.with_ast then
-                       var res = new HTMLTag("span")
-                       res.add_class(class_name)
-                       v.enter res
+               classes.add("popupable")
+               attrs["title"] = infobox.title
+               var href = infobox.href
+               if href != null then
+                       attrs["data-title"] = """<a href="{{{href}}}">{{{infobox.title}}}</a>"""
                end
-               visit_all(v)
+               attrs["data-content"] = infobox.content.write_to_string
+               attrs["data-toggle"] = "popover"
+       end
+end
+
+
+# A generic information container that can be used to decorate AST entities
+class HInfoBox
+       # The visitor used for contextualisation, if needed 
+       var visitor: HighlightVisitor
+
+       # A short title for the AST element
+       var title: String
+
+       # The primary link where the entity points
+       # null if no link
+       var href: nullable String = null
+
+       # The content of the popuped infobox
+       var content = new HTMLTag("div")
+
+       # Append a new field in the popuped infobox
+       fun new_field(title: String): HTMLTag
+       do
+               content.open("b").text(title)
+               content.append(" ")
+               var res = content.open("span")
+               content.open("br")
+               return res
        end
-       private fun decorate_tag(res: HTMLTag, token: Token)
+
+       # Append a new dropdown in the popuped content
+       fun new_dropdown(title, text: String): HTMLTag
+       do
+               content.add_raw_html """<div class="dropdown"> <a data-toggle="dropdown" href="#"><b>"""
+               content.append(title)
+               content.add_raw_html "</b> "
+               content.append(text)
+               content.add_raw_html """<span class="caret"></span></a>"""
+               var res = content.open("ul").add_class("dropdown-menu").attr("role", "menu").attr("aria-labelledby", "dLabel")
+               content.add_raw_html "</div>"
+               return res
+       end
+end
+
+##
+
+# Model entity or whatever that can produce an infobox
+interface HInfoBoxable
+       # An new infobox documenting the entity
+       fun infobox(v: HighlightVisitor): HInfoBox is abstract
+
+       # A human-readable hyper-text for the entity
+       fun linkto: HTMLTag is abstract
+end
+
+redef class MDoc
+       # Append an entry for the doc in the given infobox
+       fun fill_infobox(res: HInfoBox)
+       do
+               if content.length < 2 then
+                       res.new_field("doc").text(content.first)
+                       return
+               end
+               var c = res.new_dropdown("doc", content.first)
+               for x in content.iterator.skip_head(1) do
+                       c.append x
+                       c.add_raw_html "<br>"
+               end
+       end
+end
+
+redef class MEntity
+       super HInfoBoxable
+end
+
+redef class MModule
+       redef fun infobox(v)
+       do
+               var res = new HInfoBox(v, "module {name}")
+               res.href = href
+               res.new_field("module").add(linkto)
+               var mdoc = self.mdoc
+               if mdoc != null then mdoc.fill_infobox(res)
+               if in_importation.greaters.length > 1 then
+                       var c = res.new_dropdown("imports", "{in_importation.greaters.length-1} modules")
+                       for x in in_importation.greaters do
+                               if x == self then continue
+                               c.open("li").add x.linkto
+                       end
+               end
+               return res
+       end
+
+       fun href: String
+       do
+               return name + ".html"
+       end
+
+       redef fun linkto do return linkto_text(name)
+
+       # Link to the entitiy with a specific text
+       fun linkto_text(text: String): HTMLTag
+       do
+               return (new HTMLTag("a")).attr("href", href).text(text)
+       end
+end
+
+redef class MClassDef
+       redef fun infobox(v)
+       do
+               var res = new HInfoBox(v, "class {mclass.name}")
+               res.href = href
+               if is_intro then
+                       res.new_field("class").text(mclass.name)
+               else
+                       res.new_field("redef class").text(mclass.name)
+                       res.new_field("intro").add mclass.intro.linkto_text("in {mclass.intro.mmodule.to_s}")
+               end
+               var mdoc = self.mdoc
+               if mdoc == null then mdoc = mclass.intro.mdoc
+               if mdoc != null then mdoc.fill_infobox(res)
+
+               if in_hierarchy.greaters.length > 1 then
+                       var c = res.new_dropdown("hier", "super-classes")
+                       for x in in_hierarchy.greaters do
+                               if x == self then continue
+                               if not x.is_intro then continue
+                               c.open("li").add x.linkto
+                       end
+               end
+               if in_hierarchy.smallers.length > 1 then
+                       var c = res.new_dropdown("hier", "sub-classes")
+                       for x in in_hierarchy.smallers do
+                               if x == self then continue
+                               if not x.is_intro then continue
+                               c.open("li").add x.linkto
+                       end
+               end
+               if mclass.mclassdefs.length > 1 then
+                       var c = res.new_dropdown("redefs", "refinements")
+                       for x in mclass.mclassdefs do
+                               if x == self then continue
+                               c.open("li").add x.linkto_text("in {x.mmodule}")
+                       end
+               end
+               return res
+       end
+
+       fun href: String
+       do
+               return mmodule.href + "#" + to_s
+       end
+
+       redef fun linkto do return linkto_text(mclass.name)
+
+       # Link to the entitiy with a specific text
+       fun linkto_text(text: String): HTMLTag
+       do
+               return (new HTMLTag("a")).attr("href", href).text(text)
+       end
+end
+
+redef class MPropDef
+       redef fun infobox(v)
+       do
+               var res = new HInfoBox(v, to_s)
+               res.href = href
+               if self isa MMethodDef then
+                       res.new_field("fun").append(mproperty.name).add msignature.linkto
+               else if self isa MAttributeDef then
+                       res.new_field("fun").append(mproperty.name).add static_mtype.linkto
+               else if self isa MVirtualTypeDef then
+                       res.new_field("add").append(mproperty.name).add bound.linkto
+               else
+                       res.new_field("wat?").append(mproperty.name)
+               end
+
+               if is_intro then
+               else
+                       res.new_field("intro").add mproperty.intro.linkto_text("in {mproperty.intro.mclassdef}")
+               end
+               var mdoc = self.mdoc
+               if mdoc == null then mdoc = mproperty.intro.mdoc
+               if mdoc != null then mdoc.fill_infobox(res)
+               if mproperty.mpropdefs.length > 1 then
+                       var c = res.new_dropdown("redef", "redefinitions")
+                       for x in mproperty.mpropdefs do
+                               c.open("li").add x.linkto_text("in {x.mclassdef}")
+                       end
+               end
+
+               return res
+       end
+
+       fun href: String
+       do
+               return self.mclassdef.mmodule.href + "#" + self.to_s
+       end
+
+       redef fun linkto do return linkto_text(mproperty.name)
+
+       # Link to the entitiy with a specific text
+       fun linkto_text(text: String): HTMLTag
+       do
+               return (new HTMLTag("a")).attr("href", href).text(text)
+       end
+end
+
+redef class MClassType
+       redef fun infobox(v)
+       do
+               var res = new HInfoBox(v, to_s)
+               res.href = mclass.intro.href
+               res.new_field("class").add mclass.intro.linkto
+               var mdoc = mclass.mdoc
+               if mdoc == null then mdoc = mclass.intro.mdoc
+               if mdoc != null then mdoc.fill_infobox(res)
+               return res
+       end
+       redef fun linkto
+       do
+               return mclass.intro.linkto
+       end
+end
+redef class MVirtualType
+       redef fun infobox(v)
+       do
+               var res = new HInfoBox(v, to_s)
+               res.href = mproperty.intro.href
+               var p = mproperty
+               var pd = p.intro
+               res.new_field("virtual type").add pd.linkto
+               var mdoc = pd.mdoc
+               if mdoc != null then mdoc.fill_infobox(res)
+               return res
+       end
+       redef fun linkto
+       do
+               return mproperty.intro.linkto
+       end
+end
+redef class MParameterType
+       redef fun infobox(v)
+       do
+               var res = new HInfoBox(v, to_s)
+               var name = mclass.intro.parameter_names[rank]
+               res.new_field("parameter type").append("{name} from class ").add mclass.intro.linkto
+               return res
+       end
+       redef fun linkto
+       do
+               var name = mclass.intro.parameter_names[rank]
+               return (new HTMLTag("span")).text(name)
+       end
+end
+
+redef class MNullableType
+       redef fun infobox(v)
+       do
+               return mtype.infobox(v)
+       end
+       redef fun linkto
+       do
+               var res = new HTMLTag("span")
+               res.append("nullable ").add(mtype.linkto)
+               return res
+       end
+end
+
+redef class MSignature
+       redef fun linkto
+       do
+               var res = new HTMLTag("span")
+               var first = true
+               if not mparameters.is_empty then
+                       res.append "("
+                       for p in mparameters do
+                               if first then
+                                       first = false
+                               else
+                                       res.append ", "
+                               end
+                               res.append p.name
+                               res.append ": "
+                               res.add p.mtype.linkto
+                       end
+                       res.append ")"
+               end
+               var ret = return_mtype
+               if ret != null then
+                       res.append ": "
+                       res.add ret.linkto
+               end
+               return res
+       end
+end
+
+redef class CallSite
+       super HInfoBoxable
+       redef fun infobox(v)
+       do
+               var res = new HInfoBox(v, "call {mpropdef}")
+               res.href = mpropdef.href
+               res.new_field("call").add(mpropdef.linkto).add(msignature.linkto)
+               if mpropdef.is_intro then
+               else
+                       res.new_field("intro").add mproperty.intro.linkto_text("in {mproperty.intro.mclassdef}")
+               end
+               var mdoc = mpropdef.mdoc
+               if mdoc == null then mdoc = mproperty.intro.mdoc
+               if mdoc != null then mdoc.fill_infobox(res)
+
+               return res
+       end
+       redef fun linkto
+       do
+               return mpropdef.linkto
+       end
+end
+
+redef class Variable
+       super HInfoBoxable
+       redef fun infobox(v)
+       do
+               if declared_type == null then
+                       var res = new HInfoBox(v, "{name}")
+                       res.new_field("local var").append("{name}")
+                       return res
+               end
+               var res = new HInfoBox(v, "{name}: {declared_type}")
+               res.new_field("local var").append("{name}:").add(declared_type.linkto)
+               return res
+       end
+       redef fun linkto
+       do
+               return (new HTMLTag("span")).text(name)
+       end
+end
+
+
+##
+
+redef class ANode
+       # Optionally creates a tag that encapsulate the AST element on HTML rendering
+       protected fun make_tag(v: HighlightVisitor): nullable HTMLTag do return null
+
+       # Add aditionnal information on a child-token and return an additionnal HInfoBox on it
+       protected fun decorate_tag(v: HighlightVisitor, res: HTMLTag, token: Token): nullable HInfoBox
        do
                #debug("no decoration for {token.inspect}")
                #res.add_class("nc_error")
+               return null
        end
+
+       # Return a optional infobox
+       fun infobox(v: HighlightVisitor): nullable HInfoBox do return null
 end
 
 redef class AStdClassdef
-       redef fun accept_highlight_visitor(v)
+       redef fun make_tag(v)
        do
                var res = new HTMLTag("span")
                res.add_class("nc_cdef")
                var md = mclassdef
-               if md != null then
-                       var a = new HTMLTag("a")
-                       a.attr("id", md.to_s)
-                       res.add(a)
-               end
-               v.enter res
-               super
+               if md != null then res.attr("id", md.to_s)
+               return res
        end
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
                res.add_class("nc_def")
 
                var md = mclassdef
-               if md == null then return
-               var mc = md.mclass
-               res.attrs["title"] = mc.full_name
-               var mi = mc.intro
-               if md != mi then
-                       res.attrs["link"] = mi.mmodule.name + ".html#" + mi.to_s
-               end
+               if md == null then return null
+               return md.infobox(v)
        end
 end
 redef class APropdef
-       redef fun accept_highlight_visitor(v)
+       redef fun make_tag(v)
        do
                var res = new HTMLTag("span")
                res.add_class("nc_pdef")
                var mpd
                mpd = mpropdef
-               if mpd != null then res.add(tag(mpd))
+               if mpd != null then
+                       #res.add(tag(mpd))
+                       res.attr("id", mpd.to_s)
+               end
                if self isa AAttrPropdef then
                        mpd = mreadpropdef
                        if mpd != null then res.add(tag(mpd))
                        mpd = mwritepropdef
                        if mpd != null then res.add(tag(mpd))
                end
-               v.enter res
-               super
+               return res
        end
 
        private fun tag(mpd: MPropDef): HTMLTag
@@ -262,39 +636,14 @@ end
 redef class Token
        # Produce an HTMLTag with the correct contents and CSS classes
        # Subclasses can redefine it to decorate the tag
-       protected fun make_tag(v: HighlightVisitor): HTMLTag
+       redef fun make_tag(v: HighlightVisitor): HTMLTag
        do
                var res = new HTMLTag("span")
                res.text(text)
                return res
        end
-
-       # Use `empty_tag` to create the tag ; then fill it and add it to the html
-       redef fun accept_highlight_visitor(v)
-       do
-               var fl = v.first_line
-               if fl != null and fl > location.line_start then return
-
-               var ll = v.last_line
-               if ll != null and ll < location.line_end then return
-
-               var n = make_tag(v)
-               if n.attrs.is_empty and n.classes.is_empty then
-                       for c in n.children do
-                               v.token_head.add(c)
-                       end
-               else if n.attrs.has_key("link") then
-                       var a = new HTMLTag("a")
-                       a.attrs["href"] = n.attrs["link"]
-                       n.attrs.keys.remove("link")
-                       a.add(n)
-                       v.token_head.add(a)
-               else
-                       v.token_head.add(n)
-               end
-               #debug("WRT: {v.token_head.classes} << '{text.escape_to_c}' ")
-       end
 end
+
 redef class TokenKeyword
        redef fun make_tag(v)
        do
@@ -308,155 +657,139 @@ redef class TokenOperator
        do
                var res = super
                var p = parent
-               if p != null then p.decorate_tag(res, self)
+               if p != null then p.decorate_tag(v, res, self)
                res.add_class("nc_o")
                return res
        end
 end
 
-redef class Variable
-       private fun decorate_tag(res: HTMLTag, token: Token)
-       do
-               if declared_type == null then return
-               res.attrs["title"] = name + ": " + declared_type.to_s
-       end
-end
-
 redef class AVarFormExpr
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
-               res.add_class("nc_v")
                var variable = self.variable
-               if variable == null then return
-               variable.decorate_tag(res, token)
+               if variable == null then return null
+               res.add_class("nc_v")
+               return variable.infobox(v)
        end
 end
 
 redef class AVardeclExpr
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
-               res.add_class("nc_v")
                var variable = self.variable
-               if variable == null then return
-               variable.decorate_tag(res, token)
+               if variable == null then return null
+               res.add_class("nc_v")
+               return variable.infobox(v)
        end
 end
 
 redef class AForExpr
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
-               res.add_class("nc_v")
+               if not token isa TId then return null
                var vs = variables
-               if vs == null then return
-               var idx = n_ids.index_of(token.as(TId))
+               if vs == null then return null
+               res.add_class("nc_v")
+               var idx = n_ids.index_of(token)
                var variable = vs[idx]
-               variable.decorate_tag(res, token)
+               return variable.infobox(v)
        end
 end
 
 redef class AParam
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
-               res.add_class("nc_v")
                var mp = mparameter
-               if mp == null then return
-               res.attrs["title"] = mp.name + ": " + mp.mtype.to_s
+               if mp == null then return null
+               var variable = self.variable
+               if variable == null then return null
+               res.add_class("nc_v")
+               return variable.infobox(v)
        end
 end
 
 redef class AAssertExpr
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
                res.add_class("nc_ast")
+               return null
        end
 end
 
 redef class ALabel
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
                res.add_class("nc_la")
+               return null
        end
 end
 
 redef class ASendExpr
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
-               if callsite == null then return
-               var mpropdef = callsite.mpropdef
-               res.attrs["title"] = mpropdef.to_s + callsite.msignature.to_s
-               res.attrs["link"] = mpropdef.mclassdef.mmodule.name + ".html#" + mpropdef.to_s
+               if callsite == null then return null
+               return callsite.infobox(v)
        end
 end
 
 redef class ANewExpr
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
-               if callsite == null then return
-               var mpropdef = callsite.mpropdef
-               res.attrs["title"] = mpropdef.to_s + callsite.msignature.to_s
-               res.attrs["link"] = mpropdef.mclassdef.mmodule.name + ".html#" + mpropdef.to_s
+               if callsite == null then return null
+               return callsite.infobox(v)
        end
 end
 
 redef class AAssignOp
-       redef fun decorate_tag(res, v)
+       redef fun decorate_tag(v, res, token)
        do
                var p = parent
                assert p isa AReassignFormExpr
 
                var callsite = p.reassign_callsite
-               if callsite == null then return
-               var mpropdef = callsite.mpropdef
-               res.attrs["title"] = mpropdef.to_s + callsite.msignature.to_s
-               res.attrs["link"] = mpropdef.mclassdef.mmodule.name + ".html#" + mpropdef.to_s
+               if callsite == null then return null
+               return callsite.infobox(v)
        end
 end
 
 redef class AModuleName
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
-               parent.decorate_tag(res, token)
+               return parent.decorate_tag(v, res, token)
        end
 end
 
 redef class AModuledecl
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
                res.add_class("nc_def")
                res.add_class("nc_m")
                var p = parent
                assert p isa AModule
                var mm = p.mmodule
-               if mm == null then return
-               res.attrs["title"] = mm.full_name
+               if mm == null then return null
+               return mm.infobox(v)
        end
 end
 
 redef class AStdImport
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
                res.add_class("nc_m")
                var mm = mmodule
-               if mm == null then return
-               res.attrs["title"] = mm.full_name
-               res.attrs["link"] = mm.name + ".html"
+               if mm == null then return null
+               return mm.infobox(v)
        end
 end
-
 redef class AAttrPropdef
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
                res.add_class("nc_def")
                var mpd: nullable MPropDef
                mpd = mreadpropdef
                if mpd == null then mpd = mpropdef
-               if mpd == null then return
-               var mp = mpd.mproperty
-               res.attrs["title"] = mp.full_name
-               if mp.intro != mpd then
-                       mpd = mp.intro
-                       res.attrs["link"] = mpd.mclassdef.mmodule.name + ".html#" + mpd.to_s
-               end
+               if mpd == null then return null
+               return mpd.infobox(v)
        end
 end
 
@@ -465,57 +798,48 @@ redef class TId
        do
                var res = super
                var p = parent
-               if p != null then p.decorate_tag(res, self)
+               if p != null then p.decorate_tag(v, res, self)
                res.add_class("nc_i")
                return res
        end
 end
 redef class AMethid
-       redef fun accept_highlight_visitor(v)
+       redef fun make_tag(v)
        do
                var res = new HTMLTag("span")
                res.add_class("nc_def")
-               var p = parent
-               if p isa AMethPropdef then
-                       var mpd = p.mpropdef
-                       if mpd != null then
-                               var mp = mpd.mproperty
-                               res.attr("title", mp.full_name)
-                               if mp.intro != mpd then
-                                       mpd = mp.intro
-                                       var link = mpd.mclassdef.mmodule.name + ".html#" + mpd.to_s
-                                       var l = new HTMLTag("a")
-                                       l.attr("href", link)
-                                       v.enter l
-                               end
-                       end
-               end
-               v.enter res
-               super
+               return res
        end
-       redef fun decorate_tag(res, v)
+       redef fun decorate_tag(v, res, token)
        do
+               return null
                # nothing to decorate
        end
+       redef fun infobox(v)
+       do
+               var p = parent
+               if not p isa AMethPropdef then return null
+               var mpd = p.mpropdef
+               if mpd == null then return null
+               return mpd.infobox(v)
+       end
 end
 redef class TAttrid
        redef fun make_tag(v)
        do
                var res = super
                var p = parent
-               if p != null then p.decorate_tag(res, self)
+               if p != null then p.decorate_tag(v, res, self)
                res.add_class("nc_a")
                return res
        end
 end
 redef class AAttrFormExpr
-       redef fun decorate_tag(res, v)
+       redef fun decorate_tag(v, res, token)
        do
                var p = mproperty
-               if p == null then return
-               res.attrs["title"] = p.full_name
-               var pi = p.intro
-               res.attrs["link"] = pi.mclassdef.mmodule.name + ".html#" + pi.to_s
+               if p == null then return null
+               return p.intro.infobox(v)
        end
 end
 redef class TClassid
@@ -523,68 +847,56 @@ redef class TClassid
        do
                var res = super
                var p = parent
-               if p != null then p.decorate_tag(res, self)
+               if p != null then p.decorate_tag(v, res, self)
                res.add_class("nc_t")
                return res
        end
 end
 redef class AType
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
                var mt = mtype
-               if mt == null then return
-               var title = mt.to_s
+               if mt == null then return null
                if mt isa MNullableType then mt = mt.mtype
                if mt isa MVirtualType or mt isa MParameterType then
                        res.add_class("nc_vt")
-               else if mt isa MClassType then
-                       title = mt.mclass.full_name
-                       res.attrs["link"] = mt.mclass.intro.mmodule.name + ".html#" + mt.mclass.intro.to_s
                end
-               res.attrs["title"] = title
+               return mt.infobox(v)
        end
 end
 redef class AFormaldef
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
                res.add_class("nc_vt")
-               if mtype == null then return
-               res.attrs["title"] = "{mtype.to_s}: {bound.to_s}"
+               if mtype == null then return null
+               return mtype.infobox(v)
        end
 end
 redef class ATypePropdef
-       redef fun decorate_tag(res, token)
+       redef fun decorate_tag(v, res, token)
        do
                res.add_class("nc_def")
                var md = mpropdef
-               if md == null then return
-               var mp = mpropdef.mproperty
-               res.attrs["title"] = mp.full_name
-               var mi = mp.intro
-               if md != mi then
-                       res.attrs["link"] = mi.mclassdef.mmodule.name + ".html#" + mi.to_s
-               end
+               if md == null then return null
+               return md.infobox(v)
        end
 end
 redef class TComment
        redef fun make_tag(v)
        do
                var res = super
-               if parent == null then
+               if not parent isa ADoc then
                        res.add_class("nc_c")
-               else
-                       assert parent isa ADoc
                end
                return res
        end
 end
 redef class ADoc
-       redef fun accept_highlight_visitor(v)
+       redef fun make_tag(v)
        do
                var res = new HTMLTag("span")
                res.add_class("nc_d")
-               v.enter res
-               super
+               return res
        end
 end
 redef class TokenLiteral
@@ -593,25 +905,33 @@ redef class TokenLiteral
                var res = super
                res.add_class("nc_l")
                var p = parent
-               if p isa AStringFormExpr then p.decorate_tag(res, self)
+               if p != null then p.decorate_tag(v, res, self)
                return res
        end
 end
 redef class ASuperstringExpr
-       redef fun accept_highlight_visitor(v)
+       redef fun make_tag(v)
        do
                var res = new HTMLTag("span")
                res.add_class("nc_ss")
-               v.enter res
-               super
+               return res
        end
 end
 redef class AStringFormExpr
-       redef fun decorate_tag(res, v)
+       redef fun decorate_tag(v, res, token)
        do
-               # Workarount to tag strings
+               # Workaround to tag strings
                res.classes.remove("nc_l")
                res.add_class("nc_s")
+               return null
+       end
+end
+redef class AExpr
+       redef fun decorate_tag(v, res, token)
+       do
+               var t = mtype
+               if t == null then return null
+               return t.infobox(v)
        end
 end
 
index ed73ead..ac80b99 100644 (file)
@@ -64,15 +64,13 @@ private class Doc2Mdwn
                                end
                                # else fence content
                                curblock.add(text)
-                               curblock.add("\n")
                                continue
                        end
 
                        # Is codeblock? Then just collect them
-                       if indent >= 4 then
-                               var part = text.substring_from(4)
-                               curblock.add(part)
-                               curblock.add("\n")
+                       if indent >= 3 then
+                               # to allows 4 spaces including the one that follows the #
+                               curblock.add(text)
                                continue
                        end
 
@@ -187,10 +185,27 @@ private class Doc2Mdwn
        do
                # Is there a codeblock to manage?
                if not curblock.is_empty then
+                       # determine the smalest indent
+                       var minindent = -1
+                       for text in curblock do
+                               var indent = 0
+                               while indent < text.length and text.chars[indent] == ' ' do indent += 1
+                               if minindent == -1 or indent < minindent then
+                                       minindent = indent
+                               end
+                       end
+
+                       # Generate the text
+                       var btext = new FlatBuffer
+                       for text in curblock do
+                               btext.append text.substring_from(minindent)
+                               btext.add '\n'
+                       end
+
+                       # add the node
                        var n = new HTMLTag("pre")
                        root.add(n)
-                       var btext = curblock.to_s
-                       process_code(n, btext)
+                       process_code(n, btext.to_s)
                        curblock.clear
                end
        end
index e0fb5c3..888c8e2 100644 (file)
@@ -54,7 +54,8 @@ private class ATypeCounterVisitor
        redef fun visit(n)
        do
                if n isa AType then
-                       var mtype = modelbuilder.resolve_mtype(self.nclassdef, n)
+                       var mclassdef = self.nclassdef.mclassdef
+                       var mtype = modelbuilder.resolve_mtype(mclassdef.mmodule, mclassdef, n)
                        if mtype != null then
                                self.typecount.inc(mtype)
                        end
index 919b48c..44ddfea 100644 (file)
@@ -23,6 +23,10 @@ class MDoc
        # The starting `#` and first space are stripped.
        # The trailing `\n` are chomped.
        var content = new Array[String]
+
+       # The entity where the documentation is originally attached to.
+       # This gives some context to resolve identifiers or to run examples.
+       var original_mentity: nullable MEntity writable = null
 end
 
 redef class MEntity
index dbbec6d..629dadb 100644 (file)
@@ -1898,10 +1898,28 @@ class MClassKind
                self.to_s = s
                self.need_init = need_init
        end
+
+       # Can a class of kind `self` specializes a class of kine `other`?
+       fun can_specialize(other: MClassKind): Bool
+       do
+               if other == interface_kind then return true # everybody can specialize interfaces
+               if self == interface_kind or self == enum_kind then
+                       # no other case for interfaces
+                       return false
+               else if self == extern_kind then
+                       # only compatible with themselve
+                       return self == other
+               else if other == enum_kind or other == extern_kind then
+                       # abstract_kind and concrete_kind are incompatible
+                       return false
+               end
+               # remain only abstract_kind and concrete_kind
+               return true
+       end
 end
 
 fun abstract_kind: MClassKind do return once new MClassKind("abstract class", true)
 fun concrete_kind: MClassKind do return once new MClassKind("class", true)
 fun interface_kind: MClassKind do return once new MClassKind("interface", false)
 fun enum_kind: MClassKind do return once new MClassKind("enum", false)
-fun extern_kind: MClassKind do return once new MClassKind("extern", false)
+fun extern_kind: MClassKind do return once new MClassKind("extern class", false)
index a8be901..b2c741b 100644 (file)
@@ -63,6 +63,44 @@ redef class MModule
                end
                return mclasses
        end
+
+       fun in_nesting_intro_mclasses(min_visibility: MVisibility): Set[MClass] do
+               var res = new HashSet[MClass]
+               for mmodule in in_nesting.greaters do
+                       for mclass in mmodule.intro_mclasses do
+                               if mclass.visibility < min_visibility then continue
+                               res.add mclass
+                       end
+               end
+               return res
+       end
+
+       fun in_nesting_redef_mclasses(min_visibility: MVisibility): Set[MClass] do
+               var res = new HashSet[MClass]
+               for mmodule in self.in_nesting.greaters do
+                       for mclass in mmodule.redef_mclasses do
+                               if mclass.visibility < min_visibility then continue
+                               res.add mclass
+                       end
+               end
+               return res
+       end
+
+       fun in_nesting_intro_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
+               var res = new HashSet[MClassDef]
+               for mmodule in in_nesting.greaters do
+                       res.add_all mmodule.intro_mclassdefs(min_visibility)
+               end
+               return res
+       end
+
+       fun in_nesting_redef_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
+               var res = new HashSet[MClassDef]
+               for mmodule in self.in_nesting.greaters do
+                       res.add_all mmodule.redef_mclassdefs(min_visibility)
+               end
+               return res
+       end
 end
 
 redef class MClass
@@ -162,6 +200,18 @@ redef class MClass
                return set
        end
 
+       fun intro_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
+               var set = new HashSet[MPropDef]
+               for mclassdef in mclassdefs do
+                       for mpropdef in mclassdef.mpropdefs do
+                               if not mpropdef.is_intro then continue
+                               if mpropdef.mproperty.visibility < min_visibility then continue
+                               set.add(mpropdef)
+                       end
+               end
+               return set
+       end
+
        # the set of locally refined properties in 'self'.
        fun redef_mproperties(min_visibility: MVisibility): Set[MProperty] do
                var set = new HashSet[MProperty]
@@ -174,6 +224,18 @@ redef class MClass
                return set
        end
 
+       fun redef_mpropdefs(min_visibility: MVisibility): Set[MPropDef] do
+               var set = new HashSet[MPropDef]
+               for mclassdef in mclassdefs do
+                       for mpropdef in mclassdef.mpropdefs do
+                               if mpropdef.is_intro then continue
+                               if mpropdef.mproperty.visibility < min_visibility then continue
+                               set.add(mpropdef)
+                       end
+               end
+               return set
+       end
+
        # the set of methods inherited by 'self'.
        fun inherited_mproperties(mainmodule: MModule, min_visibility: MVisibility): Set[MProperty] do
                var set = new HashSet[MProperty]
index dc48ee9..85f9443 100644 (file)
@@ -498,6 +498,16 @@ class ModelBuilder
                        mgroup = new MGroup(pn, parent.mproject, parent)
                        toolcontext.info("found sub group `{mgroup.full_name}` at {dirpath}", 2)
                end
+               var readme = dirpath.join_path("README")
+               if readme.file_exists then
+                       var mdoc = new MDoc
+                       var s = new IFStream.open(readme)
+                       while not s.eof do
+                               mdoc.content.add(s.read_line)
+                       end
+                       mgroup.mdoc = mdoc
+                       mdoc.original_mentity = mgroup
+               end
                mgroup.filepath = dirpath
                mgroups[rdp] = mgroup
                return mgroup
@@ -616,7 +626,11 @@ class ModelBuilder
 
                if decl != null then
                        var ndoc = decl.n_doc
-                       if ndoc != null then mmodule.mdoc = ndoc.to_mdoc
+                       if ndoc != null then
+                               var mdoc = ndoc.to_mdoc
+                               mmodule.mdoc = mdoc
+                               mdoc.original_mentity = mmodule
+                       end
                end
 
                return mmodule
index a55d4c4..4cd9475 100644 (file)
@@ -133,7 +133,7 @@ redef class ModelBuilder
                                var nfd = nclassdef.n_formaldefs[i]
                                var nfdt = nfd.n_type
                                if nfdt != null then
-                                       var bound = resolve_mtype_unchecked(nclassdef, nfdt, false)
+                                       var bound = resolve_mtype_unchecked(mmodule, null, nfdt, false)
                                        if bound == null then return # Forward error
                                        if bound.need_anchor then
                                                # No F-bounds!
@@ -163,7 +163,11 @@ redef class ModelBuilder
 
                if nclassdef isa AStdClassdef then
                        var ndoc = nclassdef.n_doc
-                       if ndoc != null then mclassdef.mdoc = ndoc.to_mdoc
+                       if ndoc != null then
+                               var mdoc = ndoc.to_mdoc
+                               mclassdef.mdoc = mdoc
+                               mdoc.original_mentity = mclassdef
+                       end
                end
 
                if mclassdef.is_intro then
@@ -194,12 +198,15 @@ redef class ModelBuilder
                        for nsc in nclassdef.n_superclasses do
                                specobject = false
                                var ntype = nsc.n_type
-                               var mtype = resolve_mtype_unchecked(nclassdef, ntype, false)
+                               var mtype = resolve_mtype_unchecked(mmodule, mclassdef, ntype, false)
                                if mtype == null then continue # Skip because of error
                                if not mtype isa MClassType then
                                        error(ntype, "Error: supertypes cannot be a formal type")
                                        return
                                end
+                               if not mclass.kind.can_specialize(mtype.mclass.kind) then
+                                       error(ntype, "Error: {mclass.kind} {mclass} cannot specialize {mtype.mclass.kind} {mtype.mclass}")
+                               end
                                supertypes.add mtype
                                #print "new super : {mclass} < {mtype}"
                                if mtype.mclass.kind == extern_kind then specpointer = false
@@ -246,6 +253,7 @@ redef class ModelBuilder
                var mmodule = nmodule.mmodule.as(not null)
                for imp in mmodule.in_importation.direct_greaters do
 
+                       if not mmodule2nmodule.has_key(imp) then continue
                        build_classes(mmodule2nmodule[imp])
                end
 
@@ -290,11 +298,12 @@ redef class ModelBuilder
                # Check unchecked ntypes
                for nclassdef in nmodule.n_classdefs do
                        if nclassdef isa AStdClassdef then
+                               var mclassdef = nclassdef.mclassdef
                                # check bound of formal parameter
                                for nfd in  nclassdef.n_formaldefs do
                                        var nfdt = nfd.n_type
                                        if nfdt != null and nfdt.mtype != null then
-                                               var bound = resolve_mtype(nclassdef, nfdt)
+                                               var bound = resolve_mtype(mmodule, mclassdef, nfdt)
                                                if bound == null then return # Forward error
                                        end
                                end
@@ -302,7 +311,7 @@ redef class ModelBuilder
                                for nsc in nclassdef.n_superclasses do
                                        var ntype = nsc.n_type
                                        if ntype.mtype != null then
-                                               var mtype = resolve_mtype(nclassdef, ntype)
+                                               var mtype = resolve_mtype(mmodule, mclassdef, ntype)
                                                if mtype == null then return # Forward error
                                        end
                                end
@@ -375,15 +384,12 @@ redef class ModelBuilder
        var mclassdef2nclassdef: HashMap[MClassDef, AClassdef] = new HashMap[MClassDef, AClassdef]
 
        # Return the static type associated to the node `ntype`.
-       # `nclassdef` is the context where the call is made (used to understand formal types)
-       # The mmodule used as context is `nclassdef.mmodule`
+       # `mmodule` and `mclassdef` is the context where the call is made (used to understand formal types)
        # In case of problem, an error is displayed on `ntype` and null is returned.
        # FIXME: the name "resolve_mtype" is awful
-       fun resolve_mtype_unchecked(nclassdef: AClassdef, ntype: AType, with_virtual: Bool): nullable MType
+       fun resolve_mtype_unchecked(mmodule: MModule, mclassdef: nullable MClassDef, ntype: AType, with_virtual: Bool): nullable MType
        do
                var name = ntype.n_id.text
-               var mclassdef = nclassdef.mclassdef
-               var mmodule = nclassdef.parent.as(AModule).mmodule.as(not null)
                var res: MType
 
                # Check virtual type
@@ -438,7 +444,7 @@ redef class ModelBuilder
                        else
                                var mtypes = new Array[MType]
                                for nt in ntype.n_types do
-                                       var mt = resolve_mtype_unchecked(nclassdef, nt, with_virtual)
+                                       var mt = resolve_mtype_unchecked(mmodule, mclassdef, nt, with_virtual)
                                        if mt == null then return null # Forward error
                                        mtypes.add(mt)
                                end
@@ -455,27 +461,26 @@ redef class ModelBuilder
        end
 
        # Return the static type associated to the node `ntype`.
-       # `nclassdef` is the context where the call is made (used to understand formal types)
-       # The mmodule used as context is `nclassdef.mmodule`
+       # `mmodule` and `mclassdef` is the context where the call is made (used to understand formal types)
        # In case of problem, an error is displayed on `ntype` and null is returned.
        # FIXME: the name "resolve_mtype" is awful
-       fun resolve_mtype(nclassdef: AClassdef, ntype: AType): nullable MType
+       fun resolve_mtype(mmodule: MModule, mclassdef: nullable MClassDef, ntype: AType): nullable MType
        do
                var mtype = ntype.mtype
-               if mtype == null then mtype = resolve_mtype_unchecked(nclassdef, ntype, true)
+               if mtype == null then mtype = resolve_mtype_unchecked(mmodule, mclassdef, ntype, true)
                if mtype == null then return null # Forward error
 
                if ntype.checked_mtype then return mtype
                if mtype isa MGenericType then
-                       var mmodule = nclassdef.parent.as(AModule).mmodule.as(not null)
-                       var mclassdef = nclassdef.mclassdef
                        var mclass = mtype.mclass
                        for i in [0..mclass.arity[ do
                                var bound = mclass.intro.bound_mtype.arguments[i]
                                var nt = ntype.n_types[i]
-                               var mt = resolve_mtype(nclassdef, nt)
+                               var mt = resolve_mtype(mmodule, mclassdef, nt)
                                if mt == null then return null # forward error
-                               if not mt.is_subtype(mmodule, mclassdef.bound_mtype, bound) then
+                               var anchor
+                               if mclassdef != null then anchor = mclassdef.bound_mtype else anchor = null
+                               if not mt.is_subtype(mmodule, anchor, bound) then
                                        error(nt, "Type error: expected {bound}, got {mt}")
                                        return null
                                end
index 56ff873..5a4ec42 100644 (file)
@@ -48,6 +48,7 @@ redef class ModelBuilder
                var mclassdef = nclassdef.mclassdef.as(not null)
                if mclassdef.in_hierarchy == null then return # Skip error
                for superclassdef in mclassdef.in_hierarchy.direct_greaters do
+                       if not mclassdef2nclassdef.has_key(superclassdef) then continue
                        build_properties(mclassdef2nclassdef[superclassdef])
                end
 
@@ -55,10 +56,10 @@ redef class ModelBuilder
                        npropdef.build_property(self, nclassdef)
                end
                for npropdef in nclassdef.n_propdefs do
-                       npropdef.build_signature(self, nclassdef)
+                       npropdef.build_signature(self)
                end
                for npropdef in nclassdef.n_propdefs do
-                       npropdef.check_signature(self, nclassdef)
+                       npropdef.check_signature(self)
                end
                process_default_constructors(nclassdef)
        end
@@ -83,14 +84,14 @@ redef class ModelBuilder
 
                if not nclassdef isa AStdClassdef then return
 
-               var mmodule = nclassdef.mclassdef.mmodule
+               var mmodule = mclassdef.mmodule
                # Do we inherit for a constructor?
                var combine = new Array[MMethod]
                var inhc: nullable MClass = null
                for st in mclassdef.supertypes do
                        var c = st.mclass
                        if not c.kind.need_init then continue
-                       st = st.anchor_to(mmodule, nclassdef.mclassdef.bound_mtype)
+                       st = st.anchor_to(mmodule, mclassdef.bound_mtype)
                        var candidate = self.try_get_mproperty_by_name2(nclassdef, mmodule, st, "init").as(nullable MMethod)
                        if candidate != null and candidate.intro.msignature.arity == 0 then
                                combine.add(candidate)
@@ -264,9 +265,9 @@ redef class APropdef
        var mpropdef: nullable MPROPDEF writable
 
        private fun build_property(modelbuilder: ModelBuilder, nclassdef: AClassdef) is abstract
-       private fun build_signature(modelbuilder: ModelBuilder, nclassdef: AClassdef) is abstract
-       private fun check_signature(modelbuilder: ModelBuilder, nclassdef: AClassdef) is abstract
-       private fun new_property_visibility(modelbuilder: ModelBuilder, nclassdef: AClassdef, nvisibility: nullable AVisibility): MVisibility
+       private fun build_signature(modelbuilder: ModelBuilder) is abstract
+       private fun check_signature(modelbuilder: ModelBuilder) is abstract
+       private fun new_property_visibility(modelbuilder: ModelBuilder, mclassdef: MClassDef, nvisibility: nullable AVisibility): MVisibility
        do
                var mvisibility = public_visibility
                if nvisibility != null then
@@ -276,7 +277,7 @@ redef class APropdef
                                mvisibility = public_visibility
                        end
                end
-               if nclassdef.mclassdef.mclass.visibility == private_visibility then
+               if mclassdef.mclass.visibility == private_visibility then
                        if mvisibility == protected_visibility then
                                assert nvisibility != null
                                modelbuilder.error(nvisibility, "Error: The only legal visibility for properties in a private class is private.")
@@ -293,10 +294,14 @@ redef class APropdef
        private fun set_doc(mpropdef: MPropDef)
        do
                var ndoc = self.n_doc
-               if ndoc != null then mpropdef.mdoc = ndoc.to_mdoc
+               if ndoc != null then
+                       var mdoc = ndoc.to_mdoc
+                       mpropdef.mdoc = mdoc
+                       mdoc.original_mentity = mpropdef
+               end
        end
 
-       private fun check_redef_property_visibility(modelbuilder: ModelBuilder, nclassdef: AClassdef, nvisibility: nullable AVisibility, mprop: MProperty)
+       private fun check_redef_property_visibility(modelbuilder: ModelBuilder, nvisibility: nullable AVisibility, mprop: MProperty)
        do
                if nvisibility == null then return
                var mvisibility = nvisibility.mvisibility
@@ -343,15 +348,16 @@ redef class ASignature
        var ret_type: nullable MType = null
 
        # Visit and fill information about a signature
-       private fun visit_signature(modelbuilder: ModelBuilder, nclassdef: AClassdef): Bool
+       private fun visit_signature(modelbuilder: ModelBuilder, mclassdef: MClassDef): Bool
        do
+               var mmodule = mclassdef.mmodule
                var param_names = self.param_names
                var param_types = self.param_types
                for np in self.n_params do
                        param_names.add(np.n_id.text)
                        var ntype = np.n_type
                        if ntype != null then
-                               var mtype = modelbuilder.resolve_mtype(nclassdef, ntype)
+                               var mtype = modelbuilder.resolve_mtype(mmodule, mclassdef, ntype)
                                if mtype == null then return false # Skip error
                                for i in [0..param_names.length-param_types.length[ do
                                        param_types.add(mtype)
@@ -368,7 +374,7 @@ redef class ASignature
                end
                var ntype = self.n_type
                if ntype != null then
-                       self.ret_type = modelbuilder.resolve_mtype(nclassdef, ntype)
+                       self.ret_type = modelbuilder.resolve_mtype(mmodule, mclassdef, ntype)
                        if self.ret_type == null then return false # Skip errir
                end
 
@@ -377,7 +383,7 @@ redef class ASignature
        end
 
        # Build a visited signature
-       fun build_signature(modelbuilder: ModelBuilder, nclassdef: AClassdef): nullable MSignature
+       fun build_signature(modelbuilder: ModelBuilder): nullable MSignature
        do
                if param_names.length != param_types.length then
                        # Some parameters are typed, other parameters are not typed.
@@ -443,7 +449,7 @@ redef class AMethPropdef
                var mprop: nullable MMethod = null
                if not is_init or n_kwredef != null then mprop = modelbuilder.try_get_mproperty_by_name(name_node, mclassdef, name).as(nullable MMethod)
                if mprop == null then
-                       var mvisibility = new_property_visibility(modelbuilder, nclassdef, self.n_visibility)
+                       var mvisibility = new_property_visibility(modelbuilder, mclassdef, self.n_visibility)
                        mprop = new MMethod(mclassdef, name, mvisibility)
                        mprop.is_init = is_init
                        mprop.is_new = n_kwnew != null
@@ -456,7 +462,7 @@ redef class AMethPropdef
                                        if not self.check_redef_keyword(modelbuilder, nclassdef, n_kwredef, true, mprop) then return
                                end
                        end
-                       check_redef_property_visibility(modelbuilder, nclassdef, self.n_visibility, mprop)
+                       check_redef_property_visibility(modelbuilder, self.n_visibility, mprop)
                end
                nclassdef.mprop2npropdef[mprop] = self
 
@@ -487,11 +493,12 @@ redef class AMethPropdef
                end
        end
 
-       redef fun build_signature(modelbuilder, nclassdef)
+       redef fun build_signature(modelbuilder)
        do
                var mpropdef = self.mpropdef
                if mpropdef == null then return # Error thus skiped
-               var mmodule = mpropdef.mclassdef.mmodule
+               var mclassdef = mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
                var nsig = self.n_signature
 
                # Retrieve info from the signature AST
@@ -500,7 +507,7 @@ redef class AMethPropdef
                var vararg_rank = -1
                var ret_type: nullable MType = null # Return type from the AST
                if nsig != null then
-                       if not nsig.visit_signature(modelbuilder, nclassdef) then return
+                       if not nsig.visit_signature(modelbuilder, mclassdef) then return
                        param_names = nsig.param_names
                        param_types = nsig.param_types
                        vararg_rank = nsig.vararg_rank
@@ -523,8 +530,8 @@ redef class AMethPropdef
                        end
                else if mpropdef.mproperty.is_init then
                        # FIXME UGLY: inherit signature from a super-constructor
-                       for msupertype in nclassdef.mclassdef.supertypes do
-                               msupertype = msupertype.anchor_to(mmodule, nclassdef.mclassdef.bound_mtype)
+                       for msupertype in mclassdef.supertypes do
+                               msupertype = msupertype.anchor_to(mmodule, mclassdef.bound_mtype)
                                var candidate = modelbuilder.try_get_mproperty_by_name2(self, mmodule, msupertype, mpropdef.mproperty.name)
                                if candidate != null then
                                        if msignature == null then
@@ -568,11 +575,12 @@ redef class AMethPropdef
                mpropdef.is_extern = self isa AExternPropdef
        end
 
-       redef fun check_signature(modelbuilder, nclassdef)
+       redef fun check_signature(modelbuilder)
        do
                var mpropdef = self.mpropdef
                if mpropdef == null then return # Error thus skiped
-               var mmodule = mpropdef.mclassdef.mmodule
+               var mclassdef = mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
                var nsig = self.n_signature
                var mysignature = self.mpropdef.msignature
                if mysignature == null then return # Error thus skiped
@@ -595,8 +603,8 @@ redef class AMethPropdef
                                for i in [0..mysignature.arity[ do
                                        var myt = mysignature.mparameters[i].mtype
                                        var prt = msignature.mparameters[i].mtype
-                                       if not myt.is_subtype(mmodule, nclassdef.mclassdef.bound_mtype, prt) or
-                                                       not prt.is_subtype(mmodule, nclassdef.mclassdef.bound_mtype, myt) then
+                                       if not myt.is_subtype(mmodule, mclassdef.bound_mtype, prt) or
+                                                       not prt.is_subtype(mmodule, mclassdef.bound_mtype, myt) then
                                                modelbuilder.error(nsig.n_params[i], "Redef Error: Wrong type for parameter `{mysignature.mparameters[i].name}'. found {myt}, expected {prt} as in {mpropdef.mproperty.intro}.")
                                        end
                                end
@@ -605,7 +613,7 @@ redef class AMethPropdef
                                if ret_type == null then
                                        # Inherit the return type
                                        ret_type = precursor_ret_type
-                               else if not ret_type.is_subtype(mmodule, nclassdef.mclassdef.bound_mtype, precursor_ret_type) then
+                               else if not ret_type.is_subtype(mmodule, mclassdef.bound_mtype, precursor_ret_type) then
                                        modelbuilder.error(nsig.n_type.as(not null), "Redef Error: Wrong return type. found {ret_type}, expected {precursor_ret_type} as in {mpropdef.mproperty.intro}.")
                                end
                        end
@@ -655,12 +663,12 @@ redef class AAttrPropdef
                        # Old attribute style
                        var mprop = modelbuilder.try_get_mproperty_by_name(nid, mclassdef, name)
                        if mprop == null then
-                               var mvisibility = new_property_visibility(modelbuilder, nclassdef, self.n_visibility)
+                               var mvisibility = new_property_visibility(modelbuilder, mclassdef, self.n_visibility)
                                mprop = new MAttribute(mclassdef, name, mvisibility)
                                if not self.check_redef_keyword(modelbuilder, nclassdef, self.n_kwredef, false, mprop) then return
                        else
                                assert mprop isa MAttribute
-                               check_redef_property_visibility(modelbuilder, nclassdef, self.n_visibility, mprop)
+                               check_redef_property_visibility(modelbuilder, self.n_visibility, mprop)
                                if not self.check_redef_keyword(modelbuilder, nclassdef, self.n_kwredef, true, mprop) then return
                        end
                        nclassdef.mprop2npropdef[mprop] = self
@@ -675,12 +683,12 @@ redef class AAttrPropdef
                                var readname = name.substring_from(1)
                                var mreadprop = modelbuilder.try_get_mproperty_by_name(nid, mclassdef, readname).as(nullable MMethod)
                                if mreadprop == null then
-                                       var mvisibility = new_property_visibility(modelbuilder, nclassdef, nreadable.n_visibility)
+                                       var mvisibility = new_property_visibility(modelbuilder, mclassdef, nreadable.n_visibility)
                                        mreadprop = new MMethod(mclassdef, readname, mvisibility)
                                        if not self.check_redef_keyword(modelbuilder, nclassdef, nreadable.n_kwredef, false, mreadprop) then return
                                else
                                        if not self.check_redef_keyword(modelbuilder, nclassdef, nreadable.n_kwredef, true, mreadprop) then return
-                                       check_redef_property_visibility(modelbuilder, nclassdef, nreadable.n_visibility, mreadprop)
+                                       check_redef_property_visibility(modelbuilder, nreadable.n_visibility, mreadprop)
                                end
                                nclassdef.mprop2npropdef[mreadprop] = self
 
@@ -695,12 +703,12 @@ redef class AAttrPropdef
                                var writename = name.substring_from(1) + "="
                                var mwriteprop = modelbuilder.try_get_mproperty_by_name(nid, mclassdef, writename).as(nullable MMethod)
                                if mwriteprop == null then
-                                       var mvisibility = new_property_visibility(modelbuilder, nclassdef, nwritable.n_visibility)
+                                       var mvisibility = new_property_visibility(modelbuilder, mclassdef, nwritable.n_visibility)
                                        mwriteprop = new MMethod(mclassdef, writename, mvisibility)
                                        if not self.check_redef_keyword(modelbuilder, nclassdef, nwritable.n_kwredef, false, mwriteprop) then return
                                else
                                        if not self.check_redef_keyword(modelbuilder, nclassdef, nwritable.n_kwredef, true, mwriteprop) then return
-                                       check_redef_property_visibility(modelbuilder, nclassdef, nwritable.n_visibility, mwriteprop)
+                                       check_redef_property_visibility(modelbuilder, nwritable.n_visibility, mwriteprop)
                                end
                                nclassdef.mprop2npropdef[mwriteprop] = self
 
@@ -721,12 +729,12 @@ redef class AAttrPropdef
                        var readname = name
                        var mreadprop = modelbuilder.try_get_mproperty_by_name(nid2, mclassdef, readname).as(nullable MMethod)
                        if mreadprop == null then
-                               var mvisibility = new_property_visibility(modelbuilder, nclassdef, self.n_visibility)
+                               var mvisibility = new_property_visibility(modelbuilder, mclassdef, self.n_visibility)
                                mreadprop = new MMethod(mclassdef, readname, mvisibility)
                                if not self.check_redef_keyword(modelbuilder, nclassdef, n_kwredef, false, mreadprop) then return
                        else
                                if not self.check_redef_keyword(modelbuilder, nclassdef, n_kwredef, true, mreadprop) then return
-                               check_redef_property_visibility(modelbuilder, nclassdef, self.n_visibility, mreadprop)
+                               check_redef_property_visibility(modelbuilder, self.n_visibility, mreadprop)
                        end
                        nclassdef.mprop2npropdef[mreadprop] = self
 
@@ -743,7 +751,7 @@ redef class AAttrPropdef
                        if mwriteprop == null then
                                var mvisibility
                                if nwritable != null then
-                                       mvisibility = new_property_visibility(modelbuilder, nclassdef, nwritable.n_visibility)
+                                       mvisibility = new_property_visibility(modelbuilder, mclassdef, nwritable.n_visibility)
                                else
                                        mvisibility = private_visibility
                                end
@@ -752,7 +760,7 @@ redef class AAttrPropdef
                        else
                                if not self.check_redef_keyword(modelbuilder, nclassdef, nwkwredef, true, mwriteprop) then return
                                if nwritable != null then
-                                       check_redef_property_visibility(modelbuilder, nclassdef, nwritable.n_visibility, mwriteprop)
+                                       check_redef_property_visibility(modelbuilder, nwritable.n_visibility, mwriteprop)
                                end
                        end
                        nclassdef.mprop2npropdef[mwriteprop] = self
@@ -764,16 +772,17 @@ redef class AAttrPropdef
                end
        end
 
-       redef fun build_signature(modelbuilder, nclassdef)
+       redef fun build_signature(modelbuilder)
        do
                var mpropdef = self.mpropdef
                if mpropdef == null then return # Error thus skiped
-               var mmodule = mpropdef.mclassdef.mmodule
+               var mclassdef = mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
                var mtype: nullable MType = null
 
                var ntype = self.n_type
                if ntype != null then
-                       mtype = modelbuilder.resolve_mtype(nclassdef, ntype)
+                       mtype = modelbuilder.resolve_mtype(mmodule, mclassdef, ntype)
                        if mtype == null then return
                end
 
@@ -781,7 +790,7 @@ redef class AAttrPropdef
                if mtype == null then
                        if nexpr != null then
                                if nexpr isa ANewExpr then
-                                       mtype = modelbuilder.resolve_mtype(nclassdef, nexpr.n_type)
+                                       mtype = modelbuilder.resolve_mtype(mmodule, mclassdef, nexpr.n_type)
                                else if nexpr isa AIntExpr then
                                        var cla = modelbuilder.try_get_mclass_by_name(nexpr, mmodule, "Int")
                                        if cla != null then mtype = cla.mclass_type
@@ -810,7 +819,7 @@ redef class AAttrPropdef
                else
                        assert ntype != null
                        if nexpr isa ANewExpr then
-                               var xmtype = modelbuilder.resolve_mtype(nclassdef, nexpr.n_type)
+                               var xmtype = modelbuilder.resolve_mtype(mmodule, mclassdef, nexpr.n_type)
                                if xmtype == mtype and modelbuilder.toolcontext.opt_warn.value >= 2 then
                                        modelbuilder.warning(ntype, "Warning: useless type definition")
                                end
@@ -841,11 +850,12 @@ redef class AAttrPropdef
                end
        end
 
-       redef fun check_signature(modelbuilder, nclassdef)
+       redef fun check_signature(modelbuilder)
        do
                var mpropdef = self.mpropdef
                if mpropdef == null then return # Error thus skiped
-               var mmodule = mpropdef.mclassdef.mmodule
+               var mclassdef = mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
                var ntype = self.n_type
                var mtype = self.mpropdef.static_mtype
                if mtype == null then return # Error thus skiped
@@ -865,23 +875,24 @@ redef class AAttrPropdef
                # Check getter and setter
                var meth = self.mreadpropdef
                if meth != null then
-                       self.check_method_signature(modelbuilder, nclassdef, meth)
+                       self.check_method_signature(modelbuilder, meth)
                        var node: nullable ANode = ntype
                        if node == null then node = self
                        modelbuilder.check_visibility(node, mtype, meth)
                end
                meth = self.mwritepropdef
                if meth != null then
-                       self.check_method_signature(modelbuilder, nclassdef, meth)
+                       self.check_method_signature(modelbuilder, meth)
                        var node: nullable ANode = ntype
                        if node == null then node = self
                        modelbuilder.check_visibility(node, mtype, meth)
                end
        end
 
-       private fun check_method_signature(modelbuilder: ModelBuilder, nclassdef: AClassdef, mpropdef: MMethodDef)
+       private fun check_method_signature(modelbuilder: ModelBuilder, mpropdef: MMethodDef)
        do
-               var mmodule = mpropdef.mclassdef.mmodule
+               var mclassdef = mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
                var nsig = self.n_type
                var mysignature = mpropdef.msignature
                if mysignature == null then return # Error thus skiped
@@ -912,8 +923,8 @@ redef class AAttrPropdef
                                for i in [0..mysignature.arity[ do
                                        var myt = mysignature.mparameters[i].mtype
                                        var prt = msignature.mparameters[i].mtype
-                                       if not myt.is_subtype(mmodule, nclassdef.mclassdef.bound_mtype, prt) and
-                                                       not prt.is_subtype(mmodule, nclassdef.mclassdef.bound_mtype, myt) then
+                                       if not myt.is_subtype(mmodule, mclassdef.bound_mtype, prt) and
+                                                       not prt.is_subtype(mmodule, mclassdef.bound_mtype, myt) then
                                                var node: ANode
                                                if nsig != null then node = nsig else node = self
                                                modelbuilder.error(node, "Redef Error: Wrong type for parameter `{mysignature.mparameters[i].name}'. found {myt}, expected {prt}.")
@@ -924,7 +935,7 @@ redef class AAttrPropdef
                                if ret_type == null then
                                        # Inherit the return type
                                        ret_type = precursor_ret_type
-                               else if not ret_type.is_subtype(mmodule, nclassdef.mclassdef.bound_mtype, precursor_ret_type) then
+                               else if not ret_type.is_subtype(mmodule, mclassdef.bound_mtype, precursor_ret_type) then
                                        var node: ANode
                                        if nsig != null then node = nsig else node = self
                                        modelbuilder.error(node, "Redef Error: Wrong return type. found {ret_type}, expected {precursor_ret_type}.")
@@ -943,7 +954,7 @@ redef class ATypePropdef
                var name = self.n_id.text
                var mprop = modelbuilder.try_get_mproperty_by_name(self.n_id, mclassdef, name)
                if mprop == null then
-                       var mvisibility = new_property_visibility(modelbuilder, nclassdef, self.n_visibility)
+                       var mvisibility = new_property_visibility(modelbuilder, mclassdef, self.n_visibility)
                        mprop = new MVirtualTypeProp(mclassdef, name, mvisibility)
                        for c in name.chars do if c >= 'a' and c<= 'z' then
                                modelbuilder.warning(n_id, "Warning: lowercase in the virtual type {name}")
@@ -953,7 +964,7 @@ redef class ATypePropdef
                else
                        if not self.check_redef_keyword(modelbuilder, nclassdef, self.n_kwredef, true, mprop) then return
                        assert mprop isa MVirtualTypeProp
-                       check_redef_property_visibility(modelbuilder, nclassdef, self.n_visibility, mprop)
+                       check_redef_property_visibility(modelbuilder, self.n_visibility, mprop)
                end
                nclassdef.mprop2npropdef[mprop] = self
 
@@ -963,22 +974,23 @@ redef class ATypePropdef
                set_doc(mpropdef)
        end
 
-       redef fun build_signature(modelbuilder, nclassdef)
+       redef fun build_signature(modelbuilder)
        do
                var mpropdef = self.mpropdef
                if mpropdef == null then return # Error thus skiped
-               var mmodule = mpropdef.mclassdef.mmodule
+               var mclassdef = mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
                var mtype: nullable MType = null
 
                var ntype = self.n_type
-               mtype = modelbuilder.resolve_mtype(nclassdef, ntype)
+               mtype = modelbuilder.resolve_mtype(mmodule, mclassdef, ntype)
                if mtype == null then return
 
                mpropdef.bound = mtype
                # print "{mpropdef}: {mtype}"
        end
 
-       redef fun check_signature(modelbuilder, nclassdef)
+       redef fun check_signature(modelbuilder)
        do
                var mpropdef = self.mpropdef
                if mpropdef == null then return # Error thus skiped
@@ -991,8 +1003,9 @@ redef class ATypePropdef
                # Fast case: the bound is not a formal type
                if not bound isa MVirtualType then return
 
-               var mmodule = nclassdef.mclassdef.mmodule
-               var anchor = nclassdef.mclassdef.bound_mtype
+               var mclassdef = mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
+               var anchor = mclassdef.bound_mtype
 
                # Slow case: progress on each resolution until: (i) we loop, or (ii) we found a non formal type
                var seen = [self.mpropdef.mproperty.mvirtualtype]
index 7fd49a4..fcdd045 100644 (file)
 # Generate API documentation in HTML format from nit source code.
 module nitdoc
 
-import model_utils
-import modelize_property
-import markdown
-import doc_template
-
-# The NitdocContext contains all the knowledge used for doc generation
-class NitdocContext
-
-       private var toolcontext = new ToolContext
-       private var mbuilder: ModelBuilder
-       private var mainmodule: MModule
-       private var output_dir: String
-       private var min_visibility: MVisibility
-
-       private var opt_dir = new OptionString("output directory", "-d", "--dir")
-       private var opt_source = new OptionString("link for source (%f for filename, %l for first line, %L for last line)", "--source")
-       private var opt_sharedir = new OptionString("directory containing nitdoc assets", "--sharedir")
-       private var opt_shareurl = new OptionString("use shareurl instead of copy shared files", "--shareurl")
-       private var opt_nodot = new OptionBool("do not generate graphes with graphviz", "--no-dot")
-       private var opt_private = new OptionBool("also generate private API", "--private")
-
-       private var opt_custom_title = new OptionString("custom title for homepage", "--custom-title")
-       private var opt_custom_menu = new OptionString("custom items added in top menu (each item must be enclosed in 'li' tags)", "--custom-menu-items")
-       private var opt_custom_intro = new OptionString("custom intro text for homepage", "--custom-overview-text")
-       private var opt_custom_footer = new OptionString("custom footer text", "--custom-footer-text")
-
-       private var opt_github_upstream = new OptionString("Git branch where edited commits will be pulled into (ex: user:repo:branch)", "--github-upstream")
-       private var opt_github_base_sha1 = new OptionString("Git sha1 of base commit used to create pull request", "--github-base-sha1")
-       private var opt_github_gitdir = new OptionString("Git working directory used to resolve path name (ex: /home/me/myproject/)", "--github-gitdir")
-
-       private var opt_piwik_tracker = new OptionString("Piwik tracker URL (ex: nitlanguage.org/piwik/)", "--piwik-tracker")
-       private var opt_piwik_site_id = new OptionString("Piwik site ID", "--piwik-site-id")
-
-       init do
-               var opts = toolcontext.option_context
-               opts.add_option(opt_dir, opt_source, opt_sharedir, opt_shareurl, opt_nodot, opt_private)
-               opts.add_option(opt_custom_title, opt_custom_footer, opt_custom_intro, opt_custom_menu)
-               opts.add_option(opt_github_upstream, opt_github_base_sha1, opt_github_gitdir)
-               opts.add_option(opt_piwik_tracker, opt_piwik_site_id)
-
-               var tpl = new Template
-               tpl.add "Usage: nitdoc [OPTION]... <file.nit>...\n"
-               tpl.add "Generates HTML pages of API documentation from Nit source files."
-               toolcontext.tooldescription = tpl.write_to_string
-               toolcontext.process_options(args)
-
-               self.process_options
-               self.parse(toolcontext.option_context.rest)
-       end
-
-       private fun process_options do
-               if opt_private.value then
-                       min_visibility = none_visibility
-               else
-                       min_visibility = protected_visibility
-               end
-               var gh_upstream = opt_github_upstream.value
-               var gh_base_sha = opt_github_base_sha1.value
-               var gh_gitdir = opt_github_gitdir.value
-               if not gh_upstream == null or not gh_base_sha == null or not gh_gitdir == null then
-                       if gh_upstream == null or gh_base_sha == null or gh_gitdir == null then
-                               print "Error: Options {opt_github_upstream.names.first}, {opt_github_base_sha1.names.first} and {opt_github_gitdir.names.first} are required to enable the GitHub plugin"
-                               abort
-                       end
-               end
-       end
-
-       private fun parse(arguments: Array[String]) do
-               var model = new Model
-               mbuilder = new ModelBuilder(model, toolcontext)
-               var mmodules = mbuilder.parse(arguments)
-               if mmodules.is_empty then return
-               mbuilder.run_phases
-               if mmodules.length == 1 then
-                       mainmodule = mmodules.first
-               else
-                       mainmodule = new MModule(model, null, "<main>", new Location(null, 0, 0, 0, 0))
-                       mainmodule.set_imported_mmodules(mmodules)
-               end
-       end
-
-       private fun generate_nitdoc do
-               init_output_dir
-               overview
-               search
-               modules
-               classes
-               quicksearch_list
-       end
-
-       private fun init_output_dir do
-               # location output dir
-               var output_dir = opt_dir.value
-               if output_dir == null then
-                       output_dir = "doc"
-               end
-               self.output_dir = output_dir
-               # create destination dir if it's necessary
-               if not output_dir.file_exists then output_dir.mkdir
-               # locate share dir
-               var sharedir = opt_sharedir.value
-               if sharedir == null then
-                       var dir = toolcontext.nit_dir
-                       if dir == null then
-                               print "Error: Cannot locate nitdoc share files. Uses --sharedir or envvar NIT_DIR"
-                               abort
-                       end
-                       sharedir = "{dir}/share/nitdoc"
-                       if not sharedir.file_exists then
-                               print "Error: Cannot locate nitdoc share files. Uses --sharedir or envvar NIT_DIR"
-                               abort
-                       end
-               end
-               # copy shared files
-               if opt_shareurl.value == null then
-                       sys.system("cp -r {sharedir.to_s}/* {output_dir.to_s}/")
-               else
-                       sys.system("cp -r {sharedir.to_s}/resources/ {output_dir.to_s}/resources/")
-               end
-
-       end
-
-       private fun overview do
-               var overviewpage = new NitdocOverview(self)
-               overviewpage.render.write_to_file("{output_dir.to_s}/index.html")
-       end
-
-       private fun search do
-               var searchpage = new NitdocSearch(self)
-               searchpage.render.write_to_file("{output_dir.to_s}/search.html")
-       end
-
-       private fun modules do
-               for mmodule in mbuilder.model.mmodules do
-                       if mmodule.name == "<main>" then continue
-                       var modulepage = new NitdocModule(mmodule, self)
-                       modulepage.render.write_to_file("{output_dir.to_s}/{mmodule.nitdoc_url}")
-               end
-       end
-
-       private fun classes do
-               for mclass in mbuilder.model.mclasses do
-                       var classpage = new NitdocClass(mclass, self)
-                       classpage.render.write_to_file("{output_dir.to_s}/{mclass.nitdoc_url}")
-               end
-       end
-
-       private fun quicksearch_list do
-               var quicksearch = new QuickSearch(self)
-               quicksearch.render.write_to_file("{output_dir.to_s}/quicksearch-list.js")
-       end
-end
-
-# Nitdoc QuickSearch list generator
-#
-# Create a JSON object containing links to:
-#  * modules
-#  * mclasses
-#  * mpropdefs
-# All entities are grouped by name to make the research easier.
-class QuickSearch
-
-       private var mmodules = new HashSet[MModule]
-       private var mclasses = new HashSet[MClass]
-       private var mpropdefs = new HashMap[String, Set[MPropDef]]
-
-       init(ctx: NitdocContext) do
-               for mmodule in ctx.mbuilder.model.mmodules do
-                       if mmodule.name == "<main>" then continue
-                       mmodules.add mmodule
-               end
-               for mclass in ctx.mbuilder.model.mclasses do
-                       if mclass.visibility < ctx.min_visibility then continue
-                       mclasses.add mclass
-               end
-               for mproperty in ctx.mbuilder.model.mproperties do
-                       if mproperty.visibility < ctx.min_visibility then continue
-                       if mproperty isa MAttribute then continue
-                       if not mpropdefs.has_key(mproperty.name) then
-                               mpropdefs[mproperty.name] = new HashSet[MPropDef]
-                       end
-                       mpropdefs[mproperty.name].add_all(mproperty.mpropdefs)
-               end
-       end
-
-       fun render: Template do
-               var tpl = new Template
-               tpl.add "var nitdocQuickSearchRawList=\{ "
-               for mmodule in mmodules do
-                       tpl.add "\"{mmodule.name}\":["
-                       tpl.add "\{txt:\"{mmodule.full_name}\",url:\"{mmodule.nitdoc_url}\"\},"
-                       tpl.add "],"
-               end
-               for mclass in mclasses do
-                       var full_name = mclass.intro.mmodule.full_name
-                       tpl.add "\"{mclass.name}\":["
-                       tpl.add "\{txt:\"{full_name}\",url:\"{mclass.nitdoc_url}\"\},"
-                       tpl.add "],"
-               end
-               for mproperty, mprops in mpropdefs do
-                       tpl.add "\"{mproperty}\":["
-                       for mpropdef in mprops do
-                               var full_name = mpropdef.mclassdef.mclass.full_name
-                               tpl.add "\{txt:\"{full_name}\",url:\"{mpropdef.nitdoc_url}\"\},"
-                       end
-                       tpl.add "],"
-               end
-               tpl.add " \};"
-               return tpl
-       end
-end
-
-# Nitdoc base page
-# Define page structure and properties
-abstract class NitdocPage
-
-       private var ctx: NitdocContext
-       private var shareurl = "."
-
-       init(ctx: NitdocContext) do
-               self.ctx = ctx
-               if ctx.opt_shareurl.value != null then shareurl = ctx.opt_shareurl.value.as(not null)
-       end
-
-       # Render the page as a html template
-       fun render: Template do
-               var tpl = new TplNitdocPage
-               tpl.head = tpl_head
-               tpl.topmenu = tpl_topmenu
-               tpl.sidebar = tpl_sidebar
-               tpl.content = tpl_content
-               tpl.footer = tpl_footer
-
-               tpl.body_attrs.add(new TagAttribute("data-bootstrap-share", shareurl))
-               if ctx.opt_github_upstream.value != null and ctx.opt_github_base_sha1.value != null then
-                       tpl.body_attrs.add(new TagAttribute("data-github-upstream", ctx.opt_github_upstream.value))
-                       tpl.body_attrs.add(new TagAttribute("data-github-base-sha1", ctx.opt_github_base_sha1.value))
-               end
-               var requirejs = new TplScript
-               requirejs.attrs.add(new TagAttribute("data-main", "{shareurl}/js/nitdoc"))
-               requirejs.attrs.add(new TagAttribute("src", "{shareurl}/js/lib/require.js"))
-               tpl.scripts.add requirejs
-
-               # piwik tracking
-               var tracker_url = ctx.opt_piwik_tracker.value
-               var site_id = ctx.opt_piwik_site_id.value
-               if tracker_url != null and site_id != null then
-                       tpl.scripts.add new TplPiwikScript(tracker_url, site_id)
-               end
-               return tpl
-       end
-
-       # Page title string
-       fun tpl_title: String do
-               if ctx.opt_custom_title.value != null then
-                       return ctx.opt_custom_title.value.to_s
-               else
-                       return "Nitdoc"
-               end
-       end
-
-       # Page <head> template
-       fun tpl_head: TplHead do return new TplHead(tpl_title, shareurl)
-
-       # Top menu template
-       fun tpl_topmenu: TplTopMenu do
-               var topmenu = new TplTopMenu
-               var custom_elt = ctx.opt_custom_menu.value
-               if custom_elt != null then topmenu.add_raw(custom_elt)
-               return topmenu
-       end
-
-       # Page sidebar template
-       # return null if no sidebar for this page
-       fun tpl_sidebar: nullable TplSidebar do return null
-
-       # Page content template
-       fun tpl_content: Template is abstract
-
-       # Page footer template
-       # return null if no footer for this page
-       fun tpl_footer: nullable TplFooter do
-               if ctx.opt_custom_footer.value != null then
-                       return new TplFooter(ctx.opt_custom_footer.value.to_s)
-               end
-               return null
-       end
-
-       # Clickable graphviz image using dot format
-       # return null if no graph for this page
-       fun tpl_graph(dot: FlatBuffer, name: String, alt: String): nullable TplGraph do
-               if ctx.opt_nodot.value then return null
-               var output_dir = ctx.output_dir
-               var file = new OFStream.open("{output_dir}/{name}.dot")
-               file.write(dot)
-               file.close
-               sys.system("\{ test -f {output_dir}/{name}.png && test -f {output_dir}/{name}.s.dot && diff {output_dir}/{name}.dot {output_dir}/{name}.s.dot >/dev/null 2>&1 ; \} || \{ cp {output_dir}/{name}.dot {output_dir}/{name}.s.dot && dot -Tpng -o{output_dir}/{name}.png -Tcmapx -o{output_dir}/{name}.map {output_dir}/{name}.s.dot ; \}")
-               var fmap = new IFStream.open("{output_dir}/{name}.map")
-               var map = fmap.read_all
-               fmap.close
-               return new TplGraph(name, alt, map)
-       end
-
-       # A (source) link template for a given location
-       fun tpl_showsource(location: nullable Location): nullable String
-       do
-               if location == null then return null
-               var source = ctx.opt_source.value
-               if source == null then return "({location.file.filename.simplify_path})"
-               # THIS IS JUST UGLY ! (but there is no replace yet)
-               var x = source.split_with("%f")
-               source = x.join(location.file.filename.simplify_path)
-               x = source.split_with("%l")
-               source = x.join(location.line_start.to_s)
-               x = source.split_with("%L")
-               source = x.join(location.line_end.to_s)
-               source = source.simplify_path
-               return " (<a target='_blank' title='Show source' href=\"{source.to_s}\">source</a>)"
-       end
-
-       # MClassDef description template
-       fun tpl_mclassdef_article(mclassdef: MClassDef): TplArticle do
-               var article = mclassdef.tpl_article
-               article.content = new Template
-               if not mclassdef.is_intro then
-                       # add intro synopsys
-                       var intro = mclassdef.mclass.intro
-                       var location = intro.location
-                       var sourcelink = tpl_showsource(location)
-                       var intro_def = intro.tpl_short_definition
-                       intro_def.location = sourcelink
-                       intro_def.github_area = tpl_github(intro.full_namespace, intro.mdoc, location)
-                       article.content.add intro_def
-               end
-               # add mclassdef full description
-               var location = mclassdef.location
-               var sourcelink = tpl_showsource(location)
-               var prop_def = mclassdef.tpl_definition
-               prop_def.location = sourcelink
-               prop_def.github_area = tpl_github(mclassdef.full_namespace, mclassdef.mdoc, location)
-               article.content.add prop_def
-               return article
-       end
-
-       # MPropDef description template
-       fun tpl_mpropdef_article(mpropdef: MPropDef): TplArticle do
-               var article = mpropdef.tpl_article
-               article.content = new Template
-               if not mpropdef.is_intro then
-                       # add intro synopsys
-                       var intro = mpropdef.mproperty.intro
-                       var location = intro.location
-                       var sourcelink = tpl_showsource(location)
-                       var intro_def = intro.tpl_short_definition
-                       intro_def.location = sourcelink
-                       intro_def.github_area = tpl_github(intro.full_namespace, intro.mdoc, location)
-                       article.content.add intro_def
-               end
-               # add mpropdef description
-               var location = mpropdef.location
-               var sourcelink = tpl_showsource(location)
-               var prop_def = mpropdef.tpl_definition
-               prop_def.location = sourcelink
-               prop_def.github_area = tpl_github(mpropdef.full_namespace, mpropdef.mdoc, location)
-               article.content.add prop_def
-               return article
-       end
-
-       # Github area (for Github comment edition plugin)
-       # return null if no github plugin for this page
-       fun tpl_github(namespace: String, mdoc: nullable MDoc, loc: nullable Location): nullable TplGithubArea do
-               if loc == null then return null
-               if ctx.opt_github_gitdir.value == null then return null
-               var gitdir = ctx.opt_github_gitdir.value.as(not null)
-               var location = loc.github(gitdir)
-               var comment: String
-               if mdoc != null then
-                       comment = mdoc.full_comment
-               else
-                       comment = ""
-               end
-               return new TplGithubArea(comment, namespace, location)
-       end
-end
-
-# The overview page
-# Display a list of modules contained in program
-class NitdocOverview
-       super NitdocPage
-
-       private var mmodules = new Array[MModule]
-
-       init(ctx: NitdocContext) do
-               super(ctx)
-               # get modules
-               var mmodules = new HashSet[MModule]
-               for mmodule in ctx.mbuilder.model.mmodule_importation_hierarchy do
-                       if mmodule.name == "<main>" then continue
-                       var owner = mmodule.public_owner
-                       if owner != null then
-                               mmodules.add(owner)
-                       else
-                               mmodules.add(mmodule)
-                       end
-               end
-               # sort modules
-               var sorter = new MModuleNameSorter
-               self.mmodules.add_all(mmodules)
-               sorter.sort(self.mmodules)
-       end
-
-       redef fun tpl_title do return "Overview | {super}"
-
-       redef fun tpl_topmenu do
-               var topmenu = super
-               topmenu.add_elt("#", "Overview", true)
-               topmenu.add_elt("search.html", "Search", false)
-               return topmenu
-       end
-
-       redef fun tpl_content do
-               var tpl = new TplOverviewPage
-               # title
-               if ctx.opt_custom_title.value != null then
-                       tpl.title = ctx.opt_custom_title.value.to_s
-               else
-                       tpl.title = "Overview"
-               end
-               # intro text
-               if ctx.opt_custom_intro.value != null then
-                       tpl.text = ctx.opt_custom_intro.value.to_s
-               end
-               # module list
-               for mmodule in mmodules do
-                       if mmodule.mdoc != null then
-                               var mtpl = new Template
-                               mtpl.add mmodule.tpl_link
-                               mtpl.add "&nbsp;"
-                               mtpl.add mmodule.mdoc.short_comment
-                               tpl.modules.add mtpl
-                       end
-               end
-               # module graph
-               tpl.graph = tpl_dot
-               return tpl
-       end
-
-       # Genrate dot and template for module hierarchy
-       fun tpl_dot: nullable TplGraph do
-               # build poset with public owners
-               var poset = new POSet[MModule]
-               for mmodule in mmodules do
-                       poset.add_node(mmodule)
-                       for omodule in mmodules do
-                               if mmodule == omodule then continue
-                               if mmodule.in_importation < omodule then
-                                       poset.add_node(omodule)
-                                       poset.add_edge(mmodule, omodule)
-                               end
-                       end
-               end
-               # build graph
-               var op = new FlatBuffer
-               op.append("digraph dep \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n")
-               for mmodule in poset do
-                       op.append("\"{mmodule.name}\"[URL=\"{mmodule.nitdoc_url}\"];\n")
-                       for omodule in poset[mmodule].direct_greaters do
-                               op.append("\"{mmodule.name}\"->\"{omodule.name}\";\n")
-                       end
-               end
-               op.append("\}\n")
-               return tpl_graph(op, "dep", "Modules hierarchy")
-       end
-end
-
-# The search page
-# Display a list of modules, classes and properties
-class NitdocSearch
-       super NitdocPage
-
-       init(ctx: NitdocContext) do super(ctx)
-
-       redef fun tpl_title do return "Search | {super}"
-
-       redef fun tpl_topmenu do
-               var topmenu = super
-               topmenu.add_elt("index.html", "Overview", false)
-               topmenu.add_elt("#", "Search", true)
-               return topmenu
-       end
-
-       redef fun tpl_content do
-               var tpl = new TplSearchPage
-               # title
-               tpl.title = "Search"
-               # modules list
-               for mmodule in modules_list do
-                       tpl.modules.add mmodule.tpl_link
-               end
-               # classes list
-               for mclass in classes_list do
-                       tpl.classes.add mclass.tpl_link
-               end
-               # properties list
-               for mproperty in mprops_list do
-                       var m = new Template
-                       m.add mproperty.intro.tpl_link
-                       m.add " ("
-                       m.add mproperty.intro.mclassdef.mclass.tpl_link
-                       m.add ")"
-                       tpl.props.add m
-               end
-               return tpl
-       end
-
-       # Extract mmodule list to display (sorted by name)
-       private fun modules_list: Array[MModule] do
-               var sorted = new Array[MModule]
-               for mmodule in ctx.mbuilder.model.mmodule_importation_hierarchy do
-                       if mmodule.name == "<main>" then continue
-                       sorted.add mmodule
-               end
-               var sorter = new MModuleNameSorter
-               sorter.sort(sorted)
-               return sorted
-       end
-
-       # Extract mclass list to display (sorted by name)
-       private fun classes_list: Array[MClass] do
-               var sorted = new Array[MClass]
-               for mclass in ctx.mbuilder.model.mclasses do
-                       if mclass.visibility < ctx.min_visibility then continue
-                       sorted.add mclass
-               end
-               var sorter = new MClassNameSorter
-               sorter.sort(sorted)
-               return sorted
-       end
-
-       # Extract mproperty list to display (sorted by name)
-       private fun mprops_list: Array[MProperty] do
-               var sorted = new Array[MProperty]
-               for mproperty in ctx.mbuilder.model.mproperties do
-                       if mproperty.visibility < ctx.min_visibility then continue
-                       if mproperty isa MAttribute then continue
-                       sorted.add mproperty
-               end
-               var sorter = new MPropertyNameSorter
-               sorter.sort(sorted)
-               return sorted
-       end
-end
-
-# A module page
-# Display the list of introduced and redefined classes in module
-class NitdocModule
-       super NitdocPage
-
-       private var mmodule: MModule
-       private var intro_mclassdefs: Set[MClassDef]
-       private var redef_mclassdefs: Set[MClassDef]
-       private var sorted_intro_mclassdefs: Array[MClassDef]
-       private var sorted_redef_mclassdefs: Array[MClassDef]
-
-       init(mmodule: MModule, ctx: NitdocContext) do
-               self.mmodule = mmodule
-               var sorter = new MClassDefNameSorter
-               intro_mclassdefs = in_nesting_intro_mclassdefs(ctx.min_visibility)
-               sorted_intro_mclassdefs = intro_mclassdefs.to_a
-               sorter.sort sorted_intro_mclassdefs
-               redef_mclassdefs = in_nesting_redef_mclassdefs(ctx.min_visibility)
-               sorted_redef_mclassdefs = redef_mclassdefs.to_a
-               sorter.sort sorted_redef_mclassdefs
-               super(ctx)
-       end
-
-       redef fun tpl_title do
-               if mmodule.mdoc != null then
-                       return "{mmodule.nitdoc_name} module | {mmodule.mdoc.short_comment} | {super}"
-               else
-                       return "{mmodule.nitdoc_name} module | {super}"
-               end
-       end
-
-       redef fun tpl_topmenu do
-               var topmenu = super
-               topmenu.add_elt("index.html", "Overview", false)
-               topmenu.add_elt("#", "{mmodule.nitdoc_name}", true)
-               topmenu.add_elt("search.html", "Search", false)
-               return topmenu
-       end
-
-       redef fun tpl_sidebar do
-               var sidebar = new TplSidebar
-               tpl_sidebar_classes(sidebar)
-               tpl_sidebar_inheritance(sidebar)
-               return sidebar
-       end
-
-       # Classes to display on sidebar
-       fun tpl_sidebar_classes(sidebar: TplSidebar) do
-               var box = new TplSidebarBox("Class Definitions")
-               var group = new TplSidebarGroup("Introductions")
-               for mclassdef in sorted_intro_mclassdefs do
-                       tpl_sidebar_item(mclassdef, group)
-               end
-               box.elts.add group
-               group = new TplSidebarGroup("Refinements")
-               for mclassdef in sorted_redef_mclassdefs do
-                       if intro_mclassdefs.has(mclassdef.mclass.intro) then continue
-                       tpl_sidebar_item(mclassdef, group)
-               end
-               box.elts.add group
-               sidebar.boxes.add box
-       end
-
-       # Module inheritance to display on sidebar
-       fun tpl_sidebar_inheritance(sidebar: TplSidebar) do
-               var box = new TplSidebarBox("Module Hierarchy")
-               box.elts.add tpl_sidebar_group("Nested Modules", mmodule.in_nesting.direct_greaters.to_a)
-               var dependencies = new Array[MModule]
-               for dep in mmodule.in_importation.greaters do
-                       if dep == mmodule or
-                               dep.direct_owner == mmodule or
-                               dep.public_owner == mmodule then continue
-                       dependencies.add(dep)
-               end
-               if dependencies.length > 0 then
-                       box.elts.add tpl_sidebar_group("All dependencies", dependencies)
-               end
-               var clients = new Array[MModule]
-               for dep in mmodule.in_importation.smallers do
-                       if dep.name == "<main>" then continue
-                       if dep == mmodule then continue
-                       clients.add(dep)
-               end
-               if clients.length > 0 then
-                       box.elts.add tpl_sidebar_group("All clients", clients)
-               end
-               sidebar.boxes.add box
-       end
-
-       private fun tpl_sidebar_item(mclassdef: MClassDef, group: TplSidebarGroup) do
-               if mclassdef.is_intro then
-                       group.add_bullet("I", "Introduced", mclassdef.tpl_link_anchor, ["intro"])
-               else
-                       group.add_bullet("R", "Redefined", mclassdef.tpl_link_anchor, ["redef"])
-               end
-       end
-
-       private fun tpl_sidebar_group(name: String, elts: Array[MModule]): TplSidebarGroup do
-               var group = new TplSidebarGroup(name)
-               for elt in elts do
-                       group.add_elt(elt.tpl_link, new Array[String])
-               end
-               return group
-       end
-
-       redef fun tpl_content do
-               var class_sorter = new MClassNameSorter
-               var tpl = new TplModulePage
-               tpl.title = mmodule.nitdoc_name
-               tpl.subtitle = mmodule.tpl_signature
-               tpl.definition = mmodule.tpl_definition
-               var location = mmodule.location
-               tpl.definition.location = tpl_showsource(location)
-               tpl.definition.github_area = tpl_github(mmodule.full_namespace, mmodule.mdoc, location)
-               tpl.graph = tpl_dot
-               for mclassdef in sorted_intro_mclassdefs do tpl.intros.add tpl_mclassdef_article(mclassdef)
-               for mclassdef in sorted_redef_mclassdefs do
-                       if intro_mclassdefs.has(mclassdef.mclass.intro) then continue
-                       tpl.redefs.add tpl_mclassdef_article(mclassdef)
-               end
-               return tpl
-       end
-
-       # Genrate dot hierarchy for class inheritance
-       fun tpl_dot: nullable TplGraph do
-               # build poset with public owners
-               var poset = new POSet[MModule]
-               for mmodule in self.mmodule.in_importation.poset do
-                       if mmodule.name == "<main>" then continue
-                       #if mmodule.public_owner != null then continue
-                       if not mmodule.in_importation < self.mmodule and not self.mmodule.in_importation < mmodule and mmodule != self.mmodule then continue
-                       poset.add_node(mmodule)
-                       for omodule in mmodule.in_importation.poset do
-                               if mmodule == omodule then continue
-                               if omodule.name == "<main>" then continue
-                               if not omodule.in_importation < self.mmodule and not self.mmodule.in_importation < omodule then continue
-                               if omodule.in_importation < mmodule then
-                                       poset.add_node(omodule)
-                                       poset.add_edge(omodule, mmodule)
-                               end
-                               if mmodule.in_importation < omodule then
-                                       poset.add_node(omodule)
-                                       poset.add_edge(mmodule, omodule)
-                               end
-                               #if omodule.public_owner != null then continue
-                               #if mmodule.in_importation < omodule then
-                                       #poset.add_node(omodule)
-                                       #poset.add_edge(mmodule, omodule)
-                               #end
-                       end
-               end
-               # build graph
-               var op = new FlatBuffer
-               var name = "dep_{mmodule.name}"
-               op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n")
-               for mmodule in poset do
-                       if mmodule == self.mmodule then
-                               op.append("\"{mmodule.name}\"[shape=box,margin=0.03];\n")
-                       else
-                               op.append("\"{mmodule.name}\"[URL=\"{mmodule.nitdoc_url}\"];\n")
-                       end
-                       for omodule in poset[mmodule].direct_greaters do
-                               op.append("\"{mmodule.name}\"->\"{omodule.name}\";\n")
-                       end
-               end
-               op.append("\}\n")
-               return tpl_graph(op, name, "Dependency graph for module {mmodule.name}")
-       end
-
-       private fun in_nesting_intro_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
-               var res = new HashSet[MClassDef]
-               for mmodule in self.mmodule.in_nesting.greaters do
-                       res.add_all mmodule.intro_mclassdefs(min_visibility)
-               end
-               return res
-       end
-
-       private fun in_nesting_redef_mclassdefs(min_visibility: MVisibility): Set[MClassDef] do
-               var res = new HashSet[MClassDef]
-               for mmodule in self.mmodule.in_nesting.greaters do
-                       res.add_all mmodule.redef_mclassdefs(min_visibility)
-               end
-               return res
-       end
-end
-
-# A class page
-# Display a list properties defined or redefined for this class
-class NitdocClass
-       super NitdocPage
-
-       private var mclass: MClass
-       private var inherited_mpropdefs: Set[MPropDef]
-       private var intro_mpropdefs: Set[MPropDef]
-       private var redef_mpropdefs: Set[MPropDef]
-       private var all_mpropdefs: Set[MPropDef]
-
-       init(mclass: MClass, ctx: NitdocContext) do
-               self.mclass = mclass
-               super(ctx)
-               intro_mpropdefs = mclass_intro_mpropdefs
-               redef_mpropdefs = mclass_redef_mpropdefs
-               inherited_mpropdefs = in_nesting_inherited_mpropedefs
-               all_mpropdefs = new HashSet[MPropDef]
-               all_mpropdefs.add_all intro_mpropdefs
-               all_mpropdefs.add_all redef_mpropdefs
-               all_mpropdefs.add_all inherited_mpropdefs
-       end
-
-       private fun in_nesting_inherited_mpropedefs: Set[MPropDef] do
-               var res = new HashSet[MPropDef]
-               var local = mclass.local_mproperties(ctx.min_visibility)
-               for mprop in mclass.inherited_mproperties(ctx.mainmodule, ctx.min_visibility) do
-                       if local.has(mprop) then continue
-                       if mprop isa MMethod and mprop.is_init then continue
-                       res.add mprop.intro
-               end
-               return res
-       end
-
-       private fun mclass_intro_mpropdefs: Set[MPropDef] do
-               var res = new HashSet[MPropDef]
-               for mclassdef in mclass.mclassdefs do
-                       var owner = mclassdef.mmodule.public_owner
-                       if owner == null then owner = mclassdef.mmodule
-                       for mpropdef in mclassdef.mpropdefs do
-                               if not mpropdef.is_intro then continue
-                               if owner != mclass.public_owner then continue
-                               var mprop = mpropdef.mproperty
-                               if mprop isa MMethod and mprop.is_init and mclass.is_abstract then continue
-                               if mprop.visibility < ctx.min_visibility then continue
-                               res.add mpropdef
-                       end
-               end
-               return res
-       end
-
-       private fun mclass_redef_mpropdefs: Set[MPropDef] do
-               var res = new HashSet[MPropDef]
-               for mclassdef in mclass.mclassdefs do
-                       if mclassdef == mclass.intro then continue
-                       var owner = mclassdef.mmodule.public_owner
-                       if owner == null then owner = mclassdef.mmodule
-                       for mpropdef in mclassdef.mpropdefs do
-                               if owner == mclass.public_owner then continue
-                               if mpropdef.mproperty.visibility < ctx.min_visibility then continue
-                               res.add mpropdef
-                       end
-               end
-               return res
-       end
-
-       redef fun tpl_title do
-               if mclass.mdoc != null then
-                       return "{mclass.nitdoc_name} class | {mclass.mdoc.short_comment} | {super}"
-               else
-                       return "{mclass.nitdoc_name} class | {super}"
-               end
-       end
-
-       redef fun tpl_topmenu do
-               var topmenu = super
-               var mmodule: MModule
-               if mclass.public_owner == null then
-                       mmodule = mclass.intro_mmodule
-               else
-                       mmodule = mclass.public_owner.as(not null)
-               end
-               topmenu.add_elt("index.html", "Overview", false)
-               topmenu.add_elt("{mmodule.nitdoc_url}", "{mmodule.nitdoc_name}", false)
-               topmenu.add_elt("#", "{mclass.nitdoc_name}", true)
-               topmenu.add_elt("search.html", "Search", false)
-               return topmenu
-       end
-
-       redef fun tpl_sidebar do
-               var sidebar = new TplSidebar
-               tpl_sidebar_properties(sidebar)
-               tpl_sidebar_inheritance(sidebar)
-               return sidebar
-       end
-
-       # Property list to display in sidebar
-       fun tpl_sidebar_properties(sidebar: TplSidebar) do
-               var kind_map = sort_by_kind(all_mpropdefs)
-               var sorter = new MPropDefNameSorter
-               var box = new TplSidebarBox("Properties")
-               # virtual types
-               var elts = kind_map["type"].to_a
-               sorter.sort(elts)
-               var group = new TplSidebarGroup("Virtual Types")
-               for mprop in elts do
-                       tpl_sidebar_item(mprop, group)
-               end
-               box.elts.add group
-               # constructors
-               elts = kind_map["init"].to_a
-               sorter.sort(elts)
-               group = new TplSidebarGroup("Constructors")
-               for mprop in elts do
-                       tpl_sidebar_item(mprop, group)
-               end
-               box.elts.add group
-               # methods
-               elts = kind_map["fun"].to_a
-               sorter.sort(elts)
-               group = new TplSidebarGroup("Methods")
-               for mprop in elts do
-                       tpl_sidebar_item(mprop, group)
-               end
-               box.elts.add group
-               sidebar.boxes.add box
-       end
-
-       # Class inheritance to display in sidebar
-       fun tpl_sidebar_inheritance(sidebar: TplSidebar) do
-               var sorted = new Array[MClass]
-               var sorterp = new MClassNameSorter
-               var box = new TplSidebarBox("Inheritance")
-               var greaters = mclass.in_hierarchy(ctx.mainmodule).greaters.to_a
-               if greaters.length > 1 then
-                       ctx.mainmodule.linearize_mclasses(greaters)
-                       box.elts.add tpl_sidebar_group("Superclasses", greaters)
-               end
-               var smallers = mclass.in_hierarchy(ctx.mainmodule).smallers.to_a
-               var direct_smallers = mclass.in_hierarchy(ctx.mainmodule).direct_smallers.to_a
-               if smallers.length <= 1 then
-                       box.elts.add(new TplSidebarGroup("No Known Subclasses"))
-               else if smallers.length <= 100 then
-                       ctx.mainmodule.linearize_mclasses(smallers)
-                       box.elts.add tpl_sidebar_group("Subclasses", smallers)
-               else if direct_smallers.length <= 100 then
-                       ctx.mainmodule.linearize_mclasses(direct_smallers)
-                       box.elts.add tpl_sidebar_group("Direct Subclasses Only", direct_smallers)
-               else
-                       box.elts.add(new TplSidebarGroup("Too much Subclasses to list"))
-               end
-               sidebar.boxes.add box
-       end
-
-       private fun tpl_sidebar_item(mprop: MPropDef, group: TplSidebarGroup) do
-               if mprop.is_intro and mprop.mclassdef.mclass == mclass then
-                       group.add_bullet("I", "Introduced", mprop.tpl_link, ["intro"])
-               else if mprop.is_intro and mprop.mclassdef.mclass != mclass then
-                       group.add_bullet("H", "Inherited", mprop.tpl_link, ["inherit"])
-               else
-                       group.add_bullet("R", "Redefined", mprop.tpl_link, ["redef"])
-               end
-       end
-
-       private fun tpl_sidebar_group(name: String, elts: Array[MClass]): TplSidebarGroup do
-               var group = new TplSidebarGroup(name)
-               for elt in elts do
-                       if elt == mclass then continue
-                       group.add_elt(elt.tpl_link, new Array[String])
-               end
-               return group
-       end
-
-       redef fun tpl_content do
-               var intro = mclass.intro
-               var tpl = new TplClassPage
-               tpl.title = "{mclass.nitdoc_name}{mclass.tpl_short_signature}"
-               tpl.subtitle = mclass.tpl_namespace_with_signature
-               tpl.definition = intro.tpl_definition
-               var location = intro.location
-               tpl.definition.location = tpl_showsource(location)
-               tpl.definition.github_area = tpl_github(intro.full_namespace, intro.mdoc, location)
-               tpl.graph = tpl_dot
-
-               # properties
-               var prop_sorter = new MPropDefNameSorter
-               var kind_map = sort_by_kind(intro_mpropdefs)
-
-               # virtual types
-               var elts = kind_map["type"].to_a
-               prop_sorter.sort(elts)
-               for elt in elts do tpl.types.add tpl_mpropdef_article(elt)
-
-               # constructors
-               elts = kind_map["init"].to_a
-               prop_sorter.sort(elts)
-               for elt in elts do tpl.inits.add tpl_mpropdef_article(elt)
-
-               # intro methods
-               elts = kind_map["fun"].to_a
-               prop_sorter.sort(elts)
-               for elt in elts do tpl.methods.add tpl_mpropdef_article(elt)
-
-               # redef methods
-               kind_map = sort_by_kind(redef_mpropdefs)
-               var module_sorter = new MModuleNameSorter
-               var module_map = sort_by_mmodule(kind_map["fun"])
-               var owner_map = sort_by_public_owner(module_map.keys)
-               var owners = owner_map.keys.to_a
-               module_sorter.sort owners
-
-               var ctpl = new TplConcernList
-               var mtpl = new Template
-               for owner in owners do
-                       # concerns list
-                       var octpl = new TplConcernListElt
-                       octpl.anchor = "#{owner.nitdoc_anchor}"
-                       octpl.name = owner.nitdoc_name
-                       if owner.mdoc != null then
-                               octpl.comment = owner.mdoc.short_comment
-                       end
-                       ctpl.elts.add octpl
-                       # concern section
-                       var otpl = new TplTopConcern
-                       otpl.anchor = owner.nitdoc_anchor
-                       otpl.concern = owner.tpl_link
-                       mtpl.add otpl
-
-                       var mmodules = owner_map[owner].to_a
-                       module_sorter.sort mmodules
-                       var stpl = new TplConcernList
-                       for mmodule in mmodules do
-                               # concerns list
-                               if mmodule != owner then
-                                       var mctpl = new TplConcernListElt
-                                       mctpl.anchor = "#{mmodule.nitdoc_anchor}"
-                                       mctpl.name = mmodule.nitdoc_name
-                                       if mmodule.mdoc != null then
-                                               mctpl.comment = mmodule.mdoc.short_comment
-                                       end
-                                       stpl.elts.add mctpl
-                                       # concern section
-                                       var cctpl = new TplConcern
-                                       cctpl.anchor = mmodule.nitdoc_anchor
-                                       cctpl.concern = mmodule.tpl_link
-                                       if mmodule.mdoc != null then
-                                               cctpl.comment = mmodule.mdoc.short_comment
-                                       end
-                                       mtpl.add cctpl
-                               end
-                               var mprops = module_map[mmodule].to_a
-                               prop_sorter.sort mprops
-                               for mprop in mprops do mtpl.add tpl_mpropdef_article(mprop)
-                       end
-                       ctpl.elts.add stpl
-               end
-               if not owners.is_empty then
-                       tpl.concerns = ctpl
-               end
-               tpl.methods.add mtpl
-               return tpl
-       end
-
-       private fun sort_by_kind(mpropdefs: Set[MPropDef]): Map[String, Set[MPropDef]] do
-               var map = new HashMap[String, Set[MPropDef]]
-               map["type"] = new HashSet[MPropDef]
-               map["init"] = new HashSet[MPropDef]
-               map["fun"] = new HashSet[MPropDef]
-               for mpropdef in mpropdefs do
-                       if mpropdef isa MVirtualTypeDef then
-                               map["type"].add mpropdef
-                       else if mpropdef isa MMethodDef then
-                               if mpropdef.mproperty.is_init then
-                                       map["init"].add mpropdef
-                               else
-                                       map["fun"].add mpropdef
-                               end
-                       end
-               end
-               return map
-       end
-
-       private fun sort_by_mmodule(mpropdefs: Collection[MPropDef]): Map[MModule, Set[MPropDef]] do
-               var map = new HashMap[MModule, Set[MPropDef]]
-               for mpropdef in mpropdefs do
-                       var mmodule = mpropdef.mclassdef.mmodule
-                       if not map.has_key(mmodule) then map[mmodule] = new HashSet[MPropDef]
-                       map[mmodule].add mpropdef
-               end
-               return map
-       end
-
-       private fun sort_by_public_owner(mmodules: Collection[MModule]): Map[MModule, Set[MModule]] do
-               var map = new HashMap[MModule, Set[MModule]]
-               for mmodule in mmodules do
-                       var owner = mmodule
-                       if mmodule.public_owner != null then owner = mmodule.public_owner.as(not null)
-                       if not map.has_key(owner) then map[owner] = new HashSet[MModule]
-                       map[owner].add mmodule
-               end
-               return map
-       end
-
-       # Generate dot hierarchy for classes
-       fun tpl_dot: nullable TplGraph do
-               var pe = mclass.in_hierarchy(ctx.mainmodule)
-               var cla = new HashSet[MClass]
-               var sm = new HashSet[MClass]
-               var sm2 = new HashSet[MClass]
-               sm.add(mclass)
-               while cla.length + sm.length < 10 and sm.length > 0 do
-                       cla.add_all(sm)
-                       sm2.clear
-                       for x in sm do
-                               sm2.add_all(pe.poset[x].direct_smallers)
-                       end
-                       var t = sm
-                       sm = sm2
-                       sm2 = t
-               end
-               cla.add_all(pe.greaters)
-
-               var op = new FlatBuffer
-               var name = "dep_{mclass.name}"
-               op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n")
-               for c in cla do
-                       if c == mclass then
-                               op.append("\"{c.name}\"[shape=box,margin=0.03];\n")
-                       else
-                               op.append("\"{c.name}\"[URL=\"{c.nitdoc_url}\"];\n")
-                       end
-                       for c2 in pe.poset[c].direct_greaters do
-                               if not cla.has(c2) then continue
-                               op.append("\"{c.name}\"->\"{c2.name}\";\n")
-                       end
-                       if not pe.poset[c].direct_smallers.is_empty then
-                               var others = true
-                               for c2 in pe.poset[c].direct_smallers do
-                                       if cla.has(c2) then others = false
-                               end
-                               if others then
-                                       op.append("\"{c.name}...\"[label=\"\"];\n")
-                                       op.append("\"{c.name}...\"->\"{c.name}\"[style=dotted];\n")
-                               end
-                       end
-               end
-               op.append("\}\n")
-               return tpl_graph(op, name, "Dependency graph for class {mclass.name}")
-       end
-end
-
-#
-# Model redefs
-#
-
-redef class MModule
-       # Return the HTML escaped name of the module
-       private fun nitdoc_name: String do return name.html_escape
-
-       private fun full_namespace: String do
-               if public_owner != null then
-                       return "{public_owner.nitdoc_name}::{nitdoc_name}"
-               end
-               return nitdoc_name
-       end
-
-       # URL to nitdoc page
-       #       module_owner_name.html
-       private fun nitdoc_url: String do
-               var res = new FlatBuffer
-               res.append("module_")
-               var mowner = public_owner
-               if mowner != null then
-                       res.append("{public_owner.name}_")
-               end
-               res.append("{self.name}.html")
-               return res.to_s
-       end
-
-       # html nitdoc_anchor id for the module in a nitdoc page
-       #       MOD_owner_name
-       private fun nitdoc_anchor: String do
-               var res = new FlatBuffer
-               res.append("MOD_")
-               var mowner = public_owner
-               if mowner != null then
-                       res.append("{public_owner.name}_")
-               end
-               res.append(self.name)
-               return res.to_s
-       end
-
-       # Return a link (html a tag) to the nitdoc module page
-       private fun tpl_link: TplLink do
-               var tpl = new TplLink
-               tpl.href = nitdoc_url
-               tpl.text = nitdoc_name
-               if mdoc != null then
-                       tpl.title = mdoc.short_comment
-               end
-               return tpl
-       end
-
-       # Return the module signature decorated with html
-       private fun tpl_signature: Template do
-               var tpl = new Template
-               tpl.add "<span>module "
-               tpl.add tpl_full_namespace
-               tpl.add "</span>"
-               return tpl
-       end
-
-       # Return the module full namespace decorated with html
-       private fun tpl_full_namespace: Template do
-               var tpl = new Template
-               tpl.add ("<span>")
-               var mowner = public_owner
-               if mowner != null then
-                       tpl.add public_owner.tpl_namespace
-                       tpl.add "::"
-               end
-               tpl.add tpl_link
-               tpl.add "</span>"
-               return tpl
-       end
-
-       # Return the module full namespace decorated with html
-       private fun tpl_namespace: Template do
-               var tpl = new Template
-               tpl.add "<span>"
-               var mowner = public_owner
-               if mowner != null then
-                       tpl.add public_owner.tpl_namespace
-               else
-                       tpl.add tpl_link
-               end
-               tpl.add "</span>"
-               return tpl
-       end
-
-       # Description with short comment
-       private fun tpl_short_definition: TplDefinition do
-               var tpl = new TplDefinition
-               tpl.namespace = tpl_namespace
-               if mdoc != null then
-                       tpl.comment = mdoc.tpl_short_comment
-               end
-               return tpl
-       end
-
-       # Description with full comment
-       private fun tpl_definition: TplDefinition do
-               var tpl = new TplDefinition
-               tpl.namespace = tpl_namespace
-               if mdoc != null then
-                       tpl.comment = mdoc.tpl_comment
-               end
-               return tpl
-       end
-end
-
-redef class MClass
-       # Return the HTML escaped name of the module
-       private fun nitdoc_name: String do return name.html_escape
-
-       # URL to nitdoc page
-       #       class_owner_name.html
-       private fun nitdoc_url: String do
-               return "class_{public_owner}_{name}.html"
-       end
-
-       # html nitdoc_anchor id for the class in a nitdoc page
-       #       MOD_owner_name
-       private fun nitdoc_anchor: String do
-               return "CLASS_{public_owner.name}_{name}"
-       end
-
-       # Return a link (with signature) to the nitdoc class page
-       private fun tpl_link: TplLink do
-               var tpl = new TplLink
-               tpl.href = nitdoc_url
-               tpl.text = "{nitdoc_name}{tpl_short_signature.write_to_string}"
-               if intro.mdoc != null then
-                       tpl.title = intro.mdoc.short_comment
-               end
-               return tpl
-       end
-
-       # Return a short link (without signature) to the nitdoc class page
-       private fun tpl_short_link: TplLink do
-               var tpl = new TplLink
-               tpl.href = nitdoc_url
-               tpl.text = nitdoc_name
-               if intro.mdoc != null then
-                       tpl.title = intro.mdoc.short_comment
-               end
-               return tpl
-       end
-
-       # Return a link (with signature) to the class nitdoc_anchor
-       private fun tpl_link_anchor: TplLink do
-               var tpl = new TplLink
-               tpl.href = "#{nitdoc_anchor}"
-               tpl.text = "{nitdoc_name}{tpl_short_signature.write_to_string}"
-               if intro.mdoc != null then
-                       tpl.title = intro.mdoc.short_comment
-               end
-               return tpl
-       end
-
-       # Return the generic signature of the class with bounds
-       private fun tpl_signature: Template do
-               var tpl = new Template
-               if arity > 0 then
-                       tpl.add "["
-                       for i in [0..intro.parameter_names.length[ do
-                               tpl.add "{intro.parameter_names[i]}: "
-                               tpl.add intro.bound_mtype.arguments[i].tpl_link
-                               if i < intro.parameter_names.length - 1 then tpl.add ", "
-                       end
-                       tpl.add "]"
-               end
-               return tpl
-       end
-
-       # Return the generic signature of the class without bounds
-       private fun tpl_short_signature: String do
-               if arity > 0 then
-                       return "[{intro.parameter_names.join(", ")}]"
-               else
-                       return ""
-               end
-       end
-
-       # Return the class namespace decorated with html
-       private fun tpl_namespace: Template do
-               var tpl = new Template
-               tpl.add intro_mmodule.tpl_namespace
-               tpl.add "::<span>"
-               tpl.add tpl_short_link
-               tpl.add "</span>"
-               return tpl
-       end
-
-       private fun tpl_namespace_with_signature: Template do
-               var tpl = new Template
-               tpl.add intro.tpl_modifiers
-               tpl.add intro.mmodule.tpl_namespace
-               tpl.add "::"
-               tpl.add nitdoc_name
-               tpl.add tpl_signature
-               return tpl
-       end
-end
-
-redef class MProperty
-       # Escape name for html output
-       private fun nitdoc_name: String do return name.html_escape
-
-       # Return the property namespace decorated with html
-       private fun tpl_namespace: Template do
-               var tpl = new Template
-               tpl.add intro_mclassdef.mclass.tpl_namespace
-               tpl.add intro_mclassdef.mclass.tpl_short_signature
-               tpl.add "::<span>"
-               tpl.add intro.tpl_link
-               tpl.add "</span>"
-               return tpl
-       end
-
-       private fun tpl_signature: Template is abstract
-end
-
-redef class MMethod
-       redef fun tpl_signature do return intro.msignature.tpl_signature
-end
-
-redef class MVirtualTypeProp
-       redef fun tpl_signature do
-               var tpl = new Template
-               tpl.add ": "
-               tpl.add  intro.bound.tpl_link
-               return tpl
-       end
-end
-
-redef class MType
-       # Link to the type definition in the nitdoc page
-       private fun tpl_link: Template is abstract
-end
-
-redef class MClassType
-       redef fun tpl_link do return mclass.tpl_link
-end
-
-redef class MNullableType
-       redef fun tpl_link do
-               var tpl = new Template
-               tpl.add "nullable "
-               tpl.add mtype.tpl_link
-               return tpl
-       end
-end
-
-redef class MGenericType
-       redef fun tpl_link: Template do
-               var tpl = new Template
-               tpl.add mclass.tpl_short_link
-               tpl.add "["
-               for i in [0..arguments.length[ do
-                       tpl.add arguments[i].tpl_link
-                       if i < arguments.length - 1 then tpl.add ", "
-               end
-               tpl.add "]"
-               return tpl
-       end
-end
-
-redef class MParameterType
-       redef fun tpl_link do
-               var name = mclass.intro.parameter_names[rank]
-               var tpl = new TplLink
-               tpl.href = "{mclass.nitdoc_url}#FT_{name}"
-               tpl.text = name
-               tpl.title = "formal type"
-               return tpl
-       end
-end
-
-redef class MVirtualType
-       redef fun tpl_link do return mproperty.intro.tpl_link
-end
-
-redef class MClassDef
-       # Return the classdef namespace decorated with html
-       private fun tpl_namespace: Template do
-               var tpl = new Template
-               tpl.add mmodule.tpl_namespace
-               tpl.add "::<span>"
-               tpl.add mclass.tpl_link
-               tpl.add "</span>"
-               return tpl
-       end
-
-       private fun full_namespace: String do
-               return "{mmodule.full_namespace}::{mclass.nitdoc_name}"
-       end
-
-       private fun tpl_link_anchor: TplLink do return mclass.tpl_link_anchor
-
-       private fun tpl_article: TplArticle do
-               var tpl = new TplArticle
-               tpl.id = mclass.nitdoc_anchor
-               tpl.classes.add_all(tpl_css_classes)
-               tpl.title = new Template
-               tpl.title.add mclass.tpl_short_link
-               tpl.title.add mclass.tpl_signature
-               tpl.subtitle = new Template
-               tpl.subtitle.add tpl_modifiers
-               tpl.subtitle.add tpl_namespace
-               tpl.content = new Template
-               tpl.content.add tpl_definition
-               return tpl
-       end
-
-       private fun tpl_css_classes: Set[String] do
-               var set = new HashSet[String]
-               set.add_all mclass.intro.modifiers
-               set.add_all modifiers
-               return set
-       end
-
-       private fun tpl_modifiers: Template do
-               var tpl = new Template
-               for modifier in modifiers do
-                       if modifier == "public" then continue
-                       tpl.add "{modifier} "
-               end
-               return tpl
-       end
-
-       private fun tpl_short_definition: TplDefinition do
-               var tpl = new TplDefinition
-               tpl.namespace = mmodule.tpl_full_namespace
-               if mdoc != null then
-                       tpl.comment = mdoc.tpl_short_comment
-               end
-               return tpl
-       end
-
-       private fun tpl_definition: TplDefinition do
-               var tpl = new TplDefinition
-               tpl.namespace = mmodule.tpl_full_namespace
-               if mdoc != null then
-                       tpl.comment = mdoc.tpl_comment
-               end
-               return tpl
-       end
-end
-
-redef class MPropDef
-       # Return the full qualified name of the mpropdef
-       #       module::classdef::name
-       private fun tpl_namespace: Template do
-               var tpl = new Template
-               tpl.add mclassdef.tpl_namespace
-               tpl.add "::"
-               tpl.add mproperty.name
-               return tpl
-       end
-
-       private fun full_namespace: String do
-               return "{mclassdef.full_namespace}::{mproperty.nitdoc_name}"
-       end
-
-       # URL into the nitdoc page
-       #       class_owner_name.html#nitdoc_anchor
-       private fun nitdoc_url: String do
-               return "{mclassdef.mclass.nitdoc_url}#{nitdoc_anchor}"
-       end
-
-       # html nitdoc_anchor id for the property in a nitdoc class page
-       #       PROP_mclass_propertyname
-       private fun nitdoc_anchor: String do
-               return "PROP_{mclassdef.mclass.public_owner.nitdoc_name}_{mproperty.name.replace(" ", "_")}"
-       end
-
-       # Return a link to property into the nitdoc class page
-       #       <a href="nitdoc_url" title="short_comment">nitdoc_name</a>
-       private fun tpl_link: TplLink do
-               var tpl = new TplLink
-               tpl.href = nitdoc_url
-               tpl.text = mproperty.nitdoc_name
-               if mproperty.intro.mdoc != null then
-                       tpl.title = mproperty.intro.mdoc.short_comment
-               end
-               return tpl
-       end
-
-       private fun tpl_article: TplArticle do
-               var tpl = new TplArticle
-               tpl.id = nitdoc_anchor
-               tpl.classes.add_all(tpl_css_classes)
-               tpl.title = new Template
-               tpl.title.add mproperty.nitdoc_name
-               tpl.title.add mproperty.tpl_signature
-               tpl.subtitle = new Template
-               tpl.subtitle.add tpl_modifiers
-               tpl.subtitle.add tpl_namespace
-               tpl.content = new Template
-               tpl.content.add tpl_definition
-               return tpl
-       end
-
-       private fun tpl_css_classes: Set[String] do
-               var set = new HashSet[String]
-               set.add_all mproperty.intro.modifiers
-               set.add_all modifiers
-               return set
-       end
-
-       private fun tpl_modifiers: Template do
-               var tpl = new Template
-               for modifier in modifiers do
-                       if modifier == "public" then continue
-                       tpl.add "{modifier} "
-               end
-               return tpl
-       end
-
-       private fun tpl_short_definition: TplDefinition do
-               var tpl = new TplDefinition
-               tpl.namespace = mclassdef.tpl_namespace
-               if mdoc != null then
-                       tpl.comment = mdoc.tpl_short_comment
-               end
-               return tpl
-       end
-
-       private fun tpl_definition: TplDefinition do
-               var tpl = new TplDefinition
-               tpl.namespace = mclassdef.tpl_namespace
-               if mdoc != null then
-                       tpl.comment = mdoc.tpl_comment
-               end
-               return tpl
-       end
-end
-
-redef class MSignature
-       private fun tpl_signature: Template do
-               var tpl = new Template
-               if not mparameters.is_empty then
-                       tpl.add "("
-                       for i in [0..mparameters.length[ do
-                               tpl.add mparameters[i].tpl_link
-                               if i < mparameters.length - 1 then tpl.add ", "
-                       end
-                       tpl.add ")"
-               end
-               if return_mtype != null then
-                       tpl.add ": "
-                       tpl.add return_mtype.tpl_link
-               end
-               return tpl
-       end
-end
-
-redef class MParameter
-       private fun tpl_link: Template do
-               var tpl = new Template
-               tpl.add "{name}: "
-               tpl.add mtype.tpl_link
-               if is_vararg then tpl.add "..."
-               return tpl
-       end
-end
-
-redef class Location
-       fun github(gitdir: String): String do
-               var base_dir = getcwd.join_path(gitdir).simplify_path
-               var file_loc = getcwd.join_path(file.filename).simplify_path
-               var gith_loc = file_loc.substring(base_dir.length + 1, file_loc.length)
-               return "{gith_loc}:{line_start},{column_start}--{line_end},{column_end}"
-       end
-end
-
-redef class MDoc
-       private fun short_comment: String do
-               return content.first.html_escape
-       end
-
-       private fun full_comment: String do
-               return content.join("\n").html_escape
-       end
-
-       private fun tpl_short_comment: TplShortComment do
-               return new TplShortComment(short_markdown)
-       end
-
-       private fun tpl_comment: TplComment do
-               return new TplComment(full_markdown)
-       end
-end
+import doc
 
 var nitdoc = new NitdocContext
 nitdoc.generate_nitdoc
index 85b2c1a..0b073d9 100644 (file)
@@ -56,10 +56,12 @@ for mm in mmodules do
        if opt_last_line.value != 0 then v.last_line = opt_last_line.value
        if opt_ast.value then v.with_ast = true
        var page = null
+       var m = modelbuilder.mmodule2nmodule[mm]
        if not opt_fragment.value then
                page = new HTMLTag("html")
                page.add_raw_html """<head>
-               <meta charset="utf-8">"""
+               <meta charset="utf-8">
+               <title>file {{{m.location.file.filename}}}</title>"""
                if dir == null then
                        page.add_raw_html """
                        <style type="text/css">
@@ -69,13 +71,15 @@ for mm in mmodules do
                else
                        page.add_raw_html """<link rel="stylesheet" type="text/css" href="style.css" />"""
                end
-               page.add_raw_html "</head><body><pre>"
+               page.add_raw_html v.head_content
+               page.add_raw_html "</head><body><pre class='nit_code'>"
        end
-       var m = modelbuilder.mmodule2nmodule[mm]
        v.enter_visit(m)
        if not opt_fragment.value then
                page.add(v.html)
-               page.add_raw_html "</pre></body>"
+               page.add_raw_html "</pre>"
+               page.add_raw_html v.foot_content
+               page.add_raw_html "</body>"
        else
                page = v.html
        end
index 391a2b0..dd2fe10 100644 (file)
@@ -30,6 +30,7 @@ redef class MMethod
 
                if nit_name == "+" then return "_plus"
                if nit_name == "-" then return "_minus"
+               if nit_name == "unary -" then return "_unary_minus"
                if nit_name == "*" then return "_star"
                if nit_name == "/" then return "_slash"
                if nit_name == "%" then return "_percent"
index 6f85029..604f4f9 100644 (file)
@@ -298,9 +298,8 @@ redef class AFullPropExternCall
        do
                var mmodule = npropdef.mpropdef.mclassdef.mmodule
                var mclassdef = npropdef.mpropdef.mclassdef
-               var nclassdef = toolcontext.modelbuilder.mclassdef2nclassdef[mclassdef]
                var mclass_type = mclassdef.bound_mtype
-               var mtype = toolcontext.modelbuilder.resolve_mtype(nclassdef, n_type)
+               var mtype = toolcontext.modelbuilder.resolve_mtype(mmodule, mclassdef, n_type)
 
                if mtype == null then return
 
@@ -333,8 +332,7 @@ redef class AInitPropExternCall
        do
                var mmodule = npropdef.mpropdef.mclassdef.mmodule
                var mclassdef = npropdef.mpropdef.mclassdef
-               var nclassdef = toolcontext.modelbuilder.mclassdef2nclassdef[mclassdef]
-               var mtype = toolcontext.modelbuilder.resolve_mtype(nclassdef, n_type)
+               var mtype = toolcontext.modelbuilder.resolve_mtype(mmodule, mclassdef, n_type)
                if mtype == null then return
 
                if not mtype isa MClassType then
@@ -388,9 +386,10 @@ redef class ACastAsExternCall
 
        redef fun verify_and_collect(npropdef, callback_set, toolcontext)
        do
-               var parent_aclassdef = npropdef.parent.as(AClassdef)
-               toolcontext.modelbuilder.resolve_mtype_unchecked(parent_aclassdef, n_from_type, true)
-               toolcontext.modelbuilder.resolve_mtype_unchecked(parent_aclassdef, n_to_type, true)
+               var mclassdef = npropdef.mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
+               toolcontext.modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, n_from_type, true)
+               toolcontext.modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, n_to_type, true)
                super
        end
 end
@@ -401,8 +400,9 @@ redef class AAsNullableExternCall
 
        redef fun verify_and_collect(npropdef, callback_set, toolcontext)
        do
-               var parent_aclassdef = npropdef.parent.as(AClassdef)
-               toolcontext.modelbuilder.resolve_mtype_unchecked(parent_aclassdef, n_type, true)
+               var mclassdef = npropdef.mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
+               toolcontext.modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, n_type, true)
                super
        end
 end
@@ -417,8 +417,9 @@ redef class AAsNotNullableExternCall
 
        redef fun verify_and_collect(npropdef, callback_set, toolcontext)
        do
-               var parent_aclassdef = npropdef.parent.as(AClassdef)
-               toolcontext.modelbuilder.resolve_mtype_unchecked(parent_aclassdef, n_type, true)
+               var mclassdef = npropdef.mpropdef.mclassdef
+               var mmodule = mclassdef.mmodule
+               toolcontext.modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, n_type, true)
                super
        end
 end
index 4a0820e..0b2258b 100644 (file)
@@ -127,15 +127,17 @@ class Lexer
                t = get_token
                while t == null do t = get_token
 
-               var l = last_token
-               if l != null then
-                       l.next_token = t
-                       t.prev_token = l
-               else
-                       _file.first_token = t
+               if t._location != null then
+                       var l = last_token
+                       if l != null then
+                               l.next_token = t
+                               t.prev_token = l
+                       else
+                               _file.first_token = t
+                       end
+                       last_token = t
                end
 
-               last_token = t
                _token = t
                return t
        end
index 03d82b1..5652cf5 100644 (file)
@@ -153,6 +153,8 @@ class Parser
                                (new ComputeProdLocationVisitor).enter_visit(node)
                                return node
                        else if action_type == 3 then # ERROR
+                               # skip injected tokens
+                               while token._location == null do token = lexer.next
                                var node2 = new AParserError.init_parser_error("Syntax error: unexpected {token}.", token.location, token)
                                var node = new Start(null, node2)
                                return node
@@ -186,7 +188,8 @@ private class ComputeProdLocationVisitor
        redef fun visit(n: ANode)
        do
                if n isa Token then
-                       var loc = n.location
+                       var loc = n._location
+                       if loc == null then return
                        _last_location = loc
 
                        # Add a first token to productions that need one
index 55ff3f7..f23ccda 100644 (file)
@@ -121,17 +121,18 @@ redef class ToolContext
                eof = tree.n_eof
                if not eof isa AError then
                        var ntype = tree.n_base.n_classdefs.first.n_propdefs.first.as(AMethPropdef).n_block.as(ABlockExpr).n_expr.first.as(AVardeclExpr).n_type.n_types.first
+                       ntype.parent = null
                        return ntype
                end
                error = eof
 
                lexer = new Lexer(source)
                var first = lexer.next
-               if not first isa EOF then
-                       var second = lexer.next
-                       if second isa EOF and not second isa AError then
-                               return first
-                       end
+               if first isa EOF then return first
+               var second = lexer.next
+               if second isa EOF and not second isa AError then
+                       first.parent = null
+                       return first
                end
 
                lexer = new InjectedLexer(source)
@@ -144,6 +145,7 @@ redef class ToolContext
                eof = tree.n_eof
                if not eof isa AError then
                        var nexpr = tree.n_base.n_classdefs.first.n_propdefs.first.as(AMethPropdef).n_block.as(ABlockExpr).n_expr.first.as(AVardeclExpr).n_expr.as(AParExpr).n_expr
+                       nexpr.parent = null
                        return nexpr
                end
                if eof.location > error.location then error = eof
@@ -158,6 +160,7 @@ redef class ToolContext
                if not eof isa AError then
                        var nblock = tree.n_base.n_classdefs.first.n_propdefs.first.as(AMethPropdef).n_block.as(ABlockExpr).n_expr.first.as(ADoExpr).n_block.as(ABlockExpr)
                        nblock.n_kwend = null # drop injected token
+                       nblock.parent = null
                        return nblock
                end
                if eof.location > error.location then error = eof
@@ -216,7 +219,6 @@ class InjectedLexer
        do
                if not injected_before.is_empty then
                        var tok = injected_before.shift
-                       if tok._location == null then tok._location = new Location(file, 1, 1, 1, 0)
                        return tok
                end
                if not is_finished then
@@ -227,7 +229,6 @@ class InjectedLexer
                end
 
                var tok = injected_after.shift
-               if tok._location == null then tok._location = new Location(file, 1, 1, 1, 0)
                return tok
        end
 end
index d9c9060..76a5180 100644 (file)
@@ -21,37 +21,38 @@ import markdown
 redef class ModelBuilder
        fun test_markdown(page: HTMLTag, mmodule: MModule)
        do
-               page.add_raw_html "<a id='{mmodule.full_name}'></a>"
-               page.add_raw_html "<h1>module {mmodule}</h1>"
-               if mmodule2nmodule.has_key(mmodule) then
-                       do
-                               var mdoc = mmodule.mdoc
-                               if mdoc == null then break label x
+               page.add_raw_html "<h3 id='{mmodule}'>module {mmodule}</h1>"
+               var mdoc = mmodule.mdoc
+               if mdoc != null then
+                       page.add mdoc.full_markdown
+               end
+               for mclassdef in mmodule.mclassdefs do
+                       mdoc = mclassdef.mdoc
+                       if mdoc != null then
+                               page.add_raw_html "<h4 id='{mclassdef}'>class {mclassdef}</h2>"
                                page.add mdoc.full_markdown
-                       end label x
-                       for mclassdef in mmodule.mclassdefs do
-                               do
-                                       var mdoc = mclassdef.mdoc
-                                       if mdoc != null then
-                                               if mclassdef.mclass.intro == mclassdef then page.add_raw_html "<a id='{mclassdef.mclass.full_name}'></a>"
-                                               page.add_raw_html "<h2>class {mclassdef}</h2>"
-                                               page.add mdoc.full_markdown
-                                       end
-                               end
-                               for mpropdef in mclassdef.mpropdefs do
-                                       var mdoc = mpropdef.mdoc
-                                       if mdoc != null then
-                                               if mpropdef.mproperty.intro == mpropdef then page.add_raw_html "<a id='{mpropdef.mproperty.full_name}'></a>"
-
-                                               page.add_raw_html "<h3>prop {mpropdef}</h3>"
-                                               page.add mdoc.full_markdown
-                                       end
+                       end
+                       for mpropdef in mclassdef.mpropdefs do
+                               mdoc = mpropdef.mdoc
+                               if mdoc != null then
+                                       page.add_raw_html "<h5 id='{mpropdef}'>prop {mpropdef}</h3>"
+                                       page.add mdoc.full_markdown
                                end
                        end
                end
        end
 end
 
+redef class MModule
+       redef fun href do return "#{to_s}"
+end
+redef class MClassDef
+       redef fun href do return "#{to_s}"
+end
+redef class MPropDef
+       redef fun href do return "#{to_s}"
+end
+
 var toolcontext = new ToolContext
 
 var opt_full = new OptionBool("Process also imported modules", "--full")
@@ -73,6 +74,9 @@ var page = new HTMLTag("html")
 page.add_raw_html """
 <head>
 <meta charset="utf-8">
+"""
+page.add_raw_html hv.head_content
+page.add_raw_html """
 <style type="text/css">
 code {margin: 0 2px;
 padding: 0px 5px;
@@ -91,14 +95,28 @@ border-radius: 3px;
 .rawcode[title] {
 border-color: red;
 }
+h5 {font-weight:bold;}
 {{{hv.css_content}}}
 </style>
-</head><body>
-"""
+</head><body>"""
 
 if opt_full.value then
-       for m in model.mmodules do
-               modelbuilder.test_markdown(page, m)
+       for p in model.mprojects do
+               page.add_raw_html "<h1 id='P{p.name}'>project {p.name}</h2>"
+               var mdoc = p.mdoc
+               if mdoc != null then
+                       page.add mdoc.full_markdown
+               end
+               for g in p.mgroups do
+                       mdoc = g.mdoc
+                       if mdoc != null then
+                               page.add_raw_html "<h2 id='G{g.full_name}'>group {g.full_name}</h2>"
+                               page.add mdoc.full_markdown
+                       end
+                       for m in g.mmodules do
+                               modelbuilder.test_markdown(page, m)
+                       end
+               end
        end
 else
        for m in mmodules do
@@ -106,5 +124,6 @@ else
        end
 end
 
+page.add_raw_html hv.foot_content
 page.add_raw_html "</body>"
 page.write_to(stdout)
index fd0197d..edb1c89 100644 (file)
@@ -34,46 +34,59 @@ end
 
 private class TypeVisitor
        var modelbuilder:  ModelBuilder
-       var nclassdef: AClassdef
-       var mpropdef: MPropDef
+
+       # The module of the analysis
+       # Used to correctly query the model
+       var mmodule: MModule
+
+       # The static type of the receiver
+       # Mainly used for type tests and type resolutions
+       var anchor: nullable MClassType
+
+       # The analyzed mclassdef
+       var mclassdef: nullable MClassDef
+
+       # The analyzed property
+       var mpropdef: nullable MPropDef
 
        var selfvariable: Variable = new Variable("self")
 
-       init(modelbuilder: ModelBuilder, nclassdef: AClassdef, mpropdef: MPropDef)
+       init(modelbuilder: ModelBuilder, mmodule: MModule, mpropdef: nullable MPropDef)
        do
                self.modelbuilder = modelbuilder
-               self.nclassdef = nclassdef
-               self.mpropdef = mpropdef
+               self.mmodule = mmodule
 
-               var mclass = nclassdef.mclassdef.mclass
+               if mpropdef != null then
+                       self.mpropdef = mpropdef
+                       var mclassdef = mpropdef.mclassdef
+                       self.mclassdef = mclassdef
+                       self.anchor = mclassdef.bound_mtype
 
-               var selfvariable = new Variable("self")
-               self.selfvariable = selfvariable
-               selfvariable.declared_type = mclass.mclass_type
-       end
-
-       fun mmodule: MModule do return self.nclassdef.mclassdef.mmodule
+                       var mclass = mclassdef.mclass
 
-       fun anchor: MClassType do return self.nclassdef.mclassdef.bound_mtype
+                       var selfvariable = new Variable("self")
+                       self.selfvariable = selfvariable
+                       selfvariable.declared_type = mclass.mclass_type
+               end
+       end
 
        fun anchor_to(mtype: MType): MType
        do
-               var mmodule = self.nclassdef.mclassdef.mmodule
-               var anchor = self.nclassdef.mclassdef.bound_mtype
+               var anchor = anchor
+               if anchor == null then
+                       assert not mtype.need_anchor
+                       return mtype
+               end
                return mtype.anchor_to(mmodule, anchor)
        end
 
        fun is_subtype(sub, sup: MType): Bool
        do
-               var mmodule = self.nclassdef.mclassdef.mmodule
-               var anchor = self.nclassdef.mclassdef.bound_mtype
                return sub.is_subtype(mmodule, anchor, sup)
        end
 
        fun resolve_for(mtype, subtype: MType, for_self: Bool): MType
        do
-               var mmodule = self.nclassdef.mclassdef.mmodule
-               var anchor = self.nclassdef.mclassdef.bound_mtype
                #print "resolve_for {mtype} sub={subtype} forself={for_self} mmodule={mmodule} anchor={anchor}"
                var res = mtype.resolve_for(subtype, anchor, mmodule, not for_self)
                return res
@@ -166,8 +179,6 @@ private class TypeVisitor
                var sup = self.resolve_mtype(ntype)
                if sup == null then return null # Forward error
 
-               var mmodule = self.nclassdef.mclassdef.mmodule
-               var anchor = self.nclassdef.mclassdef.bound_mtype
                if sup == sub then
                        self.modelbuilder.warning(node, "Warning: Expression is already a {sup}.")
                else if self.is_subtype(sub, sup) and not sup.need_anchor then
@@ -178,24 +189,22 @@ private class TypeVisitor
 
        fun try_get_mproperty_by_name2(anode: ANode, mtype: MType, name: String): nullable MProperty
        do
-               return self.modelbuilder.try_get_mproperty_by_name2(anode, self.nclassdef.mclassdef.mmodule, mtype, name)
+               return self.modelbuilder.try_get_mproperty_by_name2(anode, mmodule, mtype, name)
        end
 
        fun resolve_mtype(node: AType): nullable MType
        do
-               return self.modelbuilder.resolve_mtype(self.nclassdef, node)
+               return self.modelbuilder.resolve_mtype(mmodule, mclassdef, node)
        end
 
        fun try_get_mclass(node: ANode, name: String): nullable MClass
        do
-               var mmodule = self.nclassdef.mclassdef.mmodule
                var mclass = modelbuilder.try_get_mclass_by_name(node, mmodule, name)
                return mclass
        end
 
        fun get_mclass(node: ANode, name: String): nullable MClass
        do
-               var mmodule = self.nclassdef.mclassdef.mmodule
                var mclass = modelbuilder.try_get_mclass_by_name(node, mmodule, name)
                if mclass == null then
                        self.modelbuilder.error(node, "Type Error: missing primitive class `{name}'.")
@@ -476,9 +485,8 @@ redef class AMethPropdef
                var nblock = self.n_block
                if nblock == null then return
 
-               var nclassdef = self.parent.as(AClassdef)
                var mpropdef = self.mpropdef.as(not null)
-               var v = new TypeVisitor(modelbuilder, nclassdef, mpropdef)
+               var v = new TypeVisitor(modelbuilder, mpropdef.mclassdef.mmodule, mpropdef)
                self.selfvariable = v.selfvariable
 
                var mmethoddef = self.mpropdef.as(not null)
@@ -505,8 +513,8 @@ end
 redef class AAttrPropdef
        redef fun do_typing(modelbuilder: ModelBuilder)
        do
-               var nclassdef = self.parent.as(AClassdef)
-               var v = new TypeVisitor(modelbuilder, nclassdef, self.mpropdef.as(not null))
+               var mpropdef = self.mpropdef.as(not null)
+               var v = new TypeVisitor(modelbuilder, mpropdef.mclassdef.mmodule, mpropdef)
                self.selfvariable = v.selfvariable
 
                var nexpr = self.n_expr
@@ -1436,7 +1444,8 @@ redef class ASuperExpr
 
        redef fun accept_typing(v)
        do
-               var recvtype = v.nclassdef.mclassdef.bound_mtype
+               var recvtype = v.anchor
+               assert recvtype != null
                var mproperty = v.mpropdef.mproperty
                if not mproperty isa MMethod then
                        v.error(self, "Error: super only usable in a method")
@@ -1468,12 +1477,13 @@ redef class ASuperExpr
 
        private fun process_superinit(v: TypeVisitor)
        do
-               var recvtype = v.nclassdef.mclassdef.bound_mtype
+               var recvtype = v.anchor
+               assert recvtype != null
                var mpropdef = v.mpropdef
                assert mpropdef isa MMethodDef
                var mproperty = mpropdef.mproperty
                var superprop: nullable MMethodDef = null
-               for msupertype in v.nclassdef.mclassdef.supertypes do
+               for msupertype in mpropdef.mclassdef.supertypes do
                        msupertype = msupertype.anchor_to(v.mmodule, recvtype)
                        var errcount = v.modelbuilder.toolcontext.error_count
                        var candidate = v.try_get_mproperty_by_name2(self, msupertype, mproperty.name).as(nullable MMethod)
diff --git a/tests/base_error_class_kind.nit b/tests/base_error_class_kind.nit
new file mode 100644 (file)
index 0000000..43644b0
--- /dev/null
@@ -0,0 +1,80 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import end
+
+interface Object
+end
+
+extern class Pointer
+end
+
+##
+
+interface IC
+end
+
+abstract class AC
+end
+
+class CC
+end
+
+enum EnC
+end
+
+extern class ExC
+end
+
+##
+
+interface SubI
+       super IC
+       #alt1# super AC
+       #alt2# super CC
+       #alt3# super EnC
+       #alt4# super ExC
+end
+
+abstract class SubA
+       super IC
+       super AC
+       super CC
+       #alt5# super EnC
+       #alt6# super ExC
+end
+
+class SubC
+       super IC
+       super AC
+       super CC
+       #alt7# super EnC
+       #alt8# super ExC
+end
+
+enum SubEn
+       super IC
+       #alt9# super AC
+       #alt10# super CC
+       #alt11# super EnC
+       #alt12# super ExC
+end
+
+extern class SubEx
+       super IC
+       #alt13# super AC
+       #alt14# super CC
+       #alt15# super EnC
+       super ExC
+end
diff --git a/tests/base_error_class_kind2.nit b/tests/base_error_class_kind2.nit
new file mode 100644 (file)
index 0000000..94ace22
--- /dev/null
@@ -0,0 +1,70 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import base_error_class_kind
+
+interface IC2
+end
+
+abstract class AC2
+end
+
+class CC2
+end
+
+enum EnC2
+end
+
+extern class ExC2
+end
+
+redef class SubI
+       super IC2
+       #alt1# super AC2
+       #alt2# super CC2
+       #alt3# super EnC2
+       #alt4# super ExC2
+end
+
+redef class SubA
+       super IC2
+       super AC2
+       super CC2
+       #alt5# super EnC2
+       #alt6# super ExC2
+end
+
+redef class SubC
+       super IC2
+       super AC2
+       super CC2
+       #alt7# super EnC2
+       #alt8# super ExC2
+end
+
+redef class SubEn
+       super IC2
+       #alt9# super AC2
+       #alt10# super CC2
+       #alt11# super EnC2
+       #alt12# super ExC2
+end
+
+redef class SubEx
+       super IC2
+       #alt13# super AC2
+       #alt14# super CC2
+       #alt15# super EnC2
+       super ExC2
+end
diff --git a/tests/sav/base_error_class_kind2_alt1.res b/tests/sav/base_error_class_kind2_alt1.res
new file mode 100644 (file)
index 0000000..f85f0ae
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt1.nit:34,8--10: Error: interface SubI cannot specialize abstract class AC2
diff --git a/tests/sav/base_error_class_kind2_alt10.res b/tests/sav/base_error_class_kind2_alt10.res
new file mode 100644 (file)
index 0000000..c7976ee
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt10.nit:59,8--10: Error: enum SubEn cannot specialize class CC2
diff --git a/tests/sav/base_error_class_kind2_alt11.res b/tests/sav/base_error_class_kind2_alt11.res
new file mode 100644 (file)
index 0000000..4c172f1
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt11.nit:60,8--11: Error: enum SubEn cannot specialize enum EnC2
diff --git a/tests/sav/base_error_class_kind2_alt12.res b/tests/sav/base_error_class_kind2_alt12.res
new file mode 100644 (file)
index 0000000..e2059d9
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt12.nit:61,8--11: Error: enum SubEn cannot specialize extern class ExC2
diff --git a/tests/sav/base_error_class_kind2_alt13.res b/tests/sav/base_error_class_kind2_alt13.res
new file mode 100644 (file)
index 0000000..419707b
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt13.nit:66,8--10: Error: extern class SubEx cannot specialize abstract class AC2
diff --git a/tests/sav/base_error_class_kind2_alt14.res b/tests/sav/base_error_class_kind2_alt14.res
new file mode 100644 (file)
index 0000000..c37ee58
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt14.nit:67,8--10: Error: extern class SubEx cannot specialize class CC2
diff --git a/tests/sav/base_error_class_kind2_alt15.res b/tests/sav/base_error_class_kind2_alt15.res
new file mode 100644 (file)
index 0000000..c03d2e8
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt15.nit:68,8--11: Error: extern class SubEx cannot specialize enum EnC2
diff --git a/tests/sav/base_error_class_kind2_alt2.res b/tests/sav/base_error_class_kind2_alt2.res
new file mode 100644 (file)
index 0000000..2fc6bb4
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt2.nit:35,8--10: Error: interface SubI cannot specialize class CC2
diff --git a/tests/sav/base_error_class_kind2_alt3.res b/tests/sav/base_error_class_kind2_alt3.res
new file mode 100644 (file)
index 0000000..26c0465
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt3.nit:36,8--11: Error: interface SubI cannot specialize enum EnC2
diff --git a/tests/sav/base_error_class_kind2_alt4.res b/tests/sav/base_error_class_kind2_alt4.res
new file mode 100644 (file)
index 0000000..6e6a47e
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt4.nit:37,8--11: Error: interface SubI cannot specialize extern class ExC2
diff --git a/tests/sav/base_error_class_kind2_alt5.res b/tests/sav/base_error_class_kind2_alt5.res
new file mode 100644 (file)
index 0000000..e3ebfd5
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt5.nit:44,8--11: Error: abstract class SubA cannot specialize enum EnC2
diff --git a/tests/sav/base_error_class_kind2_alt6.res b/tests/sav/base_error_class_kind2_alt6.res
new file mode 100644 (file)
index 0000000..82ab271
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt6.nit:45,8--11: Error: abstract class SubA cannot specialize extern class ExC2
diff --git a/tests/sav/base_error_class_kind2_alt7.res b/tests/sav/base_error_class_kind2_alt7.res
new file mode 100644 (file)
index 0000000..9118416
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt7.nit:52,8--11: Error: class SubC cannot specialize enum EnC2
diff --git a/tests/sav/base_error_class_kind2_alt8.res b/tests/sav/base_error_class_kind2_alt8.res
new file mode 100644 (file)
index 0000000..05af2db
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt8.nit:53,8--11: Error: class SubC cannot specialize extern class ExC2
diff --git a/tests/sav/base_error_class_kind2_alt9.res b/tests/sav/base_error_class_kind2_alt9.res
new file mode 100644 (file)
index 0000000..c94438c
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind2_alt9.nit:58,8--10: Error: enum SubEn cannot specialize abstract class AC2
diff --git a/tests/sav/base_error_class_kind_alt1.res b/tests/sav/base_error_class_kind_alt1.res
new file mode 100644 (file)
index 0000000..dd95996
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt1.nit:44,8--9: Error: interface SubI cannot specialize abstract class AC
diff --git a/tests/sav/base_error_class_kind_alt10.res b/tests/sav/base_error_class_kind_alt10.res
new file mode 100644 (file)
index 0000000..50935d0
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt10.nit:69,8--9: Error: enum SubEn cannot specialize class CC
diff --git a/tests/sav/base_error_class_kind_alt11.res b/tests/sav/base_error_class_kind_alt11.res
new file mode 100644 (file)
index 0000000..088edae
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt11.nit:70,8--10: Error: enum SubEn cannot specialize enum EnC
diff --git a/tests/sav/base_error_class_kind_alt12.res b/tests/sav/base_error_class_kind_alt12.res
new file mode 100644 (file)
index 0000000..93fef73
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt12.nit:71,8--10: Error: enum SubEn cannot specialize extern class ExC
diff --git a/tests/sav/base_error_class_kind_alt13.res b/tests/sav/base_error_class_kind_alt13.res
new file mode 100644 (file)
index 0000000..087a06d
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt13.nit:76,8--9: Error: extern class SubEx cannot specialize abstract class AC
diff --git a/tests/sav/base_error_class_kind_alt14.res b/tests/sav/base_error_class_kind_alt14.res
new file mode 100644 (file)
index 0000000..da0cddf
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt14.nit:77,8--9: Error: extern class SubEx cannot specialize class CC
diff --git a/tests/sav/base_error_class_kind_alt15.res b/tests/sav/base_error_class_kind_alt15.res
new file mode 100644 (file)
index 0000000..24729f3
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt15.nit:78,8--10: Error: extern class SubEx cannot specialize enum EnC
diff --git a/tests/sav/base_error_class_kind_alt2.res b/tests/sav/base_error_class_kind_alt2.res
new file mode 100644 (file)
index 0000000..64fd532
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt2.nit:45,8--9: Error: interface SubI cannot specialize class CC
diff --git a/tests/sav/base_error_class_kind_alt3.res b/tests/sav/base_error_class_kind_alt3.res
new file mode 100644 (file)
index 0000000..29deecf
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt3.nit:46,8--10: Error: interface SubI cannot specialize enum EnC
diff --git a/tests/sav/base_error_class_kind_alt4.res b/tests/sav/base_error_class_kind_alt4.res
new file mode 100644 (file)
index 0000000..fec7f38
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt4.nit:47,8--10: Error: interface SubI cannot specialize extern class ExC
diff --git a/tests/sav/base_error_class_kind_alt5.res b/tests/sav/base_error_class_kind_alt5.res
new file mode 100644 (file)
index 0000000..d168ec4
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt5.nit:54,8--10: Error: abstract class SubA cannot specialize enum EnC
diff --git a/tests/sav/base_error_class_kind_alt6.res b/tests/sav/base_error_class_kind_alt6.res
new file mode 100644 (file)
index 0000000..f97b92b
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt6.nit:55,8--10: Error: abstract class SubA cannot specialize extern class ExC
diff --git a/tests/sav/base_error_class_kind_alt7.res b/tests/sav/base_error_class_kind_alt7.res
new file mode 100644 (file)
index 0000000..2b3c8b6
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt7.nit:62,8--10: Error: class SubC cannot specialize enum EnC
diff --git a/tests/sav/base_error_class_kind_alt8.res b/tests/sav/base_error_class_kind_alt8.res
new file mode 100644 (file)
index 0000000..63da325
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt8.nit:63,8--10: Error: class SubC cannot specialize extern class ExC
diff --git a/tests/sav/base_error_class_kind_alt9.res b/tests/sav/base_error_class_kind_alt9.res
new file mode 100644 (file)
index 0000000..e227a6e
--- /dev/null
@@ -0,0 +1 @@
+alt/base_error_class_kind_alt9.nit:68,8--9: Error: enum SubEn cannot specialize abstract class AC
index 4a272d5..805182d 100644 (file)
@@ -4,10 +4,6 @@ class_module_0_Sys.html
 class_module_1_A.html
 class_module_1_B.html
 css/
-dep.dot
-dep.map
-dep.png
-dep.s.dot
 dep_A.dot
 dep_A.map
 dep_A.png
@@ -38,8 +34,10 @@ dep_module_1.png
 dep_module_1.s.dot
 index.html
 js/
+less/
 module_module_0.html
 module_module_1.html
 quicksearch-list.js
 resources/
 search.html
+vendors/
index a5f5d72..0b82282 100644 (file)
@@ -1,67 +1,67 @@
-<span class="nitcode"><span class="nc_c"># This file is part of NIT ( http://www.nitlanguage.org ).
-</span><span class="nc_c">#
-</span><span class="nc_c"># Copyright 2006-2008 Jean Privat &lt;jean@pryen.org&gt;
-</span><span class="nc_c">#
-</span><span class="nc_c"># Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
-</span><span class="nc_c"># you may not use this file except in compliance with the License.
-</span><span class="nc_c"># You may obtain a copy of the License at
-</span><span class="nc_c">#
-</span><span class="nc_c">#     http://www.apache.org/licenses/LICENSE-2.0
-</span><span class="nc_c">#
-</span><span class="nc_c"># Unless required by applicable law or agreed to in writing, software
-</span><span class="nc_c"># distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
-</span><span class="nc_c"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-</span><span class="nc_c"># See the License for the specific language governing permissions and
-</span><span class="nc_c"># limitations under the License.
-</span>
-<span class="nc_k">import</span> <span class="nc_k">end</span><span class="nc_cdef"><a id="base_simple3#Object"></a>
-
-<span class="nc_k">interface</span> <span class="nc_def nc_t" title="base_simple3::Object">Object</span>
-<span class="nc_k">end</span></span><span class="nc_cdef"><a id="base_simple3#Bool"></a>
-
-<span class="nc_k">enum</span> <span class="nc_def nc_t" title="base_simple3::Bool">Bool</span>
-<span class="nc_k">end</span></span><span class="nc_cdef"><a id="base_simple3#Int"></a>
-
-<span class="nc_k">enum</span> <span class="nc_def nc_t" title="base_simple3::Int">Int</span><span class="nc_pdef"><a id="base_simple3#Int#output"></a>
-       <span class="nc_k">fun</span> <span class="nc_def" title="base_simple3::Int::output"><span class="nc_i">output</span></span></span> <span class="nc_k">is</span> <span class="nc_k">intern</span>
-<span class="nc_k">end</span></span><span class="nc_cdef"><a id="base_simple3#A"></a>
-
-<span class="nc_k">class</span> <span class="nc_def nc_t" title="base_simple3::A">A</span><span class="nc_pdef"><a id="base_simple3#A#init"></a>
-       <span class="nc_k">init</span> <span class="nc_k">do</span> <span class="nc_l">5</span>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a></span><span class="nc_pdef"><a id="base_simple3#A#run"></a>
-       <span class="nc_k">fun</span> <span class="nc_def" title="base_simple3::A::run"><span class="nc_i">run</span></span> <span class="nc_k">do</span> <span class="nc_l">6</span>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a></span>
-<span class="nc_k">end</span></span><span class="nc_cdef"><a id="base_simple3#B"></a>
-
-<span class="nc_k">class</span> <span class="nc_def nc_t" title="base_simple3::B">B</span><span class="nc_pdef"><a id="base_simple3#B#@val"></a><a id="base_simple3#B#val"></a><a id="base_simple3#B#val="></a>
-       <span class="nc_k">var</span> <span class="nc_def nc_i" title="base_simple3::B::val">val</span>: <a href="base_simple3.html#base_simple3#Int"><span class="nc_t" title="base_simple3::Int">Int</span></a></span><span class="nc_pdef"><a id="base_simple3#B#init"></a>
-       <span class="nc_k">init</span>(<span class="nc_v nc_i" title="v: Int">v</span>: <a href="base_simple3.html#base_simple3#Int"><span class="nc_t" title="base_simple3::Int">Int</span></a>)
-       <span class="nc_k">do</span>
-               <span class="nc_l">7</span>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a>
-               <span class="nc_k">self</span>.<a href="base_simple3.html#base_simple3#B#val="><span class="nc_i" title="base_simple3#B#val=(val: Int)">val</span></a> = <span class="nc_v nc_i" title="v: Int">v</span>
-       <span class="nc_k">end</span></span><span class="nc_pdef"><a id="base_simple3#B#run"></a>
-       <span class="nc_k">fun</span> <span class="nc_def" title="base_simple3::B::run"><span class="nc_i">run</span></span> <span class="nc_k">do</span> <a href="base_simple3.html#base_simple3#B#val"><span class="nc_i" title="base_simple3#B#val: Int">val</span></a>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a></span>
-<span class="nc_k">end</span></span><span class="nc_cdef"><a id="base_simple3#C"></a>
-
-<span class="nc_k">class</span> <span class="nc_def nc_t" title="base_simple3::C">C</span><span class="nc_pdef"><a id="base_simple3#C#@val1"></a><a id="base_simple3#C#val1"></a><a id="base_simple3#C#val1="></a>
-       <span class="nc_k">var</span> <span class="nc_def nc_i" title="base_simple3::C::val1">val1</span>: <a href="base_simple3.html#base_simple3#Int"><span class="nc_t" title="base_simple3::Int">Int</span></a></span><span class="nc_pdef"><a id="base_simple3#C#@val2"></a><a id="base_simple3#C#val2"></a><a id="base_simple3#C#val2="></a>
-       <span class="nc_k">var</span> <span class="nc_def nc_i" title="base_simple3::C::val2">val2</span>: <a href="base_simple3.html#base_simple3#Int"><span class="nc_t" title="base_simple3::Int">Int</span></a> = <span class="nc_l">10</span></span>
-<span class="nc_k">end</span></span><span class="nc_pdef"><a id="base_simple3#Object#foo"></a>
-
-<span class="nc_k">fun</span> <span class="nc_def" title="base_simple3::Object::foo"><span class="nc_i">foo</span></span> <span class="nc_k">do</span> <span class="nc_l">2</span>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a></span><span class="nc_pdef"><a id="base_simple3#Object#bar"></a>
-<span class="nc_k">fun</span> <span class="nc_def" title="base_simple3::Object::bar"><span class="nc_i">bar</span></span>(<span class="nc_v nc_i" title="i: Int">i</span>: <a href="base_simple3.html#base_simple3#Int"><span class="nc_t" title="base_simple3::Int">Int</span></a>) <span class="nc_k">do</span> <span class="nc_v nc_i" title="i: Int">i</span>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a></span><span class="nc_pdef"><a id="base_simple3#Object#baz"></a>
-<span class="nc_k">fun</span> <span class="nc_def" title="base_simple3::Object::baz"><span class="nc_i">baz</span></span>: <a href="base_simple3.html#base_simple3#Int"><span class="nc_t" title="base_simple3::Int">Int</span></a> <span class="nc_k">do</span> <span class="nc_k">return</span> <span class="nc_l">4</span></span>
-
-<span class="nc_pdef"><a id="base_simple3#Sys#main"></a><span class="nc_l">1</span>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a>
-<a href="base_simple3.html#base_simple3#Object#foo"><span class="nc_i" title="base_simple3#Object#foo">foo</span></a>
-<a href="base_simple3.html#base_simple3#Object#bar"><span class="nc_i" title="base_simple3#Object#bar(i: Int)">bar</span></a>(<span class="nc_l">3</span>)
-<a href="base_simple3.html#base_simple3#Object#baz"><span class="nc_i" title="base_simple3#Object#baz: Int">baz</span></a>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a>
-
-<span class="nc_k">var</span> <span class="nc_v nc_i" title="a: A">a</span> = <span class="nc_k">new</span> <a href="base_simple3.html#base_simple3#A"><span class="nc_t" title="base_simple3::A">A</span></a>
-<span class="nc_v nc_i" title="a: A">a</span>.<a href="base_simple3.html#base_simple3#A#run"><span class="nc_i" title="base_simple3#A#run">run</span></a>
-
-<span class="nc_k">var</span> <span class="nc_v nc_i" title="b: B">b</span> = <span class="nc_k">new</span> <a href="base_simple3.html#base_simple3#B"><span class="nc_t" title="base_simple3::B">B</span></a>(<span class="nc_l">8</span>)
-<span class="nc_v nc_i" title="b: B">b</span>.<a href="base_simple3.html#base_simple3#B#run"><span class="nc_i" title="base_simple3#B#run">run</span></a>
-
-<span class="nc_k">var</span> <span class="nc_v nc_i" title="c: C">c</span> = <span class="nc_k">new</span> <a href="base_simple3.html#base_simple3#C"><span class="nc_t" title="base_simple3::C">C</span></a>(<span class="nc_l">9</span>)
-<span class="nc_v nc_i" title="c: C">c</span>.<a href="base_simple3.html#base_simple3#C#val1"><span class="nc_i" title="base_simple3#C#val1: Int">val1</span></a>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a>
-<span class="nc_v nc_i" title="c: C">c</span>.<a href="base_simple3.html#base_simple3#C#val2"><span class="nc_i" title="base_simple3#C#val2: Int">val2</span></a>.<a href="base_simple3.html#base_simple3#Int#output"><span class="nc_i" title="base_simple3#Int#output">output</span></a></span>
-</span>
\ No newline at end of file
+<span class="nitcode"><span class="line" id="L1"><span class="nc_c"># This file is part of NIT ( http://www.nitlanguage.org ).
+</span></span><span class="line" id="L2"><span class="nc_c">#
+</span></span><span class="line" id="L3"><span class="nc_c"># Copyright 2006-2008 Jean Privat &lt;jean@pryen.org&gt;
+</span></span><span class="line" id="L4"><span class="nc_c">#
+</span></span><span class="line" id="L5"><span class="nc_c"># Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
+</span></span><span class="line" id="L6"><span class="nc_c"># you may not use this file except in compliance with the License.
+</span></span><span class="line" id="L7"><span class="nc_c"># You may obtain a copy of the License at
+</span></span><span class="line" id="L8"><span class="nc_c">#
+</span></span><span class="line" id="L9"><span class="nc_c">#     http://www.apache.org/licenses/LICENSE-2.0
+</span></span><span class="line" id="L10"><span class="nc_c">#
+</span></span><span class="line" id="L11"><span class="nc_c"># Unless required by applicable law or agreed to in writing, software
+</span></span><span class="line" id="L12"><span class="nc_c"># distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+</span></span><span class="line" id="L13"><span class="nc_c"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+</span></span><span class="line" id="L14"><span class="nc_c"># See the License for the specific language governing permissions and
+</span></span><span class="line" id="L15"><span class="nc_c"># limitations under the License.
+</span></span><span class="line" id="L16">
+</span><span class="line" id="L17"><span class="nc_k">import</span> <span class="nc_k">end</span>
+</span><span class="line" id="L18">
+</span><span class="nc_cdef foldable" id="base_simple3#Object"><span class="line" id="L19"><span class="nc_k">interface</span> <span class="nc_def nc_t popupable" title="class Object" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;class Object&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;Object&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; sub-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Bool&quot;&gt;Bool&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#A&quot;&gt;A&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#B&quot;&gt;B&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#C&quot;&gt;C&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Sys&quot;&gt;Sys&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;redefs&lt;/b&gt; refinements&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;in base_simple3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;in base_simple3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;in base_simple3&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">Object</span>
+</span><span class="line" id="L20"><span class="nc_k">end</span>
+</span></span><span class="line" id="L21">
+</span><span class="nc_cdef foldable" id="base_simple3#Bool"><span class="line" id="L22"><span class="nc_k">enum</span> <span class="nc_def nc_t popupable" title="class Bool" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Bool&quot;&gt;class Bool&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;Bool&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;Object&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">Bool</span>
+</span><span class="line" id="L23"><span class="nc_k">end</span>
+</span></span><span class="line" id="L24">
+</span><span class="nc_cdef foldable" id="base_simple3#Int"><span class="line" id="L25"><span class="nc_k">enum</span> <span class="nc_def nc_t popupable" title="class Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;class Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;Int&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;Object&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
+</span><span class="nc_pdef foldable" id="base_simple3#Int#output"><span class="line" id="L26">        <span class="nc_k">fun</span> <span class="nc_def popupable" title="base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;output&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover"><span class="nc_i">output</span></span> <span class="nc_k">is</span> <span class="nc_k">intern</span>
+</span></span><span class="line" id="L27"><span class="nc_k">end</span>
+</span></span><span class="line" id="L28">
+</span><span class="nc_cdef foldable" id="base_simple3#A"><span class="line" id="L29"><span class="nc_k">class</span> <span class="nc_def nc_t popupable" title="class A" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#A&quot;&gt;class A&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;A&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;Object&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">A</span>
+</span><span class="nc_pdef foldable" id="base_simple3#A#init"><span class="line" id="L30">    <span class="nc_k">init</span> <span class="nc_k">do</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">5</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span></span><span class="nc_pdef foldable" id="base_simple3#A#run"><span class="line" id="L31">      <span class="nc_k">fun</span> <span class="nc_def popupable" title="base_simple3#A#run" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#A#run&quot;&gt;base_simple3#A#run&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;run&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover"><span class="nc_i">run</span></span> <span class="nc_k">do</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">6</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span></span><span class="line" id="L32"><span class="nc_k">end</span>
+</span></span><span class="line" id="L33">
+</span><span class="nc_cdef foldable" id="base_simple3#B"><span class="line" id="L34"><span class="nc_k">class</span> <span class="nc_def nc_t popupable" title="class B" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B&quot;&gt;class B&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;B&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;Object&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">B</span>
+</span><span class="nc_pdef foldable" id="base_simple3#B#@val"><a id="base_simple3#B#val"></a><a id="base_simple3#B#val="></a><span class="line" id="L35">     <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#B#val" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B#val&quot;&gt;base_simple3#B#val&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
+</span></span><span class="nc_pdef foldable" id="base_simple3#B#init"><span class="line" id="L36">     <span class="nc_k">init</span><span>(</span><span class="nc_v nc_i popupable" title="v: Int" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;v:&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">v</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span><span>)</span>
+</span><span class="line" id="L37">    <span class="nc_k">do</span>
+</span><span class="line" id="L38">            <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">7</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span><span class="line" id="L39">            <span class="nc_k">self</span><span>.</span><span class="nc_i popupable" title="call base_simple3#B#val=" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B#val=&quot;&gt;call base_simple3#B#val=&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#B#val=&quot;&gt;val=&lt;/a&gt;&lt;span&gt;(val: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val</span> <span>=</span> <span class="nc_v nc_i popupable" title="v: Int" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;v:&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">v</span>
+</span><span class="line" id="L40">    <span class="nc_k">end</span>
+</span></span><span class="nc_pdef foldable" id="base_simple3#B#run"><span class="line" id="L41">      <span class="nc_k">fun</span> <span class="nc_def popupable" title="base_simple3#B#run" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B#run&quot;&gt;base_simple3#B#run&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;run&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover"><span class="nc_i">run</span></span> <span class="nc_k">do</span> <span class="nc_i popupable" title="call base_simple3#B#val" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B#val&quot;&gt;call base_simple3#B#val&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#B#val&quot;&gt;val&lt;/a&gt;&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span></span><span class="line" id="L42"><span class="nc_k">end</span>
+</span></span><span class="line" id="L43">
+</span><span class="nc_cdef foldable" id="base_simple3#C"><span class="line" id="L44"><span class="nc_k">class</span> <span class="nc_def nc_t popupable" title="class C" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C&quot;&gt;class C&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;C&lt;/span&gt;&lt;br/&gt;&lt;div class=&quot;dropdown&quot;&gt; &lt;a data-toggle=&quot;dropdown&quot; href=&quot;#&quot;&gt;&lt;b&gt;hier&lt;/b&gt; super-classes&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul class=&quot;dropdown-menu&quot; role=&quot;menu&quot; aria-labelledby=&quot;dLabel&quot;&gt;&lt;li&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object&quot;&gt;Object&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;" data-toggle="popover">C</span>
+</span><span class="nc_pdef foldable" id="base_simple3#C#@val1"><a id="base_simple3#C#val1"></a><a id="base_simple3#C#val1="></a><span class="line" id="L45">  <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val1" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val1&quot;&gt;base_simple3#C#val1&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val1&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val1</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span>
+</span></span><span class="nc_pdef foldable" id="base_simple3#C#@val2"><a id="base_simple3#C#val2"></a><a id="base_simple3#C#val2="></a><span class="line" id="L46">   <span class="nc_k">var</span> <span class="nc_def nc_i popupable" title="base_simple3#C#val2" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val2&quot;&gt;base_simple3#C#val2&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;val2&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val2</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span> <span>=</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">10</span>
+</span></span><span class="line" id="L47"><span class="nc_k">end</span>
+</span></span><span class="line" id="L48">
+</span><span class="nc_pdef foldable" id="base_simple3#Object#foo"><span class="line" id="L49"><span class="nc_k">fun</span> <span class="nc_def popupable" title="base_simple3#Object#foo" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Object#foo&quot;&gt;base_simple3#Object#foo&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;foo&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover"><span class="nc_i">foo</span></span> <span class="nc_k">do</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">2</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span></span><span class="nc_pdef foldable" id="base_simple3#Object#bar"><span class="line" id="L50"><span class="nc_k">fun</span> <span class="nc_def popupable" title="base_simple3#Object#bar" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Object#bar&quot;&gt;base_simple3#Object#bar&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;bar&lt;span&gt;(i: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover"><span class="nc_i">bar</span></span><span>(</span><span class="nc_v nc_i popupable" title="i: Int" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;i:&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">i</span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span><span>)</span> <span class="nc_k">do</span> <span class="nc_v nc_i popupable" title="i: Int" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;i:&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">i</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span></span><span class="nc_pdef foldable" id="base_simple3#Object#baz"><span class="line" id="L51"><span class="nc_k">fun</span> <span class="nc_def popupable" title="base_simple3#Object#baz" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Object#baz&quot;&gt;base_simple3#Object#baz&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;fun&lt;/b&gt; &lt;span&gt;baz&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover"><span class="nc_i">baz</span></span><span>:</span> <span class="nc_t popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">Int</span> <span class="nc_k">do</span> <span class="nc_k">return</span> <span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">4</span>
+</span></span><span class="line" id="L52">
+</span><span class="nc_pdef foldable" id="base_simple3#Sys#main"><span class="line" id="L53"><span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">1</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span><span class="line" id="L54"><span class="nc_i popupable" title="call base_simple3#Object#foo" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Object#foo&quot;&gt;call base_simple3#Object#foo&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object#foo&quot;&gt;foo&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">foo</span>
+</span><span class="line" id="L55"><span class="nc_i popupable" title="call base_simple3#Object#bar" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Object#bar&quot;&gt;call base_simple3#Object#bar&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object#bar&quot;&gt;bar&lt;/a&gt;&lt;span&gt;(i: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">bar</span><span>(</span><span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">3</span><span>)</span>
+</span><span class="line" id="L56"><span class="nc_i popupable" title="call base_simple3#Object#baz" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Object#baz&quot;&gt;call base_simple3#Object#baz&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Object#baz&quot;&gt;baz&lt;/a&gt;&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">baz</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span><span class="line" id="L57">
+</span><span class="line" id="L58"><span class="nc_k">var</span> <span class="nc_v nc_i popupable" title="a: A" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;a:&lt;a href=&quot;base_simple3.html#base_simple3#A&quot;&gt;A&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">a</span> <span>=</span> <span class="nc_k">new</span> <span class="nc_t popupable" title="A" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#A&quot;&gt;A&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#A&quot;&gt;A&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">A</span>
+</span><span class="line" id="L59"><span class="nc_v nc_i popupable" title="a: A" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;a:&lt;a href=&quot;base_simple3.html#base_simple3#A&quot;&gt;A&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">a</span><span>.</span><span class="nc_i popupable" title="call base_simple3#A#run" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#A#run&quot;&gt;call base_simple3#A#run&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#A#run&quot;&gt;run&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">run</span>
+</span><span class="line" id="L60">
+</span><span class="line" id="L61"><span class="nc_k">var</span> <span class="nc_v nc_i popupable" title="b: B" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;b:&lt;a href=&quot;base_simple3.html#base_simple3#B&quot;&gt;B&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">b</span> <span>=</span> <span class="nc_k">new</span> <span class="nc_t popupable" title="B" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B&quot;&gt;B&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#B&quot;&gt;B&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">B</span><span>(</span><span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">8</span><span>)</span>
+</span><span class="line" id="L62"><span class="nc_v nc_i popupable" title="b: B" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;b:&lt;a href=&quot;base_simple3.html#base_simple3#B&quot;&gt;B&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">b</span><span>.</span><span class="nc_i popupable" title="call base_simple3#B#run" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#B#run&quot;&gt;call base_simple3#B#run&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#B#run&quot;&gt;run&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">run</span>
+</span><span class="line" id="L63">
+</span><span class="line" id="L64"><span class="nc_k">var</span> <span class="nc_v nc_i popupable" title="c: C" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;c:&lt;a href=&quot;base_simple3.html#base_simple3#C&quot;&gt;C&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">c</span> <span>=</span> <span class="nc_k">new</span> <span class="nc_t popupable" title="C" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C&quot;&gt;C&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#C&quot;&gt;C&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">C</span><span>(</span><span class="nc_l popupable" title="Int" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;class&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">9</span><span>)</span>
+</span><span class="line" id="L65"><span class="nc_v nc_i popupable" title="c: C" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;c:&lt;a href=&quot;base_simple3.html#base_simple3#C&quot;&gt;C&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">c</span><span>.</span><span class="nc_i popupable" title="call base_simple3#C#val1" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val1&quot;&gt;call base_simple3#C#val1&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#C#val1&quot;&gt;val1&lt;/a&gt;&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val1</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span><span class="line" id="L66"><span class="nc_v nc_i popupable" title="c: C" data-content="&lt;div&gt;&lt;b&gt;local var&lt;/b&gt; &lt;span&gt;c:&lt;a href=&quot;base_simple3.html#base_simple3#C&quot;&gt;C&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">c</span><span>.</span><span class="nc_i popupable" title="call base_simple3#C#val2" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#C#val2&quot;&gt;call base_simple3#C#val2&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#C#val2&quot;&gt;val2&lt;/a&gt;&lt;span&gt;: &lt;a href=&quot;base_simple3.html#base_simple3#Int&quot;&gt;Int&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">val2</span><span>.</span><span class="nc_i popupable" title="call base_simple3#Int#output" data-title="&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;call base_simple3#Int#output&lt;/a&gt;" data-content="&lt;div&gt;&lt;b&gt;call&lt;/b&gt; &lt;span&gt;&lt;a href=&quot;base_simple3.html#base_simple3#Int#output&quot;&gt;output&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/div&gt;" data-toggle="popover">output</span>
+</span></span><span class="line" id="L67"><span></span></span></span>
\ No newline at end of file
diff --git a/tests/sav/test_flatrope.res b/tests/sav/test_flatrope.res
new file mode 100644 (file)
index 0000000..5ec30ac
--- /dev/null
@@ -0,0 +1,5 @@
+quick brown fox over the lazy dog
+The quick brown fox over the lazy dog
+quick brown fox jumps over the lazy dog
+quick brown fox over the lazy dog.
+The quick brown fox jumps over the lazy dog.
index 02a4cc3..23ae886 100644 (file)
@@ -1,5 +1,6 @@
 <html><head>
 <meta charset="utf-8">
+<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
 <style type="text/css">
 code {margin: 0 2px;
 padding: 0px 5px;
@@ -18,9 +19,13 @@ border-radius: 3px;
 .rawcode[title] {
 border-color: red;
 }
-.nitcode a { color: inherit; text-decoration: inherit; } /* hide links */
-.nitcode a:hover { text-decoration: underline; } /* underline links */
-.nitcode span[title]:hover { text-decoration: underline; } /* underline titles */
+h5 {font-weight:bold;}
+.nitcode a { color: inherit; cursor:pointer; }
+.nitcode .popupable:hover { text-decoration: underline; cursor:help; } /* underline titles */
+pre.nitcode .foldable { display: block } /* for block productions*/
+pre.nitcode .line{ display: block } /* for lines */
+pre.nitcode .line:hover{ background-color: #FFFFE0; } /* current line */
+.nitcode :target { background-color: #FFF3C2 } /* target highlight*/
 /* lexical raw tokens. independent of usage or semantic: */
 .nitcode .nc_c { color: gray; font-style: italic; } /* comment */
 .nitcode .nc_d { color: #3D8127; font-style: italic; } /* documentation comments */
@@ -47,15 +52,17 @@ border-color: red;
 .nitcode .nc_vt { font-style: italic; } /* virtual type or formal type */
 
 .nitcode .nc_error { border: 1px red solid;} /* not used */
+.popover { max-width: 800px !important; }
 
 </style>
-</head><body>
-<a id='test_doc'></a><h1>module test_doc</h1><a id='test_doc::A'></a><h2>class test_doc#A</h2><div class="nitdoc"><p class="synopsys">Synopsys</p><p>Paragraph
-same paragraph</p><p>Other paragraph with <code class="nitcode"><span class="nitcode"><span class="nc_i">code</span></span></code></p><ul><li>bullet</li><li>other buller</li><li>last
+</head><body><h3 id='test_doc'>module test_doc</h1><h4 id='test_doc#A'>class test_doc#A</h2><div class="nitdoc"><p class="synopsys">Synopsys</p><p>Paragraph
+same paragraph</p><p>Other paragraph with <code class="nitcode"><span class="nitcode"><span class="line" id="L1"><span class="nc_i">code</span><span></span></span></span></code></p><ul><li>bullet</li><li>other buller</li><li>last
 but long
-bullet</li></ul><pre class="nitcode"><span class="nitcode"><span class="nc_k"></span><span class="nc_i">some</span>
-<span class="nc_i">block</span>
-</span></pre><p>a first example</p><pre class="nitcode"><span class="nitcode"><span class="nc_k"></span><span class="nc_k">assert</span> <span class="nc_l">1</span> <span class="nc_o">+</span> <span class="nc_l">1</span> <span class="nc_o">==</span> <span class="nc_l">2</span>
-</span></pre><p>and a last example to illustrate the <code class="nitcode"><span class="nitcode"><span class="nc_i">to_s</span></span></code> method on <code class="nitcode"><span class="nitcode"><span class="nc_k"></span><span class="nc_v nc_i"></span><span class="nc_t"></span><span class="nc_t">A</span></span></code>.</p><pre class="nitcode"><span class="nitcode"><span class="nc_k"></span><span class="nc_k">var</span> <span class="nc_v nc_i">a</span> = <span class="nc_k">new</span> <span class="nc_t">A</span>
-<span class="nc_k">assert</span> <span class="nc_i">a</span>.<span class="nc_i">to_s</span> <span class="nc_o">==</span> <span class="nc_s">&quot;A&quot;</span>
-</span></pre></div></body></html>
\ No newline at end of file
+bullet</li></ul><pre class="nitcode"><span class="nitcode"><span class="line" id="L1"><span class="nc_i">some</span>
+</span><span class="line" id="L2"><span class="nc_i">block</span>
+</span><span class="line" id="L3"><span></span></span></span></pre><p>a first example</p><pre class="nitcode"><span class="nitcode"><span class="line" id="L1"><span class="nc_k">assert</span> <span class="nc_l">1</span> <span class="nc_o">+</span> <span class="nc_l">1</span> <span class="nc_o">==</span> <span class="nc_l">2</span>
+</span><span class="line" id="L2"><span></span></span></span></pre><p>and a last example to illustrate the <code class="nitcode"><span class="nitcode"><span class="line" id="L1"><span class="nc_i">to_s</span><span></span></span></span></code> method on <code class="nitcode"><span class="nitcode"><span class="line" id="L1"><span class="nc_t">A</span><span></span></span></span></code>.</p><pre class="nitcode"><span class="nitcode"><span class="line" id="L1"><span class="nc_k">var</span> <span class="nc_i">a</span> <span>=</span> <span class="nc_k">new</span> <span class="nc_t">A</span>
+</span><span class="line" id="L2"><span class="nc_k">assert</span> <span class="nc_i">a</span><span>.</span><span class="nc_i">to_s</span> <span class="nc_o">==</span> <span class="nc_s">&quot;A&quot;</span>
+</span><span class="line" id="L3"><span></span></span></span></pre></div><script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
+<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
+<script>$(".popupable").popover({html:true, placement:'top'})/*initialize bootstrap popover*/</script></body></html>
\ No newline at end of file
index dc855e5..10b0795 100644 (file)
@@ -1,6 +1,6 @@
 --> ADecIntExpr 1,1
   TNumber "1" 1,1
---> ABlockExpr 1,1--0
+--> ABlockExpr 1,1--11
   ACallExpr 1,1--11
     AImplicitSelfExpr 1,1
     TId "hello" 1,1--5
@@ -11,7 +11,7 @@
         AListExprs 1,11
 --> AStringExpr 1,1--13
   TString "\"hello world\"" 1,1--13
---> ABlockExpr 1,1--0
+--> ABlockExpr 1,1--15
   AForExpr 1,1--15
     TKwfor "for" 1,1--3
     TId "i" 1,5
@@ -36,7 +36,7 @@
         AImplicitSelfExpr 1,12
         TId "z" 1,12
         AListExprs 1,12
---> ... ... ABlockExpr 1,1--0
+--> ... ... ABlockExpr 1,1--3,3
   AForExpr 1,1--3,3
     TKwfor "for" 1,1--3
     TId "i" 1,5
diff --git a/tests/sav/test_ropes.res b/tests/sav/test_ropes.res
new file mode 100644 (file)
index 0000000..7e4b7c1
--- /dev/null
@@ -0,0 +1,26 @@
+NODEATTEST
+INZZ
+INDDZZ
+EEINDDZZ
+EEINDDZZFF
+eeinddzzff
+EEINDDZZFF
+FFZZDDNIEE
+hello_world.types.1.o
+now step live...
+...evil pets won
+now step live...
+now step live...
+ live...
+.
+ live stepnow
+...evil pets won
+n
+now step live... step live...
+w s
+ZZ
+ZZZZZZZZZZ
+ZZAAZZZZZZZZ
+NNZZAAZZZZZZZZ
+NIINZZAAZZZZZZZZ
+NINIINZZAAZZZZZZZZINZZAAZZZZZZZZ
diff --git a/tests/sav/test_text.res b/tests/sav/test_text.res
new file mode 100644 (file)
index 0000000..fc9283b
--- /dev/null
@@ -0,0 +1,15 @@
+WOE TO YOU, OH EARTH AND SEA FOR THE DEVIL SENDS THE BEAST WITH WRATH BECAUSE HE KNOWS THE TIME IS SHORT. LET HIM WHO HATH UNDERSTANDING RECKON THE NUMBER OF THE BEAST, FOR IT IS A HUMAN NUMBER, ITS NUMBER IS SIX HUNDRED AND SIXTY-SIX.
+woe to you, oh earth and sea for the devil sends the beast with wrath because he knows the time is short. let him who hath understanding reckon the number of the beast, for it is a human number, its number is six hundred and sixty-six.
+Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short.
+Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six.
+.xiS-ytxiS dna derdnuH xiS si rebmun sti ,rebmun namuh a si ti rof ,tsaeb eht fo rebmun eht nokcer gnidnatsrednu htah ohw mih teL .trohs si emit eht swonk eh esuaceb htarw htiw tsaeb eht sdnes liveD eht rof aes dna htrae ho ,uoy ot eoW
+235
+13
+110
+-1
+106
+37
+true
+true
+Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short. Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six.
+W o e   t o   y o u ,   o h   e a r t h   a n d   s e a   f o r   t h e   D e v i l   s e n d s   t h e   b e a s t   w i t h   w r a t h   b e c a u s e   h e   k n o w s   t h e   t i m e   i s   s h o r t .   L e t   h i m   w h o   h a t h   u n d e r s t a n d i n g   r e c k o n   t h e   n u m b e r   o f   t h e   b e a s t ,   f o r   i t   i s   a   h u m a n   n u m b e r ,   i t s   n u m b e r   i s   S i x   H u n d r e d   a n d   S i x t y - S i x .
diff --git a/tests/sav/test_text_alt1.res b/tests/sav/test_text_alt1.res
new file mode 100644 (file)
index 0000000..fc9283b
--- /dev/null
@@ -0,0 +1,15 @@
+WOE TO YOU, OH EARTH AND SEA FOR THE DEVIL SENDS THE BEAST WITH WRATH BECAUSE HE KNOWS THE TIME IS SHORT. LET HIM WHO HATH UNDERSTANDING RECKON THE NUMBER OF THE BEAST, FOR IT IS A HUMAN NUMBER, ITS NUMBER IS SIX HUNDRED AND SIXTY-SIX.
+woe to you, oh earth and sea for the devil sends the beast with wrath because he knows the time is short. let him who hath understanding reckon the number of the beast, for it is a human number, its number is six hundred and sixty-six.
+Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short.
+Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six.
+.xiS-ytxiS dna derdnuH xiS si rebmun sti ,rebmun namuh a si ti rof ,tsaeb eht fo rebmun eht nokcer gnidnatsrednu htah ohw mih teL .trohs si emit eht swonk eh esuaceb htarw htiw tsaeb eht sdnes liveD eht rof aes dna htrae ho ,uoy ot eoW
+235
+13
+110
+-1
+106
+37
+true
+true
+Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short. Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six.
+W o e   t o   y o u ,   o h   e a r t h   a n d   s e a   f o r   t h e   D e v i l   s e n d s   t h e   b e a s t   w i t h   w r a t h   b e c a u s e   h e   k n o w s   t h e   t i m e   i s   s h o r t .   L e t   h i m   w h o   h a t h   u n d e r s t a n d i n g   r e c k o n   t h e   n u m b e r   o f   t h e   b e a s t ,   f o r   i t   i s   a   h u m a n   n u m b e r ,   i t s   n u m b e r   i s   S i x   H u n d r e d   a n d   S i x t y - S i x .
diff --git a/tests/sav/test_text_alt2.res b/tests/sav/test_text_alt2.res
new file mode 100644 (file)
index 0000000..fc9283b
--- /dev/null
@@ -0,0 +1,15 @@
+WOE TO YOU, OH EARTH AND SEA FOR THE DEVIL SENDS THE BEAST WITH WRATH BECAUSE HE KNOWS THE TIME IS SHORT. LET HIM WHO HATH UNDERSTANDING RECKON THE NUMBER OF THE BEAST, FOR IT IS A HUMAN NUMBER, ITS NUMBER IS SIX HUNDRED AND SIXTY-SIX.
+woe to you, oh earth and sea for the devil sends the beast with wrath because he knows the time is short. let him who hath understanding reckon the number of the beast, for it is a human number, its number is six hundred and sixty-six.
+Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short.
+Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six.
+.xiS-ytxiS dna derdnuH xiS si rebmun sti ,rebmun namuh a si ti rof ,tsaeb eht fo rebmun eht nokcer gnidnatsrednu htah ohw mih teL .trohs si emit eht swonk eh esuaceb htarw htiw tsaeb eht sdnes liveD eht rof aes dna htrae ho ,uoy ot eoW
+235
+13
+110
+-1
+106
+37
+true
+true
+Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short. Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six.
+W o e   t o   y o u ,   o h   e a r t h   a n d   s e a   f o r   t h e   D e v i l   s e n d s   t h e   b e a s t   w i t h   w r a t h   b e c a u s e   h e   k n o w s   t h e   t i m e   i s   s h o r t .   L e t   h i m   w h o   h a t h   u n d e r s t a n d i n g   r e c k o n   t h e   n u m b e r   o f   t h e   b e a s t ,   f o r   i t   i s   a   h u m a n   n u m b e r ,   i t s   n u m b e r   i s   S i x   H u n d r e d   a n d   S i x t y - S i x .
index 3174cb7..ecc608f 100644 (file)
@@ -1,6 +1,6 @@
 # This file is part of NIT ( http://www.nitlanguage.org ).
 #
-# Copyright 2011-2013 Alexis Laferrière <alexis.laf@xymus.net>
+# Copyright 2011-2014 Alexis Laferrière <alexis.laf@xymus.net>
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -33,6 +33,11 @@ class A
                return new_A( s - o );
        `}
 
+       fun -: A import value, A `{
+               int s = A_value(recv);
+               return new_A(-s);
+       `}
+
        fun *( by : Int ) : A import value, A `{
                int s = A_value( recv );
 
@@ -158,3 +163,4 @@ print a[ 52 ] # 52
 a[ 74 ] = new A( 96 )
 print a # 96
 
+print(-(new A(123)))
diff --git a/tests/test_flatrope.nit b/tests/test_flatrope.nit
new file mode 100644 (file)
index 0000000..79b719f
--- /dev/null
@@ -0,0 +1,31 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+var st = "quick brown fox over the lazy dog"
+
+print st
+
+var pr = st.prepend("The ")
+
+print pr
+
+pr = st.insert_at(" jumps", 15)
+
+print pr
+
+pr = st.append(".")
+
+print pr
+
+print st.insert_at(" jumps", 15). prepend("The ").append(".")
diff --git a/tests/test_ropes.nit b/tests/test_ropes.nit
new file mode 100644 (file)
index 0000000..3040d12
--- /dev/null
@@ -0,0 +1,118 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+var x :String = new RopeString
+
+x = x + "NODE"
+x = x + "AT"
+x = x + "TEST"
+
+print x
+
+var lst = new List[String]
+
+lst.push(new RopeString.from("ZZ"))
+
+lst.push((lst.last * 5))
+
+lst.push(lst.last.insert_at("AA", 2))
+
+lst.push(lst.last.insert_at("NN", 0))
+
+lst.push(lst.last.insert_at("II", 1))
+
+lst.push(lst.last.insert_at(lst.last, 2))
+
+var ss = lst.last.substring(4,4)
+
+print ss
+
+ss = ss.as(RopeString).insert_at("DD", 2)
+
+print ss
+
+ss = ss.insert_at("EE", 0)
+
+print ss
+
+ss = ss.insert_at("FF", ss.length)
+
+print ss
+
+ss = ss.to_lower
+
+print ss
+
+ss = ss.to_upper
+
+print ss
+
+ss = ss.reversed
+
+print ss
+
+var atb = new Array[String]
+
+var s = new RopeString
+s = s.prepend(".types").as(RopeString)
+s = s.prepend("./examples/hello_world.nit".substring(11,11)).as(RopeString)
+s = s.append(".").as(RopeString)
+s = s.append("1").as(RopeString)
+s = s.append(".o").as(RopeString)
+
+print s
+
+var str = new RopeString.from("now") + " step" + " live..."
+
+print str
+
+print str.reversed
+
+for i in str.chars do printn i
+printn "\n"
+
+for i in [0..str.length[ do printn str.chars[i]
+printn "\n"
+
+var iter = str.chars.iterator
+for i in [0..str.length[ do
+       assert str.chars[i] == iter.item
+       iter.next
+end
+
+assert "now step live...".hash == str.hash
+
+for i in str.chars.iterator_from(8) do printn i
+printn "\n"
+
+for i in str.chars.iterator_from(str.length-1) do printn i
+printn "\n"
+
+for i in str.as(RopeString).reverse_substrings_from(12) do printn i
+printn "\n"
+
+for i in str.chars.reverse_iterator do printn i
+printn "\n"
+
+for i in str.chars.reverse_iterator_from(0) do printn i
+printn "\n"
+
+var str2 = str.as(RopeString).insert_at(str.substring_from(3), 3)
+
+print str2
+
+print str2.substring(2,3)
+
+for i in lst do print i
+
diff --git a/tests/test_text.nit b/tests/test_text.nit
new file mode 100644 (file)
index 0000000..4a27158
--- /dev/null
@@ -0,0 +1,99 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+var str = "Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short. Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six."
+var spaces = "           "
+var numstr = "1001"
+
+var txt: Text
+var trimable: Text
+var num: Text
+
+txt = str
+trimable = spaces + str + spaces
+num = numstr
+
+#alt1 txt = new FlatBuffer.from(str)
+#alt1 trimable = new FlatBuffer.from(spaces)
+#alt1 trimable.append(str)
+#alt1 trimable.append(spaces)
+#alt1 num = new FlatBuffer.from(numstr)
+
+#alt2 txt = new RopeString.from(str)
+#alt2 trimable = new RopeString.from(spaces)
+#alt2 trimable = trimable + str
+#alt2 trimable = trimable + spaces
+#alt2 num = new RopeString.from(numstr)
+
+# Test Text methods on all types of receivers
+
+print txt.to_upper
+print txt.to_lower
+assert txt * 2 == txt + txt
+print txt.substring(0, 105)
+print txt.substring_from(106)
+print txt.reversed
+print txt.length
+assert not txt.is_empty
+print txt.index_of('h')
+print txt.index_of_from('h', 105)
+print txt.index_of('Z')
+print txt.last_index_of('L')
+print txt.last_index_of_from('D', 105)
+print txt.has_substring("Woe", 0)
+print txt.has_substring("Let", 106)
+assert trimable != txt
+assert trimable.trim == txt
+assert num.is_numeric
+assert txt.has_prefix("Woe")
+assert txt.has_suffix("Six.")
+assert txt.hash == trimable.trim.hash
+
+# Test Text.chars (SequenceRead[Char]) methods on all receivers
+
+var chars = txt.chars
+
+assert chars != txt.substring_from(106).chars
+assert (txt.substring(0,105) + txt.substring_from(105)).chars == txt.chars
+assert chars[0] == 'W'
+assert chars.count('o') == 11
+assert chars.first == chars[0]
+assert chars.has('L')
+assert spaces.chars.has_only(' ')
+assert chars.index_of('D') == 37
+assert not chars.is_empty
+var count = 0
+for i in chars do
+       assert i != '!'
+       printn i
+       count += 1
+end
+printn "\n"
+assert count == txt.length
+var iter_from = txt.substring_from(105).chars.iterator
+var txt_iter_from = chars.iterator_from(105)
+while iter_from.is_ok do
+       assert iter_from.item == txt_iter_from.item
+       iter_from.next
+       txt_iter_from.next
+end
+assert not iter_from.is_ok and not txt_iter_from.is_ok
+var txt_reviter = chars.reverse_iterator_from(104)
+var sub_reviter = txt.substring(0,105).chars.reverse_iterator
+while txt_reviter.is_ok do
+       assert txt_reviter.item == sub_reviter.item
+       txt_reviter.next
+       sub_reviter.next
+end
+print chars.join(" ")