');
72 | });
73 |
74 | it('should accept dragging when active', function(){
75 | compile('
');
76 | element.addClass('jqui-dnd-target-active');
77 | element.droppable("option", "drop")(event, ui);
78 | expect(controller.commit).toHaveBeenCalledWith("TOKEN");
79 | expect(controller.end).toHaveBeenCalledWith("TOKEN");
80 | expect(scope.evalCount).toEqual(1);
81 | });
82 |
83 | it('should not accept dragging when not active', function(){
84 | element.droppable("option", "drop")(event, ui);
85 | expect(controller.commit).not.toHaveBeenCalled();
86 | });
87 |
88 | it('should not activate', function(){
89 | controller.accept.andReturn(false);
90 | element.droppable("option", "activate")(event, ui);
91 | expect(controller.accept).toHaveBeenCalledWith("TOKEN");
92 | expect(element).toHaveClass('jqui-dnd-target-disable');
93 | expect(element).not.toHaveClass('jqui-dnd-target-active');
94 | expect(scope.evalCount).toEqual(1);
95 | });
96 |
97 | it('should activate', function(){
98 | controller.accept.andReturn(true);
99 | element.droppable("option", "activate")(event, ui);
100 | expect(controller.accept).toHaveBeenCalledWith("TOKEN");
101 | expect(element).not.toHaveClass('jqui-dnd-target-disable');
102 | expect(element).toHaveClass('jqui-dnd-target-active');
103 | expect(scope.evalCount).toEqual(1);
104 | });
105 |
106 | it('should change over/out CSS when active', function(){
107 | controller.accept.andReturn(true);
108 | element.droppable("option", "activate")(event, ui);
109 |
110 | element.droppable("option", "over")(event, ui);
111 | expect(element).toHaveClass('jqui-dnd-target-over');
112 | expect(ui.draggable).toHaveClass('jqui-dnd-item-over');
113 |
114 | element.droppable("option", "out")(event, ui);
115 | expect(element).not.toHaveClass('jqui-dnd-target-over');
116 | expect(ui.draggable).not.toHaveClass('jqui-dnd-item-over');
117 | });
118 |
119 | it('should not change over/out CSS when not active', function(){
120 | controller.accept.andReturn(false);
121 | element.droppable("option", "activate")(event, ui);
122 |
123 | element.droppable("option", "over")(event, ui);
124 | expect(element).not.toHaveClass('jqui-dnd-target-over');
125 | expect(ui.draggable).not.toHaveClass('jqui-dnd-item-over');
126 | });
127 |
128 | it('should commit item', function(){
129 | element.addClass('jqui-dnd-target-active');
130 | element.addClass('jqui-dnd-target-disable');
131 | element.addClass('jqui-dnd-target-over');
132 |
133 | element.droppable("option", "drop")(event, ui);
134 |
135 | expect(controller.commit).toHaveBeenCalledWith("TOKEN");
136 | expect(controller.end).toHaveBeenCalledWith("TOKEN");
137 | expect(element).not.toHaveClass('jqui-dnd-target-active');
138 | expect(element).not.toHaveClass('jqui-dnd-target-disable');
139 | expect(element).not.toHaveClass('jqui-dnd-target-over');
140 | expect(scope.evalCount).toEqual(1);
141 | });
142 | });
143 | });
144 |
--------------------------------------------------------------------------------
/test/lib/jasmine-jstd-adapter/JasmineAdapter.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview Jasmine JsTestDriver Adapter.
3 | * @author misko@hevery.com (Misko Hevery)
4 | */
5 | (function(window) {
6 | var rootDescribes = new Describes(window);
7 | var describePath = [];
8 | rootDescribes.collectMode();
9 |
10 | var jasmineTest = TestCase('Jasmine Adapter Tests', null, 'jasmine test case');
11 |
12 | var jasminePlugin = {
13 | name:'jasmine',
14 | runTestConfiguration: function(testRunConfiguration, onTestDone, onTestRunConfigurationComplete){
15 | if (testRunConfiguration.testCaseInfo_.template_ !== jasmineTest) return;
16 |
17 | var jasmineEnv = jasmine.currentEnv_ = new jasmine.Env();
18 | rootDescribes.playback();
19 | var specLog = jstestdriver.console.log_ = [];
20 | var start;
21 | jasmineEnv.specFilter = function(spec) {
22 | return rootDescribes.isExclusive(spec);
23 | };
24 | jasmineEnv.reporter = {
25 | log: function(str){
26 | specLog.push(str);
27 | },
28 |
29 | reportRunnerStarting: function(runner) { },
30 |
31 | reportSpecStarting: function(spec) {
32 | specLog = jstestdriver.console.log_ = [];
33 | start = new Date().getTime();
34 | },
35 |
36 | reportSpecResults: function(spec) {
37 | var suite = spec.suite;
38 | var results = spec.results();
39 | if (results.skipped) return;
40 | var end = new Date().getTime();
41 | var messages = [];
42 | var resultItems = results.getItems();
43 | var state = 'passed';
44 | for ( var i = 0; i < resultItems.length; i++) {
45 | if (!resultItems[i].passed()) {
46 | state = resultItems[i].message.match(/AssertionError:/) ? 'error' : 'failed';
47 | messages.push({
48 | message: resultItems[i].toString(),
49 | name: resultItems[i].trace.name,
50 | stack: formatStack(resultItems[i].trace.stack)
51 | });
52 | }
53 | }
54 | onTestDone(
55 | new jstestdriver.TestResult(
56 | suite.getFullName(),
57 | spec.description,
58 | state,
59 | jstestdriver.angular.toJson(messages),
60 | specLog.join('\n'),
61 | end - start));
62 | },
63 |
64 | reportSuiteResults: function(suite) {},
65 |
66 | reportRunnerResults: function(runner) {
67 | onTestRunConfigurationComplete();
68 | }
69 | };
70 | jasmineEnv.execute();
71 | return true;
72 | },
73 | onTestsFinish: function(){
74 | jasmine.currentEnv_ = null;
75 | rootDescribes.collectMode();
76 | }
77 | };
78 | jstestdriver.pluginRegistrar.register(jasminePlugin);
79 |
80 | function formatStack(stack) {
81 | var lines = (stack||'').split(/\r?\n/);
82 | var frames = [];
83 | for (i = 0; i < lines.length; i++) {
84 | if (!lines[i].match(/\/jasmine[\.-]/)) {
85 | frames.push(lines[i].replace(/https?:\/\/\w+(:\d+)?\/test\//, '').replace(/^\s*/, ' '));
86 | }
87 | }
88 | return frames.join('\n');
89 | }
90 |
91 | function noop(){}
92 | function Describes(window){
93 | var describes = {};
94 | var beforeEachs = {};
95 | var afterEachs = {};
96 | var exclusive;
97 | var collectMode = true;
98 | intercept('describe', describes);
99 | intercept('xdescribe', describes);
100 | intercept('beforeEach', beforeEachs);
101 | intercept('afterEach', afterEachs);
102 |
103 | function intercept(functionName, collection){
104 | window[functionName] = function(desc, fn){
105 | if (collectMode) {
106 | collection[desc] = function(){
107 | jasmine.getEnv()[functionName](desc, fn);
108 | };
109 | } else {
110 | jasmine.getEnv()[functionName](desc, fn);
111 | }
112 | };
113 | }
114 | window.ddescribe = function(name, fn){
115 | exclusive = true;
116 | console.log('ddescribe', name);
117 | window.describe(name, function(){
118 | var oldIt = window.it;
119 | window.it = window.iit;
120 | try {
121 | fn.call(this);
122 | } finally {
123 | window.it = oldIt;
124 | };
125 | });
126 | };
127 | window.iit = function(name, fn){
128 | exclusive = fn.exclusive = true;
129 | console.log(fn);
130 | jasmine.getEnv().it(name, fn);
131 | };
132 |
133 |
134 | this.collectMode = function() {
135 | collectMode = true;
136 | exclusive = false;
137 | };
138 | this.playback = function(){
139 | collectMode = false;
140 | playback(beforeEachs);
141 | playback(afterEachs);
142 | playback(describes);
143 |
144 | function playback(set) {
145 | for ( var name in set) {
146 | set[name]();
147 | }
148 | }
149 | };
150 |
151 | this.isExclusive = function(spec) {
152 | if (exclusive) {
153 | var blocks = spec.queue.blocks;
154 | for ( var i = 0; i < blocks.length; i++) {
155 | if (blocks[i].func.exclusive) {
156 | return true;
157 | }
158 | }
159 | return false;
160 | }
161 | return true;
162 | };
163 | }
164 |
165 | })(window);
166 |
167 | // Patch Jasmine for proper stack traces
168 | jasmine.Spec.prototype.fail = function (e) {
169 | var expectationResult = new jasmine.ExpectationResult({
170 | passed: false,
171 | message: e ? jasmine.util.formatException(e) : 'Exception'
172 | });
173 | // PATCH
174 | if (e) {
175 | expectationResult.trace = e;
176 | }
177 | this.results_.addResult(expectationResult);
178 | };
179 |
180 |
--------------------------------------------------------------------------------
/scripts/web-server.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | var sys = require('sys'),
4 | http = require('http'),
5 | fs = require('fs'),
6 | url = require('url'),
7 | events = require('events');
8 |
9 | var DEFAULT_PORT = 8000;
10 |
11 | function main(argv) {
12 | new HttpServer({
13 | 'GET': createServlet(StaticServlet),
14 | 'HEAD': createServlet(StaticServlet)
15 | }).start(Number(argv[2]) || DEFAULT_PORT);
16 | }
17 |
18 | function escapeHtml(value) {
19 | return value.toString().
20 | replace('<', '<').
21 | replace('>', '>').
22 | replace('"', '"');
23 | }
24 |
25 | function createServlet(Class) {
26 | var servlet = new Class();
27 | return servlet.handleRequest.bind(servlet);
28 | }
29 |
30 | /**
31 | * An Http server implementation that uses a map of methods to decide
32 | * action routing.
33 | *
34 | * @param {Object} Map of method => Handler function
35 | */
36 | function HttpServer(handlers) {
37 | this.handlers = handlers;
38 | this.server = http.createServer(this.handleRequest_.bind(this));
39 | }
40 |
41 | HttpServer.prototype.start = function(port) {
42 | this.port = port;
43 | this.server.listen(port);
44 | sys.puts('Http Server running at http://localhost:' + port + '/');
45 | };
46 |
47 | HttpServer.prototype.parseUrl_ = function(urlString) {
48 | var parsed = url.parse(urlString);
49 | parsed.pathname = url.resolve('/', parsed.pathname);
50 | return url.parse(url.format(parsed), true);
51 | };
52 |
53 | HttpServer.prototype.handleRequest_ = function(req, res) {
54 | var logEntry = req.method + ' ' + req.url;
55 | if (req.headers['user-agent']) {
56 | logEntry += ' ' + req.headers['user-agent'];
57 | }
58 | sys.puts(logEntry);
59 | req.url = this.parseUrl_(req.url);
60 | var handler = this.handlers[req.method];
61 | if (!handler) {
62 | res.writeHead(501);
63 | res.end();
64 | } else {
65 | handler.call(this, req, res);
66 | }
67 | };
68 |
69 | /**
70 | * Handles static content.
71 | */
72 | function StaticServlet() {}
73 |
74 | StaticServlet.MimeMap = {
75 | 'txt': 'text/plain',
76 | 'html': 'text/html',
77 | 'css': 'text/css',
78 | 'xml': 'application/xml',
79 | 'json': 'application/json',
80 | 'js': 'application/javascript',
81 | 'jpg': 'image/jpeg',
82 | 'jpeg': 'image/jpeg',
83 | 'gif': 'image/gif',
84 | 'png': 'image/png'
85 | };
86 |
87 | StaticServlet.prototype.handleRequest = function(req, res) {
88 | var self = this;
89 | var path = ('./' + req.url.pathname).replace('//','/').replace(/%(..)/, function(match, hex){
90 | return String.fromCharCode(parseInt(hex, 16));
91 | });
92 | var parts = path.split('/');
93 | if (parts[parts.length-1].charAt(0) === '.')
94 | return self.sendForbidden_(req, res, path);
95 | fs.stat(path, function(err, stat) {
96 | if (err)
97 | return self.sendMissing_(req, res, path);
98 | if (stat.isDirectory())
99 | return self.sendDirectory_(req, res, path);
100 | return self.sendFile_(req, res, path);
101 | });
102 | }
103 |
104 | StaticServlet.prototype.sendError_ = function(req, res, error) {
105 | res.writeHead(500, {
106 | 'Content-Type': 'text/html'
107 | });
108 | res.write('\n');
109 | res.write('
Internal Server Error\n');
110 | res.write('
Internal Server Error
');
111 | res.write('
' + escapeHtml(sys.inspect(error)) + '
');
112 | sys.puts('500 Internal Server Error');
113 | sys.puts(sys.inspect(error));
114 | };
115 |
116 | StaticServlet.prototype.sendMissing_ = function(req, res, path) {
117 | path = path.substring(1);
118 | res.writeHead(404, {
119 | 'Content-Type': 'text/html'
120 | });
121 | res.write('\n');
122 | res.write('
404 Not Found\n');
123 | res.write('
Not Found
');
124 | res.write(
125 | '
The requested URL ' +
126 | escapeHtml(path) +
127 | ' was not found on this server.
'
128 | );
129 | res.end();
130 | sys.puts('404 Not Found: ' + path);
131 | };
132 |
133 | StaticServlet.prototype.sendForbidden_ = function(req, res, path) {
134 | path = path.substring(1);
135 | res.writeHead(403, {
136 | 'Content-Type': 'text/html'
137 | });
138 | res.write('\n');
139 | res.write('
403 Forbidden\n');
140 | res.write('
Forbidden
');
141 | res.write(
142 | '
You do not have permission to access ' +
143 | escapeHtml(path) + ' on this server.
'
144 | );
145 | res.end();
146 | sys.puts('403 Forbidden: ' + path);
147 | };
148 |
149 | StaticServlet.prototype.sendRedirect_ = function(req, res, redirectUrl) {
150 | res.writeHead(301, {
151 | 'Content-Type': 'text/html',
152 | 'Location': redirectUrl
153 | });
154 | res.write('\n');
155 | res.write('
301 Moved Permanently\n');
156 | res.write('
Moved Permanently
');
157 | res.write(
158 | '
The document has moved here.
'
161 | );
162 | res.end();
163 | sys.puts('401 Moved Permanently: ' + redirectUrl);
164 | };
165 |
166 | StaticServlet.prototype.sendFile_ = function(req, res, path) {
167 | var self = this;
168 | var file = fs.createReadStream(path);
169 | res.writeHead(200, {
170 | 'Content-Type': StaticServlet.
171 | MimeMap[path.split('.').pop()] || 'text/plain'
172 | });
173 | if (req.method === 'HEAD') {
174 | res.end();
175 | } else {
176 | file.on('data', res.write.bind(res));
177 | file.on('close', function() {
178 | res.end();
179 | });
180 | file.on('error', function(error) {
181 | self.sendError_(req, res, error);
182 | });
183 | }
184 | };
185 |
186 | StaticServlet.prototype.sendDirectory_ = function(req, res, path) {
187 | var self = this;
188 | if (path.match(/[^\/]$/)) {
189 | req.url.pathname += '/';
190 | var redirectUrl = url.format(url.parse(url.format(req.url)));
191 | return self.sendRedirect_(req, res, redirectUrl);
192 | }
193 | fs.readdir(path, function(err, files) {
194 | if (err)
195 | return self.sendError_(req, res, error);
196 |
197 | if (!files.length)
198 | return self.writeDirectoryIndex_(req, res, path, []);
199 |
200 | var remaining = files.length;
201 | files.forEach(function(fileName, index) {
202 | fs.stat(path + '/' + fileName, function(err, stat) {
203 | if (err)
204 | return self.sendError_(req, res, err);
205 | if (stat.isDirectory()) {
206 | files[index] = fileName + '/';
207 | }
208 | if (!(--remaining))
209 | return self.writeDirectoryIndex_(req, res, path, files);
210 | });
211 | });
212 | });
213 | };
214 |
215 | StaticServlet.prototype.writeDirectoryIndex_ = function(req, res, path, files) {
216 | path = path.substring(1);
217 | res.writeHead(200, {
218 | 'Content-Type': 'text/html'
219 | });
220 | if (req.method === 'HEAD') {
221 | res.end();
222 | return;
223 | }
224 | res.write('\n');
225 | res.write('
' + escapeHtml(path) + '\n');
226 | res.write('\n');
229 | res.write('
Directory: ' + escapeHtml(path) + '
');
230 | res.write('
');
231 | files.forEach(function(fileName) {
232 | if (fileName.charAt(0) !== '.') {
233 | res.write('- ' +
235 | escapeHtml(fileName) + '
');
236 | }
237 | });
238 | res.write('
');
239 | res.end();
240 | };
241 |
242 | // Must be last,
243 | main(process.argv);
244 |
--------------------------------------------------------------------------------
/test/lib/jasmine/jasmine-html.js:
--------------------------------------------------------------------------------
1 | jasmine.TrivialReporter = function(doc) {
2 | this.document = doc || document;
3 | this.suiteDivs = {};
4 | this.logRunningSpecs = false;
5 | };
6 |
7 | jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
8 | var el = document.createElement(type);
9 |
10 | for (var i = 2; i < arguments.length; i++) {
11 | var child = arguments[i];
12 |
13 | if (typeof child === 'string') {
14 | el.appendChild(document.createTextNode(child));
15 | } else {
16 | if (child) { el.appendChild(child); }
17 | }
18 | }
19 |
20 | for (var attr in attrs) {
21 | if (attr == "className") {
22 | el[attr] = attrs[attr];
23 | } else {
24 | el.setAttribute(attr, attrs[attr]);
25 | }
26 | }
27 |
28 | return el;
29 | };
30 |
31 | jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
32 | var showPassed, showSkipped;
33 |
34 | this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' },
35 | this.createDom('div', { className: 'banner' },
36 | this.createDom('div', { className: 'logo' },
37 | this.createDom('a', { href: 'http://pivotal.github.com/jasmine/', target: "_blank" }, "Jasmine"),
38 | this.createDom('span', { className: 'version' }, runner.env.versionString())),
39 | this.createDom('div', { className: 'options' },
40 | "Show ",
41 | showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
42 | this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
43 | showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
44 | this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
45 | )
46 | ),
47 |
48 | this.runnerDiv = this.createDom('div', { className: 'runner running' },
49 | this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
50 | this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
51 | this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
52 | );
53 |
54 | this.document.body.appendChild(this.outerDiv);
55 |
56 | var suites = runner.suites();
57 | for (var i = 0; i < suites.length; i++) {
58 | var suite = suites[i];
59 | var suiteDiv = this.createDom('div', { className: 'suite' },
60 | this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
61 | this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
62 | this.suiteDivs[suite.id] = suiteDiv;
63 | var parentDiv = this.outerDiv;
64 | if (suite.parentSuite) {
65 | parentDiv = this.suiteDivs[suite.parentSuite.id];
66 | }
67 | parentDiv.appendChild(suiteDiv);
68 | }
69 |
70 | this.startedAt = new Date();
71 |
72 | var self = this;
73 | showPassed.onclick = function(evt) {
74 | if (showPassed.checked) {
75 | self.outerDiv.className += ' show-passed';
76 | } else {
77 | self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
78 | }
79 | };
80 |
81 | showSkipped.onclick = function(evt) {
82 | if (showSkipped.checked) {
83 | self.outerDiv.className += ' show-skipped';
84 | } else {
85 | self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
86 | }
87 | };
88 | };
89 |
90 | jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
91 | var results = runner.results();
92 | var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
93 | this.runnerDiv.setAttribute("class", className);
94 | //do it twice for IE
95 | this.runnerDiv.setAttribute("className", className);
96 | var specs = runner.specs();
97 | var specCount = 0;
98 | for (var i = 0; i < specs.length; i++) {
99 | if (this.specFilter(specs[i])) {
100 | specCount++;
101 | }
102 | }
103 | var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
104 | message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
105 | this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
106 |
107 | this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
108 | };
109 |
110 | jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
111 | var results = suite.results();
112 | var status = results.passed() ? 'passed' : 'failed';
113 | if (results.totalCount == 0) { // todo: change this to check results.skipped
114 | status = 'skipped';
115 | }
116 | this.suiteDivs[suite.id].className += " " + status;
117 | };
118 |
119 | jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
120 | if (this.logRunningSpecs) {
121 | this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
122 | }
123 | };
124 |
125 | jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
126 | var results = spec.results();
127 | var status = results.passed() ? 'passed' : 'failed';
128 | if (results.skipped) {
129 | status = 'skipped';
130 | }
131 | var specDiv = this.createDom('div', { className: 'spec ' + status },
132 | this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
133 | this.createDom('a', {
134 | className: 'description',
135 | href: '?spec=' + encodeURIComponent(spec.getFullName()),
136 | title: spec.getFullName()
137 | }, spec.description));
138 |
139 |
140 | var resultItems = results.getItems();
141 | var messagesDiv = this.createDom('div', { className: 'messages' });
142 | for (var i = 0; i < resultItems.length; i++) {
143 | var result = resultItems[i];
144 |
145 | if (result.type == 'log') {
146 | messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
147 | } else if (result.type == 'expect' && result.passed && !result.passed()) {
148 | messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
149 |
150 | if (result.trace.stack) {
151 | messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
152 | }
153 | }
154 | }
155 |
156 | if (messagesDiv.childNodes.length > 0) {
157 | specDiv.appendChild(messagesDiv);
158 | }
159 |
160 | this.suiteDivs[spec.suite.id].appendChild(specDiv);
161 | };
162 |
163 | jasmine.TrivialReporter.prototype.log = function() {
164 | var console = jasmine.getGlobal().console;
165 | if (console && console.log) {
166 | if (console.log.apply) {
167 | console.log.apply(console, arguments);
168 | } else {
169 | console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
170 | }
171 | }
172 | };
173 |
174 | jasmine.TrivialReporter.prototype.getLocation = function() {
175 | return this.document.location;
176 | };
177 |
178 | jasmine.TrivialReporter.prototype.specFilter = function(spec) {
179 | var paramMap = {};
180 | var params = this.getLocation().search.substring(1).split('&');
181 | for (var i = 0; i < params.length; i++) {
182 | var p = params[i].split('=');
183 | paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
184 | }
185 |
186 | if (!paramMap["spec"]) return true;
187 | return spec.getFullName().indexOf(paramMap["spec"]) == 0;
188 | };
189 |
--------------------------------------------------------------------------------
/test/lib/angular/angular-mocks.js:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright (c) 2010 Adam Abrons and Misko Hevery http://getangular.com
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | */
24 |
25 |
26 | /*
27 |
28 | NUGGGGGH MUST TONGUE WANGS
29 | \
30 | .....
31 | C C /
32 | /< /
33 | ___ __________/_#__=o
34 | /(- /(\_\________ \
35 | \ ) \ )_ \o \
36 | /|\ /|\ |' |
37 | | _|
38 | /o __\
39 | / ' |
40 | / / |
41 | /_/\______|
42 | ( _( <
43 | \ \ \
44 | \ \ |
45 | \____\____\
46 | ____\_\__\_\
47 | /` /` o\
48 | |___ |_______|.. . b'ger
49 |
50 |
51 | IN THE FINAL BUILD THIS FILE DOESN'T HAVE DIRECT ACCESS TO GLOBAL FUNCTIONS
52 | DEFINED IN Angular.js YOU *MUST* REFER TO THEM VIA angular OBJECT
53 | (e.g. angular.forEach(...)) AND MAKE SURE THAT THE GIVEN FUNCTION IS EXPORTED
54 | TO THE angular NAMESPACE in AngularPublic.js
55 |
56 | */
57 |
58 |
59 | /**
60 | * @ngdoc overview
61 | * @name angular.mock
62 | * @namespace Namespace for all built-in angular mocks.
63 | *
64 | * @description
65 | * `angular.mock` is a namespace for all built-in mocks that ship with angular and automatically
66 | * replace real services if `angular-mocks.js` file is loaded after `angular.js` and before any
67 | * tests.
68 | */
69 | angular.mock = {};
70 |
71 |
72 | /**
73 | * @workInProgress
74 | * @ngdoc service
75 | * @name angular.mock.service.$browser
76 | */
77 | function MockBrowser() {
78 | var self = this,
79 | expectations = {},
80 | requests = [];
81 |
82 | this.isMock = true;
83 | self.url = "http://server";
84 | self.lastUrl = self.url; // used by url polling fn
85 | self.pollFns = [];
86 |
87 |
88 | // register url polling fn
89 |
90 | self.onHashChange = function(listener) {
91 | self.pollFns.push(
92 | function() {
93 | if (self.lastUrl != self.url) {
94 | self.lastUrl = self.url;
95 | listener();
96 | }
97 | }
98 | );
99 |
100 | return listener;
101 | };
102 |
103 |
104 | self.xhr = function(method, url, data, callback) {
105 | if (angular.isFunction(data)) {
106 | callback = data;
107 | data = null;
108 | }
109 | if (data && angular.isObject(data)) data = angular.toJson(data);
110 | if (data && angular.isString(data)) url += "|" + data;
111 | var expect = expectations[method] || {};
112 | var response = expect[url];
113 | if (!response) {
114 | throw {
115 | message: "Unexpected request for method '" + method + "' and url '" + url + "'.",
116 | name: "Unexpected Request"
117 | };
118 | }
119 | requests.push(function(){
120 | callback(response.code, response.response);
121 | });
122 | };
123 | self.xhr.expectations = expectations;
124 | self.xhr.requests = requests;
125 | self.xhr.expect = function(method, url, data) {
126 | if (data && angular.isObject(data)) data = angular.toJson(data);
127 | if (data && angular.isString(data)) url += "|" + data;
128 | var expect = expectations[method] || (expectations[method] = {});
129 | return {
130 | respond: function(code, response) {
131 | if (!angular.isNumber(code)) {
132 | response = code;
133 | code = 200;
134 | }
135 | expect[url] = {code:code, response:response};
136 | }
137 | };
138 | };
139 | self.xhr.expectGET = angular.bind(self, self.xhr.expect, 'GET');
140 | self.xhr.expectPOST = angular.bind(self, self.xhr.expect, 'POST');
141 | self.xhr.expectDELETE = angular.bind(self, self.xhr.expect, 'DELETE');
142 | self.xhr.expectPUT = angular.bind(self, self.xhr.expect, 'PUT');
143 | self.xhr.expectJSON = angular.bind(self, self.xhr.expect, 'JSON');
144 | self.xhr.flush = function() {
145 | if (requests.length == 0) {
146 | throw new Error("No xhr requests to be flushed!");
147 | }
148 |
149 | while(requests.length) {
150 | requests.pop()();
151 | }
152 | };
153 |
154 | self.cookieHash = {};
155 | self.lastCookieHash = {};
156 | self.deferredFns = [];
157 |
158 | self.defer = function(fn) {
159 | self.deferredFns.push(fn);
160 | };
161 |
162 | self.defer.flush = function() {
163 | while (self.deferredFns.length) self.deferredFns.shift()();
164 | };
165 | }
166 | MockBrowser.prototype = {
167 |
168 | poll: function poll(){
169 | angular.forEach(this.pollFns, function(pollFn){
170 | pollFn();
171 | });
172 | },
173 |
174 | addPollFn: function(pollFn) {
175 | this.pollFns.push(pollFn);
176 | return pollFn;
177 | },
178 |
179 | hover: function(onHover) {
180 | },
181 |
182 | getUrl: function(){
183 | return this.url;
184 | },
185 |
186 | setUrl: function(url){
187 | this.url = url;
188 | },
189 |
190 | cookies: function(name, value) {
191 | if (name) {
192 | if (value == undefined) {
193 | delete this.cookieHash[name];
194 | } else {
195 | if (angular.isString(value) && //strings only
196 | value.length <= 4096) { //strict cookie storage limits
197 | this.cookieHash[name] = value;
198 | }
199 | }
200 | } else {
201 | if (!angular.equals(this.cookieHash, this.lastCookieHash)) {
202 | this.lastCookieHash = angular.copy(this.cookieHash);
203 | this.cookieHash = angular.copy(this.cookieHash);
204 | }
205 | return this.cookieHash;
206 | }
207 | }
208 | };
209 |
210 | angular.service('$browser', function(){
211 | return new MockBrowser();
212 | });
213 |
214 |
215 | /**
216 | * @workInProgress
217 | * @ngdoc service
218 | * @name angular.mock.service.$exceptionHandler
219 | *
220 | * @description
221 | * Mock implementation of {@link angular.service.$exceptionHandler} that rethrows any error passed
222 | * into `$exceptionHandler`. If any errors are are passed into the handler in tests, it typically
223 | * means that there is a bug in the application or test, so this mock will make these tests fail.
224 | *
225 | * See {@link angular.mock} for more info on angular mocks.
226 | */
227 | angular.service('$exceptionHandler', function(e) {
228 | return function(e) {throw e;};
229 | });
230 |
231 |
232 | /**
233 | * @workInProgress
234 | * @ngdoc service
235 | * @name angular.mock.service.$log
236 | *
237 | * @description
238 | * Mock implementation of {@link angular.service.$log} that gathers all logged messages in arrays
239 | * (one array per logging level). These arrays are exposed as `logs` property of each of the
240 | * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
241 | *
242 | * See {@link angular.mock} for more info on angular mocks.
243 | */
244 | angular.service('$log', MockLogFactory);
245 |
246 | function MockLogFactory() {
247 | var $log = {
248 | log: function(){ $log.log.logs.push(arguments); },
249 | warn: function(){ $log.warn.logs.push(arguments); },
250 | info: function(){ $log.info.logs.push(arguments); },
251 | error: function(){ $log.error.logs.push(arguments); }
252 | };
253 |
254 | $log.log.logs = [];
255 | $log.warn.logs = [];
256 | $log.info.logs = [];
257 | $log.error.logs = [];
258 |
259 | return $log;
260 | }
261 |
262 |
263 | /**
264 | * Mock of the Date type which has its timezone specified via constroctor arg.
265 | *
266 | * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
267 | * offset, so that we can test code that depends on local timezone settings without dependency on
268 | * the time zone settings of the machine where the code is running.
269 | *
270 | * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
271 | * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
272 | *
273 | * @example
274 | * !!!! WARNING !!!!!
275 | * This is not a complete Date object so only methods that were implemented can be called safely.
276 | * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
277 | *
278 | * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
279 | * incomplete we might be missing some non-standard methods. This can result in errors like:
280 | * "Date.prototype.foo called on incompatible Object".
281 | *
282 | *
283 | * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
284 | * newYearInBratislava.getTimezoneOffset() => -60;
285 | * newYearInBratislava.getFullYear() => 2010;
286 | * newYearInBratislava.getMonth() => 0;
287 | * newYearInBratislava.getDate() => 1;
288 | * newYearInBratislava.getHours() => 0;
289 | * newYearInBratislava.getMinutes() => 0;
290 | *
291 | *
292 | */
293 | function TzDate(offset, timestamp) {
294 | if (angular.isString(timestamp)) {
295 | var tsStr = timestamp;
296 |
297 | this.origDate = angular.String.toDate(timestamp);
298 |
299 | timestamp = this.origDate.getTime();
300 | if (isNaN(timestamp))
301 | throw {
302 | name: "Illegal Argument",
303 | message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
304 | };
305 | } else {
306 | this.origDate = new Date(timestamp);
307 | }
308 |
309 | var localOffset = new Date(timestamp).getTimezoneOffset();
310 | this.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
311 | this.date = new Date(timestamp + this.offsetDiff);
312 |
313 | this.getTime = function() {
314 | return this.date.getTime() - this.offsetDiff;
315 | };
316 |
317 | this.toLocaleDateString = function() {
318 | return this.date.toLocaleDateString();
319 | };
320 |
321 | this.getFullYear = function() {
322 | return this.date.getFullYear();
323 | };
324 |
325 | this.getMonth = function() {
326 | return this.date.getMonth();
327 | };
328 |
329 | this.getDate = function() {
330 | return this.date.getDate();
331 | };
332 |
333 | this.getHours = function() {
334 | return this.date.getHours();
335 | };
336 |
337 | this.getMinutes = function() {
338 | return this.date.getMinutes();
339 | };
340 |
341 | this.getSeconds = function() {
342 | return this.date.getSeconds();
343 | };
344 |
345 | this.getTimezoneOffset = function() {
346 | return offset * 60;
347 | };
348 |
349 | this.getUTCFullYear = function() {
350 | return this.origDate.getUTCFullYear();
351 | };
352 |
353 | this.getUTCMonth = function() {
354 | return this.origDate.getUTCMonth();
355 | };
356 |
357 | this.getUTCDate = function() {
358 | return this.origDate.getUTCDate();
359 | };
360 |
361 | this.getUTCHours = function() {
362 | return this.origDate.getUTCHours();
363 | };
364 |
365 | this.getUTCMinutes = function() {
366 | return this.origDate.getUTCMinutes();
367 | };
368 |
369 | this.getUTCSeconds = function() {
370 | return this.origDate.getUTCSeconds();
371 | };
372 |
373 |
374 | //hide all methods not implemented in this mock that the Date prototype exposes
375 | var unimplementedMethods = ['getDay', 'getMilliseconds', 'getTime', 'getUTCDay',
376 | 'getUTCMilliseconds', 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
377 | 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
378 | 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
379 | 'setYear', 'toDateString', 'toJSON', 'toGMTString', 'toLocaleFormat', 'toLocaleString',
380 | 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
381 |
382 | angular.forEach(unimplementedMethods, function(methodName) {
383 | this[methodName] = function() {
384 | throw {
385 | name: "MethodNotImplemented",
386 | message: "Method '" + methodName + "' is not implemented in the TzDate mock"
387 | };
388 | };
389 | });
390 | }
391 |
392 | //make "tzDateInstance instanceof Date" return true
393 | TzDate.prototype = Date.prototype;
394 |
--------------------------------------------------------------------------------
/app/lib/angular/angular.min.js:
--------------------------------------------------------------------------------
1 | (function(J,ga){function t(a,b,c){var d;if(a)if(K(a))for(d in a)d!="prototype"&&d!=rc&&d!=sc&&a.hasOwnProperty(d)&&b.call(c,a[d],d);else if(a.forEach&&a.forEach!==t)a.forEach(b,c);else if(W(a)&&Ba(a.length))for(d=0;d
2?ta.call(arguments,2,arguments.length):[];return typeof b==ja&&!(b instanceof RegExp)?c.length?function(){return arguments.length?b.apply(a,c.concat(ta.call(arguments,0,arguments.length))):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}:b}function Da(a){if(a&&a.length!==0){a=O(""+a);a=!(a=="f"||a=="0"||a=="false"||a=="no"||a=="n"||a=="[]")}else a=
7 | false;return a}function Eb(a){return(new Fb(bb,Gb,P,Z)).compile(a)}function cb(a){var b={},c,d;t((a||"").split("&"),function(e){if(e){c=e.split("=");d=unescape(c[0]);b[d]=I(c[1])?unescape(c[1]):true}});return b}function Hb(a){var b=[];t(a,function(c,d){b.push(escape(d)+(c===true?"":"="+escape(c)))});return b.length?b.join("&"):""}function db(a){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+").replace(/%24/g,"$").replace(/%2C/gi,
8 | ",")}function zc(a,b){Ib();var c=a.getElementsByTagName("script"),d;b=B({ie_compat_id:"ng-ie-compat"},b);for(var e=0;e1;d++){var e=b.shift(),g=a[e];if(!g){g={};a[e]=g}a=g}return a[b.shift()]=c}function Nb(a){var b=Ob[a];if(b)return b;var c="var l, fn, t;\n";t(a.split("."),function(d){d=Pb[d]?'["'+d+'"]':"."+d;c+="if(!s) return s;\nl=s;\ns=s"+d+';\nif(typeof s=="function" && !(s instanceof RegExp)) s = function(){ return l'+
14 | d+".apply(l, arguments); };\n";if(d.charAt(1)=="$"){d=d.substr(2);c+='if(!s) {\n t = angular.Global.typeOf(l);\n fn = (angular[t.charAt(0).toUpperCase() + t.substring(1)]||{})["'+d+'"];\n if (fn) s = function(){ return fn.apply(l, [l].concat(Array.prototype.slice.call(arguments, 0, arguments.length))); };\n}\n'}});c+="return s;";b=Function("s",c);b.toString=function(){return c};return Ob[a]=b}function wa(a){if(typeof a===ja)return a;var b=Qb[a];if(!b){b=va(a);var c=b.statements();b.assertAllConsumed();
15 | b=Qb[a]=B(function(){return c(this)},{fnSelf:c})}return b}function la(a,b,c){function d(){}a=d.prototype=a||{};var e=new d,g={sorted:[]},f,i;B(e,{"this":e,$id:Dc++,$parent:a,$bind:S(e,S,e),$get:S(e,Ia,e),$set:S(e,jb,e),$eval:function(h){var j=typeof h,k,l,n;if(j==ra){h=0;for(j=g.sorted.length;h0){var F=z[0],Y=F.text;if(Y==m||Y==r||Y==v||Y==w||!m&&!r&&!v&&!w)return F}return false}function g(m,r,v,w){if(m=e(m,r,v,w)){if(b&&!m.json){index=m.index;c("is not valid json",m)}z.shift();return this.currentToken=m}return false}function f(m){g(m)||c("is unexpected, expecting ["+m+"]",e())}function i(m,r){return function(v){return m(v,r(v))}}function h(m,r,v){return function(w){return r(w,m(w),v(w))}}function j(){z.length!==0&&c("is extra token not part of expression",
25 | z[0])}function k(){for(var m=[];;){z.length>0&&!e("}",")",";","]")&&m.push(mb());if(!g(";"))return function(r){for(var v,w=0;w","<=",">="))m=
26 | h(m,r.fn,x());return m}function s(){for(var m=p(),r;r=g("*","/","%");)m=h(m,r.fn,p());return m}function p(){var m;return g("+")?A():(m=g("-"))?h(L,m.fn,p()):(m=g("!"))?i(m.fn,p()):A()}function A(){var m;if(g("(")){m=mb();f(")");m=m}else if(g("["))m=H();else if(g("{"))m=X();else{var r=g();(m=r.fn)||c("not a primary expression",r)}for(;r=g("(","[",".");)if(r.text==="(")m=T(m);else if(r.text==="[")m=Tb(m);else if(r.text===".")m=Ub(m);else c("IMPOSSIBLE");return m}function H(){var m=[];if(d().text!="]"){do m.push(M());
27 | while(g(","))}f("]");return function(r){for(var v=[],w=0;w0;){m.push(u());g(";")||j()}j();return function(r){for(var v=0;v4096&&e.warn("Cookie '"+p+"' possibly not set or overflowed because it was too large ("+H+" > 4096 bytes)!");o.length>20&&e.warn("Cookie '"+p+"' possibly not set or overflowed because too many cookies were already set ("+
35 | o.length+" > 20 )")}}else{if(q.cookie!==x){x=q.cookie;H=x.split("; ");o={};for(X=0;X=0;k--)if(f[k]==j)break;if(k>=0){for(l=f.length-1;l>=k;l--)b.end&&b.end(f[l]);f.length=k}}var e,g,f=[],i=a;for(f.last=function(){return f[f.length-1]};a;){g=true;if(!f.last()||!ac[f.last()]){if(a.indexOf(""));var c=this.compile(b);return function(d){var e=a.match(/^\s*(.+)\s+in\s+(.*)\s*$/),g,f,i,h;if(!e)throw aa("Expected ng:repeat in form of 'item in collection' but got '"+a+"'.");g=e[1];f=e[2];e=g.match(/^([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\)$/);
110 | if(!e)throw aa("'item' in 'item in collection' should be identifier or (key, value) but got '"+keyValue+"'.");i=e[3]||e[1];h=e[2];var j=[],k=this;this.$onEval(function(){var l=0,n=j.length,q=d,o=this.$tryEval(f,d),x=0,s,p;if(ia(o))x=o.length;else for(p in o)o.hasOwnProperty(p)&&x++;for(p in o)if(o.hasOwnProperty(p)){if(ll;)j.pop().$element.remove()},d)}});Z("@ng:non-bindable",D);Z("ng:view",function(a){var b=this;if(a[0]["ng:compiled"]){this.descend(true);this.directives(true)}else{a[0]["ng:compiled"]=true;return B(function(c,d,e){var g;d.onChange(function(){var f;if(d.current){f=d.current.template;g=d.current.scope}f?c("GET",f,function(i,h){e.html(h);b.compile(e)(g)}):e.html("")})();this.$onEval(function(){g&&g.$eval()})},{$inject:["$xhr.cache","$route"]})}});var na;
112 | kb("$browser",function(a){if(!na){na=new Lc(J,C(J.document),C(J.document.body),Zc,a);var b=na.addPollFn;na.addPollFn=function(){na.addPollFn=b;na.startPoller(100,function(c,d){setTimeout(c,d)});return b.apply(na,arguments)};na.bind()}return na},{$inject:["$log"]});B(E,{element:C,compile:Eb,scope:la,copy:R,extend:B,equals:Ga,forEach:t,injector:Sb,noop:D,bind:S,toJson:da,fromJson:ua,identity:qa,isUndefined:N,isDefined:I,isString:G,isFunction:K,isObject:W,isNumber:Ba,isArray:ia});Ib();fb(ga).ready(function(){var a=
113 | zc(ga);if(a.autobind){var b=Eb(J.document)(la({$config:a})).$service("$browser");if(a.css)b.addCss(a.base_url+a.css);else ka<8&&b.addJs(a.base_url+a.ie_compat,a.ie_compat_id)}})})(window,document);document.write('');
114 |
--------------------------------------------------------------------------------
/app/lib/jquery/jquery.1.4.4.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery JavaScript Library v1.4.4
3 | * http://jquery.com/
4 | *
5 | * Copyright 2010, 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 2010, The Dojo Foundation
12 | * Released under the MIT, BSD, and GPL Licenses.
13 | *
14 | * Date: Thu Nov 11 19:04:53 2010 -0500
15 | */
16 | (function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
17 | h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;kd)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
19 | "`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
20 | e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
21 | "margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
22 | a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
23 | C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
24 | s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
25 | j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
26 | toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
27 | -1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
28 | if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
30 | b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
31 | !F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
32 | l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;Ha";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
38 | k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
39 | scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
40 | false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
41 | 1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
42 | "none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
43 | c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
44 | else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
52 | if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
54 | attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
55 | b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
56 | c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
57 | arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
58 | d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
59 | c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
61 | 8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
62 | "click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
63 | d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
71 | B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
72 | "file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
73 | 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
78 | (function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
80 | break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
81 | q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
82 | l;g.sort(w);if(h)for(var i=1;i0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
89 | m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
90 | true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
91 | g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return in[3]-0},nth:function(g,i,n){return n[3]-
92 | 0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
94 | i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
95 | if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
96 | g);else if(typeof g.length==="number")for(var p=g.length;n";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
99 | n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
100 | function(){var g=k,i=t.createElement("div");i.innerHTML="";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
101 | p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
102 | t.createElement("div");g.innerHTML="";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
103 | function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
106 | h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
107 | c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
108 | 2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
109 | b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
110 | e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/\s]+\/)>/g,P={option:[1,
111 | ""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
112 | c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
113 | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
114 | prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(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,false,function(b){this.parentNode.insertBefore(b,
115 | this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
116 | return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
117 | else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1>$2>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
121 | prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
122 | b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1>$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]===""&&!x?r.childNodes:[];for(o=k.length-
123 | 1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
124 | d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
125 | jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
126 | zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
127 | h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
128 | if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
129 | d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
130 | e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/