├── compiled
├── bootstrap
│ ├── namespace.js
│ └── bootstrap.js
├── .DS_Store
├── models
│ └── FooModel.js
├── views
│ └── FooView.js
├── controllers
│ └── FooController.js
├── lib
│ └── Foo.js
└── templates
│ └── index.js
├── server-lib
├── FooLib.coffee
└── FooLib.js
├── config
├── .DS_Store
├── jammit.yml
├── config.rb
├── environment.coffee
└── environment.js
├── views
└── FooView.coffee
├── models
└── FooModel.coffee
├── public
├── js
│ └── .DS_Store
└── css
│ └── application.css
├── stylesheets
├── _base.scss
└── application.scss
├── bootstrap
├── namespace.coffee
└── bootstrap.coffee
├── controllers
└── FooController.coffee
├── client-lib
└── Foo.coffee
├── templates
└── index.html
├── .gitignore
├── server.coffee
├── server.js
├── util
├── watcher.coffee
└── watcher.js
├── README.md
└── dependencies
├── underscore-min.js
├── backbone-min.js
└── jquery-1.6.1.min.js
/compiled/bootstrap/namespace.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | window.NameSpace = {};
3 | }).call(this);
4 |
--------------------------------------------------------------------------------
/server-lib/FooLib.coffee:
--------------------------------------------------------------------------------
1 | class FooLib
2 | foo: ->
3 | 'bar'
4 |
5 | exports.FooLib = FooLib
--------------------------------------------------------------------------------
/compiled/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brikis98/node-backbone-skeleton/HEAD/compiled/.DS_Store
--------------------------------------------------------------------------------
/config/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brikis98/node-backbone-skeleton/HEAD/config/.DS_Store
--------------------------------------------------------------------------------
/views/FooView.coffee:
--------------------------------------------------------------------------------
1 | NameSpace.FooView = Backbone.View.extend
2 | events:
3 | 'click #foo': 'bar'
--------------------------------------------------------------------------------
/models/FooModel.coffee:
--------------------------------------------------------------------------------
1 | NameSpace.FooModel = Backbone.Model.extend
2 | defaults:
3 | foo: 'bar'
4 |
--------------------------------------------------------------------------------
/public/js/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brikis98/node-backbone-skeleton/HEAD/public/js/.DS_Store
--------------------------------------------------------------------------------
/stylesheets/_base.scss:
--------------------------------------------------------------------------------
1 | @import 'compass/reset';
2 | @import 'compass/utilities';
3 | @import 'compass/css3';
--------------------------------------------------------------------------------
/bootstrap/namespace.coffee:
--------------------------------------------------------------------------------
1 | window.NameSpace = {} # Change "NameSpace" to an appropriate name for all your classes
2 |
--------------------------------------------------------------------------------
/controllers/FooController.coffee:
--------------------------------------------------------------------------------
1 | NameSpace.FooController = Backbone.Controller.extend
2 | routes:
3 | 'foo': 'bar'
--------------------------------------------------------------------------------
/bootstrap/bootstrap.coffee:
--------------------------------------------------------------------------------
1 | $ ->
2 | console.log 'Put any bootstrap code here, such as creating your backbone models, controllers and views.'
3 |
--------------------------------------------------------------------------------
/compiled/models/FooModel.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | NameSpace.FooModel = Backbone.Model.extend({
3 | defaults: {
4 | foo: 'bar'
5 | }
6 | });
7 | }).call(this);
8 |
--------------------------------------------------------------------------------
/compiled/views/FooView.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | NameSpace.FooView = Backbone.View.extend({
3 | events: {
4 | 'click #foo': 'bar'
5 | }
6 | });
7 | }).call(this);
8 |
--------------------------------------------------------------------------------
/compiled/controllers/FooController.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | NameSpace.FooController = Backbone.Controller.extend({
3 | routes: {
4 | 'foo': 'bar'
5 | }
6 | });
7 | }).call(this);
8 |
--------------------------------------------------------------------------------
/compiled/bootstrap/bootstrap.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | $(function() {
3 | return console.log('Put any bootstrap code here, such as creating your backbone models, controllers and views.');
4 | });
5 | }).call(this);
6 |
--------------------------------------------------------------------------------
/client-lib/Foo.coffee:
--------------------------------------------------------------------------------
1 | class Foo
2 | constructor: (@bar) ->
3 |
4 | explain: ->
5 | console.log 'Put your own custom libraries/classes in this package'
6 |
7 | NameSpace.Foo = Foo # Add them to your namespace
--------------------------------------------------------------------------------
/server-lib/FooLib.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var FooLib;
3 | FooLib = (function() {
4 | function FooLib() {}
5 | FooLib.prototype.foo = function() {
6 | return 'bar';
7 | };
8 | return FooLib;
9 | })();
10 | exports.FooLib = FooLib;
11 | }).call(this);
12 |
--------------------------------------------------------------------------------
/compiled/lib/Foo.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var Foo;
3 | Foo = (function() {
4 | function Foo(bar) {
5 | this.bar = bar;
6 | }
7 | Foo.prototype.explain = function() {
8 | return console.log('Put your own custom libraries/classes in this package');
9 | };
10 | return Foo;
11 | })();
12 | NameSpace.Foo = Foo;
13 | }).call(this);
14 |
--------------------------------------------------------------------------------
/config/jammit.yml:
--------------------------------------------------------------------------------
1 | compress_assets: off
2 | gzip_assets: off
3 |
4 | javascripts:
5 | assets:
6 | - dependencies/jquery-1.6.1.min.js
7 | - dependencies/underscore-min.js
8 | - dependencies/backbone-min.js
9 | - compiled/bootstrap/namespace.js
10 | - compiled/lib/*.js
11 | - compiled/models/*.js
12 | - compiled/controllers/*.js
13 | - compiled/views/*.js
14 | - compiled/templates/*.js
15 | - compiled/bootstrap/bootstrap.js
--------------------------------------------------------------------------------
/templates/index.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | Node Backbone Skeleton
7 |
8 |
9 |
10 | Hello <%= name %>
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled source #
2 | ###################
3 | *.com
4 | *.class
5 | *.dll
6 | *.exe
7 | *.o
8 | *.so
9 |
10 | # Packages #
11 | ############
12 | # it's better to unpack these files and commit the raw source
13 | # git has its own built in compression methods
14 | *.7z
15 | *.dmg
16 | *.gz
17 | *.iso
18 | *.jar
19 | *.rar
20 | *.tar
21 | *.zip
22 |
23 | # Logs and databases #
24 | ######################
25 | *.log
26 | *.sql
27 | *.sqlite
28 |
29 | # OS generated files #
30 | ######################
31 | .DS_Store
32 | ehthumbs.db
33 | Icon?
34 | Thumbs.db
35 | .sass-cache
36 | .data
37 | mnt
38 |
39 |
--------------------------------------------------------------------------------
/compiled/templates/index.js:
--------------------------------------------------------------------------------
1 | window.templates || (window.templates = {});
2 | window.templates['index'] = function(obj) {
3 | var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('\n\n \n \n Node Backbone Skeleton\n \n \n \n Hello ', name ,'\n \n \n');}return __p.join('');
4 | };
--------------------------------------------------------------------------------
/server.coffee:
--------------------------------------------------------------------------------
1 | express = require 'express'
2 | path = require 'path'
3 | _ = require 'underscore'
4 | Watcher = require('./util/watcher').watcher
5 | Settings = require 'settings'
6 |
7 | templates = {}
8 | settings = new Settings(path.join __dirname, 'config/environment.js').getEnvironment()
9 | watcher = new Watcher settings.watcherOptions, templates
10 |
11 | watcher.compileTemplates()
12 |
13 | app = express.createServer()
14 |
15 | app.configure ->
16 | app.use express.errorHandler settings.errorHandling
17 | app.use express.static settings.publicDir, maxAge: settings.staticMaxAge
18 | app.use express.bodyParser()
19 | app.use express.cookieParser maxAge: settings.cookieMaxAge
20 | app.use express.session secret: settings.cookieSecret
21 |
22 | app.configure 'development', ->
23 | watcher.watch()
24 |
25 | app.get '/', (req, res) ->
26 | res.send templates['index']({name: 'Jim'})
27 |
28 | app.listen 8003
--------------------------------------------------------------------------------
/stylesheets/application.scss:
--------------------------------------------------------------------------------
1 | @import "blueprint/reset";
2 | @import "blueprint";
3 | @import "blueprint/scaffolding";
4 | @import "base";
5 |
6 | $blueprint-grid-columns: 24;
7 | $blueprint-container-size: 950px;
8 | $blueprint-grid-margin: 10px;
9 |
10 | // Use this to calculate the width based on the total width.
11 | // Or you can set $blueprint-grid-width to a fixed value and unset $blueprint-container-size -- it will be calculated for you.
12 | $blueprint-grid-width: ($blueprint-container-size + $blueprint-grid-margin) / $blueprint-grid-columns - $blueprint-grid-margin;
13 |
14 | body.bp {
15 | @include blueprint-utilities;
16 | @include blueprint-debug;
17 | @include blueprint-interaction;
18 | @include blueprint-grid;
19 | }
20 |
21 | body {
22 | font-family: Arial;
23 | font-size: 14px;
24 | }
25 |
26 | a {
27 | color: #006699;
28 | text-decoration: none;
29 | }
30 |
31 | a:hover {
32 | text-decoration: underline;
33 | }
34 |
35 | .bp-typography {
36 | @include blueprint-typography(true);
37 | }
38 |
39 | form.bp {
40 | @include blueprint-form;
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/config/config.rb:
--------------------------------------------------------------------------------
1 | # Require any additional compass plugins here.
2 |
3 | # Set this to the root of your project when deployed:
4 | http_path = "/"
5 | css_dir = "public/css"
6 | sass_dir = "stylesheets"
7 | images_dir = "public/img"
8 | javascripts_dir = "public/js"
9 | http_images_path = "/img"
10 | http_stylesheets_path = "/css"
11 | http_javascripts_path = "/js"
12 | output_style = :compressed
13 |
14 | # You can select your preferred output style here (can be overridden via the command line):
15 | # output_style = :expanded or :nested or :compact or :compressed
16 |
17 | # To enable relative paths to assets via compass helper functions. Uncomment:
18 | # relative_assets = true
19 |
20 | # To disable debugging comments that display the original location of your selectors. Uncomment:
21 | # line_comments = false
22 |
23 |
24 | # If you prefer the indented syntax, you might want to regenerate this
25 | # project again passing --syntax sass, or you can uncomment this:
26 | # preferred_syntax = :sass
27 | # and then run:
28 | # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
29 |
--------------------------------------------------------------------------------
/server.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var Settings, Watcher, app, express, path, settings, templates, watcher, _;
3 | express = require('express');
4 | path = require('path');
5 | _ = require('underscore');
6 | Watcher = require('./util/watcher').watcher;
7 | Settings = require('settings');
8 | templates = {};
9 | settings = new Settings(path.join(__dirname, 'config/environment.js')).getEnvironment();
10 | watcher = new Watcher(settings.watcherOptions, templates);
11 | watcher.compileTemplates();
12 | app = express.createServer();
13 | app.configure(function() {
14 | app.use(express.errorHandler(settings.errorHandling));
15 | app.use(express.static(settings.publicDir, {
16 | maxAge: settings.staticMaxAge
17 | }));
18 | app.use(express.bodyParser());
19 | app.use(express.cookieParser({
20 | maxAge: settings.cookieMaxAge
21 | }));
22 | return app.use(express.session({
23 | secret: settings.cookieSecret
24 | }));
25 | });
26 | app.configure('development', function() {
27 | return watcher.watch();
28 | });
29 | app.get('/', function(req, res) {
30 | return res.send(templates['index']({
31 | name: 'Jim'
32 | }));
33 | });
34 | app.listen(8003);
35 | }).call(this);
36 |
--------------------------------------------------------------------------------
/config/environment.coffee:
--------------------------------------------------------------------------------
1 | oneYear = 1000 * 60 * 60 * 24 * 365
2 |
3 | exports.common =
4 | cookieMaxAge: oneYear
5 | publicDir: 'public'
6 | cookieSecret: 'my.secret.phrase'
7 |
8 | exports.development =
9 | staticMaxAge: null
10 | errorHandling:
11 | dumpExceptions: true
12 | showStack: true
13 | watcherOptions:
14 | compass: 'config/config.rb'
15 | verbose: true
16 | package: 'config/jammit.yml'
17 | packageOut: 'public/js'
18 | paths:
19 | 'server.coffee': {type: 'coffee', out: '.'}
20 | 'util/**/*.coffee': {type: 'coffee', out: 'util'}
21 | 'config/**/*.coffee': {type: 'coffee', out: 'config'}
22 | 'server-lib/**/*.coffee': {type: 'coffee', out: 'server-lib'}
23 | 'bootstrap/**/*.coffee': {type: 'coffee', out: 'compiled/bootstrap', package: true}
24 | 'models/**/*.coffee': {type: 'coffee', out: 'compiled/models', package: true}
25 | 'controllers/**/*.coffee': {type: 'coffee', out: 'compiled/controllers', package: true}
26 | 'views/**/*.coffee': {type: 'coffee', out: 'compiled/views', package: true}
27 | 'client-lib/**/*.coffee': {type: 'coffee', out: 'compiled/lib', package: true}
28 | 'templates/**/*.html': {type: 'template', out: 'compiled/templates', package: true}
29 |
30 | exports.production =
31 | staticMaxAge: oneYear
32 | errorHandling: {}
33 |
34 | exports.test = {}
--------------------------------------------------------------------------------
/config/environment.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var oneYear;
3 | oneYear = 1000 * 60 * 60 * 24 * 365;
4 | exports.common = {
5 | cookieMaxAge: oneYear,
6 | publicDir: 'public',
7 | cookieSecret: 'my.secret.phrase'
8 | };
9 | exports.development = {
10 | staticMaxAge: null,
11 | errorHandling: {
12 | dumpExceptions: true,
13 | showStack: true
14 | },
15 | watcherOptions: {
16 | compass: 'config/config.rb',
17 | verbose: true,
18 | package: 'config/jammit.yml',
19 | packageOut: 'public/js',
20 | paths: {
21 | 'server.coffee': {
22 | type: 'coffee',
23 | out: '.'
24 | },
25 | 'util/**/*.coffee': {
26 | type: 'coffee',
27 | out: 'util'
28 | },
29 | 'config/**/*.coffee': {
30 | type: 'coffee',
31 | out: 'config'
32 | },
33 | 'server-lib/**/*.coffee': {
34 | type: 'coffee',
35 | out: 'server-lib'
36 | },
37 | 'bootstrap/**/*.coffee': {
38 | type: 'coffee',
39 | out: 'compiled/bootstrap',
40 | package: true
41 | },
42 | 'models/**/*.coffee': {
43 | type: 'coffee',
44 | out: 'compiled/models',
45 | package: true
46 | },
47 | 'controllers/**/*.coffee': {
48 | type: 'coffee',
49 | out: 'compiled/controllers',
50 | package: true
51 | },
52 | 'views/**/*.coffee': {
53 | type: 'coffee',
54 | out: 'compiled/views',
55 | package: true
56 | },
57 | 'client-lib/**/*.coffee': {
58 | type: 'coffee',
59 | out: 'compiled/lib',
60 | package: true
61 | },
62 | 'templates/**/*.html': {
63 | type: 'template',
64 | out: 'compiled/templates',
65 | package: true
66 | }
67 | }
68 | }
69 | };
70 | exports.production = {
71 | staticMaxAge: oneYear,
72 | errorHandling: {}
73 | };
74 | exports.test = {};
75 | }).call(this);
76 |
--------------------------------------------------------------------------------
/util/watcher.coffee:
--------------------------------------------------------------------------------
1 | fs = require 'fs'
2 | fileUtil = require 'file'
3 | path = require 'path'
4 | watchTree = require 'watch-tree'
5 | child_process = require 'child_process'
6 | _ = require 'underscore'
7 | glob = require 'glob'
8 |
9 | class Watcher
10 | constructor: (@options, @templates) ->
11 | @paths = @options?.paths
12 |
13 | watch: ->
14 | @runCompass @options.compass if @options.compass
15 | @watchTree @options.root, @options.sampleRate if @paths
16 |
17 | watchTree: (root = '.', sampleRate = 1) ->
18 | root = path.resolve root
19 | console.log "Watching for changes under root '#{root}' to paths #{JSON.stringify _.keys @paths}"
20 |
21 | watcher = watchTree.watchTree root, {'sample-rate': sampleRate}
22 | watcher.on 'fileModified', (file) => @handleFile(file, 'modify')
23 | watcher.on 'fileCreated', (file) => @handleFile(file, 'create')
24 | watcher.on 'fileDeleted', (file) => @handleFile(file, 'delete')
25 |
26 | runCompass: (config) ->
27 | console.log "Starting compass with config file '#{config}'"
28 | @spawn 'compass', ['watch', '-c', config]
29 |
30 | spawn: (command, args, callback) ->
31 | child = child_process.spawn command, args
32 | child.stdout.on 'data', (data) =>
33 | @log "stdout from '#{command}': #{data}"
34 | child.stderr.on 'data', (data) =>
35 | console.error "stderr from '#{command}': #{data}"
36 | child.on 'exit', (code) =>
37 | @log "'#{command}' exited with code #{code}"
38 | callback?(code)
39 |
40 | findMatch: (file) ->
41 | _.detect @paths, (value, pattern) => @globToRegExp(pattern).test file
42 |
43 | handleFile: (file, action) =>
44 | # glob.fnmatch does not behave as expected, so use RegExp instead
45 | match = @findMatch file
46 | @processFile file, action, match if match
47 |
48 | globToRegExp: (glob) ->
49 | regex = glob.replace /\./g, '\\.' # escape dots
50 | regex = regex.replace /\?/g, '.' # replace ? with dots
51 | regex = regex.replace /\*/g, '.*' # replace * with .*
52 | regex = regex.replace /\.\*\.\*\//g, '(.*\/)*' # replace .*.*/ (which used to be **/) with (.*/)*
53 | new RegExp regex
54 |
55 | processFile: (file, action, options) ->
56 | console.log "Processing change in '#{file}'"
57 | success = (=> @packageFiles(file) if options.package)
58 | switch options.type
59 | when 'coffee' then @compileCoffee file, action, options.out, success
60 | when 'template' then @compileTemplate file, action, options.out, success
61 | else console.log "Unrecognized type '#{type}', skipping file '#{file}'"
62 |
63 | compileCoffee: (file, action, out, callback) ->
64 | coffeeName = path.basename file, path.extname(file)
65 | if action == 'delete'
66 | @log "Handling delete of CoffeeScript file ''#{file}'"
67 | @deleteFile @outFile(out, coffeeName, 'js'), callback
68 | else
69 | @log "Compiling CoffeeScript file '#{file}' to '#{out}'"
70 | @spawn 'coffee', ['--output', out, '--compile', file], callback
71 |
72 | compileTemplates: ->
73 | @log "Compiling all templates"
74 | @processTemplatePattern(pattern, value) for pattern, value of @paths
75 |
76 | deleteFile: (file, callback) ->
77 | fs.unlink file, (err) =>
78 | return @log "Couldn't delete file '#{file}': #{JSON.stringify err}" if err
79 | console.log "Calling callback #{callback}"
80 | callback?()
81 |
82 | processTemplatePattern: (pattern, value) ->
83 | return if value.type != 'template'
84 |
85 | glob.glob pattern, (err, matches) =>
86 | return console.log "#{err}" if err
87 | for match in matches
88 | @compileTemplate match, 'create', value.out
89 |
90 | compileTemplate: (file, action, out, callback) ->
91 | templateName = path.basename file, path.extname(file)
92 | if action == 'delete'
93 | @log "Handling delete of template '#{file}'"
94 | @deleteFile @outFile(out, templateName, 'js'), callback
95 | else
96 | @log "Compiling template file '#{file}' to '#{out}' and adding it to templates object"
97 | fs.readFile file, 'utf8', (err, data) =>
98 | return console.log(err) if err
99 | compiled = _.template data
100 | @templates[templateName] = compiled
101 | @writeTemplate(templateName, compiled, out, callback) if out
102 |
103 | outFile: (outDir, filename, ext) ->
104 | path.join(outDir, "#{filename}.#{ext}")
105 |
106 | writeTemplate: (templateName, compiled, out, callback) ->
107 | asString = compiled.toString().replace('function anonymous', "window.templates || (window.templates = {});\nwindow.templates['#{templateName}'] = function") + ';'
108 | fileUtil.mkdirs out, 0755, =>
109 | fs.writeFile @outFile(out, templateName, 'js'), asString, 'utf8', callback
110 |
111 | packageFiles: (file) ->
112 | @log 'Packaging files using jammit'
113 | @spawn 'jammit', ['-c', @options.package, '-o', @options.packageOut]
114 |
115 | log: (message) ->
116 | console.log message if @options?.verbose
117 |
118 | exports?.watcher = Watcher
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Update
2 |
3 | This project is from 2011 and is **no longer maintained**. It has been supersceded by the many [node.js frameworks](http://nodeframework.com/) that are now available and tools like [grunt.js](http://gruntjs.com/) and [gulp.js](http://gulpjs.com/).
4 |
5 | # Overview
6 |
7 | This is project represents the skeleton of an application with [node.js](http://nodejs.org/) server-side and [backbone.js](http://documentcloud.github.com/backbone/) client-side. All JavaScript is written using [CoffeeScript](http://jashkenas.github.com/coffee-script), all CSS is written using [Compass](http://compass-style.org/) and [SASS](http://sass-lang.com/), all templates are written using [underscore.js](http://documentcloud.github.com/underscore/) and all client-side JavaScript is packaged using [Jammit](http://documentcloud.github.com/jammit/). A utility class is provided that automatically recompiles & packages all of these pre-processor languages every time you hit save, so you can iterate quickly: make a code change, hit refresh.
8 |
9 | node-backbone-skeleton is primarily for my own personal use and not a battle-tested, production-ready framework. However, I've found it useful for a few projects, so perhaps other developers will find it a handy starting point.
10 |
11 | # Getting Started
12 |
13 |
14 |
15 | 1. `gem install compass`
16 | 1. `npm install glob`
17 | 1. `gem install jammit`
18 | 1. `npm install -g coffee-script`
19 | 1. Add the NODE_ENV=development to your environment variables (e.g. add `export NODE_ENV=development` to `.bash_profile`)
20 | 1. Run with `node server.js` (or `node-dev server.js` to get "hot redeploy")
21 | 1. Go to http://localhost:8003
22 | 1. Make changes to the code and watch the CoffeeScript, SASS and templates get recompiled as soon as you hit save
23 |
24 | # Technologies
25 |
26 | * Server: [node.js](http://nodejs.org/) + [express](http://expressjs.com/)
27 | * Client-side MVC: [backbone.js](http://documentcloud.github.com/backbone/)
28 | * Templating: [underscore.js](http://documentcloud.github.com/underscore/)
29 | * Preprocessor: [CoffeeScript](http://jashkenas.github.com/coffee-script)
30 | * Client-side library: [jQuery](http://jquery.com/)
31 | * Stylesheets: [Compass](http://compass-style.org/) and [SASS](http://sass-lang.com/)
32 | * Config: [node-settings](https://github.com/mgutz/node-settings)
33 |
34 | # Directory structure
35 |
36 | * /bootstrap: client-side JS files used to bootstrap the application, e.g. setup the namespace as well as create the [backbone.js](http://documentcloud.github.com/backbone/) controllers, models and views.
37 | * /compiled: all files compiled to JavaScript - namely, all the [CoffeeScript](http://jashkenas.github.com/coffee-script) and templating code - is dumped in this directory. You should never need to change anything in here by hand.
38 | * /config: configuration settings for the project.
39 | * /controllers: [backbone.js](http://documentcloud.github.com/backbone/) controllers.
40 | * /lib: 3rd party libraries, including [jQuery](http://jquery.com/), [underscore.js](http://documentcloud.github.com/underscore/) and [backbone.js](http://documentcloud.github.com/backbone/).
41 | * /models: [backbone.js](http://documentcloud.github.com/backbone/) models.
42 | * /node_modules: [node.js](http://nodejs.org/) modules installed via npm, including [express](http://expressjs.com/), [watch-tree](https://github.com/tafa/node-watch-tree), [node-utils](https://github.com/mikeal/node-utils) and [underscore.js](http://documentcloud.github.com/underscore/).
43 | * /public: all static content (CSS, JS, images) publicly visible to the browser gets dumped here.
44 | * server.coffee: the main [node.js](http://nodejs.org/) server file. Gets automatically compiled into server.js using /util/watcher.coffee.
45 | * /stylesheets: [SASS](http://sass-lang.com/) stylesheets go here and are compiled when you hit save via [Compass](http://compass-style.org/) into /public/css.
46 | * /templates: [underscore.js](http://documentcloud.github.com/underscore/) templates go here and are compiled when you hit save into /compiled/templates.
47 | * /util: utility class that auto-recompiles and packages all the JavaScript and CSS.
48 | * /views: [backbone.js](http://documentcloud.github.com/backbone/) views.
49 |
50 | # /util/watcher.coffee
51 |
52 | This class is loaded by `server.js` at startup to watch the project using [watch-tree](https://github.com/tafa/node-watch-tree) and recompile and package files as necessary so that you can iterate quickly. The goal is to support "make a change, hit reload" style development even though this project uses a number of pre-processors that require "compilation". It works reasonably well already and as I improve, I'll likely break this off into its own Github/NPM project.
53 |
54 | Sample usage:
55 |
56 | ```javascript
57 | var Watcher = require('./util/watcher').watcher;
58 | var options = {
59 | compass: 'config/config.rb',
60 | verbose: true,
61 | templates: templates,
62 | package: 'config/jammit.yml',
63 | packageOut: 'public/js',
64 | paths: {
65 | 'server.coffee': {type: 'coffee', out: '.'},
66 | 'templates/**/*.html': {type: 'template', out: 'compiled/templates', package: true},
67 | 'views/**/*.coffee': {type: 'coffee', out: 'compiled/views', package: true}
68 | }
69 | };
70 | var watcher = new Watcher(options);
71 | watcher.watch();
72 | ```
73 |
74 | Executing the `watch()` function does the following:
75 |
76 | * Runs `compass watch` if a config file is specified in `options.compass`
77 | * Watches over the root directory (as specified in `options.root` or `'.'` by default) and takes action any time a file changes that matches one of the keys (globs processed using [node-glob](https://github.com/isaacs/node-glob)). The action taken depends on the `type`:
78 | * coffee: compiles the file using [CoffeeScript](http://jashkenas.github.com/coffee-script) and puts the output into the directory specified by `out`
79 | * template: compiles the template using [underscore.js](http://documentcloud.github.com/underscore/) and puts the output into the directory specified by `out`. Also adds this template by filename into the object specified in `options.templates`: e.g. if `foo.html` changed, `foo.js` would be created and `options.templates['foo']` would be set to the compiled function.
80 | * If `package: true` is specified, will also run [Jammit](http://documentcloud.github.com/jammit/) using the config file specified in `options.package` and put the output in the folder specified in `options.packageOut`
81 |
--------------------------------------------------------------------------------
/util/watcher.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var Watcher, child_process, fileUtil, fs, glob, path, watchTree, _;
3 | var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
4 | fs = require('fs');
5 | fileUtil = require('file');
6 | path = require('path');
7 | watchTree = require('watch-tree');
8 | child_process = require('child_process');
9 | _ = require('underscore');
10 | glob = require('glob');
11 | Watcher = (function() {
12 | function Watcher(options, templates) {
13 | var _ref;
14 | this.options = options;
15 | this.templates = templates;
16 | this.handleFile = __bind(this.handleFile, this);
17 | this.paths = (_ref = this.options) != null ? _ref.paths : void 0;
18 | }
19 | Watcher.prototype.watch = function() {
20 | if (this.options.compass) {
21 | this.runCompass(this.options.compass);
22 | }
23 | if (this.paths) {
24 | return this.watchTree(this.options.root, this.options.sampleRate);
25 | }
26 | };
27 | Watcher.prototype.watchTree = function(root, sampleRate) {
28 | var watcher;
29 | if (root == null) {
30 | root = '.';
31 | }
32 | if (sampleRate == null) {
33 | sampleRate = 1;
34 | }
35 | root = path.resolve(root);
36 | console.log("Watching for changes under root '" + root + "' to paths " + (JSON.stringify(_.keys(this.paths))));
37 | watcher = watchTree.watchTree(root, {
38 | 'sample-rate': sampleRate
39 | });
40 | watcher.on('fileModified', __bind(function(file) {
41 | return this.handleFile(file, 'modify');
42 | }, this));
43 | watcher.on('fileCreated', __bind(function(file) {
44 | return this.handleFile(file, 'create');
45 | }, this));
46 | return watcher.on('fileDeleted', __bind(function(file) {
47 | return this.handleFile(file, 'delete');
48 | }, this));
49 | };
50 | Watcher.prototype.runCompass = function(config) {
51 | console.log("Starting compass with config file '" + config + "'");
52 | return this.spawn('compass', ['watch', '-c', config]);
53 | };
54 | Watcher.prototype.spawn = function(command, args, callback) {
55 | var child;
56 | child = child_process.spawn(command, args);
57 | child.stdout.on('data', __bind(function(data) {
58 | return this.log("stdout from '" + command + "': " + data);
59 | }, this));
60 | child.stderr.on('data', __bind(function(data) {
61 | return console.error("stderr from '" + command + "': " + data);
62 | }, this));
63 | return child.on('exit', __bind(function(code) {
64 | this.log("'" + command + "' exited with code " + code);
65 | return typeof callback === "function" ? callback(code) : void 0;
66 | }, this));
67 | };
68 | Watcher.prototype.findMatch = function(file) {
69 | return _.detect(this.paths, __bind(function(value, pattern) {
70 | return this.globToRegExp(pattern).test(file);
71 | }, this));
72 | };
73 | Watcher.prototype.handleFile = function(file, action) {
74 | var match;
75 | match = this.findMatch(file);
76 | if (match) {
77 | return this.processFile(file, action, match);
78 | }
79 | };
80 | Watcher.prototype.globToRegExp = function(glob) {
81 | var regex;
82 | regex = glob.replace(/\./g, '\\.');
83 | regex = regex.replace(/\?/g, '.');
84 | regex = regex.replace(/\*/g, '.*');
85 | regex = regex.replace(/\.\*\.\*\//g, '(.*\/)*');
86 | return new RegExp(regex);
87 | };
88 | Watcher.prototype.processFile = function(file, action, options) {
89 | var success;
90 | console.log("Processing change in '" + file + "'");
91 | success = (__bind(function() {
92 | if (options.package) {
93 | return this.packageFiles(file);
94 | }
95 | }, this));
96 | switch (options.type) {
97 | case 'coffee':
98 | return this.compileCoffee(file, action, options.out, success);
99 | case 'template':
100 | return this.compileTemplate(file, action, options.out, success);
101 | default:
102 | return console.log("Unrecognized type '" + type + "', skipping file '" + file + "'");
103 | }
104 | };
105 | Watcher.prototype.compileCoffee = function(file, action, out, callback) {
106 | var coffeeName;
107 | coffeeName = path.basename(file, path.extname(file));
108 | if (action === 'delete') {
109 | this.log("Handling delete of CoffeeScript file ''" + file + "'");
110 | return this.deleteFile(this.outFile(out, coffeeName, 'js'), callback);
111 | } else {
112 | this.log("Compiling CoffeeScript file '" + file + "' to '" + out + "'");
113 | return this.spawn('coffee', ['--output', out, '--compile', file], callback);
114 | }
115 | };
116 | Watcher.prototype.compileTemplates = function() {
117 | var pattern, value, _ref, _results;
118 | this.log("Compiling all templates");
119 | _ref = this.paths;
120 | _results = [];
121 | for (pattern in _ref) {
122 | value = _ref[pattern];
123 | _results.push(this.processTemplatePattern(pattern, value));
124 | }
125 | return _results;
126 | };
127 | Watcher.prototype.deleteFile = function(file, callback) {
128 | return fs.unlink(file, __bind(function(err) {
129 | if (err) {
130 | return this.log("Couldn't delete file '" + file + "': " + (JSON.stringify(err)));
131 | }
132 | console.log("Calling callback " + callback);
133 | return typeof callback === "function" ? callback() : void 0;
134 | }, this));
135 | };
136 | Watcher.prototype.processTemplatePattern = function(pattern, value) {
137 | if (value.type !== 'template') {
138 | return;
139 | }
140 | return glob.glob(pattern, __bind(function(err, matches) {
141 | var match, _i, _len, _results;
142 | if (err) {
143 | return console.log("" + err);
144 | }
145 | _results = [];
146 | for (_i = 0, _len = matches.length; _i < _len; _i++) {
147 | match = matches[_i];
148 | _results.push(this.compileTemplate(match, 'create', value.out));
149 | }
150 | return _results;
151 | }, this));
152 | };
153 | Watcher.prototype.compileTemplate = function(file, action, out, callback) {
154 | var templateName;
155 | templateName = path.basename(file, path.extname(file));
156 | if (action === 'delete') {
157 | this.log("Handling delete of template '" + file + "'");
158 | return this.deleteFile(this.outFile(out, templateName, 'js'), callback);
159 | } else {
160 | this.log("Compiling template file '" + file + "' to '" + out + "' and adding it to templates object");
161 | return fs.readFile(file, 'utf8', __bind(function(err, data) {
162 | var compiled;
163 | if (err) {
164 | return console.log(err);
165 | }
166 | compiled = _.template(data);
167 | this.templates[templateName] = compiled;
168 | if (out) {
169 | return this.writeTemplate(templateName, compiled, out, callback);
170 | }
171 | }, this));
172 | }
173 | };
174 | Watcher.prototype.outFile = function(outDir, filename, ext) {
175 | return path.join(outDir, "" + filename + "." + ext);
176 | };
177 | Watcher.prototype.writeTemplate = function(templateName, compiled, out, callback) {
178 | var asString;
179 | asString = compiled.toString().replace('function anonymous', "window.templates || (window.templates = {});\nwindow.templates['" + templateName + "'] = function") + ';';
180 | return fileUtil.mkdirs(out, 0755, __bind(function() {
181 | return fs.writeFile(this.outFile(out, templateName, 'js'), asString, 'utf8', callback);
182 | }, this));
183 | };
184 | Watcher.prototype.packageFiles = function(file) {
185 | this.log('Packaging files using jammit');
186 | return this.spawn('jammit', ['-c', this.options.package, '-o', this.options.packageOut]);
187 | };
188 | Watcher.prototype.log = function(message) {
189 | var _ref;
190 | if ((_ref = this.options) != null ? _ref.verbose : void 0) {
191 | return console.log(message);
192 | }
193 | };
194 | return Watcher;
195 | })();
196 | if (typeof exports !== "undefined" && exports !== null) {
197 | exports.watcher = Watcher;
198 | }
199 | }).call(this);
200 |
--------------------------------------------------------------------------------
/dependencies/underscore-min.js:
--------------------------------------------------------------------------------
1 | // Underscore.js 1.1.6
2 | // (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.
3 | // Underscore is freely distributable under the MIT license.
4 | // Portions of Underscore are inspired or borrowed from Prototype,
5 | // Oliver Steele's Functional, and John Resig's Micro-Templating.
6 | // For all details and documentation:
7 | // http://documentcloud.github.com/underscore
8 | (function(){var p=this,C=p._,m={},i=Array.prototype,n=Object.prototype,f=i.slice,D=i.unshift,E=n.toString,l=n.hasOwnProperty,s=i.forEach,t=i.map,u=i.reduce,v=i.reduceRight,w=i.filter,x=i.every,y=i.some,o=i.indexOf,z=i.lastIndexOf;n=Array.isArray;var F=Object.keys,q=Function.prototype.bind,b=function(a){return new j(a)};typeof module!=="undefined"&&module.exports?(module.exports=b,b._=b):p._=b;b.VERSION="1.1.6";var h=b.each=b.forEach=function(a,c,d){if(a!=null)if(s&&a.forEach===s)a.forEach(c,d);else if(b.isNumber(a.length))for(var e=
9 | 0,k=a.length;e=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,
13 | c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};h(a,function(a,b,f){b=c?c.call(d,a,b,f):a;bd?1:0}),"value")};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.zip=function(){for(var a=f.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),
16 | e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}};b.keys=F||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],d;for(d in a)l.call(a,d)&&(b[b.length]=d);return b};b.values=function(a){return b.map(a,
20 | b.identity)};b.functions=b.methods=function(a){return b.filter(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a){h(f.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};b.defaults=function(a){h(f.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,c){if(a===c)return!0;var d=typeof a;if(d!=
21 | typeof c)return!1;if(a==c)return!0;if(!a&&c||a&&!c)return!1;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return!1;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!=="object")return!1;if(a.length&&a.length!==c.length)return!1;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return!1;
22 | for(var f in a)if(!(f in c)||!b.isEqual(a[f],c[f]))return!1;return!0};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(l.call(a,c))return!1;return!0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=n||function(a){return E.call(a)==="[object Array]"};b.isArguments=function(a){return!(!a||!l.call(a,"callee"))};b.isFunction=function(a){return!(!a||!a.constructor||!a.call||!a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};
23 | b.isNumber=function(a){return!!(a===0||a&&a.toExponential&&a.toFixed)};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===!0||a===!1};b.isDate=function(a){return!(!a||!a.getTimezoneOffset||!a.setUTCFullYear)};b.isRegExp=function(a){return!(!a||!a.test||!a.exec||!(a.ignoreCase||a.ignoreCase===!1))};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.noConflict=function(){p._=C;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=
24 | 0;e/g,interpolate:/<%=([\s\S]+?)%>/g};b.template=function(a,c){var d=b.templateSettings;d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(d.evaluate||
25 | null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";d=new Function("obj",d);return c?d(c):d};var j=function(a){this._wrapped=a};b.prototype=j.prototype;var r=function(a,c){return c?b(a).chain():a},H=function(a,c){j.prototype[a]=function(){var a=f.call(arguments);D.call(a,this._wrapped);return r(c.apply(b,a),this._chain)}};b.mixin(b);h(["pop","push","reverse","shift","sort",
26 | "splice","unshift"],function(a){var b=i[a];j.prototype[a]=function(){b.apply(this._wrapped,arguments);return r(this._wrapped,this._chain)}});h(["concat","join","slice"],function(a){var b=i[a];j.prototype[a]=function(){return r(b.apply(this._wrapped,arguments),this._chain)}});j.prototype.chain=function(){this._chain=!0;return this};j.prototype.value=function(){return this._wrapped}})();
27 |
--------------------------------------------------------------------------------
/dependencies/backbone-min.js:
--------------------------------------------------------------------------------
1 | // Backbone.js 0.3.3
2 | // (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
3 | // Backbone may be freely distributed under the MIT license.
4 | // For all details and documentation:
5 | // http://documentcloud.github.com/backbone
6 | (function(){var e;e=typeof exports!=="undefined"?exports:this.Backbone={};e.VERSION="0.3.3";var f=this._;if(!f&&typeof require!=="undefined")f=require("underscore")._;var h=this.jQuery||this.Zepto;e.emulateHTTP=false;e.emulateJSON=false;e.Events={bind:function(a,b){this._callbacks||(this._callbacks={});(this._callbacks[a]||(this._callbacks[a]=[])).push(b);return this},unbind:function(a,b){var c;if(a){if(c=this._callbacks)if(b){c=c[a];if(!c)return this;for(var d=0,g=c.length;d/g,">").replace(/"/g,
9 | """)},set:function(a,b){b||(b={});if(!a)return this;if(a.attributes)a=a.attributes;var c=this.attributes,d=this._escapedAttributes;if(!b.silent&&this.validate&&!this._performValidation(a,b))return false;if("id"in a)this.id=a.id;for(var g in a){var i=a[g];if(!f.isEqual(c[g],i)){c[g]=i;delete d[g];if(!b.silent){this._changed=true;this.trigger("change:"+g,this,i,b)}}}!b.silent&&this._changed&&this.change(b);return this},unset:function(a,b){b||(b={});var c={};c[a]=void 0;if(!b.silent&&this.validate&&
10 | !this._performValidation(c,b))return false;delete this.attributes[a];delete this._escapedAttributes[a];if(!b.silent){this._changed=true;this.trigger("change:"+a,this,void 0,b);this.change(b)}return this},clear:function(a){a||(a={});var b=this.attributes,c={};for(attr in b)c[attr]=void 0;if(!a.silent&&this.validate&&!this._performValidation(c,a))return false;this.attributes={};this._escapedAttributes={};if(!a.silent){this._changed=true;for(attr in b)this.trigger("change:"+attr,this,void 0,a);this.change(a)}return this},
11 | fetch:function(a){a||(a={});var b=this,c=j(a.error,b,a);(this.sync||e.sync)("read",this,function(d){if(!b.set(b.parse(d),a))return false;a.success&&a.success(b,d)},c);return this},save:function(a,b){b||(b={});if(a&&!this.set(a,b))return false;var c=this,d=j(b.error,c,b),g=this.isNew()?"create":"update";(this.sync||e.sync)(g,this,function(i){if(!c.set(c.parse(i),b))return false;b.success&&b.success(c,i)},d);return this},destroy:function(a){a||(a={});var b=this,c=j(a.error,b,a);(this.sync||e.sync)("delete",
12 | this,function(d){b.collection&&b.collection.remove(b);a.success&&a.success(b,d)},c);return this},url:function(){var a=k(this.collection);if(this.isNew())return a;return a+(a.charAt(a.length-1)=="/"?"":"/")+this.id},parse:function(a){return a},clone:function(){return new this.constructor(this)},isNew:function(){return!this.id},change:function(a){this.trigger("change",this,a);this._previousAttributes=f.clone(this.attributes);this._changed=false},hasChanged:function(a){if(a)return this._previousAttributes[a]!=
13 | this.attributes[a];return this._changed},changedAttributes:function(a){a||(a=this.attributes);var b=this._previousAttributes,c=false,d;for(d in a)if(!f.isEqual(b[d],a[d])){c=c||{};c[d]=a[d]}return c},previous:function(a){if(!a||!this._previousAttributes)return null;return this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},_performValidation:function(a,b){var c=this.validate(a);if(c){b.error?b.error(this,c):this.trigger("error",this,c,b);return false}return true}});
14 | e.Collection=function(a,b){b||(b={});if(b.comparator){this.comparator=b.comparator;delete b.comparator}this._boundOnModelEvent=f.bind(this._onModelEvent,this);this._reset();a&&this.refresh(a,{silent:true});this.initialize(a,b)};f.extend(e.Collection.prototype,e.Events,{model:e.Model,initialize:function(){},toJSON:function(){return this.map(function(a){return a.toJSON()})},add:function(a,b){if(f.isArray(a))for(var c=0,d=a.length;c').hide().appendTo("body")[0].contentWindow;
22 | "onhashchange"in window&&!a?h(window).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval);return this.loadUrl()},route:function(a,b){this.handlers.push({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();if(a==this.fragment&&this.iframe)a=this.getFragment(this.iframe.location);if(a==this.fragment||a==decodeURIComponent(this.fragment))return false;if(this.iframe)window.location.hash=this.iframe.location.hash=a;this.loadUrl()},loadUrl:function(){var a=this.fragment=
23 | this.getFragment();return f.any(this.handlers,function(b){if(b.route.test(a)){b.callback(a);return true}})},saveLocation:function(a){a=(a||"").replace(l,"");if(this.fragment!=a){window.location.hash=this.fragment=a;if(this.iframe&&a!=this.getFragment(this.iframe.location)){this.iframe.document.open().close();this.iframe.location.hash=a}}}});e.View=function(a){this._configure(a||{});this._ensureElement();this.delegateEvents();this.initialize(a)};var q=/^(\w+)\s*(.*)$/;f.extend(e.View.prototype,e.Events,
24 | {tagName:"div",$:function(a){return h(a,this.el)},initialize:function(){},render:function(){return this},remove:function(){h(this.el).remove();return this},make:function(a,b,c){a=document.createElement(a);b&&h(a).attr(b);c&&h(a).html(c);return a},delegateEvents:function(a){if(a||(a=this.events)){h(this.el).unbind();for(var b in a){var c=a[b],d=b.match(q),g=d[1];d=d[2];c=f.bind(this[c],this);d===""?h(this.el).bind(g,c):h(this.el).delegate(d,g,c)}}},_configure:function(a){if(this.options)a=f.extend({},
25 | this.options,a);if(a.model)this.model=a.model;if(a.collection)this.collection=a.collection;if(a.el)this.el=a.el;if(a.id)this.id=a.id;if(a.className)this.className=a.className;if(a.tagName)this.tagName=a.tagName;this.options=a},_ensureElement:function(){if(!this.el){var a={};if(this.id)a.id=this.id;if(this.className)a["class"]=this.className;this.el=this.make(this.tagName,a)}}});var m=function(a,b){var c=r(this,a,b);c.extend=m;return c};e.Model.extend=e.Collection.extend=e.Controller.extend=e.View.extend=
26 | m;var s={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};e.sync=function(a,b,c,d){var g=s[a];a=a==="create"||a==="update"?JSON.stringify(b.toJSON()):null;b={url:k(b),type:g,contentType:"application/json",data:a,dataType:"json",processData:false,success:c,error:d};if(e.emulateJSON){b.contentType="application/x-www-form-urlencoded";b.processData=true;b.data=a?{model:a}:{}}if(e.emulateHTTP)if(g==="PUT"||g==="DELETE"){if(e.emulateJSON)b.data._method=g;b.type="POST";b.beforeSend=function(i){i.setRequestHeader("X-HTTP-Method-Override",
27 | g)}}h.ajax(b)};var n=function(){},r=function(a,b,c){var d;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){return a.apply(this,arguments)};n.prototype=a.prototype;d.prototype=new n;b&&f.extend(d.prototype,b);c&&f.extend(d,c);d.prototype.constructor=d;d.__super__=a.prototype;return d},k=function(a){if(!(a&&a.url))throw Error("A 'url' property or function must be specified");return f.isFunction(a.url)?a.url():a.url},j=function(a,b,c){return function(d){a?a(b,d):b.trigger("error",b,d,c)}}})();
28 |
--------------------------------------------------------------------------------
/public/css/application.css:
--------------------------------------------------------------------------------
1 | html{margin:0;padding:0;border:0}.bp-reset-element,body,h1,h2,h3,h4,h5,h6,article,aside,dialog,figure,footer,header,hgroup,nav,section,blockquote,q,th,td,caption,table,div,span,object,iframe,p,pre,a,abbr,acronym,address,code,del,dfn,em,img,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,caption,tbody,tfoot,thead,tr{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}article,aside,dialog,figure,footer,header,hgroup,nav,section{display:block}blockquote,q{quotes:"" ""}blockquote:before,blockquote:after,q:before,q:after{content:""}th,td,caption{float:none !important;text-align:left;font-weight:normal;vertical-align:middle}table{border-collapse:separate;border-spacing:0;vertical-align:middle}a img{border:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}body{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body.bp .clear{clear:both}body.bp .nowrap{white-space:nowrap}body.bp .clearfix{overflow:hidden;*zoom:1}body.bp .small{font-size:0.8em;margin-bottom:1.875em;line-height:1.875em}body.bp .large{font-size:1.2em;line-height:2.5em;margin-bottom:1.25em}body.bp .first{margin-left:0;padding-left:0}body.bp .last{margin-right:0;padding-right:0}body.bp .top{margin-top:0;padding-top:0}body.bp .bottom{margin-bottom:0;padding-bottom:0}body.bp .showgrid{background-image:-webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(5%, rgba(0,0,0,0.5)), color-stop(5%, rgba(0,0,0,0))), -webkit-gradient(linear, 0% 50%, 960 50%, color-stop(0%, rgba(0,0,0,0)), color-stop(0%, rgba(100,100,225,0.25)), color-stop(3.125%, rgba(100,100,225,0.25)), color-stop(3.125%, rgba(0,0,0,0)), color-stop(4.167%, rgba(0,0,0,0)), color-stop(4.167%, rgba(100,100,225,0.25)), color-stop(7.292%, rgba(100,100,225,0.25)), color-stop(7.292%, rgba(0,0,0,0)), color-stop(8.333%, rgba(0,0,0,0)), color-stop(8.333%, rgba(100,100,225,0.25)), color-stop(11.458%, rgba(100,100,225,0.25)), color-stop(11.458%, rgba(0,0,0,0)), color-stop(12.5%, rgba(0,0,0,0)), color-stop(12.5%, rgba(100,100,225,0.25)), color-stop(15.625%, rgba(100,100,225,0.25)), color-stop(15.625%, rgba(0,0,0,0)), color-stop(16.667%, rgba(0,0,0,0)), color-stop(16.667%, rgba(100,100,225,0.25)), color-stop(19.792%, rgba(100,100,225,0.25)), color-stop(19.792%, rgba(0,0,0,0)), color-stop(20.833%, rgba(0,0,0,0)), color-stop(20.833%, rgba(100,100,225,0.25)), color-stop(23.958%, rgba(100,100,225,0.25)), color-stop(23.958%, rgba(0,0,0,0)), color-stop(25%, rgba(0,0,0,0)), color-stop(25%, rgba(100,100,225,0.25)), color-stop(28.125%, rgba(100,100,225,0.25)), color-stop(28.125%, rgba(0,0,0,0)), color-stop(29.167%, rgba(0,0,0,0)), color-stop(29.167%, rgba(100,100,225,0.25)), color-stop(32.292%, rgba(100,100,225,0.25)), color-stop(32.292%, rgba(0,0,0,0)), color-stop(33.333%, rgba(0,0,0,0)), color-stop(33.333%, rgba(100,100,225,0.25)), color-stop(36.458%, rgba(100,100,225,0.25)), color-stop(36.458%, rgba(0,0,0,0)), color-stop(37.5%, rgba(0,0,0,0)), color-stop(37.5%, rgba(100,100,225,0.25)), color-stop(40.625%, rgba(100,100,225,0.25)), color-stop(40.625%, rgba(0,0,0,0)), color-stop(41.667%, rgba(0,0,0,0)), color-stop(41.667%, rgba(100,100,225,0.25)), color-stop(44.792%, rgba(100,100,225,0.25)), color-stop(44.792%, rgba(0,0,0,0)), color-stop(45.833%, rgba(0,0,0,0)), color-stop(45.833%, rgba(100,100,225,0.25)), color-stop(48.958%, rgba(100,100,225,0.25)), color-stop(48.958%, rgba(0,0,0,0)), color-stop(50%, rgba(0,0,0,0)), color-stop(50%, rgba(100,100,225,0.25)), color-stop(53.125%, rgba(100,100,225,0.25)), color-stop(53.125%, rgba(0,0,0,0)), color-stop(54.167%, rgba(0,0,0,0)), color-stop(54.167%, rgba(100,100,225,0.25)), color-stop(57.292%, rgba(100,100,225,0.25)), color-stop(57.292%, rgba(0,0,0,0)), color-stop(58.333%, rgba(0,0,0,0)), color-stop(58.333%, rgba(100,100,225,0.25)), color-stop(61.458%, rgba(100,100,225,0.25)), color-stop(61.458%, rgba(0,0,0,0)), color-stop(62.5%, rgba(0,0,0,0)), color-stop(62.5%, rgba(100,100,225,0.25)), color-stop(65.625%, rgba(100,100,225,0.25)), color-stop(65.625%, rgba(0,0,0,0)), color-stop(66.667%, rgba(0,0,0,0)), color-stop(66.667%, rgba(100,100,225,0.25)), color-stop(69.792%, rgba(100,100,225,0.25)), color-stop(69.792%, rgba(0,0,0,0)), color-stop(70.833%, rgba(0,0,0,0)), color-stop(70.833%, rgba(100,100,225,0.25)), color-stop(73.958%, rgba(100,100,225,0.25)), color-stop(73.958%, rgba(0,0,0,0)), color-stop(75%, rgba(0,0,0,0)), color-stop(75%, rgba(100,100,225,0.25)), color-stop(78.125%, rgba(100,100,225,0.25)), color-stop(78.125%, rgba(0,0,0,0)), color-stop(79.167%, rgba(0,0,0,0)), color-stop(79.167%, rgba(100,100,225,0.25)), color-stop(82.292%, rgba(100,100,225,0.25)), color-stop(82.292%, rgba(0,0,0,0)), color-stop(83.333%, rgba(0,0,0,0)), color-stop(83.333%, rgba(100,100,225,0.25)), color-stop(86.458%, rgba(100,100,225,0.25)), color-stop(86.458%, rgba(0,0,0,0)), color-stop(87.5%, rgba(0,0,0,0)), color-stop(87.5%, rgba(100,100,225,0.25)), color-stop(90.625%, rgba(100,100,225,0.25)), color-stop(90.625%, rgba(0,0,0,0)), color-stop(91.667%, rgba(0,0,0,0)), color-stop(91.667%, rgba(100,100,225,0.25)), color-stop(94.792%, rgba(100,100,225,0.25)), color-stop(94.792%, rgba(0,0,0,0)), color-stop(95.833%, rgba(0,0,0,0)), color-stop(95.833%, rgba(100,100,225,0.25)), color-stop(98.958%, rgba(100,100,225,0.25)), color-stop(98.958%, rgba(0,0,0,0)), color-stop(100%, rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom, rgba(0,0,0,0.5) 5%,rgba(0,0,0,0) 5%), -webkit-linear-gradient(left, rgba(0,0,0,0) 0px,rgba(100,100,225,0.25) 0px,rgba(100,100,225,0.25) 30px,rgba(0,0,0,0) 30px,rgba(0,0,0,0) 40px,rgba(100,100,225,0.25) 40px,rgba(100,100,225,0.25) 70px,rgba(0,0,0,0) 70px,rgba(0,0,0,0) 80px,rgba(100,100,225,0.25) 80px,rgba(100,100,225,0.25) 110px,rgba(0,0,0,0) 110px,rgba(0,0,0,0) 120px,rgba(100,100,225,0.25) 120px,rgba(100,100,225,0.25) 150px,rgba(0,0,0,0) 150px,rgba(0,0,0,0) 160px,rgba(100,100,225,0.25) 160px,rgba(100,100,225,0.25) 190px,rgba(0,0,0,0) 190px,rgba(0,0,0,0) 200px,rgba(100,100,225,0.25) 200px,rgba(100,100,225,0.25) 230px,rgba(0,0,0,0) 230px,rgba(0,0,0,0) 240px,rgba(100,100,225,0.25) 240px,rgba(100,100,225,0.25) 270px,rgba(0,0,0,0) 270px,rgba(0,0,0,0) 280px,rgba(100,100,225,0.25) 280px,rgba(100,100,225,0.25) 310px,rgba(0,0,0,0) 310px,rgba(0,0,0,0) 320px,rgba(100,100,225,0.25) 320px,rgba(100,100,225,0.25) 350px,rgba(0,0,0,0) 350px,rgba(0,0,0,0) 360px,rgba(100,100,225,0.25) 360px,rgba(100,100,225,0.25) 390px,rgba(0,0,0,0) 390px,rgba(0,0,0,0) 400px,rgba(100,100,225,0.25) 400px,rgba(100,100,225,0.25) 430px,rgba(0,0,0,0) 430px,rgba(0,0,0,0) 440px,rgba(100,100,225,0.25) 440px,rgba(100,100,225,0.25) 470px,rgba(0,0,0,0) 470px,rgba(0,0,0,0) 480px,rgba(100,100,225,0.25) 480px,rgba(100,100,225,0.25) 510px,rgba(0,0,0,0) 510px,rgba(0,0,0,0) 520px,rgba(100,100,225,0.25) 520px,rgba(100,100,225,0.25) 550px,rgba(0,0,0,0) 550px,rgba(0,0,0,0) 560px,rgba(100,100,225,0.25) 560px,rgba(100,100,225,0.25) 590px,rgba(0,0,0,0) 590px,rgba(0,0,0,0) 600px,rgba(100,100,225,0.25) 600px,rgba(100,100,225,0.25) 630px,rgba(0,0,0,0) 630px,rgba(0,0,0,0) 640px,rgba(100,100,225,0.25) 640px,rgba(100,100,225,0.25) 670px,rgba(0,0,0,0) 670px,rgba(0,0,0,0) 680px,rgba(100,100,225,0.25) 680px,rgba(100,100,225,0.25) 710px,rgba(0,0,0,0) 710px,rgba(0,0,0,0) 720px,rgba(100,100,225,0.25) 720px,rgba(100,100,225,0.25) 750px,rgba(0,0,0,0) 750px,rgba(0,0,0,0) 760px,rgba(100,100,225,0.25) 760px,rgba(100,100,225,0.25) 790px,rgba(0,0,0,0) 790px,rgba(0,0,0,0) 800px,rgba(100,100,225,0.25) 800px,rgba(100,100,225,0.25) 830px,rgba(0,0,0,0) 830px,rgba(0,0,0,0) 840px,rgba(100,100,225,0.25) 840px,rgba(100,100,225,0.25) 870px,rgba(0,0,0,0) 870px,rgba(0,0,0,0) 880px,rgba(100,100,225,0.25) 880px,rgba(100,100,225,0.25) 910px,rgba(0,0,0,0) 910px,rgba(0,0,0,0) 920px,rgba(100,100,225,0.25) 920px,rgba(100,100,225,0.25) 950px,rgba(0,0,0,0) 950px,rgba(0,0,0,0) 960px);background-image:-moz-linear-gradient(bottom, rgba(0,0,0,0.5) 5%,rgba(0,0,0,0) 5%), -moz-linear-gradient(left, rgba(0,0,0,0) 0px,rgba(100,100,225,0.25) 0px,rgba(100,100,225,0.25) 30px,rgba(0,0,0,0) 30px,rgba(0,0,0,0) 40px,rgba(100,100,225,0.25) 40px,rgba(100,100,225,0.25) 70px,rgba(0,0,0,0) 70px,rgba(0,0,0,0) 80px,rgba(100,100,225,0.25) 80px,rgba(100,100,225,0.25) 110px,rgba(0,0,0,0) 110px,rgba(0,0,0,0) 120px,rgba(100,100,225,0.25) 120px,rgba(100,100,225,0.25) 150px,rgba(0,0,0,0) 150px,rgba(0,0,0,0) 160px,rgba(100,100,225,0.25) 160px,rgba(100,100,225,0.25) 190px,rgba(0,0,0,0) 190px,rgba(0,0,0,0) 200px,rgba(100,100,225,0.25) 200px,rgba(100,100,225,0.25) 230px,rgba(0,0,0,0) 230px,rgba(0,0,0,0) 240px,rgba(100,100,225,0.25) 240px,rgba(100,100,225,0.25) 270px,rgba(0,0,0,0) 270px,rgba(0,0,0,0) 280px,rgba(100,100,225,0.25) 280px,rgba(100,100,225,0.25) 310px,rgba(0,0,0,0) 310px,rgba(0,0,0,0) 320px,rgba(100,100,225,0.25) 320px,rgba(100,100,225,0.25) 350px,rgba(0,0,0,0) 350px,rgba(0,0,0,0) 360px,rgba(100,100,225,0.25) 360px,rgba(100,100,225,0.25) 390px,rgba(0,0,0,0) 390px,rgba(0,0,0,0) 400px,rgba(100,100,225,0.25) 400px,rgba(100,100,225,0.25) 430px,rgba(0,0,0,0) 430px,rgba(0,0,0,0) 440px,rgba(100,100,225,0.25) 440px,rgba(100,100,225,0.25) 470px,rgba(0,0,0,0) 470px,rgba(0,0,0,0) 480px,rgba(100,100,225,0.25) 480px,rgba(100,100,225,0.25) 510px,rgba(0,0,0,0) 510px,rgba(0,0,0,0) 520px,rgba(100,100,225,0.25) 520px,rgba(100,100,225,0.25) 550px,rgba(0,0,0,0) 550px,rgba(0,0,0,0) 560px,rgba(100,100,225,0.25) 560px,rgba(100,100,225,0.25) 590px,rgba(0,0,0,0) 590px,rgba(0,0,0,0) 600px,rgba(100,100,225,0.25) 600px,rgba(100,100,225,0.25) 630px,rgba(0,0,0,0) 630px,rgba(0,0,0,0) 640px,rgba(100,100,225,0.25) 640px,rgba(100,100,225,0.25) 670px,rgba(0,0,0,0) 670px,rgba(0,0,0,0) 680px,rgba(100,100,225,0.25) 680px,rgba(100,100,225,0.25) 710px,rgba(0,0,0,0) 710px,rgba(0,0,0,0) 720px,rgba(100,100,225,0.25) 720px,rgba(100,100,225,0.25) 750px,rgba(0,0,0,0) 750px,rgba(0,0,0,0) 760px,rgba(100,100,225,0.25) 760px,rgba(100,100,225,0.25) 790px,rgba(0,0,0,0) 790px,rgba(0,0,0,0) 800px,rgba(100,100,225,0.25) 800px,rgba(100,100,225,0.25) 830px,rgba(0,0,0,0) 830px,rgba(0,0,0,0) 840px,rgba(100,100,225,0.25) 840px,rgba(100,100,225,0.25) 870px,rgba(0,0,0,0) 870px,rgba(0,0,0,0) 880px,rgba(100,100,225,0.25) 880px,rgba(100,100,225,0.25) 910px,rgba(0,0,0,0) 910px,rgba(0,0,0,0) 920px,rgba(100,100,225,0.25) 920px,rgba(100,100,225,0.25) 950px,rgba(0,0,0,0) 950px,rgba(0,0,0,0) 960px);background-image:-o-linear-gradient(bottom, rgba(0,0,0,0.5) 5%,rgba(0,0,0,0) 5%), -o-linear-gradient(left, rgba(0,0,0,0) 0px,rgba(100,100,225,0.25) 0px,rgba(100,100,225,0.25) 30px,rgba(0,0,0,0) 30px,rgba(0,0,0,0) 40px,rgba(100,100,225,0.25) 40px,rgba(100,100,225,0.25) 70px,rgba(0,0,0,0) 70px,rgba(0,0,0,0) 80px,rgba(100,100,225,0.25) 80px,rgba(100,100,225,0.25) 110px,rgba(0,0,0,0) 110px,rgba(0,0,0,0) 120px,rgba(100,100,225,0.25) 120px,rgba(100,100,225,0.25) 150px,rgba(0,0,0,0) 150px,rgba(0,0,0,0) 160px,rgba(100,100,225,0.25) 160px,rgba(100,100,225,0.25) 190px,rgba(0,0,0,0) 190px,rgba(0,0,0,0) 200px,rgba(100,100,225,0.25) 200px,rgba(100,100,225,0.25) 230px,rgba(0,0,0,0) 230px,rgba(0,0,0,0) 240px,rgba(100,100,225,0.25) 240px,rgba(100,100,225,0.25) 270px,rgba(0,0,0,0) 270px,rgba(0,0,0,0) 280px,rgba(100,100,225,0.25) 280px,rgba(100,100,225,0.25) 310px,rgba(0,0,0,0) 310px,rgba(0,0,0,0) 320px,rgba(100,100,225,0.25) 320px,rgba(100,100,225,0.25) 350px,rgba(0,0,0,0) 350px,rgba(0,0,0,0) 360px,rgba(100,100,225,0.25) 360px,rgba(100,100,225,0.25) 390px,rgba(0,0,0,0) 390px,rgba(0,0,0,0) 400px,rgba(100,100,225,0.25) 400px,rgba(100,100,225,0.25) 430px,rgba(0,0,0,0) 430px,rgba(0,0,0,0) 440px,rgba(100,100,225,0.25) 440px,rgba(100,100,225,0.25) 470px,rgba(0,0,0,0) 470px,rgba(0,0,0,0) 480px,rgba(100,100,225,0.25) 480px,rgba(100,100,225,0.25) 510px,rgba(0,0,0,0) 510px,rgba(0,0,0,0) 520px,rgba(100,100,225,0.25) 520px,rgba(100,100,225,0.25) 550px,rgba(0,0,0,0) 550px,rgba(0,0,0,0) 560px,rgba(100,100,225,0.25) 560px,rgba(100,100,225,0.25) 590px,rgba(0,0,0,0) 590px,rgba(0,0,0,0) 600px,rgba(100,100,225,0.25) 600px,rgba(100,100,225,0.25) 630px,rgba(0,0,0,0) 630px,rgba(0,0,0,0) 640px,rgba(100,100,225,0.25) 640px,rgba(100,100,225,0.25) 670px,rgba(0,0,0,0) 670px,rgba(0,0,0,0) 680px,rgba(100,100,225,0.25) 680px,rgba(100,100,225,0.25) 710px,rgba(0,0,0,0) 710px,rgba(0,0,0,0) 720px,rgba(100,100,225,0.25) 720px,rgba(100,100,225,0.25) 750px,rgba(0,0,0,0) 750px,rgba(0,0,0,0) 760px,rgba(100,100,225,0.25) 760px,rgba(100,100,225,0.25) 790px,rgba(0,0,0,0) 790px,rgba(0,0,0,0) 800px,rgba(100,100,225,0.25) 800px,rgba(100,100,225,0.25) 830px,rgba(0,0,0,0) 830px,rgba(0,0,0,0) 840px,rgba(100,100,225,0.25) 840px,rgba(100,100,225,0.25) 870px,rgba(0,0,0,0) 870px,rgba(0,0,0,0) 880px,rgba(100,100,225,0.25) 880px,rgba(100,100,225,0.25) 910px,rgba(0,0,0,0) 910px,rgba(0,0,0,0) 920px,rgba(100,100,225,0.25) 920px,rgba(100,100,225,0.25) 950px,rgba(0,0,0,0) 950px,rgba(0,0,0,0) 960px);background-image:linear-gradient(bottom, rgba(0,0,0,0.5) 5%,rgba(0,0,0,0) 5%), linear-gradient(left, rgba(0,0,0,0) 0px,rgba(100,100,225,0.25) 0px,rgba(100,100,225,0.25) 30px,rgba(0,0,0,0) 30px,rgba(0,0,0,0) 40px,rgba(100,100,225,0.25) 40px,rgba(100,100,225,0.25) 70px,rgba(0,0,0,0) 70px,rgba(0,0,0,0) 80px,rgba(100,100,225,0.25) 80px,rgba(100,100,225,0.25) 110px,rgba(0,0,0,0) 110px,rgba(0,0,0,0) 120px,rgba(100,100,225,0.25) 120px,rgba(100,100,225,0.25) 150px,rgba(0,0,0,0) 150px,rgba(0,0,0,0) 160px,rgba(100,100,225,0.25) 160px,rgba(100,100,225,0.25) 190px,rgba(0,0,0,0) 190px,rgba(0,0,0,0) 200px,rgba(100,100,225,0.25) 200px,rgba(100,100,225,0.25) 230px,rgba(0,0,0,0) 230px,rgba(0,0,0,0) 240px,rgba(100,100,225,0.25) 240px,rgba(100,100,225,0.25) 270px,rgba(0,0,0,0) 270px,rgba(0,0,0,0) 280px,rgba(100,100,225,0.25) 280px,rgba(100,100,225,0.25) 310px,rgba(0,0,0,0) 310px,rgba(0,0,0,0) 320px,rgba(100,100,225,0.25) 320px,rgba(100,100,225,0.25) 350px,rgba(0,0,0,0) 350px,rgba(0,0,0,0) 360px,rgba(100,100,225,0.25) 360px,rgba(100,100,225,0.25) 390px,rgba(0,0,0,0) 390px,rgba(0,0,0,0) 400px,rgba(100,100,225,0.25) 400px,rgba(100,100,225,0.25) 430px,rgba(0,0,0,0) 430px,rgba(0,0,0,0) 440px,rgba(100,100,225,0.25) 440px,rgba(100,100,225,0.25) 470px,rgba(0,0,0,0) 470px,rgba(0,0,0,0) 480px,rgba(100,100,225,0.25) 480px,rgba(100,100,225,0.25) 510px,rgba(0,0,0,0) 510px,rgba(0,0,0,0) 520px,rgba(100,100,225,0.25) 520px,rgba(100,100,225,0.25) 550px,rgba(0,0,0,0) 550px,rgba(0,0,0,0) 560px,rgba(100,100,225,0.25) 560px,rgba(100,100,225,0.25) 590px,rgba(0,0,0,0) 590px,rgba(0,0,0,0) 600px,rgba(100,100,225,0.25) 600px,rgba(100,100,225,0.25) 630px,rgba(0,0,0,0) 630px,rgba(0,0,0,0) 640px,rgba(100,100,225,0.25) 640px,rgba(100,100,225,0.25) 670px,rgba(0,0,0,0) 670px,rgba(0,0,0,0) 680px,rgba(100,100,225,0.25) 680px,rgba(100,100,225,0.25) 710px,rgba(0,0,0,0) 710px,rgba(0,0,0,0) 720px,rgba(100,100,225,0.25) 720px,rgba(100,100,225,0.25) 750px,rgba(0,0,0,0) 750px,rgba(0,0,0,0) 760px,rgba(100,100,225,0.25) 760px,rgba(100,100,225,0.25) 790px,rgba(0,0,0,0) 790px,rgba(0,0,0,0) 800px,rgba(100,100,225,0.25) 800px,rgba(100,100,225,0.25) 830px,rgba(0,0,0,0) 830px,rgba(0,0,0,0) 840px,rgba(100,100,225,0.25) 840px,rgba(100,100,225,0.25) 870px,rgba(0,0,0,0) 870px,rgba(0,0,0,0) 880px,rgba(100,100,225,0.25) 880px,rgba(100,100,225,0.25) 910px,rgba(0,0,0,0) 910px,rgba(0,0,0,0) 920px,rgba(100,100,225,0.25) 920px,rgba(100,100,225,0.25) 950px,rgba(0,0,0,0) 950px,rgba(0,0,0,0) 960px);-moz-background-size:100% 20px, auto;-webkit-background-size:100% 20px, auto;-o-background-size:100% 20px, auto;background-size:100% 20px, auto;background-position:left top}body.bp .feedback,body.bp .error,body.bp .alert,body.bp .notice,body.bp .success,body.bp .info{padding:0.8em;margin-bottom:1em;border:2px solid #dddddd}body.bp .error,body.bp .alert{background:#fbe3e4;color:#8a1f11;border-color:#fbc2c4}body.bp .error a,body.bp .alert a{color:#8a1f11}body.bp .notice{background:#fff6bf;color:#514721;border-color:#ffd324}body.bp .notice a{color:#514721}body.bp .success{background:#e6efc2;color:#264409;border-color:#c6d880}body.bp .success a{color:#264409}body.bp .info{background:#d5edf8;color:#205791;border-color:#92cae4}body.bp .info a{color:#205791}body.bp .hide{display:none}body.bp .highlight{background:yellow}body.bp .added{background:#006600;color:white}body.bp .removed{background:#990000;color:white}body.bp .container{width:950px;margin:0 auto;overflow:hidden;*zoom:1}body.bp .column,body.bp .span-1,body.bp .span-2,body.bp .span-3,body.bp .span-4,body.bp .span-5,body.bp .span-6,body.bp .span-7,body.bp .span-8,body.bp .span-9,body.bp .span-10,body.bp .span-11,body.bp .span-12,body.bp .span-13,body.bp .span-14,body.bp .span-15,body.bp .span-16,body.bp .span-17,body.bp .span-18,body.bp .span-19,body.bp .span-20,body.bp .span-21,body.bp .span-22,body.bp .span-23,body.bp .span-24{display:inline;float:left;margin-right:10px}* html body.bp .column,* html body.bp .span-1,* html body.bp .span-2,* html body.bp .span-3,* html body.bp .span-4,* html body.bp .span-5,* html body.bp .span-6,* html body.bp .span-7,* html body.bp .span-8,* html body.bp .span-9,* html body.bp .span-10,* html body.bp .span-11,* html body.bp .span-12,* html body.bp .span-13,* html body.bp .span-14,* html body.bp .span-15,* html body.bp .span-16,* html body.bp .span-17,* html body.bp .span-18,* html body.bp .span-19,* html body.bp .span-20,* html body.bp .span-21,* html body.bp .span-22,* html body.bp .span-23,* html body.bp .span-24{overflow-x:hidden}body.bp .last{margin-right:0}body.bp .span-1{width:30px}body.bp .span-2{width:70px}body.bp .span-3{width:110px}body.bp .span-4{width:150px}body.bp .span-5{width:190px}body.bp .span-6{width:230px}body.bp .span-7{width:270px}body.bp .span-8{width:310px}body.bp .span-9{width:350px}body.bp .span-10{width:390px}body.bp .span-11{width:430px}body.bp .span-12{width:470px}body.bp .span-13{width:510px}body.bp .span-14{width:550px}body.bp .span-15{width:590px}body.bp .span-16{width:630px}body.bp .span-17{width:670px}body.bp .span-18{width:710px}body.bp .span-19{width:750px}body.bp .span-20{width:790px}body.bp .span-21{width:830px}body.bp .span-22{width:870px}body.bp .span-23{width:910px}body.bp .span-24{width:950px;margin:0}body.bp input.span-1,body.bp textarea.span-1,body.bp select.span-1{width:30px}body.bp input.span-2,body.bp textarea.span-2,body.bp select.span-2{width:70px}body.bp input.span-3,body.bp textarea.span-3,body.bp select.span-3{width:110px}body.bp input.span-4,body.bp textarea.span-4,body.bp select.span-4{width:150px}body.bp input.span-5,body.bp textarea.span-5,body.bp select.span-5{width:190px}body.bp input.span-6,body.bp textarea.span-6,body.bp select.span-6{width:230px}body.bp input.span-7,body.bp textarea.span-7,body.bp select.span-7{width:270px}body.bp input.span-8,body.bp textarea.span-8,body.bp select.span-8{width:310px}body.bp input.span-9,body.bp textarea.span-9,body.bp select.span-9{width:350px}body.bp input.span-10,body.bp textarea.span-10,body.bp select.span-10{width:390px}body.bp input.span-11,body.bp textarea.span-11,body.bp select.span-11{width:430px}body.bp input.span-12,body.bp textarea.span-12,body.bp select.span-12{width:470px}body.bp input.span-13,body.bp textarea.span-13,body.bp select.span-13{width:510px}body.bp input.span-14,body.bp textarea.span-14,body.bp select.span-14{width:550px}body.bp input.span-15,body.bp textarea.span-15,body.bp select.span-15{width:590px}body.bp input.span-16,body.bp textarea.span-16,body.bp select.span-16{width:630px}body.bp input.span-17,body.bp textarea.span-17,body.bp select.span-17{width:670px}body.bp input.span-18,body.bp textarea.span-18,body.bp select.span-18{width:710px}body.bp input.span-19,body.bp textarea.span-19,body.bp select.span-19{width:750px}body.bp input.span-20,body.bp textarea.span-20,body.bp select.span-20{width:790px}body.bp input.span-21,body.bp textarea.span-21,body.bp select.span-21{width:830px}body.bp input.span-22,body.bp textarea.span-22,body.bp select.span-22{width:870px}body.bp input.span-23,body.bp textarea.span-23,body.bp select.span-23{width:910px}body.bp input.span-24,body.bp textarea.span-24,body.bp select.span-24{width:950px}body.bp .append-1{padding-right:40px}body.bp .append-2{padding-right:80px}body.bp .append-3{padding-right:120px}body.bp .append-4{padding-right:160px}body.bp .append-5{padding-right:200px}body.bp .append-6{padding-right:240px}body.bp .append-7{padding-right:280px}body.bp .append-8{padding-right:320px}body.bp .append-9{padding-right:360px}body.bp .append-10{padding-right:400px}body.bp .append-11{padding-right:440px}body.bp .append-12{padding-right:480px}body.bp .append-13{padding-right:520px}body.bp .append-14{padding-right:560px}body.bp .append-15{padding-right:600px}body.bp .append-16{padding-right:640px}body.bp .append-17{padding-right:680px}body.bp .append-18{padding-right:720px}body.bp .append-19{padding-right:760px}body.bp .append-20{padding-right:800px}body.bp .append-21{padding-right:840px}body.bp .append-22{padding-right:880px}body.bp .append-23{padding-right:920px}body.bp .prepend-1{padding-left:40px}body.bp .prepend-2{padding-left:80px}body.bp .prepend-3{padding-left:120px}body.bp .prepend-4{padding-left:160px}body.bp .prepend-5{padding-left:200px}body.bp .prepend-6{padding-left:240px}body.bp .prepend-7{padding-left:280px}body.bp .prepend-8{padding-left:320px}body.bp .prepend-9{padding-left:360px}body.bp .prepend-10{padding-left:400px}body.bp .prepend-11{padding-left:440px}body.bp .prepend-12{padding-left:480px}body.bp .prepend-13{padding-left:520px}body.bp .prepend-14{padding-left:560px}body.bp .prepend-15{padding-left:600px}body.bp .prepend-16{padding-left:640px}body.bp .prepend-17{padding-left:680px}body.bp .prepend-18{padding-left:720px}body.bp .prepend-19{padding-left:760px}body.bp .prepend-20{padding-left:800px}body.bp .prepend-21{padding-left:840px}body.bp .prepend-22{padding-left:880px}body.bp .prepend-23{padding-left:920px}body.bp .pull-1,body.bp .pull-2,body.bp .pull-3,body.bp .pull-4,body.bp .pull-5,body.bp .pull-6,body.bp .pull-7,body.bp .pull-8,body.bp .pull-9,body.bp .pull-10,body.bp .pull-11,body.bp .pull-12,body.bp .pull-13,body.bp .pull-14,body.bp .pull-15,body.bp .pull-16,body.bp .pull-17,body.bp .pull-18,body.bp .pull-19,body.bp .pull-20,body.bp .pull-21,body.bp .pull-22,body.bp .pull-23,body.bp .pull-24{display:inline;float:left;position:relative}body.bp .pull-1{margin-left:-40px}body.bp .pull-2{margin-left:-80px}body.bp .pull-3{margin-left:-120px}body.bp .pull-4{margin-left:-160px}body.bp .pull-5{margin-left:-200px}body.bp .pull-6{margin-left:-240px}body.bp .pull-7{margin-left:-280px}body.bp .pull-8{margin-left:-320px}body.bp .pull-9{margin-left:-360px}body.bp .pull-10{margin-left:-400px}body.bp .pull-11{margin-left:-440px}body.bp .pull-12{margin-left:-480px}body.bp .pull-13{margin-left:-520px}body.bp .pull-14{margin-left:-560px}body.bp .pull-15{margin-left:-600px}body.bp .pull-16{margin-left:-640px}body.bp .pull-17{margin-left:-680px}body.bp .pull-18{margin-left:-720px}body.bp .pull-19{margin-left:-760px}body.bp .pull-20{margin-left:-800px}body.bp .pull-21{margin-left:-840px}body.bp .pull-22{margin-left:-880px}body.bp .pull-23{margin-left:-920px}body.bp .pull-24{margin-left:-960px}body.bp .push-1,body.bp .push-2,body.bp .push-3,body.bp .push-4,body.bp .push-5,body.bp .push-6,body.bp .push-7,body.bp .push-8,body.bp .push-9,body.bp .push-10,body.bp .push-11,body.bp .push-12,body.bp .push-13,body.bp .push-14,body.bp .push-15,body.bp .push-16,body.bp .push-17,body.bp .push-18,body.bp .push-19,body.bp .push-20,body.bp .push-21,body.bp .push-22,body.bp .push-23,body.bp .push-24{display:inline;float:left;position:relative}body.bp .push-1{margin:0 -40px 1.5em 40px}body.bp .push-2{margin:0 -80px 1.5em 80px}body.bp .push-3{margin:0 -120px 1.5em 120px}body.bp .push-4{margin:0 -160px 1.5em 160px}body.bp .push-5{margin:0 -200px 1.5em 200px}body.bp .push-6{margin:0 -240px 1.5em 240px}body.bp .push-7{margin:0 -280px 1.5em 280px}body.bp .push-8{margin:0 -320px 1.5em 320px}body.bp .push-9{margin:0 -360px 1.5em 360px}body.bp .push-10{margin:0 -400px 1.5em 400px}body.bp .push-11{margin:0 -440px 1.5em 440px}body.bp .push-12{margin:0 -480px 1.5em 480px}body.bp .push-13{margin:0 -520px 1.5em 520px}body.bp .push-14{margin:0 -560px 1.5em 560px}body.bp .push-15{margin:0 -600px 1.5em 600px}body.bp .push-16{margin:0 -640px 1.5em 640px}body.bp .push-17{margin:0 -680px 1.5em 680px}body.bp .push-18{margin:0 -720px 1.5em 720px}body.bp .push-19{margin:0 -760px 1.5em 760px}body.bp .push-20{margin:0 -800px 1.5em 800px}body.bp .push-21{margin:0 -840px 1.5em 840px}body.bp .push-22{margin:0 -880px 1.5em 880px}body.bp .push-23{margin:0 -920px 1.5em 920px}body.bp .push-24{margin:0 -960px 1.5em 960px}body.bp .prepend-top{margin-top:1.5em}body.bp .append-bottom{margin-bottom:1.5em}body{font-family:Arial;font-size:14px}a{color:#006699;text-decoration:none}a:hover{text-decoration:underline}.bp-typography{line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#333333;font-size:75%}.bp-typography h1,.bp-typography h2,.bp-typography h3,.bp-typography h4,.bp-typography h5,.bp-typography h6{font-weight:normal;color:#222222}.bp-typography h1 img,.bp-typography h2 img,.bp-typography h3 img,.bp-typography h4 img,.bp-typography h5 img,.bp-typography h6 img{margin:0}.bp-typography h1{font-size:3em;line-height:1;margin-bottom:0.50em}.bp-typography h2{font-size:2em;margin-bottom:0.75em}.bp-typography h3{font-size:1.5em;line-height:1;margin-bottom:1.00em}.bp-typography h4{font-size:1.2em;line-height:1.25;margin-bottom:1.25em}.bp-typography h5{font-size:1em;font-weight:bold;margin-bottom:1.50em}.bp-typography h6{font-size:1em;font-weight:bold}.bp-typography p{margin:0 0 1.5em}.bp-typography p .left{display:inline;float:left;margin:1.5em 1.5em 1.5em 0;padding:0}.bp-typography p .right{display:inline;float:right;margin:1.5em 0 1.5em 1.5em;padding:0}.bp-typography a{text-decoration:underline;color:#0066cc}.bp-typography a:visited{color:#004c99}.bp-typography a:focus{color:#0099ff}.bp-typography a:hover{color:#0099ff}.bp-typography a:active{color:#bf00ff}.bp-typography blockquote{margin:1.5em;color:#666666;font-style:italic}.bp-typography strong,.bp-typography dfn{font-weight:bold}.bp-typography em,.bp-typography dfn{font-style:italic}.bp-typography sup,.bp-typography sub{line-height:0}.bp-typography abbr,.bp-typography acronym{border-bottom:1px dotted #666666}.bp-typography address{margin:0 0 1.5em;font-style:italic}.bp-typography del{color:#666666}.bp-typography pre{margin:1.5em 0;white-space:pre}.bp-typography pre,.bp-typography code,.bp-typography tt{font:1em "andale mono", "lucida console", monospace;line-height:1.5}.bp-typography li ul,.bp-typography li ol{margin:0}.bp-typography ul,.bp-typography ol{margin:0 1.5em 1.5em 0;padding-left:1.5em}.bp-typography ul{list-style-type:disc}.bp-typography ol{list-style-type:decimal}.bp-typography dl{margin:0 0 1.5em 0}.bp-typography dl dt{font-weight:bold}.bp-typography dd{margin-left:1.5em}.bp-typography table{margin-bottom:1.4em;width:100%}.bp-typography th{font-weight:bold}.bp-typography thead th{background:#c3d9ff}.bp-typography th,.bp-typography td,.bp-typography caption{padding:4px 10px 4px 5px}.bp-typography table.striped tr:nth-child(even) td,.bp-typography table tr.even td{background:#e5ecf9}.bp-typography tfoot{font-style:italic}.bp-typography caption{background:#eeeeee}.bp-typography .quiet{color:#666666}.bp-typography .loud{color:#111111}form.bp label{font-weight:bold}form.bp fieldset{padding:1.4em;margin:0 0 1.5em 0}form.bp legend{font-weight:bold;font-size:1.2em}form.bp input.text,form.bp input.title,form.bp input[type=email],form.bp input[type=text],form.bp input[type=password]{margin:0.5em 0;background-color:white;padding:5px}form.bp input.title{font-size:1.5em}form.bp textarea{margin:0.5em 0;padding:5px}form.bp select{margin:0.5em 0}form.bp fieldset{border:1px solid #cccccc}form.bp input.text,form.bp input.title,form.bp input[type=email],form.bp input[type=text],form.bp input[type=password],form.bp textarea{background-color:#fff;border:1px solid #bbbbbb}form.bp input.text:focus,form.bp input.title:focus,form.bp input[type=email]:focus,form.bp input[type=text]:focus,form.bp input[type=password]:focus,form.bp textarea:focus{border:1px solid #666666}form.bp select{background-color:#fff;border-width:1px;border-style:solid}form.bp input.text,form.bp input.title,form.bp input[type=email],form.bp input[type=text],form.bp input[type=password]{width:300px}form.bp textarea{width:390px;height:250px}
2 |
--------------------------------------------------------------------------------
/dependencies/jquery-1.6.1.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery JavaScript Library v1.6.1
3 | * http://jquery.com/
4 | *
5 | * Copyright 2011, John Resig
6 | * Dual licensed under the MIT or GPL Version 2 licenses.
7 | * http://jquery.org/license
8 | *
9 | * Includes Sizzle.js
10 | * http://sizzlejs.com/
11 | * Copyright 2011, The Dojo Foundation
12 | * Released under the MIT, BSD, and GPL Licenses.
13 | *
14 | * Date: Thu May 12 15:04:36 2011 -0400
15 | */
16 | (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),c.body.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write("");b=cl.createElement(a),cl.body.appendChild(b),d=f.css(b,"display"),c.body.removeChild(ck)}cj[a]=d}return cj[a]}function cu(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function ct(){cq=b}function cs(){setTimeout(ct,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g=0===c})}function W(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function O(a,b){return(a&&a!=="*"?a+".":"")+b.replace(A,"`").replace(B,"&")}function N(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function L(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function F(){return!0}function E(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function H(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(H,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=d.userAgent,x,y,z,A=Object.prototype.toString,B=Object.prototype.hasOwnProperty,C=Array.prototype.push,D=Array.prototype.slice,E=String.prototype.trim,F=Array.prototype.indexOf,G={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.1",length:0,size:function(){return this.length},toArray:function(){return D.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?C.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(D.apply(this,arguments),"slice",D.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:C,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!y){y=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",z,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",z),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&H()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):G[A.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!B.call(a,"constructor")&&!B.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||B.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;ca",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};f=c.createElement("select"),g=f.appendChild(c.createElement("option")),h=a.getElementsByTagName("input")[0],j={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},h.checked=!0,j.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,j.optDisabled=!g.disabled;try{delete a.test}catch(s){j.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function b(){j.noCloneEvent=!1,a.detachEvent("onclick",b)}),a.cloneNode(!0).fireEvent("onclick")),h=c.createElement("input"),h.value="t",h.setAttribute("type","radio"),j.radioValue=h.value==="t",h.setAttribute("checked","checked"),a.appendChild(h),k=c.createDocumentFragment(),k.appendChild(a.firstChild),j.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",l=c.createElement("body"),m={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(q in m)l.style[q]=m[q];l.appendChild(a),b.insertBefore(l,b.firstChild),j.appendChecked=h.checked,j.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,j.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="",j.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="",n=a.getElementsByTagName("td"),r=n[0].offsetHeight===0,n[0].style.display="",n[1].style.display="none",j.reliableHiddenOffsets=r&&n[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(i=c.createElement("div"),i.style.width="0",i.style.marginRight="0",a.appendChild(i),j.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(i,null)||{marginRight:0}).marginRight,10)||0)===0),l.innerHTML="",b.removeChild(l);if(a.attachEvent)for(q in{submit:1,change:1,focusin:1})p="on"+q,r=p in a,r||(a.setAttribute(p,"return;"),r=typeof a[p]=="function"),j[q+"Bubbles"]=r;return j}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;return(e.value||"").replace(p,"")}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);c=j&&f.attrFix[c]||c,i=f.attrHooks[c],i||(!t.test(c)||typeof d!="boolean"&&d!==b&&d.toLowerCase()!==c.toLowerCase()?v&&(f.nodeName(a,"form")||u.test(c))&&(i=v):i=w);if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j)return i.get(a,c);h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return a[f.propFix[c]||c]?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=b),a.setAttribute(c,c.toLowerCase()));return c}},f.attrHooks.value={get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return a.value},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=Object.prototype.hasOwnProperty,y=/\.(.*)$/,z=/^(?:textarea|input|select)$/i,A=/\./g,B=/ /g,C=/[^\w\s.|`]/g,D=function(a){return a.replace(C,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=E;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=E);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),D).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem
17 | )});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},K=function(c){var d=c.target,e,g;if(!!z.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=J(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:K,beforedeactivate:K,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&K.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&K.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",J(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in I)f.event.add(this,c+".specialChange",I[c]);return z.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return z.test(this.nodeName)}},I=f.event.special.change.filters,I.focus=I.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=U.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(W(c[0])||W(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=T.call(arguments);P.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!V[a]?f.unique(e):e,(this.length>1||R.test(d))&&Q.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y=/ jQuery\d+="(?:\d+|null)"/g,Z=/^\s+/,$=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,_=/<([\w:]+)/,ba=/",""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]};bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Y,""):null;if(typeof a=="string"&&!bc.test(a)&&(f.support.leadingWhitespace||!Z.test(a))&&!bg[(_.exec(a)||["",""])[1].toLowerCase()]){a=a.replace($,"<$1>$2>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bj(a,d),e=bk(a),g=bk(d);for(h=0;e[h];++h)bj(e[h],g[h])}if(b){bi(a,d);if(c){e=bk(a),g=bk(d);for(h=0;e[h];++h)bi(e[h],g[h])}}return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||
18 | b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bb.test(k))k=b.createTextNode(k);else{k=k.replace($,"<$1>$2>");var l=(_.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=ba.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Z.test(k)&&o.insertBefore(b.createTextNode(Z.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bp.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bo.test(g)?g.replace(bo,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,c){var d,e,g;c=c.replace(br,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bs.test(d)&&bt.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bE=/%20/g,bF=/\[\]$/,bG=/\r?\n/g,bH=/#.*$/,bI=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bJ=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bK=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bL=/^(?:GET|HEAD)$/,bM=/^\/\//,bN=/\?/,bO=/