YUI.add("widget-position-align",function(Y,NAME){var Lang=Y.Lang,ALIGN="align",ALIGN_ON="alignOn",VISIBLE="visible",BOUNDING_BOX="boundingBox",OFFSET_WIDTH="offsetWidth",OFFSET_HEIGHT="offsetHeight",REGION="region",VIEWPORT_REGION="viewportRegion";function PositionAlign(config){}PositionAlign.ATTRS={align:{value:null},centered:{setter:"_setAlignCenter",lazyAdd:false,value:false},alignOn:{value:[],validator:Y.Lang.isArray}};PositionAlign.TL="tl";PositionAlign.TR="tr";PositionAlign.BL="bl";PositionAlign.BR= "br";PositionAlign.TC="tc";PositionAlign.RC="rc";PositionAlign.BC="bc";PositionAlign.LC="lc";PositionAlign.CC="cc";PositionAlign.prototype={initializer:function(){if(!this._posNode)Y.error("WidgetPosition needs to be added to the Widget, "+"before WidgetPositionAlign is added");Y.after(this._bindUIPosAlign,this,"bindUI");Y.after(this._syncUIPosAlign,this,"syncUI")},_posAlignUIHandles:null,destructor:function(){this._detachPosAlignUIHandles()},_bindUIPosAlign:function(){this.after("alignChange",this._afterAlignChange); this.after("alignOnChange",this._afterAlignOnChange);this.after("visibleChange",this._syncUIPosAlign)},_syncUIPosAlign:function(){var align=this.get(ALIGN);this._uiSetVisiblePosAlign(this.get(VISIBLE));if(align)this._uiSetAlign(align.node,align.points)},align:function(node,points){if(arguments.length)this.set(ALIGN,{node:node,points:points});else this._syncUIPosAlign();return this},centered:function(node){return this.align(node,[PositionAlign.CC,PositionAlign.CC])},_getAlignToXY:function(node,point, x,y){var xy;switch(point){case PositionAlign.TL:xy=[x,y];break;case PositionAlign.TR:xy=[x-node.get(OFFSET_WIDTH),y];break;case PositionAlign.BL:xy=[x,y-node.get(OFFSET_HEIGHT)];break;case PositionAlign.BR:xy=[x-node.get(OFFSET_WIDTH),y-node.get(OFFSET_HEIGHT)];break;case PositionAlign.TC:xy=[x-node.get(OFFSET_WIDTH)/2,y];break;case PositionAlign.BC:xy=[x-node.get(OFFSET_WIDTH)/2,y-node.get(OFFSET_HEIGHT)];break;case PositionAlign.LC:xy=[x,y-node.get(OFFSET_HEIGHT)/2];break;case PositionAlign.RC:xy= [x-node.get(OFFSET_WIDTH),y-node.get(OFFSET_HEIGHT)/2];break;case PositionAlign.CC:xy=[x-node.get(OFFSET_WIDTH)/2,y-node.get(OFFSET_HEIGHT)/2];break;default:break}return xy},_getAlignedXY:function(node,points){if(!Lang.isArray(points)||points.length!==2){Y.error("align: Invalid Points Arguments");return}var nodeRegion=this._getRegion(node),nodePoint,xy;if(!nodeRegion)return;nodePoint=points[1];switch(nodePoint){case PositionAlign.TL:xy=[nodeRegion.left,nodeRegion.top];break;case PositionAlign.TR:xy= [nodeRegion.right,nodeRegion.top];break;case PositionAlign.BL:xy=[nodeRegion.left,nodeRegion.bottom];break;case PositionAlign.BR:xy=[nodeRegion.right,nodeRegion.bottom];break;case PositionAlign.TC:xy=[nodeRegion.left+Math.floor(nodeRegion.width/2),nodeRegion.top];break;case PositionAlign.BC:xy=[nodeRegion.left+Math.floor(nodeRegion.width/2),nodeRegion.bottom];break;case PositionAlign.LC:xy=[nodeRegion.left,nodeRegion.top+Math.floor(nodeRegion.height/2)];break;case PositionAlign.RC:xy=[nodeRegion.right, nodeRegion.top+Math.floor(nodeRegion.height/2)];break;case PositionAlign.CC:xy=[nodeRegion.left+Math.floor(nodeRegion.width/2),nodeRegion.top+Math.floor(nodeRegion.height/2)];break;default:break}return this._getAlignToXY(this._posNode,points[0],xy[0],xy[1])},_setAlignCenter:function(val){if(val)this.set(ALIGN,{node:val===true?null:val,points:[PositionAlign.CC,PositionAlign.CC]});return val},_uiSetAlign:function(node,points){var xy=this._getAlignedXY(node,points);if(xy)this._doAlign(xy)},_uiSetVisiblePosAlign:function(visible){if(visible)this._attachPosAlignUIHandles(); else this._detachPosAlignUIHandles()},_attachPosAlignUIHandles:function(){if(this._posAlignUIHandles)return;var bb=this.get(BOUNDING_BOX),syncAlign=Y.bind(this._syncUIPosAlign,this),handles=[];Y.Array.each(this.get(ALIGN_ON),function(o){var event=o.eventName,node=Y.one(o.node)||bb;if(event)handles.push(node.on(event,syncAlign))});this._posAlignUIHandles=handles},_detachPosAlignUIHandles:function(){var handles=this._posAlignUIHandles;if(handles){(new Y.EventHandle(handles)).detach();this._posAlignUIHandles= null}},_doAlign:function(xy){if(xy)this.move(xy)},_getRegion:function(node){var nodeRegion;if(!node)nodeRegion=this._posNode.get(VIEWPORT_REGION);else{node=Y.Node.one(node);if(node)nodeRegion=node.get(REGION)}return nodeRegion},_afterAlignChange:function(e){var align=e.newVal;if(align)this._uiSetAlign(align.node,align.points)},_afterAlignOnChange:function(e){this._detachPosAlignUIHandles();if(this.get(VISIBLE))this._attachPosAlignUIHandles()}};Y.WidgetPositionAlign=PositionAlign},"patched-v3.18.1", {"requires":["widget-position"]}); YUI.add("widget-position-constrain",function(Y,NAME){var CONSTRAIN="constrain",CONSTRAIN_XYCHANGE="constrain|xyChange",CONSTRAIN_CHANGE="constrainChange",PREVENT_OVERLAP="preventOverlap",ALIGN="align",EMPTY_STR="",BINDUI="bindUI",XY="xy",X_COORD="x",Y_COORD="y",Node=Y.Node,VIEWPORT_REGION="viewportRegion",REGION="region",PREVENT_OVERLAP_MAP;function PositionConstrain(config){}PositionConstrain.ATTRS={constrain:{value:null,setter:"_setConstrain"},preventOverlap:{value:false}};PREVENT_OVERLAP_MAP=PositionConstrain._PREVENT_OVERLAP= {x:{"tltr":1,"blbr":1,"brbl":1,"trtl":1},y:{"trbr":1,"tlbl":1,"bltl":1,"brtr":1}};PositionConstrain.prototype={initializer:function(){if(!this._posNode)Y.error("WidgetPosition needs to be added to the Widget, before WidgetPositionConstrain is added");Y.after(this._bindUIPosConstrained,this,BINDUI)},getConstrainedXY:function(xy,node){node=node||this.get(CONSTRAIN);var constrainingRegion=this._getRegion(node===true?null:node),nodeRegion=this._posNode.get(REGION);return[this._constrain(xy[0],X_COORD, nodeRegion,constrainingRegion),this._constrain(xy[1],Y_COORD,nodeRegion,constrainingRegion)]},constrain:function(xy,node){var currentXY,constrainedXY,constraint=node||this.get(CONSTRAIN);if(constraint){currentXY=xy||this.get(XY);constrainedXY=this.getConstrainedXY(currentXY,constraint);if(constrainedXY[0]!==currentXY[0]||constrainedXY[1]!==currentXY[1])this.set(XY,constrainedXY,{constrained:true})}},_setConstrain:function(val){return val===true?val:Node.one(val)},_constrain:function(val,axis,nodeRegion, constrainingRegion){if(constrainingRegion){if(this.get(PREVENT_OVERLAP))val=this._preventOverlap(val,axis,nodeRegion,constrainingRegion);var x=axis==X_COORD,regionSize=x?constrainingRegion.width:constrainingRegion.height,nodeSize=x?nodeRegion.width:nodeRegion.height,minConstraint=x?constrainingRegion.left:constrainingRegion.top,maxConstraint=x?constrainingRegion.right-nodeSize:constrainingRegion.bottom-nodeSize;if(valmaxConstraint)if(nodeSizemaxConstraint)val=maxConstraint}else val=minConstraint}return val},_preventOverlap:function(val,axis,nodeRegion,constrainingRegion){var align=this.get(ALIGN),x=axis===X_COORD,nodeSize,alignRegion,nearEdge,farEdge,spaceOnNearSide,spaceOnFarSide;if(align&&align.points&&PREVENT_OVERLAP_MAP[axis][align.points.join(EMPTY_STR)]){alignRegion=this._getRegion(align.node);if(alignRegion){nodeSize=x?nodeRegion.width:nodeRegion.height;nearEdge=x?alignRegion.left:alignRegion.top;farEdge= x?alignRegion.right:alignRegion.bottom;spaceOnNearSide=x?alignRegion.left-constrainingRegion.left:alignRegion.top-constrainingRegion.top;spaceOnFarSide=x?constrainingRegion.right-alignRegion.right:constrainingRegion.bottom-alignRegion.bottom}if(val>nearEdge){if(spaceOnFarSidenodeSize)val=nearEdge-nodeSize}else if(spaceOnNearSidenodeSize)val=farEdge}return val},_bindUIPosConstrained:function(){this.after(CONSTRAIN_CHANGE,this._afterConstrainChange); this._enableConstraints(this.get(CONSTRAIN))},_afterConstrainChange:function(e){this._enableConstraints(e.newVal)},_enableConstraints:function(enable){if(enable){this.constrain();this._cxyHandle=this._cxyHandle||this.on(CONSTRAIN_XYCHANGE,this._constrainOnXYChange)}else if(this._cxyHandle){this._cxyHandle.detach();this._cxyHandle=null}},_constrainOnXYChange:function(e){if(!e.constrained)e.newVal=this.getConstrainedXY(e.newVal)},_getRegion:function(node){var region;if(!node)region=this._posNode.get(VIEWPORT_REGION); else{node=Node.one(node);if(node)region=node.get(REGION)}return region}};Y.WidgetPositionConstrain=PositionConstrain},"patched-v3.18.1",{"requires":["widget-position"]}); YUI.add("widget-position",function(Y,NAME){var Lang=Y.Lang,Widget=Y.Widget,XY_COORD="xy",POSITION="position",POSITIONED="positioned",BOUNDING_BOX="boundingBox",RELATIVE="relative",RENDERUI="renderUI",BINDUI="bindUI",SYNCUI="syncUI",UI=Widget.UI_SRC,XYChange="xyChange";function Position(config){}Position.ATTRS={x:{setter:function(val){this._setX(val)},getter:function(){return this._getX()},lazyAdd:false},y:{setter:function(val){this._setY(val)},getter:function(){return this._getY()},lazyAdd:false}, xy:{value:[0,0],validator:function(val){return this._validateXY(val)}}};Position.POSITIONED_CLASS_NAME=Widget.getClassName(POSITIONED);Position.prototype={initializer:function(){this._posNode=this.get(BOUNDING_BOX);Y.after(this._renderUIPosition,this,RENDERUI);Y.after(this._syncUIPosition,this,SYNCUI);Y.after(this._bindUIPosition,this,BINDUI)},_renderUIPosition:function(){this._posNode.addClass(Position.POSITIONED_CLASS_NAME)},_syncUIPosition:function(){var posNode=this._posNode;if(posNode.getStyle(POSITION)=== RELATIVE)this.syncXY();this._uiSetXY(this.get(XY_COORD))},_bindUIPosition:function(){this.after(XYChange,this._afterXYChange)},move:function(){var args=arguments,coord=Lang.isArray(args[0])?args[0]:[args[0],args[1]];this.set(XY_COORD,coord)},syncXY:function(){this.set(XY_COORD,this._posNode.getXY(),{src:UI})},_validateXY:function(val){return Lang.isArray(val)&&Lang.isNumber(val[0])&&Lang.isNumber(val[1])},_setX:function(val){this.set(XY_COORD,[val,this.get(XY_COORD)[1]])},_setY:function(val){this.set(XY_COORD, [this.get(XY_COORD)[0],val])},_getX:function(){return this.get(XY_COORD)[0]},_getY:function(){return this.get(XY_COORD)[1]},_afterXYChange:function(e){if(e.src!=UI)this._uiSetXY(e.newVal)},_uiSetXY:function(val){this._posNode.setXY(val)}};Y.WidgetPosition=Position},"patched-v3.18.1",{"requires":["base-build","node-screen","widget"]}); YUI.add("widget-stack",function(Y,NAME){var L=Y.Lang,UA=Y.UA,Node=Y.Node,Widget=Y.Widget,ZINDEX="zIndex",SHIM="shim",VISIBLE="visible",BOUNDING_BOX="boundingBox",RENDER_UI="renderUI",BIND_UI="bindUI",SYNC_UI="syncUI",OFFSET_WIDTH="offsetWidth",OFFSET_HEIGHT="offsetHeight",PARENT_NODE="parentNode",FIRST_CHILD="firstChild",OWNER_DOCUMENT="ownerDocument",WIDTH="width",HEIGHT="height",PX="px",SHIM_DEFERRED="shimdeferred",SHIM_RESIZE="shimresize",VisibleChange="visibleChange",WidthChange="widthChange", HeightChange="heightChange",ShimChange="shimChange",ZIndexChange="zIndexChange",ContentUpdate="contentUpdate",STACKED="stacked";function Stack(config){}Stack.ATTRS={shim:{value:UA.ie==6},zIndex:{value:0,setter:"_setZIndex"}};Stack.HTML_PARSER={zIndex:function(srcNode){return this._parseZIndex(srcNode)}};Stack.SHIM_CLASS_NAME=Widget.getClassName(SHIM);Stack.STACKED_CLASS_NAME=Widget.getClassName(STACKED);Stack.SHIM_TEMPLATE='\x3ciframe class\x3d"'+Stack.SHIM_CLASS_NAME+'" frameborder\x3d"0" title\x3d"Widget Stacking Shim" src\x3d"javascript:false" tabindex\x3d"-1" role\x3d"presentation"\x3e\x3c/iframe\x3e'; Stack.prototype={initializer:function(){this._stackNode=this.get(BOUNDING_BOX);this._stackHandles={};Y.after(this._renderUIStack,this,RENDER_UI);Y.after(this._syncUIStack,this,SYNC_UI);Y.after(this._bindUIStack,this,BIND_UI)},_syncUIStack:function(){this._uiSetShim(this.get(SHIM));this._uiSetZIndex(this.get(ZINDEX))},_bindUIStack:function(){this.after(ShimChange,this._afterShimChange);this.after(ZIndexChange,this._afterZIndexChange)},_renderUIStack:function(){this._stackNode.addClass(Stack.STACKED_CLASS_NAME)}, _parseZIndex:function(srcNode){var zIndex;if(!srcNode.inDoc()||srcNode.getStyle("position")==="static")zIndex="auto";else zIndex=srcNode.getComputedStyle("zIndex");return zIndex==="auto"?null:zIndex},_setZIndex:function(zIndex){if(L.isString(zIndex))zIndex=parseInt(zIndex,10);if(!L.isNumber(zIndex))zIndex=0;return zIndex},_afterShimChange:function(e){this._uiSetShim(e.newVal)},_afterZIndexChange:function(e){this._uiSetZIndex(e.newVal)},_uiSetZIndex:function(zIndex){this._stackNode.setStyle(ZINDEX, zIndex)},_uiSetShim:function(enable){if(enable){if(this.get(VISIBLE))this._renderShim();else this._renderShimDeferred();if(UA.ie==6)this._addShimResizeHandlers()}else this._destroyShim()},_renderShimDeferred:function(){this._stackHandles[SHIM_DEFERRED]=this._stackHandles[SHIM_DEFERRED]||[];var handles=this._stackHandles[SHIM_DEFERRED],createBeforeVisible=function(e){if(e.newVal)this._renderShim()};handles.push(this.on(VisibleChange,createBeforeVisible))},_addShimResizeHandlers:function(){this._stackHandles[SHIM_RESIZE]= this._stackHandles[SHIM_RESIZE]||[];var sizeShim=this.sizeShim,handles=this._stackHandles[SHIM_RESIZE];handles.push(this.after(VisibleChange,sizeShim));handles.push(this.after(WidthChange,sizeShim));handles.push(this.after(HeightChange,sizeShim));handles.push(this.after(ContentUpdate,sizeShim))},_detachStackHandles:function(handleKey){var handles=this._stackHandles[handleKey],handle;if(handles&&handles.length>0)while(handle=handles.pop())handle.detach()},_renderShim:function(){var shimEl=this._shimNode, stackEl=this._stackNode;if(!shimEl){shimEl=this._shimNode=this._getShimTemplate();stackEl.insertBefore(shimEl,stackEl.get(FIRST_CHILD));this._detachStackHandles(SHIM_DEFERRED);this.sizeShim()}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(PARENT_NODE).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(SHIM_DEFERRED);this._detachStackHandles(SHIM_RESIZE)}},sizeShim:function(){var shim=this._shimNode,node=this._stackNode;if(shim&&UA.ie===6&&this.get(VISIBLE)){shim.setStyle(WIDTH, node.get(OFFSET_WIDTH)+PX);shim.setStyle(HEIGHT,node.get(OFFSET_HEIGHT)+PX)}},_getShimTemplate:function(){return Node.create(Stack.SHIM_TEMPLATE,this._stackNode.get(OWNER_DOCUMENT))}};Y.WidgetStack=Stack},"patched-v3.18.1",{"requires":["base-build","widget"],"skinnable":true}); YUI.add("widget-stdmod",function(Y,NAME){var L=Y.Lang,Node=Y.Node,UA=Y.UA,Widget=Y.Widget,EMPTY="",HD="hd",BD="bd",FT="ft",HEADER="header",BODY="body",FOOTER="footer",FILL_HEIGHT="fillHeight",STDMOD="stdmod",NODE_SUFFIX="Node",CONTENT_SUFFIX="Content",FIRST_CHILD="firstChild",CHILD_NODES="childNodes",OWNER_DOCUMENT="ownerDocument",CONTENT_BOX="contentBox",HEIGHT="height",OFFSET_HEIGHT="offsetHeight",AUTO="auto",HeaderChange="headerContentChange",BodyChange="bodyContentChange",FooterChange="footerContentChange", FillHeightChange="fillHeightChange",HeightChange="heightChange",ContentUpdate="contentUpdate",RENDERUI="renderUI",BINDUI="bindUI",SYNCUI="syncUI",APPLY_PARSED_CONFIG="_applyParsedConfig",UI=Y.Widget.UI_SRC;function StdMod(config){}StdMod.HEADER=HEADER;StdMod.BODY=BODY;StdMod.FOOTER=FOOTER;StdMod.AFTER="after";StdMod.BEFORE="before";StdMod.REPLACE="replace";var STD_HEADER=StdMod.HEADER,STD_BODY=StdMod.BODY,STD_FOOTER=StdMod.FOOTER,HEADER_CONTENT=STD_HEADER+CONTENT_SUFFIX,FOOTER_CONTENT=STD_FOOTER+ CONTENT_SUFFIX,BODY_CONTENT=STD_BODY+CONTENT_SUFFIX;StdMod.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:StdMod.BODY,validator:function(val){return this._validateFillHeight(val)}}};StdMod.HTML_PARSER={headerContent:function(contentBox){return this._parseStdModHTML(STD_HEADER)},bodyContent:function(contentBox){return this._parseStdModHTML(STD_BODY)},footerContent:function(contentBox){return this._parseStdModHTML(STD_FOOTER)}};StdMod.SECTION_CLASS_NAMES= {header:Widget.getClassName(HD),body:Widget.getClassName(BD),footer:Widget.getClassName(FT)};StdMod.TEMPLATES={header:'\x3cdiv class\x3d"'+StdMod.SECTION_CLASS_NAMES[STD_HEADER]+'"\x3e\x3c/div\x3e',body:'\x3cdiv class\x3d"'+StdMod.SECTION_CLASS_NAMES[STD_BODY]+'"\x3e\x3c/div\x3e',footer:'\x3cdiv class\x3d"'+StdMod.SECTION_CLASS_NAMES[STD_FOOTER]+'"\x3e\x3c/div\x3e'};StdMod.prototype={initializer:function(){this._stdModNode=this.get(CONTENT_BOX);Y.before(this._renderUIStdMod,this,RENDERUI);Y.before(this._bindUIStdMod, this,BINDUI);Y.before(this._syncUIStdMod,this,SYNCUI)},_syncUIStdMod:function(){var stdModParsed=this._stdModParsed;if(!stdModParsed||!stdModParsed[HEADER_CONTENT])this._uiSetStdMod(STD_HEADER,this.get(HEADER_CONTENT));if(!stdModParsed||!stdModParsed[BODY_CONTENT])this._uiSetStdMod(STD_BODY,this.get(BODY_CONTENT));if(!stdModParsed||!stdModParsed[FOOTER_CONTENT])this._uiSetStdMod(STD_FOOTER,this.get(FOOTER_CONTENT));this._uiSetFillHeight(this.get(FILL_HEIGHT))},_renderUIStdMod:function(){this._stdModNode.addClass(Widget.getClassName(STDMOD)); this._renderStdModSections();this.after(HeaderChange,this._afterHeaderChange);this.after(BodyChange,this._afterBodyChange);this.after(FooterChange,this._afterFooterChange)},_renderStdModSections:function(){if(L.isValue(this.get(HEADER_CONTENT)))this._renderStdMod(STD_HEADER);if(L.isValue(this.get(BODY_CONTENT)))this._renderStdMod(STD_BODY);if(L.isValue(this.get(FOOTER_CONTENT)))this._renderStdMod(STD_FOOTER)},_bindUIStdMod:function(){this.after(FillHeightChange,this._afterFillHeightChange);this.after(HeightChange, this._fillHeight);this.after(ContentUpdate,this._fillHeight)},_afterHeaderChange:function(e){if(e.src!==UI)this._uiSetStdMod(STD_HEADER,e.newVal,e.stdModPosition)},_afterBodyChange:function(e){if(e.src!==UI)this._uiSetStdMod(STD_BODY,e.newVal,e.stdModPosition)},_afterFooterChange:function(e){if(e.src!==UI)this._uiSetStdMod(STD_FOOTER,e.newVal,e.stdModPosition)},_afterFillHeightChange:function(e){this._uiSetFillHeight(e.newVal)},_validateFillHeight:function(val){return!val||val==StdMod.BODY||val== StdMod.HEADER||val==StdMod.FOOTER},_uiSetFillHeight:function(fillSection){var fillNode=this.getStdModNode(fillSection);var currNode=this._currFillNode;if(currNode&&fillNode!==currNode)currNode.setStyle(HEIGHT,EMPTY);if(fillNode)this._currFillNode=fillNode;this._fillHeight()},_fillHeight:function(){if(this.get(FILL_HEIGHT)){var height=this.get(HEIGHT);if(height!=EMPTY&&height!=AUTO)this.fillHeight(this.getStdModNode(this.get(FILL_HEIGHT)))}},_uiSetStdMod:function(section,content,where){if(L.isValue(content)){var node= this.getStdModNode(section,true);this._addStdModContent(node,content,where);this.set(section+CONTENT_SUFFIX,this._getStdModContent(section),{src:UI})}else this._eraseStdMod(section);this.fire(ContentUpdate)},_renderStdMod:function(section){var contentBox=this.get(CONTENT_BOX),sectionNode=this._findStdModSection(section);if(!sectionNode)sectionNode=this._getStdModTemplate(section);this._insertStdModSection(contentBox,section,sectionNode);this[section+NODE_SUFFIX]=sectionNode;return this[section+NODE_SUFFIX]}, _eraseStdMod:function(section){var sectionNode=this.getStdModNode(section);if(sectionNode){sectionNode.remove(true);delete this[section+NODE_SUFFIX]}},_insertStdModSection:function(contentBox,section,sectionNode){var fc=contentBox.get(FIRST_CHILD);if(section===STD_FOOTER||!fc)contentBox.appendChild(sectionNode);else if(section===STD_HEADER)contentBox.insertBefore(sectionNode,fc);else{var footer=this[STD_FOOTER+NODE_SUFFIX];if(footer)contentBox.insertBefore(sectionNode,footer);else contentBox.appendChild(sectionNode)}}, _getStdModTemplate:function(section){return Node.create(StdMod.TEMPLATES[section],this._stdModNode.get(OWNER_DOCUMENT))},_addStdModContent:function(node,children,where){switch(where){case StdMod.BEFORE:where=0;break;case StdMod.AFTER:where=undefined;break;default:where=StdMod.REPLACE}node.insert(children,where)},_getPreciseHeight:function(node){var height=node?node.get(OFFSET_HEIGHT):0,getBCR="getBoundingClientRect";if(node&&node.hasMethod(getBCR)){var preciseRegion=node.invoke(getBCR);if(preciseRegion)height= preciseRegion.bottom-preciseRegion.top}return height},_findStdModSection:function(section){return this.get(CONTENT_BOX).one("\x3e ."+StdMod.SECTION_CLASS_NAMES[section])},_parseStdModHTML:function(section){var node=this._findStdModSection(section);if(node){if(!this._stdModParsed){this._stdModParsed={};Y.before(this._applyStdModParsedConfig,this,APPLY_PARSED_CONFIG)}this._stdModParsed[section+CONTENT_SUFFIX]=1;return node.get("innerHTML")}return null},_applyStdModParsedConfig:function(node,cfg,parsedCfg){var parsed= this._stdModParsed;if(parsed){parsed[HEADER_CONTENT]=!(HEADER_CONTENT in cfg)&&HEADER_CONTENT in parsed;parsed[BODY_CONTENT]=!(BODY_CONTENT in cfg)&&BODY_CONTENT in parsed;parsed[FOOTER_CONTENT]=!(FOOTER_CONTENT in cfg)&&FOOTER_CONTENT in parsed}},_getStdModContent:function(section){return this[section+NODE_SUFFIX]?this[section+NODE_SUFFIX].get(CHILD_NODES):null},setStdModContent:function(section,content,where){this.set(section+CONTENT_SUFFIX,content,{stdModPosition:where})},getStdModNode:function(section, forceCreate){var node=this[section+NODE_SUFFIX]||null;if(!node&&forceCreate)node=this._renderStdMod(section);return node},fillHeight:function(node){if(node){var contentBox=this.get(CONTENT_BOX),stdModNodes=[this.headerNode,this.bodyNode,this.footerNode],stdModNode,cbContentHeight,filled=0,remaining=0,validNode=false;for(var i=0,l=stdModNodes.length;i=0)node.set(OFFSET_HEIGHT,remaining)}}}}};Y.WidgetStdMod=StdMod},"patched-v3.18.1",{"requires":["base-build", "widget"]}); YUI.add("aui-aria",function(A,NAME){var Lang=A.Lang,isBoolean=Lang.isBoolean,isFunction=Lang.isFunction,isObject=Lang.isObject,isString=Lang.isString,STR_REGEX=/([^a-z])/ig,_toAriaRole=A.cached(function(str){return str.replace(STR_REGEX,function(){return""}).toLowerCase()});var Aria=A.Component.create({NAME:"aria",NS:"aria",ATTRS:{attributes:{value:{},validator:isObject},attributeValueFormat:{value:function(val){return val},validator:isFunction},attributeNode:{writeOnce:true,setter:A.one,valueFn:function(){return this.get("host").get("boundingBox")}}, roleName:{valueFn:function(){var instance=this;var host=instance.get("host");var roleName=_toAriaRole(host.constructor.NAME||"");return instance.isValidRole(roleName)?roleName:""},validator:isString},roleNode:{writeOnce:true,setter:A.one,valueFn:function(){return this.get("host").get("boundingBox")}},validateW3C:{value:true,validator:isBoolean}},EXTENDS:A.Plugin.Base,prototype:{initializer:function(){var instance=this;instance.publish("aria:processAttribute",{defaultFn:instance._defProcessFn,queuable:false, emitFacade:true,bubbles:true,prefix:"aria"});instance._uiSetRoleName(instance.get("roleName"));instance.after("roleNameChange",instance._afterRoleNameChange);instance._bindHostAttributes()},isValidAttribute:function(attrName){var instance=this;return instance.get("validateW3C")?A.Plugin.Aria.W3C_ATTRIBUTES[attrName]:true},isValidRole:function(roleName){var instance=this;return instance.get("validateW3C")?A.Plugin.Aria.W3C_ROLES[roleName]:true},setAttribute:function(attrName,attrValue,node){var instance= this;if(instance.isValidAttribute(attrName)){(node||instance.get("attributeNode")).set("aria-"+attrName,attrValue);return true}return false},setAttributes:function(attributes){var instance=this;A.Array.each(attributes,function(attribute){instance.setAttribute(attribute.name,attribute.value,attribute.node)})},setRole:function(roleName,node){var instance=this;if(instance.isValidRole(roleName)){(node||instance.get("roleNode")).set("role",roleName);return true}return false},setRoles:function(roles){var instance= this;A.Array.each(roles,function(role){instance.setRole(role.name,role.node)})},_afterHostAttributeChange:function(event){var instance=this;instance._handleProcessAttribute(event)},_afterRoleNameChange:function(event){var instance=this;instance._uiSetRoleName(event.newVal)},_bindHostAttributes:function(){var instance=this;var attributes=instance.get("attributes");A.each(attributes,function(aria,attrName){var ariaAttr=instance._getAriaAttribute(aria,attrName);instance._handleProcessAttribute({aria:ariaAttr}); instance.afterHostEvent(attrName+"Change",function(event){event.aria=ariaAttr;instance._afterHostAttributeChange(event)})})},_defProcessFn:function(event){var instance=this;instance._setAttribute(event.aria)},_getAriaAttribute:function(aria,attrName){var instance=this;var attributeValueFormat=instance.get("attributeValueFormat");var prepared={};if(isString(aria))prepared=A.merge(prepared,{ariaName:aria,attrName:attrName,format:attributeValueFormat,node:null});else if(isObject(aria))prepared=A.mix(aria, {ariaName:"",attrName:attrName,format:attributeValueFormat,node:null});return prepared},_handleProcessAttribute:function(event){var instance=this;instance.fire("aria:processAttribute",{aria:event.aria})},_setAttribute:function(ariaAttr){var instance=this;var host=instance.get("host");var attrValue=host.get(ariaAttr.attrName);var attrNode=ariaAttr.node;if(isFunction(attrNode))attrNode=attrNode.apply(instance,[ariaAttr]);instance.setAttribute(ariaAttr.ariaName,ariaAttr.format.apply(instance,[attrValue, ariaAttr]),attrNode)},_uiSetRoleName:function(val){var instance=this;instance.setRole(val)}}});A.Plugin.Aria=Aria;A.Plugin.Aria.W3C_ROLES={"alert":1,"alertdialog":1,"application":1,"article":1,"banner":1,"button":1,"checkbox":1,"columnheader":1,"combobox":1,"command":1,"complementary":1,"composite":1,"contentinfo":1,"definition":1,"dialog":1,"directory":1,"document":1,"form":1,"grid":1,"gridcell":1,"group":1,"heading":1,"img":1,"input":1,"landmark":1,"link":1,"list":1,"listbox":1,"listitem":1,"log":1, "main":1,"marquee":1,"math":1,"menu":1,"menubar":1,"menuitem":1,"menuitemcheckbox":1,"menuitemradio":1,"navigation":1,"note":1,"option":1,"presentation":1,"progressbar":1,"radio":1,"radiogroup":1,"range":1,"region":1,"roletype":1,"row":1,"rowheader":1,"scrollbar":1,"search":1,"section":1,"sectionhead":1,"select":1,"separator":1,"slider":1,"spinbutton":1,"status":1,"structure":1,"tab":1,"tablist":1,"tabpanel":1,"textbox":1,"timer":1,"toolbar":1,"tooltip":1,"tree":1,"treegrid":1,"treeitem":1,"widget":1, "window":1};A.Plugin.Aria.W3C_ATTRIBUTES={"activedescendant":1,"atomic":1,"autocomplete":1,"busy":1,"checked":1,"controls":1,"describedby":1,"disabled":1,"dropeffect":1,"expanded":1,"flowto":1,"grabbed":1,"haspopup":1,"hidden":1,"invalid":1,"label":1,"labelledby":1,"level":1,"live":1,"multiline":1,"multiselectable":1,"orientation":1,"owns":1,"posinset":1,"pressed":1,"readonly":1,"relevant":1,"required":1,"selected":1,"setsize":1,"sort":1,"valuemax":1,"valuemin":1,"valuenow":1,"valuetext":1}},"3.1.0-deprecated.70", {"requires":["plugin","aui-component"]}); YUI.add("aui-io-plugin-deprecated",function(A,NAME){var L=A.Lang,isBoolean=L.isBoolean,isString=L.isString,isNode=function(v){return v instanceof A.Node},StdMod=A.WidgetStdMod,TYPE_NODE="Node",TYPE_WIDGET="Widget",EMPTY="",FAILURE="failure",FAILURE_MESSAGE="failureMessage",HOST="host",ICON="icon",IO="io",IO_PLUGIN="IOPlugin",LOADING="loading",LOADING_MASK="loadingMask",NODE="node",OUTER="outer",PARSE_CONTENT="parseContent",QUEUE="queue",RENDERED="rendered",SECTION="section",SHOW_LOADING="showLoading", SUCCESS="success",TYPE="type",WHERE="where",getCN=A.getClassName,CSS_ICON_LOADING=getCN(ICON,LOADING);var IOPlugin=A.Component.create({NAME:IO_PLUGIN,NS:IO,ATTRS:{node:{value:null,getter:function(value){var instance=this;if(!value){var host=instance.get(HOST);var type=instance.get(TYPE);if(type==TYPE_NODE)value=host;else if(type==TYPE_WIDGET){var section=instance.get(SECTION);if(!host.getStdModNode(section))host.setStdModContent(section,EMPTY);value=host.getStdModNode(section)}}return A.one(value)}, validator:isNode},failureMessage:{value:"Failed to retrieve content",validator:isString},loadingMask:{value:{}},parseContent:{value:true,validator:isBoolean},showLoading:{value:true,validator:isBoolean},section:{value:StdMod.BODY,validator:function(val){return!val||val==StdMod.BODY||val==StdMod.HEADER||val==StdMod.FOOTER}},type:{readOnly:true,valueFn:function(){var instance=this;var type=TYPE_NODE;if(instance.get(HOST)instanceof A.Widget)type=TYPE_WIDGET;return type},validator:isString},where:{value:StdMod.REPLACE, validator:function(val){return!val||val==StdMod.AFTER||val==StdMod.BEFORE||val==StdMod.REPLACE||val==OUTER}}},EXTENDS:A.IORequest,prototype:{bindUI:function(){var instance=this;instance.on("activeChange",instance._onActiveChange);instance.on(SUCCESS,instance._successHandler);instance.on(FAILURE,instance._failureHandler);if(instance.get(TYPE)==TYPE_WIDGET&&instance.get(SHOW_LOADING)){var host=instance.get(HOST);host.after("heightChange",instance._syncLoadingMaskUI,instance);host.after("widthChange", instance._syncLoadingMaskUI,instance)}},_autoStart:function(){var instance=this;instance.bindUI();IOPlugin.superclass._autoStart.apply(this,arguments)},_bindParseContent:function(){var instance=this;var node=instance.get(NODE);if(node&&!node.ParseContent&&instance.get(PARSE_CONTENT))node.plug(A.Plugin.ParseContent)},hideLoading:function(){var instance=this;var node=instance.get(NODE);if(node.loadingmask)node.loadingmask.hide()},setContent:function(content){var instance=this;instance._bindParseContent(); instance._getContentSetterByType().apply(instance,[content]);if(instance.overlayMaskBoundingBox)instance.overlayMaskBoundingBox.remove()},showLoading:function(){var instance=this;var node=instance.get(NODE);if(node.loadingmask){if(instance.overlayMaskBoundingBox)node.append(instance.overlayMaskBoundingBox)}else{node.plug(A.LoadingMask,instance.get(LOADING_MASK));instance.overlayMaskBoundingBox=node.loadingmask.overlayMask.get("boundingBox")}node.loadingmask.show()},start:function(){var instance=this; var host=instance.get(HOST);if(!host.get(RENDERED))host.after("render",function(){instance._setLoadingUI(true)});IOPlugin.superclass.start.apply(instance,arguments)},_getContentSetterByType:function(){var instance=this;var setters={Node:function(content){var instance=this;var node=instance.get(NODE);if(content instanceof A.NodeList)content=content.toFrag();if(content instanceof A.Node)content=content._node;var where=instance.get(WHERE);if(where==OUTER)node.replace(content);else node.insert(content, where)},Widget:function(content){var instance=this;var host=instance.get(HOST);host.setStdModContent.apply(host,[instance.get(SECTION),content,instance.get(WHERE)])}};return setters[this.get(TYPE)]},_setLoadingUI:function(show){var instance=this;if(instance.get(SHOW_LOADING))if(show)instance.showLoading();else instance.hideLoading()},_syncLoadingMaskUI:function(){var instance=this;instance.get(NODE).loadingmask.refreshMask()},_successHandler:function(event,id,xhr){var instance=this;instance.setContent(this.get("responseData"))}, _failureHandler:function(event,id,xhr){var instance=this;instance.setContent(instance.get(FAILURE_MESSAGE))},_onActiveChange:function(event){var instance=this;var host=instance.get(HOST);var widget=instance.get(TYPE)==TYPE_WIDGET;if(!widget||widget&&host&&host.get(RENDERED))instance._setLoadingUI(event.newVal)}}});A.Node.prototype.load=function(uri,config,callback){var instance=this;var index=uri.indexOf(" ");var selector;if(index>0){selector=uri.slice(index,uri.length);uri=uri.slice(0,index)}if(L.isFunction(config)){callback= config;config=null}config=config||{};if(callback){config.after=config.after||{};config.after.success=callback}var where=config.where;config.uri=uri;config.where=where;if(selector){config.selector=selector;config.where=where||"replace"}instance.plug(A.Plugin.IO,config);return instance};A.namespace("Plugin").IO=IOPlugin},"3.1.0-deprecated.70",{"requires":["aui-overlay-base-deprecated","aui-parse-content","aui-io-request","aui-loading-mask-deprecated"]}); YUI.add("aui-io-request",function(A,NAME){var L=A.Lang,isBoolean=L.isBoolean,isFunction=L.isFunction,isString=L.isString,defaults=A.namespace("config.io"),getDefault=function(attr){return function(){return defaults[attr]}},ACCEPTS={all:"*/*",html:"text/html",json:"application/json, text/javascript",text:"text/plain",xml:"application/xml, text/xml"};var IORequest=A.Component.create({NAME:"IORequest",ATTRS:{autoLoad:{value:true,validator:isBoolean},cache:{value:true,validator:isBoolean},dataType:{setter:function(v){return(v|| "").toLowerCase()},value:null,validator:isString},responseData:{setter:function(v){return this._setResponseData(v)},value:null},uri:{setter:function(v){return this._parseURL(v)},value:null,validator:isString},active:{value:false,validator:isBoolean},cfg:{getter:function(){var instance=this;return{arguments:instance.get("arguments"),context:instance.get("context"),data:instance.getFormattedData(),form:instance.get("form"),headers:instance.get("headers"),method:instance.get("method"),on:{complete:A.bind(instance.fire, instance,"complete"),end:A.bind(instance._end,instance),failure:A.bind(instance.fire,instance,"failure"),start:A.bind(instance.fire,instance,"start"),success:A.bind(instance._success,instance)},sync:instance.get("sync"),timeout:instance.get("timeout"),xdr:instance.get("xdr")}},readOnly:true},transaction:{value:null},arguments:{valueFn:getDefault("arguments")},context:{valueFn:getDefault("context")},data:{valueFn:getDefault("data")},form:{valueFn:getDefault("form")},headers:{getter:function(value){var header= [];var instance=this;var dataType=instance.get("dataType");if(dataType)header.push(ACCEPTS[dataType]);header.push(ACCEPTS.all);return A.merge(value,{Accept:header.join(", ")})},valueFn:getDefault("headers")},method:{setter:function(val){return val.toLowerCase()},valueFn:getDefault("method")},selector:{value:null},sync:{valueFn:getDefault("sync")},timeout:{valueFn:getDefault("timeout")},xdr:{valueFn:getDefault("xdr")}},EXTENDS:A.Plugin.Base,prototype:{init:function(){var instance=this;IORequest.superclass.init.apply(this, arguments);instance._autoStart()},destructor:function(){var instance=this;instance.stop();instance.set("transaction",null)},getFormattedData:function(){var instance=this;var value=instance.get("data");var dataFormatter=defaults.dataFormatter;if(isFunction(dataFormatter))value=dataFormatter.call(instance,value);return value},start:function(){var instance=this;instance.destructor();instance.set("active",true);var ioObj=instance._yuiIOObj;if(!ioObj){ioObj=new A.IO;instance._yuiIOObj=ioObj}var transaction= ioObj.send(instance.get("uri"),instance.get("cfg"));instance.set("transaction",transaction)},stop:function(){var instance=this;var transaction=instance.get("transaction");if(transaction)transaction.abort()},_autoStart:function(){var instance=this;if(instance.get("autoLoad"))instance.start()},_parseURL:function(url){var instance=this;var cache=instance.get("cache");var method=instance.get("method");if(cache===false&&method==="get"){var ts=+new Date;var ret=url.replace(/(\?|&)_=.*?(&|$)/,"$1_\x3d"+ ts+"$2");url=ret+(ret===url?(url.match(/\?/)?"\x26":"?")+"_\x3d"+ts:"")}var uriFormatter=defaults.uriFormatter;if(isFunction(uriFormatter))url=uriFormatter.apply(instance,[url]);return url},_end:function(id,args){var instance=this;instance.set("active",false);instance.set("transaction",null);instance.fire("end",id,args)},_success:function(id,obj,args){var instance=this;instance.set("responseData",obj);instance.fire("success",id,obj,args)},_setResponseData:function(xhr){var data=null;var instance= this;if(xhr){var dataType=instance.get("dataType");var contentType=xhr.getResponseHeader("content-type")||"";if(dataType==="xml"||!dataType&&contentType.indexOf("xml")>=0){data=xhr.responseXML;if(data.documentElement.tagName==="parsererror")throw"Parser error: IO dataType is not correctly parsing";}else data=xhr.responseText;if(data==="")data=null;if(dataType==="json")try{data=A.JSON.parse(data)}catch(e){}else{var selector=instance.get("selector");if(data&&selector){var tempRoot;if(data.documentElement)tempRoot= A.one(data);else tempRoot=A.Node.create(data);data=tempRoot.all(selector)}}}return data}}});A.IORequest=IORequest;A.io.request=function(uri,config){return new A.IORequest(A.merge(config,{uri:uri}))}},"3.1.0-deprecated.70",{"requires":["io-base","json","plugin","querystring-stringify","aui-component"]}); YUI.add("aui-loading-mask-deprecated",function(A,NAME){var Lang=A.Lang,BOUNDING_BOX="boundingBox",CONTENT_BOX="contentBox",HIDE="hide",HOST="host",MESSAGE_EL="messageEl",NAME="loadingmask",POSITION="position",SHOW="show",STATIC="static",STRINGS="strings",TARGET="target",TOGGLE="toggle",getClassName=A.getClassName,CSS_LOADINGMASK=getClassName(NAME),CSS_MASKED=getClassName(NAME,"masked"),CSS_MASKED_RELATIVE=getClassName(NAME,"masked","relative"),CSS_MESSAGE_LOADING=getClassName(NAME,"message"),CSS_MESSAGE_LOADING_CONTENT= getClassName(NAME,"message","content"),TPL_MESSAGE_LOADING='\x3cdiv class\x3d"'+CSS_MESSAGE_LOADING+'"\x3e\x3cdiv class\x3d"'+CSS_MESSAGE_LOADING_CONTENT+'"\x3e{0}\x3c/div\x3e\x3c/div\x3e';var LoadingMask=A.Component.create({NAME:NAME,NS:NAME,ATTRS:{messageEl:{valueFn:function(val){var instance=this;var strings=instance.get(STRINGS);return A.Node.create(Lang.sub(TPL_MESSAGE_LOADING,[strings.loading]))}},strings:{value:{loading:"Loading\x26hellip;"}},target:{setter:function(){var instance=this;var target= instance.get(HOST);if(target instanceof A.Widget)target=target.get(CONTENT_BOX);return target},value:null}},EXTENDS:A.Plugin.Base,prototype:{initializer:function(config){var instance=this;instance.IGNORED_ATTRS=A.merge({host:true},LoadingMask.ATTRS);instance.renderUI();instance.bindUI();instance._createDynamicAttrs(config)},renderUI:function(){var instance=this;var strings=instance.get(STRINGS);instance._renderOverlayMask();instance.overlayMask.get(BOUNDING_BOX).append(instance.get(MESSAGE_EL))}, bindUI:function(){var instance=this;instance._bindOverlayMaskUI()},destructor:function(){var instance=this;instance.overlayMask.destroy();instance._visibleChangeHandle.detach()},_bindOverlayMaskUI:function(){var instance=this;instance._visibleChangeHandle=instance.overlayMask.after("visibleChange",instance._afterVisibleChange,instance)},centerMessage:function(){var instance=this;instance.get(MESSAGE_EL).center(instance.overlayMask.get(BOUNDING_BOX))},refreshMask:function(){var instance=this;instance.overlayMask.refreshMask(); instance.centerMessage()},_afterVisibleChange:function(event){var instance=this;var target=instance.get(TARGET);var isStaticPositioned=target.getStyle(POSITION)==STATIC;target.toggleClass(CSS_MASKED,event.newVal);target.toggleClass(CSS_MASKED_RELATIVE,event.newVal&&isStaticPositioned);if(event.newVal)instance.refreshMask()},_renderOverlayMask:function(){var instance=this;var target=instance.get(TARGET);instance.overlayMask=(new A.OverlayMask({target:target,cssClass:CSS_LOADINGMASK})).render(target)}, _createDynamicAttrs:function(config){var instance=this;A.each(config,function(value,key){var ignoredAttr=instance.IGNORED_ATTRS[key];if(!ignoredAttr)instance.addAttr(key,{setter:function(val){this.overlayMask.set(key,val);return val},value:value})})}}});A.each([HIDE,SHOW,TOGGLE],function(method){LoadingMask.prototype[method]=function(){this.overlayMask[method]()}});A.LoadingMask=LoadingMask},"3.1.0-deprecated.70",{"requires":["plugin","aui-overlay-mask-deprecated"],"skinnable":true}); YUI.add("aui-overlay-base-deprecated",function(A,NAME){A.OverlayBase=A.Component.create({NAME:"overlay",ATTRS:{hideClass:{value:false}},AUGMENTS:[A.WidgetPosition,A.WidgetStack,A.WidgetPositionAlign,A.WidgetPositionConstrain,A.WidgetStdMod]})},"3.1.0-deprecated.70",{"requires":["widget-position","widget-stack","widget-position-align","widget-position-constrain","widget-stdmod","aui-component"]}); YUI.add("aui-overlay-context-deprecated",function(A,NAME){var L=A.Lang,isString=L.isString,isNumber=L.isNumber,isObject=L.isObject,isBoolean=L.isBoolean,isNodeList=function(v){return v instanceof A.NodeList},ALIGN="align",BL="bl",BOUNDING_BOX="boundingBox",CANCELLABLE_HIDE="cancellableHide",OVERLAY_CONTEXT="overlaycontext",CURRENT_NODE="currentNode",FOCUSED="focused",HIDE="hide",HIDE_DELAY="hideDelay",HIDE_ON="hideOn",HIDE_ON_DOCUMENT_CLICK="hideOnDocumentClick",MOUSEDOWN="mousedown",SHOW="show", SHOW_DELAY="showDelay",SHOW_ON="showOn",TL="tl",TRIGGER="trigger",USE_ARIA="useARIA",VISIBLE="visible";var OverlayContext=A.Component.create({NAME:OVERLAY_CONTEXT,ATTRS:{align:{value:{node:null,points:[TL,BL]}},cancellableHide:{value:true,validator:isBoolean},currentNode:{valueFn:function(){return this.get(TRIGGER).item(0)}},delay:{value:null,validator:isObject},hideOn:{lazyAdd:false,value:"mouseout",setter:function(v){return this._setHideOn(v)}},hideOnDocumentClick:{lazyAdd:false,setter:function(v){return this._setHideOnDocumentClick(v)}, value:true,validator:isBoolean},hideDelay:{lazyAdd:false,setter:"_setHideDelay",value:0,validator:isNumber},showOn:{lazyAdd:false,value:"mouseover",setter:function(v){return this._setShowOn(v)}},showDelay:{lazyAdd:false,setter:"_setShowDelay",value:0,validator:isNumber},trigger:{lazyAdd:false,setter:function(v){if(isNodeList(v))return v;else if(isString(v))return A.all(v);return new A.NodeList([v])}},useARIA:{value:true},visible:{value:false}},EXTENDS:A.OverlayBase,constructor:function(config){var instance= this;instance._showCallback=null;instance._hideCallback=null;OverlayContext.superclass.constructor.apply(this,arguments)},prototype:{initializer:function(){var instance=this;var trigger=instance.get(TRIGGER);if(trigger&&trigger.size())instance.set("align.node",trigger.item(0))},bindUI:function(){var instance=this;var boundingBox=instance.get(BOUNDING_BOX);boundingBox.on(MOUSEDOWN,instance._stopTriggerEventPropagation);instance.before("triggerChange",instance._beforeTriggerChange);instance.before("showOnChange", instance._beforeShowOnChange);instance.before("hideOnChange",instance._beforeHideOnChange);instance.after("triggerChange",instance._afterTriggerChange);instance.after("showOnChange",instance._afterShowOnChange);instance.after("hideOnChange",instance._afterHideOnChange);boundingBox.on("click",A.bind(instance._cancelAutoHide,instance));boundingBox.on("mouseenter",A.bind(instance._cancelAutoHide,instance));boundingBox.on("mouseleave",A.bind(instance._invokeHideTaskOnInteraction,instance));instance.after("focusedChange", A.bind(instance._invokeHideTaskOnInteraction,instance));instance.on("visibleChange",instance._onVisibleChangeOverlayContext)},hide:function(){var instance=this;instance.clearIntervals();instance.fire("hide");OverlayContext.superclass.hide.apply(instance,arguments)},show:function(event){var instance=this;instance.clearIntervals();instance.updateCurrentNode(event);instance.fire("show");OverlayContext.superclass.show.apply(instance,arguments);instance.refreshAlign()},syncUI:function(){var instance=this; if(instance.get(USE_ARIA))instance.plug(A.Plugin.Aria,{attributes:{trigger:{ariaName:"controls",format:function(value){var id=instance.get(BOUNDING_BOX).generateID();return id},node:function(){return instance.get(TRIGGER)}},visible:{ariaName:"hidden",format:function(value){return!value}}},roleName:"dialog"})},toggle:function(event){var instance=this;if(instance.get(VISIBLE))instance._hideTask(event);else instance._showTask(event)},clearIntervals:function(){this._hideTask.cancel();this._showTask.cancel()}, refreshAlign:function(){var instance=this;var align=instance.get(ALIGN);var currentNode=instance.get(CURRENT_NODE);if(currentNode)instance._uiSetAlign(currentNode,align.points)},updateCurrentNode:function(event){var instance=this;var align=instance.get(ALIGN);var trigger=instance.get(TRIGGER);var currentTarget=null;if(event)currentTarget=event.currentTarget;var node=currentTarget||trigger.item(0)||align.node;if(node)instance.set(CURRENT_NODE,node)},_toggle:function(event){var instance=this;if(instance.get("disabled"))return; var currentTarget=event.currentTarget;if(instance._lastTarget!=currentTarget)instance.hide();instance.toggle(event);event.stopPropagation();instance._lastTarget=currentTarget},_afterShowOnChange:function(event){var instance=this;var wasToggle=event.prevVal==instance.get(HIDE_ON);if(wasToggle){var trigger=instance.get(TRIGGER);trigger.detach(event.prevVal,instance._hideCallback);instance._setHideOn(instance.get(HIDE_ON))}},_afterHideOnChange:function(event){var instance=this;var wasToggle=event.prevVal== instance.get(SHOW_ON);if(wasToggle){var trigger=instance.get(TRIGGER);trigger.detach(event.prevVal,instance._showCallback);instance._setShowOn(instance.get(SHOW_ON))}},_afterTriggerChange:function(event){var instance=this;instance._setShowOn(instance.get(SHOW_ON));instance._setHideOn(instance.get(HIDE_ON))},_beforeShowOnChange:function(event){var instance=this;var trigger=instance.get(TRIGGER);trigger.detach(event.prevVal,instance._showCallback)},_beforeHideOnChange:function(event){var instance=this; var trigger=instance.get(TRIGGER);trigger.detach(event.prevVal,instance._hideCallback)},_beforeTriggerChange:function(event){var instance=this;var trigger=instance.get(TRIGGER);var showOn=instance.get(SHOW_ON);var hideOn=instance.get(HIDE_ON);trigger.detach(showOn,instance._showCallback);trigger.detach(hideOn,instance._hideCallback);trigger.detach(MOUSEDOWN,instance._stopTriggerEventPropagation)},_cancelAutoHide:function(event){var instance=this;if(instance.get(CANCELLABLE_HIDE))instance.clearIntervals(); event.stopPropagation()},_invokeHideTaskOnInteraction:function(event){var instance=this;var cancellableHide=instance.get(CANCELLABLE_HIDE);var focused=instance.get(FOCUSED);if(!focused&&!cancellableHide)instance._hideTask()},_onVisibleChangeOverlayContext:function(event){var instance=this;if(event.newVal&&instance.get("disabled"))event.preventDefault()},_stopTriggerEventPropagation:function(event){event.stopPropagation()},_setHideDelay:function(val){var instance=this;instance._hideTask=A.debounce(instance.hide, val,instance);return val},_setHideOn:function(eventType){var instance=this;var trigger=instance.get(TRIGGER);var toggle=eventType==instance.get(SHOW_ON);if(toggle){instance._hideCallback=A.bind(instance._toggle,instance);trigger.detach(eventType,instance._showCallback)}else{var delay=instance.get(HIDE_DELAY);instance._hideCallback=function(event){instance._hideTask(event);event.stopPropagation()}}trigger.on(eventType,instance._hideCallback);return eventType},_setHideOnDocumentClick:function(value){var instance= this;if(value)A.OverlayContextManager.register(instance);else A.OverlayContextManager.remove(instance);return value},_setShowDelay:function(val){var instance=this;instance._showTask=A.debounce(instance.show,val,instance);return val},_setShowOn:function(eventType){var instance=this;var trigger=instance.get(TRIGGER);var toggle=eventType==instance.get(HIDE_ON);if(toggle){instance._showCallback=A.bind(instance._toggle,instance);trigger.detach(eventType,instance._hideCallback)}else{var delay=instance.get(SHOW_DELAY); instance._showCallback=function(event){instance._showTask(event);event.stopPropagation()}}if(eventType!=MOUSEDOWN)trigger.on(MOUSEDOWN,instance._stopTriggerEventPropagation);else trigger.detach(MOUSEDOWN,instance._stopTriggerEventPropagation);trigger.on(eventType,instance._showCallback);return eventType}}});A.OverlayContext=OverlayContext;A.OverlayContextManager=new A.OverlayManager({});A.on(MOUSEDOWN,function(){A.OverlayContextManager.hideAll()},A.getDoc())},"3.1.0-deprecated.70",{"requires":["aui-overlay-manager-deprecated", "aui-delayed-task-deprecated","aui-aria"]}); YUI.add("aui-overlay-manager-deprecated",function(A,NAME){var Lang=A.Lang,isArray=Lang.isArray,isBoolean=Lang.isBoolean,isNumber=Lang.isNumber,isString=Lang.isString,BOUNDING_BOX="boundingBox",DEFAULT="default",HOST="host",OVERLAY_MANAGER="OverlayManager",GROUP="group",Z_INDEX="zIndex",Z_INDEX_BASE="zIndexBase";var OverlayManager=A.Component.create({NAME:OVERLAY_MANAGER.toLowerCase(),ATTRS:{zIndexBase:{value:1E3,validator:isNumber,setter:Lang.toInt}},EXTENDS:A.Base,prototype:{initializer:function(){var instance= this;instance._overlays=[]},bringToTop:function(overlay){var instance=this;var overlays=instance._overlays.sort(instance.sortByZIndexDesc);var highest=overlays[0];if(highest!==overlay){var overlayZ=overlay.get(Z_INDEX);var highestZ=highest.get(Z_INDEX);overlay.set(Z_INDEX,highestZ+1);overlay.set("focused",true)}},destructor:function(){var instance=this;instance._overlays=[]},register:function(overlay){var instance=this;var overlays=instance._overlays;if(isArray(overlay))A.Array.each(overlay,function(o){instance.register(o)}); else{var zIndexBase=instance.get(Z_INDEX_BASE);var registered=instance._registered(overlay);if(!registered&&overlay&&(overlay instanceof A.Overlay||A.Component&&overlay instanceof A.Component)){var boundingBox=overlay.get(BOUNDING_BOX);overlays.push(overlay);var zIndex=overlay.get(Z_INDEX)||0;var newZIndex=overlays.length+zIndex+zIndexBase;overlay.set(Z_INDEX,newZIndex);overlay.on("focusedChange",instance._onFocusedChange,instance);boundingBox.on("mousedown",instance._onMouseDown,instance)}}return overlays}, remove:function(overlay){var instance=this;var overlays=instance._overlays;if(overlays.length)return A.Array.removeItem(overlays,overlay);return null},each:function(fn){var instance=this;var overlays=instance._overlays;A.Array.each(overlays,fn)},showAll:function(){this.each(function(overlay){overlay.show()})},hideAll:function(){this.each(function(overlay){overlay.hide()})},sortByZIndexDesc:function(a,b){if(!a||!b||!a.hasImpl(A.WidgetStack)||!b.hasImpl(A.WidgetStack))return 0;else{var aZ=a.get(Z_INDEX); var bZ=b.get(Z_INDEX);if(aZ>bZ)return-1;else if(aZ0){contents+='\x3ctextarea name\x3d"'+namespace+'description" style\x3d"height: 100px; width: 284px;"\x3e\x3c/textarea\x3e\x3cbr /\x3e\x3cbr /\x3e'+'Reviewer'+' \x3cselect name\x3d"'+namespace+'reviewUserId"\x3e';for(var i=0;i=sessionLength;var hasWarned=elapsed>=warningTime;if(hasWarned){if(timestamp== "expired"){expirationMoment=true;extend=false;hasExpired=true}if(hasExpired&&sessionState!="expired")if(extend){expirationMoment=false;hasExpired=false;hasWarned=false;warningMoment=false;instance.extend()}else{instance.expire();expirationMoment=true}else if(hasWarned&&!hasExpired&&!extend&&sessionState!="warned"){instance.warn();warningMoment=true}}for(var i in registered)registered[i](elapsed,interval,hasWarned,hasExpired,warningMoment,expirationMoment)},interval)},_stopTimer:function(){var instance= this;A.clearInterval(instance._intervalId)},_cookieKey:"LFR_SESSION_STATE_"+themeDisplay.getUserId()}});SessionBase.SRC=SRC;var SessionDisplay=A.Component.create({ATTRS:{pageTitle:{value:DOC.title}},EXTENDS:A.Plugin.Base,NAME:"liferaysessiondisplay",NS:"display",prototype:{initializer:function(config){var instance=this;var host=instance.get("host");if(Liferay.Util.getTop()==CONFIG.win){instance._host=host;instance._toggleText={hide:'Hide',show:'Show'};instance._expiredText= 'Due\x20to\x20inactivity\x2c\x20your\x20session\x20has\x20expired\x2e\x20Please\x20save\x20any\x20data\x20you\x20may\x20have\x20entered\x20before\x20refreshing\x20the\x20page\x2e';instance._warningText='Due\x20to\x20inactivity\x2c\x20your\x20session\x20will\x20expire\x20in\x20\x7b0\x7d\x2e\x20To\x20extend\x20your\x20session\x20another\x20\x7b1\x7d\x20minute\x28s\x29\x2c\x20please\x20press\x20the\x20\x3cem\x3eExtend\x3c\x2fem\x3e\x20button\x2e\x20\x7b2\x7d';instance._warningText=Lang.sub(instance._warningText,['\x3cspan class\x3d"countdown-timer"\x3e{0}\x3c/span\x3e',host.get("sessionLength")/6E4,'\x3ca class\x3d"alert-link" href\x3d"#"\x3e'+'Extend'+"\x3c/a\x3e"]);host.on("sessionStateChange",instance._onHostSessionStateChange,instance);instance.afterHostMethod("_defActivatedFn", instance._afterDefActivatedFn);instance.afterHostMethod("_defExpiredFn",instance._afterDefExpiredFn)}else host.unplug(instance)},destructor:function(){var instance=this;if(instance._banner)instance._destroyBanner()},_afterDefActivatedFn:function(event){var instance=this;instance._uiSetActivated()},_afterDefExpiredFn:function(event){var instance=this;instance._host.unregisterInterval(instance._intervalId);instance._uiSetExpired()},_beforeHostWarned:function(event){var instance=this;var host=instance._host; var sessionLength=host.get("sessionLength");var timestamp=host.get("timestamp");var warningLength=host.get("warningLength");var elapsed=sessionLength;if(Lang.toInt(timestamp))elapsed=Math.floor((Date.now()-timestamp)/1E3)*1E3;var remainingTime=sessionLength-elapsed;if(remainingTime>warningLength)remainingTime=warningLength;var banner=instance._getBanner();var counterTextNode=banner.one(".countdown-timer");instance._uiSetRemainingTime(remainingTime,counterTextNode);banner.show();instance._intervalId= host.registerInterval(function(elapsed,interval,hasWarned,hasExpired,warningMoment,expirationMoment){if(!hasWarned)instance._uiSetActivated();else if(!hasExpired){if(warningMoment){if(remainingTime<=0)remainingTime=warningLength;banner.show()}elapsed=Math.floor((Date.now()-timestamp)/1E3)*1E3;remainingTime=sessionLength-elapsed;instance._uiSetRemainingTime(remainingTime,counterTextNode)}remainingTime-=interval})},_destroyBanner:function(){var instance=this;instance._banner=false;var notificationContainer= A.one(".lfr-notification-container");if(notificationContainer)notificationContainer.remove()},_formatNumber:function(value){var instance=this;return Lang.String.padNumber(Math.floor(value),2)},_formatTime:function(time){var instance=this;time=Number(time);if(Lang.isNumber(time)&&time>0){time/=1E3;BUFFER_TIME[0]=instance._formatNumber(time/3600);time%=3600;BUFFER_TIME[1]=instance._formatNumber(time/60);time%=60;BUFFER_TIME[2]=instance._formatNumber(time);time=BUFFER_TIME.join(":")}else time=0;return time}, _getBanner:function(){var instance=this;var banner=instance._banner;if(!banner){banner=(new Liferay.Notification({closeable:true,delay:{hide:0,show:0},duration:500,message:instance._warningText,on:{click:function(event){if(event.domEvent.target.test(".alert-link")){event.domEvent.preventDefault();instance._host.extend()}else if(event.domEvent.target.test(".close")){instance._destroyBanner();instance._alertClosed=true}}},title:'Warning',type:"warning"})).render("body");instance._banner= banner}return banner},_onHostSessionStateChange:function(event){var instance=this;if(event.newVal=="warned")instance._beforeHostWarned(event)},_uiSetActivated:function(){var instance=this;DOC.title=instance.reset("pageTitle").get("pageTitle");instance._host.unregisterInterval(instance._intervalId);var banner=instance._getBanner();if(banner)instance._destroyBanner()},_uiSetExpired:function(){var instance=this;var banner=instance._getBanner();banner.setAttrs({message:instance._expiredText,title:'Danger', type:"danger"});DOC.title=instance.get("pageTitle")},_uiSetRemainingTime:function(remainingTime){var instance=this;remainingTime=instance._formatTime(remainingTime);if(!instance._alertClosed){var banner=instance._getBanner();banner.set("message",Lang.sub(instance._warningText,[remainingTime]))}DOC.title=Lang.sub('Session\x20expires\x20in\x20\x7b0\x7d\x2e',[remainingTime])+" | "+instance.get("pageTitle")}}});Liferay.SessionBase=SessionBase;Liferay.SessionDisplay=SessionDisplay},"",{requires:["aui-io-request", "aui-timer","cookie","liferay-notification"]}); (function(A,Liferay){var Util=Liferay.namespace("Util");var Lang=A.Lang;var AArray=A.Array;var AObject=A.Object;var AString=A.Lang.String;var htmlEscapedValues=[];var htmlUnescapedValues=[];var MAP_HTML_CHARS_ESCAPED={'"':"\x26#034;","\x26":"\x26amp;","'":"\x26#039;","/":"\x26#047;","\x3c":"\x26lt;","\x3e":"\x26gt;","`":"\x26#096;"};var MAP_HTML_CHARS_UNESCAPED={};AObject.each(MAP_HTML_CHARS_ESCAPED,function(item,index){MAP_HTML_CHARS_UNESCAPED[item]=index;htmlEscapedValues.push(item);htmlUnescapedValues.push(index)}); var REGEX_DASH=/-([a-z])/gi;var STR_LEFT_SQUARE_BRACKET="[";var STR_RIGHT_SQUARE_BRACKET="]";var REGEX_HTML_ESCAPE=new RegExp(STR_LEFT_SQUARE_BRACKET+htmlUnescapedValues.join("")+STR_RIGHT_SQUARE_BRACKET,"g");var REGEX_HTML_UNESCAPE=new RegExp(htmlEscapedValues.join("|"),"gi");Util.MAP_HTML_CHARS_ESCAPED=MAP_HTML_CHARS_ESCAPED;Util.actsAsAspect=function(object){object.yield=null;object.rv={};object.before=function(method,f){var original=eval("this."+method);this[method]=function(){f.apply(this,arguments); return original.apply(this,arguments)}};object.after=function(method,f){var original=eval("this."+method);this[method]=function(){this.rv[method]=original.apply(this,arguments);return f.apply(this,arguments)}};object.around=function(method,f){var original=eval("this."+method);this[method]=function(){this.yield=original;return f.apply(this,arguments)}}};Util.addInputFocus=function(){A.use("aui-base",function(A){var handleFocus=function(event){var target=event.target;var tagName=target.get("tagName"); if(tagName)tagName=tagName.toLowerCase();var nodeType=target.get("type");if(tagName=="input"&&/text|password/.test(nodeType)||tagName=="textarea"){var action="addClass";if(/blur|focusout/.test(event.type))action="removeClass";target[action]("focus")}};A.on("focus",handleFocus,document);A.on("blur",handleFocus,document)});Util.addInputFocus=function(){}};Util.addInputType=function(el){Util.addInputType=Lang.emptyFn;if(Liferay.Browser.isIe()&&Liferay.Browser.getMajorVersion()<7)Util.addInputType=function(el){if(el)el= A.one(el);else el=A.one(document.body);var defaultType="text";el.all("input").each(function(item,index){var type=item.get("type")||defaultType;item.addClass(type)})};return Util.addInputType(el)};Util.camelize=function(value,separator){var regex=REGEX_DASH;if(separator)regex=new RegExp(separator+"([a-z])","gi");value=value.replace(regex,function(match0,match1){return match1.toUpperCase()});return value};Util.clamp=function(value,min,max){return Math.min(Math.max(value,min),max)};Util.escapeHTML=function(str, preventDoubleEscape,entities){var regex=REGEX_HTML_ESCAPE;var entitiesList=[];var entitiesValues;if(Lang.isObject(entities)){entitiesValues=[];AObject.each(entities,function(item,index){entitiesList.push(index);entitiesValues.push(item)});regex=new RegExp(STR_LEFT_SQUARE_BRACKET+AString.escapeRegEx(entitiesList.join(""))+STR_RIGHT_SQUARE_BRACKET,"g")}else{entities=MAP_HTML_CHARS_ESCAPED;entitiesValues=htmlEscapedValues}return str.replace(regex,A.bind("_escapeHTML",Util,!!preventDoubleEscape,entities, entitiesValues))};Util.isEditorPresent=function(editorName){return Liferay.EDITORS&&Liferay.EDITORS[editorName]};Util.randomMinMax=function(min,max){return Math.round(Math.random()*(max-min))+min};Util.selectAndCopy=function(el){el.focus();el.select();if(document.all){var textRange=el.createTextRange();textRange.execCommand("copy")}};Util.setBox=function(oldBox,newBox){for(var i=oldBox.length-1;i>-1;i--)oldBox.options[i]=null;for(i=0;i=0){var entity=string.substring(offset,nextSemicolonIndex+1);if(entitiesValues.indexOf(entity)>= 0)result=match}}if(!result)result=entities[match];return result};Util._unescapeHTML=function(entities,match){return entities[match]};Liferay.provide(Util,"check",function(form,name,checked){var checkbox=A.one(form[name]);if(checkbox)checkbox.attr("checked",checked)},["aui-base"]);Liferay.provide(Util,"disableSelectBoxes",function(toggleBoxId,value,selectBoxId){var selectBox=A.one("#"+selectBoxId);var toggleBox=A.one("#"+toggleBoxId);if(selectBox&&toggleBox){var dynamicValue=Lang.isFunction(value); var disabled=function(){var currentValue=selectBox.val();var visible=value==currentValue;if(dynamicValue)visible=value(currentValue,value);toggleBox.attr("disabled",!visible)};disabled();selectBox.on("change",disabled)}},["aui-base"]);Liferay.provide(Util,"disableTextareaTabs",function(textarea){textarea=A.one(textarea);if(textarea&&textarea.attr("textareatabs")!="enabled"){textarea.attr("textareatabs","disabled");textarea.detach("keydown",Util.textareaTabs)}},["aui-base"]);Liferay.provide(Util,"enableTextareaTabs", function(textarea){textarea=A.one(textarea);if(textarea&&textarea.attr("textareatabs")!="enabled"){textarea.attr("textareatabs","disabled");textarea.on("keydown",Util.textareaTabs)}},["aui-base"]);Liferay.provide(Util,"removeItem",function(box,value){box=A.one(box);var selectedIndex=box.get("selectedIndex");if(!value)box.all("option").item(selectedIndex).remove(true);else box.all("option[value\x3d"+value+STR_RIGHT_SQUARE_BRACKET).item(selectedIndex).remove(true)},["aui-base"]);Liferay.provide(Util, "resizeTextarea",function(elString,usingRichEditor){var el=A.one("#"+elString);if(!el)el=A.one("textarea[name\x3d"+elString+STR_RIGHT_SQUARE_BRACKET);if(el){var pageBody=A.getBody();var diff;var resize=function(event){var pageBodyHeight=pageBody.get("winHeight");if(usingRichEditor)try{if(el.get("nodeName").toLowerCase()!="iframe")el=window[elString]}catch(e){}if(!diff){var buttonRow=pageBody.one(".button-holder");var templateEditor=pageBody.one(".lfr-template-editor");if(buttonRow&&templateEditor){var region= templateEditor.getXY();diff=buttonRow.outerHeight(true)+region[1]+25}else diff=170}el=A.one(el);var styles={width:"98%"};if(event)styles.height=pageBodyHeight-diff;if(usingRichEditor)if(!el||!A.DOM.inDoc(el)){A.on("available",function(event){el=A.one(window[elString]);if(el)el.setStyles(styles)},"#"+elString+"_cp");return}if(el)el.setStyles(styles)};resize();var dialog=Liferay.Util.getWindow();if(dialog){var resizeEventHandle=dialog.iframe.after("resizeiframe:heightChange",resize);A.getWin().on("unload", resizeEventHandle.detach,resizeEventHandle)}}},["aui-base"]);Liferay.provide(Util,"setSelectedValue",function(col,value){var option=A.one(col).one("option[value\x3d"+value+STR_RIGHT_SQUARE_BRACKET);if(option)option.attr("selected",true)},["aui-base"]);Liferay.provide(Util,"switchEditor",function(options){var uri=options.uri;var windowName=Liferay.Util.getWindowName();var dialog=Liferay.Util.getWindow(windowName);if(dialog)dialog.iframe.set("uri",uri)},["aui-io"])})(AUI(),Liferay);