/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ if(!dojo._hasResource["dojo.window"]){dojo._hasResource["dojo.window"]=true;dojo.provide("dojo.window");dojo.getObject("window",true,dojo);dojo.window.getBox=function(){var _1=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _2=dojo._docScroll();return {w:_1.clientWidth,h:_1.clientHeight,l:_2.x,t:_2.y};};dojo.window.get=function(_3){if(dojo.isIE&&window!==document.parentWindow){_3.parentWindow.execScript("document._parentWindow = window;","Javascript");var _4=_3._parentWindow;_3._parentWindow=null;return _4;}return _3.parentWindow||_3.defaultView;};dojo.window.scrollIntoView=function(_5,_6){try{_5=dojo.byId(_5);var _7=_5.ownerDocument||dojo.doc,_8=_7.body||dojo.body(),_9=_7.documentElement||_8.parentNode,_a=dojo.isIE,_b=dojo.isWebKit;if((!(dojo.isMoz||_a||_b||dojo.isOpera)||_5==_8||_5==_9)&&(typeof _5.scrollIntoView!="undefined")){_5.scrollIntoView(false);return;}var _c=_7.compatMode=="BackCompat",_d=(_a>=9&&_5.ownerDocument.parentWindow.frameElement)?((_9.clientHeight>0&&_9.clientWidth>0&&(_8.clientHeight==0||_8.clientWidth==0||_8.clientHeight>_9.clientHeight||_8.clientWidth>_9.clientWidth))?_9:_8):(_c?_8:_9),_e=_b?_8:_d,_f=_d.clientWidth,_10=_d.clientHeight,rtl=!dojo._isBodyLtr(),_11=_6||dojo.position(_5),el=_5.parentNode,_12=function(el){return ((_a<=6||(_a&&_c))?false:(dojo.style(el,"position").toLowerCase()=="fixed"));};if(_12(_5)){return;}while(el){if(el==_8){el=_e;}var _13=dojo.position(el),_14=_12(el);if(el==_e){_13.w=_f;_13.h=_10;if(_e==_9&&_a&&rtl){_13.x+=_e.offsetWidth-_13.w;}if(_13.x<0||!_a){_13.x=0;}if(_13.y<0||!_a){_13.y=0;}}else{var pb=dojo._getPadBorderExtents(el);_13.w-=pb.w;_13.h-=pb.h;_13.x+=pb.l;_13.y+=pb.t;var _15=el.clientWidth,_16=_13.w-_15;if(_15>0&&_16>0){_13.w=_15;_13.x+=(rtl&&(_a||el.clientLeft>pb.l))?_16:0;}_15=el.clientHeight;_16=_13.h-_15;if(_15>0&&_16>0){_13.h=_15;}}if(_14){if(_13.y<0){_13.h+=_13.y;_13.y=0;}if(_13.x<0){_13.w+=_13.x;_13.x=0;}if(_13.y+_13.h>_10){_13.h=_10-_13.y;}if(_13.x+_13.w>_f){_13.w=_f-_13.x;}}var l=_11.x-_13.x,t=_11.y-Math.max(_13.y,0),r=l+_11.w-_13.w,bot=t+_11.h-_13.h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);if(rtl&&((_a==8&&!_c)||_a>=9)){s=-s;}_11.x+=el.scrollLeft;el.scrollLeft+=s;_11.x-=el.scrollLeft;}if(bot*t>0){_11.y+=el.scrollTop;el.scrollTop+=Math[t<0?"max":"min"](t,bot);_11.y-=el.scrollTop;}el=(el!=_e)&&!_14&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);_5.scrollIntoView(false);}};}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.getObject("regexp",true,dojo);dojo.regexp.escapeString=function(str,_17){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_17&&_17.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_18){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;ib||a==null){r=1;}}return r;};dojo.data.util.sorter.createSortFunction=function(_1b,_1c){var _1d=[];function _1e(_1f,dir,_20,s){return function(_21,_22){var a=s.getValue(_21,_1f);var b=s.getValue(_22,_1f);return dir*_20(a,b);};};var _23;var map=_1c.comparatorMap;var bc=dojo.data.util.sorter.basicComparator;for(var i=0;i<_1b.length;i++){_23=_1b[i];var _24=_23.attribute;if(_24){var dir=(_23.descending)?-1:1;var _25=bc;if(map){if(typeof _24!=="string"&&("toString" in _24)){_24=_24.toString();}_25=map[_24]||bc;}_1d.push(_1e(_24,dir,_25,_1c));}}return function(_26,_27){var i=0;while(i<_1d.length){var ret=_1d[i++](_26,_27);if(ret!==0){return ret;}}return 0;};};}if(!dojo._hasResource["dojo.data.util.simpleFetch"]){dojo._hasResource["dojo.data.util.simpleFetch"]=true;dojo.provide("dojo.data.util.simpleFetch");dojo.getObject("data.util.simpleFetch",true,dojo);dojo.data.util.simpleFetch.fetch=function(_28){_28=_28||{};if(!_28.store){_28.store=this;}var _29=this;var _2a=function(_2b,_2c){if(_2c.onError){var _2d=_2c.scope||dojo.global;_2c.onError.call(_2d,_2b,_2c);}};var _2e=function(_2f,_30){var _31=_30.abort||null;var _32=false;var _33=_30.start?_30.start:0;var _34=(_30.count&&(_30.count!==Infinity))?(_33+_30.count):_2f.length;_30.abort=function(){_32=true;if(_31){_31.call(_30);}};var _35=_30.scope||dojo.global;if(!_30.store){_30.store=_29;}if(_30.onBegin){_30.onBegin.call(_35,_2f.length,_30);}if(_30.sort){_2f.sort(dojo.data.util.sorter.createSortFunction(_30.sort,_29));}if(_30.onItem){for(var i=_33;(i<_2f.length)&&(i<_34);++i){var _36=_2f[i];if(!_32){_30.onItem.call(_35,_36,_30);}}}if(_30.onComplete&&!_32){var _37=null;if(!_30.onItem){_37=_2f.slice(_33,_34);}_30.onComplete.call(_35,_37,_30);}};this._fetchItems(_28,_2e,_2a);return _28;};}if(!dojo._hasResource["dojo.data.util.filter"]){dojo._hasResource["dojo.data.util.filter"]=true;dojo.provide("dojo.data.util.filter");dojo.getObject("data.util.filter",true,dojo);dojo.data.util.filter.patternToRegExp=function(_38,_39){var rxp="^";var c=null;for(var i=0;i<_38.length;i++){c=_38.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_38.charAt(i);break;case "*":rxp+=".*";break;case "?":rxp+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":rxp+="\\";default:rxp+=c;}}rxp+="$";if(_39){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};}if(!dojo._hasResource["dijit._CssStateMixin"]){dojo._hasResource["dijit._CssStateMixin"]=true;dojo.provide("dijit._CssStateMixin");dojo.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);dojo.forEach(["onmouseenter","onmouseleave","onmousedown"],function(e){this.connect(this.domNode,e,"_cssMouseEvent");},this);dojo.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(_3a){this.watch(_3a,dojo.hitch(this,"_setStateClass"));},this);for(var ap in this.cssStateNodes){this._trackMouseState(this[ap],this.cssStateNodes[ap]);}this._setStateClass();},_cssMouseEvent:function(_3b){if(!this.disabled){switch(_3b.type){case "mouseenter":case "mouseover":this._set("hovering",true);this._set("active",this._mouseDown);break;case "mouseleave":case "mouseout":this._set("hovering",false);this._set("active",false);break;case "mousedown":this._set("active",true);this._mouseDown=true;var _3c=this.connect(dojo.body(),"onmouseup",function(){this._mouseDown=false;this._set("active",false);this.disconnect(_3c);});break;}}},_setStateClass:function(){var _3d=this.baseClass.split(" ");function _3e(_3f){_3d=_3d.concat(dojo.map(_3d,function(c){return c+_3f;}),"dijit"+_3f);};if(!this.isLeftToRight()){_3e("Rtl");}if(this.checked){_3e("Checked");}if(this.state){_3e(this.state);}if(this.selected){_3e("Selected");}if(this.disabled){_3e("Disabled");}else{if(this.readOnly){_3e("ReadOnly");}else{if(this.active){_3e("Active");}else{if(this.hovering){_3e("Hover");}}}}if(this._focused){_3e("Focused");}var tn=this.stateNode||this.domNode,_40={};dojo.forEach(tn.className.split(" "),function(c){_40[c]=true;});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(c){delete _40[c];});}dojo.forEach(_3d,function(c){_40[c]=true;});var _41=[];for(var c in _40){_41.push(c);}tn.className=_41.join(" ");this._stateClasses=_3d;},_trackMouseState:function(_42,_43){var _44=false,_45=false,_46=false;var _47=this,cn=dojo.hitch(this,"connect",_42);function _48(){var _49=("disabled" in _47&&_47.disabled)||("readonly" in _47&&_47.readonly);dojo.toggleClass(_42,_43+"Hover",_44&&!_45&&!_49);dojo.toggleClass(_42,_43+"Active",_45&&!_49);dojo.toggleClass(_42,_43+"Focused",_46&&!_49);};cn("onmouseenter",function(){_44=true;_48();});cn("onmouseleave",function(){_44=false;_45=false;_48();});cn("onmousedown",function(){_45=true;_48();});cn("onmouseup",function(){_45=false;_48();});cn("onfocus",function(){_46=true;_48();});cn("onblur",function(){_46=false;_48();});this.watch("disabled",_48);this.watch("readOnly",_48);}});}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0;},add:function(_4a){if(this._hash[_4a.id]){throw new Error("Tried to register widget with id=="+_4a.id+" but that id is already registered");}this._hash[_4a.id]=_4a;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_4b,_4c){_4c=_4c||dojo.global;var i=0,id;for(id in this._hash){_4b.call(_4c,this._hash[id],i++,this._hash);}return this;},filter:function(_4d,_4e){_4e=_4e||dojo.global;var res=new dijit.WidgetSet(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_4d.call(_4e,w,i++,this._hash)){res.add(w);}}return res;},byId:function(id){return this._hash[id];},byClass:function(cls){var res=new dijit.WidgetSet(),id,_4f;for(id in this._hash){_4f=this._hash[id];if(_4f.declaredClass==cls){res.add(_4f);}}return res;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_50,_51){return dojo.map(this.toArray(),_50,_51);},every:function(_52,_53){_53=_53||dojo.global;var x=0,i;for(i in this._hash){if(!_52.call(_53,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_54,_55){_55=_55||dojo.global;var x=0,i;for(i in this._hash){if(_54.call(_55,this._hash[i],x++,this._hash)){return true;}}return false;}});(function(){dijit.registry=new dijit.WidgetSet();var _56=dijit.registry._hash,_57=dojo.attr,_58=dojo.hasAttr,_59=dojo.style;dijit.byId=function(id){return typeof id=="string"?_56[id]:id;};var _5a={};dijit.getUniqueId=function(_5b){var id;do{id=_5b+"_"+(_5b in _5a?++_5a[_5b]:_5a[_5b]=0);}while(_56[id]);return dijit._scopeName=="dijit"?id:dijit._scopeName+"_"+id;};dijit.findWidgets=function(_5c){var _5d=[];function _5e(_5f){for(var _60=_5f.firstChild;_60;_60=_60.nextSibling){if(_60.nodeType==1){var _61=_60.getAttribute("widgetId");if(_61){var _62=_56[_61];if(_62){_5d.push(_62);}}else{_5e(_60);}}}};_5e(_5c);return _5d;};dijit._destroyAll=function(){dijit._curFocus=null;dijit._prevFocus=null;dijit._activeStack=[];dojo.forEach(dijit.findWidgets(dojo.body()),function(_63){if(!_63._destroyed){if(_63.destroyRecursive){_63.destroyRecursive();}else{if(_63.destroy){_63.destroy();}}}});};if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit._destroyAll();});}dijit.byNode=function(_64){return _56[_64.getAttribute("widgetId")];};dijit.getEnclosingWidget=function(_65){while(_65){var id=_65.getAttribute&&_65.getAttribute("widgetId");if(id){return _56[id];}_65=_65.parentNode;}return null;};var _66=(dijit._isElementShown=function(_67){var s=_59(_67);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_57(_67,"type")!="hidden");});dijit.hasDefaultTabStop=function(_68){switch(_68.nodeName.toLowerCase()){case "a":return _58(_68,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var _69;try{var _6a=_68.contentDocument;if("designMode" in _6a&&_6a.designMode=="on"){return true;}_69=_6a.body;}catch(e1){try{_69=_68.contentWindow.document.body;}catch(e2){return false;}}return _69.contentEditable=="true"||(_69.firstChild&&_69.firstChild.contentEditable=="true");default:return _68.contentEditable=="true";}};var _6b=(dijit.isTabNavigable=function(_6c){if(_57(_6c,"disabled")){return false;}else{if(_58(_6c,"tabIndex")){return _57(_6c,"tabIndex")>=0;}else{return dijit.hasDefaultTabStop(_6c);}}});dijit._getTabNavigable=function(_6d){var _6e,_6f,_70,_71,_72,_73,_74={};function _75(_76){return _76&&_76.tagName.toLowerCase()=="input"&&_76.type&&_76.type.toLowerCase()=="radio"&&_76.name&&_76.name.toLowerCase();};var _77=function(_78){dojo.query("> *",_78).forEach(function(_79){if((dojo.isIE&&_79.scopeName!=="HTML")||!_66(_79)){return;}if(_6b(_79)){var _7a=_57(_79,"tabIndex");if(!_58(_79,"tabIndex")||_7a==0){if(!_6e){_6e=_79;}_6f=_79;}else{if(_7a>0){if(!_70||_7a<_71){_71=_7a;_70=_79;}if(!_72||_7a>=_73){_73=_7a;_72=_79;}}}var rn=_75(_79);if(dojo.attr(_79,"checked")&&rn){_74[rn]=_79;}}if(_79.nodeName.toUpperCase()!="SELECT"){_77(_79);}});};if(_66(_6d)){_77(_6d);}function rs(_7b){return _74[_75(_7b)]||_7b;};return {first:rs(_6e),last:rs(_6f),lowest:rs(_70),highest:rs(_72)};};dijit.getFirstInTabbingOrder=function(_7c){var _7d=dijit._getTabNavigable(dojo.byId(_7c));return _7d.lowest?_7d.lowest:_7d.first;};dijit.getLastInTabbingOrder=function(_7e){var _7f=dijit._getTabNavigable(dojo.byId(_7e));return _7f.last?_7f.last:_7f.highest;};dijit.defaultDuration=dojo.config["defaultDuration"]||200;})();}if(!dojo._hasResource["dojo.Stateful"]){dojo._hasResource["dojo.Stateful"]=true;dojo.provide("dojo.Stateful");dojo.declare("dojo.Stateful",null,{postscript:function(_80){if(_80){dojo.mixin(this,_80);}},get:function(_81){return this[_81];},set:function(_82,_83){if(typeof _82==="object"){for(var x in _82){this.set(x,_82[x]);}return this;}var _84=this[_82];this[_82]=_83;if(this._watchCallbacks){this._watchCallbacks(_82,_84,_83);}return this;},watch:function(_85,_86){var _87=this._watchCallbacks;if(!_87){var _88=this;_87=this._watchCallbacks=function(_89,_8a,_8b,_8c){var _8d=function(_8e){if(_8e){_8e=_8e.slice();for(var i=0,l=_8e.length;i=_e3;i--){_e4=dijit.byId(_e2[i]);if(_e4){_e4._focused=false;_e4.set("focused",false);_e4._hasBeenBlurred=true;if(_e4._onBlur){_e4._onBlur(by);}dojo.publish("widgetBlur",[_e4,by]);}}for(i=_e3;i<_e1.length;i++){_e4=dijit.byId(_e1[i]);if(_e4){_e4._focused=true;_e4.set("focused",true);if(_e4._onFocus){_e4._onFocus(by);}dojo.publish("widgetFocus",[_e4,by]);}}}});dojo.addOnLoad(function(){var _e5=dijit.registerWin(window);if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.unregisterWin(_e5);_e5=null;});}});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_e6){this.pairs=[];this.returnWrappers=_e6||false;};dojo.extend(dojo.AdapterRegistry,{register:function(_e7,_e8,_e9,_ea,_eb){this.pairs[((_eb)?"unshift":"push")]([_e7,_e8,_e9,_ea]);},match:function(){for(var i=0;i0&&_11e[pi].parent===_11e[pi-1].widget;pi--){}return _11e[pi];},open:function(args){var _11f=this._stack,_120=args.popup,_121=args.orient||((args.parent?args.parent.isLeftToRight():dojo._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_122=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+this._idGen++);while(_11f.length&&(!args.parent||!dojo.isDescendant(args.parent.domNode,_11f[_11f.length-1].widget.domNode))){dijit.popup.close(_11f[_11f.length-1].widget);}var _123=this._createWrapper(_120);dojo.attr(_123,{id:id,style:{zIndex:this._beginZIndex+_11f.length},"class":"dijitPopup "+(_120.baseClass||_120["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:args.parent?args.parent.id:""});if(dojo.isIE||dojo.isMoz){if(!_120.bgIframe){_120.bgIframe=new dijit.BackgroundIframe(_123);}}var best=_122?dijit.placeOnScreenAroundElement(_123,_122,_121,_120.orient?dojo.hitch(_120,"orient"):null):dijit.placeOnScreen(_123,args,_121=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_123.style.display="";_123.style.visibility="visible";_120.domNode.style.visibility="visible";var _124=[];_124.push(dojo.connect(_123,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&args.onCancel){dojo.stopEvent(evt);args.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _125=this.getTopPopup();if(_125&&_125.onCancel){_125.onCancel();}}}}));if(_120.onCancel){_124.push(dojo.connect(_120,"onCancel",args.onCancel));}_124.push(dojo.connect(_120,_120.onExecute?"onExecute":"onChange",this,function(){var _126=this.getTopPopup();if(_126&&_126.onExecute){_126.onExecute();}}));_11f.push({widget:_120,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_124});if(_120.onOpen){_120.onOpen(best);}return best;},close:function(_127){var _128=this._stack;while((_127&&dojo.some(_128,function(elem){return elem.widget==_127;}))||(!_127&&_128.length)){var top=_128.pop(),_129=top.widget,_12a=top.onClose;if(_129.onClose){_129.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(_129&&_129.domNode){this.hide(_129);}if(_12a){_12a();}}}};dijit._frames=new function(){var _12b=[];this.pop=function(){var _12c;if(_12b.length){_12c=_12b.pop();_12c.style.display="";}else{if(dojo.isIE<9){var burl=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var html="