/*
	UIZE JAVASCRIPT FRAMEWORK 2011-01-20

	http://www.uize.com/reference/Uize.html
	Available under MIT License or GNU General Public License -- http://www.uize.com/license.html
*/
(function(){var _a,_b='string',_c='object',_d='number',_e='boolean',_f=Function,_g=false,_h=true,_i=null;var _j=0,_k=[],_l={},_m={string:1,number:1,'boolean':1};function _n(_o){if(_o==_a)return _o;var _p=typeof _o;if(_p==_b||_p==_d||_p==_e||_q(_o))return _o;var _r=_o.constructor;if(_r==RegExp||_r==Date||_r==String||_r==Number||_r==Boolean)return new _r(_o.valueOf());var _s=_r==Object;if(_s||_t(_o)){var _u,_v,_w=_s?{}:[];for(var _x in _o)_w[_x]=(_v=typeof(_u=_o[_x]))==_b||_v==_d||_v==_e||_u==_a?_u:_n(_u);return _w;}return _o;}function _y(){function _z(_A){var _B=_C(_A).moduleName,_D=_A.subclass;return('['+(_E(_A)||(!_D&& !_B)?_c:_D?'class':'package')+' '+(_B||'Function')+']');}var _w=_z(this);if(this.get){var _F=this.get(),_G=[];for(var _H in _F){var _I=_F[_H];_G.push(_H+' : '+(_I&&(_E(_I)||_q(_I))?_z(_I):_I));}_w+='\n\n'+_G.sort().join('\n');}return _w;}function _J(){return this[_K(this,'value')];}var _L=Uize=_M(function(){},function(){this.instanceId=_N();},function(_F){_F||(_F=_l);var _O={},
_P=this.Class._P,_x,_Q;for(_x in _P){if(_x in _F)_O[_x]=_F[_x];else if((_Q=_P[_x])!==_a)_O[_x]=_Q;}for(_x in _F)_x in _O||(_O[_x]=_F[_x]);this.set(_O);}),_R=_L.prototype,_S=_L.nonInheritableStatics;function _C(_T){return _T.Class||_T}var _U={},_V={Uize:_L};function _W(_B){var _X;return(_V[_B]||(_B=='*'&&_V)||((_X=(new _f('try {return '+_B+'} catch (e) {}'))())&&(_V[_B]=_X)));}function _Y(_X){var _Z=_U[_X];if(_Z){for(var _0= -1,_1=_Z.length;++_0<_1;)_Z[_0]();delete _U[_X];}}function _2(_3,_4){var _L=_C(_3);return(_L._5[_4]||_L._6[_4]);}function _K(_3,_4){var _7=_2(_3,_4);return _7?_7._8:_4;}_L._9=_R._9=function(_ba,_bb){if(_ba.charCodeAt(0)==67&& !_ba.indexOf('Changed.')){var _3=this,_bc=_ba.slice(8),_7=_2(_3,_bc);if(_7&&_bc!=_7._bd)_ba='Changed.'+(_bc=_7._bd);_bb(_ba);(_3._be||(_3._be={}))[_bc]=_3._bf&&_3._bf[_ba];}else{_bb(_ba);}};_L.wire=_R.wire=function(_bg,_bh){var _3=this;if(arguments.length==2){_3._9(_bg,function(_ba){var _bf=_3._bf||(_3._bf=_3.eventHandlers={});(_bf[_ba]||(_bf[_ba]=[])).push({_ba:_ba,
_bh:_q(_bh)?_bh:typeof _bh==_b?new _f(_bh):function(_bi){_bh.fire(_bi)},_bj:_bh});});}else if(typeof _bg==_c&&_bg){for(var _ba in _bg)this.wire(_ba,_bg[_ba]);}};_L.fire=_R.fire=function(_bi){if(typeof _bi!=_c)_bi={name:_bi};var _3=this,_bf=_3._bf;if(_bf){var _bk=_bf[_bi.name],_bl=_bf['*'];if(_bk||_bl){_bi.source||(_bi.source=_3);var _bm=_bl&&_bk?_bl.concat(_bk):_bl||_bk,_bn=_bm.length;if(_bn==1){_bm[0]._bh(_bi);}else if(_bn==2){var _bo=_bm[0]._bh,_bp=_bm[1]._bh;_bo(_bi);_bp(_bi);}else{if(!_bl|| !_bk)_bm=_bm.concat();for(var _bq= -1;++_bq<_bn;)_bm[_bq]._bh(_bi);}}}if(_bi.bubble&&_3.Class&&_3.parent){_bi.source||(_bi.source=_3);_3.parent.fire(_bi);}return _bi;};_L.unwire=_R.unwire=function(_bg,_bh){var _3=this;if(typeof _bg==_c&&_bg){for(var _ba in _bg)_3.unwire(_ba,_bg[_ba]);}else{_3._9(_bg,function(_ba){var _bf=_3._bf;if(_bf){var _br=_bf[_ba];if(_br){if(_bh){var _bq=0;while(_bq<_br.length){_br[_bq]._bj==_bh?_br.splice(_bq,1):_bq++;}}(_bh&&_br.length)||delete _bf[_ba];}}});}};_L.get=_R.get=function(_x){
if(typeof _x==_b){return this[_K(this,_x)];}else{var _3=this,_w={};if(!_x){var _L=_C(_3),_6=_L._6;for(var _bs in _6)_w[_6[_bs]._bd]=_3[_bs];}else if(_t(_x)){for(var _bt= -1,_bu=_x.length;++_bt<_bu;){var _bv=_x[_bt];_w[_bv]=_3[_K(_3,_bv)];}}else{for(var _bv in _x)_w[_bv]=_3[_K(_3,_bv)];}return _w;}};_L.registerProperties=function(_bw){var _3=this,_6=_3._6,_5=_3._5;for(var _bs in _bw){var _bx=_bw[_bs],_by=typeof _bx==_c,_bc=(_by?_bx.name:_bx)||_bs,_bz=_bc,_7=_6[_bs]={_8:_bs};if(_bc.indexOf('|')> -1){var _bA=_bc.split('|');_bz=_bA[0];for(var _bB= -1;++_bB<_bA.length;)_5[_bA[_bB]]=_7;}else{_5[_bc]=_7;}_7._bd=_bz;if(_by){if(_bx.onChange)_7._bC=_bx.onChange;if(_bx.conformer)_7._bD=_bx.conformer;_3[_bs]=_bx.value;}}_3._P=this.get();};_L.set=_R.set=function(_F){if(arguments.length==2)_F=_bE(_F,arguments[1]);var _3=this,_E= !!_3.Class,_L=_3.Class||_3,_5=_L._5,_6=_L._6,_7,_bF,_bG,_bH,_be=_E&&_3._be,_bI=_be&&_be['*'],_bJ,_bK,_bs,_bc,_bL,_I,_bM;for(var _4 in _F){_I=_F[_4];if(_7=_5[_4]||_6[_4]){_bs=_7._8;_bc=_7._bd;if(_E)
(_bM||(_bM={}))[_bc]=_7._bD?(_I=_7._bD.call(_3,_I,_3[_bs])):_I;if(_I!==_3[_bs]){if(_E){_bI&&((_bJ||(_bJ={}))[_bc]=_I);_be&&_be[_bc]&&(_bK||(_bK=[])).push(_bc);function _bN(_bH){if(_q(_bH)){if(!_bF){_bF=[];_bG=_3.instanceId+'_handlerAlreadyAdded';}if(!_bH[_bG]){_bH[_bG]=1;_bF.push(_bH);}}else if(typeof _bH==_b){_bN(_3[_bH]);}else if(_t(_bH)){for(var _bq= -1,_bO=_bH.length;++_bq<_bO;)_bN(_bH[_bq]);}}_7._bC&&_bN(_7._bC);}_3[_bs]=_I;}}else{_3[_4]=_I;(_bL||(_bL={}))[_4]=_4;}}_bL&&_L.registerProperties(_bL);if(_E){if(_bF){for(var _bq= -1,_bP=_bF.length;++_bq<_bP;){var _bH=_bF[_bq];delete _bH[_bG];_bH.call(_3,_bM);}}_bJ&&_3.fire({name:'Changed.*',properties:_bJ});if(_bK){for(var _bQ= -1,_bR=_bK.length;++_bQ<_bR;)_3.fire('Changed.'+_bK[_bQ]);}}else{_L._P=this.get();}};_L.toggle=_R.toggle=function(_H){var _o= !this.get(_H);this.set(_H,_o);return _o;};_R.kill=function(){var _bS=this.instanceId;_bT('if(typeof '+_bS+'!=\'undefined\')'+_bS+'=null');};_L.capFirstChar=function(_bU){
return _bU.charAt(0).toUpperCase()+_bU.slice(1);};_S.capFirstChar=1;_L.clone=_n;_S.clone=1;_L.constrain=function(_o,_bV,_bW){return(_bV<_bW?(_o<_bV?_bV:_o>_bW?_bW:_o):(_o<_bW?_bW:_o>_bV?_bV:_o));};_S.constrain=1;var _bX=_L.copyInto=function(_bY,_bZ){if(typeof _bZ==_c&&_bZ){for(var _H in _bZ)_bY[_H]=_bZ[_H];}if(arguments.length>2){for(var _b0=0;++_b0<arguments.length;){if(typeof(_bZ=arguments[_b0])==_c&&_bZ){for(var _H in _bZ)_bY[_H]=_bZ[_H];}}}return _bY;};_S.copyInto=1;_L.callOn=function(_A,_b1,_b2){if(!_A)return;_b2||(_b2=_k);var _b3=typeof _b1==_b,_b4= !_b3&&_q(_b1);function _b5(_A){if(_A&&typeof _A==_c){if(_t(_A)){for(var _b6= -1,_b7=_A.length;++_b6<_b7;)_b5(_A[_b6]);}else{var _b8=_b3&&_q(_A[_b1]);if(_E(_A)||_b8){if(_b4||_b8)(_b4?_b1:_A[_b1]).apply(_A,_b2);}else{for(var _b9 in _A)_b5(_A[_b9]);}}}}_b5(_A);};_S.callOn=1;_L.getModuleByName=_W;_S.getModuleByName=1;_L.indexIn=function(_ca,_o,_cb,_cc){if(_t(_ca)){_cc=_cc!==_g;for(var _cd=_ca.length-1,_ce=_cd+1,_w;--_ce>=0;){var _cf=_ca[_w=_cb?_ce:_cd-_ce];
if(_cc?_cf===_o:_cf==_o)return _w;}}return-1;};_S.indexIn=1;var _t=_L.isArray=function(_A){return _A instanceof Array||(!!_A&&_q(_A.splice));};_S.isArray=1;var _q=_L.isFunction=function(_o){var _r=_o!=_a&&_o.constructor;return!!(_r&&_r==_r.constructor);};_S.isFunction=1;_L.isNumber=function(_o){return typeof _o==_d&& !isNaN(_o);};_S.isNumber=1;_L.isIn=function(_ca,_o,_cc){return _L.indexIn(_ca,_o,false,_cc)> -1;};_S.isIn=1;var _cg=_L.recordMatches=function(_ch,_ci){if(!_ch)return!_ci;for(var _H in _ci){if(_ch[_H]!==_ci[_H])return _g;}return _h;};_S.recordMatches=1;_L.findRecordNo=function(_cj,_ci,_ck){var _w=_L.isNumber(_ck)?_ck: -1;if(_cj){for(var _cl= -1,_cm=_cj.length;++_cl<_cm;){if(_cg(_cj[_cl],_ci)){_w=_cl;break;}}}return _w;};_S.findRecordNo=1;_L.findRecord=function(_cj,_ci,_ck){var _cl=_L.findRecordNo(_cj,_ci,_ck);return _cl> -1?_cj[_cl]:null;};_S.findRecord=1;var _N=_L.getGuid=function(){return'uizeGuid'+_j++;};_S.getGuid=1;var _cn=_L.getPathToLibrary=function(_co,_cp){if(
typeof document!='undefined'&&document.getElementsByTagName){for(var _cq= -1,_cr=document.getElementsByTagName('SCRIPT'),_cs=_cr.length,_ct,_cu;++_cq<_cs;){if((_cu=(_ct=_cr[_cq].src).indexOf(_co))> -1)return(_cp?_ct.replace(_co,_cp):_ct.slice(0,_ct.lastIndexOf('/',_cu)+1));}}return'';};_S.getPathToLibrary=1;var _bT=_L.globalEval=new _f('toEval','return eval (toEval)');_S.globalEval=1;var _E=_L.isInstance=function(_A){return!!(_A&&_A.Class);};_S.isInstance=1;_L.module=function(_cv){var _cw=_cv.name||'',_cx=_cw.lastIndexOf('.'),_cy=_cw.substr(0,_cx),_cz=_cv.superclass||_cy,_cA=_cv.required||[],_cB=[];_U[_cw]||(_U[_cw]=[]);if(typeof _cA==_b)_cA=_cA.split(',');_cy&&_cA.push(_cy);_cz!=_cy&&_cA.push(_cz);for(var _cC= -1,_cD=_cA.length;++_cC<_cD;){var _cE=_cA[_cC];_cE&& !_W(_cE)&&_cB.push(_cE);}function _cF(){var _cG=_cv.builder,_X=_cG&&_cG(_W(_cz));_cw&&(new _f('m',_cw+'=m'))(_X=_V[_cw]=_X||function(){});if(_q(_X)){_X.moduleName=_cw;if(!_X.subclass)_X.toString=_y;}_Y(_cw);}var _cH=_cB.length;if(_cH){
var _cI=_L.moduleLoader;if(_cI){var _cJ= -1;function _cK(){_cJ++;if(_cJ<_cH){var _cL=_cB[_cJ];_W(_cL)?_cK():_U[_cL]?_U[_cL].push(_cK):_cI(_cL,function(_cM){if(_W(_cL)){_cK();}else{_cM&&_bT(_cM);if(_W(_cL)){_Y(_cL);_cK();}else{(_U[_cL]||(_U[_cL]=[])).push(_cK);}}});}else{_cF();}}_cK();}else{_cF();}}else{_cF();}};_S.module=1;var _bE=_L.pairUp=function(_cN,_o){var _w={};_w[_cN]=_o;return _w;};_S.pairUp=1;var _cO=_L.escapeRegExpLiteral=function(_cP){return _cP.replace(/([\^\$\|\{\}\[\]\(\)\?\.\*\+\\])/g,'\\$1');};_S.escapeRegExpLiteral=1;var _cQ=_L.substituteInto=function(_cR,_cS,_cT){if(!(_cR=_cR==_a?'':_cR+'')||_cS==_a)return _cR;if(_m[typeof _cS])_cS=[_cS];var _cU=(_cT||'[#KEY]').split('KEY'),_cV=[];for(var _cW in _cS)_cV.push(_cO(_cW));return _cR.replace(new RegExp(_cO(_cU[0])+'('+_cV.join('|')+')'+_cO(_cU[1]),'g'),function(_cX,_cW){return _cS[_cW]+''});};_S.substituteInto=1;function _M(_L,_cY,_cZ){var _c0=function(){var _c1,_c2,_c3;for(var _c4 in _c5){_c2=(_c1=_c5[_c4]).length;for(var _c6= -1;++_c6<_c2;)
if(_c3=_c1[_c6])_c3.apply(this,arguments);}return this;};var _R=_L.prototype;var _I,_c7=_L.nonInheritableStatics||_l;for(var _x in _L)if(!_c7[_x]&&(_I=_L[_x])!=_R&& !(_q(_I)&&_I.moduleName&&/[A-Z]/.test(_x.charAt(0))))_c0[_x]=_n(_I);var _c8=_c0.prototype;for(var _x in _R)_c8[_x]=_R[_x];_c8.toString=_y;_c8.valueOf=_J;_c8.Class=_c0;_c0.nonInheritableStatics={nonInheritableStatics:1,toString:0,valueOf:0};_c0.superclass=_L;_c0.toString=_y;_c0.valueOf=_J;var _c9=_L._c9||{alphastructor:_k,omegastructor:_k},_c5=_c0._c9={alphastructor:_c9.alphastructor.concat(_cY),omegastructor:_c9.omegastructor.concat(_cZ)};_c0._6||(_c0._6={});_c0._5||(_c0._5={});return _c0;};_L.subclass=function(_cY,_cZ){return _M(this,_cY,_cZ);};_L.moduleName='Uize';var _da='[#modulePath]',_db;_L.moduleUrlResolver=function(_B){return _L.moduleUrlTemplate.replace(_da,_B+'.js');};_S.moduleUrlResolver=1;_L.moduleLoader=function(_cL,_dc){_dc();var _dd=document.createElement('script');_dd.type='text/javascript';_dd.src=_L.moduleUrlResolver(_cL);
(_db||(_db=document.getElementsByTagName('HEAD')[0])).appendChild(_dd);};_S.moduleLoader=1;_L.moduleUrlTemplate=_cn('Uize.js',_da);_S.moduleUrlTemplate=1;_L.pathToResources=_cn('Uize.js');_S.pathToResources=1;})();
