/*
Copyright 2012, KISSY UI Library v1.30rc
MIT Licensed
build time: Jul 11 21:24
*/
KISSY.add("event/add",function(a,d,g,h,i,c,m,k){function j(a,c,l,e,f){var o=k[c]||{};!e.length&&(!o.setup||!1===o.setup.call(a))&&b(a,c,l);o.add&&o.add.call(a,f)}var b=h.simpleAdd,p=h.isValidTarget,r=h.isIdenticalHandler;a.mix(d,{__add:function(q,b,l,e,f){var o=h.getTypedGroups(l),l=o[0],g=o[1],t,x,o=k[l],v,s,u;a.isObject(e)&&(s=e.last,f=e.scope,x=e.data,u=e.selector,v=e.originalType,e=e.fn,u&&!v&&o&&o.delegateFix&&(v=l,l=o.delegateFix));!u&&!v&&o&&o.onFix&&(v=l,l=o.onFix);if(l&&b&&a.isFunction(e)&&
(!q||p(b))){(t=d._data(b))||m._data(b,t={});var o=t.events=t.events||{},o=o[l]=o[l]||[],e={fn:e,scope:f,selector:u,last:s,data:x,groups:g,originalType:v},w=t.handler;w||(w=t.handler=function(f,e){if(!(typeof KISSY=="undefined"||f&&f.type==h.Event_Triggered)){var b=w.target,q;if(!f||!f.fixed)f=new i(b,f);q=f.type;a.isPlainObject(e)&&a.mix(f,e);if(q)f.type=q;return c(b,f)}},w.target=b);for(f=o.length-1;0<=f;--f)if(r(o[f],e,b))return;q&&(j(b,l,w,o,e),b=null);u?(q=o.delegateCount=o.delegateCount||0,o.splice(q,
0,e),o.delegateCount++):(o.lastCount=o.lastCount||0,s?(o.push(e),o.lastCount++):o.splice(o.length-o.lastCount,0,e))}},add:function(b,c,k,e){c=a.trim(c);if(h.batchForType(d.add,b,c,k,e))return b;for(var b=g.query(b),f=b.length-1;0<=f;f--)d.__add(!0,b[f],c,k,e);return b}})},{requires:"./base,dom,./utils,./object,./handle,./data,./special".split(",")});
KISSY.add("event/base",function(a,d,g,h,i,c,m){function k(b,e,f,c){if(!j(b))return!1;var k=m[e];k&&k.onFix&&(e=k.onFix);var n=!0;f instanceof g?k=f:(k=new g(b,void 0,e),a.mix(k,f));k._ks_fired=1;k.type=e;var f=b,r,v=d._getWin(f.ownerDocument||f),s="on"+e;do k.currentTarget=f,r=i(f,k),!1!==n&&(n=r),f[s]&&!1===f[s].call(f)&&k.preventDefault(),f=f.parentNode||f.ownerDocument||f===b.ownerDocument&&v;while(!c&&f&&!k.isPropagationStopped);if(!c&&!k.isDefaultPrevented&&!("click"===e&&"a"==p(b))){var u;try{if(s&&
b[e]&&("focus"!==e&&"blur"!==e||0!==b.offsetWidth)&&!a.isWindow(b))(u=b[s])&&(b[s]=null),h.Event_Triggered=e,b[e]()}catch(w){}u&&(b[s]=u);h.Event_Triggered=q}return n}var j=h.isValidTarget,b=h.splitAndRun,p=d.nodeName,r=a.trim,q=h.TRIGGERED_NONE,n={_clone:function(b,e){if(e.nodeType===d.ELEMENT_NODE&&c._hasData(b)){var f=c._data(b).events;a.each(f,function(f,b){a.each(f,function(f){n.on(e,b,{data:f.data,fn:f.fn,groups:f.groups,last:f.last,originalType:f.originalType,scope:f.scope,selector:f.selector})})})}},
fire:function(c,e,f,q){var i=!0,m,f=f||{};if(a.isString(e)){e=r(e);if(-1<e.indexOf(" "))return b(e,function(b){m=n.fire(c,b,f,q);!1!==i&&(i=m)}),i;f.type=e}else e instanceof g&&(f=e,e=f.type);var e=h.getTypedGroups(e),j=e[1];j&&(j=h.getGroupsRe(j));e=e[0];a.mix(f,{type:e,_ks_groups:j});c=d.query(c);for(j=c.length-1;0<=j;j--)m=k(c[j],e,f,q),!1!==i&&(i=m);return i},fireHandler:function(b,a,f){return n.fire(b,a,f,1)}};return n},{requires:"dom,./object,./utils,./handle,./data,./special".split(",")});
KISSY.add("event/change",function(a,d,g,h,i){var c=a.Env.host.document.documentMode;if(d.ie&&(9>d.ie||c&&9>c)){var m=/^(?:textarea|input|select)$/i,k=function(b){b=b.type;return"checkbox"==b||"radio"==b};i.change={setup:function(){if(m.test(this.nodeName))if(k(this))g.on(this,"propertychange",j),g.on(this,"click",b);else return!1;else g.on(this,"beforeactivate",p)},tearDown:function(){if(m.test(this.nodeName))if(k(this))g.remove(this,"propertychange",j),g.remove(this,"click",b);else return!1;else g.remove(this,
"beforeactivate",p),a.each(h.query("textarea,input,select",this),function(b){b.__changeHandler&&(b.__changeHandler=0,g.remove(b,"change",{fn:r,last:1}))})}};var j=function(b){"checked"==b.originalEvent.propertyName&&(this.__changed=1)},b=function(b){this.__changed&&(this.__changed=0,g.fire(this,"change",b))},p=function(b){b=b.target;m.test(b.nodeName)&&!b.__changeHandler&&(b.__changeHandler=1,g.on(b,"change",{fn:r,last:1}))},r=function(b){if(!b.isPropagationStopped&&!k(this)){var a;(a=this.parentNode)&&
g.fire(a,"change",b)}}}},{requires:["ua","./base","dom","./special"]});KISSY.add("event/data",function(a,d,g){var h=g.EVENT_GUID,i=a.makeArray;return{_hasData:function(a){return d.hasData(a,h)},_data:function(a){var m=i(arguments);m.splice(1,0,h);return d.data.apply(d,m)},_removeData:function(a){var m=i(arguments);m.splice(1,0,h);return d.removeData.apply(d,m)}}},{requires:["dom","./utils"]});
KISSY.add("event",function(a,d,g,h,i,c){a.mix(h,{KeyCodes:g,Target:i,Object:c,on:h.add,detach:h.remove,delegate:function(a,c,i,b,d){return h.add(a,c,{fn:b,scope:d,selector:i})},undelegate:function(a,c,i,b,d){return h.remove(a,c,{fn:b,scope:d,selector:i})}});a.mix(h,d);a.mix(a,{Event:h,EventTarget:h.Target,EventObject:h.Object});return h},{requires:"event/data,event/keycodes,event/base,event/target,event/object,event/focusin,event/hashchange,event/valuechange,event/mouseenter,event/submit,event/change,event/mousewheel,event/add,event/remove".split(",")});
KISSY.add("event/focusin",function(a,d,g,h){d.ie||a.each([{name:"focusin",fix:"focus"},{name:"focusout",fix:"blur"}],function(i){function c(a){return g.fire(a.target,i.name)}var d=a.guid("attaches_"+a.now()+"_");h[i.name]={setup:function(){var a=this.ownerDocument||this;d in a||(a[d]=0);a[d]+=1;1===a[d]&&a.addEventListener(i.fix,c,!0)},tearDown:function(){var a=this.ownerDocument||this;a[d]-=1;0===a[d]&&a.removeEventListener(i.fix,c,!0)}}});h.focus={delegateFix:"focusin"};h.blur={delegateFix:"focusout"};
return g},{requires:["ua","./base","./special"]});
KISSY.add("event/handle",function(a,d,g,h){return function(a,c){var m=g._data(a),k=(m&&m.events||{})[c.type]||[],j=c.target,b,m=[],p,r,q,n=k.delegateCount||0,l,e;if(n&&!j.disabled)for(;j!=a;){l=[];for(q=0;q<n;q++)b=k[q],d.test(j,b.selector)&&l.push(b);l.length&&m.push({currentTarget:j,currentTargetHandlers:l});j=j.parentNode||a}m.push({currentTarget:a,currentTargetHandlers:k.slice(n)});var j=c.type,f,n=c._ks_groups;q=0;for(k=m.length;!c.isPropagationStopped&&q<k;++q){b=m[q];l=b.currentTargetHandlers;
b=b.currentTarget;c.currentTarget=b;for(b=0;!c.isImmediatePropagationStopped&&b<l.length;b++)if(e=l[b],!n||e.groups&&e.groups.match(n)){var o=e.data;c.type=e.originalType||j;(f=h[c.type])&&f.handle?(e=f.handle(c,e,o),0<e.length&&(p=e[0])):p=e.fn.call(e.scope||a,c,o);!1!==r&&(r=p);!1===p&&c.halt()}}return r}},{requires:["dom","./data","./special"]});
KISSY.add("event/hashchange",function(a,d,g,h,i){var c=a.Env.host,m=c.document,h=m.documentMode||h.ie;if(!("onhashchange"in c)||h&&8>h){var k="<html><head><title>"+(m.title||"")+" - {hash}</title>{head}</head><body>{hash}</body></html>",j=function(){return"#"+location.href.replace(/^[^#]*#?(.*)$/,"$1")},b,p,r=function(){var f=j();f!==p&&(p=f,q(f));b=setTimeout(r,50)},q=h&&8>h?function(f){var f=a.substitute(k,{hash:a.escapeHTML(f),head:g.isCustomDomain()?"<script>document.domain = '"+m.domain+"';<\/script>":
""}),b=e.contentWindow.document;try{b.open(),b.write(f),b.close()}catch(c){}}:function(){d.fire(c,"hashchange")},n=function(){b||r()},l=function(){b&&clearTimeout(b);b=0},e;8>h&&(n=function(){if(!e){var f=g.getEmptyIframeSrc();e=g.create("<iframe "+(f?'src="'+f+'"':"")+' style="display: none" height="0" width="0" tabindex="-1" title="empty"/>');g.prepend(e,m.documentElement);d.add(e,"load",function(){d.remove(e,"load");q(j());d.add(e,"load",b);r()});m.onpropertychange=function(){try{"title"===event.propertyName&&
(e.contentWindow.document.title=m.title+" - "+j())}catch(f){}};var b=function(){var f=a.trim(e.contentWindow.document.body.innerText),b=j();f!=b&&(p=location.hash=f);d.fire(c,"hashchange")}}},l=function(){b&&clearTimeout(b);b=0;d.detach(e);g.remove(e);e=0});i.hashchange={setup:function(){if(this===c){p=j();n()}},tearDown:function(){this===c&&l()}}}},{requires:["./base","dom","ua","./special"]});
KISSY.add("event/keycodes",function(){var a={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(d){if(d.altKey&&!d.ctrlKey||d.metaKey||d.keyCode>=a.F1&&d.keyCode<=a.F12)return!1;switch(d.keyCode){case a.ALT:case a.CAPS_LOCK:case a.CONTEXT_MENU:case a.CTRL:case a.DOWN:case a.END:case a.ESC:case a.HOME:case a.INSERT:case a.LEFT:case a.MAC_FF_META:case a.META:case a.NUMLOCK:case a.NUM_CENTER:case a.PAGE_DOWN:case a.PAGE_UP:case a.PAUSE:case a.PHANTOM:case a.PRINT_SCREEN:case a.RIGHT:case a.SHIFT:case a.UP:case a.WIN_KEY:case a.WIN_KEY_RIGHT:return!1;
default:return!0}},isCharacterKey:function(d){if(d>=a.ZERO&&d<=a.NINE||d>=a.NUM_ZERO&&d<=a.NUM_MULTIPLY||d>=a.A&&d<=a.Z||goog.userAgent.WEBKIT&&0==d)return!0;switch(d){case a.SPACE:case a.QUESTION_MARK:case a.NUM_PLUS:case a.NUM_MINUS:case a.NUM_PERIOD:case a.NUM_DIVISION:case a.SEMICOLON:case a.DASH:case a.EQUALS:case a.COMMA:case a.PERIOD:case a.SLASH:case a.APOSTROPHE:case a.SINGLE_QUOTE:case a.OPEN_SQUARE_BRACKET:case a.BACKSLASH:case a.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};return a});
KISSY.add("event/mouseenter",function(a,d,g,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,c,d){var b=a.currentTarget,i=a.relatedTarget;return!i||i!==b&&!g.contains(b,i)?[c.fn.call(c.scope||b,a,d)]:[]}}});return d},{requires:["./base","dom","ua","./special"]});
KISSY.add("event/mousewheel",function(a,d,g,h,i,c,m,k){function j(b){var d,j,e,f=b.detail;b.wheelDelta&&(e=b.wheelDelta/120);b.detail&&(e=-(0==f%3?f/3:f));void 0!==b.axis&&(b.axis===b.HORIZONTAL_AXIS?(j=0,d=-1*e):b.axis===b.VERTICAL_AXIS&&(d=0,j=e));void 0!==b.wheelDeltaY&&(j=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(d=-1*b.wheelDeltaX/120);!d&&!j&&(j=e);b=new i(this,b);a.mix(b,{deltaY:j,delta:e,deltaX:d,type:"mousewheel"});return c(this,b)}var b=g.gecko?"DOMMouseScroll":"mousewheel",p=h.simpleRemove,
r=h.simpleAdd;k.mousewheel={setup:function(){var c;c=m._data(this).mousewheelHandler=a.bind(j,this);r(this,b,c)},tearDown:function(){var a,c=m._data(this);a=c.mousewheelHandler;p(this,b,a);delete c[a]}}},{requires:"./base,ua,./utils,./object,./handle,./data,./special".split(",")});
KISSY.add("event/object",function(a,d){function g(a,d,b){this.originalEvent=d||{};this.currentTarget=a;d?(this.type=d.type,this.isDefaultPrevented=d.defaultPrevented||d.returnValue===c||d.getPreventDefault&&d.getPreventDefault()?i:c,this._fix()):(this.type=b,this.target=a);this.currentTarget=a;this.fixed=i}var h=a.Env.host.document,i=!0,c=!1,m="altKey,attrChange,attrName,bubbles,button,cancelable,charCode,clientX,clientY,ctrlKey,currentTarget,data,detail,eventPhase,fromElement,handler,keyCode,metaKey,newValue,offsetX,offsetY,originalTarget,pageX,pageY,prevValue,relatedNode,relatedTarget,screenX,screenY,shiftKey,srcElement,target,toElement,view,wheelDelta,which,axis".split(",");
a.augment(g,{isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,_fix:function(){for(var a=this.originalEvent,c=m.length,b,i=this.currentTarget,i=9===i.nodeType?i:i.ownerDocument||h;c;)b=m[--c],this[b]=a[b];this.target||(this.target=this.srcElement||i);3===this.target.nodeType&&(this.target=this.target.parentNode);!this.relatedTarget&&this.fromElement&&(this.relatedTarget=this.fromElement===this.target?this.toElement:this.fromElement);this.pageX===d&&this.clientX!==d&&(a=i.documentElement,
c=i.body,this.pageX=this.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0),this.pageY=this.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0));this.which===d&&(this.which=this.charCode===d?this.keyCode:this.charCode);this.metaKey===d&&(this.metaKey=this.ctrlKey);!this.which&&this.button!==d&&(this.which=this.button&1?1:this.button&2?3:this.button&4?2:0)},preventDefault:function(){var a=this.originalEvent;a.preventDefault?a.preventDefault():
a.returnValue=c;this.isDefaultPrevented=i},stopPropagation:function(){var a=this.originalEvent;a.stopPropagation?a.stopPropagation():a.cancelBubble=i;this.isPropagationStopped=i},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},halt:function(a){a?this.stopImmediatePropagation():this.stopPropagation();this.preventDefault()}});return g});
KISSY.add("event/remove",function(a,d,g,h,i,c){var m=h.isValidTarget,k=h.simpleRemove;a.mix(d,{__remove:function(g,b,p,r,q){if(b&&(!g||m(b))){var n=h.getTypedGroups(p),p=n[0],l=n[1],e,f=r,o=q,y,n=c[p];a.isObject(r)&&(q=r.scope,y="selector"in r,e=r.selector,r=r.fn,e&&n&&n.delegateFix&&(p=n.delegateFix));e||n&&n.onFix&&(p=n.onFix);var t=(n=i._data(b))&&n.events,x,v,s,u=g&&c[p]||{};if(t)if(p){var w;l&&(w=h.getGroupsRe(l));if(l=t[p]){o=l.length;if((r||y||w)&&o){q=q||b;v=x=0;for(s=[];x<o;++x)f=l[x],q!=
(f.scope||b)||r&&r!=f.fn||y&&(e&&e!=f.selector||!e&&!f.selector)||w&&!f.groups.match(w)?s[v++]=f:(f.selector&&l.delegateCount&&l.delegateCount--,f.last&&l.lastCount&&l.lastCount--,u.remove&&u.remove.call(b,f));s.delegateCount=l.delegateCount;s.lastCount=l.lastCount;t[p]=s;o=s.length}else o=0;o||(g&&(!u.tearDown||!1===u.tearDown.call(b))&&k(b,p,n.handler),delete t[p])}a.isEmptyObject(t)&&(n.handler.target=null,delete n.handler,delete n.events,d._removeData(b))}else for(p in t)t.hasOwnProperty(p)&&
d.__remove(g,b,p+l,f,o)}},remove:function(c,b,i,m){b=a.trim(b);if(h.batchForType(d.remove,c,b,i,m))return c;for(var c=g.query(c),k=c.length-1;0<=k;k--)d.__remove(!0,c[k],b,i,m);return c}})},{requires:["./base","dom","./utils","./data","./special"]});KISSY.add("event/special",function(){return{}});
KISSY.add("event/submit",function(a,d,g,h,i){var c=a.Env.host.document.documentMode;if(d.ie&&(9>d.ie||c&&9>c)){var m=h.nodeName;i.submit={setup:function(){if("form"==m(this))return!1;g.on(this,"click keypress",k)},tearDown:function(){if("form"==m(this))return!1;g.remove(this,"click keypress",k);a.each(h.query("form",this),function(a){a.__submit__fix&&(a.__submit__fix=0,g.remove(a,"submit",{fn:j,last:1}))})}};var k=function(a){var a=a.target,c=m(a);if((a="input"==c||"button"==c?a.form:null)&&!a.__submit__fix)a.__submit__fix=
1,g.on(a,"submit",{fn:j,last:1})},j=function(a){this.parentNode&&!a.isPropagationStopped&&!a._ks_fired&&g.fire(this.parentNode,"submit",a)}}},{requires:["ua","./base","dom","./special"]});
KISSY.add("event/target",function(a,d,g,h,i,c){function m(f,b,d){if(d instanceof g)return d.currentTarget=f,d;f=new g(f,c,b);a.mix(f,d);return f}function k(a){a[r]=a[r]||{};return a[r]}function j(a){a[l]=a[l]||{};return a[l]}function b(a,b){var c=k(a);return c[b]&&c[b].bubbles||c[e]&&c[e].bubbles}function p(a){return function(b,c,i){var e=this,b=q(b);n(b,function(b){d["__"+a](!1,e,b,c,i)});return e}}var r="__~ks_publish",q=a.trim,n=h.splitAndRun,l="__~ks_bubble_targets",e="*";return{fire:function(f,
d){var e=this,g=c,k,j,l,d=d||{},f=q(f);if(0<f.indexOf(" "))return n(f,function(a){k=e.fire(a,d);!1!==g&&(g=k)}),g;j=h.getTypedGroups(f);l=j[1];f=j[0];l&&(l=h.getGroupsRe(l));a.mix(d,{type:f,_ks_groups:l});j=m(e,f,d);g=i(e,j);if(!j.isPropagationStopped&&(j.target!=e||b(e,f)))k=e.bubble(f,j),!1!==g&&(g=k);return g},publish:function(a,b){var c=k(this);(a=q(a))&&n(a,function(a){c[a]=b})},bubble:function(b,d){var e=c,i=j(this);a.each(i,function(a){a=a.fire(b,d);!1!==e&&(e=a)});return e},addTarget:function(b){j(this)[a.stamp(b)]=
b},removeTarget:function(b){delete j(this)[a.stamp(b)]},on:p("add"),detach:p("remove")}},{requires:["./base","./object","./utils","./handle"]});
KISSY.add("event/utils",function(a,d){var g=a.Env.host.document,h=g.addEventListener?function(a,c,d,g){a.addEventListener&&a.addEventListener(c,d,!!g)}:function(a,c,d){a.attachEvent&&a.attachEvent("on"+c,d)},g=g.removeEventListener?function(a,c,d,g){a.removeEventListener&&a.removeEventListener(c,d,!!g)}:function(a,c,d){a.detachEvent&&a.detachEvent("on"+c,d)};return{Event_Triggered:"",TRIGGERED_NONE:"trigger-none-"+a.now(),EVENT_GUID:"ksEventTargetId"+a.now(),splitAndRun:function(d,c){a.each(d.split(/\s+/),
c)},batchForType:function(d,c,g){if(g&&0<g.indexOf(" ")){var h=a.makeArray(arguments);a.each(g.split(/\s+/),function(a){var b=[].concat(h);b.splice(0,3,c,a);d.apply(null,b)});return!0}return 0},isValidTarget:function(a){return a&&a.nodeType!==d.TEXT_NODE&&a.nodeType!==d.COMMENT_NODE},isIdenticalHandler:function(a,c,d){var g=a.scope||d,h=1,d=c.scope||d;if(a.fn!==c.fn||a.selector!==c.selector||a.data!==c.data||g!==d||a.originalType!==c.originalType||a.groups!==c.groups||a.last!==c.last)h=0;return h},
simpleAdd:h,simpleRemove:g,getTypedGroups:function(a){if(0>a.indexOf("."))return[a,""];var c=a.match(/([^.]+)?(\..+)?$/),a=[c[1]];(c=c[2])?(c=c.split(".").sort(),a.push(c.join("."))):a.push("");return a},getGroupsRe:function(a){return RegExp(a.split(".").join(".*\\.")+"(?:\\.|$)")}}},{requires:["dom"]});
KISSY.add("event/valuechange",function(a,d,g,h){function i(a){if(g.hasData(a,l)){var b=g.data(a,l);clearTimeout(b);g.removeData(a,l)}}function c(a){i(a.target)}function m(a){var b=a.value,c=g.data(a,n);b!==c&&(d.fire(a,r,{prevVal:c,newVal:b},!0),g.data(a,n,b))}function k(a){g.hasData(a,l)||g.data(a,l,setTimeout(function(){m(a);g.data(a,l,setTimeout(arguments.callee,e))},e))}function j(a){var b=a.target;"focus"==a.type&&g.data(b,n,b.value);k(b)}function b(a){m(a.target)}function p(a){g.removeData(a,
n);i(a);d.remove(a,"blur",c);d.remove(a,"webkitspeechchange",b);d.remove(a,"mousedown keyup keydown focus",j)}var r="valuechange",q=g.nodeName,n="event/valuechange/history",l="event/valuechange/poll",e=50;h[r]={setup:function(){var a=q(this);if("input"==a||"textarea"==a)p(this),d.on(this,"blur",c),d.on(this,"webkitspeechchange",b),d.on(this,"mousedown keyup keydown focus",j)},tearDown:function(){p(this)}};return d},{requires:["./base","dom","./special"]});
