欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

利用r.js打包模块化的javascript文件方法示例

程序员文章站 2024-01-16 21:19:40
前言 ()是requirejs的优化(optimizer)工具,可以实现前端文件的压缩与合并,在requirejs异步按需加载的基础上进一步提供前端优化,减小前端文件大小...

前言

()是requirejs的优化(optimizer)工具,可以实现前端文件的压缩与合并,在requirejs异步按需加载的基础上进一步提供前端优化,减小前端文件大小、减少对服务器的文件请求。本文将详细介绍r.js的相关内容,感兴趣的朋友们下面来一起看看吧。

简单打包

【项目结构】

以一个简单的例子来说明r.js的使用。该项目名称为'demo',在js目录下包含s1.js和s2.js两个文件,使用requirejs进行模块化,内容如下

//s1.js
define(function (){
 return 1;
})
//s2.js
define(function (){
 return 2;
})

使用main.js来调用s1.js和s2.js这两个文件

require(['s1','s2'], function(a,b){
  console.log(a+b);
});

index.html的内容如下

<!doctype html>
<html lang="en">
<head>
 <meta charset="utf-8">
 <title>document</title>
 <script data-main="js/main" src="js/require.js"></script>
</head>
<body>
</body>
</html>

运行index.html文件,所依赖资源如下图所示

利用r.js打包模块化的javascript文件方法示例

【打包】

接下来,使用r.js来对javascript文件进行打包,而r.js需要使用build.js文件来进行配置,配置如下

({
 baseurl: "./",
 name:'main',
 out:'out.js'
})

接下来运行node r.js -o build.js命令

利用r.js打包模块化的javascript文件方法示例

项目根目录下,生成一个out.js文件,内容如下

define("s1",[],function(){return 1}),define("s2",[],function(){return 2}),require(["s1","s2"],function(n,e){console.log(n+e)}),define("main",function(){});

将index.html的入口文件修改为'out.js',文件依然能正常运行

<!doctype html>
<html lang="en">
<head>
 <meta charset="utf-8">
 <title>document</title>
 <script data-main="js/out" src="js/require.js"></script>
</head>
<body>
</body>
</html>

jquery打包

一般地,我们并不是使用原生javascript进行开发,更多的使用库进行高效开发,以jquery为例,对上面的代码进行改造

s1模块和s2模块,分别基于jquery来获取页面div元素的宽、高,内容如下

//s1.js
define(['../common/jquery'],function (){
 return $('div').height();
})
//s2.js
define(['../common/jquery'],function (){
 return $('div').width();
})

项目结构如下所示,js文件夹包括common和module两个子文件夹,common文件夹包含公用的require.js和jquery.js,module文件夹包含模块s1.js和s2.js。

页面的根目录下,有index.html、入口文件main.js、以及r.js和build.js

利用r.js打包模块化的javascript文件方法示例

【包含jquery】

如果打包后的main.js要包含jquery.js,则代码如下所示

({ 
 appdir: './', //项目根目录
 dir: './dist', //输出目录,全部文件打包后要放入的文件夹(如果没有会自动新建的)
 baseurl:'./',
 modules: [ //要优化的模块,相对baseurl的路径,也是省略后缀“.js”
 { name:'main' } 
 ], 
 fileexclusionregexp: /^(r|build)\.js|.*\.scss$/, //过滤,匹配到的文件将不会被输出到输出目录去
 optimizecss: 'standard', 
 removecombined: true //如果为true,将从输出目录中删除已合并的文件
})

打包后的main.js内容如下所示

