/***
MochiKit.MochiKit 1.4.2 : PACKED VERSION
THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please
diff against the source tree, not this file.
See for documentation, downloads, license, etc.
(c) 2005 Bob Ippolito. All rights Reserved.
***/
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.Base");
}
if(typeof (MochiKit)=="undefined"){
MochiKit={};
}
if(typeof (MochiKit.Base)=="undefined"){
MochiKit.Base={};
}
if(typeof (MochiKit.__export__)=="undefined"){
MochiKit.__export__=(MochiKit.__compat__||(typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined"));
}
MochiKit.Base.VERSION="1.4.2";
MochiKit.Base.NAME="MochiKit.Base";
MochiKit.Base.update=function(_1,_2){
if(_1===null||_1===undefined){
_1={};
}
for(var i=1;i=0;i--){
_18.unshift(o[i]);
}
}else{
res.push(o);
}
}
return res;
},extend:function(_1b,obj,_1d){
if(!_1d){
_1d=0;
}
if(obj){
var l=obj.length;
if(typeof (l)!="number"){
if(typeof (MochiKit.Iter)!="undefined"){
obj=MochiKit.Iter.list(obj);
l=obj.length;
}else{
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
}
}
if(!_1b){
_1b=[];
}
for(var i=_1d;i>b;
},zrshift:function(a,b){
return a>>>b;
},eq:function(a,b){
return a==b;
},ne:function(a,b){
return a!=b;
},gt:function(a,b){
return a>b;
},ge:function(a,b){
return a>=b;
},lt:function(a,b){
return al){
_93=l;
}
}
_91=[];
for(i=0;i<_93;i++){
var _95=[];
for(var j=1;j=0;i--){
_b2=[_ae[i].apply(this,_b2)];
}
return _b2[0];
};
},bind:function(_b4,_b5){
if(typeof (_b4)=="string"){
_b4=_b5[_b4];
}
var _b6=_b4.im_func;
var _b7=_b4.im_preargs;
var _b8=_b4.im_self;
var m=MochiKit.Base;
if(typeof (_b4)=="function"&&typeof (_b4.apply)=="undefined"){
_b4=m._wrapDumbFunction(_b4);
}
if(typeof (_b6)!="function"){
_b6=_b4;
}
if(typeof (_b5)!="undefined"){
_b8=_b5;
}
if(typeof (_b7)=="undefined"){
_b7=[];
}else{
_b7=_b7.slice();
}
m.extend(_b7,arguments,2);
var _ba=function(){
var _bb=arguments;
var me=arguments.callee;
if(me.im_preargs.length>0){
_bb=m.concat(me.im_preargs,_bb);
}
var _bd=me.im_self;
if(!_bd){
_bd=this;
}
return me.im_func.apply(_bd,_bb);
};
_ba.im_self=_b8;
_ba.im_func=_b6;
_ba.im_preargs=_b7;
return _ba;
},bindLate:function(_be,_bf){
var m=MochiKit.Base;
if(typeof (_be)!="string"){
return m.bind.apply(this,arguments);
}
var _c1=m.extend([],arguments,2);
var _c2=function(){
var _c3=arguments;
var me=arguments.callee;
if(me.im_preargs.length>0){
_c3=m.concat(me.im_preargs,_c3);
}
var _c5=me.im_self;
if(!_c5){
_c5=this;
}
return _c5[me.im_func].apply(_c5,_c3);
};
_c2.im_self=_bf;
_c2.im_func=_be;
_c2.im_preargs=_c1;
return _c2;
},bindMethods:function(_c6){
var _c7=MochiKit.Base.bind;
for(var k in _c6){
var _c9=_c6[k];
if(typeof (_c9)=="function"){
_c6[k]=_c7(_c9,_c6);
}
}
},registerComparator:function(_ca,_cb,_cc,_cd){
MochiKit.Base.comparatorRegistry.register(_ca,_cb,_cc,_cd);
},_primitives:{"boolean":true,"string":true,"number":true},compare:function(a,b){
if(a==b){
return 0;
}
var _d0=(typeof (a)=="undefined"||a===null);
var _d1=(typeof (b)=="undefined"||b===null);
if(_d0&&_d1){
return 0;
}else{
if(_d0){
return -1;
}else{
if(_d1){
return 1;
}
}
}
var m=MochiKit.Base;
var _d3=m._primitives;
if(!(typeof (a) in _d3&&typeof (b) in _d3)){
try{
return m.comparatorRegistry.match(a,b);
}
catch(e){
if(e!=m.NotFound){
throw e;
}
}
}
if(ab){
return 1;
}
}
var _d4=m.repr;
throw new TypeError(_d4(a)+" and "+_d4(b)+" can not be compared");
},compareDateLike:function(a,b){
return MochiKit.Base.compare(a.getTime(),b.getTime());
},compareArrayLike:function(a,b){
var _d9=MochiKit.Base.compare;
var _da=a.length;
var _db=0;
if(_da>b.length){
_db=1;
_da=b.length;
}else{
if(_da=0;i--){
sum+=o[i];
}
}else{
sum+=o;
}
}
if(_121<=0){
throw new TypeError("mean() requires at least one argument");
}
return sum/_121;
},median:function(){
var data=MochiKit.Base.flattenArguments(arguments);
if(data.length===0){
throw new TypeError("median() requires at least one argument");
}
data.sort(compare);
if(data.length%2==0){
var _125=data.length/2;
return (data[_125]+data[_125-1])/2;
}else{
return data[(data.length-1)/2];
}
},findValue:function(lst,_127,_128,end){
if(typeof (end)=="undefined"||end===null){
end=lst.length;
}
if(typeof (_128)=="undefined"||_128===null){
_128=0;
}
var cmp=MochiKit.Base.compare;
for(var i=_128;i0))){
var kv=MochiKit.DOM.formContents(_135);
_135=kv[0];
_136=kv[1];
}else{
if(arguments.length==1){
if(typeof (_135.length)=="number"&&_135.length==2){
return arguments.callee(_135[0],_135[1]);
}
var o=_135;
_135=[];
_136=[];
for(var k in o){
var v=o[k];
if(typeof (v)=="function"){
continue;
}else{
if(MochiKit.Base.isArrayLike(v)){
for(var i=0;i=stop){
throw self.StopIteration;
}
_183+=step;
return rval;
}};
},imap:function(fun,p,q){
var m=MochiKit.Base;
var self=MochiKit.Iter;
var _18d=m.map(self.iter,m.extend(null,arguments,1));
var map=m.map;
var next=self.next;
return {repr:function(){
return "imap(...)";
},toString:m.forwardCall("repr"),next:function(){
return fun.apply(this,map(next,_18d));
}};
},applymap:function(fun,seq,self){
seq=MochiKit.Iter.iter(seq);
var m=MochiKit.Base;
return {repr:function(){
return "applymap(...)";
},toString:m.forwardCall("repr"),next:function(){
return fun.apply(self,seq.next());
}};
},chain:function(p,q){
var self=MochiKit.Iter;
var m=MochiKit.Base;
if(arguments.length==1){
return self.iter(arguments[0]);
}
var _198=m.map(self.iter,arguments);
return {repr:function(){
return "chain(...)";
},toString:m.forwardCall("repr"),next:function(){
while(_198.length>1){
try{
var _199=_198[0].next();
return _199;
}
catch(e){
if(e!=self.StopIteration){
throw e;
}
_198.shift();
var _199=_198[0].next();
return _199;
}
}
if(_198.length==1){
var arg=_198.shift();
this.next=m.bind("next",arg);
return this.next();
}
throw self.StopIteration;
}};
},takewhile:function(pred,seq){
var self=MochiKit.Iter;
seq=self.iter(seq);
return {repr:function(){
return "takewhile(...)";
},toString:MochiKit.Base.forwardCall("repr"),next:function(){
var rval=seq.next();
if(!pred(rval)){
this.next=function(){
throw self.StopIteration;
};
this.next();
}
return rval;
}};
},dropwhile:function(pred,seq){
seq=MochiKit.Iter.iter(seq);
var m=MochiKit.Base;
var bind=m.bind;
return {"repr":function(){
return "dropwhile(...)";
},"toString":m.forwardCall("repr"),"next":function(){
while(true){
var rval=seq.next();
if(!pred(rval)){
break;
}
}
this.next=bind("next",seq);
return rval;
}};
},_tee:function(_1a4,sync,_1a6){
sync.pos[_1a4]=-1;
var m=MochiKit.Base;
var _1a8=m.listMin;
return {repr:function(){
return "tee("+_1a4+", ...)";
},toString:m.forwardCall("repr"),next:function(){
var rval;
var i=sync.pos[_1a4];
if(i==sync.max){
rval=_1a6.next();
sync.deque.push(rval);
sync.max+=1;
sync.pos[_1a4]+=1;
}else{
rval=sync.deque[i-sync.min];
sync.pos[_1a4]+=1;
if(i==sync.min&&_1a8(sync.pos)!=sync.min){
sync.min+=1;
sync.deque.shift();
}
}
return rval;
}};
},tee:function(_1ab,n){
var rval=[];
var sync={"pos":[],"deque":[],"max":-1,"min":-1};
if(arguments.length==1||typeof (n)=="undefined"||n===null){
n=2;
}
var self=MochiKit.Iter;
_1ab=self.iter(_1ab);
var _tee=self._tee;
for(var i=0;i0&&_1bd>=stop)||(step<0&&_1bd<=stop)){
throw MochiKit.Iter.StopIteration;
}
var rval=_1bd;
_1bd+=step;
return rval;
},repr:function(){
return "range("+[_1bd,stop,step].join(", ")+")";
},toString:MochiKit.Base.forwardCall("repr")};
},sum:function(_1c1,_1c2){
if(typeof (_1c2)=="undefined"||_1c2===null){
_1c2=0;
}
var x=_1c2;
var self=MochiKit.Iter;
_1c1=self.iter(_1c1);
try{
while(true){
x+=_1c1.next();
}
}
catch(e){
if(e!=self.StopIteration){
throw e;
}
}
return x;
},exhaust:function(_1c5){
var self=MochiKit.Iter;
_1c5=self.iter(_1c5);
try{
while(true){
_1c5.next();
}
}
catch(e){
if(e!=self.StopIteration){
throw e;
}
}
},forEach:function(_1c7,func,obj){
var m=MochiKit.Base;
var self=MochiKit.Iter;
if(arguments.length>2){
func=m.bind(func,obj);
}
if(m.isArrayLike(_1c7)&&!self.isIterable(_1c7)){
try{
for(var i=0;i<_1c7.length;i++){
func(_1c7[i]);
}
}
catch(e){
if(e!=self.StopIteration){
throw e;
}
}
}else{
self.exhaust(self.imap(func,_1c7));
}
},every:function(_1cd,func){
var self=MochiKit.Iter;
try{
self.ifilterfalse(func,_1cd).next();
return false;
}
catch(e){
if(e!=self.StopIteration){
throw e;
}
return true;
}
},sorted:function(_1d0,cmp){
var rval=MochiKit.Iter.list(_1d0);
if(arguments.length==1){
cmp=MochiKit.Base.compare;
}
rval.sort(cmp);
return rval;
},reversed:function(_1d3){
var rval=MochiKit.Iter.list(_1d3);
rval.reverse();
return rval;
},some:function(_1d5,func){
var self=MochiKit.Iter;
try{
self.ifilter(func,_1d5).next();
return true;
}
catch(e){
if(e!=self.StopIteration){
throw e;
}
return false;
}
},iextend:function(lst,_1d9){
var m=MochiKit.Base;
var self=MochiKit.Iter;
if(m.isArrayLike(_1d9)&&!self.isIterable(_1d9)){
for(var i=0;i<_1d9.length;i++){
lst.push(_1d9[i]);
}
}else{
_1d9=self.iter(_1d9);
try{
while(true){
lst.push(_1d9.next());
}
}
catch(e){
if(e!=self.StopIteration){
throw e;
}
}
}
return lst;
},groupby:function(_1dd,_1de){
var m=MochiKit.Base;
var self=MochiKit.Iter;
if(arguments.length<2){
_1de=m.operator.identity;
}
_1dd=self.iter(_1dd);
var pk=undefined;
var k=undefined;
var v;
function fetch(){
v=_1dd.next();
k=_1de(v);
}
function eat(){
var ret=v;
v=undefined;
return ret;
}
var _1e5=true;
var _1e6=m.compare;
return {repr:function(){
return "groupby(...)";
},next:function(){
while(_1e6(k,pk)===0){
fetch();
if(_1e5){
_1e5=false;
break;
}
}
pk=k;
return [k,{next:function(){
if(v==undefined){
fetch();
}
if(_1e6(k,pk)!==0){
throw self.StopIteration;
}
return eat();
}}];
}};
},groupby_as_array:function(_1e7,_1e8){
var m=MochiKit.Base;
var self=MochiKit.Iter;
if(arguments.length<2){
_1e8=m.operator.identity;
}
_1e7=self.iter(_1e7);
var _1eb=[];
var _1ec=true;
var _1ed;
var _1ee=m.compare;
while(true){
try{
var _1ef=_1e7.next();
var key=_1e8(_1ef);
}
catch(e){
if(e==self.StopIteration){
break;
}
throw e;
}
if(_1ec||_1ee(key,_1ed)!==0){
var _1f1=[];
_1eb.push([key,_1f1]);
}
_1f1.push(_1ef);
_1ec=false;
_1ed=key;
}
return _1eb;
},arrayLikeIter:function(_1f2){
var i=0;
return {repr:function(){
return "arrayLikeIter(...)";
},toString:MochiKit.Base.forwardCall("repr"),next:function(){
if(i>=_1f2.length){
throw MochiKit.Iter.StopIteration;
}
return _1f2[i++];
}};
},hasIterateNext:function(_1f4){
return (_1f4&&typeof (_1f4.iterateNext)=="function");
},iterateNextIter:function(_1f5){
return {repr:function(){
return "iterateNextIter(...)";
},toString:MochiKit.Base.forwardCall("repr"),next:function(){
var rval=_1f5.iterateNext();
if(rval===null||rval===undefined){
throw MochiKit.Iter.StopIteration;
}
return rval;
}};
}});
MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter"];
MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"];
MochiKit.Iter.__new__=function(){
var m=MochiKit.Base;
if(typeof (StopIteration)!="undefined"){
this.StopIteration=StopIteration;
}else{
this.StopIteration=new m.NamedError("StopIteration");
}
this.iteratorRegistry=new m.AdapterRegistry();
this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter);
this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter);
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
m.nameFunctions(this);
};
MochiKit.Iter.__new__();
if(MochiKit.__export__){
reduce=MochiKit.Iter.reduce;
}
MochiKit.Base._exportSymbols(this,MochiKit.Iter);
MochiKit.Base._deps("Logging",["Base"]);
MochiKit.Logging.NAME="MochiKit.Logging";
MochiKit.Logging.VERSION="1.4.2";
MochiKit.Logging.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Logging.toString=function(){
return this.__repr__();
};
MochiKit.Logging.EXPORT=["LogLevel","LogMessage","Logger","alertListener","logger","log","logError","logDebug","logFatal","logWarning"];
MochiKit.Logging.EXPORT_OK=["logLevelAtLeast","isLogMessage","compareLogMessage"];
MochiKit.Logging.LogMessage=function(num,_1f9,info){
this.num=num;
this.level=_1f9;
this.info=info;
this.timestamp=new Date();
};
MochiKit.Logging.LogMessage.prototype={repr:function(){
var m=MochiKit.Base;
return "LogMessage("+m.map(m.repr,[this.num,this.level,this.info]).join(", ")+")";
},toString:MochiKit.Base.forwardCall("repr")};
MochiKit.Base.update(MochiKit.Logging,{logLevelAtLeast:function(_1fc){
var self=MochiKit.Logging;
if(typeof (_1fc)=="string"){
_1fc=self.LogLevel[_1fc];
}
return function(msg){
var _1ff=msg.level;
if(typeof (_1ff)=="string"){
_1ff=self.LogLevel[_1ff];
}
return _1ff>=_1fc;
};
},isLogMessage:function(){
var _200=MochiKit.Logging.LogMessage;
for(var i=0;i=MochiKit.Logging.LogLevel.FATAL){
_20f="FATAL";
}else{
if(_20f>=MochiKit.Logging.LogLevel.ERROR){
_20f="ERROR";
}else{
if(_20f>=MochiKit.Logging.LogLevel.WARNING){
_20f="WARNING";
}else{
if(_20f>=MochiKit.Logging.LogLevel.INFO){
_20f="INFO";
}else{
_20f="DEBUG";
}
}
}
}
}
var msg=new MochiKit.Logging.LogMessage(this.counter,_20f,MochiKit.Base.extend(null,arguments,1));
this._messages.push(msg);
this.dispatchListeners(msg);
if(this.useNativeConsole){
this.logToConsole(msg.level+": "+msg.info.join(" "));
}
this.counter+=1;
while(this.maxSize>=0&&this._messages.length>this.maxSize){
this._messages.shift();
}
},getMessages:function(_212){
var _213=0;
if(!(typeof (_212)=="undefined"||_212===null)){
_213=Math.max(0,this._messages.length-_212);
}
return this._messages.slice(_213);
},getMessageText:function(_214){
if(typeof (_214)=="undefined"||_214===null){
_214=30;
}
var _215=this.getMessages(_214);
if(_215.length){
var lst=map(function(m){
return "\n ["+m.num+"] "+m.level+": "+m.info.join(" ");
},_215);
lst.unshift("LAST "+_215.length+" MESSAGES:");
return lst.join("");
}
return "";
},debuggingBookmarklet:function(_218){
if(typeof (MochiKit.LoggingPane)=="undefined"){
alert(this.getMessageText());
}else{
MochiKit.LoggingPane.createLoggingPane(_218||false);
}
}};
MochiKit.Logging.__new__=function(){
this.LogLevel={ERROR:40,FATAL:50,WARNING:30,INFO:20,DEBUG:10};
var m=MochiKit.Base;
m.registerComparator("LogMessage",this.isLogMessage,this.compareLogMessage);
var _21a=m.partial;
var _21b=this.Logger;
var _21c=_21b.prototype.baseLog;
m.update(this.Logger.prototype,{debug:_21a(_21c,"DEBUG"),log:_21a(_21c,"INFO"),error:_21a(_21c,"ERROR"),fatal:_21a(_21c,"FATAL"),warning:_21a(_21c,"WARNING")});
var self=this;
var _21e=function(name){
return function(){
self.logger[name].apply(self.logger,arguments);
};
};
this.log=_21e("log");
this.logError=_21e("error");
this.logDebug=_21e("debug");
this.logFatal=_21e("fatal");
this.logWarning=_21e("warning");
this.logger=new _21b();
this.logger.useNativeConsole=true;
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
m.nameFunctions(this);
};
if(typeof (printfire)=="undefined"&&typeof (document)!="undefined"&&document.createEvent&&typeof (dispatchEvent)!="undefined"){
printfire=function(){
printfire.args=arguments;
var ev=document.createEvent("Events");
ev.initEvent("printfire",false,true);
dispatchEvent(ev);
};
}
MochiKit.Logging.__new__();
MochiKit.Base._exportSymbols(this,MochiKit.Logging);
MochiKit.Base._deps("DateTime",["Base"]);
MochiKit.DateTime.NAME="MochiKit.DateTime";
MochiKit.DateTime.VERSION="1.4.2";
MochiKit.DateTime.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.DateTime.toString=function(){
return this.__repr__();
};
MochiKit.DateTime.isoDate=function(str){
str=str+"";
if(typeof (str)!="string"||str.length===0){
return null;
}
var iso=str.split("-");
if(iso.length===0){
return null;
}
var date=new Date(iso[0],iso[1]-1,iso[2]);
date.setFullYear(iso[0]);
date.setMonth(iso[1]-1);
date.setDate(iso[2]);
return date;
};
MochiKit.DateTime._isoRegexp=/(\d{4,})(?:-(\d{1,2})(?:-(\d{1,2})(?:[T ](\d{1,2}):(\d{1,2})(?::(\d{1,2})(?:\.(\d+))?)?(?:(Z)|([+-])(\d{1,2})(?::(\d{1,2}))?)?)?)?)?/;
MochiKit.DateTime.isoTimestamp=function(str){
str=str+"";
if(typeof (str)!="string"||str.length===0){
return null;
}
var res=str.match(MochiKit.DateTime._isoRegexp);
if(typeof (res)=="undefined"||res===null){
return null;
}
var year,_227,day,hour,min,sec,msec;
year=parseInt(res[1],10);
if(typeof (res[2])=="undefined"||res[2]===""){
return new Date(year);
}
_227=parseInt(res[2],10)-1;
day=parseInt(res[3],10);
if(typeof (res[4])=="undefined"||res[4]===""){
return new Date(year,_227,day);
}
hour=parseInt(res[4],10);
min=parseInt(res[5],10);
sec=(typeof (res[6])!="undefined"&&res[6]!=="")?parseInt(res[6],10):0;
if(typeof (res[7])!="undefined"&&res[7]!==""){
msec=Math.round(1000*parseFloat("0."+res[7]));
}else{
msec=0;
}
if((typeof (res[8])=="undefined"||res[8]==="")&&(typeof (res[9])=="undefined"||res[9]==="")){
return new Date(year,_227,day,hour,min,sec,msec);
}
var ofs;
if(typeof (res[9])!="undefined"&&res[9]!==""){
ofs=parseInt(res[10],10)*3600000;
if(typeof (res[11])!="undefined"&&res[11]!==""){
ofs+=parseInt(res[11],10)*60000;
}
if(res[9]=="-"){
ofs=-ofs;
}
}else{
ofs=0;
}
return new Date(Date.UTC(year,_227,day,hour,min,sec,msec)-ofs);
};
MochiKit.DateTime.toISOTime=function(date,_22f){
if(typeof (date)=="undefined"||date===null){
return null;
}
var hh=date.getHours();
var mm=date.getMinutes();
var ss=date.getSeconds();
var lst=[((_22f&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)];
return lst.join(":");
};
MochiKit.DateTime.toISOTimestamp=function(date,_235){
if(typeof (date)=="undefined"||date===null){
return null;
}
var sep=_235?"T":" ";
var foot=_235?"Z":"";
if(_235){
date=new Date(date.getTime()+(date.getTimezoneOffset()*60000));
}
return MochiKit.DateTime.toISODate(date)+sep+MochiKit.DateTime.toISOTime(date,_235)+foot;
};
MochiKit.DateTime.toISODate=function(date){
if(typeof (date)=="undefined"||date===null){
return null;
}
var _239=MochiKit.DateTime._padTwo;
var _23a=MochiKit.DateTime._padFour;
return [_23a(date.getFullYear()),_239(date.getMonth()+1),_239(date.getDate())].join("-");
};
MochiKit.DateTime.americanDate=function(d){
d=d+"";
if(typeof (d)!="string"||d.length===0){
return null;
}
var a=d.split("/");
return new Date(a[2],a[0]-1,a[1]);
};
MochiKit.DateTime._padTwo=function(n){
return (n>9)?n:"0"+n;
};
MochiKit.DateTime._padFour=function(n){
switch(n.toString().length){
case 1:
return "000"+n;
break;
case 2:
return "00"+n;
break;
case 3:
return "0"+n;
break;
case 4:
default:
return n;
}
};
MochiKit.DateTime.toPaddedAmericanDate=function(d){
if(typeof (d)=="undefined"||d===null){
return null;
}
var _240=MochiKit.DateTime._padTwo;
return [_240(d.getMonth()+1),_240(d.getDate()),d.getFullYear()].join("/");
};
MochiKit.DateTime.toAmericanDate=function(d){
if(typeof (d)=="undefined"||d===null){
return null;
}
return [d.getMonth()+1,d.getDate(),d.getFullYear()].join("/");
};
MochiKit.DateTime.EXPORT=["isoDate","isoTimestamp","toISOTime","toISOTimestamp","toISODate","americanDate","toPaddedAmericanDate","toAmericanDate"];
MochiKit.DateTime.EXPORT_OK=[];
MochiKit.DateTime.EXPORT_TAGS={":common":MochiKit.DateTime.EXPORT,":all":MochiKit.DateTime.EXPORT};
MochiKit.DateTime.__new__=function(){
var base=this.NAME+".";
for(var k in this){
var o=this[k];
if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
try{
o.NAME=base+k;
}
catch(e){
}
}
}
};
MochiKit.DateTime.__new__();
if(typeof (MochiKit.Base)!="undefined"){
MochiKit.Base._exportSymbols(this,MochiKit.DateTime);
}else{
(function(_245,_246){
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(MochiKit.__export__===false)){
var all=_246.EXPORT_TAGS[":all"];
for(var i=0;i_250){
var i=_258.length-_250;
res=fmt.separator+_258.substring(i,_258.length)+res;
_258=_258.substring(0,i);
}
}
res=_258+res;
if(_24e>0){
while(frac.length<_251){
frac=frac+"0";
}
res=res+fmt.decimal+frac;
}
return _253+res+_254;
};
};
MochiKit.Format.numberFormatter=function(_25c,_25d,_25e){
if(typeof (_25d)=="undefined"){
_25d="";
}
var _25f=_25c.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/);
if(!_25f){
throw TypeError("Invalid pattern");
}
var _260=_25c.substr(0,_25f.index);
var _261=_25c.substr(_25f.index+_25f[0].length);
if(_260.search(/-/)==-1){
_260=_260+"-";
}
var _262=_25f[1];
var frac=(typeof (_25f[2])=="string"&&_25f[2]!="")?_25f[2]:"";
var _264=(typeof (_25f[3])=="string"&&_25f[3]!="");
var tmp=_262.split(/,/);
var _266;
if(typeof (_25e)=="undefined"){
_25e="default";
}
if(tmp.length==1){
_266=null;
}else{
_266=tmp[1].length;
}
var _267=_262.length-_262.replace(/0/g,"").length;
var _268=frac.length-frac.replace(/0/g,"").length;
var _269=frac.length;
var rval=MochiKit.Format._numberFormatter(_25d,_260,_261,_25e,_264,_269,_267,_266,_268);
var m=MochiKit.Base;
if(m){
var fn=arguments.callee;
var args=m.concat(arguments);
rval.repr=function(){
return [self.NAME,"(",map(m.repr,args).join(", "),")"].join("");
};
}
return rval;
};
MochiKit.Format.formatLocale=function(_26e){
if(typeof (_26e)=="undefined"||_26e===null){
_26e="default";
}
if(typeof (_26e)=="string"){
var rval=MochiKit.Format.LOCALE[_26e];
if(typeof (rval)=="string"){
rval=arguments.callee(rval);
MochiKit.Format.LOCALE[_26e]=rval;
}
return rval;
}else{
return _26e;
}
};
MochiKit.Format.twoDigitAverage=function(_270,_271){
if(_271){
var res=_270/_271;
if(!isNaN(res)){
return MochiKit.Format.twoDigitFloat(res);
}
}
return "0";
};
MochiKit.Format.twoDigitFloat=function(_273){
var res=roundToFixed(_273,2);
if(res.indexOf(".00")>0){
return res.substring(0,res.length-3);
}else{
if(res.charAt(res.length-1)=="0"){
return res.substring(0,res.length-1);
}else{
return res;
}
}
};
MochiKit.Format.lstrip=function(str,_276){
str=str+"";
if(typeof (str)!="string"){
return null;
}
if(!_276){
return str.replace(/^\s+/,"");
}else{
return str.replace(new RegExp("^["+_276+"]+"),"");
}
};
MochiKit.Format.rstrip=function(str,_278){
str=str+"";
if(typeof (str)!="string"){
return null;
}
if(!_278){
return str.replace(/\s+$/,"");
}else{
return str.replace(new RegExp("["+_278+"]+$"),"");
}
};
MochiKit.Format.strip=function(str,_27a){
var self=MochiKit.Format;
return self.rstrip(self.lstrip(str,_27a),_27a);
};
MochiKit.Format.truncToFixed=function(_27c,_27d){
var res=Math.floor(_27c).toFixed(0);
if(_27c<0){
res=Math.ceil(_27c).toFixed(0);
if(res.charAt(0)!="-"&&_27d>0){
res="-"+res;
}
}
if(res.indexOf("e")<0&&_27d>0){
var tail=_27c.toString();
if(tail.indexOf("e")>0){
tail=".";
}else{
if(tail.indexOf(".")<0){
tail=".";
}else{
tail=tail.substring(tail.indexOf("."));
}
}
if(tail.length-1>_27d){
tail=tail.substring(0,_27d+1);
}
while(tail.length-1<_27d){
tail+="0";
}
res+=tail;
}
return res;
};
MochiKit.Format.roundToFixed=function(_280,_281){
var _282=Math.abs(_280)+0.5*Math.pow(10,-_281);
var res=MochiKit.Format.truncToFixed(_282,_281);
if(_280<0){
res="-"+res;
}
return res;
};
MochiKit.Format.percentFormat=function(_284){
return MochiKit.Format.twoDigitFloat(100*_284)+"%";
};
MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"];
MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},pt_BR:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"};
MochiKit.Format.EXPORT_OK=[];
MochiKit.Format.EXPORT_TAGS={":all":MochiKit.Format.EXPORT,":common":MochiKit.Format.EXPORT};
MochiKit.Format.__new__=function(){
var base=this.NAME+".";
var k,v,o;
for(k in this.LOCALE){
o=this.LOCALE[k];
if(typeof (o)=="object"){
o.repr=function(){
return this.NAME;
};
o.NAME=base+"LOCALE."+k;
}
}
for(k in this){
o=this[k];
if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
try{
o.NAME=base+k;
}
catch(e){
}
}
}
};
MochiKit.Format.__new__();
if(typeof (MochiKit.Base)!="undefined"){
MochiKit.Base._exportSymbols(this,MochiKit.Format);
}else{
(function(_289,_28a){
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(MochiKit.__export__===false)){
var all=_28a.EXPORT_TAGS[":all"];
for(var i=0;i1){
fn=MochiKit.Base.partial.apply(null,arguments);
}
return this.addCallbacks(fn,fn);
},addCallback:function(fn){
if(arguments.length>1){
fn=MochiKit.Base.partial.apply(null,arguments);
}
return this.addCallbacks(fn,null);
},addErrback:function(fn){
if(arguments.length>1){
fn=MochiKit.Base.partial.apply(null,arguments);
}
return this.addCallbacks(null,fn);
},addCallbacks:function(cb,eb){
if(this.chained){
throw new Error("Chained Deferreds can not be re-used");
}
this.chain.push([cb,eb]);
if(this.fired>=0){
this._fire();
}
return this;
},_fire:function(){
var _299=this.chain;
var _29a=this.fired;
var res=this.results[_29a];
var self=this;
var cb=null;
while(_299.length>0&&this.paused===0){
var pair=_299.shift();
var f=pair[_29a];
if(f===null){
continue;
}
try{
res=f(res);
_29a=((res instanceof Error)?1:0);
if(res instanceof MochiKit.Async.Deferred){
cb=function(res){
self._resback(res);
self.paused--;
if((self.paused===0)&&(self.fired>=0)){
self._fire();
}
};
this.paused++;
}
}
catch(err){
_29a=1;
if(!(err instanceof Error)){
err=new MochiKit.Async.GenericError(err);
}
res=err;
}
}
this.fired=_29a;
this.results[_29a]=res;
if(cb&&this.paused){
res.addBoth(cb);
res.chained=true;
}
}};
MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(req){
return MochiKit.Base.evalJSON(req.responseText);
},succeed:function(_2a2){
var d=new MochiKit.Async.Deferred();
d.callback.apply(d,arguments);
return d;
},fail:function(_2a4){
var d=new MochiKit.Async.Deferred();
d.errback.apply(d,arguments);
return d;
},getXMLHttpRequest:function(){
var self=arguments.callee;
if(!self.XMLHttpRequest){
var _2a7=[function(){
return new XMLHttpRequest();
},function(){
return new ActiveXObject("Msxml2.XMLHTTP");
},function(){
return new ActiveXObject("Microsoft.XMLHTTP");
},function(){
return new ActiveXObject("Msxml2.XMLHTTP.4.0");
},function(){
throw new MochiKit.Async.BrowserComplianceError("Browser does not support XMLHttpRequest");
}];
for(var i=0;i<_2a7.length;i++){
var func=_2a7[i];
try{
self.XMLHttpRequest=func;
return func();
}
catch(e){
}
}
}
return self.XMLHttpRequest();
},_xhr_onreadystatechange:function(d){
var m=MochiKit.Base;
if(this.readyState==4){
try{
this.onreadystatechange=null;
}
catch(e){
try{
this.onreadystatechange=m.noop;
}
catch(e){
}
}
var _2ac=null;
try{
_2ac=this.status;
if(!_2ac&&m.isNotEmpty(this.responseText)){
_2ac=304;
}
}
catch(e){
}
if(_2ac==200||_2ac==201||_2ac==204||_2ac==304||_2ac==1223){
d.callback(this);
}else{
var err=new MochiKit.Async.XMLHttpRequestError(this,"Request failed");
if(err.number){
d.errback(err);
}else{
d.errback(err);
}
}
}
},_xhr_canceller:function(req){
try{
req.onreadystatechange=null;
}
catch(e){
try{
req.onreadystatechange=MochiKit.Base.noop;
}
catch(e){
}
}
req.abort();
},sendXMLHttpRequest:function(req,_2b0){
if(typeof (_2b0)=="undefined"||_2b0===null){
_2b0="";
}
var m=MochiKit.Base;
var self=MochiKit.Async;
var d=new self.Deferred(m.partial(self._xhr_canceller,req));
try{
req.onreadystatechange=m.bind(self._xhr_onreadystatechange,req,d);
req.send(_2b0);
}
catch(e){
try{
req.onreadystatechange=null;
}
catch(ignore){
}
d.errback(e);
}
return d;
},doXHR:function(url,opts){
var self=MochiKit.Async;
return self.callLater(0,self._doXHR,url,opts);
},_doXHR:function(url,opts){
var m=MochiKit.Base;
opts=m.update({method:"GET",sendContent:""},opts);
var self=MochiKit.Async;
var req=self.getXMLHttpRequest();
if(opts.queryString){
var qs=m.queryString(opts.queryString);
if(qs){
url+="?"+qs;
}
}
if("username" in opts){
req.open(opts.method,url,true,opts.username,opts.password);
}else{
req.open(opts.method,url,true);
}
if(req.overrideMimeType&&opts.mimeType){
req.overrideMimeType(opts.mimeType);
}
req.setRequestHeader("X-Requested-With","XMLHttpRequest");
if(opts.headers){
var _2bd=opts.headers;
if(!m.isArrayLike(_2bd)){
_2bd=m.items(_2bd);
}
for(var i=0;i<_2bd.length;i++){
var _2bf=_2bd[i];
var name=_2bf[0];
var _2c1=_2bf[1];
req.setRequestHeader(name,_2c1);
}
}
return self.sendXMLHttpRequest(req,opts.sendContent);
},_buildURL:function(url){
if(arguments.length>1){
var m=MochiKit.Base;
var qs=m.queryString.apply(null,m.extend(null,arguments,1));
if(qs){
return url+"?"+qs;
}
}
return url;
},doSimpleXMLHttpRequest:function(url){
var self=MochiKit.Async;
url=self._buildURL.apply(self,arguments);
return self.doXHR(url);
},loadJSONDoc:function(url){
var self=MochiKit.Async;
url=self._buildURL.apply(self,arguments);
var d=self.doXHR(url,{"mimeType":"text/plain","headers":[["Accept","application/json"]]});
d=d.addCallback(self.evalJSONRequest);
return d;
},wait:function(_2ca,_2cb){
var d=new MochiKit.Async.Deferred();
var m=MochiKit.Base;
if(typeof (_2cb)!="undefined"){
d.addCallback(function(){
return _2cb;
});
}
var _2ce=setTimeout(m.bind("callback",d),Math.floor(_2ca*1000));
d.canceller=function(){
try{
clearTimeout(_2ce);
}
catch(e){
}
};
return d;
},callLater:function(_2cf,func){
var m=MochiKit.Base;
var _2d2=m.partial.apply(m,m.extend(null,arguments,1));
return MochiKit.Async.wait(_2cf).addCallback(function(res){
return _2d2();
});
}});
MochiKit.Async.DeferredLock=function(){
this.waiting=[];
this.locked=false;
this.id=this._nextId();
};
MochiKit.Async.DeferredLock.prototype={__class__:MochiKit.Async.DeferredLock,acquire:function(){
var d=new MochiKit.Async.Deferred();
if(this.locked){
this.waiting.push(d);
}else{
this.locked=true;
d.callback(this);
}
return d;
},release:function(){
if(!this.locked){
throw TypeError("Tried to release an unlocked DeferredLock");
}
this.locked=false;
if(this.waiting.length>0){
this.locked=true;
this.waiting.shift().callback(this);
}
},_nextId:MochiKit.Base.counter(),repr:function(){
var _2d5;
if(this.locked){
_2d5="locked, "+this.waiting.length+" waiting";
}else{
_2d5="unlocked";
}
return "DeferredLock("+this.id+", "+_2d5+")";
},toString:MochiKit.Base.forwardCall("repr")};
MochiKit.Async.DeferredList=function(list,_2d7,_2d8,_2d9,_2da){
MochiKit.Async.Deferred.apply(this,[_2da]);
this.list=list;
var _2db=[];
this.resultList=_2db;
this.finishedCount=0;
this.fireOnOneCallback=_2d7;
this.fireOnOneErrback=_2d8;
this.consumeErrors=_2d9;
var cb=MochiKit.Base.bind(this._cbDeferred,this);
for(var i=0;i=0){
var opt=elem.options[elem.selectedIndex];
var v=opt.value;
if(!v){
var h=opt.outerHTML;
if(h&&!h.match(/^[^>]+\svalue\s*=/i)){
v=opt.text;
}
}
_2fa.push(name);
_2fb.push(v);
return null;
}
_2fa.push(name);
_2fb.push("");
return null;
}else{
var opts=elem.options;
if(!opts.length){
_2fa.push(name);
_2fb.push("");
return null;
}
for(var i=0;i]+\svalue\s*=/i)){
v=opt.text;
}
}
_2fa.push(name);
_2fb.push(v);
}
return null;
}
}
if(_300==="FORM"||_300==="P"||_300==="SPAN"||_300==="DIV"){
return elem.childNodes;
}
_2fa.push(name);
_2fb.push(elem.value||"");
return null;
}
return elem.childNodes;
});
return [_2fa,_2fb];
},withDocument:function(doc,func){
var self=MochiKit.DOM;
var _309=self._document;
var rval;
try{
self._document=doc;
rval=func();
}
catch(e){
self._document=_309;
throw e;
}
self._document=_309;
return rval;
},registerDOMConverter:function(name,_30c,wrap,_30e){
MochiKit.DOM.domConverters.register(name,_30c,wrap,_30e);
},coerceToDOM:function(node,ctx){
var m=MochiKit.Base;
var im=MochiKit.Iter;
var self=MochiKit.DOM;
if(im){
var iter=im.iter;
var _315=im.repeat;
}
var map=m.map;
var _317=self.domConverters;
var _318=arguments.callee;
var _319=m.NotFound;
while(true){
if(typeof (node)=="undefined"||node===null){
return null;
}
if(typeof (node)=="function"&&typeof (node.length)=="number"&&!(node instanceof Function)){
node=im?im.list(node):m.extend(null,node);
}
if(typeof (node.nodeType)!="undefined"&&node.nodeType>0){
return node;
}
if(typeof (node)=="number"||typeof (node)=="boolean"){
node=node.toString();
}
if(typeof (node)=="string"){
return self._document.createTextNode(node);
}
if(typeof (node.__dom__)=="function"){
node=node.__dom__(ctx);
continue;
}
if(typeof (node.dom)=="function"){
node=node.dom(ctx);
continue;
}
if(typeof (node)=="function"){
node=node.apply(ctx,[ctx]);
continue;
}
if(im){
var _31a=null;
try{
_31a=iter(node);
}
catch(e){
}
if(_31a){
return map(_318,_31a,_315(ctx));
}
}else{
if(m.isArrayLike(node)){
var func=function(n){
return _318(n,ctx);
};
return map(func,node);
}
}
try{
node=_317.match(node,ctx);
continue;
}
catch(e){
if(e!=_319){
throw e;
}
}
return self._document.createTextNode(node.toString());
}
return undefined;
},isChildNode:function(node,_31e){
var self=MochiKit.DOM;
if(typeof (node)=="string"){
node=self.getElement(node);
}
if(typeof (_31e)=="string"){
_31e=self.getElement(_31e);
}
if(typeof (node)=="undefined"||node===null){
return false;
}
while(node!=null&&node!==self._document){
if(node===_31e){
return true;
}
node=node.parentNode;
}
return false;
},setNodeAttribute:function(node,attr,_322){
var o={};
o[attr]=_322;
try{
return MochiKit.DOM.updateNodeAttributes(node,o);
}
catch(e){
}
return null;
},getNodeAttribute:function(node,attr){
var self=MochiKit.DOM;
var _327=self.attributeArray.renames[attr];
var _328=self.attributeArray.ignoreAttr[attr];
node=self.getElement(node);
try{
if(_327){
return node[_327];
}
var _329=node.getAttribute(attr);
if(_329!=_328){
return _329;
}
}
catch(e){
}
return null;
},removeNodeAttribute:function(node,attr){
var self=MochiKit.DOM;
var _32d=self.attributeArray.renames[attr];
node=self.getElement(node);
try{
if(_32d){
return node[_32d];
}
return node.removeAttribute(attr);
}
catch(e){
}
return null;
},updateNodeAttributes:function(node,_32f){
var elem=node;
var self=MochiKit.DOM;
if(typeof (node)=="string"){
elem=self.getElement(node);
}
if(_32f){
var _332=MochiKit.Base.updatetree;
if(self.attributeArray.compliant){
for(var k in _32f){
var v=_32f[k];
if(typeof (v)=="object"&&typeof (elem[k])=="object"){
if(k=="style"&&MochiKit.Style){
MochiKit.Style.setStyle(elem,v);
}else{
_332(elem[k],v);
}
}else{
if(k.substring(0,2)=="on"){
if(typeof (v)=="string"){
v=new Function(v);
}
elem[k]=v;
}else{
elem.setAttribute(k,v);
}
}
if(typeof (elem[k])=="string"&&elem[k]!=v){
elem[k]=v;
}
}
}else{
var _335=self.attributeArray.renames;
for(var k in _32f){
v=_32f[k];
var _336=_335[k];
if(k=="style"&&typeof (v)=="string"){
elem.style.cssText=v;
}else{
if(typeof (_336)=="string"){
elem[_336]=v;
}else{
if(typeof (elem[k])=="object"&&typeof (v)=="object"){
if(k=="style"&&MochiKit.Style){
MochiKit.Style.setStyle(elem,v);
}else{
_332(elem[k],v);
}
}else{
if(k.substring(0,2)=="on"){
if(typeof (v)=="string"){
v=new Function(v);
}
elem[k]=v;
}else{
elem.setAttribute(k,v);
}
}
}
}
if(typeof (elem[k])=="string"&&elem[k]!=v){
elem[k]=v;
}
}
}
}
return elem;
},appendChildNodes:function(node){
var elem=node;
var self=MochiKit.DOM;
if(typeof (node)=="string"){
elem=self.getElement(node);
}
var _33a=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
var _33b=MochiKit.Base.concat;
while(_33a.length){
var n=_33a.shift();
if(typeof (n)=="undefined"||n===null){
}else{
if(typeof (n.nodeType)=="number"){
elem.appendChild(n);
}else{
_33a=_33b(n,_33a);
}
}
}
return elem;
},insertSiblingNodesBefore:function(node){
var elem=node;
var self=MochiKit.DOM;
if(typeof (node)=="string"){
elem=self.getElement(node);
}
var _340=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
var _341=elem.parentNode;
var _342=MochiKit.Base.concat;
while(_340.length){
var n=_340.shift();
if(typeof (n)=="undefined"||n===null){
}else{
if(typeof (n.nodeType)=="number"){
_341.insertBefore(n,elem);
}else{
_340=_342(n,_340);
}
}
}
return _341;
},insertSiblingNodesAfter:function(node){
var elem=node;
var self=MochiKit.DOM;
if(typeof (node)=="string"){
elem=self.getElement(node);
}
var _347=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
if(elem.nextSibling){
return self.insertSiblingNodesBefore(elem.nextSibling,_347);
}else{
return self.appendChildNodes(elem.parentNode,_347);
}
},replaceChildNodes:function(node){
var elem=node;
var self=MochiKit.DOM;
if(typeof (node)=="string"){
elem=self.getElement(node);
arguments[0]=elem;
}
var _34b;
while((_34b=elem.firstChild)){
elem.removeChild(_34b);
}
if(arguments.length<2){
return elem;
}else{
return self.appendChildNodes.apply(this,arguments);
}
},createDOM:function(name,_34d){
var elem;
var self=MochiKit.DOM;
var m=MochiKit.Base;
if(typeof (_34d)=="string"||typeof (_34d)=="number"){
var args=m.extend([name,null],arguments,1);
return arguments.callee.apply(this,args);
}
if(typeof (name)=="string"){
var _352=self._xhtml;
if(_34d&&!self.attributeArray.compliant){
var _353="";
if("name" in _34d){
_353+=" name=\""+self.escapeHTML(_34d.name)+"\"";
}
if(name=="input"&&"type" in _34d){
_353+=" type=\""+self.escapeHTML(_34d.type)+"\"";
}
if(_353){
name="<"+name+_353+">";
_352=false;
}
}
var d=self._document;
if(_352&&d===document){
elem=d.createElementNS("http://www.w3.org/1999/xhtml",name);
}else{
elem=d.createElement(name);
}
}else{
elem=name;
}
if(_34d){
self.updateNodeAttributes(elem,_34d);
}
if(arguments.length<=2){
return elem;
}else{
var args=m.extend([elem],arguments,2);
return self.appendChildNodes.apply(this,args);
}
},createDOMFunc:function(){
var m=MochiKit.Base;
return m.partial.apply(this,m.extend([MochiKit.DOM.createDOM],arguments));
},removeElement:function(elem){
var self=MochiKit.DOM;
var e=self.coerceToDOM(self.getElement(elem));
e.parentNode.removeChild(e);
return e;
},swapDOM:function(dest,src){
var self=MochiKit.DOM;
dest=self.getElement(dest);
var _35c=dest.parentNode;
if(src){
src=self.coerceToDOM(self.getElement(src),_35c);
_35c.replaceChild(src,dest);
}else{
_35c.removeChild(dest);
}
return src;
},getElement:function(id){
var self=MochiKit.DOM;
if(arguments.length==1){
return ((typeof (id)=="string")?self._document.getElementById(id):id);
}else{
return MochiKit.Base.map(self.getElement,arguments);
}
},getElementsByTagAndClassName:function(_35f,_360,_361){
var self=MochiKit.DOM;
if(typeof (_35f)=="undefined"||_35f===null){
_35f="*";
}
if(typeof (_361)=="undefined"||_361===null){
_361=self._document;
}
_361=self.getElement(_361);
if(_361==null){
return [];
}
var _363=(_361.getElementsByTagName(_35f)||self._document.all);
if(typeof (_360)=="undefined"||_360===null){
return MochiKit.Base.extend(null,_363);
}
var _364=[];
for(var i=0;i<_363.length;i++){
var _366=_363[i];
var cls=_366.className;
if(typeof (cls)!="string"){
cls=_366.getAttribute("class");
}
if(typeof (cls)=="string"){
var _368=cls.split(" ");
for(var j=0;j<_368.length;j++){
if(_368[j]==_360){
_364.push(_366);
break;
}
}
}
}
return _364;
},_newCallStack:function(path,once){
var rval=function(){
var _36d=arguments.callee.callStack;
for(var i=0;i<_36d.length;i++){
if(_36d[i].apply(this,arguments)===false){
break;
}
}
if(once){
try{
this[path]=null;
}
catch(e){
}
}
};
rval.callStack=[];
return rval;
},addToCallStack:function(_36f,path,func,once){
var self=MochiKit.DOM;
var _374=_36f[path];
var _375=_374;
if(!(typeof (_374)=="function"&&typeof (_374.callStack)=="object"&&_374.callStack!==null)){
_375=self._newCallStack(path,once);
if(typeof (_374)=="function"){
_375.callStack.push(_374);
}
_36f[path]=_375;
}
_375.callStack.push(func);
},addLoadEvent:function(func){
var self=MochiKit.DOM;
self.addToCallStack(self._window,"onload",func,true);
},focusOnLoad:function(_378){
var self=MochiKit.DOM;
self.addLoadEvent(function(){
_378=self.getElement(_378);
if(_378){
_378.focus();
}
});
},setElementClass:function(_37a,_37b){
var self=MochiKit.DOM;
var obj=self.getElement(_37a);
if(self.attributeArray.compliant){
obj.setAttribute("class",_37b);
}else{
obj.setAttribute("className",_37b);
}
},toggleElementClass:function(_37e){
var self=MochiKit.DOM;
for(var i=1;i/g,">");
},toHTML:function(dom){
return MochiKit.DOM.emitHTML(dom).join("");
},emitHTML:function(dom,lst){
if(typeof (lst)=="undefined"||lst===null){
lst=[];
}
var _3a1=[dom];
var self=MochiKit.DOM;
var _3a3=self.escapeHTML;
var _3a4=self.attributeArray;
while(_3a1.length){
dom=_3a1.pop();
if(typeof (dom)=="string"){
lst.push(dom);
}else{
if(dom.nodeType==1){
lst.push("<"+dom.tagName.toLowerCase());
var _3a5=[];
var _3a6=_3a4(dom);
for(var i=0;i<_3a6.length;i++){
var a=_3a6[i];
_3a5.push([" ",a.name,"=\"",_3a3(a.value),"\""]);
}
_3a5.sort();
for(i=0;i<_3a5.length;i++){
var _3a9=_3a5[i];
for(var j=0;j<_3a9.length;j++){
lst.push(_3a9[j]);
}
}
if(dom.hasChildNodes()){
lst.push(">");
_3a1.push(""+dom.tagName.toLowerCase()+">");
var _3ab=dom.childNodes;
for(i=_3ab.length-1;i>=0;i--){
_3a1.push(_3ab[i]);
}
}else{
lst.push("/>");
}
}else{
if(dom.nodeType==3){
lst.push(_3a3(dom.nodeValue));
}
}
}
}
return lst;
},scrapeText:function(node,_3ad){
var rval=[];
(function(node){
var cn=node.childNodes;
if(cn){
for(var i=0;i0){
var _3ca=m.filter;
_3c9=function(node){
return _3ca(_3c9.ignoreAttrFilter,node.attributes);
};
_3c9.ignoreAttr={};
var _3cc=_3c8.attributes;
var _3cd=_3c9.ignoreAttr;
for(var i=0;i<_3cc.length;i++){
var a=_3cc[i];
_3cd[a.name]=a.value;
}
_3c9.ignoreAttrFilter=function(a){
return (_3c9.ignoreAttr[a.name]!=a.value);
};
_3c9.compliant=false;
_3c9.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"};
}else{
_3c9=function(node){
return node.attributes;
};
_3c9.compliant=true;
_3c9.ignoreAttr={};
_3c9.renames={};
}
this.attributeArray=_3c9;
var _3d2=function(_3d3,arr){
var _3d5=arr[0];
var _3d6=arr[1];
var _3d7=_3d6.split(".")[1];
var str="";
str+="if (!MochiKit."+_3d7+") { throw new Error(\"";
str+="This function has been deprecated and depends on MochiKit.";
str+=_3d7+".\");}";
str+="return "+_3d6+".apply(this, arguments);";
MochiKit[_3d3][_3d5]=new Function(str);
};
for(var i=0;i0){
abort(repr(expr));
}
},buildMatchExpression:function(){
var repr=MochiKit.Base.repr;
var _3e4=this.params;
var _3e5=[];
var _3e6,i;
function childElements(_3e8){
return "MochiKit.Base.filter(function (node) { return node.nodeType == 1; }, "+_3e8+".childNodes)";
}
if(_3e4.wildcard){
_3e5.push("true");
}
if(_3e6=_3e4.id){
_3e5.push("element.id == "+repr(_3e6));
}
if(_3e6=_3e4.tagName){
_3e5.push("element.tagName.toUpperCase() == "+repr(_3e6));
}
if((_3e6=_3e4.classNames).length>0){
for(i=0;i<_3e6.length;i++){
_3e5.push("MochiKit.DOM.hasElementClass(element, "+repr(_3e6[i])+")");
}
}
if((_3e6=_3e4.pseudoClassNames).length>0){
for(i=0;i<_3e6.length;i++){
var _3e9=_3e6[i].match(/^([^(]+)(?:\((.*)\))?$/);
var _3ea=_3e9[1];
var _3eb=_3e9[2];
switch(_3ea){
case "root":
_3e5.push("element.nodeType == 9 || element === element.ownerDocument.documentElement");
break;
case "nth-child":
case "nth-last-child":
case "nth-of-type":
case "nth-last-of-type":
_3e9=_3eb.match(/^((?:(\d+)n\+)?(\d+)|odd|even)$/);
if(!_3e9){
throw "Invalid argument to pseudo element nth-child: "+_3eb;
}
var a,b;
if(_3e9[0]=="odd"){
a=2;
b=1;
}else{
if(_3e9[0]=="even"){
a=2;
b=0;
}else{
a=_3e9[2]&&parseInt(_3e9)||null;
b=parseInt(_3e9[3]);
}
}
_3e5.push("this.nthChild(element,"+a+","+b+","+!!_3ea.match("^nth-last")+","+!!_3ea.match("of-type$")+")");
break;
case "first-child":
_3e5.push("this.nthChild(element, null, 1)");
break;
case "last-child":
_3e5.push("this.nthChild(element, null, 1, true)");
break;
case "first-of-type":
_3e5.push("this.nthChild(element, null, 1, false, true)");
break;
case "last-of-type":
_3e5.push("this.nthChild(element, null, 1, true, true)");
break;
case "only-child":
_3e5.push(childElements("element.parentNode")+".length == 1");
break;
case "only-of-type":
_3e5.push("MochiKit.Base.filter(function (node) { return node.tagName == element.tagName; }, "+childElements("element.parentNode")+").length == 1");
break;
case "empty":
_3e5.push("element.childNodes.length == 0");
break;
case "enabled":
_3e5.push("(this.isUIElement(element) && element.disabled === false)");
break;
case "disabled":
_3e5.push("(this.isUIElement(element) && element.disabled === true)");
break;
case "checked":
_3e5.push("(this.isUIElement(element) && element.checked === true)");
break;
case "not":
var _3ee=new MochiKit.Selector.Selector(_3eb);
_3e5.push("!( "+_3ee.buildMatchExpression()+")");
break;
}
}
}
if(_3e6=_3e4.attributes){
MochiKit.Base.map(function(_3ef){
var _3f0="MochiKit.DOM.getNodeAttribute(element, "+repr(_3ef.name)+")";
var _3f1=function(_3f2){
return _3f0+".split("+repr(_3f2)+")";
};
_3e5.push(_3f0+" != null");
switch(_3ef.operator){
case "=":
_3e5.push(_3f0+" == "+repr(_3ef.value));
break;
case "~=":
_3e5.push("MochiKit.Base.findValue("+_3f1(" ")+", "+repr(_3ef.value)+") > -1");
break;
case "^=":
_3e5.push(_3f0+".substring(0, "+_3ef.value.length+") == "+repr(_3ef.value));
break;
case "$=":
_3e5.push(_3f0+".substring("+_3f0+".length - "+_3ef.value.length+") == "+repr(_3ef.value));
break;
case "*=":
_3e5.push(_3f0+".match("+repr(_3ef.value)+")");
break;
case "|=":
_3e5.push(_3f1("-")+"[0].toUpperCase() == "+repr(_3ef.value.toUpperCase()));
break;
case "!=":
_3e5.push(_3f0+" != "+repr(_3ef.value));
break;
case "":
case undefined:
break;
default:
throw "Unknown operator "+_3ef.operator+" in selector";
}
},_3e6);
}
return _3e5.join(" && ");
},compileMatcher:function(){
var code="return (!element.tagName) ? false : "+this.buildMatchExpression()+";";
this.match=new Function("element",code);
},nthChild:function(_3f4,a,b,_3f7,_3f8){
var _3f9=MochiKit.Base.filter(function(node){
return node.nodeType==1;
},_3f4.parentNode.childNodes);
if(_3f8){
_3f9=MochiKit.Base.filter(function(node){
return node.tagName==_3f4.tagName;
},_3f9);
}
if(_3f7){
_3f9=MochiKit.Iter.reversed(_3f9);
}
if(a){
var _3fc=MochiKit.Base.findIdentical(_3f9,_3f4);
return ((_3fc+1-b)/a)%1==0;
}else{
return b==MochiKit.Base.findIdentical(_3f9,_3f4)+1;
}
},isUIElement:function(_3fd){
return MochiKit.Base.findValue(["input","button","select","option","textarea","object"],_3fd.tagName.toLowerCase())>-1;
},findElements:function(_3fe,axis){
var _400;
if(axis==undefined){
axis="";
}
function inScope(_401,_402){
if(axis==""){
return MochiKit.DOM.isChildNode(_401,_402);
}else{
if(axis==">"){
return _401.parentNode===_402;
}else{
if(axis=="+"){
return _401===nextSiblingElement(_402);
}else{
if(axis=="~"){
var _403=_402;
while(_403=nextSiblingElement(_403)){
if(_401===_403){
return true;
}
}
return false;
}else{
throw "Invalid axis: "+axis;
}
}
}
}
}
if(_400=MochiKit.DOM.getElement(this.params.id)){
if(this.match(_400)){
if(!_3fe||inScope(_400,_3fe)){
return [_400];
}
}
}
function nextSiblingElement(node){
node=node.nextSibling;
while(node&&node.nodeType!=1){
node=node.nextSibling;
}
return node;
}
if(axis==""){
_3fe=(_3fe||MochiKit.DOM.currentDocument()).getElementsByTagName(this.params.tagName||"*");
}else{
if(axis==">"){
if(!_3fe){
throw "> combinator not allowed without preceeding expression";
}
_3fe=MochiKit.Base.filter(function(node){
return node.nodeType==1;
},_3fe.childNodes);
}else{
if(axis=="+"){
if(!_3fe){
throw "+ combinator not allowed without preceeding expression";
}
_3fe=nextSiblingElement(_3fe)&&[nextSiblingElement(_3fe)];
}else{
if(axis=="~"){
if(!_3fe){
throw "~ combinator not allowed without preceeding expression";
}
var _406=[];
while(nextSiblingElement(_3fe)){
_3fe=nextSiblingElement(_3fe);
_406.push(_3fe);
}
_3fe=_406;
}
}
}
}
if(!_3fe){
return [];
}
var _407=MochiKit.Base.filter(MochiKit.Base.bind(function(_408){
return this.match(_408);
},this),_3fe);
return _407;
},repr:function(){
return "Selector("+this.expression+")";
},toString:MochiKit.Base.forwardCall("repr")};
MochiKit.Base.update(MochiKit.Selector,{findChildElements:function(_409,_40a){
var uniq=function(arr){
var res=[];
for(var i=0;i+~]$/)){
_410=match[0];
return _412;
}else{
var _414=new MochiKit.Selector.Selector(expr);
var _415=MochiKit.Iter.reduce(function(_416,_417){
return MochiKit.Base.extend(_416,_414.findElements(_417||_409,_410));
},_412,[]);
_410="";
return _415;
}
};
var _418=_40f.replace(/(^\s+|\s+$)/g,"").split(/\s+/);
return uniq(MochiKit.Iter.reduce(_411,_418,[null]));
},_40a));
},findDocElements:function(){
return MochiKit.Selector.findChildElements(MochiKit.DOM.currentDocument(),arguments);
},__new__:function(){
var m=MochiKit.Base;
this.$$=this.findDocElements;
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
m.nameFunctions(this);
}});
MochiKit.Selector.__new__();
MochiKit.Base._exportSymbols(this,MochiKit.Selector);
MochiKit.Base._deps("Style",["Base","DOM"]);
MochiKit.Style.NAME="MochiKit.Style";
MochiKit.Style.VERSION="1.4.2";
MochiKit.Style.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Style.toString=function(){
return this.__repr__();
};
MochiKit.Style.EXPORT_OK=[];
MochiKit.Style.EXPORT=["setStyle","setOpacity","getStyle","getElementDimensions","elementDimensions","setElementDimensions","getElementPosition","elementPosition","setElementPosition","makePositioned","undoPositioned","makeClipping","undoClipping","setDisplayForElement","hideElement","showElement","getViewportDimensions","getViewportPosition","Dimensions","Coordinates"];
MochiKit.Style.Dimensions=function(w,h){
this.w=w;
this.h=h;
};
MochiKit.Style.Dimensions.prototype.__repr__=function(){
var repr=MochiKit.Base.repr;
return "{w: "+repr(this.w)+", h: "+repr(this.h)+"}";
};
MochiKit.Style.Dimensions.prototype.toString=function(){
return this.__repr__();
};
MochiKit.Style.Coordinates=function(x,y){
this.x=x;
this.y=y;
};
MochiKit.Style.Coordinates.prototype.__repr__=function(){
var repr=MochiKit.Base.repr;
return "{x: "+repr(this.x)+", y: "+repr(this.y)+"}";
};
MochiKit.Style.Coordinates.prototype.toString=function(){
return this.__repr__();
};
MochiKit.Base.update(MochiKit.Style,{getStyle:function(elem,_421){
var dom=MochiKit.DOM;
var d=dom._document;
elem=dom.getElement(elem);
_421=MochiKit.Base.camelize(_421);
if(!elem||elem==d){
return undefined;
}
if(_421=="opacity"&&typeof (elem.filters)!="undefined"){
var _424=(MochiKit.Style.getStyle(elem,"filter")||"").match(/alpha\(opacity=(.*)\)/);
if(_424&&_424[1]){
return parseFloat(_424[1])/100;
}
return 1;
}
if(_421=="float"||_421=="cssFloat"||_421=="styleFloat"){
if(elem.style["float"]){
return elem.style["float"];
}else{
if(elem.style.cssFloat){
return elem.style.cssFloat;
}else{
if(elem.style.styleFloat){
return elem.style.styleFloat;
}else{
return "none";
}
}
}
}
var _425=elem.style?elem.style[_421]:null;
if(!_425){
if(d.defaultView&&d.defaultView.getComputedStyle){
var css=d.defaultView.getComputedStyle(elem,null);
_421=_421.replace(/([A-Z])/g,"-$1").toLowerCase();
_425=css?css.getPropertyValue(_421):null;
}else{
if(elem.currentStyle){
_425=elem.currentStyle[_421];
if(/^\d/.test(_425)&&!/px$/.test(_425)&&_421!="fontWeight"){
var left=elem.style.left;
var _428=elem.runtimeStyle.left;
elem.runtimeStyle.left=elem.currentStyle.left;
elem.style.left=_425||0;
_425=elem.style.pixelLeft+"px";
elem.style.left=left;
elem.runtimeStyle.left=_428;
}
}
}
}
if(_421=="opacity"){
_425=parseFloat(_425);
}
if(/Opera/.test(navigator.userAgent)&&(MochiKit.Base.findValue(["left","top","right","bottom"],_421)!=-1)){
if(MochiKit.Style.getStyle(elem,"position")=="static"){
_425="auto";
}
}
return _425=="auto"?null:_425;
},setStyle:function(elem,_42a){
elem=MochiKit.DOM.getElement(elem);
for(var name in _42a){
switch(name){
case "opacity":
MochiKit.Style.setOpacity(elem,_42a[name]);
break;
case "float":
case "cssFloat":
case "styleFloat":
if(typeof (elem.style["float"])!="undefined"){
elem.style["float"]=_42a[name];
}else{
if(typeof (elem.style.cssFloat)!="undefined"){
elem.style.cssFloat=_42a[name];
}else{
elem.style.styleFloat=_42a[name];
}
}
break;
default:
elem.style[MochiKit.Base.camelize(name)]=_42a[name];
}
}
},setOpacity:function(elem,o){
elem=MochiKit.DOM.getElement(elem);
var self=MochiKit.Style;
if(o==1){
var _42f=/Gecko/.test(navigator.userAgent)&&!(/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent));
elem.style["opacity"]=_42f?0.999999:1;
if(/MSIE/.test(navigator.userAgent)){
elem.style["filter"]=self.getStyle(elem,"filter").replace(/alpha\([^\)]*\)/gi,"");
}
}else{
if(o<0.00001){
o=0;
}
elem.style["opacity"]=o;
if(/MSIE/.test(navigator.userAgent)){
elem.style["filter"]=self.getStyle(elem,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+o*100+")";
}
}
},getElementPosition:function(elem,_431){
var self=MochiKit.Style;
var dom=MochiKit.DOM;
elem=dom.getElement(elem);
if(!elem||(!(elem.x&&elem.y)&&(!elem.parentNode===null||self.getStyle(elem,"display")=="none"))){
return undefined;
}
var c=new self.Coordinates(0,0);
var box=null;
var _436=null;
var d=MochiKit.DOM._document;
var de=d.documentElement;
var b=d.body;
if(!elem.parentNode&&elem.x&&elem.y){
c.x+=elem.x||0;
c.y+=elem.y||0;
}else{
if(elem.getBoundingClientRect){
box=elem.getBoundingClientRect();
c.x+=box.left+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||0);
c.y+=box.top+(de.scrollTop||b.scrollTop)-(de.clientTop||0);
}else{
if(elem.offsetParent){
c.x+=elem.offsetLeft;
c.y+=elem.offsetTop;
_436=elem.offsetParent;
if(_436!=elem){
while(_436){
c.x+=parseInt(_436.style.borderLeftWidth)||0;
c.y+=parseInt(_436.style.borderTopWidth)||0;
c.x+=_436.offsetLeft;
c.y+=_436.offsetTop;
_436=_436.offsetParent;
}
}
var ua=navigator.userAgent.toLowerCase();
if((typeof (opera)!="undefined"&&parseFloat(opera.version())<9)||(ua.indexOf("AppleWebKit")!=-1&&self.getStyle(elem,"position")=="absolute")){
c.x-=b.offsetLeft;
c.y-=b.offsetTop;
}
if(elem.parentNode){
_436=elem.parentNode;
}else{
_436=null;
}
while(_436){
var _43b=_436.tagName.toUpperCase();
if(_43b==="BODY"||_43b==="HTML"){
break;
}
var disp=self.getStyle(_436,"display");
if(disp.search(/^inline|table-row.*$/i)){
c.x-=_436.scrollLeft;
c.y-=_436.scrollTop;
}
if(_436.parentNode){
_436=_436.parentNode;
}else{
_436=null;
}
}
}
}
}
if(typeof (_431)!="undefined"){
_431=arguments.callee(_431);
if(_431){
c.x-=(_431.x||0);
c.y-=(_431.y||0);
}
}
return c;
},setElementPosition:function(elem,_43e,_43f){
elem=MochiKit.DOM.getElement(elem);
if(typeof (_43f)=="undefined"){
_43f="px";
}
var _440={};
var _441=MochiKit.Base.isUndefinedOrNull;
if(!_441(_43e.x)){
_440["left"]=_43e.x+_43f;
}
if(!_441(_43e.y)){
_440["top"]=_43e.y+_43f;
}
MochiKit.DOM.updateNodeAttributes(elem,{"style":_440});
},makePositioned:function(_442){
_442=MochiKit.DOM.getElement(_442);
var pos=MochiKit.Style.getStyle(_442,"position");
if(pos=="static"||!pos){
_442.style.position="relative";
if(/Opera/.test(navigator.userAgent)){
_442.style.top=0;
_442.style.left=0;
}
}
},undoPositioned:function(_444){
_444=MochiKit.DOM.getElement(_444);
if(_444.style.position=="relative"){
_444.style.position=_444.style.top=_444.style.left=_444.style.bottom=_444.style.right="";
}
},makeClipping:function(_445){
_445=MochiKit.DOM.getElement(_445);
var s=_445.style;
var _447={"overflow":s.overflow,"overflow-x":s.overflowX,"overflow-y":s.overflowY};
if((MochiKit.Style.getStyle(_445,"overflow")||"visible")!="hidden"){
_445.style.overflow="hidden";
_445.style.overflowX="hidden";
_445.style.overflowY="hidden";
}
return _447;
},undoClipping:function(_448,_449){
_448=MochiKit.DOM.getElement(_448);
if(typeof (_449)=="string"){
_448.style.overflow=_449;
}else{
if(_449!=null){
_448.style.overflow=_449["overflow"];
_448.style.overflowX=_449["overflow-x"];
_448.style.overflowY=_449["overflow-y"];
}
}
},getElementDimensions:function(elem,_44b){
var self=MochiKit.Style;
var dom=MochiKit.DOM;
if(typeof (elem.w)=="number"||typeof (elem.h)=="number"){
return new self.Dimensions(elem.w||0,elem.h||0);
}
elem=dom.getElement(elem);
if(!elem){
return undefined;
}
var disp=self.getStyle(elem,"display");
if(disp=="none"||disp==""||typeof (disp)=="undefined"){
var s=elem.style;
var _450=s.visibility;
var _451=s.position;
var _452=s.display;
s.visibility="hidden";
s.position="absolute";
s.display=self._getDefaultDisplay(elem);
var _453=elem.offsetWidth;
var _454=elem.offsetHeight;
s.display=_452;
s.position=_451;
s.visibility=_450;
}else{
_453=elem.offsetWidth||0;
_454=elem.offsetHeight||0;
}
if(_44b){
var _455="colSpan" in elem&&"rowSpan" in elem;
var _456=(_455&&elem.parentNode&&self.getStyle(elem.parentNode,"borderCollapse")=="collapse");
if(_456){
if(/MSIE/.test(navigator.userAgent)){
var _457=elem.previousSibling?0.5:1;
var _458=elem.nextSibling?0.5:1;
}else{
var _457=0.5;
var _458=0.5;
}
}else{
var _457=1;
var _458=1;
}
_453-=Math.round((parseFloat(self.getStyle(elem,"paddingLeft"))||0)+(parseFloat(self.getStyle(elem,"paddingRight"))||0)+_457*(parseFloat(self.getStyle(elem,"borderLeftWidth"))||0)+_458*(parseFloat(self.getStyle(elem,"borderRightWidth"))||0));
if(_455){
if(/Gecko|Opera/.test(navigator.userAgent)&&!/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent)){
var _459=0;
}else{
if(/MSIE/.test(navigator.userAgent)){
var _459=1;
}else{
var _459=_456?0.5:1;
}
}
}else{
var _459=1;
}
_454-=Math.round((parseFloat(self.getStyle(elem,"paddingTop"))||0)+(parseFloat(self.getStyle(elem,"paddingBottom"))||0)+_459*((parseFloat(self.getStyle(elem,"borderTopWidth"))||0)+(parseFloat(self.getStyle(elem,"borderBottomWidth"))||0)));
}
return new self.Dimensions(_453,_454);
},setElementDimensions:function(elem,_45b,_45c){
elem=MochiKit.DOM.getElement(elem);
if(typeof (_45c)=="undefined"){
_45c="px";
}
var _45d={};
var _45e=MochiKit.Base.isUndefinedOrNull;
if(!_45e(_45b.w)){
_45d["width"]=_45b.w+_45c;
}
if(!_45e(_45b.h)){
_45d["height"]=_45b.h+_45c;
}
MochiKit.DOM.updateNodeAttributes(elem,{"style":_45d});
},_getDefaultDisplay:function(elem){
var self=MochiKit.Style;
var dom=MochiKit.DOM;
elem=dom.getElement(elem);
if(!elem){
return undefined;
}
var _462=elem.tagName.toUpperCase();
return self._defaultDisplay[_462]||"block";
},setDisplayForElement:function(_463,_464){
var _465=MochiKit.Base.extend(null,arguments,1);
var _466=MochiKit.DOM.getElement;
for(var i=0;i<_465.length;i++){
_464=_466(_465[i]);
if(_464){
_464.style.display=_463;
}
}
},getViewportDimensions:function(){
var d=new MochiKit.Style.Dimensions();
var w=MochiKit.DOM._window;
var b=MochiKit.DOM._document.body;
if(w.innerWidth){
d.w=w.innerWidth;
d.h=w.innerHeight;
}else{
if(b&&b.parentElement&&b.parentElement.clientWidth){
d.w=b.parentElement.clientWidth;
d.h=b.parentElement.clientHeight;
}else{
if(b&&b.clientWidth){
d.w=b.clientWidth;
d.h=b.clientHeight;
}
}
}
return d;
},getViewportPosition:function(){
var c=new MochiKit.Style.Coordinates(0,0);
var d=MochiKit.DOM._document;
var de=d.documentElement;
var db=d.body;
if(de&&(de.scrollTop||de.scrollLeft)){
c.x=de.scrollLeft;
c.y=de.scrollTop;
}else{
if(db){
c.x=db.scrollLeft;
c.y=db.scrollTop;
}
}
return c;
},__new__:function(){
var m=MochiKit.Base;
var _470=["A","ABBR","ACRONYM","B","BASEFONT","BDO","BIG","BR","CITE","CODE","DFN","EM","FONT","I","IMG","KBD","LABEL","Q","S","SAMP","SMALL","SPAN","STRIKE","STRONG","SUB","SUP","TEXTAREA","TT","U","VAR"];
this._defaultDisplay={"TABLE":"table","THEAD":"table-header-group","TBODY":"table-row-group","TFOOT":"table-footer-group","COLGROUP":"table-column-group","COL":"table-column","TR":"table-row","TD":"table-cell","TH":"table-cell","CAPTION":"table-caption","LI":"list-item","INPUT":"inline-block","SELECT":"inline-block"};
if(/MSIE/.test(navigator.userAgent)){
for(var k in this._defaultDisplay){
var v=this._defaultDisplay[k];
if(v.indexOf("table")==0){
this._defaultDisplay[k]="block";
}
}
}
for(var i=0;i<_470.length;i++){
this._defaultDisplay[_470[i]]="inline";
}
this.elementPosition=this.getElementPosition;
this.elementDimensions=this.getElementDimensions;
this.hideElement=m.partial(this.setDisplayForElement,"none");
this.showElement=m.partial(this.setDisplayForElement,"block");
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
m.nameFunctions(this);
}});
MochiKit.Style.__new__();
MochiKit.Base._exportSymbols(this,MochiKit.Style);
MochiKit.Base._deps("LoggingPane",["Base","Logging"]);
MochiKit.LoggingPane.NAME="MochiKit.LoggingPane";
MochiKit.LoggingPane.VERSION="1.4.2";
MochiKit.LoggingPane.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.LoggingPane.toString=function(){
return this.__repr__();
};
MochiKit.LoggingPane.createLoggingPane=function(_474){
var m=MochiKit.LoggingPane;
_474=!(!_474);
if(m._loggingPane&&m._loggingPane.inline!=_474){
m._loggingPane.closePane();
m._loggingPane=null;
}
if(!m._loggingPane||m._loggingPane.closed){
m._loggingPane=new m.LoggingPane(_474,MochiKit.Logging.logger);
}
return m._loggingPane;
};
MochiKit.LoggingPane.LoggingPane=function(_476,_477){
if(typeof (_477)=="undefined"||_477===null){
_477=MochiKit.Logging.logger;
}
this.logger=_477;
var _478=MochiKit.Base.update;
var _479=MochiKit.Base.updatetree;
var bind=MochiKit.Base.bind;
var _47b=MochiKit.Base.clone;
var win=window;
var uid="_MochiKit_LoggingPane";
if(typeof (MochiKit.DOM)!="undefined"){
win=MochiKit.DOM.currentWindow();
}
if(!_476){
var url=win.location.href.split("?")[0].replace(/[#:\/.><&%-]/g,"_");
var name=uid+"_"+url;
var nwin=win.open("",name,"dependent,resizable,height=200");
if(!nwin){
alert("Not able to open debugging window due to pop-up blocking.");
return undefined;
}
nwin.document.write(""+"[MochiKit.LoggingPane]"+"");
nwin.document.close();
nwin.document.title+=" "+win.document.title;
win=nwin;
}
var doc=win.document;
this.doc=doc;
var _482=doc.getElementById(uid);
var _483=!!_482;
if(_482&&typeof (_482.loggingPane)!="undefined"){
_482.loggingPane.logger=this.logger;
_482.loggingPane.buildAndApplyFilter();
return _482.loggingPane;
}
if(_483){
var _484;
while((_484=_482.firstChild)){
_482.removeChild(_484);
}
}else{
_482=doc.createElement("div");
_482.id=uid;
}
_482.loggingPane=this;
var _485=doc.createElement("input");
var _486=doc.createElement("input");
var _487=doc.createElement("button");
var _488=doc.createElement("button");
var _489=doc.createElement("button");
var _48a=doc.createElement("button");
var _48b=doc.createElement("div");
var _48c=doc.createElement("div");
var _48d=uid+"_Listener";
this.colorTable=_47b(this.colorTable);
var _48e=[];
var _48f=null;
var _490=function(msg){
var _492=msg.level;
if(typeof (_492)=="number"){
_492=MochiKit.Logging.LogLevel[_492];
}
return _492;
};
var _493=function(msg){
return msg.info.join(" ");
};
var _495=bind(function(msg){
var _497=_490(msg);
var text=_493(msg);
var c=this.colorTable[_497];
var p=doc.createElement("span");
p.className="MochiKit-LogMessage MochiKit-LogLevel-"+_497;
p.style.cssText="margin: 0px; white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; wrap-option: emergency; color: "+c;
p.appendChild(doc.createTextNode(_497+": "+text));
_48c.appendChild(p);
_48c.appendChild(doc.createElement("br"));
if(_48b.offsetHeight>_48b.scrollHeight){
_48b.scrollTop=0;
}else{
_48b.scrollTop=_48b.scrollHeight;
}
},this);
var _49b=function(msg){
_48e[_48e.length]=msg;
_495(msg);
};
var _49d=function(){
var _49e,_49f;
try{
_49e=new RegExp(_485.value);
_49f=new RegExp(_486.value);
}
catch(e){
logDebug("Error in filter regex: "+e.message);
return null;
}
return function(msg){
return (_49e.test(_490(msg))&&_49f.test(_493(msg)));
};
};
var _4a1=function(){
while(_48c.firstChild){
_48c.removeChild(_48c.firstChild);
}
};
var _4a2=function(){
_48e=[];
_4a1();
};
var _4a3=bind(function(){
if(this.closed){
return;
}
this.closed=true;
if(MochiKit.LoggingPane._loggingPane==this){
MochiKit.LoggingPane._loggingPane=null;
}
this.logger.removeListener(_48d);
try{
try{
_482.loggingPane=null;
}
catch(e){
logFatal("Bookmarklet was closed incorrectly.");
}
if(_476){
_482.parentNode.removeChild(_482);
}else{
this.win.close();
}
}
catch(e){
}
},this);
var _4a4=function(){
_4a1();
for(var i=0;i<_48e.length;i++){
var msg=_48e[i];
if(_48f===null||_48f(msg)){
_495(msg);
}
}
};
this.buildAndApplyFilter=function(){
_48f=_49d();
_4a4();
this.logger.removeListener(_48d);
this.logger.addListener(_48d,_48f,_49b);
};
var _4a7=bind(function(){
_48e=this.logger.getMessages();
_4a4();
},this);
var _4a8=bind(function(_4a9){
_4a9=_4a9||window.event;
key=_4a9.which||_4a9.keyCode;
if(key==13){
this.buildAndApplyFilter();
}
},this);
var _4aa="display: block; z-index: 1000; left: 0px; bottom: 0px; position: fixed; width: 100%; background-color: white; font: "+this.logFont;
if(_476){
_4aa+="; height: 10em; border-top: 2px solid black";
}else{
_4aa+="; height: 100%;";
}
_482.style.cssText=_4aa;
if(!_483){
doc.body.appendChild(_482);
}
_4aa={"cssText":"width: 33%; display: inline; font: "+this.logFont};
_479(_485,{"value":"FATAL|ERROR|WARNING|INFO|DEBUG","onkeypress":_4a8,"style":_4aa});
_482.appendChild(_485);
_479(_486,{"value":".*","onkeypress":_4a8,"style":_4aa});
_482.appendChild(_486);
_4aa="width: 8%; display:inline; font: "+this.logFont;
_487.appendChild(doc.createTextNode("Filter"));
_487.onclick=bind("buildAndApplyFilter",this);
_487.style.cssText=_4aa;
_482.appendChild(_487);
_488.appendChild(doc.createTextNode("Load"));
_488.onclick=_4a7;
_488.style.cssText=_4aa;
_482.appendChild(_488);
_489.appendChild(doc.createTextNode("Clear"));
_489.onclick=_4a2;
_489.style.cssText=_4aa;
_482.appendChild(_489);
_48a.appendChild(doc.createTextNode("Close"));
_48a.onclick=_4a3;
_48a.style.cssText=_4aa;
_482.appendChild(_48a);
_48b.style.cssText="overflow: auto; width: 100%";
_48c.style.cssText="width: 100%; height: "+(_476?"8em":"100%");
_48b.appendChild(_48c);
_482.appendChild(_48b);
this.buildAndApplyFilter();
_4a7();
if(_476){
this.win=undefined;
}else{
this.win=win;
}
this.inline=_476;
this.closePane=_4a3;
this.closed=false;
return this;
};
MochiKit.LoggingPane.LoggingPane.prototype={"logFont":"8pt Verdana,sans-serif","colorTable":{"ERROR":"red","FATAL":"darkred","WARNING":"blue","INFO":"black","DEBUG":"green"}};
MochiKit.LoggingPane.EXPORT_OK=["LoggingPane"];
MochiKit.LoggingPane.EXPORT=["createLoggingPane"];
MochiKit.LoggingPane.__new__=function(){
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
MochiKit.Base.nameFunctions(this);
MochiKit.LoggingPane._loggingPane=null;
};
MochiKit.LoggingPane.__new__();
MochiKit.Base._exportSymbols(this,MochiKit.LoggingPane);
MochiKit.Base._deps("Color",["Base","DOM","Style"]);
MochiKit.Color.NAME="MochiKit.Color";
MochiKit.Color.VERSION="1.4.2";
MochiKit.Color.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Color.toString=function(){
return this.__repr__();
};
MochiKit.Color.Color=function(red,_4ac,blue,_4ae){
if(typeof (_4ae)=="undefined"||_4ae===null){
_4ae=1;
}
this.rgb={r:red,g:_4ac,b:blue,a:_4ae};
};
MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_4af){
var rgb=this.rgb;
var m=MochiKit.Color;
return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_4af);
},colorWithHue:function(hue){
var hsl=this.asHSL();
hsl.h=hue;
var m=MochiKit.Color;
return m.Color.fromHSL(hsl);
},colorWithSaturation:function(_4b5){
var hsl=this.asHSL();
hsl.s=_4b5;
var m=MochiKit.Color;
return m.Color.fromHSL(hsl);
},colorWithLightness:function(_4b8){
var hsl=this.asHSL();
hsl.l=_4b8;
var m=MochiKit.Color;
return m.Color.fromHSL(hsl);
},darkerColorWithLevel:function(_4bb){
var hsl=this.asHSL();
hsl.l=Math.max(hsl.l-_4bb,0);
var m=MochiKit.Color;
return m.Color.fromHSL(hsl);
},lighterColorWithLevel:function(_4be){
var hsl=this.asHSL();
hsl.l=Math.min(hsl.l+_4be,1);
var m=MochiKit.Color;
return m.Color.fromHSL(hsl);
},blendedColor:function(_4c1,_4c2){
if(typeof (_4c2)=="undefined"||_4c2===null){
_4c2=0.5;
}
var sf=1-_4c2;
var s=this.rgb;
var d=_4c1.rgb;
var df=_4c2;
return MochiKit.Color.Color.fromRGB((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df));
},compareRGB:function(_4c7){
var a=this.asRGB();
var b=_4c7.asRGB();
return MochiKit.Base.compare([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a]);
},isLight:function(){
return this.asHSL().b>0.5;
},isDark:function(){
return (!this.isLight());
},toHSLString:function(){
var c=this.asHSL();
var ccc=MochiKit.Color.clampColorComponent;
var rval=this._hslString;
if(!rval){
var mid=(ccc(c.h,360).toFixed(0)+","+ccc(c.s,100).toPrecision(4)+"%"+","+ccc(c.l,100).toPrecision(4)+"%");
var a=c.a;
if(a>=1){
a=1;
rval="hsl("+mid+")";
}else{
if(a<=0){
a=0;
}
rval="hsla("+mid+","+a+")";
}
this._hslString=rval;
}
return rval;
},toRGBString:function(){
var c=this.rgb;
var ccc=MochiKit.Color.clampColorComponent;
var rval=this._rgbString;
if(!rval){
var mid=(ccc(c.r,255).toFixed(0)+","+ccc(c.g,255).toFixed(0)+","+ccc(c.b,255).toFixed(0));
if(c.a!=1){
rval="rgba("+mid+","+c.a+")";
}else{
rval="rgb("+mid+")";
}
this._rgbString=rval;
}
return rval;
},asRGB:function(){
return MochiKit.Base.clone(this.rgb);
},toHexString:function(){
var m=MochiKit.Color;
var c=this.rgb;
var ccc=MochiKit.Color.clampColorComponent;
var rval=this._hexString;
if(!rval){
rval=("#"+m.toColorPart(ccc(c.r,255))+m.toColorPart(ccc(c.g,255))+m.toColorPart(ccc(c.b,255)));
this._hexString=rval;
}
return rval;
},asHSV:function(){
var hsv=this.hsv;
var c=this.rgb;
if(typeof (hsv)=="undefined"||hsv===null){
hsv=MochiKit.Color.rgbToHSV(this.rgb);
this.hsv=hsv;
}
return MochiKit.Base.clone(hsv);
},asHSL:function(){
var hsl=this.hsl;
var c=this.rgb;
if(typeof (hsl)=="undefined"||hsl===null){
hsl=MochiKit.Color.rgbToHSL(this.rgb);
this.hsl=hsl;
}
return MochiKit.Base.clone(hsl);
},toString:function(){
return this.toRGBString();
},repr:function(){
var c=this.rgb;
var col=[c.r,c.g,c.b,c.a];
return this.__class__.NAME+"("+col.join(", ")+")";
}};
MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_4de,blue,_4e0){
var _4e1=MochiKit.Color.Color;
if(arguments.length==1){
var rgb=red;
red=rgb.r;
_4de=rgb.g;
blue=rgb.b;
if(typeof (rgb.a)=="undefined"){
_4e0=undefined;
}else{
_4e0=rgb.a;
}
}
return new _4e1(red,_4de,blue,_4e0);
},fromHSL:function(hue,_4e4,_4e5,_4e6){
var m=MochiKit.Color;
return m.Color.fromRGB(m.hslToRGB.apply(m,arguments));
},fromHSV:function(hue,_4e9,_4ea,_4eb){
var m=MochiKit.Color;
return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments));
},fromName:function(name){
var _4ee=MochiKit.Color.Color;
if(name.charAt(0)=="\""){
name=name.substr(1,name.length-2);
}
var _4ef=_4ee._namedColors[name.toLowerCase()];
if(typeof (_4ef)=="string"){
return _4ee.fromHexString(_4ef);
}else{
if(name=="transparent"){
return _4ee.transparentColor();
}
}
return null;
},fromString:function(_4f0){
var self=MochiKit.Color.Color;
var _4f2=_4f0.substr(0,3);
if(_4f2=="rgb"){
return self.fromRGBString(_4f0);
}else{
if(_4f2=="hsl"){
return self.fromHSLString(_4f0);
}else{
if(_4f0.charAt(0)=="#"){
return self.fromHexString(_4f0);
}
}
}
return self.fromName(_4f0);
},fromHexString:function(_4f3){
if(_4f3.charAt(0)=="#"){
_4f3=_4f3.substring(1);
}
var _4f4=[];
var i,hex;
if(_4f3.length==3){
for(i=0;i<3;i++){
hex=_4f3.substr(i,1);
_4f4.push(parseInt(hex+hex,16)/255);
}
}else{
for(i=0;i<6;i+=2){
hex=_4f3.substr(i,2);
_4f4.push(parseInt(hex,16)/255);
}
}
var _4f7=MochiKit.Color.Color;
return _4f7.fromRGB.apply(_4f7,_4f4);
},_fromColorString:function(pre,_4f9,_4fa,_4fb){
if(_4fb.indexOf(pre)===0){
_4fb=_4fb.substring(_4fb.indexOf("(",3)+1,_4fb.length-1);
}
var _4fc=_4fb.split(/\s*,\s*/);
var _4fd=[];
for(var i=0;i<_4fc.length;i++){
var c=_4fc[i];
var val;
var _501=c.substring(c.length-3);
if(c.charAt(c.length-1)=="%"){
val=0.01*parseFloat(c.substring(0,c.length-1));
}else{
if(_501=="deg"){
val=parseFloat(c)/360;
}else{
if(_501=="rad"){
val=parseFloat(c)/(Math.PI*2);
}else{
val=_4fa[i]*parseFloat(c);
}
}
}
_4fd.push(val);
}
return this[_4f9].apply(this,_4fd);
},fromComputedStyle:function(elem,_503){
var d=MochiKit.DOM;
var cls=MochiKit.Color.Color;
for(elem=d.getElement(elem);elem;elem=elem.parentNode){
var _506=MochiKit.Style.getStyle.apply(d,arguments);
if(!_506){
continue;
}
var _507=cls.fromString(_506);
if(!_507){
break;
}
if(_507.asRGB().a>0){
return _507;
}
}
return null;
},fromBackground:function(elem){
var cls=MochiKit.Color.Color;
return cls.fromComputedStyle(elem,"backgroundColor","background-color")||cls.whiteColor();
},fromText:function(elem){
var cls=MochiKit.Color.Color;
return cls.fromComputedStyle(elem,"color","color")||cls.blackColor();
},namedColors:function(){
return MochiKit.Base.clone(MochiKit.Color.Color._namedColors);
}});
MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_50d){
v*=_50d;
if(v<0){
return 0;
}else{
if(v>_50d){
return _50d;
}else{
return v;
}
}
},_hslValue:function(n1,n2,hue){
if(hue>6){
hue-=6;
}else{
if(hue<0){
hue+=6;
}
}
var val;
if(hue<1){
val=n1+(n2-n1)*hue;
}else{
if(hue<3){
val=n2;
}else{
if(hue<4){
val=n1+(n2-n1)*(4-hue);
}else{
val=n1;
}
}
}
return val;
},hsvToRGB:function(hue,_513,_514,_515){
if(arguments.length==1){
var hsv=hue;
hue=hsv.h;
_513=hsv.s;
_514=hsv.v;
_515=hsv.a;
}
var red;
var _518;
var blue;
if(_513===0){
red=_514;
_518=_514;
blue=_514;
}else{
var i=Math.floor(hue*6);
var f=(hue*6)-i;
var p=_514*(1-_513);
var q=_514*(1-(_513*f));
var t=_514*(1-(_513*(1-f)));
switch(i){
case 1:
red=q;
_518=_514;
blue=p;
break;
case 2:
red=p;
_518=_514;
blue=t;
break;
case 3:
red=p;
_518=q;
blue=_514;
break;
case 4:
red=t;
_518=p;
blue=_514;
break;
case 5:
red=_514;
_518=p;
blue=q;
break;
case 6:
case 0:
red=_514;
_518=t;
blue=p;
break;
}
}
return {r:red,g:_518,b:blue,a:_515};
},hslToRGB:function(hue,_520,_521,_522){
if(arguments.length==1){
var hsl=hue;
hue=hsl.h;
_520=hsl.s;
_521=hsl.l;
_522=hsl.a;
}
var red;
var _525;
var blue;
if(_520===0){
red=_521;
_525=_521;
blue=_521;
}else{
var m2;
if(_521<=0.5){
m2=_521*(1+_520);
}else{
m2=_521+_520-(_521*_520);
}
var m1=(2*_521)-m2;
var f=MochiKit.Color._hslValue;
var h6=hue*6;
red=f(m1,m2,h6+2);
_525=f(m1,m2,h6);
blue=f(m1,m2,h6-2);
}
return {r:red,g:_525,b:blue,a:_522};
},rgbToHSV:function(red,_52c,blue,_52e){
if(arguments.length==1){
var rgb=red;
red=rgb.r;
_52c=rgb.g;
blue=rgb.b;
_52e=rgb.a;
}
var max=Math.max(Math.max(red,_52c),blue);
var min=Math.min(Math.min(red,_52c),blue);
var hue;
var _533;
var _534=max;
if(min==max){
hue=0;
_533=0;
}else{
var _535=(max-min);
_533=_535/max;
if(red==max){
hue=(_52c-blue)/_535;
}else{
if(_52c==max){
hue=2+((blue-red)/_535);
}else{
hue=4+((red-_52c)/_535);
}
}
hue/=6;
if(hue<0){
hue+=1;
}
if(hue>1){
hue-=1;
}
}
return {h:hue,s:_533,v:_534,a:_52e};
},rgbToHSL:function(red,_537,blue,_539){
if(arguments.length==1){
var rgb=red;
red=rgb.r;
_537=rgb.g;
blue=rgb.b;
_539=rgb.a;
}
var max=Math.max(red,Math.max(_537,blue));
var min=Math.min(red,Math.min(_537,blue));
var hue;
var _53e;
var _53f=(max+min)/2;
var _540=max-min;
if(_540===0){
hue=0;
_53e=0;
}else{
if(_53f<=0.5){
_53e=_540/(max+min);
}else{
_53e=_540/(2-max-min);
}
if(red==max){
hue=(_537-blue)/_540;
}else{
if(_537==max){
hue=2+((blue-red)/_540);
}else{
hue=4+((red-_537)/_540);
}
}
hue/=6;
if(hue<0){
hue+=1;
}
if(hue>1){
hue-=1;
}
}
return {h:hue,s:_53e,l:_53f,a:_539};
},toColorPart:function(num){
num=Math.round(num);
var _542=num.toString(16);
if(num<16){
return "0"+_542;
}
return _542;
},__new__:function(){
var m=MochiKit.Base;
this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]);
this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]);
var _544=1/3;
var _545={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_544,_544,_544],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_544,2*_544,2*_544],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]};
var _546=function(name,r,g,b,a){
var rval=this.fromRGB(r,g,b,a);
this[name]=function(){
return rval;
};
return rval;
};
for(var k in _545){
var name=k+"Color";
var _54f=m.concat([_546,this.Color,name],_545[k]);
this.Color[name]=m.bind.apply(null,_54f);
}
var _550=function(){
for(var i=0;i1){
var src=MochiKit.DOM.getElement(arguments[0]);
var sig=arguments[1];
var obj=arguments[2];
var func=arguments[3];
for(var i=_592.length-1;i>=0;i--){
var o=_592[i];
if(o.source===src&&o.signal===sig&&o.objOrFunc===obj&&o.funcOrStr===func){
self._disconnect(o);
if(!self._lock){
_592.splice(i,1);
}else{
self._dirty=true;
}
return true;
}
}
}else{
var idx=m.findIdentical(_592,_590);
if(idx>=0){
self._disconnect(_590);
if(!self._lock){
_592.splice(idx,1);
}else{
self._dirty=true;
}
return true;
}
}
return false;
},disconnectAllTo:function(_59b,_59c){
var self=MochiKit.Signal;
var _59e=self._observers;
var _59f=self._disconnect;
var _5a0=self._lock;
var _5a1=self._dirty;
if(typeof (_59c)==="undefined"){
_59c=null;
}
for(var i=_59e.length-1;i>=0;i--){
var _5a3=_59e[i];
if(_5a3.objOrFunc===_59b&&(_59c===null||_5a3.funcOrStr===_59c)){
_59f(_5a3);
if(_5a0){
_5a1=true;
}else{
_59e.splice(i,1);
}
}
}
self._dirty=_5a1;
},disconnectAll:function(src,sig){
src=MochiKit.DOM.getElement(src);
var m=MochiKit.Base;
var _5a7=m.flattenArguments(m.extend(null,arguments,1));
var self=MochiKit.Signal;
var _5a9=self._disconnect;
var _5aa=self._observers;
var i,_5ac;
var _5ad=self._lock;
var _5ae=self._dirty;
if(_5a7.length===0){
for(i=_5aa.length-1;i>=0;i--){
_5ac=_5aa[i];
if(_5ac.source===src){
_5a9(_5ac);
if(!_5ad){
_5aa.splice(i,1);
}else{
_5ae=true;
}
}
}
}else{
var sigs={};
for(i=0;i<_5a7.length;i++){
sigs[_5a7[i]]=true;
}
for(i=_5aa.length-1;i>=0;i--){
_5ac=_5aa[i];
if(_5ac.source===src&&_5ac.signal in sigs){
_5a9(_5ac);
if(!_5ad){
_5aa.splice(i,1);
}else{
_5ae=true;
}
}
}
}
self._dirty=_5ae;
},signal:function(src,sig){
var self=MochiKit.Signal;
var _5b3=self._observers;
src=MochiKit.DOM.getElement(src);
var args=MochiKit.Base.extend(null,arguments,2);
var _5b5=[];
self._lock=true;
for(var i=0;i<_5b3.length;i++){
var _5b7=_5b3[i];
if(_5b7.source===src&&_5b7.signal===sig&&_5b7.connected){
try{
_5b7.listener.apply(src,args);
}
catch(e){
_5b5.push(e);
}
}
}
self._lock=false;
if(self._dirty){
self._dirty=false;
for(var i=_5b3.length-1;i>=0;i--){
if(!_5b3[i].connected){
_5b3.splice(i,1);
}
}
}
if(_5b5.length==1){
throw _5b5[0];
}else{
if(_5b5.length>1){
var e=new Error("Multiple errors thrown in handling 'sig', see errors property");
e.errors=_5b5;
throw e;
}
}
}});
MochiKit.Signal.EXPORT_OK=[];
MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll","disconnectAllTo"];
MochiKit.Signal.__new__=function(win){
var m=MochiKit.Base;
this._document=document;
this._window=win;
this._lock=false;
this._dirty=false;
try{
this.connect(window,"onunload",this._unloadCache);
}
catch(e){
}
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
m.nameFunctions(this);
};
MochiKit.Signal.__new__(this);
if(MochiKit.__export__){
connect=MochiKit.Signal.connect;
disconnect=MochiKit.Signal.disconnect;
disconnectAll=MochiKit.Signal.disconnectAll;
signal=MochiKit.Signal.signal;
}
MochiKit.Base._exportSymbols(this,MochiKit.Signal);
MochiKit.Base._deps("Position",["Base","DOM","Style"]);
MochiKit.Position.NAME="MochiKit.Position";
MochiKit.Position.VERSION="1.4.2";
MochiKit.Position.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Position.toString=function(){
return this.__repr__();
};
MochiKit.Position.EXPORT_OK=[];
MochiKit.Position.EXPORT=[];
MochiKit.Base.update(MochiKit.Position,{includeScrollOffsets:false,prepare:function(){
var _5bb=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;
var _5bc=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;
this.windowOffset=new MochiKit.Style.Coordinates(_5bb,_5bc);
},cumulativeOffset:function(_5bd){
var _5be=0;
var _5bf=0;
do{
_5be+=_5bd.offsetTop||0;
_5bf+=_5bd.offsetLeft||0;
_5bd=_5bd.offsetParent;
}while(_5bd);
return new MochiKit.Style.Coordinates(_5bf,_5be);
},realOffset:function(_5c0){
var _5c1=0;
var _5c2=0;
do{
_5c1+=_5c0.scrollTop||0;
_5c2+=_5c0.scrollLeft||0;
_5c0=_5c0.parentNode;
}while(_5c0);
return new MochiKit.Style.Coordinates(_5c2,_5c1);
},within:function(_5c3,x,y){
if(this.includeScrollOffsets){
return this.withinIncludingScrolloffsets(_5c3,x,y);
}
this.xcomp=x;
this.ycomp=y;
this.offset=this.cumulativeOffset(_5c3);
if(_5c3.style.position=="fixed"){
this.offset.x+=this.windowOffset.x;
this.offset.y+=this.windowOffset.y;
}
return (y>=this.offset.y&&y=this.offset.x&&x=this.offset.y&&this.ycomp=this.offset.x&&this.xcomp"+el.innerHTML+"";
},_roundTopCorners:function(el,_5f5,_5f6){
var _5f7=this._createCorner(_5f6);
for(var i=0;i=0;i--){
_5fc.appendChild(this._createCornerSlice(_5fa,_5fb,i,"bottom"));
}
el.style.paddingBottom=0;
el.appendChild(_5fc);
},_createCorner:function(_5fe){
var dom=MochiKit.DOM;
return dom.DIV({style:{backgroundColor:_5fe.toString()}});
},_createCornerSlice:function(_600,_601,n,_603){
var _604=MochiKit.DOM.SPAN();
var _605=_604.style;
_605.backgroundColor=_600.toString();
_605.display="block";
_605.height="1px";
_605.overflow="hidden";
_605.fontSize="1px";
var _606=this._borderColor(_600,_601);
if(this.options.border&&n===0){
_605.borderTopStyle="solid";
_605.borderTopWidth="1px";
_605.borderLeftWidth="0px";
_605.borderRightWidth="0px";
_605.borderBottomWidth="0px";
_605.height="0px";
_605.borderColor=_606.toString();
}else{
if(_606){
_605.borderColor=_606.toString();
_605.borderStyle="solid";
_605.borderWidth="0px 1px";
}
}
if(!this.options.compact&&(n==(this.options.numSlices-1))){
_605.height="2px";
}
this._setMargin(_604,n,_603);
this._setBorder(_604,n,_603);
return _604;
},_setOptions:function(_607){
this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false,__unstable__wrapElement:false};
MochiKit.Base.update(this.options,_607);
this.options.numSlices=(this.options.compact?2:4);
},_whichSideTop:function(){
var _608=this.options.corners;
if(this._hasString(_608,"all","top")){
return "";
}
var _609=(_608.indexOf("tl")!=-1);
var _60a=(_608.indexOf("tr")!=-1);
if(_609&&_60a){
return "";
}
if(_609){
return "left";
}
if(_60a){
return "right";
}
return "";
},_whichSideBottom:function(){
var _60b=this.options.corners;
if(this._hasString(_60b,"all","bottom")){
return "";
}
var _60c=(_60b.indexOf("bl")!=-1);
var _60d=(_60b.indexOf("br")!=-1);
if(_60c&&_60d){
return "";
}
if(_60c){
return "left";
}
if(_60d){
return "right";
}
return "";
},_borderColor:function(_60e,_60f){
if(_60e=="transparent"){
return _60f;
}else{
if(this.options.border){
return this.options.border;
}else{
if(this.options.blend){
return _60f.blendedColor(_60e);
}
}
}
return "";
},_setMargin:function(el,n,_612){
var _613=this._marginSize(n)+"px";
var _614=(_612=="top"?this._whichSideTop():this._whichSideBottom());
var _615=el.style;
if(_614=="left"){
_615.marginLeft=_613;
_615.marginRight="0px";
}else{
if(_614=="right"){
_615.marginRight=_613;
_615.marginLeft="0px";
}else{
_615.marginLeft=_613;
_615.marginRight=_613;
}
}
},_setBorder:function(el,n,_618){
var _619=this._borderSize(n)+"px";
var _61a=(_618=="top"?this._whichSideTop():this._whichSideBottom());
var _61b=el.style;
if(_61a=="left"){
_61b.borderLeftWidth=_619;
_61b.borderRightWidth="0px";
}else{
if(_61a=="right"){
_61b.borderRightWidth=_619;
_61b.borderLeftWidth="0px";
}else{
_61b.borderLeftWidth=_619;
_61b.borderRightWidth=_619;
}
}
},_marginSize:function(n){
if(this.isTransparent){
return 0;
}
var o=this.options;
if(o.compact&&o.blend){
var _61e=[1,0];
return _61e[n];
}else{
if(o.compact){
var _61f=[2,1];
return _61f[n];
}else{
if(o.blend){
var _620=[3,2,1,0];
return _620[n];
}else{
var _621=[5,3,2,1];
return _621[n];
}
}
}
},_borderSize:function(n){
var o=this.options;
var _624;
if(o.compact&&(o.blend||this.isTransparent)){
return 1;
}else{
if(o.compact){
_624=[1,0];
}else{
if(o.blend){
_624=[2,1,1,1];
}else{
if(o.border){
_624=[0,2,0,0];
}else{
if(this.isTransparent){
_624=[5,3,2,1];
}else{
return 0;
}
}
}
}
}
return _624[n];
},_hasString:function(str){
for(var i=1;i=(_651||i)){
_651=i;
}
},this.effects);
_64d=_651||_64d;
break;
case "break":
ma(function(e){
e.finalize();
},this.effects);
break;
}
_64c.startOn+=_64d;
_64c.finishOn+=_64d;
if(!_64c.options.queue.limit||this.effects.length<_64c.options.queue.limit){
this.effects.push(_64c);
}
if(!this.interval){
this.interval=this.startLoop(MochiKit.Base.bind(this.loop,this),40);
}
},startLoop:function(func,_656){
return setInterval(func,_656);
},remove:function(_657){
this.effects=MochiKit.Base.filter(function(e){
return e!=_657;
},this.effects);
if(!this.effects.length){
this.stopLoop(this.interval);
this.interval=null;
}
},stopLoop:function(_659){
clearInterval(_659);
},loop:function(){
var _65a=new Date().getTime();
MochiKit.Base.map(function(_65b){
_65b.loop(_65a);
},this.effects);
}});
MochiKit.Visual.Queues={instances:{},get:function(_65c){
if(typeof (_65c)!="string"){
return _65c;
}
if(!this.instances[_65c]){
this.instances[_65c]=new MochiKit.Visual.ScopedQueue();
}
return this.instances[_65c];
}};
MochiKit.Visual.Queue=MochiKit.Visual.Queues.get("global");
MochiKit.Visual.DefaultOptions={transition:MochiKit.Visual.Transitions.sinoidal,duration:1,fps:25,sync:false,from:0,to:1,delay:0,queue:"parallel"};
MochiKit.Visual.Base=function(){
};
MochiKit.Visual.Base.prototype={__class__:MochiKit.Visual.Base,start:function(_65d){
var v=MochiKit.Visual;
this.options=MochiKit.Base.setdefault(_65d,v.DefaultOptions);
this.currentFrame=0;
this.state="idle";
this.startOn=this.options.delay*1000;
this.finishOn=this.startOn+(this.options.duration*1000);
this.event("beforeStart");
if(!this.options.sync){
v.Queues.get(typeof (this.options.queue)=="string"?"global":this.options.queue.scope).add(this);
}
},loop:function(_65f){
if(_65f>=this.startOn){
if(_65f>=this.finishOn){
return this.finalize();
}
var pos=(_65f-this.startOn)/(this.finishOn-this.startOn);
var _661=Math.round(pos*this.options.fps*this.options.duration);
if(_661>this.currentFrame){
this.render(pos);
this.currentFrame=_661;
}
}
},render:function(pos){
if(this.state=="idle"){
this.state="running";
this.event("beforeSetup");
this.setup();
this.event("afterSetup");
}
if(this.state=="running"){
if(this.options.transition){
pos=this.options.transition(pos);
}
pos*=(this.options.to-this.options.from);
pos+=this.options.from;
this.event("beforeUpdate");
this.update(pos);
this.event("afterUpdate");
}
},cancel:function(){
if(!this.options.sync){
MochiKit.Visual.Queues.get(typeof (this.options.queue)=="string"?"global":this.options.queue.scope).remove(this);
}
this.state="finished";
},finalize:function(){
this.render(1);
this.cancel();
this.event("beforeFinish");
this.finish();
this.event("afterFinish");
},setup:function(){
},finish:function(){
},update:function(_663){
},event:function(_664){
if(this.options[_664+"Internal"]){
this.options[_664+"Internal"](this);
}
if(this.options[_664]){
this.options[_664](this);
}
},repr:function(){
return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]";
}};
MochiKit.Visual.Parallel=function(_665,_666){
var cls=arguments.callee;
if(!(this instanceof cls)){
return new cls(_665,_666);
}
this.__init__(_665,_666);
};
MochiKit.Visual.Parallel.prototype=new MochiKit.Visual.Base();
MochiKit.Base.update(MochiKit.Visual.Parallel.prototype,{__class__:MochiKit.Visual.Parallel,__init__:function(_668,_669){
this.effects=_668||[];
this.start(_669);
},update:function(_66a){
MochiKit.Base.map(function(_66b){
_66b.render(_66a);
},this.effects);
},finish:function(){
MochiKit.Base.map(function(_66c){
_66c.finalize();
},this.effects);
}});
MochiKit.Visual.Sequence=function(_66d,_66e){
var cls=arguments.callee;
if(!(this instanceof cls)){
return new cls(_66d,_66e);
}
this.__init__(_66d,_66e);
};
MochiKit.Visual.Sequence.prototype=new MochiKit.Visual.Base();
MochiKit.Base.update(MochiKit.Visual.Sequence.prototype,{__class__:MochiKit.Visual.Sequence,__init__:function(_670,_671){
var defs={transition:MochiKit.Visual.Transitions.linear,duration:0};
this.effects=_670||[];
MochiKit.Base.map(function(_673){
defs.duration+=_673.options.duration;
},this.effects);
MochiKit.Base.setdefault(_671,defs);
this.start(_671);
},update:function(_674){
var time=_674*this.options.duration;
for(var i=0;i0){
this.fontSize=parseFloat(_694);
this.fontSizeType=_695;
}
},this),["em","px","%"]);
this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;
if(/^content/.test(this.options.scaleMode)){
this.dims=[this.element.scrollHeight,this.element.scrollWidth];
}else{
if(this.options.scaleMode=="box"){
this.dims=[this.element.offsetHeight,this.element.offsetWidth];
}else{
this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth];
}
}
},update:function(_696){
var _697=(this.options.scaleFrom/100)+(this.factor*_696);
if(this.options.scaleContent&&this.fontSize){
MochiKit.Style.setStyle(this.element,{fontSize:this.fontSize*_697+this.fontSizeType});
}
this.setDimensions(this.dims[0]*_697,this.dims[1]*_697);
},finish:function(){
if(this.restoreAfterFinish){
MochiKit.Style.setStyle(this.element,this.originalStyle);
}
},setDimensions:function(_698,_699){
var d={};
var r=Math.round;
if(/MSIE/.test(navigator.userAgent)){
r=Math.ceil;
}
if(this.options.scaleX){
d.width=r(_699)+"px";
}
if(this.options.scaleY){
d.height=r(_698)+"px";
}
if(this.options.scaleFromCenter){
var topd=(_698-this.dims[0])/2;
var _69d=(_699-this.dims[1])/2;
if(this.elementPositioning=="absolute"){
if(this.options.scaleY){
d.top=this.originalTop-topd+"px";
}
if(this.options.scaleX){
d.left=this.originalLeft-_69d+"px";
}
}else{
if(this.options.scaleY){
d.top=-topd+"px";
}
if(this.options.scaleX){
d.left=-_69d+"px";
}
}
}
MochiKit.Style.setStyle(this.element,d);
}});
MochiKit.Visual.Highlight=function(_69e,_69f){
var cls=arguments.callee;
if(!(this instanceof cls)){
return new cls(_69e,_69f);
}
this.__init__(_69e,_69f);
};
MochiKit.Visual.Highlight.prototype=new MochiKit.Visual.Base();
MochiKit.Base.update(MochiKit.Visual.Highlight.prototype,{__class__:MochiKit.Visual.Highlight,__init__:function(_6a1,_6a2){
this.element=MochiKit.DOM.getElement(_6a1);
_6a2=MochiKit.Base.update({startcolor:"#ffff99"},_6a2);
this.start(_6a2);
},setup:function(){
var b=MochiKit.Base;
var s=MochiKit.Style;
if(s.getStyle(this.element,"display")=="none"){
this.cancel();
return;
}
this.oldStyle={backgroundImage:s.getStyle(this.element,"background-image")};
s.setStyle(this.element,{backgroundImage:"none"});
if(!this.options.endcolor){
this.options.endcolor=MochiKit.Color.Color.fromBackground(this.element).toHexString();
}
if(b.isUndefinedOrNull(this.options.restorecolor)){
this.options.restorecolor=s.getStyle(this.element,"background-color");
}
this._base=b.map(b.bind(function(i){
return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16);
},this),[0,1,2]);
this._delta=b.map(b.bind(function(i){
return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i];
},this),[0,1,2]);
},update:function(_6a7){
var m="#";
MochiKit.Base.map(MochiKit.Base.bind(function(i){
m+=MochiKit.Color.toColorPart(Math.round(this._base[i]+this._delta[i]*_6a7));
},this),[0,1,2]);
MochiKit.Style.setStyle(this.element,{backgroundColor:m});
},finish:function(){
MochiKit.Style.setStyle(this.element,MochiKit.Base.update(this.oldStyle,{backgroundColor:this.options.restorecolor}));
}});
MochiKit.Visual.ScrollTo=function(_6aa,_6ab){
var cls=arguments.callee;
if(!(this instanceof cls)){
return new cls(_6aa,_6ab);
}
this.__init__(_6aa,_6ab);
};
MochiKit.Visual.ScrollTo.prototype=new MochiKit.Visual.Base();
MochiKit.Base.update(MochiKit.Visual.ScrollTo.prototype,{__class__:MochiKit.Visual.ScrollTo,__init__:function(_6ad,_6ae){
this.element=MochiKit.DOM.getElement(_6ad);
this.start(_6ae);
},setup:function(){
var p=MochiKit.Position;
p.prepare();
var _6b0=p.cumulativeOffset(this.element);
if(this.options.offset){
_6b0.y+=this.options.offset;
}
var max;
if(window.innerHeight){
max=window.innerHeight-window.height;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
max=document.documentElement.clientHeight-document.body.scrollHeight;
}else{
if(document.body){
max=document.body.clientHeight-document.body.scrollHeight;
}
}
}
this.scrollStart=p.windowOffset.y;
this.delta=(_6b0.y>max?max:_6b0.y)-this.scrollStart;
},update:function(_6b2){
var p=MochiKit.Position;
p.prepare();
window.scrollTo(p.windowOffset.x,this.scrollStart+(_6b2*this.delta));
}});
MochiKit.Visual.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
MochiKit.Visual.Morph=function(_6b4,_6b5){
var cls=arguments.callee;
if(!(this instanceof cls)){
return new cls(_6b4,_6b5);
}
this.__init__(_6b4,_6b5);
};
MochiKit.Visual.Morph.prototype=new MochiKit.Visual.Base();
MochiKit.Base.update(MochiKit.Visual.Morph.prototype,{__class__:MochiKit.Visual.Morph,__init__:function(_6b7,_6b8){
this.element=MochiKit.DOM.getElement(_6b7);
this.start(_6b8);
},setup:function(){
var b=MochiKit.Base;
var _6ba=this.options.style;
this.styleStart={};
this.styleEnd={};
this.units={};
var _6bb,unit;
for(var s in _6ba){
_6bb=_6ba[s];
s=b.camelize(s);
if(MochiKit.Visual.CSS_LENGTH.test(_6bb)){
var _6be=_6bb.match(/^([\+\-]?[0-9\.]+)(.*)$/);
_6bb=parseFloat(_6be[1]);
unit=(_6be.length==3)?_6be[2]:null;
this.styleEnd[s]=_6bb;
this.units[s]=unit;
_6bb=MochiKit.Style.getStyle(this.element,s);
_6be=_6bb.match(/^([\+\-]?[0-9\.]+)(.*)$/);
_6bb=parseFloat(_6be[1]);
this.styleStart[s]=_6bb;
}else{
if(/[Cc]olor$/.test(s)){
var c=MochiKit.Color.Color;
_6bb=c.fromString(_6bb);
if(_6bb){
this.units[s]="color";
this.styleEnd[s]=_6bb.toHexString();
_6bb=MochiKit.Style.getStyle(this.element,s);
this.styleStart[s]=c.fromString(_6bb).toHexString();
this.styleStart[s]=b.map(b.bind(function(i){
return parseInt(this.styleStart[s].slice(i*2+1,i*2+3),16);
},this),[0,1,2]);
this.styleEnd[s]=b.map(b.bind(function(i){
return parseInt(this.styleEnd[s].slice(i*2+1,i*2+3),16);
},this),[0,1,2]);
}
}else{
this.element.style[s]=_6bb;
}
}
}
},update:function(_6c2){
var _6c3;
for(var s in this.styleStart){
if(this.units[s]=="color"){
var m="#";
var _6c6=this.styleStart[s];
var end=this.styleEnd[s];
MochiKit.Base.map(MochiKit.Base.bind(function(i){
m+=MochiKit.Color.toColorPart(Math.round(_6c6[i]+(end[i]-_6c6[i])*_6c2));
},this),[0,1,2]);
this.element.style[s]=m;
}else{
_6c3=this.styleStart[s]+Math.round((this.styleEnd[s]-this.styleStart[s])*_6c2*1000)/1000+this.units[s];
this.element.style[s]=_6c3;
}
}
}});
MochiKit.Visual.fade=function(_6c9,_6ca){
var s=MochiKit.Style;
var _6cc=s.getStyle(_6c9,"opacity");
_6ca=MochiKit.Base.update({from:s.getStyle(_6c9,"opacity")||1,to:0,afterFinishInternal:function(_6cd){
if(_6cd.options.to!==0){
return;
}
s.hideElement(_6cd.element);
s.setStyle(_6cd.element,{"opacity":_6cc});
}},_6ca);
return new MochiKit.Visual.Opacity(_6c9,_6ca);
};
MochiKit.Visual.appear=function(_6ce,_6cf){
var s=MochiKit.Style;
var v=MochiKit.Visual;
_6cf=MochiKit.Base.update({from:(s.getStyle(_6ce,"display")=="none"?0:s.getStyle(_6ce,"opacity")||0),to:1,afterFinishInternal:function(_6d2){
v.forceRerendering(_6d2.element);
},beforeSetupInternal:function(_6d3){
s.setStyle(_6d3.element,{"opacity":_6d3.options.from});
s.showElement(_6d3.element);
}},_6cf);
return new v.Opacity(_6ce,_6cf);
};
MochiKit.Visual.puff=function(_6d4,_6d5){
var s=MochiKit.Style;
var v=MochiKit.Visual;
_6d4=MochiKit.DOM.getElement(_6d4);
var _6d8=MochiKit.Style.getElementDimensions(_6d4,true);
var _6d9={position:s.getStyle(_6d4,"position"),top:_6d4.style.top,left:_6d4.style.left,width:_6d4.style.width,height:_6d4.style.height,opacity:s.getStyle(_6d4,"opacity")};
_6d5=MochiKit.Base.update({beforeSetupInternal:function(_6da){
MochiKit.Position.absolutize(_6da.effects[0].element);
},afterFinishInternal:function(_6db){
s.hideElement(_6db.effects[0].element);
s.setStyle(_6db.effects[0].element,_6d9);
},scaleContent:true,scaleFromCenter:true},_6d5);
return new v.Parallel([new v.Scale(_6d4,200,{sync:true,scaleFromCenter:_6d5.scaleFromCenter,scaleMode:{originalHeight:_6d8.h,originalWidth:_6d8.w},scaleContent:_6d5.scaleContent,restoreAfterFinish:true}),new v.Opacity(_6d4,{sync:true,to:0})],_6d5);
};
MochiKit.Visual.blindUp=function(_6dc,_6dd){
var d=MochiKit.DOM;
var s=MochiKit.Style;
_6dc=d.getElement(_6dc);
var _6e0=s.getElementDimensions(_6dc,true);
var _6e1=s.makeClipping(_6dc);
_6dd=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleMode:{originalHeight:_6e0.h,originalWidth:_6e0.w},restoreAfterFinish:true,afterFinishInternal:function(_6e2){
s.hideElement(_6e2.element);
s.undoClipping(_6e2.element,_6e1);
}},_6dd);
return new MochiKit.Visual.Scale(_6dc,0,_6dd);
};
MochiKit.Visual.blindDown=function(_6e3,_6e4){
var d=MochiKit.DOM;
var s=MochiKit.Style;
_6e3=d.getElement(_6e3);
var _6e7=s.getElementDimensions(_6e3,true);
var _6e8;
_6e4=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_6e7.h,originalWidth:_6e7.w},restoreAfterFinish:true,afterSetupInternal:function(_6e9){
_6e8=s.makeClipping(_6e9.element);
s.setStyle(_6e9.element,{height:"0px"});
s.showElement(_6e9.element);
},afterFinishInternal:function(_6ea){
s.undoClipping(_6ea.element,_6e8);
}},_6e4);
return new MochiKit.Visual.Scale(_6e3,100,_6e4);
};
MochiKit.Visual.switchOff=function(_6eb,_6ec){
var d=MochiKit.DOM;
var s=MochiKit.Style;
_6eb=d.getElement(_6eb);
var _6ef=s.getElementDimensions(_6eb,true);
var _6f0=s.getStyle(_6eb,"opacity");
var _6f1;
_6ec=MochiKit.Base.update({duration:0.7,restoreAfterFinish:true,beforeSetupInternal:function(_6f2){
s.makePositioned(_6eb);
_6f1=s.makeClipping(_6eb);
},afterFinishInternal:function(_6f3){
s.hideElement(_6eb);
s.undoClipping(_6eb,_6f1);
s.undoPositioned(_6eb);
s.setStyle(_6eb,{"opacity":_6f0});
}},_6ec);
var v=MochiKit.Visual;
return new v.Sequence([new v.appear(_6eb,{sync:true,duration:0.57*_6ec.duration,from:0,transition:v.Transitions.flicker}),new v.Scale(_6eb,1,{sync:true,duration:0.43*_6ec.duration,scaleFromCenter:true,scaleX:false,scaleMode:{originalHeight:_6ef.h,originalWidth:_6ef.w},scaleContent:false,restoreAfterFinish:true})],_6ec);
};
MochiKit.Visual.dropOut=function(_6f5,_6f6){
var d=MochiKit.DOM;
var s=MochiKit.Style;
_6f5=d.getElement(_6f5);
var _6f9={top:s.getStyle(_6f5,"top"),left:s.getStyle(_6f5,"left"),opacity:s.getStyle(_6f5,"opacity")};
_6f6=MochiKit.Base.update({duration:0.5,distance:100,beforeSetupInternal:function(_6fa){
s.makePositioned(_6fa.effects[0].element);
},afterFinishInternal:function(_6fb){
s.hideElement(_6fb.effects[0].element);
s.undoPositioned(_6fb.effects[0].element);
s.setStyle(_6fb.effects[0].element,_6f9);
}},_6f6);
var v=MochiKit.Visual;
return new v.Parallel([new v.Move(_6f5,{x:0,y:_6f6.distance,sync:true}),new v.Opacity(_6f5,{sync:true,to:0})],_6f6);
};
MochiKit.Visual.shake=function(_6fd,_6fe){
var d=MochiKit.DOM;
var v=MochiKit.Visual;
var s=MochiKit.Style;
_6fd=d.getElement(_6fd);
var _702={top:s.getStyle(_6fd,"top"),left:s.getStyle(_6fd,"left")};
_6fe=MochiKit.Base.update({duration:0.5,afterFinishInternal:function(_703){
s.undoPositioned(_6fd);
s.setStyle(_6fd,_702);
}},_6fe);
return new v.Sequence([new v.Move(_6fd,{sync:true,duration:0.1*_6fe.duration,x:20,y:0}),new v.Move(_6fd,{sync:true,duration:0.2*_6fe.duration,x:-40,y:0}),new v.Move(_6fd,{sync:true,duration:0.2*_6fe.duration,x:40,y:0}),new v.Move(_6fd,{sync:true,duration:0.2*_6fe.duration,x:-40,y:0}),new v.Move(_6fd,{sync:true,duration:0.2*_6fe.duration,x:40,y:0}),new v.Move(_6fd,{sync:true,duration:0.1*_6fe.duration,x:-20,y:0})],_6fe);
};
MochiKit.Visual.slideDown=function(_704,_705){
var d=MochiKit.DOM;
var b=MochiKit.Base;
var s=MochiKit.Style;
_704=d.getElement(_704);
if(!_704.firstChild){
throw new Error("MochiKit.Visual.slideDown must be used on a element with a child");
}
d.removeEmptyTextNodes(_704);
var _709=s.getStyle(_704.firstChild,"bottom")||0;
var _70a=s.getElementDimensions(_704,true);
var _70b;
_705=b.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_70a.h,originalWidth:_70a.w},restoreAfterFinish:true,afterSetupInternal:function(_70c){
s.makePositioned(_70c.element);
s.makePositioned(_70c.element.firstChild);
if(/Opera/.test(navigator.userAgent)){
s.setStyle(_70c.element,{top:""});
}
_70b=s.makeClipping(_70c.element);
s.setStyle(_70c.element,{height:"0px"});
s.showElement(_70c.element);
},afterUpdateInternal:function(_70d){
var _70e=s.getElementDimensions(_70d.element,true);
s.setStyle(_70d.element.firstChild,{bottom:(_70d.dims[0]-_70e.h)+"px"});
},afterFinishInternal:function(_70f){
s.undoClipping(_70f.element,_70b);
if(/MSIE/.test(navigator.userAgent)){
s.undoPositioned(_70f.element);
s.undoPositioned(_70f.element.firstChild);
}else{
s.undoPositioned(_70f.element.firstChild);
s.undoPositioned(_70f.element);
}
s.setStyle(_70f.element.firstChild,{bottom:_709});
}},_705);
return new MochiKit.Visual.Scale(_704,100,_705);
};
MochiKit.Visual.slideUp=function(_710,_711){
var d=MochiKit.DOM;
var b=MochiKit.Base;
var s=MochiKit.Style;
_710=d.getElement(_710);
if(!_710.firstChild){
throw new Error("MochiKit.Visual.slideUp must be used on a element with a child");
}
d.removeEmptyTextNodes(_710);
var _715=s.getStyle(_710.firstChild,"bottom");
var _716=s.getElementDimensions(_710,true);
var _717;
_711=b.update({scaleContent:false,scaleX:false,scaleMode:{originalHeight:_716.h,originalWidth:_716.w},scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_718){
s.makePositioned(_718.element);
s.makePositioned(_718.element.firstChild);
if(/Opera/.test(navigator.userAgent)){
s.setStyle(_718.element,{top:""});
}
_717=s.makeClipping(_718.element);
s.showElement(_718.element);
},afterUpdateInternal:function(_719){
var _71a=s.getElementDimensions(_719.element,true);
s.setStyle(_719.element.firstChild,{bottom:(_719.dims[0]-_71a.h)+"px"});
},afterFinishInternal:function(_71b){
s.hideElement(_71b.element);
s.undoClipping(_71b.element,_717);
s.undoPositioned(_71b.element.firstChild);
s.undoPositioned(_71b.element);
s.setStyle(_71b.element.firstChild,{bottom:_715});
}},_711);
return new MochiKit.Visual.Scale(_710,0,_711);
};
MochiKit.Visual.squish=function(_71c,_71d){
var d=MochiKit.DOM;
var b=MochiKit.Base;
var s=MochiKit.Style;
var _721=s.getElementDimensions(_71c,true);
var _722;
_71d=b.update({restoreAfterFinish:true,scaleMode:{originalHeight:_721.w,originalWidth:_721.h},beforeSetupInternal:function(_723){
_722=s.makeClipping(_723.element);
},afterFinishInternal:function(_724){
s.hideElement(_724.element);
s.undoClipping(_724.element,_722);
}},_71d);
return new MochiKit.Visual.Scale(_71c,/Opera/.test(navigator.userAgent)?1:0,_71d);
};
MochiKit.Visual.grow=function(_725,_726){
var d=MochiKit.DOM;
var v=MochiKit.Visual;
var s=MochiKit.Style;
_725=d.getElement(_725);
_726=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.full,scaleContent:true,scaleFromCenter:false},_726);
var _72a={top:_725.style.top,left:_725.style.left,height:_725.style.height,width:_725.style.width,opacity:s.getStyle(_725,"opacity")};
var dims=s.getElementDimensions(_725,true);
var _72c,_72d;
var _72e,_72f;
switch(_726.direction){
case "top-left":
_72c=_72d=_72e=_72f=0;
break;
case "top-right":
_72c=dims.w;
_72d=_72f=0;
_72e=-dims.w;
break;
case "bottom-left":
_72c=_72e=0;
_72d=dims.h;
_72f=-dims.h;
break;
case "bottom-right":
_72c=dims.w;
_72d=dims.h;
_72e=-dims.w;
_72f=-dims.h;
break;
case "center":
_72c=dims.w/2;
_72d=dims.h/2;
_72e=-dims.w/2;
_72f=-dims.h/2;
break;
}
var _730=MochiKit.Base.update({beforeSetupInternal:function(_731){
s.setStyle(_731.effects[0].element,{height:"0px"});
s.showElement(_731.effects[0].element);
},afterFinishInternal:function(_732){
s.undoClipping(_732.effects[0].element);
s.undoPositioned(_732.effects[0].element);
s.setStyle(_732.effects[0].element,_72a);
}},_726);
return new v.Move(_725,{x:_72c,y:_72d,duration:0.01,beforeSetupInternal:function(_733){
s.hideElement(_733.element);
s.makeClipping(_733.element);
s.makePositioned(_733.element);
},afterFinishInternal:function(_734){
new v.Parallel([new v.Opacity(_734.element,{sync:true,to:1,from:0,transition:_726.opacityTransition}),new v.Move(_734.element,{x:_72e,y:_72f,sync:true,transition:_726.moveTransition}),new v.Scale(_734.element,100,{scaleMode:{originalHeight:dims.h,originalWidth:dims.w},sync:true,scaleFrom:/Opera/.test(navigator.userAgent)?1:0,transition:_726.scaleTransition,scaleContent:_726.scaleContent,scaleFromCenter:_726.scaleFromCenter,restoreAfterFinish:true})],_730);
}});
};
MochiKit.Visual.shrink=function(_735,_736){
var d=MochiKit.DOM;
var v=MochiKit.Visual;
var s=MochiKit.Style;
_735=d.getElement(_735);
_736=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.none,scaleContent:true,scaleFromCenter:false},_736);
var _73a={top:_735.style.top,left:_735.style.left,height:_735.style.height,width:_735.style.width,opacity:s.getStyle(_735,"opacity")};
var dims=s.getElementDimensions(_735,true);
var _73c,_73d;
switch(_736.direction){
case "top-left":
_73c=_73d=0;
break;
case "top-right":
_73c=dims.w;
_73d=0;
break;
case "bottom-left":
_73c=0;
_73d=dims.h;
break;
case "bottom-right":
_73c=dims.w;
_73d=dims.h;
break;
case "center":
_73c=dims.w/2;
_73d=dims.h/2;
break;
}
var _73e;
var _73f=MochiKit.Base.update({beforeStartInternal:function(_740){
s.makePositioned(_740.effects[0].element);
_73e=s.makeClipping(_740.effects[0].element);
},afterFinishInternal:function(_741){
s.hideElement(_741.effects[0].element);
s.undoClipping(_741.effects[0].element,_73e);
s.undoPositioned(_741.effects[0].element);
s.setStyle(_741.effects[0].element,_73a);
}},_736);
return new v.Parallel([new v.Opacity(_735,{sync:true,to:0,from:1,transition:_736.opacityTransition}),new v.Scale(_735,/Opera/.test(navigator.userAgent)?1:0,{scaleMode:{originalHeight:dims.h,originalWidth:dims.w},sync:true,transition:_736.scaleTransition,scaleContent:_736.scaleContent,scaleFromCenter:_736.scaleFromCenter,restoreAfterFinish:true}),new v.Move(_735,{x:_73c,y:_73d,sync:true,transition:_736.moveTransition})],_73f);
};
MochiKit.Visual.pulsate=function(_742,_743){
var d=MochiKit.DOM;
var v=MochiKit.Visual;
var b=MochiKit.Base;
var _747=MochiKit.Style.getStyle(_742,"opacity");
_743=b.update({duration:3,from:0,afterFinishInternal:function(_748){
MochiKit.Style.setStyle(_748.element,{"opacity":_747});
}},_743);
var _749=_743.transition||v.Transitions.sinoidal;
_743.transition=function(pos){
return _749(1-v.Transitions.pulse(pos,_743.pulses));
};
return new v.Opacity(_742,_743);
};
MochiKit.Visual.fold=function(_74b,_74c){
var d=MochiKit.DOM;
var v=MochiKit.Visual;
var s=MochiKit.Style;
_74b=d.getElement(_74b);
var _750=s.getElementDimensions(_74b,true);
var _751={top:_74b.style.top,left:_74b.style.left,width:_74b.style.width,height:_74b.style.height};
var _752=s.makeClipping(_74b);
_74c=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleMode:{originalHeight:_750.h,originalWidth:_750.w},afterFinishInternal:function(_753){
new v.Scale(_74b,1,{scaleContent:false,scaleY:false,scaleMode:{originalHeight:_750.h,originalWidth:_750.w},afterFinishInternal:function(_754){
s.hideElement(_754.element);
s.undoClipping(_754.element,_752);
s.setStyle(_754.element,_751);
}});
}},_74c);
return new v.Scale(_74b,5,_74c);
};
MochiKit.Visual.Color=MochiKit.Color.Color;
MochiKit.Visual.getElementsComputedStyle=MochiKit.DOM.computedStyle;
MochiKit.Visual.__new__=function(){
var m=MochiKit.Base;
m.nameFunctions(this);
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};
};
MochiKit.Visual.EXPORT=["roundElement","roundClass","tagifyText","multiple","toggle","Parallel","Sequence","Opacity","Move","Scale","Highlight","ScrollTo","Morph","fade","appear","puff","blindUp","blindDown","switchOff","dropOut","shake","slideDown","slideUp","squish","grow","shrink","pulsate","fold"];
MochiKit.Visual.EXPORT_OK=["Base","PAIRS"];
MochiKit.Visual.__new__();
MochiKit.Base._exportSymbols(this,MochiKit.Visual);
MochiKit.Base._deps("DragAndDrop",["Base","Iter","DOM","Signal","Visual","Position"]);
MochiKit.DragAndDrop.NAME="MochiKit.DragAndDrop";
MochiKit.DragAndDrop.VERSION="1.4.2";
MochiKit.DragAndDrop.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.DragAndDrop.toString=function(){
return this.__repr__();
};
MochiKit.DragAndDrop.EXPORT=["Droppable","Draggable"];
MochiKit.DragAndDrop.EXPORT_OK=["Droppables","Draggables"];
MochiKit.DragAndDrop.Droppables={drops:[],remove:function(_756){
this.drops=MochiKit.Base.filter(function(d){
return d.element!=MochiKit.DOM.getElement(_756);
},this.drops);
},register:function(drop){
this.drops.push(drop);
},unregister:function(drop){
this.drops=MochiKit.Base.filter(function(d){
return d!=drop;
},this.drops);
},prepare:function(_75b){
MochiKit.Base.map(function(drop){
if(drop.isAccepted(_75b)){
if(drop.options.activeclass){
MochiKit.DOM.addElementClass(drop.element,drop.options.activeclass);
}
drop.options.onactive(drop.element,_75b);
}
},this.drops);
},findDeepestChild:function(_75d){
deepest=_75d[0];
for(i=1;i<_75d.length;++i){
if(MochiKit.DOM.isChildNode(_75d[i].element,deepest.element)){
deepest=_75d[i];
}
}
return deepest;
},show:function(_75e,_75f){
if(!this.drops.length){
return;
}
var _760=[];
if(this.last_active){
this.last_active.deactivate();
}
MochiKit.Iter.forEach(this.drops,function(drop){
if(drop.isAffected(_75e,_75f)){
_760.push(drop);
}
});
if(_760.length>0){
drop=this.findDeepestChild(_760);
MochiKit.Position.within(drop.element,_75e.page.x,_75e.page.y);
drop.options.onhover(_75f,drop.element,MochiKit.Position.overlap(drop.options.overlap,drop.element));
drop.activate();
}
},fire:function(_762,_763){
if(!this.last_active){
return;
}
MochiKit.Position.prepare();
if(this.last_active.isAffected(_762.mouse(),_763)){
this.last_active.options.ondrop(_763,this.last_active.element,_762);
}
},reset:function(_764){
MochiKit.Base.map(function(drop){
if(drop.options.activeclass){
MochiKit.DOM.removeElementClass(drop.element,drop.options.activeclass);
}
drop.options.ondesactive(drop.element,_764);
},this.drops);
if(this.last_active){
this.last_active.deactivate();
}
}};
MochiKit.DragAndDrop.Droppable=function(_766,_767){
var cls=arguments.callee;
if(!(this instanceof cls)){
return new cls(_766,_767);
}
this.__init__(_766,_767);
};
MochiKit.DragAndDrop.Droppable.prototype={__class__:MochiKit.DragAndDrop.Droppable,__init__:function(_769,_76a){
var d=MochiKit.DOM;
var b=MochiKit.Base;
this.element=d.getElement(_769);
this.options=b.update({greedy:true,hoverclass:null,activeclass:null,hoverfunc:b.noop,accept:null,onactive:b.noop,ondesactive:b.noop,onhover:b.noop,ondrop:b.noop,containment:[],tree:false},_76a);
this.options._containers=[];
b.map(MochiKit.Base.bind(function(c){
this.options._containers.push(d.getElement(c));
},this),this.options.containment);
MochiKit.Style.makePositioned(this.element);
MochiKit.DragAndDrop.Droppables.register(this);
},isContained:function(_76e){
if(this.options._containers.length){
var _76f;
if(this.options.tree){
_76f=_76e.treeNode;
}else{
_76f=_76e.parentNode;
}
return MochiKit.Iter.some(this.options._containers,function(c){
return _76f==c;
});
}else{
return true;
}
},isAccepted:function(_771){
return ((!this.options.accept)||MochiKit.Iter.some(this.options.accept,function(c){
return MochiKit.DOM.hasElementClass(_771,c);
}));
},isAffected:function(_773,_774){
return ((this.element!=_774)&&this.isContained(_774)&&this.isAccepted(_774)&&MochiKit.Position.within(this.element,_773.page.x,_773.page.y));
},deactivate:function(){
if(this.options.hoverclass){
MochiKit.DOM.removeElementClass(this.element,this.options.hoverclass);
}
this.options.hoverfunc(this.element,false);
MochiKit.DragAndDrop.Droppables.last_active=null;
},activate:function(){
if(this.options.hoverclass){
MochiKit.DOM.addElementClass(this.element,this.options.hoverclass);
}
this.options.hoverfunc(this.element,true);
MochiKit.DragAndDrop.Droppables.last_active=this;
},destroy:function(){
MochiKit.DragAndDrop.Droppables.unregister(this);
},repr:function(){
return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]";
}};
MochiKit.DragAndDrop.Draggables={drags:[],register:function(_775){
if(this.drags.length===0){
var conn=MochiKit.Signal.connect;
this.eventMouseUp=conn(document,"onmouseup",this,this.endDrag);
this.eventMouseMove=conn(document,"onmousemove",this,this.updateDrag);
this.eventKeypress=conn(document,"onkeypress",this,this.keyPress);
}
this.drags.push(_775);
},unregister:function(_777){
this.drags=MochiKit.Base.filter(function(d){
return d!=_777;
},this.drags);
if(this.drags.length===0){
var disc=MochiKit.Signal.disconnect;
disc(this.eventMouseUp);
disc(this.eventMouseMove);
disc(this.eventKeypress);
}
},activate:function(_77a){
window.focus();
this.activeDraggable=_77a;
},deactivate:function(){
this.activeDraggable=null;
},updateDrag:function(_77b){
if(!this.activeDraggable){
return;
}
var _77c=_77b.mouse();
if(this._lastPointer&&(MochiKit.Base.repr(this._lastPointer.page)==MochiKit.Base.repr(_77c.page))){
return;
}
this._lastPointer=_77c;
this.activeDraggable.updateDrag(_77b,_77c);
},endDrag:function(_77d){
if(!this.activeDraggable){
return;
}
this._lastPointer=null;
this.activeDraggable.endDrag(_77d);
this.activeDraggable=null;
},keyPress:function(_77e){
if(this.activeDraggable){
this.activeDraggable.keyPress(_77e);
}
},notify:function(_77f,_780,_781){
MochiKit.Signal.signal(this,_77f,_780,_781);
}};
MochiKit.DragAndDrop.Draggable=function(_782,_783){
var cls=arguments.callee;
if(!(this instanceof cls)){
return new cls(_782,_783);
}
this.__init__(_782,_783);
};
MochiKit.DragAndDrop.Draggable.prototype={__class__:MochiKit.DragAndDrop.Draggable,__init__:function(_785,_786){
var v=MochiKit.Visual;
var b=MochiKit.Base;
_786=b.update({handle:false,starteffect:function(_789){
this._savedOpacity=MochiKit.Style.getStyle(_789,"opacity")||1;
new v.Opacity(_789,{duration:0.2,from:this._savedOpacity,to:0.7});
},reverteffect:function(_78a,_78b,_78c){
var dur=Math.sqrt(Math.abs(_78b^2)+Math.abs(_78c^2))*0.02;
return new v.Move(_78a,{x:-_78c,y:-_78b,duration:dur});
},endeffect:function(_78e){
new v.Opacity(_78e,{duration:0.2,from:0.7,to:this._savedOpacity});
},onchange:b.noop,zindex:1000,revert:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false},_786);
var d=MochiKit.DOM;
this.element=d.getElement(_785);
if(_786.handle&&(typeof (_786.handle)=="string")){
this.handle=d.getFirstElementByTagAndClassName(null,_786.handle,this.element);
}
if(!this.handle){
this.handle=d.getElement(_786.handle);
}
if(!this.handle){
this.handle=this.element;
}
if(_786.scroll&&!_786.scroll.scrollTo&&!_786.scroll.outerHTML){
_786.scroll=d.getElement(_786.scroll);
this._isScrollChild=MochiKit.DOM.isChildNode(this.element,_786.scroll);
}
MochiKit.Style.makePositioned(this.element);
this.delta=this.currentDelta();
this.options=_786;
this.dragging=false;
this.eventMouseDown=MochiKit.Signal.connect(this.handle,"onmousedown",this,this.initDrag);
MochiKit.DragAndDrop.Draggables.register(this);
},destroy:function(){
MochiKit.Signal.disconnect(this.eventMouseDown);
MochiKit.DragAndDrop.Draggables.unregister(this);
},currentDelta:function(){
var s=MochiKit.Style.getStyle;
return [parseInt(s(this.element,"left")||"0"),parseInt(s(this.element,"top")||"0")];
},initDrag:function(_791){
if(!_791.mouse().button.left){
return;
}
var src=_791.target();
var _793=(src.tagName||"").toUpperCase();
if(_793==="INPUT"||_793==="SELECT"||_793==="OPTION"||_793==="BUTTON"||_793==="TEXTAREA"){
return;
}
if(this._revert){
this._revert.cancel();
this._revert=null;
}
var _794=_791.mouse();
var pos=MochiKit.Position.cumulativeOffset(this.element);
this.offset=[_794.page.x-pos.x,_794.page.y-pos.y];
MochiKit.DragAndDrop.Draggables.activate(this);
_791.stop();
},startDrag:function(_796){
this.dragging=true;
if(this.options.selectclass){
MochiKit.DOM.addElementClass(this.element,this.options.selectclass);
}
if(this.options.zindex){
this.originalZ=parseInt(MochiKit.Style.getStyle(this.element,"z-index")||"0");
this.element.style.zIndex=this.options.zindex;
}
if(this.options.ghosting){
this._clone=this.element.cloneNode(true);
this.ghostPosition=MochiKit.Position.absolutize(this.element);
this.element.parentNode.insertBefore(this._clone,this.element);
}
if(this.options.scroll){
if(this.options.scroll==window){
var _797=this._getWindowScroll(this.options.scroll);
this.originalScrollLeft=_797.left;
this.originalScrollTop=_797.top;
}else{
this.originalScrollLeft=this.options.scroll.scrollLeft;
this.originalScrollTop=this.options.scroll.scrollTop;
}
}
MochiKit.DragAndDrop.Droppables.prepare(this.element);
MochiKit.DragAndDrop.Draggables.notify("start",this,_796);
if(this.options.starteffect){
this.options.starteffect(this.element);
}
},updateDrag:function(_798,_799){
if(!this.dragging){
this.startDrag(_798);
}
MochiKit.Position.prepare();
MochiKit.DragAndDrop.Droppables.show(_799,this.element);
MochiKit.DragAndDrop.Draggables.notify("drag",this,_798);
this.draw(_799);
this.options.onchange(this);
if(this.options.scroll){
this.stopScrolling();
var p,q;
if(this.options.scroll==window){
var s=this._getWindowScroll(this.options.scroll);
p=new MochiKit.Style.Coordinates(s.left,s.top);
q=new MochiKit.Style.Coordinates(s.left+s.width,s.top+s.height);
}else{
p=MochiKit.Position.page(this.options.scroll);
p.x+=this.options.scroll.scrollLeft;
p.y+=this.options.scroll.scrollTop;
p.x+=(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0);
p.y+=(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);
q=new MochiKit.Style.Coordinates(p.x+this.options.scroll.offsetWidth,p.y+this.options.scroll.offsetHeight);
}
var _79d=[0,0];
if(_799.page.x>(q.x-this.options.scrollSensitivity)){
_79d[0]=_799.page.x-(q.x-this.options.scrollSensitivity);
}else{
if(_799.page.x<(p.x+this.options.scrollSensitivity)){
_79d[0]=_799.page.x-(p.x+this.options.scrollSensitivity);
}
}
if(_799.page.y>(q.y-this.options.scrollSensitivity)){
_79d[1]=_799.page.y-(q.y-this.options.scrollSensitivity);
}else{
if(_799.page.y<(p.y+this.options.scrollSensitivity)){
_79d[1]=_799.page.y-(p.y+this.options.scrollSensitivity);
}
}
this.startScrolling(_79d);
}
if(/AppleWebKit/.test(navigator.appVersion)){
window.scrollBy(0,0);
}
_798.stop();
},finishDrag:function(_79e,_79f){
var dr=MochiKit.DragAndDrop;
this.dragging=false;
if(this.options.selectclass){
MochiKit.DOM.removeElementClass(this.element,this.options.selectclass);
}
if(this.options.ghosting){
MochiKit.Position.relativize(this.element,this.ghostPosition);
MochiKit.DOM.removeElement(this._clone);
this._clone=null;
}
if(_79f){
dr.Droppables.fire(_79e,this.element);
}
dr.Draggables.notify("end",this,_79e);
var _7a1=this.options.revert;
if(_7a1&&typeof (_7a1)=="function"){
_7a1=_7a1(this.element);
}
var d=this.currentDelta();
if(_7a1&&this.options.reverteffect){
this._revert=this.options.reverteffect(this.element,d[1]-this.delta[1],d[0]-this.delta[0]);
}else{
this.delta=d;
}
if(this.options.zindex){
this.element.style.zIndex=this.originalZ;
}
if(this.options.endeffect){
this.options.endeffect(this.element);
}
dr.Draggables.deactivate();
dr.Droppables.reset(this.element);
},keyPress:function(_7a3){
if(_7a3.key().string!="KEY_ESCAPE"){
return;
}
this.finishDrag(_7a3,false);
_7a3.stop();
},endDrag:function(_7a4){
if(!this.dragging){
return;
}
this.stopScrolling();
this.finishDrag(_7a4,true);
_7a4.stop();
},draw:function(_7a5){
var pos=MochiKit.Position.cumulativeOffset(this.element);
var d=this.currentDelta();
pos.x-=d[0];
pos.y-=d[1];
if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){
pos.x-=this.options.scroll.scrollLeft-this.originalScrollLeft;
pos.y-=this.options.scroll.scrollTop-this.originalScrollTop;
}
var p=[_7a5.page.x-pos.x-this.offset[0],_7a5.page.y-pos.y-this.offset[1]];
if(this.options.snap){
if(typeof (this.options.snap)=="function"){
p=this.options.snap(p[0],p[1]);
}else{
if(this.options.snap instanceof Array){
var i=-1;
p=MochiKit.Base.map(MochiKit.Base.bind(function(v){
i+=1;
return Math.round(v/this.options.snap[i])*this.options.snap[i];
},this),p);
}else{
p=MochiKit.Base.map(MochiKit.Base.bind(function(v){
return Math.round(v/this.options.snap)*this.options.snap;
},this),p);
}
}
}
var _7ac=this.element.style;
if((!this.options.constraint)||(this.options.constraint=="horizontal")){
_7ac.left=p[0]+"px";
}
if((!this.options.constraint)||(this.options.constraint=="vertical")){
_7ac.top=p[1]+"px";
}
if(_7ac.visibility=="hidden"){
_7ac.visibility="";
}
},stopScrolling:function(){
if(this.scrollInterval){
clearInterval(this.scrollInterval);
this.scrollInterval=null;
MochiKit.DragAndDrop.Draggables._lastScrollPointer=null;
}
},startScrolling:function(_7ad){
if(!_7ad[0]&&!_7ad[1]){
return;
}
this.scrollSpeed=[_7ad[0]*this.options.scrollSpeed,_7ad[1]*this.options.scrollSpeed];
this.lastScrolled=new Date();
this.scrollInterval=setInterval(MochiKit.Base.bind(this.scroll,this),10);
},scroll:function(){
var _7ae=new Date();
var _7af=_7ae-this.lastScrolled;
this.lastScrolled=_7ae;
if(this.options.scroll==window){
var s=this._getWindowScroll(this.options.scroll);
if(this.scrollSpeed[0]||this.scrollSpeed[1]){
var dm=_7af/1000;
this.options.scroll.scrollTo(s.left+dm*this.scrollSpeed[0],s.top+dm*this.scrollSpeed[1]);
}
}else{
this.options.scroll.scrollLeft+=this.scrollSpeed[0]*_7af/1000;
this.options.scroll.scrollTop+=this.scrollSpeed[1]*_7af/1000;
}
var d=MochiKit.DragAndDrop;
MochiKit.Position.prepare();
d.Droppables.show(d.Draggables._lastPointer,this.element);
d.Draggables.notify("drag",this);
if(this._isScrollChild){
d.Draggables._lastScrollPointer=d.Draggables._lastScrollPointer||d.Draggables._lastPointer;
d.Draggables._lastScrollPointer.x+=this.scrollSpeed[0]*_7af/1000;
d.Draggables._lastScrollPointer.y+=this.scrollSpeed[1]*_7af/1000;
if(d.Draggables._lastScrollPointer.x<0){
d.Draggables._lastScrollPointer.x=0;
}
if(d.Draggables._lastScrollPointer.y<0){
d.Draggables._lastScrollPointer.y=0;
}
this.draw(d.Draggables._lastScrollPointer);
}
this.options.onchange(this);
},_getWindowScroll:function(win){
var vp,w,h;
MochiKit.DOM.withWindow(win,function(){
vp=MochiKit.Style.getViewportPosition(win.document);
});
if(win.innerWidth){
w=win.innerWidth;
h=win.innerHeight;
}else{
if(win.document.documentElement&&win.document.documentElement.clientWidth){
w=win.document.documentElement.clientWidth;
h=win.document.documentElement.clientHeight;
}else{
w=win.document.body.offsetWidth;
h=win.document.body.offsetHeight;
}
}
return {top:vp.y,left:vp.x,width:w,height:h};
},repr:function(){
return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]";
}};
MochiKit.DragAndDrop.__new__=function(){
MochiKit.Base.nameFunctions(this);
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
};
MochiKit.DragAndDrop.__new__();
MochiKit.Base._exportSymbols(this,MochiKit.DragAndDrop);
MochiKit.Base._deps("Sortable",["Base","Iter","DOM","Position","DragAndDrop"]);
MochiKit.Sortable.NAME="MochiKit.Sortable";
MochiKit.Sortable.VERSION="1.4.2";
MochiKit.Sortable.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Sortable.toString=function(){
return this.__repr__();
};
MochiKit.Sortable.EXPORT=[];
MochiKit.Sortable.EXPORT_OK=[];
MochiKit.Base.update(MochiKit.Sortable,{sortables:{},_findRootElement:function(_7b7){
while(_7b7.tagName.toUpperCase()!="BODY"){
if(_7b7.id&&MochiKit.Sortable.sortables[_7b7.id]){
return _7b7;
}
_7b7=_7b7.parentNode;
}
},_createElementId:function(_7b8){
if(_7b8.id==null||_7b8.id==""){
var d=MochiKit.DOM;
var id;
var _7bb=1;
while(d.getElement(id="sortable"+_7bb)!=null){
_7bb+=1;
}
d.setNodeAttribute(_7b8,"id",id);
}
},options:function(_7bc){
_7bc=MochiKit.Sortable._findRootElement(MochiKit.DOM.getElement(_7bc));
if(!_7bc){
return;
}
return MochiKit.Sortable.sortables[_7bc.id];
},destroy:function(_7bd){
var s=MochiKit.Sortable.options(_7bd);
var b=MochiKit.Base;
var d=MochiKit.DragAndDrop;
if(s){
MochiKit.Signal.disconnect(s.startHandle);
MochiKit.Signal.disconnect(s.endHandle);
b.map(function(dr){
d.Droppables.remove(dr);
},s.droppables);
b.map(function(dr){
dr.destroy();
},s.draggables);
delete MochiKit.Sortable.sortables[s.element.id];
}
},create:function(_7c3,_7c4){
_7c3=MochiKit.DOM.getElement(_7c3);
var self=MochiKit.Sortable;
self._createElementId(_7c3);
_7c4=MochiKit.Base.update({element:_7c3,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:[_7c3],handle:false,only:false,hoverclass:null,ghosting:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:/^[^_]*_(.*)$/,onChange:MochiKit.Base.noop,onUpdate:MochiKit.Base.noop,accept:null},_7c4);
self.destroy(_7c3);
var _7c6={revert:true,ghosting:_7c4.ghosting,scroll:_7c4.scroll,scrollSensitivity:_7c4.scrollSensitivity,scrollSpeed:_7c4.scrollSpeed,constraint:_7c4.constraint,handle:_7c4.handle};
if(_7c4.starteffect){
_7c6.starteffect=_7c4.starteffect;
}
if(_7c4.reverteffect){
_7c6.reverteffect=_7c4.reverteffect;
}else{
if(_7c4.ghosting){
_7c6.reverteffect=function(_7c7){
_7c7.style.top=0;
_7c7.style.left=0;
};
}
}
if(_7c4.endeffect){
_7c6.endeffect=_7c4.endeffect;
}
if(_7c4.zindex){
_7c6.zindex=_7c4.zindex;
}
var _7c8={overlap:_7c4.overlap,containment:_7c4.containment,hoverclass:_7c4.hoverclass,onhover:self.onHover,tree:_7c4.tree,accept:_7c4.accept};
var _7c9={onhover:self.onEmptyHover,overlap:_7c4.overlap,containment:_7c4.containment,hoverclass:_7c4.hoverclass,accept:_7c4.accept};
MochiKit.DOM.removeEmptyTextNodes(_7c3);
_7c4.draggables=[];
_7c4.droppables=[];
if(_7c4.dropOnEmpty||_7c4.tree){
new MochiKit.DragAndDrop.Droppable(_7c3,_7c9);
_7c4.droppables.push(_7c3);
}
MochiKit.Base.map(function(e){
var _7cb=_7c4.handle?MochiKit.DOM.getFirstElementByTagAndClassName(null,_7c4.handle,e):e;
_7c4.draggables.push(new MochiKit.DragAndDrop.Draggable(e,MochiKit.Base.update(_7c6,{handle:_7cb})));
new MochiKit.DragAndDrop.Droppable(e,_7c8);
if(_7c4.tree){
e.treeNode=_7c3;
}
_7c4.droppables.push(e);
},(self.findElements(_7c3,_7c4)||[]));
if(_7c4.tree){
MochiKit.Base.map(function(e){
new MochiKit.DragAndDrop.Droppable(e,_7c9);
e.treeNode=_7c3;
_7c4.droppables.push(e);
},(self.findTreeElements(_7c3,_7c4)||[]));
}
self.sortables[_7c3.id]=_7c4;
_7c4.lastValue=self.serialize(_7c3);
_7c4.startHandle=MochiKit.Signal.connect(MochiKit.DragAndDrop.Draggables,"start",MochiKit.Base.partial(self.onStart,_7c3));
_7c4.endHandle=MochiKit.Signal.connect(MochiKit.DragAndDrop.Draggables,"end",MochiKit.Base.partial(self.onEnd,_7c3));
},onStart:function(_7cd,_7ce){
var self=MochiKit.Sortable;
var _7d0=self.options(_7cd);
_7d0.lastValue=self.serialize(_7d0.element);
},onEnd:function(_7d1,_7d2){
var self=MochiKit.Sortable;
self.unmark();
var _7d4=self.options(_7d1);
if(_7d4.lastValue!=self.serialize(_7d4.element)){
_7d4.onUpdate(_7d4.element);
}
},findElements:function(_7d5,_7d6){
return MochiKit.Sortable.findChildren(_7d5,_7d6.only,_7d6.tree,_7d6.tag);
},findTreeElements:function(_7d7,_7d8){
return MochiKit.Sortable.findChildren(_7d7,_7d8.only,_7d8.tree?true:false,_7d8.treeTag);
},findChildren:function(_7d9,only,_7db,_7dc){
if(!_7d9.hasChildNodes()){
return null;
}
_7dc=_7dc.toUpperCase();
if(only){
only=MochiKit.Base.flattenArray([only]);
}
var _7dd=[];
MochiKit.Base.map(function(e){
if(e.tagName&&e.tagName.toUpperCase()==_7dc&&(!only||MochiKit.Iter.some(only,function(c){
return MochiKit.DOM.hasElementClass(e,c);
}))){
_7dd.push(e);
}
if(_7db){
var _7e0=MochiKit.Sortable.findChildren(e,only,_7db,_7dc);
if(_7e0&&_7e0.length>0){
_7dd=_7dd.concat(_7e0);
}
}
},_7d9.childNodes);
return _7dd;
},onHover:function(_7e1,_7e2,_7e3){
if(MochiKit.DOM.isChildNode(_7e2,_7e1)){
return;
}
var self=MochiKit.Sortable;
if(_7e3>0.33&&_7e3<0.66&&self.options(_7e2).tree){
return;
}else{
if(_7e3>0.5){
self.mark(_7e2,"before");
if(_7e2.previousSibling!=_7e1){
var _7e5=_7e1.parentNode;
_7e1.style.visibility="hidden";
_7e2.parentNode.insertBefore(_7e1,_7e2);
if(_7e2.parentNode!=_7e5){
self.options(_7e5).onChange(_7e1);
}
self.options(_7e2.parentNode).onChange(_7e1);
}
}else{
self.mark(_7e2,"after");
var _7e6=_7e2.nextSibling||null;
if(_7e6!=_7e1){
var _7e5=_7e1.parentNode;
_7e1.style.visibility="hidden";
_7e2.parentNode.insertBefore(_7e1,_7e6);
if(_7e2.parentNode!=_7e5){
self.options(_7e5).onChange(_7e1);
}
self.options(_7e2.parentNode).onChange(_7e1);
}
}
}
},_offsetSize:function(_7e7,type){
if(type=="vertical"||type=="height"){
return _7e7.offsetHeight;
}else{
return _7e7.offsetWidth;
}
},onEmptyHover:function(_7e9,_7ea,_7eb){
var _7ec=_7e9.parentNode;
var self=MochiKit.Sortable;
var _7ee=self.options(_7ea);
if(!MochiKit.DOM.isChildNode(_7ea,_7e9)){
var _7ef;
var _7f0=self.findElements(_7ea,{tag:_7ee.tag,only:_7ee.only});
var _7f1=null;
if(_7f0){
var _7f2=self._offsetSize(_7ea,_7ee.overlap)*(1-_7eb);
for(_7ef=0;_7ef<_7f0.length;_7ef+=1){
if(_7f2-self._offsetSize(_7f0[_7ef],_7ee.overlap)>=0){
_7f2-=self._offsetSize(_7f0[_7ef],_7ee.overlap);
}else{
if(_7f2-(self._offsetSize(_7f0[_7ef],_7ee.overlap)/2)>=0){
_7f1=_7ef+1<_7f0.length?_7f0[_7ef+1]:null;
break;
}else{
_7f1=_7f0[_7ef];
break;
}
}
}
}
_7ea.insertBefore(_7e9,_7f1);
self.options(_7ec).onChange(_7e9);
_7ee.onChange(_7e9);
}
},unmark:function(){
var m=MochiKit.Sortable._marker;
if(m){
MochiKit.Style.hideElement(m);
}
},mark:function(_7f4,_7f5){
var d=MochiKit.DOM;
var self=MochiKit.Sortable;
var _7f8=self.options(_7f4.parentNode);
if(_7f8&&!_7f8.ghosting){
return;
}
if(!self._marker){
self._marker=d.getElement("dropmarker")||document.createElement("DIV");
MochiKit.Style.hideElement(self._marker);
d.addElementClass(self._marker,"dropmarker");
self._marker.style.position="absolute";
document.getElementsByTagName("body").item(0).appendChild(self._marker);
}
var _7f9=MochiKit.Position.cumulativeOffset(_7f4);
self._marker.style.left=_7f9.x+"px";
self._marker.style.top=_7f9.y+"px";
if(_7f5=="after"){
if(_7f8.overlap=="horizontal"){
self._marker.style.left=(_7f9.x+_7f4.clientWidth)+"px";
}else{
self._marker.style.top=(_7f9.y+_7f4.clientHeight)+"px";
}
}
MochiKit.Style.showElement(self._marker);
},_tree:function(_7fa,_7fb,_7fc){
var self=MochiKit.Sortable;
var _7fe=self.findElements(_7fa,_7fb)||[];
for(var i=0;i<_7fe.length;++i){
var _800=_7fe[i].id.match(_7fb.format);
if(!_800){
continue;
}
var _801={id:encodeURIComponent(_800?_800[1]:null),element:_7fa,parent:_7fc,children:[],position:_7fc.children.length,container:self._findChildrenElement(_7fe[i],_7fb.treeTag.toUpperCase())};
if(_801.container){
self._tree(_801.container,_7fb,_801);
}
_7fc.children.push(_801);
}
return _7fc;
},_findChildrenElement:function(_802,_803){
if(_802&&_802.hasChildNodes){
_803=_803.toUpperCase();
for(var i=0;i<_802.childNodes.length;++i){
if(_802.childNodes[i].tagName.toUpperCase()==_803){
return _802.childNodes[i];
}
}
}
return null;
},tree:function(_805,_806){
_805=MochiKit.DOM.getElement(_805);
var _807=MochiKit.Sortable.options(_805);
_806=MochiKit.Base.update({tag:_807.tag,treeTag:_807.treeTag,only:_807.only,name:_805.id,format:_807.format},_806||{});
var root={id:null,parent:null,children:new Array,container:_805,position:0};
return MochiKit.Sortable._tree(_805,_806,root);
},setSequence:function(_809,_80a,_80b){
var self=MochiKit.Sortable;
var b=MochiKit.Base;
_809=MochiKit.DOM.getElement(_809);
_80b=b.update(self.options(_809),_80b||{});
var _80e={};
b.map(function(n){
var m=n.id.match(_80b.format);
if(m){
_80e[m[1]]=[n,n.parentNode];
}
n.parentNode.removeChild(n);
},self.findElements(_809,_80b));
b.map(function(_811){
var n=_80e[_811];
if(n){
n[1].appendChild(n[0]);
delete _80e[_811];
}
},_80a);
},_constructIndex:function(node){
var _814="";
do{
if(node.id){
_814="["+node.position+"]"+_814;
}
}while((node=node.parent)!=null);
return _814;
},sequence:function(_815,_816){
_815=MochiKit.DOM.getElement(_815);
var self=MochiKit.Sortable;
var _816=MochiKit.Base.update(self.options(_815),_816||{});
return MochiKit.Base.map(function(item){
return item.id.match(_816.format)?item.id.match(_816.format)[1]:"";
},MochiKit.DOM.getElement(self.findElements(_815,_816)||[]));
},serialize:function(_819,_81a){
_819=MochiKit.DOM.getElement(_819);
var self=MochiKit.Sortable;
_81a=MochiKit.Base.update(self.options(_819),_81a||{});
var name=encodeURIComponent(_81a.name||_819.id);
if(_81a.tree){
return MochiKit.Base.flattenArray(MochiKit.Base.map(function(item){
return [name+self._constructIndex(item)+"[id]="+encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
},self.tree(_819,_81a).children)).join("&");
}else{
return MochiKit.Base.map(function(item){
return name+"[]="+encodeURIComponent(item);
},self.sequence(_819,_81a)).join("&");
}
}});
MochiKit.Sortable.Sortable=MochiKit.Sortable;
MochiKit.Sortable.__new__=function(){
MochiKit.Base.nameFunctions(this);
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
};
MochiKit.Sortable.__new__();
MochiKit.Base._exportSymbols(this,MochiKit.Sortable);
if(typeof (MochiKit)=="undefined"){
MochiKit={};
}
if(typeof (MochiKit.MochiKit)=="undefined"){
MochiKit.MochiKit={};
}
MochiKit.MochiKit.NAME="MochiKit.MochiKit";
MochiKit.MochiKit.VERSION="1.4.2";
MochiKit.MochiKit.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.MochiKit.toString=function(){
return this.__repr__();
};
MochiKit.MochiKit.SUBMODULES=["Base","Iter","Logging","DateTime","Format","Async","DOM","Selector","Style","LoggingPane","Color","Signal","Position","Visual","DragAndDrop","Sortable"];
if(typeof (JSAN)!="undefined"||typeof (dojo)!="undefined"){
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.MochiKit");
(function(lst){
for(var i=0;i");
}
}
})();
}