/* Copyright 2013, KISSY v1.42 MIT Licensed build time: Dec 4 22:17 */ KISSY.add("overlay/extension/loading",["node"],function(h,e){function c(){}var g=e("node");c.prototype={loading:function(){this._loadingExtEl||(this._loadingExtEl=(new g('
')).appendTo(this.$el));this._loadingExtEl.show()},unloading:function(){var b=this._loadingExtEl;b&&b.hide()}};return c}); KISSY.add("overlay/extension/mask",["node"],function(h,e){function c(a,b){var i=a.view.getBaseCssClasses("mask"),i=m('
'+(f?'': "")+"
").prependTo("body");i.unselectable();i.on("mousedown",function(a){a.preventDefault()});return i}function g(){}function b(a,i){var b=a.get("maskNode"),d=a.view.getBaseCssClasses("mask-hidden");i?b.removeClass(d):b.addClass(d)}function a(a,i,d,c){var f=a.effect||l;b(c,d);if(f!==l){var c=a.duration,a=a.easing,e=d?1:0;i.stop(1,1);i.css("display",d?l:"block");i[f+j[f][e]](c,function(){i.css("display","")},a)}}function i(i){var d=this.get("maskNode");if(i=i.newVal){var b=Number(this.$el.css("z-index")); isNaN(b)||d.css("z-index",b)}a(this.get("mask"),d,i,this)}var d=h.UA,o=e("node"),f=6===d.ie,m=o.all;g.ATTRS={mask:{value:!1},maskNode:{}};var l="none",j={fade:["Out","In"],slide:["Up","Down"]};g.prototype={__renderUI:function(){this.get("mask")&&this.set("maskNode",c(this,this.get("visible")?"":this.view.getBaseCssClasses("mask-hidden")))},__bindUI:function(){var a,d;if(d=this.get("mask")){a=this.get("maskNode");if(d.closeOnClick)a.on(o.Gesture.tap,this.close,this);this.on("afterVisibleChange",i)}}, __destructor:function(){var a;(a=this.get("maskNode"))&&a.remove()}};return g}); KISSY.add("overlay/close-xtpl",[],function(){return function(h){var e,c=this;e=this.config.utils;var g=e.runBlockCommand,b=e.renderOutput,a=e.getProperty,i=e.runInlineCommand,d=e.getPropertyOrRunCommand;e="";var o={},f=[],a=a(c,h,"closable",0,1);f.push(a);o.params=f;o.fn=function(a){var f;f='\n\n close\n\n'};e+=g(c,h,o,"if",1);return e+"\n"}}); KISSY.add("overlay/overlay-xtpl",["overlay/close-xtpl","component/extension/content-xtpl"],function(h,e,c,g){return function(b){var a,i;a=this.config.utils;"undefined"!==typeof g&&g.kissy&&(i=g);var d=a.renderOutput,c=a.runInlineCommand;a="";var f={},m=[];m.push("overlay/close-xtpl");f.params=m;i&&(e("overlay/close-xtpl"),f.params[0]=i.resolveByName(f.params[0]));f=c(this,b,f,"include",1);a+=d(f,!1);a+="\n";f={};m=[];m.push("component/extension/content-xtpl");f.params=m;i&&(e("component/extension/content-xtpl"), f.params[0]=i.resolveByName(f.params[0]));b=c(this,b,f,"include",2);return a+=d(b,!1)}}); KISSY.add("overlay/overlay-render",["component/container","./overlay-xtpl","component/extension/content-render"],function(h,e){var c=e("component/container"),g=e("./overlay-xtpl"),b=e("component/extension/content-render");return c.getDefaultRender().extend([b],{createDom:function(){this.fillChildrenElsBySelectors({closeBtn:"#ks-overlay-close-{id}"})}},{ATTRS:{contentTpl:{value:g}},HTML_PARSER:{closeBtn:function(a){return a.one("."+this.getBaseCssClass("close"))}}})}); KISSY.add("overlay/extension/overlay-effect",[],function(h){function e(a){var d=a.$el.clone(!0);d.css({visibility:"visible",overflow:"hidden"}).addClass(a.get("prefixCls")+"overlay-ghost");return a.__afterCreateEffectGhost(d)}function c(a,d,b){a.__effectGhost&&a.__effectGhost.stop(1,1);var f=a.$el,c=h.all,g=a.get("effect"),j=c(g.target),c=g.duration,j=h.mix(j.offset(),{width:j.width(),height:j.height()}),k=h.mix(f.offset(),{width:f.width(),height:f.height()}),n=e(a),g=g.easing;n.insertAfter(f);d? (d=j,j=k):d=k;f.css("visibility","hidden");n.css(d);a.__effectGhost=n;n.animate(j,{duration:c,easing:g,complete:function(){a.__effectGhost=null;n.remove();f.css("visibility","");b()}})}function g(b,d,e){var f=b.$el,g=b.get("effect"),h=g.effect||"none",j=g.target;"none"===h&&!j?e():j?c(b,d,e):(b=g.duration,g=g.easing,j=d?1:0,f.stop(1,1),f.css({visibility:"visible",display:d?"none":"block"}),f[h+a[h][j]](b,function(){f.css({display:"block",visibility:""});e()},g))}function b(){}var a={fade:["Out","In"], slide:["Up","Down"]};b.ATTRS={effect:{value:{effect:"",target:null,duration:0.5,easing:"easeOut"},setter:function(b){var d=b.effect;"string"===typeof d&&!a[d]&&(b.effect="")}}};b.prototype={__afterCreateEffectGhost:function(a){return a},_onSetVisible:function(a){var b=this;g(b,a,function(){b.fire(a?"show":"hide")})}};return b}); KISSY.add("overlay/control","component/container,component/extension/shim,component/extension/align,./extension/loading,./extension/mask,./overlay-render,./extension/overlay-effect".split(","),function(h,e){var c=e("component/container"),g=e("component/extension/shim"),b=e("component/extension/align"),a=e("./extension/loading"),i=e("./extension/mask"),d=e("./overlay-render"),o=e("./extension/overlay-effect"),f={hide:"hide",destroy:"destroy"};return c.extend([g,a,b,i,o],{bindUI:function(){var a=this, b=a.get("closeBtn");if(b)b.on("click",function(b){a.close();b.preventDefault()})},close:function(){this[f[this.get("closeAction")]||"hide"]();return this}},{ATTRS:{contentEl:{},closable:{value:false,view:1},closeBtn:{view:1},closeAction:{value:"hide"},focusable:{value:false},allowTextSelection:{value:true},handleMouseEvents:{value:false},visible:{value:false},xrender:{value:d}},xclass:"overlay"})}); KISSY.add("overlay/dialog-xtpl",["overlay/close-xtpl"],function(h,e,c,g){return function(b){var a,c=this,d;a=this.config.utils;"undefined"!==typeof g&&g.kissy&&(d=g);var h=a.runBlockCommand,f=a.renderOutput,m=a.getProperty,l=a.runInlineCommand,j=a.getPropertyOrRunCommand;a="";var k={},n=[];n.push("overlay/close-xtpl");k.params=n;d&&(e("overlay/close-xtpl"),k.params[0]=d.resolveByName(k.params[0]));d=l(c,b,k,"include",1);a+=f(d,!1);a+='\n
\n
\n\n
';d=j(c,b,{},"bodyContent", 0,18);a+=f(d,!1);a+='
\n\n \n
\n
'}}); KISSY.add("overlay/dialog-render",["./overlay-render","./dialog-xtpl"],function(h,e){var c=e("./overlay-render"),g=e("./dialog-xtpl");return c.extend({beforeCreateDom:function(b){h.mix(b.elAttrs,{role:"dialog","aria-labelledby":"ks-stdmod-header-"+this.control.get("id")})},createDom:function(){this.fillChildrenElsBySelectors({header:"#ks-stdmod-header-{id}",body:"#ks-stdmod-body-{id}",footer:"#ks-stdmod-footer-{id}"})},getChildrenContainerEl:function(){return this.control.get("body")},_onSetBodyStyle:function(b){this.control.get("body").css(b)}, _onSetHeaderStyle:function(b){this.control.get("header").css(b)},_onSetFooterStyle:function(b){this.control.get("footer").css(b)},_onSetBodyContent:function(b){var a;a=this.control.get("body");a.html(b)},_onSetHeaderContent:function(b){var a;a=this.control.get("header");a.html(b)},_onSetFooterContent:function(b){var a;a=this.control.get("footer");a.html(b)}},{ATTRS:{contentTpl:{value:g}},HTML_PARSER:{header:function(b){return b.one("."+this.getBaseCssClass("header"))},body:function(b){return b.one("."+ this.getBaseCssClass("body"))},footer:function(b){return b.one("."+this.getBaseCssClass("footer"))},headerContent:function(b){return b.one("."+this.getBaseCssClass("header")).html()},bodyContent:function(b){return b.one("."+this.getBaseCssClass("body")).html()},footerContent:function(b){return(b=b.one("."+this.getBaseCssClass("footer")))&&b.html()}}})}); KISSY.add("overlay/dialog",["./control","./dialog-render","node"],function(h,e){var c=e("./control"),g=e("./dialog-render"),b=e("node"),c=c.extend({__afterCreateEffectGhost:function(a){var b=this.get("body");a.all("."+this.get("prefixCls")+"stdmod-body").css({height:b.height(),width:b.width()}).html("");return a},handleKeyDownInternal:function(c){if(this.get("escapeToClose")&&c.keyCode===b.KeyCode.ESC){if("select"!==c.target.nodeName.toLowerCase()||c.target.disabled)this.close(),c.halt()}else a:if(c.keyCode=== a){var d=this.$el,e=b.all(c.target),f=d.last();if(e.equals(d)&&c.shiftKey)f[0].focus(),c.halt();else if(e.equals(f)&&!c.shiftKey)this.focus(),c.halt();else if(e.equals(d)||d.contains(e))break a;c.halt()}},_onSetVisible:function(a,b){var c=this.el;if(a)this.__lastActive=c.ownerDocument.activeElement,this.focus(),c.setAttribute("aria-hidden","false");else{c.setAttribute("aria-hidden","true");try{this.__lastActive&&this.__lastActive.focus()}catch(f){}}this.callSuper(a,b)}},{ATTRS:{header:{view:1},body:{view:1}, footer:{view:1},bodyStyle:{value:{},view:1},footerStyle:{value:{},view:1},headerStyle:{value:{},view:1},headerContent:{value:"",view:1},bodyContent:{value:"",view:1},footerContent:{value:"",view:1},closable:{value:!0},xrender:{value:g},focusable:{value:!0},escapeToClose:{value:!0}},xclass:"dialog"}),a=b.KeyCode.TAB;return c}); KISSY.add("overlay/popup",["./control"],function(h,e){return e("./control").extend({initializer:function(){var c=this;c.get("trigger")&&("mouse"===c.get("triggerType")?(c._bindTriggerMouse(),c.on("afterRenderUI",function(){c._bindContainerMouse()})):c._bindTriggerClick())},_bindTriggerMouse:function(){var c=this,e=c.get("trigger"),b;c.__mouseEnterPopup=function(a){c._clearHiddenTimer();b=h.later(function(){c._showing(a);b=void 0},1E3*c.get("mouseDelay"))};e.on("mouseenter",c.__mouseEnterPopup);c._mouseLeavePopup= function(){b&&(b.cancel(),b=void 0);c._setHiddenTimer()};e.on("mouseleave",c._mouseLeavePopup)},_bindContainerMouse:function(){this.$el.on("mouseleave",this._setHiddenTimer,this).on("mouseenter",this._clearHiddenTimer,this)},_setHiddenTimer:function(){var c=this;c._hiddenTimer=h.later(function(){c._hiding()},1E3*c.get("mouseDelay"))},_clearHiddenTimer:function(){this._hiddenTimer&&(this._hiddenTimer.cancel(),this._hiddenTimer=void 0)},_bindTriggerClick:function(){var c=this;c.__clickPopup=function(e){e.preventDefault(); if(c.get("toggle"))c[c.get("visible")?"_hiding":"_showing"](e);else c._showing(e)};c.get("trigger").on("click",c.__clickPopup)},_showing:function(c){this.set("currentTrigger",h.one(c.target));this.show()},_hiding:function(){this.set("currentTrigger",void 0);this.hide()},destructor:function(){var c=this.$el,e=this.get("trigger");e&&(this.__clickPopup&&e.detach("click",this.__clickPopup),this.__mouseEnterPopup&&e.detach("mouseenter",this.__mouseEnterPopup),this._mouseLeavePopup&&e.detach("mouseleave", this._mouseLeavePopup));c.detach("mouseleave",this._setHiddenTimer,this).detach("mouseenter",this._clearHiddenTimer,this)}},{ATTRS:{trigger:{setter:function(c){return h.all(c)}},triggerType:{value:"click"},currentTrigger:{},mouseDelay:{value:0.1},toggle:{value:!1}},xclass:"popup"})});KISSY.add("overlay",["overlay/control","overlay/dialog","overlay/popup"],function(h,e){var c=e("overlay/control"),g=e("overlay/dialog"),b=e("overlay/popup");c.Dialog=g;h.Dialog=g;c.Popup=b;return h.Overlay=c}); /* Copyright 2013, KISSY v1.42 MIT Licensed build time: Dec 4 22:04 */ KISSY.add("component/container/render",["component/control","component/manager"],function(g,d){var f=d("component/control"),i=d("component/manager");return f.getDefaultRender().extend([],{decorateDom:function(){var d=this,f=d.getChildrenContainerEl(),a=d.control,b=a.get("defaultChildCfg"),c=b.prefixCls,e=b.xclass,h=[];f.children().each(function(a){var f=d.getComponentConstructorByNode(c,a)||e&&i.getConstructorByXClass(e);f&&h.push(new f(g.merge(b,{srcNode:a})))});a.set("children",h)},getChildrenContainerEl:function(){return this.$el}}, {name:"ContainerRender"})}); KISSY.add("component/container",["component/control","./container/render"],function(g,d){function f(a){if(a.target===this){var b=a.component,c=this.get("children"),a=a.index;c.splice(a,0,b);c=this.get("children");b=c[a];b.setInternal("parent",this);this.get("rendered")&&this.renderChild(a);this.fire("afterAddChild",{component:b,index:a})}}function i(a){if(a.target===this){var b=a.component,c,e,h=a.destroy,d=this.get("children"),a=a.index;-1!==a&&d.splice(a,1);b.setInternal("parent",null);if(h)b.destroy&& b.destroy();else if(b.get&&(e=b.el))(c=e.parentNode)&&c.removeChild(e);this.fire("afterRemoveChild",{component:b,index:a})}}var j=d("component/control"),k=d("./container/render");return j.extend({isContainer:!0,initializer:function(){var a=this.get("prefixCls"),b=this.get("defaultChildCfg");this.publish("beforeAddChild",{defaultFn:f});this.publish("beforeRemoveChild",{defaultFn:i});b.prefixCls=b.prefixCls||a},createDom:function(){this.createChildren()},renderUI:function(){this.renderChildren()},renderChildren:function(){var a, b=this.get("children");for(a=0;a'}}); KISSY.add("component/control/render",["node","xtemplate/runtime","./process","./render-xtpl","component/manager"],function(e,b){function g(k){"number"===typeof k&&(k+="px");return k}function n(k){k||(k=[""]);"string"===typeof k&&(k=k.split(/\s+/));return k}function m(k,a,b){for(var d="",f=0,c=b.length,a=k+a;ft.ieMode&&(e.hideFocus="true"),e.tabindex=h?"-1":"0")},createDom:function(){this.beforeCreateDom(this.renderData={},this.childrenElSelectors= {},this.renderCommands={getBaseCssClasses:c,getBaseCssClass:i});var b=this.control,p;p=this.renderTpl(a)+this.renderTpl(this.get("contentTpl"))+"
";b.setInternal("el",this.$el=s(p));this.el=this.$el[0];this.fillChildrenElsBySelectors()},decorateDom:function(a){var b=this.control;a.attr("id")||a.attr("id",b.get("id"));var d=this.constructor.HTML_PARSER,c,f;for(c in d)f=d[c],"function"===typeof f?(f=f.call(this,a),void 0!==f&&b.setInternal(c,f)):"string"===typeof f?b.setInternal(c,a.one(f)):e.isArray(f)&& f[0]&&b.setInternal(c,a.all(f[0]));b.setInternal("el",this.$el=a);this.el=a[0]},renderUI:function(){var a=this.control,b=this.$el;if(!a.get("srcNode")){var d=a.get("render");(a=a.get("elBefore"))?b.insertBefore(a,void 0):d?b.appendTo(d,void 0):b.appendTo(u.body,void 0)}},bindUI:function(){var a=this.control,b=a.getAttrs(),d,c;for(d in b){c=b[d];var f=e.ucfirst(d),g=this[q+f];if(c.view&&g)a.on("after"+f+"Change",h,this)}},destructor:function(){this.$el&&this.$el.remove()},$:function(a){return this.$el.all(a)}, fillChildrenElsBySelectors:function(a){var b=this.$el,d=this.control,c,f,a=a||this.childrenElSelectors;for(c in a)f=a[c],"function"===typeof f?d.setInternal(c,f(b)):d.setInternal(c,this.$(e.substitute(f,this.renderData))),delete a[c]},renderTpl:function(a,b,d){b=b||this.renderData;d=d||this.renderCommands;return(new (this.get("xtemplate"))(a,{control:this.control,view:this,commands:d})).render(b)},getComponentConstructorByNode:function(a,b){var c=b[0].className;return c?(c=c.replace(RegExp("\\b"+ a,"ig"),""),d.getConstructorByXClass(c)):null},getComponentCssClasses:function(){if(this.componentCssClasses)return this.componentCssClasses;for(var a=this.control.constructor,b,d=[];a&&!a.prototype.hasOwnProperty("isControl");)(b=a.xclass)&&d.push(b),a=a.superclass&&a.superclass.constructor;return this.componentCssClasses=d},getBaseCssClasses:function(a){for(var a=n(a),b=this.getComponentCssClasses(),d=0,c=this.get("control"),f="",e=b.length,c=c.get("prefixCls");di)a.on("dblclick",this.handleDblClick,this)}},sync:function(){this.fire("beforeSyncUI");this.syncUI();this.view.sync();this.__callPluginsMethod("pluginSyncUI");this.fire("afterSyncUI")},createComponent:function(a,b){return h.createComponent(a,b||this)},_onSetFocused:function(a){var b= this.view.getKeyEventTarget()[0];a?b.focus():b.ownerDocument.activeElement===b&&b.ownerDocument.body.focus()},_onSetX:function(a){this.$el.offset({left:a})},_onSetY:function(a){this.$el.offset({top:a})},_onSetVisible:function(a){this.fire(a?"show":"hide")},show:function(){this.render();this.set("visible",!0);return this},hide:function(){this.set("visible",!1);return this},focus:function(){this.get("focusable")&&this.set("focused",!0)},blur:function(){this.get("focusable")&&this.set("focused",!1)}, move:function(a,b){this.set({x:a,y:b})},handleDblClick:function(a){this.get("disabled")||this.handleDblClickInternal(a)},handleDblClickInternal:function(a){this.handleClickInternal(a)},handleMouseEnter:function(a){this.get("disabled")||this.handleMouseEnterInternal(a)},handleMouseEnterInternal:function(a){this.set("highlighted",!!a)},handleMouseLeave:function(a){this.get("disabled")||this.handleMouseLeaveInternal(a)},handleMouseLeaveInternal:function(a){this.set("active",!1);this.set("highlighted", !a)},handleMouseDown:function(a){this.get("disabled")||this.handleMouseDownInternal(a)},handleMouseDownInternal:function(a){var b;if(1===a.which||o)this.get("activeable")&&this.set("active",!0),this.get("focusable")&&this.focus(),!this.get("allowTextSelection")&&-1!==a.type.indexOf("mouse")&&(b=(b=a.target.nodeName)&&b.toLowerCase(),"input"!==b&&"textarea"!==b&&"button"!==b&&a.preventDefault())},handleMouseUp:function(a){this.get("disabled")||this.handleMouseUpInternal(a)},handleMouseUpInternal:function(a){this.get("active")&& (1===a.which||o)&&this.set("active",!1)},handleContextMenu:function(a){this.get("disabled")||this.handleContextMenuInternal(a)},handleContextMenuInternal:function(){},handleFocus:function(){this.get("disabled")||this.handleFocusInternal()},handleFocusInternal:function(){this.focus();this.fire("focus")},handleBlur:function(){this.get("disabled")||this.handleBlurInternal()},handleBlurInternal:function(){this.blur();this.fire("blur")},handleKeydown:function(a){if(!this.get("disabled")&&this.handleKeyDownInternal(a))return a.halt(), !0},handleKeyDownInternal:function(a){if(a.keyCode===n.KeyCode.ENTER)return this.handleClickInternal(a)},handleClick:function(a){this.get("disabled")||this.handleClickInternal(a)},handleClickInternal:function(){this.get("focusable")&&this.focus()},destructor:function(){h.removeComponent(this.get("id"));this.view?this.view.destroy():this.get("srcNode")&&this.get("srcNode").remove()}},{name:"control",ATTRS:{id:{view:1,valueFn:function(){return e.guid("ks-component")}},content:{view:1,value:""},width:{view:1}, height:{view:1},elCls:{view:1,value:[],setter:function(a){"string"===typeof a&&(a=a.split(/\s+/));return a||[]}},elStyle:{view:1,value:{}},elAttrs:{view:1,value:{}},elBefore:{},el:{setter:function(a){this.$el=a;this.el=a[0]}},x:{},y:{},xy:{setter:function(a){var b=e.makeArray(a);b.length&&(void 0!==b[0]&&this.set("x",b[0]),void 0!==b[1]&&this.set("y",b[1]));return a},getter:function(){return[this.get("x"),this.get("y")]}},zIndex:{view:1},render:{},visible:{sync:0,value:!0,view:1},srcNode:{setter:function(a){return n.all(a)}}, handleMouseEvents:{value:!0},focusable:{value:!0,view:1},allowTextSelection:{value:!1},activeable:{value:!0},focused:{view:1},active:{view:1,value:!1},highlighted:{view:1,value:!1},prefixCls:{view:1,value:e.config("component/prefixCls")||"ks-"},prefixXClass:{},parent:{setter:function(a,b){(b=this.get("parent"))&&this.removeTarget(b);a&&this.addTarget(a)}},disabled:{view:1,value:!1},xrender:{value:c},view:{setter:function(a){this.view=a}}}});c.getDefaultRender=g;c.extend=function d(b,c,j){var i=e.makeArray(arguments), l,k=i[i.length-1];if(l=k.xclass)k.name=l;i=m.extend.apply(this,i);l&&h.setConstructorByXClass(l,i);i.extend=d;i.getDefaultRender=g;return i};return c}); /* Copyright 2013, KISSY v1.42 MIT Licensed build time: Dec 4 22:05 */ KISSY.add("component/manager",[],function(){var h=0,e,g={},c={};return e={__instances:c,addComponent:function(a,b){c[a]=b},removeComponent:function(a){delete c[a]},getComponent:function(a){return c[a]},createComponent:function(a,b){var f,d;if(a){if(!a.isControl&&b&&(a.prefixCls||(a.prefixCls=b.get("prefixCls")),!a.xclass&&a.prefixXClass))a.xclass=a.prefixXClass,a.xtype&&(a.xclass+="-"+a.xtype);if(!a.isControl&&(d=a.xclass))(f=e.getConstructorByXClass(d))||"can not find class by xclass desc : "+d, a=new f(a);a.isControl&&b&&a.setInternal("parent",b)}return a},getConstructorByXClass:function(a){var a=a.split(/\s+/),b=-1,f,d,c,e=null;for(d=0;db)b=f,e=c.constructor;return e},setConstructorByXClass:function(a,b){g[a]={constructor:b,priority:h++}}}}); /* Copyright 2014, KISSY v1.42 MIT Licensed build time: Mar 7 12:41 */ KISSY.add("xtemplate/runtime/scope",[],function(g){function l(e,f){this.data=e||{};this.affix=f;this.root=this}l.prototype={isScope:1,setParent:function(e){this.parent=e;this.root=e.root},getParent:function(){return this.parent},getRoot:function(){return this.root},set:function(e,f){this.affix||(this.affix={});this.affix[e]=f},setData:function(e){this.data=e},getData:function(){return this.data},mix:function(e){this.affix||(this.affix={});g.mix(this.affix,e)},has:function(e){var f=this.data,h=this.affix; return h&&e in h?!0:"object"===typeof f&&e in f},get:function(e){var f=this.data,h=this.affix;if(h&&e in h)return h[e];if("object"===typeof f&&e in f)return f[e]},resolve:function(e,f){"."===e&&(e="this");var h=e.split("."),d=this,c,b,a,g,k;if("root"===h[0])h.shift(),d=d.root;else if(f)for(;d&&f--;)d=d.parent;var i=0;for(c=h.length;d;){k=1;a=d;for(b=0;b';b.ATTRS={shim:{value:a}};b.prototype.__createDom=function(){this.get("shim")&&this.get("el").prepend(c)};return b}); /* Copyright 2013, KISSY v1.42 MIT Licensed build time: Dec 10 01:46 */ KISSY.add("component/extension/align",["node"],function(k,u){function m(a){var c=a.ownerDocument.body,d=j(a).css("position");if(!("fixed"===d||"absolute"===d))return"html"===a.nodeName.toLowerCase()?null:a.parentNode;for(a=a.parentNode;a&&a!==c;a=a.parentNode)if(d=j(a).css("position"),"static"!==d)return a;return null}function n(a){var c,d,b={left:0,right:Infinity,top:0,bottom:Infinity},f;f=a.ownerDocument;d=j(f).getWindow();c=f.body;for(f=f.documentElement;a=m(a);)if((!v.ie||0!==a.clientWidth)&& a!==c&&a!==f&&"visible"!==j(a).css("overflow")){var h=j(a).offset();h.left+=a.clientLeft;h.top+=a.clientTop;b.top=Math.max(b.top,h.top);b.right=Math.min(b.right,h.left+a.clientWidth);b.bottom=Math.min(b.bottom,h.top+a.clientHeight);b.left=Math.max(b.left,h.left)}f=d.scrollLeft();a=d.scrollTop();b.left=Math.max(b.left,f);b.top=Math.max(b.top,a);c=d.width();d=d.height();b.right=Math.min(b.right,f+c);b.bottom=Math.min(b.bottom,a+d);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}function o(a, c,d,b){var f,h;f=a.left;h=a.top;c=p(c,d[0]);a=p(a,d[1]);a=[a.left-c.left,a.top-c.top];return{left:f-a[0]+ +b[0],top:h-a[1]+ +b[1]}}function q(a,c,d){var b=[];k.each(a,function(a){b.push(a.replace(c,function(a){return d[a]}))});return b}function l(){}function r(a){var c,d;c=a[0];k.isWindow(c)?(a=j(c).getWindow(),c={left:a.scrollLeft(),top:a.scrollTop()},d=a.width(),a=a.height()):(c=a.offset(),d=a.outerWidth(),a=a.outerHeight());c.width=d;c.height=a;return c}function p(a,c){var d=c.charAt(0),b=c.charAt(1), f=a.width,h=a.height,e,g;e=a.left;g=a.top;"c"===d?g+=h/2:"b"===d&&(g+=h);"c"===b?e+=f/2:"r"===b&&(e+=f);return{left:e,top:g}}function w(a){a.target===this&&a.newVal&&this._onSetAlign(this.get("align"))}function s(){this.get("visible")&&this._onSetAlign(this.get("align"))}var t=u("node"),x=k.Env.host,j=t.all,v=k.UA;l.__getOffsetParent=m;l.__getVisibleRectForElement=n;l.ATTRS={align:{value:{}}};l.prototype={__bindUI:function(){this.on("beforeVisibleChange",w,this);this.$el.getWindow().on("resize",s, this)},_onSetAlign:function(a){a&&a.points&&this.align(a.node,a.points,a.offset,a.overflow)},align:function(a,c,d,b){var a=t.one(a||x),d=d&&[].concat(d)||[0,0],b=b||{},f=this.$el,h=0,e=n(f[0]),g=r(f),j=r(a),a=o(g,j,c,d),i=k.merge(g,a);if(e&&(b.adjustX||b.adjustY)){if(a.lefte.right)h=1,c=q(c,/[lr]/ig,{l:"r",r:"l"}),d[0]=-d[0];if(a.tope.bottom)h=1,c=q(c,/[tb]/ig,{t:"b",b:"t"}),d[1]=-d[1];h&&(a=o(g,j,c,d),k.mix(i,a));c=b.adjustX&&(a.lefte.right);b=b.adjustY&&(a.tope.bottom);if(c||b)a=k.clone(a),i={width:g.width,height:g.height},c&&a.lefte.right&&(a.left=Math.max(e.right-i.width,e.left)),b&&a.tope.bottom&&(a.top=Math.max(e.bottom-i.height,e.top)),i=k.mix(a,i)}this.set({x:i.left,y:i.top},{force:1});i.width!==g.width&&this.set("width",f.width()+i.width-g.width);i.height!==g.height&&this.set("height",f.height()+i.height- g.height);return this},center:function(a){this.set("align",{node:a,points:["cc","cc"],offset:[0,0]});return this},__destructor:function(){this.$el&&this.$el.getWindow().detach("resize",s,this)}};return l}); /* Copyright 2013, KISSY v1.42 MIT Licensed build time: Dec 4 22:05 */ KISSY.add("component/extension/content-xtpl",[],function(){return function(b){var a;a=this.config.utils;var d=a.renderOutput,e=a.runInlineCommand,f=a.getPropertyOrRunCommand;a='
';b=f(this,b,{},"content",0,2);a+=d(b,!1);return a+"
"}}); /* Copyright 2013, KISSY v1.42 MIT Licensed build time: Dec 4 22:05 */ KISSY.add("component/extension/content-render",["component/extension/content-xtpl"],function(e,g){function f(a){var b=a.control,c=b.get("contentEl");a.$contentEl=b.$contentEl=c;a.contentEl=b.contentEl=c[0]}function d(){}var h=g("component/extension/content-xtpl");d.prototype={__beforeCreateDom:function(a,b){e.mix(b,{contentEl:"#ks-content-{id}"})},__createDom:function(){f(this)},__decorateDom:function(){f(this)},getChildrenContainerEl:function(){return this.control.get("contentEl")},_onSetContent:function(a){var b= this.control,c=b.$contentEl;c.html(a);b.get("allowTextSelection")||c.unselectable()}};e.mix(d,{ATTRS:{contentTpl:{value:h}},HTML_PARSER:{content:function(a){return a.one("."+this.getBaseCssClass("content")).html()},contentEl:function(a){return a.one("."+this.getBaseCssClass("content"))}}});return d});