html5-now-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +37 -0
- data/LICENSE.txt +20 -0
- data/README.md +31 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/html5-now-rails.gemspec +263 -0
- data/lib/html5-now-rails.rb +6 -0
- data/spec/html5-now-rails_spec.rb +7 -0
- data/spec/spec_helper.rb +12 -0
- data/vendor/assets/images/html5-now/themes/aero/7/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/7/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/7/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/7/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/7/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/7/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/aero/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/bg-colorpicker-disabled.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/bg-colorpicker.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/bg-dropdown-disabled.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/bg-dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/colorpicker-disabled.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/colorpicker.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/dropdown-disabled.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/metal.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/aqua/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/brick/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/brick/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/brick/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/brick/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/brick/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/brick/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/black/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/black/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/black/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/black/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/black/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/black/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high1/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high1/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high1/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high1/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high1/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high1/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high2/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high2/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high2/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high2/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high2/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/high2/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/white/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/white/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/white/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/white/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/white/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/contrast/white/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/desert/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/desert/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/desert/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/desert/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/desert/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/desert/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/eggplant/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/eggplant/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/eggplant/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/eggplant/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/eggplant/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/eggplant/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/lilac/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/lilac/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/lilac/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/lilac/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/lilac/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/lilac/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/maple/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/maple/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/maple/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/maple/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/maple/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/maple/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/marine/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/marine/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/marine/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/marine/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/marine/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/marine/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/plum/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/plum/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/plum/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/plum/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/plum/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/plum/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/pumpkin/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/pumpkin/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/pumpkin/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/pumpkin/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/pumpkin/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/pumpkin/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rainyday/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rainyday/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rainyday/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rainyday/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rainyday/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rainyday/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rose/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rose/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rose/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rose/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rose/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/rose/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/slate/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/slate/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/slate/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/slate/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/slate/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/slate/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/spruce/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/spruce/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/spruce/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/spruce/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/spruce/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/spruce/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/standard/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/standard/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/standard/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/standard/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/standard/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/standard/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/wheat/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/wheat/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/wheat/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/wheat/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/wheat/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/classic/wheat/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/clearlooks/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/clearlooks/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/clearlooks/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/clearlooks/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/clearlooks/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/clearlooks/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/default/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/default/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/default/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/default/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/default/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/default/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/human/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/human/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/human/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/human/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/human/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/human/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/blue/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/blue/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/blue/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/blue/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/blue/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/blue/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/olive/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/olive/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/olive/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/olive/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/olive/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/olive/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/silver/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/silver/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/silver/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/silver/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/silver/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/luna/silver/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/royale/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/royale/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/royale/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/royale/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/royale/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/royale/spinner.png +0 -0
- data/vendor/assets/images/html5-now/themes/s/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/s/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/s/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/s/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/zune/dropdown.png +0 -0
- data/vendor/assets/images/html5-now/themes/zune/progressbar-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/zune/progressbar.png +0 -0
- data/vendor/assets/images/html5-now/themes/zune/slider-vertical.png +0 -0
- data/vendor/assets/images/html5-now/themes/zune/slider.png +0 -0
- data/vendor/assets/images/html5-now/themes/zune/spinner.png +0 -0
- data/vendor/assets/javascripts/html5-now/canvas.js +9 -0
- data/vendor/assets/javascripts/html5-now/dimensions.htc +7 -0
- data/vendor/assets/javascripts/html5-now/expressInstall.swf +0 -0
- data/vendor/assets/javascripts/html5-now/forms.js +9 -0
- data/vendor/assets/javascripts/html5-now/html5-now.js +9 -0
- data/vendor/assets/javascripts/html5-now/media.js +9 -0
- data/vendor/assets/javascripts/html5-now/player.swf +0 -0
- data/vendor/assets/javascripts/html5-now/rm.js +9 -0
- metadata +342 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/*
|
2
|
+
base2 - copyright 2007-2009, Dean Edwards
|
3
|
+
http://code.google.com/p/base2/
|
4
|
+
http://www.opensource.org/licenses/mit-license.php
|
5
|
+
|
6
|
+
Contributors:
|
7
|
+
Doeke Zanstra
|
8
|
+
*/
|
9
|
+
document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,X=s.abs,Y=s.sqrt,m=10,w=m/2;function Z(){return this.context_||(this.context_=new H(this))}var N=Array.prototype.slice;function ba(a,b){var c=N.call(arguments,2);return function(){return a.apply(b,c.concat(N.call(arguments)))}}var O={init:function(a){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var b=a||document;b.createElement("canvas");b.attachEvent("onreadystatechange",ba(this.init_,this,b))}},init_:function(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!a.styleSheets.ex_canvas_){var b=a.createStyleSheet();b.owningElement.id="ex_canvas_";b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=a.getElementsByTagName("canvas"),d=0;for(;d<c.length;d++)this.initElement(c[d])},initElement:function(a){if(!a.getContext){a.getContext=Z;a.innerHTML="";a.attachEvent("onpropertychange",bb);a.attachEvent("onresize",bc);var b=a.attributes;if(b.width&&b.width.specified)a.style.width=b.width.nodeValue+"px";else a.width=a.clientWidth;if(b.height&&b.height.specified)a.style.height=b.height.nodeValue+"px";else a.height=a.clientHeight}return a}};function bb(a){var b=a.srcElement;switch(a.propertyName){case"width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case"height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function bc(a){var b=a.srcElement;if(b.firstChild){b.firstChild.style.width=b.clientWidth+"px";b.firstChild.style.height=b.clientHeight+"px"}}O.init();var P=[],B=0;for(;B<16;B++){var C=0;for(;C<16;C++)P[B*16+C]=B.toString(16)+C.toString(16)}function I(){return[[1,0,0],[0,1,0],[0,0,1]]}function x(a,b){var c=I(),d=0;for(;d<3;d++){var e=0;for(;e<3;e++){var h=0,g=0;for(;g<3;g++)h+=a[d][g]*b[g][e];c[d][e]=h}}return c}function Q(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function R(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){var d=a.indexOf("(",3),e=a.indexOf(")",d+1),h=a.substring(d+1,e).split(",");b="#";var g=0;for(;g<3;g++)b+=P[Number(h[g])];if(h.length==4&&a.substr(3,1)=="a")c=h[3]}else b=a;return{color:b,alpha:c}}function bd(a){switch(a){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function H(a){this.m_=I();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=m*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.element_=b;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}var i=H.prototype;i.clearRect=function(){this.element_.innerHTML=""};i.beginPath=function(){this.currentPath_=[]};i.moveTo=function(a,b){var c=this.getCoords_(a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};i.lineTo=function(a,b){var c=this.getCoords_(a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};i.bezierCurveTo=function(a,b,c,d,e,h){var g=this.getCoords_(e,h),k=this.getCoords_(a,b),n=this.getCoords_(c,d);S(this,k,n,g)};function S(a,b,c,d){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});a.currentX_=d.x;a.currentY_=d.y}i.quadraticCurveTo=function(a,b,c,d){var e=this.getCoords_(a,b),h=this.getCoords_(c,d),g={x:this.currentX_+0.6666666666666666*(e.x-this.currentX_),y:this.currentY_+0.6666666666666666*(e.y-this.currentY_)};S(this,g,{x:g.x+(h.x-this.currentX_)/3,y:g.y+(h.y-this.currentY_)/3},h)};i.arc=function(a,b,c,d,e,h){c*=m;var g=h?"at":"wa",k=a+G(d)*c-w,n=b+F(d)*c-w,p=a+G(e)*c-w,f=b+F(e)*c-w;if(k==p&&!h)k+=0.125;var l=this.getCoords_(a,b),o=this.getCoords_(k,n),q=this.getCoords_(p,f);this.currentPath_.push({type:g,x:l.x,y:l.y,radius:c,xStart:o.x,yStart:o.y,xEnd:q.x,yEnd:q.y})};i.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};i.strokeRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke();this.currentPath_=e};i.fillRect=function(a,b,c,d){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.fill();this.currentPath_=e};i.createLinearGradient=function(a,b,c,d){var e=new D("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=d;return e};i.createRadialGradient=function(a,b,c,d,e,h){var g=new D("gradientradial");g.x0_=a;g.y0_=b;g.r0_=c;g.x1_=d;g.y1_=e;g.r1_=h;return g};i.drawImage=function(a){var b,c,d,e,h,g,k,n,p=a.runtimeStyle.width,f=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var l=a.width,o=a.height;a.runtimeStyle.width=p;a.runtimeStyle.height=f;if(arguments.length==3){b=arguments[1];c=arguments[2];h=g=0;k=d=l;n=e=o}else if(arguments.length==5){b=arguments[1];c=arguments[2];d=arguments[3];e=arguments[4];h=g=0;k=l;n=o}else if(arguments.length==9){h=arguments[1];g=arguments[2];k=arguments[3];n=arguments[4];b=arguments[5];c=arguments[6];d=arguments[7];e=arguments[8]}else throw Error("Invalid number of arguments");var q=this.getCoords_(b,c),r=[];r.push(" <g_vml_:group",' coordsize="',m*10,",",m*10,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var y=[];y.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",j(q.x/m),",","Dy=",j(q.y/m),"");var t=q,E=this.getCoords_(b+d,c),u=this.getCoords_(b,c+e),z=this.getCoords_(b+d,c+e);t.x=s.max(t.x,E.x,u.x,z.x);t.y=s.max(t.y,E.y,u.y,z.y);r.push("padding:0 ",j(t.x/m),"px ",j(t.y/m),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",y.join(""),", sizingmethod='clip');")}else r.push("top:",j(q.y/m),"px;left:",j(q.x/m),"px;");r.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',m*d,"px;"," height:",m*e,'px;"',' cropleft="',h/l,'"',' croptop="',g/o,'"',' cropright="',(l-h-k)/l,'"',' cropbottom="',(o-g-n)/o,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",r.join(""))};i.stroke=function(c){var d=[],e=R(c?this.fillStyle:this.strokeStyle),h=e.color,g=e.alpha*this.globalAlpha;d.push("<g_vml_:shape",' filled="',!!c,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0 0" coordsize="',m*10," ",m*10,'"',' stroked="',!c,'"',' path="');var k={x:null,y:null},n={x:null,y:null},p=0;for(;p<this.currentPath_.length;p++){var f=this.currentPath_[p];switch(f.type){case"moveTo":d.push(" m ",j(f.x),",",j(f.y));break;case"lineTo":d.push(" l ",j(f.x),",",j(f.y));break;case"close":d.push(" x ");f=null;break;case"bezierCurveTo":d.push(" c ",j(f.cp1x),",",j(f.cp1y),",",j(f.cp2x),",",j(f.cp2y),",",j(f.x),",",j(f.y));break;case"at":case"wa":d.push(" ",f.type," ",j(f.x-this.arcScaleX_*f.radius),",",j(f.y-this.arcScaleY_*f.radius)," ",j(f.x+this.arcScaleX_*f.radius),",",j(f.y+this.arcScaleY_*f.radius)," ",j(f.xStart),",",j(f.yStart)," ",j(f.xEnd),",",j(f.yEnd));break}if(f){if(k.x==null||f.x<k.x)k.x=f.x;if(n.x==null||f.x>n.x)n.x=f.x;if(k.y==null||f.y<k.y)k.y=f.y;if(n.y==null||f.y>n.y)n.y=f.y}}d.push(' ">');if(c)if(typeof this.fillStyle=="object"){var l=this.fillStyle,o=0,q={x:0,y:0},r=0,y=1;if(l.type_=="gradient"){var t=l.x1_/this.arcScaleX_,E=l.y1_/this.arcScaleY_,u=this.getCoords_(l.x0_/this.arcScaleX_,l.y0_/this.arcScaleY_),z=this.getCoords_(t,E);o=Math.atan2(z.x-u.x,z.y-u.y)*180/Math.PI;if(o<0)o+=360;if(o<1.0E-6)o=0}else{var u=this.getCoords_(l.x0_,l.y0_),J=n.x-k.x,K=n.y-k.y;q={x:(u.x-k.x)/J,y:(u.y-k.y)/K};J/=this.arcScaleX_*m;K/=this.arcScaleY_*m;var T=s.max(J,K);r=2*l.r0_/T;y=2*l.r1_/T-r}var v=l.colors_;v.sort(function(a,b){return a.offset-b.offset});var L=v.length,be=v[0].color,bf=v[L-1].color,bg=v[0].alpha*this.globalAlpha,bh=v[L-1].alpha*this.globalAlpha,U=[],p=0;for(;p<L;p++){var V=v[p];U.push(V.offset*y+r+" "+V.color)}d.push('<g_vml_:fill type="',l.type_,'"',' method="none" focus="100%"',' color="',be,'"',' color2="',bf,'"',' colors="',U.join(","),'"',' opacity="',bh,'"',' g_o_:opacity2="',bg,'"',' angle="',o,'"',' focusposition="',q.x,",",q.y,'" />')}else d.push('<g_vml_:fill color="',h,'" opacity="',g,'" />');else{var M=this.lineScale_*this.lineWidth;if(M<1)g*=M;d.push("<g_vml_:stroke",' opacity="',g,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',bd(this.lineCap),'"',' weight="',M,'px"',' color="',h,'" />')}d.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",d.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(a,b){var c=this.m_;return{x:m*(a*c[0][0]+b*c[1][0]+c[2][0])-w,y:m*(a*c[0][1]+b*c[1][1]+c[2][1])-w}};i.save=function(){var a={};Q(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=x(I(),this.m_)};i.restore=function(){Q(this.aStack_.pop(),this);this.m_=this.mStack_.pop()};function bi(a){var b=0;for(;b<3;b++){var c=0;for(;c<2;c++)if(!isFinite(a[b][c])||isNaN(a[b][c]))return false}return true}function A(a,b,c){if(!!bi(b)){a.m_=b;if(c)a.lineScale_=Y(X(b[0][0]*b[1][1]-b[0][1]*b[1][0]))}}i.translate=function(a,b){A(this,x([[1,0,0],[0,1,0],[a,b,1]],this.m_),false)};i.rotate=function(a){var b=G(a),c=F(a);A(this,x([[b,c,0],[-c,b,0],[0,0,1]],this.m_),false)};i.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;A(this,x([[a,0,0],[0,b,0],[0,0,1]],this.m_),true)};i.transform=function(a,b,c,d,e,h){A(this,x([[a,b,0],[c,d,0],[e,h,1]],this.m_),true)};i.setTransform=function(a,b,c,d,e,h){A(this,[[a,b,0],[c,d,0],[e,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new W};function D(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(a,b){b=R(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};function W(){}G_vmlCanvasManager=O;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=W})();html5.canvas=jsb.behavior.extend({onattach:function(a){G_vmlCanvasManager.initElement(a)},getContext:function(a){return a.getContext()}});
|
Binary file
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/*
|
2
|
+
base2 - copyright 2007-2009, Dean Edwards
|
3
|
+
http://code.google.com/p/base2/
|
4
|
+
http://www.opensource.org/licenses/mit-license.php
|
5
|
+
|
6
|
+
Contributors:
|
7
|
+
Doeke Zanstra
|
8
|
+
*/
|
9
|
+
new function(_Z){base2.global.chrome=new base2.Package(this,{name:"chrome",version:"0.9.1",imports:"Enumerable,Function2,dom,jsb",exports:"combobox,progressbar,slider,spinner,colorpicker,datepicker,weekpicker,monthpicker,timepicker,Popup,PopupWindow,MenuList,ToolTip,dropdown",parent:base2.jsb,getBehavior:function(a){return _m[a.uniqueID]||null}});eval(this.imports);var PX="px";var _N="\x5factive",_O="\x5fhover",_h="\x5ffocus",_c="\x5ftimer";var _P=/^on(DOM\w+|[a-z]+)$/,_n=Traversal.TEXT_CONTENT;var _o=86400000;var _p=detect("(element.parentElement)")?"parentElement":"parentNode";var _m={},_7={};var _u={onfocus:function(a,b){if(!a.onscroll){a.scrollTop=0;a.onscroll=_v}this.base(a,b)}};var _v=function(){this.scrollTop=0};function pad(a,b){return"0000".slice(0,(b||2)-String(a).length)+a};function wrap(c,d,e){return reduce(c,function(a,b){return a+="<"+d+" "+e+">"+b+"</"+d+">"},"")};var _3="clientWidth",_5="clientHeight";if(jsb.clientWidth2){_3="clientWidth2";_5="clientHeight2"}var locales={en:{days:"S,M,T,W,T,F,S",months:"January,February,March,April,May,June,July,August,September,October,November,December",firstDay:1},de:{days:"S,M,D,M,D,F,S",months:"Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember"},es:{days:"D,L,M,M,J,V,S",months:"Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre",firstDay:0},fr:{days:"D,L,M,M,J,V,S",months:"Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre"},it:{days:"D,L,M,M,G,V,S",months:"Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre"},nl:{days:"zo,ma,di,wo,do,vr,za",months:"januari,februari,maart,april,mei,juni,juli,augustus,september,oktober,november,december"},ru:{days:"Вс,Пн,Вт,Ср,Чт,Пт,Сб",months:"Январь,Февраль,Март,Апрель,Май,Июнь,Июль,Август,Сентябрь,Октябрь,Ноябрь,Декабрь"}};var Locale=Base.extend({constructor:function(a){this.lang=a.slice(0,2);extend(this,locales[this.lang]);this.days=String2.csv(this.days);for(var b=0;b<this.firstDay;b++){this.days.push(this.days.shift())}this.months=String2.csv(this.months)}});extend(Locale.prototype,locales.en);chrome.locale=new Locale(navigator.language||navigator.systemLanguage);var _Q="window",_w="highlight",_x="highlighttext";if(detect("(Webkit([1-4]|5[01]|52[^89])|theme=aqua).+win")){_Q="#ffffff";_w="#427cd9";_x="#ffffff"}var _y={onfocus:function(d){this.base.apply(this,arguments);var e=this,g;if(!shim.control){shim.control=document.createElement(detect.MSIE5?"span":"x");document.body.insertBefore(shim.control,document.body.firstChild);shim.attach(shim.control)}shim.element=d;shim.behavior=e;var f=shim.control.style;f.display="none";f.position="absolute";f.fontSize="0";f.border="0";f.height=d.clientHeight+PX;f.width=e._i+PX;f.backgroundImage=this.getComputedStyle(d,"backgroundImage");shim.layout();var h=detect.MSIE&&!detect.MSIE5?"onfocusout":"onblur",i=detect.MSIE?"onpropertychange":"onkeydown",j=detect.MSIE?k:n;_0.attachEvent(d,i,j);_0.attachEvent(d,h,p);function k(a){if(a.propertyName=="value")n()};function n(){d.scrollLeft=9999};function o(){var a=ElementView.getOffsetFromBody(d),b=ElementView.getBoundingClientRect(d),c=detect.MSIE?b.right-b.left-d.offsetWidth:0;f.left=(a.left+c+d[_3]-e._i+d.clientLeft)+PX;f.top=(a.top+d.clientTop)+PX;g=null};function p(){if(document.activeElement==null){if(event.preventDefault)event.preventDefault()}else{_0.detachEvent(d,i,j,true);_0.detachEvent(d,h,p,true);_0.detachEvent(window,"onresize",q,true);f.display="none";n();delete shim.element}};function q(){if(!g)g=setTimeout(o,50)};_0.attachEvent(window,"onresize",q);o();setTimeout(function(){f.display="block"},1)},onmouseover:_z,onmouseout:_z,onmousedown:_q,onmouseup:_q,onkeydown:_q,onkeyup:function(a,b,c){if(!PopupWindow.current&&c==35){a.scrollLeft=9999}else{this.base(a,b,c)}if(shim.element==a)shim.layout()},layout:function(a,b){this.base(a,b);if(a==shim.element){shim.layout()}},matchesSelector:function(a,b){return this.base(a,b)||(/^:(hover|active)$/.test(b)&&a==shim.element&&this.base(shim.control,b))}};var shim=behavior.extend({jsbExtendedMouse:true,onclick:_d,ondblclick:_d,onmousedown:_d,onmouseup:_d,onmousemove:_d,onmouseover:_A,onmouseout:_A,layout:function(){if(this.element){this.control.style.backgroundPosition=this.element.style.backgroundPosition}}});function _q(a,b){this.base.apply(this,arguments);if(a==shim.element)shim.layout()};function _d(a,b){b.stopPropagation();if(b.type=="mousedown")b.preventDefault();this.dispatchEvent(this.element,b.type,b);this.layout()};function _z(a,b,c,d){if(a!=shim.element||!b.relatedTarget||b.relatedTarget!=shim.control){this.base(a,b,c,d)}if(shim.element==a)shim.layout()};function _A(a,b,c,d){b.stopPropagation();if(this.element&&b.relatedTarget!=this.element){b.target=this.element;this.behavior["on"+b.type](this.element,b,c,d)}this.layout()};var Popup=Base.extend({constructor:function(){var a=this.body=this.createBody();a.className="jsb-popup";var b=this.appearance;if(b&&b!="popup"){a.className+=" jsb-"+b}var c=this;for(var d in c){if(_P.test(d)){EventTarget.addEventListener(a,d.slice(2),this,true)}}},appearance:"popup",element:null,body:null,width:"auto",height:"auto",position:"below",scrollX:false,scrollY:false,offsetX:0,offsetY:0,"@Gecko1\\.[^9]":{onmousedown:function(a){a.preventDefault()}},handleEvent:function(a){switch(a.type){case"mouseover":case"mouseout":if(a.target==this.body)return}this["on"+a.type](a)},createBody:function(){return document.createElement("div")},removeBody:function(){var a=this.body[_p];if(a)a.removeChild(this.body)},getRect:function(){var a=detect("QuirksMode|Gecko1\\.[0-3]")?document.body:document.documentElement,b=this.body,c=this.element,d=ElementView.getBoundingClientRect(c),e=0,g=this.position=="below"?c.offsetHeight-1:-1-c.offsetHeight,f=this.width,h=this.height,i=this.offsetX,j=this.offsetY;if(f=="base"){f=c.offsetWidth}if(f=="auto"||h=="auto"){if(h=="auto"){h=b.scrollHeight+2;var k=this.getUnitHeight();if(this.scrollY){h=Math.min(h,Math.max(a[_5]-d.bottom-2,d.top-2))}if(k>1)h=2+~~(h/k)*k}if(f=="auto"){f=b.scrollWidth+2;if(h<b.scrollHeight+2)f+=22;if(this.scrollX){f=Math.min(f,Math.max(a[_3]-d.left-2,d.right-2))}f=Math.max(f,c.offsetWidth)}}if(h>a[_5]-d.bottom&&h<d.bottom){g=-h;j*=-1}if(f>a[_3]-d.right&&f<d.right){e=c.offsetWidth-f;i*=-1}return new Rect(e+i,g+j,f,h)},getUnitHeight:K(1),hide:function(){this.removeBody()},isOpen:function(){return!!this.body[_p]},layout:Undefined,movesize:function(){document.body.appendChild(this.body);var a=this.getRect(),b=ElementView.getOffsetFromBody(this.element);behavior.setStyle(this.body,{left:b.left,top:b.top+a.top,width:Math.max(a.width-2,100),height:Math.max(a.height-2,22)})},querySelector:function(a){return NodeSelector.querySelector(this.body,a)},querySelectorAll:function(a){return NodeSelector.querySelectorAll(this.body,a)},render:function(a){this.body.innerHTML=trim(a)||""},setUnselectable:function(a){a.unselectable="on";behavior.setStyle(a,"userSelect","none")},show:function(a){this.element=a;this.render();this.style();this.movesize();this.layout();this.body.style.visibility="visible"},style:function(){var b=this.body.style;b.left="-999px";b.top="-999px";b.width="";b.height="";var c=behavior.getComputedStyle(this.element);forEach.csv("backgroundColor,color,fontFamily,fontWeight,fontStyle",function(a){b[a]=c[a]});if(b.fontFamily=="MS She"){b.fontFamily="MS Shell Dlg"}b.fontSize=parseInt(c.fontSize)+PX;if(b.backgroundColor=="transparent"){b.backgroundColor="white"}},"@MSIE(5.5|6)":{removeBody:function(){var a=Popup._r;if(a[_p]){document.body.removeChild(a)}this.base()},createBody:function(){var a=Popup._r;if(!a){a=Popup._r=document.createElement("iframe"),a.style.cssText="position:absolute;z-index:999998!important";a.frameBorder="0";a.scrolling="no"}return this.base()},show:function(a){this.base(a);var b=Popup._r,c=this.body,d=c.currentStyle;behavior.setStyle(b,{left:d.left,top:d.top,width:c.offsetWidth,height:c.offsetHeight,backgroundColor:d.backgroundColor});document.body.appendChild(b)}}});var PopupWindow=Popup.extend({constructor:function(a){this.base();this.owner=a},controls:null,owner:null,scrollX:true,scrollY:true,onkeydown:function(a){switch(a.keyCode){case 27:this.hide();this.element.focus();break;case 9:if(this.tab(a.shiftKey?-1:1))a.preventDefault();break}},isActive:function(){return this._6||Element.matchesSelector(this.body,":hover")},hide:function(){PopupWindow.current=null;forEach(this.controls,function(a){if(a.blur)a.blur()});this.base();ClassList.remove(document.body,"jsb-popupshowing")},render:function(a){this.base(a);this.controls=this.querySelectorAll("button,input,select,textarea")},show:function(a){ClassList.add(document.body,"jsb-popupshowing");this.base(a);PopupWindow.current=this},tab:function(d){if(!this.controls.length)return false;var e=this,g=e.element,f=this.controls.map(I),h=e.querySelector(":focus")||g;e._6=false;f.unshift(g);f.push(g);try{forEach(f,function(a,b){if(a==h){var c=f[b+d];e._6=c!=g;c.focus();if(c.select)c.select();throw StopIteration;}})}catch(error){}return true}},{current:null,init:function(){var d=true;EventTarget.addEventListener(window,"blur",e,true);EventTarget.addEventListener(document,"mousedown",e,true);EventTarget.addEventListener(document,"mouseup",function(){d=false},true);function e(a){var b=PopupWindow.current,c=a.target;if(a.type=="blur"&&d)return;d=a.type=="mousedown";if(b&&c!=document&&c!=b.element&&c!=shim.control&&!Traversal.includes(b.body,c)){b.hide()}}}});var MenuList=PopupWindow.extend({constructor:function(a){this.base(a);this.data={}},appearance:"menulist",onmouseup:function(a){this.select(this.currentItem)},onkeydown:function(a){switch(a.keyCode){case 13:this.select(this.currentItem);a.preventDefault();break;case 38:if(this.currentItem){this.highlight(Traversal.getPreviousElementSibling(this.currentItem))}else{this.highlight(Traversal.getFirstElementChild(this.body))}break;case 40:if(this.currentItem){this.highlight(Traversal.getNextElementSibling(this.currentItem))}else{this.highlight(Traversal.getFirstElementChild(this.body))}break;case 36:this.highlight(Traversal.getFirstElementChild(this.body));break;case 35:this.highlight(Traversal.getLastElementChild(this.body));break;default:this.base(a)}},onmouseover:function(a){this.highlight(a.target)},getUnitHeight:function(){var a=Traversal.getFirstElementChild(this.body);return a?a.offsetHeight:1},highlight:function(a){if(a){this.reset(this.currentItem);this.currentItem=a;with(a.style){backgroundColor=_w;color=_x}}},layout:function(){this.currentItem=null;var a=this.data[this.element.uniqueID];if(a)this.highlight(this.body.childNodes[a.index]);else this.highlight(Traversal.getFirstElementChild(this.body))},render:function(){var d=this.owner.get(this.element,"list"),e="";if(d){var g='role="listitem" unselectable="on"';if(d.nodeType==1){if(d.nodeName!="SELECT"){d=NodeSelector.querySelector(d,"select")}if(d){var f=d.innerHTML.split(/<\/option>/i).join("");e=trim(f).replace(/<option/gi,'</div><div '+g).slice(6)+'</div>'}}else{if(Array2.like(d)){e=wrap(d,"div",g)}else{e=reduce(d,function(a,b,c){return a+='<div '+g+' value="'+c+'">'+b+'</div>'})}}}this.base(e);this.body.setAttribute("role","list")},reset:function(a){if(a)with(a.style){backgroundColor="";color=""}},select:function(a){var b=Element.getAttribute(a,"value")||trim(a[_n]),c=this.element;this.data[c.uniqueID]={index:Traversal.getNodeIndex(a),value:b};this.owner.setValue(c,b);c.focus();this.hide()}});var ToolTip=Popup.extend({appearance:"tooltip",text:"",offsetX:2,offsetY:4,"@Safari":{offsetY:6},ontransitionend:function(a){if(a.propertyName=="opacity"&&a.target.style.opacity=="0"){this.removeBody()}},createBody:function(){var a=document.createElement("div");if(this.fadeIn!=Undefined){behavior.setStyle(a,"opacity",0)}return a},fadeIn:function(){behavior.animate(this.body,{opacity:1})},fadeOut:function(){behavior.animate(this.body,{opacity:0})},"@MSIE":{fadeIn:Undefined,fadeOut:function(){this.removeBody()}},hide:function(){if(this.isOpen())this.fadeOut();delete this.element;ToolTip.current=null;clearTimeout(this._e)},render:function(){this.base('<div role="tooltip">'+this.text+'</div>')},show:function(a,b,c){c=c?c*1000:ToolTip.TIMEOUT;var d=ToolTip.current=this;d.text=b;if(d._e)clearTimeout(d._e);d._e=setTimeout(function e(){if(Element.matchesSelector(a,":hover")||Element.matchesSelector(d.body,":hover")){d._e=setTimeout(e,ToolTip.TIMEOUT/3)}else{delete d._e;d.hide()}c=ToolTip.TIMEOUT},c);this.base(a);this.fadeIn()}},{TIMEOUT:5000,current:null});var control=behavior.extend({_B:"",_10:0,_C:1,_i:17,"@Gecko1\\.[0-3]":{_B:"text"},states:{normal:0,hover:1,active:2,disabled:3,length:4},type:"text",appearance:"none",allowVertical:false,onattach:function(a){if(this.isNativeControl!=False&&this.isNativeControl(a)){this.detach(a,true)}else{_m[a.uniqueID]=this;if(this.allowVertical&&a[_5]>a[_3]){this.setOrientation(a,this._C)}if(a.name&&a.form){a.setAttribute("autocomplete","off")}this.layout(a,this.states[a.disabled?"disabled":"normal"])}},"@MSIE[567]":{onattach:function(a){if(this.appearance!="none"){ClassList.add(a,"jsb-"+this.appearance)}this.base(a)}},onlosecapture:function(a){delete control._6;delete control._s;delete control._1;this.setUnselectable(a,false);this.layout(a)},onmousedown:function(a,b,c,d){control._6=a;if(!this.isEditable(a))return;control._1=this.hitTest(a,c,d);if(control._1){this.setCapture(a);control._s=true;this.setTimeout("setUnselectable",1,a,true)}this.layout(a)},onmouseup:function(a,b){this.releaseCapture()},onmousemove:function(a,b,c,d){var e=this.hitTest(a,c,d);if(e!=control._4){control._4=e;this.layout(a)}if(control._s){b.preventDefault()}},onmouseover:function(a,b,c,d){control._a=a;control._4=this.hitTest(a,c,d);this.layout(a)},onmouseout:function(a){delete control._1;delete control._4;delete control._a;this.layout(a)},onfocus:function(a){control._f=a;this.layout(a)},onblur:function(a){delete control._f;this.removeClass(a,this.appearance+_h);this.layout(a);if(control.tooltip&&control.tooltip.isOpen()){control.tooltip.hide()}},onpropertyset:function(a,b,c){if(/^(disabled|readOnly)$/.test(c)){this.layout(a)}},getCursor:function(a){return(control._1||control._4||a!=control._a||control._s)?"default":this._B},getState:K(0),getValue:function(a){return a.value},setValue:function(a,b){if(b!=a.value){a.value=b;this.dispatchEvent(a,"change");this.layout(a)}},hitTest:function(a,b){var c=false;return c?b<=this._i:b>=a[_3]-this._i},isActive:function(a){return control._1&&(control._1==control._4)},isEditable:function(a){return(!a.disabled&&!a.readOnly)||a==control._D},isNativeControl:False,"@(hasFeature('WebForms','2.0'))":{isNativeControl:function(a){return a.nodeName=="INPUT"&&a.type==this.type}},layout:function(a,b){if(b==null){b=this.getState(a);this.syncCursor(a)}var c=a[_5],d=-this.states.length*(c/2*(c-1)),e=a.style;d-=c*b;var g="100% "+d+PX;if(e.backgroundPosition!=g){e.backgroundPosition=g}},setOrientation:function(a,b){if(b==this._C){var c=this.getComputedStyle(a,"backgroundImage");this.setStyle(a,"backgroundImage",c.replace(/\.png/i,"-vertical.png"),true)}else if(a.style.backgroundImage){a.style.backgroundImage=""}},setUnselectable:Undefined,"@!Webkit":{setUnselectable:function(a,b){this.setStyle(a,"userSelect",b?"none":"")}},"@MSIE":{setUnselectable:function(a,b){if(b){a.unselectable="on"}else{a.removeAttribute("unselectable")}}},showToolTip:function(a,b,c){var d=control.tooltip;if(!d){d=control.tooltip=new ToolTip}setTimeout(function(){d.show(a,b,c)},1)},syncCursor:function(a){var b=this.getCursor(a),c=a.style;if(c.cursor!=b){c.cursor=b}},hasTimer:function(a,b){b=a.uniqueID+(b||_c);return!!_7[b]},startTimer:function(a,b,c){b=a.uniqueID+(b||_c);if(!_7[b]){_7[b]=this.setInterval(this.tick,100,a)}},stopTimer:function(a,b){b=a.uniqueID+(b||_c);if(_7[b]){clearInterval(_7[b]);delete _7[b]}},tick:Undefined,"@Opera":{syncCursor:Undefined}});var dropdown=control.extend({extend:function(a){var b=this.base(a);if(!PopupWindow.ancestorOf(b.Popup)){b.Popup=this.Popup.extend(b.Popup)}return b},"@MSIE.+win":_y,_R:/^(38|40)$/,appearance:"dropdown",Popup:PopupWindow,onblur:function(a,b){if(this.isOpen(a)&&!this.popup.isActive()){this.hidePopup()}this.base(a,b)},"@Opera(8|9.[0-4])":{onblur:function(a,b){if(this.isOpen(a)&&this.popup.isActive()){b.preventDefault()}else{this.base(a,b)}}},onkeydown:function(a,b,c){if(this.isEditable(a)){if(this._R.test(c)&&!this.isOpen(a)){this.showPopup(a);b.preventDefault()}else if(this.isOpen(a)){this.popup.onkeydown(b)}}},onmousedown:function(a,b,c){this.base.apply(this,arguments);if(this.isEditable(a)){if(this.hitTest(a,c)){if(this.isOpen(a)){this.hidePopup()}else{this.showPopup(a)}}else{this.hidePopup()}}},getState:function(a){if(a.disabled){var b="disabled"}else if(a.readOnly&&a!=control._D){b="normal"}else if(a==control._6&&control._1){b="active"}else if(a==control._a&&control._4){b="hover"}else{b="normal"}return this.states[b]},hidePopup:function(a){if(this.popup)this.popup.hide()},isOpen:function(a){var b=this.popup;return b&&b==PopupWindow.current&&b.element==a&&b.isOpen()},showPopup:function(a){if(!this.popup)this.popup=new this.Popup(this);this.popup.show(a)},"@theme=aqua":{"@!(style.borderImage)":{hitTest:function(a,b){return b>=a[_3]}},layout:function(a,b){if(b!=null)this.syncCursor(a)}}});var combobox=dropdown.extend({appearance:"combobox",list:"",get:function(a,b){var c=this.base(a,b);if(b=="list"&&c&&typeof c=="string"){return this.querySelector("#"+c)}return c},"@(hasFeature('WebForms','2.0'))":{isNativeControl:function(a){return a.nodeName=="INPUT"&&a.list}},Popup:MenuList});var number={baseValue:0,block:10,max:"",min:"",step:"1",stepScale:1,"@(hasFeature('WebForms','2.0'))":{get:function(a,b){var c=this.base(a,b);if(a.type=="text"&&/^(max|min|step)$/.test(b)){if(c==="")return this[b]}return c}},onchange:function(a){this.setAttribute(a,"aria-valuenow",a.value);if(a.value==""||this.isValid(a)){this.removeClass(a,"jsb-error");this.removeAttribute(a,"aria-invalid")}else{this.addClass(a,"jsb-error");this.setAttribute(a,"aria-invalid",true)}},onmousewheel:function(a,b,c){if(this.isEditable(a)&&control._f==a){this.increment(a,~~(c/120));b.preventDefault()}},convertValueToNumber:parseFloat,convertNumberToValue:String,getDefaultValue:K(0),getValueAsNumber:function(a){return this.convertValueToNumber(a.value)},setValueAsNumber:function(a,b){this.setValue(a,this.convertNumberToValue(this.getValidValue(a,b)))},getValidValue:function(a,b,c){if(isNaN(b))b=this.getDefaultValue();var d=this.getProperties(a),e=d.min,g=d.max,f=d.scale,h=e||this.baseValue;b=b>g?g:b<e?e:b;b=h+Math[c||"floor"]((b-h)/f)*f;if(f<1)b=b.toFixed(String(d.step).replace(/^.*\.|^\d+$/,"").length);return b},getValueAsDate:function(a){var b=this.getValueAsNumber(a,true);return isNaN(b)?null:new Date(b)},setValueAsDate:function(a,b){this.setValueAsNumber(a,b.valueOf(),true)},isValid:function(a){var b=this.convertValueToNumber(a.value);return!isNaN(b)&&b==this.getValidValue(a,b)},getProperties:function(a){if(a==number._S){var b=number._T}else{number._S=a;b=number._T={};b.min=this.convertValueToNumber(this.get(a,"min")),b.max=this.convertValueToNumber(this.get(a,"max")),b.step=parseFloat(this.get(a,"step"))||1,b.scale=b.step*this.stepScale}return b},increment:function(a,b,c){var d=c?"Block":"Unit";b*=this["get"+d+"Increment"](a);this.setValueAsNumber(a,this.getValueAsNumber(a)+b)},getBlockIncrement:function(a){return this.getUnitIncrement(a)*this.block},getUnitIncrement:function(a){return(this.get(a,"step")||1)*this.stepScale}};var range=control.extend({"implements":[number],_g:3000,"@Opera8":{_g:2000},min:"0",max:"100",allowVertical:true,type:"range","@MSIE(5.5|[^5])":_u,onpropertyset:function(a,b,c){if(/^(max|min|step|value)$/.test(c)){this.layout(a)}else{this.base(a,b,c)}},"@!theme=aqua":{onfocus:function(a,b){if(a!=control._6){this.addClass(a,this.appearance+_h)}this.base(a,b)}},onkeydown:function(a,b,c,d,e,g,f){if(!this.isEditable(a)||c<33||d||e||g||f)return;b.preventDefault();if(c>40)return;var h=1;switch(c){case 35:var i=1;case 36:this.setRelativeValue(a,i||0);return;case 33:var j=true;break;case 34:j=true;case 37:case 40:h=-1}this.increment(a,h,j)},getProperties:function(a){var b=this.base(a);b.relativeValue=((b.value=parseFloat(a.value)||0)-b.min)/(b.max-b.min);return b},getRelativeValue:function(a){return this.getProperties(a).relativeValue},setRelativeValue:function(a,b){var c=this.getProperties(a);this.setValueAsNumber(a,(c.max-c.min)*b)},getValidValue:function(a,b,c){return this.base(a,b,c||"round")},increment:function(a,b,c){var d=c?"Block":"Unit";b*=this["get"+d+"Increment"](a);this.setRelativeValue(a,this.getRelativeValue(a)+b)},getBlockIncrement:function(a){var b=this.getUnitIncrement(a);return Math.max(2*b,Math.round(0.1/b)*b)},getUnitIncrement:function(a){var b=this.getProperties(a);return b.step/(b.max-b.min)||this.base(a)},getCursor:K("")});var progressbar=null;var slider=range.extend({_E:21,_F:22,_2:11,_g:3000,"@Opera8":{_g:500},appearance:"slider",onmousedown:function(a,b,c,d,e,g){this.base.apply(this,arguments);if(a.disabled)return;if(a.type==this.type){b.preventDefault();if(a.readOnly)a.focus()}if(a.readOnly)return;if(control._1){var f=this.getThumbRect(a);slider._j={dx:e-f.left,dy:g-f.top};slider._8=true;b.preventDefault()}else{this.startTimer(a);slider._k=this.getValueByPosition(a,c-this._2/2,d-this._2/2);slider._l=slider._k<parseFloat(a.value)?-1:1;if(a.type==this.type){a.focus()}slider._8=false}},onlosecapture:function(a){delete slider._j;this.base(a)},onmouseup:function(a){this.base.apply(this,arguments);if(!this.isEditable(a))return;if(!slider._8)this.tick(a);this.stopTimer(a);delete slider._k;delete slider._l;delete slider._8},onmousemove:function(a,b,c,d,e,g){if(slider._j){this.setValueByPosition(a,e-slider._j.dx,g-slider._j.dy)}else{this.base.apply(this,arguments)}},getState:function(a){if(a.disabled){var b="disabled"}else if(a==control._6&&control._1){b="active"}else if(a==control._f||(!a.readOnly&&a==control._a&&control._4)){b="hover"}else{b="normal"}return this.states[b]},getThumbRect:function(a){var b=a[_3],c=a[_5],d=this.getProperties(a).relativeValue;if(c>b){return new Rect((b-this._F)/2,(c-=this._2)-~~(c*d),this._F,this._2)}else{return new Rect(~~((b-this._2)*d),~~((c-this._E)/2),this._2,this._E)}},getValueByPosition:function(a,b,c){var d=a[_3],e=a[_5],g=this.getProperties(a);if(d>=e){var f=d-this._2;var h=b}else{f=e-this._2;h=f-c}return(g.max-g.min)*(h/f)},hitTest:function(a,b,c){if(a.disabled||this.isNativeControl(a))return null;return this.getThumbRect(a).contains(b,c)},layout:function(a,b){if(b==null)b=this.getState(a);var c=this.getThumbRect(a),d=a.style,e=Math.ceil((this._g-this._2)/2)+b*this._g;if(a[_5]>a[_3]){var g=c.left,f=c.top-e}else{g=c.left-e;f=c.top}var h=g+PX+" "+f+PX;if(d.backgroundPosition!=h){d.backgroundPosition=h}},setValueByPosition:function(a,b,c){this.setValueAsNumber(a,this.getValueByPosition(a,b,c))},tick:function(a){var b=this.getProperties(a),c=this.getBlockIncrement(a)*(b.max-b.min);if(Math.abs(slider._k-a.value)<c){this.setValueAsNumber(a,slider._k);this.stopTimer(a)}else{this.increment(a,slider._l,true)}slider._8=true},"@theme=aqua":{onblur:function(a,b){if(a==slider._t){delete slider._t}this.base(a,b)},onmousedown:function(a,b,c,d){slider._t=a;this.base.apply(this,arguments);if(!this.isEditable(a))return;if(!control._1){this.setValueByPosition(a,c-this._2/2,d-this._2/2)}this.base.apply(this,arguments)},getState:function(a){if(a.disabled){var b="disabled"}else if(a==control._6&&control._1){b="active"}else if(a==control._f&&a!=slider._t){b="hover"}else{b="normal"}return this.states[b]},startTimer:Undefined}});var spinner=control.extend({"implements":[number],"@MSIE.+win":_y,states:{normal:0,up_hover:1,up_active:2,down_hover:3,down_active:4,disabled:5,length:6},type:"number",appearance:"spinner",onkeydown:function(a,b,c){if(!this.isEditable(a))return;if(!/^(3[348]|40)$/.test(c))return;b.preventDefault();switch(c){case 34:var d=true;break;case 33:d=true;case 38:var e="up"}this.activate(a,e||"down",d)},onkeyup:function(a,b,c){if(!this.isEditable(a))return;if(!/^(3[348]|40)$/.test(c))return;this.deactivate(a)},onmousedown:function(a){this.base.apply(this,arguments);if(control._1){this.startTimer(a)}},onlosecapture:function(a,b){this.base(a,b);this.deactivate(a)},activate:function(a,b,c){control._1=control._4=b;this.layout(a);spinner._G=c;this.startTimer(a)},deactivate:function(a){this.stopTimer(a);delete control._1;delete spinner._G;this.layout(a)},getState:function(a){if(a.disabled){var b="disabled"}else if(a.readOnly&&a!=control._D){b="normal"}else if((a==control._a||a==control._f)&&control._1){b=control._1+_N}else if(a==control._a&&control._4){b=control._4+_O}else{b="normal"}return this.states[b]},hitTest:function(a,b,c){if(!this.base(a,b))return null;return c<=(a[_5]/2)?"up":"down"},startTimer:function(a){if(!_7[a.uniqueID+_c]){spinner._l=(control._1=="up")?1:-1;spinner._H=1;this.base(a)}},stopTimer:function(a){if(_7[a.uniqueID+_c]){this.base(a);if(!spinner._8)this.tick(a);delete spinner._8;if(a.select)a.select();this.syncCursor(a)}},tick:function(a){this.increment(a,~~(spinner._H*spinner._l),!!spinner._G);spinner._H*=1.05;spinner._8=true}});var timepicker=spinner.extend({FORMAT:"hh:mm:ss",appearance:"timepicker",block:60,step:"60",stepScale:1000,type:"time",getDefaultValue:function(){var a=new Date;return Date.UTC(1970,0,1,a.getHours(),a.getMinutes(),0,0)},convertValueToNumber:function(a){return a==""?NaN:Date2.parse("1970-01-01T"+a+"Z")},convertNumberToValue:function(a){return isNaN(a)?"":Date2.toISOString(new Date(a)).slice(11,16)}});var datepicker=dropdown.extend({"implements":[number],FORMAT:"yyyy-mm-dd",type:"date",appearance:"datepicker",stepScale:_o,showLocaleString:Undefined,"@(Date.prototype.toLocaleDateString)":{onchange:function(a){this.base(a);if(!this.hasClass(a,"jsb-error")&&a.value){this.showLocaleString(a)}},"@!Opera|Linux":{showLocaleString:function(a){this.showToolTip(a,new Date(Date2.parse(a.value+"T")).toLocaleDateString())}}},getDefaultValue:Date2.now,convertValueToNumber:function(a){return a==""?NaN:Date2.parse(a+"T00:00Z")},convertNumberToValue:function(a){return isNaN(a)?"":Date2.toISOString(new Date(a)).slice(0,10)},normalise:I,Popup:{appearance:"datepicker-popup",scrollX:false,scrollY:false,currentDate:0,state:{},render:function(){this.base(format('<div style="padding:4px!important"><table cellspacing="0"><tr><td><select>'+wrap(chrome.locale.months,"option")+'</select></td><td align="right"><input type="text" class="jsb-spinner" size="4"></td></tr><tr><td colspan="2"><table role="grid" class="jsb-datepicker-days" cellspacing="0"><tr>'+wrap(chrome.locale.days,"th",'%1')+'</tr>'+Array(7).join('<tr>'+Array(8).join('<td %1>0</td>')+'</tr>')+'</table></td></tr></table></div>','role="gridcell" unselectable="on"'));this.year=this.querySelector("input");this.month=this.querySelector("select");this.days=this.querySelector("table.jsb-datepicker-days");this.year.onscroll=_v;spinner.attach(this.year);this.month.selectedIndex=8;this.setUnselectable(this.days);this.render=Undefined},onblur:function(a){ClassList.add(this.days,"jsb-datepicker-days_focus")},onchange:function(a){if(this.currentMonth!=this.month.selectedIndex){this.increment("Month",this.month.selectedIndex-this.currentMonth)}else{this.increment("FullYear",this.year.value-this.currentYear)}a.stopPropagation()},onfocus:function(a){if(a.target!=this.days){ClassList.remove(this.days,"jsb-datepicker-days_focus")}},onkeydown:function(a){var b=a.keyCode,c=a.target,d=parseFloat(this.owner.get(this.element,"step"))||1;if(b==13){this.select(this.currentItem);a.preventDefault()}else if(/^(3[346789]|40)$/.test(b)){if(c==this.month){setTimeout(bind(function(){if(this.currentMonth!=this.month.selectedIndex){this.increment("Month",this.currentMonth-this.month.selectedIndex)}},this),1)}else if(c!=this.year){a.preventDefault();switch(b){case 36:this.highlighByDate(this.owner.getValueAsDate(this.element)||this.getDefaultDate());break;case 37:this.increment("Date",-d);break;case 39:this.increment("Date",d);break;case 38:this.increment("Date",-d*7);break;case 40:this.increment("Date",d*7);break;case 33:if(a.ctrlKey){this.increment("FullYear",-1)}else{this.increment("Month",-1)}break;case 34:if(a.ctrlKey){this.increment("FullYear",1)}else{this.increment("Month",1)}break}}}else{this.base(a)}},onmouseup:function(a){var b=a.target;if(b.className=="disabled"||!Traversal.contains(this.days,b))return;this.select(this.currentItem)},onmouseover:function(a){var b=a.target;if(b.currentItem!=b&&b.nodeName=="TD"&&b.className!="disabled"&&Traversal.contains(this.days,b)){this.highlight(b);this.currentDate=~~b[_n]}},onmousemove:function(a){this.onmouseover(a)},onmousewheel:function(a){a.preventDefault();this.increment("Month",~~(a.wheelDelta/120))},fill:function(){this.currentYear=this.year.value;this.currentMonth=this.month.selectedIndex;var a=this.currentMonth,b=new Date(Date.UTC(this.currentYear,a,1)),c=new Date(b),d=this.owner,e=d.getProperties(this.element),g=e.min||d.baseValue,f=e.step,h=e.scale,i=e.min,j=e.max,k=0,n=11,o;if(isNaN(i)){i=-Infinity}else{var p=new Date(i);if(this.currentYear==p.getUTCFullYear()){k=p.getUTCMonth()}}if(isNaN(j)){j=Infinity}else{var q=new Date(j);if(this.currentYear==q.getUTCFullYear()){n=q.getUTCMonth()}}for(var m=0;o=this.month.options[m];m++){var u=m<k||m>n;o.disabled=u;o.style.color=u?"graytext":""}b.setUTCDate(b.getUTCDate()-b.getUTCDay()+chrome.locale.firstDay);if(b>c){b.setUTCDate(b.getUTCDate()-7)}var A=this.days.rows,r,v,w;for(var m=1;r=A[m];m++){var B=r.cells,l,y=false;r.className="";if(d==weekpicker&&((f!=1&&(b-g)%h!=0)||b<i||b>j)){r.className="disabled"}for(var z=0;l=B[z];z++){var s=b.getUTCDate(),t=a==b.getUTCMonth();l.innerHTML=s;l.className="";l.style.fontStyle=t?"":"italic";if(t&&b>=i&&b<=j){w=l;if(this.currentDate==s)v=l;if(d==datepicker&&f!=1&&(b-g)%h!=0){l.className="disabled"}}else{l.className="disabled"}y|=t;b.setUTCDate(s+1)}r.style.visibility=y?"":"hidden"}this.highlight(v||w)},getDefaultDate:function(){var a=this.state[this.element.uniqueID];return new Date(this.owner.getValidValue(this.element,this.owner.getValueAsDate(this.element)||(a?new Date(a):new Date()),"round"))},getUTCDate:function(){return new Date(Date.UTC(this.year.value,this.month.selectedIndex,this.currentDate))},hide:function(){if(this.element){this.state[this.element.uniqueID]=this.getUTCDate()}this.base()},highlight:function(a){if(a){this.reset(this.currentItem);this.currentItem=a;ClassList.add(a,"selected");Element.setAttribute(a,"aria-selected",true)}},highlighByDate:function(a){a=this.owner.normalise(a);this.year.value=a.getUTCFullYear();this.month.selectedIndex=a.getUTCMonth();this.currentDate=a.getUTCDate();if(this.currentYear==this.year.value&&this.currentMonth==this.month.selectedIndex){var b=this.body.getElementsByTagName("td");this.highlight(b[14-b[14].innerHTML+this.currentDate])}else{this.fill()}},increment:function(a,b){var c=new Date(Date.UTC(this.currentYear,this.currentMonth,this.currentDate));c["setUTC"+a](c["getUTC"+a]()+b);c=new Date(this.owner.getValidValue(this.element,c,"round"));this.highlighByDate(c)},layout:function(){var a=this.owner.normalise(this.getDefaultDate());this.year.value=a.getUTCFullYear();this.month.selectedIndex=a.getUTCMonth();this.currentDate=a.getUTCDate();this.fill();spinner.layout(this.year)},movesize:function(){this.base();this.days.style.width=(parseInt(this.body.style.width)-10)+"px"},reset:function(a){if(a){Element.removeAttribute(a,"aria-selected");ClassList.remove(a,"selected")}},select:function(){var a=this.element;this.owner.setValueAsDate(a,this.getUTCDate());this.hide();a.focus()},show:function(a){this.base(a)},style:function(b){this.base(b);var c=this.body.style,d=this.month.style,e=this.year.style,g=this.days.style,f=this.body.getElementsByTagName("td");forEach.csv("fontFamily,fontSize,fontWeight,fontStyle,color",function(a){g[a]=d[a]=e[a]=c[a]});g.backgroundColor=e.backgroundColor=c.backgroundColor;this.highlight(f[14-f[14].innerHTML+this.currentDate]);ClassList.add(this.days,"jsb-datepicker-days_focus")}}});var weekpicker=datepicker.extend({FORMAT:"yyyy-Www",PATTERN:/^\d{4}-W([0-4]\d|5[0-3])$/,baseValue:Date.UTC(1969,11,29),type:"week",appearance:"weekpicker",stepScale:7*_o,onfocus:function(a,b){this.base(a,b);a.setAttribute("spellcheck","false")},showLocaleString:Undefined,convertValueToNumber:function(a){if(!this.PATTERN.test(a))return NaN;var b=String(a).split("-W"),c=b[0],d=this.getFirstWeek(c),e=b[1],g=new Date(d.valueOf()+(e-1)*this.stepScale);return(e==53&&new Date(Date.UTC(c,0,1)).getUTCDay()!=chrome.locale.firstDay+3)?NaN:g.valueOf()},convertNumberToValue:function(a){var b=this.normalise(a),c=b.getUTCFullYear(),d=this.getFirstWeek(c),e=~~((b-d)/this.stepScale)+1;return pad(c,4)+"-W"+pad(e)},getFirstWeek:function(a){var b=new Date(Date.UTC(a,0,1)),c=b.getUTCDay()-chrome.locale.firstDay;if(c>3)c-=7;b.setUTCDate(b.getUTCDate()-c);return b},normalise:function(a){return new Date(this.baseValue+~~((a-this.baseValue)/this.stepScale)*this.stepScale+3*_o)},Popup:{onkeydown:function(a){if(!/^(37|39)$/.test(a.keyCode)){this.base(a)}},onmouseover:function(a){var b=a.target;if(b.nodeName=="TD"){b=b.parentNode}if(b.nodeName=="TR"&&Traversal.contains(this.days,b)&&!ClassList.has(b,"disabled")){var c=NodeSelector.querySelector(b,"td:not(.disabled)");if(c){this.highlight(b);this.currentDate=~~c[_n]}}},onmouseup:function(a){var b=a.target;if(b.nodeName=="TD"){b=b.parentNode}if(b.nodeName=="TR"&&Traversal.contains(this.days,b)&&!ClassList.has(b,"disabled")){this.select()}},highlight:function(a){if(a&&a.nodeName=="TD"){a=a.parentNode}if(!ClassList.has(a,"disabled")){this.base(a)}}}});var monthpicker=spinner.extend({FORMAT:"yyyy-mm",type:"month",block:12,appearance:"monthpicker",convertValueToNumber:function(a){if(a==""||isNaN(Date2.parse(a+"-01T")))return NaN;a=a.split("-");return(a[0]*12)+parseInt(a[1],10)-1},convertNumberToValue:function(a){return isNaN(a)?"":Date2.toISOString(new Date(~~(a/12),a%12,12)).slice(0,7)},getDefaultValue:function(){var a=new Date;return a.getFullYear()*12+a.getMonth()},getValueAsNumber:function(a,b){return b?Date2.parse(a.value+"-01T00:00Z"):this.base(a)},setValueAsNumber:function(a,b,c){if(c){b=this.convertValueToNumber(Date2.toISOString(new Date(b)).slice(0,7))}this.base(a,b)}});var colorpicker=dropdown.extend({PATTERN:/^#[\da-f]{6}$/,type:"color",appearance:"colorpicker","@MSIE(5.5|[^5])":_u,"@Opera":{onattach:function(a){ClassList.add(a,"jsb-"+this.appearance);this.base(a)}},onkeydown:function(a,b,c,d,e,g,f){this.base(a,b,c);if(c<33||d||e||g||f)return;b.preventDefault()},"@!theme=aqua":{onfocus:function(a){if(a!=control._6){this.addClass(a,this.appearance+_h)}this.base(a)}},getState:function(a){if(this.hasClass(a,this.appearance+_h)){return this.states.hover}else{return this.base(a)}},layout:function(a){this.base(a);var b=a.value;if(!this.PATTERN.test(b))b="black";a.style.color=a.style.backgroundColor=b},hitTest:True,Popup:{appearance:"colorpicker-popup",onchange:function(c){var d=map(pluck(this.controls,"value"),Number);var e=reduce(d,function(a,b){return a+=pad(b.toString(16))},"#");this.owner.setValue(this.element,e);c.stopPropagation()},layout:function(){var c=map(this.element.value.slice(1).match(/(\w\w)/g),partial(parseInt,undefined,16));this.controls.forEach(function(a,b){a.value=c[b];slider.layout(a)})},render:function(){var a=': <input class="jsb-slider" min="0" max="255">';this.base(wrap(["R"+a,"G"+a,"B"+a],"div",'nowrap unselectable="on"'));this.controls.forEach(slider.attach);this.render=Undefined}}});var Rect=Base.extend({constructor:function(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d;this.right=a+c;this.bottom=b+d},contains:function(a,b){with(this)return a>=left&&a<=right&&b>=top&&b<=bottom}});new Rule("html",{ondocumentready:function(){var d=document.createElement("span"),e;d.style.cssText="position:absolute;left:0;top:-9999px;";d.innerHTML=" ";document.body.appendChild(d);setTimeout(function g(){var c=e!=null&&e!=d.clientHeight;e=d.clientHeight;if(c){Array2.batch(document.getElementsByTagName("input"),function(a){var b=_m[a.uniqueID];if(b)b.layout(a)},100,g)}else{setTimeout(g,200)}},200)}});if(detect("MSIE6")){document.execCommand("BackgroundImageCache",false,true)}eval(this.exports);var noValidation={formNoValidate:false,get:function(a,b){if(b=="willValidate")return false;return this.base(a,b)},checkValidity:True,setCustomValidity:html5.NOT_SUPPORTED};var _I=/^(date|month|time|week)$/,_J=/^(number|range|date|month|time|week)$/;var _9=detect("(hasFeature('WebForms','2.0'))")?Undefined:function(a,b,c){html5[a]=(c||behavior).extend(b)};function _K(a,b,c){var d=Element.get(a,"type");if(b.test(d)){var e=chrome.getBehavior(a);if(e){if(b==_I){return e.getValueAsDate(a,true)}else{return e.getValueAsNumber(a,true)}}}return c};var _L={};var validation={formNoValidate:false,get:function(a,b){if(b=="willValidate"){return!!(a.name&&a.form&&!a.disabled)}return this.base(a,b)},checkValidity:function(a){var b=_M(this,a,false);if(!b)this.dispatchEvent(a,"invalid");return b},setCustomValidity:function(a,b){_L[a.uniqueID]=String(b)}};function _M(a,b,c){if(!a.get(b,"formNoValidate")){if(a.required!==undefined&&a.get(b,"required")){if(!_U(b,c))return false}if(b.value){var d=Element.getAttribute(b,"type");if(d=="email"){if(!_V(b,c))return false}else if(d=="url"){if(!_W(b,c))return false}else if(d=="color"){if(!/^#[\da-f]{6}$/.test(b.value)){if(c){_b(b,"Please select a valid color.")}return false}}else if(_J.test(d)){if(!_X(b,c))return false}if(a.pattern!==undefined){var e=a.get(b,"pattern");if(e){e=new RegExp("^("+e+")$");if(!e.test(b.value)){if(c){_b(b,"The value entered does not match the specified pattern.")}return false}}}if(b.value.length>b.maxLength){if(c){_b(b,"The value entered is too long.")}return false}}if(a.setCustomValidity!=html5.NOT_SUPPORTED){var g=_L[b.uniqueID];if(g){if(c){_b(b,g)}return false}}}return true};function _U(a,b){switch(Element.getAttribute(a,"type")){case"checkbox":if(a.checked)return true;break;case"radio":if(a.checked)return true;if(a.name&&a.form){var c=a.form.elements[a.name],d;for(var e=0;d=c[e];e++){if(d.checked&&d.type=="radio")return true}}break;default:if(a.value)return true}if(b){_b(a,"This value is required.")}return false};function _X(a,b){var c=chrome.getBehavior(a),d=c.getValueAsNumber(a),e="";if(isNaN(d)){e="Please enter a valid "+c.type+".";if(c.FORMAT)e+="<br>Format: "+c.FORMAT}else{var g=c.getProperties(a),f=g.min,h=g.max,i=f||c.baseValue;if((d<f&&!isNaN(h))||(d>h&&!isNaN(f))){e="Please enter a value between "+c.convertNumberToValue(f)+" and "+c.convertNumberToValue(h)+"."}else if(d<f){e="Please enter a value starting from "+c.convertNumberToValue(f)+"."}else if(d>h){e="Please enter a value up to "+c.convertNumberToValue(h)+"."}else if((d-i)%g.scale!=0){e="Please enter a value in steps of "+g.step;e+=" starting from "+c.convertNumberToValue(i);e+="."}}if(b&&e){_b(a,e);return false}return!e};function _b(a,b){try{a.focus();if(a.select)a.select();control.showToolTip(a,b,10)}catch(x){}};var _V=True,_W=True;_9("form",{noValidate:false,onsubmit:function(a,b){if(!this.get(a,"noValidate")&&!_Y(a)){b.preventDefault()}},checkValidity:function(a){var b=true,c=a.elements,d;for(var e=0;d=a.elements[e];e++){var g=html5.getBehavior(d);if(g.get(d,"willValidate")){b&=g.checkValidity(d)}}return!!b},dispatchFormChange:function(a){this.dispatchEvent(a,"formchange")},dispatchFormInput:function(a){this.dispatchEvent(a,"forminput")}});function _Y(a){var b=a.elements,c;for(var d=0;c=a.elements[d];d++){var e=html5.getBehavior(c);if(e&&e.get(c,"willValidate")){if(!_M(e,c,true))return false}}return true};_9("input",{"implements":[validation],type:"text",pattern:"",autofocus:false,required:false,get:function(a,b){switch(b){case"valueAsNumber":return _K(a,_J,NaN);case"valueAsDate":return _K(a,_I,null)}return this.base(a,b)},stepDown:function(a,b){this.stepUp(a,-b)},setUp:function(a,b){var c=chrome.getBehavior(a);if(c&&c.increment){c.increment(a,b)}}});_9("button",{"implements":[noValidation],type:"button"});_9("select",{"implements":[validation],autofocus:false,type:"select-one"});_9("textarea",{"implements":[validation],autofocus:false,required:false,type:"textarea"});_9("output",{"implements":[noValidation],get:function(a,b){if(b=="type")return"output";return a[b]}});_9("datalist");var ValidityState=Base.extend({})};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/*
|
2
|
+
base2 - copyright 2007-2009, Dean Edwards
|
3
|
+
http://code.google.com/p/base2/
|
4
|
+
http://www.opensource.org/licenses/mit-license.php
|
5
|
+
|
6
|
+
Contributors:
|
7
|
+
Doeke Zanstra
|
8
|
+
*/
|
9
|
+
var base2={name:"base2",version:"1.1 (alpha2)",exports:"Base,Package,Abstract,Module,Enumerable,Map,Collection,RegGrp,I,II,K,Undefined,Null,This,True,False,assignID,detect,global",namespace:""};new function(_U){/*@cc_on @*/var Undefined=K(),Null=K(null),True=K(true),False=K(false),This=function(){return this};var global=This(),base2=global.base2;var _1k=K(),_3l=/%([1-9])/g,_26=/^\s\s*/,_27=/\s\s*$/,_28=/([\/()[\]{}|*+-.,^$?\\])/g,_1l=/try/.test(detect)?/\bbase\b/:/.*/,_1m=["constructor","toString"],_29=detect("(jscript)")?new RegExp("^"+rescape(isNaN).replace(/isNaN/,"\\w+")+"$"):{test:False},_2a=1,_7=Array.prototype.slice;_h();function assignID(a,b){if(!b)b=a.nodeType==1?"uniqueID":"base2ID";if(!a[b])a[b]="b2_"+_2a++;return a[b]};var _1n=function(a,b){base2.__prototyping=this.prototype;var c=new this;if(a)extend(c,a);c.base=function(){};delete base2.__prototyping;var d=c.constructor;function e(){if(!base2.__prototyping){if(this.constructor==e||this.__constructing){this.__constructing=true;d.apply(this,arguments);delete this.__constructing}else{return extend(arguments[0],c)}}return this};c.constructor=e;for(var f in Base)e[f]=this[f];if(b)extend(e,b);e.ancestor=this;e.ancestorOf=Base.ancestorOf;e.base=c.base;e.prototype=c;if(e.init)e.init();return e};var Base=_1n.call(Object,{constructor:function(){if(arguments.length>0){this.extend(arguments[0])}},extend:delegate(extend),toString:function(){if(this.constructor.toString==Function.prototype.toString){return"[object base2.Base]"}else{return"[object "+String2.slice(this.constructor,1,-1)+"]"}}},Base={ancestorOf:function(a){return _V(this,a)},extend:_1n,forEach:function(a,b,c){_h(this,a,b,c)},implement:function(a){if(typeof a=="function"){a=a.prototype}extend(this.prototype,a);return this}});var Package=Base.extend({constructor:function(d,e){var f=this;f.extend(e);if(f.name&&f.name!="base2"){if(e.parent===undefined)f.parent=base2;if(f.parent)f.parent.addName(f.name,f);f.namespace=format("var %1=%2;",f.name,String2.slice(f,1,-1))}if(d){var g=base2.js?base2.js.namespace:"";var h="var base2=(function(){return this.base2})(),_0=base2.toString;"+base2.namespace+g;var j=csv(f.imports),k;for(var l=0;k=j[l];l++){var n=p(k)||p("js."+k);if(!n)throw new ReferenceError(format("Object not found: '%1'.",k));h+=n.namespace}d.init=function(){if(f.init)f.init()};d.imports=h+lang.namespace+"this.init();";h="";var q=csv(f.exports);for(var l=0;k=q[l];l++){var o=f.name+"."+k;f.namespace+="var "+k+"="+o+";";h+="if(!"+o+")"+o+"="+k+";"}d.exports=h+"this._2b"+f.name+"();";var m=String2.slice(f,1,-1);d["_2b"+f.name]=function(){for(var a in f){var b=f[a];if(b&&b.ancestorOf==Base.ancestorOf&&a!="constructor"){b.toString=K("["+m+"."+a+"]")}}}}function p(a){a=a.split(".");var b=base2,c=0;while(b&&a[c]!=null){b=b[a[c++]]}return b}},exports:"",imports:"",name:"",namespace:"",parent:null,addName:function(a,b){if(!this[a]){this[a]=b;this.exports+=","+a;this.namespace+=format("var %1=%2.%1;",a,this.name);if(b&&b.ancestorOf==Base.ancestorOf&&a!="constructor"){b.toString=K("["+String2.slice(this,1,-1)+"."+a+"]")}}},addPackage:function(a){this.addName(a,new Package(null,{name:a,parent:this}))},toString:function(){return format("[%1]",this.parent?String2.slice(this.parent,1,-1)+"."+this.name:this.name)}});var Abstract=Base.extend({constructor:function(){throw new TypeError("Abstract class cannot be instantiated.");}});var _2c=0;var Module=Abstract.extend(null,{namespace:"",extend:function(a,b){var c=this.base();var d=_2c++;c.namespace="";c.partial=this.partial;c.toString=K("[base2.Module["+d+"]]");Module[d]=c;c.implement(this);if(a)c.implement(a);if(b){extend(c,b);if(c.init)c.init()}return c},forEach:function(c,d){_h(Module,this.prototype,function(a,b){if(typeOf(a)=="function"){c.call(d,this[b],b,this)}},this)},implement:function(a){var b=this;var c=b.toString().slice(1,-1);if(typeof a=="function"){if(!_V(a,b)){this.base(a)}if(_V(Module,a)){for(var d in a){if(typeof b[d]=="undefined"){var e=a[d];if(typeof e=="function"&&e.call&&a.prototype[d]){e=_2d(a,d)}b[d]=e}}b.namespace+=a.namespace.replace(/base2\.Module\[\d+\]/g,c)}}else{extend(b,a);_1o(b,a)}return b},partial:function(){var c=Module.extend();var d=c.toString().slice(1,-1);c.namespace=this.namespace.replace(/(\w+)=b[^\)]+\)/g,"$1="+d+".$1");this.forEach(function(a,b){c[b]=partial(bind(a,c))});return c}});Module.prototype.base=Module.prototype.extend=_1k;function _1o(a,b){var c=a.prototype;var d=a.toString().slice(1,-1);for(var e in b){var f=b[e],g="";if(e.indexOf("@")==0){if(detect(e.slice(1)))_1o(a,f)}else if(!c[e]){if(e==e.toUpperCase()){g="var "+e+"="+d+"."+e+";"}else if(typeof f=="function"&&f.call){g="var "+e+"=base2.lang.bind('"+e+"',"+d+");";c[e]=_2e(a,e)}if(a.namespace.indexOf(g)==-1){a.namespace+=g}}}};function _2d(a,b){return function(){return a[b].apply(a,arguments)}};function _2e(b,c){return function(){var a=_7.call(arguments);a.unshift(this);return b[c].apply(b,a)}};var Enumerable=Module.extend({every:function(c,d,e){var f=true;try{forEach(c,function(a,b){f=d.call(e,a,b,c);if(!f)throw StopIteration;})}catch(error){if(error!=StopIteration)throw error;}return!!f},filter:function(d,e,f){var g=0;return this.reduce(d,function(a,b,c){if(e.call(f,b,c,d)){a[g++]=b}return a},[])},invoke:function(b,c){var d=_7.call(arguments,2);return this.map(b,typeof c=="function"?function(a){return a==null?undefined:c.apply(a,d)}:function(a){return a==null?undefined:a[c].apply(a,d)})},map:function(c,d,e){var f=[],g=0;forEach(c,function(a,b){f[g++]=d.call(e,a,b,c)});return f},pluck:function(b,c){return this.map(b,function(a){return a==null?undefined:a[c]})},reduce:function(c,d,e,f){var g=arguments.length>2;forEach(c,function(a,b){if(g){e=d.call(f,e,a,b,c)}else{e=a;g=true}});return e},some:function(a,b,c){return!this.every(a,not(b),c)}});var _3="#";var Map=Base.extend({constructor:function(a){if(a)this.merge(a)},clear:function(){for(var a in this)if(a.indexOf(_3)==0){delete this[a]}},copy:function(){base2.__prototyping=true;var a=new this.constructor;delete base2.__prototyping;for(var b in this)if(this[b]!==a[b]){a[b]=this[b]}return a},forEach:function(a,b){for(var c in this)if(c.indexOf(_3)==0){a.call(b,this[c],c.slice(1),this)}},get:function(a){return this[_3+a]},getKeys:function(){return this.map(II)},getValues:function(){return this.map(I)},has:function(a){a=_3+a;/*@if(@_jscript_version<5.5)return this[a]!==undefined||$Legacy.has(this,a);@else @*/return a in this;/*@end @*/},merge:function(b){var c=flip(this.put);forEach(arguments,function(a){forEach(a,c,this)},this);return this},put:function(a,b){this[_3+a]=b;return b},remove:function(a){delete this[_3+a]},size:function(){var a=0;for(var b in this)if(b.indexOf(_3)==0)a++;return a},union:function(a){return this.merge.apply(this.copy(),arguments)}});Map.implement(Enumerable);Map.prototype.filter=function(d,e){return this.reduce(function(a,b,c){if(!d.call(e,b,c,this)){a.remove(c)}return a},this.copy(),this)};var _2="~";var Collection=Map.extend({constructor:function(a){this[_2]=new Array2;this.base(a)},add:function(a,b){if(this.has(a))throw"Duplicate key '"+a+"'.";return this.put.apply(this,arguments)},clear:function(){this.base();this[_2].length=0},copy:function(){var a=this.base();a[_2]=this[_2].copy();return a},forEach:function(a,b){var c=this[_2].concat();var d=c.length;for(var e=0;e<d;e++){a.call(b,this[_3+c[e]],c[e],this)}},getAt:function(a){var b=this[_2].item(a);return(b===undefined)?undefined:this[_3+b]},getKeys:function(){return this[_2].copy()},indexOf:function(a){return this[_2].indexOf(String(a))},insertAt:function(a,b,c){if(this[_2].item(a)==null)throw"Index out of bounds.";if(this.has(b))throw"Duplicate key '"+b+"'.";this[_2].insertAt(a,String(b));this[_3+b]=null;return this.put.apply(this,_7.call(arguments,1))},item:function(a){return this[typeof a=="number"?"getAt":"get"](a)},put:function(a,b){var c=this.constructor;if(c.Item&&!instanceOf(b,c.Item)){b=c.create.apply(c,arguments)}if(!this.has(a)){this[_2].push(String(a))}this[_3+a]=b;return b},putAt:function(a,b){arguments[0]=this[_2].item(a);if(arguments[0]==null)throw"Index out of bounds.";return this.put.apply(this,arguments)},remove:function(a){if(this.has(a)){this[_2].remove(String(a));delete this[_3+a]}},removeAt:function(a){var b=this[_2].item(a);if(b!==undefined){this[_2].removeAt(a);delete this[_3+b]}},reverse:function(){this[_2].reverse();return this},size:function(){return this[_2].length},slice:function(a,b){var c=this.copy();if(arguments.length>0){var d=this[_2],e=d;c[_2]=Array2(_7.apply(d,arguments));if(c[_2].length){e=e.slice(0,a);if(arguments.length>1){e=e.concat(d.slice(b))}}for(var f=0;f<e.length;f++){delete c[_3+e[f]]}}return c},sort:function(c){if(c){this[_2].sort(bind(function(a,b){return c(this[_3+a],this[_3+b],a,b)},this))}else this[_2].sort();return this},toString:function(){return"("+(this[_2]||"")+")"}},{Item:null,create:function(a,b){return this.Item?new this.Item(a,b):b},extend:function(a,b){var c=this.base(a);c.create=this.create;if(b)extend(c,b);if(!c.Item){c.Item=this.Item}else if(typeof c.Item!="function"){c.Item=(this.Item||Base).extend(c.Item)}if(c.init)c.init();return c}});var _2f=/\\(\d+)/g,_2g=/\\./g,_2h=/\(\?[:=!]|\[[^\]]+\]/g,_2i=/\(/g,_2j=/\$(\d+)/,_2k=/^\$\d+$/;var RegGrp=Collection.extend({constructor:function(a,b){this.base(a);this.ignoreCase=!!b},ignoreCase:false,exec:function(g,h){g+="";var j=this,k=this[_2];if(!k.length)return g;if(h==RegGrp.IGNORE)h=0;return g.replace(new RegExp(this,this.ignoreCase?"gi":"g"),function(a){var b,c=1,d=0;while((b=j[_3+k[d++]])){var e=c+b.length+1;if(arguments[c]){var f=h==null?b.replacement:h;switch(typeof f){case"function":return f.apply(j,_7.call(arguments,c,e));case"number":return arguments[c+f];default:return f}}c=e}return a})},insertAt:function(a,b,c){if(instanceOf(b,RegExp)){arguments[1]=b.source}return this.base.apply(this,arguments)},test:function(a){return this.exec(a)!=a},toString:function(){var e=1;return"("+this.map(function(c){var d=(c+"").replace(_2f,function(a,b){return"\\"+(e+Number(b))});e+=c.length+1;return d}).join(")|(")+")"}},{IGNORE:"$0",init:function(){forEach("add,get,has,put,remove".split(","),function(b){this[b]=_W(this,b,function(a){if(instanceOf(a,RegExp)){arguments[0]=a.source}return this.base.apply(this,arguments)})},this.prototype)},Item:{constructor:function(a,b){if(b==null)b=RegGrp.IGNORE;else if(b.replacement!=null)b=b.replacement;else if(typeof b!="function")b=String(b);if(typeof b=="string"&&_2j.test(b)){if(_2k.test(b)){b=parseInt(b.slice(1),10)}else{var c='"';b=b.replace(/\\/g,"\\\\").replace(/"/g,"\\x22").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\$(\d+)/g,c+"+(arguments[$1]||"+c+c+")+"+c).replace(/(['"])\1\+(.*)\+\1\1$/,"$1");b=new Function("return "+c+b+c)}}this.length=RegGrp.count(a);this.replacement=b;this.toString=K(a+"")},disabled:false,length:0,replacement:""},count:function(a){a=(a+"").replace(_2g,"").replace(_2h,"");return match(a,_2i).length}});var lang={name:"lang",version:base2.version,exports:"assert,assertArity,assertType,bind,copy,extend,forEach,format,instanceOf,match,pcopy,rescape,trim,typeOf",namespace:""};function assert(a,b,c){if(!a){throw new(c||Error)(b||"Assertion failed.");}};function assertArity(a,b,c){if(b==null)b=a.callee.length;if(a.length<b){throw new SyntaxError(c||"Not enough arguments.");}};function assertType(a,b,c){if(b&&(typeof b=="function"?!instanceOf(a,b):typeOf(a)!=b)){throw new TypeError(c||"Invalid type.");}};function copy(a){var b={};for(var c in a){b[c]=a[c]}return b};function pcopy(a){_B.prototype=a;return new _B};function _B(){};function extend(a,b){if(a&&b){var c=base2.__prototyping;if(arguments.length>2){var d=b;b={};b[d]=arguments[2];c=true}var e=global[(typeof b=="function"?"Function":"Object")].prototype;if(c){var f=_1m.length,d;while((d=_1m[--f])){var g=b[d];if(g!=e[d]){if(_1l.test(g)){a[d]=_W(a,d,g)}else{a[d]=g}}}}for(d in b){if(typeof e[d]=="undefined"){g=b[d];if(d.indexOf("@")==0){if(detect(d.slice(1)))extend(a,g)}else if(g!=_1k){var h=a[d];if(h&&typeof g=="function"){if(g!=h){if(_1l.test(g)){a[d]=_W(a,d,g)}else{g.ancestor=h;a[d]=g}}}else{a[d]=g}}}}}/*@if(@_jscript){try{return a}finally{a=null}}@else @*/return a;/*@end @*/};function _V(a,b){while(b){if(!b.ancestor)return false;b=b.ancestor;if(b==a)return true}return false};function _W(c,d,e){var f=c[d];var g=base2.__prototyping;if(g&&f!=g[d])g=null;function h(){var a=this.base;this.base=g?g[d]:f;var b=e.apply(this,arguments);this.base=a;return b};h.method=e;h.ancestor=f;return h};if(typeof StopIteration=="undefined"){StopIteration=new Error("StopIteration")}function forEach(a,b,c,d){if(a==null)return;if(!d){if(typeof a=="function"&&a.call){d=Function}else if(typeof a.forEach=="function"&&a.forEach!=forEach){a.forEach(b,c);return}else if(typeof a.length=="number"){_C(a,b,c);return}}_h(d||Object,a,b,c)};forEach.csv=function(a,b,c){forEach(csv(a),b,c)};forEach.detect=function(c,d,e){var f=function(a,b){if(b.indexOf("@")==0){if(detect(b.slice(1)))forEach(a,f)}else d.call(e,a,b,c)};forEach(c,f)};function _C(a,b,c){if(a==null)a=global;var d=a.length||0,e;if(typeof a=="string"){for(e=0;e<d;e++){b.call(c,a.charAt(e),e,a)}}else{for(e=0;e<d;e++){/*@if(@_jscript_version<5.2)if(a[e]!==undefined&&$Legacy.has(a,e))@else @*/if(e in a)/*@end @*/b.call(c,a[e],e,a)}}};function _h(g,h,j,k){var l=function(){this.i=1};l.prototype={i:1};var n=0;for(var q in new l)n++;_h=n>1?function(a,b,c,d){var e={};for(var f in b){if(!e[f]&&a.prototype[f]===undefined){e[f]=true;c.call(d,b[f],f,b)}}}:function(a,b,c,d){for(var e in b){if(typeof a.prototype[e]=="undefined"){c.call(d,b[e],e,b)}}};_h(g,h,j,k)};function instanceOf(a,b){if(typeof b!="function"){throw new TypeError("Invalid 'instanceOf' operand.");}if(a==null)return false;/*@if(@_jscript)if(typeof a.constructor!="function"){return b==Object}/*@end @*/if(a.constructor==b)return true;if(b.ancestorOf)return b.ancestorOf(a.constructor);/*@if(@_jscript_version<5.1)@else @*/if(a instanceof b)return true;/*@end @*/if(Base.ancestorOf==b.ancestorOf)return false;if(Base.ancestorOf==a.constructor.ancestorOf)return b==Object;switch(b){case Array:return _D.call(a)=="[object Array]";case Date:return _D.call(a)=="[object Date]";case RegExp:return _D.call(a)=="[object RegExp]";case Function:return typeOf(a)=="function";case String:case Number:case Boolean:return typeOf(a)==typeof b.prototype.valueOf();case Object:return true}return false};var _D=Object.prototype.toString;function typeOf(a){var b=typeof a;switch(b){case"object":return a==null?"null":typeof a.constructor!="function"?_29.test(a)?"function":b:_D.call(a)=="[object Date]"?b:typeof a.constructor.prototype.valueOf();case"function":return typeof a.call=="function"?b:"object";default:return b}};var js={name:"js",version:base2.version,exports:"Array2,Date2,Function2,String2",namespace:"",bind:function(c){var d=global;global=c;forEach.csv(this.exports,function(a){var b=a.slice(0,-1);extend(c[b],this[a]);this[a](c[b].prototype)},this);global=d;return c}};function _E(b,c,d,e){var f=Module.extend();var g=f.toString().slice(1,-1);forEach.csv(d,function(a){f[a]=unbind(b.prototype[a]);f.namespace+=format("var %1=%2.%1;",a,g)});forEach(_7.call(arguments,3),f.implement,f);var h=function(){return f(this.constructor==f?c.apply(null,arguments):arguments[0])};h.prototype=f.prototype;for(var j in f){var k=b[j];if(k&&j!="prototype"&&j!="toString"&&k!=Function.prototype[j]){f[j]=k;delete f.prototype[j]}h[j]=f[j]}h.ancestor=Object;delete h.extend;h.namespace=h.namespace.replace(/(var (\w+)=)[^,;]+,([^\)]+)\)/g,"$1$3.$2");return h};if((new Date).getYear()>1900){Date.prototype.getYear=function(){return this.getFullYear()-1900};Date.prototype.setYear=function(a){return this.setFullYear(a+1900)}}var _1p=new Date(Date.UTC(2006,1,20));_1p.setUTCDate(15);if(_1p.getUTCHours()!=0){forEach.csv("FullYear,Month,Date,Hours,Minutes,Seconds,Milliseconds",function(b){extend(Date.prototype,"setUTC"+b,function(){var a=this.base.apply(this,arguments);if(a>=57722401000){a-=3600000;this.setTime(a)}return a})})}Function.prototype.prototype={};if("".replace(/^/,K("$$"))=="$"){extend(String.prototype,"replace",function(a,b){if(typeof b=="function"){var c=b;b=function(){return String(c.apply(null,arguments)).split("$").join("$$")}}return this.base(a,b)})}var Array2=_E(Array,Array,"concat,join,pop,push,reverse,shift,slice,sort,splice,unshift",Enumerable,{batch:function(d,e,f,g,h){var j=0,k=d.length;var l=function(){var a=Date2.now(),b=a,c=0;while(j<k&&(a-b<f)){e.call(h,d[j],j++,d);if(c++<5||c%50==0)a=Date2.now()}if(j<k){setTimeout(l,10)}else{if(g)g.call(h)}};setTimeout(l,1)},combine:function(d,e){if(!e)e=d;return Array2.reduce(d,function(a,b,c){a[b]=e[c];return a},{})},contains:function(a,b){return Array2.indexOf(a,b)!=-1},copy:function(a){var b=_7.call(a);if(!b.swap)Array2(b);return b},flatten:function(c){var d=0;var e=function(a,b){if(Array2.like(b)){Array2.reduce(b,e,a)}else{a[d++]=b}return a};return Array2.reduce(c,e,[])},forEach:_C,indexOf:function(a,b,c){var d=a.length;if(c==null){c=0}else if(c<0){c=Math.max(0,d+c)}for(var e=c;e<d;e++){if(a[e]===b)return e}return-1},insertAt:function(a,b,c){Array2.splice(a,b,0,c)},item:function(a,b){if(b<0)b+=a.length;return a[b]},lastIndexOf:function(a,b,c){var d=a.length;if(c==null){c=d-1}else if(c<0){c=Math.max(0,d+c)}for(var e=c;e>=0;e--){if(a[e]===b)return e}return-1},map:function(c,d,e){var f=[];_C(c,function(a,b){f[b]=d.call(e,a,b,c)});return f},remove:function(a,b){var c=Array2.indexOf(a,b);if(c!=-1)Array2.removeAt(a,c)},removeAt:function(a,b){Array2.splice(a,b,1)},swap:function(a,b,c){if(b<0)b+=a.length;if(c<0)c+=a.length;var d=a[b];a[b]=a[c];a[c]=d;return a}});Array2.forEach=_C;Array2.reduce=Enumerable.reduce;Array2.like=function(a){return typeOf(a)=="object"&&typeof a.length=="number"};var _2l=/^((-\d+|\d{4,})(-(\d{2})(-(\d{2}))?)?)?T((\d{2})(:(\d{2})(:(\d{2})(\.(\d{1,3})(\d)?\d*)?)?)?)?(([+-])(\d{2})(:(\d{2}))?|Z)?$/;var _b={FullYear:2,Month:4,Date:6,Hours:8,Minutes:10,Seconds:12,Milliseconds:14};var _c={Hectomicroseconds:15,UTC:16,Sign:17,Hours:18,Minutes:20};var Date2=_E(Date,function(a,b,c,d,e,f,g){switch(arguments.length){case 0:return new Date;case 1:return typeof a=="string"?new Date(Date2.parse(a)):new Date(a.valueOf());default:return new Date(a,b,arguments.length==2?1:c,d||0,e||0,f||0,g||0)}},"",{toISOString:function(c){var d="####-##-##T##:##:##.###";for(var e in _b){d=d.replace(/#+/,function(a){var b=c["getUTC"+e]();if(e=="Month")b++;return("000"+b).slice(-a.length)})}return d+"Z"}});delete Date2.forEach;Date2.now=function(){return(new Date).valueOf()};Date2.parse=function(a,b){if(arguments.length>1){assertType(b,"number","Default date should be of type 'number'.")}var c=match(a,_2l);if(c.length){var d=c[_b.Month];if(d)c[_b.Month]=String(d-1);if(c[_c.Hectomicroseconds]>=5)c[_b.Milliseconds]++;var e=c[_c.UTC]||c[_c.Hours]?"UTC":"";var f=new Date(b||0);if(c[_b.Date])f["set"+e+"Date"](14);for(var g in _b){var h=c[_b[g]];if(h){f["set"+e+g](h);if(f["get"+e+g]()!=c[_b[g]]){return NaN}}}if(c[_c.Hours]){var j=Number(c[_c.Sign]+c[_c.Hours]);var k=Number(c[_c.Sign]+(c[_c.Minutes]||0));f.setUTCMinutes(f.getUTCMinutes()+(j*60)+k)}return f.valueOf()}else{return NaN}};var String2=_E(String,function(a){return new String(arguments.length==0?"":a)},"charAt,charCodeAt,concat,indexOf,lastIndexOf,match,replace,search,slice,split,substr,substring,toLowerCase,toUpperCase",{csv:csv,format:format,rescape:rescape,trim:trim});delete String2.forEach;function trim(a){return String(a).replace(_26,"").replace(_27,"")};function csv(a){return a?(a+"").split(/\s*,\s*/):[]};function format(c){var d=arguments;var e=new RegExp("%([1-"+(arguments.length-1)+"])","g");return(c+"").replace(e,function(a,b){return d[b]})};function match(a,b){return(a+"").match(b)||[]};function rescape(a){return(a+"").replace(_28,"\\$1")};var Function2=_E(Function,Function,"",{I:I,II:II,K:K,bind:bind,compose:compose,delegate:delegate,flip:flip,not:not,partial:partial,unbind:unbind});function I(a){return a};function II(a,b){return b};function K(a){return function(){return a}};function bind(a,b){var c=typeof a!="function";if(arguments.length>2){var d=_7.call(arguments,2);return function(){return(c?b[a]:a).apply(b,d.concat.apply(d,arguments))}}else{return function(){return(c?b[a]:a).apply(b,arguments)}}};function compose(){var c=_7.call(arguments);return function(){var a=c.length,b=c[--a].apply(this,arguments);while(a--)b=c[a].call(this,b);return b}};function delegate(b,c){return function(){var a=_7.call(arguments);a.unshift(this);return b.apply(c,a)}};function flip(a){return function(){return a.apply(this,Array2.swap(arguments,0,1))}};function not(a){return function(){return!a.apply(this,arguments)}};function partial(d){var e=_7.call(arguments,1);return function(){var a=e.concat(),b=0,c=0;while(b<e.length&&c<arguments.length){if(a[b]===undefined)a[b]=arguments[c++];b++}while(c<arguments.length){a[b++]=arguments[c++]}if(Array2.contains(a,undefined)){a.unshift(d);return partial.apply(null,a)}return d.apply(this,a)}};function unbind(b){return function(a){return b.apply(a,_7.call(arguments,1))}};function detect(){var j=NaN/*@cc_on||@_jscript_version@*/,k=true;if(global.navigator){var l=/MSIE[\d.]+/g,n=document.createElement("span"),q=document.createElement("input"),o=n.style,m=navigator.userAgent.replace(/([a-z])[\s\/](\d)/gi,"$1$2");k&=navigator.javaEnabled();if(!j)m=m.replace(l,"");if(/MSIE/.test(m)){m=m.match(l)[0]+";"+m.replace(l,"").replace(/user\-agent.*$/i,"")}if(/Chrome/.test(m))m=m.replace(/Safari[\d.]*/gi,"");else if(/Gecko/.test(m))m=m.replace(/Gecko/g,"Gecko/").replace(/rv:/,"Gecko");if(!/^CSS/.test(document.compatMode))m+=";QuirksMode";base2.userAgent=m.replace(/like \w+/gi,"")+";"+navigator.platform}var p={};detect=function(e){var f=e.indexOf("!")==0;if(f)e=e.slice(1);if(p[e]==null){var g=false,h=e;if(h.indexOf("(")==0){if(base2.dom){h=h.replace(/(hasFeature)/,"document.implementation.$1").replace(/\bstyle\.(\w+)/g,function(a,b){if(!o[b]){b=base2.dom.CSSStyleDeclaration.getPropertyName(b)}return"style."+b}).replace(/^\((\w+\.[\w\.]+)\)$/,function(a,b){b=b.split(".");var c=b.pop(),d=b.join(".");return"("+(j<5.6?d+"."+c+"!==undefined":"'"+c+"' in "+d)+")"})}try{g=new Function("global,element,input,style,jscript,java","return !!"+h)(global,n,q,o,j,k?global.java:null)}catch(x){}}else{g=new RegExp("("+h+")","i").test(base2.userAgent)}p[e]=g}return!!(f^p[e])};detect.MSIE=!!j;detect.MSIE5=j<5.6;return detect(arguments[0])};base2=global.base2=new Package(this,base2);base2.toString=K("[base2]");var exports=this.exports;lang=new Package(this,lang);exports+=this.exports;js=new Package(this,js);eval(exports+this.exports);lang.extend=extend;base2.JavaScript=pcopy(js);base2.JavaScript.namespace+="var JavaScript=js;"};new function(_U){var dom=new base2.Package(this,{name:"dom",version:base2.version,imports:"Function2",exports:"Interface,Binding,Node,Document,Element,Traversal,AbstractView,ViewCSS,CSSStyleDeclaration,NodeSelector,StaticNodeList,Selector,CSSParser,XPathParser,Event,EventTarget,DocumentEvent,HTMLDocument,HTMLElement,ClassList,ElementView",bind:function(a){/*@if(@_jscript_version<5.6)if(a&&a.getElementById){a.nodeType=9}/*@end @*/if(a&&a.nodeType){var b=(a.nodeType==1?a.uniqueID:a.base2ID)||assignID(a);if(!_X[b]){switch(a.nodeType){case 1:if(typeof a.className=="string"){(HTMLElement.bindings[a.tagName]||HTMLElement).bind(a)}else{Element.bind(a)}break;case 9:if(a.getElementById){HTMLDocument.bind(a)}else{Document.bind(a)}break;default:Node.bind(a)}_X[b]=true}}return a},isBound:function(a){return!!_X[a.nodeType==1?a.uniqueID:a.base2ID]}});eval(this.imports);base2.DOM=pcopy(dom);base2.DOM.namespace+="var DOM=dom;";/*@cc_on @*/var _X={};var _8=document.createElement("span"),_i=_8.style;var _Y=detect("(element.textContent)")?"textContent":"innerText";var _2m=/^(action|cite|codebase|data|href|longdesc|lowsrc|src|usemap)$/i,_2n=/^(type|value)$/i;var _1q=detect("(element.parentElement)")?"parentElement":"parentNode";var _2o=/type="?([^\s">]*)"?/i,_2p=/value="?([^\s">]*)"?/i;function _1r(b){return extend(this.base(b),"removeEventListener",function(){var a=Array2.slice(arguments);a.unshift(this);EventTarget.removeEventListener.apply(EventTarget,a)})};var _1s=_8.sourceIndex==undefined?function(a){var b=0;while(a){var c=Traversal.getNodeIndex(a);b="0000".slice(0,4-String(c).length)+c+"."+b;a=a.parentNode}return b}:function(a){return a.sourceIndex};var _F={"class":"className","for":"htmlFor"};var _1t="accessKey,allowTransparency,cellPadding,cellSpacing,codeBase,codeType,colSpan,dateTime,frameBorder,longDesc,maxLength,noHref,noResize,noShade,noWrap,readOnly,rowSpan,tabIndex,useMap,vAlign";extend(_F,Array2.combine(_1t.toLowerCase().split(","),_1t.split(",")));var _2q=_8.getAttributeNode?function(a,b){return a.getAttributeNode(b)}:function(a,b){return a.attributes[b]||a.attributes[_F[b.toLowerCase()]]};var Interface=Module.extend(null,{forEach:function(c,d){forEach(this,function(a,b){if(typeOf(a)=="function"&&(this.prototype[b]||a._G)){c.call(d,a,b,this)}},this,Module)},implement:function(a){if(typeof a=="object"){_1u(this,a)}else if(Interface.ancestorOf(a)){for(var b in a){if(a[b]&&a[b]._G){this[b]=bind(b,a);this[b]._G=b}}}return this.base(a)}});function _1u(a,b){var c=a.toString().slice(1,-1);for(var d in b){var e=b[d];if(d.indexOf("@")==0){_1u(a,e)}else if(!a[d]&&typeof e=="function"&&e.call){var f="abcdefghij".slice(0,e.length).split("");var g=new Function(f.join(","),format("var A=%2.%1.ancestor;if(A)%2.base=A;var m=A?'base':'%1';return %2[m](%3)",d,f[0],f.slice(1)));g._G=d;a[d]=g;a.namespace+="var "+d+"=base2.lang.bind('"+d+"',"+c+");"}}};var Binding=Interface.extend(null,{bind:function(a){return extend(a,this.prototype)}});var Node=Binding.extend({"@!(element.compareDocumentPosition)":{compareDocumentPosition:function(a,b){if(Traversal.contains(a,b)){return 4|16}else if(Traversal.contains(b,a)){return 2|8}var c=_1s(a);var d=_1s(b);if(c<d){return 4}else if(c>d){return 2}return 1}}});var Document=Node.extend(null,{bind:function(b){extend(b,"createElement",function(a){return dom.bind(this.base(a))});if(!b.defaultView){b.defaultView=Traversal.getDefaultView(b)}AbstractView.bind(b.defaultView);if(b!=window.document){new DOMContentLoadedEvent(b)}return this.base(b)},"@Gecko":{bind:_1r}});detect("(element.className='test',element.expando=true)");var Element=Node.extend({"@(element.getAttribute('made-up')===''||element.getAttribute('id')!=null||element.getAttribute('expando'))":{getAttribute:function(a,b){var c=_2q(a,b),d=c&&c.specified;/*@if(@_jscript)if(a.nodeName=="INPUT"&&_2n.test(b)&&a.outerHTML){var e=a.outerHTML||"";with(e)e=slice(0,indexOf(">")+1);return match(e,b=="type"?_2o:_2p)[1]||null}if((d&&_2m.test(b))||(!c&&@_jscript_version<5.6)){var f="getAttribute";if(a["_"+f])f="_"+f;return a[f](b,2)}/*@end @*/if(d){/*@if(@_jscript)if(b=="style")return a.style.cssText.toLowerCase();/*@end @*/return c.nodeValue}return null},hasAttribute:function(a,b){return this.getAttribute(a,b)!=null}},"@!(element.getAttribute('class'))":{removeAttribute:function(a,b){b=_F[b.toLowerCase()]||b;/*@if(@_jscript)var c="removeAttribute";if(a["_"+c])c="_"+c;a[c](b);@else @*/this.base(a,b);/*@end @*/},setAttribute:function(a,b,c){b=_F[b.toLowerCase()]||b;/*@if(@_jscript)if(b=="style"){a.style.cssText=c}else{var d="setAttribute";if(a["_"+d])d="_"+d;a[d](b,String(c))}@else @*/this.base(a,b,c);/*@end @*/}},"@!(element.hasAttribute)":{hasAttribute:function(a,b){return this.getAttribute(a,b)!=null}},"@!(element.matchesSelector)":{matchesSelector:function(a,b){return new Selector(b).test(a)}}},{"@Gecko":{bind:_1r}});var Traversal=Module.extend({contains:function(a,b){var c=a.nodeType;while(b&&(b=b.parentNode)&&a!=b)continue;return!!b},getFirstElementChild:function(a){a=a.firstChild;return this.isElement(a)?a:this.getNextElementSibling(a)},getLastElementChild:function(a){a=a.lastChild;return this.isElement(a)?a:this.getPreviousElementSibling(a)},getNextElementSibling:function(a){while(a&&(a=a.nextSibling)&&!this.isElement(a))continue;return a},getNodeIndex:function(a){var b=0;while(a&&(a=a.previousSibling))b++;return b},getOwnerDocument:function(a){return a.ownerDocument},getPreviousElementSibling:function(a){while(a&&(a=a.previousSibling)&&!this.isElement(a))continue;return a},getTextContent:function(a,b){return a[a.nodeType==1?b?"innerHTML":_Y:"nodeValue"]},includes:function(a,b){return!!b&&(a==b||this.contains(a,b))},isEmpty:function(a){a=a.firstChild;while(a){if(a.nodeType==3||this.isElement(a))return false;a=a.nextSibling}return true},setTextContent:function(a,b,c){a[a.nodeType==1?c?"innerHTML":_Y:"nodeValue"]=b},"@!MSIE":{setTextContent:function(a,b,c){with(a)while(lastChild)removeChild(lastChild);this.base(a,b,c)}},"@(jscript<5.6)":{getOwnerDocument:function(a){return a.document.parentWindow.document}}},{TEXT_CONTENT:_Y,getDefaultView:function(a){return(a.ownerDocument||a.document||a).defaultView},getDocument:function(a){return this.isDocument(a)?a:a.nodeType?this.getOwnerDocument(a):a.document},isDocument:function(a){return!!a&&a.nodeType==9},isElement:function(a){return!!a&&a.nodeType==1},isXML:function(a){return!this.getDocument(a).getElementById},"@!(document.defaultView)":{getDefaultView:function(a){return(a.document||a).parentWindow}},"@(jscript<5.6)":{isDocument:function(a){return!!(a&&(a.nodeType==9||a.writeln))},isElement:function(a){return!!a&&a.nodeType==1&&a.nodeName!="!"}}});var AbstractView=Binding.extend();var _q=1,_1v=2,_r=3;var _1w={"2":2,"4":1},_1x={focusin:"focus",focusout:"blur"},_1y=/^mouse(up|down)|click$/,_2r=/click$/,_1z=/^((before|un)?load|focus|blur|stop|(readystate|property|filter)change|losecapture)$/,_2s=/^((dbl)?click|mouse(down|up|over|out|wheel)|key(down|up|press)|submit|DOMActivate|(before)?(cut|copy|paste)|contextmenu|drag(start|enter|over)?|drop|before(de)?activate)$/,_Z=/^(abort|error|load|scroll|(readystate|property|filter)change)$/;var _H={},_1A=extend({},{DOMContentLoaded:"base2ContentLoaded",mouseenter:"mouseover",mouseleave:"mouseout","@Gecko":{mousewheel:"DOMMouseScroll"}});function _e(a,b,c){var d=a+"#"+assignID(b);if(!_H[d]){_H[d]=c}return _H[d]};function _2t(a,b){return _H[a+"#"+b.base2ID]||b};function _j(a,b,c){if(typeof b=="function"){b.call(a,c)}else{b.handleEvent(c)}};extend(_0,{suppress:{},listeners:{},handlers:{},attachEvent:function(a,b,c){var d=base2.assignID(c);var e=this.handlers[d];if(!e){this.listeners[d]=c;e=this.handlers[d]=new Function("e","base2.toString.listeners['"+d+"'](e)")}a.attachEvent(b,e)},detachEvent:function(a,b,c,d){var e=c.base2ID;a.detachEvent(b,this.handlers[e]);if(d){delete this.listeners[e];delete this.handlers[e]}}});var Event=Binding.extend({"@!(document.createEvent)":{initEvent:function(a,b,c,d){a.type=String(b);a.bubbles=!!c;a.cancelable=!!d},preventDefault:function(b){if(b.cancelable!==false)b.returnValue=false;if(b.type=="mousedown"){var c=Traversal.getDocument(b.target).activeElement,d=_0.suppress;var e=function(a){d.focus=true;c.focus();_0.detachEvent(c,"onblur",e,true);setTimeout(function(){delete d.focus;delete d.blur},1)};d.blur=true;_0.attachEvent(c,"onblur",e)}},stopPropagation:function(a){a.cancelBubble=true},"@(element.onbeforedeactivate)":{preventDefault:function(b){if(b.cancelable!==false)b.returnValue=false;if(b.type=="mousedown"){var c=Traversal.getDocument(b.target).body;var d=function(a){_0.detachEvent(c,"onbeforedeactivate",d,true);a.returnValue=false};_0.attachEvent(c,"onbeforedeactivate",d)}}}}},{CAPTURING_PHASE:_q,AT_TARGET:_1v,BUBBLING_PHASE:_r,cloneEvent:function(a){if(a.isClone)return a;var b=copy(a);b.isClone=true;b.stopPropagation=function(){a.stopPropagation();this.cancelBubble=true};b.preventDefault=function(){a.preventDefault();this.returnValue=false};return b},"@!(document.createEvent)":{bind:function(a){if(!a.timeStamp){a.bubbles=!_1z.test(a.type);a.cancelable=_2s.test(a.type);a.timeStamp=new Date().valueOf()}a.relatedTarget=a[(a.target==a.fromElement?"to":"from")+"Element"];return this.base(a)}}});if(detect.MSIE&&!detect("element.dispatchEvent")){var _9=document.createElement(/^CSS/.test(document.compatMode)?"meta":"marquee"),_10=_0.base2Event={};_9.base2Events=0;_9.attachEvent("onpropertychange",new Function('e','var d=base2.toString.base2Event;if (e.propertyName=="base2Events"){if(typeof d.listener=="function")d.listener.call(d.target,d.event);else d.listener.handleEvent(d.event)}'));document.getElementsByTagName("head")[0].appendChild(_9);var EventDispatcher=Base.extend({constructor:function(a){this.state=a},dispatch:function(a,b,c,d){b.eventPhase=c;var e=a.length;while(e--&&!b.cancelBubble){var f=a[e],g=d[f.nodeType==1?f.uniqueID:f.base2ID];if(g){g=copy(g);b.currentTarget=f;b.eventPhase=f==b.target?_1v:c;for(var h in g){_10.event=b;_10.target=f;_10.listener=g[h];_9.base2Events++;if(b.returnValue===false){b.preventDefault()}}}}},handleEvent:function(a){a=Event.cloneEvent(Event.bind(a));var b=a.type;if(_1x[b]){b=a.type=_1x[b];a.bubbles=!_1z.test(b)}var c=this.state.events[b];if(c&&!_0.suppress[b]){if(_1y.test(b)){var d=_2r.test(b)?this.state._11:a.button;a.button=_1w[d]||0}var e=a.target,f=[],g=0;while(e){f[g++]=e;e=e.parentNode}/*@if(@_jscript_version<5.6)if(f[0].nodeType==1&&!f[g-1].documentElement){f[g]=Traversal.getDocument(f[0])}/*@end @*/var h=c[_q];if(h)this.dispatch(f,a,_q,h);h=c[_r];if(h&&!a.cancelBubble){if(a.bubbles){f.reverse()}else{f.length=1}this.dispatch(f,a,_r,h)}}return a.returnValue!==false}})}var EventTarget=Interface.extend({"@!(element.addEventListener)":{addEventListener:function(a,b,c,d){var e=DocumentState.getInstance(a);var f=assignID(a),g=assignID(c),h=d?_q:_r,j=e.registerEvent(b,a),k=j[h];if(!k)k=j[h]={};var l=k[f];if(!l)l=k[f]={};l[g]=c},dispatchEvent:function(a,b){b.target=a;b._12=true;return DocumentState.getInstance(a).handleEvent(b)},removeEventListener:function(a,b,c,d){var e=DocumentState.getInstance(a).events;var f=e[b];if(f){var g=f[d?_q:_r];if(g){var h=g[a.nodeType==1?a.uniqueID:a.base2ID];if(h)delete h[c.base2ID]}}}},addEventListener:function(b,c,d,e){var f=d;if(c=="DOMContentLoaded"){d=_e(c,f,function(a){a=Event.cloneEvent(a);a.type=c;a.bubbles=a.cancelable=false;EventTarget.removeEventListener(b,c,f,e);_j(this,f,a)})}else if(c=="mouseenter"||c=="mouseleave"){d=_e(c,f,function(a){if(Traversal.includes(this,a.target)&&!Traversal.includes(this,a.relatedTarget)){a=copy(a);a.target=this;a.type=c;a.bubbles=a.cancelable=false;_j(this,f,a)}})}this.base(b,_1A[c]||c,d,e)},removeEventListener:function(a,b,c,d){this.base(a,_1A[b]||b,_2t(b,c),d)},"@Gecko":{addEventListener:function(b,c,d,e){if(c=="mousewheel"){var f=d;d=_e(c,f,function(a){a=Event.cloneEvent(a);a.type=c;a.wheelDelta=(-a.detail*40)||0;_j(this,f,a)})}this.base(b,c,d,e)}},"@Gecko1\\.[0-3]|Webkit[1-4]":{addEventListener:function(b,c,d,e){if(/^mouse/.test(c)){var f=d;d=_e(c,f,function(a){try{if(a.target.nodeType==3){a=Event.cloneEvent(a);a.target=a.target.parentNode}}catch(x){return}_j(this,f,a)})}this.base(b,c,d,e)}},"@webkit[1-4]|KHTML[34]":{addEventListener:function(c,d,e,f){var g=e;if(_1y.test(d)){e=_e(d,g,function(a){var b=_1w[a.button]||0;if(a.button!=b){a=Event.cloneEvent(a);a.button=b}_j(this,g,a)})}else if(typeof e=="object"){e=_e(d,g,bind("handleEvent",e))}this.base(c,d,e,f)}},"@Linux|Mac|Opera":{addEventListener:function(g,h,j,k){if(h=="keydown"){var l=j;j=_e(h,l,function(b){var c=0,d=false;extend(b,"preventDefault",function(){this.base();d=true});function e(a){if(d)a.preventDefault();if(a==b||c>1){_j(this,l,b)}c++};var f=function(){this.removeEventListener("keypress",e,true);this.removeEventListener("keyup",f,true)};e.call(this,b);this.addEventListener("keyup",f,true);this.addEventListener("keypress",e,true)})}this.base(g,h,j,k)}}});if(detect("Gecko")){EventTarget.removeEventListener._G="removeEventListener";delete EventTarget.prototype.removeEventListener}var DocumentEvent=Interface.extend({"@!(document.createEvent)":{createEvent:function(a,b){return Event({bubbles:false,cancelable:false,eventPhase:0,target:a,currentTarget:null,relatedTarget:null,timeStamp:new Date().valueOf()})}},"@(document.createEvent)":{"@!(document.createEvent('Events'))":{createEvent:function(a,b){return this.base(a,b=="Events"?"UIEvents":b)}}}});var DOMContentLoadedEvent=Base.extend({constructor:function(b){var c=false;this.fire=function(){if(!c){c=true;setTimeout(function(){var a=DocumentEvent.createEvent(b,"Events");Event.initEvent(a,"base2ContentLoaded",false,false);EventTarget.dispatchEvent(b,a)},1)}};this.listen(b)},listen:function(a){EventTarget.addEventListener(Traversal.getDefaultView(a),"load",this.fire,false)},"@(document.addEventListener)":{constructor:function(a){this.base(a);a.addEventListener("DOMContentLoaded",this.fire,false)}},"@MSIE.+win":{listen:function(a){this.base(a);try{a.body.doScroll("left");if(!this.__constructing)this.fire()}catch(x){setTimeout(bind(this.listen,this,a),10)}}},"@KHTML":{listen:function(a){if(/loaded|complete/.test(a.readyState)){if(!this.__constructing)this.fire()}else{setTimeout(bind(this.listen,this,a),10)}}}});Document.implement(DocumentEvent);Document.implement(EventTarget);Element.implement(EventTarget);var ViewCSS=Interface.extend({"@!(document.defaultView.getComputedStyle)":{"@(element.currentStyle)":{getComputedStyle:function(b,c,d){var e=c.currentStyle,f=_1B.bind({});for(var g in e){if(_13.test(g)||_14.test(g)){f[g]=this.getComputedPropertyValue(b,c,g)}else if(g.indexOf("ruby")!=0){f[g]=e[g]}}forEach.csv("backgroundPosition,boxSizing,clip,cssFloat,opacity",function(a){f[a]=this.getComputedPropertyValue(b,c,a)},this);return f}}}},{prefix:"","@Gecko":{prefix:"Moz"},"@KHTML":{prefix:"Khtml"},"@Webkit":{prefix:"Webkit"},"@Opera":{prefix:"O"},"@MSIE":{prefix:"Ms"},getComputedPropertyValue:function(a,b,c){var d=CSSStyleDeclaration.getPropertyValue(this.getComputedStyle(a,b,null),c);if(_14.test(c))d=_1C(d);return d},"@!(document.defaultView.getComputedStyle)":{"@(element.currentStyle)":{getComputedPropertyValue:function(a,b,c){var d=b.currentStyle,e=d[c];if(e==null){c=_f(c);e=d[c]||""}switch(c){case"float":case"cssFloat":return d.cssFloat||d.styleFloat||"";case"cursor":return e=="hand"?"pointer":e;case"opacity":return e==null?"1":e;case"clip":return"rect("+[d.clipTop,d.clipRight,d.clipBottom,d.clipLeft].join(", ")+")";case"backgroundPosition":return d.backgroundPositionX+" "+d.backgroundPositionY;case"boxSizing":return e==null?/^CSS/.test(Traversal.getDocument(b).compatMode)?"content-box":"border-box":e}if(e.indexOf(" ")>0)return e;if(_13.test(c)){if(_2u.test(e))return e;if(e=="auto")return"0px";if(c.indexOf("border")==0){if(d[c.replace("Width","Style")]=="none")return"0px";e=_2v[e]||e;if(typeof e=="number")return e+"px"}/*@if(@_jscript)if(_2w.test(e))return _2x(b,e);/*@end @*/}else if(_14.test(c)){if(e=="transparent")return e;if(/^(#|rgb)/.test(e))return _1C(e);/*@if(@_jscript)return _2y(e);/*@end @*/}return e}}}});var _2w=/\d/,_2u=/\dpx$/i,_13=/(width|height|top|bottom|left|right|fontSize)$/i,_14=/color$/i;var _2z=/\-/,_2A=/\-([a-z])/g,_15=/[A-Z]/g;var _2v={thin:1,medium:2,thick:4};var _2B={"@MSIE":{opacity:1,cursor:1}};var _f=function(c,d){if(c=="float"||c=="cssFloat"||c=="styleFloat"){return d?"float":_i.cssFloat==null?"styleFloat":"cssFloat"}if(_2z.test(c)){c=c.replace(_2A,_2C)}if(_i[c]==null){var e=/^border(\w+)Radius$/;if(ViewCSS.prefix=="Moz"&&e.test(c)){c=c.replace(e,function(a,b){return"borderRadius"+b.charAt(0)+b.slice(1).toLowerCase()})}var f=ViewCSS.prefix+c.charAt(0).toUpperCase()+c.slice(1);if(_i[f]!=null){c=f}}if(d){c=c.replace(_15,_16)}return c};function _16(a){return"-"+a.toLowerCase()};var _2C=flip(String2.toUpperCase),_17=partial(parseInt,undefined,16);function _2x(a,b){var c=a.style.left;var d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;b=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return b+"px"};function _2y(a){if(window.createPopup){var b=createPopup().document}else{b=new ActiveXObject("htmlfile");b.write("<body>")}var c=b.body,d=c.createTextRange();c.style.color=a.toLowerCase();var e=d.queryCommandValue("ForeColor");return format("rgb(%1, %2, %3)",e&0xff,(e&0xff00)>>8,(e&0xff0000)>>16)};function _1C(a){if(a.indexOf("rgb")==0)return a.replace(/(\d)\s,/g,"$1,");if(a.indexOf("#")!=0)return a;var b=a.slice(1);if(b.length==3)b=b.replace(/(\w)/g,"$1$1");return"rgb("+Array2.map(b.match(/(\w\w)/g),_17).join(", ")+")"};var _1B=Binding.extend({getPropertyValue:function(a,b){if(a[b]==null)b=_f(b);return a[b]||""},"@MSIE5":{getPropertyValue:function(a,b){if(a[b]==null)b=_f(b);var c=a[b];if(b=="cursor"&&c=="hand"){c="pointer"}return c||""}}});var CSSStyleDeclaration=_1B.extend({setProperty:function(a,b,c,d){if(a[b]==null)b=_f(b);if(d){this.base(a,b.replace(_15,_16),c,d)}else{a[b]=c}},"@!(style['setProperty'])":{setProperty:function(a,b,c,d){if(a[b]==null)b=_f(b);/*@if(@_jscript)if(@_jscript_version<5.6&&b=="cursor"&&c=="pointer"){c="hand"}else if(b=="opacity"){c*=100;a.zoom="100%";a.filter="alpha(opacity="+Math.round(c)+")"}/*@end @*/if(d=="important"){a.cssText+=format(";%1:%2!important;",b.replace(_15,_16),c)}else{a[b]=c}}}},{getPropertyName:_f,setProperties:function(a,b){b=extend({},b);for(var c in b){var d=b[c];if(a[c]==null)c=_f(c);if(typeof d=="number"&&_13.test(c))d+="px";if(_2B[c]){this.setProperty(a,c,d,"")}else{a[c]=d}}}});AbstractView.implement(ViewCSS);var _1D=detect("(input.getAttribute('type')=='text')")?/:visited|\[(type|value)|\b(object|param)\b/i:/:visited/;var _2D=detect("(element.compareDocumentPosition)")?function(a,b){return(a.compareDocumentPosition(b)&2)-1}:document.createRange?function(a,b){var c=a.ownerDocument,d=c.createRange(),e=c.createRange();d.selectNode(a);d.collapse(true);e.selectNode(b);e.collapse(true);return d.compareBoundaryPoints(Range.START_TO_END,e)}:function(a,b){return(Node.compareDocumentPosition(a,b)&2)-1};var _2E=/'(\\.|[^'\\])*'|"(\\.|[^"\\])*"|\\./g,_2F=/([\s>+~,]|[^(]\+|^)([#.:\[])/g,_2G=/(^|,)([^\s>+~])/g,_2H=/\s*([\^*~|$]?=|[\s>+~,]|^|$)\s*/g,_2I=/\s*([\])])/g,_2J=/([\[(])\s*/g,_2K=/\x01(\d+)\x01/g,_1E=/^ \*?/g,_2L=/'/g;var _2M=/#/g,_2N=/[.:\[]/g,_2O=/^\w|[\s>+~]\w/g;var _2P=/^[\s>+~]$/;var _I=":(checked|disabled|enabled|selected|hover|active|focus|link|visited|target)",_k=_I+"|^(#[\\w\u00a1-\uffff\\-]+\\s*)?[\\w\u00a1-\uffff\\-]+$";if(detect("KHTML")){if(detect("WebKit5")){_k+="|nth\\-|,"}else{_k="."}}_I=new RegExp(_I);_k=new RegExp(_k);var _J=function(a,b){if(typeof a!="function"){a=new Selector(a).toDOMQuery(true)}return this.base(a,b)};function _1F(a,b,c,d,e,f,g,h){d=/last/i.test(a)?d+"+1-":"";if(!isNaN(b))b="0n+"+b;else if(b=="even")b="2n";else if(b=="odd")b="2n+1";b=b.split("n");var j=b[0]?(b[0]=="-")?-1:parseInt(b[0],10):1;var k=parseInt(b[1],10)||0;var l=j<0;if(l){j=-j;if(j==1)k++}var n=format(j==0?"%3%7"+(d+k):"(%4%3-(%2))%6%1%70%5%4%3>=%2",j,k,c,d,f,g,h);if(l)n=e+"("+n+")";return n};var _18,_19;function _2Q(a,b){if(!_19)_19=new XPathParser;return"[not("+_19.exec(trim(b)).replace(/\[1\]/g,"").replace(/^(\*|[\w\u00a1-\uffff\-\x01]+)/,"[self::$1]").replace(/\]\[/g," and ").slice(1,-1)+")]"};function _1a(a,b,c){return"["+_1F(a,b,c||"count(preceding-sibling::*)+1","last()","not"," and "," mod ","=")+"]"};var id="base2"+Date2.now(),root=document.documentElement;_8.innerHTML='<a name="'+id+'"></a>';root.insertBefore(_8,root.firstChild);var _1G=document.getElementById(id)==_8.firstChild?document.all?function(a,b){var c=a.all[b]||null;if(!c||(c.nodeType&&Element.getAttribute(c,"id")==b))return c;for(var d=0;d<c.length;d++){if(Element.getAttribute(c[d],"id")==b)return c[d]}return null}:null:function(a,b){return a.getElementById(b)};root.removeChild(_8);var _s=1,_t={};function _2R(a){if(_t._s!=_s){_t={_s:_s}}var b=a.sourceIndex>0,c=b?a.sourceIndex:a.uniqueID||assignID(a);if(!_t[c]){var d={},e=1,f=a.firstChild;while(f){if(f.nodeType==1)/*@if(@_jscript_version<5.6)if(f.nodeName!="!")/*@end @*/d[b?f.sourceIndex:f.uniqueID||assignID(f)]=e++;f=f.nextSibling}d.length=e;_t[c]=d}return _t[c]};function _1H(a,b,c){try{var d=a.base(b,c)}catch(x){if(Traversal.isDocument(b)||Traversal.isElement(b)||b.nodeType==11){if(Traversal.isXML(b)&&_I.test(a)){d=null}else{var e=new SyntaxError(format("'%1' is not a valid CSS selector.",a));e.code=12;throw e;}}else{throw new TypeError("Invalid argument.");}}return d};var StaticNodeList=Base.extend({constructor:function(a){a=a||[];if(a.unsorted)a.sort(_2D);var b=a.length,c=0,d=0;if(b)this[0]=undefined;while(c<b){if(a[c])this[d++]=a[c];c++}this.length=d},length:0,forEach:function(a,b){var c=this.length;for(var d=0;d<c;d++){a.call(b,this[d],d,this)}},item:Array2.prototype.item,not:function(a,b){return this.filter(not(a),b)},slice:function(a,b){return new StaticNodeList(this.map(I).slice(a,b))},"@(XPathResult)":{constructor:function(a){if(a&&a.snapshotItem){var b=this.length=a.snapshotLength,c=0;while(c<b)this[c]=a.snapshotItem(c++)}else this.base(a)}}},{bind:function(c){Base.forEach(this.prototype,function(a,b){if(c[b]===undefined){c[b]=a}});return c}});StaticNodeList.implement(Enumerable);StaticNodeList.implement({every:_J,filter:_J,not:_J,some:_J});StaticNodeList.implement({filter:function(a,b){return new StaticNodeList(this.base(a,b))}});var NodeSelector=Interface.extend({"@(element.querySelector)":{querySelector:function(a,b){if(!_1D.test(b)){try{return this.base(a,b)}catch(x){}}return new Selector(b).exec(a,1)},querySelectorAll:function(a,b){if(!_1D.test(b)){try{return StaticNodeList.bind(this.base(a,b))}catch(x){}}return new Selector(b).exec(a)}},"@!(element.querySelector)":{querySelector:function(a,b){return new Selector(b).exec(a,1)},querySelectorAll:function(a,b){return new Selector(b).exec(a)}}});if(_8.querySelectorAll){_8.innerHTML='<a id="X"></a>';if(_8.querySelectorAll("#X").length==0){NodeSelector.implement({querySelectorAll:function(a,b){if(/[A-Z]/.test(b)){if(!/^CSS/.test(Traversal.getDocument(a).compatMode)){return new Selector(b).exec(a)}}return this.base(a,b)}})}}extend(NodeSelector.prototype,{querySelector:function(a){return dom.bind(this.base(a))},querySelectorAll:function(a){var b=this.base(a);var c=b.length;while(c--)dom.bind(b[c]);return b}});var CSSParser=RegGrp.extend({constructor:function(a){this.base(a);this.cache={};this.sorter=new RegGrp;this.sorter.add(/:not\([^)]*\)/,RegGrp.IGNORE);this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/,"$1$3$6$4")},cache:null,ignoreCase:true,escape:function(b){var c=this._2S=[];return String(b).replace(_2E,function(a){if(a.indexOf("\\")!=0){a=a.slice(1,-1).replace(_2L,"\\'")}return"\x01"+c.push(a)+"\x01"})},format:function(a){return this.normalise(this.escape(a+""))},normalise:function(a){return a.replace(_2H,"$1").replace(_2I,"$1").replace(_2J,"$1").replace(_2G,"$1 $2").replace(_2F,"$1*$2")},parse:function(a,b){return this.cache[a]||(this.cache[a]=this.revert(this.exec(this.format(a,b))))},put:function(a,b){return this.base(a.replace(/ID/g,"\\w\u00a1-\uffff\\-\\x01"),b)},revert:function(a){return this.unescape(a)},unescape:function(c){var d=this._2S;return c.replace(_2K,function(a,b){return d[b-1]})}});var XPathParser=CSSParser.extend({constructor:function(){this.base(XPathParser.build());this.sorter.putAt(1,"$1$4$3$6")},format:function(a){return this.base(a).replace(/,/g,"\x02")},unescape:function(a){return this.base(a).replace(/\\(.)/g,"$1")},revert:function(b){return this.base(b.replace(/\[self::\*\]/g,"").replace(/(^|\x02)\//g,"$1./").replace(/\x02/g," | ")).replace(/'[^'\\]*\\'(\\.|[^'\\])*'/g,function(a){return"concat("+a.split("\\'").join("',\"'\",'")+")"})},"@Opera(7|8|9\\.[0-4])":{revert:function(a){return this.base(a.replace(/last\(\)/g,"count(preceding-sibling::*)+count(following-sibling::*)+1"))}}},{build:function(){this.values.attributes[""]="[@$1]";forEach(this.types,function(a,b){forEach(this.values[b],a,this.rules)},this);this.build=K(this.rules);return this.rules},optimised:{pseudoClasses:{"first-child":"[1]","last-child":"[last()]","only-child":"[last()=1]"}},rules:extend({},{"@!KHTML|Opera":{"(^|\\x02) (\\*|[ID]+)#([ID]+)":"$1id('$3')[self::$2]"},"@!KHTML":{"([ >])(\\*|[ID]+):([\\w-]+-child(\\(([^)]+)\\))?)":function(a,b,c,d,e,f){var g=(b==" ")?"//*":"/*";if(/^nth/i.test(d)){g+=_1a(d,f,"position()")}else{g+=XPathParser.optimised.pseudoClasses[d]}return g+"[self::"+c+"]"}}}),types:{identifiers:function(a,b){this[rescape(b)+"([ID]+)"]=a},combinators:function(a,b){this[rescape(b)+"(\\*|[ID]+)"]=a},attributes:function(a,b){this["\\[([ID]+)"+rescape(b)+"([^\\]]*)\\]"]=a},pseudoClasses:function(a,b){this[":"+b.replace(/\(\)$/,b=="not()"?"\\((([^\\s>+~]|~=)+)\\)":"\\(([^)]+)\\)")]=a}},values:{identifiers:{"#":"[@id='$1'][1]",".":"[contains(concat(' ',@class,' '),' $1 ')]"},combinators:{" ":"/descendant::$1",">":"/child::$1","+":"/following-sibling::*[1][self::$1]","~":"/following-sibling::$1"},attributes:{"*=":"[contains(@$1,'$2')]","^=":"[starts-with(@$1,'$2')]","$=":"[substring(@$1,string-length(@$1)-string-length('$2')+1)='$2']","~=":"[contains(concat(' ',@$1,' '),' $2 ')]","|=":"[contains(concat('-',@$1,'-'),'-$2-')]","=":"[@$1='$2']"},pseudoClasses:{"contains()":"[contains(.,'$1')]","empty":"[not(child::*) and not(text())]","first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","not()":_2Q,"nth-child()":_1a,"nth-last-child()":_1a,"only-child":"[not(preceding-sibling::*) and not(following-sibling::*)]","root":"[not(parent::*)]"}},"@Opera(7|8|9\\.[1-4])":{build:function(){this.optimised.pseudoClasses["last-child"]=this.values.pseudoClasses["last-child"];this.optimised.pseudoClasses["only-child"]=this.values.pseudoClasses["only-child"];return this.base()}}});var Selector=Base.extend({constructor:function(a){this.toString=K(trim(a))},exec:function(a,b){return this.toDOMQuery()(a,b)},getSpecificity:function(){var a=_d.escape(this);if(a.indexOf(",")==-1){return match(a,_2M).length*10000+match(a,_2N).length*100+match(a,_2O).length}else{return-1}},split:function(){return Array2.map(_d.escape(this).split(","),function(a){return new Selector(_d.unescape(a))})},test:function(a){return this.toDOMQuery(true)(a)},toDOMQuery:function(r){var G=_2T[r?"test":"exec"];if(!G[this]){var s="",N=["e0,c"],B=[],C=(r?"":"_u.complete=false;")+"_s++;var r=[],l,d=e0.nodeType==9?e0:e0.ownerDocument||Traversal.getDocument(e0),to=d.getElementById?'toUpperCase':'toString',u,v={},k=0,p0;",D=[],O=[],H=_d.format(this).split(","),J=H.length>1,t=0;var E=function(d,e){var f="",g=_v[e?"test":"exec"],h,j,k=0;if(e)d=d.replace(_1E,"");var l=match(d,_2U),n;if(e)l.reverse();for(var q=0;n=l[q];q++){var o="";j=false;if(_2P.test(n)){h=n;o+=g[h];if(h==" "||h==">"){if(!e&&h==" "&&l[q+1].indexOf("*")==0){o=o.replace(/\bT\b/,"'*'")}t++;k++;if(!e){B.push(t)}}}else{var m=match(n,_2V),p=m[1]||"*",u=m[2]||"",w=p=="*";if(!w){D.push(p)}if(e){if(!w){o+="if(e.nodeName==t){"}}else{if(w){if(!_2W&&h=="~"){o+="if("+_1b+"){"}/*@if(@_jscript)if(h==" "||h==">"){o+="if(e.nodeName!='"+(@_jscript_version<5.6?"!":"#comment")+"'){"}@else @*/if(!_1I&&h==">"){o+="if(e.nodeType==1){"}/*@end @*/}else if(h!=" "){o+="if(e.nodeName==t){"}if((k>1&&h==" ")||h=="~"){o+=_2X;O.push(t);j=true}}o+=_d.exec(u)}f+=o.replace(_2Y,function(a,b,c){if(c)return c;return b=="T"?"t"+D.length:b=="t"?b+(D.length-1):b=="E"?"e"+(t-1):b+t})}if(J){var v="";if(!j){v=_1J}if(!_K){if(z==0){v+="v[u]=1;"}else{v+="if(!v[u]){v[u]=1;"}}f+=format(v,t)}return f};var L=function(a){if(r){a+="return true;"}else{var b="if(c==1)return e%1;";if(J&&_K){b+="r[u]=e%1;k++;"}else{b+="r[k++]=e%1;"}b+="if(k===c){_u.state=[%state%];return r;";a+=format(b,t)}a+=Array(match(a,/\)\{/g).length+1).join("}");if(J&&!r&&!_K){a+="if(l&&r.length>l)r.unsorted=1;l=r.length;"}return a};_l=[];for(var z=0;z<H.length;z++){var A=H[z];if(z>0)s+="e"+t+"=e0;";var M=A.lastIndexOf("#");if(r||M==-1){s+=L(E(A,r))}else{var P=A.slice(0,M),Q=match(A.slice(M),_2Z),R=Q[1]||"",S=Q[2]||"";var F=E(A);s+="if(!_1G||!d.getElementById||(e0!=d&&Node.compareDocumentPosition(e0,d)&1)){"+L(F)+"}";s+=format("else{var e%1=_1G(d,'%2');if(e%1&&(e0==d||Traversal.contains(e0,e%1))){",++t,R);var y="";if(P.replace(_1E,"")){var T=t;y="var q"+t+"=function(e0){";t=0;y+=E(P,true)+"return true";y+=Array(match(y,/\)\{/g).length+1).join("}")+";";t=T}F=y?"if(q"+t+"(e"+t+")){":"";F+=E(S);s+=y+L(F)+"}}"}}/*@if(@_jscript_version<5.6)s=s.replace(/getElementsByTagName\('\*'\)/g,"all");/*@end @*/C+="var reg=["+_l.join(",")+"];";forEach(D,function(a,b){var c=a.toUpperCase();if(document.createElement(a.toLowerCase()).nodeName!=c){s=s.replace(new RegExp("nodeName==t"+b+"\\b","g"),"nodeName[to]==t"+b)}C+="var t"+b+"='"+a+"'"+(a==c?";":"[to]();")});forEach(O,function(a){C+="var s"+a+"={};"});forEach(B,function(a,b){B[b]="i"+a+"?i"+a+"-1:0";N.push("a"+a)});s=_d.unescape(C+s);s+=r?";return false":"_u.state=[%state%];_u.complete=true;return c==1?null:r";s=s.replace(/%state%/g,B.join(","));eval("var _u=function("+N.join(",")+"){"+s+"}");G[this]=_u}return G[this]},toXPath:function(){if(!_18)_18=new XPathParser;return _18.parse(this)},"@(XPathResult)":{exec:function(a,b){if(_k.test(this)){return this.base(a,b)}var c=Traversal.getDocument(a);var d=b==1?9:7;var e=c.evaluate(this.toXPath(),a,null,d,null);return b==1?e.singleNodeValue:e}},"@(jscript)":{exec:function(a,b){if(typeof a.selectNodes!="undefined"&&!_k.test(this)){var c=Traversal.getDocument(a),d=b==1?"selectSingleNode":"selectNodes";c.setProperty("SelectionLanguage","XPath");return a[d](this.toXPath())}return this.base(a,b)}},"@(true)":{exec:function(a,b){var c=this.base;var d=_1H(this,a||document,b);return b==1?d:new StaticNodeList(d)},test:function(a){var b=this.base;return!!_1H(this,a)}}});var _K=detect("(element.sourceIndex)"),_1I=detect("(element.children)"),_2W=detect("(element.nextElementSibling)"),_1K=_K?"e.sourceIndex":"e.uniqueID||assignID(e)",_1J="u="+_1K.replace(/\be\b/g,"e%1")+";",_1b="e.nodeType==1",_2X="u="+_1K+";if(s[u])break;s[u]=1;",_2V=new RegExp("^(\\*|[\\w\u00a1-\uffff\\-\\x01]+)?(.*)$"),_2Z=new RegExp("^#([\\w\u00a1-\uffff\\-\\x01]+)?(.*)$"),_2U=/[^\s>+]+(~=|n\+\d)[^\s>+]+|[^\s>+~]+|[\s>+~]/g,_2Y=/\b([aeEijnpstT])\b|('[^']+')/g;/*@if(@_jscript_version<5.6)_1b+="&&e.nodeName!='!'";/*@end @*/var _l=[],_2T={exec:{},test:{}};var _v={exec:extend({},{" ":"var i,e,p,n=E.getElementsByTagName(T);for(i=a||0;e=n[i];i++){",">":"var i,e,p,n=E."+(_1I?"children":"childNodes")+";for(i=a||0;e=n[i];i++){","+":"while((e=e.nextSibling)&&!("+_1b+"))continue;if(e){","~":"while((e=e.nextSibling)){","@(element.nextElementSibling)":{"+":"e=e.nextElementSibling;if(e){","~":"while((e=e.nextElementSibling)){"}}),test:{" ":"var e=E;while((e=e."+_1q+")){",">":"var e=E."+_1q+";if(e){"}};_v.test["+"]=_v.exec["+"].replace("next","previous");_v.test["~"]=_v.exec["~"].replace("next","previous");var _w=extend({},{"checked":"e.checked","contains":"e."+Traversal.TEXT_CONTENT+".indexOf('%1')!=-1","disabled":"e.disabled===true","empty":"Traversal.isEmpty(e)","enabled":"e.disabled===false","first-child":"!(e.previousSibling&&Traversal.getPreviousElementSibling(e))","last-child":"!(e.nextSibling&&Traversal.getNextElementSibling(e))","@(element.nextElementSibling)":{"first-child":"!e.previousElementSibling","last-child":"!e.nextElementSibling"},"root":"e==d.documentElement","target":"e.id&&Element.getAttribute(e,'id')==d.location.hash.slice(1)","hover":"DocumentState.getInstance(d).isHover(e)","active":"DocumentState.getInstance(d).isActive(e)","focus":"DocumentState.getInstance(d).hasFocus(e)","link":"d.links&&Array2.contains(d.links,e)","visited":"false"});_w["only-child"]=_w["first-child"]+"&&"+_w["last-child"];var _1c={"=":"%1=='%2'","~=":/(^| )%1( |$)/,"|=":/^%1(-|$)/,"^=":/^%1/,"$=":/%1$/,"*=":/%1/};_1c[""]="%1";var _d=new CSSParser({":not\\((\\*|[ID]+)?(([^\\s>+~]|~=)+)\\)":function(a,b,c){var d=(b&&b!="*")?"if(e.nodeName!='"+b+"'){":"";d+=_d.exec(c).replace(/if\(\(/g,"if(!(");return d},"#([ID]+)":"if(((e.submit?Element.getAttribute(e,'id'):e.id)=='$1')){","\\.([ID]+)":function(a,b){_l.push(new RegExp("(^|\\s)"+rescape(b)+"(\\s|$)"));return"if((e.className&®["+(_l.length-1)+"].test(e.className))){"},":nth(-last)?-child\\(([^)]+)\\)":function(a,b,c){return"p=_2R(e.parentNode);"+format(_1J,"")+"var j=p[u];if(("+_1F(a,c,"j","p.length","!","&&","% ","==")+")){"},":([a-z\\-]+)(\\(([^)]+)\\))?":function(a,b,c,d){return"if(("+format(_w[b]||"throw",d)+")){"},"\\[([ID]+)([^=]?=)?([^\\]]*)\\]":function(a,b,c,d){d=trim(d);if(b=="class"){var e="e.className"}else{var f=(c?"get":"has")+"Attribute";if(Element.prototype[f]){e="Element."+f+"(e,'"+b+"')"}else{e="e."+f+"('"+b+"')"}}var g=_1c[c||""];if(instanceOf(g,RegExp)){_l.push(new RegExp(format(g.source,rescape(_d.unescape(d)))));g="reg[%2].test(%1)";d=_l.length-1}return"if(("+format(g,e,d)+")){"}});Document.implement(NodeSelector);Element.implement(NodeSelector);Selector.pseudoClasses=_w;Selector.operators=_1c;var HTMLDocument=Document.extend(null,{bind:function(a){DocumentState.createState(a);return this.base(a)}});var HTMLElement=Element.extend(null,{bindings:{},tags:"*",bind:function(a){if(!a.classList){a.classList=new _30(a)}if(!a.ownerDocument){a.ownerDocument=Traversal.getOwnerDocument(a)}/*@if(@_jscript)for(var b,c=0;b=_31[c];c++){b+="Attribute";a["_"+b]=a[b]}/*@end @*/return this.base(a)},extend:function(){var b=this.base.apply(this,arguments);forEach.csv(b.tags,function(a){HTMLElement.bindings[a]=b});return b}});HTMLElement.extend(null,{tags:"APPLET,EMBED,OBJECT,IFRAME",bind:I});var _31="get,set,has,remove".split(",");/*@if(@_jscript_version<5.7)for(var i in HTMLElement.prototype){if(i!="base"&&i!="extend"){HTMLElement.prototype[i]=new Function("var a=base2.js.Array2.slice(arguments),m=base2.dom.HTMLElement."+i+";a.unshift(this);return m.apply(m,a)")}}/*@end @*/var ClassList=Module.extend({add:function(a,b){if(!ClassList.contains(a,b)){a.className+=(a.className?" ":"")+b}},contains:function(a,b){var c=new RegExp("(^|\\s)"+b+"(\\s|$)");return c.test(a.className||"")},remove:function(a,b){var c=new RegExp("(^|\\s)"+b+"(\\s|$)","g");a.className=trim(a.className.replace(c,"$2"))},toggle:function(a,b){ClassList[ClassList.has(a,b)?"remove":"add"](a,b)}});var _30=new Function("e",Array2.reduce(String2.csv("add,contains,remove,toggle"),function(a,b){return a+="this."+b+"=function(t){return base2.dom.ClassList."+b+"(e,t)};"},""));ClassList.has=ClassList.contains;var _1L=/^(TABLE|TH|TD)$/,_32=detect("QuirksMode"),_1M=detect("MSIE6"),_33=detect("Webkit5")?_1L:detect("Opera8")?{test:function(a){return!_1L.test(a)}}:{test:False};var _6=new Base({getBodyClient:function(a){var b=0,c=0,d=a.defaultView,e=a.body,f=ViewCSS.getComputedStyle(d,e,null),g=f.position,h=g!="static";if(h){b+=parseInt(f.left)+parseInt(f.marginLeft);c+=parseInt(f.top)+parseInt(f.marginTop);if(g=="relative"){var j=ViewCSS.getComputedStyle(d,a.documentElement,null);b+=parseInt(j.paddingLeft)+parseInt(j.borderLeftWidth);c+=parseInt(j.paddingTop)+parseInt(j.borderTopWidth);if(!_1M){b+=parseInt(j.marginLeft);c+=parseInt(j.marginTop)}}}else{var k=a.createElement("div");e.insertBefore(k,e.firstChild);b+=k.offsetLeft-parseInt(f.paddingLeft);c+=k.offsetTop-parseInt(f.paddingTop);e.removeChild(k)}return{position:g,isAbsolute:h,left:b,top:c}},getBodyOffset:function(a){var b=this.getBodyClient(a),c=a.defaultView,d=a.body;return{isAbsolute:b.isAbsolute,left:b.left+parseInt(ViewCSS.getComputedPropertyValue(c,d,"borderLeftWidth")),top:b.top+parseInt(ViewCSS.getComputedPropertyValue(c,d,"borderTopWidth"))}},getViewport:function(a){var b=a.defaultView,c=a.documentElement;return{left:parseInt(ViewCSS.getComputedPropertyValue(b,c,"marginLeft")),top:parseInt(ViewCSS.getComputedPropertyValue(b,c,"marginTop"))}},getGeckoRoot:function(a){var b=a.defaultView.getComputedStyle(a.documentElement,null);return{x:parseInt(b.marginLeft)+parseInt(b.borderLeftWidth),y:parseInt(b.marginTop)+parseInt(b.borderTopWidth)}},"@MSIE.+QuirksMode":{getViewport:K({left:0,top:0})},"@(true)":{getBodyClient:_g(1),getBodyOffset:_g(2),getViewport:_g(3),getGeckoRoot:_g(4)}});function _g(c){return function(a){var b=c+(a.base2ID||assignID(a));if(!_g[b])_g[b]=this.base(a);return _g[b]}};var ElementView=Interface.extend({"@!(element.getBoundingClientRect)":{getBoundingClientRect:function(a){var b=a.ownerDocument;switch(a.nodeName){case"HTML":var c=_6.getViewport(b);break;case"BODY":c=_6.getBodyClient(b);break;default:var d=a.offsetLeft,e=a.offsetTop,f=b.defaultView,g=b.documentElement,h=f.getComputedStyle(a,null);offsetParent=a.offsetParent;while(offsetParent&&(offsetParent!=g||h.position=="static")){d+=offsetParent.offsetLeft-offsetParent.scrollLeft;e+=offsetParent.offsetTop-offsetParent.scrollTop;h=f.getComputedStyle(offsetParent,null);if(_33.test(offsetParent.nodeName)){if(offsetParent.clientLeft===undefined){d+=parseInt(h.borderLeftWidth);e+=parseInt(h.borderTopWidth)}else{d+=offsetParent.clientTop;e+=offsetParent.clientLeft}}offsetParent=offsetParent.offsetParent}c={left:d,top:e}}return{top:c.top,right:c.left+a.clientWidth,bottom:c.top+a.clientHeight,left:c.left}},"@Webkit5":{getBoundingClientRect:function(a){var b=this.base(a);if(a.nodeName!="HTML"){var c=a.ownerDocument,d=_6.getBodyOffset(c);if(!d.isAbsolute){d=_6.getViewport(c)}b.left+=d.left;b.top+=d.top}return b}},"@(document.getBoxObjectFor)":{getBoundingClientRect:function(a){var b=a.ownerDocument,c=b.defaultView,d=b.documentElement,e=b.getBoxObjectFor(a),f=c.getComputedStyle(a,null),g=e.x-parseInt(f.borderLeftWidth),h=e.y-parseInt(f.borderTopWidth),j=a.parentNode;if(a!=d){while(j&&j!=d){g-=j.scrollLeft;h-=j.scrollTop;f=c.getComputedStyle(j,null);if(f.position!="absolute"){g+=parseInt(f.borderTopWidth);h+=parseInt(f.borderLeftWidth)}j=j.parentNode}if(f.position!="fixed"){g-=c.pageXOffset;h-=c.pageYOffset}var k=c.getComputedStyle(b.body,null).position;if(k=="relative"){var l=b.getBoxObjectFor(d)}else if(k=="static"){l=_6.getGeckoRoot(b)}if(l){g+=l.x;h+=l.y}}return{top:h,right:g+a.clientWidth,bottom:h+a.clientHeight,left:g}}}},"@(jscript)":{getBoundingClientRect:function(a){var b=this.base(a);if(a.nodeName=="HTML"){var c=Traversal.getDocument(a),d=_6.getViewport(c),e=c.documentElement,f=d.left-e.scrollLeft,g=d.left-e.scrollTop;b={top:g,right:f+b.right-b.left,bottom:g+b.bottom-b.top,left:f}}return b}},"@Gecko1\\.9([^\\.]|\\.0)":{getBoundingClientRect:function(a){var b=this.base(a);if(a.nodeName!="HTML"&&_6.getBodyClient(a.ownerDocument).position=="absolute"){var c=_6.getGeckoRoot(document);return{top:b.top-c.y,right:b.right-c.x,bottom:b.bottom-c.y,left:b.left-c.x}}return b}}},{getOffsetFromBody:function(a){var b=0,c=0;if(a.nodeName!="BODY"){var d=Traversal.getOwnerDocument(a),e=d.defaultView,f=d.documentElement,g=d.body,h=this.getBoundingClientRect(a);b=h.left+Math.max(f.scrollLeft,g.scrollLeft);c=h.top+Math.max(f.scrollTop,g.scrollTop);var j=_6.getBodyOffset(d);/*@if(@_jscript)if(_1M&&g.currentStyle.position!="relative"){b-=f.clientLeft;c-=f.clientTop}if(@_jscript_version==5.7||d.documentMode==7){var k=f.getBoundingClientRect();b-=k.left;c-=k.top}if(_32){b-=g.clientLeft;c-=g.clientTop;j.isAbsolute=false}/*@end @*/if(j.isAbsolute){b-=j.left;c-=j.top}}return{left:b,top:c}},"@!(element.getBoundingClientRect)":{"@Webkit5":{getOffsetFromBody:function(a){var b=this.base(a);if(a.nodeName!="HTML"){var c=a.ownerDocument,d=_6.getBodyOffset(c);if(!d.isAbsolute){d=_6.getViewport(c)}b.left-=d.left;b.top-=d.top}return b}}},"@Gecko1\\.([^9]|9(\\.0|[^\\.]))":{getOffsetFromBody:function(a){var b=this.base(a);if(!_6.getBodyClient(a.ownerDocument).isAbsolute){var c=_6.getGeckoRoot(document);b.left-=c.x;b.top-=c.y}return b}},getOffsetXY:function(a,b,c){var d=this.getBoundingClientRect(a);return{x:b-d.left-a.clientLeft,y:c-d.top-a.clientTop}},"@!(element.clientLeft)":{getOffsetXY:function(a,b,c){var d=this.getBoundingClientRect(a),e=a.ownerDocument.defaultView.getComputedStyle(a,null);return{x:b-d.left-parseInt(e.borderLeftWidth),y:c-d.top-parseInt(e.borderTopWidth)}}}});HTMLElement.implement(ElementView);var DocumentState=Base.extend({init:function(d){this.document=d;this.events={};this._1N=d.documentElement;var e=/^on((DOM)?\w+|[a-z]+)$/;forEach(this,function(a,b,c){if(e.test(b)){c.registerEvent(b.slice(2))}})},hasFocus:function(a){return a==this._m},isActive:function(a){return Traversal.includes(a,this._1d)},isHover:function(a){return Traversal.includes(a,this._1N)},handleEvent:function(a){if(!a._12){this["on"+a.type](a)}},onblur:function(a){delete this._m},onmouseover:function(a){this._1N=a.target},onmousedown:function(a){this._1d=a.target},onfocus:function(a){this._m=a.target},onmouseup:function(a){delete this._1d},registerEvent:function(a){this.document.addEventListener(a,this,true);this.events[a]=true},"@!(document.activeElement)":{init:function(a){this.base(a);if(dom.isBound(a)){a.activeElement=a.body}},onfocus:function(a){this.base(a);if(dom.isBound(this.document)){this.document.activeElement=this._m}},onblur:function(a){this.base(a);if(dom.isBound(this.document)){this.document.activeElement=this.document.body}}},"@!(element.addEventListener)":{init:function(b){this.base(b);var c=new EventDispatcher(this);this._x=function(a){a.target=a.target||a.srcElement||b;c.handleEvent(a)};this.handleEvent=function(a){if(this["on"+a.type]){this["on"+a.type](a)}return c.handleEvent(a)}},registerEvent:function(a,b){var c=this.events[a],d=b&&b.Infinity,e=!d&&!_Z.test(a);if(!c||!e){if(!c)c=this.events[a]={};if(e||!b)b=this.document;if(!b)b=this.document;this.addEvent(a,b)}return c},addEvent:function(b,c){var d=this;c["on"+b]=function(a){if(!a){a=Traversal.getDefaultView(this).event}if(a)d.handleEvent(a)}},"@(element.attachEvent)":{init:function(c){this.base(c);var d={};this._1O=function(a){var b=assignID(a);if(!d[b]){d[b]=true;_0.attachEvent(a,"onsubmit",this._x);_0.attachEvent(a,"onreset",this._x)}};var e=this;this._34=function(a){if(e._1d==a.target){e._1e=copy(a)}else{e._x(a)}}},registered:{},fireEvent:function(a,b){b=Event.cloneEvent(b);b.type=a;this.handleEvent(b)},addEvent:function(b,c){var d=assignID(c)+b;if(!this.registered[d]&&c["on"+b]!==undefined){this.registered[d]=true;var e=this;_0.attachEvent(c,"on"+b,function(a){/*@if(@_jscript_version<5.6)if(a.srcElement&&!a.srcElement.nodeName)return;/*@end @*/a.target=a.srcElement||c;e.handleEvent(a);if(e["after"+b]){e["after"+b](a)}})}},onDOMContentLoaded:function(a){forEach(a.target.forms,this._1O,this);this.activate(this.document.activeElement)},onmousedown:function(a){this.base(a);this._11=a.button},onmouseup:function(a){this.base(a);if(!a._12&&this._11==null){this.fireEvent("mousedown",a)}delete this._11},aftermouseup:function(){if(this._1e){this._x(this._1e);delete this._1e}},onfocusin:function(a){this.activate(a.target);this.onfocus(a)},activate:function(a){var b=this.events.change&&a.onchange!==undefined,c=this.events.select&&a.onselect!==undefined;if(b||c){var d=this._x,e=this._34;if(b)_0.attachEvent(a,"onchange",d);if(c)_0.attachEvent(a,"onselect",e);var f=function(){_0.detachEvent(a,"onblur",f,true);if(b)_0.detachEvent(a,"onchange",d);if(c)_0.detachEvent(a,"onselect",e)};_0.attachEvent(a,"onblur",f)}},onfocusout:function(a){this.onblur(a)},onclick:function(a){var b=a.target;if(b.form)this._1O(b.form)},ondblclick:function(a){if(!a._12)this.fireEvent("click",a)},"@!(element.onfocusin)":{init:function(b){this.base(b);var c=this,d=b.activeElement;_0.attachEvent(b,"onpropertychange",function(a){if(a.propertyName=="activeElement"){if(d){_0.attachEvent(d,"onblur",f)}d=b.activeElement;if(d){_0.attachEvent(d,"onfocus",e);c.activate(d)}}});function e(a){_0.detachEvent(a.srcElement,"onfocus",e);a.target=a.srcElement;c.handleEvent(a)};function f(a){_0.detachEvent(a.srcElement,"onblur",f);a.target=a.srcElement;c.handleEvent(a)}}}}}},{createState:function(a){var b=assignID(a);if(!this[b]&&!Traversal.isXML(a)){this[b]=new this();this[b].init(a)}return this[b]},getInstance:function(a){var b=Traversal.getDocument(a);return this[b.base2ID]||this.createState(b)}});DocumentState.createState(document);new DOMContentLoadedEvent(document);eval(this.exports)};new function(_U){base2.global.jsb=new base2.Package(this,{name:"jsb",version:"0.9.7",imports:"Function2,Enumerable,dom",exports:"Animation,Rule,RuleList,behavior",INTERVAL:25,TIMEOUT:100,QUERY_SIZE:100,createStyleSheet:function(a){if(document.body){var b=document.createElement("style");b.type="text/css";if(b.textContent===undefined){b.innerHTML=a}else{b.textContent=a}new Selector("head").exec(document,1).appendChild(b)}else{document.write('<style type="text/css">'+a+'<\/style>')}},"@(document.createStyleSheet)":{createStyleSheet:function(a){document.createStyleSheet().cssText=a}}});eval(this.imports);jsb.host=_1P();/*@cc_on @*/ var _1Q =/^on([a-z]{3,}|DOM[A-Z]\w+)$/,_35=/^mouse(up|down)|click$/,_3m=/click$/,_1R=/^mouse|click$/,_36=/^mouse(enter|leave|over|out)$/,_37=/^(attach|detach|(content|document)ready)$/,_38=/^(key|text)/,_39=/^(focus|blur)$/;var _Z=/^(abort|error|load|scroll|DOMAttrModified|mouse(enter|leave)|(readystate|property|filter)change)$/,_3a=/^(HTML|BODY)$/,_3b=/^[^12]$/;var _1S=/\d+/g,_3c=/\d+%?/g;var _1f=detect("(document.createEvent('Events'))")?"Events":"UIEvents";var _y={};var _17=partial(parseInt,undefined,16);function _1T(a,b){return b.specificity-a.specificity};function _L(a,b){if(a==null)return[];a=trim(a).split(/\s+/);if(b){if(a.length==1)a[1]=a[0];if(a.length==2)a[2]=a[0];if(a.length==3)a[3]=a[1]}return a};var _i=document.createElement("span").style;function _1P(){var a=location.pathname,b=Array2.item(document.getElementsByTagName("script"),-1);if(b)a=b.src||a;return a.replace(/[\?#].*$/,"").replace(/[^\/]*$/,"")};var _1U=Base.extend({attach:Undefined,detach:Undefined,modify:Undefined,jsbExtendedMouse:false,jsbUseDispatch:true,jsbUseDelegation:true,ancestorOf:function(a){return a instanceof this.constructor},extend:function(e){if(!e)e={};var f=function(){};(f.prototype=new this.constructor).constructor=f;var g=e["implements"]||[];delete e["implements"];g.push(e);for(var h=0;e=g[h];h++){extend(f.prototype,e)}var j=new f;var k=[],l,n={handleEvent:function(a){jsb.eventDispatcher.dispatch(j,a.target,a)}};for(var q in j){if(typeof j[q]=="function"&&_1Q.test(q)){var o=q.slice(2);if(!j.jsbUseDelegation||_Z.test(o)){if(!l)l=[];l.push(o)}else if(!_37.test(o)){k.push(o)}}}var m={behavior:j};j.attach=function(a){var b=a.uniqueID||assignID(a);if(m[b]===undefined){m[b]=true;if(!_y[b])_y[b]=0;_y[b]++;if(k){for(var c=0;o=k[c];c++){jsb.eventDelegator.addEventListener(o,m)}k=null}if(l){for(var c=0;o=l[c];c++){EventTarget.addEventListener(a,o,n,false)}}if(j.onattach){_z(j,a,"attach")}if(j.oncontentready){if(_1.isContentReady(a)){_z(j,a,"contentready")}else{_1.contentReadyQueue.push({behavior:j,element:a})}}if(j.ondocumentready){if(_1.ready){_z(j,a,"documentready")}else{_1.documentReadyQueue.push({behavior:j,element:a})}}if(j.onfocus&&a==document.activeElement){j.dispatchEvent(a,"focus")}}};j.detach=function(a){var b=a.uniqueID;if(m[b]){if(arguments[1]){m[b]=false}else{delete m[b]}_y[b]--;if(l){for(var c=0;o=l[c];c++){EventTarget.removeEventListener(a,o,n,false)}}}};var p=f.modifications={},u={};j.modify=function(d){d=extend(pcopy(j),d);return{isModification:true,attach:function(a,b){j.attach(a);var c=a.uniqueID;if(b.specificity>=(u[c]||0)){u[c]=b.specificity;p[c]=d}}}};return j},get:function(a,b){if(b=="textContent"){return a[Traversal.TEXT_CONTENT]}var c=this.constructor.modifications[a.uniqueID]||this,d=c[b];if(b!="type"){var e=a[b]}if(e===undefined){e=Element.getAttribute(a,b.toLowerCase())}if(e==null)return d;switch(typeof d){case"boolean":return e!==false;case"number":return e-0}return e},set:function(a,b,c){var d=this.get(a,b);var e=b=="innerHTML";if(e||b=="textContent"){Traversal.setTextContent(a,c,e)}else{if(typeof this[b]=="boolean"&&!c){Element.removeAttribute(a,b.toLowerCase())}else{Element.setAttribute(a,b.toLowerCase(),c)}}if(d!==this.get(a,b)){this.dispatchEvent(a,"propertyset",{propertyName:b,originalValue:d})}},toggle:function(a,b){this.set(a,b,!this.get(a,b))},dispatchEvent:function(a,b,c){if(typeof b=="string"){var d=b;b=DocumentEvent.createEvent(document,_1f);var e=true,f=false;if(c){if(c.bubbles!=null)e=!!c.bubbles;if(c.cancelable!=null)f=!!c.cancelable;delete c.bubbles;delete c.cancelable}Event.initEvent(b,d,e,f)}if(c)extend(b,c);b.returnValue=undefined;b.cancelBubble=false;EventTarget.dispatchEvent(a,b)},getStyle:function(a,b){return CSSStyleDeclaration.getPropertyValue(a.style,b)},setStyle:function(a,b,c,d){var e=a.style;if(arguments.length>2){CSSStyleDeclaration.setProperty(e,b,c,d?"important":"")}else{CSSStyleDeclaration.setProperties(e,arguments[1])}},getComputedStyle:function(a,b){var c=document.defaultView;if(arguments.length==1){return ViewCSS.getComputedStyle(c,a,null)}else{return ViewCSS.getComputedPropertyValue(c,a,b)}},animate:function(a,b){return new Animation(a.style,b,a,true)},getOffsetFromBody:function(a){return ElementView.getOffsetFromBody(a)},setCapture:function(a){if(a!=_1.captureElement)this.releaseCapture();if(!_1.captureElement){_1.captureElement=a}},releaseCapture:function(){var a=_1.captureElement;if(a){delete _1.captureElement;this.dispatchEvent(a,"losecapture");if(!this.matchesSelector(a,":hover")){this.dispatchEvent(a,"mouseout")}}}},{modifications:{}});var behavior=_1U.prototype;forEach.csv("setInterval,setTimeout",function(e){behavior[e]=function(a,b){if(typeof a=="string")a=this[a];var c=Array2.slice(arguments,2);var d=this;return global[e](function(){a.apply(d,c)},b||1)}});forEach.csv("querySelector,querySelectorAll",function(c){behavior[c]=function(a,b){if(arguments.length==1){b=a;a=document}return NodeSelector[c](a,b)}});forEach([EventTarget,ElementView,Node,Element],function(c){c.forEach(function(a,b){if(!behavior[b]){behavior[b]=bind(a,c)}})});ClassList.forEach(function(a,b){if(b=="contains")b="has";behavior[b+"Class"]=a});behavior=new _1U;var Rule=Base.extend({constructor:function(b,c){if(!(b instanceof Selector)){b=new Selector(b)}if(typeof c=="string"){c=new External(c,function(a){c=a})}else if(!c.isModification&&!jsb.behavior.ancestorOf(c)){c=jsb.behavior.extend(c)}this.refresh=function(){if(typeof c.attach=="function"){b.exec(document).forEach(c.attach)}};this.toString=b.toString;forEach(b.split(),function(a){_1.addRule(a,c)})},refresh:Undefined});var RuleList=Collection.extend({put:function(a,b){a=String(a);if(a.indexOf("@")==0){if(detect(a.slice(1)))this.merge(b)}else{this.base.apply(this,arguments)}},refresh:function(){this.invoke("refresh")}},{Item:Rule});var Animation=Base.extend({constructor:function(l,n,q,o){var m={},p;var u=function(d,e){if(typeof d!="object"){d={end:String(d)}}if(!p)p=d;d=copy(d);d.styleElement=q;if(d.delay==null&&p.delay!=null){d.delay=p.delay}if(d.duration==null&&p.duration!=null){d.duration=p.duration}if(/^(font|background(Position)?)$/.test(e)){throw"Cannot animate shorthand property '"+e+"'.";}else if(/^border(Top|Right|Bottom|Left)?$/.test(e)){var f=e,g=_L(d.start),h=_L(d.end),j=["Width","Style","Color"];forEach(h,function(a,b){var c=copy(d);c.start=g[b];c.end=a;u(c,f+j[b])})}else if(/^(margin|padding|border(Width|Color|Style))$/.test(e)){var f=e.replace(/Width|Color|Style/,""),k=e.replace(f,"");g=_L(d.start,true);h=_L(d.end,true);forEach.csv("Top,Right,Bottom,Left",function(a,b){var c=copy(d);c.start=g[b];c.end=h[b];m[f+a+k]=c})}else{m[e]=d}};forEach(n,u);function w(a,b){return _1.transitions.add(l,a,b)};var v=false;this.start=function(){forEach(m,function(a,b){var c=w(b,a);if(!v){a.start=c.start;a.duration=c.duration}});v=true};this.reverse=function(c){forEach(m,function(a,b){w(b,{end:a.start,duration:c||a.duration,styleElement:q})})};this.accelerate=function(c){forEach(m,function(a,b){a=_1.transitions.get(a);if(a)a.accelerate(c)})};if(o)this.start()},transitions:null,accelerate:Undefined,reverse:Undefined,start:Undefined},{timingFunctions:{"ease":function(a,b,c,d){if((a/=d/2)<1){return c/2*a*a*a*a+b}return-c/2*((a-=2)*a*a*a-2)+b},"linear":function(a,b,c,d){return c*a/d+b},"ease-in":function(a,b,c,d){return c*(a/=d)*a+b},"ease-out":function(a,b,c,d){return-c*(a/=d)*(a-2)+b},"ease-in-out":function(a,b,c,d){if((a/=d/2)<1){return c/2*a*a+b}return-c/2*((--a)*(a-2)-1)+b}}});var Transition=Base.extend({constructor:function(d,e,f){extend(this,f);this.toString=K(Transition.getKey(d,e,f));this.propertyName=e;var g=this.styleElement,h=this.start,j=this.timing;if(g)e=CSSStyleDeclaration.getPropertyName(e);if(h==null){h=this.start=d[e]||(g?ViewCSS.getComputedPropertyValue(document.defaultView,g,e):"")||""}if(/color$/i.test(e)){h=this.parseColor(h);var k=this.parseColor(this.end),l=map(h,function(a,b){return k[b]-a}),n=function(c){return"#"+map(h,function(a,b){a=Math.round(j(c,a,l[b],duration));return(a<16?"0":"")+a.toString(16)}).join("")}}else if(g&&e=="clip"){h=map(match(h,_1S),Number);k=map(match(this.end,_1S),Number);l=map(h,function(a,b){return k[b]-a});n=function(c){return"rect("+map(h,function(a,b){return Math.round(j(c,a,l[b],duration))}).join("px, ")+"px)"}}else if(/^\-?\.?\d/.test(this.end)){var q=String(this.end).replace(/^[-.\d]+/,"").toLowerCase();if(!parseFloat(h))h=this.start=0+q;h=Number(String(h).replace(q,""));k=Number(String(this.end).replace(q,""));l=k-h;n=function(a){var b=j(a,h,l,duration);if(q=="px")b=Math.round(b);return b+q}}else{k=this.end||"";n=function(a){return j(a,0,1,duration)<1?h:k}}var o=0,m=false,p=0,u=0,w=~~(this.delay*1000),duration=~~(this.duration*1000),v=1,r=0;if(typeof j!="function"){j=Animation.timingFunctions[j]}assertType(j,"function","Invalid timing function.");this.tick=function(a){if(!o)o=a;if(!this.complete&&!u){r=a-o;if(!p&&r>=w){p=a}if(p){r=Math.round(Math.min((a-p)*v,duration));var b=m?duration-r:r;if(g){CSSStyleDeclaration.setProperty(d,e,n(b))}else{d[e]=n(b)}this.complete=r>=duration;if(this.complete){this.elapsedTime=a-o}}}};this.reverse=function(){var a=this.start;this.start=this.end;this.end=a;this.complete=false;m=!m;if(p){p=Date2.now()-(duration-r)/v}};this.setSpeed=function(a){v=a;if(p){p=Date2.now()-r/v}};this.accelerate=function(a){this.setSpeed(v*a)}},complete:false,delay:0,duration:1,timing:"ease",start:null,end:null,compare:function(a,b){if(/color$/i.test(this.propertyName)){return this.parseColor(this[b]).join(",")==this.parseColor(a).join(",")}else if(this.propertyName=="clip"){var c=/,\s*/g;return this[b].replace(c," ")==a.replace(c," ")}return this[b]==a},parseColor:function(b){b=b.toLowerCase();var c=Transition.colors,d=b,e=c[b];if(typeof e=="string"){d=e;e=""}if(!e){if(/^rgb/.test(d)){e=map(d.match(_3c),function(a){return a.indexOf("%")==-1?a-0:Math.round(2.55*a.slice(0,-1))})}else if(d.indexOf("#")==0){var f=d.slice(1);if(f.length==3)f=f.replace(/([0-9a-f])/g,"$1$1");e=map(f.match(/([0-9a-f]{2})/g),_17)}else{var g=Transition._B;if(!g){g=Transition._B=document.createElement("input");g.style.cssText="position:absolute;left:0;top:-9999px;"}document.body.appendChild(g);try{g.style.color=d;var h=ViewCSS.getComputedPropertyValue(document.defaultView,g,"color")}catch(x){}document.body.removeChild(g);if(h!=d){e=this.parseColor(h||"#000")}}if(!e||e.length!=3||Array2.contains(e,NaN)){throw"Invalid color '"+b+"'.";}c[b]=e}return e}},{colors:{},getKey:function(a,b,c){var d=c.styleElement||a,e=assignID(d);if(c.styleElement)e+=".style";return e+"."+b}});var Transitions=Collection.extend({constructor:function(a){this.base(a);this.tick=bind(this.tick,this)},add:function(a,b,c){var d=Transition.getKey(a,b,c),e=this.get(d);if(e){if(e.duration!=c.duration){e.setSpeed(e.duration/(c.duration||1))}if(e.compare(c.end,"start")){e.reverse()}}else{e=this.put(d,a,b,c);if(!this._1g){this._1g=setTimeout(this.tick,4)}}return e},tick:function(){this.invoke("tick",Date2.now());var b=this.filter(function(a){return a.complete});b.forEach(this.remove,this);b.forEach(function(a){if(a.styleElement){behavior.dispatchEvent(a.styleElement,"transitionend",{propertyName:a.propertyName,elapsedTime:a.elapsedTime/1000})}});delete this._1g;if(this.size()>0){this._1g=setTimeout(this.tick,4)}}},{Item:Transition,create:function(a,b,c,d){return new this.Item(b,c,d)}});extend(jsb,"createStyleSheet",function(h){if(typeof h!="string"){var j=h;var k={toString:function(){return map(this,function(a,b){return b+a}).join("\n").replace(/!([^\w])/g,"!important$1")}};var l;var n=function(e,f){if(/,/.test(f)){forEach(new Selector(f).split(),partial(n,e))}else{if(!l){l=f=="*"?e:{}}if(f!="*"){var g=k[f];if(!g){g=k[f]=extend({toString:function(){return" {\n"+map(this,function(b,c){if(typeof b=="function")b="none";return" "+c.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})+": "+b}).join(";\n")+"\n}"}},l)}forEach.detect(e,function(c,d){if(_i[d]==undefined){d=CSSStyleDeclaration.getPropertyName(d)}if(_i[d]!=undefined){if(c=="initial"){forEach(g,function(a,b){if(b.indexOf(d)==0){delete g[b]}});delete g[d]}else{/*@if(@_jscript_version<5.6)if(d=="cursor"&&c=="pointer")c="hand";/*@end @*/g[d]=c}}})}}};forEach.detect(j,n);h=k.toString()}h=h.replace(/%theme%/g,"/assets/html5-now/themes/"+jsb.theme);var q=/(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;this.base(h.replace(q,"$1"+_1P()+"$2"));return h});var External=Base.extend({constructor:function(a,b){a=a.split("#");this.src=a[0];this.path=a[1].split(".");this.register=b},attach:true,getObject:function(){var a=global,b=0;while(a&&b<this.path.length){a=a[this.path[b++]]}return a},load:function(){var a=this.getObject();if(!a&&!this.script){External.SCRIPT.src=this.src;if(!External.scripts[External.SCRIPT.src]){External.scripts[External.SCRIPT.src]=true;this.script=document.createElement("script");this.script.type="text/javascript";this.script.src=this.src;behavior.querySelector("head").appendChild(this.script)}a=this.getObject()}if(a){this.register(a);if(!a.attach)this.attach=false}return a}},{SCRIPT:document.createElement("script"),scripts:{}});jsb.eventDelegator=new Base({types:{},addEventListener:function(a,b){var c=this.types;if(!c[a]){c[a]=[];EventTarget.addEventListener(document,a,this,_39.test(a))}c[a].push(b)},handleEvent:function(a){var b=a.target;if(b.nodeType!=1)return;var c=a.type,d=_1R.test(c),e=d&&_1.captureElement;if(e&&_36.test(c))return;var f=this.types[c];if(!f||!f.length)return;if(d&&c!="mousewheel"){if(a.offsetX!=null){a=Event.cloneEvent(a)}var g=ElementView.getOffsetXY(b,a.clientX,a.clientY);a.offsetX=g.x;a.offsetY=g.y}var h=e||!a.bubbles,j=e?_1.captureElement:b;if(!h){extend(a,"stopPropagation",function(){this.base();h=true})}do{var k=j.uniqueID;if(_y[k]){for(var l=0,n;n=f[l];l++){if(n[k]){jsb.eventDispatcher.dispatch(n.behavior,j,a)}}}j=j.parentNode}while(j&&!h)}});jsb.eventDispatcher=new Base({dispatch:function(a,b,c,d){var e=c.type;_4.listener=a["on"+e];if(!_4.listener||_4.listener==Undefined)return;_4.behavior=a;_4.args=[b,c];if(_1R.test(e)){if(e=="mousewheel"){_4.args.push(c.wheelDelta)}else{if(_35.test(e)){if(a.jsbExtendedMouse){_4.args.push(c.button)}else{if(!_3b.test(c.button||0))return}}if(b==c.target){var f=c.offsetX,g=c.offsetY}else{var h=ElementView.getOffsetXY(b,c.clientX,c.clientY);f=h.x;g=h.y}_4.args.push(f,g,c.screenX,c.screenY)}}else if(_38.test(e)){_4.args.push(c.keyCode,c.shiftKey,c.ctrlKey,c.altKey,c.metaKey)}else if(e=="propertychange"||e=="propertyset"||e=="transitionend"){_4.args.push(c.propertyName)}if(a.jsbUseDispatch&&(d||c.bubbles||c.eventPhase==Event.CAPTURING_PHASE)){if(_9){_9.jsbEvents++}else{var j=document.createEvent(_1f);j.initEvent("jsbEvents",false,false);document.dispatchEvent(j)}}else{_4.listener.apply(a,_4.args)}}});var _4=_0.jsbEvent={};if(detect.MSIE&&!detect("element.dispatchEvent")){var _9=document.createElement(/^CSS/.test(document.compatMode)?"meta":"marquee");_9.jsbEvents=0;_9.attachEvent("onpropertychange",new Function("e",'if(e.propertyName=="jsbEvents"){var d=base2.toString.jsbEvent;d.listener.apply(d.behavior,d.args)}'));document.getElementsByTagName("head")[0].appendChild(_9)}else{document.addEventListener("jsbEvents",function(){_4.listener.apply(_4.behavior,_4.args)},false)}var _n=DocumentEvent.createEvent(document,_1f);_n.initEvent("dummy",false,false);_n=Event.cloneEvent(_n);function _z(a,b,c){_n.target=b;_n.type=c;jsb.eventDispatcher.dispatch(a,b,_n,true)};var _1=new Base({timestamp:Date2.now(),contentReadyQueue:[],documentReadyQueue:[],liveRules:[],rules:[],transitions:new Transitions,onDOMContentLoaded:function(){_1.loaded=true;if(!_1.ready&&!_1.rules.length){setTimeout(_1.fireReady,_1.getInterval())}_1.isContentReady=True},onblur:function(){_1._3d=_1._m;_1._m=null},onfocus:function(a){_1._m=a.target},onmousedown:function(a){_1.active=_1.busy=true},onmouseup:function(){_1.active=_1.busy=false},addRule:function(a,b){var c={query:a.toDOMQuery(),behavior:b,specificity:a.getSpecificity()};_1.liveRules.push(c);if(!_1.loaded){_1.rules.push(c);_1.rules.unsorted=true}if(!_1.started){_1.started=true;_1.tick()}},getInterval:function(){return _1.busy?jsb.INTERVAL*10:jsb.INTERVAL},fireReady:function(){if(!_1.ready){_1.ready=true;Array2.batch(_1.documentReadyQueue,function(a){_z(a.behavior,a.element,"documentready")},jsb.TIMEOUT,_1.parseComplete);_1.documentReadyQueue=[]}},isContentReady:function(a){if(_3a.test(a.nodeName))return _1.loaded;while(a&&!a.nextSibling){a=a.parentNode}return!!a},parseComplete:function(){_1.rules=Array2.filter(_1.liveRules,function(a){return!!a.behavior.attach});_1.rules.sort(_1T);_1.tick()},tick:function(a,b,c){var d=Date2.now(),e=_1.rules,f=e.length;if(!_1.busy&&_1.timestamp-d<=jsb.INTERVAL){_1.timestamp=d;var g=_1.contentReadyQueue;var h=Date2.now(),j=h,k=0;while(g.length&&(h-j<jsb.TIMEOUT)){var l=g.shift();if(_1.isContentReady(l.element)){_z(l.behavior,l.element,"contentready")}else{g.push(l)}if(k++<5||k%50==0)h=Date2.now()}while(f&&e.length&&(h-j<jsb.TIMEOUT)){if(a==null)a=b=0;var n=e[a],q=n.behavior;if(q.attach){var o=false;if(!c){var m=n.query;var p=m.state||[];p.unshift(document,q.constructor==External?2:jsb.QUERY_SIZE);c=m.apply(null,p);o=!!m.complete}h=Date2.now();var u=c.length,k=0;if(u&&q.constructor==External){n.behavior=q.load()||q;delete m.state;c=null;a++}else{while(b<u&&(h-j<jsb.TIMEOUT)){q.attach(c[b++],n);if(k++<5||k%50==0)h=Date2.now()}if(b==u){b=0;c=null;if(_1.loaded&&o){e.splice(a,1);delete m.state}else a++}}}else{e.splice(a,1)}if(a>=e.length){a=0;if(e.unsorted){e.sort(_1T);e.unsorted=false}}f--}}if(e.length){var w=function(){_1.tick(a,b,c)}}else{if(_1.ready){w=_1.parseComplete}else{w=_1.fireReady}}setTimeout(w,_1.getInterval())}});for(var i in _1)if(_1Q.test(i)){EventTarget.addEventListener(document,i.slice(2),_1[i],i!="onDOMContentLoaded")}EventTarget.addEventListener(window,"blur",function(a){var b=_1.captureElement;if(b&&document.body==_1._3d){behavior.releaseCapture();if(behavior.matchesSelector(b,":hover")){behavior.dispatchEvent(b,"mouseout")}}},false);behavior.addClass(document.documentElement,"jsb-enabled");eval(this.exports)};new function(_U){base2.global.html5=new base2.Package(this,{name:"html5",version:"0.5.1",imports:"Function2,Enumerable,dom,jsb",NOT_SUPPORTED:function(){throw"Not supported in html5-now.js.";},get:function(a,b){return this.getBehavior(a).get(a,b)},set:function(a,b,c){this.getBehavior(a).set(a,b,c)},getBehavior:function(a){return this[a.nodeName.toLowerCase()]||behavior}});eval(this.imports);var _3e=detect("QuirksMode")||(7!=document.documentMode&&detect("(style.boxSizing)"));var _M=jsb.host,_1V=_M+"images/",_1W=_1V+"arrow-up.png",_1X=_1V+"arrow-down.png";var _N="[%\u066a\ufe6a\uff05\u2030\u2031]",_3f=new RegExp("([\\d.]+"+_N+"?)|([\\d.]+).+([\\d.]+)","g");_N=new RegExp(_N);var _1h=0,_1i=1;var _o={"source,command,[hidden],[repeat=template]":{display:"none!"}};var _p={};var _O="clientWidth",_P="clientHeight";if(8==document.documentMode){jsb.clientWidth2={};Object.defineProperty(global.Element.prototype,"clientWidth2",{get:function(){return jsb.clientWidth2[this.uniqueID]||this.clientWidth}});jsb.clientHeight2={};Object.defineProperty(global.Element.prototype,"clientHeight2",{get:function(){return jsb.clientHeight2[this.uniqueID]||this.clientHeight}});_O="clientWidth2";_P="clientHeight2"}function _5(b,c){var d=document.createElement(b);if(c){if(typeof c=="string"){c={display:c}}else{c=extend({},c)}if(d[c.detect]===undefined){var e=c.style,f=c.behavior;if(c.display){if(!e)e={};e.display=c.display;if(e.display.indexOf("block")==0&&!e.margin){e.margin="1em 0"}}if(e){if(_o[b]){extend(_o[b],e)}else{_o[b]=e}}if(c.extraStyles){extend(_o,c.extraStyles)}if(f){if(typeof f=="string"){f=_M+f}else{if(!jsb.behavior.ancestorOf(f)){f=jsb.behavior.extend(f)}html5[b]=f}_p[b]=f}if(c.extraRules){extend(_p,c.extraRules)}}else{var g=html5[b]=jsb.behavior.extend();if(c.methods)forEach.csv(c.methods,function(name){g[name]=function(a){return a[name].apply(a,Array2.slice(arguments,1))}})}}};jsb.theme=new Base({detect:K("default"),"@Windows":{defaultTheme:"classic","@NT5\\.1":{defaultTheme:"luna/blue"},"@NT[6-9]":{defaultTheme:"aero"},detect:function(){var a=_1Y();return _3g[a.join("")]||_3h[a[0]]||_3i[a[1]]||this.defaultTheme},"@NT(6\\.1|[7-9])":{detect:K("aero/7")},"@Chrome|Arora":{detect:function(){var a=this.base();return!a||a=="classic"?this.defaultTheme:a}}},"@Linux":{detect:function(){return _3j[_1Y()[0]]}},"@Webkit([1-4]|5[01]|52[^89])|Camino|Mac":{detect:K("aqua"),"@(Chrome|Arora).+win":{detect:K("luna/blue")}}});var _3h={"#0054e3":"luna/blue","#8ba169":"luna/olive","#c0c0c0":"luna/silver","#335ea8":"royale","#5e81bc":"royale","#99b4d1":"aero","#c4cbde":"aero","#343434":"zune"},_3i={"#808080":"classic","#8d8961":"classic/brick","#a28d68":"classic/desert","#588078":"classic/eggplant","#5a4eb1":"classic/lilac","#489088":"classic/marine","#c6a646":"classic/maple","#786058":"classic/plum","#d7a52f":"classic/pumpkin","#4f657d":"classic/rainyday","#9f6070":"classic/rose","#558097":"classic/slate","#559764":"classic/spruce","#bcbc41":"classic/wheat"},_3g={"#0a246a#808080":"classic/standard","#0000ff#00ff00":"classic/contrast/high1","#00ffff#00ff00":"classic/contrast/high2","#800080#00ff00":"classic/contrast/black","#000000#00ff00":"classic/contrast/white"},_3j={"#c4c6c0":"clearlooks","#eae8e3":"clearlooks","#dfe4e8":"clearlooks","#eaeaea":"clearlooks","#edeceb":"clearlooks","#efebe7":"human"};var rgba=rgb;jsb.theme.toString=K(jsb.theme.detect()||"default");base2.userAgent+=";theme="+jsb.theme;function rgb(b,c,d){function e(a){return(a<16?"0":"")+a.toString(16)};return"#"+e(b)+e(c)+e(d)};function _1Y(){var b=document.createElement("input"),c=b.style,d=document.body||behavior.querySelector("head");var e=function(a){c.color=a;if(a.toLowerCase()==c.color.toLowerCase()){a=ViewCSS.getComputedPropertyValue(document.defaultView,b,"color")}else{a=c.color}if(/rgb/.test(a))a=eval(a);return a};d.appendChild(b);var f=[e("ActiveCaption"),e("GrayText")];d.removeChild(b);return f};var _Q="window",_1Z="highlight",_20="highlighttext";if(detect("(Webkit([1-4]|5[01]|52[^89])|theme=aqua).+win")){_Q="#ffffff";_1Z="#427cd9";_20="#ffffff"}var _21={"aero":"#abadb3 #dbdfe6 #e3e9ef #e2e3ea","luna/blue":"#7f9db9","luna/olive":"#a4b97f","luna/silver":"#a5acb2","royale":"#a7a6aa","zune":"#969696"}[jsb.theme]||"threedface";jsb.theme.cssText=jsb.createStyleSheet({"*":{backgroundPosition:"9999px 9999px",backgroundAttachment:"scroll!",backgroundRepeat:"no-repeat!","@!theme=classic":{padding:"2px",border:"1px solid",borderColor:_21},"@theme=aqua":{padding:"1px 2px 2px 2px",borderWidth:"2px 1px 1px 1px",borderColor:"#9e9e9e #b4b4b4 #dadada #b4b4b4"}},".jsb-dropdown,.jsb-combobox,.jsb-colorpicker,.jsb-datepicker,.jsb-weekpicker":{"@theme=aqua":{width:"10em",borderRadius:"5px",boxShadow:"0 1px 4px rgba(160, 160, 160, 0.5)","@(style.borderImage)":{borderImage:"url(%theme%/dropdown.png) 1 18 1 4!",borderStyle:"none!",borderWidth:"1px 18px 1px 4px!",padding:"1px"},"@!(style.borderImage)":{backgroundImage:"url(%theme%/bg-dropdown.png)!",backgroundPosition:"right center!",padding:"1px 22px 1px 4px!",border:"1px solid #545454!"}},"@!theme=aqua":{paddingRight:"19px!",backgroundImage:"url(%theme%/dropdown.png)!"}},".jsb-colorpicker,.jsb-datepicker,.jsb-weekpicker":{width:"8em"},".jsb-progressbar,.jsb-slider,.jsb-colorpicker":{cursor:"default",textIndent:"-10em!",userModify:"read-only!",MozUserSelect:"none!","@MSIE":{textIndent:0,"@MSIE(5.5|6|7)":{lineHeight:999},"@MSIE[^567]":{lineHeight:999,verticalAlign:"middle"}}},".jsb-progressbar,.jsb-slider":{verticalAlign:"middle"},".jsb-progressbar":{minHeight:"8px",borderColor:"threeddarkshadow",borderWidth:"1px",borderRadius:"5px",backgroundImage:"url(%theme%/progressbar.png)!","@Opera8":{backgroundImage:"url(themes/s/progressbar.png)!"}},".jsb-slider":{height:"21px",minHeight:"21px",padding:0,border:"none",backgroundColor:"transparent",backgroundImage:"url(%theme%/slider.png)!","@Opera8":{backgroundImage:"url(themes/s/slider.png)!"},"@Gecko1\\.[0-3]":{backgroundColor:"#f2f2f2"}},".jsb-popup":{visibility:"hidden",backgroundColor:_Q,borderWidth:"1px!",position:"absolute!",zIndex:"999999!",cursor:"default",padding:"0!",margin:"0!","@Gecko|Opera|theme=aqua|Webkit":{borderColor:"threedshadow!",borderStyle:"outset!","@Opera":{borderStyle:"solid!"}},"@theme=classic":{borderColor:"threedshadow!",borderStyle:"solid!"}},".jsb-spinner":{"@!Opera[78]":{textAlign:"right"},width:"5em",paddingRight:"19px!",backgroundImage:"url(%theme%/spinner.png)!"},".jsb-timepicker,.jsb-monthpicker":{width:"8ex",paddingRight:"19px!",backgroundImage:"url(%theme%/spinner.png)!","@QuirksMode|Gecko1\\.[0-3]|Opera8":{width:"6em"}},".jsb-popup .jsb-datepicker-days":{userSelect:"none!",width:"100%!",margin:"2px 0 0 0!",padding:"2px!",backgroundColor:_Q+"!",color:"windowtext!"}});jsb.theme.cssText+="\n"+jsb.createStyleSheet({".jsb-popup *":{margin:"0!",padding:"0!"},".jsb-popup option":{padding:"0 3px!"},".jsb-colorpicker":{width:"4em","@QuirksMode|Gecko1\\.[0-3]|Opera8":{width:"6em"}},".jsb-datepicker":{width:"12ex","@QuirksMode|Gecko1\\.[0-3]|Opera8":{width:"15ex"}},".jsb-weekpicker":{width:"11ex","@QuirksMode|Gecko1\\.[0-3]|Opera8":{width:"14ex"}},"@Webkit":{".jsb-slider:focus:not(.slider_focus)":{outline:"none!"}},"@!Webkit":{".progressbar_focus,.slider_focus,.colorpicker_focus":{outline:"1px dotted"}},".jsb-datalist":{display:"none!"},".jsb-menulist":{"@!MSIE":{overflow:"auto!"},"@MSIE":{overflowY:"auto!"}},".jsb-menulist div":{margin:"0!",padding:"1px 2px!",overflow:"hidden!",whiteSpace:"nowrap!"},".jsb-colorpicker-popup":{backgroundColor:"buttonface!",color:"buttontext!",fontSize:"11px!",padding:"4px!",overflow:"hidden!",whiteSpace:"nowrap!",userSelect:"none!","@Webkit([1-4]|5[01]|52[^89])|Chrome":{backgroundColor:"#ece9d8!"}},".jsb-colorpicker-popup input":{fontSize:"11px",margin:"4px 2px!",verticalAlign:"middle",width:"127px"},".jsb-datepicker-popup":{backgroundColor:"#fcfcfd!",overflow:"hidden!","@theme=classic":{backgroundColor:"threedface!"}},".jsb-datepicker-popup input":{width:"5ex!",marginLeft:"2px!",padding:"2px 19px 2px 2px!","@QuirksMode|Gecko1\\.[0-3]|Opera8":{width:"9ex!"},"@!MSIE[567]|Opera":{padding:"1px 19px 1px 2px!"}},".jsb-datepicker-popup th":{backgroundColor:"infobackground!",color:"infotext!",fontWeight:"normal!"},".jsb-datepicker-popup th,.jsb-datepicker-days td":{padding:"2px 0!",textAlign:"center!",width:"14%!"},".jsb-datepicker-days td.disabled,.jsb-datepicker-days tr.disabled td":{color:"graytext!"},".jsb-datepicker-days td.selected,.jsb-datepicker-days tr.selected td":{backgroundColor:"inactivecaptiontext!",color:"inactivecaption!",opacity:0.5},".jsb-datepicker-days_focus td.selected,.jsb-datepicker-days_focus tr.selected td":{backgroundColor:_1Z+"!",color:_20+"!",opacity:1},"@theme=luna\\/blue":{".jsb-datepicker-popup th":{backgroundColor:"#ffffe1!"}},"@theme=(human|clearlooks)":{".jsb-combobox,.jsb-datepicker,.jsb-weekpicker,.jsb-colorpicker":{"borderTopRightRadius":"5px","borderBottomRightRadius":"5px"}},"@theme=aqua":{".jsb-menulist":{opacity:0.95},".jsb-spinner,.jsb-timepicker,.jsb-monthpicker":{borderTopWidth:"1px",paddingTop:"2px",borderRightColor:"transparent",borderTopRightRadius:"5px",borderBottomRightRadius:"5px"},".jsb-spinner[disabled],.jsb-spinner[readonly],.jsb-timepicker[disabled],.jsb-timepicker[readonly],.jsb-monthpicker[disabled],.jsb-monthpicker[readonly]":{borderColor:"#d6d6d6 #e0e0e0 #f0f0f0 #e0e0e0"},".jsb-combobox[readonly],.jsb-combobox[disabled],.jsb-datepicker[readonly],.jsb-datepicker[disabled],.jsb-weekpicker[readonly],.jsb-weekpicker[disabled]":{"@(style.borderImage)":{borderImage:"url(%theme%/dropdown-disabled.png) 1 18 1 4!"},"@!(style.borderImage)":{backgroundImage:"url(%theme%/bg-dropdown-disabled.png)!"}},"@(style.borderImage)":{".jsb-colorpicker":{borderImage:"url(%theme%/colorpicker.png) 1 18 1 4!"},".jsb-colorpicker[readonly],.jsb-colorpicker[disabled]":{borderImage:"url(%theme%/colorpicker-disabled.png) 1 18 1 4!"}},"@!(style.borderImage)":{".jsb-colorpicker":{backgroundImage:"url(%theme%/bg-colorpicker.png)!"},".jsb-colorpicker[readonly],.jsb-colorpicker[disabled]":{backgroundImage:"url(%theme%/bg-colorpicker-disabled.png)!"}},".jsb-combobox[disabled],.jsb-datepicker[disabled],.jsb-weekpicker[disabled],.jsb-colorpicker[disabled],.jsb-progressbar[disabled]":{color:"windowtext",opacity:0.5},".jsb-colorpicker-popup,.jsb-datepicker-popup":{backgroundColor:_Q+"!",backgroundImage:"url(%theme%/metal.png)!",backgroundRepeat:"repeat!"},".jsb-datepicker":{width:"7em"},".jsb-weekpicker":{width:"6em"},".jsb-monthpicker":{width:"5em"},".jsb-datepicker-popup th":{backgroundColor:"#89acd5!",color:"white!"}},".jsb-tooltip":{borderColor:"graytext!",backgroundColor:"infobackground!",color:"infotext!",fontSize:"small!",boxShadow:"2px 4px 4px rgba(160, 160, 160, 0.5)","@MSIE.+QuirksMode":{fontSize:"x-small!"}},".jsb-tooltip div":{padding:"2px 3px 0 3px!"},"@(hasFeature('WebForms','2.0'))":{"input[list],input[type=number],input[type=date],input[type=time],input[type=month],input[type=week],input[type=range]":{backgroundImage:"none!"}},".jsb-error":{borderColor:"#ff5e5e",outlineColor:"#ff5e5e"},"@Safari.+win":{"@!theme=aqua":{"input,select":{outlineColor:_21}}}});var _3k="canvas.js";_5("canvas",{detect:"getContext",display:"block",behavior:detect("MSIE")?_3k+"#html5.canvas":null,methods:"getContext"});_5("details",{detect:"open",display:"block",extraStyles:{"details dt":{paddingLeft:"14px",backgroundPosition:"1px center!",backgroundAttachment:"scroll!",backgroundRepeat:"no-repeat!"},"details > dt":{backgroundImage:"url(images/arrow-down.png)"},"details[open] > dt":{backgroundImage:"url(images/arrow-up.png)"},"@!MSIE[5-7]":{"details > dd":{overflow:"hidden",height:0},"details[open] > dd":{height:"auto"}}},behavior:{open:false,oncontentready:function(a){var b=this.querySelector(a,">dt");if(!b){b=document.createElement("dt");b.innerHTML="Details";a.insertBefore(b,a.firstChild)}this.layout(a)},onclick:function(a,b,c){var d=this.querySelector(a,">dt");if(d&&Traversal.includes(d,b.target)&&c<=14){this.toggle(a,"open")}},onpropertyset:function(a,b,c){if(c=="open")this.layout(a)},layout:function(a,b){var c=this.get(a,"open"),d=this.querySelector(a,">dt"),e=this.querySelector(a,">dd");if(d){this.setStyle(d,"backgroundImage","url("+(c?_1W:_1X)+")",true)}if(e){e.style.height=c?"auto":"0"}}}});var ratio=behavior.extend({max:0,value:0,onmouseover:function(a){if(!a.title){this._22=a;a.title=this.get(a,"textContent")}},onmouseout:function(a){if(a==this._22){delete this._22;a.title=""}},onpropertyset:function(a,b,c){if(typeof this[c]=="number"||c=="innerHTML"||c=="textContent"){this.layout(a)}},getRatio:function(a){var b=this.getAttribute(a,"max"),c=this.getAttribute(a,"value");if(c==null){var d=this.parseTextContent(a);if(b==null){if(typeof d=="number"){c=d;b=1}else if(typeof d=="object"){c=d[_1h];b=d[_1i]}else{c=0}}else if(typeof d=="number"){c=d}else{c=0}}if(isNaN(b)||b==null||b==""){b=1}return[c-0||0,b-0]},parseTextContent:function(a){var b=match(this.get(a,"textContent"),_3f);if(b[1]){var c=Math.max(b[0],b[1]),d=Math.min(b[0],b[1])}else if(_N.test(b=b[0])){c=b.indexOf("\u2031")>0?10000:b.indexOf("\u2030")>0?1000:100,d=Number(b.slice(0,-1))}else{return isNaN(b)?"":Number(b)}if(!isNaN(c)&&!isNaN(d)){return[d,c]}return""}});_5("meter",{detect:"max",display:"inline-block","@Gecko":{display:"-moz-inline-box;display:inline-block"},style:{verticalAlign:"-0.2em",backgroundColor:"inactivecaption",width:"5em",height:"1em",boxSizing:"border-box",textIndent:"-100%"},behavior:ratio.extend({min:0,onattach:function(a){this.layout(a)},layout:function(a){var b=this.get(a,"min")||0,c=this.getRatio(a),d=c[_1i],e=c[_1h];e=e<b?b:e>d?d:(e-0)||0;var f=a[_O],g=a[_P],h=g>f,j=h?g:f,k=(e-b)/(d-b),l=~~(k*j)+"px solid",style=a.style;style.borderLeft=h?"":l;style.borderBottom=h?l:"";if(!_3e){var fixed=~~(j-(k*j))+"px";style.width=h?"":fixed;style.height=h?fixed:""}}})});_5("progress",{detect:"max",display:"inline-block","@Gecko":{display:"-moz-inline-box;display:inline-block"},style:{backgroundImage:"url(%theme%/progressbar.png)!",backgroundPosition:"9999px 9999px",backgroundAttachment:"scroll!",backgroundRepeat:"no-repeat!",verticalAlign:"-0.2em",width:"10em",height:"1em",boxSizing:"border-box",textIndent:"-100%",border:"1px solid threeddarkshadow",borderRadius:"5px","@Opera8":{backgroundImage:"url(themes/s/progressbar.png)!"}},behavior:ratio.extend({_A:1,_23:3000,"@theme=luna":{_A:10},"@Opera8":{_23:2000},onattach:function(a){if(a[_P]>a[_O]){this.setOrientation(a,"vertical")}this.layout(a)},layout:function(a){var b=this.getRatio(a),c=b[_1h]/b[_1i],d=a[_O],e=a[_P];if(e>d){var f=(-d/2)*(d+3)-2,g=~~(e*c);g=e-Math.round(g/this._A)*this._A}else{f=~~(d*c)-this._23;f=Math.round(f/this._A)*this._A;g=(-e/2)*(e+3)-2}a.style.backgroundPosition=~~f+"px "+~~g+"px"},setOrientation:function(a,b){if(b=="vertical"){var c=this.getComputedStyle(a,"backgroundImage");this.setStyle(a,"backgroundImage",c.replace(/\.png/i,"-vertical.png"),true)}else if(a.style.backgroundImage){a.style.backgroundImage=""}}})});_5("time",{detect:"dateTime",display:"inline",behavior:{dateTime:"",pubDate:false,onattach:function(a){this.layout(a)},get:function(a,b){if(b=="valueAsDate"){var c=this.hasAttribute(a,"datetime")?this.parseDateFromAttribute(a):this.parseDateFromText(a);return isNaN(c)?null:new Date(c)}return this.base(a,b)},parseDateFromAttribute:function(a){var b=this.get(a,"dateTime");if(b){if(b.indexOf("T")==-1)b+="T";return Date2.parse(b)}return NaN},parseDateFromText:function(a){var b=trim(this.get(a,"textContent")),c=Date2.parse(b);if(!isNaN(c))return c;c=Date2.parse(b+"T");if(!isNaN(c))return c;c=Date2.parse("T"+b);return c},layout:function(a){if(!this.get(a,"textContent")){var b=this.parseDateFromAttribute(a);if(!isNaN(b)){b=new Date(b);var c=this.get(a,"dateTime").indexOf("T")!=-1;if(Date.prototype.toLocaleString){var d=c?b.toLocaleString():b.toLocaleDateString()}else{d=c?b:b.toDateString()}this.set(a,"textContent",d)}}}}});var _24="media.js";var _25="canPlayType,load,play,pause";_5("audio",{detect:"play",display:"none",extraStyles:{"audio[controls]":{display:"inline"}},methods:_25,behavior:_24+"#html5.audio"});_5("video",{detect:"play",display:"block",style:{width:"300px",height:"150px"},methods:_25,behavior:_24+"#html5.video"});var _R="checkValidity,setCustomValidity";var _a=_M+"forms.js",_S=_M+"rm.js";var _1j=document.createElement("input");try{_1j.type="color"}catch(x){}if(_1j.type!="color"){_p["input[type=color]"]=_a+"#chrome.colorpicker"}var _T=jsb.theme.cssText;forEach({form:"checkValidity,dispatchFormChange,dispatchFormInput",input:_R+",stepUp,stepDown",output:_R,select:_R,textarea:_R},function(a,b){_5(b,{detect:"checkValidity",methods:a})});_5("datalist",{detect:"options",display:"none"});if(!detect("(hasFeature('WebForms','2.0'))")){extend(_p,{"form":_a+"#html5.form","button,input,textarea,select":_a+"#chrome","input[type=number]":_a+"#chrome.spinner","input[type=range]":_a+"#chrome.slider","input[type=date]":_a+"#chrome.datepicker","input[type=month]":_a+"#chrome.monthpicker","input[type=week]":_a+"#chrome.weekpicker","input[type=time]":_a+"#chrome.timepicker","input[list]":_a+"#chrome.combobox","button[type=add],button.html5-add":_S+"#jsb.rm.add","button[type=remove],button.html5-remove":_S+"#jsb.rm.remove","button[type=move-up],button.html5-move-up":_S+"#jsb.rm.moveup","button[type=move-down],button.html5-move-down":_S+"#jsb.rm.movedown"});if(_1j.autofocus===undefined){_p["button[autofocus],input[autofocus],textarea[autofocus],select[autofocus]"]={onattach:function(a){try{a.focus();if(a.select)a.select()}catch(x){}}}}_o[".html5-template"]={display:"none!"};_T=new RegGrp({"\\*?\\.jsb\\-combobox":"input[list]","\\*?\\.jsb\\-spinner":"input[type=number]","\\*?\\.jsb\\-(\\w+)picker([^-])":"input[type=$1]$2","\\*?\\.jsb\\-slider":"input[type=range]","\\*?\\.jsb\\-error":"input.jsb-error"}).exec(_T)}if(jsb.clientWidth2){_T+="\ninput[type=number],input[type=range],input[type=date],input[type=month],input[type=week],input[type=time],input[type=color],input[list],progress,meter{behavior:url(dimensions.htc)}"}jsb.createStyleSheet(_T);_5("abbr");forEach.csv("article,section",partial(_5,undefined,{detect:"cite",display:"block"}));forEach.csv("aside,dialog,footer,header,hgroup,nav",partial(_5,undefined,"block"));_5("figure",{display:"block",style:{margin:"1em 40px"}});_5("mark",{style:{background:"yellow"}});jsb.createStyleSheet(_o);forEach([_1W,_1X],function(a){(new Image).src=a});html5.rules=new jsb.RuleList(_p);eval(this.exports)};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/*
|
2
|
+
base2 - copyright 2007-2009, Dean Edwards
|
3
|
+
http://code.google.com/p/base2/
|
4
|
+
http://www.opensource.org/licenses/mit-license.php
|
5
|
+
|
6
|
+
Contributors:
|
7
|
+
Doeke Zanstra
|
8
|
+
*/
|
9
|
+
new function(_f){/*@cc_on @*/new base2.Package(this);eval(this.imports);var _g=detect("(java)");var _h=/^(audio|video)\/[\w-]+$/;var _4={"audio/mp3":1,"video/mp4":1,"video/quicktime":1,"video/x-flv":1};var _5={"audio/ogg":1,"video/ogg":1};var _6=/(aac|mov|mp3|mp4)$/i,_7=/(aac|flv|mov|mp3|mp4)$/i,_8=/og[gv]$/i;var _2=/[\?#].*$/,_3=document.createElement("img");var _9='<!--[if gt IE 6]>\n<object width="{WIDTH}" height="{HEIGHT+15}" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"><!\n[endif]--><!--[if !IE]><!-->\n<object width="{WIDTH}" height="{HEIGHT+15}" type="video/quicktime" data="{SRC}"><!--<![endif]-->\n<param name="src" value="{POSTER}" /><param name="href" value="{SRC}" /><param name="target" value="myself" /><param name="controller" value="{CONTROLS}" /><param name="enablejavascript" value="true" /><param name="autoplay" value="false" /><param name="autohref" value="{AUTOPLAY}" /><param name="kioskmode" value="false" /><param name="volume" value="{VOLUME}" /><param name="showlogo" value="false" />{FLASH_PLAYER}<!--[if gt IE 6]><!-->\n</object><!--<![endif]-->';var _a=format('<applet code="com.fluendo.player.Cortado.class" archive="%1cortado.jar" width="{WIDTH}" height="{HEIGHT}"><param name="url" value="{SRC}"><param name="autoPlay" value="{AUTOPLAY}" /><param name="audio" value="{!MUTED}" /><param name="BufferSize" value="4096" /><param name="BufferHigh" value="25" /><param name="BufferLow" value="5" /></applet>',jsb.host);var _b='<a href="{SRC}"><img src="{POSTER}" width="{WIDTH}" height="{HEIGHT}" alt="download" /></a>';var media=jsb.behavior.extend({NETWORK_EMPTY:0,NETWORK_IDLE:1,NETWORK_LOADING:2,NETWORK_LOADED:3,NETWORK_NO_SOURCE:4,HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4,src:"",autobuffer:false,currentTime:0,defaultPlaybackRate:0,playbackRate:0,autoplay:false,loop:false,controls:false,volume:1,muted:false,get:function(b,c){switch(c){case"error":return null;case"currentSrc":return"";case"networkState":return this.NETWORK_EMPTY;case"buffered":return null;case"readyState":return this.HAVE_NOTHING;case"seeking":return false;case"startTime":return 0;case"duration":return 0;case"paused":return false;case"played":return null;case"seekable":return null;case"ended":return false}return this.base(b,c)},canPlayType:function(b){if(_4[b])return"probably";if(_5[b])return"maybe";var c=navigator.mimeTypes;if(c){var a=c[b];if(a&&a.enabledPlugin)return"maybe"}return""},load:Undefined,pause:Undefined,play:Undefined});html5.audio=media.extend({});html5.video=media.extend({width:300,height:150,poster:"",oncontentready:function(a){if(document.getElementById("html5-flash-installer"))return;var d=a.style,e=this.get(a,"currentSrc"),j=e.replace(_2,""),k=this.get(a,"poster"),f=this.get(a,"autoplay"),l=this.get(a,"muted"),g=this.get(a,"width"),h=this.get(a,"height"),m=_7.test(j)?_9:_8.test(j)?_a:_b;if(f)d.visibility="hidden";a.innerHTML+=m.replace(/{FLASH_PLAYER}/,_0>5&&_0<9?_c:_d.replace(/{VARS}/g,_e.replace("{SRC}",_1.exec(e)).replace("{POSTER}",_1.exec(k)))).replace(/{SRC}/g,e).replace(/{POSTER}/g,k).replace(/{AUTOPLAY}/g,f).replace(/{CONTROLS}/g,this.get(a,"controls")).replace(/{LOOP}/g,this.get(a,"loop")).replace(/{!MUTED}/,!l).replace(/{MUTED}/g,l).replace(/{VOLUME}/g,this.get(a,"volume")*100).replace(/{WIDTH}/g,g).replace(/{HEIGHT(\+\d+)?}/g,function(b,c){return h+(parseInt(c)||0)});if(g)d.width=g+"px";if(h)d.height=h+"px";if(f)setTimeout(function(){d.visibility=""},15)},get:function(b,c){switch(c){case"currentSrc":var a=this.get(b,"src");if(!_6.test(a.replace(_2,""))){var d=this.querySelector(b,"source[type$=mp4]")||this.querySelector(b,"source[type$=ogg]");if(d)a=this.getAttribute(d,"src")}if(!a)return"";_3.src=a;return _3.src;case"videoWidth":return 0;case"videoHeight":return 0}return this.base(b,c)}});var _1=new RegGrp({"\\?":"%3F","=":"%3D","&":"%26"});var _e=jsb.host+"player.swf?autostart={AUTOPLAY}&repeat={LOOP}&volume={VOLUME}&mute={MUTED}&image={POSTER}&file={SRC}";var _d='<object width="{WIDTH}" height="{HEIGHT+20}" type="application/x-shockwave-flash" data="{VARS}"><param name="movie" value="{VARS}"></object>';var _c=format('<object id="html5-flash-installer" type="application/x-shockwave-flash" data="%1" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="%1"></object>',format("%1expressInstall.swf?MMredirectURL=%2&MMplayerType=%3&MMdoctitle=%4",jsb.host,_1.exec(location.href),detect.MSIE?"ActiveX":"PlugIn",_1.exec(document.title)));var _0=0;/*@if(@_jscript)try{_0=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").match(/\d+/)[0]-0}catch(x){for(var i=9;i>5;i--){try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);_0=i;break}catch(x){}}}@else @*/try{_0=navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin.description.match(/\d+/)[0]-0}catch(x){}/*@end @*/};
|