red-glass 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,8 @@ class RedGlassApp < Sinatra::Base
16
16
  end
17
17
 
18
18
  post '/?' do
19
- event = JSON.parse(params[:event_json])
19
+ request.body.rewind
20
+ event = JSON.parse(request.body.read)['event_json']
20
21
  begin
21
22
  uuid = UUID.new
22
23
  event['id'] = uuid.generate
@@ -0,0 +1,7 @@
1
+ // Auto-generated Carryall script loader. Enjoy the ride.
2
+ (function() {
3
+ var manifest = [{"check":"function() { return typeof jQuery == 'function' ? true : false;}","checkFailed":["jquery.js"]},{"check":"function() { var hasOldJSON = typeof JSON.license == 'undefined' ? false : true; if(hasOldJSON) { delete JSON; return false; } else { return true;}}","checkFailed":["json2.js"]},{"check":"function() { return typeof jQuery().ellocate == 'function' ? true : false;}","checkFailed":["jquery.ellocate.js"]},{"check":"function() { return typeof jQuery().redGlass == 'function' ? true : false;}","checkFailed":["jquery.redglass.js"]}];
4
+ var cargo = [{"name": "jquery.js", "payload": "!function(e,t){function n(e){var t=ht[e]={};return Q.each(e.split(tt),function(e,n){t[n]=!0}),t}function r(e,n,r){if(r===t&&1===e.nodeType){var i=\"data-\"+n.replace(mt,\"-$1\").toLowerCase();if(r=e.getAttribute(i),\"string\"==typeof r){try{r=\"true\"===r?!0:\"false\"===r?!1:\"null\"===r?null:+r+\"\"===r?+r:gt.test(r)?Q.parseJSON(r):r}catch(o){}Q.data(e,n,r)}else r=t}return r}function i(e){var t;for(t in e)if((\"data\"!==t||!Q.isEmptyObject(e[t]))&&\"toJSON\"!==t)return!1;return!0}function o(){return!1}function a(){return!0}function s(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function l(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function u(e,t,n){if(t=t||0,Q.isFunction(t))return Q.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return Q.grep(e,function(e){return e===t===n});if(\"string\"==typeof t){var r=Q.grep(e,function(e){return 1===e.nodeType});if(Ot.test(t))return Q.filter(t,r,!n);t=Q.filter(t,r)}return Q.grep(e,function(e){return Q.inArray(e,t)>=0===n})}function c(e){var t=Bt.split(\"|\"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function f(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function p(e,t){if(1===t.nodeType&&Q.hasData(e)){var n,r,i,o=Q._data(e),a=Q._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)Q.event.add(t,n,s[n][r])}a.data&&(a.data=Q.extend({},a.data))}}function d(e,t){var n;1===t.nodeType&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),\"object\"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),Q.support.html5Clone&&e.innerHTML&&!Q.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):\"input\"===n&&Yt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):\"option\"===n?t.selected=e.defaultSelected:\"input\"===n||\"textarea\"===n?t.defaultValue=e.defaultValue:\"script\"===n&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(Q.expando))}function h(e){return\"undefined\"!=typeof e.getElementsByTagName?e.getElementsByTagName(\"*\"):\"undefined\"!=typeof e.querySelectorAll?e.querySelectorAll(\"*\"):[]}function g(e){Yt.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=yn.length;i--;)if(t=yn[i]+n,t in e)return t;return r}function y(e,t){return e=t||e,\"none\"===Q.css(e,\"display\")||!Q.contains(e.ownerDocument,e)}function v(e,t){for(var n,r,i=[],o=0,a=e.length;a>o;o++)n=e[o],n.style&&(i[o]=Q._data(n,\"olddisplay\"),t?(i[o]||\"none\"!==n.style.display||(n.style.display=\"\"),\"\"===n.style.display&&y(n)&&(i[o]=Q._data(n,\"olddisplay\",T(n.nodeName)))):(r=nn(n,\"display\"),i[o]||\"none\"===r||Q._data(n,\"olddisplay\",r)));for(o=0;a>o;o++)n=e[o],n.style&&(t&&\"none\"!==n.style.display&&\"\"!==n.style.display||(n.style.display=t?i[o]||\"\":\"none\"));return e}function b(e,t,n){var r=cn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||\"px\"):t}function x(e,t,n,r){for(var i=n===(r?\"border\":\"content\")?4:\"width\"===t?1:0,o=0;4>i;i+=2)\"margin\"===n&&(o+=Q.css(e,n+mn[i],!0)),r?(\"content\"===n&&(o-=parseFloat(nn(e,\"padding\"+mn[i]))||0),\"margin\"!==n&&(o-=parseFloat(nn(e,\"border\"+mn[i]+\"Width\"))||0)):(o+=parseFloat(nn(e,\"padding\"+mn[i]))||0,\"padding\"!==n&&(o+=parseFloat(nn(e,\"border\"+mn[i]+\"Width\"))||0));return o}function w(e,t,n){var r=\"width\"===t?e.offsetWidth:e.offsetHeight,i=!0,o=Q.support.boxSizing&&\"border-box\"===Q.css(e,\"boxSizing\");if(0>=r){if(r=nn(e,t),(0>r||null==r)&&(r=e.style[t]),fn.test(r))return r;i=o&&(Q.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+x(e,t,n||(o?\"border\":\"content\"),i)+\"px\"}function T(e){if(dn[e])return dn[e];var t=Q(\"<\"+e+\">\").appendTo(R.body),n=t.css(\"display\");return t.remove(),(\"none\"===n||\"\"===n)&&(rn=R.body.appendChild(rn||Q.extend(R.createElement(\"iframe\"),{frameBorder:0,width:0,height:0})),on&&rn.createElement||(on=(rn.contentWindow||rn.contentDocument).document,on.write(\"<!doctype html><html><body>\"),on.close()),t=on.body.appendChild(on.createElement(e)),n=nn(t,\"display\"),R.body.removeChild(rn)),dn[e]=n,n}function C(e,t,n,r){var i;if(Q.isArray(t))Q.each(t,function(t,i){n||xn.test(e)?r(e,i):C(e+\"[\"+(\"object\"==typeof i?t:\"\")+\"]\",i,n,r)});else if(n||\"object\"!==Q.type(t))r(e,t);else for(i in t)C(e+\"[\"+i+\"]\",t[i],n,r)}function k(e){return function(t,n){\"string\"!=typeof t&&(n=t,t=\"*\");var r,i,o,a=t.toLowerCase().split(tt),s=0,l=a.length;if(Q.isFunction(n))for(;l>s;s++)r=a[s],o=/^\\+/.test(r),o&&(r=r.substr(1)||\"*\"),i=e[r]=e[r]||[],i[o?\"unshift\":\"push\"](n)}}function N(e,n,r,i,o,a){o=o||n.dataTypes[0],a=a||{},a[o]=!0;for(var s,l=e[o],u=0,c=l?l.length:0,f=e===On;c>u&&(f||!s);u++)s=l[u](n,r,i),\"string\"==typeof s&&(!f||a[s]?s=t:(n.dataTypes.unshift(s),s=N(e,n,r,i,s,a)));return!f&&s||a[\"*\"]||(s=N(e,n,r,i,\"*\",a)),s}function E(e,n){var r,i,o=Q.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);i&&Q.extend(!0,e,i)}function S(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes,c=e.responseFields;for(o in c)o in r&&(n[c[o]]=r[o]);for(;\"*\"===u[0];)u.shift(),i===t&&(i=e.mimeType||n.getResponseHeader(\"content-type\"));if(i)for(o in l)if(l[o]&&l[o].test(i)){u.unshift(o);break}if(u[0]in r)a=u[0];else{for(o in r){if(!u[0]||e.converters[o+\" \"+u[0]]){a=o;break}s||(s=o)}a=a||s}return a?(a!==u[0]&&u.unshift(a),r[a]):void 0}function A(e,t){var n,r,i,o,a=e.dataTypes.slice(),s=a[0],l={},u=0;if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a[1])for(n in e.converters)l[n.toLowerCase()]=e.converters[n];for(;i=a[++u];)if(\"*\"!==i){if(\"*\"!==s&&s!==i){if(n=l[s+\" \"+i]||l[\"* \"+i],!n)for(r in l)if(o=r.split(\" \"),o[1]===i&&(n=l[s+\" \"+o[0]]||l[\"* \"+o[0]])){n===!0?n=l[r]:l[r]!==!0&&(i=o[0],a.splice(u--,0,i));break}if(n!==!0)if(n&&e[\"throws\"])t=n(t);else try{t=n(t)}catch(c){return{state:\"parsererror\",error:n?c:\"No conversion from \"+s+\" to \"+i}}}s=i}return{state:\"success\",data:t}}function j(){try{return new e.XMLHttpRequest}catch(t){}}function D(){try{return new e.ActiveXObject(\"Microsoft.XMLHTTP\")}catch(t){}}function L(){return setTimeout(function(){Un=t},0),Un=Q.now()}function _(e,t){Q.each(t,function(t,n){for(var r=(Zn[t]||[]).concat(Zn[\"*\"]),i=0,o=r.length;o>i;i++)if(r[i].call(e,t,n))return})}function H(e,t,n){var r,i=0,o=Qn.length,a=Q.Deferred().always(function(){delete s.elem}),s=function(){for(var t=Un||L(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),i=0,o=l.tweens.length;o>i;i++)l.tweens[i].run(r);return a.notifyWith(e,[l,r,n]),1>r&&o?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:Q.extend({},t),opts:Q.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Un||L(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Q.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){for(var n=0,r=t?l.tweens.length:0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),u=l.props;for(F(u,l.opts.specialEasing);o>i;i++)if(r=Qn[i].call(l,e,u,l.opts))return r;return _(l,u),Q.isFunction(l.opts.start)&&l.opts.start.call(e,l),Q.fx.timer(Q.extend(s,{anim:l,queue:l.opts.queue,elem:e})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function F(e,t){var n,r,i,o,a;for(n in e)if(r=Q.camelCase(n),i=t[r],o=e[n],Q.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=Q.cssHooks[r],a&&\"expand\"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function M(e,t,n){var r,i,o,a,s,l,u,c,f=this,p=e.style,d={},h=[],g=e.nodeType&&y(e);n.queue||(u=Q._queueHooks(e,\"fx\"),null==u.unqueued&&(u.unqueued=0,c=u.empty.fire,u.empty.fire=function(){u.unqueued||c()}),u.unqueued++,f.always(function(){f.always(function(){u.unqueued--,Q.queue(e,\"fx\").length||u.empty.fire()})})),1===e.nodeType&&(\"height\"in t||\"width\"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],\"inline\"===Q.css(e,\"display\")&&\"none\"===Q.css(e,\"float\")&&(Q.support.inlineBlockNeedsLayout&&\"inline\"!==T(e.nodeName)?p.zoom=1:p.display=\"inline-block\")),n.overflow&&(p.overflow=\"hidden\",Q.support.shrinkWrapBlocks||f.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Yn.exec(o)){if(delete t[r],o===(g?\"hide\":\"show\"))continue;h.push(r)}if(a=h.length)for(s=Q._data(e,\"fxshow\")||Q._data(e,\"fxshow\",{}),g?Q(e).show():f.done(function(){Q(e).hide()}),f.done(function(){var t;Q.removeData(e,\"fxshow\",!0);for(t in d)Q.style(e,t,d[t])}),r=0;a>r;r++)i=h[r],l=f.createTween(i,g?s[i]:0),d[i]=s[i]||Q.style(e,i),i in s||(s[i]=l.start,g&&(l.end=l.start,l.start=\"width\"===i||\"height\"===i?1:0))}function O(e,t,n,r,i){return new O.prototype.init(e,t,n,r,i)}function q(e,t){for(var n,r={height:e},i=0;4>i;i+=2-t)n=mn[i],r[\"margin\"+n]=r[\"padding\"+n]=e;return t&&(r.opacity=r.width=e),r}function P(e){return Q.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var B,W,R=e.document,I=e.location,$=e.navigator,z=e.jQuery,X=e.$,V=Array.prototype.push,U=Array.prototype.slice,K=Array.prototype.indexOf,Y=Object.prototype.toString,J=Object.prototype.hasOwnProperty,G=String.prototype.trim,Q=function(e,t){return new Q.fn.init(e,t,B)},Z=/[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source,et=/\\S/,tt=/\\s+/,nt=et.test(\" \")?/^[\\s\\xA0]+|[\\s\\xA0]+$/g:/^\\s+|\\s+$/g,rt=/^(?:[^#<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]*)$)/,it=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,ot=/^[\\],:{}\\s]*$/,at=/(?:^|:|,)(?:\\s*\\[)+/g,st=/\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,lt=/\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/g,ut=/^-ms-/,ct=/-([\\da-z])/gi,ft=function(e,t){return(t+\"\").toUpperCase()},pt=function(){R.addEventListener?(R.removeEventListener(\"DOMContentLoaded\",pt,!1),Q.ready()):\"complete\"===R.readyState&&(R.detachEvent(\"onreadystatechange\",pt),Q.ready())},dt={};Q.fn=Q.prototype={constructor:Q,init:function(e,n,r){var i,o,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(\"string\"==typeof e){if(i=\"<\"===e.charAt(0)&&\">\"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:rt.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1])return n=n instanceof Q?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:R,e=Q.parseHTML(i[1],a,!0),it.test(i[1])&&Q.isPlainObject(n)&&this.attr.call(e,n,!0),Q.merge(this,e);if(o=R.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=R,this.selector=e,this}return Q.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),Q.makeArray(e,this))},selector:\"\",jquery:\"1.8.0\",length:0,size:function(){return this.length},toArray:function(){return U.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=Q.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,\"find\"===t?r.selector=this.selector+(this.selector?\" \":\"\")+n:t&&(r.selector=this.selector+\".\"+t+\"(\"+n+\")\"),r},each:function(e,t){return Q.each(this,e,t)},ready:function(e){return Q.ready.promise().done(e),this},eq:function(e){return e=+e,-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(U.apply(this,arguments),\"slice\",U.call(arguments).join(\",\"))},map:function(e){return this.pushStack(Q.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:V,sort:[].sort,splice:[].splice},Q.fn.init.prototype=Q.fn,Q.extend=Q.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for(\"boolean\"==typeof s&&(c=s,s=arguments[1]||{},l=2),\"object\"==typeof s||Q.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(e=arguments[l]))for(n in e)r=s[n],i=e[n],s!==i&&(c&&i&&(Q.isPlainObject(i)||(o=Q.isArray(i)))?(o?(o=!1,a=r&&Q.isArray(r)?r:[]):a=r&&Q.isPlainObject(r)?r:{},s[n]=Q.extend(c,a,i)):i!==t&&(s[n]=i));return s},Q.extend({noConflict:function(t){return e.$===Q&&(e.$=X),t&&e.jQuery===Q&&(e.jQuery=z),Q},isReady:!1,readyWait:1,holdReady:function(e){e?Q.readyWait++:Q.ready(!0)},ready:function(e){if(e===!0?!--Q.readyWait:!Q.isReady){if(!R.body)return setTimeout(Q.ready,1);Q.isReady=!0,e!==!0&&--Q.readyWait>0||(W.resolveWith(R,[Q]),Q.fn.trigger&&Q(R).trigger(\"ready\").off(\"ready\"))}},isFunction:function(e){return\"function\"===Q.type(e)},isArray:Array.isArray||function(e){return\"array\"===Q.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):dt[Y.call(e)]||\"object\"},isPlainObject:function(e){if(!e||\"object\"!==Q.type(e)||e.nodeType||Q.isWindow(e))return!1;try{if(e.constructor&&!J.call(e,\"constructor\")&&!J.call(e.constructor.prototype,\"isPrototypeOf\"))return!1}catch(n){return!1}var r;for(r in e);return r===t||J.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return e&&\"string\"==typeof e?(\"boolean\"==typeof t&&(n=t,t=0),t=t||R,(r=it.exec(e))?[t.createElement(r[1])]:(r=Q.buildFragment([e],t,n?null:[]),Q.merge([],(r.cacheable?Q.clone(r.fragment):r.fragment).childNodes))):null},parseJSON:function(t){return t&&\"string\"==typeof t?(t=Q.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):ot.test(t.replace(st,\"@\").replace(lt,\"]\").replace(at,\"\"))?new Function(\"return \"+t)():(Q.error(\"Invalid JSON: \"+t),void 0)):null},parseXML:function(n){var r,i;if(!n||\"string\"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,\"text/xml\")):(r=new ActiveXObject(\"Microsoft.XMLDOM\"),r.async=\"false\",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName(\"parsererror\").length||Q.error(\"Invalid XML: \"+n),r},noop:function(){},globalEval:function(t){t&&et.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ut,\"ms-\").replace(ct,ft)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,r){var i,o=0,a=e.length,s=a===t||Q.isFunction(e);if(r)if(s){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;a>o&&n.apply(e[o++],r)!==!1;);else if(s){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;a>o&&n.call(e[o],o,e[o++])!==!1;);return e},trim:G?function(e){return null==e?\"\":G.call(e)}:function(e){return null==e?\"\":e.toString().replace(nt,\"\")},makeArray:function(e,t){var n,r=t||[];return null!=e&&(n=Q.type(e),null==e.length||\"string\"===n||\"function\"===n||\"regexp\"===n||Q.isWindow(e)?V.call(r,e):Q.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(K)return K.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if(\"number\"==typeof r)for(;r>o;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,n,r){var i,o,a=[],s=0,l=e.length,u=e instanceof Q||l!==t&&\"number\"==typeof l&&(l>0&&e[0]&&e[l-1]||0===l||Q.isArray(e));if(u)for(;l>s;s++)i=n(e[s],s,r),null!=i&&(a[a.length]=i);else for(o in e)i=n(e[o],o,r),null!=i&&(a[a.length]=i);return a.concat.apply([],a)},guid:1,proxy:function(e,n){var r,i,o;return\"string\"==typeof n&&(r=e[n],n=e,e=r),Q.isFunction(e)?(i=U.call(arguments,2),o=function(){return e.apply(n,i.concat(U.call(arguments)))},o.guid=e.guid=e.guid||o.guid||Q.guid++,o):t},access:function(e,n,r,i,o,a,s){var l,u=null==r,c=0,f=e.length;if(r&&\"object\"==typeof r){for(c in r)Q.access(e,n,c,r[c],1,a,i);o=1}else if(i!==t){if(l=s===t&&Q.isFunction(i),u&&(l?(l=n,n=function(e,t,n){return l.call(Q(e),n)}):(n.call(e,i),n=null)),n)for(;f>c;c++)n(e[c],r,l?i.call(e[c],c,n(e[c],r)):i,s);o=1}return o?e:u?n.call(e):f?n(e[0],r):a},now:function(){return(new Date).getTime()}}),Q.ready.promise=function(t){if(!W)if(W=Q.Deferred(),\"complete\"===R.readyState||\"loading\"!==R.readyState&&R.addEventListener)setTimeout(Q.ready,1);else if(R.addEventListener)R.addEventListener(\"DOMContentLoaded\",pt,!1),e.addEventListener(\"load\",Q.ready,!1);else{R.attachEvent(\"onreadystatechange\",pt),e.attachEvent(\"onload\",Q.ready);var n=!1;try{n=null==e.frameElement&&R.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!Q.isReady){try{n.doScroll(\"left\")}catch(e){return setTimeout(i,50)}Q.ready()}}()}return W.promise(t)},Q.each(\"Boolean Number String Function Array Date RegExp Object\".split(\" \"),function(e,t){dt[\"[object \"+t+\"]\"]=t.toLowerCase()}),B=Q(R);var ht={};Q.Callbacks=function(e){e=\"string\"==typeof e?ht[e]||n(e):Q.extend({},e);var r,i,o,a,s,l,u=[],c=!e.once&&[],f=function(t){for(r=e.memory&&t,i=!0,l=a||0,a=0,s=u.length,o=!0;u&&s>l;l++)if(u[l].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}o=!1,u&&(c?c.length&&f(c.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;!function n(t){Q.each(t,function(t,r){!Q.isFunction(r)||e.unique&&p.has(r)?r&&r.length&&n(r):u.push(r)})}(arguments),o?s=u.length:r&&(a=t,f(r))}return this},remove:function(){return u&&Q.each(arguments,function(e,t){for(var n;(n=Q.inArray(t,u,n))>-1;)u.splice(n,1),o&&(s>=n&&s--,l>=n&&l--)}),this},has:function(e){return Q.inArray(e,u)>-1},empty:function(){return u=[],this},disable:function(){return u=c=r=t,this},disabled:function(){return!u},lock:function(){return c=t,r||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!c||(o?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},Q.extend({Deferred:function(e){var t=[[\"resolve\",\"done\",Q.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",Q.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",Q.Callbacks(\"memory\")]],n=\"pending\",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Q.Deferred(function(n){Q.each(t,function(t,r){var o=r[0],a=e[t];i[r[1]](Q.isFunction(a)?function(){var e=a.apply(this,arguments);e&&Q.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+\"With\"](this===i?n:this,[e])}:n[o])}),e=null}).promise()},promise:function(e){return\"object\"==typeof e?Q.extend(e,r):r}},i={};return r.pipe=r.then,Q.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=a.fire,i[o[0]+\"With\"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=U.call(arguments),a=o.length,s=1!==a||e&&Q.isFunction(e.promise)?a:0,l=1===s?e:Q.Deferred(),u=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?U.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);a>i;i++)o[i]&&Q.isFunction(o[i].promise)?o[i].promise().done(u(i,r,o)).fail(l.reject).progress(u(i,n,t)):--s;return s||l.resolveWith(r,o),l.promise()}}),Q.support=function(){var t,n,r,i,o,a,s,l,u,c,f,p=R.createElement(\"div\");if(p.setAttribute(\"className\",\"t\"),p.innerHTML=\" <link/><table></table><a href=\'/a\'>a</a><input type=\'checkbox\'/>\",n=p.getElementsByTagName(\"*\"),r=p.getElementsByTagName(\"a\")[0],r.style.cssText=\"top:1px;float:left;opacity:.5\",!n||!n.length||!r)return{};i=R.createElement(\"select\"),o=i.appendChild(R.createElement(\"option\")),a=p.getElementsByTagName(\"input\")[0],t={leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName(\"tbody\").length,htmlSerialize:!!p.getElementsByTagName(\"link\").length,style:/top/.test(r.getAttribute(\"style\")),hrefNormalized:\"/a\"===r.getAttribute(\"href\"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:\"on\"===a.value,optSelected:o.selected,getSetAttribute:\"t\"!==p.className,enctype:!!R.createElement(\"form\").enctype,html5Clone:\"<:nav></:nav>\"!==R.createElement(\"nav\").cloneNode(!0).outerHTML,boxModel:\"CSS1Compat\"===R.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}if(!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent(\"onclick\",f=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent(\"onclick\"),p.detachEvent(\"onclick\",f)),a=R.createElement(\"input\"),a.value=\"t\",a.setAttribute(\"type\",\"radio\"),t.radioValue=\"t\"===a.value,a.setAttribute(\"checked\",\"checked\"),a.setAttribute(\"name\",\"t\"),p.appendChild(a),s=R.createDocumentFragment(),s.appendChild(p.lastChild),t.checkClone=s.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=a.checked,s.removeChild(a),s.appendChild(p),p.attachEvent)for(u in{submit:!0,change:!0,focusin:!0})l=\"on\"+u,c=l in p,c||(p.setAttribute(l,\"return;\"),c=\"function\"==typeof p[l]),t[u+\"Bubbles\"]=c;return Q(function(){var n,r,i,o,a=\"padding:0;margin:0;border:0;display:block;overflow:hidden;\",s=R.getElementsByTagName(\"body\")[0];s&&(n=R.createElement(\"div\"),n.style.cssText=\"visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px\",s.insertBefore(n,s.firstChild),r=R.createElement(\"div\"),n.appendChild(r),r.innerHTML=\"<table><tr><td></td><td>t</td></tr></table>\",i=r.getElementsByTagName(\"td\"),i[0].style.cssText=\"padding:0;margin:0;border:0;display:none\",c=0===i[0].offsetHeight,i[0].style.display=\"\",i[1].style.display=\"none\",t.reliableHiddenOffsets=c&&0===i[0].offsetHeight,r.innerHTML=\"\",r.style.cssText=\"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\",t.boxSizing=4===r.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,e.getComputedStyle&&(t.pixelPosition=\"1%\"!==(e.getComputedStyle(r,null)||{}).top,t.boxSizingReliable=\"4px\"===(e.getComputedStyle(r,null)||{width:\"4px\"}).width,o=R.createElement(\"div\"),o.style.cssText=r.style.cssText=a,o.style.marginRight=o.style.width=\"0\",r.style.width=\"1px\",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),\"undefined\"!=typeof r.style.zoom&&(r.innerHTML=\"\",r.style.cssText=a+\"width:1px;padding:1px;display:inline;zoom:1\",t.inlineBlockNeedsLayout=3===r.offsetWidth,r.style.display=\"block\",r.style.overflow=\"visible\",r.innerHTML=\"<div></div>\",r.firstChild.style.width=\"5px\",t.shrinkWrapBlocks=3!==r.offsetWidth,n.style.zoom=1),s.removeChild(n),n=r=i=o=null)}),s.removeChild(p),n=r=i=o=a=s=p=null,t}();var gt=/^(?:\\{.*\\}|\\[.*\\])$/,mt=/([A-Z])/g;Q.extend({cache:{},deletedIds:[],uuid:0,expando:\"jQuery\"+(Q.fn.jquery+Math.random()).replace(/\\D/g,\"\"),noData:{embed:!0,object:\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",applet:!0},hasData:function(e){return e=e.nodeType?Q.cache[e[Q.expando]]:e[Q.expando],!!e&&!i(e)},data:function(e,n,r,i){if(Q.acceptData(e)){var o,a,s=Q.expando,l=\"string\"==typeof n,u=e.nodeType,c=u?Q.cache:e,f=u?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!l||r!==t)return f||(u?e[s]=f=Q.deletedIds.pop()||++Q.uuid:f=s),c[f]||(c[f]={},u||(c[f].toJSON=Q.noop)),(\"object\"==typeof n||\"function\"==typeof n)&&(i?c[f]=Q.extend(c[f],n):c[f].data=Q.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[Q.camelCase(n)]=r),l?(a=o[n],null==a&&(a=o[Q.camelCase(n)])):a=o,a}},removeData:function(e,t,n){if(Q.acceptData(e)){var r,o,a,s=e.nodeType,l=s?Q.cache:e,u=s?e[Q.expando]:Q.expando;if(l[u]){if(t&&(r=n?l[u]:l[u].data)){Q.isArray(t)||(t in r?t=[t]:(t=Q.camelCase(t),t=t in r?[t]:t.split(\" \")));for(o=0,a=t.length;a>o;o++)delete r[t[o]];if(!(n?i:Q.isEmptyObject)(r))return}(n||(delete l[u].data,i(l[u])))&&(s?Q.cleanData([e],!0):Q.support.deleteExpando||l!=l.window?delete l[u]:l[u]=null)}}},_data:function(e,t,n){return Q.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&Q.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute(\"classid\")===t}}),Q.fn.extend({data:function(e,n){var i,o,a,s,l,u=this[0],c=0,f=null;if(e===t){if(this.length&&(f=Q.data(u),1===u.nodeType&&!Q._data(u,\"parsedAttrs\"))){for(a=u.attributes,l=a.length;l>c;c++)s=a[c].name,0===s.indexOf(\"data-\")&&(s=Q.camelCase(s.substring(5)),r(u,s,f[s]));Q._data(u,\"parsedAttrs\",!0)}return f}return\"object\"==typeof e?this.each(function(){Q.data(this,e)}):(i=e.split(\".\",2),i[1]=i[1]?\".\"+i[1]:\"\",o=i[1]+\"!\",Q.access(this,function(n){return n===t?(f=this.triggerHandler(\"getData\"+o,[i[0]]),f===t&&u&&(f=Q.data(u,e),f=r(u,e,f)),f===t&&i[1]?this.data(i[0]):f):(i[1]=n,this.each(function(){var t=Q(this);t.triggerHandler(\"setData\"+o,i),Q.data(this,e,n),t.triggerHandler(\"changeData\"+o,i)}),void 0)},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){Q.removeData(this,e)})}}),Q.extend({queue:function(e,t,n){var r;return e?(t=(t||\"fx\")+\"queue\",r=Q._data(e,t),n&&(!r||Q.isArray(n)?r=Q._data(e,t,Q.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||\"fx\";var n=Q.queue(e,t),r=n.shift(),i=Q._queueHooks(e,t),o=function(){Q.dequeue(e,t)};\"inprogress\"===r&&(r=n.shift()),r&&(\"fx\"===t&&n.unshift(\"inprogress\"),delete i.stop,r.call(e,o,i)),!n.length&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return Q._data(e,n)||Q._data(e,n,{empty:Q.Callbacks(\"once memory\").add(function(){Q.removeData(e,t+\"queue\",!0),Q.removeData(e,n,!0)})})}}),Q.fn.extend({queue:function(e,n){var r=2;return\"string\"!=typeof e&&(n=e,e=\"fx\",r--),arguments.length<r?Q.queue(this[0],e):n===t?this:this.each(function(){var t=Q.queue(this,e,n);Q._queueHooks(this,e),\"fx\"===e&&\"inprogress\"!==t[0]&&Q.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Q.dequeue(this,e)})},delay:function(e,t){return e=Q.fx?Q.fx.speeds[e]||e:e,t=t||\"fx\",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||\"fx\",[])},promise:function(e,n){var r,i=1,o=Q.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};for(\"string\"!=typeof e&&(n=e,e=t),e=e||\"fx\";s--;)(r=Q._data(a[s],e+\"queueHooks\"))&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var yt,vt,bt,xt=/[\\t\\r\\n]/g,wt=/\\r/g,Tt=/^(?:button|input)$/i,Ct=/^(?:button|input|object|select|textarea)$/i,kt=/^a(?:rea|)$/i,Nt=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Et=Q.support.getSetAttribute;Q.fn.extend({attr:function(e,t){return Q.access(this,Q.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Q.removeAttr(this,e)})},prop:function(e,t){return Q.access(this,Q.prop,e,t,arguments.length>1)},removeProp:function(e){return e=Q.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a,s;if(Q.isFunction(e))return this.each(function(t){Q(this).addClass(e.call(this,t,this.className))});if(e&&\"string\"==typeof e)for(t=e.split(tt),n=0,r=this.length;r>n;n++)if(i=this[n],1===i.nodeType)if(i.className||1!==t.length){for(o=\" \"+i.className+\" \",a=0,s=t.length;s>a;a++)~o.indexOf(\" \"+t[a]+\" \")||(o+=t[a]+\" \");i.className=Q.trim(o)}else i.className=e;return this},removeClass:function(e){var n,r,i,o,a,s,l;if(Q.isFunction(e))return this.each(function(t){Q(this).removeClass(e.call(this,t,this.className))});if(e&&\"string\"==typeof e||e===t)for(n=(e||\"\").split(tt),s=0,l=this.length;l>s;s++)if(i=this[s],1===i.nodeType&&i.className){for(r=(\" \"+i.className+\" \").replace(xt,\" \"),o=0,a=n.length;a>o;o++)for(;r.indexOf(\" \"+n[o]+\" \")>-1;)r=r.replace(\" \"+n[o]+\" \",\" \");i.className=e?Q.trim(r):\"\"}return this},toggleClass:function(e,t){var n=typeof e,r=\"boolean\"==typeof t;return Q.isFunction(e)?this.each(function(n){Q(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(\"string\"===n)for(var i,o=0,a=Q(this),s=t,l=e.split(tt);i=l[o++];)s=r?s:!a.hasClass(i),a[s?\"addClass\":\"removeClass\"](i);else(\"undefined\"===n||\"boolean\"===n)&&(this.className&&Q._data(this,\"__className__\",this.className),this.className=this.className||e===!1?\"\":Q._data(this,\"__className__\")||\"\")})},hasClass:function(e){for(var t=\" \"+e+\" \",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(\" \"+this[n].className+\" \").replace(xt,\" \").indexOf(t)>-1)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=Q.isFunction(e),this.each(function(r){var o,a=Q(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,null==o?o=\"\":\"number\"==typeof o?o+=\"\":Q.isArray(o)&&(o=Q.map(o,function(e){return null==e?\"\":e+\"\"})),n=Q.valHooks[this.type]||Q.valHooks[this.nodeName.toLowerCase()],n&&\"set\"in n&&n.set(this,o,\"value\")!==t||(this.value=o))});if(o)return n=Q.valHooks[o.type]||Q.valHooks[o.nodeName.toLowerCase()],n&&\"get\"in n&&(r=n.get(o,\"value\"))!==t?r:(r=o.value,\"string\"==typeof r?r.replace(wt,\"\"):null==r?\"\":r)}}}),Q.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,o=e.selectedIndex,a=[],s=e.options,l=\"select-one\"===e.type;if(0>o)return null;for(n=l?o:0,r=l?o+1:s.length;r>n;n++)if(i=s[n],!(!i.selected||(Q.support.optDisabled?i.disabled:null!==i.getAttribute(\"disabled\"))||i.parentNode.disabled&&Q.nodeName(i.parentNode,\"optgroup\"))){if(t=Q(i).val(),l)return t;a.push(t)}return l&&!a.length&&s.length?Q(s[o]).val():a},set:function(e,t){var n=Q.makeArray(t);return Q(e).find(\"option\").each(function(){this.selected=Q.inArray(Q(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var o,a,s,l=e.nodeType;if(e&&3!==l&&8!==l&&2!==l)return i&&Q.isFunction(Q.fn[n])?Q(e)[n](r):\"undefined\"==typeof e.getAttribute?Q.prop(e,n,r):(s=1!==l||!Q.isXMLDoc(e),s&&(n=n.toLowerCase(),a=Q.attrHooks[n]||(Nt.test(n)?vt:yt)),r!==t?null===r?(Q.removeAttr(e,n),void 0):a&&\"set\"in a&&s&&(o=a.set(e,r,n))!==t?o:(e.setAttribute(n,\"\"+r),r):a&&\"get\"in a&&s&&null!==(o=a.get(e,n))?o:(o=e.getAttribute(n),null===o?t:o))},removeAttr:function(e,t){var n,r,i,o,a=0;if(t&&1===e.nodeType)for(r=t.split(tt);a<r.length;a++)i=r[a],i&&(n=Q.propFix[i]||i,o=Nt.test(i),o||Q.attr(e,i,\"\"),e.removeAttribute(Et?i:n),o&&n in e&&(e[n]=!1))},attrHooks:{type:{set:function(e,t){if(Tt.test(e.nodeName)&&e.parentNode)Q.error(\"type property can\'t be changed\");else if(!Q.support.radioValue&&\"radio\"===t&&Q.nodeName(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}},value:{get:function(e,t){return yt&&Q.nodeName(e,\"button\")?yt.get(e,t):t in e?e.value:null},set:function(e,t,n){return yt&&Q.nodeName(e,\"button\")?yt.set(e,t,n):(e.value=t,void 0)}}},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(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!Q.isXMLDoc(e),a&&(n=Q.propFix[n]||n,o=Q.propHooks[n]),r!==t?o&&\"set\"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&\"get\"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode(\"tabindex\");return n&&n.specified?parseInt(n.value,10):Ct.test(e.nodeName)||kt.test(e.nodeName)&&e.href?0:t}}}}),vt={get:function(e,n){var r,i=Q.prop(e,n);return i===!0||\"boolean\"!=typeof i&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?Q.removeAttr(e,n):(r=Q.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},Et||(bt={name:!0,id:!0,coords:!0},yt=Q.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(bt[n]?\"\"!==r.value:r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=R.createAttribute(n),e.setAttributeNode(r)),r.value=t+\"\"}},Q.each([\"width\",\"height\"],function(e,t){Q.attrHooks[t]=Q.extend(Q.attrHooks[t],{set:function(e,n){return\"\"===n?(e.setAttribute(t,\"auto\"),n):void 0\n}})}),Q.attrHooks.contenteditable={get:yt.get,set:function(e,t,n){\"\"===t&&(t=\"false\"),yt.set(e,t,n)}}),Q.support.hrefNormalized||Q.each([\"href\",\"src\",\"width\",\"height\"],function(e,n){Q.attrHooks[n]=Q.extend(Q.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null===r?t:r}})}),Q.support.style||(Q.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=\"\"+t}}),Q.support.optSelected||(Q.propHooks.selected=Q.extend(Q.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),Q.support.enctype||(Q.propFix.enctype=\"encoding\"),Q.support.checkOn||Q.each([\"radio\",\"checkbox\"],function(){Q.valHooks[this]={get:function(e){return null===e.getAttribute(\"value\")?\"on\":e.value}}}),Q.each([\"radio\",\"checkbox\"],function(){Q.valHooks[this]=Q.extend(Q.valHooks[this],{set:function(e,t){return Q.isArray(t)?e.checked=Q.inArray(Q(e).val(),t)>=0:void 0}})});var St=/^(?:textarea|input|select)$/i,At=/^([^\\.]*|)(?:\\.(.+)|)$/,jt=/(?:^|\\s)hover(\\.\\S+|)\\b/,Dt=/^key/,Lt=/^(?:mouse|contextmenu)|click/,_t=/^(?:focusinfocus|focusoutblur)$/,Ht=function(e){return Q.event.special.hover?e:e.replace(jt,\"mouseenter$1 mouseleave$1\")};Q.event={add:function(e,n,r,i,o){var a,s,l,u,c,f,p,d,h,g,m;if(3!==e.nodeType&&8!==e.nodeType&&n&&r&&(a=Q._data(e))){for(r.handler&&(h=r,r=h.handler,o=h.selector),r.guid||(r.guid=Q.guid++),l=a.events,l||(a.events=l={}),s=a.handle,s||(a.handle=s=function(e){return\"undefined\"==typeof Q||e&&Q.event.triggered===e.type?t:Q.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=Q.trim(Ht(n)).split(\" \"),u=0;u<n.length;u++)c=At.exec(n[u])||[],f=c[1],p=(c[2]||\"\").split(\".\").sort(),m=Q.event.special[f]||{},f=(o?m.delegateType:m.bindType)||f,m=Q.event.special[f]||{},d=Q.extend({type:f,origType:c[1],data:i,handler:r,guid:r.guid,selector:o,namespace:p.join(\".\")},h),g=l[f],g||(g=l[f]=[],g.delegateCount=0,m.setup&&m.setup.call(e,i,p,s)!==!1||(e.addEventListener?e.addEventListener(f,s,!1):e.attachEvent&&e.attachEvent(\"on\"+f,s))),m.add&&(m.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),o?g.splice(g.delegateCount++,0,d):g.push(d),Q.event.global[f]=!0;e=null}},global:{},remove:function(e,t,n,r,i){var o,a,s,l,u,c,f,p,d,h,g,m=Q.hasData(e)&&Q._data(e);if(m&&(p=m.events)){for(t=Q.trim(Ht(t||\"\")).split(\" \"),o=0;o<t.length;o++)if(a=At.exec(t[o])||[],s=l=a[1],u=a[2],s){for(d=Q.event.special[s]||{},s=(r?d.delegateType:d.bindType)||s,h=p[s]||[],c=h.length,u=u?new RegExp(\"(^|\\\\.)\"+u.split(\".\").sort().join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,f=0;f<h.length;f++)g=h[f],!i&&l!==g.origType||n&&n.guid!==g.guid||u&&!u.test(g.namespace)||r&&r!==g.selector&&(\"**\"!==r||!g.selector)||(h.splice(f--,1),g.selector&&h.delegateCount--,d.remove&&d.remove.call(e,g));0===h.length&&c!==h.length&&(d.teardown&&d.teardown.call(e,u,m.handle)!==!1||Q.removeEvent(e,s,m.handle),delete p[s])}else for(s in p)Q.event.remove(e,s+t[o],n,r,!0);Q.isEmptyObject(p)&&(delete m.handle,Q.removeData(e,\"events\",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,o){if(!i||3!==i.nodeType&&8!==i.nodeType){var a,s,l,u,c,f,p,d,h,g,m=n.type||n,y=[];if(!_t.test(m+Q.event.triggered)&&(m.indexOf(\"!\")>=0&&(m=m.slice(0,-1),s=!0),m.indexOf(\".\")>=0&&(y=m.split(\".\"),m=y.shift(),y.sort()),i&&!Q.event.customEvent[m]||Q.event.global[m]))if(n=\"object\"==typeof n?n[Q.expando]?n:new Q.Event(m,n):new Q.Event(m),n.type=m,n.isTrigger=!0,n.exclusive=s,n.namespace=y.join(\".\"),n.namespace_re=n.namespace?new RegExp(\"(^|\\\\.)\"+y.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,f=m.indexOf(\":\")<0?\"on\"+m:\"\",i){if(n.result=t,n.target||(n.target=i),r=null!=r?Q.makeArray(r):[],r.unshift(n),p=Q.event.special[m]||{},!p.trigger||p.trigger.apply(i,r)!==!1){if(h=[[i,p.bindType||m]],!o&&!p.noBubble&&!Q.isWindow(i)){for(g=p.delegateType||m,u=_t.test(g+m)?i:i.parentNode,c=i;u;u=u.parentNode)h.push([u,g]),c=u;c===(i.ownerDocument||R)&&h.push([c.defaultView||c.parentWindow||e,g])}for(l=0;l<h.length&&!n.isPropagationStopped();l++)u=h[l][0],n.type=h[l][1],d=(Q._data(u,\"events\")||{})[n.type]&&Q._data(u,\"handle\"),d&&d.apply(u,r),d=f&&u[f],d&&Q.acceptData(u)&&d.apply(u,r)===!1&&n.preventDefault();return n.type=m,o||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||\"click\"===m&&Q.nodeName(i,\"a\")||!Q.acceptData(i)||f&&i[m]&&(\"focus\"!==m&&\"blur\"!==m||0!==n.target.offsetWidth)&&!Q.isWindow(i)&&(c=i[f],c&&(i[f]=null),Q.event.triggered=m,i[m](),Q.event.triggered=t,c&&(i[f]=c)),n.result}}else{a=Q.cache;for(l in a)a[l].events&&a[l].events[m]&&Q.event.trigger(n,r,a[l].handle.elem,!0)}}},dispatch:function(n){n=Q.event.fix(n||e.event);var r,i,o,a,s,l,u,c,f,p,d=(Q._data(this,\"events\")||{})[n.type]||[],h=d.delegateCount,g=[].slice.call(arguments),m=!n.exclusive&&!n.namespace,y=Q.event.special[n.type]||{},v=[];if(g[0]=n,n.delegateTarget=this,!y.preDispatch||y.preDispatch.call(this,n)!==!1){if(h&&(!n.button||\"click\"!==n.type))for(a=Q(this),a.context=this,o=n.target;o!=this;o=o.parentNode||this)if(o.disabled!==!0||\"click\"!==n.type){for(l={},c=[],a[0]=o,r=0;h>r;r++)f=d[r],p=f.selector,l[p]===t&&(l[p]=a.is(p)),l[p]&&c.push(f);c.length&&v.push({elem:o,matches:c})}for(d.length>h&&v.push({elem:this,matches:d.slice(h)}),r=0;r<v.length&&!n.isPropagationStopped();r++)for(u=v[r],n.currentTarget=u.elem,i=0;i<u.matches.length&&!n.isImmediatePropagationStopped();i++)f=u.matches[i],(m||!n.namespace&&!f.namespace||n.namespace_re&&n.namespace_re.test(f.namespace))&&(n.data=f.data,n.handleObj=f,s=((Q.event.special[f.origType]||{}).handle||f.handler).apply(u.elem,g),s!==t&&(n.result=s,s===!1&&(n.preventDefault(),n.stopPropagation())));return y.postDispatch&&y.postDispatch.call(this,n),n.result}},props:\"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),fixHooks:{},keyHooks:{props:\"char charCode key keyCode\".split(\" \"),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:\"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||R,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},fix:function(e){if(e[Q.expando])return e;var t,n,r=e,i=Q.event.fixHooks[e.type]||{},o=i.props?this.props.concat(i.props):this.props;for(e=Q.Event(r),t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||R),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},special:{ready:{setup:Q.bindReady},load:{noBubble:!0},focus:{delegateType:\"focusin\"},blur:{delegateType:\"focusout\"},beforeunload:{setup:function(e,t,n){Q.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=Q.extend(new Q.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?Q.event.trigger(i,null,t):Q.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},Q.event.handle=Q.event.dispatch,Q.removeEvent=R.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r=\"on\"+t;e.detachEvent&&(\"undefined\"==typeof e[r]&&(e[r]=null),e.detachEvent(r,n))},Q.Event=function(e,t){return this instanceof Q.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?a:o):this.type=e,t&&Q.extend(this,t),this.timeStamp=e&&e.timeStamp||Q.now(),this[Q.expando]=!0,void 0):new Q.Event(e,t)},Q.Event.prototype={preventDefault:function(){this.isDefaultPrevented=a;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=a;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=a,this.stopPropagation()},isDefaultPrevented:o,isPropagationStopped:o,isImmediatePropagationStopped:o},Q.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\"},function(e,t){Q.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return o.selector,(!i||i!==r&&!Q.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),Q.support.submitBubbles||(Q.event.special.submit={setup:function(){return Q.nodeName(this,\"form\")?!1:(Q.event.add(this,\"click._submit keypress._submit\",function(e){var n=e.target,r=Q.nodeName(n,\"input\")||Q.nodeName(n,\"button\")?n.form:t;r&&!Q._data(r,\"_submit_attached\")&&(Q.event.add(r,\"submit._submit\",function(e){e._submit_bubble=!0}),Q._data(r,\"_submit_attached\",!0))}),void 0)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&Q.event.simulate(\"submit\",this.parentNode,e,!0))},teardown:function(){return Q.nodeName(this,\"form\")?!1:(Q.event.remove(this,\"._submit\"),void 0)}}),Q.support.changeBubbles||(Q.event.special.change={setup:function(){return St.test(this.nodeName)?((\"checkbox\"===this.type||\"radio\"===this.type)&&(Q.event.add(this,\"propertychange._change\",function(e){\"checked\"===e.originalEvent.propertyName&&(this._just_changed=!0)}),Q.event.add(this,\"click._change\",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),Q.event.simulate(\"change\",this,e,!0)})),!1):(Q.event.add(this,\"beforeactivate._change\",function(e){var t=e.target;St.test(t.nodeName)&&!Q._data(t,\"_change_attached\")&&(Q.event.add(t,\"change._change\",function(e){!this.parentNode||e.isSimulated||e.isTrigger||Q.event.simulate(\"change\",this.parentNode,e,!0)}),Q._data(t,\"_change_attached\",!0))}),void 0)},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||\"radio\"!==t.type&&\"checkbox\"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return Q.event.remove(this,\"._change\"),St.test(this.nodeName)}}),Q.support.focusinBubbles||Q.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){var n=0,r=function(e){Q.event.simulate(t,e.target,Q.event.fix(e),!0)};Q.event.special[t]={setup:function(){0===n++&&R.addEventListener(e,r,!0)},teardown:function(){0===--n&&R.removeEventListener(e,r,!0)}}}),Q.fn.extend({on:function(e,n,r,i,a){var s,l;if(\"object\"==typeof e){\"string\"!=typeof n&&(r=r||n,n=t);for(l in e)this.on(l,n,r,e[l],a);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&(\"string\"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=o;else if(!i)return this;return 1===a&&(s=i,i=function(e){return Q().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=Q.guid++)),this.each(function(){Q.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,a;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,Q(e.delegateTarget).off(i.namespace?i.origType+\".\"+i.namespace:i.origType,i.selector,i.handler),this;if(\"object\"==typeof e){for(a in e)this.off(a,n,e[a]);return this}return(n===!1||\"function\"==typeof n)&&(r=n,n=t),r===!1&&(r=o),this.each(function(){Q.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return Q(this.context).on(e,this.selector,t,n),this},die:function(e,t){return Q(this.context).off(e,this.selector||\"**\",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1==arguments.length?this.off(e,\"**\"):this.off(t,e||\"**\",n)},trigger:function(e,t){return this.each(function(){Q.event.trigger(e,t,this)})},triggerHandler:function(e,t){return this[0]?Q.event.trigger(e,t,this[0],!0):void 0},toggle:function(e){var t=arguments,n=e.guid||Q.guid++,r=0,i=function(n){var i=(Q._data(this,\"lastToggle\"+e.guid)||0)%r;return Q._data(this,\"lastToggle\"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};for(i.guid=n;r<t.length;)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Q.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu\".split(\" \"),function(e,t){Q.fn[t]=function(e,n){return null==n&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Dt.test(t)&&(Q.event.fixHooks[t]=Q.event.keyHooks),Lt.test(t)&&(Q.event.fixHooks[t]=Q.event.mouseHooks)}),function(e,t){function n(e,t,n,r){for(var i=0,o=t.length;o>i;i++)ot(e,t[i],n,r)}function r(e,t,r,i,o,a){var s,l=at.setFilters[t.toLowerCase()];return l||ot.error(t),(e||!(s=o))&&n(e||\"*\",i,s=[],o),s.length>0?l(s,r,a):[]}function i(e,i,o,a,s){for(var l,u,c,f,p,d,h,g,m=0,y=s.length,v=z.POS,b=new RegExp(\"^\"+v.source+\"(?!\"+k+\")\",\"i\"),x=function(){for(var e=1,n=arguments.length-2;n>e;e++)arguments[e]===t&&(l[e]=t)};y>m;m++){for(v.exec(\"\"),e=s[m],f=[],c=0,p=a;l=v.exec(e);)g=v.lastIndex=l.index+l[0].length,g>c&&(h=e.slice(c,l.index),c=g,d=[i],F.test(h)&&(p&&(d=p),p=a),(u=W.test(h))&&(h=h.slice(0,-5).replace(F,\"'{{carryallCargo}}'*\")),l.length>1&&l[0].replace(b,x),p=r(h,l[1],l[2],d,p,u));p?(f=f.concat(p),(h=e.slice(c))&&\")\"!==h?F.test(h)?n(h,f,o,a):ot(h,i,o,a?a.concat(p):p):T.apply(o,f)):ot(e,i,o,a)}return 1===y?o:ot.uniqueSort(o)}function o(e,t,n){for(var r,i,o,a=[],s=0,l=O.exec(e),u=!l.pop()&&!l.pop(),c=u&&e.match(M)||[\"\"],f=at.preFilter,p=at.filter,d=!n&&t!==g;null!=(i=c[s])&&u;s++)for(a.push(r=[]),d&&(i=\" \"+i);i;){u=!1,(l=F.exec(i))&&(i=i.slice(l[0].length),u=r.push({part:l.pop().replace(H,\" \"),captures:l}));for(o in p)!(l=z[o].exec(i))||f[o]&&!(l=f[o](l,t,n))||(i=i.slice(l.shift().length),u=r.push({part:o,captures:l}));if(!u)break}return u||ot.error(e),a}function a(e,t,n){var r=t.dir,i=x++;return e||(e=function(e){return e===n}),t.first?function(t,n){for(;t=t[r];)if(1===t.nodeType)return e(t,n)&&t}:function(t,n){for(var o,a=i+\".\"+f,s=a+\".\"+c;t=t[r];)if(1===t.nodeType){if((o=t[C])===s)return t.sizset;if(\"string\"==typeof o&&0===o.indexOf(a)){if(t.sizset)return t}else{if(t[C]=s,e(t,n))return t.sizset=!0,t;t.sizset=!1}}}}function s(e,t){return e?function(n,r){var i=t(n,r);return i&&e(i===!0?n:i,r)}:t}function l(e,t,n){for(var r,i,o=0;r=e[o];o++)at.relative[r.part]?i=a(i,at.relative[r.part],t):(r.captures.push(t,n),i=s(i,at.filter[r.part].apply(null,r.captures)));return i}function u(e){return function(t,n){for(var r,i=0;r=e[i];i++)if(r(t,n))return!0;return!1}}var c,f,p,d,h,g=e.document,m=g.documentElement,y=\"undefined\",v=!1,b=!0,x=0,w=[].slice,T=[].push,C=(\"sizcache\"+Math.random()).replace(\".\",\"\"),k=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",N=\"(?:\\\\\\\\.|[-\\\\w]|[^\\\\x00-\\\\xa0])+\",E=N.replace(\"w\",\"w#\"),S=\"([*^$|!~]?=)\",A=\"\\\\[\"+k+\"*(\"+N+\")\"+k+\"*(?:\"+S+k+\"*(?:([\'\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\"+E+\")|)|)\"+k+\"*\\\\]\",j=\":(\"+N+\")(?:\\\\((?:([\'\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\2|((?:[^,]|\\\\\\\\,|(?:,(?=[^\\\\[]*\\\\]))|(?:,(?=[^\\\\(]*\\\\))))*))\\\\)|)\",D=\":(nth|eq|gt|lt|first|last|even|odd)(?:\\\\((\\\\d*)\\\\)|)(?=[^-]|$)\",L=k+\"*([\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])\"+k+\"*\",_=\"(?=[^\\\\x20\\\\t\\\\r\\\\n\\\\f])(?:\\\\\\\\.|\"+A+\"|\"+j.replace(2,7)+\"|[^\\\\\\\\(),])+\",H=new RegExp(\"^\"+k+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+k+\"+$\",\"g\"),F=new RegExp(\"^\"+L),M=new RegExp(_+\"?(?=\"+k+\"*,|$)\",\"g\"),O=new RegExp(\"^(?:(?!,)(?:(?:^|,)\"+k+\"*\"+_+\")*?|\"+k+\"*(.*?))(\\\\)|$)\"),q=new RegExp(_.slice(19,-6)+\"\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])+|\"+L,\"g\"),P=/^(?:#([\\w\\-]+)|(\\w+)|\\.([\\w\\-]+))$/,B=/[\\x20\\t\\r\\n\\f]*[+~]/,W=/:not\\($/,R=/h\\d/i,I=/input|select|textarea|button/i,$=/\\\\(?!\\\\)/g,z={ID:new RegExp(\"^#(\"+N+\")\"),CLASS:new RegExp(\"^\\\\.(\"+N+\")\"),NAME:new RegExp(\"^\\\\[name=[\'\\\"]?(\"+N+\")[\'\\\"]?\\\\]\"),TAG:new RegExp(\"^(\"+N.replace(\"[-\",\"[-\\\\*\")+\")\"),ATTR:new RegExp(\"^\"+A),PSEUDO:new RegExp(\"^\"+j),CHILD:new RegExp(\"^:(only|nth|last|first)-child(?:\\\\(\"+k+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+k+\"*(?:([+-]|)\"+k+\"*(\\\\d+)|))\"+k+\"*\\\\)|)\",\"i\"),POS:new RegExp(D,\"ig\"),needsContext:new RegExp(\"^\"+k+\"*[>+~]|\"+D,\"i\")},X={},V=[],U={},K=[],Y=function(e){return e.sizzleFilter=!0,e},J=function(e){return function(t){return\"input\"===t.nodeName.toLowerCase()&&t.type===e}},G=function(e){return function(t){var n=t.nodeName.toLowerCase();return(\"input\"===n||\"button\"===n)&&t.type===e}},Z=function(e){var t=!1,n=g.createElement(\"div\");try{t=e(n)}catch(r){}return n=null,t},et=Z(function(e){e.innerHTML=\"<select></select>\";var t=typeof e.lastChild.getAttribute(\"multiple\");return\"boolean\"!==t&&\"string\"!==t}),tt=Z(function(e){e.id=C+0,e.innerHTML=\"<a name=\'\"+C+\"\'></a><div name=\'\"+C+\"\'></div>\",m.insertBefore(e,m.firstChild);var t=g.getElementsByName&&g.getElementsByName(C).length===2+g.getElementsByName(C+0).length;return h=!g.getElementById(C),m.removeChild(e),t}),nt=Z(function(e){return e.appendChild(g.createComment(\"\")),0===e.getElementsByTagName(\"*\").length}),rt=Z(function(e){return e.innerHTML=\"<a href=\'#\'></a>\",e.firstChild&&typeof e.firstChild.getAttribute!==y&&\"#\"===e.firstChild.getAttribute(\"href\")}),it=Z(function(e){return e.innerHTML=\"<div class=\'hidden e\'></div><div class=\'hidden\'></div>\",e.getElementsByClassName&&0!==e.getElementsByClassName(\"e\").length?(e.lastChild.className=\"e\",1!==e.getElementsByClassName(\"e\").length):!1}),ot=function(e,t,n,r){n=n||[],t=t||g;var i,o,a,s,l=t.nodeType;if(1!==l&&9!==l)return[];if(!e||\"string\"!=typeof e)return n;if(a=lt(t),!a&&!r&&(i=P.exec(e)))if(s=i[1]){if(9===l){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&ut(t,o)&&o.id===s)return n.push(o),n}else{if(i[2])return T.apply(n,w.call(t.getElementsByTagName(e),0)),n;if((s=i[3])&&it&&t.getElementsByClassName)return T.apply(n,w.call(t.getElementsByClassName(s),0)),n}return pt(e,t,n,r,a)},at=ot.selectors={cacheLength:50,match:z,order:[\"ID\",\"TAG\"],attrHandle:{},createPseudo:Y,find:{ID:h?function(e,t,n){if(typeof t.getElementById!==y&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==y&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==y&&i.getAttributeNode(\"id\").value===e?[i]:t:[]}},TAG:nt?function(e,t){return typeof t.getElementsByTagName!==y?t.getElementsByTagName(e):void 0}:function(e,t){var n=t.getElementsByTagName(e);if(\"*\"===e){for(var r,i=[],o=0;r=n[o];o++)1===r.nodeType&&i.push(r);return i}return n}},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,\"\"),e[3]=(e[4]||e[5]||\"\").replace($,\"\"),\"~=\"===e[2]&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),\"nth\"===e[1]?(e[2]||ot.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(\"even\"===e[2]||\"odd\"===e[2])),e[4]=+(e[6]+e[7]||\"odd\"===e[2])):e[2]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=e[4];return z.CHILD.test(e[0])?null:(n&&(t=O.exec(n))&&t.pop()&&(e[0]=e[0].slice(0,t[0].length-n.length-1),n=t[0].slice(0,-1)),e.splice(2,3,n||e[3]),e)}},filter:{ID:h?function(e){return e=e.replace($,\"\"),function(t){return t.getAttribute(\"id\")===e}}:function(e){return e=e.replace($,\"\"),function(t){var n=typeof t.getAttributeNode!==y&&t.getAttributeNode(\"id\");return n&&n.value===e}},TAG:function(e){return\"*\"===e?function(){return!0}:(e=e.replace($,\"\").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=X[e];return t||(t=X[e]=new RegExp(\"(^|\"+k+\")\"+e+\"(\"+k+\"|$)\"),V.push(e),V.length>at.cacheLength&&delete X[V.shift()]),function(e){return t.test(e.className||typeof e.getAttribute!==y&&e.getAttribute(\"class\")||\"\")}},ATTR:function(e,t,n){return t?function(r){var i=ot.attr(r,e),o=i+\"\";if(null==i)return\"!=\"===t;switch(t){case\"=\":return o===n;case\"!=\":return o!==n;case\"^=\":return n&&0===o.indexOf(n);case\"*=\":return n&&o.indexOf(n)>-1;case\"$=\":return n&&o.substr(o.length-n.length)===n;case\"~=\":return(\" \"+o+\" \").indexOf(n)>-1;case\"|=\":return o===n||o.substr(0,n.length+1)===n+\"-\"}}:function(t){return null!=ot.attr(t,e)}},CHILD:function(e,t,n,r){if(\"nth\"===e){var i=x++;return function(e){var t,o,a=0,s=e;if(1===n&&0===r)return!0;if(t=e.parentNode,t&&(t[C]!==i||!e.sizset)){for(s=t.firstChild;s&&(1!==s.nodeType||(s.sizset=++a,s!==e));s=s.nextSibling);t[C]=i}return o=e.sizset-r,0===n?0===o:0===o%n&&o/n>=0}}return function(t){var n=t;switch(e){case\"only\":case\"first\":for(;n=n.previousSibling;)if(1===n.nodeType)return!1;if(\"first\"===e)return!0;n=t;case\"last\":for(;n=n.nextSibling;)if(1===n.nodeType)return!1;return!0}}},PSEUDO:function(e,t,n,r){var i=at.pseudos[e]||at.pseudos[e.toLowerCase()];return i||ot.error(\"unsupported pseudo: \"+e),i.sizzleFilter?i(t,n,r):i}},pseudos:{not:Y(function(e,t,n){var r=ft(e.replace(H,\"$1\"),t,n);return function(e){return!r(e)}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&!!e.checked||\"option\"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!at.pseudos.empty(e)},empty:function(e){var t;for(e=e.firstChild;e;){if(e.nodeName>\"@\"||3===(t=e.nodeType)||4===t)return!1;e=e.nextSibling}return!0},contains:Y(function(e){return function(t){return(t.textContent||t.innerText||ct(t)).indexOf(e)>-1}}),has:Y(function(e){return function(t){return ot(e,t).length>0}}),header:function(e){return R.test(e.nodeName)},text:function(e){var t,n;return\"input\"===e.nodeName.toLowerCase()&&\"text\"===(t=e.type)&&(null==(n=e.getAttribute(\"type\"))||n.toLowerCase()===t)},radio:J(\"radio\"),checkbox:J(\"checkbox\"),file:J(\"file\"),password:J(\"password\"),image:J(\"image\"),submit:G(\"submit\"),reset:G(\"reset\"),button:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&\"button\"===e.type||\"button\"===t},input:function(e){return I.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return!(e!==t.activeElement||t.hasFocus&&!t.hasFocus()||!e.type&&!e.href)},active:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t,n){return n?e.slice(1):[e[0]]},last:function(e,t,n){var r=e.pop();return n?e:[r]},even:function(e,t,n){for(var r=[],i=n?1:0,o=e.length;o>i;i+=2)r.push(e[i]);return r},odd:function(e,t,n){for(var r=[],i=n?0:1,o=e.length;o>i;i+=2)r.push(e[i]);return r},lt:function(e,t,n){return n?e.slice(+t):e.slice(0,+t)},gt:function(e,t,n){return n?e.slice(0,+t+1):e.slice(+t+1)},eq:function(e,t,n){var r=e.splice(+t,1);return n?e:r}}};at.setFilters.nth=at.setFilters.eq,at.filters=at.pseudos,rt||(at.attrHandle={href:function(e){return e.getAttribute(\"href\",2)},type:function(e){return e.getAttribute(\"type\")}}),tt&&(at.order.push(\"NAME\"),at.find.NAME=function(e,t){return typeof t.getElementsByName!==y?t.getElementsByName(e):void 0}),it&&(at.order.splice(1,0,\"CLASS\"),at.find.CLASS=function(e,t,n){return typeof t.getElementsByClassName===y||n?void 0:t.getElementsByClassName(e)});try{w.call(m.childNodes,0)[0].nodeType}catch(st){w=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}var lt=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?\"HTML\"!==t.nodeName:!1},ut=ot.contains=m.compareDocumentPosition?function(e,t){return!!(16&e.compareDocumentPosition(t))}:m.contains?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t.parentNode;return e===r||!!(r&&1===r.nodeType&&n.contains&&n.contains(r))}:function(e,t){for(;t=t.parentNode;)if(t===e)return!0;return!1},ct=ot.getText=function(e){var t,n=\"\",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if(\"string\"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=ct(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=ct(t);return n};ot.attr=function(e,t){var n,r=lt(e);return r||(t=t.toLowerCase()),at.attrHandle[t]?at.attrHandle[t](e):et||r?e.getAttribute(t):(n=e.getAttributeNode(t),n?\"boolean\"==typeof e[t]?e[t]?t:null:n.specified?n.value:null:null)},ot.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},[0,0].sort(function(){return b=0}),m.compareDocumentPosition?p=function(e,t){return e===t?(v=!0,0):(e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t):e.compareDocumentPosition)?-1:1}:(p=function(e,t){if(e===t)return v=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],o=[],a=e.parentNode,s=t.parentNode,l=a;if(a===s)return d(e,t);if(!a)return-1;if(!s)return 1;for(;l;)i.unshift(l),l=l.parentNode;for(l=s;l;)o.unshift(l),l=l.parentNode;n=i.length,r=o.length;for(var u=0;n>u&&r>u;u++)if(i[u]!==o[u])return d(i[u],o[u]);return u===n?d(e,o[u],-1):d(i[u],t,1)},d=function(e,t,n){if(e===t)return n;for(var r=e.nextSibling;r;){if(r===t)return-1;r=r.nextSibling}return 1}),ot.uniqueSort=function(e){var t,n=1;if(p&&(v=b,e.sort(p),v))for(;t=e[n];n++)t===e[n-1]&&e.splice(n--,1);return e};var ft=ot.compile=function(e,t,n){var r,i,a,s=U[e];if(s&&s.context===t)return s;for(i=o(e,t,n),a=0;r=i[a];a++)i[a]=l(r,t,n);return s=U[e]=u(i),s.context=t,s.runs=s.dirruns=0,K.push(e),K.length>at.cacheLength&&delete U[K.shift()],s};ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){return ot(t,null,null,[e]).length>0};var pt=function(e,t,n,r,o){e=e.replace(H,\"$1\");var a,s,l,u,p,d,h,g,m,y=e.match(M),v=e.match(q),b=t.nodeType;if(z.POS.test(e))return i(e,t,n,r,y);if(r)a=w.call(r,0);else if(y&&1===y.length){if(v.length>1&&9===b&&!o&&(y=z.ID.exec(v[0]))){if(t=at.find.ID(y[1],t,o)[0],!t)return n;e=e.slice(v.shift().length)}for(g=(y=B.exec(v[0]))&&!y.index&&t.parentNode||t,m=v.pop(),d=m.split(\":not\")[0],l=0,u=at.order.length;u>l;l++)if(h=at.order[l],y=z[h].exec(d)){if(a=at.find[h]((y[1]||\"\").replace($,\"\"),g,o),null==a)continue;d===m&&(e=e.slice(0,e.length-m.length)+d.replace(z[h],\"\"),e||T.apply(n,w.call(a,0)));break}}if(e)for(s=ft(e,t,o),f=s.dirruns++,null==a&&(a=at.find.TAG(\"*\",B.test(e)&&t.parentNode||t)),l=0;p=a[l];l++)c=s.runs++,s(p,t)&&n.push(p);return n};g.querySelectorAll&&function(){var e,t=pt,n=/\'|\\\\/g,r=/\\=[\\x20\\t\\r\\n\\f]*([^\'\"\\]]*)[\\x20\\t\\r\\n\\f]*\\]/g,i=[],o=[\":active\"],a=m.matchesSelector||m.mozMatchesSelector||m.webkitMatchesSelector||m.oMatchesSelector||m.msMatchesSelector;Z(function(e){e.innerHTML=\"<select><option selected></option></select>\",e.querySelectorAll(\"[selected]\").length||i.push(\"\\\\[\"+k+\"*(?:checked|disabled|ismap|multiple|readonly|selected|value)\"),e.querySelectorAll(\":checked\").length||i.push(\":checked\")}),Z(function(e){e.innerHTML=\"<p test=\'\'></p>\",e.querySelectorAll(\"[test^=\'\']\").length&&i.push(\"[*^$]=\"+k+\"*(?:\\\"\\\"|\'\')\"),e.innerHTML=\"<input type=\'hidden\'>\",e.querySelectorAll(\":enabled\").length||i.push(\":enabled\",\":disabled\")}),i=i.length&&new RegExp(i.join(\"|\")),pt=function(e,r,o,a,s){if(!(a||s||i&&i.test(e)))if(9===r.nodeType)try{return T.apply(o,w.call(r.querySelectorAll(e),0)),o}catch(l){}else if(1===r.nodeType&&\"object\"!==r.nodeName.toLowerCase()){var u=r.getAttribute(\"id\"),c=u||C,f=B.test(e)&&r.parentNode||r;u?c=c.replace(n,\"\\\\'{{carryallCargo}}'\"):r.setAttribute(\"id\",c);try{return T.apply(o,w.call(f.querySelectorAll(e.replace(M,\"[id=\'\"+c+\"\'] '{{carryallCargo}}'\")),0)),o}catch(l){}finally{u||r.removeAttribute(\"id\")}}return t(e,r,o,a,s)},a&&(Z(function(t){e=a.call(t,\"div\");try{a.call(t,\"[test!=\'\']:sizzle\"),o.push(at.match.PSEUDO)}catch(n){}}),o=new RegExp(o.join(\"|\")),ot.matchesSelector=function(t,n){if(n=n.replace(r,\"=\'$1\']\"),!(lt(t)||o.test(n)||i&&i.test(n)))try{var s=a.call(t,n);if(s||e||t.document&&11!==t.document.nodeType)return s}catch(l){}return ot(n,null,null,[t]).length>0})}(),ot.attr=Q.attr,Q.find=ot,Q.expr=ot.selectors,Q.expr[\":\"]=Q.expr.pseudos,Q.unique=ot.uniqueSort,Q.text=ot.getText,Q.isXMLDoc=ot.isXML,Q.contains=ot.contains}(e);var Ft=/Until$/,Mt=/^(?:parents|prev(?:Until|All))/,Ot=/^.[^:#\\[\\.,]*$/,qt=Q.expr.match.needsContext,Pt={children:!0,contents:!0,next:!0,prev:!0};Q.fn.extend({find:function(e){var t,n,r,i,o,a,s=this;if(\"string\"!=typeof e)return Q(e).filter(function(){for(t=0,n=s.length;n>t;t++)if(Q.contains(s[t],this))return!0});for(a=this.pushStack(\"\",\"find\",e),t=0,n=this.length;n>t;t++)if(r=a.length,Q.find(e,this[t],a),t>0)for(i=r;i<a.length;i++)for(o=0;r>o;o++)if(a[o]===a[i]){a.splice(i--,1);break}return a},has:function(e){var t,n=Q(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(Q.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(u(this,e,!1),\"not\",e)},filter:function(e){return this.pushStack(u(this,e,!0),\"filter\",e)},is:function(e){return!!e&&(\"string\"==typeof e?qt.test(e)?Q(e,this.context).index(this[0])>=0:Q.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=qt.test(e)||\"string\"!=typeof e?Q(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:Q.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return o=o.length>1?Q.unique(o):o,this.pushStack(o,\"closest\",e)},index:function(e){return e?\"string\"==typeof e?Q.inArray(this[0],Q(e)):Q.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=\"string\"==typeof e?Q(e,t):Q.makeArray(e&&e.nodeType?[e]:e),r=Q.merge(this.get(),n);return this.pushStack(s(n[0])||s(r[0])?r:Q.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Q.fn.andSelf=Q.fn.addBack,Q.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Q.dir(e,\"parentNode\")},parentsUntil:function(e,t,n){return Q.dir(e,\"parentNode\",n)},next:function(e){return l(e,\"nextSibling\")},prev:function(e){return l(e,\"previousSibling\")},nextAll:function(e){return Q.dir(e,\"nextSibling\")},prevAll:function(e){return Q.dir(e,\"previousSibling\")},nextUntil:function(e,t,n){return Q.dir(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return Q.dir(e,\"previousSibling\",n)},siblings:function(e){return Q.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Q.sibling(e.firstChild)},contents:function(e){return Q.nodeName(e,\"iframe\")?e.contentDocument||e.contentWindow.document:Q.merge([],e.childNodes)}},function(e,t){Q.fn[e]=function(n,r){var i=Q.map(this,t,n);return Ft.test(e)||(r=n),r&&\"string\"==typeof r&&(i=Q.filter(r,i)),i=this.length>1&&!Pt[e]?Q.unique(i):i,this.length>1&&Mt.test(e)&&(i=i.reverse()),this.pushStack(i,e,U.call(arguments).join(\",\"))}}),Q.extend({filter:function(e,t,n){return n&&(e=\":not(\"+e+\")\"),1===t.length?Q.find.matchesSelector(t[0],e)?[t[0]]:[]:Q.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!Q(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Bt=\"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",Wt=/ jQuery\\d+=\"(?:null|\\d+)\"/g,Rt=/^\\s+/,It=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,$t=/<([\\w:]+)/,zt=/<tbody/i,Xt=/<|&#?\\w+;/,Vt=/<(?:script|style|link)/i,Ut=/<(?:script|object|embed|option|style)/i,Kt=new RegExp(\"<(?:\"+Bt+\")[\\\\s/>]\",\"i\"),Yt=/^(?:checkbox|radio)$/,Jt=/checked\\s*(?:[^=]|=\\s*.checked.)/i,Gt=/\\/(java|ecma)script/i,Qt=/^\\s*<!(?:\\[CDATA\\[|\\-\\-)|[\\]\\-]{2}>\\s*$/g,Zt={option:[1,\"<select multiple=\'multiple\'>\",\"</select>\"],legend:[1,\"<fieldset>\",\"</fieldset>\"],thead:[1,\"<table>\",\"</table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],col:[2,\"<table><tbody></tbody><colgroup>\",\"</colgroup></table>\"],area:[1,\"<map>\",\"</map>\"],_default:[0,\"\",\"\"]},en=c(R),tn=en.appendChild(R.createElement(\"div\"));\nZt.optgroup=Zt.option,Zt.tbody=Zt.tfoot=Zt.colgroup=Zt.caption=Zt.thead,Zt.th=Zt.td,Q.support.htmlSerialize||(Zt._default=[1,\"X<div>\",\"</div>\"]),Q.fn.extend({text:function(e){return Q.access(this,function(e){return e===t?Q.text(this):this.empty().append((this[0]&&this[0].ownerDocument||R).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(Q.isFunction(e))return this.each(function(t){Q(this).wrapAll(e.call(this,t))});if(this[0]){var t=Q(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return Q.isFunction(e)?this.each(function(t){Q(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Q(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Q.isFunction(e);return this.each(function(n){Q(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Q.nodeName(this,\"body\")||Q(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!s(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=Q.clean(arguments);return this.pushStack(Q.merge(e,this),\"before\",this.selector)}},after:function(){if(!s(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=Q.clean(arguments);return this.pushStack(Q.merge(this,e),\"after\",this.selector)}},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||Q.filter(e,[n]).length)&&(t||1!==n.nodeType||(Q.cleanData(n.getElementsByTagName(\"*\")),Q.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&Q.cleanData(e.getElementsByTagName(\"*\"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Q.clone(this,e,t)})},html:function(e){return Q.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Wt,\"\"):t;if(!(\"string\"!=typeof e||Vt.test(e)||!Q.support.htmlSerialize&&Kt.test(e)||!Q.support.leadingWhitespace&&Rt.test(e)||Zt[($t.exec(e)||[\"\",\"\"])[1].toLowerCase()])){e=e.replace(It,\"<$1></$2>\");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(Q.cleanData(n.getElementsByTagName(\"*\")),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return s(this[0])?this.length?this.pushStack(Q(Q.isFunction(e)?e():e),\"replaceWith\",e):this:Q.isFunction(e)?this.each(function(t){var n=Q(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(\"string\"!=typeof e&&(e=Q(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;Q(this).remove(),t?Q(t).before(e):Q(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,o,a,s,l=0,u=e[0],c=[],p=this.length;if(!Q.support.checkClone&&p>1&&\"string\"==typeof u&&Jt.test(u))return this.each(function(){Q(this).domManip(e,n,r)});if(Q.isFunction(u))return this.each(function(i){var o=Q(this);e[0]=u.call(this,i,n?o.html():t),o.domManip(e,n,r)});if(this[0]){if(i=Q.buildFragment(e,this,c),a=i.fragment,o=a.firstChild,1===a.childNodes.length&&(a=o),o)for(n=n&&Q.nodeName(o,\"tr\"),s=i.cacheable||p-1;p>l;l++)r.call(n&&Q.nodeName(this[l],\"table\")?f(this[l],\"tbody\"):this[l],l===s?a:Q.clone(a,!0,!0));a=o=null,c.length&&Q.each(c,function(e,t){t.src?Q.ajax?Q.ajax({url:t.src,type:\"GET\",dataType:\"script\",async:!1,global:!1,\"throws\":!0}):Q.error(\"no ajax\"):Q.globalEval((t.text||t.textContent||t.innerHTML||\"\").replace(Qt,\"\")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),Q.buildFragment=function(e,n,r){var i,o,a,s=e[0];return n=n||R,n=(n[0]||n).ownerDocument||n[0]||n,\"undefined\"==typeof n.createDocumentFragment&&(n=R),!(1===e.length&&\"string\"==typeof s&&s.length<512&&n===R&&\"<\"===s.charAt(0))||Ut.test(s)||!Q.support.checkClone&&Jt.test(s)||!Q.support.html5Clone&&Kt.test(s)||(o=!0,i=Q.fragments[s],a=i!==t),i||(i=n.createDocumentFragment(),Q.clean(e,n,i,r),o&&(Q.fragments[s]=a&&i)),{fragment:i,cacheable:o}},Q.fragments={},Q.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(e,t){Q.fn[e]=function(n){var r,i=0,o=[],a=Q(n),s=a.length,l=1===this.length&&this[0].parentNode;if((null==l||l&&11===l.nodeType&&1===l.childNodes.length)&&1===s)return a[t](this[0]),this;for(;s>i;i++)r=(i>0?this.clone(!0):this).get(),Q(a[i])[t](r),o=o.concat(r);return this.pushStack(o,e,a.selector)}}),Q.extend({clone:function(e,t,n){var r,i,o,a;if(Q.support.html5Clone||Q.isXMLDoc(e)||!Kt.test(\"<\"+e.nodeName+\">\")?a=e.cloneNode(!0):(tn.innerHTML=e.outerHTML,tn.removeChild(a=tn.firstChild)),!(Q.support.noCloneEvent&&Q.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Q.isXMLDoc(e)))for(d(e,a),r=h(e),i=h(a),o=0;r[o];++o)i[o]&&d(r[o],i[o]);if(t&&(p(e,a),n))for(r=h(e),i=h(a),o=0;r[o];++o)p(r[o],i[o]);return r=i=null,a},clean:function(e,t,n,r){var i,o,a,s,l,u,f,p,d,h,m,y=0,v=[];for(t&&\"undefined\"!=typeof t.createDocumentFragment||(t=R),o=t===R&&en;null!=(a=e[y]);y++)if(\"number\"==typeof a&&(a+=\"\"),a){if(\"string\"==typeof a)if(Xt.test(a)){for(o=o||c(t),f=f||o.appendChild(t.createElement(\"div\")),a=a.replace(It,\"<$1></$2>\"),s=($t.exec(a)||[\"\",\"\"])[1].toLowerCase(),l=Zt[s]||Zt._default,u=l[0],f.innerHTML=l[1]+a+l[2];u--;)f=f.lastChild;if(!Q.support.tbody)for(p=zt.test(a),d=\"table\"!==s||p?\"<table>\"!==l[1]||p?[]:f.childNodes:f.firstChild&&f.firstChild.childNodes,i=d.length-1;i>=0;--i)Q.nodeName(d[i],\"tbody\")&&!d[i].childNodes.length&&d[i].parentNode.removeChild(d[i]);!Q.support.leadingWhitespace&&Rt.test(a)&&f.insertBefore(t.createTextNode(Rt.exec(a)[0]),f.firstChild),a=f.childNodes,f=o.lastChild}else a=t.createTextNode(a);a.nodeType?v.push(a):v=Q.merge(v,a)}if(f&&(o.removeChild(f),a=f=o=null),!Q.support.appendChecked)for(y=0;null!=(a=v[y]);y++)Q.nodeName(a,\"input\")?g(a):\"undefined\"!=typeof a.getElementsByTagName&&Q.grep(a.getElementsByTagName(\"input\"),g);if(n)for(h=function(e){return!e.type||Gt.test(e.type)?r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e):void 0},y=0;null!=(a=v[y]);y++)Q.nodeName(a,\"script\")&&h(a)||(n.appendChild(a),\"undefined\"!=typeof a.getElementsByTagName&&(m=Q.grep(Q.merge([],a.getElementsByTagName(\"script\")),h),v.splice.apply(v,[y+1,0].concat(m)),y+=m.length));return v},cleanData:function(e,t){for(var n,r,i,o,a=0,s=Q.expando,l=Q.cache,u=Q.support.deleteExpando,c=Q.event.special;null!=(i=e[a]);a++)if((t||Q.acceptData(i))&&(r=i[s],n=r&&l[r])){if(n.events)for(o in n.events)c[o]?Q.event.remove(i,o):Q.removeEvent(i,o,n.handle);l[r]&&(delete l[r],u?delete i[s]:i.removeAttribute?i.removeAttribute(s):i[s]=null,Q.deletedIds.push(r))}}}),function(){var e,t;Q.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \\/]([\\w.]+)/.exec(e)||/(webkit)[ \\/]([\\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(e)||/(msie) ([\\w.]+)/.exec(e)||e.indexOf(\"compatible\")<0&&/(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(e)||[];return{browser:t[1]||\"\",version:t[2]||\"0\"}},e=Q.uaMatch($.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.webkit&&(t.safari=!0),Q.browser=t,Q.sub=function(){function e(t,n){return new e.fn.init(t,n)}Q.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,r){return r&&r instanceof Q&&!(r instanceof e)&&(r=e(r)),Q.fn.init.call(this,n,r,t)},e.fn.init.prototype=e.fn;var t=e(R);return e}}();var nn,rn,on,an=/alpha\\([^)]*\\)/i,sn=/opacity=([^)]*)/,ln=/^(top|right|bottom|left)$/,un=/^margin/,cn=new RegExp(\"^(\"+Z+\")(.*)$\",\"i\"),fn=new RegExp(\"^(\"+Z+\")(?!px)[a-z%]+$\",\"i\"),pn=new RegExp(\"^([-+])=(\"+Z+\")\",\"i\"),dn={},hn={position:\"absolute\",visibility:\"hidden\",display:\"block\"},gn={letterSpacing:0,fontWeight:400,lineHeight:1},mn=[\"Top\",\"Right\",\"Bottom\",\"Left\"],yn=[\"Webkit\",\"O\",\"Moz\",\"ms\"],vn=Q.fn.toggle;Q.fn.extend({css:function(e,n){return Q.access(this,function(e,n,r){return r!==t?Q.style(e,n,r):Q.css(e,n)},e,n,arguments.length>1)},show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e,t){var n=\"boolean\"==typeof e;return Q.isFunction(e)&&Q.isFunction(t)?vn.apply(this,arguments):this.each(function(){(n?e:y(this))?Q(this).show():Q(this).hide()})}}),Q.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nn(e,\"opacity\");return\"\"===n?\"1\":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":Q.support.cssFloat?\"cssFloat\":\"styleFloat\"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=Q.camelCase(n),u=e.style;if(n=Q.cssProps[l]||(Q.cssProps[l]=m(u,l)),s=Q.cssHooks[n]||Q.cssHooks[l],r===t)return s&&\"get\"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,\"string\"===a&&(o=pn.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(Q.css(e,n)),a=\"number\"),!(null==r||\"number\"===a&&isNaN(r)||(\"number\"!==a||Q.cssNumber[l]||(r+=\"px\"),s&&\"set\"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=Q.camelCase(n);return n=Q.cssProps[l]||(Q.cssProps[l]=m(e.style,l)),s=Q.cssHooks[n]||Q.cssHooks[l],s&&\"get\"in s&&(o=s.get(e,!0,i)),o===t&&(o=nn(e,n)),\"normal\"===o&&n in gn&&(o=gn[n]),r||i!==t?(a=parseFloat(o),r||Q.isNumeric(a)?a||0:o):o},swap:function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=o[i];return r}}),e.getComputedStyle?nn=function(e,t){var n,r,i,o,a=getComputedStyle(e,null),s=e.style;return a&&(n=a[t],\"\"!==n||Q.contains(e.ownerDocument.documentElement,e)||(n=Q.style(e,t)),fn.test(n)&&un.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=n,n=a.width,s.width=r,s.minWidth=i,s.maxWidth=o)),n}:R.documentElement.currentStyle&&(nn=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],o=e.style;return null==i&&o&&o[t]&&(i=o[t]),fn.test(i)&&!ln.test(t)&&(n=o.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),o.left=\"fontSize\"===t?\"1em\":i,i=o.pixelLeft+\"px\",o.left=n,r&&(e.runtimeStyle.left=r)),\"\"===i?\"auto\":i}),Q.each([\"height\",\"width\"],function(e,t){Q.cssHooks[t]={get:function(e,n,r){return n?0!==e.offsetWidth||\"none\"!==nn(e,\"display\")?w(e,t,r):Q.swap(e,hn,function(){return w(e,t,r)}):void 0},set:function(e,n,r){return b(e,n,r?x(e,t,r,Q.support.boxSizing&&\"border-box\"===Q.css(e,\"boxSizing\")):0)}}}),Q.support.opacity||(Q.cssHooks.opacity={get:function(e,t){return sn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||\"\")?.01*parseFloat(RegExp.$1)+\"\":t?\"1\":\"\"},set:function(e,t){var n=e.style,r=e.currentStyle,i=Q.isNumeric(t)?\"alpha(opacity=\"+100*t+\")\":\"\",o=r&&r.filter||n.filter||\"\";n.zoom=1,t>=1&&\"\"===Q.trim(o.replace(an,\"\"))&&n.removeAttribute&&(n.removeAttribute(\"filter\"),r&&!r.filter)||(n.filter=an.test(o)?o.replace(an,i):o+\" \"+i)}}),Q(function(){Q.support.reliableMarginRight||(Q.cssHooks.marginRight={get:function(e,t){return Q.swap(e,{display:\"inline-block\"},function(){return t?nn(e,\"marginRight\"):void 0})}}),!Q.support.pixelPosition&&Q.fn.position&&Q.each([\"top\",\"left\"],function(e,t){Q.cssHooks[t]={get:function(e,n){if(n){var r=nn(e,t);return fn.test(r)?Q(e).position()[t]+\"px\":r}}}})}),Q.expr&&Q.expr.filters&&(Q.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!Q.support.reliableHiddenOffsets&&\"none\"===(e.style&&e.style.display||nn(e,\"display\"))},Q.expr.filters.visible=function(e){return!Q.expr.filters.hidden(e)}),Q.each({margin:\"\",padding:\"\",border:\"Width\"},function(e,t){Q.cssHooks[e+t]={expand:function(n){var r,i=\"string\"==typeof n?n.split(\" \"):[n],o={};for(r=0;4>r;r++)o[e+mn[r]+t]=i[r]||i[r-2]||i[0];return o}},un.test(e)||(Q.cssHooks[e+t].set=b)});var bn=/%20/g,xn=/\\[\\]$/,wn=/\\r?\\n/g,Tn=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Cn=/^(?:select|textarea)/i;Q.fn.extend({serialize:function(){return Q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Q.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Cn.test(this.nodeName)||Tn.test(this.type))}).map(function(e,t){var n=Q(this).val();return null==n?null:Q.isArray(n)?Q.map(n,function(e){return{name:t.name,value:e.replace(wn,\"\\r\\n\")}}):{name:t.name,value:n.replace(wn,\"\\r\\n\")}}).get()}}),Q.param=function(e,n){var r,i=[],o=function(e,t){t=Q.isFunction(t)?t():null==t?\"\":t,i[i.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(t)};if(n===t&&(n=Q.ajaxSettings&&Q.ajaxSettings.traditional),Q.isArray(e)||e.jquery&&!Q.isPlainObject(e))Q.each(e,function(){o(this.name,this.value)});else for(r in e)C(r,e[r],n,o);return i.join(\"&\").replace(bn,\"+\")};var kn,Nn,En=/#.*$/,Sn=/^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/gm,An=/^(?:about|app|app\\-storage|.+\\-extension|file|res|widget):$/,jn=/^(?:GET|HEAD)$/,Dn=/^\\/\\//,Ln=/\\?/,_n=/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,Hn=/([?&])_=[^&]*/,Fn=/^([\\w\\+\\.\\-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,Mn=Q.fn.load,On={},qn={},Pn=[\"*/\"]+[\"*\"];try{kn=I.href}catch(Bn){kn=R.createElement(\"a\"),kn.href=\"\",kn=kn.href}Nn=Fn.exec(kn.toLowerCase())||[],Q.fn.load=function(e,n,r){if(\"string\"!=typeof e&&Mn)return Mn.apply(this,arguments);if(!this.length)return this;var i,o,a,s=this,l=e.indexOf(\" \");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),Q.isFunction(n)?(r=n,n=t):\"object\"==typeof n&&(o=\"POST\"),Q.ajax({url:e,type:o,dataType:\"html\",data:n,complete:function(e,t){r&&s.each(r,a||[e.responseText,t,e])}}).done(function(e){a=arguments,s.html(i?Q(\"<div>\").append(e.replace(_n,\"\")).find(i):e)}),this},Q.each(\"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split(\" \"),function(e,t){Q.fn[t]=function(e){return this.on(t,e)}}),Q.each([\"get\",\"post\"],function(e,n){Q[n]=function(e,r,i,o){return Q.isFunction(r)&&(o=o||i,i=r,r=t),Q.ajax({type:n,url:e,data:r,success:i,dataType:o})}}),Q.extend({getScript:function(e,n){return Q.get(e,t,n,\"script\")},getJSON:function(e,t,n){return Q.get(e,t,n,\"json\")},ajaxSetup:function(e,t){return t?E(e,Q.ajaxSettings):(t=e,e=Q.ajaxSettings),E(e,t),e},ajaxSettings:{url:kn,isLocal:An.test(Nn[1]),global:!0,type:\"GET\",contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",processData:!0,async:!0,accepts:{xml:\"application/xml, text/xml\",html:\"text/html\",text:\"text/plain\",json:\"application/json, text/javascript\",\"*\":Pn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:\"responseXML\",text:\"responseText\"},converters:{\"* text\":e.String,\"text html\":!0,\"text json\":Q.parseJSON,\"text xml\":Q.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:k(On),ajaxTransport:k(qn),ajax:function(e,n){function r(e,n,r,a){var u,f,v,b,w,C=n;2!==x&&(x=2,l&&clearTimeout(l),s=t,o=a||\"\",T.readyState=e>0?4:0,r&&(b=S(p,T,r)),e>=200&&300>e||304===e?(p.ifModified&&(w=T.getResponseHeader(\"Last-Modified\"),w&&(Q.lastModified[i]=w),w=T.getResponseHeader(\"Etag\"),w&&(Q.etag[i]=w)),304===e?(C=\"notmodified\",u=!0):(u=A(p,b),C=u.state,f=u.data,v=u.error,u=!v)):(v=C,(!C||e)&&(C=\"error\",0>e&&(e=0))),T.status=e,T.statusText=\"\"+(n||C),u?g.resolveWith(d,[f,C,T]):g.rejectWith(d,[T,C,v]),T.statusCode(y),y=t,c&&h.trigger(\"ajax\"+(u?\"Success\":\"Error\"),[T,p,u?f:v]),m.fireWith(d,[T,C]),c&&(h.trigger(\"ajaxComplete\",[T,p]),--Q.active||Q.event.trigger(\"ajaxStop\")))}\"object\"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,l,u,c,f,p=Q.ajaxSetup({},n),d=p.context||p,h=d!==p&&(d.nodeType||d instanceof Q)?Q(d):Q.event,g=Q.Deferred(),m=Q.Callbacks(\"once memory\"),y=p.statusCode||{},v={},b={},x=0,w=\"canceled\",T={readyState:0,setRequestHeader:function(e,t){if(!x){var n=e.toLowerCase();e=b[n]=b[n]||e,v[e]=t}return this},getAllResponseHeaders:function(){return 2===x?o:null},getResponseHeader:function(e){var n;if(2===x){if(!a)for(a={};n=Sn.exec(o);)a[n[1].toLowerCase()]=n[2];n=a[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return x||(p.mimeType=e),this},abort:function(e){return e=e||w,s&&s.abort(e),r(0,e),this}};if(g.promise(T),T.success=T.done,T.error=T.fail,T.complete=m.add,T.statusCode=function(e){if(e){var t;if(2>x)for(t in e)y[t]=[y[t],e[t]];else t=e[T.status],T.always(t)}return this},p.url=((e||p.url)+\"\").replace(En,\"\").replace(Dn,Nn[1]+\"//\"),p.dataTypes=Q.trim(p.dataType||\"*\").toLowerCase().split(tt),null==p.crossDomain&&(u=Fn.exec(p.url.toLowerCase()),p.crossDomain=!(!u||u[1]==Nn[1]&&u[2]==Nn[2]&&(u[3]||(\"http:\"===u[1]?80:443))==(Nn[3]||(\"http:\"===Nn[1]?80:443)))),p.data&&p.processData&&\"string\"!=typeof p.data&&(p.data=Q.param(p.data,p.traditional)),N(On,p,n,T),2===x)return T;if(c=p.global,p.type=p.type.toUpperCase(),p.hasContent=!jn.test(p.type),c&&0===Q.active++&&Q.event.trigger(\"ajaxStart\"),!p.hasContent&&(p.data&&(p.url+=(Ln.test(p.url)?\"&\":\"?\")+p.data,delete p.data),i=p.url,p.cache===!1)){var C=Q.now(),k=p.url.replace(Hn,\"$1_=\"+C);p.url=k+(k===p.url?(Ln.test(p.url)?\"&\":\"?\")+\"_=\"+C:\"\")}(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&T.setRequestHeader(\"Content-Type\",p.contentType),p.ifModified&&(i=i||p.url,Q.lastModified[i]&&T.setRequestHeader(\"If-Modified-Since\",Q.lastModified[i]),Q.etag[i]&&T.setRequestHeader(\"If-None-Match\",Q.etag[i])),T.setRequestHeader(\"Accept\",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+(\"*\"!==p.dataTypes[0]?\", \"+Pn+\"; q=0.01\":\"\"):p.accepts[\"*\"]);for(f in p.headers)T.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(d,T,p)===!1||2===x))return T.abort();w=\"abort\";for(f in{success:1,error:1,complete:1})T[f](p[f]);if(s=N(qn,p,n,T)){T.readyState=1,c&&h.trigger(\"ajaxSend\",[T,p]),p.async&&p.timeout>0&&(l=setTimeout(function(){T.abort(\"timeout\")},p.timeout));try{x=1,s.send(v,r)}catch(E){if(!(2>x))throw E;r(-1,E)}}else r(-1,\"No Transport\");return T},active:0,lastModified:{},etag:{}});var Wn=[],Rn=/\\?/,In=/(=)\\?(?=&|$)|\\?\\?/,$n=Q.now();Q.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var e=Wn.pop()||Q.expando+\"_\"+$n++;return this[e]=!0,e}}),Q.ajaxPrefilter(\"json jsonp\",function(n,r,i){var o,a,s,l=n.data,u=n.url,c=n.jsonp!==!1,f=c&&In.test(u),p=c&&!f&&\"string\"==typeof l&&!(n.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&In.test(l);return\"jsonp\"===n.dataTypes[0]||f||p?(o=n.jsonpCallback=Q.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,a=e[o],f?n.url=u.replace(In,\"$1\"+o):p?n.data=l.replace(In,\"$1\"+o):c&&(n.url+=(Rn.test(u)?\"&\":\"?\")+n.jsonp+\"=\"+o),n.converters[\"script json\"]=function(){return s||Q.error(o+\" was not called\"),s[0]},n.dataTypes[0]=\"json\",e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Wn.push(o)),s&&Q.isFunction(a)&&a(s[0]),s=a=t}),\"script\"):void 0}),Q.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/javascript|ecmascript/},converters:{\"text script\":function(e){return Q.globalEval(e),e}}}),Q.ajaxPrefilter(\"script\",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\",e.global=!1)}),Q.ajaxTransport(\"script\",function(e){if(e.crossDomain){var n,r=R.head||R.getElementsByTagName(\"head\")[0]||R.documentElement;return{send:function(i,o){n=R.createElement(\"script\"),n.async=\"async\",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){(i||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,\"success\"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var zn,Xn=e.ActiveXObject?function(){for(var e in zn)zn[e](0,1)}:!1,Vn=0;Q.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&j()||D()}:j,function(e){Q.extend(Q.support,{ajax:!!e,cors:!!e&&\"withCredentials\"in e})}(Q.ajaxSettings.xhr()),Q.support.ajax&&Q.ajaxTransport(function(n){if(!n.crossDomain||Q.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i[\"X-Requested-With\"]||(i[\"X-Requested-With\"]=\"XMLHttpRequest\");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,f,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=Q.noop,Xn&&delete zn[a]),i)4!==l.readyState&&l.abort();else{s=l.status,c=l.getAllResponseHeaders(),f={},p=l.responseXML,p&&p.documentElement&&(f.xml=p);try{f.text=l.responseText}catch(e){}try{u=l.statusText}catch(d){u=\"\"}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(h){i||o(-1,h)}f&&o(s,u,f,c)},n.async?4===l.readyState?setTimeout(r,0):(a=++Vn,Xn&&(zn||(zn={},Q(e).unload(Xn)),zn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var Un,Kn,Yn=/^(?:toggle|show|hide)$/,Jn=new RegExp(\"^(?:([-+])=|)(\"+Z+\")([a-z%]*)$\",\"i\"),Gn=/queueHooks$/,Qn=[M],Zn={\"*\":[function(e,t){var n,r,i,o=this.createTween(e,t),a=Jn.exec(t),s=o.cur(),l=+s||0,u=1;if(a){if(n=+a[2],r=a[3]||(Q.cssNumber[e]?\"\":\"px\"),\"px\"!==r&&l){l=Q.css(o.elem,e,!0)||n||1;do i=u=u||\".5\",l/=u,Q.style(o.elem,e,l+r),u=o.cur()/s;while(1!==u&&u!==i)}o.unit=r,o.start=l,o.end=a[1]?l+(a[1]+1)*n:n}return o}]};Q.Animation=Q.extend(H,{tweener:function(e,t){Q.isFunction(e)?(t=e,e=[\"*\"]):e=e.split(\" \");for(var n,r=0,i=e.length;i>r;r++)n=e[r],Zn[n]=Zn[n]||[],Zn[n].unshift(t)},prefilter:function(e,t){t?Qn.unshift(e):Qn.push(e)}}),Q.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||\"swing\",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Q.cssNumber[n]?\"\":\"px\")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.pos=t=Q.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration),this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Q.css(e.elem,e.prop,!1,\"\"),t&&\"auto\"!==t?t:0):e.elem[e.prop]},set:function(e){Q.fx.step[e.prop]?Q.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Q.cssProps[e.prop]]||Q.cssHooks[e.prop])?Q.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Q.each([\"toggle\",\"show\",\"hide\"],function(e,t){var n=Q.fn[t];Q.fn[t]=function(r,i,o){return null==r||\"boolean\"==typeof r||!e&&Q.isFunction(r)&&Q.isFunction(i)?n.apply(this,arguments):this.animate(q(t,!0),r,i,o)}}),Q.fn.extend({fadeTo:function(e,t,n,r){return this.filter(y).css(\"opacity\",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Q.isEmptyObject(e),o=Q.speed(t,n,r),a=function(){var t=H(this,Q.extend({},e),o);i&&t.stop(!0)};return i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return\"string\"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||\"fx\",[]),this.each(function(){var t=!0,n=null!=e&&e+\"queueHooks\",o=Q.timers,a=Q._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Gn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&Q.dequeue(this,e)})}}),Q.each({slideDown:q(\"show\"),slideUp:q(\"hide\"),slideToggle:q(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(e,t){Q.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Q.speed=function(e,t,n){var r=e&&\"object\"==typeof e?Q.extend({},e):{complete:n||!n&&t||Q.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Q.isFunction(t)&&t};return r.duration=Q.fx.off?0:\"number\"==typeof r.duration?r.duration:r.duration in Q.fx.speeds?Q.fx.speeds[r.duration]:Q.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue=\"fx\"),r.old=r.complete,r.complete=function(){Q.isFunction(r.old)&&r.old.call(this),r.queue&&Q.dequeue(this,r.queue)},r},Q.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Q.timers=[],Q.fx=O.prototype.init,Q.fx.tick=function(){for(var e,t=Q.timers,n=0;n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||Q.fx.stop()},Q.fx.timer=function(e){e()&&Q.timers.push(e)&&!Kn&&(Kn=setInterval(Q.fx.tick,Q.fx.interval))},Q.fx.interval=13,Q.fx.stop=function(){clearInterval(Kn),Kn=null},Q.fx.speeds={slow:600,fast:200,_default:400},Q.fx.step={},Q.expr&&Q.expr.filters&&(Q.expr.filters.animated=function(e){return Q.grep(Q.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;Q.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){Q.offset.setOffset(this,e,t)});var n,r,i,o,a,s,l,u,c,f,p=this[0],d=p&&p.ownerDocument;if(d)return(i=d.body)===p?Q.offset.bodyOffset(p):(r=d.documentElement,Q.contains(r,p)?(n=p.getBoundingClientRect(),o=P(d),a=r.clientTop||i.clientTop||0,s=r.clientLeft||i.clientLeft||0,l=o.pageYOffset||r.scrollTop,u=o.pageXOffset||r.scrollLeft,c=n.top+l-a,f=n.left+u-s,{top:c,left:f}):{top:0,left:0})},Q.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return Q.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(Q.css(e,\"marginTop\"))||0,n+=parseFloat(Q.css(e,\"marginLeft\"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=Q.css(e,\"position\");\"static\"===r&&(e.style.position=\"relative\");var i,o,a=Q(e),s=a.offset(),l=Q.css(e,\"top\"),u=Q.css(e,\"left\"),c=(\"absolute\"===r||\"fixed\"===r)&&Q.inArray(\"auto\",[l,u])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(l)||0,o=parseFloat(u)||0),Q.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),\"using\"in t?t.using.call(e,f):a.css(f)}},Q.fn.extend({position:function(){if(this[0]){var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(Q.css(e,\"marginTop\"))||0,n.left-=parseFloat(Q.css(e,\"marginLeft\"))||0,r.top+=parseFloat(Q.css(t[0],\"borderTopWidth\"))||0,r.left+=parseFloat(Q.css(t[0],\"borderLeftWidth\"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||R.body;e&&!er.test(e.nodeName)&&\"static\"===Q.css(e,\"position\");)e=e.offsetParent;return e||R.body})}}),Q.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(e,n){var r=/Y/.test(n);Q.fn[e]=function(i){return Q.access(this,function(e,i,o){var a=P(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?Q(a).scrollLeft():o,r?o:Q(a).scrollTop()):e[i]=o,void 0)},e,i,arguments.length,null)}}),Q.each({Height:\"height\",Width:\"width\"},function(e,n){Q.each({padding:\"inner\"+e,content:n,\"\":\"outer\"+e},function(r,i){Q.fn[i]=function(i,o){var a=arguments.length&&(r||\"boolean\"!=typeof i),s=r||(i===!0||o===!0?\"margin\":\"border\");return Q.access(this,function(n,r,i){var o;return Q.isWindow(n)?n.document.documentElement[\"client\"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body[\"scroll\"+e],o[\"scroll\"+e],n.body[\"offset\"+e],o[\"offset\"+e],o[\"client\"+e])):i===t?Q.css(n,r,i,s):Q.style(n,r,i,s)},n,a?i:t,a)}})}),e.jQuery=e.$=Q,\"function\"==typeof define&&define.amd&&define.amd.jQuery&&define(\"jquery\",[],function(){return Q})}(window);"},{"name": "json2.js", "payload": "\"object\"!=typeof JSON&&(JSON={}),function(){\"use strict\";function f(e){return 10>e?\"0\"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?\'\"\'+e.replace(escapable,function(e){var t=meta[e];return\"string\"==typeof t?t:\"\\\\u\"+(\"0000\"+e.charCodeAt(0).toString(16)).slice(-4)})+\'\"\':\'\"\'+e+\'\"\'}function str(e,t){var n,r,i,o,a,s=gap,u=t[e];switch(u&&\"object\"==typeof u&&\"function\"==typeof u.toJSON&&(u=u.toJSON(e)),\"function\"==typeof rep&&(u=rep.call(t,e,u)),typeof u){case\"string\":return quote(u);case\"number\":return isFinite(u)?String(u):\"null\";case\"boolean\":case\"null\":return String(u);case\"object\":if(!u)return\"null\";if(gap+=indent,a=[],\"[object Array]\"===Object.prototype.toString.apply(u)){for(o=u.length,n=0;o>n;n+=1)a[n]=str(n,u)||\"null\";return i=0===a.length?\"[]\":gap?\"[\\n\"+gap+a.join(\",\\n\"+gap)+\"\\n\"+s+\"]\":\"[\"+a.join(\",\")+\"]\",gap=s,i}if(rep&&\"object\"==typeof rep)for(o=rep.length,n=0;o>n;n+=1)\"string\"==typeof rep[n]&&(r=rep[n],i=str(r,u),i&&a.push(quote(r)+(gap?\": \":\":\")+i));else for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(i=str(r,u),i&&a.push(quote(r)+(gap?\": \":\":\")+i));return i=0===a.length?\"{}\":gap?\"{\\n\"+gap+a.join(\",\\n\"+gap)+\"\\n\"+s+\"}\":\"{\"+a.join(\",\")+\"}\",gap=s,i}}\"function\"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+\"-\"+f(this.getUTCMonth()+1)+\"-\"+f(this.getUTCDate())+\"T\"+f(this.getUTCHours())+\":\"+f(this.getUTCMinutes())+\":\"+f(this.getUTCSeconds())+\"Z\":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,escapable=/[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,gap,indent,meta={\"\\b\":\"\\\\b\",\" \":\"\\\\t\",\"\\n\":\"\\\\n\",\"\\f\":\"\\\\f\",\"\\r\":\"\\\\r\",\'\"\':\'\\\\\"\',\"\\\\\":\"\\\\\\\\\"},rep;\"function\"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,n){var r;if(gap=\"\",indent=\"\",\"number\"==typeof n)for(r=0;n>r;r+=1)indent+=\" \";else\"string\"==typeof n&&(indent=n);if(rep=t,t&&\"function\"!=typeof t&&(\"object\"!=typeof t||\"number\"!=typeof t.length))throw new Error(\"JSON.stringify\");return str(\"\",{\"\":e})}),\"function\"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&\"object\"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=walk(i,n),void 0!==r?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return\"\\\\u\"+(\"0000\"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\\],:{}\\s]*$/.test(text.replace(/\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g,\"@\").replace(/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,\"]\").replace(/(?:^|:|,)(?:\\s*\\[)+/g,\"\")))return j=eval(\"(\"+text+\")\"),\"function\"==typeof reviver?walk({\"\":j},\"\"):j;throw new SyntaxError(\"JSON.parse\")})}();"},{"name": "jquery.ellocate.js", "payload": "!function(e){e.fn.ellocate=function(t){for(var n=e(this)[0],r=t||[],i={xpath:\"\",css:\"\"},o={isUniqueId:function(t,n){return!(-1!=e.inArray(t,n))},getClass:function(t){var n=\"\",r=e(t).attr(\"class\");return\"undefined\"!=typeof r&&\"\"!=r&&(n=\".\"+r.split(/[\\s\\n]+/).join(\".\")),n}};n&&1==n.nodeType;n=n.parentNode){var a=e(n.parentNode).children(n.tagName).index(n)+1;if(\"/\"!=n.tagName.substring(0,1))if(\"undefined\"!=n.id&&\"\"!=n.id&&o.isUniqueId(n.id,r)){r.push(n.id);var s=\"[@id=\'\"+n.id+\"\'\"+\"]\";i.xpath=\"/\"+n.tagName.toLowerCase()+s+i.xpath,i.css=n.tagName.toLowerCase()+\"#\"+n.id+\" > \"+i.css}else a=\"[\"+a+\"]\",i.xpath=\"/\"+n.tagName.toLowerCase()+a+i.xpath,i.css=n.tagName.toLowerCase()+o.getClass(n)+\" > \"+i.css}return i.xpath=\"/\"+i.xpath,i.css=i.css.substr(0,i.css.length-3),i}}(jQuery);"},{"name": "jquery.redglass.js", "payload": "!function(e){e.fn.redGlass=function(t,n,r){var i=r||{},o=i.ignoreXHRErrors||!0;n=\"undefined\"==typeof n?\"4567\":n;var a={handleInteractionEvent:function(n){var r={};r.id=\"\",r.url=window.location.pathname,r.testID=t,r.time=(new Date).getTime();var i=[\"type\",\"pageX\",\"pageY\"];e.each(i,function(e,t){r[t]=n[t]}),r.target=e(n.target).ellocate().css,a.sendEvent(r)},handleMutationEvent:function(e){var n={};n.id=\"\",n.url=window.location.pathname,n.testID=t,n.time=(new Date).getTime(),n.type=e.type,n.target=\"\"==e.target.innerHTML?e.target.parent.innerHTML:e.target.innerHTML,a.sendEvent(n)},handleXHREvent:function(e){var n={};switch(n.id=\"\",n.url=window.location.pathname,n.testID=t,n.time=(new Date).getTime(),n.type=e.type,n.target=e.url,n.method=e.method,e.type){case\"xhr: Response returned\":n.response=e.response}a.sendEvent(n)},handleErrorEvent:function(e){var n={};n.id=\"\",n.url=window.location.pathname,n.testID=t,n.time=(new Date).getTime(),n.type=e.type,n.target=e.errorUrl,n.errorMessage=e.errorMessage,n.errorLineNumber=e.errorLineNumber,a.sendEvent(n)},sendEvent:function(e){var t=new XMLHttpRequest;t.open(\"POST\",\"http://localhost:\"+n,!0),o&&(t.onreadystatechange=function(){4==t.readyState&&200!=t.status&&console.log(\"The RedGlass server returned an error while receiving the event data: \"+t.status)}),t.send(JSON.stringify({event_json:e}))}};return this.bind(\"click keydown keyup\",a.handleInteractionEvent),this.bind(\"DOMNodeInserted DOMNodeRemoved\",a.handleMutationEvent),function(){var e=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(t,r,i,o,s){this.addEventListener(\"readystatechange\",function(){if(r!=\"http://localhost:\"+n){var e={};e.method=t;var i=\"\";switch(parseInt(this.readyState)){case 0:i=\"Initializing\";break;case 1:i=\"Connected\";break;case 2:i=\"Request received\";break;case 3:i=\"Processing request\";break;case 4:i=\"Response returned\",e.response=this.responseText}e.type=\"xhr: \"+i,e.url=r,a.handleXHREvent(e)}},!1),e.call(this,t,r,i,o,s)}}(),window.onerror=function(e,t,n){var r={};return r.type=\"js-error\",r.errorMessage=e,r.errorUrl=t,r.errorLineNumber=n,a.handleErrorEvent(r),!1},this}}(jQuery);"}];
5
+ var Carryall=function(){function InvalidManifestFormat(e){this.message=e,this.name="InvalidManifestFormat",this.toString=function(){return this.message}}function InvalidCargoFormat(e){this.message=e,this.name="InvalidCargoFormat",this.toString=function(){return this.message}}function InvalidPostCheckFormat(e){this.message=e,this.name="InvalidPostCheckFormat",this.toString=function(){return this.message}}function CorruptCargo(e){this.message=e,this.name="CorruptCargo",this.toString=function(){return this.message}}function CargoNotFound(e){this.message=e,this.name="CargoNotFound",this.toString=function(){return this.message}}var _cargo={},_manifest=[],_manifestKeys={name:!0,check:!0,checkPassed:!0,checkFailed:!0},_cargoKeys={name:!0,payload:!0},_pickCargoPayload=function(e){if(e in _cargo)return _cargo[e];throw new CargoNotFound("The following cargo could not be found: '"+e+"'. Delivery aborted.")},_packCargo=function(e){for(var a=0;a<e.length;a++){var t=e[a];_cargo[t.name]=t.payload}},_unpackCargo=function(cargoNames){for(var i=0;i<cargoNames.length;i++){var payload=_pickCargoPayload(cargoNames[i]);try{eval(payload)}catch(e){throw new CorruptCargo("The following cargo is corrupt: '"+cargoNames[i]+"'. Delivery aborted.")}}},_detectValidCargo=function(e){_detectValidArrayElements(e,"cargo")},_detectValidManifest=function(e){_detectValidArrayElements(e,"manifest")},_detectValidPostCheckAction=function(e){if(!(e instanceof Array))throw new InvalidPostCheckFormat("An array of cargo names must be specified when using 'checkPassed' and/or 'checkFailed'.");for(var a=0;a<e.length;a++)if("string"!=typeof e[a])throw new InvalidPostCheckFormat("Cargo names must be specified as type 'String' when using 'checkPassed' and/or 'checkFailed'.")},_hasCheck=function(e){return"check"in e},_performCheck=function(e){var a=typeof e.check;switch(a){case"boolean":return e.check;case"function":return e.check();case"string":return _performEvalCheck(e.check)}},_performEvalCheck=function(checkStr){var evalCheck=eval("["+checkStr+"]")[0];return"function"==typeof evalCheck?evalCheck():evalCheck},_performChecks=function(e){for(var a=0;a<e.length;a++)if(_hasCheck(e[a])){var t=_performCheck(e[a]);t&&"checkPassed"in e[a]?(_detectValidPostCheckAction(e[a].checkPassed),_unpackCargo(e[a].checkPassed)):!t&&"checkFailed"in e[a]&&_unpackCargo(e[a].checkFailed)}},_deliver=function(e,a){_detectValidManifest(e),_detectValidCargo(a),_manifest=e,_packCargo(a),_performChecks(e)},_getKeys=function(e){var a=[];for(var t in e)a.push(t);return a},_detectValidArrayElements=function(e,a){if(!(e instanceof Array))throw new InvalidManifestFormat("The Caryall "+a+" must be an array.");for(var t=0;t<e.length;t++)for(var r=_getKeys(e[t]),n=0;n<r.length;n++)if(!(r[n]in _getValidKeys(a))){var o=_getExceptionType(a);throw new o("A "+a+" item has the following invalid key: "+r[n])}},_getValidKeys=function(e){switch(e){case"manifest":return _manifestKeys;case"cargo":return _cargoKeys}},_getExceptionType=function(e){switch(e){case"manifest":return InvalidManifestFormat;case"cargo":return InvalidCargoFormat}};return{deliver:_deliver}}();
6
+ return Carryall.deliver(manifest, cargo);
7
+ })();
@@ -1,61 +1,29 @@
1
- var domgun = {}; domgun.query = jQuery.noConflict();
1
+ var rgUtils = {};
2
2
  var uniqueIds = [];
3
-
4
- function toInt(n){ return Math.round(Number(n)); };
5
-
6
- function isUniqueId(id, idArray){
7
- return domgun.query.inArray(id, idArray) == -1 ? true : false;
8
- }
9
-
10
- function getPath($thing)
11
- {
12
- elt = $thing[0];
13
- var path = '';
14
- for (; elt && elt.nodeType == 1; elt = elt.parentNode)
15
- {
16
- var idx = domgun.query(elt.parentNode).children(elt.tagName).index(elt) + 1;
17
- if(elt.tagName.substring(0,1) != "/"){//Internet explorer oddity- some tagnames can begin with backslash.
18
- if(elt.id != 'undefined' && elt.id !='' && isUniqueId(elt.id, uniqueIds)){
19
- uniqueIds.push(elt.id);
20
- idPath="[@id=" + "'" + elt.id + "'" + "]";
21
- path = '/' + elt.tagName.toLowerCase() + idPath + path;
22
- }
23
- else{
24
- idx='[' + idx + ']';
25
- path = '/' + elt.tagName.toLowerCase() + idx + path;
26
- }
27
- }
28
- }
29
- return path;
30
- }
31
-
32
- function hasText($thing){
3
+ rgUtils.query = jQuery;
4
+ rgUtils.toInt = function(n){ return Math.round(Number(n)); };
5
+ rgUtils.hasText = function($thing){
33
6
  var isTxt = true;
34
7
  if($thing.text() == ""){
35
8
  isTxt = false;
36
9
  }
37
10
  return isTxt;
38
- }
39
-
40
- function isVisible($thing) {
41
- return $thing.is(':visible');
42
- }
11
+ };
12
+ rgUtils.isVisible = function($thing) { return $thing.is(':visible'); };
43
13
 
44
14
  function RecurseDomJSON($item, domJSON) {
45
15
  $item.each(function() {
46
16
  try{
47
- domJSON += '{"tagName":' + '"' + domgun.query(this).get(0).tagName + '"' + ',' + '"id":' + '"' +
48
- domgun.query(this).attr("id") + '"' + ',' + '"top":' + '"' + toInt(domgun.query(this).offset().top) + '"' +
49
- ',' + '"left":' + '"' + toInt(domgun.query(this).offset().left) + '"' +
50
- ',' + '"xpath":' + '"' + getPath(domgun.query(this)) + '"' +
51
- ',' + '"width":' + '"' + toInt(domgun.query(this).width()) + '"' +
52
- ',' + '"height":' + '"' + toInt(domgun.query(this).height()) + '"' +
53
- ',' + '"isVisible":' + '"' + isVisible(domgun.query(this)) + '"' +
54
- ',' + '"hasText":' + '"' + hasText(domgun.query(this)) +'"},\n\t' ;
55
- }
56
- catch(err){
57
-
17
+ domJSON += '{"tagName":' + '"' + rgUtils.query(this).get(0).tagName + '"' + ',' + '"id":' + '"' +
18
+ rgUtils.query(this).attr("id") + '"' + ',' + '"top":' + '"' + rgUtils.toInt(rgUtils.query(this).offset().top) + '"' +
19
+ ',' + '"left":' + '"' + rgUtils.toInt(rgUtils.query(this).offset().left) + '"' +
20
+ ',' + '"xpath":' + '"' + rgUtils.query(this).ellocate(uniqueIds).xpath + '"' +
21
+ ',' + '"width":' + '"' + rgUtils.toInt(rgUtils.query(this).width()) + '"' +
22
+ ',' + '"height":' + '"' + rgUtils.toInt(rgUtils.query(this).height()) + '"' +
23
+ ',' + '"isVisible":' + '"' + rgUtils.isVisible(rgUtils.query(this)) + '"' +
24
+ ',' + '"hasText":' + '"' + rgUtils.hasText(rgUtils.query(this)) +'"},\n\t' ;
58
25
  }
26
+ catch(err){ } // Perhaps errors could be thrown in a configurable "strict" mode.
59
27
  });
60
28
  uniqueIds = [];
61
29
  return domJSON;
@@ -44,6 +44,7 @@ class RedGlass
44
44
  create_page_archive_directory
45
45
  take_screenshot
46
46
  capture_page_source
47
+ load_js
47
48
  serialize_dom
48
49
  write_metadata
49
50
  end
@@ -81,39 +82,17 @@ class RedGlass
81
82
  end
82
83
 
83
84
  def load_js
84
- load_jQuery
85
- load_json2
86
- load_get_path
87
- load_red_glass_js
88
- end
89
-
90
- def load_jQuery
91
- has_jQuery = @driver.execute_script "var hasJQuery = typeof jQuery == 'function' ? true : false; return hasJQuery"
92
- raw_js = File.open(File.expand_path("#{PROJ_ROOT}/red-glass-app/public/scripts/jquery-1.8.0.min.js"), 'rb').read
93
- @driver.execute_script raw_js if !has_jQuery
94
- end
95
-
96
- def load_json2
97
- has_old_json = @driver.execute_script "var hasOldJSON = typeof JSON.license == 'undefined' ? false : true; return hasOldJSON"
98
- @driver.execute_script "delete JSON" if has_old_json
99
- raw_js = File.open(File.expand_path("#{PROJ_ROOT}/red-glass-js/json2.js"), 'rb').read
100
- @driver.execute_script raw_js
85
+ load_red_glass_carryall unless has_red_glass_js?
101
86
  end
102
87
 
103
- def load_get_path
104
- raw_js = File.open(File.expand_path("#{PROJ_ROOT}/red-glass-js/jquery.getpath.js"), 'rb').read
88
+ def load_red_glass_carryall
89
+ raw_js = File.open(File.expand_path("#{PROJ_ROOT}/red-glass-js/redglass.carryall.js"), 'rb').read
105
90
  @driver.execute_script raw_js
91
+ @driver.execute_script("jQuery(document).redGlass('#{@test_id}', '#{@port}')")
106
92
  end
107
93
 
108
94
  def has_red_glass_js?
109
- @driver.execute_script "var hasRedGlass = typeof jQuery().redGlass == 'function' ? true : false; return hasRedGlass"
110
- end
111
-
112
- def load_red_glass_js
113
- raw_js = File.open(File.expand_path("#{PROJ_ROOT}/red-glass-js/jquery.red-glass-0.1.0.js"), 'rb').read
114
- @driver.execute_script raw_js if !has_red_glass_js?
115
- @driver.execute_script("jQuery(document).redGlass('#{@test_id}', '#{@port}')")
116
- #@driver.execute_script "jQuery.noConflict(true)"
95
+ @driver.execute_script "var hasRedGlass = (typeof jQuery == 'function' && typeof jQuery().redGlass == 'function') ? true : false; return hasRedGlass"
117
96
  end
118
97
 
119
98
  def create_page_archive_directory
@@ -165,10 +144,10 @@ class RedGlass
165
144
  dom_json_string = "{\n\t\"browser\":" + "\"" + @page_metadata[:browser][:name] + "\","
166
145
  dom_json_string += "\n\t\"elements\":\n\t[\n\t"
167
146
  serialize_dom_js_string = stringify_serialize_dom_js
168
- dom_json_string += @driver.execute_script(serialize_dom_js_string + " return RecurseDomJSON(domgun.query('*'),'')")
147
+ dom_json_string += @driver.execute_script(serialize_dom_js_string + " return RecurseDomJSON(rgUtils.query('*'),'')")
169
148
  dom_json_string = dom_json_string[0, (dom_json_string.length - 3)] + "\n\t]\n}"
170
- @page_metadata[:doc_width] = @driver.execute_script(serialize_dom_js_string + " return domgun.query(document).width()")
171
- @page_metadata[:doc_height] = @driver.execute_script(serialize_dom_js_string + " return domgun.query(document).height()")
149
+ @page_metadata[:doc_width] = @driver.execute_script(serialize_dom_js_string + " return rgUtils.query(document).width()")
150
+ @page_metadata[:doc_height] = @driver.execute_script(serialize_dom_js_string + " return rgUtils.query(document).height()")
172
151
  write_serialized_dom dom_json_string
173
152
  end
174
153
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red-glass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-26 00:00:00.000000000 Z
12
+ date: 2013-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
@@ -213,9 +213,7 @@ files:
213
213
  - lib/red-glass/red-glass-app/public/stylesheets/ui-lightness/jquery-ui-1.8.23.custom.css
214
214
  - lib/red-glass/red-glass-app/red-glass-app.rb
215
215
  - lib/red-glass/red-glass-app/views/index.erb
216
- - lib/red-glass/red-glass-js/jquery.getpath.js
217
- - lib/red-glass/red-glass-js/jquery.red-glass-0.1.0.js
218
- - lib/red-glass/red-glass-js/json2.js
216
+ - lib/red-glass/red-glass-js/redglass.carryall.js
219
217
  - lib/red-glass/red-glass-js/serialize-dom.js
220
218
  - lib/red-glass/red_glass.rb
221
219
  - lib/red-glass/red_glass_listener.rb
@@ -240,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
238
  version: '0'
241
239
  requirements: []
242
240
  rubyforge_project:
243
- rubygems_version: 1.8.24
241
+ rubygems_version: 1.8.23
244
242
  signing_key:
245
243
  specification_version: 3
246
244
  summary: ! 'Red Glass: Selenium event pane'
@@ -1,46 +0,0 @@
1
- /*
2
- jQuery-GetPath v0.01, by Dave Cardwell. (2007-04-27)
3
-
4
- http://davecardwell.co.uk/javascript/jquery/plugins/jquery-getpath/
5
-
6
- Copyright (c)2007 Dave Cardwell. All rights reserved.
7
- Released under the MIT License.
8
-
9
-
10
- Usage:
11
- var path = $('#foo').getPath();
12
- */
13
- (function($) {
14
- $.fn.getPath = function(path) {
15
-
16
- // The first time this function is called, path won't be defined.
17
- if (typeof path == 'undefined'){
18
- path = '';
19
- }
20
-
21
- // If this element is <html> we've reached the end of the path.
22
- if ($(this).is('html')){
23
- return 'html' + path;
24
- }
25
-
26
- // Add the element name.
27
- var cur = $(this).get(0).nodeName.toLowerCase();
28
-
29
- // Determine the IDs and path.
30
- var id = $(this).attr('id');
31
- var elementClass = $(this).attr('class');
32
-
33
- // Add the #id if there is one.
34
- if(typeof id != 'undefined' && id != ''){
35
- cur += '#' + id;
36
- }
37
-
38
- // Add any classes.
39
- if(typeof elementClass != 'undefined' && elementClass != ''){
40
- cur += '.' + elementClass.split(/[\s\n]+/).join('.');
41
- }
42
-
43
- // Recurse up the DOM.
44
- return $(this).parent().getPath( ' > ' + cur + path );
45
- };
46
- })(jQuery);
@@ -1,136 +0,0 @@
1
- (function($) {
2
- $.fn.redGlass = function(testID, port) {
3
- port = typeof port == 'undefined' ? '4567' : port;
4
- var rg = {
5
- handleInteractionEvent: function(e){
6
- var eventData = {};
7
- eventData.id = '';
8
- eventData.url = window.location.pathname;
9
- eventData.testID = testID;
10
- eventData.time = new Date().getTime();
11
- var desiredProperties = ['type', 'pageX', 'pageY'];
12
- $.each(desiredProperties, function(index, property){
13
- eventData[property] = e[property];
14
- })
15
- eventData.target = $(e.target).getPath();
16
- rg.sendEvent(JSON.stringify(eventData));
17
- },
18
- handleMutationEvent: function(e){
19
- var eventData = {};
20
- eventData.id = '';
21
- eventData.url = window.location.pathname;
22
- eventData.testID = testID;
23
- eventData.time = new Date().getTime();
24
- eventData.type = e.type;
25
- eventData.target = e.target.innerHTML == '' ? e.target.parent.innerHTML : e.target.innerHTML;
26
- rg.sendEvent(JSON.stringify(eventData));
27
- },
28
- handleXHREvent: function(event){
29
- var eventData = {};
30
- eventData.id = '';
31
- eventData.url = window.location.pathname;
32
- eventData.testID = testID;
33
- eventData.time = new Date().getTime();
34
- eventData.type = event.type;
35
- eventData.target = event.url;
36
- eventData.method = event.method;
37
- switch(event.type){
38
- case "xhr: Response returned":
39
- eventData.response = event.response;
40
- break;
41
- }
42
- rg.sendEvent(JSON.stringify(eventData));
43
- },
44
- handleErrorEvent: function(event){
45
- var eventData = {};
46
- eventData.id = '';
47
- eventData.url = window.location.pathname;
48
- eventData.testID = testID;
49
- eventData.time = new Date().getTime();
50
- eventData.type = event.type;
51
- eventData.target = event.errorUrl;
52
- eventData.errorMessage = event.errorMessage;
53
- eventData.errorLineNumber = event.errorLineNumber;
54
- rg.sendEvent(JSON.stringify(eventData));
55
- },
56
- sendEvent: function(eventData){
57
- var formData = new FormData();
58
- formData.append("event_json", eventData);
59
- var request = new XMLHttpRequest();
60
- request.open('POST', "http://localhost:" + port, true);
61
- request.send(formData);
62
-
63
- /*
64
- Old versions of jQuery would return a 404 from the request below,
65
- so we must use the plain xhr above.
66
- $.ajax({
67
- url: "http://localhost:" + port,
68
- type: "POST",
69
- data: {event_json: eventData}
70
- })
71
- */
72
- }
73
- }
74
-
75
- //Interaction events
76
- this.bind("click keydown keyup", rg.handleInteractionEvent);
77
-
78
- //DOM mutation events
79
- this.bind('DOMNodeInserted DOMNodeRemoved', rg.handleMutationEvent);
80
-
81
- //XHR events
82
- (function() {
83
- //Create proxy to the native method
84
- var nativeOpen = XMLHttpRequest.prototype.open;
85
-
86
- //Overwrite native open method
87
- XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
88
- //Handle readyState changes
89
- this.addEventListener("readystatechange", function() {
90
- if(url != "http://localhost:" + port){
91
- var eventData = {};
92
- eventData.method = method;
93
- var readyStateDesc = '';
94
- switch(parseInt(this.readyState)){
95
- case 0:
96
- readyStateDesc = 'Initializing';
97
- break;
98
- case 1:
99
- readyStateDesc = 'Connected';
100
- break;
101
- case 2:
102
- readyStateDesc = 'Request received';
103
- break;
104
- case 3:
105
- readyStateDesc = 'Processing request';
106
- break;
107
- case 4:
108
- readyStateDesc = 'Response returned';
109
- eventData.response = this.responseText;
110
- break;
111
- }
112
- eventData.type = 'xhr: ' + readyStateDesc;
113
- eventData.url = url;
114
- rg.handleXHREvent(eventData);
115
- }
116
- }, false);
117
-
118
- //Call native open method
119
- nativeOpen.call(this, method, url, async, user, pass);
120
- };
121
- })();
122
-
123
- //Error events
124
- window.onerror = function(message, url, lineNumber) {
125
- var eventData = {};
126
- eventData.type = "js-error";
127
- eventData.errorMessage = message;
128
- eventData.errorUrl = url;
129
- eventData.errorLineNumber = lineNumber;
130
- rg.handleErrorEvent(eventData);
131
- return false;
132
- };
133
-
134
- return this;
135
- };
136
- })(jQuery);
@@ -1,487 +0,0 @@
1
- /*
2
- http://www.JSON.org/json2.js
3
- 2011-10-19
4
-
5
- Public Domain.
6
-
7
- NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
8
-
9
- See http://www.JSON.org/js.html
10
-
11
-
12
- This code should be minified before deployment.
13
- See http://javascript.crockford.com/jsmin.html
14
-
15
- USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
16
- NOT CONTROL.
17
-
18
-
19
- This file creates a global JSON object containing two methods: stringify
20
- and parse.
21
-
22
- JSON.stringify(value, replacer, space)
23
- value any JavaScript value, usually an object or array.
24
-
25
- replacer an optional parameter that determines how object
26
- values are stringified for objects. It can be a
27
- function or an array of strings.
28
-
29
- space an optional parameter that specifies the indentation
30
- of nested structures. If it is omitted, the text will
31
- be packed without extra whitespace. If it is a number,
32
- it will specify the number of spaces to indent at each
33
- level. If it is a string (such as '\t' or '&nbsp;'),
34
- it contains the characters used to indent at each level.
35
-
36
- This method produces a JSON text from a JavaScript value.
37
-
38
- When an object value is found, if the object contains a toJSON
39
- method, its toJSON method will be called and the result will be
40
- stringified. A toJSON method does not serialize: it returns the
41
- value represented by the name/value pair that should be serialized,
42
- or undefined if nothing should be serialized. The toJSON method
43
- will be passed the key associated with the value, and this will be
44
- bound to the value
45
-
46
- For example, this would serialize Dates as ISO strings.
47
-
48
- Date.prototype.toJSON = function (key) {
49
- function f(n) {
50
- // Format integers to have at least two digits.
51
- return n < 10 ? '0' + n : n;
52
- }
53
-
54
- return this.getUTCFullYear() + '-' +
55
- f(this.getUTCMonth() + 1) + '-' +
56
- f(this.getUTCDate()) + 'T' +
57
- f(this.getUTCHours()) + ':' +
58
- f(this.getUTCMinutes()) + ':' +
59
- f(this.getUTCSeconds()) + 'Z';
60
- };
61
-
62
- You can provide an optional replacer method. It will be passed the
63
- key and value of each member, with this bound to the containing
64
- object. The value that is returned from your method will be
65
- serialized. If your method returns undefined, then the member will
66
- be excluded from the serialization.
67
-
68
- If the replacer parameter is an array of strings, then it will be
69
- used to select the members to be serialized. It filters the results
70
- such that only members with keys listed in the replacer array are
71
- stringified.
72
-
73
- Values that do not have JSON representations, such as undefined or
74
- functions, will not be serialized. Such values in objects will be
75
- dropped; in arrays they will be replaced with null. You can use
76
- a replacer function to replace those with JSON values.
77
- JSON.stringify(undefined) returns undefined.
78
-
79
- The optional space parameter produces a stringification of the
80
- value that is filled with line breaks and indentation to make it
81
- easier to read.
82
-
83
- If the space parameter is a non-empty string, then that string will
84
- be used for indentation. If the space parameter is a number, then
85
- the indentation will be that many spaces.
86
-
87
- Example:
88
-
89
- text = JSON.stringify(['e', {pluribus: 'unum'}]);
90
- // text is '["e",{"pluribus":"unum"}]'
91
-
92
-
93
- text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
94
- // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
95
-
96
- text = JSON.stringify([new Date()], function (key, value) {
97
- return this[key] instanceof Date ?
98
- 'Date(' + this[key] + ')' : value;
99
- });
100
- // text is '["Date(---current time---)"]'
101
-
102
-
103
- JSON.parse(text, reviver)
104
- This method parses a JSON text to produce an object or array.
105
- It can throw a SyntaxError exception.
106
-
107
- The optional reviver parameter is a function that can filter and
108
- transform the results. It receives each of the keys and values,
109
- and its return value is used instead of the original value.
110
- If it returns what it received, then the structure is not modified.
111
- If it returns undefined then the member is deleted.
112
-
113
- Example:
114
-
115
- // Parse the text. Values that look like ISO date strings will
116
- // be converted to Date objects.
117
-
118
- myData = JSON.parse(text, function (key, value) {
119
- var a;
120
- if (typeof value === 'string') {
121
- a =
122
- /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
123
- if (a) {
124
- return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
125
- +a[5], +a[6]));
126
- }
127
- }
128
- return value;
129
- });
130
-
131
- myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
132
- var d;
133
- if (typeof value === 'string' &&
134
- value.slice(0, 5) === 'Date(' &&
135
- value.slice(-1) === ')') {
136
- d = new Date(value.slice(5, -1));
137
- if (d) {
138
- return d;
139
- }
140
- }
141
- return value;
142
- });
143
-
144
-
145
- This is a reference implementation. You are free to copy, modify, or
146
- redistribute.
147
- */
148
-
149
- /*jslint evil: true, regexp: true */
150
-
151
- /*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
152
- call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
153
- getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
154
- lastIndex, length, parse, prototype, push, replace, slice, stringify,
155
- test, toJSON, toString, valueOf
156
- */
157
-
158
-
159
- // Create a JSON object only if one does not already exist. We create the
160
- // methods in a closure to avoid creating global variables.
161
-
162
- var JSON;
163
- if (!JSON) {
164
- JSON = {};
165
- }
166
-
167
- (function () {
168
- 'use strict';
169
-
170
- function f(n) {
171
- // Format integers to have at least two digits.
172
- return n < 10 ? '0' + n : n;
173
- }
174
-
175
- if (typeof Date.prototype.toJSON !== 'function') {
176
-
177
- Date.prototype.toJSON = function (key) {
178
-
179
- return isFinite(this.valueOf())
180
- ? this.getUTCFullYear() + '-' +
181
- f(this.getUTCMonth() + 1) + '-' +
182
- f(this.getUTCDate()) + 'T' +
183
- f(this.getUTCHours()) + ':' +
184
- f(this.getUTCMinutes()) + ':' +
185
- f(this.getUTCSeconds()) + 'Z'
186
- : null;
187
- };
188
-
189
- String.prototype.toJSON =
190
- Number.prototype.toJSON =
191
- Boolean.prototype.toJSON = function (key) {
192
- return this.valueOf();
193
- };
194
- }
195
-
196
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
197
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
198
- gap,
199
- indent,
200
- meta = { // table of character substitutions
201
- '\b': '\\b',
202
- '\t': '\\t',
203
- '\n': '\\n',
204
- '\f': '\\f',
205
- '\r': '\\r',
206
- '"' : '\\"',
207
- '\\': '\\\\'
208
- },
209
- rep;
210
-
211
-
212
- function quote(string) {
213
-
214
- // If the string contains no control characters, no quote characters, and no
215
- // backslash characters, then we can safely slap some quotes around it.
216
- // Otherwise we must also replace the offending characters with safe escape
217
- // sequences.
218
-
219
- escapable.lastIndex = 0;
220
- return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
221
- var c = meta[a];
222
- return typeof c === 'string'
223
- ? c
224
- : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
225
- }) + '"' : '"' + string + '"';
226
- }
227
-
228
-
229
- function str(key, holder) {
230
-
231
- // Produce a string from holder[key].
232
-
233
- var i, // The loop counter.
234
- k, // The member key.
235
- v, // The member value.
236
- length,
237
- mind = gap,
238
- partial,
239
- value = holder[key];
240
-
241
- // If the value has a toJSON method, call it to obtain a replacement value.
242
-
243
- if (value && typeof value === 'object' &&
244
- typeof value.toJSON === 'function') {
245
- value = value.toJSON(key);
246
- }
247
-
248
- // If we were called with a replacer function, then call the replacer to
249
- // obtain a replacement value.
250
-
251
- if (typeof rep === 'function') {
252
- value = rep.call(holder, key, value);
253
- }
254
-
255
- // What happens next depends on the value's type.
256
-
257
- switch (typeof value) {
258
- case 'string':
259
- return quote(value);
260
-
261
- case 'number':
262
-
263
- // JSON numbers must be finite. Encode non-finite numbers as null.
264
-
265
- return isFinite(value) ? String(value) : 'null';
266
-
267
- case 'boolean':
268
- case 'null':
269
-
270
- // If the value is a boolean or null, convert it to a string. Note:
271
- // typeof null does not produce 'null'. The case is included here in
272
- // the remote chance that this gets fixed someday.
273
-
274
- return String(value);
275
-
276
- // If the type is 'object', we might be dealing with an object or an array or
277
- // null.
278
-
279
- case 'object':
280
-
281
- // Due to a specification blunder in ECMAScript, typeof null is 'object',
282
- // so watch out for that case.
283
-
284
- if (!value) {
285
- return 'null';
286
- }
287
-
288
- // Make an array to hold the partial results of stringifying this object value.
289
-
290
- gap += indent;
291
- partial = [];
292
-
293
- // Is the value an array?
294
-
295
- if (Object.prototype.toString.apply(value) === '[object Array]') {
296
-
297
- // The value is an array. Stringify every element. Use null as a placeholder
298
- // for non-JSON values.
299
-
300
- length = value.length;
301
- for (i = 0; i < length; i += 1) {
302
- partial[i] = str(i, value) || 'null';
303
- }
304
-
305
- // Join all of the elements together, separated with commas, and wrap them in
306
- // brackets.
307
-
308
- v = partial.length === 0
309
- ? '[]'
310
- : gap
311
- ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
312
- : '[' + partial.join(',') + ']';
313
- gap = mind;
314
- return v;
315
- }
316
-
317
- // If the replacer is an array, use it to select the members to be stringified.
318
-
319
- if (rep && typeof rep === 'object') {
320
- length = rep.length;
321
- for (i = 0; i < length; i += 1) {
322
- if (typeof rep[i] === 'string') {
323
- k = rep[i];
324
- v = str(k, value);
325
- if (v) {
326
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
327
- }
328
- }
329
- }
330
- } else {
331
-
332
- // Otherwise, iterate through all of the keys in the object.
333
-
334
- for (k in value) {
335
- if (Object.prototype.hasOwnProperty.call(value, k)) {
336
- v = str(k, value);
337
- if (v) {
338
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
339
- }
340
- }
341
- }
342
- }
343
-
344
- // Join all of the member texts together, separated with commas,
345
- // and wrap them in braces.
346
-
347
- v = partial.length === 0
348
- ? '{}'
349
- : gap
350
- ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
351
- : '{' + partial.join(',') + '}';
352
- gap = mind;
353
- return v;
354
- }
355
- }
356
-
357
- // If the JSON object does not yet have a stringify method, give it one.
358
-
359
- if (typeof JSON.stringify !== 'function') {
360
- JSON.stringify = function (value, replacer, space) {
361
-
362
- // The stringify method takes a value and an optional replacer, and an optional
363
- // space parameter, and returns a JSON text. The replacer can be a function
364
- // that can replace values, or an array of strings that will select the keys.
365
- // A default replacer method can be provided. Use of the space parameter can
366
- // produce text that is more easily readable.
367
-
368
- var i;
369
- gap = '';
370
- indent = '';
371
-
372
- // If the space parameter is a number, make an indent string containing that
373
- // many spaces.
374
-
375
- if (typeof space === 'number') {
376
- for (i = 0; i < space; i += 1) {
377
- indent += ' ';
378
- }
379
-
380
- // If the space parameter is a string, it will be used as the indent string.
381
-
382
- } else if (typeof space === 'string') {
383
- indent = space;
384
- }
385
-
386
- // If there is a replacer, it must be a function or an array.
387
- // Otherwise, throw an error.
388
-
389
- rep = replacer;
390
- if (replacer && typeof replacer !== 'function' &&
391
- (typeof replacer !== 'object' ||
392
- typeof replacer.length !== 'number')) {
393
- throw new Error('JSON.stringify');
394
- }
395
-
396
- // Make a fake root object containing our value under the key of ''.
397
- // Return the result of stringifying the value.
398
-
399
- return str('', {'': value});
400
- };
401
- }
402
-
403
-
404
- // If the JSON object does not yet have a parse method, give it one.
405
-
406
- if (typeof JSON.parse !== 'function') {
407
- JSON.parse = function (text, reviver) {
408
-
409
- // The parse method takes a text and an optional reviver function, and returns
410
- // a JavaScript value if the text is a valid JSON text.
411
-
412
- var j;
413
-
414
- function walk(holder, key) {
415
-
416
- // The walk method is used to recursively walk the resulting structure so
417
- // that modifications can be made.
418
-
419
- var k, v, value = holder[key];
420
- if (value && typeof value === 'object') {
421
- for (k in value) {
422
- if (Object.prototype.hasOwnProperty.call(value, k)) {
423
- v = walk(value, k);
424
- if (v !== undefined) {
425
- value[k] = v;
426
- } else {
427
- delete value[k];
428
- }
429
- }
430
- }
431
- }
432
- return reviver.call(holder, key, value);
433
- }
434
-
435
-
436
- // Parsing happens in four stages. In the first stage, we replace certain
437
- // Unicode characters with escape sequences. JavaScript handles many characters
438
- // incorrectly, either silently deleting them, or treating them as line endings.
439
-
440
- text = String(text);
441
- cx.lastIndex = 0;
442
- if (cx.test(text)) {
443
- text = text.replace(cx, function (a) {
444
- return '\\u' +
445
- ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
446
- });
447
- }
448
-
449
- // In the second stage, we run the text against regular expressions that look
450
- // for non-JSON patterns. We are especially concerned with '()' and 'new'
451
- // because they can cause invocation, and '=' because it can cause mutation.
452
- // But just to be safe, we want to reject all unexpected forms.
453
-
454
- // We split the second stage into 4 regexp operations in order to work around
455
- // crippling inefficiencies in IE's and Safari's regexp engines. First we
456
- // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
457
- // replace all simple value tokens with ']' characters. Third, we delete all
458
- // open brackets that follow a colon or comma or that begin the text. Finally,
459
- // we look to see that the remaining characters are only whitespace or ']' or
460
- // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
461
-
462
- if (/^[\],:{}\s]*$/
463
- .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
464
- .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
465
- .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
466
-
467
- // In the third stage we use the eval function to compile the text into a
468
- // JavaScript structure. The '{' operator is subject to a syntactic ambiguity
469
- // in JavaScript: it can begin a block or an object literal. We wrap the text
470
- // in parens to eliminate the ambiguity.
471
-
472
- j = eval('(' + text + ')');
473
-
474
- // In the optional fourth stage, we recursively walk the new structure, passing
475
- // each name/value pair to a reviver function for possible transformation.
476
-
477
- return typeof reviver === 'function'
478
- ? walk({'': j}, '')
479
- : j;
480
- }
481
-
482
- // If the text is not JSON parseable, then a SyntaxError is thrown.
483
-
484
- throw new SyntaxError('JSON.parse');
485
- };
486
- }
487
- }());