/***

    MochiKit.MochiKit 0.80 : PACKED VERSION

    THIS FILE IS AUTOMATICALLY GENERATED.  If creating patches, please
    diff against the source tree, not this file.

    See <http://mochikit.com/> for documentation, downloads, license, etc.

    (c) 2005 Bob Ippolito.  All rights Reserved.

***/

if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.Compat");
}
if(typeof (MochiKit)=="undefined"){
MochiKit={};
}
if(typeof (MochiKit.Compat)=="undefined"){
MochiKit.Compat={};
}
MochiKit.Compat.NAME="MochiKit.Compat";
MochiKit.Compat.VERSION="0.80";
MochiKit.Compat.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Compat.toString=function(){
return this.__repr__();
};
if(!Array.prototype.push){
Array.prototype.push=function(){
var _1=this.length;
for(var i=0;i<arguments.length;i++){
this[_1+i]=arguments[i];
}
return this.length;
};
}
if(!Function.prototype.apply){
Function.prototype.apply=function(_3,_4){
var _5=[];
if(!_3){
_3=window;
}
if(!_4){
_4=[];
}
for(var i=0;i<_4.length;i++){
_5[i]="parameters["+i+"]";
}
_3.__apply__=this;
var _6=eval("object.__apply__("+_5.join(", ")+")");
_3.__apply__=null;
return _6;
};
}
MochiKit.Compat.EXPORT=[];
MochiKit.Compat.EXPORT_OK=[];
MochiKit.Compat.EXPORT_TAGS={":all":[],":common":[]};
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.Base");
}
if(typeof (MochiKit)=="undefined"){
MochiKit={};
}
if(typeof (MochiKit.Base)=="undefined"){
MochiKit.Base={};
}
MochiKit.Base.VERSION="0.80";
MochiKit.Base.NAME="MochiKit.Base";
MochiKit.Base.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Base.toString=function(){
return this.__repr__();
};
MochiKit.Base.clone=function(_7){
var me=arguments.callee;
if(arguments.length==1){
me.prototype=_7;
return new me();
}
};
MochiKit.Base.extend=function(_9,obj,_11){
if(!_11){
_11=0;
}
if(obj){
var l=obj.length;
if(typeof (l)!="number"){
if(MochiKit.Iter){
obj=MochiKit.Iter.list(obj);
l=obj.length;
}else{
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
}
}
if(!_9){
_9=[];
}
for(var i=_11;i<l;i++){
_9.push(obj[i]);
}
}
return _9;
};
MochiKit.Base.update=function(_13,obj){
if(_13==null){
_13={};
}
for(var i=1;i<arguments.length;i++){
var o=arguments[i];
if(typeof (o)!="undefined"&&o!=null){
for(var k in o){
_13[k]=o[k];
}
}
}
return _13;
};
MochiKit.Base.setdefault=function(_16,obj){
if(_16==null){
_16={};
}
for(var i=1;i<arguments.length;i++){
var o=arguments[i];
for(var k in o){
if(!(k in _16)){
_16[k]=o[k];
}
}
}
return _16;
};
MochiKit.Base.keys=function(obj){
var _17=[];
for(var _18 in obj){
_17.push(_18);
}
return _17;
};
MochiKit.Base.items=function(obj){
var _19=[];
for(var _20 in obj){
_19.push([_20,obj[_20]]);
}
return _19;
};
MochiKit.Base.NamedError=function(_21){
this.message=_21;
this.name=_21;
};
MochiKit.Base.NamedError.prototype=new Error();
MochiKit.Base.NamedError.prototype.repr=function(){
if(this.message&&this.message!=this.name){
return this.name+"("+repr(this.message)+")";
}else{
return this.name+"()";
}
};
MochiKit.Base.NamedError.prototype.toString=function(){
return this.repr();
};
MochiKit.Base.operator={"truth":function(a){
return !!a;
},"lognot":function(a){
return !a;
},"identity":function(a){
return a;
},"not":function(a){
return ~a;
},"neg":function(a){
return -a;
},"add":function(a,b){
return a+b;
},"div":function(a,b){
return a/b;
},"mod":function(a,b){
return a%b;
},"and":function(a,b){
return a&b;
},"or":function(a,b){
return a|b;
},"xor":function(a,b){
return a^b;
},"lshift":function(a,b){
return a<<b;
},"rshift":function(a,b){
return a>>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 a<b;
},"le":function(a,b){
return a<=b;
},"ceq":function(a,b){
return MochiKit.Base.compare(a,b)==0;
},"cne":function(a,b){
return MochiKit.Base.compare(a,b)!=0;
},"cgt":function(a,b){
return MochiKit.Base.compare(a,b)==1;
},"cge":function(a,b){
return MochiKit.Base.compare(a,b)!=-1;
},"clt":function(a,b){
return MochiKit.Base.compare(a,b)==-1;
},"cle":function(a,b){
return MochiKit.Base.compare(a,b)!=1;
},"logand":function(a,b){
return a&&b;
},"logor":function(a,b){
return a||b;
},"contains":function(a,b){
return b in a;
}};
MochiKit.Base.forward=function(_24){
return function(){
return this[_24].apply(this,arguments);
};
};
MochiKit.Base.itemgetter=function(_25){
return function(arg){
return arg[_25];
};
};
MochiKit.Base.typeMatcher=function(){
var _27={};
for(var i=0;i<arguments.length;i++){
var typ=arguments[i];
_27[typ]=typ;
}
return function(){
for(var i=0;i<arguments.length;i++){
if(!(typeof (arguments[i]) in _27)){
return false;
}
}
return true;
};
};
MochiKit.Base.isNull=function(){
for(var i=0;i<arguments.length;i++){
if(arguments[i]!=null){
return false;
}
}
return true;
};
MochiKit.Base.isUndefinedOrNull=function(){
for(var i=0;i<arguments.length;i++){
var o=arguments[i];
if(!(typeof (o)=="undefined"||o==null)){
return false;
}
}
return true;
};
MochiKit.Base.isNotEmpty=function(obj){
for(var i=0;i<arguments.length;i++){
var o=arguments[i];
if(!(o&&o.length)){
return false;
}
}
return true;
};
MochiKit.Base.isArrayLike=function(){
for(var i=0;i<arguments.length;i++){
var o=arguments[i];
var typ=typeof (o);
if((typ!="object"&&!(typ=="function"&&typeof (o.item)=="function"))||o==null||typeof (o.length)!="number"){
return false;
}
}
return true;
};
MochiKit.Base.isDateLike=function(){
for(var i=0;i<arguments.length;i++){
var o=arguments[i];
if(typeof (o)!="object"||typeof (o.getTime)!="function"){
return false;
}
}
return true;
};
MochiKit.Base.xmap=function(fn){
if(fn==null){
return MochiKit.Base.extend(null,arguments,1);
}
var _30=[];
for(var i=1;i<arguments.length;i++){
_30.push(fn(arguments[i]));
}
return _30;
};
MochiKit.Base.map=function(fn,lst){
var _32=MochiKit.Base.isArrayLike;
if(arguments.length<=2){
if(!_32(lst)){
if(MochiKit.Iter){
lst=MochiKit.Iter.list(lst);
if(fn==null){
return lst;
}
}else{
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
}
}
if(fn==null){
return MochiKit.Base.extend(null,lst);
}
if(false&&typeof (Array.prototype.map)=="function"){
return Array.prototype.map.call(lst,fn);
}
var _33=[];
for(var i=0;i<lst.length;i++){
_33.push(fn(lst[i]));
}
return _33;
}else{
if(fn==null){
fn=Array;
}
var _34=null;
for(var i=1;i<arguments.length;i++){
if(!_32(arguments[i])){
if(MochiKit.Iter){
arguments[i]=MochiKit.Iter.list(arguments[i]);
}else{
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
}
}
var l=arguments[i].length;
if(_34==null||_34>l){
_34=l;
}
}
var _33=[];
for(var i=0;i<_34;i++){
var _35=[];
for(var j=1;j<arguments.length;j++){
_35.push(arguments[j][i]);
}
_33.push(fn.apply(this,_35));
}
return _33;
}
};
MochiKit.Base.xfilter=function(fn){
var _37=[];
if(fn==null){
fn=MochiKit.Base.operator.truth;
}
for(var i=1;i<arguments.length;i++){
var o=arguments[i];
if(fn(o)){
_37.push(o);
}
}
return _37;
};
MochiKit.Base.filter=function(fn,lst,_38){
var _39=[];
if(!MochiKit.Base.isArrayLike(lst)){
if(MochiKit.Iter){
lst=MochiKit.Iter.list(lst);
}else{
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");
}
}
if(fn==null){
fn=MochiKit.Base.operator.truth;
}
if(typeof (Array.prototype.filter)=="function"){
return Array.prototype.filter.call(lst,fn,_38);
}else{
if(typeof (_38)=="undefined"||_38==null){
for(var i=0;i<lst.length;i++){
var o=lst[i];
if(fn(o)){
_39.push(o);
}
}
}else{
for(var i=0;i<lst.length;i++){
var o=lst[i];
if(fn.call(_38,o)){
_39.push(o);
}
}
}
}
return _39;
};
MochiKit.Base.bind=function(_40,_41){
var _42=_40.im_func;
var _43=_40.im_preargs;
var _44=_40.im_self;
if(typeof (_42)!="function"){
_42=_40;
}
if(typeof (_41)!="undefined"){
_44=_41;
}
if(typeof (_43)=="undefined"){
_43=[];
}else{
_43=_43.slice();
}
MochiKit.Base.extend(_43,arguments,2);
var _45=function(){
var _46=arguments;
var me=arguments.callee;
if(me.im_preargs.length>0){
_46=MochiKit.Base.concat(me.im_preargs,_46);
}
var _41=me.im_self;
if(!_41){
_41=this;
}
return me.im_func.apply(_41,_46);
};
_45.im_self=_44;
_45.im_func=_42;
_45.im_preargs=_43;
return _45;
};
MochiKit.Base.bindMethods=function(_47){
for(var k in _47){
var _48=_47[k];
if(typeof (_48)=="function"){
_47[k]=bind(_48,_47);
}
}
};
MochiKit.Base.NotFound=new MochiKit.Base.NamedError("MochiKit.Base.NotFound");
MochiKit.Base.AdapterRegistry=function(){
this.pairs=[];
};
MochiKit.Base.AdapterRegistry.prototype.register=function(_49,_50,_51,_52){
if(_52){
this.pairs.unshift([_49,_50,_51]);
}else{
this.pairs.push([_49,_50,_51]);
}
};
MochiKit.Base.AdapterRegistry.prototype.match=function(){
for(var i=0;i<this.pairs.length;i++){
var _53=this.pairs[i];
if(_53[1].apply(this,arguments)){
return _53[2].apply(this,arguments);
}
}
throw MochiKit.Base.NotFound;
};
MochiKit.Base.AdapterRegistry.prototype.unregister=function(_54){
for(var i=0;i<this.pairs.length;i++){
var _55=this.pairs[i];
if(_55[0]==_54){
this.pairs.splice(i,1);
return true;
}
}
return false;
};
MochiKit.Base.registerComparator=function(_56,_57,_58,_59){
MochiKit.Base.comparatorRegistry.register(_56,_57,_58,_59);
};
MochiKit.Base.compare=function(a,b){
if(a==b){
return 0;
}
var _60=(typeof (a)=="undefined"||a==null);
var _61=(typeof (b)=="undefined"||b==null);
if(_60&&_61){
return 0;
}else{
if(_60){
return -1;
}else{
if(_61){
return 1;
}
}
}
try{
return MochiKit.Base.comparatorRegistry.match(a,b);
}
catch(e){
if(e!=MochiKit.Base.NotFound){
throw e;
}
if(a<b){
return -1;
}else{
if(a>b){
return 1;
}
}
var _62=MochiKit.Base.repr;
throw new TypeError(_62(a)+" and "+_62(b)+" can not be compared");
}
};
MochiKit.Base.compareDateLike=function(a,b){
a=a.getTime();
b=b.getTime();
if(a==b){
return 0;
}else{
if(a<b){
return -1;
}else{
if(a>b){
return 1;
}
}
}
var _63=MochiKit.Base.repr;
throw new TypeError(_63(a)+" and "+_63(b)+" can not be compared");
};
MochiKit.Base.compareArrayLike=function(a,b){
var _64=MochiKit.Base.compare;
var _65=a.length;
var _66=0;
if(_65>b.length){
_66=1;
}else{
if(_65<b.length){
_66=-1;
_65=b.length;
}
}
for(var i=0;i<_65;i++){
var cmp=_64(a[i],b[i]);
if(cmp){
return cmp;
}
}
return _66;
};
MochiKit.Base.registerRepr=function(_68,_69,_70,_71){
MochiKit.Base.reprRegistry.register(_68,_69,_70,_71);
};
MochiKit.Base.repr=function(o){
try{
if(typeof (o.__repr__)=="function"){
return o.__repr__();
}else{
if(typeof (o.repr)=="function"&&o.repr!=arguments.callee){
return o.repr();
}
}
return MochiKit.Base.reprRegistry.match(o);
}
catch(e){
if(typeof (o.NAME)=="string"&&(o.toString==Function.prototype.toString||o.toString==Object.prototype.toString)){
return o.NAME;
}
return o;
}
};
MochiKit.Base.reprArrayLike=function(o){
return "["+MochiKit.Base.map(MochiKit.Base.repr,o).join(", ")+"]";
};
MochiKit.Base.reprString=function(o){
o="\""+o.replace(/(["\\])/g,"\\$1")+"\"";
o=o.replace(/(\n)/g,"\\n");
o=o.replace(/(\t)/g,"\\t");
o=o.replace(/(\r)/g,"\\r");
return o;
};
MochiKit.Base.reprNumber=function(o){
return o.toString();
};
MochiKit.Base.reprUndefined=function(o){
return "undefined";
};
MochiKit.Base.reprNull=function(o){
return "null";
};
MochiKit.Base.objEqual=function(a,b){
return (MochiKit.Base.compare(a,b)==0);
};
MochiKit.Base.arrayEqual=function(_72,arr){
if(_72.length!=arr.length){
return false;
}
return (MochiKit.Base.compare(_72,arr)==0);
};
MochiKit.Base.concat=function(){
var _74=[];
var _75=MochiKit.Base.extend;
for(var i=0;i<arguments.length;i++){
_75(_74,arguments[i]);
}
return _74;
};
MochiKit.Base.keyComparator=function(key){
var _77=MochiKit.Base.compare;
if(arguments.length==1){
return function(a,b){
return _77(a[key],b[key]);
};
}
var _78=MochiKit.Base.extend(null,arguments);
return function(a,b){
var _79=0;
for(var i=0;(_79==0)&&(i<_78.length);i++){
var key=_78[i];
_79=_77(a[key],b[key]);
}
return _79;
};
};
MochiKit.Base.reverseKeyComparator=function(key){
var _80=MochiKit.Base.keyComparator.apply(this,arguments);
return function(a,b){
return _80(b,a);
};
};
MochiKit.Base.partial=function(_81){
return MochiKit.Base.bind.apply(this,MochiKit.Base.extend([_81,undefined],arguments,1));
};
MochiKit.Base.listMinMax=function(_82,lst){
if(lst.length==0){
return null;
}
var cur=lst[0];
var _84=MochiKit.Base.compare;
for(var i=1;i<lst.length;i++){
var o=lst[i];
if(_84(o,cur)==_82){
cur=o;
}
}
return cur;
};
MochiKit.Base.objMax=function(){
return MochiKit.Base.listMinMax(1,arguments);
};
MochiKit.Base.objMin=function(){
return MochiKit.Base.listMinMax(-1,arguments);
};
MochiKit.Base.nodeWalk=function(_85,_86){
var _87=[_85];
var _88=MochiKit.Base.extend;
while(_87.length){
var res=_86(_87.shift());
if(res){
_88(_87,res);
}
}
};
MochiKit.Base.nameFunctions=function(_90){
var _91=_90.NAME;
if(typeof (_91)=="undefined"){
_91="";
}else{
_91=_91+".";
}
for(var _92 in _90){
var o=_90[_92];
if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){
try{
o.NAME=_91+_92;
}
catch(e){
}
}
}
};
MochiKit.Base.urlEncode=function(_93){
var _94=escape(_93).replace(/\+/g,"%2B").replace(/\"/g,"%22");
return _94.replace(/\'/g,"%27");
};
MochiKit.Base.queryString=function(_95,_96){
if(arguments.length==1){
var o=_95;
_95=[];
_96=[];
for(var k in o){
var v=o[k];
if(typeof (v)!="function"){
_95.push(k);
_96.push(v);
}
}
}
var _98=[];
var len=Math.min(_95.length,_96.length);
var _100=MochiKit.Base.urlEncode;
for(var i=0;i<len;i++){
var v=_96[i];
if(typeof (v)!="undefined"&&v!=null){
_98.push(_100(_95[i])+"="+_100(v));
}
}
return _98.join("&");
};
MochiKit.Base.parseQueryString=function(_101,_102){
var _103=_101.replace(/\+/g,"%20").split("&");
var o={};
if(_102){
for(var i=0;i<_103.length;i++){
var pair=_103[i].split("=");
var name=unescape(pair[0]);
var arr=o[name];
if(!(arr instanceof Array)){
arr=[];
o[name]=arr;
}
arr.push(unescape(pair[1]));
}
}else{
for(var i=0;i<_103.length;i++){
var pair=_103[i].split("=");
o[unescape(pair[0])]=unescape(pair[1]);
}
}
return o;
};
MochiKit.Base.EXPORT=["clone","extend","update","setdefault","keys","items","NamedError","operator","forward","itemgetter","typeMatcher","isCallable","isUndefined","isUndefinedOrNull","isNull","isNotEmpty","isArrayLike","isDateLike","xmap","map","xfilter","filter","bind","bindMethods","NotFound","AdapterRegistry","registerComparator","compare","registerRepr","repr","objEqual","arrayEqual","concat","keyComparator","reverseKeyComparator","partial","merge","listMinMax","listMax","listMin","objMax","objMin","nodeWalk","zip","urlEncode","queryString","parseQueryString"];
MochiKit.Base.EXPORT_OK=["nameFunctions","comparatorRegistry","reprRegistry","compareDateLike","compareArrayLike","reprArrayLike","reprString","reprNumber","reprUndefined","reprNull"];
MochiKit.Base.__new__=function(){
this.listMax=this.partial(this.listMinMax,1);
this.listMin=this.partial(this.listMinMax,-1);
this.isCallable=this.typeMatcher("function");
this.isUndefined=this.typeMatcher("undefined");
this.merge=this.partial(this.update,null);
this.zip=this.partial(this.map,null);
this.comparatorRegistry=new this.AdapterRegistry();
this.registerComparator("dateLike",this.isDateLike,this.compareDateLike);
this.registerComparator("arrayLike",this.isArrayLike,this.compareArrayLike);
this.reprRegistry=new this.AdapterRegistry();
this.registerRepr("arrayLike",this.isArrayLike,this.reprArrayLike);
this.registerRepr("string",this.typeMatcher("string"),this.reprString);
this.registerRepr("numbers",this.typeMatcher("number","boolean"),this.reprNumber);
this.registerRepr("undefined",this.isUndefined,this.reprUndefined);
this.registerRepr("null",this.isNull,this.reprNull);
var all=this.concat(this.EXPORT,this.EXPORT_OK);
this.EXPORT_TAGS={":common":this.concat(this.EXPORT_OK),":all":all};
this.nameFunctions(this);
};
MochiKit.Base.__new__();
compare=MochiKit.Base.compare;
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
(function(self){
var all=self.EXPORT_TAGS[":all"];
for(var i=0;i<all.length;i++){
this[all[i]]=self[all[i]];
}
})(MochiKit.Base);
}
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.Iter");
dojo.require("MochiKit.Base");
}
if(typeof (JSAN)!="undefined"){
JSAN.use("MochiKit.Base",[]);
}
try{
if(typeof (MochiKit.Base)=="undefined"){
throw "";
}
}
catch(e){
throw "MochiKit.Iter depends on MochiKit.Base!";
}
if(typeof (MochiKit.Iter)=="undefined"){
MochiKit.Iter={};
}
MochiKit.Iter.NAME="MochiKit.Iter";
MochiKit.Iter.VERSION="0.80";
MochiKit.Iter.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Iter.toString=function(){
return this.__repr__();
};
MochiKit.Iter.registerIteratorFactory=function(name,_108,_109,_110){
MochiKit.Iter.iteratorRegistry.register(name,_108,_109,_110);
};
MochiKit.Iter.iter=function(_111,_112){
if(arguments.length==2){
return MochiKit.Iter.takewhile(function(a){
return a!=_112;
},_111);
}
if(typeof (_111.next)=="function"){
return _111;
}else{
if(typeof (_111.iter)=="function"){
return _111.iter();
}
}
try{
return MochiKit.Iter.iteratorRegistry.match(_111);
}
catch(e){
if(e==MochiKit.Base.NotFound){
e=new TypeError(typeof (_111)+": "+MochiKit.Base.repr(_111)+" is not iterable");
}
throw e;
}
};
MochiKit.Iter.count=function(n){
if(!n){
n=0;
}
return {"repr":function(){
return "count("+n+")";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
return n++;
}};
};
MochiKit.Iter.cycle=function(p){
var lst=[];
var _115=MochiKit.Iter.iter(p);
return {"repr":function(){
return "cycle(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
try{
var rval=_115.next();
lst.push(rval);
return rval;
}
catch(e){
if(e!=MochiKit.Iter.StopIteration){
throw e;
}
if(lst.length==0){
this.next=function(){
throw MochiKit.Iter.StopIteration;
};
}else{
var i=-1;
this.next=function(){
i=(i+1)%lst.length;
return lst[i];
};
}
return this.next();
}
}};
};
MochiKit.Iter.repeat=function(elem,n){
if(typeof (n)=="undefined"){
return {"repr":function(){
return "repeat("+MochiKit.Base.repr(elem)+")";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
return elem;
}};
}
return {"repr":function(){
return "repeat("+MochiKit.Base.repr(elem)+", "+n+")";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
if(n<=0){
throw MochiKit.Iter.StopIteration;
}
n-=1;
return elem;
}};
};
MochiKit.Iter.next=function(_118){
return _118.next();
};
MochiKit.Iter.izip=function(p,q){
var map=MochiKit.Base.map;
var next=MochiKit.Iter.next;
var _122=map(iter,arguments);
return {"repr":function(){
return "izip(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
return map(next,_122);
}};
};
MochiKit.Iter.ifilter=function(pred,seq){
seq=MochiKit.Iter.iter(seq);
if(pred==null){
pred=MochiKit.Base.operator.truth;
}
return {"repr":function(){
return "ifilter(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
while(true){
var rval=seq.next();
if(pred(rval)){
return rval;
}
}
}};
};
MochiKit.Iter.ifilterfalse=function(pred,seq){
seq=MochiKit.Iter.iter(seq);
if(pred==null){
pred=MochiKit.Base.operator.truth;
}
return {"repr":function(){
return "ifilterfalse(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
while(true){
var rval=seq.next();
if(!pred(rval)){
return rval;
}
}
}};
};
MochiKit.Iter.islice=function(seq){
seq=MochiKit.Iter.iter(seq);
var _125=0;
var stop=0;
var step=1;
var i=-1;
if(arguments.length==2){
stop=arguments[1];
}else{
if(arguments.length==3){
_125=arguments[1];
stop=arguments[2];
}else{
_125=arguments[1];
stop=arguments[2];
step=arguments[3];
}
}
return {"repr":function(){
return "islice("+["...",_125,stop,step].join(", ")+")";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
var rval;
while(i<_125){
rval=seq.next();
i++;
}
if(_125>=stop){
throw MochiKit.Iter.StopIteration;
}
_125+=step;
return rval;
}};
};
MochiKit.Iter.imap=function(fun,p,q){
var map=MochiKit.Base.map;
var _129=map(MochiKit.Iter.iter,MochiKit.Base.extend(null,arguments,1));
var next=MochiKit.Iter.next;
return {"repr":function(){
return "imap(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
return fun.apply(this,map(next,_129));
}};
};
MochiKit.Iter.applymap=function(fun,seq,self){
seq=MochiKit.Iter.iter(seq);
return {"repr":function(){
return "applymap(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
return fun.apply(self,seq.next());
}};
};
MochiKit.Iter.chain=function(p,q){
var iter=MochiKit.Iter.iter;
if(arguments.length==1){
return iter(arguments[0]);
}
var _131=MochiKit.Base.map(iter,arguments);
var bind=MochiKit.Base.bind;
return {"repr":function(){
return "chain(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
while(_131.length>1){
try{
return _131[0].next();
}
catch(e){
if(e!=MochiKit.Iter.StopIteration){
throw e;
}
_131.shift();
}
}
if(_131.length==1){
var arg=_131.shift();
this.next=bind(arg.next,arg);
return this.next();
}
throw MochiKit.Iter.StopIteration;
}};
};
MochiKit.Iter.takewhile=function(pred,seq){
seq=MochiKit.Iter.iter(seq);
return {"repr":function(){
return "takewhile(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
var rval=seq.next();
if(!pred(rval)){
this.next=function(){
throw MochiKit.Iter.StopIteration;
};
throw MochiKit.Iter.StopIteration;
}
return rval;
}};
};
MochiKit.Iter.dropwhile=function(pred,seq){
seq=MochiKit.Iter.iter(seq);
var bind=MochiKit.Base.bind;
return {"repr":function(){
return "dropwhile(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
while(true){
var rval=seq.next();
if(!pred(rval)){
break;
}
}
this.next=bind(seq.next,seq);
return rval;
}};
};
MochiKit.Iter._tee=function(_133,sync,_135){
sync.pos[_133]=-1;
var _136=MochiKit.Base.listMin;
return {"repr":function(){
return "tee("+_133+", ...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
var rval;
var i=sync.pos[_133];
if(i==sync.max){
rval=_135.next();
sync.deque.push(rval);
sync.max+=1;
sync.pos[_133]+=1;
}else{
rval=sync.deque[i-sync.min];
sync.pos[_133]+=1;
if(i==sync.min&&_136(sync.pos)!=sync.min){
sync.min+=1;
sync.deque.shift();
}
}
return rval;
}};
};
MochiKit.Iter.tee=function(_137,n){
var rval=[];
var sync={"pos":[],"deque":[],"max":-1,"min":-1};
if(arguments.length==1){
n=2;
}
_137=MochiKit.Iter.iter(_137);
var _tee=MochiKit.Iter._tee;
for(var i=0;i<n;i++){
rval.push(_tee(i,sync,_137));
}
return rval;
};
MochiKit.Iter.list=function(_139){
if(typeof (_139.slice)=="function"){
return _139.slice();
}else{
if(MochiKit.Base.isArrayLike(_139)){
return MochiKit.Base.concat(_139);
}
}
_139=MochiKit.Iter.iter(_139);
var rval=[];
try{
while(true){
rval.push(_139.next());
}
}
catch(e){
if(e!=MochiKit.Iter.StopIteration){
throw e;
}
return rval;
}
};
MochiKit.Iter.reduce=function(fn,_140,_141){
var i=0;
var x=_141;
_140=MochiKit.Iter.iter(_140);
if(arguments.length<3){
try{
x=_140.next();
}
catch(e){
if(e==MochiKit.Iter.StopIteration){
e=new TypeError("reduce() of empty sequence with no initial value");
}
throw e;
}
i++;
}
try{
while(true){
x=fn(x,_140.next());
}
}
catch(e){
if(e!=MochiKit.Iter.StopIteration){
throw e;
}
return x;
}
};
MochiKit.Iter.range=function(){
var _143=0;
var stop=0;
var step=1;
if(arguments.length==1){
stop=arguments[0];
}else{
if(arguments.length==2){
_143=arguments[0];
stop=arguments[1];
}else{
if(arguments.length==3){
_143=arguments[0];
stop=arguments[1];
step=arguments[2];
}else{
throw TypeError("range() takes 1, 2, or 3 arguments!");
}
}
}
return {"next":function(){
if(_143>=stop){
throw MochiKit.Iter.StopIteration;
}
var rval=_143;
_143+=step;
return rval;
},"repr":function(){
return "range("+[_143,stop,step].join(", ")+")";
},"toString":MochiKit.Base.forward("repr")};
};
MochiKit.Iter.sum=function(_144,_145){
var x=_145?_145:0;
_144=MochiKit.Iter.iter(_144);
try{
while(true){
x+=_144.next();
}
}
catch(e){
if(e!=MochiKit.Iter.StopIteration){
throw e;
}
return x;
}
};
MochiKit.Iter.exhaust=function(_146){
_146=MochiKit.Iter.iter(_146);
try{
while(true){
_146.next();
}
}
catch(e){
if(e!=MochiKit.Iter.StopIteration){
throw e;
}
}
};
MochiKit.Iter.forEach=function(_147,func,self){
if(arguments.length>2){
func=MochiKit.Base.bind(func,self);
}
if(MochiKit.Base.isArrayLike(_147)){
for(var i=0;i<_147.length;i++){
func(_147[i]);
}
}else{
MochiKit.Iter.exhaust(MochiKit.Iter.imap(func,_147));
}
};
MochiKit.Iter.every=function(_149,func){
try{
MochiKit.Iter.ifilterfalse(func,_149).next();
return false;
}
catch(e){
if(e!=MochiKit.Iter.StopIteration){
throw e;
}
return true;
}
};
MochiKit.Iter.sorted=function(_150,cmp){
var rval=MochiKit.Iter.list(_150);
if(arguments.length==1){
cmp=MochiKit.Base.compare;
}
rval.sort(cmp);
return rval;
};
MochiKit.Iter.reversed=function(_151){
var rval=MochiKit.Iter.list(_151);
rval.reverse();
return rval;
};
MochiKit.Iter.some=function(_152,func){
try{
MochiKit.Iter.ifilter(func,_152).next();
return true;
}
catch(e){
if(e!=MochiKit.Iter.StopIteration){
throw e;
}
return false;
}
};
MochiKit.Iter.iextend=function(lst,_153){
if(MochiKit.Base.isArrayLike(_153)){
for(var i=0;i<_153.length;i++){
lst.push(_153[i]);
}
}else{
_153=MochiKit.Iter.iter(_153);
try{
while(true){
lst.push(_153.next());
}
}
catch(e){
if(e!=MochiKit.Iter.StopIteration){
throw e;
}
}
}
return lst;
};
MochiKit.Iter.arrayLikeIter=function(_154){
var i=0;
return {"repr":function(){
return "arrayLikeIter(...)";
},"toString":MochiKit.Base.forward("repr"),"next":function(){
if(i>=_154.length){
throw MochiKit.Iter.StopIteration;
}
return _154[i++];
}};
};
MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter"];
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"];
MochiKit.Iter.__new__=function(){
this.StopIteration=new MochiKit.Base.NamedError("StopIteration");
this.iteratorRegistry=new MochiKit.Base.AdapterRegistry();
this.registerIteratorFactory("arrayLike",MochiKit.Base.isArrayLike,this.arrayLikeIter);
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
MochiKit.Base.nameFunctions(this);
};
MochiKit.Iter.__new__();
reduce=MochiKit.Iter.reduce;
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
(function(self){
var all=self.EXPORT_TAGS[":all"];
for(var i=0;i<all.length;i++){
this[all[i]]=self[all[i]];
}
})(MochiKit.Iter);
}
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.Logging");
dojo.require("MochiKit.Base");
}
if(typeof (JSAN)!="undefined"){
JSAN.use("MochiKit.Base",[]);
}
try{
if(typeof (MochiKit.Base)=="undefined"){
throw "";
}
}
catch(e){
throw "MochiKit.Logging depends on MochiKit.Base!";
}
if(typeof (MochiKit.Logging)=="undefined"){
MochiKit.Logging={};
}
MochiKit.Logging.NAME="MochiKit.Logging";
MochiKit.Logging.VERSION="0.80";
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.logLevelAtLeast=function(_155){
if(typeof (_155)=="string"){
_155=MochiKit.Logging.LogLevel[_155];
}
return function(msg){
var _157=msg.level;
if(typeof (_157)=="string"){
_157=MochiKit.Logging.LogLevel[_157];
}
return _157>=_155;
};
};
MochiKit.Logging.LogMessage=function(num,_159,info){
this.num=num;
this.level=_159;
this.info=info;
this.timestamp=new Date();
};
MochiKit.Logging.LogMessage.prototype.repr=function(){
return "LogMessage("+MochiKit.Base.map(MochiKit.Base.repr,[this.num,this.level,this.info]).join(", ")+")";
};
MochiKit.Logging.LogMessage.prototype.toString=function(){
return this.repr();
};
MochiKit.Logging.isLogMessage=function(){
var _161=MochiKit.Logging.LogMessage;
for(var i=0;i<arguments.length;i++){
if(!(arguments[i] instanceof _161)){
return false;
}
}
return true;
};
MochiKit.Logging.compareLogMessage=function(a,b){
return MochiKit.Base.compare([a.level,a.info],[b.level,b.info]);
};
MochiKit.Logging.Logger=function(_162){
this.counter=0;
if(typeof (_162)=="undefined"||_162==null){
_162=-1;
}
this.maxSize=_162;
this._messages=[];
this.listeners={};
};
MochiKit.Logging.Logger.prototype.clear=function(){
this._messages.splice(0,this._messages.length);
};
MochiKit.Logging.Logger.prototype.dispatchListeners=function(msg){
for(var k in this.listeners){
var pair=this.listeners[k];
if(pair[0]&&!pair[0](msg)){
continue;
}
pair[1](msg);
}
};
MochiKit.Logging.Logger.prototype.addListener=function(_163,_164,_165){
if(typeof (_164)=="string"){
_164=MochiKit.Logging.logLevelAtLeast(_164);
}
this.listeners[_163]=[_164,_165];
};
MochiKit.Logging.Logger.prototype.removeListener=function(_166){
delete this.listeners[_166];
};
MochiKit.Logging.Logger.prototype.baseLog=function(_167,_168){
var msg=new MochiKit.Logging.LogMessage(this.counter,_167,MochiKit.Base.extend(null,arguments,1));
this._messages.push(msg);
this.dispatchListeners(msg);
this.counter+=1;
while(this.maxSize>=0&&this._messages.length>this.maxSize){
this._messges.shift();
}
};
MochiKit.Logging.Logger.prototype.getMessages=function(_169){
var _170=0;
if(!(typeof (_169)=="undefined"||_169==null)){
_170=Math.max(0,this._messages.length-_169);
}
return this._messages.slice(_170);
};
MochiKit.Logging.Logger.prototype.getMessageText=function(_171){
if(typeof (_171)=="undefined"||_171==null){
_171=30;
}
var _172=this.getMessages(_171);
if(_172.length){
var lst=map(function(m){
return "\n  ["+m.num+"] "+m.level+": "+m.info.join(" ");
},_172);
lst.unshift("LAST "+_172.length+" MESSAGES:");
return lst.join("");
}
return "";
};
MochiKit.Logging.Logger.prototype.debuggingBookmarklet=function(){
alert(this.getMessageText());
};
MochiKit.Logging.alertListener=function(msg){
alert("num: "+msg.num+"\nlevel: "+msg.level+"\ninfo: "+msg.info.join(" "));
};
MochiKit.Logging.__new__=function(){
this.LogLevel={"ERROR":40,"FATAL":50,"WARNING":30,"INFO":20,"DEBUG":10};
MochiKit.Base.registerComparator("LogMessage",this.isLogMessage,this.compareLogMessage);
var _174=MochiKit.Base.partial;
var _175=this.Logger;
_175.prototype.debug=_174(_175.prototype.baseLog,"DEBUG");
_175.prototype.log=_174(_175.prototype.baseLog,"INFO");
_175.prototype.error=_174(_175.prototype.baseLog,"ERROR");
_175.prototype.fatal=_174(_175.prototype.baseLog,"FATAL");
_175.prototype.warning=_174(_175.prototype.baseLog,"WARNING");
var self=this;
var _176=function(name){
return function(){
self.logger[name].apply(self.logger,arguments);
};
};
this.log=_176("log");
this.logError=_176("error");
this.logDebug=_176("debug");
this.logFatal=_176("fatal");
this.logWarning=_176("warning");
this.logger=new _175();
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
MochiKit.Base.nameFunctions(this);
};
MochiKit.Logging.__new__();
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
(function(self){
var all=self.EXPORT_TAGS[":all"];
for(var i=0;i<all.length;i++){
this[all[i]]=self[all[i]];
}
})(MochiKit.Logging);
}
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.DateTime");
}
if(typeof (MochiKit)=="undefined"){
MochiKit={};
}
if(typeof (MochiKit.DateTime)=="undefined"){
MochiKit.DateTime={};
}
MochiKit.DateTime.NAME="MochiKit.DateTime";
MochiKit.DateTime.VERSION="0.80";
MochiKit.DateTime.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.DateTime.toString=function(){
return this.__repr__();
};
MochiKit.DateTime.isoDate=function(str){
var iso=str.split("-");
return new Date(iso[0],iso[1]-1,iso[2]);
};
MochiKit.DateTime.isoTimestamp=function(str){
var tmp=str.split(" ");
if(tmp.length==1){
tmp=str.split("T");
}
var iso=tmp[0].split("-");
var t=tmp[1].split(":");
return new Date(iso[0],iso[1]-1,iso[2],t[0],t[1],t[2]);
};
MochiKit.DateTime.toISOTime=function(date){
var hh=date.getHours();
var mm=date.getMinutes();
var ss=date.getSeconds();
var lst=[hh,((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)];
return lst.join(":");
};
MochiKit.DateTime.toISOTimestamp=function(date,_185){
var sep=_185?"T":" ";
return MochiKit.DateTime.toISODate(date)+sep+MochiKit.DateTime.toISOTime(date);
};
MochiKit.DateTime.toISODate=function(date){
return [date.getFullYear(),date.getMonth()+1,date.getDate()].join("-");
};
MochiKit.DateTime.americanDate=function(d){
var a=d.split("/");
return new Date(a[2],a[0]-1,a[1]);
};
var _padTwo=function(n){
return (n>9)?n:"0"+n;
};
MochiKit.DateTime.toPaddedAmericanDate=function(d){
return [_padTwo(d.getMonth()+1),_padTwo(d.getDate()),d.getFullYear()].join("/");
};
MochiKit.DateTime.toAmericanDate=function(d){
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 (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
(function(self){
var all=self.EXPORT_TAGS[":all"];
for(var i=0;i<all.length;i++){
this[all[i]]=self[all[i]];
}
})(MochiKit.DateTime);
}
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.Format");
}
if(typeof (MochiKit)=="undefined"){
MochiKit={};
}
if(typeof (MochiKit.Format)=="undefined"){
MochiKit.Format={};
}
MochiKit.Format.NAME="MochiKit.Format";
MochiKit.Format.VERSION="0.80";
MochiKit.Format.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Format.toString=function(){
return this.__repr__();
};
MochiKit.Format.twoDigitAverage=function(_189,_190){
if(_190){
var res=_189/_190;
if(!isNaN(res)){
return MochiKit.Format.twoDigitFloat(_189/_190);
}
}
return "0";
};
MochiKit.Format.twoDigitFloat=function(_191){
var sign=(_191<0?"-":"");
var s=Math.floor(Math.abs(_191)*100).toString();
if(s=="0"){
return s;
}
if(s.length<3){
while(s.charAt(s.length-1)=="0"){
s=s.substring(0,s.length-1);
}
return sign+"0."+s;
}
var head=sign+s.substring(0,s.length-2);
var tail=s.substring(s.length-2,s.length);
if(tail=="00"){
return head;
}else{
if(tail.charAt(1)=="0"){
return head+"."+tail.charAt(0);
}else{
return head+"."+tail;
}
}
};
MochiKit.Format.lstrip=function(str,_196){
if(!_196){
return str.replace(/^\s+/,"");
}else{
return str.replace(new RegExp("^["+_196+"]+"),"");
}
};
MochiKit.Format.rstrip=function(str,_197){
if(!_197){
return str.replace(/\s+$/,"");
}else{
return str.replace(new RegExp("["+_197+"]+$"),"");
}
};
MochiKit.Format.strip=function(str,_198){
var self=MochiKit.Format;
return self.rstrip(self.lstrip(str,_198),_198);
};
MochiKit.Format.percentFormat=function(_199){
return MochiKit.Format.twoDigitFloat(100*_199)+"%";
};
MochiKit.Format.EXPORT=["twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"];
MochiKit.Format.EXPORT_OK=[];
MochiKit.Format.EXPORT_TAGS={":all":MochiKit.Format.EXPORT,":common":MochiKit.Format.EXPORT};
MochiKit.Format.__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.Format.__new__();
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
(function(self){
var all=self.EXPORT_TAGS[":all"];
for(var i=0;i<all.length;i++){
this[all[i]]=self[all[i]];
}
})(MochiKit.Format);
}
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.Async");
dojo.require("MochiKit.Base");
}
if(typeof (JSAN)!="undefined"){
JSAN.use("MochiKit.Base",[]);
}
try{
if(typeof (MochiKit.Base)=="undefined"){
throw "";
}
}
catch(e){
throw "MochiKit.Async depends on MochiKit.Base!";
}
if(typeof (MochiKit.Async)=="undefined"){
MochiKit.Async={};
}
MochiKit.Async.NAME="MochiKit.Async";
MochiKit.Async.VERSION="0.80";
MochiKit.Async.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Async.toString=function(){
return this.__repr__();
};
MochiKit.Async.AlreadyCalledError=function(_200){
this.deferred=_200;
};
MochiKit.Async.AlreadyCalledError.prototype=new MochiKit.Base.NamedError("MochiKit.Async.AlreadyCalledError");
MochiKit.Async.CancelledError=function(_201){
this.deferred=_201;
};
MochiKit.Async.CancelledError.prototype=new MochiKit.Base.NamedError("MochiKit.Async.CancelledError");
MochiKit.Async.BrowserComplianceError=function(msg){
this.message=msg;
};
MochiKit.Async.BrowserComplianceError.prototype=new MochiKit.Base.NamedError("MochiKit.Async.BrowserComplianceError");
MochiKit.Async.GenericError=function(msg){
this.message=msg;
};
MochiKit.Async.GenericError.prototype=new MochiKit.Base.NamedError("MochiKit.Async.GenericError");
MochiKit.Async.XMLHttpRequestError=function(req,msg){
this.req=req;
this.message=msg;
try{
this.number=req.status;
}
catch(e){
}
};
MochiKit.Async.XMLHttpRequestError.prototype=new MochiKit.Base.NamedError("MochiKit.Async.XMLHttpRequestError");
MochiKit.Async.Deferred=function(_203){
this.chain=[];
this.id=this._nextId();
this.fired=-1;
this.paused=0;
this.results=[null,null];
this.canceller=_203;
this.silentlyCancelled=false;
};
MochiKit.Async.Deferred.prototype.repr=function(){
var _204;
if(this.fired==-1){
_204="unfired";
}else{
if(this.fired==0){
_204="success";
}else{
_204="error";
}
}
return "Deferred("+this.id+", "+_204+")";
};
MochiKit.Async.Deferred.prototype.toString=MochiKit.Base.forward("repr");
MochiKit.Async.Deferred.prototype._nextId=(function(){
var x=0;
return function(){
return ++x;
};
})();
MochiKit.Async.Deferred.prototype.cancel=function(){
if(this.fired==-1){
if(this.canceller){
this.canceller(this);
}else{
this.silentlyCancelled=true;
}
if(this.fired==-1){
this.errback(new MochiKit.Async.CancelledError(this));
}
}else{
if((this.fired==0)&&(this.results[0] instanceof MochiKit.Async.Deferred)){
this.results[0].cancel();
}
}
};
MochiKit.Async.Deferred.prototype._pause=function(){
this.paused++;
};
MochiKit.Async.Deferred.prototype._unpause=function(){
this.paused--;
if((this.paused==0)&&(this.fired>=0)){
this._fire();
}
};
MochiKit.Async.Deferred.prototype._continue=function(res){
this._resback(res);
this._unpause();
};
MochiKit.Async.Deferred.prototype._resback=function(res){
this.fired=((res instanceof Error)?1:0);
this.results[this.fired]=res;
this._fire();
};
MochiKit.Async.Deferred.prototype._check=function(){
if(this.fired!=-1){
if(!this.silentlyCancelled){
throw new MochiKit.Async.AlreadyCalledError(this);
}
this.silentlyCancelled=false;
return;
}
};
MochiKit.Async.Deferred.prototype.callback=function(res){
this._check();
this._resback(res);
};
MochiKit.Async.Deferred.prototype.errback=function(res){
this._check();
if(!(res instanceof Error)){
res=new MochiKit.Async.GenericError(res);
}
this._resback(res);
};
MochiKit.Async.Deferred.prototype.addBoth=function(fn){
return this.addCallbacks(fn,fn);
};
MochiKit.Async.Deferred.prototype.addCallback=function(fn){
return this.addCallbacks(fn,null);
};
MochiKit.Async.Deferred.prototype.addErrback=function(fn){
return this.addCallbacks(null,fn);
};
MochiKit.Async.Deferred.prototype.addCallbacks=function(cb,eb){
this.chain.push([cb,eb]);
if(this.fired>=0){
this._fire();
}
return this;
};
MochiKit.Async.Deferred.prototype._fire=function(){
var _207=this.chain;
var _208=this.fired;
var res=this.results[_208];
var self=this;
var cb=null;
while(_207.length>0&&this.paused==0){
var pair=_207.shift();
var f=pair[_208];
if(f==null){
continue;
}
try{
res=f(res);
_208=((res instanceof Error)?1:0);
if(res instanceof MochiKit.Async.Deferred){
cb=function(res){
self._continue(res);
};
this._pause();
}
}
catch(err){
_208=1;
res=err;
}
}
this.fired=_208;
this.results[_208]=res;
if(cb&&this.paused){
res.addBoth(cb);
}
};
MochiKit.Async.evalJSONRequest=function(req){
return eval("("+req.responseText+")");
};
MochiKit.Async.succeed=function(_210){
var d=new MochiKit.Async.Deferred();
d.callback.apply(d,arguments);
return d;
};
MochiKit.Async.fail=function(_211){
var d=new MochiKit.Async.Deferred();
d.errback.apply(d,arguments);
return d;
};
MochiKit.Async.getXMLHttpRequest=function(){
var self=arguments.callee;
if(!self.XMLHttpRequest){
var _212=[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<_212.length;i++){
var func=_212[i];
try{
self.XMLHttpRequest=func;
return func();
}
catch(e){
}
}
}
return self.XMLHttpRequest();
};
MochiKit.Async.sendXMLHttpRequest=function(req,_213){
if(typeof (_213)=="undefined"){
send=null;
}
var _214=function(){
try{
req.onreadystatechange=null;
}
catch(e){
try{
req.onreadystatechange=function(){
};
}
catch(e){
}
}
req.abort();
};
var d=new MochiKit.Async.Deferred(_214);
var _215=function(){
if(req.readyState==4){
try{
req.onreadystatechange=null;
}
catch(e){
try{
req.onreadystatechange=function(){
};
}
catch(e){
}
}
var _216=null;
try{
_216=req.status;
if(!_216&&MochiKit.Base.isNotEmpty(req.responseText)){
_216=304;
}
}
catch(e){
}
if(_216==200||_216==304){
d.callback(req);
}else{
var err=new MochiKit.Async.XMLHttpRequestError(req,"Request failed");
if(err.number){
d.errback(err);
}else{
}
}
}
};
try{
req.onreadystatechange=_215;
req.send(_213);
}
catch(e){
try{
req.onreadystatechange=null;
}
catch(ignore){
}
d.errback(e);
}
return d;
};
MochiKit.Async.doSimpleXMLHttpRequest=function(url){
var req=MochiKit.Async.getXMLHttpRequest();
req.open("GET",url,true);
return MochiKit.Async.sendXMLHttpRequest(req);
};
MochiKit.Async.loadJSONDoc=function(url){
var d=MochiKit.Async.doSimpleXMLHttpRequest(url);
d=d.addCallback(MochiKit.Async.evalJSONRequest);
return d;
};
MochiKit.Async.wait=function(_219,_220){
var d=new MochiKit.Async.Deferred();
var bind=MochiKit.Base.bind;
var _221=MochiKit.Base.partial;
if(typeof (_220)!="undefined"){
d.addCallback(function(){
return _220;
});
}
var _222=setTimeout(bind(d.callback,d),Math.floor(_219*1000));
d.canceller=_221(clearTimeout,_222);
return d;
};
MochiKit.Async.callLater=function(_223,func){
var m=MochiKit.Base;
var func=m.partial.apply(null,m.extend(null,arguments,1));
return MochiKit.Async.wait(_223).addCallback(function(res){
return func();
});
};
MochiKit.Async.EXPORT=["AlreadyCalledError","CancelledError","BrowserComplianceError","GenericError","XMLHttpRequestError","Deferred","succeed","fail","getXMLHttpRequest","doSimpleXMLHttpRequest","loadJSONDoc","wait","callLater","sendXMLHttpRequest"];
MochiKit.Async.EXPORT_OK=["evalJSONRequest"];
MochiKit.Async.__new__=function(){
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
MochiKit.Base.nameFunctions(this);
};
MochiKit.Async.__new__();
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
(function(self){
var all=self.EXPORT_TAGS[":all"];
for(var i=0;i<all.length;i++){
this[all[i]]=self[all[i]];
}
})(MochiKit.Async);
}
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.DOM");
dojo.require("MochiKit.Iter");
}
if(typeof (JSAN)!="undefined"){
JSAN.use("MochiKit.Iter",[]);
}
try{
if(typeof (MochiKit.Iter)=="undefined"){
throw "";
}
}
catch(e){
throw "MochiKit.DOM depends on MochiKit.Iter!";
}
if(typeof (MochiKit.DOM)=="undefined"){
MochiKit.DOM={};
}
MochiKit.DOM.NAME="MochiKit.DOM";
MochiKit.DOM.VERSION="0.80";
MochiKit.DOM.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.DOM.toString=function(){
return this.__repr__();
};
MochiKit.DOM.EXPORT=["registerDOMConverter","coerceToDOM","createDOM","createDOMFunc","updateNodeAttributes","appendChildNodes","replaceChildNodes","swapDOM","UL","OL","LI","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","getElement","$","getElementsByTagAndClassName","addToCallStack","addLoadEvent","focusOnLoad","setElementClass","toggleElementClass","addElementClass","removeElementClass","swapElementClass","hasElementClass","escapeHTML","toHTML","emitHTML","setDisplayForElement","hideElement","showElement","scrapeText"];
MochiKit.DOM.EXPORT_OK=["domConverters"];
MochiKit.DOM.registerDOMConverter=function(name,_224,wrap,_226){
domConverters.register(name,_224,wrap,_226);
};
MochiKit.DOM.coerceToDOM=function(node,ctx){
var iter=MochiKit.Iter.iter;
var _229=MochiKit.Iter.repeat;
var imap=MochiKit.Iter.imap;
var _231=MochiKit.DOM.domConverters;
while(true){
if(typeof (node)=="undefined"||node==null){
return null;
}
if(node.nodeType>0){
return node;
}
if(typeof (node)=="number"||typeof (node)=="bool"){
node=node.toString();
}
if(typeof (node)=="string"){
return document.createTextNode(node);
}
if(typeof (node.toDOM)=="function"){
node=node.toDOM(ctx);
continue;
}
if(typeof (node)=="function"){
node=node(ctx);
continue;
}
var _232=null;
try{
_232=iter(node);
}
catch(e){
}
if(_232){
return imap(coerceToDOM,_232,_229(ctx));
}
try{
node=_231.match(node,ctx);
continue;
}
catch(e){
if(e!=NotFound){
throw e;
}
}
return document.createTextNode(node.toString());
}
};
MochiKit.DOM.updateNodeAttributes=function(node,_233){
var elem=node;
if(typeof (node)=="string"){
elem=MochiKit.DOM.getElement(node);
}
if(_233){
if(MochiKit.DOM.attributeArray.compliant){
for(var k in _233){
var v=_233[k];
if(k.substring(0,2)=="on"){
if(typeof (v)=="string"){
v=new Function(v);
}
elem[k]=v;
}else{
elem.setAttribute(k,_233[k]);
}
}
}else{
var _234={"class":"className","checked":"defaultChecked"};
for(var k in _233){
var v=_233[k];
var _235=_234[k];
if(typeof (_235)=="string"){
elem[_235]=v;
}else{
if(k.substring(0,2)=="on"){
if(typeof (v)=="string"){
v=new Function(v);
}
elem[k]=v;
}else{
elem.setAttribute(k,v);
}
}
}
}
}
return elem;
};
MochiKit.DOM.appendChildNodes=function(node){
var elem=node;
if(typeof (node)=="string"){
elem=MochiKit.DOM.getElement(node);
}
var _236=[MochiKit.DOM.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];
var _237=MochiKit.Iter.iextend;
while(_236.length){
var node=_236.shift();
if(typeof (node)=="undefined"||node==null){
}else{
if(typeof (node.nodeType)=="number"){
elem.appendChild(node);
}else{
_237(_236,node);
}
}
}
return elem;
};
MochiKit.DOM.replaceChildNodes=function(node){
var elem=node;
if(typeof (node)=="string"){
elem=MochiKit.DOM.getElement(node);
arguments[0]=elem;
}
var _238;
while((_238=elem.firstChild)){
elem.removeChild(_238);
}
if(arguments.length<2){
return elem;
}else{
return MochiKit.DOM.appendChildNodes.apply(this,arguments);
}
};
MochiKit.DOM.createDOM=function(name,_239){
var elem;
if(typeof (name)=="string"){
elem=document.createElement(name);
}else{
elem=name;
}
if(_239){
MochiKit.DOM.updateNodeAttributes(elem,_239);
}
if(arguments.length<=2){
return elem;
}else{
var args=MochiKit.Base.extend([elem],arguments,2);
return MochiKit.DOM.appendChildNodes.apply(this,args);
}
};
MochiKit.DOM.createDOMFunc=function(){
return MochiKit.Base.partial.apply(this,MochiKit.Base.extend([MochiKit.DOM.createDOM],arguments));
};
MochiKit.DOM.swapDOM=function(dest,src){
dest=MochiKit.DOM.getElement(dest);
var _243=dest.parentNode;
if(src){
src=MochiKit.DOM.getElement(src);
_243.replaceChild(src,dest);
}else{
_243.removeChild(dest);
}
return src;
};
MochiKit.DOM.getElement=function(id){
if(arguments.length==1){
return ((typeof (id)=="string")?document.getElementById(id):id);
}else{
return MochiKit.Base.map(getElement,arguments);
}
};
MochiKit.DOM.getElementsByTagAndClassName=function(_245,_246,_247){
if(typeof (_245)=="undefined"||_245==null){
_245="*";
}
if(typeof (_247)=="undefined"||_247==null){
_247=document;
}
_247=MochiKit.DOM.getElement(_247);
var _248=_247.getElementsByTagName(_245)||document.all;
if(typeof (_246)=="undefined"||_246==null){
return _248;
}
var _249=[];
for(var i=0;i<_248.length;i++){
var _250=_248[i];
var _251=_250.className.split(" ");
for(var j=0;j<_251.length;j++){
if(_251[j]==_246){
_249.push(_250);
break;
}
}
}
return _249;
};
MochiKit.DOM.addToCallStack=function(_252,path,func,once){
var _255=_252[path];
var _256=_255;
if(!(typeof (_255)=="function"&&_255.callStack)){
var _256=function(){
var _257=_256.callStack;
for(var i=0;i<_257.length;i++){
if(_257[i].apply(this,arguments)===false){
break;
}
}
if(once){
try{
_252[path]=null;
}
catch(e){
}
}
};
_256.callStack=[];
if(typeof (_255)=="function"){
_256.callStack.push(_255);
}
_252[path]=_256;
}
_256.callStack.push(func);
};
MochiKit.DOM.addLoadEvent=function(func){
MochiKit.DOM.addToCallStack(window,"onload",func,true);
};
MochiKit.DOM.focusOnLoad=function(_258){
MochiKit.DOM.addLoadEvent(function(){
_258=MochiKit.DOM.getElement(_258);
if(_258){
_258.focus();
}
});
};
MochiKit.DOM.setElementClass=function(_259,_260){
var obj=MochiKit.DOM.getElement(_259);
if(MochiKit.DOM.attributeArray.compliant){
obj.setAttribute("class",_260);
}else{
obj.setAttribute("className",_260);
}
};
MochiKit.DOM.toggleElementClass=function(_261){
var _262=MochiKit.DOM.getElement;
var _263=MochiKit.DOM.addElementClass;
var _264=MochiKit.DOM.removeElementClass;
for(i=1;i<arguments.length;i++){
var obj=_262(arguments[i]);
if(!_263(obj,_261)){
_264(obj,_261);
}
}
};
MochiKit.DOM.addElementClass=function(_265,_266){
var obj=MochiKit.DOM.getElement(_265);
var cls=obj.className;
if(cls.length==0){
MochiKit.DOM.setElementClass(obj,_266);
return true;
}
if(cls==_266){
return false;
}
var _268=obj.className.split(" ");
for(var i=0;i<_268.length;i++){
if(_268[i]==_266){
return false;
}
}
MochiKit.DOM.setElementClass(obj,cls+" "+_266);
return true;
};
MochiKit.DOM.removeElementClass=function(_269,_270){
var obj=MochiKit.DOM.getElement(_269);
var cls=obj.className;
if(cls.length==0){
return false;
}
if(cls==_270){
MochiKit.DOM.setElementClass(obj,"");
return true;
}
var _271=obj.className.split(" ");
for(var i=0;i<_271.length;i++){
if(_271[i]==_270){
_271.splice(i,1);
MochiKit.DOM.setElementClass(obj,_271.join(" "));
return true;
}
}
return false;
};
MochiKit.DOM.swapElementClass=function(_272,_273,_274){
var obj=MochiKit.DOM.getElement(_272);
var res=MochiKit.DOM.removeElementClass(obj,_273);
if(res){
MochiKit.DOM.addElementClass(obj,_274);
}
return res;
};
MochiKit.DOM.hasElementClass=function(_275,_276){
var obj=MochiKit.DOM.getElement(_275);
var _277=obj.className.split(" ");
for(var i=1;i<arguments.length;i++){
good=false;
for(var j=0;j<_277.length;j++){
if(_277[j]==arguments[i]){
good=true;
break;
}
}
if(!good){
return false;
}
}
return true;
};
MochiKit.DOM.escapeHTML=function(s){
var buf=[];
var _279=MochiKit.DOM._TRANSTABLE;
for(var i=0;i<s.length;i++){
var c=s.charAt(i);
var o=_279[c];
if(o){
c=o;
}
buf.push(c);
}
return buf.join("");
};
MochiKit.DOM.toHTML=function(dom){
return MochiKit.DOM.emitHTML(dom).join("");
};
MochiKit.DOM.emitHTML=function(dom,lst){
if(typeof (lst)=="undefined"||lst==null){
lst=[];
}
var _282=[dom];
var _283=MochiKit.DOM.escapeHTML;
var _284=MochiKit.DOM.attributeArray;
while(_282.length){
dom=_282.pop();
if(typeof (dom)=="string"){
lst.push(dom);
}else{
if(dom.nodeType==1){
lst.push("<"+dom.nodeName.toLowerCase());
var _285=[];
var _286=_284(dom);
for(var i=0;i<_286.length;i++){
var a=_286[i];
_285.push([" ",a.name,"=\"",_283(a.value),"\""]);
}
_285.sort();
for(var i=0;i<_285.length;i++){
var _287=_285[i];
for(var j=0;j<_287.length;j++){
lst.push(_287[j]);
}
}
if(dom.hasChildNodes()){
lst.push(">");
_282.push("</"+dom.nodeName.toLowerCase()+">");
var _288=dom.childNodes;
for(var i=_288.length-1;i>=0;i--){
_282.push(_288[i]);
}
}else{
lst.push("/>");
}
}else{
if(dom.nodeType==3){
lst.push(_283(dom.nodeValue));
}
}
}
}
return lst;
};
MochiKit.DOM.setDisplayForElement=function(_289,_290){
var _291=MochiKit.Base.extend(null,arguments,1);
MochiKit.Iter.forEach(MochiKit.Base.filter(null,MochiKit.Base.map(getElement,_291)),function(_290){
_290.style.display=_289;
});
};
MochiKit.DOM.scrapeText=function(node,_292){
var rval=[];
MochiKit.Base.nodeWalk(node,function(node){
var _293=node.nodeValue;
if(typeof (_293)=="string"){
rval.push(_293);
}
return node.childNodes;
});
if(_292){
return rval;
}else{
return rval.join("");
}
};
MochiKit.DOM.__new__=function(){
this.domConverters=new MochiKit.Base.AdapterRegistry();
var _294=document.createElement("span");
var _295;
if(_294.attributes.length>0){
var _296=MochiKit.Base.filter;
_295=function(node){
return _296(_295.ignoreAttrFilter,node.attributes);
};
_295.ignoreAttr={};
MochiKit.Iter.forEach(_294.attributes,function(a){
_295.ignoreAttr[a.name]=a.value;
});
_295.ignoreAttrFilter=function(a){
return (_295.ignoreAttr[a.name]!=a.value);
};
_295.compliant=false;
}else{
_295=function(node){
return node.attributes;
};
_295.compliant=true;
}
this.attributeArray=_295;
var _297=this.createDOMFunc;
this.UL=_297("ul");
this.OL=_297("ol");
this.LI=_297("li");
this.TD=_297("td");
this.TR=_297("tr");
this.TBODY=_297("tbody");
this.THEAD=_297("thead");
this.TFOOT=_297("tfoot");
this.TABLE=_297("table");
this.TH=_297("th");
this.INPUT=_297("input");
this.SPAN=_297("span");
this.A=_297("a");
this.DIV=_297("div");
this.IMG=_297("img");
this._TRANSTABLE={"<":"&lt;",">":"&gt;","&":"&amp;","'":"&apos;","\"":"&quot;"};
var _298=MochiKit.Base.partial;
this.hideElement=_298(this.setDisplayForElement,"none");
this.showElement=_298(this.setDisplayForElement,"block");
this.$=this.getElement;
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
MochiKit.Base.nameFunctions(this);
};
MochiKit.DOM.__new__();
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
(function(self){
var all=self.EXPORT_TAGS[":all"];
for(var i=0;i<all.length;i++){
this[all[i]]=self[all[i]];
}
})(MochiKit.DOM);
}
if(typeof (dojo)!="undefined"){
dojo.provide("MochiKit.Visual");
dojo.require("MochiKit.Base");
dojo.require("MochiKit.DOM");
}
if(typeof (JSAN)!="undefined"){
JSAN.use("MochiKit.Base",[]);
JSAN.use("MochiKit.DOM",[]);
}
try{
if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"){
throw "";
}
}
catch(e){
throw "MochiKit.Visual depends on MochiKit.Base and MochiKit.DOM!";
}
if(typeof (MochiKit.Visual)=="undefined"){
MochiKit.Visual={};
}
MochiKit.Visual.NAME="MochiKit.Visual";
MochiKit.Visual.VERSION="0.80";
MochiKit.Visual.__repr__=function(){
return "["+this.NAME+" "+this.VERSION+"]";
};
MochiKit.Visual.toString=function(){
return this.__repr__();
};
MochiKit.Visual.clampColorComponent=function(v,_299){
v*=_299;
if(v<0){
return 0;
}else{
if(v>_299){
return _299;
}else{
return v;
}
}
};
MochiKit.Visual.Color=function(red,_301,blue,_303){
if(typeof (_303)=="undefined"||_303==null){
_303=1;
}
this.rgb={"r":red,"g":_301,"b":blue,"a":_303};
};
MochiKit.Visual.Color.prototype={"__class__":MochiKit.Visual.Color,"colorWithAlpha":function(_304){
var rgb=this.rgb;
var m=MochiKit.Visual;
return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_304);
},"colorWithHue":function(hue){
var hsl=this.asHSL();
hsl.h=hue;
var m=MochiKit.Visual;
return m.Color.fromHSL(hsl);
},"colorWithSaturation":function(_308){
var hsl=this.asHSL();
hsl.s=_308;
var m=MochiKit.Visual;
return m.Color.fromHSL(hsl);
},"colorWithLightness":function(_309){
var hsl=this.asHSL();
hsl.l=_309;
var m=MochiKit.Visual;
return m.Color.fromHSL(hsl);
},"darkerColorWithLevel":function(_310){
var hsl=this.asHSL();
hsl.l=Math.max(hsl.l-_310,0);
var m=MochiKit.Visual;
return m.Color.fromHSL(hsl);
},"lighterColorWithLevel":function(_311){
var hsl=this.asHSL();
Math.min(hsl.l+_311,1);
var m=MochiKit.Visual;
return m.Color.fromHSL(hsl);
},"blendedColor":function(_312,_313){
if(typeof (_313)=="undefined"||_313==null){
_313=0.5;
}
var sf=1-_313;
var s=this.rgb;
var d=_312.rgb;
var df=_313;
return MochiKit.Visual.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(_316){
var a=this.asRGB();
var b=_316.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.Visual.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.Visual.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.Visual;
var c=this.rgb;
var ccc=MochiKit.Visual.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.Visual.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.Visual.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.Visual.Color.fromRGB=function(red,_321,blue,_322){
var _323=MochiKit.Visual.Color;
if(arguments.length==1){
var rgb=red;
red=rgb.r;
_321=rgb.g;
blue=rgb.b;
_322=rgb.a;
}
return new _323(red,_321,blue,_322);
};
MochiKit.Visual.Color.fromHSL=function(hue,_324,_325,_326){
var m=MochiKit.Visual;
return m.Color.fromRGB(m.hslToRGB.apply(m,arguments));
};
MochiKit.Visual.Color.fromHSV=function(hue,_327,_328,_329){
var m=MochiKit.Visual;
return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments));
};
MochiKit.Visual.Color.fromName=function(name){
var _330=MochiKit.Visual.Color;
var _331=_330._namedColors[name.toLowerCase()];
if(typeof (_331)=="string"){
return _330.fromHexString(_331);
}else{
if(name=="transparent"){
return _330.transparentColor();
}
}
return null;
};
MochiKit.Visual.Color.fromString=function(_332){
var self=MochiKit.Visual.Color;
var _333=_332.substr(0,3);
if(_333=="rgb"){
return self.fromRGBString(_332);
}else{
if(_333=="hsl"){
return self.fromHSLString(_332);
}else{
if(_332.charAt(0)=="#"){
return self.fromHexString(_332);
}
}
}
return self.fromName(_332);
};
MochiKit.Visual.Color.fromHexString=function(_334){
if(_334.charAt(0)=="#"){
_334=_334.substring(1);
}
var _335=[];
if(_334.length==3){
for(var i=0;i<3;i++){
var hex=_334.substr(i,1);
_335.push(parseInt(hex+hex,16)/255);
}
}else{
for(var i=0;i<6;i+=2){
var hex=_334.substr(i,2);
_335.push(parseInt(hex,16)/255);
}
}
var _337=MochiKit.Visual.Color;
return _337.fromRGB.apply(_337,_335);
};
MochiKit.Visual.Color._fromColorString=function(pre,_339,_340,_341){
if(_341.indexOf(pre)==0){
_341=_341.substring(_341.indexOf("(",3)+1,_341.length-1);
}
var _342=_341.split(/\s*,\s*/);
var _343=[];
for(var i=0;i<_342.length;i++){
var c=_342[i];
var val;
var _345=c.substring(c.length-3);
if(c.charAt(c.length-1)=="%"){
val=0.01*parseFloat(c.substring(0,c.length-1));
}else{
if(_345=="deg"){
val=parseFloat(c)/360;
}else{
if(_345=="rad"){
val=parseFloat(c)/(Math.PI*2);
}else{
val=_340[i]*parseFloat(c);
}
}
}
_343.push(val);
}
return this[_339].apply(this,_343);
};
MochiKit.Visual.Color.fromBackground=function(elem){
var m=MochiKit.Visual;
for(elem=MochiKit.DOM.getElement(elem);elem;elem=elem.parentNode){
var _346=m.getElementsComputedStyle(elem,"backgroundColor","background-color");
if(!_346){
continue;
}
var _347=m.Color.fromString(_346);
if(!_347){
break;
}
if(_347.asRGB().a>0){
return _347;
}
}
return m.Color.whiteColor();
};
MochiKit.Visual._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;
};
MochiKit.Visual.hsvToRGB=function(hue,_350,_351,_352){
if(arguments.length==1){
var hsv=hue;
hue=hsv.h;
_350=hsv.s;
_351=hsv.v;
_352=hsv.a;
}
var red;
var _353;
var blue;
if(_350==0){
red=0;
_353=0;
blue=0;
}else{
var i=Math.floor(hue*6);
var f=(hue*6)-i;
var p=_351*(1-_350);
var q=_351*(1-(_350*f));
var t=_351*(1-(_350*(1-f)));
switch(i){
case 1:
red=q;
_353=_351;
blue=p;
break;
case 2:
red=p;
_353=_351;
blue=t;
break;
case 3:
red=p;
_353=q;
blue=_351;
break;
case 4:
red=t;
_353=p;
blue=_351;
break;
case 5:
red=_351;
_353=p;
blue=q;
break;
case 6:
case 0:
red=_351;
_353=t;
blue=p;
break;
}
}
return {"r":red,"g":_353,"b":blue,"a":_352};
};
MochiKit.Visual.hslToRGB=function(hue,_354,_355,_356){
if(arguments.length==1){
var hsl=hue;
hue=hsl.h;
_354=hsl.s;
_355=hsl.l;
_356=hsl.a;
}
var red;
var _357;
var blue;
if(_354==0){
red=_355;
_357=_355;
blue=_355;
}else{
var m2;
if(_355<=0.5){
m2=_355*(1+_354);
}else{
m2=_355+_354-(_355*_354);
}
var m1=(2*_355)-m2;
var f=MochiKit.Visual._hslValue;
var h6=hue*6;
red=f(m1,m2,h6+2);
_357=f(m1,m2,h6);
blue=f(m1,m2,h6-2);
}
return {"r":red,"g":_357,"b":blue,"a":_356};
};
MochiKit.Visual.rgbToHSV=function(red,_361,blue,_362){
if(arguments.length==1){
var rgb=red;
red=rgb.r;
_361=rgb.g;
blue=rgb.b;
_362=rgb.a;
}
var max=Math.max(Math.max(red,_361),blue);
var min=Math.min(Math.min(red,_361),blue);
var hue;
var _365;
var _366=max;
if(min==max){
hue=0;
_365=0;
}else{
var _367=(max-min);
_365=_367/max;
if(red==max){
hue=(_361-blue)/_367;
}else{
if(_361==max){
hue=2+((blue-red)/_367);
}else{
hue=4+((red-_361)/_367);
}
}
hue/=6;
if(hue<0){
hue+=1;
}
if(hue>1){
hue-=1;
}
}
return {"h":hue,"s":_365,"v":_366,"a":_362};
};
MochiKit.Visual.rgbToHSL=function(red,_368,blue,_369){
if(arguments.length==1){
var rgb=red;
red=rgb.r;
_368=rgb.g;
blue=rgb.b;
_369=rgb.a;
}
var max=Math.max(red,Math.max(_368,blue));
var min=Math.min(red,Math.min(_368,blue));
var hue;
var _370;
var _371=(max+min)/2;
var _372=max-min;
if(_372==0){
hue=0;
_370=0;
}else{
if(_371<=0.5){
_370=_372/(max+min);
}else{
_370=_372/(2-max-min);
}
if(red==max){
hue=(_368-blue)/_372;
}else{
if(_368==max){
hue=2+((blue-red)/_372);
}else{
hue=4+((red-_368)/_372);
}
}
hue/=6;
if(hue<0){
hue+=1;
}
if(hue>1){
hue-=1;
}
}
return {"h":hue,"s":_370,"l":_371,"a":_369};
};
MochiKit.Visual.toColorPart=function(num){
var _373=Math.round(num).toString(16);
if(num<16){
return "0"+_373;
}
return _373;
};
MochiKit.Visual.roundElement=function(e,_375){
new MochiKit.Visual._RoundCorners(e,_375);
};
MochiKit.Visual.getElementsComputedStyle=function(_376,_377,_378){
if(arguments.length==2){
_378=_377;
}
var el=MochiKit.DOM.getElement(_376);
if(el.currentStyle){
return el.currentStyle[_377];
}else{
var _380=document.defaultView.getComputedStyle(el,null);
if(!_380){
return undefined;
}
return _380.getPropertyValue(_378);
}
};
MochiKit.Visual._RoundCorners=function(e,_381){
var e=MochiKit.DOM.getElement(e);
this._setOptions(_381);
var _382=this.options.color;
var m=MochiKit.Visual;
if(this.options.color=="fromElement"){
_382=m.Color.fromBackground(e);
}else{
if(!(_382 instanceof m.Color)){
_382=m.Color.fromString(_382);
}
}
this.isTransparent=(_382.asRGB().a<=0);
var _383=this.options.bgColor;
if(this.options.bgColor=="fromParent"){
_383=m.Color.fromBackground(e.offsetParent);
}else{
if(!(_383 instanceof m.Color)){
_383=m.Color.fromString(_383);
}
}
this._roundCornersImpl(e,_382,_383);
};
MochiKit.Visual._RoundCorners.prototype={"_roundCornersImpl":function(e,_384,_385){
if(this.options.border){
this._renderBorder(e,_385);
}
if(this._isTopRounded()){
this._roundTopCorners(e,_384,_385);
}
if(this._isBottomRounded()){
this._roundBottomCorners(e,_384,_385);
}
},"_renderBorder":function(el,_386){
var _387="1px solid "+this._borderColor(_386);
var _388="border-left: "+_387;
var _389="border-right: "+_387;
var _390="style='"+_388+";"+_389+"'";
el.innerHTML="<div "+_390+">"+el.innerHTML+"</div>";
},"_roundTopCorners":function(el,_391,_392){
var _393=this._createCorner(_392);
for(var i=0;i<this.options.numSlices;i++){
_393.appendChild(this._createCornerSlice(_391,_392,i,"top"));
}
el.style.paddingTop=0;
el.insertBefore(_393,el.firstChild);
},"_roundBottomCorners":function(el,_394,_395){
var _396=this._createCorner(_395);
for(var i=(this.options.numSlices-1);i>=0;i--){
_396.appendChild(this._createCornerSlice(_394,_395,i,"bottom"));
}
el.style.paddingBottom=0;
el.appendChild(_396);
},"_createCorner":function(_397){
var _398=document.createElement("div");
_398.style.backgroundColor=_397.toString();
return _398;
},"_createCornerSlice":function(_399,_400,n,_401){
var _402=document.createElement("span");
var _403=_402.style;
_403.backgroundColor=_399.toString();
_403.display="block";
_403.height="1px";
_403.overflow="hidden";
_403.fontSize="1px";
var _404=this._borderColor(_399,_400);
if(this.options.border&&n==0){
_403.borderTopStyle="solid";
_403.borderTopWidth="1px";
_403.borderLeftWidth="0px";
_403.borderRightWidth="0px";
_403.borderBottomWidth="0px";
_403.height="0px";
_403.borderColor=_404.toString();
}else{
if(_404){
_403.borderColor=_404.toString();
_403.borderStyle="solid";
_403.borderWidth="0px 1px";
}
}
if(!this.options.compact&&(n==(this.options.numSlices-1))){
_403.height="2px";
}
this._setMargin(_402,n,_401);
this._setBorder(_402,n,_401);
return _402;
},"_setOptions":function(_405){
this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false};
MochiKit.Base.update(this.options,_405);
this.options.numSlices=(this.options.compact?2:4);
},"_whichSideTop":function(){
var _406=this.options.corners;
if(this._hasString(_406,"all","top")){
return "";
}
var _407=(_406.indexOf("tl")!=-1);
var _408=(_406.indexOf("tr")!=-1);
if(_407&&_408){
return "";
}
if(_407){
return "left";
}
if(_408){
return "right";
}
return "";
},"_whichSideBottom":function(){
var _409=this.options.corners;
if(this._hasString(_409,"all","bottom")){
return "";
}
var _410=(_409.indexOf("bl")!=-1);
var _411=(_409.indexOf("br")!=-1);
if(_410&&_411){
return "";
}
if(_410){
return "left";
}
if(_411){
return "right";
}
return "";
},"_borderColor":function(_412,_413){
if(_412=="transparent"){
return _413;
}else{
if(this.options.border){
return this.options.border;
}else{
if(this.options.blend){
return _413.blendedColor(_412);
}
}
}
return "";
},"_setMargin":function(el,n,_414){
var _415=this._marginSize(n)+"px";
var _416=(_414=="top"?this._whichSideTop():this._whichSideBottom());
var _417=el.style;
if(_416=="left"){
_417.marginLeft=_415;
_417.marginRight="0px";
}else{
if(_416=="right"){
_417.marginRight=_415;
_417.marginLeft="0px";
}else{
_417.marginLeft=_415;
_417.marginRight=_415;
}
}
},"_setBorder":function(el,n,_418){
var _419=this._borderSize(n)+"px";
var _420=(_418=="top"?this._whichSideTop():this._whichSideBottom());
var _421=el.style;
if(_420=="left"){
_421.borderLeftWidth=_419;
_421.borderRightWidth="0px";
}else{
if(_420=="right"){
_421.borderRightWidth=_419;
_421.borderLeftWidth="0px";
}else{
_421.borderLeftWidth=_419;
_421.borderRightWidth=_419;
}
}
},"_marginSize":function(n){
if(this.isTransparent){
return 0;
}
var o=this.options;
if(o.compact&&o.blend){
var _422=[1,0];
return _422[n];
}else{
if(o.compact){
var _423=[2,1];
return _423[n];
}else{
if(o.blend){
var _424=[3,2,1,0];
return _424[n];
}else{
var _425=[5,3,2,1];
return _425[n];
}
}
}
},"_borderSize":function(n){
var o=this.options;
var _426;
if(o.compact&&(o.blend||this.isTransparent)){
return 1;
}else{
if(o.compact){
_426=[1,0];
}else{
if(o.blend){
_426=[2,1,1,1];
}else{
if(o.border){
_426=[0,2,0,0];
}else{
if(this.isTransparent){
_426=[5,3,2,1];
}else{
return 0;
}
}
}
}
}
return _426[n];
},"_hasString":function(str){
for(var i=1;i<arguments.length;i++){
if(str.indexOf(arguments[i])!=-1){
return true;
}
}
return false;
},"_isTopRounded":function(){
return this._hasString(this.options.corners,"all","top","tl","tr");
},"_isBottomRounded":function(){
return this._hasString(this.options.corners,"all","bottom","bl","br");
},"_hasSingleTextChild":function(el){
return (el.childNodes.length==1&&el.childNodes[0].nodeType==3);
}};
MochiKit.Visual.roundClass=function(_427,_428,_429){
var _430=MochiKit.DOM.getElementsByTagAndClassName(_427,_428);
for(var i=0;i<_430.length;i++){
roundElement(_430[i],_429);
}
};
MochiKit.Visual.__new__=function(){
var bind=MochiKit.Base.bind;
var map=MochiKit.Base.map;
var _431=MochiKit.Base.concat;
this.Color.fromRGBString=bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]);
this.Color.fromHSLString=bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]);
var _432=1/3;
var _433={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_432,_432,_432],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_432,2*_432,2*_432],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 _434=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 _433){
var name=k+"Color";
var _437=_431([_434,this.Color,name],_433[k]);
this.Color[name]=bind.apply(null,_437);
}
var _438=function(){
for(var i=0;i<arguments.length;i++){
if(!(arguments[i] instanceof Color)){
return false;
}
}
return true;
};
var _439=function(a,b){
return a.compareRGB(b);
};
MochiKit.Base.registerComparator(this.Color.NAME,_438,_439);
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};
MochiKit.Base.nameFunctions(this);
};
MochiKit.Visual.EXPORT=["Color","roundElement","roundClass"];
MochiKit.Visual.EXPORT_OK=["clampColorComponent","rgbToHSL","hslToRGB","rgbToHSV","hsvToRGB","toColorPart"];
MochiKit.Visual.__new__();
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){
(function(self){
var all=self.EXPORT_TAGS[":all"];
for(var i=0;i<all.length;i++){
this[all[i]]=self[all[i]];
}
})(MochiKit.Visual);
}
MochiKit.Visual.Color.namedColors=function(){
return MochiKit.Base.clone(MochiKit.Visual.Color._namedColors);
};
MochiKit.Visual.Color._namedColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};
if(typeof (MochiKit)=="undefined"){
MochiKit={};
}
if(typeof (MochiKit.MochiKit)=="undefined"){
MochiKit.MochiKit={};
}
MochiKit.MochiKit.NAME="MochiKit.MochiKit";
MochiKit.MochiKit.VERSION="0.80";
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","Visual"];
if(typeof (JSAN)!="undefined"||typeof (dojo)!="undefined"){
if(typeof (dojo)!="undefined"){
dojo.provides("MochiKit.MochiKit");
dojo.require("MochiKit.*");
}
if(typeof (JSAN)!="undefined"){
JSAN.use("MochiKit.Base",[]);
JSAN.use("MochiKit.Iter",[]);
JSAN.use("MochiKit.Logging",[]);
JSAN.use("MochiKit.DateTime",[]);
JSAN.use("MochiKit.Format",[]);
JSAN.use("MochiKit.Async",[]);
JSAN.use("MochiKit.DOM",[]);
JSAN.use("MochiKit.Visual",[]);
}
(function(){
var _440=MochiKit.Base.extend;
var self=MochiKit.MochiKit;
var _441=self.SUBMODULES;
var _442=[];
var _443=[];
var _444={};
for(var i=0;i<_441.length;i++){
var m=MochiKit[_441[i]];
_440(_442,m.EXPORT);
_440(_443,m.EXPORT_OK);
for(var k in m.EXPORT_TAGS){
_444[k]=_440(_444[k],m.EXPORT_TAGS[k]);
}
var all=m.EXPORT_TAGS[":all"];
if(!all){
all=_440(null,m.EXPORT,m.EXPORT_OK);
}
for(var i=0;i<all.length;i++){
var k=all[i];
self[k]=m[k];
}
}
self.EXPORT=_442;
self.EXPORT_OK=_443;
self.EXPORT_TAGS=_444;
}());
}else{
if(typeof (MochiKit.__compat__)=="undefined"){
MochiKit.__compat__=true;
}
(function(){
var _445=document.getElementsByTagName("script");
var base=null;
var _446=null;
var _447={};
for(var i=0;i<_445.length;i++){
src=_445[i].src;
_447[src]=true;
if(src.match(/MochiKit.js$/)){
base=src.substring(0,src.lastIndexOf("MochiKit.js"));
_446=_445[i];
}
}
if(base==null){
return;
}
var _448=MochiKit.MochiKit.SUBMODULES;
_448.unshift("Compat");
for(var i=0;i<_448.length;i++){
if(MochiKit[_448[i]]){
continue;
}
var uri=base+_448[i]+".js";
if(uri in _447){
continue;
}
if(false){
var s=document.createElement("script");
s.setAttribute("src",uri);
s.setAttribute("type","text/javascript");
_446.parentNode.appendChild(s);
}else{
var tag="<"+"script src=\""+uri+"\" type=\"text/javascript\""+">"+"<"+"/script"+">";
document.write(tag);
}
}
})();
}