!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new error("jquery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e,t){t=t||ne;var n=t.createelement("script");n.text=e,t.head.appendchild(n).parentnode.removechild(n)}function r(e){var t=!!e&&"length"in e&&e.length,n=ge.type(e);return"function"!==n&&!ge.iswindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t){return e.nodename&&e.nodename.tolowercase()===t.tolowercase()}function o(e,t,n){return ge.isfunction(t)?ge.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodetype?ge.grep(e,function(e){return e===t!==n}):"string"!=typeof t?ge.grep(e,function(e){return se.call(t,e)>-1!==n}):ke.test(t)?ge.filter(t,e,n):(t=ge.filter(t,e),ge.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodetype}))}function a(e,t){for(;(e=e[t])&&1!==e.nodetype;);return e}function s(e){var t={};return ge.each(e.match(qe)||[],function(e,n){t[n]=!0}),t}function u(e){return e}function l(e){throw e}function c(e,t,n,r){var i;try{e&&ge.isfunction(i=e.promise)?i.call(e).done(t).fail(n):e&&ge.isfunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function f(){ne.removeeventlistener("domcontentloaded",f),e.removeeventlistener("load",f),ge.ready()}function p(){this.expando=ge.expando+p.uid++}function d(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:me.test(e)?json.parse(e):e)}function h(e,t,n){var r;if(void 0===n&&1===e.nodetype)if(r="data-"+t.replace(ie,"-$&").tolowercase(),n=e.getattribute(r),"string"==typeof n){try{n=d(n)}catch(e){}re.set(e,t,n)}else n=void 0;return n}function g(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return ge.css(e,t,"")},u=s(),l=n&&n[3]||(ge.cssnumber[t]?"":"px"),c=(ge.cssnumber[t]||"px"!==l&&+u)&&$e.exec(ge.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,ge.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function m(e){var t,n=e.ownerdocument,r=e.nodename,i=xe[r];return i?i:(t=n.body.appendchild(n.createelement(r)),i=ge.css(t,"display"),t.parentnode.removechild(t),"none"===i&&(i="block"),xe[r]=i,i)}function y(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=pe.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&_e(r)&&(i[o]=m(r))):"none"!==n&&(i[o]="none",pe.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function v(e,t){var n;return n="undefined"!=typeof e.getelementsbytagname?e.getelementsbytagname(t||"*"):"undefined"!=typeof e.queryselectorall?e.queryselectorall(t||"*"):[],void 0===t||t&&i(e,t)?ge.merge([e],n):n}function x(e,t){for(var n=0,r=e.length;n<r;n++)pe.set(e[n],"globaleval",!t||pe.get(t[n],"globaleval"))}function b(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createdocumentfragment(),p=[],d=0,h=e.length;d<h;d++)if(o=e[d],o||0===o)if("object"===ge.type(o))ge.merge(p,o.nodetype?[o]:o);else if(qe.test(o)){for(a=a||f.appendchild(t.createelement("div")),s=(ve.exec(o)||["",""])[1].tolowercase(),u=ye[s]||ye._default,a.innerhtml=u[1]+ge.htmlprefilter(o)+u[2],c=u[0];c--;)a=a.lastchild;ge.merge(p,a.childnodes),a=f.firstchild,a.textcontent=""}else p.push(t.createtextnode(o));for(f.textcontent="",d=0;o=p[d++];)if(r&&ge.inarray(o,r)>-1)i&&i.push(o);else if(l=ge.contains(o.ownerdocument,o),a=v(f.appendchild(o),"script"),l&&x(a),n)for(c=0;o=a[c++];)ge.test(o.type||"")&&n.push(o);return f}function w(){return!0}function t(){return!1}function c(){try{return ne.activeelement}catch(e){}}function e(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)e(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=t;else if(!i)return e;return 1===o&&(a=i,i=function(e){return ge().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=ge.guid++)),e.each(function(){ge.event.add(this,t,i,r,n)})}function k(e,t){return i(e,"table")&&i(11!==t.nodetype?t:t.firstchild,"tr")?ge(">tbody",e)[0]||e:e}function s(e){return e.type=(null!==e.getattribute("type"))+"/"+e.type,e}function j(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeattribute("type"),e}function n(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodetype){if(pe.hasdata(e)&&(o=pe.access(e),a=pe.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)ge.event.add(t,i,l[i][n])}re.hasdata(e)&&(s=re.access(e),u=ge.extend({},s),re.set(t,u))}}function d(e,t){var n=t.nodename.tolowercase();"input"===n&&ue.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultvalue=e.defaultvalue)}function a(e,t,r,i){t=oe.apply([],t);var o,a,s,u,l,c,f=0,p=e.length,d=p-1,h=t[0],g=ge.isfunction(h);if(g||p>1&&"string"==typeof h&&!de.checkclone&&rt.test(h))return e.each(function(n){var o=e.eq(n);g&&(t[0]=h.call(this,n,o.html())),a(o,t,r,i)});if(p&&(o=b(t,e[0].ownerdocument,!1,e,i),a=o.firstchild,1===o.childnodes.length&&(o=a),a||i)){for(s=ge.map(v(o,"script"),s),u=s.length;f<p;f++)l=o,f!==d&&(l=ge.clone(l,!0,!0),u&&ge.merge(s,v(l,"script"))),r.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerdocument,ge.map(s,j),f=0;f<u;f++)l=s[f],ge.test(l.type||"")&&!pe.access(l,"globaleval")&&ge.contains(c,l)&&(l.src?ge._evalurl&&ge._evalurl(l.src):n(l.textcontent.replace(ot,""),c))}return e}function q(e,t,n){for(var r,i=t?ge.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodetype||ge.cleandata(v(r)),r.parentnode&&(n&&ge.contains(r.ownerdocument,r)&&x(v(r,"script")),r.parentnode.removechild(r));return e}function l(e,t,n){var r,i,o,a,s=e.style;return n=n||ut(e),n&&(a=n.getpropertyvalue(t)||n[t],""!==a||ge.contains(e.ownerdocument,e)||(a=ge.style(e,t)),!de.pixelmarginright()&&st.test(a)&&at.test(t)&&(r=s.width,i=s.minwidth,o=s.maxwidth,s.minwidth=s.maxwidth=s.width=a,a=n.width,s.width=r,s.minwidth=i,s.maxwidth=o)),void 0!==a?a+"":a}function h(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function f(e){if(e in ht)return e;for(var t=e[0].touppercase()+e.slice(1),n=dt.length;n--;)if(e=dt[n]+t,e in ht)return e}function o(e){var t=ge.cssprops[e];return t||(t=ge.cssprops[e]=f(e)||e),t}function p(e,t,n){var r=$e.exec(t);return r?math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function r(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=ge.css(e,n+be[o],!0,i)),r?("content"===n&&(a-=ge.css(e,"padding"+be[o],!0,i)),"margin"!==n&&(a-=ge.css(e,"border"+be[o]+"width",!0,i))):(a+=ge.css(e,"padding"+be[o],!0,i),"padding"!==n&&(a+=ge.css(e,"border"+be[o]+"width",!0,i)));return a}function m(e,t,n){var r,i=ut(e),o=l(e,t,i),a="border-box"===ge.css(e,"boxsizing",!1,i);return st.test(o)?o:(r=a&&(de.boxsizingreliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].touppercase()+t.slice(1)]),o=parsefloat(o)||0,o+r(e,t,n||(a?"border":"content"),r,i)+"px")}function i(e,t,n,r,i){return new i.prototype.init(e,t,n,r,i)}function w(){mt&&(ne.hidden===!1&&e.requestanimationframe?e.requestanimationframe(w):e.settimeout(w,ge.fx.interval),ge.fx.tick())}function $(){return e.settimeout(function(){gt=void 0}),gt=ge.now()}function b(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=be[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function _(e,t,n){for(var r,i=(u.tweeners[t]||[]).concat(u.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function z(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodetype&&_e(e),m=pe.get(e,"fxshow");n.queue||(a=ge._queuehooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ge.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],yt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;g=!0}d[r]=m&&m[r]||ge.style(e,r)}if(u=!ge.isemptyobject(t),u||!ge.isemptyobject(d)){f&&1===e.nodetype&&(n.overflow=[h.overflow,h.overflowx,h.overflowy],l=m&&m.display,null==l&&(l=pe.get(e,"display")),c=ge.css(e,"display"),"none"===c&&(l?c=l:(y([e],!0),l=e.style.display||l,c=ge.css(e,"display"),y([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ge.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowx=n.overflow[1],h.overflowy=n.overflow[2]})),u=!1;for(r in d)u||(m?"hidden"in m&&(g=m.hidden):m=pe.access(e,"fxshow",{display:l}),o&&(m.hidden=!g),g&&y([e],!0),p.done(function(){g||y([e]),pe.remove(e,"fxshow");for(r in d)ge.style(e,r,d[r])})),u=_(g?m[r]:0,r,p),r in m||(m[r]=u.start,g&&(u.end=u.start,u.start=0))}}function x(e,t){var n,r,i,o,a;for(n in e)if(r=ge.camelcase(n),i=t[r],o=e[n],array.isarray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=ge.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 u(e,t,n){var r,i,o=0,a=u.prefilters.length,s=ge.deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=gt||$(),n=math.max(0,l.starttime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifywith(e,[l,o,n]),o<1&&u?n:(u||s.notifywith(e,[l,1,0]),s.resolvewith(e,[l]),!1)},l=s.promise({elem:e,props:ge.extend({},t),opts:ge.extend(!0,{specialeasing:{},easing:ge.easing._default},n),originalproperties:t,originaloptions:n,starttime:gt||$(),duration:n.duration,tweens:[],createtween:function(t,n){var r=ge.tween(e,l.opts,t,n,l.opts.specialeasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifywith(e,[l,1,0]),s.resolvewith(e,[l,t])):s.rejectwith(e,[l,t]),this}}),c=l.props;for(x(c,l.opts.specialeasing);o<a;o++)if(r=u.prefilters[o].call(l,e,c,l.opts))return ge.isfunction(r.stop)&&(ge._queuehooks(l.elem,l.opts.queue).stop=ge.proxy(r.stop,r)),r;return ge.map(c,_,l),ge.isfunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ge.fx.timer(ge.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function v(e){var t=e.match(qe)||[];return t.join(" ")}function g(e){return e.getattribute&&e.getattribute("class")||""}function y(e,t,n,r){var i;if(array.isarray(t))ge.each(t,function(t,i){n||nt.test(e)?r(e,i):y(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==ge.type(t))r(e,t);else for(i in t)y(e+"["+i+"]",t[i],n,r)}function q(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.tolowercase().match(qe)||[];if(ge.isfunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function j(e,t,n,r){function i(s){var u;return o[s]=!0,ge.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.datatypes.unshift(l),i(l),!1)}),u}var o={},a=e===wt;return i(t.datatypes[0])||!o["*"]&&i("*")}function k(e,t){var n,r,i=ge.ajaxsettings.flatoptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ge.extend(!0,e,r),e}function z(e,t,n){for(var r,i,o,a,s=e.contents,u=e.datatypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimetype||t.getresponseheader("content-type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function ee(e,t,n,r){var i,o,a,s,u,l={},c=e.datatypes.slice();if(c[1])for(a in e.converters)l[a.tolowercase()]=e.converters[a];for(o=c.shift();o;)if(e.responsefields[o]&&(n[e.responsefields[o]]=t),!u&&r&&e.datafilter&&(t=e.datafilter(t,e.datatype)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(a=l[u+" "+o]||l["* "+o],!a)for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){a===!0?a=l[i]:l[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"no conversion from "+u+" to "+o}}}return{state:"success",data:t}}var te=[],ne=e.document,re=object.getprototypeof,ie=te.slice,oe=te.concat,ae=te.push,se=te.indexof,ue={},le=ue.tostring,ce=ue.hasownproperty,fe=ce.tostring,pe=fe.call(object),de={},he="3.2.1",ge=function(e,t){return new ge.fn.init(e,t)},me=/^[\s\ufeff\xa0]+|[\s\ufeff\xa0]+$/g,ye=/^-ms-/,ve=/-([a-z])/g,xe=function(e,t){return t.touppercase()};ge.fn=ge.prototype={jquery:he,constructor:ge,length:0,toarray:function(){return ie.call(this)},get:function(e){return null==e?ie.call(this):e<0?this[e+this.length]:this[e]},pushstack:function(e){var t=ge.merge(this.constructor(),e);return t.prevobject=this,t},each:function(e){return ge.each(this,e)},map:function(e){return this.pushstack(ge.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushstack(ie.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushstack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevobject||this.constructor()},push:ae,sort:te.sort,splice:te.splice},ge.extend=ge.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||ge.isfunction(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],a!==r&&(l&&r&&(ge.isplainobject(r)||(i=array.isarray(r)))?(i?(i=!1,o=n&&array.isarray(n)?n:[]):o=n&&ge.isplainobject(n)?n:{},a[t]=ge.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ge.extend({expando:"jquery"+(he+math.random()).replace(/\d/g,""),isready:!0,error:function(e){throw new error(e)},noop:function(){},isfunction:function(e){return"function"===ge.type(e)},iswindow:function(e){return null!=e&&e===e.window},isnumeric:function(e){var t=ge.type(e);return("number"===t||"string"===t)&&!isnan(e-parsefloat(e))},isplainobject:function(e){var t,n;return!(!e||"[object object]"!==le.call(e))&&(!(t=re(e))||(n=ce.call(t,"constructor")&&t.constructor,"function"==typeof n&&fe.call(n)===pe))},isemptyobject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globaleval:function(e){n(e)},camelcase:function(e){return e.replace(ye,"ms-").replace(ve,xe)},each:function(e,t){var n,i=0;if(r(e))for(n=e.length;i<n&&t.call(e[i],i,e[i])!==!1;i++);else for(i in e)if(t.call(e[i],i,e[i])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(me,"")},makearray:function(e,t){var n=t||[];return null!=e&&(r(object(e))?ge.merge(n,"string"==typeof e?[e]:e):ae.call(n,e)),n},inarray:function(e,t,n){return null==t?-1:se.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,n){var i,o,a=0,s=[];if(r(e))for(i=e.length;a<i;a++)o=t(e[a],a,n),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,n),null!=o&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),ge.isfunction(e))return r=ie.call(arguments,2),i=function(){return e.apply(t||this,r.concat(ie.call(arguments)))},i.guid=e.guid=e.guid||ge.guid++,i},now:date.now,support:de}),"function"==typeof symbol&&(ge.fn[symbol.iterator]=te[symbol.iterator]),ge.each("boolean number string function array date regexp object error symbol".split(" "),function(e,t){ue["[object "+t+"]"]=t.tolowercase()});var be=function(e){function t(e,t,n,r){var i,o,a,s,u,l,c,p=t&&t.ownerdocument,h=t?t.nodetype:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerdocument||t:$)!==h&&l(t),t=t||h,o)){if(11!==h&&(u=ye.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getelementbyid(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getelementbyid(i))&&i(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return k.apply(n,t.getelementsbytagname(e)),n;if((i=u[3])&&t.getelementsbyclassname&&t.getelementsbyclassname)return k.apply(n,t.getelementsbyclassname(i)),n}if(t.qsa&&!u[e+" "]&&(!p||!p.test(e))){if(1!==h)p=t,c=e;else if("object"!==t.nodename.tolowercase()){for((s=t.getattribute("id"))?s=s.replace(we,te):t.setattribute("id",s=w),l=s(e),o=l.length;o--;)l[o]="#"+s+" "+d(l[o]);c=l.join(","),p=ve.test(e)&&f(t.parentnode)||t}if(c)try{return k.apply(n,p.queryselectorall(c)),n}catch(e){}finally{s===w&&t.removeattribute("id")}}}return n(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>c.cachelength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[w]=!0,e}function i(e){var t=h.createelement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentnode&&t.parentnode.removechild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)c.attrhandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodetype&&1===t.nodetype&&e.sourceindex-t.sourceindex;if(r)return r;if(n)for(;n=n.nextsibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodename.tolowercase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodename.tolowercase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return function(t){return"form"in t?t.parentnode&&t.disabled===!1?"label"in t?"label"in t.parentnode?t.parentnode.disabled===e:t.disabled===e:t.isdisabled===e||t.isdisabled!==!e&&ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e){return e&&"undefined"!=typeof e.getelementsbytagname&&e}function p(){}function d(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentnode"===o,s=_++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodetype||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[b,s];if(u){for(;t=t[r];)if((1===t.nodetype||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodetype||a)if(f=t[w]||(t[w]={}),c=f[t.uniqueid]||(f[t.uniqueid]={}),i&&i===t.nodename.tolowercase())t=t[r]||t;else{if((l=c[o])&&l[0]===b&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function g(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function y(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[w]&&(i=v(i)),o&&!o[w]&&(o=v(o,a)),r(function(r,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=r||m(t||"*",s.nodetype?[s]:s,[]),v=!e||!r&&t?g:y(g,p,e,s,u),x=n?o||(r?e:h||i)?[]:a:v;if(n&&n(v,x,s,u),i)for(l=y(x,d),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[d[c]]=!(v[d[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(v[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?ee(r,f):p[c])>-1&&(r[l]=!(a[l]=f))}}else x=y(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):k.apply(a,x)})}function x(e){for(var t,n,r,i=e.length,o=c.relative[e[0].type],a=o||c.relative[" "],s=o?1:0,u=h(function(e){return e===t},a,!0),l=h(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==d)||((t=n).nodetype?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=c.relative[e[s].type])c=[h(g(c),n)];else{if(n=c.filter[e[s].type].apply(null,e[s].matches),n[w]){for(r=++s;r<i&&!c.relative[e[r].type];r++);return v(s>1&&g(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<r&&x(e.slice(s,r)),r<i&&x(e=e.slice(r)),r<i&&d(e))}c.push(n)}return g(c)}function b(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,p,d=0,h="0",g=r&&[],m=[],v=d,x=r||o&&c.find.tag("*",l),b=b+=null==v?1:math.random()||.1,w=x.length;for(l&&(d=a===h||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerdocument===h||(l(c),s=!o);p=e[f++];)if(p(c,a||h,s)){u.push(c);break}l&&(b=b)}i&&((c=!p&&c)&&d--,r&&g.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,m,a,s);if(r){if(d>0)for(;h--;)g[h]||m[h]||(m[h]=q.call(u));m=y(m)}k.apply(u,m),l&&!r&&m.length>0&&d+n.length>1&&t.uniquesort(u)}return l&&(b=b,d=v),g};return i?r(a):a}var w,t,c,e,k,s,j,n,d,a,q,l,h,f,o,p,r,m,i,w="sizzle"+1*new date,$=e.document,b=0,_=0,z=n(),x=n(),u=n(),v=function(e,t){return e===t&&(q=!0),0},g={}.hasownproperty,y=[],q=y.pop,j=y.push,k=y.push,z=y.slice,ee=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ie="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new regexp(ne+"+","g"),se=new regexp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new regexp("^"+ne+"*,"+ne+"*"),le=new regexp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new regexp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new regexp(oe),pe=new regexp("^"+re+"$"),de={id:new regexp("^#("+re+")"),class:new regexp("^\\.("+re+")"),tag:new regexp("^("+re+"|[*])"),attr:new regexp("^"+ie),pseudo:new regexp("^"+oe),child:new regexp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new regexp("^(?:"+te+")$","i"),needscontext:new regexp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=new regexp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?string.fromcharcode(r+65536):string.fromcharcode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uffff\w-]/g,te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charcodeat(e.length-1).tostring(16)+" ":"\\"+e},ce=function(){l()},ee=h(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentnode",next:"legend"});try{k.apply(y=z.call($.childnodes),$.childnodes),y[$.childnodes.length].nodetype}catch(e){k={apply:y.length?function(e,t){j.apply(e,z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}t=t.support={},k=t.isxml=function(e){var t=e&&(e.ownerdocument||e).documentelement;return!!t&&"html"!==t.nodename},l=t.setdocument=function(e){var t,n,r=e?e.ownerdocument||e:$;return r!==h&&9===r.nodetype&&r.documentelement?(h=r,f=h.documentelement,o=!k(h),$!==h&&(n=h.defaultview)&&n.top!==n&&(n.addeventlistener?n.addeventlistener("unload",ce,!1):n.attachevent&&n.attachevent("onunload",ce)),t.attributes=i(function(e){return e.classname="i",!e.getattribute("classname")}),t.getelementsbytagname=i(function(e){return e.appendchild(h.createcomment("")),!e.getelementsbytagname("*").length}),t.getelementsbyclassname=me.test(h.getelementsbyclassname),t.getbyid=i(function(e){return f.appendchild(e).id=w,!h.getelementsbyname||!h.getelementsbyname(w).length}),t.getbyid?(c.filter.id=function(e){var t=e.replace(xe,be);return function(e){return e.getattribute("id")===t}},c.find.id=function(e,t){if("undefined"!=typeof t.getelementbyid&&o){var n=t.getelementbyid(e);return n?[n]:[]}}):(c.filter.id=function(e){var t=e.replace(xe,be);return function(e){var n="undefined"!=typeof e.getattributenode&&e.getattributenode("id");return n&&n.value===t}},c.find.id=function(e,t){if("undefined"!=typeof t.getelementbyid&&o){var n,r,i,o=t.getelementbyid(e);if(o){if(n=o.getattributenode("id"),n&&n.value===e)return[o];for(i=t.getelementsbyname(e),r=0;o=i[r++];)if(n=o.getattributenode("id"),n&&n.value===e)return[o]}return[]}}),c.find.tag=t.getelementsbytagname?function(e,t){return"undefined"!=typeof t.getelementsbytagname?t.getelementsbytagname(e):t.qsa?t.queryselectorall(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getelementsbytagname(e);if("*"===e){for(;n=o[i++];)1===n.nodetype&&r.push(n);return r}return o},c.find.class=t.getelementsbyclassname&&function(e,t){if("undefined"!=typeof t.getelementsbyclassname&&o)return t.getelementsbyclassname(e)},r=[],p=[],(t.qsa=me.test(h.queryselectorall))&&(i(function(e){f.appendchild(e).innerhtml="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.queryselectorall("[msallowcapture^='']").length&&p.push("[*^$]="+ne+"*(?:''|\"\")"),e.queryselectorall("[selected]").length||p.push("\\["+ne+"*(?:value|"+te+")"),e.queryselectorall("[id~="+w+"-]").length||p.push("~="),e.queryselectorall(":checked").length||p.push(":checked"),e.queryselectorall("a#"+w+"+*").length||p.push(".#.+[+~]")}),i(function(e){e.innerhtml="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=h.createelement("input");t.setattribute("type","hidden"),e.appendchild(t).setattribute("name","d"),e.queryselectorall("[name=d]").length&&p.push("name"+ne+"*[*^$|!~]?="),2!==e.queryselectorall(":enabled").length&&p.push(":enabled",":disabled"),f.appendchild(e).disabled=!0,2!==e.queryselectorall(":disabled").length&&p.push(":enabled",":disabled"),e.queryselectorall("*,:x"),p.push(",.*:")})),(t.matchesselector=me.test(m=f.matches||f.webkitmatchesselector||f.mozmatchesselector||f.omatchesselector||f.msmatchesselector))&&i(function(e){t.disconnectedmatch=m.call(e,"*"),m.call(e,"[s!='']:x"),r.push("!=",oe)}),p=p.length&&new regexp(p.join("|")),r=r.length&&new regexp(r.join("|")),t=me.test(f.comparedocumentposition),i=t||me.test(f.contains)?function(e,t){var n=9===e.nodetype?e.documentelement:e,r=t&&t.parentnode;return e===r||!(!r||1!==r.nodetype||!(n.contains?n.contains(r):e.comparedocumentposition&&16&e.comparedocumentposition(r)))}:function(e,t){if(t)for(;t=t.parentnode;)if(t===e)return!0;return!1},v=t?function(e,t){if(e===t)return q=!0,0;var n=!e.comparedocumentposition-!t.comparedocumentposition;return n?n:(n=(e.ownerdocument||e)===(t.ownerdocument||t)?e.comparedocumentposition(t):1,1&n||!t.sortdetached&&t.comparedocumentposition(e)===n?e===h||e.ownerdocument===$&&i($,e)?-1:t===h||t.ownerdocument===$&&i($,t)?1:a?ee(a,e)-ee(a,t):0:4&n?-1:1)}:function(e,t){if(e===t)return q=!0,0;var n,r=0,i=e.parentnode,o=t.parentnode,s=[e],u=[t];if(!i||!o)return e===h?-1:t===h?1:i?-1:o?1:a?ee(a,e)-ee(a,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentnode;)s.unshift(n);for(n=t;n=n.parentnode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===$?-1:u[r]===$?1:0},h):h},t.matches=function(e,n){return t(e,null,null,n)},t.matchesselector=function(e,n){if((e.ownerdocument||e)!==h&&l(e),n=n.replace(ce,"='$1']"),t.matchesselector&&o&&!u[n+" "]&&(!r||!r.test(n))&&(!p||!p.test(n)))try{var r=m.call(e,n);if(r||t.disconnectedmatch||e.document&&11!==e.document.nodetype)return r}catch(e){}return t(n,h,null,[e]).length>0},t.contains=function(e,t){return(e.ownerdocument||e)!==h&&l(e),i(e,t)},t.attr=function(e,t){(e.ownerdocument||e)!==h&&l(e);var n=c.attrhandle[t.tolowercase()],r=n&&g.call(c.attrhandle,t.tolowercase())?n(e,t,!o):void 0;return void 0!==r?r:t.attributes||!o?e.getattribute(t):(r=e.getattributenode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,te)},t.error=function(e){throw new error("syntax error, unrecognized expression: "+e)},t.uniquesort=function(e){var t,n=[],r=0,i=0;if(q=!t.detectduplicates,a=!t.sortstable&&e.slice(0),e.sort(v),q){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return a=null,e},e=t.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+=e(e)}else if(3===i||4===i)return e.nodevalue}else for(;t=e[r++];)n+=e(t);return n},c=t.selectors={cachelength:50,createpseudo:r,match:de,attrhandle:{},find:{},relative:{">":{dir:"parentnode",first:!0}," ":{dir:"parentnode"},"+":{dir:"previoussibling",first:!0},"~":{dir:"previoussibling"}},prefilter:{attr:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},child:function(e){return e[1]=e[1].tolowercase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},pseudo:function(e){var t,n=!e[6]&&e[2];return de.child.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=s(n,!0))&&(t=n.indexof(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{tag:function(e){var t=e.replace(xe,be).tolowercase();return"*"===e?function(){return!0}:function(e){return e.nodename&&e.nodename.tolowercase()===t}},class:function(e){var t=z[e+" "];return t||(t=new regexp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.classname&&e.classname||"undefined"!=typeof e.getattribute&&e.getattribute("class")||"")})},attr:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexof(r):"*="===n?r&&o.indexof(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexof(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},child:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentnode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextsibling":"previoussibling",m=t.parentnode,y=s&&t.nodename.tolowercase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodename.tolowercase()===y:1===p.nodetype)return!1;h=g="only"===e&&!h&&"nextsibling"}return!0}if(h=[a?m.firstchild:m.lastchild],a&&v){for(p=m,f=p[w]||(p[w]={}),c=f[p.uniqueid]||(f[p.uniqueid]={}),l=c[e]||[],d=l[0]===b&&l[1],x=d&&l[2],p=d&&m.childnodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodetype&&++x&&p===t){c[e]=[b,d,x];break}}else if(v&&(p=t,f=p[w]||(p[w]={}),c=f[p.uniqueid]||(f[p.uniqueid]={}),l=c[e]||[],d=l[0]===b&&l[1],x=d),x===!1)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodename.tolowercase()!==y:1!==p.nodetype)||!++x||(v&&(f=p[w]||(p[w]={}),c=f[p.uniqueid]||(f[p.uniqueid]={}),c[e]=[b,x]),p!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},pseudo:function(e,n){var i,o=c.pseudos[e]||c.setfilters[e.tolowercase()]||t.error("unsupported pseudo: "+e);return o[w]?o(n):o.length>1?(i=[e,e,"",n],c.setfilters.hasownproperty(e.tolowercase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=j(e.replace(se,"$1"));return i[w]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(xe,be),function(t){return(t.textcontent||t.innertext||e(t)).indexof(e)>-1}}),lang:r(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).tolowercase(),function(t){var n;do if(n=o?t.lang:t.getattribute("xml:lang")||t.getattribute("lang"))return n=n.tolowercase(),n===e||0===n.indexof(e+"-");while((t=t.parentnode)&&1===t.nodetype);return!1}}),target:function(t){
var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===h.activeelement&&(!h.hasfocus||h.hasfocus())&&!!(e.type||e.href||~e.tabindex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodename.tolowercase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentnode&&e.parentnode.selectedindex,e.selected===!0},empty:function(e){for(e=e.firstchild;e;e=e.nextsibling)if(e.nodetype<6)return!1;return!0},parent:function(e){return!c.pseudos.empty(e)},header:function(e){return ge.test(e.nodename)},input:function(e){return he.test(e.nodename)},button:function(e){var t=e.nodename.tolowercase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodename.tolowercase()&&"text"===e.type&&(null==(t=e.getattribute("type"))||"text"===t.tolowercase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},c.pseudos.nth=c.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})c.pseudos[w]=s(w);for(w in{submit:!0,reset:!0})c.pseudos[w]=u(w);return p.prototype=c.filters=c.pseudos,c.setfilters=new p,s=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=x[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=c.prefilter;s;){r&&!(i=ue.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=le.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length));for(a in c.filter)!(i=de[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):x(e,u).slice(0)},j=t.compile=function(e,t){var n,r=[],i=[],o=u[e+" "];if(!o){for(t||(t=s(e)),n=t.length;n--;)o=x(t[n]),o[w]?r.push(o):i.push(o);o=u(e,b(i,r)),o.selector=e}return o},n=t.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&s(e=l.selector||e);if(n=n||[],1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"id"===(a=o[0]).type&&9===t.nodetype&&o&&c.relative[o[1].type]){if(t=(c.find.id(a.matches[0].replace(xe,be),t)||[])[0],!t)return n;l&&(t=t.parentnode),e=e.slice(o.shift().value.length)}for(i=de.needscontext.test(e)?0:o.length;i--&&(a=o[i],!c.relative[s=a.type]);)if((u=c.find[s])&&(r=u(a.matches[0].replace(xe,be),ve.test(o[0].type)&&f(t.parentnode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return k.apply(n,r),n;break}}return(l||j(e,c))(r,t,!o,n,!t||ve.test(e)&&f(t.parentnode)||t),n},t.sortstable=w.split("").sort(v).join("")===w,t.detectduplicates=!!q,l(),t.sortdetached=i(function(e){return 1&e.comparedocumentposition(h.createelement("fieldset"))}),i(function(e){return e.innerhtml="<a href='#'></a>","#"===e.firstchild.getattribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getattribute(t,"type"===t.tolowercase()?1:2)}),t.attributes&&i(function(e){return e.innerhtml="<input/>",e.firstchild.setattribute("value",""),""===e.firstchild.getattribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodename.tolowercase())return e.defaultvalue}),i(function(e){return null==e.getattribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.tolowercase():(r=e.getattributenode(t))&&r.specified?r.value:null}),t}(e);ge.find=be,ge.expr=be.selectors,ge.expr[":"]=ge.expr.pseudos,ge.uniquesort=ge.unique=be.uniquesort,ge.text=be.gettext,ge.isxmldoc=be.isxml,ge.contains=be.contains,ge.escapeselector=be.escape;var we=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodetype;)if(1===e.nodetype){if(i&&ge(e).is(n))break;r.push(e)}return r},te=function(e,t){for(var n=[];e;e=e.nextsibling)1===e.nodetype&&e!==t&&n.push(e);return n},ce=ge.expr.match.needscontext,ee=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,ke=/^.[^:#\[\.,]*$/;ge.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodetype?ge.find.matchesselector(r,e)?[r]:[]:ge.find.matches(e,ge.grep(t,function(e){return 1===e.nodetype}))},ge.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushstack(ge(e).filter(function(){for(t=0;t<r;t++)if(ge.contains(i[t],this))return!0}));for(n=this.pushstack([]),t=0;t<r;t++)ge.find(e,i[t],n);return r>1?ge.uniquesort(n):n},filter:function(e){return this.pushstack(o(this,e||[],!1))},not:function(e){return this.pushstack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&ce.test(e)?ge(e):e||[],!1).length}});var se,je=/^(?:\s*(<[\w\w]+>)[^>]*|#([\w-]+))$/,ne=ge.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||se,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:je.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ge?t[0]:t,ge.merge(this,ge.parsehtml(r[1],t&&t.nodetype?t.ownerdocument||t:ne,!0)),ee.test(r[1])&&ge.isplainobject(t))for(r in t)ge.isfunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=ne.getelementbyid(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodetype?(this[0]=e,this.length=1,this):ge.isfunction(e)?void 0!==n.ready?n.ready(e):e(ge):ge.makearray(e,this)};ne.prototype=ge.fn,se=ge(ne);var de=/^(?:parents|prev(?:until|all))/,ae={children:!0,contents:!0,next:!0,prev:!0};ge.fn.extend({has:function(e){var t=ge(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ge.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ge(e);if(!ce.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentnode)if(n.nodetype<11&&(a?a.index(n)>-1:1===n.nodetype&&ge.find.matchesselector(n,e))){o.push(n);break}return this.pushstack(o.length>1?ge.uniquesort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ge(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentnode?this.first().prevall().length:-1},add:function(e,t){return this.pushstack(ge.uniquesort(ge.merge(this.get(),ge(e,t))))},addback:function(e){return this.add(null==e?this.prevobject:this.prevobject.filter(e))}}),ge.each({parent:function(e){var t=e.parentnode;return t&&11!==t.nodetype?t:null},parents:function(e){return we(e,"parentnode")},parentsuntil:function(e,t,n){return we(e,"parentnode",n)},next:function(e){return a(e,"nextsibling")},prev:function(e){return a(e,"previoussibling")},nextall:function(e){return we(e,"nextsibling")},prevall:function(e){return we(e,"previoussibling")},nextuntil:function(e,t,n){return we(e,"nextsibling",n)},prevuntil:function(e,t,n){return we(e,"previoussibling",n)},siblings:function(e){return te((e.parentnode||{}).firstchild,e)},children:function(e){return te(e.firstchild)},contents:function(e){return i(e,"iframe")?e.contentdocument:(i(e,"template")&&(e=e.content||e),ge.merge([],e.childnodes))}},function(e,t){ge.fn[e]=function(n,r){var i=ge.map(this,t,n);return"until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ge.filter(r,i)),this.length>1&&(ae[e]||ge.uniquesort(i),de.test(e)&&i.reverse()),this.pushstack(i)}});var qe=/[^\x20\t\r\n\f]+/g;ge.callbacks=function(e){e="string"==typeof e?s(e):ge.extend({},e);var t,n,r,i,o=[],a=[],u=-1,l=function(){for(i=i||e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u<o.length;)o[u].apply(n[0],n[1])===!1&&e.stoponfalse&&(u=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(u=o.length-1,a.push(n)),function t(n){ge.each(n,function(n,r){ge.isfunction(r)?e.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==ge.type(r)&&t(r)})}(arguments),n&&!t&&l()),this},remove:function(){return ge.each(arguments,function(e,t){for(var n;(n=ge.inarray(t,o,n))>-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?ge.inarray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},firewith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return c.firewith(this,arguments),this},fired:function(){return!!r}};return c},ge.extend({deferred:function(t){var n=[["notify","progress",ge.callbacks("memory"),ge.callbacks("memory"),2],["resolve","done",ge.callbacks("once memory"),ge.callbacks("once memory"),0,"resolved"],["reject","fail",ge.callbacks("once memory"),ge.callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return ge.deferred(function(t){ge.each(n,function(n,r){var i=ge.isfunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&ge.isfunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"with"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var s=this,c=arguments,f=function(){var e,f;if(!(t<a)){if(e=r.apply(s,c),e===n.promise())throw new typeerror("thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,ge.isfunction(f)?i?f.call(e,o(a,n,u,i),o(a,n,l,i)):(a++,f.call(e,o(a,n,u,i),o(a,n,l,i),o(a,n,u,n.notifywith))):(r!==u&&(s=void 0,c=[e]),(i||n.resolvewith)(s,c))}},p=i?f:function(){try{f()}catch(e){ge.deferred.exceptionhook&&ge.deferred.exceptionhook(e,p.stacktrace),t+1>=a&&(r!==l&&(s=void 0,c=[e]),n.rejectwith(s,c))}};t?p():(ge.deferred.getstackhook&&(p.stacktrace=ge.deferred.getstackhook()),e.settimeout(p))}}var a=0;return ge.deferred(function(e){n[0][3].add(o(0,e,ge.isfunction(i)?i:u,e.notifywith)),n[1][3].add(o(0,e,ge.isfunction(t)?t:u)),n[2][3].add(o(0,e,ge.isfunction(r)?r:l))}).promise()},promise:function(e){return null!=e?ge.extend(e,i):i}},o={};return ge.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[0][2].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"with"](this===o?void 0:this,arguments),this},o[t[0]+"with"]=a.firewith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=array(n),i=ie.call(arguments),o=ge.deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?ie.call(arguments):n,--t||o.resolvewith(r,i)}};if(t<=1&&(c(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||ge.isfunction(i[n]&&i[n].then)))return o.then();for(;n--;)c(i[n],a(n),o.reject);return o.promise()}});var le=/^(eval|internal|range|reference|syntax|type|uri)error$/;ge.deferred.exceptionhook=function(t,n){e.console&&e.console.warn&&t&&le.test(t.name)&&e.console.warn("jquery.deferred exception: "+t.message,t.stack,n)},ge.readyexception=function(t){e.settimeout(function(){throw t})};var he=ge.deferred();ge.fn.ready=function(e){return he.then(e).catch(function(e){ge.readyexception(e)}),this},ge.extend({isready:!1,readywait:1,ready:function(e){(e===!0?--ge.readywait:ge.isready)||(ge.isready=!0,e!==!0&&--ge.readywait>0||he.resolvewith(ne,[ge]))}}),ge.ready.then=he.then,"complete"===ne.readystate||"loading"!==ne.readystate&&!ne.documentelement.doscroll?e.settimeout(ge.ready):(ne.addeventlistener("domcontentloaded",f),e.addeventlistener("load",f));var fe=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===ge.type(n)){i=!0;for(s in n)fe(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,ge.isfunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ge(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},oe=function(e){return 1===e.nodetype||9===e.nodetype||!+e.nodetype};p.uid=1,p.prototype={cache:function(e){var t=e[this.expando];return t||(t={},oe(e)&&(e.nodetype?e[this.expando]=t:object.defineproperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[ge.camelcase(t)]=n;else for(r in t)i[ge.camelcase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][ge.camelcase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){array.isarray(t)?t=t.map(ge.camelcase):(t=ge.camelcase(t),t=t in r?[t]:t.match(qe)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||ge.isemptyobject(r))&&(e.nodetype?e[this.expando]=void 0:delete e[this.expando])}},hasdata:function(e){var t=e[this.expando];return void 0!==t&&!ge.isemptyobject(t)}};var pe=new p,re=new p,me=/^(?:\{[\w\w]*\}|\[[\w\w]*\])$/,ie=/[a-z]/g;ge.extend({hasdata:function(e){return re.hasdata(e)||pe.hasdata(e)},data:function(e,t,n){return re.access(e,t,n)},removedata:function(e,t){re.remove(e,t)},_data:function(e,t,n){return pe.access(e,t,n)},_removedata:function(e,t){pe.remove(e,t)}}),ge.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=re.get(o),1===o.nodetype&&!pe.get(o,"hasdataattrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexof("data-")&&(r=ge.camelcase(r.slice(5)),h(o,r,i[r])));pe.set(o,"hasdataattrs",!0)}return i}return"object"==typeof e?this.each(function(){re.set(this,e)}):fe(this,function(t){var n;if(o&&void 0===t){if(n=re.get(o,e),void 0!==n)return n;if(n=h(o,e),void 0!==n)return n}else this.each(function(){re.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removedata:function(e){return this.each(function(){re.remove(this,e)})}}),ge.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe.get(e,t),n&&(!r||array.isarray(n)?r=pe.access(e,t,ge.makearray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ge.queue(e,t),r=n.length,i=n.shift(),o=ge._queuehooks(e,t),a=function(){ge.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queuehooks:function(e,t){var n=t+"queuehooks";return pe.get(e,n)||pe.access(e,n,{empty:ge.callbacks("once memory").add(function(){pe.remove(e,[t+"queue",n])})})}}),ge.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?ge.queue(this[0],e):void 0===t?this:this.each(function(){var n=ge.queue(this,e,t);ge._queuehooks(this,e),"fx"===e&&"inprogress"!==n[0]&&ge.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ge.dequeue(this,e)})},clearqueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ge.deferred(),o=this,a=this.length,s=function(){--r||i.resolvewith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=pe.get(o[a],e+"queuehooks"),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var we=/[+-]?(?:\d*\.|)\d+(?:[ee][+-]?\d+|)/.source,$e=new regexp("^(?:([+-])=|)("+we+")([a-z%]*)$","i"),be=["top","right","bottom","left"],_e=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&ge.contains(e.ownerdocument,e)&&"none"===ge.css(e,"display")},ze=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},xe={};ge.fn.extend({show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){_e(this)?ge(this).show():ge(this).hide()})}});var ue=/^(?:checkbox|radio)$/i,ve=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ge=/^$|\/(?:java|ecma)script/i,ye={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ye.optgroup=ye.option,ye.tbody=ye.tfoot=ye.colgroup=ye.caption=ye.thead,ye.th=ye.td;var qe=/<|?\w+;/;!function(){var e=ne.createdocumentfragment(),t=e.appendchild(ne.createelement("div")),n=ne.createelement("input");n.setattribute("type","radio"),n.setattribute("checked","checked"),n.setattribute("name","t"),t.appendchild(n),de.checkclone=t.clonenode(!0).clonenode(!0).lastchild.checked,t.innerhtml="<textarea>x</textarea>",de.noclonechecked=!!t.clonenode(!0).lastchild.defaultvalue}();var je=ne.documentelement,ke=/^key/,ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;ge.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=pe.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&ge.find.matchesselector(je,i),n.guid||(n.guid=ge.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return"undefined"!=typeof ge&&ge.event.triggered!==t.type?ge.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(qe)||[""],l=t.length;l--;)s=et.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d&&(f=ge.event.special[d]||{},d=(i?f.delegatetype:f.bindtype)||d,f=ge.event.special[d]||{},c=ge.extend({type:d,origtype:g,data:r,handler:n,guid:n.guid,selector:i,needscontext:i&&ge.expr.match.needscontext.test(i),namespace:h.join(".")},o),(p=u[d])||(p=u[d]=[],p.delegatecount=0,f.setup&&f.setup.call(e,r,h,a)!==!1||e.addeventlistener&&e.addeventlistener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegatecount++,0,c):p.push(c),ge.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=pe.hasdata(e)&&pe.get(e);if(m&&(u=m.events)){for(t=(t||"").match(qe)||[""],l=t.length;l--;)if(s=et.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=ge.event.special[d]||{},d=(r?f.delegatetype:f.bindtype)||d,p=u[d]||[],s=s[2]&&new regexp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origtype||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegatecount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||ge.removeevent(e,d,m.handle),delete u[d])}else for(d in u)ge.event.remove(e,d+t[l],n,r,!0);ge.isemptyobject(u)&&pe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=ge.event.fix(e),u=new array(arguments.length),l=(pe.get(this,"events")||{})[s.type]||[],c=ge.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegatetarget=this,!c.predispatch||c.predispatch.call(this,s)!==!1){for(a=ge.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.ispropagationstopped();)for(s.currenttarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isimmediatepropagationstopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleobj=o,s.data=o.data,r=((ge.event.special[o.origtype]||{}).handle||o.handler).apply(i.elem,u),void 0!==r&&(s.result=r)===!1&&(s.preventdefault(),s.stoppropagation()));return c.postdispatch&&c.postdispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegatecount,l=e.target;if(u&&l.nodetype&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentnode||this)if(1===l.nodetype&&("click"!==e.type||l.disabled!==!0)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needscontext?ge(i,this).index(l)>-1:ge.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addprop:function(e,t){object.defineproperty(ge.event.prototype,e,{enumerable:!0,configurable:!0,get:ge.isfunction(t)?function(){if(this.originalevent)return t(this.originalevent)}:function(){if(this.originalevent)return this.originalevent[e]},set:function(t){object.defineproperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[ge.expando]?e:new ge.event(e)},special:{load:{nobubble:!0},focus:{trigger:function(){if(this!==c()&&this.focus)return this.focus(),!1},delegatetype:"focusin"},blur:{trigger:function(){if(this===c()&&this.blur)return this.blur(),!1},delegatetype:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&i(this,"input"))return this.click(),!1},_default:function(e){return i(e.target,"a")}},beforeunload:{postdispatch:function(e){void 0!==e.result&&e.originalevent&&(e.originalevent.returnvalue=e.result)}}}},ge.removeevent=function(e,t,n){e.removeeventlistener&&e.removeeventlistener(t,n)},ge.event=function(e,t){return this instanceof ge.event?(e&&e.type?(this.originalevent=e,this.type=e.type,this.isdefaultprevented=e.defaultprevented||void 0===e.defaultprevented&&e.returnvalue===!1?w:t,this.target=e.target&&3===e.target.nodetype?e.target.parentnode:e.target,this.currenttarget=e.currenttarget,this.relatedtarget=e.relatedtarget):this.type=e,t&&ge.extend(this,t),this.timestamp=e&&e.timestamp||ge.now(),void(this[ge.expando]=!0)):new ge.event(e,t)},ge.event.prototype={constructor:ge.event,isdefaultprevented:t,ispropagationstopped:t,isimmediatepropagationstopped:t,issimulated:!1,preventdefault:function(){var e=this.originalevent;this.isdefaultprevented=w,e&&!this.issimulated&&e.preventdefault()},stoppropagation:function(){var e=this.originalevent;this.ispropagationstopped=w,e&&!this.issimulated&&e.stoppropagation()},stopimmediatepropagation:function(){var e=this.originalevent;this.isimmediatepropagationstopped=w,e&&!this.issimulated&&e.stopimmediatepropagation(),this.stoppropagation()}},ge.each({altkey:!0,bubbles:!0,cancelable:!0,changedtouches:!0,ctrlkey:!0,detail:!0,eventphase:!0,metakey:!0,pagex:!0,pagey:!0,shiftkey:!0,view:!0,char:!0,charcode:!0,key:!0,keycode:!0,button:!0,buttons:!0,clientx:!0,clienty:!0,offsetx:!0,offsety:!0,pointerid:!0,pointertype:!0,screenx:!0,screeny:!0,targettouches:!0,toelement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&ke.test(e.type)?null!=e.charcode?e.charcode:e.keycode:!e.which&&void 0!==t&&ze.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},ge.event.addprop),ge.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ge.event.special[e]={delegatetype:t,bindtype:t,handle:function(e){var n,r=this,i=e.relatedtarget,o=e.handleobj;return i&&(i===r||ge.contains(r,i))||(e.type=o.origtype,n=o.handler.apply(this,arguments),e.type=t),n}}}),ge.fn.extend({on:function(e,t,n,r){return e(this,e,t,n,r)},one:function(e,t,n,r){return e(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventdefault&&e.handleobj)return r=e.handleobj,ge(e.delegatetarget).off(r.namespace?r.origtype+"."+r.namespace:r.origtype,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=t),this.each(function(){ge.event.remove(this,e,n,t)})}});var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,nt=/<script|<style|<link/i,rt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/^true\/(.*)/,ot=/^\s*<!(?:\[cdata\[|--)|(?:\]\]|--)>\s*$/g;ge.extend({htmlprefilter:function(e){return e.replace(tt,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.clonenode(!0),u=ge.contains(e.ownerdocument,e);if(!(de.noclonechecked||1!==e.nodetype&&11!==e.nodetype||ge.isxmldoc(e)))for(a=v(s),o=v(e),r=0,i=o.length;r<i;r++)d(o[r],a[r]);if(t)if(n)for(o=o||v(e),a=a||v(s),r=0,i=o.length;r<i;r++)n(o[r],a[r]);else n(e,s);return a=v(s,"script"),a.length>0&&x(a,!u&&v(e,"script")),s},cleandata:function(e){for(var t,n,r,i=ge.event.special,o=0;void 0!==(n=e[o]);o++)if(oe(n)){if(t=n[pe.expando]){if(t.events)for(r in t.events)i[r]?ge.event.remove(n,r):ge.removeevent(n,r,t.handle);n[pe.expando]=void 0}n[re.expando]&&(n[re.expando]=void 0)}}}),ge.fn.extend({detach:function(e){return q(this,e,!0)},remove:function(e){return q(this,e)},text:function(e){return fe(this,function(e){return void 0===e?ge.text(this):this.empty().each(function(){1!==this.nodetype&&11!==this.nodetype&&9!==this.nodetype||(this.textcontent=e)})},null,e,arguments.length)},append:function(){return a(this,arguments,function(e){if(1===this.nodetype||11===this.nodetype||9===this.nodetype){var t=k(this,e);t.appendchild(e)}})},prepend:function(){return a(this,arguments,function(e){if(1===this.nodetype||11===this.nodetype||9===this.nodetype){var t=k(this,e);t.insertbefore(e,t.firstchild)}})},before:function(){return a(this,arguments,function(e){this.parentnode&&this.parentnode.insertbefore(e,this)})},after:function(){return a(this,arguments,function(e){this.parentnode&&this.parentnode.insertbefore(e,this.nextsibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodetype&&(ge.cleandata(v(e,!1)),e.textcontent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ge.clone(this,e,t)})},html:function(e){return fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodetype)return t.innerhtml;if("string"==typeof e&&!nt.test(e)&&!ye[(ve.exec(e)||["",""])[1].tolowercase()]){e=ge.htmlprefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodetype&&(ge.cleandata(v(t,!1)),t.innerhtml=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replacewith:function(){var e=[];return a(this,arguments,function(t){var n=this.parentnode;ge.inarray(this,e)<0&&(ge.cleandata(v(this)),n&&n.replacechild(t,this))},e)}}),ge.each({appendto:"append",prependto:"prepend",insertbefore:"before",insertafter:"after",replaceall:"replacewith"},function(e,t){ge.fn[e]=function(e){for(var n,r=[],i=ge(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),ge(i[a])[t](n),ae.apply(r,n.get());return this.pushstack(r)}});var at=/^margin/,st=new regexp("^("+we+")(?!px)[a-z%]+$","i"),ut=function(t){var n=t.ownerdocument.defaultview;return n&&n.opener||(n=e),n.getcomputedstyle(t)};!function(){function t(){if(s){s.style.csstext="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerhtml="",je.appendchild(a);var t=e.getcomputedstyle(s);n="1%"!==t.top,o="2px"===t.marginleft,r="4px"===t.width,s.style.marginright="50%",i="4px"===t.marginright,je.removechild(a),s=null}}var n,r,i,o,a=ne.createelement("div"),s=ne.createelement("div");s.style&&(s.style.backgroundclip="content-box",s.clonenode(!0).style.backgroundclip="",de.clearclonestyle="content-box"===s.style.backgroundclip,a.style.csstext="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendchild(s),ge.extend(de,{pixelposition:function(){return t(),n},boxsizingreliable:function(){return t(),r},pixelmarginright:function(){return t(),i},reliablemarginleft:function(){return t(),o}}))}();var lt=/^(none|table(?!-c[ea]).+)/,ct=/^--/,ft={position:"absolute",visibility:"hidden",display:"block"},pt={letterspacing:"0",fontweight:"400"},dt=["webkit","moz","ms"],ht=ne.createelement("div").style;ge.extend({csshooks:{opacity:{get:function(e,t){if(t){var n=l(e,"opacity");return""===n?"1":n}}}},cssnumber:{animationiterationcount:!0,columncount:!0,fillopacity:!0,flexgrow:!0,flexshrink:!0,fontweight:!0,lineheight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zindex:!0,zoom:!0},cssprops:{float:"cssfloat"},style:function(e,t,n,r){if(e&&3!==e.nodetype&&8!==e.nodetype&&e.style){var i,o,a,s=ge.camelcase(t),u=ct.test(t),l=e.style;return u||(t=o(s)),a=ge.csshooks[t]||ge.csshooks[s],void 0===n?a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t]:(o=typeof n,"string"===o&&(i=$e.exec(n))&&i[1]&&(n=g(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(ge.cssnumber[s]?"":"px")),de.clearclonestyle||""!==n||0!==t.indexof("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setproperty(t,n):l[t]=n)),void 0)}},css:function(e,t,n,r){var i,o,a,s=ge.camelcase(t),u=ct.test(t);return u||(t=o(s)),a=ge.csshooks[t]||ge.csshooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=l(e,t,r)),"normal"===i&&t in pt&&(i=pt[t]),""===n||n?(o=parsefloat(i),n===!0||isfinite(o)?o||0:i):i}}),ge.each(["height","width"],function(e,t){ge.csshooks[t]={get:function(e,n,r){if(n)return!lt.test(ge.css(e,"display"))||e.getclientrects().length&&e.getboundingclientrect().width?m(e,t,r):ze(e,ft,function(){return m(e,t,r)})},set:function(e,n,r){var i,o=r&&ut(e),a=r&&r(e,t,r,"border-box"===ge.css(e,"boxsizing",!1,o),o);return a&&(i=$e.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=ge.css(e,t)),p(e,n,a)}}}),ge.csshooks.marginleft=h(de.reliablemarginleft,function(e,t){if(t)return(parsefloat(l(e,"marginleft"))||e.getboundingclientrect().left-ze(e,{marginleft:0},function(){return e.getboundingclientrect().left}))+"px"}),ge.each({margin:"",padding:"",border:"width"},function(e,t){ge.csshooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+be[r]+t]=o[r]||o[r-2]||o[0];return i}},at.test(e)||(ge.csshooks[e+t].set=p)}),ge.fn.extend({css:function(e,t){return fe(this,function(e,t,n){var r,i,o={},a=0;if(array.isarray(t)){for(r=ut(e),i=t.length;a<i;a++)o[t[a]]=ge.css(e,t[a],!1,r);return o}return void 0!==n?ge.style(e,t,n):ge.css(e,t)},e,t,arguments.length>1)}}),ge.tween=i,i.prototype={constructor:i,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ge.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ge.cssnumber[n]?"":"px")},cur:function(){var e=i.prophooks[this.prop];return e&&e.get?e.get(this):i.prophooks._default.get(this)},run:function(e){var t,n=i.prophooks[this.prop];return this.options.duration?this.pos=t=ge.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):i.prophooks._default.set(this),this}},i.prototype.init.prototype=i.prototype,i.prophooks={_default:{get:function(e){var t;return 1!==e.elem.nodetype||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ge.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ge.fx.step[e.prop]?ge.fx.step[e.prop](e):1!==e.elem.nodetype||null==e.elem.style[ge.cssprops[e.prop]]&&!ge.csshooks[e.prop]?e.elem[e.prop]=e.now:ge.style(e.elem,e.prop,e.now+e.unit)}}},i.prophooks.scrolltop=i.prophooks.scrollleft={set:function(e){e.elem.nodetype&&e.elem.parentnode&&(e.elem[e.prop]=e.now)}},ge.easing={linear:function(e){return e},swing:function(e){return.5-math.cos(e*math.pi)/2},_default:"swing"},ge.fx=i.prototype.init,ge.fx.step={};var gt,mt,yt=/^(?:toggle|show|hide)$/,vt=/queuehooks$/;ge.animation=ge.extend(u,{tweeners:{"*":[function(e,t){var n=this.createtween(e,t);return g(n.elem,e,$e.exec(t),n),n}]},tweener:function(e,t){ge.isfunction(e)?(t=e,e=["*"]):e=e.match(qe);for(var n,r=0,i=e.length;r<i;r++)n=e[r],u.tweeners[n]=u.tweeners[n]||[],u.tweeners[n].unshift(t)},prefilters:[z],prefilter:function(e,t){t?u.prefilters.unshift(e):u.prefilters.push(e)}}),ge.speed=function(e,t,n){var r=e&&"object"==typeof e?ge.extend({},e):{complete:n||!n&&t||ge.isfunction(e)&&e,duration:e,easing:n&&t||t&&!ge.isfunction(t)&&t};return ge.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ge.fx.speeds?r.duration=ge.fx.speeds[r.duration]:r.duration=ge.fx.speeds._default),null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){ge.isfunction(r.old)&&r.old.call(this),r.queue&&ge.dequeue(this,r.queue)},r},ge.fn.extend({fadeto:function(e,t,n,r){return this.filter(_e).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ge.isemptyobject(e),o=ge.speed(t,n,r),a=function(){var t=u(this,ge.extend({},e),o);(i||pe.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queuehooks",o=ge.timers,a=pe.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&vt.test(i)&&r(a[i]);
for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||ge.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=pe.get(this),r=n[e+"queue"],i=n[e+"queuehooks"],o=ge.timers,a=r?r.length:0;for(n.finish=!0,ge.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ge.each(["toggle","show","hide"],function(e,t){var n=ge.fn[t];ge.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(b(t,!0),e,r,i)}}),ge.each({slidedown:b("show"),slideup:b("hide"),slidetoggle:b("toggle"),fadein:{opacity:"show"},fadeout:{opacity:"hide"},fadetoggle:{opacity:"toggle"}},function(e,t){ge.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ge.timers=[],ge.fx.tick=function(){var e,t=0,n=ge.timers;for(gt=ge.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||ge.fx.stop(),gt=void 0},ge.fx.timer=function(e){ge.timers.push(e),ge.fx.start()},ge.fx.interval=13,ge.fx.start=function(){mt||(mt=!0,w())},ge.fx.stop=function(){mt=null},ge.fx.speeds={slow:600,fast:200,_default:400},ge.fn.delay=function(t,n){return t=ge.fx?ge.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.settimeout(n,t);r.stop=function(){e.cleartimeout(i)}})},function(){var e=ne.createelement("input"),t=ne.createelement("select"),n=t.appendchild(ne.createelement("option"));e.type="checkbox",de.checkon=""!==e.value,de.optselected=n.selected,e=ne.createelement("input"),e.value="t",e.type="radio",de.radiovalue="t"===e.value}();var xt,bt=ge.expr.attrhandle;ge.fn.extend({attr:function(e,t){return fe(this,ge.attr,e,t,arguments.length>1)},removeattr:function(e){return this.each(function(){ge.removeattr(this,e)})}}),ge.extend({attr:function(e,t,n){var r,i,o=e.nodetype;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getattribute?ge.prop(e,t,n):(1===o&&ge.isxmldoc(e)||(i=ge.attrhooks[t.tolowercase()]||(ge.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void ge.removeattr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setattribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=ge.find.attr(e,t),null==r?void 0:r))},attrhooks:{type:{set:function(e,t){if(!de.radiovalue&&"radio"===t&&i(e,"input")){var n=e.value;return e.setattribute("type",t),n&&(e.value=n),t}}}},removeattr:function(e,t){var n,r=0,i=t&&t.match(qe);if(i&&1===e.nodetype)for(;n=i[r++];)e.removeattribute(n)}}),xt={set:function(e,t,n){return t===!1?ge.removeattr(e,n):e.setattribute(n,n),n}},ge.each(ge.expr.match.bool.source.match(/\w+/g),function(e,t){var n=bt[t]||ge.find.attr;bt[t]=function(e,t,r){var i,o,a=t.tolowercase();return r||(o=bt[a],bt[a]=i,i=null!=n(e,t,r)?a:null,bt[a]=o),i}});var wt=/^(?:input|select|textarea|button)$/i,tt=/^(?:a|area)$/i;ge.fn.extend({prop:function(e,t){return fe(this,ge.prop,e,t,arguments.length>1)},removeprop:function(e){return this.each(function(){delete this[ge.propfix[e]||e]})}}),ge.extend({prop:function(e,t,n){var r,i,o=e.nodetype;if(3!==o&&8!==o&&2!==o)return 1===o&&ge.isxmldoc(e)||(t=ge.propfix[t]||t,i=ge.prophooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},prophooks:{tabindex:{get:function(e){var t=ge.find.attr(e,"tabindex");return t?parseint(t,10):wt.test(e.nodename)||tt.test(e.nodename)&&e.href?0:-1}}},propfix:{for:"htmlfor",class:"classname"}}),de.optselected||(ge.prophooks.selected={get:function(e){var t=e.parentnode;return t&&t.parentnode&&t.parentnode.selectedindex,null},set:function(e){var t=e.parentnode;t&&(t.selectedindex,t.parentnode&&t.parentnode.selectedindex)}}),ge.each(["tabindex","readonly","maxlength","cellspacing","cellpadding","rowspan","colspan","usemap","frameborder","contenteditable"],function(){ge.propfix[this.tolowercase()]=this}),ge.fn.extend({addclass:function(e){var t,n,r,i,o,a,s,u=0;if(ge.isfunction(e))return this.each(function(t){ge(this).addclass(e.call(this,t,g(this)))});if("string"==typeof e&&e)for(t=e.match(qe)||[];n=this[u++];)if(i=g(n),r=1===n.nodetype&&" "+v(i)+" "){for(a=0;o=t[a++];)r.indexof(" "+o+" ")<0&&(r+=o+" ");s=v(r),i!==s&&n.setattribute("class",s)}return this},removeclass:function(e){var t,n,r,i,o,a,s,u=0;if(ge.isfunction(e))return this.each(function(t){ge(this).removeclass(e.call(this,t,g(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(qe)||[];n=this[u++];)if(i=g(n),r=1===n.nodetype&&" "+v(i)+" "){for(a=0;o=t[a++];)for(;r.indexof(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=v(r),i!==s&&n.setattribute("class",s)}return this},toggleclass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addclass(e):this.removeclass(e):ge.isfunction(e)?this.each(function(n){ge(this).toggleclass(e.call(this,n,g(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=ge(this),o=e.match(qe)||[];t=o[r++];)i.hasclass(t)?i.removeclass(t):i.addclass(t);else void 0!==e&&"boolean"!==n||(t=g(this),t&&pe.set(this,"__classname__",t),this.setattribute&&this.setattribute("class",t||e===!1?"":pe.get(this,"__classname__")||""))})},hasclass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodetype&&(" "+v(g(n))+" ").indexof(t)>-1)return!0;return!1}});var ct=/\r/g;ge.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=ge.isfunction(e),this.each(function(n){var i;1===this.nodetype&&(i=r?e.call(this,n,ge(this).val()):e,null==i?i="":"number"==typeof i?i+="":array.isarray(i)&&(i=ge.map(i,function(e){return null==e?"":e+""})),t=ge.valhooks[this.type]||ge.valhooks[this.nodename.tolowercase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=ge.valhooks[i.type]||ge.valhooks[i.nodename.tolowercase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(ct,""):null==n?"":n)}}}),ge.extend({valhooks:{option:{get:function(e){var t=ge.find.attr(e,"value");return null!=t?t:v(ge.text(e))}},select:{get:function(e){var t,n,r,o=e.options,a=e.selectedindex,s="select-one"===e.type,u=s?null:[],l=s?a+1:o.length;for(r=a<0?l:s?a:0;r<l;r++)if(n=o[r],(n.selected||r===a)&&!n.disabled&&(!n.parentnode.disabled||!i(n.parentnode,"optgroup"))){if(t=ge(n).val(),s)return t;u.push(t)}return u},set:function(e,t){for(var n,r,i=e.options,o=ge.makearray(t),a=i.length;a--;)r=i[a],(r.selected=ge.inarray(ge.valhooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedindex=-1),o}}}}),ge.each(["radio","checkbox"],function(){ge.valhooks[this]={set:function(e,t){if(array.isarray(t))return e.checked=ge.inarray(ge(e).val(),t)>-1}},de.checkon||(ge.valhooks[this].get=function(e){return null===e.getattribute("value")?"on":e.value})});var et=/^(?:focusinfocus|focusoutblur)$/;ge.extend(ge.event,{trigger:function(t,n,r,i){var o,a,s,u,l,c,f,p=[r||ne],d=ce.call(t,"type")?t.type:t,h=ce.call(t,"namespace")?t.namespace.split("."):[];if(a=s=r=r||ne,3!==r.nodetype&&8!==r.nodetype&&!et.test(d+ge.event.triggered)&&(d.indexof(".")>-1&&(h=d.split("."),d=h.shift(),h.sort()),l=d.indexof(":")<0&&"on"+d,t=t[ge.expando]?t:new ge.event(d,"object"==typeof t&&t),t.istrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new regexp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:ge.makearray(n,[t]),f=ge.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.nobubble&&!ge.iswindow(r)){for(u=f.delegatetype||d,et.test(u+d)||(a=a.parentnode);a;a=a.parentnode)p.push(a),s=a;s===(r.ownerdocument||ne)&&p.push(s.defaultview||s.parentwindow||e)}for(o=0;(a=p[o++])&&!t.ispropagationstopped();)t.type=o>1?u:f.bindtype||d,c=(pe.get(a,"events")||{})[t.type]&&pe.get(a,"handle"),c&&c.apply(a,n),c=l&&a[l],c&&c.apply&&oe(a)&&(t.result=c.apply(a,n),t.result===!1&&t.preventdefault());return t.type=d,i||t.isdefaultprevented()||f._default&&f._default.apply(p.pop(),n)!==!1||!oe(r)||l&&ge.isfunction(r[d])&&!ge.iswindow(r)&&(s=r[l],s&&(r[l]=null),ge.event.triggered=d,r[d](),ge.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=ge.extend(new ge.event,n,{type:e,issimulated:!0});ge.event.trigger(r,null,t)}}),ge.fn.extend({trigger:function(e,t){return this.each(function(){ge.event.trigger(e,t,this)})},triggerhandler:function(e,t){var n=this[0];if(n)return ge.event.trigger(e,t,n,!0)}}),ge.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){ge.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ge.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),de.focusin="onfocusin"in e,de.focusin||ge.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ge.event.simulate(t,e.target,ge.event.fix(e))};ge.event.special[t]={setup:function(){var r=this.ownerdocument||this,i=pe.access(r,t);i||r.addeventlistener(e,n,!0),pe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerdocument||this,i=pe.access(r,t)-1;i?pe.access(r,t,i):(r.removeeventlistener(e,n,!0),pe.remove(r,t))}}});var kt=e.location,st=ge.now(),jt=/\?/;ge.parsexml=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.domparser).parsefromstring(t,"text/xml")}catch(e){n=void 0}return n&&!n.getelementsbytagname("parsererror").length||ge.error("invalid xml: "+t),n};var nt=/\[\]$/,dt=/\r?\n/g,at=/^(?:submit|button|image|reset|file)$/i,qt=/^(?:input|select|textarea|keygen)/i;ge.param=function(e,t){var n,r=[],i=function(e,t){var n=ge.isfunction(t)?t():t;r[r.length]=encodeuricomponent(e)+"="+encodeuricomponent(null==n?"":n)};if(array.isarray(e)||e.jquery&&!ge.isplainobject(e))ge.each(e,function(){i(this.name,this.value)});else for(n in e)y(n,e[n],t,i);return r.join("&")},ge.fn.extend({serialize:function(){return ge.param(this.serializearray())},serializearray:function(){return this.map(function(){var e=ge.prop(this,"elements");return e?ge.makearray(e):this}).filter(function(){var e=this.type;return this.name&&!ge(this).is(":disabled")&&qt.test(this.nodename)&&!at.test(e)&&(this.checked||!ue.test(e))}).map(function(e,t){var n=ge(this).val();return null==n?null:array.isarray(n)?ge.map(n,function(e){return{name:t.name,value:e.replace(dt,"\r\n")}}):{name:t.name,value:n.replace(dt,"\r\n")}}).get()}});var lt=/%20/g,ht=/#.*$/,ft=/([?&])_=[^&]*/,ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rt=/^(?:get|head)$/,mt=/^\/\//,it={},wt={},$t="*/".concat("*"),bt=ne.createelement("a");bt.href=kt.href,ge.extend({active:0,lastmodified:{},etag:{},ajaxsettings:{url:kt.href,type:"get",islocal:pt.test(kt.protocol),global:!0,processdata:!0,async:!0,contenttype:"application/x-www-form-urlencoded; charset=utf-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responsefields:{xml:"responsexml",text:"responsetext",json:"responsejson"},converters:{"* text":string,"text html":!0,"text json":json.parse,"text xml":ge.parsexml},flatoptions:{url:!0,context:!0}},ajaxsetup:function(e,t){return t?k(k(e,ge.ajaxsettings),t):k(ge.ajaxsettings,e)},ajaxprefilter:q(it),ajaxtransport:q(wt),ajax:function(t,n){function r(t,n,r,s){var l,p,d,b,w,t=n;c||(c=!0,u&&e.cleartimeout(u),i=void 0,a=s||"",c.readystate=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=z(h,c,r)),b=ee(h,b,c,l),l?(h.ifmodified&&(w=c.getresponseheader("last-modified"),w&&(ge.lastmodified[o]=w),w=c.getresponseheader("etag"),w&&(ge.etag[o]=w)),204===t||"head"===h.type?t="nocontent":304===t?t="notmodified":(t=b.state,p=b.data,d=b.error,l=!d)):(d=t,!t&&t||(t="error",t<0&&(t=0))),c.status=t,c.statustext=(n||t)+"",l?y.resolvewith(g,[p,t,c]):y.rejectwith(g,[c,t,d]),c.statuscode(x),x=void 0,f&&m.trigger(l?"ajaxsuccess":"ajaxerror",[c,h,l?p:d]),v.firewith(g,[c,t]),f&&(m.trigger("ajaxcomplete",[c,h]),--ge.active||ge.event.trigger("ajaxstop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=ge.ajaxsetup({},n),g=h.context||h,m=h.context&&(g.nodetype||g.jquery)?ge(g):ge.event,y=ge.deferred(),v=ge.callbacks("once memory"),x=h.statuscode||{},b={},w={},t="canceled",c={readystate:0,getresponseheader:function(e){var t;if(c){if(!s)for(s={};t=ot.exec(a);)s[t[1].tolowercase()]=t[2];t=s[e.tolowercase()]}return null==t?null:t},getallresponseheaders:function(){return c?a:null},setrequestheader:function(e,t){return null==c&&(e=w[e.tolowercase()]=w[e.tolowercase()]||e,b[e]=t),this},overridemimetype:function(e){return null==c&&(h.mimetype=e),this},statuscode:function(e){var t;if(e)if(c)c.always(e[c.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||t;return i&&i.abort(t),r(0,t),this}};if(y.promise(c),h.url=((t||h.url||kt.href)+"").replace(mt,kt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.datatypes=(h.datatype||"*").tolowercase().match(qe)||[""],null==h.crossdomain){l=ne.createelement("a");try{l.href=h.url,l.href=l.href,h.crossdomain=bt.protocol+"//"+bt.host!=l.protocol+"//"+l.host}catch(e){h.crossdomain=!0}}if(h.data&&h.processdata&&"string"!=typeof h.data&&(h.data=ge.param(h.data,h.traditional)),j(it,h,n,c),c)return c;f=ge.event&&h.global,f&&0===ge.active++&&ge.event.trigger("ajaxstart"),h.type=h.type.touppercase(),h.hascontent=!rt.test(h.type),o=h.url.replace(ht,""),h.hascontent?h.data&&h.processdata&&0===(h.contenttype||"").indexof("application/x-www-form-urlencoded")&&(h.data=h.data.replace(lt,"+")):(d=h.url.slice(o.length),h.data&&(o+=(jt.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(o=o.replace(ft,"$1"),d=(jt.test(o)?"&":"?")+"_="+st++ +d),h.url=o+d),h.ifmodified&&(ge.lastmodified[o]&&c.setrequestheader("if-modified-since",ge.lastmodified[o]),ge.etag[o]&&c.setrequestheader("if-none-match",ge.etag[o])),(h.data&&h.hascontent&&h.contenttype!==!1||n.contenttype)&&c.setrequestheader("content-type",h.contenttype),c.setrequestheader("accept",h.datatypes[0]&&h.accepts[h.datatypes[0]]?h.accepts[h.datatypes[0]]+("*"!==h.datatypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)c.setrequestheader(p,h.headers[p]);if(h.beforesend&&(h.beforesend.call(g,c,h)===!1||c))return c.abort();if(t="abort",v.add(h.complete),c.done(h.success),c.fail(h.error),i=j(wt,h,n,c)){if(c.readystate=1,f&&m.trigger("ajaxsend",[c,h]),c)return c;h.async&&h.timeout>0&&(u=e.settimeout(function(){c.abort("timeout")},h.timeout));try{c=!1,i.send(b,r)}catch(e){if(c)throw e;r(-1,e)}}else r(-1,"no transport");return c},getjson:function(e,t,n){return ge.get(e,t,n,"json")},getscript:function(e,t){return ge.get(e,void 0,t,"script")}}),ge.each(["get","post"],function(e,t){ge[t]=function(e,n,r,i){return ge.isfunction(n)&&(i=i||r,r=n,n=void 0),ge.ajax(ge.extend({url:e,type:t,datatype:i,data:n,success:r},ge.isplainobject(e)&&e))}}),ge._evalurl=function(e){return ge.ajax({url:e,type:"get",datatype:"script",cache:!0,async:!1,global:!1,throws:!0})},ge.fn.extend({wrapall:function(e){var t;return this[0]&&(ge.isfunction(e)&&(e=e.call(this[0])),t=ge(e,this[0].ownerdocument).eq(0).clone(!0),this[0].parentnode&&t.insertbefore(this[0]),t.map(function(){for(var e=this;e.firstelementchild;)e=e.firstelementchild;return e}).append(this)),this},wrapinner:function(e){return ge.isfunction(e)?this.each(function(t){ge(this).wrapinner(e.call(this,t))}):this.each(function(){var t=ge(this),n=t.contents();n.length?n.wrapall(e):t.append(e)})},wrap:function(e){var t=ge.isfunction(e);return this.each(function(n){ge(this).wrapall(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ge(this).replacewith(this.childnodes)}),this}}),ge.expr.pseudos.hidden=function(e){return!ge.expr.pseudos.visible(e)},ge.expr.pseudos.visible=function(e){return!!(e.offsetwidth||e.offsetheight||e.getclientrects().length)},ge.ajaxsettings.xhr=function(){try{return new e.xmlhttprequest}catch(e){}};var _t={0:200,1223:204},zt=ge.ajaxsettings.xhr();de.cors=!!zt&&"withcredentials"in zt,de.ajax=zt=!!zt,ge.ajaxtransport(function(t){var n,r;if(de.cors||zt&&!t.crossdomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrfields)for(a in t.xhrfields)s[a]=t.xhrfields[a];t.mimetype&&s.overridemimetype&&s.overridemimetype(t.mimetype),t.crossdomain||i["x-requested-with"]||(i["x-requested-with"]="xmlhttprequest");for(a in i)s.setrequestheader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statustext):o(_t[s.status]||s.status,s.statustext,"text"!==(s.responsetype||"text")||"string"!=typeof s.responsetext?{binary:s.response}:{text:s.responsetext},s.getallresponseheaders()))}},s.onload=n(),r=s.onerror=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readystate&&e.settimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hascontent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),ge.ajaxprefilter(function(e){e.crossdomain&&(e.contents.script=!1)}),ge.ajaxsetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ge.globaleval(e),e}}}),ge.ajaxprefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossdomain&&(e.type="get")}),ge.ajaxtransport("script",function(e){if(e.crossdomain){var t,n;return{send:function(r,i){t=ge("<script>").prop({charset:e.scriptcharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),ne.head.appendchild(t[0])},abort:function(){n&&n()}}}});var xt=[],ut=/(=)\?(?=&|$)|\?\?/;ge.ajaxsetup({jsonp:"callback",jsonpcallback:function(){var e=xt.pop()||ge.expando+"_"+st++;return this[e]=!0,e}}),ge.ajaxprefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(ut.test(t.url)?"url":"string"==typeof t.data&&0===(t.contenttype||"").indexof("application/x-www-form-urlencoded")&&ut.test(t.data)&&"data");if(s||"jsonp"===t.datatypes[0])return i=t.jsonpcallback=ge.isfunction(t.jsonpcallback)?t.jsonpcallback():t.jsonpcallback,s?t[s]=t[s].replace(ut,"$1"+i):t.jsonp!==!1&&(t.url+=(jt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||ge.error(i+" was not called"),a[0]},t.datatypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?ge(e).removeprop(i):e[i]=o,t[i]&&(t.jsonpcallback=n.jsonpcallback,xt.push(i)),a&&ge.isfunction(o)&&o(a[0]),a=o=void 0}),"script"}),de.createhtmldocument=function(){var e=ne.implementation.createhtmldocument("").body;return e.innerhtml="<form></form><form></form>",2===e.childnodes.length}(),ge.parsehtml=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(de.createhtmldocument?(t=ne.implementation.createhtmldocument(""),r=t.createelement("base"),r.href=ne.location.href,t.head.appendchild(r)):t=ne),i=ee.exec(e),o=!n&&[],i?[t.createelement(i[1])]:(i=b([e],t,o),o&&o.length&&ge(o).remove(),ge.merge([],i.childnodes))},ge.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexof(" ");return s>-1&&(r=v(e.slice(s)),e=e.slice(0,s)),ge.isfunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="post"),a.length>0&&ge.ajax({url:e,type:i||"get",datatype:"html",data:t}).done(function(e){o=arguments,a.html(r?ge("<div>").append(ge.parsehtml(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responsetext,t,e])})}),this},ge.each(["ajaxstart","ajaxstop","ajaxcomplete","ajaxerror","ajaxsuccess","ajaxsend"],function(e,t){ge.fn[t]=function(e){return this.on(t,e)}}),ge.expr.pseudos.animated=function(e){return ge.grep(ge.timers,function(t){return e===t.elem}).length},ge.offset={setoffset:function(e,t,n){var r,i,o,a,s,u,l,c=ge.css(e,"position"),f=ge(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=ge.css(e,"top"),u=ge.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexof("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parsefloat(o)||0,i=parsefloat(u)||0),ge.isfunction(t)&&(t=t.call(e,n,ge.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},ge.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ge.offset.setoffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getclientrects().length?(r=o.getboundingclientrect(),t=o.ownerdocument,n=t.documentelement,i=t.defaultview,{top:r.top+i.pageyoffset-n.clienttop,left:r.left+i.pagexoffset-n.clientleft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===ge.css(n,"position")?t=n.getboundingclientrect():(e=this.offsetparent(),t=this.offset(),i(e[0],"html")||(r=e.offset()),r={top:r.top+ge.css(e[0],"bordertopwidth",!0),left:r.left+ge.css(e[0],"borderleftwidth",!0)}),{top:t.top-r.top-ge.css(n,"margintop",!0),left:t.left-r.left-ge.css(n,"marginleft",!0)}}},offsetparent:function(){return this.map(function(){for(var e=this.offsetparent;e&&"static"===ge.css(e,"position");)e=e.offsetparent;return e||je})}}),ge.each({scrollleft:"pagexoffset",scrolltop:"pageyoffset"},function(e,t){var n="pageyoffset"===t;ge.fn[e]=function(r){return fe(this,function(e,r,i){var o;return ge.iswindow(e)?o=e:9===e.nodetype&&(o=e.defaultview),void 0===i?o?o[t]:e[r]:void(o?o.scrollto(n?o.pagexoffset:i,n?i:o.pageyoffset):e[r]=i)},e,r,arguments.length)}}),ge.each(["top","left"],function(e,t){ge.csshooks[t]=h(de.pixelposition,function(e,n){if(n)return n=l(e,t),st.test(n)?ge(e).position()[t]+"px":n})}),ge.each({height:"height",width:"width"},function(e,t){ge.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ge.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||o===!0?"margin":"border");return fe(this,function(t,n,i){var o;return ge.iswindow(t)?0===r.indexof("outer")?t["inner"+e]:t.document.documentelement["client"+e]:9===t.nodetype?(o=t.documentelement,math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?ge.css(t,n,s):ge.style(t,n,i,s)},t,a?i:void 0,a)}})}),ge.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),ge.holdready=function(e){e?ge.readywait++:ge.ready(!0)},ge.isarray=array.isarray,ge.parsejson=json.parse,ge.nodename=i,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ge});var vt=e.jquery,gt=e.$;return ge.noconflict=function(t){return e.$===ge&&(e.$=gt),t&&e.jquery===ge&&(e.jquery=vt),ge},t||(e.jquery=e.$=ge),ge}),define("js/common/jquery",function(){}),define("js/module/s1",["../common/jquery"],function(){return $("div").height()}),define("js/module/s2",["../common/jquery"],function(){return $("div").width()}),require(["js/module/s1","js/module/s2"],function(e,t){console.log(parseint(e)+parseint(t))}),define("main",function(){});

【不包含jquery】

如果其他页面也需要用到jquery,它们打包的时候,也会把jquery打包。这样,相当于每个页面都打包了一次jquery,性能很差。更好的做法是,不打包jquery,其他页面引用jquery时,就可以使用缓存了。

build.js内容如下所示

({ 
 appdir: './', //项目根目录
 dir: './dist', //输出目录,全部文件打包后要放入的文件夹(如果没有会自动新建的)
 baseurl:'./',
 modules: [ //要优化的模块,相对baseurl的路径,也是省略后缀“.js”
 { 
  name:'main',
  exclude: ['js/common/jquery']//不打包jquery
 } 
 ], 
 fileexclusionregexp: /^(r|build)\.js|.*\.scss$/, //过滤,匹配到的文件将不会被输出到输出目录去
 optimizecss: 'standard', 
 removecombined: true //如果为true,将从输出目录中删除已合并的文件
})

接下来运行node r.js -o build.js命令

利用r.js打包模块化的javascript文件方法示例

运行后,生成一个'dist'文件夹,该文件夹包含的文件都是处理过后的文件,适合上线

利用r.js打包模块化的javascript文件方法示例

打包后的main.js内容如下所示

define("js/module/s1",["../common/jquery"],function(){return $("div").height()}),define("js/module/s2",["../common/jquery"],function(){return $("div").width()}),require(["js/module/s1","js/module/s2"],function(e,n){console.log(parseint(e)+parseint(n))}),define("main",function(){});

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如有疑问大家可以留言交流,谢谢大家对的支持。