<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <tuple>
          <string>OFS.Image</string>
          <string>File</string>
        </tuple>
        <none/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_EtagSupport__etag</string> </key>
            <value> <string>ts81493608.29</string> </value>
        </item>
        <item>
            <key> <string>__ac_local_roles__</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>__name__</string> </key>
            <value> <string>MochiKit.js</string> </value>
        </item>
        <item>
            <key> <string>content_type</string> </key>
            <value> <string>application/x-javascript</string> </value>
        </item>
        <item>
            <key> <string>data</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
            </value>
        </item>
        <item>
            <key> <string>precondition</string> </key>
            <value> <string></string> </value>
        </item>
        <item>
            <key> <string>size</string> </key>
            <value> <long>113004</long> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string></string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
  <record id="2" aka="AAAAAAAAAAI=">
    <pickle>
      <tuple>
        <tuple>
          <string>OFS.Image</string>
          <string>Pdata</string>
        </tuple>
        <none/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>data</string> </key>
            <value> <string encoding="cdata"><![CDATA[

/***\n
\n
    MochiKit.MochiKit 1.3.1 : PACKED VERSION\n
\n
    THIS FILE IS AUTOMATICALLY GENERATED.  If creating patches, please\n
    diff against the source tree, not this file.\n
\n
    See <http://mochikit.com/> for documentation, downloads, license, etc.\n
\n
    (c) 2005 Bob Ippolito.  All rights Reserved.\n
\n
***/\n
\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.Base");\n
}\n
if(typeof (MochiKit)=="undefined"){\n
MochiKit={};\n
}\n
if(typeof (MochiKit.Base)=="undefined"){\n
MochiKit.Base={};\n
}\n
MochiKit.Base.VERSION="1.3.1";\n
MochiKit.Base.NAME="MochiKit.Base";\n
MochiKit.Base.update=function(_1,_2){\n
if(_1===null){\n
_1={};\n
}\n
for(var i=1;i<arguments.length;i++){\n
var o=arguments[i];\n
if(typeof (o)!="undefined"&&o!==null){\n
for(var k in o){\n
_1[k]=o[k];\n
}\n
}\n
}\n
return _1;\n
};\n
MochiKit.Base.update(MochiKit.Base,{__repr__:function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
},toString:function(){\n
return this.__repr__();\n
},counter:function(n){\n
if(arguments.length===0){\n
n=1;\n
}\n
return function(){\n
return n++;\n
};\n
},clone:function(_7){\n
var me=arguments.callee;\n
if(arguments.length==1){\n
me.prototype=_7;\n
return new me();\n
}\n
},flattenArguments:function(_9){\n
var res=[];\n
var m=MochiKit.Base;\n
var _12=m.extend(null,arguments);\n
while(_12.length){\n
var o=_12.shift();\n
if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){\n
for(var i=o.length-1;i>=0;i--){\n
_12.unshift(o[i]);\n
}\n
}else{\n
res.push(o);\n
}\n
}\n
return res;\n
},extend:function(_13,obj,_15){\n
if(!_15){\n
_15=0;\n
}\n
if(obj){\n
var l=obj.length;\n
if(typeof (l)!="number"){\n
if(typeof (MochiKit.Iter)!="undefined"){\n
obj=MochiKit.Iter.list(obj);\n
l=obj.length;\n
}else{\n
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");\n
}\n
}\n
if(!_13){\n
_13=[];\n
}\n
for(var i=_15;i<l;i++){\n
_13.push(obj[i]);\n
}\n
}\n
return _13;\n
},updatetree:function(_17,obj){\n
if(_17===null){\n
_17={};\n
}\n
for(var i=1;i<arguments.length;i++){\n
var o=arguments[i];\n
if(typeof (o)!="undefined"&&o!==null){\n
for(var k in o){\n
var v=o[k];\n
if(typeof (_17[k])=="object"&&typeof (v)=="object"){\n
arguments.callee(_17[k],v);\n
}else{\n
_17[k]=v;\n
}\n
}\n
}\n
}\n
return _17;\n
},setdefault:function(_19,obj){\n
if(_19===null){\n
_19={};\n
}\n
for(var i=1;i<arguments.length;i++){\n
var o=arguments[i];\n
for(var k in o){\n
if(!(k in _19)){\n
_19[k]=o[k];\n
}\n
}\n
}\n
return _19;\n
},keys:function(obj){\n
var _20=[];\n
for(var _21 in obj){\n
_20.push(_21);\n
}\n
return _20;\n
},items:function(obj){\n
var _22=[];\n
var e;\n
for(var _24 in obj){\n
var v;\n
try{\n
v=obj[_24];\n
}\n
catch(e){\n
continue;\n
}\n
_22.push([_24,v]);\n
}\n
return _22;\n
},_newNamedError:function(_25,_26,_27){\n
_27.prototype=new MochiKit.Base.NamedError(_25.NAME+"."+_26);\n
_25[_26]=_27;\n
},operator:{truth:function(a){\n
return !!a;\n
},lognot:function(a){\n
return !a;\n
},identity:function(a){\n
return a;\n
},not:function(a){\n
return ~a;\n
},neg:function(a){\n
return -a;\n
},add:function(a,b){\n
return a+b;\n
},sub:function(a,b){\n
return a-b;\n
},div:function(a,b){\n
return a/b;\n
},mod:function(a,b){\n
return a%b;\n
},mul:function(a,b){\n
return a*b;\n
},and:function(a,b){\n
return a&b;\n
},or:function(a,b){\n
return a|b;\n
},xor:function(a,b){\n
return a^b;\n
},lshift:function(a,b){\n
return a<<b;\n
},rshift:function(a,b){\n
return a>>b;\n
},zrshift:function(a,b){\n
return a>>>b;\n
},eq:function(a,b){\n
return a==b;\n
},ne:function(a,b){\n
return a!=b;\n
},gt:function(a,b){\n
return a>b;\n
},ge:function(a,b){\n
return a>=b;\n
},lt:function(a,b){\n
return a<b;\n
},le:function(a,b){\n
return a<=b;\n
},ceq:function(a,b){\n
return MochiKit.Base.compare(a,b)===0;\n
},cne:function(a,b){\n
return MochiKit.Base.compare(a,b)!==0;\n
},cgt:function(a,b){\n
return MochiKit.Base.compare(a,b)==1;\n
},cge:function(a,b){\n
return MochiKit.Base.compare(a,b)!=-1;\n
},clt:function(a,b){\n
return MochiKit.Base.compare(a,b)==-1;\n
},cle:function(a,b){\n
return MochiKit.Base.compare(a,b)!=1;\n
},logand:function(a,b){\n
return a&&b;\n
},logor:function(a,b){\n
return a||b;\n
},contains:function(a,b){\n
return b in a;\n
}},forwardCall:function(_30){\n
return function(){\n
return this[_30].apply(this,arguments);\n
};\n
},itemgetter:function(_31){\n
return function(arg){\n
return arg[_31];\n
};\n
},typeMatcher:function(){\n
var _33={};\n
for(var i=0;i<arguments.length;i++){\n
var typ=arguments[i];\n
_33[typ]=typ;\n
}\n
return function(){\n
for(var i=0;i<arguments.length;i++){\n
if(!(typeof (arguments[i]) in _33)){\n
return false;\n
}\n
}\n
return true;\n
};\n
},isNull:function(){\n
for(var i=0;i<arguments.length;i++){\n
if(arguments[i]!==null){\n
return false;\n
}\n
}\n
return true;\n
},isUndefinedOrNull:function(){\n
for(var i=0;i<arguments.length;i++){\n
var o=arguments[i];\n
if(!(typeof (o)=="undefined"||o===null)){\n
return false;\n
}\n
}\n
return true;\n
},isEmpty:function(obj){\n
return !MochiKit.Base.isNotEmpty.apply(this,arguments);\n
},isNotEmpty:function(obj){\n
for(var i=0;i<arguments.length;i++){\n
var o=arguments[i];\n
if(!(o&&o.length)){\n
return false;\n
}\n
}\n
return true;\n
},isArrayLike:function(){\n
for(var i=0;i<arguments.length;i++){\n
var o=arguments[i];\n
var typ=typeof (o);\n
if((typ!="object"&&!(typ=="function"&&typeof (o.item)=="function"))||o===null||typeof (o.length)!="number"){\n
return false;\n
}\n
}\n
return true;\n
},isDateLike:function(){\n
for(var i=0;i<arguments.length;i++){\n
var o=arguments[i];\n
if(typeof (o)!="object"||o===null||typeof (o.getTime)!="function"){\n
return false;\n
}\n
}\n
return true;\n
},xmap:function(fn){\n
if(fn===null){\n
return MochiKit.Base.extend(null,arguments,1);\n
}\n
var _36=[];\n
for(var i=1;i<arguments.length;i++){\n
_36.push(fn(arguments[i]));\n
}\n
return _36;\n
},map:function(fn,lst){\n
var m=MochiKit.Base;\n
var itr=MochiKit.Iter;\n
var _39=m.isArrayLike;\n
if(arguments.length<=2){\n
if(!_39(lst)){\n
if(itr){\n
lst=itr.list(lst);\n
if(fn===null){\n
return lst;\n
}\n
}else{\n
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");\n
}\n
}\n
if(fn===null){\n
return m.extend(null,lst);\n
}\n
var _40=[];\n
for(var i=0;i<lst.length;i++){\n
_40.push(fn(lst[i]));\n
}\n
return _40;\n
}else{\n
if(fn===null){\n
fn=Array;\n
}\n
var _41=null;\n
for(i=1;i<arguments.length;i++){\n
if(!_39(arguments[i])){\n
if(itr){\n
return itr.list(itr.imap.apply(null,arguments));\n
}else{\n
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");\n
}\n
}\n
var l=arguments[i].length;\n
if(_41===null||_41>l){\n
_41=l;\n
}\n
}\n
_40=[];\n
for(i=0;i<_41;i++){\n
var _42=[];\n
for(var j=1;j<arguments.length;j++){\n
_42.push(arguments[j][i]);\n
}\n
_40.push(fn.apply(this,_42));\n
}\n
return _40;\n
}\n
},xfilter:function(fn){\n
var _44=[];\n
if(fn===null){\n
fn=MochiKit.Base.operator.truth;\n
}\n
for(var i=1;i<arguments.length;i++){\n
var o=arguments[i];\n
if(fn(o)){\n
_44.push(o);\n
}\n
}\n
return _44;\n
},filter:function(fn,lst,_45){\n
var _46=[];\n
var m=MochiKit.Base;\n
if(!m.isArrayLike(lst)){\n
if(MochiKit.Iter){\n
lst=MochiKit.Iter.list(lst);\n
}else{\n
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");\n
}\n
}\n
if(fn===null){\n
fn=m.operator.truth;\n
}\n
if(typeof (Array.prototype.filter)=="function"){\n
return Array.prototype.filter.call(lst,fn,_45);\n
}else{\n
if(typeof (_45)=="undefined"||_45===null){\n
for(var i=0;i<lst.length;i++){\n
var o=lst[i];\n
if(fn(o)){\n
_46.push(o);\n
}\n
}\n
}else{\n
for(i=0;i<lst.length;i++){\n
o=lst[i];\n
if(fn.call(_45,o)){\n
_46.push(o);\n
}\n
}\n
}\n
}\n
return _46;\n
},_wrapDumbFunction:function(_47){\n
return function(){\n
switch(arguments.length){\n
case 0:\n
return _47();\n
case 1:\n
return _47(arguments[0]);\n
case 2:\n
return _47(arguments[0],arguments[1]);\n
case 3:\n
return _47(arguments[0],arguments[1],arguments[2]);\n
}\n
var _48=[];\n
for(var i=0;i<arguments.length;i++){\n
_48.push("arguments["+i+"]");\n
}\n
return eval("(func("+_48.join(",")+"))");\n
};\n
},method:function(_49,_50){\n
var m=MochiKit.Base;\n
return m.bind.apply(this,m.extend([_50,_49],arguments,2));\n
},bind:function(_51,_52){\n
if(typeof (_51)=="string"){\n
_51=_52[_51];\n
}\n
var _53=_51.im_func;\n
var _54=_51.im_preargs;\n
var _55=_51.im_self;\n
var m=MochiKit.Base;\n
if(typeof (_51)=="function"&&typeof (_51.apply)=="undefined"){\n
_51=m._wrapDumbFunction(_51);\n
}\n
if(typeof (_53)!="function"){\n
_53=_51;\n
}\n
if(typeof (_52)!="undefined"){\n
_55=_52;\n
}\n
if(typeof (_54)=="undefined"){\n
_54=[];\n
}else{\n
_54=_54.slice();\n
}\n
m.extend(_54,arguments,2);\n
var _56=function(){\n
var _57=arguments;\n
var me=arguments.callee;\n
if(me.im_preargs.length>0){\n
_57=m.concat(me.im_preargs,_57);\n
}\n
var _52=me.im_self;\n
if(!_52){\n
_52=this;\n
}\n
return me.im_func.apply(_52,_57);\n
};\n
_56.im_self=_55;\n
_56.im_func=_53;\n
_56.im_preargs=_54;\n
return _56;\n
},bindMethods:function(_58){\n
var _59=MochiKit.Base.bind;\n
for(var k in _58){\n
var _60=_58[k];\n
if(typeof (_60)=="function"){\n
_58[k]=_59(_60,_58);\n
}\n
}\n
},registerComparator:function(_61,_62,_63,_64){\n
MochiKit.Base.comparatorRegistry.register(_61,_62,_63,_64);\n
},_primitives:{"boolean":true,"string":true,"number":true},compare:function(a,b){\n
if(a==b){\n
return 0;\n
}\n
var _65=(typeof (a)=="undefined"||a===null);\n
var _66=(typeof (b)=="undefined"||b===null);\n
if(_65&&_66){\n
return 0;\n
}else{\n
if(_65){\n
return -1;\n
}else{\n
if(_66){\n
return 1;\n
}\n
}\n
}\n
var m=MochiKit.Base;\n
var _67=m._primitives;\n
if(!(typeof (a) in _67&&typeof (b) in _67)){\n
try{\n
return m.comparatorRegistry.match(a,b);\n
}\n
catch(e){\n
if(e!=m.NotFound){\n
throw e;\n
}\n
}\n
}\n
if(a<b){\n
return -1;\n
}else{\n
if(a>b){\n
return 1;\n
}\n
}\n
var _68=m.repr;\n
throw new TypeError(_68(a)+" and "+_68(b)+" can not be compared");\n
},compareDateLike:function(a,b){\n
return MochiKit.Base.compare(a.getTime(),b.getTime());\n
},compareArrayLike:function(a,b){\n
var _69=MochiKit.Base.compare;\n
var _70=a.length;\n
var _71=0;\n
if(_70>b.length){\n
_71=1;\n
_70=b.length;\n
}else{\n
if(_70<b.length){\n
_71=-1;\n
}\n
}\n
for(var i=0;i<_70;i++){\n
var cmp=_69(a[i],b[i]);\n
if(cmp){\n
return cmp;\n
}\n
}\n
return _71;\n
},registerRepr:function(_73,_74,_75,_76){\n
MochiKit.Base.reprRegistry.register(_73,_74,_75,_76);\n
},repr:function(o){\n
if(typeof (o)=="undefined"){\n
return "undefined";\n
}else{\n
if(o===null){\n
return "null";\n
}\n
}\n
try{\n
if(typeof (o.__repr__)=="function"){\n
return o.__repr__();\n
}else{\n
if(typeof (o.repr)=="function"&&o.repr!=arguments.callee){\n
return o.repr();\n
}\n
}\n
return MochiKit.Base.reprRegistry.match(o);\n
}\n
catch(e){\n
if(typeof (o.NAME)=="string"&&(o.toString==Function.prototype.toString||o.toString==Object.prototype.toString)){\n
return o.NAME;\n
}\n
}\n
try{\n
var _77=(o+"");\n
}\n
catch(e){\n
return "["+typeof (o)+"]";\n
}\n
if(typeof (o)=="function"){\n
o=_77.replace(/^\\s+/,"");\n
var idx=o.indexOf("{");\n
if(idx!=-1){\n
o=o.substr(0,idx)+"{...}";\n
}\n
}\n
return _77;\n
},reprArrayLike:function(o){\n
var m=MochiKit.Base;\n
return "["+m.map(m.repr,o).join(", ")+"]";\n
},reprString:function(o){\n
return ("\\""+o.replace(/(["\\\\])/g,"\\\\$1")+"\\"").replace(/[\\f]/g,"\\\\f").replace(/[\\b]/g,"\\\\b").replace(/[\\n]/g,"\\\\n").replace(/[\\t]/g,"\\\\t").replace(/[\\r]/g,"\\\\r");\n
},reprNumber:function(o){\n
return o+"";\n
},registerJSON:function(_79,_80,_81,_82){\n
MochiKit.Base.jsonRegistry.register(_79,_80,_81,_82);\n
},evalJSON:function(){\n
return eval("("+arguments[0]+")");\n
},serializeJSON:function(o){\n
var _83=typeof (o);\n
if(_83=="undefined"){\n
return "undefined";\n
}else{\n
if(_83=="number"||_83=="boolean"){\n
return o+"";\n
}else{\n
if(o===null){\n
return "null";\n
}\n
}\n
}\n
var m=MochiKit.Base;\n
var _84=m.reprString;\n
if(_83=="string"){\n
return _84(o);\n
}\n
var me=arguments.callee;\n
var _85;\n
if(typeof (o.__json__)=="function"){\n
_85=o.__json__();\n
if(o!==_85){\n
return me(_85);\n
}\n
}\n
if(typeof (o.json)=="function"){\n
_85=o.json();\n
if(o!==_85){\n
return me(_85);\n
}\n
}\n
if(_83!="function"&&typeof (o.length)=="number"){\n
var res=[];\n
for(var i=0;i<o.length;i++){\n
var val=me(o[i]);\n
if(typeof (val)!="string"){\n
val="undefined";\n
}\n
res.push(val);\n
}\n
return "["+res.join(", ")+"]";\n
}\n
try{\n
_85=m.jsonRegistry.match(o);\n
return me(_85);\n
}\n
catch(e){\n
if(e!=m.NotFound){\n
throw e;\n
}\n
}\n
if(_83=="function"){\n
return null;\n
}\n
res=[];\n
for(var k in o){\n
var _87;\n
if(typeof (k)=="number"){\n
_87="\\""+k+"\\"";\n
}else{\n
if(typeof (k)=="string"){\n
_87=_84(k);\n
}else{\n
continue;\n
}\n
}\n
val=me(o[k]);\n
if(typeof (val)!="string"){\n
continue;\n
}\n
res.push(_87+":"+val);\n
}\n
return "{"+res.join(", ")+"}";\n
},objEqual:function(a,b){\n
return (MochiKit.Base.compare(a,b)===0);\n
},arrayEqual:function(_88,arr){\n
if(_88.length!=arr.length){\n
return false;\n
}\n
return (MochiKit.Base.compare(_88,arr)===0);\n
},concat:function(){\n
var _90=[];\n
var _91=MochiKit.Base.extend;\n
for(var i=0;i<arguments.length;i++){\n
_91(_90,arguments[i]);\n
}\n
return _90;\n
},keyComparator:function(key){\n
var m=MochiKit.Base;\n
var _93=m.compare;\n
if(arguments.length==1){\n
return function(a,b){\n
return _93(a[key],b[key]);\n
};\n
}\n
var _94=m.extend(null,arguments);\n
return function(a,b){\n
var _95=0;\n
for(var i=0;(_95===0)&&(i<_94.length);i++){\n
var key=_94[i];\n
_95=_93(a[key],b[key]);\n
}\n
return _95;\n
};\n
},reverseKeyComparator:function(key){\n
var _96=MochiKit.Base.keyComparator.apply(this,arguments);\n
return function(a,b){\n
return _96(b,a);\n
};\n
},partial:function(_97){\n
var m=MochiKit.Base;\n
return m.bind.apply(this,m.extend([_97,undefined],arguments,1));\n
},listMinMax:function(_98,lst){\n
if(lst.length===0){\n
return null;\n
}\n
var cur=lst[0];\n
var _100=MochiKit.Base.compare;\n
for(var i=1;i<lst.length;i++){\n
var o=lst[i];\n
if(_100(o,cur)==_98){\n
cur=o;\n
}\n
}\n
return cur;\n
},objMax:function(){\n
return MochiKit.Base.listMinMax(1,arguments);\n
},objMin:function(){\n
return MochiKit.Base.listMinMax(-1,arguments);\n
},findIdentical:function(lst,_101,_102,end){\n
if(typeof (end)=="undefined"||end===null){\n
end=lst.length;\n
}\n
for(var i=(_102||0);i<end;i++){\n
if(lst[i]===_101){\n
return i;\n
}\n
}\n
return -1;\n
},findValue:function(lst,_104,_105,end){\n
if(typeof (end)=="undefined"||end===null){\n
end=lst.length;\n
}\n
var cmp=MochiKit.Base.compare;\n
for(var i=(_105||0);i<end;i++){\n
if(cmp(lst[i],_104)===0){\n
return i;\n
}\n
}\n
return -1;\n
},nodeWalk:function(node,_107){\n
var _108=[node];\n
var _109=MochiKit.Base.extend;\n
while(_108.length){\n
var res=_107(_108.shift());\n
if(res){\n
_109(_108,res);\n
}\n
}\n
},nameFunctions:function(_110){\n
var base=_110.NAME;\n
if(typeof (base)=="undefined"){\n
base="";\n
}else{\n
base=base+".";\n
}\n
for(var name in _110){\n
var o=_110[name];\n
if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){\n
try{\n
o.NAME=base+name;\n
}\n
catch(e){\n
}\n
}\n
}\n
},queryString:function(_113,_114){\n
if(typeof (MochiKit.DOM)!="undefined"&&arguments.length==1&&(typeof (_113)=="string"||(typeof (_113.nodeType)!="undefined"&&_113.nodeType>0))){\n
var kv=MochiKit.DOM.formContents(_113);\n
_113=kv[0];\n
_114=kv[1];\n
}else{\n
if(arguments.length==1){\n
var o=_113;\n
_113=[];\n
_114=[];\n
for(var k in o){\n
var v=o[k];\n
if(typeof (v)!="function"){\n
_113.push(k);\n
_114.push(v);\n
}\n
}\n
}\n
}\n
var rval=[];\n
var len=Math.min(_113.length,_114.length);\n
var _118=MochiKit.Base.urlEncode;\n
for(var i=0;i<len;i++){\n
v=_114[i];\n
if(typeof (v)!="undefined"&&v!==null){\n
rval.push(_118(_113[i])+"="+_118(v));\n
}\n
}\n
return rval.join("&");\n
},parseQueryString:function(_119,_120){\n
var _121=_119.replace(/\\+/g,"%20").split("&");\n
var o={};\n
var _122;\n
if(typeof (decodeURIComponent)!="undefined"){\n
_122=decodeURIComponent;\n
}else{\n
_122=unescape;\n
}\n
if(_120){\n
for(var i=0;i<_121.length;i++){\n
var pair=_121[i].split("=");\n
var name=_122(pair[0]);\n
var arr=o[name];\n
if(!(arr instanceof Array)){\n
arr=[];\n
o[name]=arr;\n
}\n
arr.push(_122(pair[1]));\n
}\n
}else{\n
for(i=0;i<_121.length;i++){\n
pair=_121[i].split("=");\n
o[_122(pair[0])]=_122(pair[1]);\n
}\n
}\n
return o;\n
}});\n
MochiKit.Base.AdapterRegistry=function(){\n
this.pairs=[];\n
};\n
MochiKit.Base.AdapterRegistry.prototype={register:function(name,_124,wrap,_126){\n
if(_126){\n
this.pairs.unshift([name,_124,wrap]);\n
}else{\n
this.pairs.push([name,_124,wrap]);\n
}\n
},match:function(){\n
for(var i=0;i<this.pairs.length;i++){\n
var pair=this.pairs[i];\n
if(pair[1].apply(this,arguments)){\n
return pair[2].apply(this,arguments);\n
}\n
}\n
throw MochiKit.Base.NotFound;\n
},unregister:function(name){\n
for(var i=0;i<this.pairs.length;i++){\n
var pair=this.pairs[i];\n
if(pair[0]==name){\n
this.pairs.splice(i,1);\n
return true;\n
}\n
}\n
return false;\n
}};\n
MochiKit.Base.EXPORT=["counter","clone","extend","update","updatetree","setdefault","keys","items","NamedError","operator","forwardCall","itemgetter","typeMatcher","isCallable","isUndefined","isUndefinedOrNull","isNull","isEmpty","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","serializeJSON","registerJSON","evalJSON","parseQueryString","findValue","findIdentical","flattenArguments","method"];\n
MochiKit.Base.EXPORT_OK=["nameFunctions","comparatorRegistry","reprRegistry","jsonRegistry","compareDateLike","compareArrayLike","reprArrayLike","reprString","reprNumber"];\n
MochiKit.Base._exportSymbols=function(_127,_128){\n
if(typeof (MochiKit.__export__)=="undefined"){\n
MochiKit.__export__=(MochiKit.__compat__||(typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined"));\n
}\n
if(!MochiKit.__export__){\n
return;\n
}\n
var all=_128.EXPORT_TAGS[":all"];\n
for(var i=0;i<all.length;i++){\n
_127[all[i]]=_128[all[i]];\n
}\n
};\n
MochiKit.Base.__new__=function(){\n
var m=this;\n
m.forward=m.forwardCall;\n
m.find=m.findValue;\n
if(typeof (encodeURIComponent)!="undefined"){\n
m.urlEncode=function(_130){\n
return encodeURIComponent(_130).replace(/\\\'/g,"%27");\n
};\n
}else{\n
m.urlEncode=function(_131){\n
return escape(_131).replace(/\\+/g,"%2B").replace(/\\"/g,"%22").rval.replace(/\\\'/g,"%27");\n
};\n
}\n
m.NamedError=function(name){\n
this.message=name;\n
this.name=name;\n
};\n
m.NamedError.prototype=new Error();\n
m.update(m.NamedError.prototype,{repr:function(){\n
if(this.message&&this.message!=this.name){\n
return this.name+"("+m.repr(this.message)+")";\n
}else{\n
return this.name+"()";\n
}\n
},toString:m.forwardCall("repr")});\n
m.NotFound=new m.NamedError("MochiKit.Base.NotFound");\n
m.listMax=m.partial(m.listMinMax,1);\n
m.listMin=m.partial(m.listMinMax,-1);\n
m.isCallable=m.typeMatcher("function");\n
m.isUndefined=m.typeMatcher("undefined");\n
m.merge=m.partial(m.update,null);\n
m.zip=m.partial(m.map,null);\n
m.comparatorRegistry=new m.AdapterRegistry();\n
m.registerComparator("dateLike",m.isDateLike,m.compareDateLike);\n
m.registerComparator("arrayLike",m.isArrayLike,m.compareArrayLike);\n
m.reprRegistry=new m.AdapterRegistry();\n
m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);\n
m.registerRepr("string",m.typeMatcher("string"),m.reprString);\n
m.registerRepr("numbers",m.typeMatcher("number","boolean"),m.reprNumber);\n
m.jsonRegistry=new m.AdapterRegistry();\n
var all=m.concat(m.EXPORT,m.EXPORT_OK);\n
m.EXPORT_TAGS={":common":m.concat(m.EXPORT_OK),":all":all};\n
m.nameFunctions(this);\n
};\n
MochiKit.Base.__new__();\n
if(!MochiKit.__compat__){\n
compare=MochiKit.Base.compare;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.Base);\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.Iter");\n
dojo.require("MochiKit.Base");\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit.Base",[]);\n
}\n
try{\n
if(typeof (MochiKit.Base)=="undefined"){\n
throw "";\n
}\n
}\n
catch(e){\n
throw "MochiKit.Iter depends on MochiKit.Base!";\n
}\n
if(typeof (MochiKit.Iter)=="undefined"){\n
MochiKit.Iter={};\n
}\n
MochiKit.Iter.NAME="MochiKit.Iter";\n
MochiKit.Iter.VERSION="1.3.1";\n
MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
},toString:function(){\n
return this.__repr__();\n
},registerIteratorFactory:function(name,_132,_133,_134){\n
MochiKit.Iter.iteratorRegistry.register(name,_132,_133,_134);\n
},iter:function(_135,_136){\n
var self=MochiKit.Iter;\n
if(arguments.length==2){\n
return self.takewhile(function(a){\n
return a!=_136;\n
},_135);\n
}\n
if(typeof (_135.next)=="function"){\n
return _135;\n
}else{\n
if(typeof (_135.iter)=="function"){\n
return _135.iter();\n
}\n
}\n
try{\n
return self.iteratorRegistry.match(_135);\n
}\n
catch(e){\n
var m=MochiKit.Base;\n
if(e==m.NotFound){\n
e=new TypeError(typeof (_135)+": "+m.repr(_135)+" is not iterable");\n
}\n
throw e;\n
}\n
},count:function(n){\n
if(!n){\n
n=0;\n
}\n
var m=MochiKit.Base;\n
return {repr:function(){\n
return "count("+n+")";\n
},toString:m.forwardCall("repr"),next:m.counter(n)};\n
},cycle:function(p){\n
var self=MochiKit.Iter;\n
var m=MochiKit.Base;\n
var lst=[];\n
var _139=self.iter(p);\n
return {repr:function(){\n
return "cycle(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
try{\n
var rval=_139.next();\n
lst.push(rval);\n
return rval;\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
if(lst.length===0){\n
this.next=function(){\n
throw self.StopIteration;\n
};\n
}else{\n
var i=-1;\n
this.next=function(){\n
i=(i+1)%lst.length;\n
return lst[i];\n
};\n
}\n
return this.next();\n
}\n
}};\n
},repeat:function(elem,n){\n
var m=MochiKit.Base;\n
if(typeof (n)=="undefined"){\n
return {repr:function(){\n
return "repeat("+m.repr(elem)+")";\n
},toString:m.forwardCall("repr"),next:function(){\n
return elem;\n
}};\n
}\n
return {repr:function(){\n
return "repeat("+m.repr(elem)+", "+n+")";\n
},toString:m.forwardCall("repr"),next:function(){\n
if(n<=0){\n
throw MochiKit.Iter.StopIteration;\n
}\n
n-=1;\n
return elem;\n
}};\n
},next:function(_141){\n
return _141.next();\n
},izip:function(p,q){\n
var m=MochiKit.Base;\n
var next=MochiKit.Iter.next;\n
var _144=m.map(iter,arguments);\n
return {repr:function(){\n
return "izip(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
return m.map(next,_144);\n
}};\n
},ifilter:function(pred,seq){\n
var m=MochiKit.Base;\n
seq=MochiKit.Iter.iter(seq);\n
if(pred===null){\n
pred=m.operator.truth;\n
}\n
return {repr:function(){\n
return "ifilter(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
while(true){\n
var rval=seq.next();\n
if(pred(rval)){\n
return rval;\n
}\n
}\n
return undefined;\n
}};\n
},ifilterfalse:function(pred,seq){\n
var m=MochiKit.Base;\n
seq=MochiKit.Iter.iter(seq);\n
if(pred===null){\n
pred=m.operator.truth;\n
}\n
return {repr:function(){\n
return "ifilterfalse(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
while(true){\n
var rval=seq.next();\n
if(!pred(rval)){\n
return rval;\n
}\n
}\n
return undefined;\n
}};\n
},islice:function(seq){\n
var self=MochiKit.Iter;\n
var m=MochiKit.Base;\n
seq=self.iter(seq);\n
var _147=0;\n
var stop=0;\n
var step=1;\n
var i=-1;\n
if(arguments.length==2){\n
stop=arguments[1];\n
}else{\n
if(arguments.length==3){\n
_147=arguments[1];\n
stop=arguments[2];\n
}else{\n
_147=arguments[1];\n
stop=arguments[2];\n
step=arguments[3];\n
}\n
}\n
return {repr:function(){\n
return "islice("+["...",_147,stop,step].join(", ")+")";\n
},toString:m.forwardCall("repr"),next:function(){\n
var rval;\n
while(i<_147){\n
rval=seq.next();\n
i++;\n
}\n
if(_147>=stop){\n
throw self.StopIteration;\n
}\n
_147+=step;\n
return rval;\n
}};\n
},imap:function(fun,p,q){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
var _151=m.map(self.iter,m.extend(null,arguments,1));\n
var map=m.map;\n
var next=self.next;\n
return {repr:function(){\n
return "imap(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
return fun.apply(this,map(next,_151));\n
}};\n
},applymap:function(fun,seq,self){\n
seq=MochiKit.Iter.iter(seq);\n
var m=MochiKit.Base;\n
return {repr:function(){\n
return "applymap(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
return fun.apply(self,seq.next());\n
}};\n
},chain:function(p,q){\n
var self=MochiKit.Iter;\n
var m=MochiKit.Base;\n
if(arguments.length==1){\n
return self.iter(arguments[0]);\n
}\n
var _153=m.map(self.iter,arguments);\n
return {repr:function(){\n
return "chain(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
while(_153.length>1){\n
try{\n
return _153[0].next();\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
_153.shift();\n
}\n
}\n
if(_153.length==1){\n
var arg=_153.shift();\n
this.next=m.bind("next",arg);\n
return this.next();\n
}\n
throw self.StopIteration;\n
}};\n
},takewhile:function(pred,seq){\n
var self=MochiKit.Iter;\n
seq=self.iter(seq);\n
return {repr:function(){\n
return "takewhile(...)";\n
},toString:MochiKit.Base.forwardCall("repr"),next:function(){\n
var rval=seq.next();\n
if(!pred(rval)){\n
this.next=function(){\n
throw self.StopIteration;\n
};\n
this.next();\n
}\n
return rval;\n
}};\n
},dropwhile:function(pred,seq){\n
seq=MochiKit.Iter.iter(seq);\n
var m=MochiKit.Base;\n
var bind=m.bind;\n
return {"repr":function(){\n
return "dropwhile(...)";\n
},"toString":m.forwardCall("repr"),"next":function(){\n
while(true){\n
var rval=seq.next();\n
if(!pred(rval)){\n
break;\n
}\n
}\n
this.next=bind("next",seq);\n
return rval;\n
}};\n
},_tee:function(_155,sync,_157){\n
sync.pos[_155]=-1;\n
var m=MochiKit.Base;\n
var _158=m.listMin;\n
return {repr:function(){\n
return "tee("+_155+", ...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
var rval;\n
var i=sync.pos[_155];\n
if(i==sync.max){\n
rval=_157.next();\n
sync.deque.push(rval);\n
sync.max+=1;\n
sync.pos[_155]+=1;\n
}else{\n
rval=sync.deque[i-sync.min];\n
sync.pos[_155]+=1;\n
if(i==sync.min&&_158(sync.pos)!=sync.min){\n
sync.min+=1;\n
sync.deque.shift();\n
}\n
}\n
return rval;\n
}};\n
},tee:function(_159,n){\n
var rval=[];\n
var sync={"pos":[],"deque":[],"max":-1,"min":-1};\n
if(arguments.length==1){\n
n=2;\n
}\n
var self=MochiKit.Iter;\n
_159=self.iter(_159);\n
var _tee=self._tee;\n
for(var i=0;i<n;i++){\n
rval.push(_tee(i,sync,_159));\n
}\n
return rval;\n
},list:function(_161){\n
var m=MochiKit.Base;\n
if(typeof (_161.slice)=="function"){\n
return _161.slice();\n
}else{\n
if(m.isArrayLike(_161)){\n
return m.concat(_161);\n
}\n
}\n
var self=MochiKit.Iter;\n
_161=self.iter(_161);\n
var rval=[];\n
try{\n
while(true){\n
rval.push(_161.next());\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
return rval;\n
}\n
return undefined;\n
},reduce:function(fn,_162,_163){\n
var i=0;\n
var x=_163;\n
var self=MochiKit.Iter;\n
_162=self.iter(_162);\n
if(arguments.length<3){\n
try{\n
x=_162.next();\n
}\n
catch(e){\n
if(e==self.StopIteration){\n
e=new TypeError("reduce() of empty sequence with no initial value");\n
}\n
throw e;\n
}\n
i++;\n
}\n
try{\n
while(true){\n
x=fn(x,_162.next());\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
return x;\n
},range:function(){\n
var _165=0;\n
var stop=0;\n
var step=1;\n
if(arguments.length==1){\n
stop=arguments[0];\n
}else{\n
if(arguments.length==2){\n
_165=arguments[0];\n
stop=arguments[1];\n
}else{\n
if(arguments.length==3){\n
_165=arguments[0];\n
stop=arguments[1];\n
step=arguments[2];\n
}else{\n
throw new TypeError("range() takes 1, 2, or 3 arguments!");\n
}\n
}\n
}\n
if(step===0){\n
throw new TypeError("range() step must not be 0");\n
}\n
return {next:function(){\n
if((step>0&&_165>=stop)||(step<0&&_165<=stop)){\n
throw MochiKit.Iter.StopIteration;\n
}\n
var rval=_165;\n
_165+=step;\n
return rval;\n
},repr:function(){\n
return "range("+[_165,stop,step].join(", ")+")";\n
},toString:MochiKit.Base.forwardCall("repr")};\n
},sum:function(_166,_167){\n
var x=_167||0;\n
var self=MochiKit.Iter;\n
_166=self.iter(_166);\n
try{\n
while(true){\n
x+=_166.next();\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
return x;\n
},exhaust:function(_168){\n
var self=MochiKit.Iter;\n
_168=self.iter(_168);\n
try{\n
while(true){\n
_168.next();\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
},forEach:function(_169,func,self){\n
var m=MochiKit.Base;\n
if(arguments.length>2){\n
func=m.bind(func,self);\n
}\n
if(m.isArrayLike(_169)){\n
try{\n
for(var i=0;i<_169.length;i++){\n
func(_169[i]);\n
}\n
}\n
catch(e){\n
if(e!=MochiKit.Iter.StopIteration){\n
throw e;\n
}\n
}\n
}else{\n
self=MochiKit.Iter;\n
self.exhaust(self.imap(func,_169));\n
}\n
},every:function(_171,func){\n
var self=MochiKit.Iter;\n
try{\n
self.ifilterfalse(func,_171).next();\n
return false;\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
return true;\n
}\n
},sorted:function(_172,cmp){\n
var rval=MochiKit.Iter.list(_172);\n
if(arguments.length==1){\n
cmp=MochiKit.Base.compare;\n
}\n
rval.sort(cmp);\n
return rval;\n
},reversed:function(_173){\n
var rval=MochiKit.Iter.list(_173);\n
rval.reverse();\n
return rval;\n
},some:function(_174,func){\n
var self=MochiKit.Iter;\n
try{\n
self.ifilter(func,_174).next();\n
return true;\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
return false;\n
}\n
},iextend:function(lst,_175){\n
if(MochiKit.Base.isArrayLike(_175)){\n
for(var i=0;i<_175.length;i++){\n
lst.push(_175[i]);\n
}\n
}else{\n
var self=MochiKit.Iter;\n
_175=self.iter(_175);\n
try{\n
while(true){\n
lst.push(_175.next());\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
}\n
return lst;\n
},groupby:function(_176,_177){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
if(arguments.length<2){\n
_177=m.operator.identity;\n
}\n
_176=self.iter(_176);\n
var pk=undefined;\n
var k=undefined;\n
var v;\n
function fetch(){\n
v=_176.next();\n
k=_177(v);\n
}\n
function eat(){\n
var ret=v;\n
v=undefined;\n
return ret;\n
}\n
var _180=true;\n
return {repr:function(){\n
return "groupby(...)";\n
},next:function(){\n
while(k==pk){\n
fetch();\n
if(_180){\n
_180=false;\n
break;\n
}\n
}\n
pk=k;\n
return [k,{next:function(){\n
if(v==undefined){\n
fetch();\n
}\n
if(k!=pk){\n
throw self.StopIteration;\n
}\n
return eat();\n
}}];\n
}};\n
},groupby_as_array:function(_181,_182){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
if(arguments.length<2){\n
_182=m.operator.identity;\n
}\n
_181=self.iter(_181);\n
var _183=[];\n
var _184=true;\n
var _185;\n
while(true){\n
try{\n
var _186=_181.next();\n
var key=_182(_186);\n
}\n
catch(e){\n
if(e==self.StopIteration){\n
break;\n
}\n
throw e;\n
}\n
if(_184||key!=_185){\n
var _187=[];\n
_183.push([key,_187]);\n
}\n
_187.push(_186);\n
_184=false;\n
_185=key;\n
}\n
return _183;\n
},arrayLikeIter:function(_188){\n
var i=0;\n
return {repr:function(){\n
return "arrayLikeIter(...)";\n
},toString:MochiKit.Base.forwardCall("repr"),next:function(){\n
if(i>=_188.length){\n
throw MochiKit.Iter.StopIteration;\n
}\n
return _188[i++];\n
}};\n
},hasIterateNext:function(_189){\n
return (_189&&typeof (_189.iterateNext)=="function");\n
},iterateNextIter:function(_190){\n
return {repr:function(){\n
return "iterateNextIter(...)";\n
},toString:MochiKit.Base.forwardCall("repr"),next:function(){\n
var rval=_190.iterateNext();\n
if(rval===null||rval===undefined){\n
throw MochiKit.Iter.StopIteration;\n
}\n
return rval;\n
}};\n
}});\n
MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter",];\n
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"];\n
MochiKit.Iter.__new__=function(){\n
var m=MochiKit.Base;\n
this.StopIteration=new m.NamedError("StopIteration");\n
this.iteratorRegistry=new m.AdapterRegistry();\n
this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter);\n
this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter);\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
MochiKit.Iter.__new__();\n
if(!MochiKit.__compat__){\n
reduce=MochiKit.Iter.reduce;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.Iter);\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.Logging");\n
dojo.require("MochiKit.Base");\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit.Base",[]);\n
}\n
try{\n
if(typeof (MochiKit.Base)=="undefined"){\n
throw "";\n
}\n
}\n
catch(e){\n
throw "MochiKit.Logging depends on MochiKit.Base!";\n
}\n
if(typeof (MochiKit.Logging)=="undefined"){\n
MochiKit.Logging={};\n
}\n
MochiKit.Logging.NAME="MochiKit.Logging";\n
MochiKit.Logging.VERSION="1.3.1";\n
MochiKit.Logging.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Logging.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Logging.EXPORT=["LogLevel","LogMessage","Logger","alertListener","logger","log","logError","logDebug","logFatal","logWarning"];\n
MochiKit.Logging.EXPORT_OK=["logLevelAtLeast","isLogMessage","compareLogMessage"];\n
MochiKit.Logging.LogMessage=function(num,_192,info){\n
this.num=num;\n
this.level=_192;\n
this.info=info;\n
this.timestamp=new Date();\n
};\n
MochiKit.Logging.LogMessage.prototype={repr:function(){\n
var m=MochiKit.Base;\n
return "LogMessage("+m.map(m.repr,[this.num,this.level,this.info]).join(", ")+")";\n
},toString:MochiKit.Base.forwardCall("repr")};\n
MochiKit.Base.update(MochiKit.Logging,{logLevelAtLeast:function(_194){\n
var self=MochiKit.Logging;\n
if(typeof (_194)=="string"){\n
_194=self.LogLevel[_194];\n
}\n
return function(msg){\n
var _196=msg.level;\n
if(typeof (_196)=="string"){\n
_196=self.LogLevel[_196];\n
}\n
return _196>=_194;\n
};\n
},isLogMessage:function(){\n
var _197=MochiKit.Logging.LogMessage;\n
for(var i=0;i<arguments.length;i++){\n
if(!(arguments[i] instanceof _197)){\n
return false;\n
}\n
}\n
return true;\n
},compareLogMessage:function(a,b){\n
return MochiKit.Base.compare([a.level,a.info],[b.level,b.info]);\n
},alertListener:function(msg){\n
alert("num: "+msg.num+"\\nlevel: "+msg.level+"\\ninfo: "+msg.info.join(" "));\n
}});\n
MochiKit.Logging.Logger=function(_198){\n
this.counter=0;\n
if(typeof (_198)=="undefined"||_198===null){\n
_198=-1;\n
}\n
this.maxSize=_198;\n
this._messages=[];\n
this.listeners={};\n
this.useNativeConsole=false;\n
};\n
MochiKit.Logging.Logger.prototype={clear:function(){\n
this._messages.splice(0,this._messages.length);\n
},logToConsole:function(msg){\n
if(typeof (window)!="undefined"&&window.console&&window.console.log){\n
window.console.log(msg);\n
}else{\n
if(typeof (opera)!="undefined"&&opera.postError){\n
opera.postError(msg);\n
}else{\n
if(typeof (printfire)=="function"){\n
printfire(msg);\n
}\n
}\n
}\n
},dispatchListeners:function(msg){\n
for(var k in this.listeners){\n
var pair=this.listeners[k];\n
if(pair.ident!=k||(pair[0]&&!pair[0](msg))){\n
continue;\n
}\n
pair[1](msg);\n
}\n
},addListener:function(_199,_200,_201){\n
if(typeof (_200)=="string"){\n
_200=MochiKit.Logging.logLevelAtLeast(_200);\n
}\n
var _202=[_200,_201];\n
_202.ident=_199;\n
this.listeners[_199]=_202;\n
},removeListener:function(_203){\n
delete this.listeners[_203];\n
},baseLog:function(_204,_205){\n
var msg=new MochiKit.Logging.LogMessage(this.counter,_204,MochiKit.Base.extend(null,arguments,1));\n
this._messages.push(msg);\n
this.dispatchListeners(msg);\n
if(this.useNativeConsole){\n
this.logToConsole(msg.level+": "+msg.info.join(" "));\n
}\n
this.counter+=1;\n
while(this.maxSize>=0&&this._messages.length>this.maxSize){\n
this._messages.shift();\n
}\n
},getMessages:function(_206){\n
var _207=0;\n
if(!(typeof (_206)=="undefined"||_206===null)){\n
_207=Math.max(0,this._messages.length-_206);\n
}\n
return this._messages.slice(_207);\n
},getMessageText:function(_208){\n
if(typeof (_208)=="undefined"||_208===null){\n
_208=30;\n
}\n
var _209=this.getMessages(_208);\n
if(_209.length){\n
var lst=map(function(m){\n
return "\\n  ["+m.num+"] "+m.level+": "+m.info.join(" ");\n
},_209);\n
lst.unshift("LAST "+_209.length+" MESSAGES:");\n
return lst.join("");\n
}\n
return "";\n
},debuggingBookmarklet:function(_210){\n
if(typeof (MochiKit.LoggingPane)=="undefined"){\n
alert(this.getMessageText());\n
}else{\n
MochiKit.LoggingPane.createLoggingPane(_210||false);\n
}\n
}};\n
MochiKit.Logging.__new__=function(){\n
this.LogLevel={ERROR:40,FATAL:50,WARNING:30,INFO:20,DEBUG:10};\n
var m=MochiKit.Base;\n
m.registerComparator("LogMessage",this.isLogMessage,this.compareLogMessage);\n
var _211=m.partial;\n
var _212=this.Logger;\n
var _213=_212.prototype.baseLog;\n
m.update(this.Logger.prototype,{debug:_211(_213,"DEBUG"),log:_211(_213,"INFO"),error:_211(_213,"ERROR"),fatal:_211(_213,"FATAL"),warning:_211(_213,"WARNING")});\n
var self=this;\n
var _214=function(name){\n
return function(){\n
self.logger[name].apply(self.logger,arguments);\n
};\n
};\n
this.log=_214("log");\n
this.logError=_214("error");\n
this.logDebug=_214("debug");\n
this.logFatal=_214("fatal");\n
this.logWarning=_214("warning");\n
this.logger=new _212();\n
this.logger.useNativeConsole=true;\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
if(typeof (printfire)=="undefined"&&typeof (document)!="undefined"&&document.createEvent&&typeof (dispatchEvent)!="undefined"){\n
printfire=function(){\n
printfire.args=arguments;\n
var ev=document.createEvent("Events");\n
ev.initEvent("printfire",false,true);\n
dispatchEvent(ev);\n
};\n
}\n
MochiKit.Logging.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Logging);\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.DateTime");\n
}\n
if(typeof (MochiKit)=="undefined"){\n
MochiKit={};\n
}\n
if(typeof (MochiKit.DateTime)=="undefined"){\n
MochiKit.DateTime={};\n
}\n
MochiKit.DateTime.NAME="MochiKit.DateTime";\n
MochiKit.DateTime.VERSION="1.3.1";\n
MochiKit.DateTime.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.DateTime.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.DateTime.isoDate=function(str){\n
str=str+"";\n
if(typeof (str)!="string"||str.length===0){\n
return null;\n
}\n
var iso=str.split("-");\n
if(iso.length===0){\n
return null;\n
}\n
return new Date(iso[0],iso[1]-1,iso[2]);\n
};\n
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}))?)?)?)?)?/;\n
MochiKit.DateTime.isoTimestamp=function(str){\n
str=str+"";\n
if(typeof (str)!="string"||str.length===0){\n
return null;\n
}\n
var res=str.match(MochiKit.DateTime._isoRegexp);\n
if(typeof (res)=="undefined"||res===null){\n
return null;\n
}\n
var year,month,day,hour,min,sec,msec;\n
year=parseInt(res[1],10);\n
if(typeof (res[2])=="undefined"||res[2]===""){\n
return new Date(year);\n
}\n
month=parseInt(res[2],10)-1;\n
day=parseInt(res[3],10);\n
if(typeof (res[4])=="undefined"||res[4]===""){\n
return new Date(year,month,day);\n
}\n
hour=parseInt(res[4],10);\n
min=parseInt(res[5],10);\n
sec=(typeof (res[6])!="undefined"&&res[6]!=="")?parseInt(res[6],10):0;\n
if(typeof (res[7])!="undefined"&&res[7]!==""){\n
msec=Math.round(1000*parseFloat("0."+res[7]));\n
}else{\n
msec=0;\n
}\n
if((typeof (res[8])=="undefined"||res[8]==="")&&(typeof (res[9])=="undefined"||res[9]==="")){\n
return new Date(year,month,day,hour,min,sec,msec);\n
}\n
var ofs;\n
if(typeof (res[9])!="undefined"&&res[9]!==""){\n
ofs=parseInt(res[10],10)*3600000;\n
if(typeof (res[11])!="undefined"&&res[11]!==""){\n
ofs+=parseInt(res[11],10)*60000;\n
}\n
if(res[9]=="-"){\n
ofs=-ofs;\n
}\n
}else{\n
ofs=0;\n
}\n
return new Date(Date.UTC(year,month,day,hour,min,sec,msec)-ofs);\n
};\n
MochiKit.DateTime.toISOTime=function(date,_221){\n
if(typeof (date)=="undefined"||date===null){\n
return null;\n
}\n
var hh=date.getHours();\n
var mm=date.getMinutes();\n
var ss=date.getSeconds();\n
var lst=[((_221&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)];\n
return lst.join(":");\n
};\n
MochiKit.DateTime.toISOTimestamp=function(date,_225){\n
if(typeof (date)=="undefined"||date===null){\n
return null;\n
}\n
var sep=_225?"T":" ";\n
var foot=_225?"Z":"";\n
if(_225){\n
date=new Date(date.getTime()+(date.getTimezoneOffset()*60000));\n
}\n
return MochiKit.DateTime.toISODate(date)+sep+MochiKit.DateTime.toISOTime(date,_225)+foot;\n
};\n
MochiKit.DateTime.toISODate=function(date){\n
if(typeof (date)=="undefined"||date===null){\n
return null;\n
}\n
var _228=MochiKit.DateTime._padTwo;\n
return [date.getFullYear(),_228(date.getMonth()+1),_228(date.getDate())].join("-");\n
};\n
MochiKit.DateTime.americanDate=function(d){\n
d=d+"";\n
if(typeof (d)!="string"||d.length===0){\n
return null;\n
}\n
var a=d.split("/");\n
return new Date(a[2],a[0]-1,a[1]);\n
};\n
MochiKit.DateTime._padTwo=function(n){\n
return (n>9)?n:"0"+n;\n
};\n
MochiKit.DateTime.toPaddedAmericanDate=function(d){\n
if(typeof (d)=="undefined"||d===null){\n
return null;\n
}\n
var _230=MochiKit.DateTime._padTwo;\n
return [_230(d.getMonth()+1),_230(d.getDate()),d.getFullYear()].join("/");\n
};\n
MochiKit.DateTime.toAmericanDate=function(d){\n
if(typeof (d)=="undefined"||d===null){\n
return null;\n
}\n
return [d.getMonth()+1,d.getDate(),d.getFullYear()].join("/");\n
};\n
MochiKit.DateTime.EXPORT=["isoDate","isoTimestamp","toISOTime","toISOTimestamp","toISODate","americanDate","toPaddedAmericanDate","toAmericanDate"];\n
MochiKit.DateTime.EXPORT_OK=[];\n
MochiKit.DateTime.EXPORT_TAGS={":common":MochiKit.DateTime.EXPORT,":all":MochiKit.DateTime.EXPORT};\n
MochiKit.DateTime.__new__=function(){\n
var base=this.NAME+".";\n
for(var k in this){\n
var o=this[k];\n
if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){\n
try{\n
o.NAME=base+k;\n
}\n
catch(e){\n
}\n
}\n
}\n
};\n
MochiKit.DateTime.__new__();\n
if(typeof (MochiKit.Base)!="undefined"){\n
MochiKit.Base._exportSymbols(this,MochiKit.DateTime);\n
}else{\n
(function(_231,_232){\n
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){\n
var all=_232.EXPORT_TAGS[":all"];\n
for(var i=0;i<all.length;i++){\n
_231[all[i]]=_232[all[i]];\n
}\n
}\n
})(this,MochiKit.DateTime);\n
}\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.Format");\n
}\n
if(typeof (MochiKit)=="undefined"){\n
MochiKit={};\n
}\n
if(typeof (MochiKit.Format)=="undefined"){\n
MochiKit.Format={};\n
}\n
MochiKit.Format.NAME="MochiKit.Format";\n
MochiKit.Format.VERSION="1.3.1";\n
MochiKit.Format.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Format.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Format._numberFormatter=function(_233,_234,_235,_236,_237,_238,_239,_240,_241){\n
return function(num){\n
num=parseFloat(num);\n
if(typeof (num)=="undefined"||num===null||isNaN(num)){\n
return _233;\n
}\n
var _242=_234;\n
var _243=_235;\n
if(num<0){\n
num=-num;\n
}else{\n
_242=_242.replace(/-/,"");\n
}\n
var me=arguments.callee;\n
var fmt=MochiKit.Format.formatLocale(_236);\n
if(_237){\n
num=num*100;\n
_243=fmt.percent+_243;\n
}\n
num=MochiKit.Format.roundToFixed(num,_238);\n
var _245=num.split(/\\./);\n
var _246=_245[0];\n
var frac=(_245.length==1)?"":_245[1];\n
var res="";\n
while(_246.length<_239){\n
_246="0"+_246;\n
}\n
if(_240){\n
while(_246.length>_240){\n
var i=_246.length-_240;\n
res=fmt.separator+_246.substring(i,_246.length)+res;\n
_246=_246.substring(0,i);\n
}\n
}\n
res=_246+res;\n
if(_238>0){\n
while(frac.length<_241){\n
frac=frac+"0";\n
}\n
res=res+fmt.decimal+frac;\n
}\n
return _242+res+_243;\n
};\n
};\n
MochiKit.Format.numberFormatter=function(_248,_249,_250){\n
if(typeof (_249)=="undefined"){\n
_249="";\n
}\n
var _251=_248.match(/((?:[0#]+,)?[0#]+)(?:\\.([0#]+))?(%)?/);\n
if(!_251){\n
throw TypeError("Invalid pattern");\n
}\n
var _252=_248.substr(0,_251.index);\n
var _253=_248.substr(_251.index+_251[0].length);\n
if(_252.search(/-/)==-1){\n
_252=_252+"-";\n
}\n
var _254=_251[1];\n
var frac=(typeof (_251[2])=="string"&&_251[2]!="")?_251[2]:"";\n
var _255=(typeof (_251[3])=="string"&&_251[3]!="");\n
var tmp=_254.split(/,/);\n
var _257;\n
if(typeof (_250)=="undefined"){\n
_250="default";\n
}\n
if(tmp.length==1){\n
_257=null;\n
}else{\n
_257=tmp[1].length;\n
}\n
var _258=_254.length-_254.replace(/0/g,"").length;\n
var _259=frac.length-frac.replace(/0/g,"").length;\n
var _260=frac.length;\n
var rval=MochiKit.Format._numberFormatter(_249,_252,_253,_250,_255,_260,_258,_257,_259);\n
var m=MochiKit.Base;\n
if(m){\n
var fn=arguments.callee;\n
var args=m.concat(arguments);\n
rval.repr=function(){\n
return [self.NAME,"(",map(m.repr,args).join(", "),")"].join("");\n
};\n
}\n
return rval;\n
};\n
MochiKit.Format.formatLocale=function(_262){\n
if(typeof (_262)=="undefined"||_262===null){\n
_262="default";\n
}\n
if(typeof (_262)=="string"){\n
var rval=MochiKit.Format.LOCALE[_262];\n
if(typeof (rval)=="string"){\n
rval=arguments.callee(rval);\n
MochiKit.Format.LOCALE[_262]=rval;\n
}\n
return rval;\n
}else{\n
return _262;\n
}\n
};\n
MochiKit.Format.twoDigitAverage=function(_263,_264){\n
if(_264){\n
var res=_263/_264;\n
if(!isNaN(res)){\n
return MochiKit.Format.twoDigitFloat(_263/_264);\n
}\n
}\n
return "0";\n
};\n
MochiKit.Format.twoDigitFloat=function(_265){\n
var sign=(_265<0?"-":"");\n
var s=Math.floor(Math.abs(_265)*100).toString();\n
if(s=="0"){\n
return s;\n
}\n
if(s.length<3){\n
while(s.charAt(s.length-1)=="0"){\n
s=s.substring(0,s.length-1);\n
}\n
return sign+"0."+s;\n
}\n
var head=sign+s.substring(0,s.length-2);\n
var tail=s.substring(s.length-2,s.length);\n
if(tail=="00"){\n
return head;\n
}else{\n
if(tail.charAt(1)=="0"){\n
return head+"."+tail.charAt(0);\n
}else{\n
return head+"."+tail;\n
}\n
}\n
};\n
MochiKit.Format.lstrip=function(str,_270){\n
str=str+"";\n
if(typeof (str)!="string"){\n
return null;\n
}\n
if(!_270){\n
return str.replace(/^\\s+/,"");\n
}else{\n
return str.replace(new RegExp("^["+_270+"]+"),"");\n
}\n
};\n
MochiKit.Format.rstrip=function(str,_271){\n
str=str+"";\n
if(typeof (str)!="string"){\n
return null;\n
}\n
if(!_271){\n
return str.replace(/\\s+$/,"");\n
}else{\n
return str.replace(new RegExp("["+_271+"]+$"),"");\n
}\n
};\n
MochiKit.Format.strip=function(str,_272){\n
var self=MochiKit.Format;\n
return self.rstrip(self.lstrip(str,_272),_272);\n
};\n
MochiKit.Format.truncToFixed=function(_273,_274){\n
_273=Math.floor(_273*Math.pow(10,_274));\n
var res=(_273*Math.pow(10,-_274)).toFixed(_274);\n
if(res.charAt(0)=="."){\n
res="0"+res;\n
}\n
return res;\n
};\n
MochiKit.Format.roundToFixed=function(_275,_276){\n
return MochiKit.Format.truncToFixed(_275+0.5*Math.pow(10,-_276),_276);\n
};\n
MochiKit.Format.percentFormat=function(_277){\n
return MochiKit.Format.twoDigitFloat(100*_277)+"%";\n
};\n
MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"];\n
MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"};\n
MochiKit.Format.EXPORT_OK=[];\n
MochiKit.Format.EXPORT_TAGS={":all":MochiKit.Format.EXPORT,":common":MochiKit.Format.EXPORT};\n
MochiKit.Format.__new__=function(){\n
var base=this.NAME+".";\n
var k,v,o;\n
for(k in this.LOCALE){\n
o=this.LOCALE[k];\n
if(typeof (o)=="object"){\n
o.repr=function(){\n
return this.NAME;\n
};\n
o.NAME=base+"LOCALE."+k;\n
}\n
}\n
for(k in this){\n
o=this[k];\n
if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){\n
try{\n
o.NAME=base+k;\n
}\n
catch(e){\n
}\n
}\n
}\n
};\n
MochiKit.Format.__new__();\n
if(typeof (MochiKit.Base)!="undefined"){\n
MochiKit.Base._exportSymbols(this,MochiKit.Format);\n
}else{\n
(function(_278,_279){\n
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){\n
var all=_279.EXPORT_TAGS[":all"];\n
for(var i=0;i<all.length;i++){\n
_278[all[i]]=_279[all[i]];\n
}\n
}\n
})(this,MochiKit.Format);\n
}\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.Async");\n
dojo.require("MochiKit.Base");\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit.Base",[]);\n
}\n
try{\n
if(typeof (MochiKit.Base)=="undefined"){\n
throw "";\n
}\n
}\n
catch(e){\n
throw "MochiKit.Async depends on MochiKit.Base!";\n
}\n
if(typeof (MochiKit.Async)=="undefined"){\n
MochiKit.Async={};\n
}\n
MochiKit.Async.NAME="MochiKit.Async";\n
MochiKit.Async.VERSION="1.3.1";\n
MochiKit.Async.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Async.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Async.Deferred=function(_280){\n
this.chain=[];\n
this.id=this._nextId();\n
this.fired=-1;\n
this.paused=0;\n
this.results=[null,null];\n
this.canceller=_280;\n
this.silentlyCancelled=false;\n
this.chained=false;\n
};\n
MochiKit.Async.Deferred.prototype={repr:function(){\n
var _281;\n
if(this.fired==-1){\n
_281="unfired";\n
}else{\n
if(this.fired===0){\n
_281="success";\n
}else{\n
_281="error";\n
}\n
}\n
return "Deferred("+this.id+", "+_281+")";\n
},toString:MochiKit.Base.forwardCall("repr"),_nextId:MochiKit.Base.counter(),cancel:function(){\n
var self=MochiKit.Async;\n
if(this.fired==-1){\n
if(this.canceller){\n
this.canceller(this);\n
}else{\n
this.silentlyCancelled=true;\n
}\n
if(this.fired==-1){\n
this.errback(new self.CancelledError(this));\n
}\n
}else{\n
if((this.fired===0)&&(this.results[0] instanceof self.Deferred)){\n
this.results[0].cancel();\n
}\n
}\n
},_pause:function(){\n
this.paused++;\n
},_unpause:function(){\n
this.paused--;\n
if((this.paused===0)&&(this.fired>=0)){\n
this._fire();\n
}\n
},_continue:function(res){\n
this._resback(res);\n
this._unpause();\n
},_resback:function(res){\n
this.fired=((res instanceof Error)?1:0);\n
this.results[this.fired]=res;\n
this._fire();\n
},_check:function(){\n
if(this.fired!=-1){\n
if(!this.silentlyCancelled){\n
throw new MochiKit.Async.AlreadyCalledError(this);\n
}\n
this.silentlyCancelled=false;\n
return;\n
}\n
},callback:function(res){\n
this._check();\n
if(res instanceof MochiKit.Async.Deferred){\n
throw new Error("Deferred instances can only be chained if they are the result of a callback");\n
}\n
this._resback(res);\n
},errback:function(res){\n
this._check();\n
var self=MochiKit.Async;\n
if(res instanceof self.Deferred){\n
throw new Error("Deferred instances can only be chained if they are the result of a callback");\n
}\n
if(!(res instanceof Error)){\n
res=new self.GenericError(res);\n
}\n
this._resback(res);\n
},addBoth:function(fn){\n
if(arguments.length>1){\n
fn=MochiKit.Base.partial.apply(null,arguments);\n
}\n
return this.addCallbacks(fn,fn);\n
},addCallback:function(fn){\n
if(arguments.length>1){\n
fn=MochiKit.Base.partial.apply(null,arguments);\n
}\n
return this.addCallbacks(fn,null);\n
},addErrback:function(fn){\n
if(arguments.length>1){\n
fn=MochiKit.Base.partial.apply(null,arguments);\n
}\n
return this.addCallbacks(null,fn);\n
},addCallbacks:function(cb,eb){\n
if(this.chained){\n
throw new Error("Chained Deferreds can not be re-used");\n
}\n
this.chain.push([cb,eb]);\n
if(this.fired>=0){\n
this._fire();\n
}\n
return this;\n
},_fire:function(){\n
var _284=this.chain;\n
var _285=this.fired;\n
var res=this.results[_285];\n
var self=this;\n
var cb=null;\n
while(_284.length>0&&this.paused===0){\n
var pair=_284.shift();\n
var f=pair[_285];\n
if(f===null){\n
continue;\n
}\n
try{\n
res=f(res);\n
_285=((res instanceof Error)?1:0);\n
if(res instanceof MochiKit.Async.Deferred){\n
cb=function(res){\n
self._continue(res);\n
};\n
this._pause();\n
}\n
}\n
catch(err){\n
_285=1;\n
if(!(err instanceof Error)){\n
err=new MochiKit.Async.GenericError(err);\n
}\n
res=err;\n
}\n
}\n
this.fired=_285;\n
this.results[_285]=res;\n
if(cb&&this.paused){\n
res.addBoth(cb);\n
res.chained=true;\n
}\n
}};\n
MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(){\n
return eval("("+arguments[0].responseText+")");\n
},succeed:function(_287){\n
var d=new MochiKit.Async.Deferred();\n
d.callback.apply(d,arguments);\n
return d;\n
},fail:function(_288){\n
var d=new MochiKit.Async.Deferred();\n
d.errback.apply(d,arguments);\n
return d;\n
},getXMLHttpRequest:function(){\n
var self=arguments.callee;\n
if(!self.XMLHttpRequest){\n
var _289=[function(){\n
return new XMLHttpRequest();\n
},function(){\n
return new ActiveXObject("Msxml2.XMLHTTP");\n
},function(){\n
return new ActiveXObject("Microsoft.XMLHTTP");\n
},function(){\n
return new ActiveXObject("Msxml2.XMLHTTP.4.0");\n
},function(){\n
throw new MochiKit.Async.BrowserComplianceError("Browser does not support XMLHttpRequest");\n
}];\n
for(var i=0;i<_289.length;i++){\n
var func=_289[i];\n
try{\n
self.XMLHttpRequest=func;\n
return func();\n
}\n
catch(e){\n
}\n
}\n
}\n
return self.XMLHttpRequest();\n
},_nothing:function(){\n
},_xhr_onreadystatechange:function(d){\n
if(this.readyState==4){\n
try{\n
this.onreadystatechange=null;\n
}\n
catch(e){\n
try{\n
this.onreadystatechange=MochiKit.Async._nothing;\n
}\n
catch(e){\n
}\n
}\n
var _290=null;\n
try{\n
_290=this.status;\n
if(!_290&&MochiKit.Base.isNotEmpty(this.responseText)){\n
_290=304;\n
}\n
}\n
catch(e){\n
}\n
if(_290==200||_290==304){\n
d.callback(this);\n
}else{\n
var err=new MochiKit.Async.XMLHttpRequestError(this,"Request failed");\n
if(err.number){\n
d.errback(err);\n
}else{\n
d.errback(err);\n
}\n
}\n
}\n
},_xhr_canceller:function(req){\n
try{\n
req.onreadystatechange=null;\n
}\n
catch(e){\n
try{\n
req.onreadystatechange=MochiKit.Async._nothing;\n
}\n
catch(e){\n
}\n
}\n
req.abort();\n
},sendXMLHttpRequest:function(req,_293){\n
if(typeof (_293)=="undefined"||_293===null){\n
_293="";\n
}\n
var m=MochiKit.Base;\n
var self=MochiKit.Async;\n
var d=new self.Deferred(m.partial(self._xhr_canceller,req));\n
try{\n
req.onreadystatechange=m.bind(self._xhr_onreadystatechange,req,d);\n
req.send(_293);\n
}\n
catch(e){\n
try{\n
req.onreadystatechange=null;\n
}\n
catch(ignore){\n
}\n
d.errback(e);\n
}\n
return d;\n
},doSimpleXMLHttpRequest:function(url){\n
var self=MochiKit.Async;\n
var req=self.getXMLHttpRequest();\n
if(arguments.length>1){\n
var m=MochiKit.Base;\n
var qs=m.queryString.apply(null,m.extend(null,arguments,1));\n
if(qs){\n
url+="?"+qs;\n
}\n
}\n
req.open("GET",url,true);\n
return self.sendXMLHttpRequest(req);\n
},loadJSONDoc:function(url){\n
var self=MochiKit.Async;\n
var d=self.doSimpleXMLHttpRequest.apply(self,arguments);\n
d=d.addCallback(self.evalJSONRequest);\n
return d;\n
},wait:function(_296,_297){\n
var d=new MochiKit.Async.Deferred();\n
var m=MochiKit.Base;\n
if(typeof (_297)!="undefined"){\n
d.addCallback(function(){\n
return _297;\n
});\n
}\n
var _298=setTimeout(m.bind("callback",d),Math.floor(_296*1000));\n
d.canceller=function(){\n
try{\n
clearTimeout(_298);\n
}\n
catch(e){\n
}\n
};\n
return d;\n
},callLater:function(_299,func){\n
var m=MochiKit.Base;\n
var _300=m.partial.apply(m,m.extend(null,arguments,1));\n
return MochiKit.Async.wait(_299).addCallback(function(res){\n
return _300();\n
});\n
}});\n
MochiKit.Async.DeferredLock=function(){\n
this.waiting=[];\n
this.locked=false;\n
this.id=this._nextId();\n
};\n
MochiKit.Async.DeferredLock.prototype={__class__:MochiKit.Async.DeferredLock,acquire:function(){\n
d=new MochiKit.Async.Deferred();\n
if(this.locked){\n
this.waiting.push(d);\n
}else{\n
this.locked=true;\n
d.callback(this);\n
}\n
return d;\n
},release:function(){\n
if(!this.locked){\n
throw TypeError("Tried to release an unlocked DeferredLock");\n
}\n
this.locked=false;\n
if(this.waiting.length>0){\n
this.locked=true;\n
this.waiting.shift().callback(this);\n
}\n
},_nextId:MochiKit.Base.counter(),repr:function(){\n
var _301;\n
if(this.locked){\n
_301="locked, "+this.waiting.length+" waiting";\n
}else{\n
_301="unlocked";\n
}\n
return "DeferredLock("+this.id+", "+_301+")";\n
},toString:MochiKit.Base.forwardCall("repr")};\n
MochiKit.Async.DeferredList=function(list,_303,_304,_305,_306){\n
this.list=list;\n
this.resultList=new Array(this.list.length);\n
this.chain=[];\n
this.id=this._nextId();\n
this.fired=-1;\n
this.paused=0;\n
this.results=[null,null];\n
this.canceller=_306;\n
this.silentlyCancelled=false;\n
if(this.list.length===0&&!_303){\n
this.callback(this.resultList);\n
}\n
this.finishedCount=0;\n
this.fireOnOneCallback=_303;\n
this.fireOnOneErrback=_304;\n
this.consumeErrors=_305;\n
var _307=0;\n
MochiKit.Base.map(MochiKit.Base.bind(function(d){\n
d.addCallback(MochiKit.Base.bind(this._cbDeferred,this),_307,true);\n
d.addErrback(MochiKit.Base.bind(this._cbDeferred,this),_307,false);\n
_307+=1;\n
},this),this.list);\n
};\n
MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,MochiKit.Async.Deferred.prototype);\n
MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,{_cbDeferred:function(_308,_309,_310){\n
this.resultList[_308]=[_309,_310];\n
this.finishedCount+=1;\n
if(this.fired!==0){\n
if(_309&&this.fireOnOneCallback){\n
this.callback([_308,_310]);\n
}else{\n
if(!_309&&this.fireOnOneErrback){\n
this.errback(_310);\n
}else{\n
if(this.finishedCount==this.list.length){\n
this.callback(this.resultList);\n
}\n
}\n
}\n
}\n
if(!_309&&this.consumeErrors){\n
_310=null;\n
}\n
return _310;\n
}});\n
MochiKit.Async.gatherResults=function(_311){\n
var d=new MochiKit.Async.DeferredList(_311,false,true,false);\n
d.addCallback(function(_312){\n
var ret=[];\n
for(var i=0;i<_312.length;i++){\n
ret.push(_312[i][1]);\n
}\n
return ret;\n
});\n
return d;\n
};\n
MochiKit.Async.maybeDeferred=function(func){\n
var self=MochiKit.Async;\n
var _313;\n
try{\n
var r=func.apply(null,MochiKit.Base.extend([],arguments,1));\n
if(r instanceof self.Deferred){\n
_313=r;\n
}else{\n
if(r instanceof Error){\n
_313=self.fail(r);\n
}else{\n
_313=self.succeed(r);\n
}\n
}\n
}\n
catch(e){\n
_313=self.fail(e);\n
}\n
return _313;\n
};\n
MochiKit.Async.EXPORT=["AlreadyCalledError","CancelledError","BrowserComplianceError","GenericError","XMLHttpRequestError","Deferred","succeed","fail","getXMLHttpRequest","doSimpleXMLHttpRequest","loadJSONDoc","wait","callLater","sendXMLHttpRequest","DeferredLock","DeferredList","gatherResults","maybeDeferred"];\n
MochiKit.Async.EXPORT_OK=["evalJSONRequest"];\n
MochiKit.Async.__new__=function(){\n
var m=MochiKit.Base;\n
var ne=m.partial(m._newNamedError,this);\n
ne("AlreadyCalledError",function(_316){\n
this.deferred=_316;\n
});\n
ne("CancelledError",function(_317){\n
this.deferred=_317;\n
});\n
ne("BrowserComplianceError",function(msg){\n
this.message=msg;\n
});\n
ne("GenericError",function(msg){\n
this.message=msg;\n
});\n
ne("XMLHttpRequestError",function(req,msg){\n
this.req=req;\n
this.message=msg;\n
try{\n
this.number=req.status;\n
}\n
catch(e){\n
}\n
});\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
MochiKit.Async.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Async);\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.DOM");\n
dojo.require("MochiKit.Iter");\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit.Iter",[]);\n
}\n
try{\n
if(typeof (MochiKit.Iter)=="undefined"){\n
throw "";\n
}\n
}\n
catch(e){\n
throw "MochiKit.DOM depends on MochiKit.Iter!";\n
}\n
if(typeof (MochiKit.DOM)=="undefined"){\n
MochiKit.DOM={};\n
}\n
MochiKit.DOM.NAME="MochiKit.DOM";\n
MochiKit.DOM.VERSION="1.3.1";\n
MochiKit.DOM.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.DOM.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.DOM.EXPORT=["formContents","currentWindow","currentDocument","withWindow","withDocument","registerDOMConverter","coerceToDOM","createDOM","createDOMFunc","getNodeAttribute","setNodeAttribute","updateNodeAttributes","appendChildNodes","replaceChildNodes","removeElement","swapDOM","BUTTON","TT","PRE","H1","H2","H3","BR","CANVAS","HR","LABEL","TEXTAREA","FORM","STRONG","SELECT","OPTION","OPTGROUP","LEGEND","FIELDSET","P","UL","OL","LI","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","getElement","$","computedStyle","getElementsByTagAndClassName","addToCallStack","addLoadEvent","focusOnLoad","setElementClass","toggleElementClass","addElementClass","removeElementClass","swapElementClass","hasElementClass","escapeHTML","toHTML","emitHTML","setDisplayForElement","hideElement","showElement","scrapeText","elementDimensions","elementPosition","setElementDimensions","setElementPosition","getViewportDimensions","setOpacity"];\n
MochiKit.DOM.EXPORT_OK=["domConverters"];\n
MochiKit.DOM.Dimensions=function(w,h){\n
this.w=w;\n
this.h=h;\n
};\n
MochiKit.DOM.Dimensions.prototype.repr=function(){\n
var repr=MochiKit.Base.repr;\n
return "{w: "+repr(this.w)+", h: "+repr(this.h)+"}";\n
};\n
MochiKit.DOM.Coordinates=function(x,y){\n
this.x=x;\n
this.y=y;\n
};\n
MochiKit.DOM.Coordinates.prototype.repr=function(){\n
var repr=MochiKit.Base.repr;\n
return "{x: "+repr(this.x)+", y: "+repr(this.y)+"}";\n
};\n
MochiKit.DOM.Coordinates.prototype.toString=function(){\n
return this.repr();\n
};\n
MochiKit.Base.update(MochiKit.DOM,{setOpacity:function(elem,o){\n
elem=MochiKit.DOM.getElement(elem);\n
MochiKit.DOM.updateNodeAttributes(elem,{"style":{"opacity":o,"-moz-opacity":o,"-khtml-opacity":o,"filter":" alpha(opacity="+(o*100)+")"}});\n
},getViewportDimensions:function(){\n
var d=new MochiKit.DOM.Dimensions();\n
var w=MochiKit.DOM._window;\n
var b=MochiKit.DOM._document.body;\n
if(w.innerWidth){\n
d.w=w.innerWidth;\n
d.h=w.innerHeight;\n
}else{\n
if(b.parentElement.clientWidth){\n
d.w=b.parentElement.clientWidth;\n
d.h=b.parentElement.clientHeight;\n
}else{\n
if(b&&b.clientWidth){\n
d.w=b.clientWidth;\n
d.h=b.clientHeight;\n
}\n
}\n
}\n
return d;\n
},elementDimensions:function(elem){\n
var self=MochiKit.DOM;\n
if(typeof (elem.w)=="number"||typeof (elem.h)=="number"){\n
return new self.Dimensions(elem.w||0,elem.h||0);\n
}\n
elem=self.getElement(elem);\n
if(!elem){\n
return undefined;\n
}\n
if(self.computedStyle(elem,"display")!="none"){\n
return new self.Dimensions(elem.offsetWidth||0,elem.offsetHeight||0);\n
}\n
var s=elem.style;\n
var _322=s.visibility;\n
var _323=s.position;\n
s.visibility="hidden";\n
s.position="absolute";\n
s.display="";\n
var _324=elem.offsetWidth;\n
var _325=elem.offsetHeight;\n
s.display="none";\n
s.position=_323;\n
s.visibility=_322;\n
return new self.Dimensions(_324,_325);\n
},elementPosition:function(elem,_326){\n
var self=MochiKit.DOM;\n
elem=self.getElement(elem);\n
if(!elem){\n
return undefined;\n
}\n
var c=new self.Coordinates(0,0);\n
if(elem.x&&elem.y){\n
c.x+=elem.x||0;\n
c.y+=elem.y||0;\n
return c;\n
}else{\n
if(elem.parentNode===null||self.computedStyle(elem,"display")=="none"){\n
return undefined;\n
}\n
}\n
var box=null;\n
var _329=null;\n
var d=MochiKit.DOM._document;\n
var de=d.documentElement;\n
var b=d.body;\n
if(elem.getBoundingClientRect){\n
box=elem.getBoundingClientRect();\n
c.x+=box.left+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||b.clientLeft);\n
c.y+=box.top+(de.scrollTop||b.scrollTop)-(de.clientTop||b.clientTop);\n
}else{\n
if(d.getBoxObjectFor){\n
box=d.getBoxObjectFor(elem);\n
c.x+=box.x;\n
c.y+=box.y;\n
}else{\n
if(elem.offsetParent){\n
c.x+=elem.offsetLeft;\n
c.y+=elem.offsetTop;\n
_329=elem.offsetParent;\n
if(_329!=elem){\n
while(_329){\n
c.x+=_329.offsetLeft;\n
c.y+=_329.offsetTop;\n
_329=_329.offsetParent;\n
}\n
}\n
var ua=navigator.userAgent.toLowerCase();\n
if((typeof (opera)!="undefined"&&parseFloat(opera.version())<9)||(ua.indexOf("safari")!=-1&&self.computedStyle(elem,"position")=="absolute")){\n
c.x-=b.offsetLeft;\n
c.y-=b.offsetTop;\n
}\n
}\n
}\n
}\n
if(typeof (_326)!="undefined"){\n
_326=arguments.callee(_326);\n
if(_326){\n
c.x-=(_326.x||0);\n
c.y-=(_326.y||0);\n
}\n
}\n
if(elem.parentNode){\n
_329=elem.parentNode;\n
}else{\n
_329=null;\n
}\n
while(_329&&_329.tagName!="BODY"&&_329.tagName!="HTML"){\n
c.x-=_329.scrollLeft;\n
c.y-=_329.scrollTop;\n
if(_329.parentNode){\n
_329=_329.parentNode;\n
}else{\n
_329=null;\n
}\n
}\n
return c;\n
},setElementDimensions:function(elem,_332,_333){\n
elem=MochiKit.DOM.getElement(elem);\n
if(typeof (_333)=="undefined"){\n
_333="px";\n
}\n
MochiKit.DOM.updateNodeAttributes(elem,{"style":{"width":_332.w+_333,"height":_332.h+_333}});\n
},setElementPosition:function(elem,_334,_335){\n
elem=MochiKit.DOM.getElement(elem);\n
if(typeof (_335)=="undefined"){\n
_335="px";\n
}\n
MochiKit.DOM.updateNodeAttributes(elem,{"style":{"left":_334.x+_335,"top":_334.y+_335}});\n
},currentWindow:function(){\n
return MochiKit.DOM._window;\n
},currentDocument:function(){\n
return MochiKit.DOM._document;\n
},withWindow:function(win,func){\n
var self=MochiKit.DOM;\n
var _337=self._document;\n
var _338=self._win;\n
var rval;\n
try{\n
self._window=win;\n
self._document=win.document;\n
rval=func();\n
}\n
catch(e){\n
self._window=_338;\n
self._document=_337;\n
throw e;\n
}\n
self._window=_338;\n
self._document=_337;\n
return rval;\n
},formContents:function(elem){\n
var _339=[];\n
var _340=[];\n
var m=MochiKit.Base;\n
var self=MochiKit.DOM;\n
if(typeof (elem)=="undefined"||elem===null){\n
elem=self._document;\n
}else{\n
elem=self.getElement(elem);\n
}\n
m.nodeWalk(elem,function(elem){\n
var name=elem.name;\n
if(m.isNotEmpty(name)){\n
var _341=elem.nodeName;\n
if(_341=="INPUT"&&(elem.type=="radio"||elem.type=="checkbox")&&!elem.checked){\n
return null;\n
}\n
if(_341=="SELECT"){\n
if(elem.selectedIndex>=0){\n
var opt=elem.options[elem.selectedIndex];\n
_339.push(name);\n
_340.push((opt.value)?opt.value:opt.text);\n
return null;\n
}\n
_339.push(name);\n
_340.push("");\n
return null;\n
}\n
if(_341=="FORM"||_341=="P"||_341=="SPAN"||_341=="DIV"){\n
return elem.childNodes;\n
}\n
_339.push(name);\n
_340.push(elem.value||"");\n
return null;\n
}\n
return elem.childNodes;\n
});\n
return [_339,_340];\n
},withDocument:function(doc,func){\n
var self=MochiKit.DOM;\n
var _344=self._document;\n
var rval;\n
try{\n
self._document=doc;\n
rval=func();\n
}\n
catch(e){\n
self._document=_344;\n
throw e;\n
}\n
self._document=_344;\n
return rval;\n
},registerDOMConverter:function(name,_345,wrap,_346){\n
MochiKit.DOM.domConverters.register(name,_345,wrap,_346);\n
},coerceToDOM:function(node,ctx){\n
var im=MochiKit.Iter;\n
var self=MochiKit.DOM;\n
var iter=im.iter;\n
var _350=im.repeat;\n
var imap=im.imap;\n
var _352=self.domConverters;\n
var _353=self.coerceToDOM;\n
var _354=MochiKit.Base.NotFound;\n
while(true){\n
if(typeof (node)=="undefined"||node===null){\n
return null;\n
}\n
if(typeof (node.nodeType)!="undefined"&&node.nodeType>0){\n
return node;\n
}\n
if(typeof (node)=="number"||typeof (node)=="boolean"){\n
node=node.toString();\n
}\n
if(typeof (node)=="string"){\n
return self._document.createTextNode(node);\n
}\n
if(typeof (node.toDOM)=="function"){\n
node=node.toDOM(ctx);\n
continue;\n
}\n
if(typeof (node)=="function"){\n
node=node(ctx);\n
continue;\n
}\n
var _355=null;\n
try{\n
_355=iter(node);\n
}\n
catch(e){\n
}\n
if(_355){\n
return imap(_353,_355,_350(ctx));\n
}\n
try{\n
node=_352.match(node,ctx);\n
continue;\n
}\n
catch(e){\n
if(e!=_354){\n
throw e;\n
}\n
}\n
return self._document.createTextNode(node.toString());\n
}\n
return undefined;\n
},setNodeAttribute:function(node,attr,_357){\n
var o={};\n
o[attr]=_357;\n
try{\n
return MochiKit.DOM.updateNodeAttributes(node,o);\n
}\n
catch(e){\n
}\n
return null;\n
},getNodeAttribute:function(node,attr){\n
var self=MochiKit.DOM;\n
var _358=self.attributeArray.renames[attr];\n
node=self.getElement(node);\n
try{\n
if(_358){\n
return node[_358];\n
}\n
return node.getAttribute(attr);\n
}\n
catch(e){\n
}\n
return null;\n
},updateNodeAttributes:function(node,_359){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
}\n
if(_359){\n
var _360=MochiKit.Base.updatetree;\n
if(self.attributeArray.compliant){\n
for(var k in _359){\n
var v=_359[k];\n
if(typeof (v)=="object"&&typeof (elem[k])=="object"){\n
_360(elem[k],v);\n
}else{\n
if(k.substring(0,2)=="on"){\n
if(typeof (v)=="string"){\n
v=new Function(v);\n
}\n
elem[k]=v;\n
}else{\n
elem.setAttribute(k,v);\n
}\n
}\n
}\n
}else{\n
var _361=self.attributeArray.renames;\n
for(k in _359){\n
v=_359[k];\n
var _362=_361[k];\n
if(k=="style"&&typeof (v)=="string"){\n
elem.style.cssText=v;\n
}else{\n
if(typeof (_362)=="string"){\n
elem[_362]=v;\n
}else{\n
if(typeof (elem[k])=="object"&&typeof (v)=="object"){\n
_360(elem[k],v);\n
}else{\n
if(k.substring(0,2)=="on"){\n
if(typeof (v)=="string"){\n
v=new Function(v);\n
}\n
elem[k]=v;\n
}else{\n
elem.setAttribute(k,v);\n
}\n
}\n
}\n
}\n
}\n
}\n
}\n
return elem;\n
},appendChildNodes:function(node){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
}\n
var _363=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];\n
var _364=MochiKit.Base.concat;\n
while(_363.length){\n
var n=_363.shift();\n
if(typeof (n)=="undefined"||n===null){\n
}else{\n
if(typeof (n.nodeType)=="number"){\n
elem.appendChild(n);\n
}else{\n
_363=_364(n,_363);\n
}\n
}\n
}\n
return elem;\n
},replaceChildNodes:function(node){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
arguments[0]=elem;\n
}\n
var _365;\n
while((_365=elem.firstChild)){\n
elem.removeChild(_365);\n
}\n
if(arguments.length<2){\n
return elem;\n
}else{\n
return self.appendChildNodes.apply(this,arguments);\n
}\n
},createDOM:function(name,_366){\n
var elem;\n
var self=MochiKit.DOM;\n
var m=MochiKit.Base;\n
if(typeof (_366)=="string"||typeof (_366)=="number"){\n
var args=m.extend([name,null],arguments,1);\n
return arguments.callee.apply(this,args);\n
}\n
if(typeof (name)=="string"){\n
if(_366&&"name" in _366&&!self.attributeArray.compliant){\n
name=("<"+name+" name=\\""+self.escapeHTML(_366.name)+"\\">");\n
}\n
elem=self._document.createElement(name);\n
}else{\n
elem=name;\n
}\n
if(_366){\n
self.updateNodeAttributes(elem,_366);\n
}\n
if(arguments.length<=2){\n
return elem;\n
}else{\n
var args=m.extend([elem],arguments,2);\n
return self.appendChildNodes.apply(this,args);\n
}\n
},createDOMFunc:function(){\n
var m=MochiKit.Base;\n
return m.partial.apply(this,m.extend([MochiKit.DOM.createDOM],arguments));\n
},swapDOM:function(dest,src){\n
var self=MochiKit.DOM;\n
dest=self.getElement(dest);\n
var _369=dest.parentNode;\n
if(src){\n
src=self.getElement(src);\n
_369.replaceChild(src,dest);\n
}else{\n
_369.removeChild(dest);\n
}\n
return src;\n
},getElement:function(id){\n
var self=MochiKit.DOM;\n
if(arguments.length==1){\n
return ((typeof (id)=="string")?self._document.getElementById(id):id);\n
}else{\n
return MochiKit.Base.map(self.getElement,arguments);\n
}\n
},computedStyle:function(_371,_372,_373){\n
if(arguments.length==2){\n
_373=_372;\n
}\n
var self=MochiKit.DOM;\n
var el=self.getElement(_371);\n
var _375=self._document;\n
if(!el||el==_375){\n
return undefined;\n
}\n
if(el.currentStyle){\n
return el.currentStyle[_372];\n
}\n
if(typeof (_375.defaultView)=="undefined"){\n
return undefined;\n
}\n
if(_375.defaultView===null){\n
return undefined;\n
}\n
var _376=_375.defaultView.getComputedStyle(el,null);\n
if(typeof (_376)=="undefined"||_376===null){\n
return undefined;\n
}\n
return _376.getPropertyValue(_373);\n
},getElementsByTagAndClassName:function(_377,_378,_379){\n
var self=MochiKit.DOM;\n
if(typeof (_377)=="undefined"||_377===null){\n
_377="*";\n
}\n
if(typeof (_379)=="undefined"||_379===null){\n
_379=self._document;\n
}\n
_379=self.getElement(_379);\n
var _380=(_379.getElementsByTagName(_377)||self._document.all);\n
if(typeof (_378)=="undefined"||_378===null){\n
return MochiKit.Base.extend(null,_380);\n
}\n
var _381=[];\n
for(var i=0;i<_380.length;i++){\n
var _382=_380[i];\n
var _383=_382.className.split(" ");\n
for(var j=0;j<_383.length;j++){\n
if(_383[j]==_378){\n
_381.push(_382);\n
break;\n
}\n
}\n
}\n
return _381;\n
},_newCallStack:function(path,once){\n
var rval=function(){\n
var _386=arguments.callee.callStack;\n
for(var i=0;i<_386.length;i++){\n
if(_386[i].apply(this,arguments)===false){\n
break;\n
}\n
}\n
if(once){\n
try{\n
this[path]=null;\n
}\n
catch(e){\n
}\n
}\n
};\n
rval.callStack=[];\n
return rval;\n
},addToCallStack:function(_387,path,func,once){\n
var self=MochiKit.DOM;\n
var _388=_387[path];\n
var _389=_388;\n
if(!(typeof (_388)=="function"&&typeof (_388.callStack)=="object"&&_388.callStack!==null)){\n
_389=self._newCallStack(path,once);\n
if(typeof (_388)=="function"){\n
_389.callStack.push(_388);\n
}\n
_387[path]=_389;\n
}\n
_389.callStack.push(func);\n
},addLoadEvent:function(func){\n
var self=MochiKit.DOM;\n
self.addToCallStack(self._window,"onload",func,true);\n
},focusOnLoad:function(_390){\n
var self=MochiKit.DOM;\n
self.addLoadEvent(function(){\n
_390=self.getElement(_390);\n
if(_390){\n
_390.focus();\n
}\n
});\n
},setElementClass:function(_391,_392){\n
var self=MochiKit.DOM;\n
var obj=self.getElement(_391);\n
if(self.attributeArray.compliant){\n
obj.setAttribute("class",_392);\n
}else{\n
obj.setAttribute("className",_392);\n
}\n
},toggleElementClass:function(_393){\n
var self=MochiKit.DOM;\n
for(var i=1;i<arguments.length;i++){\n
var obj=self.getElement(arguments[i]);\n
if(!self.addElementClass(obj,_393)){\n
self.removeElementClass(obj,_393);\n
}\n
}\n
},addElementClass:function(_394,_395){\n
var self=MochiKit.DOM;\n
var obj=self.getElement(_394);\n
var cls=obj.className;\n
if(cls.length===0){\n
self.setElementClass(obj,_395);\n
return true;\n
}\n
if(cls==_395){\n
return false;\n
}\n
var _397=obj.className.split(" ");\n
for(var i=0;i<_397.length;i++){\n
if(_397[i]==_395){\n
return false;\n
}\n
}\n
self.setElementClass(obj,cls+" "+_395);\n
return true;\n
},removeElementClass:function(_398,_399){\n
var self=MochiKit.DOM;\n
var obj=self.getElement(_398);\n
var cls=obj.className;\n
if(cls.length===0){\n
return false;\n
}\n
if(cls==_399){\n
self.setElementClass(obj,"");\n
return true;\n
}\n
var _400=obj.className.split(" ");\n
for(var i=0;i<_400.length;i++){\n
if(_400[i]==_399){\n
_400.splice(i,1);\n
self.setElementClass(obj,_400.join(" "));\n
return true;\n
}\n
}\n
return false;\n
},swapElementClass:function(_401,_402,_403){\n
var obj=MochiKit.DOM.getElement(_401);\n
var res=MochiKit.DOM.removeElementClass(obj,_402);\n
if(res){\n
MochiKit.DOM.addElementClass(obj,_403);\n
}\n
return res;\n
},hasElementClass:function(_404,_405){\n
var obj=MochiKit.DOM.getElement(_404);\n
var _406=obj.className.split(" ");\n
for(var i=1;i<arguments.length;i++){\n
var good=false;\n
for(var j=0;j<_406.length;j++){\n
if(_406[j]==arguments[i]){\n
good=true;\n
break;\n
}\n
}\n
if(!good){\n
return false;\n
}\n
}\n
return true;\n
},escapeHTML:function(s){\n
return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");\n
},toHTML:function(dom){\n
return MochiKit.DOM.emitHTML(dom).join("");\n
},emitHTML:function(dom,lst){\n
if(typeof (lst)=="undefined"||lst===null){\n
lst=[];\n
}\n
var _409=[dom];\n
var self=MochiKit.DOM;\n
var _410=self.escapeHTML;\n
var _411=self.attributeArray;\n
while(_409.length){\n
dom=_409.pop();\n
if(typeof (dom)=="string"){\n
lst.push(dom);\n
}else{\n
if(dom.nodeType==1){\n
lst.push("<"+dom.nodeName.toLowerCase());\n
var _412=[];\n
var _413=_411(dom);\n
for(var i=0;i<_413.length;i++){\n
var a=_413[i];\n
_412.push([" ",a.name,"=\\"",_410(a.value),"\\""]);\n
}\n
_412.sort();\n
for(i=0;i<_412.length;i++){\n
var _414=_412[i];\n
for(var j=0;j<_414.length;j++){\n
lst.push(_414[j]);\n
}\n
}\n
if(dom.hasChildNodes()){\n
lst.push(">");\n
_409.push("</"+dom.nodeName.toLowerCase()+">");\n
var _415=dom.childNodes;\n
for(i=_415.length-1;i>=0;i--){\n
_409.push(_415[i]);\n
}\n
}else{\n
lst.push("/>");\n
}\n
}else{\n
if(dom.nodeType==3){\n
lst.push(_410(dom.nodeValue));\n
}\n
}\n
}\n
}\n
return lst;\n
},setDisplayForElement:function(_416,_417){\n
var m=MochiKit.Base;\n
var _418=m.extend(null,arguments,1);\n
MochiKit.Iter.forEach(m.filter(null,m.map(MochiKit.DOM.getElement,_418)),function(_417){\n
_417.style.display=_416;\n
});\n
},scrapeText:function(node,_419){\n
var rval=[];\n
(function(node){\n
var cn=node.childNodes;\n
if(cn){\n
for(var i=0;i<cn.length;i++){\n
arguments.callee.call(this,cn[i]);\n
}\n
}\n
var _421=node.nodeValue;\n
if(typeof (_421)=="string"){\n
rval.push(_421);\n
}\n
})(MochiKit.DOM.getElement(node));\n
if(_419){\n
return rval;\n
}else{\n
return rval.join("");\n
}\n
},__new__:function(win){\n
var m=MochiKit.Base;\n
this._document=document;\n
this._window=win;\n
this.domConverters=new m.AdapterRegistry();\n
var _422=this._document.createElement("span");\n
var _423;\n
if(_422&&_422.attributes&&_422.attributes.length>0){\n
var _424=m.filter;\n
_423=function(node){\n
return _424(_423.ignoreAttrFilter,node.attributes);\n
};\n
_423.ignoreAttr={};\n
MochiKit.Iter.forEach(_422.attributes,function(a){\n
_423.ignoreAttr[a.name]=a.value;\n
});\n
_423.ignoreAttrFilter=function(a){\n
return (_423.ignoreAttr[a.name]!=a.value);\n
};\n
_423.compliant=false;\n
_423.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor"};\n
}else{\n
_423=function(node){\n
return node.attributes;\n
};\n
_423.compliant=true;\n
_423.renames={};\n
}\n
this.attributeArray=_423;\n
var _425=this.createDOMFunc;\n
this.UL=_425("ul");\n
this.OL=_425("ol");\n
this.LI=_425("li");\n
this.TD=_425("td");\n
this.TR=_425("tr");\n
this.TBODY=_425("tbody");\n
this.THEAD=_425("thead");\n
this.TFOOT=_425("tfoot");\n
this.TABLE=_425("table");\n
this.TH=_425("th");\n
this.INPUT=_425("input");\n
this.SPAN=_425("span");\n
this.A=_425("a");\n
this.DIV=_425("div");\n
this.IMG=_425("img");\n
this.BUTTON=_425("button");\n
this.TT=_425("tt");\n
this.PRE=_425("pre");\n
this.H1=_425("h1");\n
this.H2=_425("h2");\n
this.H3=_425("h3");\n
this.BR=_425("br");\n
this.HR=_425("hr");\n
this.LABEL=_425("label");\n
this.TEXTAREA=_425("textarea");\n
this.FORM=_425("form");\n
this.P=_425("p");\n
this.SELECT=_425("select");\n
this.OPTION=_425("option");\n
this.OPTGROUP=_425("optgroup");\n
this.LEGEND=_425("legend");\n
this.FIELDSET=_425("fieldset");\n
this.STRONG=_425("strong");\n
this.CANVAS=_425("canvas");\n
this.hideElement=m.partial(this.setDisplayForElement,"none");\n
this.showElement=m.partial(this.setDisplayForElement,"block");\n
this.removeElement=this.swapDOM;\n
this.$=this.getElement;\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
}});\n
MochiKit.DOM.__new__(((typeof (window)=="undefined")?this:window));\n
if(!MochiKit.__compat__){\n
withWindow=MochiKit.DOM.withWindow;\n
withDocument=MochiKit.DOM.withDocument;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.DOM);\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.LoggingPane");\n
dojo.require("MochiKit.Logging");\n
dojo.require("MochiKit.Base");\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit.Logging",[]);\n
JSAN.use("MochiKit.Base",[]);\n
}\n
try{\n
if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.Logging)=="undefined"){\n
throw "";\n
}\n
}\n
catch(e){\n
throw "MochiKit.LoggingPane depends on MochiKit.Base and MochiKit.Logging!";\n
}\n
if(typeof (MochiKit.LoggingPane)=="undefined"){\n
MochiKit.LoggingPane={};\n
}\n
MochiKit.LoggingPane.NAME="MochiKit.LoggingPane";\n
MochiKit.LoggingPane.VERSION="1.3.1";\n
MochiKit.LoggingPane.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.LoggingPane.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.LoggingPane.createLoggingPane=function(_426){\n
var m=MochiKit.LoggingPane;\n
_426=!(!_426);\n
if(m._loggingPane&&m._loggingPane.inline!=_426){\n
m._loggingPane.closePane();\n
m._loggingPane=null;\n
}\n
if(!m._loggingPane||m._loggingPane.closed){\n
m._loggingPane=new m.LoggingPane(_426,MochiKit.Logging.logger);\n
}\n
return m._loggingPane;\n
};\n
MochiKit.LoggingPane.LoggingPane=function(_427,_428){\n
if(typeof (_428)=="undefined"||_428===null){\n
_428=MochiKit.Logging.logger;\n
}\n
this.logger=_428;\n
var _429=MochiKit.Base.update;\n
var _430=MochiKit.Base.updatetree;\n
var bind=MochiKit.Base.bind;\n
var _431=MochiKit.Base.clone;\n
var win=window;\n
var uid="_MochiKit_LoggingPane";\n
if(typeof (MochiKit.DOM)!="undefined"){\n
win=MochiKit.DOM.currentWindow();\n
}\n
if(!_427){\n
var url=win.location.href.split("?")[0].replace(/[:\\/.><&]/g,"_");\n
var name=uid+"_"+url;\n
var nwin=win.open("",name,"dependent,resizable,height=200");\n
if(!nwin){\n
alert("Not able to open debugging window due to pop-up blocking.");\n
return undefined;\n
}\n
nwin.document.write("<!DOCTYPE HTML PUBLIC \\"-//W3C//DTD HTML 4.0 Transitional//EN\\" "+"\\"http://www.w3.org/TR/html4/loose.dtd\\">"+"<html><head><title>[MochiKit.LoggingPane]</title></head>"+"<body></body></html>");\n
nwin.document.close();\n
nwin.document.title+=" "+win.document.title;\n
win=nwin;\n
}\n
var doc=win.document;\n
this.doc=doc;\n
var _434=doc.getElementById(uid);\n
var _435=!!_434;\n
if(_434&&typeof (_434.loggingPane)!="undefined"){\n
_434.loggingPane.logger=this.logger;\n
_434.loggingPane.buildAndApplyFilter();\n
return _434.loggingPane;\n
}\n
if(_435){\n
var _436;\n
while((_436=_434.firstChild)){\n
_434.removeChild(_436);\n
}\n
}else{\n
_434=doc.createElement("div");\n
_434.id=uid;\n
}\n
_434.loggingPane=this;\n
var _437=doc.createElement("input");\n
var _438=doc.createElement("input");\n
var _439=doc.createElement("button");\n
var _440=doc.createElement("button");\n
var _441=doc.createElement("button");\n
var _442=doc.createElement("button");\n
var _443=doc.createElement("div");\n
var _444=doc.createElement("div");\n
var _445=uid+"_Listener";\n
this.colorTable=_431(this.colorTable);\n
var _446=[];\n
var _447=null;\n
var _448=function(msg){\n
var _449=msg.level;\n
if(typeof (_449)=="number"){\n
_449=MochiKit.Logging.LogLevel[_449];\n
}\n
return _449;\n
};\n
var _450=function(msg){\n
return msg.info.join(" ");\n
};\n
var _451=bind(function(msg){\n
var _452=_448(msg);\n
var text=_450(msg);\n
var c=this.colorTable[_452];\n
var p=doc.createElement("span");\n
p.className="MochiKit-LogMessage MochiKit-LogLevel-"+_452;\n
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;\n
p.appendChild(doc.createTextNode(_452+": "+text));\n
_444.appendChild(p);\n
_444.appendChild(doc.createElement("br"));\n
if(_443.offsetHeight>_443.scrollHeight){\n
_443.scrollTop=0;\n
}else{\n
_443.scrollTop=_443.scrollHeight;\n
}\n
},this);\n
var _454=function(msg){\n
_446[_446.length]=msg;\n
_451(msg);\n
};\n
var _455=function(){\n
var _456,infore;\n
try{\n
_456=new RegExp(_437.value);\n
infore=new RegExp(_438.value);\n
}\n
catch(e){\n
logDebug("Error in filter regex: "+e.message);\n
return null;\n
}\n
return function(msg){\n
return (_456.test(_448(msg))&&infore.test(_450(msg)));\n
};\n
};\n
var _457=function(){\n
while(_444.firstChild){\n
_444.removeChild(_444.firstChild);\n
}\n
};\n
var _458=function(){\n
_446=[];\n
_457();\n
};\n
var _459=bind(function(){\n
if(this.closed){\n
return;\n
}\n
this.closed=true;\n
if(MochiKit.LoggingPane._loggingPane==this){\n
MochiKit.LoggingPane._loggingPane=null;\n
}\n
this.logger.removeListener(_445);\n
_434.loggingPane=null;\n
if(_427){\n
_434.parentNode.removeChild(_434);\n
}else{\n
this.win.close();\n
}\n
},this);\n
var _460=function(){\n
_457();\n
for(var i=0;i<_446.length;i++){\n
var msg=_446[i];\n
if(_447===null||_447(msg)){\n
_451(msg);\n
}\n
}\n
};\n
this.buildAndApplyFilter=function(){\n
_447=_455();\n
_460();\n
this.logger.removeListener(_445);\n
this.logger.addListener(_445,_447,_454);\n
};\n
var _461=bind(function(){\n
_446=this.logger.getMessages();\n
_460();\n
},this);\n
var _462=bind(function(_463){\n
_463=_463||window.event;\n
key=_463.which||_463.keyCode;\n
if(key==13){\n
this.buildAndApplyFilter();\n
}\n
},this);\n
var _464="display: block; z-index: 1000; left: 0px; bottom: 0px; position: fixed; width: 100%; background-color: white; font: "+this.logFont;\n
if(_427){\n
_464+="; height: 10em; border-top: 2px solid black";\n
}else{\n
_464+="; height: 100%;";\n
}\n
_434.style.cssText=_464;\n
if(!_435){\n
doc.body.appendChild(_434);\n
}\n
_464={"cssText":"width: 33%; display: inline; font: "+this.logFont};\n
_430(_437,{"value":"FATAL|ERROR|WARNING|INFO|DEBUG","onkeypress":_462,"style":_464});\n
_434.appendChild(_437);\n
_430(_438,{"value":".*","onkeypress":_462,"style":_464});\n
_434.appendChild(_438);\n
_464="width: 8%; display:inline; font: "+this.logFont;\n
_439.appendChild(doc.createTextNode("Filter"));\n
_439.onclick=bind("buildAndApplyFilter",this);\n
_439.style.cssText=_464;\n
_434.appendChild(_439);\n
_440.appendChild(doc.createTextNode("Load"));\n
_440.onclick=_461;\n
_440.style.cssText=_464;\n
_434.appendChild(_440);\n
_441.appendChild(doc.createTextNode("Clear"));\n
_441.onclick=_458;\n
_441.style.cssText=_464;\n
_434.appendChild(_441);\n
_442.appendChild(doc.createTextNode("Close"));\n
_442.onclick=_459;\n
_442.style.cssText=_464;\n
_434.appendChild(_442);\n
_443.style.cssText="overflow: auto; width: 100%";\n
_444.style.cssText="width: 100%; height: "+(_427?"8em":"100%");\n
_443.appendChild(_444);\n
_434.appendChild(_443);\n
this.buildAndApplyFilter();\n
_461();\n
if(_427){\n
this.win=undefined;\n
}else{\n
this.win=win;\n
}\n
this.inline=_427;\n
this.closePane=_459;\n
this.closed=false;\n
return this;\n
};\n
MochiKit.LoggingPane.LoggingPane.prototype={"logFont":"8pt Verdana,sans-serif","colorTable":{"ERROR":"red","FATAL":"darkred","WARNING":"blue","INFO":"black","DEBUG":"green"}};\n
MochiKit.LoggingPane.EXPORT_OK=["LoggingPane"];\n
MochiKit.LoggingPane.EXPORT=["createLoggingPane"];\n
MochiKit.LoggingPane.__new__=function(){\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};\n
MochiKit.Base.nameFunctions(this);\n
MochiKit.LoggingPane._loggingPane=null;\n
};\n
MochiKit.LoggingPane.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.LoggingPane);\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.Color");\n
dojo.require("MochiKit.Base");\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit.Base",[]);\n
}\n
try{\n
if(typeof (MochiKit.Base)=="undefined"){\n
throw "";\n
}\n
}\n
catch(e){\n
throw "MochiKit.Color depends on MochiKit.Base";\n
}\n
if(typeof (MochiKit.Color)=="undefined"){\n
MochiKit.Color={};\n
}\n
MochiKit.Color.NAME="MochiKit.Color";\n
MochiKit.Color.VERSION="1.3.1";\n
MochiKit.Color.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Color.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Color.Color=function(red,_466,blue,_468){\n
if(typeof (_468)=="undefined"||_468===null){\n
_468=1;\n
}\n
this.rgb={r:red,g:_466,b:blue,a:_468};\n
};\n
MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_469){\n
var rgb=this.rgb;\n
var m=MochiKit.Color;\n
return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_469);\n
},colorWithHue:function(hue){\n
var hsl=this.asHSL();\n
hsl.h=hue;\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},colorWithSaturation:function(_473){\n
var hsl=this.asHSL();\n
hsl.s=_473;\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},colorWithLightness:function(_474){\n
var hsl=this.asHSL();\n
hsl.l=_474;\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},darkerColorWithLevel:function(_475){\n
var hsl=this.asHSL();\n
hsl.l=Math.max(hsl.l-_475,0);\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},lighterColorWithLevel:function(_476){\n
var hsl=this.asHSL();\n
hsl.l=Math.min(hsl.l+_476,1);\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},blendedColor:function(_477,_478){\n
if(typeof (_478)=="undefined"||_478===null){\n
_478=0.5;\n
}\n
var sf=1-_478;\n
var s=this.rgb;\n
var d=_477.rgb;\n
var df=_478;\n
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));\n
},compareRGB:function(_481){\n
var a=this.asRGB();\n
var b=_481.asRGB();\n
return MochiKit.Base.compare([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a]);\n
},isLight:function(){\n
return this.asHSL().b>0.5;\n
},isDark:function(){\n
return (!this.isLight());\n
},toHSLString:function(){\n
var c=this.asHSL();\n
var ccc=MochiKit.Color.clampColorComponent;\n
var rval=this._hslString;\n
if(!rval){\n
var mid=(ccc(c.h,360).toFixed(0)+","+ccc(c.s,100).toPrecision(4)+"%"+","+ccc(c.l,100).toPrecision(4)+"%");\n
var a=c.a;\n
if(a>=1){\n
a=1;\n
rval="hsl("+mid+")";\n
}else{\n
if(a<=0){\n
a=0;\n
}\n
rval="hsla("+mid+","+a+")";\n
}\n
this._hslString=rval;\n
}\n
return rval;\n
},toRGBString:function(){\n
var c=this.rgb;\n
var ccc=MochiKit.Color.clampColorComponent;\n
var rval=this._rgbString;\n
if(!rval){\n
var mid=(ccc(c.r,255).toFixed(0)+","+ccc(c.g,255).toFixed(0)+","+ccc(c.b,255).toFixed(0));\n
if(c.a!=1){\n
rval="rgba("+mid+","+c.a+")";\n
}else{\n
rval="rgb("+mid+")";\n
}\n
this._rgbString=rval;\n
}\n
return rval;\n
},asRGB:function(){\n
return MochiKit.Base.clone(this.rgb);\n
},toHexString:function(){\n
var m=MochiKit.Color;\n
var c=this.rgb;\n
var ccc=MochiKit.Color.clampColorComponent;\n
var rval=this._hexString;\n
if(!rval){\n
rval=("#"+m.toColorPart(ccc(c.r,255))+m.toColorPart(ccc(c.g,255))+m.toColorPart(ccc(c.b,255)));\n
this._hexString=rval;\n
}\n
return rval;\n
},asHSV:function(){\n
var hsv=this.hsv;\n
var c=this.rgb;\n
if(typeof (hsv)=="undefined"||hsv===null){\n
hsv=MochiKit.Color.rgbToHSV(this.rgb);\n
this.hsv=hsv;\n
}\n
return MochiKit.Base.clone(hsv);\n
},asHSL:function(){\n
var hsl=this.hsl;\n
var c=this.rgb;\n
if(typeof (hsl)=="undefined"||hsl===null){\n
hsl=MochiKit.Color.rgbToHSL(this.rgb);\n
this.hsl=hsl;\n
}\n
return MochiKit.Base.clone(hsl);\n
},toString:function(){\n
return this.toRGBString();\n
},repr:function(){\n
var c=this.rgb;\n
var col=[c.r,c.g,c.b,c.a];\n
return this.__class__.NAME+"("+col.join(", ")+")";\n
}};\n
MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_486,blue,_487){\n
var _488=MochiKit.Color.Color;\n
if(arguments.length==1){\n
var rgb=red;\n
red=rgb.r;\n
_486=rgb.g;\n
blue=rgb.b;\n
if(typeof (rgb.a)=="undefined"){\n
_487=undefined;\n
}else{\n
_487=rgb.a;\n
}\n
}\n
return new _488(red,_486,blue,_487);\n
},fromHSL:function(hue,_489,_490,_491){\n
var m=MochiKit.Color;\n
return m.Color.fromRGB(m.hslToRGB.apply(m,arguments));\n
},fromHSV:function(hue,_492,_493,_494){\n
var m=MochiKit.Color;\n
return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments));\n
},fromName:function(name){\n
var _495=MochiKit.Color.Color;\n
if(name.charAt(0)=="\\""){\n
name=name.substr(1,name.length-2);\n
}\n
var _496=_495._namedColors[name.toLowerCase()];\n
if(typeof (_496)=="string"){\n
return _495.fromHexString(_496);\n
}else{\n
if(name=="transparent"){\n
return _495.transparentColor();\n
}\n
}\n
return null;\n
},fromString:function(_497){\n
var self=MochiKit.Color.Color;\n
var _498=_497.substr(0,3);\n
if(_498=="rgb"){\n
return self.fromRGBString(_497);\n
}else{\n
if(_498=="hsl"){\n
return self.fromHSLString(_497);\n
}else{\n
if(_497.charAt(0)=="#"){\n
return self.fromHexString(_497);\n
}\n
}\n
}\n
return self.fromName(_497);\n
},fromHexString:function(_499){\n
if(_499.charAt(0)=="#"){\n
_499=_499.substring(1);\n
}\n
var _500=[];\n
var i,hex;\n
if(_499.length==3){\n
for(i=0;i<3;i++){\n
hex=_499.substr(i,1);\n
_500.push(parseInt(hex+hex,16)/255);\n
}\n
}else{\n
for(i=0;i<6;i+=2){\n
hex=_499.substr(i,2);\n
_500.push(parseInt(hex,16)/255);\n
}\n
}\n
var _501=MochiKit.Color.Color;\n
return _501.fromRGB.apply(_501,_500);\n
},_fromColorString:function(pre,_503,_504,_505){\n
if(_505.indexOf(pre)===0){\n
_505=_505.substring(_505.indexOf("(",3)+1,_505.length-1);\n
}\n
var _506=_505.split(/\\s*,\\s*/);\n
var _507=[];\n
for(var i=0;i<_506.length;i++){\n
var c=_506[i];\n
var val;\n
var _508=c.substring(c.length-3);\n
if(c.charAt(c.length-1)=="%"){\n
val=0.01*parseFloat(c.substring(0,c.length-1));\n
}else{\n
if(_508=="deg"){\n
val=parseFloat(c)/360;\n
}else{\n
if(_508=="rad"){\n
val=parseFloat(c)/(Math.PI*2);\n
}else{\n
val=_504[i]*parseFloat(c);\n
}\n
}\n
}\n
_507.push(val);\n
}\n
return this[_503].apply(this,_507);\n
},fromComputedStyle:function(elem,_509,_510){\n
var d=MochiKit.DOM;\n
var cls=MochiKit.Color.Color;\n
for(elem=d.getElement(elem);elem;elem=elem.parentNode){\n
var _511=d.computedStyle.apply(d,arguments);\n
if(!_511){\n
continue;\n
}\n
var _512=cls.fromString(_511);\n
if(!_512){\n
break;\n
}\n
if(_512.asRGB().a>0){\n
return _512;\n
}\n
}\n
return null;\n
},fromBackground:function(elem){\n
var cls=MochiKit.Color.Color;\n
return cls.fromComputedStyle(elem,"backgroundColor","background-color")||cls.whiteColor();\n
},fromText:function(elem){\n
var cls=MochiKit.Color.Color;\n
return cls.fromComputedStyle(elem,"color","color")||cls.blackColor();\n
},namedColors:function(){\n
return MochiKit.Base.clone(MochiKit.Color.Color._namedColors);\n
}});\n
MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_513){\n
v*=_513;\n
if(v<0){\n
return 0;\n
}else{\n
if(v>_513){\n
return _513;\n
}else{\n
return v;\n
}\n
}\n
},_hslValue:function(n1,n2,hue){\n
if(hue>6){\n
hue-=6;\n
}else{\n
if(hue<0){\n
hue+=6;\n
}\n
}\n
var val;\n
if(hue<1){\n
val=n1+(n2-n1)*hue;\n
}else{\n
if(hue<3){\n
val=n2;\n
}else{\n
if(hue<4){\n
val=n1+(n2-n1)*(4-hue);\n
}else{\n
val=n1;\n
}\n
}\n
}\n
return val;\n
},hsvToRGB:function(hue,_516,_517,_518){\n
if(arguments.length==1){\n
var hsv=hue;\n
hue=hsv.h;\n
_516=hsv.s;\n
_517=hsv.v;\n
_518=hsv.a;\n
}\n
var red;\n
var _519;\n
var blue;\n
if(_516===0){\n
red=0;\n
_519=0;\n
blue=0;\n
}else{\n
var i=Math.floor(hue*6);\n
var f=(hue*6)-i;\n
var p=_517*(1-_516);\n
var q=_517*(1-(_516*f));\n
var t=_517*(1-(_516*(1-f)));\n
switch(i){\n
case 1:\n
red=q;\n
_519=_517;\n
blue=p;\n
break;\n
case 2:\n
red=p;\n
_519=_517;\n
blue=t;\n
break;\n
case 3:\n
red=p;\n
_519=q;\n
blue=_517;\n
break;\n
case 4:\n
red=t;\n
_519=p;\n
blue=_517;\n
break;\n
case 5:\n
red=_517;\n
_519=p;\n
blue=q;\n
break;\n
case 6:\n
case 0:\n
red=_517;\n
_519=t;\n
blue=p;\n
break;\n
}\n
}\n
return {r:red,g:_519,b:blue,a:_518};\n
},hslToRGB:function(hue,_521,_522,_523){\n
if(arguments.length==1){\n
var hsl=hue;\n
hue=hsl.h;\n
_521=hsl.s;\n
_522=hsl.l;\n
_523=hsl.a;\n
}\n
var red;\n
var _524;\n
var blue;\n
if(_521===0){\n
red=_522;\n
_524=_522;\n
blue=_522;\n
}else{\n
var m2;\n
if(_522<=0.5){\n
m2=_522*(1+_521);\n
}else{\n
m2=_522+_521-(_522*_521);\n
}\n
var m1=(2*_522)-m2;\n
var f=MochiKit.Color._hslValue;\n
var h6=hue*6;\n
red=f(m1,m2,h6+2);\n
_524=f(m1,m2,h6);\n
blue=f(m1,m2,h6-2);\n
}\n
return {r:red,g:_524,b:blue,a:_523};\n
},rgbToHSV:function(red,_528,blue,_529){\n
if(arguments.length==1){\n
var rgb=red;\n
red=rgb.r;\n
_528=rgb.g;\n
blue=rgb.b;\n
_529=rgb.a;\n
}\n
var max=Math.max(Math.max(red,_528),blue);\n
var min=Math.min(Math.min(red,_528),blue);\n
var hue;\n
var _532;\n
var _533=max;\n
if(min==max){\n
hue=0;\n
_532=0;\n
}else{\n
var _534=(max-min);\n
_532=_534/max;\n
if(red==max){\n
hue=(_528-blue)/_534;\n
}else{\n
if(_528==max){\n
hue=2+((blue-red)/_534);\n
}else{\n
hue=4+((red-_528)/_534);\n
}\n
}\n
hue/=6;\n
if(hue<0){\n
hue+=1;\n
}\n
if(hue>1){\n
hue-=1;\n
}\n
}\n
return {h:hue,s:_532,v:_533,a:_529};\n
},rgbToHSL:function(red,_535,blue,_536){\n
if(arguments.length==1){\n
var rgb=red;\n
red=rgb.r;\n
_535=rgb.g;\n
blue=rgb.b;\n
_536=rgb.a;\n
}\n
var max=Math.max(red,Math.max(_535,blue));\n
var min=Math.min(red,Math.min(_535,blue));\n
var hue;\n
var _537;\n
var _538=(max+min)/2;\n
var _539=max-min;\n
if(_539===0){\n
hue=0;\n
_537=0;\n
}else{\n
if(_538<=0.5){\n
_537=_539/(max+min);\n
}else{\n
_537=_539/(2-max-min);\n
}\n
if(red==max){\n
hue=(_535-blue)/_539;\n
}else{\n
if(_535==max){\n
hue=2+((blue-red)/_539);\n
}else{\n
hue=4+((red-_535)/_539);\n
}\n
}\n
hue/=6;\n
if(hue<0){\n
hue+=1;\n
}\n
if(hue>1){\n
hue-=1;\n
}\n
}\n
return {h:hue,s:_537,l:_538,a:_536};\n
},toColorPart:function(num){\n
num=Math.round(num);\n
var _540=num.toString(16);\n
if(num<16){\n
return "0"+_540;\n
}\n
return _540;\n
},__new__:function(){\n
var m=MochiKit.Base;\n
this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]);\n
this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]);\n
var _541=1/3;\n
var _542={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_541,_541,_541],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_541,2*_541,2*_541],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]};\n
var _543=function(name,r,g,b,a){\n
var rval=this.fromRGB(r,g,b,a);\n
this[name]=function(){\n
return rval;\n
};\n
return rval;\n
};\n
for(var k in _542){\n
var name=k+"Color";\n
var _545=m.concat([_543,this.Color,name],_542[k]);\n
this.Color[name]=m.bind.apply(null,_545);\n
}\n
var _546=function(){\n
for(var i=0;i<arguments.length;i++){\n
if(!(arguments[i] instanceof Color)){\n
return false;\n
}\n
}\n
return true;\n
};\n
var _547=function(a,b){\n
return a.compareRGB(b);\n
};\n
m.nameFunctions(this);\n
m.registerComparator(this.Color.NAME,_546,_547);\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
}});\n
MochiKit.Color.EXPORT=["Color"];\n
MochiKit.Color.EXPORT_OK=["clampColorComponent","rgbToHSL","hslToRGB","rgbToHSV","hsvToRGB","toColorPart"];\n
MochiKit.Color.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Color);\n
MochiKit.Color.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"};\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.Signal");\n
dojo.require("MochiKit.Base");\n
dojo.require("MochiKit.DOM");\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit.Base",[]);\n
JSAN.use("MochiKit.DOM",[]);\n
}\n
try{\n
if(typeof (MochiKit.Base)=="undefined"){\n
throw "";\n
}\n
}\n
catch(e){\n
throw "MochiKit.Signal depends on MochiKit.Base!";\n
}\n
try{\n
if(typeof (MochiKit.DOM)=="undefined"){\n
throw "";\n
}\n
}\n
catch(e){\n
throw "MochiKit.Signal depends on MochiKit.DOM!";\n
}\n
if(typeof (MochiKit.Signal)=="undefined"){\n
MochiKit.Signal={};\n
}\n
MochiKit.Signal.NAME="MochiKit.Signal";\n
MochiKit.Signal.VERSION="1.3.1";\n
MochiKit.Signal._observers=[];\n
MochiKit.Signal.Event=function(src,e){\n
this._event=e||window.event;\n
this._src=src;\n
};\n
MochiKit.Base.update(MochiKit.Signal.Event.prototype,{__repr__:function(){\n
var repr=MochiKit.Base.repr;\n
var str="{event(): "+repr(this.event())+", src(): "+repr(this.src())+", type(): "+repr(this.type())+", target(): "+repr(this.target())+", modifier(): "+"{alt: "+repr(this.modifier().alt)+", ctrl: "+repr(this.modifier().ctrl)+", meta: "+repr(this.modifier().meta)+", shift: "+repr(this.modifier().shift)+", any: "+repr(this.modifier().any)+"}";\n
if(this.type()&&this.type().indexOf("key")===0){\n
str+=", key(): {code: "+repr(this.key().code)+", string: "+repr(this.key().string)+"}";\n
}\n
if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){\n
str+=", mouse(): {page: "+repr(this.mouse().page)+", client: "+repr(this.mouse().client);\n
if(this.type()!="mousemove"){\n
str+=", button: {left: "+repr(this.mouse().button.left)+", middle: "+repr(this.mouse().button.middle)+", right: "+repr(this.mouse().button.right)+"}}";\n
}else{\n
str+="}";\n
}\n
}\n
if(this.type()=="mouseover"||this.type()=="mouseout"){\n
str+=", relatedTarget(): "+repr(this.relatedTarget());\n
}\n
str+="}";\n
return str;\n
},toString:function(){\n
return this.__repr__();\n
},src:function(){\n
return this._src;\n
},event:function(){\n
return this._event;\n
},type:function(){\n
return this._event.type||undefined;\n
},target:function(){\n
return this._event.target||this._event.srcElement;\n
},relatedTarget:function(){\n
if(this.type()=="mouseover"){\n
return (this._event.relatedTarget||this._event.fromElement);\n
}else{\n
if(this.type()=="mouseout"){\n
return (this._event.relatedTarget||this._event.toElement);\n
}\n
}\n
return undefined;\n
},modifier:function(){\n
var m={};\n
m.alt=this._event.altKey;\n
m.ctrl=this._event.ctrlKey;\n
m.meta=this._event.metaKey||false;\n
m.shift=this._event.shiftKey;\n
m.any=m.alt||m.ctrl||m.shift||m.meta;\n
return m;\n
},key:function(){\n
var k={};\n
if(this.type()&&this.type().indexOf("key")===0){\n
if(this.type()=="keydown"||this.type()=="keyup"){\n
k.code=this._event.keyCode;\n
k.string=(MochiKit.Signal._specialKeys[k.code]||"KEY_UNKNOWN");\n
return k;\n
}else{\n
if(this.type()=="keypress"){\n
k.code=0;\n
k.string="";\n
if(typeof (this._event.charCode)!="undefined"&&this._event.charCode!==0&&!MochiKit.Signal._specialMacKeys[this._event.charCode]){\n
k.code=this._event.charCode;\n
k.string=String.fromCharCode(k.code);\n
}else{\n
if(this._event.keyCode&&typeof (this._event.charCode)=="undefined"){\n
k.code=this._event.keyCode;\n
k.string=String.fromCharCode(k.code);\n
}\n
}\n
return k;\n
}\n
}\n
}\n
return undefined;\n
},mouse:function(){\n
var m={};\n
var e=this._event;\n
if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){\n
m.client=new MochiKit.DOM.Coordinates(0,0);\n
if(e.clientX||e.clientY){\n
m.client.x=(!e.clientX||e.clientX<0)?0:e.clientX;\n
m.client.y=(!e.clientY||e.clientY<0)?0:e.clientY;\n
}\n
m.page=new MochiKit.DOM.Coordinates(0,0);\n
if(e.pageX||e.pageY){\n
m.page.x=(!e.pageX||e.pageX<0)?0:e.pageX;\n
m.page.y=(!e.pageY||e.pageY<0)?0:e.pageY;\n
}else{\n
var de=MochiKit.DOM._document.documentElement;\n
var b=MochiKit.DOM._document.body;\n
m.page.x=e.clientX+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||b.clientLeft);\n
m.page.y=e.clientY+(de.scrollTop||b.scrollTop)-(de.clientTop||b.clientTop);\n
}\n
if(this.type()!="mousemove"){\n
m.button={};\n
m.button.left=false;\n
m.button.right=false;\n
m.button.middle=false;\n
if(e.which){\n
m.button.left=(e.which==1);\n
m.button.middle=(e.which==2);\n
m.button.right=(e.which==3);\n
}else{\n
m.button.left=!!(e.button&1);\n
m.button.right=!!(e.button&2);\n
m.button.middle=!!(e.button&4);\n
}\n
}\n
return m;\n
}\n
return undefined;\n
},stop:function(){\n
this.stopPropagation();\n
this.preventDefault();\n
},stopPropagation:function(){\n
if(this._event.stopPropagation){\n
this._event.stopPropagation();\n
}else{\n
this._event.cancelBubble=true;\n
}\n
},preventDefault:function(){\n
if(this._event.preventDefault){\n
this._event.preventDefault();\n
}else{\n
this._event.returnValue=false;\n
}\n
}});\n
MochiKit.Signal._specialMacKeys={3:"KEY_ENTER",63289:"KEY_NUM_PAD_CLEAR",63276:"KEY_PAGE_UP",63277:"KEY_PAGE_DOWN",63275:"KEY_END",63273:"KEY_HOME",63234:"KEY_ARROW_LEFT",63232:"KEY_ARROW_UP",63235:"KEY_ARROW_RIGHT",63233:"KEY_ARROW_DOWN",63302:"KEY_INSERT",63272:"KEY_DELETE"};\n
for(i=63236;i<=63242;i++){\n
MochiKit.Signal._specialMacKeys[i]="KEY_F"+(i-63236+1);\n
}\n
MochiKit.Signal._specialKeys={8:"KEY_BACKSPACE",9:"KEY_TAB",12:"KEY_NUM_PAD_CLEAR",13:"KEY_ENTER",16:"KEY_SHIFT",17:"KEY_CTRL",18:"KEY_ALT",19:"KEY_PAUSE",20:"KEY_CAPS_LOCK",27:"KEY_ESCAPE",32:"KEY_SPACEBAR",33:"KEY_PAGE_UP",34:"KEY_PAGE_DOWN",35:"KEY_END",36:"KEY_HOME",37:"KEY_ARROW_LEFT",38:"KEY_ARROW_UP",39:"KEY_ARROW_RIGHT",40:"KEY_ARROW_DOWN",44:"KEY_PRINT_SCREEN",45:"KEY_INSERT",46:"KEY_DELETE",59:"KEY_SEMICOLON",91:"KEY_WINDOWS_LEFT",92:"KEY_WINDOWS_RIGHT",93:"KEY_SELECT",106:"KEY_NUM_PAD_ASTERISK",107:"KEY_NUM_PAD_PLUS_SIGN",109:"KEY_NUM_PAD_HYPHEN-MINUS",110:"KEY_NUM_PAD_FULL_STOP",111:"KEY_NUM_PAD_SOLIDUS",144:"KEY_NUM_LOCK",145:"KEY_SCROLL_LOCK",186:"KEY_SEMICOLON",187:"KEY_EQUALS_SIGN",188:"KEY_COMMA",189:"KEY_HYPHEN-MINUS",190:"KEY_FULL_STOP",191:"KEY_SOLIDUS",192:"KEY_GRAVE_ACCENT",219:"KEY_LEFT_SQUARE_BRACKET",220:"KEY_REVERSE_SOLIDUS",221:"KEY_RIGHT_SQUARE_BRACKET",222:"KEY_APOSTROPHE"};\n
for(var i=48;i<=57;i++){\n
MochiKit.Signal._specialKeys[i]="KEY_"+(i-48);\n
}\n
for(i=65;i<=90;i++){\n
MochiKit.Signal._specialKeys[i]="KEY_"+String.fromCharCode(i);\n
}\n
for(i=96;i<=105;i++){\n
MochiKit.Signal._specialKeys[i]="KEY_NUM_PAD_"+(i-96);\n
}\n
for(i=112;i<=123;i++){\n
MochiKit.Signal._specialKeys[i]="KEY_F"+(i-112+1);\n
}\n
MochiKit.Base.update(MochiKit.Signal,{__repr__:function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
},toString:function(){\n
return this.__repr__();\n
},_unloadCache:function(){\n
var self=MochiKit.Signal;\n
var _548=self._observers;\n
for(var i=0;i<_548.length;i++){\n
self._disconnect(_548[i]);\n
}\n
delete self._observers;\n
try{\n
window.onload=undefined;\n
}\n
catch(e){\n
}\n
try{\n
window.onunload=undefined;\n
}\n
catch(e){\n
}\n
},_listener:function(src,func,obj,_549){\n
var E=MochiKit.Signal.Event;\n
if(!_549){\n
return MochiKit.Base.bind(func,obj);\n
}\n
obj=obj||src;\n
if(typeof (func)=="string"){\n
return function(_551){\n
obj[func].apply(obj,[new E(src,_551)]);\n
};\n
}else{\n
return function(_552){\n
func.apply(obj,[new E(src,_552)]);\n
};\n
}\n
},connect:function(src,sig,_554,_555){\n
src=MochiKit.DOM.getElement(src);\n
var self=MochiKit.Signal;\n
if(typeof (sig)!="string"){\n
throw new Error("\'sig\' must be a string");\n
}\n
var obj=null;\n
var func=null;\n
if(typeof (_555)!="undefined"){\n
obj=_554;\n
func=_555;\n
if(typeof (_555)=="string"){\n
if(typeof (_554[_555])!="function"){\n
throw new Error("\'funcOrStr\' must be a function on \'objOrFunc\'");\n
}\n
}else{\n
if(typeof (_555)!="function"){\n
throw new Error("\'funcOrStr\' must be a function or string");\n
}\n
}\n
}else{\n
if(typeof (_554)!="function"){\n
throw new Error("\'objOrFunc\' must be a function if \'funcOrStr\' is not given");\n
}else{\n
func=_554;\n
}\n
}\n
if(typeof (obj)=="undefined"||obj===null){\n
obj=src;\n
}\n
var _556=!!(src.addEventListener||src.attachEvent);\n
var _557=self._listener(src,func,obj,_556);\n
if(src.addEventListener){\n
src.addEventListener(sig.substr(2),_557,false);\n
}else{\n
if(src.attachEvent){\n
src.attachEvent(sig,_557);\n
}\n
}\n
var _558=[src,sig,_557,_556,_554,_555];\n
self._observers.push(_558);\n
return _558;\n
},_disconnect:function(_559){\n
if(!_559[3]){\n
return;\n
}\n
var src=_559[0];\n
var sig=_559[1];\n
var _560=_559[2];\n
if(src.removeEventListener){\n
src.removeEventListener(sig.substr(2),_560,false);\n
}else{\n
if(src.detachEvent){\n
src.detachEvent(sig,_560);\n
}else{\n
throw new Error("\'src\' must be a DOM element");\n
}\n
}\n
},disconnect:function(_561){\n
var self=MochiKit.Signal;\n
var _562=self._observers;\n
var m=MochiKit.Base;\n
if(arguments.length>1){\n
var src=MochiKit.DOM.getElement(arguments[0]);\n
var sig=arguments[1];\n
var obj=arguments[2];\n
var func=arguments[3];\n
for(var i=_562.length-1;i>=0;i--){\n
var o=_562[i];\n
if(o[0]===src&&o[1]===sig&&o[4]===obj&&o[5]===func){\n
self._disconnect(o);\n
_562.splice(i,1);\n
return true;\n
}\n
}\n
}else{\n
var idx=m.findIdentical(_562,_561);\n
if(idx>=0){\n
self._disconnect(_561);\n
_562.splice(idx,1);\n
return true;\n
}\n
}\n
return false;\n
},disconnectAll:function(src,sig){\n
src=MochiKit.DOM.getElement(src);\n
var m=MochiKit.Base;\n
var _563=m.flattenArguments(m.extend(null,arguments,1));\n
var self=MochiKit.Signal;\n
var _564=self._disconnect;\n
var _565=self._observers;\n
if(_563.length===0){\n
for(var i=_565.length-1;i>=0;i--){\n
var _566=_565[i];\n
if(_566[0]===src){\n
_564(_566);\n
_565.splice(i,1);\n
}\n
}\n
}else{\n
var sigs={};\n
for(var i=0;i<_563.length;i++){\n
sigs[_563[i]]=true;\n
}\n
for(var i=_565.length-1;i>=0;i--){\n
var _566=_565[i];\n
if(_566[0]===src&&_566[1] in sigs){\n
_564(_566);\n
_565.splice(i,1);\n
}\n
}\n
}\n
},signal:function(src,sig){\n
var _568=MochiKit.Signal._observers;\n
src=MochiKit.DOM.getElement(src);\n
var args=MochiKit.Base.extend(null,arguments,2);\n
var _569=[];\n
for(var i=0;i<_568.length;i++){\n
var _570=_568[i];\n
if(_570[0]===src&&_570[1]===sig){\n
try{\n
_570[2].apply(src,args);\n
}\n
catch(e){\n
_569.push(e);\n
}\n
}\n
}\n
if(_569.length==1){\n
throw _569[0];\n
}else{\n
if(_569.length>1){\n
var e=new Error("Multiple errors thrown in handling \'sig\', see errors property");\n
e.errors=_569;\n
throw e;\n
}\n
}\n
}});\n
MochiKit.Signal.EXPORT_OK=[];\n
MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll"];\n
MochiKit.Signal.__new__=function(win){\n
var m=MochiKit.Base;\n
this._document=document;\n
this._window=win;\n
try{\n
this.connect(window,"onunload",this._unloadCache);\n
}\n
catch(e){\n
}\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
MochiKit.Signal.__new__(this);\n
if(!MochiKit.__compat__){\n
connect=MochiKit.Signal.connect;\n
disconnect=MochiKit.Signal.disconnect;\n
disconnectAll=MochiKit.Signal.disconnectAll;\n
signal=MochiKit.Signal.signal;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.Signal);\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.Visual");\n
dojo.require("MochiKit.Base");\n
dojo.require("MochiKit.DOM");\n
dojo.require("MochiKit.Color");\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit.Base",[]);\n
JSAN.use("MochiKit.DOM",[]);\n
JSAN.use("MochiKit.Color",[]);\n
}\n
try{\n
if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"){\n
throw "";\n
}\n
}\n
catch(e){\n
throw "MochiKit.Visual depends on MochiKit.Base, MochiKit.DOM and MochiKit.Color!";\n
}\n
if(typeof (MochiKit.Visual)=="undefined"){\n
MochiKit.Visual={};\n
}\n
MochiKit.Visual.NAME="MochiKit.Visual";\n
MochiKit.Visual.VERSION="1.3.1";\n
MochiKit.Visual.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Visual.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Visual._RoundCorners=function(e,_571){\n
e=MochiKit.DOM.getElement(e);\n
this._setOptions(_571);\n
if(this.options.__unstable__wrapElement){\n
e=this._doWrap(e);\n
}\n
var _572=this.options.color;\n
var C=MochiKit.Color.Color;\n
if(this.options.color=="fromElement"){\n
_572=C.fromBackground(e);\n
}else{\n
if(!(_572 instanceof C)){\n
_572=C.fromString(_572);\n
}\n
}\n
this.isTransparent=(_572.asRGB().a<=0);\n
var _574=this.options.bgColor;\n
if(this.options.bgColor=="fromParent"){\n
_574=C.fromBackground(e.offsetParent);\n
}else{\n
if(!(_574 instanceof C)){\n
_574=C.fromString(_574);\n
}\n
}\n
this._roundCornersImpl(e,_572,_574);\n
};\n
MochiKit.Visual._RoundCorners.prototype={_doWrap:function(e){\n
var _575=e.parentNode;\n
var doc=MochiKit.DOM.currentDocument();\n
if(typeof (doc.defaultView)=="undefined"||doc.defaultView===null){\n
return e;\n
}\n
var _576=doc.defaultView.getComputedStyle(e,null);\n
if(typeof (_576)=="undefined"||_576===null){\n
return e;\n
}\n
var _577=MochiKit.DOM.DIV({"style":{display:"block",marginTop:_576.getPropertyValue("padding-top"),marginRight:_576.getPropertyValue("padding-right"),marginBottom:_576.getPropertyValue("padding-bottom"),marginLeft:_576.getPropertyValue("padding-left"),padding:"0px"}});\n
_577.innerHTML=e.innerHTML;\n
e.innerHTML="";\n
e.appendChild(_577);\n
return e;\n
},_roundCornersImpl:function(e,_578,_579){\n
if(this.options.border){\n
this._renderBorder(e,_579);\n
}\n
if(this._isTopRounded()){\n
this._roundTopCorners(e,_578,_579);\n
}\n
if(this._isBottomRounded()){\n
this._roundBottomCorners(e,_578,_579);\n
}\n
},_renderBorder:function(el,_580){\n
var _581="1px solid "+this._borderColor(_580);\n
var _582="border-left: "+_581;\n
var _583="border-right: "+_581;\n
var _584="style=\'"+_582+";"+_583+"\'";\n
el.innerHTML="<div "+_584+">"+el.innerHTML+"</div>";\n
},_roundTopCorners:function(el,_585,_586){\n
var _587=this._createCorner(_586);\n
for(var i=0;i<this.options.numSlices;i++){\n
_587.appendChild(this._createCornerSlice(_585,_586,i,"top"));\n
}\n
el.style.paddingTop=0;\n
el.insertBefore(_587,el.firstChild);\n
},_roundBottomCorners:function(el,_588,_589){\n
var _590=this._createCorner(_589);\n
for(var i=(this.options.numSlices-1);i>=0;i--){\n
_590.appendChild(this._createCornerSlice(_588,_589,i,"bottom"));\n
}\n
el.style.paddingBottom=0;\n
el.appendChild(_590);\n
},_createCorner:function(_591){\n
var dom=MochiKit.DOM;\n
return dom.DIV({style:{backgroundColor:_591.toString()}});\n
},_createCornerSlice:function(_592,_593,n,_594){\n
var _595=MochiKit.DOM.SPAN();\n
var _596=_595.style;\n
_596.backgroundColor=_592.toString();\n
_596.display="block";\n
_596.height="1px";\n
_596.overflow="hidden";\n
_596.fontSize="1px";\n
var _597=this._borderColor(_592,_593);\n
if(this.options.border&&n===0){\n
_596.borderTopStyle="solid";\n
_596.borderTopWidth="1px";\n
_596.borderLeftWidth="0px";\n
_596.borderRightWidth="0px";\n
_596.borderBottomWidth="0px";\n
_596.height="0px";\n
_596.borderColor=_597.toString();\n
}else{\n
if(_597){\n
_596.borderColor=_597.toString();\n
_596.borderStyle="solid";\n
_596.borderWidth="0px 1px";\n
}\n
}\n
if(!this.options.compact&&(n==(this.options.numSlices-1))){\n
_596.height="2px";\n
}\n
this._setMargin(_595,n,_594);\n
this._setBorder(_595,n,_594);\n
return _595;\n
},_setOptions:function(_598){\n
this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false,__unstable__wrapElement:false};\n
MochiKit.Base.update(this.options,_598);\n
this.options.numSlices=(this.options.compact?2:4);\n
},_whichSideTop:function(){\n
var _599=this.options.corners;\n
if(this._hasString(_599,"all","top")){\n
return "";\n
}\n
var _600=(_599.indexOf("tl")!=-1);\n
var _601=(_599.indexOf("tr")!=-1);\n
if(_600&&_601){\n
return "";\n
}\n
if(_600){\n
return "left";\n
}\n
if(_601){\n
return "right";\n
}\n
return "";\n
},_whichSideBottom:function(){\n
var _602=this.options.corners;\n
if(this._hasString(_602,"all","bottom")){\n
return "";\n
}\n
var _603=(_602.indexOf("bl")!=-1);\n
var _604=(_602.indexOf("br")!=-1);\n
if(_603&&_604){\n
return "";\n
}\n
if(_603){\n
return "left";\n
}\n
if(_604){\n
return "right";\n
}\n
return "";\n
},_borderColor:function(_605,_606){\n
if(_605=="transparent"){\n
return _606;\n
}else{\n
if(this.options.border){\n
return this.options.border;\n
}else{\n
if(this.options.blend){\n
return _606.blendedColor(_605);\n
}\n
}\n
}\n
return "";\n
},_setMargin:function(el,n,_607){\n
var _608=this._marginSize(n)+"px";\n
var _609=(_607=="top"?this._whichSideTop():this._whichSideBottom());\n
var _610=el.style;\n
if(_609=="left"){\n
_610.marginLeft=_608;\n
_610.marginRight="0px";\n
}else{\n
if(_609=="right"){\n
_610.marginRight=_608;\n
_610.marginLeft="0px";\n
}else{\n
_610.marginLeft=_608;\n
_610.marginRight=_608;\n
}\n
}\n
},_setBorder:function(el,n,_611){\n
var _612=this._borderSize(n)+"px";\n
var _613=(_611=="top"?this._whichSideTop():this._whichSideBottom());\n
var _614=el.style;\n
if(_613=="left"){\n
_614.borderLeftWidth=_612;\n
_614.borderRightWidth="0px";\n
}else{\n
if(_613=="right"){\n
_614.borderRightWidth=_612;\n
_614.borderLeftWidth="0px";\n
}else{\n
_614.borderLeftWidth=_612;\n
_614.borderRightWidth=_612;\n
}\n
}\n
},_marginSize:function(n){\n
if(this.isTransparent){\n
return 0;\n
}\n
var o=this.options;\n
if(o.compact&&o.blend){\n
var _615=[1,0];\n
return _615[n];\n
}else{\n
if(o.compact){\n
var _616=[2,1];\n
return _616[n];\n
}else{\n
if(o.blend){\n
var _617=[3,2,1,0];\n
return _617[n];\n
}else{\n
var _618=[5,3,2,1];\n
return _618[n];\n
}\n
}\n
}\n
},_borderSize:function(n){\n
var o=this.options;\n
var _619;\n
if(o.compact&&(o.blend||this.isTransparent)){\n
return 1;\n
}else{\n
if(o.compact){\n
_619=[1,0];\n
}else{\n
if(o.blend){\n
_619=[2,1,1,1];\n
}else{\n
if(o.border){\n
_619=[0,2,0,0];\n
}else{\n
if(this.isTransparent){\n
_619=[5,3,2,1];\n
}else{\n
return 0;\n
}\n
}\n
}\n
}\n
}\n
return _619[n];\n
},_hasString:function(str){\n
for(var i=1;i<arguments.length;i++){\n
if(str.indexOf(arguments[i])!=-1){\n
return true;\n
}\n
}\n
return false;\n
},_isTopRounded:function(){\n
return this._hasString(this.options.corners,"all","top","tl","tr");\n
},_isBottomRounded:function(){\n
return this._hasString(this.options.corners,"all","bottom","bl","br");\n
},_hasSingleTextChild:function(el){\n
return (el.childNodes.length==1&&el.childNodes[0].nodeType==3);\n
}};\n
MochiKit.Visual.roundElement=function(e,_620){\n
new MochiKit.Visual._RoundCorners(e,_620);\n
};\n
MochiKit.Visual.roundClass=function(_621,_622,_623){\n
var _624=MochiKit.DOM.getElementsByTagAndClassName(_621,_622);\n
for(var i=0;i<_624.length;i++){\n
MochiKit.Visual.roundElement(_624[i],_623);\n
}\n
};\n
MochiKit.Visual.Color=MochiKit.Color.Color;\n
MochiKit.Visual.getElementsComputedStyle=MochiKit.DOM.computedStyle;\n
MochiKit.Visual.__new__=function(){\n
var m=MochiKit.Base;\n
m.nameFunctions(this);\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
};\n
MochiKit.Visual.EXPORT=["roundElement","roundClass"];\n
MochiKit.Visual.EXPORT_OK=[];\n
MochiKit.Visual.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Visual);\n
if(typeof (MochiKit)=="undefined"){\n
MochiKit={};\n
}\n
if(typeof (MochiKit.MochiKit)=="undefined"){\n
MochiKit.MochiKit={};\n
}\n
MochiKit.MochiKit.NAME="MochiKit.MochiKit";\n
MochiKit.MochiKit.VERSION="1.3.1";\n
MochiKit.MochiKit.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.MochiKit.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.MochiKit.SUBMODULES=["Base","Iter","Logging","DateTime","Format","Async","DOM","LoggingPane","Color","Signal","Visual"];\n
if(typeof (JSAN)!="undefined"||typeof (dojo)!="undefined"){\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.MochiKit");\n
dojo.require("MochiKit.*");\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit.Base",[]);\n
JSAN.use("MochiKit.Iter",[]);\n
JSAN.use("MochiKit.Logging",[]);\n
JSAN.use("MochiKit.DateTime",[]);\n
JSAN.use("MochiKit.Format",[]);\n
JSAN.use("MochiKit.Async",[]);\n
JSAN.use("MochiKit.DOM",[]);\n
JSAN.use("MochiKit.LoggingPane",[]);\n
JSAN.use("MochiKit.Color",[]);\n
JSAN.use("MochiKit.Signal",[]);\n
JSAN.use("MochiKit.Visual",[]);\n
}\n
(function(){\n
var _625=MochiKit.Base.extend;\n
var self=MochiKit.MochiKit;\n
var _626=self.SUBMODULES;\n
var _627=[];\n
var _628=[];\n
var _629={};\n
var i,k,m,all;\n
for(i=0;i<_626.length;i++){\n
m=MochiKit[_626[i]];\n
_625(_627,m.EXPORT);\n
_625(_628,m.EXPORT_OK);\n
for(k in m.EXPORT_TAGS){\n
_629[k]=_625(_629[k],m.EXPORT_TAGS[k]);\n
}\n
all=m.EXPORT_TAGS[":all"];\n
if(!all){\n
all=_625(null,m.EXPORT,m.EXPORT_OK);\n
}\n
var j;\n
for(j=0;j<all.length;j++){\n
k=all[j];\n
self[k]=m[k];\n
}\n
}\n
self.EXPORT=_627;\n
self.EXPORT_OK=_628;\n
self.EXPORT_TAGS=_629;\n
}());\n
}else{\n
if(typeof (MochiKit.__compat__)=="undefined"){\n
MochiKit.__compat__=true;\n
}\n
(function(){\n
var _630=document.getElementsByTagName("script");\n
var _631="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";\n
var base=null;\n
var _632=null;\n
var _633={};\n
var i;\n
for(i=0;i<_630.length;i++){\n
var src=_630[i].getAttribute("src");\n
if(!src){\n
continue;\n
}\n
_633[src]=true;\n
if(src.match(/MochiKit.js$/)){\n
base=src.substring(0,src.lastIndexOf("MochiKit.js"));\n
_632=_630[i];\n
}\n
}\n
if(base===null){\n
return;\n
}\n
var _634=MochiKit.MochiKit.SUBMODULES;\n
for(var i=0;i<_634.length;i++){\n
if(MochiKit[_634[i]]){\n
continue;\n
}\n
var uri=base+_634[i]+".js";\n
if(uri in _633){\n
continue;\n
}\n
if(document.documentElement&&document.documentElement.namespaceURI==_631){\n
var s=document.createElementNS(_631,"script");\n
s.setAttribute("id","MochiKit_"+base+_634[i]);\n
s.setAttribute("src",uri);\n
s.setAttribute("type","application/x-javascript");\n
_632.parentNode.appendChild(s);\n
}else{\n
document.write("<script src=\\""+uri+"\\" type=\\"text/javascript\\"></script>");\n
}\n
}\n
})();\n
}\n
\n
\n


]]></string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
