/*
Copyright 2012, KISSY UI Library v1.40dev
MIT Licensed
build time: Dec 11 15:22
*/
var KISSY=function(a){var b=this,h,i=0;h={__BUILD_TIME:"20121211152219",Env:{host:b,nodejs:"function"==typeof require&&"object"==typeof exports},Config:{debug:"",fns:{}},version:"1.40dev",config:function(b,e){var g,c,l=this,k,j=h.Config,f=j.fns;h.isObject(b)?h.each(b,function(m,a){(k=f[a])?k.call(l,m):j[a]=m}):(g=f[b],e===a?c=g?g.call(l):j[b]:g?c=g.call(l,e):j[b]=e);return c},log:function(d,e,g){if(h.Config.debug&&(g&&(d=g+": "+d),b.console!==a&&console.log))console[e&&console[e]?e:"log"](d)},
error:function(a){if(h.Config.debug)throw a instanceof Error?a:Error(a);},guid:function(a){return(a||"")+i++}};h.Env.nodejs&&(h.KISSY=h,module.exports=h);return h}();
(function(a,b){function h(){}function i(f,a){var b;k?b=k(f):(h.prototype=f,b=new h);b.constructor=a;return b}function d(f,k,c,j,d,h){if(!k||!f)return f;c===b&&(c=l);var i=0,s,u,v;k[g]=f;h.push(k);if(j){v=j.length;for(i=0;i<v;i++)s=j[i],s in k&&e(s,f,k,c,j,d,h)}else{u=a.keys(k);v=u.length;for(i=0;i<v;i++)s=u[i],s!=g&&e(s,f,k,c,j,d,h)}return f}function e(f,k,c,j,e,h,i){if(j||!(f in k)||h){var s=k[f],c=c[f];if(s===c)s===b&&(k[f]=s);else if(h&&c&&(a.isArray(c)||a.isPlainObject(c)))c[g]?k[f]=c[g]:(h=s&&
(a.isArray(s)||a.isPlainObject(s))?s:a.isArray(c)?[]:{},k[f]=h,d(h,c,j,e,l,i));else if(c!==b&&(j||!(f in k)))k[f]=c}}var g="__MIX_CIRCULAR",c=this,l=!0,k=Object.create,j=!{toString:1}.propertyIsEnumerable("toString"),f="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toString,toLocaleString,valueOf".split(",");(function(f,a){for(var b in a)f[b]=a[b]})(a,{stamp:function(f,k,c){if(!f)return f;var c=c||"__~ks_stamped",j=f[c];if(!j&&!k)try{j=f[c]=a.guid(c)}catch(d){j=b}return j},keys:function(a){var b=
[],c,k;for(c in a)b.push(c);if(j)for(k=f.length-1;0<=k;k--)c=f[k],a.hasOwnProperty(c)&&b.push(c);return b},mix:function(f,a,b,c,k){"object"===typeof b&&(c=b.whitelist,k=b.deep,b=b.overwrite);var j=[],e=0;for(d(f,a,b,c,k,j);a=j[e++];)delete a[g];return f},merge:function(f){var f=a.makeArray(arguments),b={},c,k=f.length;for(c=0;c<k;c++)a.mix(b,f[c]);return b},augment:function(f,c){var k=a.makeArray(arguments),j=k.length-2,d=1,e=k[j],l=k[j+1];a.isArray(l)||(e=l,l=b,j++);a.isBoolean(e)||(e=b,j++);for(;d<
j;d++)a.mix(f.prototype,k[d].prototype||k[d],e,l);return f},extend:function(f,b,c,k){if(!b||!f)return f;var j=b.prototype,d;d=i(j,f);f.prototype=a.mix(d,f.prototype);f.superclass=i(j,b);c&&a.mix(d,c);k&&a.mix(f,k);return f},namespace:function(){var f=a.makeArray(arguments),b=f.length,k=null,j,d,e,g=f[b-1]===l&&b--;for(j=0;j<b;j++){e=(""+f[j]).split(".");k=g?c:this;for(d=c[e[0]]===k?1:0;d<e.length;++d)k=k[e[d]]=k[e[d]]||{}}return k}})})(KISSY);
(function(a,b){var h=Array.prototype,i=h.indexOf,d=h.lastIndexOf,e=h.filter,g=h.every,c=h.some,l=h.map;a.mix(a,{each:function(k,c,f){if(k){var m,d,e=0;m=k&&k.length;d=m===b||"function"===a.type(k);f=f||null;if(d)for(d=a.keys(k);e<d.length&&!(m=d[e],!1===c.call(f,k[m],m,k));e++);else for(d=k[0];e<m&&!1!==c.call(f,d,e,k);d=k[++e]);}return k},indexOf:i?function(a,b){return i.call(b,a)}:function(a,b){for(var f=0,c=b.length;f<c;++f)if(b[f]===a)return f;return-1},lastIndexOf:d?function(a,b){return d.call(b,
a)}:function(a,b){for(var f=b.length-1;0<=f&&b[f]!==a;f--);return f},unique:function(b,c){var f=b.slice();c&&f.reverse();for(var m=0,d,e;m<f.length;){for(e=f[m];(d=a.lastIndexOf(e,f))!==m;)f.splice(d,1);m+=1}c&&f.reverse();return f},inArray:function(b,c){return-1<a.indexOf(b,c)},filter:e?function(a,b,f){return e.call(a,b,f||this)}:function(b,c,f){var m=[];a.each(b,function(a,b,k){c.call(f||this,a,b,k)&&m.push(a)});return m},map:l?function(a,b,f){return l.call(a,b,f||this)}:function(a,b,f){for(var c=
a.length,d=Array(c),e=0;e<c;e++){var l="string"==typeof a?a.charAt(e):a[e];if(l||e in a)d[e]=b.call(f||this,l,e,a)}return d},reduce:function(a,c,f){var m=a.length;if("function"!==typeof c)throw new TypeError("callback is not function!");if(0===m&&2==arguments.length)throw new TypeError("arguments invalid");var d=0,e;if(3<=arguments.length)e=arguments[2];else{do{if(d in a){e=a[d++];break}d+=1;if(d>=m)throw new TypeError;}while(1)}for(;d<m;)d in a&&(e=c.call(b,e,a[d],d,a)),d++;return e},every:g?function(a,
b,f){return g.call(a,b,f||this)}:function(a,b,f){for(var c=a&&a.length||0,d=0;d<c;d++)if(d in a&&!b.call(f,a[d],d,a))return!1;return!0},some:c?function(a,b,f){return c.call(a,b,f||this)}:function(a,b,f){for(var c=a&&a.length||0,d=0;d<c;d++)if(d in a&&b.call(f,a[d],d,a))return!0;return!1},makeArray:function(b){if(null==b)return[];if(a.isArray(b))return b;if("number"!==typeof b.length||b.alert||"string"==typeof b||a.isFunction(b))return[b];for(var c=[],f=0,d=b.length;f<d;f++)c[f]=b[f];return c}})})(KISSY);
(function(a,b){function h(a){var b=typeof a;return null==a||"object"!==b&&"function"!==b}function i(){if(l)return l;var f=e;a.each(g,function(a){f+=a+"|"});f=f.slice(0,-1);return l=RegExp(f,"g")}function d(){if(k)return k;var f=e;a.each(c,function(a){f+=a+"|"});f+="&#(\\d{1,5});";return k=RegExp(f,"g")}var e="",g={"&amp;":"&","&gt;":">","&lt;":"<","&#x60;":"`","&#x2F;":"/","&quot;":'"',"&#x27;":"'"},c={},l,k,j=/[\-#$\^*()+\[\]{}|\\,.?\s]/g;(function(){for(var a in g)c[g[a]]=a})();a.mix(a,{urlEncode:function(a){return encodeURIComponent(""+
a)},urlDecode:function(a){return decodeURIComponent(a.replace(/\+/g," "))},fromUnicode:function(a){return a.replace(/\\u([a-f\d]{4})/ig,function(a,f){return String.fromCharCode(parseInt(f,16))})},escapeHTML:function(a){return(a+"").replace(i(),function(a){return c[a]})},escapeRegExp:function(a){return a.replace(j,"\\$&")},unEscapeHTML:function(a){return a.replace(d(),function(a,f){return g[a]||String.fromCharCode(+f)})},param:function(f,c,d,k){if(!a.isPlainObject(f))return e;c=c||"&";d=d||"=";a.isUndefined(k)&&
(k=!0);var j=[],l,g,i,s,u,v=a.urlEncode;for(l in f)if(u=f[l],l=v(l),h(u))j.push(l),u!==b&&j.push(d,v(u+e)),j.push(c);else if(a.isArray(u)&&u.length){g=0;for(s=u.length;g<s;++g)i=u[g],h(i)&&(j.push(l,k?v("[]"):e),i!==b&&j.push(d,v(i+e)),j.push(c))}j.pop();return j.join(e)},unparam:function(f,c,d){if("string"!=typeof f||!(f=a.trim(f)))return{};for(var d=d||"=",k={},e,j=a.urlDecode,f=f.split(c||"&"),l=0,g=f.length;l<g;++l){e=f[l].indexOf(d);if(-1==e)c=j(f[l]),e=b;else{c=j(f[l].substring(0,e));e=f[l].substring(e+
1);try{e=j(e)}catch(h){}a.endsWith(c,"[]")&&(c=c.substring(0,c.length-2))}c in k?a.isArray(k[c])?k[c].push(e):k[c]=[k[c],e]:k[c]=e}return k}})})(KISSY);
(function(a){function b(a,b,d){var e=[].slice,g=e.call(arguments,3),c=function(){},l=function(){var k=e.call(arguments);return b.apply(this instanceof c?this:d,a?k.concat(g):g.concat(k))};c.prototype=b.prototype;l.prototype=new c;return l}a.mix(a,{noop:function(){},bind:b(0,b,null,0),rbind:b(0,b,null,1),later:function(b,i,d,e,g){var i=i||0,c=b,l=a.makeArray(g),k;"string"==typeof b&&(c=e[b]);b=function(){c.apply(e,l)};k=d?setInterval(b,i):setTimeout(b,i);return{id:k,interval:d,cancel:function(){this.interval?
clearInterval(k):clearTimeout(k)}}},throttle:function(b,i,d){i=i||150;if(-1===i)return function(){b.apply(d||this,arguments)};var e=a.now();return function(){var g=a.now();g-e>i&&(e=g,b.apply(d||this,arguments))}},buffer:function(b,i,d){function e(){e.stop();g=a.later(b,i,0,d||this,arguments)}i=i||150;if(-1===i)return function(){b.apply(d||this,arguments)};var g=null;e.stop=function(){g&&(g.cancel(),g=0)};return e}})})(KISSY);
(function(a,b){function h(b,c,d){var f=b,m,p,i,o;if(!b)return f;if(b[g])return d[b[g]].destination;if("object"===typeof b){o=b.constructor;if(a.inArray(o,[Boolean,String,Number,Date,RegExp]))f=new o(b.valueOf());else if(m=a.isArray(b))f=c?a.filter(b,c):b.concat();else if(p=a.isPlainObject(b))f={};b[g]=o=a.guid();d[o]={destination:f,input:b}}if(m)for(b=0;b<f.length;b++)f[b]=h(f[b],c,d);else if(p)for(i in b)if(i!==g&&(!c||c.call(b,b[i],i,b)!==e))f[i]=h(b[i],c,d);return f}function i(e,k,j,f){if(e[c]===
k&&k[c]===e)return d;e[c]=k;k[c]=e;var m=function(a,f){return null!==a&&a!==b&&a[f]!==b},g;for(g in k)!m(e,g)&&m(k,g)&&j.push("expected has key '"+g+"', but missing from actual.");for(g in e)!m(k,g)&&m(e,g)&&j.push("expected missing key '"+g+"', but present in actual.");for(g in k)g!=c&&(a.equals(e[g],k[g],j,f)||f.push("'"+g+"' was '"+(k[g]?k[g].toString():k[g])+"' in expected, but was '"+(e[g]?e[g].toString():e[g])+"' in actual."));a.isArray(e)&&a.isArray(k)&&e.length!=k.length&&f.push("arrays were not the same length");
delete e[c];delete k[c];return 0===j.length&&0===f.length}var d=!0,e=!1,g="__~ks_cloned",c="__~ks_compared";a.mix(a,{equals:function(c,e,j,f){j=j||[];f=f||[];return c===e?d:c===b||null===c||e===b||null===e?null==c&&null==e:c instanceof Date&&e instanceof Date?c.getTime()==e.getTime():"string"==typeof c&&"string"==typeof e||a.isNumber(c)&&a.isNumber(e)?c==e:"object"===typeof c&&"object"===typeof e?i(c,e,j,f):c===e},clone:function(c,d){var e={},f=h(c,d,e);a.each(e,function(a){a=a.input;if(a[g])try{delete a[g]}catch(c){a[g]=
b}});e=null;return f},now:Date.now||function(){return+new Date}})})(KISSY);
(function(a,b){var h=/^[\s\xa0]+|[\s\xa0]+$/g,i=String.prototype.trim,d=/\\?\{([^{}]+)\}/g;a.mix(a,{trim:i?function(a){return null==a?"":i.call(a)}:function(a){return null==a?"":a.toString().replace(h,"")},substitute:function(a,g,c){return"string"!=typeof a||!g?a:a.replace(c||d,function(a,c){return"\\"===a.charAt(0)?a.slice(1):g[c]===b?"":g[c]})},ucfirst:function(a){a+="";return a.charAt(0).toUpperCase()+a.substring(1)},startsWith:function(a,b){return 0===a.lastIndexOf(b,0)},endsWith:function(a,b){var c=
a.length-b.length;return 0<=c&&a.indexOf(b,c)==c}})})(KISSY);
(function(a,b){var h={},i=Object.prototype.toString;a.mix(a,{isBoolean:0,isNumber:0,isString:0,isFunction:0,isArray:0,isDate:0,isRegExp:0,isObject:0,type:function(a){return null==a?""+a:h[i.call(a)]||"object"},isNull:function(a){return null===a},isUndefined:function(a){return a===b},isEmptyObject:function(a){for(var e in a)if(e!==b)return!1;return!0},isPlainObject:function(d){if(!d||"object"!==a.type(d)||d.nodeType||d.window==d)return!1;try{if(d.constructor&&!Object.prototype.hasOwnProperty.call(d,
"constructor")&&!Object.prototype.hasOwnProperty.call(d.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}for(var g in d);return g===b||Object.prototype.hasOwnProperty.call(d,g)}});a.each("Boolean,Number,String,Function,Array,Date,RegExp,Object".split(","),function(b,e){h["[object "+b+"]"]=e=b.toLowerCase();a["is"+b]=function(b){return a.type(b)==e}})})(KISSY);
(function(a,b){function h(a,c,e){if(a instanceof g)return e(a[j]);var k=a[j];if(a=a[f])a.push([c,e]);else if(d(k))h(k,c,e);else return c&&c(k);return b}function i(a){if(!(this instanceof i))return new i(a);this.promise=a||new e}function d(a){return a&&a instanceof e}function e(a){this[j]=a;a===b&&(this[f]=[])}function g(a){if(a instanceof g)return a;e.apply(this,arguments);return b}function c(a,b,c){function f(a){try{return b?b(a):a}catch(c){return new g(c)}}function d(a){try{return c?c(a):new g(a)}catch(b){return new g(b)}}
function k(a){l||(l=1,j.resolve(f(a)))}var j=new i,l=0;a instanceof e?h(a,k,function(a){l||(l=1,j.resolve(d(a)))}):k(a);return j.promise}function l(a){return!k(a)&&d(a)&&a[f]===b&&(!d(a[j])||l(a[j]))}function k(a){return d(a)&&a[f]===b&&a[j]instanceof g}var j="__promise_value",f="__promise_pendings";i.prototype={constructor:i,resolve:function(c){var d=this.promise,e;if(!(e=d[f]))return b;d[j]=c;e=[].concat(e);d[f]=b;a.each(e,function(a){h(d,a[0],a[1])});return c},reject:function(a){return this.resolve(new g(a))}};
e.prototype={constructor:e,then:function(a,b){return c(this,a,b)},fail:function(a){return c(this,0,a)},fin:function(a){return c(this,function(b){return a(b,!0)},function(b){return a(b,!1)})},isResolved:function(){return l(this)},isRejected:function(){return k(this)}};a.extend(g,e);KISSY.Defer=i;KISSY.Promise=e;e.Defer=i;a.mix(e,{when:c,isPromise:d,isResolved:l,isRejected:k,all:function(a){var b=a.length;if(!b)return a;for(var f=i(),d=0;d<a.length;d++)(function(d,e){c(d,function(c){a[e]=c;0===--b&&
f.resolve(a)},function(a){f.reject(a)})})(a[d],d);return f.promise}})})(KISSY);
(function(a){function b(a,b){for(var g=0,c=a.length-1;0<=c;c--){var l=a[c];"."==l?a.splice(c,1):".."===l?(a.splice(c,1),g++):g&&(a.splice(c,1),g--)}if(b)for(;g--;g)a.unshift("..");return a}var h=/^(\/?)([\s\S]+\/(?!$)|\/)?((?:\.{1,2}$|[\s\S]+?)?(\.[^.\/]*)?)$/,i={resolve:function(){var d="",e,g=a.makeArray(arguments),c,l=0;for(e=g.length-1;0<=e&&!l;e--)c=g[e],"string"==typeof c&&c&&(d=c+"/"+d,l="/"==c.charAt(0));d=b(a.filter(d.split("/"),function(a){return!!a}),!l).join("/");return(l?"/":"")+d||"."},
normalize:function(d){var e="/"==d.charAt(0),g="/"==d.slice(-1),d=b(a.filter(d.split("/"),function(a){return!!a}),!e).join("/");!d&&!e&&(d=".");d&&g&&(d+="/");return(e?"/":"")+d},join:function(){var b=a.makeArray(arguments);return i.normalize(a.filter(b,function(a){return a&&"string"==typeof a}).join("/"))},relative:function(b,e){var b=i.normalize(b),e=i.normalize(e),g=a.filter(b.split("/"),function(a){return!!a}),c=[],l,k,j=a.filter(e.split("/"),function(a){return!!a});k=Math.min(g.length,j.length);
for(l=0;l<k&&g[l]==j[l];l++);for(k=l;l<g.length;)c.push(".."),l++;c=c.concat(j.slice(k));return c=c.join("/")},basename:function(a,b){var g=a.match(h)||[],g=g[3]||"";b&&g&&g.slice(-1*b.length)==b&&(g=g.slice(0,-1*b.length));return g},dirname:function(a){var b=a.match(h)||[],a=b[1]||"",b=b[2]||"";if(!a&&!b)return".";b&&(b=b.substring(0,b.length-1));return a+b},extname:function(a){return(a.match(h)||[])[4]||""}};a.Path=i})(KISSY);
(function(a,b){function h(b){b._queryMap||(b._queryMap=a.unparam(b._query))}function i(a){this._query=a||""}function d(a,b){return encodeURI(a).replace(b,function(a){a=a.charCodeAt(0).toString(16);return"%"+(1==a.length?"0"+a:a)})}function e(c){if(c instanceof e)return c.clone();var f,d=this;a.mix(d,{scheme:"",userInfo:"",hostname:"",port:"",path:"",query:"",fragment:""});f=(c||"").match(j)||[];a.each(m,function(b,c){var e=f[b]||"";"query"==c?d.query=new i(e):d[c]=a.urlDecode(e)});return b}var g=
/[#\/\?@]/g,c=/[#\?]/g,l=/[#@]/g,k=/#/g,j=RegExp("^(?:([\\w\\d+.-]+):)?(?://(?:([^/?#@]*)@)?([\\w\\d\\-\\u0100-\\uffff.+%]*|\\[[^\\]]+\\])(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),f=a.Path,m={scheme:1,userInfo:2,hostname:3,port:4,path:5,query:6,fragment:7};i.prototype={constructor:i,clone:function(){return new i(this.toString())},reset:function(a){this._query=a||"";this._queryMap=0},count:function(){var b=0,c=this._queryMap,f;h(this);for(f in c)a.isArray(c[f])?b+=c[f].length:b++;return b},
has:function(b){var c;h(this);c=this._queryMap;return b?b in c:!a.isEmptyObject(c)},get:function(a){var b;h(this);b=this._queryMap;return a?b[a]:b},keys:function(){h(this);return a.keys(this._queryMap)},set:function(b,c){var f;h(this);f=this._queryMap;"string"==typeof b?this._queryMap[b]=c:(b instanceof i&&(b=b.get()),a.each(b,function(a,b){f[b]=a}));return this},remove:function(a){h(this);a?delete this._queryMap[a]:this._queryMap={};return this},add:function(c,f){var d=this,e,k;a.isObject(c)?(c instanceof
i&&(c=c.get()),a.each(c,function(a,b){d.add(b,a)})):(h(d),e=d._queryMap,k=e[c],k=k===b?f:[].concat(k).concat(f),e[c]=k);return d},toString:function(c){h(this);return a.param(this._queryMap,b,b,c)}};e.prototype={constructor:e,clone:function(){var b=new e,c=this;a.each(m,function(a,f){b[f]=c[f]});b.query=b.query.clone();return b},resolve:function(b){"string"==typeof b&&(b=new e(b));var c=0,d,k=this.clone();a.each("scheme,userInfo,hostname,port,path,query,fragment".split(","),function(e){if(e=="path")if(c)k[e]=
b[e];else{if(e=b.path){c=1;if(!a.startsWith(e,"/"))if(k.hostname&&!k.path)e="/"+e;else if(k.path){d=k.path.lastIndexOf("/");d!=-1&&(e=k.path.slice(0,d+1)+e)}k.path=f.normalize(e)}}else if(e=="query"){if(c||b.query.toString()){k.query=b.query.clone();c=1}}else if(c||b[e]){k[e]=b[e];c=1}});return k},getScheme:function(){return this.scheme},setScheme:function(a){this.scheme=a;return this},getHostname:function(){return this.hostname},setHostname:function(a){this.hostname=a;return this},setUserInfo:function(a){this.userInfo=
a;return this},getUserInfo:function(){return this.userInfo},setPort:function(a){this.port=a;return this},getPort:function(){return this.port},setPath:function(a){this.path=a;return this},getPath:function(){return this.path},setQuery:function(b){"string"==typeof b&&(a.startsWith(b,"?")&&(b=b.slice(1)),b=new i(d(b,l)));this.query=b;return this},getQuery:function(){return this.query},getFragment:function(){return this.fragment},setFragment:function(b){a.startsWith(b,"#")||(b="#"+b);this.fragment=b;return this},
hasSameDomainAs:function(a){return this.hostname.toLowerCase()==a.hostname.toLowerCase()&&this.scheme.toLowerCase()==a.scheme.toLowerCase()&&this.port.toLowerCase()==a.port.toLowerCase()},toString:function(b){var e=[],j,m;if(j=this.scheme)e.push(d(j,g)),e.push(":");if(j=this.hostname){e.push("//");if(m=this.userInfo)e.push(d(m,g)),e.push("@");e.push(encodeURIComponent(j));if(m=this.port)e.push(":"),e.push(m)}if(m=this.path)j&&!a.startsWith(m,"/")&&(m="/"+m),m=f.normalize(m),e.push(d(m,c));if(b=this.query.toString.call(this.query,
b))e.push("?"),e.push(b);if(b=this.fragment)e.push("#"),e.push(d(b,k));return e.join("")}};e.Query=i;a.Uri=e})(KISSY);
(function(a,b){var h=a.Env.host,i=h.document,h=(h=h.navigator)&&h.userAgent||"",d,e="",g="",c,l=[6,9],k=i&&i.createElement("div"),j=[],f=KISSY.UA={webkit:b,trident:b,gecko:b,presto:b,chrome:b,safari:b,firefox:b,ie:b,opera:b,mobile:b,core:b,shell:b,phantomjs:b,os:b,ipad:b,iphone:b,ipod:b,ios:b,android:b},m=function(a){var b=0;return parseFloat(a.replace(/\./g,function(){return 0===b++?".":""}))};k&&(k.innerHTML="<\!--[if IE {{version}}]><s></s><![endif]--\>".replace("{{version}}",""),j=k.getElementsByTagName("s"));
if(0<j.length){g="ie";f[e="trident"]=0.1;if((c=h.match(/Trident\/([\d.]*)/))&&c[1])f[e]=m(c[1]);c=l[0];for(l=l[1];c<=l;c++)if(k.innerHTML="<\!--[if IE {{version}}]><s></s><![endif]--\>".replace("{{version}}",c),0<j.length){f[g]=c;break}}else if((c=h.match(/AppleWebKit\/([\d.]*)/))&&c[1]){f[e="webkit"]=m(c[1]);if((c=h.match(/Chrome\/([\d.]*)/))&&c[1])f[g="chrome"]=m(c[1]);else if((c=h.match(/\/([\d.]*) Safari/))&&c[1])f[g="safari"]=m(c[1]);if(/ Mobile\//.test(h)&&h.match(/iPad|iPod|iPhone/)){f.mobile=
"apple";if((c=h.match(/OS ([^\s]*)/))&&c[1])f.ios=m(c[1].replace("_","."));d="ios";if((c=h.match(/iPad|iPod|iPhone/))&&c[0])f[c[0].toLowerCase()]=f.ios}else if(/ Android/.test(h)){if(/Mobile/.test(h)&&(d=f.mobile="android"),(c=h.match(/Android ([^\s]*);/))&&c[1])f.android=m(c[1])}else if(c=h.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/))f.mobile=c[0].toLowerCase();if((c=h.match(/PhantomJS\/([^\s]*)/))&&c[1])f.phantomjs=m(c[1])}else if((c=h.match(/Presto\/([\d.]*)/))&&c[1]){if(f[e="presto"]=m(c[1]),
(c=h.match(/Opera\/([\d.]*)/))&&c[1]){f[g="opera"]=m(c[1]);if((c=h.match(/Opera\/.* Version\/([\d.]*)/))&&c[1])f[g]=m(c[1]);if((c=h.match(/Opera Mini[^;]*/))&&c)f.mobile=c[0].toLowerCase();else if((c=h.match(/Opera Mobi[^;]*/))&&c)f.mobile=c[0]}}else if((c=h.match(/MSIE\s([^;]*)/))&&c[1]){if(f[e="trident"]=0.1,f[g="ie"]=m(c[1]),(c=h.match(/Trident\/([\d.]*)/))&&c[1])f[e]=m(c[1])}else if(c=h.match(/Gecko/)){f[e="gecko"]=0.1;if((c=h.match(/rv:([\d.]*)/))&&c[1])f[e]=m(c[1]);if((c=h.match(/Firefox\/([\d.]*)/))&&
c[1])f[g="firefox"]=m(c[1])}d||(/windows|win32/i.test(h)?d="windows":/macintosh|mac_powerpc/i.test(h)?d="macintosh":/linux/i.test(h)?d="linux":/rhino/i.test(h)&&(d="rhino"));f.os=d;f.core=e;f.shell=g;f._numberify=m;d="webkit,trident,gecko,presto,chrome,safari,firefox,ie,opera".split(",");var i=i&&i.documentElement,p="";i&&(a.each(d,function(a){var b=f[a];if(b){p=p+(" ks-"+a+(parseInt(b)+""));p=p+(" ks-"+a)}}),a.trim(p)&&(i.className=a.trim(i.className+p)))})(KISSY);
(function(a){var b=a.Env,h=b.host,i=a.UA,d=h.document||{},e="ontouchstart"in d&&!i.phantomjs,g=(d=d.documentMode)||i.ie,c=(b.nodejs&&"object"===typeof global?global:h).JSON;d&&9>d&&(c=0);a.Features={isTouchSupported:function(){return e},isDeviceMotionSupported:function(){return!!h.DeviceMotionEvent},isHashChangeSupported:function(){return"onhashchange"in h&&(!g||7<g)},isNativeJSONSupported:function(){return c}}})(KISSY);
(function(a){function b(a){this.runtime=a}b.STATUS={INIT:0,LOADING:1,LOADED:2,ERROR:3,ATTACHED:4};a.Loader=b;a.Loader.STATUS=b.STATUS})(KISSY);
(function(a){function b(a,b,e){a=a[h]||(a[h]={});e&&(a[b]=a[b]||[]);return a[b]}a.namespace("Loader");var h="__events__"+a.now();KISSY.Loader.Target={on:function(a,d){b(this,a,1).push(d)},detach:function(i,d){var e,g;if(i){if(e=b(this,i))d&&(g=a.indexOf(d,e),-1!=g&&e.splice(g,1)),(!d||!e.length)&&delete (this[h]||(this[h]={}))[i]}else delete this[h]},fire:function(h,d){var e=b(this,h);a.each(e,function(a){a.call(null,d)})}}})(KISSY);
(function(a){function b(b){if(a.isArray(b)){for(var c=[],f=0;f<b.length;f++)c[f]=h(b[f]);return c}return h(b)}function h(b){a.endsWith(e.basename(b),"/")&&(b+="index");return b}function i(b,c,f){var b=b.Env.mods,e,c=a.makeArray(c);for(e=0;e<c.length;e++){var d=b[c[e]];if(!d||d.status!==f)return!1}return!0}var d=a.Loader,e=a.Path,g=a.Uri,c=a.Env.host,l=a.startsWith,k=d.STATUS,j=k.ATTACHED,f=k.LOADED,m=a.Loader.Utils={},p=c.document,n=new g(c.location&&c.location.href||"");a.mix(m,{docHead:function(){return p.getElementsByTagName("head")[0]||
p.documentElement},normalDepModuleName:function(b,c){var f=0;if(!c)return c;if(a.isArray(c)){for(;f<c.length;f++)c[f]=m.normalDepModuleName(b,c[f]);return c}return l(c,"../")||l(c,"./")?e.resolve(e.dirname(b),c):e.normalize(c)},resolveByPage:function(a){return n.resolve(a)},createModulesInfo:function(b,c){a.each(c,function(a){m.createModuleInfo(b,a)})},createModuleInfo:function(b,c,f){var c=h(c),e=b.Env.mods,k=e[c];return k?k:e[c]=k=new d.Module(a.mix({name:c,runtime:b},f))},isAttached:function(a,
b){return i(a,b,j)},isLoaded:function(a,b){return i(a,b,f)},getModules:function(b,c){var f=[b],e,d,k,g,l=b.Env.mods;a.each(c,function(c){e=l[c];if(!e||"css"!=e.getType())d=m.unalias(b,c),(k=a.reduce(d,function(a,b){g=l[b];return a&&g&&g.status==j},!0))?f.push(l[d[0]].value):f.push(null)});return f},attachMod:function(b,c){if(c.status==f){var e=c.fn;e&&(e=a.isFunction(e)?e.apply(c,m.getModules(b,c.getRequiresWithAlias())):e,c.value=e);c.status=j;b.getLoader().fire("afterModAttached",{mod:c})}},getModNamesAsArray:function(a){"string"==
typeof a&&(a=a.replace(/\s+/g,"").split(","));return a},normalizeModNames:function(a,b,c){return m.unalias(a,m.normalizeModNamesWithAlias(a,b,c))},unalias:function(a,c){for(var f=[].concat(c),e,d,k,j=0,g,m=a.Env.mods;!j;){j=1;for(e=f.length-1;0<=e;e--)if((d=m[f[e]])&&(k=d.alias)){j=0;for(g=k.length-1;0<=g;g--)k[g]||k.splice(g,1);f.splice.apply(f,[e,1].concat(b(k)))}}return f},normalizeModNamesWithAlias:function(a,c,f){var a=[],e,d;if(c){e=0;for(d=c.length;e<d;e++)c[e]&&a.push(b(c[e]))}f&&(a=m.normalDepModuleName(f,
a));return a},registerModule:function(b,c,e,d){var k=b.Env.mods,j=k[c];if(!j||!j.fn)m.createModuleInfo(b,c),j=k[c],a.mix(j,{name:c,status:f}),j.fn=e,a.mix(k[c]=j,d)},getMappedPath:function(a,b,c){for(var a=c||a.Config.mappedRules||[],f,c=0;c<a.length;c++)if(f=a[c],b.match(f[0]))return b.replace(f[0],f[1]);return b}})})(KISSY);
(function(a){function b(b){a.mix(this,b)}function h(b){this.status=d.STATUS.INIT;a.mix(this,b)}var i=a.Path,d=a.Loader,e=d.Utils;a.augment(b,{getTag:function(){return this.tag||this.runtime.Config.tag},getName:function(){return this.name},getBase:function(){return this.base||this.runtime.Config.base},getPrefixUriForCombo:function(){var a=this.name;return this.base+(a&&!this.isignorePackageNameInUri()?a+"/":"")},getBaseUri:function(){return this.baseUri||this.runtime.Config.baseUri},isDebug:function(){var a=
this.debug;return void 0===a?this.runtime.Config.debug:a},isignorePackageNameInUri:function(){var a=this.ignorePackageNameInUri;return void 0===a?this.runtime.Config.ignorePackageNameInUri:a},getCharset:function(){return this.charset||this.runtime.Config.charset},isCombine:function(){var a=this.combine;return void 0===a?this.runtime.Config.combine:a}});d.Package=b;a.augment(h,{setValue:function(a){this.value=a},getType:function(){var a;if(void 0===(a=this.type))this.type=a=".css"==i.extname(this.name).toLowerCase()?
"css":"js";return a},getFullPath:function(){var a,b,d,k;this.fullpath||(d=this.getPackage(),b=d.getBaseUri(),k=this.getPath(),d.isignorePackageNameInUri()&&d.getName()&&(k=k.split("/"),k.shift(),k=k.join("/")),b=b.resolve(k),(a=this.getTag())&&b.query.set("t",a),this.fullpath=e.getMappedPath(this.runtime,b.toString()));return this.fullpath},getPath:function(){var a;if(!(a=this.path)){a=this.name;var b=(i.extname(a)||"").toLowerCase(),e="-min";".css"!=b&&(b=".js");a=i.join(i.dirname(a),i.basename(a,
b));this.getPackage().isDebug()&&(e="");a=this.path=a+e+b}return a},getValue:function(){return this.value},getName:function(){return this.name},getPackage:function(){var b;if(!(b=this.packageInfo)){b=this.name;var c=this.runtime.config("packages"),e="",d;for(d in c)a.startsWith(b,d)&&d.length>e.length&&(e=d);b=this.packageInfo=c[e]}return b},getTag:function(){return this.tag||this.getPackage().getTag()},getCharset:function(){return this.charset||this.getPackage().getCharset()},getRequiredMods:function(){var b=
this.runtime.Env.mods;return a.map(this.getNormalizedRequires(),function(a){return b[a]})},getRequiresWithAlias:function(){var a=this.requiresWithAlias,b=this.requires;if(!b||0==b.length)return b||[];a||(this.requiresWithAlias=a=e.normalizeModNamesWithAlias(this.runtime,b,this.name));return a},getNormalizedRequires:function(){var a,b=this.normalizedRequiresStatus,d=this.status,k=this.requires;if(!k||0==k.length)return k||[];if((a=this.normalizedRequires)&&b==d)return a;this.normalizedRequiresStatus=
d;return this.normalizedRequires=e.normalizeModNames(this.runtime,k,this.name)}});d.Module=h})(KISSY);(function(a){function b(){for(var g in e){var c=e[g],l=c.node,k,j=0;if(i.webkit)l.sheet&&(j=1);else if(l.sheet)try{l.sheet.cssRules&&(j=1)}catch(f){k=f.name,"NS_ERROR_DOM_SECURITY_ERR"==k&&(j=1)}j&&(c.callback&&c.callback.call(l),delete e[g])}d=a.isEmptyObject(e)?0:setTimeout(b,h)}var h=30,i=a.UA,d=0,e={};a.mix(a.Loader.Utils,{pollCss:function(a,c){var h;h=e[a.href]={};h.node=a;h.callback=c;d||b()}})})(KISSY);
(function(a){var b=a.Env.host.document,h=a.Loader.Utils,i=a.Path,d={},e=536>a.UA.webkit;a.mix(a,{getScript:function(g,c,l){var k=h.resolveByPage(g).toString(),j=c,f=0,m,p,n,o;a.startsWith(i.extname(g).toLowerCase(),".css")&&(f=1);a.isPlainObject(j)&&(c=j.success,m=j.error,p=j.timeout,l=j.charset,n=j.attrs);j=d[k]=d[k]||[];j.push([c,m]);if(1<j.length)return j.node;var c=h.docHead(),q=b.createElement(f?"link":"script");n&&a.each(n,function(a,b){q.setAttribute(b,a)});f?(q.href=g,q.rel="stylesheet"):
(q.src=g,q.async=!0);j.node=q;l&&(q.charset=l);var t=function(b){var c=b?1:0;if(o){o.cancel();o=void 0}a.each(d[k],function(a){a[c]&&a[c].call(q)});delete d[k]},g=!f;f&&(g=e?!1:"onload"in q);g?(q.onload=q.onreadystatechange=function(){var a=q.readyState;if(!a||a=="loaded"||a=="complete"){q.onreadystatechange=q.onload=null;t(0)}},q.onerror=function(){q.onerror=null;m(1)}):h.pollCss(q,function(){t(0)});p&&(o=a.later(function(){t(1)},1E3*p));f?c.appendChild(q):c.insertBefore(q,c.firstChild);return q}})})(KISSY);
(function(a,b){var h=a.Loader,i=h.Utils,d=a.Config.fns;d.map=function(a){var b=this.Config;return!1===a?b.mappedRules=[]:b.mappedRules=(b.mappedRules||[]).concat(a||[])};d.mapCombo=function(a){var b=this.Config;return!1===a?b.mappedComboRules=[]:b.mappedComboRules=(b.mappedComboRules||[]).concat(a||[])};d.packages=function(e){var d,c,l=this.Config,k=l.packages=l.packages||{};return e?(a.each(e,function(b,f){d=b.name||f;c=b.base||b.path;a.Env.nodejs&&!a.startsWith(c,"file:")&&(c="file:"+c);a.endsWith(c,
"/")||(c+="/");b.name=d;var e=i.resolveByPage(c);b.base=e.toString();b.baseUri=e;b.runtime=a;delete b.path;k[d]=new h.Package(b)}),b):!1===e?(l.packages={"":l.packages[""]},b):k};d.modules=function(b){var d=this,c=d.Env;b&&a.each(b,function(b,e){i.createModuleInfo(d,e,b);a.mix(c.mods[e],b)})};d.base=function(e){var d=this.Config;if(!e)return d.base;a.Env.nodejs&&!a.startsWith(e,"file:")&&(e="file:"+e);e=i.resolveByPage(e);d.base=e.toString();d.baseUri=e;this.config("packages",{"":{base:a.config("base")}});
return b}})(KISSY);
(function(a){var b=a.Loader,h=a.UA,i=b.Utils;a.augment(b,b.Target,{__currentMod:null,__startLoadTime:0,__startLoadModName:null,add:function(b,e,g){var c=this.runtime;if("string"==typeof b)i.registerModule(c,b,e,g);else if(a.isFunction(b))if(g=e,e=b,h.ie){var b=a.Env.host.document.getElementsByTagName("script"),l,k,j;for(k=b.length-1;0<=k;k--)if(j=b[k],"interactive"==j.readyState){l=j;break}b=l?l.getAttribute("data-mod-name"):this.__startLoadModName;i.registerModule(c,b,e,g);this.__startLoadModName=null;
this.__startLoadTime=0}else this.__currentMod={fn:e,config:g}}})})(KISSY);
(function(a,b){function h(a){this.fn=a;this.waitMods={};this.requireLoadedMods={}}function i(b,c,f){var e,d=b.length,k=f.length;for(e=0;e<d;e++){var j=b[e],m=c,h=f,g=m.Env.mods[j];g.status!=n&&(a.inArray(j,h)?h.push(j):(h.push(j),i(g.getNormalizedRequires(),m,h),l.attachMod(m,g)));f.length=k}}function d(a,b,c){var d,k=b.length;for(d=0;d<k;d++){var j=a,h=b[d],g=c,i=j.runtime,p=void 0,p=i.Env.mods,A=p[h];A||(l.createModuleInfo(i,h),A=p[h]);p=A.status;p!=n&&(p===m?g.loadModRequires(j,A):(i=g.isModWait(h),
g.addWaitMod(h),p<=f&&!i&&e(j,A,g)))}}function e(c,e,d){function m(){e.fn?(d.loadModRequires(c,e),d.removeWaitMod(g),d.check()):e.status=p}var h=c.runtime,g=e.getName(),i=e.getCharset(),n=e.getFullPath(),y=k.ie,z="css"==e.getType();e.status=f;y&&!z&&(c.__startLoadModName=g,c.__startLoadTime=Number(+new Date));a.getScript(n,{attrs:y?{"data-mod-name":g}:b,success:function(){j[g]||(j[g]=1);if(e.status==f)if(z)l.registerModule(h,g,a.noop);else{var b;if(b=c.__currentMod){l.registerModule(h,g,b.fn,b.config);
c.__currentMod=null}}a.later(m)},error:m,charset:i})}var g,c,l,k,j,f,m,p,n;g=a.Loader;c=g.STATUS;l=g.Utils;k=a.UA;j={};f=c.LOADING;m=c.LOADED;p=c.ERROR;n=c.ATTACHED;h.prototype={check:function(){var b=this.waitMods,c=this.fn;c&&a.isEmptyObject(b)&&(c(),this.fn=null)},addWaitMod:function(a){this.waitMods[a]=1},removeWaitMod:function(a){delete this.waitMods[a]},isModWait:function(a){return this.waitMods[a]},loadModRequires:function(a,b){var c=this.requireLoadedMods,f=b.name;c[f]||(c[f]=1,c=b.getNormalizedRequires(),
d(a,c,this))}};a.augment(g,{use:function(a,b){var c,f=new h(function(){i(c,e,[]);b&&b.apply(e,l.getModules(e,a))}),e=this.runtime,a=l.getModNamesAsArray(a),a=l.normalizeModNamesWithAlias(e,a);c=l.unalias(e,a);d(this,c,f);f.check();return this},clear:function(){}})})(KISSY);
(function(a){function b(b,c,f){var e=b&&b.length;e?a.each(b,function(b){a.getScript(b,function(){--e||c()},f||"utf-8")}):c()}function h(b){a.mix(this,{runtime:b,queue:[],loading:0})}function i(a){var b;a.queue.length&&(b=a.queue.shift(),e(a,b.modNames,b.fn))}function d(a,b,c){a.queue.push({modNames:b,fn:c})}function e(f,d,k){function j(a){y=a;z&&y&&(c(f,h),m.isAttached(w,h)?k.apply(null,m.getModules(w,d)):e(f,d,k))}var h,l,i,u,v,w=f.runtime;f.loading=1;d=m.getModNamesAsArray(d);d=m.normalizeModNamesWithAlias(w,
d);h=m.unalias(w,d);l=f.calculate(h);m.createModulesInfo(w,l);l=f.getComboUrls(l);i=l.css;u=0;for(v in i)u++;var y=0,z=!u;for(v in i)b(i[v],function(){if(!--u){for(var b in i)a.each(i[b].mods,function(b){m.registerModule(w,b.name,a.noop)});z=1;j(y)}},i[v].charset);g(l,j)}function g(a,c){var e,d,k=a.js,j=0;for(e in k)j++;if(j)for(e in d=1,k)(function(a){b(k[a],function(){var b=k[a].mods,e,m;for(m=0;m<b.length;m++)if(e=b[m],!e.fn){e.status=f.ERROR;d=0;return}d&&!--j&&c(1)},k[a].charset)})(e);else c(1)}
function c(b,c){a.each(c,function(a){l(b,a)})}function l(a,b){var c=a.runtime,f,e,d,k,j=a.runtime.Env.mods[b];if(j&&!m.isAttached(c,b)){d=j.getNormalizedRequires();e=d.length;for(f=0;f<e;f++)if(k=d[f],l(a,k),!m.isAttached(c,k))return!1;m.attachMod(c,j)}}function k(b,c,f){var e=b.runtime,d,j,h,g,l=a.Config.debug;j=b.runtime.Env.mods[c];var i=f[c];if(i)return i;f[c]=i={};if(j&&!m.isAttached(e,c)){d=j.getNormalizedRequires();if(l&&(g=j.__allRequires||(j.__allRequires={}),g[c]))return i;for(c=0;c<d.length;c++)h=
d[c],l&&(j=b.runtime.Env.mods[h],g[h]=1,j&&j.__allRequires&&a.each(j.__allRequires,function(a,b){g[b]=1})),!m.isLoaded(e,h)&&!m.isAttached(e,h)&&(i[h]=1),j=k(b,h,f),a.mix(i,j)}return i}var j=a.Loader,f=j.STATUS,m=j.Utils;a.augment(h,j.Target);a.augment(h,{use:function(a,b){var c=this;d(c,a,function(){if(b)try{b.apply(this,arguments)}catch(a){}c.loading=0;i(c)});c.loading||i(c)},add:function(a,b,c){m.registerModule(this.runtime,a,b,c)},calculate:function(b){var c={},f,e,d,j=this.runtime,h={};for(f=
0;f<b.length;f++)e=b[f],m.isAttached(j,e)||(m.isLoaded(j,e)||(c[e]=1),a.mix(c,k(this,e,h)));b=[];for(d in c)b.push(d);return b},getComboUrls:function(b){var c=this,f,e=c.runtime,d=e.Config,k={};a.each(b,function(a){var a=c.runtime.Env.mods[a],b=a.getPackage(),f=a.getType(),e,d=b.getName();k[d]=k[d]||{};if(!(e=k[d][f]))e=k[d][f]=k[d][f]||[],e.packageInfo=b;e.push(a)});var j={js:{},css:{}},h,g,l,b=d.comboPrefix,i=d.comboSep,z=d.comboMaxFileNum,A=d.comboMaxUrlLength;for(g in k)for(l in k[g]){h=[];var B=
k[g][l],D=B.packageInfo,J=(f=D.getTag())?"?t="+encodeURIComponent(f):"",x=J.length,H,E,K,I=D.getPrefixUriForCombo();j[l][g]=[];j[l][g].charset=D.getCharset();j[l][g].mods=[];H=I+b;K=H.length;var L=function(){j[l][g].push(m.getMappedPath(e,H+h.join(i)+J,d.mappedComboRules||[]))};for(f=0;f<B.length;f++)if(E=B[f].getFullPath(),j[l][g].mods.push(B[f]),!D.isCombine()||!a.startsWith(E,I))j[l][g].push(E);else if(E=E.slice(I.length).replace(/\?.*$/,""),h.push(E),h.length>z||K+h.join(i).length+x>A)h.pop(),
L(),h=[],f--;h.length&&L()}return j}});j.Combo=h})(KISSY);
(function(a,b){function h(){var c=/^(.*)(seed|kissy)(?:-min)?\.js[^/]*/i,h=/(seed|kissy)(?:-min)?\.js/i,k,j,f=d.host.document.getElementsByTagName("script"),m=f[f.length-1],f=e.resolveByPage(m.src).toString(),m=(m=m.getAttribute("data-config"))?(new Function("return "+m))():{},f=f.replace(/%3f/gi,"?").replace(/%2c/gi,",");k=m.comboPrefix=m.comboPrefix||"??";j=m.comboSep=m.comboSep||",";var g,i=f.indexOf(k);-1==i?g=f.replace(c,"$1"):(g=f.substring(0,i),f=f.substring(i+k.length).split(j),a.each(f,function(a){return a.match(h)?
(g+=a.replace(c,"$1"),!1):b}));return a.mix({base:g},m)}a.mix(a,{add:function(a,b,e){this.getLoader().add(a,b,e)},use:function(a,b){this.getLoader().use(a,b)},getLoader:function(){var a=this.Env;return this.Config.combine&&!a.nodejs?a._comboLoader:a._loader},require:function(a){return e.getModules(this,[a])[1]}});var i=a.Loader,d=a.Env,e=i.Utils,g=a.Loader.Combo;a.Env.nodejs?a.config("base",__dirname.replace(/\\/g,"/").replace(/\/$/,"")+"/"):a.config(a.mix({comboMaxUrlLength:2E3,comboMaxFileNum:40,
charset:"utf-8",tag:"20121211152219"},h()));d.mods={};d._loader=new i(a);g&&(d._comboLoader=new g(a))})(KISSY);
(function(a,b){var h=a.Env.host,i=a.UA,d=h.document,e=d&&d.documentElement,g=h.location,c=new a.Defer,l=c.promise,k=/^#?([\w-]+)$/,j=/\S/;a.mix(a,{isWindow:function(a){return null!=a&&a==a.window},parseXML:function(a){if(a.documentElement)return a;var c;try{h.DOMParser?c=(new DOMParser).parseFromString(a,"text/xml"):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(a))}catch(f){c=b}!c||!c.documentElement||c.getElementsByTagName("parsererror");return c},globalEval:function(a){a&&j.test(a)&&
(h.execScript||function(a){h.eval.call(h,a)})(a)},ready:function(a){l.then(a);return this},available:function(b,c){if((b=(b+"").match(k)[1])&&a.isFunction(c))var f=1,e,j=a.later(function(){((e=d.getElementById(b))&&(c(e)||1)||500<++f)&&j.cancel()},40,!0)}});if(g&&-1!==(g.search||"").indexOf("ks-debug"))a.Config.debug=!0;(function(){var b=e&&e.doScroll,f=b?"onreadystatechange":"DOMContentLoaded",k=function(){c.resolve(a)};if(!d||"complete"===d.readyState)return k();if(d.addEventListener){var j=function(){d.removeEventListener(f,
j,!1);k()};d.addEventListener(f,j,!1);h.addEventListener("load",k,!1)}else{var g=function(){"complete"===d.readyState&&(d.detachEvent(f,g),k())};d.attachEvent(f,g);h.attachEvent("onload",k);var l;try{l=null===h.frameElement}catch(i){l=!1}if(b&&l){var s=function(){try{b("left"),k()}catch(a){setTimeout(s,40)}};s()}}return 0})();if(i.ie)try{d.execCommand("BackgroundImageCache",!1,!0)}catch(f){}})(KISSY,void 0);
(function(a){a.config({packages:{gallery:{base:a.Config.baseUri.resolve("../").toString()}},modules:{core:{alias:"dom,event,ajax,anim,base,node,json,ua".split(",")}}})})(KISSY);
(function(a,b,h){a({ajax:{requires:["dom","json","event"]}});a({anim:{requires:["dom","event"]}});a({base:{requires:["event/custom"]}});a({button:{requires:["component/base","event"]}});a({calendar:{requires:["node","event"]}});a({color:{requires:["base"]}});a({combobox:{requires:["dom","component/base","node","menu","ajax"]}});a({"component/base":{requires:["rich-base","node","event"]}});a({"component/extension":{requires:["dom","node"]}});a({"component/plugin/drag":{requires:["rich-base","dd/base"]}});
a({"component/plugin/resize":{requires:["resizable"]}});a({datalazyload:{requires:["dom","event","base"]}});a({dd:{alias:["dd/base","dd/droppable"]}});a({"dd/base":{requires:["dom","node","event","rich-base","base"]}});a({"dd/droppable":{requires:["dd/base","dom","node","rich-base"]}});a({"dd/plugin/constrain":{requires:["base","node"]}});a({"dd/plugin/proxy":{requires:["node","base","dd/base"]}});a({"dd/plugin/scroll":{requires:["dd/base","base","node","dom"]}});a({dom:{alias:["dom/base",9>h.ie?
"dom/ie":""]}});a({"dom/ie":{requires:["dom/base"]}});a({editor:{requires:["htmlparser","component/base","core"]}});a({event:{alias:["event/base","event/dom","event/custom"]}});a({"event/custom":{requires:["event/base"]}});a({"event/dom":{alias:["event/dom/base",b.isTouchSupported()?"event/dom/touch":"",b.isDeviceMotionSupported()?"event/dom/shake":"",b.isHashChangeSupported()?"":"event/dom/hashchange",9>h.ie?"event/dom/ie":"",h.ie?"":"event/dom/focusin"]}});a({"event/dom/base":{requires:["dom","event/base"]}});
a({"event/dom/focusin":{requires:["event/dom/base"]}});a({"event/dom/hashchange":{requires:["event/dom/base","dom"]}});a({"event/dom/ie":{requires:["event/dom/base","dom"]}});a({"event/dom/shake":{requires:["event/dom/base"]}});a({"event/dom/touch":{requires:["event/dom/base","dom"]}});a({flash:{requires:["dom","json"]}});a({imagezoom:{requires:["node","overlay"]}});a({json:{requires:[KISSY.Features.isNativeJSONSupported()?"":"json/json2"]}});a({kison:{requires:["base"]}});a({menu:{requires:["component/extension",
"node","component/base","event"]}});a({menubutton:{requires:["node","menu","button","component/base"]}});a({mvc:{requires:["event","base","ajax","json","node"]}});a({node:{requires:["dom","event/dom","anim"]}});a({overlay:{requires:["node","component/base","component/extension","event"]}});a({resizable:{requires:["node","rich-base","dd/base"]}});a({"rich-base":{requires:["base"]}});a({separator:{requires:["component/base"]}});a({"split-button":{requires:["component/base","button","menubutton"]}});
a({stylesheet:{requires:["dom"]}});a({switchable:{requires:["dom","event","anim",KISSY.Features.isTouchSupported()?"dd/base":""]}});a({tabs:{requires:["button","toolbar","component/base"]}});a({toolbar:{requires:["component/base","node"]}});a({tree:{requires:["node","component/base","event"]}});a({waterfall:{requires:["node","base"]}});a({xtemplate:{alias:["xtemplate/facade"]}});a({"xtemplate/compiler":{requires:["xtemplate/runtime"]}});a({"xtemplate/facade":{requires:["xtemplate/runtime","xtemplate/compiler"]}})})(function(a){KISSY.config("modules",
a)},KISSY.Features,KISSY.UA);(function(a){a.add("empty",a.noop);a.add("promise",function(){return a.Promise});a.add("uri",function(){return a.Uri});a.add("path",function(){return a.Path})})(KISSY);
KISSY.add("ua",function(a,b){var h=a.Env.host,i=a.UA,d=h.navigator,d=d&&d.userAgent||"",e,g,c={se360:b,maxthon:b,tt:b,theworld:b,sougou:b},l=i._numberify;if(d.match(/360SE/))c[g="se360"]=3;else if(d.match(/Maxthon/)&&(e=h.external)){g="maxthon";try{c[g]=l(e.max_version)}catch(k){c[g]=0.1}}else if(h=d.match(/TencentTraveler\s([\d.]*)/))c[g="tt"]=h[1]?l(h[1]):0.1;else if(d.match(/TheWorld/))c[g="theworld"]=3;else if(h=d.match(/SE\s([\d.]*)/))c[g="sougou"]=h[1]?l(h[1]):0.1;g&&(c.shell=g);a.mix(i,c);
return i});
KISSY.add("dom/base/api",function(a){var b=a.Env.host,h=a.UA,i={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},d={isCustomDomain:function(a){var a=a||b,d=a.document.domain,a=a.location.hostname;return d!=a&&d!="["+a+"]"},getEmptyIframeSrc:function(a){a=a||b;return h.ie&&d.isCustomDomain(a)?"javascript:void(function(){"+encodeURIComponent("document.open();document.domain='"+
a.document.domain+"';document.close();")+"}())":""},NodeType:i,getWindow:function(a){return!a?b:"scrollTo"in a&&a.document?a:a.nodeType==i.DOCUMENT_NODE?a.defaultView||a.parentWindow:!1},_isNodeList:function(a){return a&&!a.nodeType&&a.item&&!a.setTimeout},nodeName:function(a){var b=d.get(a),a=b.nodeName.toLowerCase();h.ie&&(b=b.scopeName)&&"HTML"!=b&&(a=b.toLowerCase()+":"+a);return a},_RE_NUM_NO_PX:RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i")};a.mix(d,i);return d});
KISSY.add("dom/base/attr",function(a,b,h){function i(a,b){var b=q[b]||b,c=r[b];return c&&c.get?c.get(a,b):a[b]}var d=a.Env.host.document,e=b.NodeType,g=(d=d&&d.documentElement)&&d.textContent===h?"innerText":"textContent",c=b.nodeName,l=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,k=/^(?:button|input|object|select|textarea)$/i,j=/^a(?:rea)?$/i,f=/:|^on/,m=/\r/g,p={},n={val:1,css:1,html:1,text:1,data:1,width:1,height:1,
offset:1,scrollTop:1,scrollLeft:1},o={tabindex:{get:function(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?parseInt(b.value,10):k.test(a.nodeName)||j.test(a.nodeName)&&a.href?0:h}}},q={hidefocus:"hideFocus",tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},t={get:function(a,
c){return b.prop(a,c)?c.toLowerCase():h},set:function(a,c,f){!1===c?b.removeAttr(a,f):(c=q[f]||f,c in a&&(a[c]=!0),a.setAttribute(f,f.toLowerCase()));return f}},r={},s={},u={select:{get:function(a){var c=a.selectedIndex,f=a.options,e;if(0>c)return null;if("select-one"===a.type)return b.val(f[c]);a=[];c=0;for(e=f.length;c<e;++c)f[c].selected&&a.push(b.val(f[c]));return a},set:function(c,f){var e=a.makeArray(f);a.each(c.options,function(c){c.selected=a.inArray(b.val(c),e)});e.length||(c.selectedIndex=
-1);return e}}};a.each(["radio","checkbox"],function(c){u[c]={get:function(a){return null===a.getAttribute("value")?"on":a.value},set:function(c,f){if(a.isArray(f))return c.checked=a.inArray(b.val(c),f)}}});o.style={get:function(a){return a.style.cssText}};a.mix(b,{_valHooks:u,_propFix:q,_attrHooks:o,_propHooks:r,_attrNodeHook:s,_attrFix:p,prop:function(c,f,e){var d=b.query(c),k,j;if(a.isPlainObject(f))return a.each(f,function(a,c){b.prop(d,c,a)}),h;f=q[f]||f;j=r[f];if(e!==h)for(c=d.length-1;0<=c;c--)k=
d[c],j&&j.set?j.set(k,e,f):k[f]=e;else if(d.length)return i(d[0],f);return h},hasProp:function(a,c){var f=b.query(a),e,d=f.length,k;for(e=0;e<d;e++)if(k=f[e],i(k,c)!==h)return!0;return!1},removeProp:function(a,c){var c=q[c]||c,f=b.query(a),e,d;for(e=f.length-1;0<=e;e--){d=f[e];try{d[c]=h,delete d[c]}catch(k){}}},attr:function(d,k,j,g){var m=b.query(d),i=m[0];if(a.isPlainObject(k)){var g=j,q;for(q in k)b.attr(m,q,k[q],g);return h}if(!(k=a.trim(k)))return h;if(g&&n[k])return b[k](d,j);k=k.toLowerCase();
if(g&&n[k])return b[k](d,j);k=p[k]||k;d=l.test(k)?t:f.test(k)?s:o[k];if(j===h){if(i&&i.nodeType===e.ELEMENT_NODE){"form"==c(i)&&(d=s);if(d&&d.get)return d.get(i,k);k=i.getAttribute(k);return null===k?h:k}}else for(g=m.length-1;0<=g;g--)if((i=m[g])&&i.nodeType===e.ELEMENT_NODE)"form"==c(i)&&(d=s),d&&d.set?d.set(i,j,k):i.setAttribute(k,""+j);return h},removeAttr:function(a,c){var c=c.toLowerCase(),c=p[c]||c,f=b.query(a),d,k,j;for(j=f.length-1;0<=j;j--)if(k=f[j],k.nodeType==e.ELEMENT_NODE&&(k.removeAttribute(c),
l.test(c)&&(d=q[c]||c)in k))k[d]=!1},hasAttr:d&&!d.hasAttribute?function(a,c){var c=c.toLowerCase(),f=b.query(a),d,e;for(d=0;d<f.length;d++)if(e=f[d],(e=e.getAttributeNode(c))&&e.specified)return!0;return!1}:function(a,c){var f=b.query(a),d,e=f.length;for(d=0;d<e;d++)if(f[d].hasAttribute(c))return!0;return!1},val:function(f,d){var e,k,j,g,l;if(d===h){if(j=b.get(f)){if((e=u[c(j)]||u[j.type])&&"get"in e&&(k=e.get(j,"value"))!==h)return k;k=j.value;return"string"===typeof k?k.replace(m,""):null==k?"":
k}return h}k=b.query(f);for(g=k.length-1;0<=g;g--){j=k[g];if(1!==j.nodeType)break;l=d;null==l?l="":"number"===typeof l?l+="":a.isArray(l)&&(l=a.map(l,function(a){return a==null?"":a+""}));e=u[c(j)]||u[j.type];if(!e||!("set"in e)||e.set(j,l,"value")===h)j.value=l}return h},text:function(a,c){var f,d,k;if(c===h){f=b.get(a);if(f.nodeType==e.ELEMENT_NODE)return f[g]||"";if(f.nodeType==e.TEXT_NODE)return f.nodeValue}else{d=b.query(a);for(k=d.length-1;0<=k;k--)f=d[k],f.nodeType==e.ELEMENT_NODE?f[g]=c:f.nodeType==
e.TEXT_NODE&&(f.nodeValue=c)}return h}});return b},{requires:["./api"]});KISSY.add("dom/base",function(a,b){a.mix(a,{DOM:b,get:b.get,query:b.query});return b},{requires:"./base/api,./base/attr,./base/class,./base/create,./base/data,./base/insertion,./base/offset,./base/style,./base/selector,./base/traversal".split(",")});
KISSY.add("dom/base/class",function(a,b,h){function i(c,g,k,j){if(!(g=a.trim(g)))return j?!1:h;var c=b.query(c),f=c.length,m=g.split(e),g=[],i,n;for(n=0;n<m.length;n++)(i=a.trim(m[n]))&&g.push(i);for(n=0;n<f;n++)if(m=c[n],m.nodeType==d.ELEMENT_NODE&&(m=k(m,g,g.length),m!==h))return m;return j?!1:h}var d=b.NodeType,e=/[\.\s]\s*\.?/,g=/[\n\t]/g;a.mix(b,{hasClass:function(a,b){return i(a,b,function(a,b,c){var a=a.className,d,e;if(a){a=(" "+a+" ").replace(g," ");d=0;for(e=!0;d<c;d++)if(0>a.indexOf(" "+
b[d]+" ")){e=!1;break}if(e)return!0}},!0)},addClass:function(b,d){i(b,d,function(b,c,f){var e=b.className,h,i;if(e){h=(" "+e+" ").replace(g," ");for(i=0;i<f;i++)0>h.indexOf(" "+c[i]+" ")&&(e+=" "+c[i]);b.className=a.trim(e)}else b.className=d},h)},removeClass:function(b,d){i(b,d,function(b,c,f){var d=b.className,e,h;if(d)if(f){d=(" "+d+" ").replace(g," ");for(e=0;e<f;e++)for(h=" "+c[e]+" ";0<=d.indexOf(h);)d=d.replace(h," ");b.className=a.trim(d)}else b.className=""},h)},replaceClass:function(a,d,
e){b.removeClass(a,d);b.addClass(a,e)},toggleClass:function(c,d,e){var j=a.isBoolean(e),f,g;i(c,d,function(a,c,h){for(g=0;g<h;g++)d=c[g],f=j?!e:b.hasClass(a,d),b[f?"removeClass":"addClass"](a,d)},h)}});return b},{requires:["./api"]});
KISSY.add("dom/base/create",function(a,b,h){function i(c){var f=a.require("event/dom");f&&f.detach(c);b.removeData(c)}function d(a,b){var c=b&&b!=l?b.createElement(f):m;c.innerHTML="m<div>"+a+"</div>";return c.lastChild}function e(a,b,c){var f=b.nodeType;if(f==k.DOCUMENT_FRAGMENT_NODE){b=b.childNodes;c=c.childNodes;for(f=0;b[f];)c[f]&&e(a,b[f],c[f]),f++}else if(f==k.ELEMENT_NODE){b=b.getElementsByTagName("*");c=c.getElementsByTagName("*");for(f=0;b[f];)c[f]&&a(b[f],c[f]),f++}}function g(c,f){var d=
a.require("event/dom"),e,j;if(f.nodeType!=k.ELEMENT_NODE||b.hasData(c)){e=b.data(c);for(j in e)b.data(f,j,e[j]);d&&(d._DOMUtils.removeData(f),d._clone(c,f))}}function c(b){var c=null,f,d;if(b&&(b.push||b.item)&&b[0]){c=b[0].ownerDocument;c=c.createDocumentFragment();b=a.makeArray(b);f=0;for(d=b.length;f<d;f++)c.appendChild(b[f])}return c}var l=a.Env.host.document,k=b.NodeType,j=a.UA.ie,f="div",m=l&&l.createElement(f),p=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,n=/<([\w:]+)/,
o=/^\s+/,q=j&&9>j,t=/<|&#?\w+;/,r=l&&"outerHTML"in l.documentElement,s=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;a.mix(b,{create:function(e,j,g,m){var i=null;if(!e)return i;if(e.nodeType)return b.clone(e);if("string"!=typeof e)return i;m===h&&(m=!0);m&&(e=a.trim(e));var m=b._creators,r,y,g=g||l,u,v=f;if(t.test(e))if(u=s.exec(e))i=g.createElement(u[1]);else{e=e.replace(p,"<$1></$2>");if((u=n.exec(e))&&(r=u[1]))v=r.toLowerCase();r=(m[v]||d)(e,g);q&&(y=e.match(o))&&r.insertBefore(g.createTextNode(y[0]),r.firstChild);
e=r.childNodes;1===e.length?i=e[0].parentNode.removeChild(e[0]):e.length&&(i=c(e))}else i=g.createTextNode(e);a.isPlainObject(j)&&(i.nodeType==k.ELEMENT_NODE?b.attr(i,j,!0):i.nodeType==k.DOCUMENT_FRAGMENT_NODE&&b.attr(i.childNodes,j,!0));return i},_fixCloneAttributes:null,_creators:{div:d},_defaultCreator:d,html:function(a,c,f,e){var a=b.query(a),d=a[0],j=!1,g,m;if(d){if(c===h)return d.nodeType==k.ELEMENT_NODE?d.innerHTML:null;c+="";if(!c.match(/<(?:script|style|link)/i)&&(!q||!c.match(o))&&!w[(c.match(n)||
["",""])[1].toLowerCase()])try{for(g=a.length-1;0<=g;g--)m=a[g],m.nodeType==k.ELEMENT_NODE&&(i(m.getElementsByTagName("*")),m.innerHTML=c);j=!0}catch(l){}j||(c=b.create(c,0,d.ownerDocument,0),b.empty(a),b.append(c,a,f));e&&e()}},outerHTML:function(a,c,e){var d=b.query(a),j=d.length;if(a=d[0]){if(c===h){if(r)return a.outerHTML;c=(c=a.ownerDocument)&&c!=l?c.createElement(f):m;c.innerHTML="";c.appendChild(b.clone(a,!0));return c.innerHTML}c+="";if(!c.match(/<(?:script|style|link)/i)&&r)for(e=j-1;0<=
e;e--)a=d[e],a.nodeType==k.ELEMENT_NODE&&(i(a),i(a.getElementsByTagName("*")),a.outerHTML=c);else a=b.create(c,0,a.ownerDocument,0),b.insertBefore(a,d,e),b.remove(d)}},remove:function(a,c){var f,e=b.query(a),d,j;for(j=e.length-1;0<=j;j--)f=e[j],!c&&f.nodeType==k.ELEMENT_NODE&&(d=f.getElementsByTagName("*"),i(d),i(f)),f.parentNode&&f.parentNode.removeChild(f)},clone:function(a,c,f,d){"object"===typeof c&&(d=c.deepWithDataAndEvent,f=c.withDataAndEvent,c=c.deep);var a=b.get(a),j,h=b._fixCloneAttributes,
m;if(!a)return null;m=a.nodeType;j=a.cloneNode(c);if(m==k.ELEMENT_NODE||m==k.DOCUMENT_FRAGMENT_NODE)h&&m==k.ELEMENT_NODE&&h(a,j),c&&h&&e(h,a,j);f&&(g(a,j),c&&d&&e(g,a,j));return j},empty:function(a){var a=b.query(a),c,f;for(f=a.length-1;0<=f;f--)c=a[f],b.remove(c.childNodes)},_nodeListToFragment:c});var u=b._creators,v=b.create,w={option:"select",optgroup:"select",area:"map",thead:"table",td:"tr",th:"tr",tr:"tbody",tbody:"table",tfoot:"table",caption:"table",colgroup:"table",col:"colgroup",legend:"fieldset"},
y;for(y in w)(function(a){u[y]=function(b,c){return v("<"+a+">"+b+"</"+a+">",null,c)}})(w[y]);return b},{requires:["./api"]});
KISSY.add("dom/base/data",function(a,b,h){var i=a.Env.host,d="__ks_data_"+a.now(),e={},g={},c={applet:1,object:1,embed:1},l={hasData:function(b,c){if(b)if(c!==h){if(c in b)return!0}else if(!a.isEmptyObject(b))return!0;return!1}},k={hasData:function(a,b){return a==i?k.hasData(g,b):l.hasData(a[d],b)},data:function(a,b,c){if(a==i)return k.data(g,b,c);var e=a[d];if(c!==h)e=a[d]=a[d]||{},e[b]=c;else return b!==h?e&&e[b]:e=a[d]=a[d]||{}},removeData:function(b,c){if(b==i)return k.removeData(g,c);var e=b[d];
if(c!==h)delete e[c],a.isEmptyObject(e)&&k.removeData(b);else try{delete b[d]}catch(j){b[d]=h}}},j={hasData:function(a,b){var c=a[d];return!c?!1:l.hasData(e[c],b)},data:function(b,k,j){if(c[b.nodeName.toLowerCase()])return h;var g=b[d];if(!g){if(k!==h&&j===h)return h;g=b[d]=a.guid()}b=e[g];if(j!==h)b=e[g]=e[g]||{},b[k]=j;else return k!==h?b&&b[k]:b=e[g]=e[g]||{}},removeData:function(b,c){var k=b[d],g;if(k)if(g=e[k],c!==h)delete g[c],a.isEmptyObject(g)&&j.removeData(b);else{delete e[k];try{delete b[d]}catch(l){b[d]=
h}b.removeAttribute&&b.removeAttribute(d)}}};a.mix(b,{__EXPANDO:d,hasData:function(a,c){for(var e=!1,d=b.query(a),g=0;g<d.length&&!(e=d[g],e=e.nodeType?j.hasData(e,c):k.hasData(e,c));g++);return e},data:function(c,e,d){var c=b.query(c),g=c[0];if(a.isPlainObject(e)){for(var l in e)b.data(c,l,e[l]);return h}if(d===h){if(g)return g.nodeType?j.data(g,e):k.data(g,e)}else for(l=c.length-1;0<=l;l--)g=c[l],g.nodeType?j.data(g,e,d):k.data(g,e,d);return h},removeData:function(a,c){var e=b.query(a),d,g;for(g=
e.length-1;0<=g;g--)d=e[g],d.nodeType?j.removeData(d,c):k.removeData(d,c)}});return b},{requires:["./api"]});
KISSY.add("dom/base/insertion",function(a,b){function h(a,b){var d=[],i,o,q;for(i=0;a[i];i++)if(o=a[i],q=c(o),o.nodeType==e.DOCUMENT_FRAGMENT_NODE)d.push.apply(d,h(l(o.childNodes),b));else if("script"===q&&(!o.type||j.test(o.type)))o.parentNode&&o.parentNode.removeChild(o),b&&b.push(o);else{if(o.nodeType==e.ELEMENT_NODE&&!g.test(q)){q=[];var t,r,s=o.getElementsByTagName("script");for(r=0;r<s.length;r++)t=s[r],(!t.type||j.test(t.type))&&q.push(t);k.apply(a,[i+1,0].concat(q))}d.push(o)}return d}function i(b){b.src?
a.getScript(b.src):(b=a.trim(b.text||b.textContent||b.innerHTML||""))&&a.globalEval(b)}function d(c,e,d,k){c=b.query(c);k&&(k=[]);c=h(c,k);b._fixInsertionChecked&&b._fixInsertionChecked(c);var e=b.query(e),j,g,l,r,s=e.length;if((c.length||k&&k.length)&&s){c=b._nodeListToFragment(c);1<s&&(r=b.clone(c,!0),e=a.makeArray(e));for(j=0;j<s;j++)g=e[j],c&&(l=0<j?b.clone(r,!0):c,d(l,g)),k&&k.length&&a.each(k,i)}}var e=b.NodeType,g=/^(?:button|input|object|select|textarea)$/i,c=b.nodeName,l=a.makeArray,k=[].splice,
j=/\/(java|ecma)script/i;a.mix(b,{_fixInsertionChecked:null,insertBefore:function(a,b,c){d(a,b,function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b)},c)},insertAfter:function(a,b,c){d(a,b,function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b.nextSibling)},c)},appendTo:function(a,b,c){d(a,b,function(a,b){b.appendChild(a)},c)},prependTo:function(a,b,c){d(a,b,function(a,b){b.insertBefore(a,b.firstChild)},c)},wrapAll:function(a,c){c=b.clone(b.get(c),!0);a=b.query(a);a[0].parentNode&&b.insertBefore(c,
a[0]);for(var e;(e=c.firstChild)&&1==e.nodeType;)c=e;b.appendTo(a,c)},wrap:function(c,e){c=b.query(c);e=b.get(e);a.each(c,function(a){b.wrapAll(a,e)})},wrapInner:function(c,e){c=b.query(c);e=b.get(e);a.each(c,function(a){var c=a.childNodes;c.length?b.wrapAll(c,e):a.appendChild(e)})},unwrap:function(c){c=b.query(c);a.each(c,function(a){a=a.parentNode;b.replaceWith(a,a.childNodes)})},replaceWith:function(a,c){var e=b.query(a),c=b.query(c);b.remove(c,!0);b.insertBefore(c,e);b.remove(e)}});a.each({prepend:"prependTo",
append:"appendTo",before:"insertBefore",after:"insertAfter"},function(a,c){b[c]=b[a]});return b},{requires:["./api"]});
KISSY.add("dom/base/offset",function(a,b,h){function i(a){var b,c=a.ownerDocument.body;if(!a.getBoundingClientRect)return{left:0,top:0};b=a.getBoundingClientRect();a=b[p];b=b[n];a-=l.clientLeft||c.clientLeft||0;b-=l.clientTop||c.clientTop||0;return{left:a,top:b}}function d(a,c){var e={left:0,top:0},f=k(a[m]),d,j=a,c=c||f;do{if(f==c){var g=j;d=i(g);g=k(g[m]);d.left+=b[q](g);d.top+=b[t](g)}else d=i(j);e.left+=d.left;e.top+=d.top}while(f&&f!=c&&(j=f.frameElement)&&(f=f.parent));return e}var e=a.Env.host,
g=e.document,c=b.NodeType,l=g&&g.documentElement,k=b.getWindow,j=Math.max,f=parseInt,m="ownerDocument",p="left",n="top",o=a.isNumber,q="scrollLeft",t="scrollTop";a.mix(b,{offset:function(a,c,e){if(c===h){var a=b.get(a),k;a&&(k=d(a,e));return k}e=b.query(a);for(k=e.length-1;0<=k;k--){var a=e[k],j=c;"static"===b.css(a,"position")&&(a.style.position="relative");var g=d(a),l={},i=void 0,m=void 0;for(m in j)i=f(b.css(a,m),10)||0,l[m]=i+j[m]-g[m];b.css(a,l)}return h},scrollIntoView:function(a,e,d,j,g){var l,
i,m;if(i=b.get(a)){e&&(e=b.get(e));e||(e=i.ownerDocument);!0!==g&&(j=j===h?!0:!!j,d=d===h?!0:!!d);e.nodeType==c.DOCUMENT_NODE&&(e=k(e));m=!!k(e);g=b.offset(i);a=b.outerHeight(i);l=b.outerWidth(i);var o,q,t,x;m?(i=e,o=b.height(i),q=b.width(i),x={left:b.scrollLeft(i),top:b.scrollTop(i)},i=g[p]-x[p],m=g[n]-x[n],l=g[p]+l-(x[p]+q),g=g[n]+a-(x[n]+o)):(o=b.offset(e),q=e.clientHeight,t=e.clientWidth,x={left:b.scrollLeft(e),top:b.scrollTop(e)},i=g[p]-o[p]-(f(b.css(e,"borderLeftWidth"))||0),m=g[n]-o[n]-(f(b.css(e,
"borderTopWidth"))||0),l=g[p]+l-(o[p]+t+(f(b.css(e,"borderRightWidth"))||0)),g=g[n]+a-(o[n]+q+(f(b.css(e,"borderBottomWidth"))||0)));if(0>m||0<g)!0===d?b.scrollTop(e,x.top+m):!1===d?b.scrollTop(e,x.top+g):0>m?b.scrollTop(e,x.top+m):b.scrollTop(e,x.top+g);if(j&&(0>i||0<l))!0===d?b.scrollLeft(e,x.left+i):!1===d?b.scrollLeft(e,x.left+l):0>i?b.scrollLeft(e,x.left+i):b.scrollLeft(e,x.left+l)}},docWidth:0,docHeight:0,viewportHeight:0,viewportWidth:0,scrollTop:0,scrollLeft:0});a.each(["Left","Top"],function(a,
d){var f="scroll"+a;b[f]=function(j,g){if(o(j))return arguments.callee(e,j);var j=b.get(j),l,i,m,p=k(j);p?g!==h?(g=parseFloat(g),i="Left"==a?g:b.scrollLeft(p),m="Top"==a?g:b.scrollTop(p),p.scrollTo(i,m)):(l=p["page"+(d?"Y":"X")+"Offset"],o(l)||(i=p.document,l=i.documentElement[f],o(l)||(l=i.body[f]))):j.nodeType==c.ELEMENT_NODE&&(g!==h?j[f]=parseFloat(g):l=j[f]);return l}});a.each(["Width","Height"],function(a){b["doc"+a]=function(c){c=b.get(c);c=k(c).document;return j(c.documentElement["scroll"+
a],c.body["scroll"+a],b["viewport"+a](c))};b["viewport"+a]=function(c){var c=b.get(c),e="client"+a,c=k(c).document,f=c.body,d=c.documentElement[e];return"CSS1Compat"===c.compatMode&&d||f&&f[e]||d}});return b},{requires:["./api"]});
KISSY.add("dom/base/selector",function(a,b,h){function i(a){var b,c;for(c=0;c<this.length&&!(b=this[c],!1===a(b,c));c++);}function d(c,f){var j,l,p="string"==typeof c,o=f==h&&(l=1)?[k]:d(f);c?p?(c=s(c),l&&"body"==c?j=[k.body]:1==o.length&&c&&(j=g(c,o[0]))):l&&(j=c.nodeType||c.setTimeout?[c]:c.getDOMNodes?c.getDOMNodes():m(c)?c:n(c)?a.makeArray(c):[c]):j=[];if(!j&&(j=[],c)){for(l=0;l<o.length;l++)q.apply(j,e(c,o[l]));1<j.length&&(1<o.length||p&&-1<c.indexOf(r))&&b.unique(j)}j.each=i;return j}function e(b,
f){var d="string"==typeof b;if(d&&b.match(w)||!d)d=c(b,f);else if(d&&-1<b.replace(/"(?:(?:\\.)|[^"])*"/g,"").replace(/'(?:(?:\\.)|[^'])*'/g,"").indexOf(r)){var d=[],j,k=b.split(/\s*,\s*/);for(j=0;j<k.length;j++)q.apply(d,e(k[j],f))}else d=[],(j=a.require("sizzle"))&&j(b,f,d);return d}function g(a,c){var e,d,f,j;if(v.test(a))e=(d=l(a.slice(1),c))?[d]:[];else if(f=w.exec(a)){d=f[1];j=f[2];f=f[3];if(c=d?l(d,c):c)f?!d||-1!=a.indexOf(t)?e=[].concat(b._getElementsByClassName(f,j,c)):(d=l(d,c))&&b.hasClass(d,
f)&&(e=[d]):j&&(e=p(b._getElementsByTagName(j,c)));e=e||[]}return e}function c(a,c){var e;"string"==typeof a?e=g(a,c)||[]:m(a)||n(a)?e=f(a,function(a){return!a?!1:c==k?!0:b.contains(c,a)}):(!a?0:c==k||b.contains(c,a))&&(e=[a]);return e}function l(a,c){var e=c.nodeType==j.DOCUMENT_NODE,d=e?c:c.ownerDocument,f=b._getElementById(a,d);if(f&&!e)return b.contains(c,f)?f:null;!f&&!e&&!b.contains(c,d)&&(f=b.filter(u,"#"+a,c)[0]||null);return f}var k=a.Env.host.document,j=b.NodeType,f=a.filter,m=a.isArray,
p=a.makeArray,n=b._isNodeList,o=b.nodeName,q=Array.prototype.push,t=" ",r=",",s=a.trim,u="*",v=/^#[\w-]+$/,w=/^(?:#([\w-]+))?\s*([\w-]+|\*)?\.?([\w-]+)?$/;a.mix(b,{_getElementById:function(a,b){return b.getElementById(a)},_getElementsByTagName:function(a,b){return b.getElementsByTagName(a)},_getElementsByClassName:function(a,b,c){return p(c.querySelectorAll((b||"")+"."+a))},_compareNodeOrder:function(a,b){return!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:
a.compareDocumentPosition(b)&4?-1:1},query:d,get:function(a,b){return d(a,b)[0]||null},unique:function(){function a(e,f){return e==f?(c=!0,0):b._compareNodeOrder(e,f)}var c,e=!0;[0,0].sort(function(){e=!1;return 0});return function(b){c=e;b.sort(a);if(c)for(var f=1,d=b.length;f<d;)b[f]===b[f-1]?b.splice(f,1):f++;return b}}(),filter:function(c,e,f){var c=d(c,f),f=a.require("sizzle"),j,k,g,h,l=[];if("string"==typeof e&&(e=s(e))&&(j=w.exec(e)))g=j[1],k=j[2],h=j[3],g?g&&!k&&!h&&(e=function(a){return b.attr(a,
"id")==g}):e=function(a){var c=!0,e=!0;k&&(c=o(a)==k.toLowerCase());h&&(e=b.hasClass(a,h));return e&&c};a.isFunction(e)?l=a.filter(c,e):e&&f&&(l=f.matches(e,c));return l},test:function(a,c,e){a=d(a,e);return a.length&&b.filter(a,c,e).length===a.length}});return b},{requires:["./api"]});
KISSY.add("dom/base/style",function(a,b,h){function i(a){return a.replace(r,"ms-").replace(s,u)}function d(a,b,c){var e={},f;for(f in b)e[f]=a[m][f],a[m][f]=b[f];c.call(a);for(f in b)a[m][f]=e[f]}function e(a,b,c){var e,f,d;if(3===a.nodeType||8===a.nodeType||!(e=a[m]))return h;b=i(b);d=z[b];b=A[b]||b;if(c!==h){null===c||c===w?c=w:!isNaN(Number(c))&&!t[b]&&(c+=y);d&&d.set&&(c=d.set(a,c));if(c!==h){try{e[b]=c}catch(j){}c===w&&e.removeAttribute&&e.removeAttribute(b)}e.cssText||a.removeAttribute("style");
return h}if(!d||!("get"in d&&(f=d.get(a,!1))!==h))f=e[b];return f===h?"":f}function g(a){var b,e=arguments;0!==a.offsetWidth?b=c.apply(h,e):d(a,D,function(){b=c.apply(h,e)});return b}function c(c,e,f){if(a.isWindow(c))return e==n?b.viewportWidth(c):b.viewportHeight(c);if(9==c.nodeType)return e==n?b.docWidth(c):b.docHeight(c);var d=e===n?["Left","Right"]:["Top","Bottom"],j=e===n?c.offsetWidth:c.offsetHeight;if(0<j)return"border"!==f&&a.each(d,function(a){f||(j-=parseFloat(b.css(c,"padding"+a))||0);
j="margin"===f?j+(parseFloat(b.css(c,f+a))||0):j-(parseFloat(b.css(c,"border"+a+"Width"))||0)}),j;j=b._getComputedStyle(c,e);if(null==j||0>Number(j))j=c.style[e]||0;j=parseFloat(j)||0;f&&a.each(d,function(a){j+=parseFloat(b.css(c,"padding"+a))||0;"padding"!==f&&(j+=parseFloat(b.css(c,"border"+a+"Width"))||0);"margin"===f&&(j+=parseFloat(b.css(c,f+a))||0)});return j}var l=a.Env.host,k=a.UA,j=b.nodeName,f=l.document,m="style",p=/^margin/,n="width",o="display"+a.now(),q=parseInt,t={fillOpacity:1,fontWeight:1,
lineHeight:1,opacity:1,orphans:1,widows:1,zIndex:1,zoom:1},r=/^-ms-/,s=/-([a-z])/ig,u=function(a,b){return b.toUpperCase()},v=/([A-Z]|^ms)/g,w="",y="px",z={},A={},B={};A["float"]="cssFloat";a.mix(b,{_camelCase:i,_CUSTOM_STYLES:z,_cssProps:A,_getComputedStyle:function(a,c){var e="",f,d,j,k,g;d=a.ownerDocument;c=c.replace(v,"-$1").toLowerCase();if(f=d.defaultView.getComputedStyle(a,null))e=f.getPropertyValue(c)||f[c];""===e&&!b.contains(d,a)&&(c=A[c]||c,e=a[m][c]);b._RE_NUM_NO_PX.test(e)&&p.test(c)&&
(g=a.style,d=g.width,j=g.minWidth,k=g.maxWidth,g.minWidth=g.maxWidth=g.width=e,e=f.width,g.width=d,g.minWidth=j,g.maxWidth=k);return e},style:function(c,f,d){var c=b.query(c),j,k=c[0];if(a.isPlainObject(f)){for(j in f)for(k=c.length-1;0<=k;k--)e(c[k],j,f[j]);return h}if(d===h)return j="",k&&(j=e(k,f,d)),j;for(k=c.length-1;0<=k;k--)e(c[k],f,d);return h},css:function(c,f,d){var c=b.query(c),j=c[0],k;if(a.isPlainObject(f)){for(k in f)for(j=c.length-1;0<=j;j--)e(c[j],k,f[k]);return h}f=i(f);k=z[f];if(d===
h){d="";if(j&&(!k||!("get"in k&&(d=k.get(j,!0))!==h)))d=b._getComputedStyle(j,f);return d===h?"":d}for(j=c.length-1;0<=j;j--)e(c[j],f,d);return h},show:function(a){var a=b.query(a),c,e,d;for(d=a.length-1;0<=d;d--)if(e=a[d],e[m].display=b.data(e,o)||w,"none"===b.css(e,"display")){c=e.tagName.toLowerCase();var j=void 0,k=B[c],g=void 0;B[c]||(j=f.body||f.documentElement,g=f.createElement(c),b.prepend(g,j),k=b.css(g,"display"),j.removeChild(g),B[c]=k);c=k;b.data(e,o,c);e[m].display=c}},hide:function(a){var a=
b.query(a),c,e;for(e=a.length-1;0<=e;e--){c=a[e];var f=c[m],d=f.display;"none"!==d&&(d&&b.data(c,o,d),f.display="none")}},toggle:function(a){var a=b.query(a),c,e;for(e=a.length-1;0<=e;e--)c=a[e],"none"===b.css(c,"display")?b.show(c):b.hide(c)},addStyleSheet:function(a,c,e){a=a||l;"string"==typeof a&&(e=c,c=a,a=l);var a=b.get(a),a=b.getWindow(a).document,f;if(e&&(e=e.replace("#",w)))f=b.get("#"+e,a);f||(f=b.create("<style>"+c+"</style>",{id:e},a),b.get("head",a).appendChild(f))},unselectable:function(c){var c=
b.query(c),e,f,d=0,g,h;for(f=c.length-1;0<=f;f--)if(e=c[f],k.gecko)e[m].MozUserSelect="none";else if(k.webkit)e[m].KhtmlUserSelect="none";else if(k.ie||k.opera){h=e.getElementsByTagName("*");e.setAttribute("unselectable","on");for(g=["iframe","textarea","input","select"];e=h[d++];)a.inArray(j(e),g)||e.setAttribute("unselectable","on")}},innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0,width:0,height:0});a.each([n,"height"],function(c){b["inner"+a.ucfirst(c)]=function(a){return(a=b.get(a))&&g(a,
c,"padding")};b["outer"+a.ucfirst(c)]=function(a,e){var f=b.get(a);return f&&g(f,c,e?"margin":"border")};b[c]=function(a,e){var f=b.css(a,c,e);f&&(f=parseFloat(f));return f}});var D={position:"absolute",visibility:"hidden",display:"block"};a.each(["height","width"],function(a){z[a]={get:function(c,b){if(b)return g(c,a)+"px"}}});a.each(["left","top"],function(c){z[c]={get:function(e,d){if(d){var j=b._getComputedStyle(e,c);if("auto"===j){j=0;if(a.inArray(b.css(e,"position"),["absolute","fixed"])){j=
e["left"===c?"offsetLeft":"offsetTop"];if(k.ie&&9>(f.documentMode||0)||k.opera)j-=e.offsetParent&&e.offsetParent["client"+("left"==c?"Left":"Top")]||0;j-=q(b.css(e,"margin-"+c))||0}j+="px"}return j}}}});return b},{requires:["./api"]});
KISSY.add("dom/base/traversal",function(a,b,h){function i(c,e,k,j,f,i,p){if(!(c=b.get(c)))return null;if(0===e)return c;i||(c=c[k]);if(!c)return null;f=f&&b.get(f)||null;e===h&&(e=1);var i=[],n=a.isArray(e),o,q;a.isNumber(e)&&(o=0,q=e,e=function(){return++o===q});for(;c&&c!=f;){if((c.nodeType==g.ELEMENT_NODE||c.nodeType==g.TEXT_NODE&&p)&&d(c,e)&&(!j||j(c)))if(i.push(c),!n)break;c=c[k]}return n?i:i[0]||null}function d(c,e){if(!e)return!0;if(a.isArray(e)){var d,j=e.length;if(!j)return!0;for(d=0;d<j;d++)if(b.test(c,
e[d]))return!0}else if(b.test(c,e))return!0;return!1}function e(c,e,d,j){var f=[],h,i;if((h=c=b.get(c))&&d)h=c.parentNode;if(h){d=a.makeArray(h.childNodes);for(h=0;h<d.length;h++)i=d[h],(j||i.nodeType==g.ELEMENT_NODE)&&i!=c&&f.push(i);e&&(f=b.filter(f,e))}return f}var g=b.NodeType;a.mix(b,{_contains:function(a,b){return!!(a.compareDocumentPosition(b)&16)},closest:function(a,b,e,d){return i(a,b,"parentNode",function(a){return a.nodeType!=g.DOCUMENT_FRAGMENT_NODE},e,!0,d)},parent:function(a,b,e){return i(a,
b,"parentNode",function(a){return a.nodeType!=g.DOCUMENT_FRAGMENT_NODE},e,h)},first:function(a,e,d){a=b.get(a);return i(a&&a.firstChild,e,"nextSibling",h,h,!0,d)},last:function(a,e,d){a=b.get(a);return i(a&&a.lastChild,e,"previousSibling",h,h,!0,d)},next:function(a,b,e){return i(a,b,"nextSibling",h,h,h,e)},prev:function(a,b,e){return i(a,b,"previousSibling",h,h,h,e)},siblings:function(a,b,d){return e(a,b,!0,d)},children:function(a,b){return e(a,b,h)},contents:function(a,b){return e(a,b,h,1)},contains:function(a,
e){a=b.get(a);e=b.get(e);return a&&e?b._contains(a,e):!1},index:function(c,e){var d=b.query(c),j,f=0;j=d[0];if(!e){d=j&&j.parentNode;if(!d)return-1;for(;j=j.previousSibling;)j.nodeType==g.ELEMENT_NODE&&f++;return f}f=b.query(e);return"string"===typeof e?a.indexOf(j,f):a.indexOf(f[0],d)},equals:function(a,e){a=b.query(a);e=b.query(e);if(a.length!=e.length)return!1;for(var d=a.length;0<=d;d--)if(a[d]!=e[d])return!1;return!0}});return b},{requires:["./api"]});
KISSY.add("dom/ie/attr",function(a,b){var h=b._attrHooks,i=b._attrNodeHook,d=b.NodeType,e=b._valHooks,g=b._propFix;8>a.UA.ie&&(h.style.set=function(a,b){a.style.cssText=b},a.mix(i,{get:function(a,b){var e=a.getAttributeNode(b);return e&&(e.specified||e.nodeValue)?e.nodeValue:void 0},set:function(a,b,e){var d=a.getAttributeNode(e),f;if(d)d.nodeValue=b;else try{f=a.ownerDocument.createAttribute(e),f.value=b,a.setAttributeNode(f)}catch(g){return a.setAttribute(e,b,0)}}}),a.mix(b._attrFix,g),h.tabIndex=
h.tabindex,a.each("href,src,width,height,colSpan,rowSpan".split(","),function(a){h[a]={get:function(b){b=b.getAttribute(a,2);return b===null?void 0:b}}}),e.button=h.value=i,e.option={get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}});(h.href=h.href||{}).set=function(a,b,e){for(var j=a.childNodes,f,g=j.length,h=g>0,g=g-1;g>=0;g--)j[g].nodeType!=d.TEXT_NODE&&(h=0);if(h){f=a.ownerDocument.createElement("b");f.style.display="none";a.appendChild(f)}a.setAttribute(e,""+b);
f&&a.removeChild(f)};return b},{requires:["dom/base"]});
KISSY.add("dom/ie/create",function(a,b){b._fixCloneAttributes=function(a,d){d.clearAttributes&&d.clearAttributes();d.mergeAttributes&&d.mergeAttributes(a);var c=d.nodeName.toLowerCase(),h=a.childNodes;if("object"===c&&!d.childNodes.length)for(c=0;c<h.length;c++)d.appendChild(h[c].cloneNode(!0));else if("input"===c&&("checkbox"===a.type||"radio"===a.type)){if(a.checked&&(d.defaultChecked=d.checked=a.checked),d.value!==a.value)d.value=a.value}else if("option"===c)d.selected=a.defaultSelected;else if("input"===
c||"textarea"===c)d.defaultValue=a.defaultValue;d.removeAttribute(b.__EXPANDO)};var h=b._creators,i=b._defaultCreator,d=/<tbody/i;8>a.UA.ie&&(h.table=function(e,g){var c=i(e,g);if(d.test(e))return c;var h=c.firstChild,k=a.makeArray(h.childNodes);a.each(k,function(a){"tbody"==b.nodeName(a)&&!a.childNodes.length&&h.removeChild(a)});return c})},{requires:["dom/base"]});KISSY.add("dom/ie",function(a,b){return b},{requires:"./ie/attr,./ie/create,./ie/insertion,./ie/selector,./ie/style,./ie/traversal,./ie/input-selection".split(",")});
KISSY.add("dom/ie/input-selection",function(a,b){function h(a,b){var d=0,j=0,f=a.ownerDocument.selection.createRange(),g=i(a);g.inRange(f)&&(g.setEndPoint("EndToStart",f),d=e(a,g).length,b&&(j=d+e(a,f).length));return[d,j]}function i(a){if("textarea"==a.type){var b=a.document.body.createTextRange();b.moveToElementText(a);return b}return a.createTextRange()}function d(a,b,e){var d=Math.min(b,e),f=Math.max(b,e);return d==f?0:"textarea"==a.type?(a=a.value.substring(d,f).replace(/\r\n/g,"\n").length,
b>e&&(a=-a),a):e-b}function e(a,b){if("textarea"==a.type){var e=b.text,d=b.duplicate();if(0==d.compareEndPoints("StartToEnd",d))return e;d.moveEnd("character",-1);d.text==e&&(e+="\r\n");return e}return b.text}var g=b._propHooks;g.selectionStart={set:function(a,b){var e=a.ownerDocument.selection.createRange();if(i(a).inRange(e)){var j=h(a,1)[1],f=d(a,b,j);e.collapse(!1);e.moveStart("character",-f);b>j&&e.collapse(!0);e.select()}},get:function(a){return h(a)[0]}};g.selectionEnd={set:function(a,b){var e=
a.ownerDocument.selection.createRange();if(i(a).inRange(e)){var j=h(a)[0],f=d(a,j,b);e.collapse(!0);e.moveEnd("character",f);j>b&&e.collapse(!1);e.select()}},get:function(a){return h(a,1)[1]}}},{requires:["dom/base"]});
KISSY.add("dom/ie/insertion",function(a,b){8>a.UA.ie&&(b._fixInsertionChecked=function i(a){for(var e=0;e<a.length;e++){var g=a[e];if(g.nodeType==b.NodeType.DOCUMENT_FRAGMENT_NODE)i(g.childNodes);else if("input"==b.nodeName(g)){if("checkbox"===g.type||"radio"===g.type)g.defaultChecked=g.checked}else if(g.nodeType==b.NodeType.ELEMENT_NODE)for(var g=g.getElementsByTagName("input"),c=0;c<g.length;c++)i(g[c])}})},{requires:["dom/base"]});
KISSY.add("dom/ie/selector",function(a,b){var h=a.Env.host.document;b._compareNodeOrder=function(a,b){return a.sourceIndex-b.sourceIndex};h.querySelectorAll||(b._getElementsByClassName=function(a,d,e){if(!e)return[];for(var d=e.getElementsByTagName(d||"*"),e=[],g=0,c=d.length,h;g<c;++g)h=d[g],b.hasClass(h,a)&&e.push(h);return e});b._getElementsByTagName=function(b,d){var e=a.makeArray(d.getElementsByTagName(b)),g,c,h;if(b==="*"){g=[];for(c=0;h=e[c++];)h.nodeType===1&&g.push(h);e=g}return e};b._getElementById=
function(a,d){var e=d.getElementById(a);e&&b.attr(e,"id")!=a&&(e=b.filter("*","#"+a,d)[0]||null);return e}},{requires:["dom/base"]});
KISSY.add("dom/ie/style",function(a,b){var h=b._cssProps,i=a.UA,d=a.Env.host.document,d=d&&d.documentElement,e=/^(top|right|bottom|left)$/,g=b._CUSTOM_STYLES,c=/opacity\s*=\s*([^)]*)/,l=/alpha\([^)]*\)/i;h["float"]="styleFloat";g.backgroundPosition={get:function(a,b){return b?a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY:a.style.backgroundPosition}};try{null==d.style.opacity&&(g.opacity={get:function(a,b){return c.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||
"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(b,c){var c=parseFloat(c),e=b.style,d=b.currentStyle,j=isNaN(c)?"":"alpha(opacity="+100*c+")",k=a.trim(d&&d.filter||e.filter||"");e.zoom=1;if((1<=c||!j)&&!a.trim(k.replace(l,"")))if(e.removeAttribute("filter"),!j||d&&!d.filter)return;e.filter=l.test(k)?k.replace(l,j):k+(k?", ":"")+j}})}catch(k){}var i=8==i.ie,j={};j.thin=i?"1px":"2px";j.medium=i?"3px":"4px";j.thick=i?"5px":"6px";a.each(["","Top","Left","Right","Bottom"],function(a){var b="border"+
a+"Width",c="border"+a+"Style";g[b]={get:function(a,e){var d=e?a.currentStyle:0,f=d&&""+d[b]||void 0;f&&0>f.indexOf("px")&&(f=j[f]&&"none"!==d[c]?j[f]:0);return f}}});b._getComputedStyle=function(a,c){var c=h[c]||c,d=a.currentStyle&&a.currentStyle[c];if(b._RE_NUM_NO_PX.test(d)&&!e.test(c)){var j=a.style,k=j.left,g=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;j.left="fontSize"===c?"1em":d||0;d=j.pixelLeft+"px";j.left=k;a.runtimeStyle.left=g}return""===d?"auto":d}},{requires:["dom/base"]});
KISSY.add("dom/ie/traversal",function(a,b){b._contains=function(a,i){a.nodeType==b.NodeType.DOCUMENT_NODE&&(a=a.documentElement);i=i.parentNode;return a==i?!0:i&&i.nodeType==b.NodeType.ELEMENT_NODE?a.contains&&a.contains(i):!1}},{requires:["dom/base"]});KISSY.add("event/base",function(a,b,h,i,d){return a.Event={_Utils:b,_Object:h,_Observer:i,_ObservableEvent:d}},{requires:["./base/utils","./base/object","./base/observer","./base/observable"]});
KISSY.add("event/base/object",function(a){function b(){this.timeStamp=a.now()}var h=function(){return!1},i=function(){return!0};b.prototype={constructor:b,isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,preventDefault:function(){this.isDefaultPrevented=i},stopPropagation:function(){this.isPropagationStopped=i},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},halt:function(a){a?this.stopImmediatePropagation():this.stopPropagation();
this.preventDefault()}};return b});
KISSY.add("event/base/observable",function(a){function b(b){a.mix(this,b);this.reset()}b.prototype={constructor:b,hasObserver:function(){return!!this.observers.length},reset:function(){this.observers=[]},removeObserver:function(a){var b,d=this.observers,e=d.length;for(b=0;b<e;b++)if(d[b]==a){d.splice(b,1);break}this.checkMemory()},checkMemory:function(){},findObserver:function(a){var b=this.observers,d;for(d=b.length-1;0<=d;--d)if(a.equals(b[d]))return d;return-1}};return b});
KISSY.add("event/base/observer",function(a){function b(b){a.mix(this,b)}b.prototype={constructor:b,equals:function(b){var i=this;return!!a.reduce(i.keys,function(a,e){return a&&i[e]===b[e]},1)},simpleNotify:function(a,b){var d;d=this.fn.call(this.context||b.currentTarget,a,this.data);this.once&&b.removeObserver(this);return d},notifyInternal:function(a,b){return this.simpleNotify(a,b)},notify:function(a,b){var d;d=a._ks_groups;if(!d||this.groups&&this.groups.match(d))return d=this.notifyInternal(a,
b),!1===d&&a.halt(),d}};return b});
KISSY.add("event/base/utils",function(a){var b,h;return{splitAndRun:h=function(b,d){b=a.trim(b);-1==b.indexOf(" ")?d(b):a.each(b.split(/\s+/),d)},normalizeParam:function(h,d,e){var g=d||{},g=a.isFunction(d)?{fn:d,context:e}:a.merge(g),d=b(h),h=d[0];g.groups=d[1];g.type=h;return g},batchForType:function(b,d){var e=a.makeArray(arguments);h(e[2+d],function(a){var c=[].concat(e);c.splice(0,2);c[d]=a;b.apply(null,c)})},getTypedGroups:b=function(a){if(0>a.indexOf("."))return[a,""];var b=a.match(/([^.]+)?(\..+)?$/),
a=[b[1]];(b=b[2])?(b=b.split(".").sort(),a.push(b.join("."))):a.push("");return a},getGroupsRe:function(a){return RegExp(a.split(".").join(".*\\.")+"(?:\\.|$)")}}});
KISSY.add("event/custom/api-impl",function(a,b,h,i){var d=a.trim,e=h._Utils,g=e.splitAndRun;return a.mix(b,{fire:function(a,b,d){var j=void 0,d=d||{};g(b,function(b){var g,b=e.getTypedGroups(b);g=b[1];b=b[0];g&&(g=e.getGroupsRe(g),d._ks_groups=g);g=(i.getCustomEvent(a,b)||new i({currentTarget:a,type:b})).fire(d);!1!==j&&(j=g)});return j},publish:function(b,e,d){var j;g(e,function(e){j=i.getCustomEvent(b,e,1);a.mix(j,d)});return b},addTarget:function(c,e){var d=b.getTargets(c);a.inArray(e,d)||d.push(e);
return c},removeTarget:function(c,e){var d=b.getTargets(c),j=a.indexOf(e,d);-1!=j&&d.splice(j,1);return c},getTargets:function(a){a["__~ks_bubble_targets"]=a["__~ks_bubble_targets"]||[];return a["__~ks_bubble_targets"]},on:function(a,b,k,j){b=d(b);e.batchForType(function(b,d,j){d=e.normalizeParam(b,d,j);b=d.type;if(b=i.getCustomEvent(a,b,1))b.on(d)},0,b,k,j);return a},detach:function(b,g,k,j){g=d(g);e.batchForType(function(d,j,k){var g=e.normalizeParam(d,j,k);(d=g.type)?(d=i.getCustomEvent(b,d,1))&&
d.detach(g):(d=i.getCustomEvents(b),a.each(d,function(a){a.detach(g)}))},0,g,k,j);return b}})},{requires:["./api","event/base","./observable"]});KISSY.add("event/custom/api",function(){return{}});KISSY.add("event/custom",function(a,b,h,i){var d={};a.each(h,function(b,g){d[g]=function(){var c=a.makeArray(arguments);c.unshift(this);return b.apply(null,c)}});h=a.mix({_ObservableCustomEvent:i,Target:d},h);a.mix(b,{Target:d,custom:h});a.EventTarget=d;return h},{requires:["./base","./custom/api-impl","./custom/observable"]});
KISSY.add("event/custom/object",function(a,b){function h(b){h.superclass.constructor.call(this);a.mix(this,b)}a.extend(h,b._Object);return h},{requires:["event/base"]});
KISSY.add("event/custom/observable",function(a,b,h,i,d){function e(){e.superclass.constructor.apply(this,arguments);this.defaultFn=null;this.defaultTargetOnly=!1;this.bubbles=!0}var g=d._Utils;a.extend(e,d._ObservableEvent,{constructor:e,on:function(a){a=new h(a);-1==this.findObserver(a)&&this.observers.push(a)},checkMemory:function(){var b=this.currentTarget,d=e.getCustomEvents(b);d&&(this.hasObserver()||delete d[this.type],a.isEmptyObject(d)&&delete b[c])},fire:function(a){if(this.hasObserver()||
this.bubbles){var a=a||{},c=this.type,d=this.defaultFn,f,g,h;f=this.currentTarget;var n=a,o;a.type=c;n instanceof i||(n.target=f,n=new i(n));n.currentTarget=f;a=this.notify(n);!1!==o&&(o=a);if(this.bubbles){h=(g=b.getTargets(f))&&g.length||0;for(f=0;f<h&&!n.isPropagationStopped();f++)a=b.fire(g[f],c,n),!1!==o&&(o=a)}d&&!n.isDefaultPrevented()&&(c=e.getCustomEvent(n.target,n.type),(!this.defaultTargetOnly&&!c.defaultTargetOnly||this==n.target)&&d.call(this));return o}},notify:function(a){var b=this.observers,
c,e,d=b.length,g;for(g=0;g<d&&!a.isImmediatePropagationStopped();g++)c=b[g].notify(a,this),!1!==e&&(e=c),!1===c&&a.halt();return e},detach:function(a){var b,c=a.fn,e=a.context,d=this.currentTarget,h=this.observers,a=a.groups;if(h.length){a&&(b=g.getGroupsRe(a));var i,o,q,t,r=h.length;if(c||b){e=e||d;i=a=0;for(o=[];a<r;++a)if(q=h[a],t=q.context||d,e!=t||c&&c!=q.fn||b&&!q.groups.match(b))o[i++]=q;this.observers=o}else this.reset();this.checkMemory()}}});var c="__~ks_custom_events";e.getCustomEvent=
function(a,b,c){var d,g=e.getCustomEvents(a,c);d=g&&g[b];!d&&c&&(d=g[b]=new e({currentTarget:a,type:b}));return d};e.getCustomEvents=function(a,b){!a[c]&&b&&(a[c]={});return a[c]};return e},{requires:["./api","./observer","./object","event/base"]});KISSY.add("event/custom/observer",function(a,b){function h(){h.superclass.constructor.apply(this,arguments)}a.extend(h,b._Observer,{keys:["fn","context","groups"]});return h},{requires:["event/base"]});
KISSY.add("event/dom/base/api",function(a,b,h,i,d,e,g){function c(a,b){var c=i[b]||{};a.originalType||(a.selector?c.delegateFix&&(a.originalType=b,b=c.delegateFix):c.onFix&&(a.originalType=b,b=c.onFix));return b}function l(b,d,k){var h,i,l,k=a.merge(k),d=c(k,d);h=e.getCustomEvents(b,1);if(!(l=h.handle))l=h.handle=function(a){var b=a.type,c=l.currentTarget;if(!(e.triggeredEvent==b||"undefined"==typeof KISSY))if(b=e.getCustomEvent(c,b))return a.currentTarget=c,a=new g(a),b.notify(a)},l.currentTarget=
b;if(!(i=h.events))i=h.events={};h=i[d];h||(h=i[d]=new e({type:d,fn:l,currentTarget:b}),h.setup());h.on(k);b=null}var k=b._Utils;a.mix(b,{add:function(b,c,e,d){c=a.trim(c);b=h.query(b);k.batchForType(function(a,b,c,e){c=k.normalizeParam(b,c,e);b=c.type;for(e=a.length-1;0<=e;e--)l(a[e],b,c)},1,b,c,e,d);return b},remove:function(b,d,g,i){d=a.trim(d);b=h.query(b);k.batchForType(function(b,d,f,j){f=k.normalizeParam(d,f,j);d=f.type;for(j=b.length-1;0<=j;j--){var g=b[j],h=d,i=f,i=a.merge(i),l=void 0,h=
c(i,h),g=e.getCustomEvents(g),l=(g||{}).events;if(g&&l)if(h)(l=l[h])&&l.detach(i);else for(h in l)l[h].detach(i)}},1,b,d,g,i);return b},delegate:function(a,c,e,d,g){return b.add(a,c,{fn:d,context:g,selector:e})},undelegate:function(a,c,e,d,g){return b.remove(a,c,{fn:d,context:g,selector:e})},fire:function(b,c,d,g){var i=void 0,d=d||{};d.synthetic=1;k.splitAndRun(c,function(c){d.type=c;var f,l,r,c=k.getTypedGroups(c);(l=c[1])&&(l=k.getGroupsRe(l));c=c[0];a.mix(d,{type:c,_ks_groups:l});b=h.query(b);
for(l=b.length-1;0<=l;l--)f=b[l],r=e.getCustomEvent(f,c),!g&&!r&&(r=new e({type:c,currentTarget:f})),r&&(f=r.fire(d,g),!1!==i&&(i=f))});return i},fireHandler:function(a,c,e){return b.fire(a,c,e,1)},_clone:function(b,c){var d;(d=e.getCustomEvents(b))&&a.each(d.events,function(b,e){a.each(b.observers,function(a){l(c,e,a)})})},_ObservableDOMEvent:e});b.on=b.add;b.detach=b.remove;return b},{requires:"event/base,dom,./special,./utils,./observable,./object".split(",")});
KISSY.add("event/dom/base",function(a,b,h,i,d,e){a.mix(b,{KeyCodes:h,_DOMUtils:i,Gesture:d,_Special:e});return b},{requires:"event/base,./base/key-codes,./base/utils,./base/gesture,./base/special,./base/api,./base/mouseenter,./base/mousewheel,./base/valuechange".split(",")});KISSY.add("event/dom/base/gesture",function(){return{start:"mousedown",move:"mousemove",end:"mouseup",tap:"click",doubleTap:"dblclick"}});
KISSY.add("event/dom/base/key-codes",function(a){var b=a.UA,h={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,
Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,
WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(a){if(a.altKey&&!a.ctrlKey||a.metaKey||a.keyCode>=h.F1&&a.keyCode<=h.F12)return!1;switch(a.keyCode){case h.ALT:case h.CAPS_LOCK:case h.CONTEXT_MENU:case h.CTRL:case h.DOWN:case h.END:case h.ESC:case h.HOME:case h.INSERT:case h.LEFT:case h.MAC_FF_META:case h.META:case h.NUMLOCK:case h.NUM_CENTER:case h.PAGE_DOWN:case h.PAGE_UP:case h.PAUSE:case h.PRINT_SCREEN:case h.RIGHT:case h.SHIFT:case h.UP:case h.WIN_KEY:case h.WIN_KEY_RIGHT:return!1;
default:return!0}},isCharacterKey:function(a){if(a>=h.ZERO&&a<=h.NINE||a>=h.NUM_ZERO&&a<=h.NUM_MULTIPLY||a>=h.A&&a<=h.Z||b.webkit&&0==a)return!0;switch(a){case h.SPACE:case h.QUESTION_MARK:case h.NUM_PLUS:case h.NUM_MINUS:case h.NUM_PERIOD:case h.NUM_DIVISION:case h.SEMICOLON:case h.DASH:case h.EQUALS:case h.COMMA:case h.PERIOD:case h.SLASH:case h.APOSTROPHE:case h.SINGLE_QUOTE:case h.OPEN_SQUARE_BRACKET:case h.BACKSLASH:case h.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};return h});
KISSY.add("event/dom/base/mouseenter",function(a,b,h,i){a.each([{name:"mouseenter",fix:"mouseover"},{name:"mouseleave",fix:"mouseout"}],function(a){i[a.name]={onFix:a.fix,delegateFix:a.fix,handle:function(a,b,c){var d=a.currentTarget,k=a.relatedTarget;if(!k||k!==d&&!h.contains(d,k))return[b.simpleNotify(a,c)]}}});return b},{requires:["./api","dom","./special"]});
KISSY.add("event/dom/base/mousewheel",function(a,b){var h=a.UA.gecko?"DOMMouseScroll":"mousewheel";b.mousewheel={onFix:h,delegateFix:h}},{requires:["./special"]});
KISSY.add("event/dom/base/object",function(a,b,h){function i(a){this.scale=this.rotation=this.targetTouches=this.touches=this.changedTouches=this.which=this.wheelDelta=this.view=this.toElement=this.srcElement=this.shiftKey=this.screenY=this.screenX=this.relatedTarget=this.relatedNode=this.prevValue=this.pageY=this.pageX=this.offsetY=this.offsetX=this.newValue=this.metaKey=this.keyCode=this.handler=this.fromElement=this.eventPhase=this.detail=this.data=this.ctrlKey=this.clientY=this.clientX=this.charCode=
this.cancelable=this.button=this.bubbles=this.attrName=this.attrChange=this.altKey=h;i.superclass.constructor.call(this);this.originalEvent=a;this.isDefaultPrevented=a.defaultPrevented||a.returnValue===l||a.getPreventDefault&&a.getPreventDefault()?function(){return c}:function(){return l};d(this);e(this)}function d(a){for(var b=a.originalEvent,c=k.length,e,d=b.currentTarget,d=9===d.nodeType?d:d.ownerDocument||g;c;)e=k[--c],a[e]=b[e];a.target||(a.target=a.srcElement||d);3===a.target.nodeType&&(a.target=
a.target.parentNode);!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);a.pageX===h&&a.clientX!==h&&(b=d.documentElement,c=d.body,a.pageX=a.clientX+(b&&b.scrollLeft||c&&c.scrollLeft||0)-(b&&b.clientLeft||c&&c.clientLeft||0),a.pageY=a.clientY+(b&&b.scrollTop||c&&c.scrollTop||0)-(b&&b.clientTop||c&&c.clientTop||0));a.which===h&&(a.which=a.charCode===h?a.keyCode:a.charCode);a.metaKey===h&&(a.metaKey=a.ctrlKey);!a.which&&a.button!==h&&(a.which=a.button&
1?1:a.button&2?3:a.button&4?2:0)}function e(b){var c,e,d,g=b.detail;b.wheelDelta&&(d=b.wheelDelta/120);b.detail&&(d=-(0==g%3?g/3:g));b.axis!==h&&(b.axis===b.HORIZONTAL_AXIS?(e=0,c=-1*d):b.axis===b.VERTICAL_AXIS&&(c=0,e=d));b.wheelDeltaY!==h&&(e=b.wheelDeltaY/120);b.wheelDeltaX!==h&&(c=-1*b.wheelDeltaX/120);!c&&!e&&(e=d);(c!==h||e!==h||d!==h)&&a.mix(b,{deltaY:e,delta:d,deltaX:c})}var g=a.Env.host.document,c=!0,l=!1,k="type,altKey,attrChange,attrName,bubbles,button,cancelable,charCode,clientX,clientY,ctrlKey,currentTarget,data,detail,eventPhase,fromElement,handler,keyCode,metaKey,newValue,offsetX,offsetY,pageX,pageY,prevValue,relatedNode,relatedTarget,screenX,screenY,shiftKey,srcElement,target,toElement,view,wheelDelta,which,axis,changedTouches,touches,targetTouches,rotation,scale".split(",");
a.extend(i,b._Object,{constructor:i,preventDefault:function(){var a=this.originalEvent;a.preventDefault?a.preventDefault():a.returnValue=l;i.superclass.preventDefault.call(this)},stopPropagation:function(){var a=this.originalEvent;a.stopPropagation?a.stopPropagation():a.cancelBubble=c;i.superclass.stopPropagation.call(this)}});return b.DOMEventObject=i},{requires:["event/base"]});
KISSY.add("event/dom/base/observable",function(a,b,h,i,d,e,g){function c(b){a.mix(this,b);this.reset()}var l=g._Utils;a.extend(c,g._ObservableEvent,{setup:function(){var a=this.type,b=h[a]||{},c=this.currentTarget,e=i.data(c).handle;(!b.setup||!1===b.setup.call(c,a))&&i.simpleAdd(c,a,e)},constructor:c,reset:function(){c.superclass.reset.call(this);this.lastCount=this.delegateCount=0},notify:function(a){var c=a.target,e=this.currentTarget,d=this.observers,g=[],h,i,l=this.delegateCount||0,t,r;if(l&&
!c.disabled)for(;c!=e;){t=[];for(i=0;i<l;i++)r=d[i],b.test(c,r.selector)&&t.push(r);t.length&&g.push({currentTarget:c,currentTargetObservers:t});c=c.parentNode||e}g.push({currentTarget:e,currentTargetObservers:d.slice(l)});i=0;for(c=g.length;!a.isPropagationStopped()&&i<c;++i){e=g[i];t=e.currentTargetObservers;e=e.currentTarget;a.currentTarget=e;for(e=0;!a.isImmediatePropagationStopped()&&e<t.length;e++)d=t[e],d=d.notify(a,this),!1!==h&&(h=d)}return h},fire:function(d,g){var d=d||{},f=this.type,i=
h[f];i&&i.onFix&&(f=i.onFix);var l,n,i=this.currentTarget,o=!0;d.type=f;d instanceof e||(n=d,d=new e({currentTarget:i,target:i}),a.mix(d,n));n=i;l=b.getWindow(n.ownerDocument||n);var q=l.document,t=[],r=0,s="on"+f;do t.push(n),n=n.parentNode||n.ownerDocument||n===q&&l;while(n);n=t[r];do{d.currentTarget=n;if(l=c.getCustomEvent(n,f))l=l.notify(d),!1!==o&&(o=l);n[s]&&!1===n[s].call(n)&&d.preventDefault();n=t[++r]}while(!g&&n&&!d.isPropagationStopped());if(!g&&!d.isDefaultPrevented()){var u;try{if(s&&
i[f]&&("focus"!==f&&"blur"!==f||0!==i.offsetWidth)&&!a.isWindow(i))(u=i[s])&&(i[s]=null),c.triggeredEvent=f,i[f]()}catch(v){}u&&(i[s]=u);c.triggeredEvent=""}return o},on:function(a){var b=this.observers,c=h[this.type]||{},a=a instanceof d?a:new d(a);-1==this.findObserver(a)&&(a.selector?(b.splice(this.delegateCount,0,a),this.delegateCount++):a.last?(b.push(a),this.lastCount++):b.splice(b.length-this.lastCount,0,a),c.add&&c.add.call(this.currentTarget,a))},detach:function(a){var b,c=h[this.type]||
{},e="selector"in a,d=a.selector,g=a.context,i=a.fn,q=this.currentTarget,t=this.observers,a=a.groups;if(t.length){a&&(b=l.getGroupsRe(a));var r,s,u,v,w=t.length;if(i||e||b){g=g||q;r=a=0;for(s=[];a<w;++a)u=t[a],v=u.context||q,g!=v||i&&i!=u.fn||e&&(d&&d!=u.selector||!d&&!u.selector)||b&&!u.groups.match(b)?s[r++]=u:(u.selector&&this.delegateCount&&this.delegateCount--,u.last&&this.lastCount&&this.lastCount--,c.remove&&c.remove.call(q,u));this.observers=s}else this.reset();this.checkMemory()}},checkMemory:function(){var b=
this.type,c,e,d=h[b]||{},g=this.currentTarget,l=i.data(g);if(l&&(c=l.events,this.hasObserver()||(e=l.handle,(!d.tearDown||!1===d.tearDown.call(g,b))&&i.simpleRemove(g,b,e),delete c[b]),a.isEmptyObject(c)))l.handle=null,i.removeData(g)}});c.triggeredEvent="";c.getCustomEvent=function(a,b){var c=i.data(a),e;c&&(e=c.events);if(e)return e[b]};c.getCustomEvents=function(a,b){var c=i.data(a);!c&&b&&i.data(a,c={});return c};return c},{requires:"dom,./special,./utils,./observer,./object,event/base".split(",")});
KISSY.add("event/dom/base/observer",function(a,b,h){function i(a){i.superclass.constructor.apply(this,arguments)}a.extend(i,h._Observer,{keys:"fn,selector,data,context,originalType,groups,last".split(","),notifyInternal:function(a,e){var g,c,h=a.type;this.originalType&&(a.type=this.originalType);(g=b[a.type])&&g.handle?(g=g.handle(a,this,e))&&0<g.length&&(c=g[0]):c=this.simpleNotify(a,e);a.type=h;return c}});return i},{requires:["./special","event/base"]});KISSY.add("event/dom/base/special",function(){return{}});
KISSY.add("event/dom/base/utils",function(a,b){var h=a.Env.host.document;return{simpleAdd:h&&h.addEventListener?function(a,b,e,g){a.addEventListener&&a.addEventListener(b,e,!!g)}:function(a,b,e){a.attachEvent&&a.attachEvent("on"+b,e)},simpleRemove:h&&h.removeEventListener?function(a,b,e,g){a.removeEventListener&&a.removeEventListener(b,e,!!g)}:function(a,b,e){a.detachEvent&&a.detachEvent("on"+b,e)},data:function(a,d){return b.data(a,"ksEventTargetId_1.30",d)},removeData:function(a){return b.removeData(a,
"ksEventTargetId_1.30")}}},{requires:["dom"]});
KISSY.add("event/dom/base/valuechange",function(a,b,h,i){function d(a){if(h.hasData(a,n)){var b=h.data(a,n);clearTimeout(b);h.removeData(a,n)}}function e(a){d(a.target)}function g(a){var c=a.value,e=h.data(a,p);c!==e&&(b.fireHandler(a,f,{prevVal:e,newVal:c}),h.data(a,p,c))}function c(a){h.hasData(a,n)||h.data(a,n,setTimeout(function(){g(a);h.data(a,n,setTimeout(arguments.callee,o))},o))}function l(a){var b=a.target;"focus"==a.type&&h.data(b,p,b.value);c(b)}function k(a){g(a.target)}function j(a){h.removeData(a,
p);d(a);b.remove(a,"blur",e);b.remove(a,"webkitspeechchange",k);b.remove(a,"mousedown keyup keydown focus",l)}var f="valuechange",m=h.nodeName,p="event/valuechange/history",n="event/valuechange/poll",o=50;i[f]={setup:function(){var a=m(this);if("input"==a||"textarea"==a)j(this),b.on(this,"blur",e),b.on(this,"webkitspeechchange",k),b.on(this,"mousedown keyup keydown focus",l)},tearDown:function(){j(this)}};return b},{requires:["./api","dom","./special"]});
KISSY.add("event/dom/focusin",function(a,b){var h=b._Special;a.each([{name:"focusin",fix:"focus"},{name:"focusout",fix:"blur"}],function(i){function d(a){return b.fire(a.target,i.name)}var e=a.guid("attaches_"+a.now()+"_");h[i.name]={setup:function(){var a=this.ownerDocument||this;e in a||(a[e]=0);a[e]+=1;1===a[e]&&a.addEventListener(i.fix,d,!0)},tearDown:function(){var a=this.ownerDocument||this;a[e]-=1;0===a[e]&&a.removeEventListener(i.fix,d,!0)}}});return b},{requires:["event/dom/base"]});
KISSY.add("event/dom/hashchange",function(a,b,h){var i=a.UA,d=b._Special,e=a.Env.host,g=e.document,c=g&&g.documentMode,l="__replace_history_"+a.now(),i=c||i.ie;b.REPLACE_HISTORY=l;var k="<html><head><title>"+(g&&g.title||"")+" - {hash}</title>{head}</head><body>{hash}</body></html>",j=function(){return"#"+(new a.Uri(location.href)).getFragment()},f,m,p=function(){var b=j(),c;if(c=a.endsWith(b,l))b=b.slice(0,-l.length),location.hash=b;b!==m&&(m=b,n(b,c));f=setTimeout(p,50)},n=i&&8>i?function(b,c){var e=
a.substitute(k,{hash:a.escapeHTML(b),head:h.isCustomDomain()?"<script>document.domain = '"+g.domain+"';<\/script>":""}),d=t.contentWindow.document;try{c?d.open("text/html","replace"):d.open(),d.write(e),d.close()}catch(f){}}:function(){b.fireHandler(e,"hashchange")},o=function(){f||p()},q=function(){f&&clearTimeout(f);f=0},t;i&&8>i&&(o=function(){if(!t){var c=h.getEmptyIframeSrc();t=h.create("<iframe "+(c?'src="'+c+'"':"")+' style="display: none" height="0" width="0" tabindex="-1" title="empty"/>');
h.prepend(t,g.documentElement);b.add(t,"load",function(){b.remove(t,"load");n(j());b.add(t,"load",d);p()});g.onpropertychange=function(){try{"title"===event.propertyName&&(t.contentWindow.document.title=g.title+" - "+j())}catch(a){}};var d=function(){var c=a.trim(t.contentWindow.document.body.innerText),d=j();c!=d&&(m=location.hash=c);b.fireHandler(e,"hashchange")}}},q=function(){f&&clearTimeout(f);f=0;b.detach(t);h.remove(t);t=0});d.hashchange={setup:function(){if(this===e){m=j();o()}},tearDown:function(){this===
e&&q()}}},{requires:["event/dom/base","dom"]});
KISSY.add("event/dom/ie/change",function(a,b,h){function i(a){a=a.type;return"checkbox"==a||"radio"==a}function d(a){"checked"==a.originalEvent.propertyName&&(this.__changed=1)}function e(a){this.__changed&&(this.__changed=0,b.fire(this,"change",a))}function g(a){a=a.target;l.test(a.nodeName)&&!a.__changeHandler&&(a.__changeHandler=1,b.on(a,"change",{fn:c,last:1}))}function c(a){if(!a.isPropagationStopped()&&!i(this)){var c;(c=this.parentNode)&&b.fire(c,"change",a)}}var l=/^(?:textarea|input|select)$/i;
b._Special.change={setup:function(){if(l.test(this.nodeName))if(i(this))b.on(this,"propertychange",d),b.on(this,"click",e);else return!1;else b.on(this,"beforeactivate",g)},tearDown:function(){if(l.test(this.nodeName))if(i(this))b.remove(this,"propertychange",d),b.remove(this,"click",e);else return!1;else b.remove(this,"beforeactivate",g),a.each(h.query("textarea,input,select",this),function(a){a.__changeHandler&&(a.__changeHandler=0,b.remove(a,"change",{fn:c,last:1}))})}}},{requires:["event/dom/base",
"dom"]});KISSY.add("event/dom/ie",function(){},{requires:["./ie/change","./ie/submit"]});
KISSY.add("event/dom/ie/submit",function(a,b,h){function i(a){var a=a.target,c=e(a);if((a="input"==c||"button"==c?a.form:null)&&!a.__submit__fix)a.__submit__fix=1,b.on(a,"submit",{fn:d,last:1})}function d(a){this.parentNode&&!a.isPropagationStopped()&&!a.synthetic&&b.fire(this.parentNode,"submit",a)}var e=h.nodeName;b._Special.submit={setup:function(){if("form"==e(this))return!1;b.on(this,"click keypress",i)},tearDown:function(){if("form"==e(this))return!1;b.remove(this,"click keypress",i);a.each(h.query("form",
this),function(a){a.__submit__fix&&(a.__submit__fix=0,b.remove(a,"submit",{fn:d,last:1}))})}}},{requires:["event/dom/base","dom"]});
KISSY.add("event/dom/shake",function(a,b,h){function i(a){var b=a.accelerationIncludingGravity,a=b.x,d=b.y,b=b.z,i;l!==h&&(i=f(m(a-l),m(d-k),m(b-j)),i>e&&n(),i>g&&(c=1));l=a;k=d;j=b}var d=b._Special,e=5,g=20,c=0,l,k,j,f=Math.max,m=Math.abs,p=a.Env.host,n=a.buffer(function(){c&&(b.fireHandler(p,"shake",{accelerationIncludingGravity:{x:l,y:k,z:j}}),l=h,c=0)},250);d.shake={setup:function(){this==p&&p.addEventListener("devicemotion",i,!1)},tearDown:function(){this==p&&(n.stop(),l=h,c=0,p.removeEventListener("devicemotion",
i,!1))}}},{requires:["event/dom/base"]});KISSY.add("event/dom/touch/single-touch",function(a){function b(){}b.prototype={requiredTouchCount:1,onTouchStart:function(a){if(a.touches.length!=this.requiredTouchCount)return!1;this.lastTouches=a.touches},onTouchMove:a.noop,onTouchEnd:a.noop};return b});
KISSY.add("event/dom/touch/double-tap",function(a,b,h,i){function d(){}a.extend(d,i,{onTouchStart:function(a){if(!1===d.superclass.onTouchStart.apply(this,arguments))return!1;this.startTime=a.timeStamp;this.singleTapTimer&&(clearTimeout(this.singleTapTimer),this.singleTapTimer=0)},onTouchMove:function(){return!1},onTouchEnd:function(a){var b=this.lastEndTime,c=a.timeStamp,d=a.target,k=a.changedTouches[0],j=c-this.startTime;this.lastEndTime=c;if(b&&(j=c-b,300>j)){this.lastEndTime=0;h.fire(d,"doubleTap",
{touch:k,duration:j});return}j=c-this.startTime;300<j?h.fire(d,"singleTap",{touch:k,duration:j}):this.singleTapTimer=setTimeout(function(){h.fire(d,"singleTap",{touch:k,duration:j})},300)}});b.singleTap=b.doubleTap=new d;return d},{requires:["./handle-map","event/dom/base","./single-touch"]});
KISSY.add("event/dom/touch/gesture",function(a,b){var h=b.Gesture,i,d,e;a.Features.isTouchSupported()&&(i="touchstart",d="touchmove",e="touchend");i&&(h.start=i,h.move=d,h.end=e,h.tap="tap",h.doubleTap="doubleTap");return h},{requires:["event/dom/base"]});KISSY.add("event/dom/touch/handle-map",function(){return{}});
KISSY.add("event/dom/touch/handle",function(a,b,h,i,d){function e(a){this.doc=a;this.eventHandle={};this.init()}var g=a.guid("touch-handle"),c=a.Features,l={};l[d.start]="onTouchStart";l[d.move]="onTouchMove";l[d.end]="onTouchEnd";"mousedown"!==d.start&&(l.touchcancel="onTouchEnd");e.prototype={init:function(){var b=this.doc,c,e;this.onTouchMove=a.throttle(this.onTouchMove,30);for(c in l){e=l[c];i.on(b,c,this[e],this)}},normalize:function(a){var b=a.type,e;if(!c.isTouchSupported()){if(b.indexOf("mouse")!=
-1&&a.which!=1)return;e=[a];b=!b.match(/up$/i);a.touches=b?e:[];a.targetTouches=b?e:[];a.changedTouches=e}return a},onTouchStart:function(a){var b,c,e=this.eventHandle;for(b in e){c=e[b];c.isActive=1}this.callEventHandle("onTouchStart",a)},onTouchMove:function(a){this.callEventHandle("onTouchMove",a)},onTouchEnd:function(a){this.callEventHandle("onTouchEnd",a)},callEventHandle:function(a,b){var c=this.eventHandle,e,d;if(b=this.normalize(b)){for(e in c){d=c[e];if(!d.processed){d.processed=1;if(d.isActive&&
d[a](b)===false)d.isActive=0}}for(e in c){d=c[e];d.processed=0}}},addEventHandle:function(a){var b=h[a];this.eventHandle[a]||(this.eventHandle[a]=b)},removeEventHandle:function(a){delete this.eventHandle[a]},destroy:function(){var a=this.doc,b,c;for(b in l){c=l[b];i.detach(a,b,this[c],this)}}};return{addDocumentHandle:function(a,c){var d=b.getWindow(a.ownerDocument||a).document,h=b.data(d,g);h||b.data(d,g,h=new e(d));h.addEventHandle(c)},removeDocumentHandle:function(c,e){var d=b.getWindow(c.ownerDocument||
c).document,h=b.data(d,g);if(h){h.removeEventHandle(e);if(a.isEmptyObject(h.eventHandle)){h.destroy();b.removeData(d,g)}}}}},{requires:"dom,./handle-map,event/dom/base,./gesture,./tap,./swipe,./double-tap,./pinch,./tap-hold,./rotate".split(",")});
KISSY.add("event/dom/touch/multi-touch",function(a,b){function h(){}h.prototype={requiredTouchCount:2,onTouchStart:function(a){var b=this.requiredTouchCount,e=a.touches.length;e===b?this.start():e>b&&this.end(a)},onTouchEnd:function(a){this.end(a)},start:function(){this.isTracking||(this.isTracking=!0,this.isStarted=!1)},fireEnd:a.noop,getCommonTarget:function(a){var d=a.touches,a=d[0].target,d=d[1].target;if(a==d||b.contains(a,d))return a;for(;;){if(b.contains(d,a))return d;d=d.parentNode}},end:function(a){this.isTracking&&
(this.isTracking=!1,this.isStarted&&(this.isStarted=!1,this.fireEnd(a)))}};return h},{requires:["dom"]});
KISSY.add("event/dom/touch/pinch",function(a,b,h,i){function d(){}a.extend(d,i,{onTouchMove:function(a){if(this.isTracking){var b=a.touches,c,d=b[0],k=b[1];c=d.pageX-k.pageX;d=d.pageY-k.pageY;c=Math.sqrt(c*c+d*d);this.isStarted?h.fire(this.target,"pinch",{touches:b,distance:c,scale:c/this.startDistance}):(this.isStarted=!0,this.startDistance=c,a=this.target=this.getCommonTarget(a),h.fire(a,"pinchStart",{touches:b,distance:c,scale:1}));this.lastTouches=b}},fireEnd:function(){h.fire(this.target,"pinchEnd",
{touches:this.lastTouches})}});b.pinch=b.pinchEnd=b.pinchEnd=new d;return d},{requires:["./handle-map","event/dom/base","./multi-touch"]});
KISSY.add("event/dom/touch/rotate",function(a,b,h,i){function d(){}var e=180/Math.PI;a.extend(d,h,{onTouchMove:function(a){if(this.isTracking){var b=a.touches,d=b[0],h=b[1],j=this.lastAngle,d=Math.atan2(h.pageY-d.pageY,h.pageX-d.pageX)*e;if(j){var h=Math.abs(d-j),f=d+360,m=d-360;Math.abs(f-j)<h?d=f:Math.abs(m-j)<h&&(d=m)}this.lastAngle=d;this.isStarted?i.fire(this.target,"rotate",{touches:b,originalEvent:a.originalEvent,angle:d,rotation:d-this.startAngle}):(this.isStarted=!0,this.startAngle=d,this.target=
this.getCommonTarget(a),i.fire(this.target,"rotateStart",{originalEvent:a.originalEvent,touches:a.touches,angle:d,rotation:0}))}},fireEnd:function(a){i.fire(this.target,"rotateEnd",{touches:this.lastTouches,originalEvent:a.originalEvent})}});b.rotate=b.rotateEnd=b.rotateStart=new d;return d},{requires:["./handle-map","./multi-touch","event/dom/base"]});
KISSY.add("event/dom/touch/swipe",function(a,b,h,i){function d(){}a.extend(d,i,{onTouchStart:function(a){if(!1===d.superclass.onTouchStart.apply(this,arguments))return!1;var b=a.touches[0];this.startTime=a.timeStamp;this.isVertical=this.isHorizontal=1;this.startX=b.pageX;this.startY=b.pageY;-1!=a.type.indexOf("mouse")&&a.preventDefault()},onTouchMove:function(a){var b=a.changedTouches[0],c=b.pageY,b=Math.abs(b.pageX-this.startX),c=Math.abs(c-this.startY);if(1E3<a.timeStamp-this.startTime)return!1;
this.isVertical&&35<b&&(this.isVertical=0);this.isHorizontal&&35<c&&(this.isHorizontal=0);if(!this.isHorizontal&&!this.isVertical)return!1},onTouchEnd:function(a){if(!1===this.onTouchMove(a))return!1;var b=a.changedTouches[0],c=b.pageX-this.startX,d=b.pageY-this.startY,k=Math.abs(c),j=Math.abs(d);this.isVertical&&50>j&&(this.isVertical=0);this.isHorizontal&&50>k&&(this.isHorizontal=0);if(this.isHorizontal)c=0>c?"left":"right";else if(this.isVertical)c=0>d?"up":"down",k=j;else return!1;h.fire(a.target,
"swipe",{touch:b,direction:c,distance:k,duration:a.timeStamp-this.startTime})}});b.swipe=new d;return d},{requires:["./handle-map","event/dom/base","./single-touch"]});
KISSY.add("event/dom/touch/tap-hold",function(a,b,h,i){function d(){}a.extend(d,h,{onTouchStart:function(b){if(!1===d.superclass.onTouchStart.call(this,b))return!1;this.timer=setTimeout(function(){i.fire(b.target,"tapHold",{touch:b.touches[0],duration:a.now()-b.timeStamp})},1E3)},onTouchMove:function(){clearTimeout(this.timer);return!1},onTouchEnd:function(){clearTimeout(this.timer)}});b.tapHold=new d;return d},{requires:["./handle-map","./single-touch","event/dom/base"]});
KISSY.add("event/dom/touch/tap",function(a,b,h,i){function d(){}a.extend(d,i,{onTouchMove:function(){return!1},onTouchEnd:function(a){h.fire(a.target,"tap",{touch:a.changedTouches[0]})}});b.tap=new d;return d},{requires:["./handle-map","event/dom/base","./single-touch"]});
KISSY.add("event/dom/touch",function(a,b,h,i){var a=b._Special,b={setup:function(a){i.addDocumentHandle(this,a)},tearDown:function(a){i.removeDocumentHandle(this,a)}},d;for(d in h)a[d]=b},{requires:["event/dom/base","./touch/handle-map","./touch/handle"]});
KISSY.add("json/json2",function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=l[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function h(a,e){var d,i,l,o,q=g,t,r=e[a];r&&"object"===typeof r&&"function"===typeof r.toJSON&&(r=r.toJSON(a));"function"===typeof k&&(r=k.call(e,a,r));switch(typeof r){case "string":return b(r);case "number":return isFinite(r)?""+r:"null";case "boolean":case "null":return""+
r;case "object":if(!r)return"null";g+=c;t=[];if("[object Array]"===Object.prototype.toString.apply(r)){o=r.length;for(d=0;d<o;d+=1)t[d]=h(d,r)||"null";l=0===t.length?"[]":g?"[\n"+g+t.join(",\n"+g)+"\n"+q+"]":"["+t.join(",")+"]";g=q;return l}if(k&&"object"===typeof k){o=k.length;for(d=0;d<o;d+=1)i=k[d],"string"===typeof i&&(l=h(i,r))&&t.push(b(i)+(g?": ":":")+l)}else for(i in r)Object.hasOwnProperty.call(r,i)&&(l=h(i,r))&&t.push(b(i)+(g?": ":":")+l);l=0===t.length?"{}":g?"{\n"+g+t.join(",\n"+g)+"\n"+
q+"}":"{"+t.join(",")+"}";g=q;return l}}var i={};"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,c,l={":"\\b","\t":"\\t","\n":"\\n","":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;i.stringify=function(a,b,e){var d;c=g="";if(typeof e==="number")for(d=0;d<e;d=d+1)c=c+" ";else typeof e==="string"&&(c=e);if((k=b)&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw Error("JSON.stringify");return h("",{"":a})};i.parse=function(a,b){function c(a,
e){var d,g,h=a[e];if(h&&typeof h==="object")for(d in h)if(Object.hasOwnProperty.call(h,d)){g=c(h,d);g!==void 0?h[d]=g:delete h[d]}return b.call(a,e,h)}var e,a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){e=eval("("+a+")");return typeof b===
"function"?c({"":e},""):e}throw new SyntaxError("JSON.parse");};return i});KISSY.add("json",function(a,b){"undefined"!==typeof JSON&&(b=JSON);return a.JSON={parse:function(a){return null==a||""===a?null:b.parse(a)},stringify:b.stringify}},{requires:[KISSY.Features.isNativeJSONSupported()?"":"json/json2"]});
KISSY.add("ajax",function(a,b,h){function i(b,g,c,i,k){a.isFunction(g)&&(i=c,c=g,g=d);return h({type:k||"get",url:b,data:g,success:c,dataType:i})}var d=void 0;a.mix(h,{serialize:b.serialize,get:i,post:function(b,g,c,h){a.isFunction(g)&&(h=c,c=g,g=d);return i(b,g,c,h,"post")},jsonp:function(b,g,c){a.isFunction(g)&&(c=g,g=d);return i(b,g,c,"jsonp")},getScript:a.getScript,getJSON:function(b,g,c){a.isFunction(g)&&(c=g,g=d);return i(b,g,c,"json")},upload:function(b,g,c,i,k){a.isFunction(c)&&(k=i,i=c,c=
d);return h({url:b,type:"post",dataType:k,form:g,data:c,success:i})}});a.mix(a,{Ajax:h,IO:h,ajax:h,io:h,jsonp:h.jsonp});return h},{requires:"ajax/form-serializer,ajax/base,ajax/xhr-transport,ajax/script-transport,ajax/jsonp,ajax/form,ajax/iframe-transport,ajax/methods".split(",")});
KISSY.add("ajax/base",function(a,b,h,i){function d(b){var c=b.context;delete b.context;b=a.mix(a.clone(s),b,{deep:!0});b.context=c||b;var e,d=b.type,g=b.dataType,c=b.uri=q.resolve(b.url);"crossDomain"in b||(b.crossDomain=!b.uri.hasSameDomainAs(q));d=b.type=d.toUpperCase();b.hasContent=!f.test(d);if(b.processData&&(e=b.data)&&"string"!=typeof e)b.data=a.param(e,i,i,b.serializeArray);g=b.dataType=a.trim(g||"*").split(l);!("cache"in b)&&a.inArray(g[0],["script","jsonp"])&&(b.cache=!1);b.hasContent||
(b.data&&c.query.add(a.unparam(b.data)),!1===b.cache&&c.query.set("_ksTS",a.now()+"_"+a.guid()));return b}function e(a,b){g.fire(a,{ajaxConfig:b.config,io:b})}function g(b){function c(a){return function(c){if(l=f.timeoutTimer)clearTimeout(l),f.timeoutTimer=0;var d=b[a];d&&d.apply(q,c);e(a,f)}}var f=this;if(!b.url)return i;if(!(f instanceof g))return new g(b);j.call(f);b=d(b);a.mix(f,{responseData:null,config:b||{},timeoutTimer:null,responseText:null,responseXML:null,responseHeadersString:"",responseHeaders:null,
requestHeaders:{},readyState:0,state:0,statusText:null,status:0,transport:null,_defer:new a.Defer(this)});var h;e("start",f);h=new (r[b.dataType[0]]||r["*"])(f);f.transport=h;b.contentType&&f.setRequestHeader("Content-Type",b.contentType);var k=b.dataType[0],l,m,o=b.timeout,q=b.context,p=b.headers,n=b.accepts;f.setRequestHeader("Accept",k&&n[k]?n[k]+("*"===k?"":", */*; q=0.01"):n["*"]);for(m in p)f.setRequestHeader(m,p[m]);if(b.beforeSend&&!1===b.beforeSend.call(q,f,b))return i;f.then(c("success"),
c("error"));f.fin(c("complete"));f.readyState=1;e("send",f);b.async&&0<o&&(f.timeoutTimer=setTimeout(function(){f.abort("timeout")},1E3*o));try{f.state=1,h.send()}catch(t){2>f.state&&f._ioReady(-1,t)}return i}var c=/^(?:about|app|app\-storage|.+\-extension|file|widget)$/,l=/\s+/,k=function(a){return a},j=a.Promise,f=/^(?:GET|HEAD)$/,m,p=a.Uri,n=a.Env.host,o=n.document,n=n.location,q;if(n){try{m=n.href}catch(t){m=o.createElement("a"),m.href="",m=m.href}q=new p(m)}var c=q&&c.test(q.getScheme()),r={},
s={type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",async:!0,serializeArray:!0,processData:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},converters:{text:{json:b.parse,html:k,text:k,xml:a.parseXML}},contents:{xml:/xml/,html:/html/,json:/json/}};s.converters.html=s.converters.text;a.mix(g,h.Target);a.mix(g,{isLocal:c,setupConfig:function(b){a.mix(s,b,{deep:!0})},setupTransport:function(a,b){r[a]=
b},getTransport:function(a){return r[a]},getConfig:function(){return s}});return g},{requires:["json","event"]});
KISSY.add("ajax/form-serializer",function(a,b){function h(a){return a.replace(d,"\r\n")}var i=/^(?:select|textarea)/i,d=/\r?\n/g,e,g=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i;return e={serialize:function(b,d){return a.param(e.getFormData(b),void 0,void 0,d||!1)},getFormData:function(c){var d=[],e={};a.each(b.query(c),function(b){b=b.elements?a.makeArray(b.elements):[b];d.push.apply(d,b)});d=a.filter(d,function(a){return a.name&&!a.disabled&&
(a.checked||i.test(a.nodeName)||g.test(a.type))});a.each(d,function(c){var d=b.val(c),g,d=a.isArray(d)?a.map(d,h):h(d);(g=e[c.name])?(g&&!a.isArray(g)&&(g=e[c.name]=[g]),g.push.apply(g,a.makeArray(d))):e[c.name]=d});return e}}},{requires:["dom"]});
KISSY.add("ajax/form",function(a,b,h,i){b.on("start",function(b){var e,g,c,b=b.io.config;if(c=b.form)e=h.get(c),g=e.encoding||e.enctype,c=b.data,"multipart/form-data"!=g.toLowerCase()?(e=i.getFormData(e),b.hasContent?(e=a.param(e,void 0,void 0,b.serializeArray),b.data=c?b.data+("&"+e):e):b.uri.query.add(e)):(c=b.dataType,b=c[0],"*"==b&&(b="text"),c.length=2,c[0]="iframe",c[1]=b)});return b},{requires:["./base","dom","./form-serializer"]});
KISSY.add("ajax/iframe-transport",function(a,b,h,i){function d(e){var d=a.guid("ajax-iframe"),g=b.getEmptyIframeSrc(),e=e.iframe=b.create("<iframe "+(g?' src="'+g+'" ':"")+' id="'+d+'" name="'+d+'" style="position:absolute;left:-9999px;top:-9999px;"/>');b.prepend(e,c.body||c.documentElement);return e}function e(e,d,g){var f=[],h,i,n,o;a.each(e,function(e,l){h=a.isArray(e);i=a.makeArray(e);for(n=0;n<i.length;n++)o=c.createElement("input"),o.type="hidden",o.name=l+(h&&g?"[]":""),o.value=i[n],b.append(o,
d),f.push(o)});return f}function g(a){this.io=a}var c=a.Env.host.document;i.setupConfig({converters:{iframe:i.getConfig().converters.text,text:{iframe:function(a){return a}},xml:{iframe:function(a){return a}}}});a.augment(g,{send:function(){function c(){h.on(p,"load error",g._callback,g);q.submit()}var g=this,j=g.io,f=j.config,i,p,n,o=f.data,q=b.get(f.form);g.attrs={target:b.attr(q,"target")||"",action:b.attr(q,"action")||"",method:b.attr(q,"method")};g.form=q;p=d(j);b.attr(q,{target:p.id,action:f.uri.toString(f.serializeArray),
method:"post"});o&&(n=a.unparam(o));n&&(i=e(n,q,f.serializeArray));g.fields=i;6==a.UA.ie?setTimeout(c,0):c()},_callback:function(c){var e=this,d=e.form,f=e.io,c=c.type,g,i=f.iframe;if(i)if("abort"==c&&6==a.UA.ie?setTimeout(function(){b.attr(d,e.attrs)},0):b.attr(d,e.attrs),b.remove(this.fields),h.detach(i),setTimeout(function(){b.remove(i)},30),f.iframe=null,"load"==c)try{if((g=i.contentWindow.document)&&g.body)f.responseText=a.trim(b.text(g.body)),a.startsWith(f.responseText,"<?xml")&&(f.responseText=
void 0);f.responseXML=g&&g.XMLDocument?g.XMLDocument:g;g?f._ioReady(200,"success"):f._ioReady(500,"parser error")}catch(n){f._ioReady(500,"parser error")}else"error"==c&&f._ioReady(500,"error")},abort:function(){this._callback({type:"abort"})}});i.setupTransport("iframe",g);return i},{requires:["dom","event","./base"]});
KISSY.add("ajax/jsonp",function(a,b){var h=a.Env.host;b.setupConfig({jsonp:"callback",jsonpCallback:function(){return a.guid("jsonp")}});b.on("start",function(b){var d=b.io,e=d.config,b=e.dataType;if("jsonp"==b[0]){var g,c=e.jsonpCallback,l=a.isFunction(c)?c():c,k=h[l];e.uri.query.set(e.jsonp,l);h[l]=function(b){1<arguments.length&&(b=a.makeArray(arguments));g=[b]};d.fin(function(){h[l]=k;if(void 0===k)try{delete h[l]}catch(a){}else g&&k(g[0])});d=d.converters=d.converters||{};d.script=d.script||
{};d.script.json=function(){return g[0]};b.length=2;b[0]="script";b[1]="json"}});return b},{requires:["./base"]});
KISSY.add("ajax/methods",function(a,b,h){function i(b){var d=b.responseText,c=b.responseXML,i=b.config,k=i.converters,j=b.converters||{},f,m,p=i.contents,n=i.dataType;if(d||c){for(i=b.mimeType||b.getResponseHeader("Content-Type");"*"==n[0];)n.shift();if(!n.length)for(f in p)if(p[f].test(i)){n[0]!=f&&n.unshift(f);break}n[0]=n[0]||"text";if("text"==n[0]&&d!==h)m=d;else if("xml"==n[0]&&c!==h)m=c;else{var o={text:d,xml:c};a.each(["text","xml"],function(a){var b=n[0];if((j[a]&&j[a][b]||k[a]&&k[a][b])&&
o[a])return n.unshift(a),m="text"==a?d:c,!1})}}p=n[0];for(i=1;i<n.length;i++){f=n[i];var q=j[p]&&j[p][f]||k[p]&&k[p][f];if(!q)throw"no covert for "+p+" => "+f;m=q(m);p=f}b.responseData=m}var d=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg;a.extend(b,a.Promise,{setRequestHeader:function(a,b){this.requestHeaders[a]=b;return this},getAllResponseHeaders:function(){return 2===this.state?this.responseHeadersString:null},getResponseHeader:function(a){var b,c;if(2===this.state){if(!(c=this.responseHeaders))for(c=this.responseHeaders=
{};b=d.exec(this.responseHeadersString);)c[b[1]]=b[2];b=c[a]}return b===h?null:b},overrideMimeType:function(a){this.state||(this.mimeType=a);return this},abort:function(a){a=a||"abort";this.transport&&this.transport.abort(a);this._ioReady(0,a);return this},getNativeXhr:function(){var a;if(a=this.transport)return a.nativeXhr},_ioReady:function(a,b){if(2!=this.state){this.state=2;this.readyState=4;var c;if(200<=a&&300>a||304==a)if(304==a)b="not modified",c=!0;else try{i(this),b="success",c=!0}catch(d){b=
"parser error"}else 0>a&&(a=0);this.status=a;this.statusText=b;this._defer[c?"resolve":"reject"]([this.responseData,b,this])}}})},{requires:["./base"]});
KISSY.add("ajax/script-transport",function(a,b,h,i){function d(a){if(!a.config.crossDomain)return new (b.getTransport("*"))(a);this.io=a;return 0}var e=a.Env.host,g=e.document;b.setupConfig({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{text:{script:function(b){a.globalEval(b);return b}}}});a.augment(d,{send:function(){var a=this,b,d=a.io.config,h=g.head||g.getElementsByTagName("head")[0]||
g.documentElement;a.head=h;b=g.createElement("script");a.script=b;b.async=!0;d.scriptCharset&&(b.charset=d.scriptCharset);b.src=d.uri.toString(d.serializeArray);b.onerror=b.onload=b.onreadystatechange=function(b){b=b||e.event;a._callback((b.type||"error").toLowerCase())};h.insertBefore(b,h.firstChild)},_callback:function(a,b){var d=this.script,e=this.io,f=this.head;if(d&&(b||!d.readyState||/loaded|complete/.test(d.readyState)||"error"==a))d.onerror=d.onload=d.onreadystatechange=null,f&&d.parentNode&&
f.removeChild(d),this.head=this.script=i,!b&&"error"!=a?e._ioReady(200,"success"):"error"==a&&e._ioReady(500,"script error")},abort:function(){this._callback(0,1)}});b.setupTransport("script",d);return b},{requires:["./base","./xhr-transport"]});
KISSY.add("ajax/sub-domain-transport",function(a,b,h,i){function d(a){var b=a.config;this.io=a;b.crossDomain=!1}function e(){var a=this.io.config.uri.getHostname(),a=c[a];a.ready=1;h.detach(a.iframe,"load",e,this);this.send()}var g=a.Env.host.document,c={};a.augment(d,b.proto,{send:function(){var d=this.io.config,k=d.uri,j=k.getHostname(),f;f=c[j];var m="/sub_domain_proxy.html";d.xdr&&d.xdr.subDomain&&d.xdr.subDomain.proxy&&(m=d.xdr.subDomain.proxy);f&&f.ready?(this.nativeXhr=b.nativeXhr(0,f.iframe.contentWindow))&&
this.sendInternal():(f?d=f.iframe:(f=c[j]={},d=f.iframe=g.createElement("iframe"),i.css(d,{position:"absolute",left:"-9999px",top:"-9999px"}),i.prepend(d,g.body||g.documentElement),f=new a.Uri,f.setScheme(k.getScheme()),f.setPort(k.getPort()),f.setHostname(j),f.setPath(m),d.src=f.toString()),h.on(d,"load",e,this))}});return d},{requires:["./xhr-transport-base","event","dom"]});
KISSY.add("ajax/xdr-flash-transport",function(a,b,h){function i(a,b,c){k||(k=!0,a='<object id="'+g+'" type="application/x-shockwave-flash" data="'+a+'" width="0" height="0"><param name="movie" value="'+a+'" /><param name="FlashVars" value="yid='+b+"&uid="+c+'&host=KISSY.require(\'ajax\')" /><param name="allowScriptAccess" value="always" /></object>',b=l.createElement("div"),h.prepend(b,l.body||l.documentElement),b.innerHTML=a)}function d(a){this.io=a}var e={},g="io_swf",c,l=a.Env.host.document,k=
!1;a.augment(d,{send:function(){var b=this,d=b.io.config;i((d.xdr||{}).src||a.Config.base+"ajax/io.swf",1,1);c?(b._uid=a.guid(),e[b._uid]=b,c.send(d.uri.toString(d.serializeArray),{id:b._uid,uid:b._uid,method:d.type,data:d.hasContent&&d.data||{}})):setTimeout(function(){b.send()},200)},abort:function(){c.abort(this._uid)},_xdrResponse:function(a,b){var c,d=b.id,g,h=b.c,i=this.io;if(h&&(g=h.responseText))i.responseText=decodeURI(g);switch(a){case "success":c={status:200,statusText:"success"};delete e[d];
break;case "abort":delete e[d];break;case "timeout":case "transport error":case "failure":delete e[d],c={status:"status"in h?h.status:500,statusText:h.statusText||a}}c&&i._ioReady(c.status,c.statusText)}});b.applyTo=function(c,d,e){var c=d.split(".").slice(1),g=b;a.each(c,function(a){g=g[a]});g.apply(null,e)};b.xdrReady=function(){c=l.getElementById(g)};b.xdrResponse=function(a,b){var c=e[b.uid];c&&c._xdrResponse(a,b)};return d},{requires:["./base","dom"]});
KISSY.add("ajax/xhr-transport-base",function(a,b){function h(a,b){try{return new (b||d).XMLHttpRequest}catch(c){}}function i(a){var b;a.ifModified&&(b=a.uri,!1===a.cache&&(b=b.clone(),b.query.remove("_ksTS")),b=b.toString());return b}var d=a.Env.host,e=7<a.UA.ie&&d.XDomainRequest,g={proto:{}},c={},l={};b.__lastModifiedCached=c;b.__eTagCached=l;g.nativeXhr=d.ActiveXObject?function(a,c){var f;if(a&&e)f=new e;else if(!(f=!b.isLocal&&h(a,c)))a:{try{f=new (c||d).ActiveXObject("Microsoft.XMLHTTP");break a}catch(g){}f=
void 0}return f}:h;g._XDomainRequest=e;a.mix(g.proto,{sendInternal:function(){var a=this,b=a.io,d=b.config,g=a.nativeXhr,h=d.type,n=d.async,o,q=d.crossDomain,t=b.mimeType,b=b.requestHeaders||{},r=d.uri.toString(d.serializeArray),s=i(d),u,v;if(s){if(u=c[s])b["If-Modified-Since"]=u;if(u=l[s])b["If-None-Match"]=u}(o=d.username)?g.open(h,r,n,o,d.password):g.open(h,r,n);if(h=d.xhrFields)for(v in h)g[v]=h[v];t&&g.overrideMimeType&&g.overrideMimeType(t);!q&&!b["X-Requested-With"]&&(b["X-Requested-With"]=
"XMLHttpRequest");try{if(!q)for(v in b)g.setRequestHeader(v,b[v])}catch(w){}g.send(d.hasContent&&d.data||null);!n||4==g.readyState?a._callback():e&&g instanceof e?(g.onload=function(){g.readyState=4;g.status=200;a._callback()},g.onerror=function(){g.readyState=4;g.status=500;a._callback()}):g.onreadystatechange=function(){a._callback()}},abort:function(){this._callback(0,1)},_callback:function(b,d){var f=this.nativeXhr,g=this.io,h,n,o,q,t,r=g.config;try{if(d||4==f.readyState)if(e&&f instanceof e?
(f.onerror=a.noop,f.onload=a.noop):f.onreadystatechange=a.noop,d)4!==f.readyState&&f.abort();else{h=i(r);var s=f.status;e&&f instanceof e||(g.responseHeadersString=f.getAllResponseHeaders());h&&(n=f.getResponseHeader("Last-Modified"),o=f.getResponseHeader("ETag"),n&&(c[h]=n),o&&(l[o]=o));if((t=f.responseXML)&&t.documentElement)g.responseXML=t;g.responseText=f.responseText;try{q=f.statusText}catch(u){q=""}!s&&g.isLocal&&!r.crossDomain?s=g.responseText?200:404:1223===s&&(s=204);g._ioReady(s,q)}}catch(v){f.onreadystatechange=
a.noop,d||g._ioReady(-1,v)}}});return g},{requires:["./base"]});
KISSY.add("ajax/xhr-transport",function(a,b,h,i,d,e){var g=h._XDomainRequest,c=h.nativeXhr();if(c){var l=function(a){var a=a.split("."),b=a.length,c=3<b?3:2;return b<c?a.join("."):a.reverse().slice(0,c).reverse().join(".")},k=function(a){var b=a.config,k=b.crossDomain,p=b.xdr||{},n=p.subDomain=p.subDomain||{};this.io=a;if(k){if(l(location.hostname)==l(b.uri.getHostname())&&!1!==n.proxy)return new i(a);if(!("withCredentials"in c)&&("flash"===""+p.use||!g))return new d(a)}this.nativeXhr=h.nativeXhr(k);
return e};a.augment(k,h.proto,{send:function(){this.sendInternal()}});b.setupTransport("*",k)}return b},{requires:["./base","./xhr-transport-base","./sub-domain-transport","./xdr-flash-transport"]});
KISSY.add("cookie",function(a){function b(a){return"string"==typeof a&&""!==a}var h=a.Env.host.document,i=encodeURIComponent,d=a.urlDecode;return a.Cookie={get:function(a){var g,c;if(b(a)&&(c=(""+h.cookie).match(RegExp("(?:^| )"+a+"(?:(?:=([^;]*))|;|$)"))))g=c[1]?d(c[1]):"";return g},set:function(a,d,c,l,k,j){var d=""+i(d),f=c;"number"===typeof f&&(f=new Date,f.setTime(f.getTime()+864E5*c));f instanceof Date&&(d+="; expires="+f.toUTCString());b(l)&&(d+="; domain="+l);b(k)&&(d+="; path="+k);j&&(d+=
"; secure");h.cookie=a+"="+d},remove:function(a,b,c,d){this.set(a,"",-1,b,c,d)}}});
KISSY.add("base/attribute",function(a,b){function h(a,b){return"string"==typeof b?a[b]:b}function i(b,c,d,e,f,g,h){h=h||d;return b.fire(c+a.ucfirst(d)+"Change",{attrName:h,subAttrName:g,prevVal:e,newVal:f})}function d(a,b,c){var d=a[b]||{};c&&(a[b]=d);return d}function e(a){return d(a,"__attrs",!0)}function g(a){return d(a,"__attrVals",!0)}function c(a,c){for(var d=0,e=c.length;a!=b&&d<e;d++)a=a[c[d]];return a}function l(a,b){var c;!a.hasAttr(b)&&-1!==b.indexOf(".")&&(c=b.split("."),b=c.shift());
return{path:c,name:b}}function k(c,d,e){var f=e;if(d){var c=f=c===b?{}:a.clone(c),g=d.length-1;if(0<=g){for(var h=0;h<g;h++)c=c[d[h]];c!=b&&(c[d[h]]=e)}}return f}function j(a,d,e,f,h){var f=f||{},j,m,n;n=l(a,d);var p=d,d=n.name;j=n.path;n=a.get(d);j&&(m=c(n,j));if(!j&&n===e||j&&m===e)return b;e=k(n,j,e);if(!f.silent&&!1===i(a,"before",d,n,e,p))return!1;e=a.setInternal(d,e,f);if(!1===e)return e;f.silent||(e=g(a)[d],i(a,"after",d,n,e,p),h?h.push({prevVal:n,newVal:e,attrName:d,subAttrName:p}):i(a,"",
"*",[n],[e],[p],[d]));return a}function f(){}function m(a,c){var f=e(a),g=d(f,c),j=g.valueFn;if(j&&(j=h(a,j)))j=j.call(a),j!==b&&(g.value=j),delete g.valueFn,f[c]=g;return g.value}function p(a,c,f,g){var j,i;j=l(a,c);c=j.name;if(j=j.path)i=a.get(c),f=k(i,j,f);if((j=d(e(a),c,!0).validator)&&(j=h(a,j)))if(a=j.call(a,f,c,g),a!==b&&!0!==a)return a;return b}f.INVALID={};var n=f.INVALID;f.prototype={getAttrs:function(){return e(this)},getAttrVals:function(){var a={},b,c=e(this);for(b in c)a[b]=this.get(b);
return a},addAttr:function(b,c,d){var f=e(this),c=a.clone(c);f[b]?a.mix(f[b],c,d):f[b]=c;return this},addAttrs:function(b,c){var d=this;a.each(b,function(a,b){d.addAttr(b,a)});c&&d.set(c);return d},hasAttr:function(a){return e(this).hasOwnProperty(a)},removeAttr:function(a){this.hasAttr(a)&&(delete e(this)[a],delete g(this)[a]);return this},set:function(c,d,e){if(a.isPlainObject(c)){var e=d,d=Object(c),f=[],g,h=[];for(c in d)(g=p(this,c,d[c],d))!==b&&h.push(g);if(h.length)return e&&e.error&&e.error(h),
!1;for(c in d)j(this,c,d[c],e,f);var k=[],l=[],m=[],n=[];a.each(f,function(a){l.push(a.prevVal);m.push(a.newVal);k.push(a.attrName);n.push(a.subAttrName)});k.length&&i(this,"","*",l,m,n,k);return this}return j(this,c,d,e)},setInternal:function(a,c,f){var j,i,k=d(e(this),a,!0).setter;i=p(this,a,c);if(i!==b)return f.error&&f.error(i),!1;if(k&&(k=h(this,k)))j=k.call(this,c,a);if(j===n)return!1;j!==b&&(c=j);g(this)[a]=c},get:function(a){var f,j=this.hasAttr(a),i=g(this),k;!j&&-1!==a.indexOf(".")&&(f=
a.split("."),a=f.shift());j=d(e(this),a).getter;k=a in i?i[a]:m(this,a);if(j&&(j=h(this,j)))k=j.call(this,k,a);!(a in i)&&k!==b&&(i[a]=k);f&&(k=c(k,f));return k},reset:function(a,b){if("string"==typeof a)return this.hasAttr(a)?this.set(a,m(this,a),b):this;var b=a,c=e(this),d={};for(a in c)d[a]=m(this,a);this.set(d,b);return this}};return f});
KISSY.add("base",function(a,b,h){function i(a){var b=this.constructor;for(this.userConfig=a;b;){var g=b.ATTRS;if(g){var c=void 0;for(c in g)this.addAttr(c,g[c],!1)}b=b.superclass?b.superclass.constructor:null}if(a)for(var h in a)this.setInternal(h,a[h])}a.augment(i,h.Target,b);i.Attribute=b;return a.Base=i},{requires:["base/attribute","event/custom"]});KISSY.add("anim",function(a,b,h){b.Easing=h;a.mix(a,{Anim:b,Easing:b.Easing});return b},{requires:["anim/base","anim/easing","anim/color","anim/background-position"]});
KISSY.add("anim/background-position",function(a,b,h,i){function d(a){a=a.replace(/left|top/g,"0px").replace(/right|bottom/g,"100%").replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");a=a.match(/(-?[0-9\.]+)(px|%|em|pt)\s(-?[0-9\.]+)(px|%|em|pt)/);return[parseFloat(a[1]),a[2],parseFloat(a[3]),a[4]]}function e(){e.superclass.constructor.apply(this,arguments)}a.extend(e,i,{load:function(){e.superclass.load.apply(this,arguments);this.unit=["px","px"];if(this.from){var a=d(this.from);this.from=[a[0],a[2]]}else this.from=
[0,0];this.to?(a=d(this.to),this.to=[a[0],a[2]],this.unit=[a[1],a[3]]):this.to=[0,0]},interpolate:function(a,b,d){var h=this.unit,j=e.superclass.interpolate;return j(a[0],b[0],d)+h[0]+" "+j(a[1],b[1],d)+h[1]},cur:function(){return b.css(this.anim.config.el,"backgroundPosition")},update:function(){var a=this.prop,c=this.anim.config.el,d=this.interpolate(this.from,this.to,this.pos);b.css(c,a,d)}});return i.Factories.backgroundPosition=e},{requires:["dom","./base","./fx"]});
KISSY.add("anim/base",function(a,b,h,i,d,e,g){function c(d,e,f,h,g){if(d.el)return f=d.el,e=d.props,delete d.el,delete d.props,new c(f,e,d);if(d=b.get(d)){if(!(this instanceof c))return new c(d,e,f,h,g);e="string"==typeof e?a.unparam(""+e,";",":"):a.clone(e);a.each(e,function(b,c){var d=a.trim(o(c));d?c!=d&&(e[d]=e[c],delete e[c]):delete e[c]});f=a.isPlainObject(f)?a.clone(f):{duration:parseFloat(f)||void 0,easing:h,complete:g};f=a.merge(s,f);f.el=d;f.props=e;this.config=f;this._duration=1E3*f.duration;
this.domEl=d;this._backupProps={};this._fxs={};this.on("complete",l)}}function l(c){var d,e,f=this.config;a.isEmptyObject(d=this._backupProps)||b.css(f.el,d);(e=f.complete)&&e.call(this,c)}function k(){var c=this.config,f=this._backupProps,h=c.el,g,k,l,m=c.specialEasing||{},p=this._fxs,o=c.props;j(this);if(!1===this.fire("beforeStart"))this.stop(0);else{if(h.nodeType==q.ELEMENT_NODE)for(l in k="none"===b.css(h,"display"),o)if(g=o[l],"hide"==g&&k||"show"==g&&!k){this.stop(1);return}if(h.nodeType==
q.ELEMENT_NODE&&(o.width||o.height))g=h.style,a.mix(f,{overflow:g.overflow,"overflow-x":g.overflowX,"overflow-y":g.overflowY}),g.overflow="hidden","inline"===b.css(h,"display")&&"none"===b.css(h,"float")&&(n.ie?g.zoom=1:g.display="inline-block");a.each(o,function(b,d){var e;a.isArray(b)?(e=m[d]=b[1],o[d]=b[0]):e=m[d]=m[d]||c.easing;"string"==typeof e&&(e=m[d]=i[e]);m[d]=e||i.easeNone});a.each(r,function(c,d){var e,f;if(f=o[d])e={},a.each(c,function(a){e[a]=b.css(h,a);m[a]=m[d]}),b.css(h,d,f),a.each(e,
function(a,c){o[c]=b.css(h,c);b.css(h,c,a)}),delete o[d]});for(l in o){g=a.trim(o[l]);var s,v,w={prop:l,anim:this,easing:m[l]},C=e.getFx(w);a.inArray(g,t)?(f[l]=b.style(h,l),"toggle"==g&&(g=k?"show":"hide"),"hide"==g?(s=0,v=C.cur(),f.display="none"):(v=0,s=C.cur(),b.css(h,l,v),b.show(h)),g=s):(s=g,v=C.cur());g+="";var G="",F=g.match(u);if(F){s=parseFloat(F[2]);if((G=F[3])&&"px"!==G)b.css(h,l,g),v*=s/C.cur(),b.css(h,l,v+G);F[1]&&(s=("-="===F[1]?-1:1)*s+v)}w.from=v;w.to=s;w.unit=G;C.load(w);p[l]=C}this._startTime=
a.now();d.start(this)}}function j(c){var d=c.config.el,e=b.data(d,v);e||b.data(d,v,e={});e[a.stamp(c)]=c}function f(c){var d=c.config.el,e=b.data(d,v);e&&(delete e[a.stamp(c)],a.isEmptyObject(e)&&b.removeData(d,v))}function m(c,d,e){c=b.data(c,"resume"==e?w:v);c=a.merge(c);a.each(c,function(a){if(void 0===d||a.config.queue==d)a[e]()})}function p(c,d,e,f){e&&!1!==f&&g.removeQueue(c,f);c=b.data(c,v);c=a.merge(c);a.each(c,function(a){a.config.queue==f&&a.stop(d)})}var n=a.UA,o=b._camelCase,q=b.NodeType,
t=["hide","show","toggle"],r={background:["backgroundPosition"],border:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],borderBottom:["borderBottomWidth"],borderLeft:["borderLeftWidth"],borderTop:["borderTopWidth"],borderRight:["borderRightWidth"],font:["fontSize","fontWeight"],margin:["marginBottom","marginLeft","marginRight","marginTop"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"]},s={duration:1,easing:"easeNone"},u=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i;
c.SHORT_HANDS=r;c.prototype={constructor:c,isRunning:function(){var c=b.data(this.config.el,v);return c?!!c[a.stamp(this)]:0},isPaused:function(){var c=b.data(this.config.el,w);return c?!!c[a.stamp(this)]:0},pause:function(){if(this.isRunning()){this._pauseDiff=a.now()-this._startTime;d.stop(this);f(this);var c=this.config.el,e=b.data(c,w);e||b.data(c,w,e={});e[a.stamp(this)]=this}return this},resume:function(){if(this.isPaused()){this._startTime=a.now()-this._pauseDiff;var c=this.config.el,e=b.data(c,
w);e&&(delete e[a.stamp(this)],a.isEmptyObject(e)&&b.removeData(c,w));j(this);d.start(this)}return this},_runInternal:k,run:function(){!1===this.config.queue?k.call(this):g.queue(this);return this},_frame:function(){var a,b=this.config,c=1,d,e,f=this._fxs;for(a in f)if(!(e=f[a]).finished)b.frame&&(d=b.frame(e)),1==d||0==d?(e.finished=d,c&=d):(c&=e.frame())&&b.frame&&b.frame(e);(!1===this.fire("step")||c)&&this.stop(c)},stop:function(a){var b=this.config,c=b.queue,e,h=this._fxs;if(!this.isRunning())return!1!==
c&&g.remove(this),this;if(a){for(e in h)if(!(a=h[e]).finished)b.frame?b.frame(a,1):a.frame(1);this.fire("complete")}d.stop(this);f(this);!1!==c&&g.dequeue(this);return this}};a.augment(c,h.Target);var v=a.guid("ks-anim-unqueued-"+a.now()+"-"),w=a.guid("ks-anim-paused-"+a.now()+"-");c.stop=function(c,d,e,f){if(null===f||"string"==typeof f||!1===f)return p.apply(void 0,arguments);e&&g.removeQueues(c);var h=b.data(c,v),h=a.merge(h);a.each(h,function(a){a.stop(d)})};a.each(["pause","resume"],function(a){c[a]=
function(b,c){if(null===c||"string"==typeof c||!1===c)return m(b,c,a);m(b,void 0,a)}});c.isRunning=function(c){return(c=b.data(c,v))&&!a.isEmptyObject(c)};c.isPaused=function(c){return(c=b.data(c,w))&&!a.isEmptyObject(c)};c.Q=g;return c},{requires:"dom,event,./easing,./manager,./fx,./queue".split(",")});
KISSY.add("anim/color",function(a,b,h,i){function d(a){var a=a+"",b;if(b=a.match(k))return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])];if(b=a.match(j))return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3]),parseInt(b[4])];if(b=a.match(f)){for(a=1;a<b.length;a++)2>b[a].length&&(b[a]+=b[a]);return[parseInt(b[1],g),parseInt(b[2],g),parseInt(b[3],g)]}return l[a=a.toLowerCase()]?l[a]:[255,255,255]}function e(){e.superclass.constructor.apply(this,arguments)}var g=16,c=Math.floor,l={black:[0,0,0],silver:[192,
192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]},k=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,j=/^rgba\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+),\s*([0-9]+)\)$/i,f=/^#?([0-9A-F]{1,2})([0-9A-F]{1,2})([0-9A-F]{1,2})$/i,b=h.SHORT_HANDS;b.background=b.background||[];b.background.push("backgroundColor");
b.borderColor=["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"];b.border.push("borderBottomColor","borderLeftColor","borderRightColor","borderTopColor");b.borderBottom.push("borderBottomColor");b.borderLeft.push("borderLeftColor");b.borderRight.push("borderRightColor");b.borderTop.push("borderTopColor");a.extend(e,i,{load:function(){e.superclass.load.apply(this,arguments);this.from&&(this.from=d(this.from));this.to&&(this.to=d(this.to))},interpolate:function(a,b,d){var f=
e.superclass.interpolate;if(3==a.length&&3==b.length)return"rgb("+[c(f(a[0],b[0],d)),c(f(a[1],b[1],d)),c(f(a[2],b[2],d))].join(", ")+")";if(4==a.length||4==b.length)return"rgba("+[c(f(a[0],b[0],d)),c(f(a[1],b[1],d)),c(f(a[2],b[2],d)),c(f(a[3]||1,b[3]||1,d))].join(", ")+")"}});a.each("backgroundColor,borderBottomColor,borderLeftColor,borderRightColor,borderTopColor,color,outlineColor".split(","),function(a){i.Factories[a]=e});return e},{requires:["dom","./base","./fx"]});
KISSY.add("anim/easing",function(){var a=Math.PI,b=Math.pow,h=Math.sin,i={swing:function(b){return-Math.cos(b*a)/2+0.5},easeNone:function(a){return a},easeIn:function(a){return a*a},easeOut:function(a){return(2-a)*a},easeBoth:function(a){return 1>(a*=2)?0.5*a*a:0.5*(1- --a*(a-2))},easeInStrong:function(a){return a*a*a*a},easeOutStrong:function(a){return 1- --a*a*a*a},easeBothStrong:function(a){return 1>(a*=2)?0.5*a*a*a*a:0.5*(2-(a-=2)*a*a*a)},elasticIn:function(d){return 0===d||1===d?d:-(b(2,10*(d-=
1))*h((d-0.075)*2*a/0.3))},elasticOut:function(d){return 0===d||1===d?d:b(2,-10*d)*h((d-0.075)*2*a/0.3)+1},elasticBoth:function(d){return 0===d||2===(d*=2)?d:1>d?-0.5*b(2,10*(d-=1))*h((d-0.1125)*2*a/0.45):0.5*b(2,-10*(d-=1))*h((d-0.1125)*2*a/0.45)+1},backIn:function(a){1===a&&(a-=0.0010);return a*a*(2.70158*a-1.70158)},backOut:function(a){return(a-=1)*a*(2.70158*a+1.70158)+1},backBoth:function(a){var b,h=(b=2.5949095)+1;return 1>(a*=2)?0.5*a*a*(h*a-b):0.5*((a-=2)*a*(h*a+b)+2)},bounceIn:function(a){return 1-
i.bounceOut(1-a)},bounceOut:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375},bounceBoth:function(a){return 0.5>a?0.5*i.bounceIn(2*a):0.5*i.bounceOut(2*a-1)+0.5}};return i});
KISSY.add("anim/fx",function(a,b,h){function i(a){this.load(a)}function d(a,d){return(!a.style||null==a.style[d])&&null!=b.attr(a,d,h,1)?1:0}i.prototype={constructor:i,load:function(b){a.mix(this,b);this.pos=0;this.unit=this.unit||""},frame:function(b){var d=this.anim,c=0;if(this.finished)return 1;var h=a.now(),i=d._startTime,d=d._duration;b||h>=d+i?c=this.pos=1:this.pos=this.easing((h-i)/d);this.update();this.finished=this.finished||c;return c},interpolate:function(b,d,c){return a.isNumber(b)&&a.isNumber(d)?
(b+(d-b)*c).toFixed(3):h},update:function(){var a=this.prop,g=this.anim.config.el,c=this.to,i=this.interpolate(this.from,c,this.pos);i===h?this.finished||(this.finished=1,b.css(g,a,c)):(i+=this.unit,d(g,a)?b.attr(g,a,i,1):b.css(g,a,i))},cur:function(){var a=this.prop,g=this.anim.config.el;if(d(g,a))return b.attr(g,a,h,1);var c,a=b.css(g,a);return isNaN(c=parseFloat(a))?!a||"auto"===a?0:a:c}};i.Factories={};i.getFx=function(a){return new (i.Factories[a.prop]||i)(a)};return i},{requires:["dom"]});
KISSY.add("anim/manager",function(a){var b=a.stamp;return{interval:15,runnings:{},timer:null,start:function(a){var i=b(a);this.runnings[i]||(this.runnings[i]=a,this.startTimer())},stop:function(a){this.notRun(a)},notRun:function(h){delete this.runnings[b(h)];a.isEmptyObject(this.runnings)&&this.stopTimer()},pause:function(a){this.notRun(a)},resume:function(a){this.start(a)},startTimer:function(){var a=this;a.timer||(a.timer=setTimeout(function(){a.runFrames()?a.stopTimer():(a.timer=0,a.startTimer())},
a.interval))},stopTimer:function(){var a=this.timer;a&&(clearTimeout(a),this.timer=0)},runFrames:function(){var a=1,b,d=this.runnings;for(b in d)a=0,d[b]._frame();return a}}});
KISSY.add("anim/queue",function(a,b){function h(a,h,g){var h=h||e,j,f=b.data(a,d);!f&&!g&&b.data(a,d,f={});f&&(j=f[h],!j&&!g&&(j=f[h]=[]));return j}function i(c,h){var h=h||e,g=b.data(c,d);g&&delete g[h];a.isEmptyObject(g)&&b.removeData(c,d)}var d=a.guid("ks-queue-"+a.now()+"-"),e=a.guid("ks-queue-"+a.now()+"-"),g={queueCollectionKey:d,queue:function(a){var b=h(a.config.el,a.config.queue);b.push(a);"..."!==b[0]&&g.dequeue(a);return b},remove:function(b){var d=h(b.config.el,b.config.queue,1);d&&(b=
a.indexOf(b,d),-1<b&&d.splice(b,1))},removeQueues:function(a){b.removeData(a,d)},removeQueue:i,dequeue:function(a){var b=a.config.el,a=a.config.queue,d=h(b,a,1),e=d&&d.shift();"..."==e&&(e=d.shift());e?(d.unshift("..."),e._runInternal()):i(b,a)}};return g},{requires:["dom"]});
KISSY.add("node/anim",function(a,b,h,i,d){function e(a,b,d){for(var e=[],f={},d=d||0;d<b;d++)e.push.apply(e,g[d]);for(d=0;d<e.length;d++)f[e[d]]=a;return f}var g=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];a.augment(i,{animate:function(b){var e=a.makeArray(arguments);a.each(this,function(b){var c=a.clone(e),f=c[0];f.props?(f.el=b,h(f).run()):h.apply(d,[b].concat(c)).run()});return this},stop:function(b,
d,e){a.each(this,function(a){h.stop(a,b,d,e)});return this},pause:function(b,d){a.each(this,function(a){h.pause(a,d)});return this},resume:function(b,d){a.each(this,function(a){h.resume(a,d)});return this},isRunning:function(){for(var a=0;a<this.length;a++)if(h.isRunning(this[a]))return!0;return!1},isPaused:function(){for(var a=0;a<this.length;a++)if(h.isPaused(this[a]))return 1;return 0}});a.each({show:e("show",3),hide:e("hide",3),toggle:e("toggle",3),fadeIn:e("show",3,2),fadeOut:e("hide",3,2),fadeToggle:e("toggle",
3,2),slideDown:e("show",1),slideUp:e("hide",1),slideToggle:e("toggle",1)},function(c,d){i.prototype[d]=function(e,g,f){if(b[d]&&!e)b[d](this);else a.each(this,function(a){h(a,c,e,f||"easeOut",g).run()});return this}})},{requires:["dom","anim","./base"]});
KISSY.add("node/attach",function(a,b,h,i,d){function e(a,c,e){e.unshift(c);a=b[a].apply(b,e);return a===d?c:a}var g=i.prototype,c=a.makeArray;i.KeyCodes=h.KeyCodes;a.each("nodeName,equals,contains,index,scrollTop,scrollLeft,height,width,innerHeight,innerWidth,outerHeight,outerWidth,addStyleSheet,appendTo,prependTo,insertBefore,before,after,insertAfter,test,hasClass,addClass,removeClass,replaceClass,toggleClass,removeAttr,hasAttr,hasProp,scrollIntoView,remove,empty,removeData,hasData,unselectable,wrap,wrapAll,replaceWith,wrapInner,unwrap".split(","),function(a){g[a]=
function(){var b=c(arguments);return e(a,this,b)}});a.each("filter,first,last,parent,closest,next,prev,clone,siblings,contents,children".split(","),function(a){g[a]=function(){var e=c(arguments);e.unshift(this);e=b[a].apply(b,e);return e===d?this:e===null?null:new i(e)}});a.each({attr:1,text:0,css:1,style:1,val:0,prop:1,offset:0,html:0,outerHTML:0,data:1},function(h,i){g[i]=function(){var g;g=c(arguments);g[h]===d&&!a.isObject(g[0])?(g.unshift(this),g=b[i].apply(b,g)):g=e(i,this,g);return g}});a.each("on,detach,fire,fireHandler,delegate,undelegate".split(","),
function(a){g[a]=function(){var b=c(arguments);b.unshift(this);h[a].apply(h,b);return this}})},{requires:["dom","event/dom","./base"]});
KISSY.add("node/base",function(a,b,h){function i(d,e,m){if(!(this instanceof i))return new i(d,e,m);if(d)if("string"==typeof d){if(d=b.create(d,e,m),d.nodeType===g.DOCUMENT_FRAGMENT_NODE)return c.apply(this,l(d.childNodes)),h}else{if(a.isArray(d)||k(d))return c.apply(this,l(d)),h}else return h;this[0]=d;this.length=1;return h}var d=Array.prototype,e=d.slice,g=b.NodeType,c=d.push,l=a.makeArray,k=b._isNodeList;i.prototype={length:0,item:function(b){return a.isNumber(b)?b>=this.length?null:new i(this[b]):
new i(b)},add:function(b,e,g){a.isNumber(e)&&(g=e,e=h);b=i.all(b,e).getDOMNodes();e=new i(this);g===h?c.apply(e,b):(g=[g,0],g.push.apply(g,b),d.splice.apply(e,g));return e},slice:function(a,b){return new i(e.apply(this,arguments))},getDOMNodes:function(){return e.call(this)},each:function(b,c){var d=this;a.each(d,function(a,e){a=new i(a);return b.call(c||a,a,e,d)});return d},getDOMNode:function(){return this[0]},end:function(){return this.__parent||this},all:function(a){a=0<this.length?i.all(a,this):
new i;a.__parent=this;return a},one:function(a){a=this.all(a);if(a=a.length?a.slice(0,1):null)a.__parent=this;return a}};a.mix(i,{all:function(c,d){return"string"==typeof c&&(c=a.trim(c))&&3<=c.length&&a.startsWith(c,"<")&&a.endsWith(c,">")?(d&&(d.getDOMNode&&(d=d[0]),d.ownerDocument&&(d=d.ownerDocument)),new i(c,h,d)):new i(b.query(c,d))},one:function(a,b){var c=i.all(a,b);return c.length?c.slice(0,1):null}});i.NodeType=g;return i},{requires:["dom"]});
KISSY.add("node",function(a,b){a.mix(a,{Node:b,NodeList:b,one:b.one,all:b.all});return b},{requires:["node/base","node/attach","node/override","node/anim"]});
KISSY.add("node/override",function(a,b,h){var i=h.prototype;a.each(["append","prepend","before","after"],function(a){i[a]=function(e){"string"==typeof e&&(e=b.create(e));if(e)b[a](e,this);return this}});a.each(["wrap","wrapAll","replaceWith","wrapInner"],function(a){var b=i[a];i[a]=function(a){"string"==typeof a&&(a=h.all(a,this[0].ownerDocument));return b.call(this,a)}})},{requires:["dom","./base"]});KISSY.use("ua,dom,event,node,json,ajax,anim,base,cookie");
