<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <global name="File" module="OFS.Image"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_EtagSupport__etag</string> </key>
            <value> <string>ts06460181.45</string> </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/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>161250</long> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string>MochiKitERP5.js</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.4 : 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
if(typeof (MochiKit.__export__)=="undefined"){\n
MochiKit.__export__=(MochiKit.__compat__||(typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined"));\n
}\n
MochiKit.Base.VERSION="1.4";\n
MochiKit.Base.NAME="MochiKit.Base";\n
MochiKit.Base.update=function(_1,_2){\n
if(_1===null||_1===undefined){\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
},camelize:function(_6){\n
var _7=_6.split("-");\n
var cc=_7[0];\n
for(var i=1;i<_7.length;i++){\n
cc+=_7[i].charAt(0).toUpperCase()+_7[i].substring(1);\n
}\n
return cc;\n
},counter:function(n){\n
if(arguments.length===0){\n
n=1;\n
}\n
return function(){\n
return n++;\n
};\n
},clone:function(_b){\n
var me=arguments.callee;\n
if(arguments.length==1){\n
me.prototype=_b;\n
return new me();\n
}\n
},_deps:function(_d,_e){\n
if(!(_d in MochiKit)){\n
MochiKit[_d]={};\n
}\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit."+_d);\n
}\n
for(var i=0;i<_e.length;i++){\n
if(typeof (dojo)!="undefined"){\n
dojo.require("MochiKit."+_e[i]);\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit."+_e[i],[]);\n
}\n
if(!(_e[i] in MochiKit)){\n
throw "MochiKit."+_d+" depends on MochiKit."+_e[i]+"!";\n
}\n
}\n
},_flattenArray:function(res,lst){\n
for(var i=0;i<lst.length;i++){\n
var o=lst[i];\n
if(o instanceof Array){\n
arguments.callee(res,o);\n
}else{\n
res.push(o);\n
}\n
}\n
return res;\n
},flattenArray:function(lst){\n
return MochiKit.Base._flattenArray([],lst);\n
},flattenArguments:function(lst){\n
var res=[];\n
var m=MochiKit.Base;\n
var _18=m.extend(null,arguments);\n
while(_18.length){\n
var o=_18.shift();\n
if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){\n
for(var i=o.length-1;i>=0;i--){\n
_18.unshift(o[i]);\n
}\n
}else{\n
res.push(o);\n
}\n
}\n
return res;\n
},extend:function(_1b,obj,_1d){\n
if(!_1d){\n
_1d=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(!_1b){\n
_1b=[];\n
}\n
for(var i=_1d;i<l;i++){\n
_1b.push(obj[i]);\n
}\n
}\n
return _1b;\n
},updatetree:function(_20,obj){\n
if(_20===null||_20===undefined){\n
_20={};\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 (_20[k])=="object"&&typeof (v)=="object"){\n
arguments.callee(_20[k],v);\n
}else{\n
_20[k]=v;\n
}\n
}\n
}\n
}\n
return _20;\n
},setdefault:function(_26,obj){\n
if(_26===null||_26===undefined){\n
_26={};\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 _26)){\n
_26[k]=o[k];\n
}\n
}\n
}\n
return _26;\n
},keys:function(obj){\n
var _2c=[];\n
for(var _2d in obj){\n
_2c.push(_2d);\n
}\n
return _2c;\n
},values:function(obj){\n
var _2f=[];\n
for(var _30 in obj){\n
_2f.push(obj[_30]);\n
}\n
return _2f;\n
},items:function(obj){\n
var _32=[];\n
var e;\n
for(var _34 in obj){\n
var v;\n
try{\n
v=obj[_34];\n
}\n
catch(e){\n
continue;\n
}\n
_32.push([_34,v]);\n
}\n
return _32;\n
},_newNamedError:function(_36,_37,_38){\n
_38.prototype=new MochiKit.Base.NamedError(_36.NAME+"."+_37);\n
_36[_37]=_38;\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
},seq:function(a,b){\n
return a===b;\n
},sne: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(_76){\n
return function(){\n
return this[_76].apply(this,arguments);\n
};\n
},itemgetter:function(_77){\n
return function(arg){\n
return arg[_77];\n
};\n
},typeMatcher:function(){\n
var _79={};\n
for(var i=0;i<arguments.length;i++){\n
var typ=arguments[i];\n
_79[typ]=typ;\n
}\n
return function(){\n
for(var i=0;i<arguments.length;i++){\n
if(!(typeof (arguments[i]) in _79)){\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"||o.nodeType===3||o.nodeType===4){\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 _8a=[];\n
for(var i=1;i<arguments.length;i++){\n
_8a.push(fn(arguments[i]));\n
}\n
return _8a;\n
},map:function(fn,lst){\n
var m=MochiKit.Base;\n
var itr=MochiKit.Iter;\n
var _90=m.isArrayLike;\n
if(arguments.length<=2){\n
if(!_90(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 _91=[];\n
for(var i=0;i<lst.length;i++){\n
_91.push(fn(lst[i]));\n
}\n
return _91;\n
}else{\n
if(fn===null){\n
fn=Array;\n
}\n
var _93=null;\n
for(i=1;i<arguments.length;i++){\n
if(!_90(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(_93===null||_93>l){\n
_93=l;\n
}\n
}\n
_91=[];\n
for(i=0;i<_93;i++){\n
var _95=[];\n
for(var j=1;j<arguments.length;j++){\n
_95.push(arguments[j][i]);\n
}\n
_91.push(fn.apply(this,_95));\n
}\n
return _91;\n
}\n
},xfilter:function(fn){\n
var _98=[];\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
_98.push(o);\n
}\n
}\n
return _98;\n
},filter:function(fn,lst,_9d){\n
var _9e=[];\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,_9d);\n
}else{\n
if(typeof (_9d)=="undefined"||_9d===null){\n
for(var i=0;i<lst.length;i++){\n
var o=lst[i];\n
if(fn(o)){\n
_9e.push(o);\n
}\n
}\n
}else{\n
for(i=0;i<lst.length;i++){\n
o=lst[i];\n
if(fn.call(_9d,o)){\n
_9e.push(o);\n
}\n
}\n
}\n
}\n
return _9e;\n
},_wrapDumbFunction:function(_a2){\n
return function(){\n
switch(arguments.length){\n
case 0:\n
return _a2();\n
case 1:\n
return _a2(arguments[0]);\n
case 2:\n
return _a2(arguments[0],arguments[1]);\n
case 3:\n
return _a2(arguments[0],arguments[1],arguments[2]);\n
}\n
var _a3=[];\n
for(var i=0;i<arguments.length;i++){\n
_a3.push("arguments["+i+"]");\n
}\n
return eval("(func("+_a3.join(",")+"))");\n
};\n
},methodcaller:function(_a5){\n
var _a6=MochiKit.Base.extend(null,arguments,1);\n
if(typeof (_a5)=="function"){\n
return function(obj){\n
return _a5.apply(obj,_a6);\n
};\n
}else{\n
return function(obj){\n
return obj[_a5].apply(obj,_a6);\n
};\n
}\n
},method:function(_a9,_aa){\n
var m=MochiKit.Base;\n
return m.bind.apply(this,m.extend([_aa,_a9],arguments,2));\n
},compose:function(f1,f2){\n
var _ae=[];\n
var m=MochiKit.Base;\n
if(arguments.length===0){\n
throw new TypeError("compose() requires at least one argument");\n
}\n
for(var i=0;i<arguments.length;i++){\n
var fn=arguments[i];\n
if(typeof (fn)!="function"){\n
throw new TypeError(m.repr(fn)+" is not a function");\n
}\n
_ae.push(fn);\n
}\n
return function(){\n
var _b2=arguments;\n
for(var i=_ae.length-1;i>=0;i--){\n
_b2=[_ae[i].apply(this,_b2)];\n
}\n
return _b2[0];\n
};\n
},bind:function(_b4,_b5){\n
if(typeof (_b4)=="string"){\n
_b4=_b5[_b4];\n
}\n
var _b6=_b4.im_func;\n
var _b7=_b4.im_preargs;\n
var _b8=_b4.im_self;\n
var m=MochiKit.Base;\n
if(typeof (_b4)=="function"&&typeof (_b4.apply)=="undefined"){\n
_b4=m._wrapDumbFunction(_b4);\n
}\n
if(typeof (_b6)!="function"){\n
_b6=_b4;\n
}\n
if(typeof (_b5)!="undefined"){\n
_b8=_b5;\n
}\n
if(typeof (_b7)=="undefined"){\n
_b7=[];\n
}else{\n
_b7=_b7.slice();\n
}\n
m.extend(_b7,arguments,2);\n
var _ba=function(){\n
var _bb=arguments;\n
var me=arguments.callee;\n
if(me.im_preargs.length>0){\n
_bb=m.concat(me.im_preargs,_bb);\n
}\n
var _bd=me.im_self;\n
if(!_bd){\n
_bd=this;\n
}\n
return me.im_func.apply(_bd,_bb);\n
};\n
_ba.im_self=_b8;\n
_ba.im_func=_b6;\n
_ba.im_preargs=_b7;\n
return _ba;\n
},bindMethods:function(_be){\n
var _bf=MochiKit.Base.bind;\n
for(var k in _be){\n
var _c1=_be[k];\n
if(typeof (_c1)=="function"){\n
_be[k]=_bf(_c1,_be);\n
}\n
}\n
},registerComparator:function(_c2,_c3,_c4,_c5){\n
MochiKit.Base.comparatorRegistry.register(_c2,_c3,_c4,_c5);\n
},_primitives:{"boolean":true,"string":true,"number":true},compare:function(a,b){\n
if(a==b){\n
return 0;\n
}\n
var _c8=(typeof (a)=="undefined"||a===null);\n
var _c9=(typeof (b)=="undefined"||b===null);\n
if(_c8&&_c9){\n
return 0;\n
}else{\n
if(_c8){\n
return -1;\n
}else{\n
if(_c9){\n
return 1;\n
}\n
}\n
}\n
var m=MochiKit.Base;\n
var _cb=m._primitives;\n
if(!(typeof (a) in _cb&&typeof (b) in _cb)){\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 _cc=m.repr;\n
throw new TypeError(_cc(a)+" and "+_cc(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 _d1=MochiKit.Base.compare;\n
var _d2=a.length;\n
var _d3=0;\n
if(_d2>b.length){\n
_d3=1;\n
_d2=b.length;\n
}else{\n
if(_d2<b.length){\n
_d3=-1;\n
}\n
}\n
for(var i=0;i<_d2;i++){\n
var cmp=_d1(a[i],b[i]);\n
if(cmp){\n
return cmp;\n
}\n
}\n
return _d3;\n
},registerRepr:function(_d6,_d7,_d8,_d9){\n
MochiKit.Base.reprRegistry.register(_d6,_d7,_d8,_d9);\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 _db=(o+"");\n
}\n
catch(e){\n
return "["+typeof (o)+"]";\n
}\n
if(typeof (o)=="function"){\n
_db=_db.replace(/^\\s+/,"").replace(/\\s+/g," ");\n
var idx=_db.indexOf("{");\n
if(idx!=-1){\n
_db=_db.substr(0,idx)+"{...}";\n
}\n
}\n
return _db;\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(_e1,_e2,_e3,_e4){\n
MochiKit.Base.jsonRegistry.register(_e1,_e2,_e3,_e4);\n
},evalJSON:function(){\n
return eval("("+MochiKit.Base._filterJSON(arguments[0])+")");\n
},_filterJSON:function(s){\n
var m=s.match(/^\\s*\\/\\*(.*)\\*\\/\\s*$/);\n
if(m){\n
return m[1];\n
}\n
return s;\n
},serializeJSON:function(o){\n
var _e8=typeof (o);\n
if(_e8=="number"||_e8=="boolean"){\n
return o+"";\n
}else{\n
if(o===null){\n
return "null";\n
}\n
}\n
var m=MochiKit.Base;\n
var _ea=m.reprString;\n
if(_e8=="string"){\n
return _ea(o);\n
}\n
var me=arguments.callee;\n
var _ec;\n
if(typeof (o.__json__)=="function"){\n
_ec=o.__json__();\n
if(o!==_ec){\n
return me(_ec);\n
}\n
}\n
if(typeof (o.json)=="function"){\n
_ec=o.json();\n
if(o!==_ec){\n
return me(_ec);\n
}\n
}\n
if(_e8!="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
_ec=m.jsonRegistry.match(o);\n
if(o!==_ec){\n
return me(_ec);\n
}\n
}\n
catch(e){\n
if(e!=m.NotFound){\n
throw e;\n
}\n
}\n
if(_e8=="undefined"){\n
throw new TypeError("undefined can not be serialized as JSON");\n
}\n
if(_e8=="function"){\n
return null;\n
}\n
res=[];\n
for(var k in o){\n
var _f1;\n
if(typeof (k)=="number"){\n
_f1="\\""+k+"\\"";\n
}else{\n
if(typeof (k)=="string"){\n
_f1=_ea(k);\n
}else{\n
continue;\n
}\n
}\n
val=me(o[k]);\n
if(typeof (val)!="string"){\n
continue;\n
}\n
res.push(_f1+":"+val);\n
}\n
return "{"+res.join(", ")+"}";\n
},objEqual:function(a,b){\n
return (MochiKit.Base.compare(a,b)===0);\n
},arrayEqual:function(_f4,arr){\n
if(_f4.length!=arr.length){\n
return false;\n
}\n
return (MochiKit.Base.compare(_f4,arr)===0);\n
},concat:function(){\n
var _f6=[];\n
var _f7=MochiKit.Base.extend;\n
for(var i=0;i<arguments.length;i++){\n
_f7(_f6,arguments[i]);\n
}\n
return _f6;\n
},keyComparator:function(key){\n
var m=MochiKit.Base;\n
var _fb=m.compare;\n
if(arguments.length==1){\n
return function(a,b){\n
return _fb(a[key],b[key]);\n
};\n
}\n
var _fe=m.extend(null,arguments);\n
return function(a,b){\n
var rval=0;\n
for(var i=0;(rval===0)&&(i<_fe.length);i++){\n
var key=_fe[i];\n
rval=_fb(a[key],b[key]);\n
}\n
return rval;\n
};\n
},reverseKeyComparator:function(key){\n
var _105=MochiKit.Base.keyComparator.apply(this,arguments);\n
return function(a,b){\n
return _105(b,a);\n
};\n
},partial:function(func){\n
var m=MochiKit.Base;\n
return m.bind.apply(this,m.extend([func,undefined],arguments,1));\n
},listMinMax:function(_10a,lst){\n
if(lst.length===0){\n
return null;\n
}\n
var cur=lst[0];\n
var _10d=MochiKit.Base.compare;\n
for(var i=1;i<lst.length;i++){\n
var o=lst[i];\n
if(_10d(o,cur)==_10a){\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,_111,_112,end){\n
if(typeof (end)=="undefined"||end===null){\n
end=lst.length;\n
}\n
if(typeof (_112)=="undefined"||_112===null){\n
_112=0;\n
}\n
for(var i=_112;i<end;i++){\n
if(lst[i]===_111){\n
return i;\n
}\n
}\n
return -1;\n
},mean:function(){\n
var sum=0;\n
var m=MochiKit.Base;\n
var args=m.extend(null,arguments);\n
var _118=args.length;\n
while(args.length){\n
var o=args.shift();\n
if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){\n
_118+=o.length-1;\n
for(var i=o.length-1;i>=0;i--){\n
sum+=o[i];\n
}\n
}else{\n
sum+=o;\n
}\n
}\n
if(_118<=0){\n
throw new TypeError("mean() requires at least one argument");\n
}\n
return sum/_118;\n
},median:function(){\n
var data=MochiKit.Base.flattenArguments(arguments);\n
if(data.length===0){\n
throw new TypeError("median() requires at least one argument");\n
}\n
data.sort(compare);\n
if(data.length%2==0){\n
var _11c=data.length/2;\n
return (data[_11c]+data[_11c-1])/2;\n
}else{\n
return data[(data.length-1)/2];\n
}\n
},findValue:function(lst,_11e,_11f,end){\n
if(typeof (end)=="undefined"||end===null){\n
end=lst.length;\n
}\n
if(typeof (_11f)=="undefined"||_11f===null){\n
_11f=0;\n
}\n
var cmp=MochiKit.Base.compare;\n
for(var i=_11f;i<end;i++){\n
if(cmp(lst[i],_11e)===0){\n
return i;\n
}\n
}\n
return -1;\n
},nodeWalk:function(node,_124){\n
var _125=[node];\n
var _126=MochiKit.Base.extend;\n
while(_125.length){\n
var res=_124(_125.shift());\n
if(res){\n
_126(_125,res);\n
}\n
}\n
},nameFunctions:function(_128){\n
var base=_128.NAME;\n
if(typeof (base)=="undefined"){\n
base="";\n
}else{\n
base=base+".";\n
}\n
for(var name in _128){\n
var o=_128[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(_12c,_12d){\n
if(typeof (MochiKit.DOM)!="undefined"&&arguments.length==1&&(typeof (_12c)=="string"||(typeof (_12c.nodeType)!="undefined"&&_12c.nodeType>0))){\n
var kv=MochiKit.DOM.formContents(_12c);\n
_12c=kv[0];\n
_12d=kv[1];\n
}else{\n
if(arguments.length==1){\n
if(typeof (_12c.length)=="number"&&_12c.length==2){\n
return arguments.callee(_12c[0],_12c[1]);\n
}\n
var o=_12c;\n
_12c=[];\n
_12d=[];\n
for(var k in o){\n
var v=o[k];\n
if(typeof (v)=="function"){\n
continue;\n
}else{\n
if(MochiKit.Base.isArrayLike(v)){\n
for(var i=0;i<v.length;i++){\n
_12c.push(k);\n
_12d.push(v[i]);\n
}\n
}else{\n
_12c.push(k);\n
_12d.push(v);\n
}\n
}\n
}\n
}\n
}\n
var rval=[];\n
var len=Math.min(_12c.length,_12d.length);\n
var _135=MochiKit.Base.urlEncode;\n
for(var i=0;i<len;i++){\n
v=_12d[i];\n
if(typeof (v)!="undefined"&&v!==null){\n
rval.push(_135(_12c[i])+"="+_135(v));\n
}\n
}\n
return rval.join("&");\n
},parseQueryString:function(_136,_137){\n
var qstr=(_136.charAt(0)=="?")?_136.substring(1):_136;\n
var _139=qstr.replace(/\\+/g,"%20").split(/\\&amp\\;|\\&\\#38\\;|\\&#x26;|\\&/);\n
var o={};\n
var _13b;\n
if(typeof (decodeURIComponent)!="undefined"){\n
_13b=decodeURIComponent;\n
}else{\n
_13b=unescape;\n
}\n
if(_137){\n
for(var i=0;i<_139.length;i++){\n
var pair=_139[i].split("=");\n
var name=_13b(pair.shift());\n
if(!name){\n
continue;\n
}\n
var arr=o[name];\n
if(!(arr instanceof Array)){\n
arr=[];\n
o[name]=arr;\n
}\n
arr.push(_13b(pair.join("=")));\n
}\n
}else{\n
for(i=0;i<_139.length;i++){\n
pair=_139[i].split("=");\n
var name=pair.shift();\n
if(!name){\n
continue;\n
}\n
o[_13b(name)]=_13b(pair.join("="));\n
}\n
}\n
return o;\n
}});\n
MochiKit.Base.AdapterRegistry=function(){\n
this.pairs=[];\n
};\n
MochiKit.Base.AdapterRegistry.prototype={register:function(name,_141,wrap,_143){\n
if(_143){\n
this.pairs.unshift([name,_141,wrap]);\n
}else{\n
this.pairs.push([name,_141,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=["flattenArray","noop","camelize","counter","clone","extend","update","updatetree","setdefault","keys","values","items","NamedError","operator","forwardCall","itemgetter","typeMatcher","isCallable","isUndefined","isUndefinedOrNull","isNull","isEmpty","isNotEmpty","isArrayLike","isDateLike","xmap","map","xfilter","filter","methodcaller","compose","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","average","mean","median"];\n
MochiKit.Base.EXPORT_OK=["nameFunctions","comparatorRegistry","reprRegistry","jsonRegistry","compareDateLike","compareArrayLike","reprArrayLike","reprString","reprNumber"];\n
MochiKit.Base._exportSymbols=function(_149,_14a){\n
if(!MochiKit.__export__){\n
return;\n
}\n
var all=_14a.EXPORT_TAGS[":all"];\n
for(var i=0;i<all.length;i++){\n
_149[all[i]]=_14a[all[i]];\n
}\n
};\n
MochiKit.Base.__new__=function(){\n
var m=this;\n
m.noop=m.operator.identity;\n
m.forward=m.forwardCall;\n
m.find=m.findValue;\n
if(typeof (encodeURIComponent)!="undefined"){\n
m.urlEncode=function(_14e){\n
return encodeURIComponent(_14e).replace(/\\\'/g,"%27");\n
};\n
}else{\n
m.urlEncode=function(_14f){\n
return escape(_14f).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.average=m.mean;\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.__export__){\n
compare=MochiKit.Base.compare;\n
compose=MochiKit.Base.compose;\n
serializeJSON=MochiKit.Base.serializeJSON;\n
mean=MochiKit.Base.mean;\n
median=MochiKit.Base.median;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.Base);\n
MochiKit.Base._deps("Iter",["Base"]);\n
MochiKit.Iter.NAME="MochiKit.Iter";\n
MochiKit.Iter.VERSION="1.4";\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,_153,_154,_155){\n
MochiKit.Iter.iteratorRegistry.register(name,_153,_154,_155);\n
},iter:function(_156,_157){\n
var self=MochiKit.Iter;\n
if(arguments.length==2){\n
return self.takewhile(function(a){\n
return a!=_157;\n
},_156);\n
}\n
if(typeof (_156.next)=="function"){\n
return _156;\n
}else{\n
if(typeof (_156.iter)=="function"){\n
return _156.iter();\n
}\n
}\n
try{\n
return self.iteratorRegistry.match(_156);\n
}\n
catch(e){\n
var m=MochiKit.Base;\n
if(e==m.NotFound){\n
e=new TypeError(typeof (_156)+": "+m.repr(_156)+" 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 _161=self.iter(p);\n
return {repr:function(){\n
return "cycle(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
try{\n
var rval=_161.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(_167){\n
return _167.next();\n
},izip:function(p,q){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
var next=self.next;\n
var _16d=m.map(self.iter,arguments);\n
return {repr:function(){\n
return "izip(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
return m.map(next,_16d);\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 _179=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
_179=arguments[1];\n
stop=arguments[2];\n
}else{\n
_179=arguments[1];\n
stop=arguments[2];\n
step=arguments[3];\n
}\n
}\n
return {repr:function(){\n
return "islice("+["...",_179,stop,step].join(", ")+")";\n
},toString:m.forwardCall("repr"),next:function(){\n
var rval;\n
while(i<_179){\n
rval=seq.next();\n
i++;\n
}\n
if(_179>=stop){\n
throw self.StopIteration;\n
}\n
_179+=step;\n
return rval;\n
}};\n
},imap:function(fun,p,q){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
var _183=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,_183));\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 _18e=m.map(self.iter,arguments);\n
return {repr:function(){\n
return "chain(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
while(_18e.length>1){\n
try{\n
var _18f=_18e[0].next();\n
return _18f;\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
_18e.shift();\n
var _18f=_18e[0].next();\n
return _18f;\n
}\n
}\n
if(_18e.length==1){\n
var arg=_18e.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(_19a,sync,_19c){\n
sync.pos[_19a]=-1;\n
var m=MochiKit.Base;\n
var _19e=m.listMin;\n
return {repr:function(){\n
return "tee("+_19a+", ...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
var rval;\n
var i=sync.pos[_19a];\n
if(i==sync.max){\n
rval=_19c.next();\n
sync.deque.push(rval);\n
sync.max+=1;\n
sync.pos[_19a]+=1;\n
}else{\n
rval=sync.deque[i-sync.min];\n
sync.pos[_19a]+=1;\n
if(i==sync.min&&_19e(sync.pos)!=sync.min){\n
sync.min+=1;\n
sync.deque.shift();\n
}\n
}\n
return rval;\n
}};\n
},tee:function(_1a1,n){\n
var rval=[];\n
var sync={"pos":[],"deque":[],"max":-1,"min":-1};\n
if(arguments.length==1||typeof (n)=="undefined"||n===null){\n
n=2;\n
}\n
var self=MochiKit.Iter;\n
_1a1=self.iter(_1a1);\n
var _tee=self._tee;\n
for(var i=0;i<n;i++){\n
rval.push(_tee(i,sync,_1a1));\n
}\n
return rval;\n
},list:function(_1a8){\n
var rval;\n
if(_1a8 instanceof Array){\n
return _1a8.slice();\n
}\n
if(typeof (_1a8)=="function"&&!(_1a8 instanceof Function)&&typeof (_1a8.length)=="number"){\n
rval=[];\n
for(var i=0;i<_1a8.length;i++){\n
rval.push(_1a8[i]);\n
}\n
return rval;\n
}\n
var self=MochiKit.Iter;\n
_1a8=self.iter(_1a8);\n
var rval=[];\n
var _1ac;\n
try{\n
while(true){\n
_1ac=_1a8.next();\n
rval.push(_1ac);\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,_1ae,_1af){\n
var i=0;\n
var x=_1af;\n
var self=MochiKit.Iter;\n
_1ae=self.iter(_1ae);\n
if(arguments.length<3){\n
try{\n
x=_1ae.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,_1ae.next());\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
return x;\n
},range:function(){\n
var _1b3=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
_1b3=arguments[0];\n
stop=arguments[1];\n
}else{\n
if(arguments.length==3){\n
_1b3=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&&_1b3>=stop)||(step<0&&_1b3<=stop)){\n
throw MochiKit.Iter.StopIteration;\n
}\n
var rval=_1b3;\n
_1b3+=step;\n
return rval;\n
},repr:function(){\n
return "range("+[_1b3,stop,step].join(", ")+")";\n
},toString:MochiKit.Base.forwardCall("repr")};\n
},sum:function(_1b7,_1b8){\n
if(typeof (_1b8)=="undefined"||_1b8===null){\n
_1b8=0;\n
}\n
var x=_1b8;\n
var self=MochiKit.Iter;\n
_1b7=self.iter(_1b7);\n
try{\n
while(true){\n
x+=_1b7.next();\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
return x;\n
},exhaust:function(_1bb){\n
var self=MochiKit.Iter;\n
_1bb=self.iter(_1bb);\n
try{\n
while(true){\n
_1bb.next();\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
},forEach:function(_1bd,func,self){\n
var m=MochiKit.Base;\n
if(arguments.length>2){\n
func=m.bind(func,self);\n
}\n
if(m.isArrayLike(_1bd)){\n
try{\n
for(var i=0;i<_1bd.length;i++){\n
func(_1bd[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,_1bd));\n
}\n
},every:function(_1c2,func){\n
var self=MochiKit.Iter;\n
try{\n
self.ifilterfalse(func,_1c2).next();\n
return false;\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
return true;\n
}\n
},sorted:function(_1c5,cmp){\n
var rval=MochiKit.Iter.list(_1c5);\n
if(arguments.length==1){\n
cmp=MochiKit.Base.compare;\n
}\n
rval.sort(cmp);\n
return rval;\n
},reversed:function(_1c8){\n
var rval=MochiKit.Iter.list(_1c8);\n
rval.reverse();\n
return rval;\n
},some:function(_1ca,func){\n
var self=MochiKit.Iter;\n
try{\n
self.ifilter(func,_1ca).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,_1ce){\n
if(MochiKit.Base.isArrayLike(_1ce)){\n
for(var i=0;i<_1ce.length;i++){\n
lst.push(_1ce[i]);\n
}\n
}else{\n
var self=MochiKit.Iter;\n
_1ce=self.iter(_1ce);\n
try{\n
while(true){\n
lst.push(_1ce.next());\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
}\n
return lst;\n
},groupby:function(_1d1,_1d2){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
if(arguments.length<2){\n
_1d2=m.operator.identity;\n
}\n
_1d1=self.iter(_1d1);\n
var pk=undefined;\n
var k=undefined;\n
var v;\n
function fetch(){\n
v=_1d1.next();\n
k=_1d2(v);\n
}\n
function eat(){\n
var ret=v;\n
v=undefined;\n
return ret;\n
}\n
var _1d9=true;\n
var _1da=m.compare;\n
return {repr:function(){\n
return "groupby(...)";\n
},next:function(){\n
while(_1da(k,pk)===0){\n
fetch();\n
if(_1d9){\n
_1d9=false;\n
break;\n
}\n
}\n
pk=k;\n
return [k,{next:function(){\n
if(v==undefined){\n
fetch();\n
}\n
if(_1da(k,pk)!==0){\n
throw self.StopIteration;\n
}\n
return eat();\n
}}];\n
}};\n
},groupby_as_array:function(_1db,_1dc){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
if(arguments.length<2){\n
_1dc=m.operator.identity;\n
}\n
_1db=self.iter(_1db);\n
var _1df=[];\n
var _1e0=true;\n
var _1e1;\n
var _1e2=m.compare;\n
while(true){\n
try{\n
var _1e3=_1db.next();\n
var key=_1dc(_1e3);\n
}\n
catch(e){\n
if(e==self.StopIteration){\n
break;\n
}\n
throw e;\n
}\n
if(_1e0||_1e2(key,_1e1)!==0){\n
var _1e5=[];\n
_1df.push([key,_1e5]);\n
}\n
_1e5.push(_1e3);\n
_1e0=false;\n
_1e1=key;\n
}\n
return _1df;\n
},arrayLikeIter:function(_1e6){\n
var i=0;\n
return {repr:function(){\n
return "arrayLikeIter(...)";\n
},toString:MochiKit.Base.forwardCall("repr"),next:function(){\n
if(i>=_1e6.length){\n
throw MochiKit.Iter.StopIteration;\n
}\n
return _1e6[i++];\n
}};\n
},hasIterateNext:function(_1e8){\n
return (_1e8&&typeof (_1e8.iterateNext)=="function");\n
},iterateNextIter:function(_1e9){\n
return {repr:function(){\n
return "iterateNextIter(...)";\n
},toString:MochiKit.Base.forwardCall("repr"),next:function(){\n
var rval=_1e9.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
if(typeof (StopIteration)!="undefined"){\n
this.StopIteration=StopIteration;\n
}else{\n
this.StopIteration=new m.NamedError("StopIteration");\n
}\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.__export__){\n
reduce=MochiKit.Iter.reduce;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.Iter);\n
MochiKit.Base._deps("Async",["Base"]);\n
MochiKit.Async.NAME="MochiKit.Async";\n
MochiKit.Async.VERSION="1.4";\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(_1ec){\n
this.chain=[];\n
this.id=this._nextId();\n
this.fired=-1;\n
this.paused=0;\n
this.results=[null,null];\n
this.canceller=_1ec;\n
this.silentlyCancelled=false;\n
this.chained=false;\n
};\n
MochiKit.Async.Deferred.prototype={repr:function(){\n
var _1ed;\n
if(this.fired==-1){\n
_1ed="unfired";\n
}else{\n
if(this.fired===0){\n
_1ed="success";\n
}else{\n
_1ed="error";\n
}\n
}\n
return "Deferred("+this.id+", "+_1ed+")";\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
},_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 _1f8=this.chain;\n
var _1f9=this.fired;\n
var res=this.results[_1f9];\n
var self=this;\n
var cb=null;\n
while(_1f8.length>0&&this.paused===0){\n
var pair=_1f8.shift();\n
var f=pair[_1f9];\n
if(f===null){\n
continue;\n
}\n
try{\n
res=f(res);\n
_1f9=((res instanceof Error)?1:0);\n
if(res instanceof MochiKit.Async.Deferred){\n
cb=function(res){\n
self._resback(res);\n
self.paused--;\n
if((self.paused===0)&&(self.fired>=0)){\n
self._fire();\n
}\n
};\n
this.paused++;\n
}\n
}\n
catch(err){\n
_1f9=1;\n
if(!(err instanceof Error)){\n
err=new MochiKit.Async.GenericError(err);\n
}\n
res=err;\n
}\n
}\n
this.fired=_1f9;\n
this.results[_1f9]=res;\n
if(cb&&this.paused){\n
res.addBoth(cb);\n
res.chained=true;\n
}\n
}};\n
MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(req){\n
return MochiKit.Base.evalJSON(req.responseText);\n
},succeed:function(_201){\n
var d=new MochiKit.Async.Deferred();\n
d.callback.apply(d,arguments);\n
return d;\n
},fail:function(_203){\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 _206=[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<_206.length;i++){\n
var func=_206[i];\n
try{\n
self.XMLHttpRequest=func;\n
return func();\n
}\n
catch(e){\n
}\n
}\n
}\n
return self.XMLHttpRequest();\n
},_xhr_onreadystatechange:function(d){\n
var m=MochiKit.Base;\n
if(this.readyState==4){\n
try{\n
this.onreadystatechange=null;\n
}\n
catch(e){\n
try{\n
this.onreadystatechange=m.noop;\n
}\n
catch(e){\n
}\n
}\n
var _20b=null;\n
try{\n
_20b=this.status;\n
if(!_20b&&m.isNotEmpty(this.responseText)){\n
_20b=304;\n
}\n
}\n
catch(e){\n
}\n
if(_20b==200||_20b==201||_20b==204||_20b==304||_20b==1223){\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.Base.noop;\n
}\n
catch(e){\n
}\n
}\n
req.abort();\n
},sendXMLHttpRequest:function(req,_20f){\n
if(typeof (_20f)=="undefined"||_20f===null){\n
_20f="";\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(_20f);\n
}\n
catch(e){\n
try{\n
req.onreadystatechange=null;\n
}\n
catch(ignore){\n
}\n
d.errback(e);\n
}\n
return d;\n
},doXHR:function(url,opts){\n
var self=MochiKit.Async;\n
return self.callLater(0,self._doXHR,url,opts);\n
},_doXHR:function(url,opts){\n
var m=MochiKit.Base;\n
opts=m.update({method:"GET",sendContent:""},opts);\n
var self=MochiKit.Async;\n
var req=self.getXMLHttpRequest();\n
if(opts.queryString){\n
var qs=m.queryString(opts.queryString);\n
if(qs){\n
url+="?"+qs;\n
}\n
}\n
if("username" in opts){\n
req.open(opts.method,url,true,opts.username,opts.password);\n
}else{\n
req.open(opts.method,url,true);\n
}\n
if(req.overrideMimeType&&opts.mimeType){\n
req.overrideMimeType(opts.mimeType);\n
}\n
req.setRequestHeader("X-Requested-With","XMLHttpRequest");\n
if(opts.headers){\n
var _21c=opts.headers;\n
if(!m.isArrayLike(_21c)){\n
_21c=m.items(_21c);\n
}\n
for(var i=0;i<_21c.length;i++){\n
var _21e=_21c[i];\n
var name=_21e[0];\n
var _220=_21e[1];\n
req.setRequestHeader(name,_220);\n
}\n
}\n
return self.sendXMLHttpRequest(req,opts.sendContent);\n
},_buildURL:function(url){\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
return url+"?"+qs;\n
}\n
}\n
return url;\n
},doSimpleXMLHttpRequest:function(url){\n
var self=MochiKit.Async;\n
url=self._buildURL.apply(self,arguments);\n
return self.doXHR(url);\n
},loadJSONDoc:function(url){\n
var self=MochiKit.Async;\n
url=self._buildURL.apply(self,arguments);\n
var d=self.doXHR(url,{"mimeType":"text/plain","headers":[["Accept","application/json"]]});\n
d=d.addCallback(self.evalJSONRequest);\n
return d;\n
},wait:function(_229,_22a){\n
var d=new MochiKit.Async.Deferred();\n
var m=MochiKit.Base;\n
if(typeof (_22a)!="undefined"){\n
d.addCallback(function(){\n
return _22a;\n
});\n
}\n
var _22d=setTimeout(m.bind("callback",d),Math.floor(_229*1000));\n
d.canceller=function(){\n
try{\n
clearTimeout(_22d);\n
}\n
catch(e){\n
}\n
};\n
return d;\n
},callLater:function(_22e,func){\n
var m=MochiKit.Base;\n
var _231=m.partial.apply(m,m.extend(null,arguments,1));\n
return MochiKit.Async.wait(_22e).addCallback(function(res){\n
return _231();\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
var 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 _234;\n
if(this.locked){\n
_234="locked, "+this.waiting.length+" waiting";\n
}else{\n
_234="unlocked";\n
}\n
return "DeferredLock("+this.id+", "+_234+")";\n
},toString:MochiKit.Base.forwardCall("repr")};\n
MochiKit.Async.DeferredList=function(list,_236,_237,_238,_239){\n
MochiKit.Async.Deferred.apply(this,[_239]);\n
this.list=list;\n
var _23a=[];\n
this.resultList=_23a;\n
this.finishedCount=0;\n
this.fireOnOneCallback=_236;\n
this.fireOnOneErrback=_237;\n
this.consumeErrors=_238;\n
var cb=MochiKit.Base.bind(this._cbDeferred,this);\n
for(var i=0;i<list.length;i++){\n
var d=list[i];\n
_23a.push(undefined);\n
d.addCallback(cb,i,true);\n
d.addErrback(cb,i,false);\n
}\n
if(list.length===0&&!_236){\n
this.callback(this.resultList);\n
}\n
};\n
MochiKit.Async.DeferredList.prototype=new MochiKit.Async.Deferred();\n
MochiKit.Async.DeferredList.prototype._cbDeferred=function(_23e,_23f,_240){\n
this.resultList[_23e]=[_23f,_240];\n
this.finishedCount+=1;\n
if(this.fired==-1){\n
if(_23f&&this.fireOnOneCallback){\n
this.callback([_23e,_240]);\n
}else{\n
if(!_23f&&this.fireOnOneErrback){\n
this.errback(_240);\n
}else{\n
if(this.finishedCount==this.list.length){\n
this.callback(this.resultList);\n
}\n
}\n
}\n
}\n
if(!_23f&&this.consumeErrors){\n
_240=null;\n
}\n
return _240;\n
};\n
MochiKit.Async.gatherResults=function(_241){\n
var d=new MochiKit.Async.DeferredList(_241,false,true,false);\n
d.addCallback(function(_243){\n
var ret=[];\n
for(var i=0;i<_243.length;i++){\n
ret.push(_243[i][1]);\n
}\n
return ret;\n
});\n
return d;\n
};\n
MochiKit.Async.maybeDeferred=function(func){\n
var self=MochiKit.Async;\n
var _248;\n
try{\n
var r=func.apply(null,MochiKit.Base.extend([],arguments,1));\n
if(r instanceof self.Deferred){\n
_248=r;\n
}else{\n
if(r instanceof Error){\n
_248=self.fail(r);\n
}else{\n
_248=self.succeed(r);\n
}\n
}\n
}\n
catch(e){\n
_248=self.fail(e);\n
}\n
return _248;\n
};\n
MochiKit.Async.EXPORT=["AlreadyCalledError","CancelledError","BrowserComplianceError","GenericError","XMLHttpRequestError","Deferred","succeed","fail","getXMLHttpRequest","doSimpleXMLHttpRequest","loadJSONDoc","wait","callLater","sendXMLHttpRequest","DeferredLock","DeferredList","gatherResults","maybeDeferred","doXHR"];\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(_24c){\n
this.deferred=_24c;\n
});\n
ne("CancelledError",function(_24d){\n
this.deferred=_24d;\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
MochiKit.Base._deps("DOM",["Base"]);\n
MochiKit.DOM.NAME="MochiKit.DOM";\n
MochiKit.DOM.VERSION="1.4";\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=["removeEmptyTextNodes","formContents","currentWindow","currentDocument","withWindow","withDocument","registerDOMConverter","coerceToDOM","createDOM","createDOMFunc","isChildNode","getNodeAttribute","removeNodeAttribute","setNodeAttribute","updateNodeAttributes","appendChildNodes","insertSiblingNodesAfter","insertSiblingNodesBefore","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","DL","DT","DD","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","getElement","$","getElementsByTagAndClassName","addToCallStack","addLoadEvent","focusOnLoad","setElementClass","toggleElementClass","addElementClass","removeElementClass","swapElementClass","hasElementClass","escapeHTML","toHTML","emitHTML","scrapeText","isParent","getFirstParentByTagAndClassName","makeClipping","undoClipping","makePositioned","undoPositioned","getFirstElementByTagAndClassName"];\n
MochiKit.DOM.EXPORT_OK=["domConverters"];\n
MochiKit.DOM.DEPRECATED=[["computedStyle","MochiKit.Style.getStyle","1.4"],["elementDimensions","MochiKit.Style.getElementDimensions","1.4"],["elementPosition","MochiKit.Style.getElementPosition","1.4"],["hideElement","MochiKit.Style.hideElement","1.4"],["setElementDimensions","MochiKit.Style.setElementDimensions","1.4"],["setElementPosition","MochiKit.Style.setElementPosition","1.4"],["setDisplayForElement","MochiKit.Style.setDisplayForElement","1.4"],["setOpacity","MochiKit.Style.setOpacity","1.4"],["showElement","MochiKit.Style.showElement","1.4"],["Coordinates","MochiKit.Style.Coordinates","1.4"],["Dimensions","MochiKit.Style.Dimensions","1.4"]];\n
MochiKit.DOM.getViewportDimensions=new Function(""+"if (!MochiKit[\\"Style\\"]) {"+"    throw new Error(\\"This function has been deprecated and depends on MochiKit.Style.\\");"+"}"+"return MochiKit.Style.getViewportDimensions.apply(this, arguments);");\n
MochiKit.Base.update(MochiKit.DOM,{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 _255=self._document;\n
var _256=self._window;\n
var rval;\n
try{\n
self._window=win;\n
self._document=win.document;\n
rval=func();\n
}\n
catch(e){\n
self._window=_256;\n
self._document=_255;\n
throw e;\n
}\n
self._window=_256;\n
self._document=_255;\n
return rval;\n
},formContents:function(elem){\n
var _259=[];\n
var _25a=[];\n
var m=MochiKit.Base;\n
var self=MochiKit.DOM;\n
if(typeof (elem)=="undefined"||elem===null){\n
elem=self._document.body;\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 _25f=elem.tagName.toUpperCase();\n
if(_25f==="INPUT"&&(elem.type=="radio"||elem.type=="checkbox")&&!elem.checked){\n
return null;\n
}\n
if(_25f==="SELECT"){\n
if(elem.type=="select-one"){\n
if(elem.selectedIndex>=0){\n
var opt=elem.options[elem.selectedIndex];\n
var v=opt.value;\n
if(!v){\n
var h=opt.outerHTML;\n
if(h&&!h.match(/^[^>]+\\svalue\\s*=/i)){\n
v=opt.text;\n
}\n
}\n
_259.push(name);\n
_25a.push(v);\n
return null;\n
}\n
_259.push(name);\n
_25a.push("");\n
return null;\n
}else{\n
var opts=elem.options;\n
if(!opts.length){\n
_259.push(name);\n
_25a.push("");\n
return null;\n
}\n
for(var i=0;i<opts.length;i++){\n
var opt=opts[i];\n
if(!opt.selected){\n
continue;\n
}\n
var v=opt.value;\n
if(!v){\n
var h=opt.outerHTML;\n
if(h&&!h.match(/^[^>]+\\svalue\\s*=/i)){\n
v=opt.text;\n
}\n
}\n
_259.push(name);\n
_25a.push(v);\n
}\n
return null;\n
}\n
}\n
if(_25f==="FORM"||_25f==="P"||_25f==="SPAN"||_25f==="DIV"){\n
return elem.childNodes;\n
}\n
_259.push(name);\n
_25a.push(elem.value||"");\n
return null;\n
}\n
return elem.childNodes;\n
});\n
return [_259,_25a];\n
},withDocument:function(doc,func){\n
var self=MochiKit.DOM;\n
var _268=self._document;\n
var rval;\n
try{\n
self._document=doc;\n
rval=func();\n
}\n
catch(e){\n
self._document=_268;\n
throw e;\n
}\n
self._document=_268;\n
return rval;\n
},registerDOMConverter:function(name,_26b,wrap,_26d){\n
MochiKit.DOM.domConverters.register(name,_26b,wrap,_26d);\n
},coerceToDOM:function(node,ctx){\n
var m=MochiKit.Base;\n
var im=MochiKit.Iter;\n
var self=MochiKit.DOM;\n
if(im){\n
var iter=im.iter;\n
var _274=im.repeat;\n
var map=m.map;\n
}\n
var _276=self.domConverters;\n
var _277=arguments.callee;\n
var _278=m.NotFound;\n
while(true){\n
if(typeof (node)=="undefined"||node===null){\n
return null;\n
}\n
if(typeof (node)=="function"&&typeof (node.length)=="number"&&!(node instanceof Function)){\n
node=im.list(node);\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.__dom__)=="function"){\n
node=node.__dom__(ctx);\n
continue;\n
}\n
if(typeof (node.dom)=="function"){\n
node=node.dom(ctx);\n
continue;\n
}\n
if(typeof (node)=="function"){\n
node=node.apply(ctx,[ctx]);\n
continue;\n
}\n
if(im){\n
var _279=null;\n
try{\n
_279=iter(node);\n
}\n
catch(e){\n
}\n
if(_279){\n
return map(_277,_279,_274(ctx));\n
}\n
}\n
try{\n
node=_276.match(node,ctx);\n
continue;\n
}\n
catch(e){\n
if(e!=_278){\n
throw e;\n
}\n
}\n
return self._document.createTextNode(node.toString());\n
}\n
return undefined;\n
},isChildNode:function(node,_27b){\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
node=self.getElement(node);\n
}\n
if(typeof (_27b)=="string"){\n
_27b=self.getElement(_27b);\n
}\n
if(typeof (node)=="undefined"||node===null){\n
return false;\n
}\n
while(node!==self._document){\n
if(node===_27b){\n
return true;\n
}\n
node=node.parentNode;\n
}\n
return false;\n
},setNodeAttribute:function(node,attr,_27f){\n
var o={};\n
o[attr]=_27f;\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 _284=self.attributeArray.renames[attr];\n
node=self.getElement(node);\n
try{\n
if(_284){\n
return node[_284];\n
}\n
return node.getAttribute(attr);\n
}\n
catch(e){\n
}\n
return null;\n
},removeNodeAttribute:function(node,attr){\n
var self=MochiKit.DOM;\n
var _288=self.attributeArray.renames[attr];\n
node=self.getElement(node);\n
try{\n
if(_288){\n
return node[_288];\n
}\n
return node.removeAttribute(attr);\n
}\n
catch(e){\n
}\n
return null;\n
},updateNodeAttributes:function(node,_28a){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
}\n
if(_28a){\n
var _28d=MochiKit.Base.updatetree;\n
if(self.attributeArray.compliant){\n
for(var k in _28a){\n
var v=_28a[k];\n
if(typeof (v)=="object"&&typeof (elem[k])=="object"){\n
if(k=="style"&&MochiKit.Style){\n
MochiKit.Style.setStyle(elem,v);\n
}else{\n
_28d(elem[k],v);\n
}\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 _290=self.attributeArray.renames;\n
for(var k in _28a){\n
v=_28a[k];\n
var _291=_290[k];\n
if(k=="style"&&typeof (v)=="string"){\n
elem.style.cssText=v;\n
}else{\n
if(typeof (_291)=="string"){\n
elem[_291]=v;\n
}else{\n
if(typeof (elem[k])=="object"&&typeof (v)=="object"){\n
if(k=="style"&&MochiKit.Style){\n
MochiKit.Style.setStyle(elem,v);\n
}else{\n
_28d(elem[k],v);\n
}\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 _295=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];\n
var _296=MochiKit.Base.concat;\n
while(_295.length){\n
var n=_295.shift();\n
if(typeof (n)=="undefined"||n===null){\n
}else{\n
if(typeof (n.nodeType)=="number"){\n
elem.appendChild(n);\n
}else{\n
_295=_296(n,_295);\n
}\n
}\n
}\n
return elem;\n
},insertSiblingNodesBefore:function(node){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
}\n
var _29b=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];\n
var _29c=elem.parentNode;\n
var _29d=MochiKit.Base.concat;\n
while(_29b.length){\n
var n=_29b.shift();\n
if(typeof (n)=="undefined"||n===null){\n
}else{\n
if(typeof (n.nodeType)=="number"){\n
_29c.insertBefore(n,elem);\n
}else{\n
_29b=_29d(n,_29b);\n
}\n
}\n
}\n
return _29c;\n
},insertSiblingNodesAfter:function(node){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
}\n
var _2a2=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];\n
if(elem.nextSibling){\n
return self.insertSiblingNodesBefore(elem.nextSibling,_2a2);\n
}else{\n
return self.appendChildNodes(elem.parentNode,_2a2);\n
}\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 _2a6;\n
while((_2a6=elem.firstChild)){\n
elem.removeChild(_2a6);\n
}\n
if(arguments.length<2){\n
return elem;\n
}else{\n
return self.appendChildNodes.apply(this,arguments);\n
}\n
},createDOM:function(name,_2a8){\n
var elem;\n
var self=MochiKit.DOM;\n
var m=MochiKit.Base;\n
if(typeof (_2a8)=="string"||typeof (_2a8)=="number"){\n
var args=m.extend([name,null],arguments,1);\n
return arguments.callee.apply(this,args);\n
}\n
if(typeof (name)=="string"){\n
var _2ad=self._xhtml;\n
if(_2a8&&!self.attributeArray.compliant){\n
var _2ae="";\n
if("name" in _2a8){\n
_2ae+=" name=\\""+self.escapeHTML(_2a8.name)+"\\"";\n
}\n
if(name=="input"&&"type" in _2a8){\n
_2ae+=" type=\\""+self.escapeHTML(_2a8.type)+"\\"";\n
}\n
if(_2ae){\n
name="<"+name+_2ae+">";\n
_2ad=false;\n
}\n
}\n
var d=self._document;\n
if(_2ad&&d===document){\n
elem=d.createElementNS("http://www.w3.org/1999/xhtml",name);\n
}else{\n
elem=d.createElement(name);\n
}\n
}else{\n
elem=name;\n
}\n
if(_2a8){\n
self.updateNodeAttributes(elem,_2a8);\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
},removeElement:function(elem){\n
var e=MochiKit.DOM.getElement(elem);\n
e.parentNode.removeChild(e);\n
return e;\n
},swapDOM:function(dest,src){\n
var self=MochiKit.DOM;\n
dest=self.getElement(dest);\n
var _2b6=dest.parentNode;\n
if(src){\n
src=self.getElement(src);\n
_2b6.replaceChild(src,dest);\n
}else{\n
_2b6.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
},getElementsByTagAndClassName:function(_2b9,_2ba,_2bb){\n
var self=MochiKit.DOM;\n
if(typeof (_2b9)=="undefined"||_2b9===null){\n
_2b9="*";\n
}\n
if(typeof (_2bb)=="undefined"||_2bb===null){\n
_2bb=self._document;\n
}\n
_2bb=self.getElement(_2bb);\n
var _2bd=(_2bb.getElementsByTagName(_2b9)||self._document.all);\n
if(typeof (_2ba)=="undefined"||_2ba===null){\n
return MochiKit.Base.extend(null,_2bd);\n
}\n
var _2be=[];\n
for(var i=0;i<_2bd.length;i++){\n
var _2c0=_2bd[i];\n
var cls=_2c0.className;\n
if(!cls){\n
continue;\n
}\n
var _2c2=cls.split(" ");\n
for(var j=0;j<_2c2.length;j++){\n
if(_2c2[j]==_2ba){\n
_2be.push(_2c0);\n
break;\n
}\n
}\n
}\n
return _2be;\n
},_newCallStack:function(path,once){\n
var rval=function(){\n
var _2c7=arguments.callee.callStack;\n
for(var i=0;i<_2c7.length;i++){\n
if(_2c7[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(_2c9,path,func,once){\n
var self=MochiKit.DOM;\n
var _2ce=_2c9[path];\n
var _2cf=_2ce;\n
if(!(typeof (_2ce)=="function"&&typeof (_2ce.callStack)=="object"&&_2ce.callStack!==null)){\n
_2cf=self._newCallStack(path,once);\n
if(typeof (_2ce)=="function"){\n
_2cf.callStack.push(_2ce);\n
}\n
_2c9[path]=_2cf;\n
}\n
_2cf.callStack.push(func);\n
},addLoadEvent:function(func){\n
var self=MochiKit.DOM;\n
self.addToCallStack(self._window,"onload",func,true);\n
},focusOnLoad:function(_2d2){\n
var self=MochiKit.DOM;\n
self.addLoadEvent(function(){\n
_2d2=self.getElement(_2d2);\n
if(_2d2){\n
_2d2.focus();\n
}\n
});\n
},setElementClass:function(_2d4,_2d5){\n
var self=MochiKit.DOM;\n
var obj=self.getElement(_2d4);\n
if(self.attributeArray.compliant){\n
obj.setAttribute("class",_2d5);\n
}else{\n
obj.setAttribute("className",_2d5);\n
}\n
},toggleElementClass:function(_2d8){\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,_2d8)){\n
self.removeElementClass(obj,_2d8);\n
}\n
}\n
},addElementClass:function(_2dc,_2dd){\n
var self=MochiKit.DOM;\n
var obj=self.getElement(_2dc);\n
var cls=obj.className;\n
if(cls==undefined||cls.length===0){\n
self.setElementClass(obj,_2dd);\n
return true;\n
}\n
if(cls==_2dd){\n
return false;\n
}\n
var _2e1=cls.split(" ");\n
for(var i=0;i<_2e1.length;i++){\n
if(_2e1[i]==_2dd){\n
return false;\n
}\n
}\n
self.setElementClass(obj,cls+" "+_2dd);\n
return true;\n
},removeElementClass:function(_2e3,_2e4){\n
var self=MochiKit.DOM;\n
var obj=self.getElement(_2e3);\n
var cls=obj.className;\n
if(cls==undefined||cls.length===0){\n
return false;\n
}\n
if(cls==_2e4){\n
self.setElementClass(obj,"");\n
return true;\n
}\n
var _2e8=cls.split(" ");\n
for(var i=0;i<_2e8.length;i++){\n
if(_2e8[i]==_2e4){\n
_2e8.splice(i,1);\n
self.setElementClass(obj,_2e8.join(" "));\n
return true;\n
}\n
}\n
return false;\n
},swapElementClass:function(_2ea,_2eb,_2ec){\n
var obj=MochiKit.DOM.getElement(_2ea);\n
var res=MochiKit.DOM.removeElementClass(obj,_2eb);\n
if(res){\n
MochiKit.DOM.addElementClass(obj,_2ec);\n
}\n
return res;\n
},hasElementClass:function(_2ef,_2f0){\n
var obj=MochiKit.DOM.getElement(_2ef);\n
var cls=obj.className;\n
if(!cls){\n
return false;\n
}\n
var _2f3=cls.split(" ");\n
for(var i=1;i<arguments.length;i++){\n
var good=false;\n
for(var j=0;j<_2f3.length;j++){\n
if(_2f3[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 _2fb=[dom];\n
var self=MochiKit.DOM;\n
var _2fd=self.escapeHTML;\n
var _2fe=self.attributeArray;\n
while(_2fb.length){\n
dom=_2fb.pop();\n
if(typeof (dom)=="string"){\n
lst.push(dom);\n
}else{\n
if(dom.nodeType==1){\n
lst.push("<"+dom.tagName.toLowerCase());\n
var _2ff=[];\n
var _300=_2fe(dom);\n
for(var i=0;i<_300.length;i++){\n
var a=_300[i];\n
_2ff.push([" ",a.name,"=\\"",_2fd(a.value),"\\""]);\n
}\n
_2ff.sort();\n
for(i=0;i<_2ff.length;i++){\n
var _303=_2ff[i];\n
for(var j=0;j<_303.length;j++){\n
lst.push(_303[j]);\n
}\n
}\n
if(dom.hasChildNodes()){\n
lst.push(">");\n
_2fb.push("</"+dom.tagName.toLowerCase()+">");\n
var _305=dom.childNodes;\n
for(i=_305.length-1;i>=0;i--){\n
_2fb.push(_305[i]);\n
}\n
}else{\n
lst.push("/>");\n
}\n
}else{\n
if(dom.nodeType==3){\n
lst.push(_2fd(dom.nodeValue));\n
}\n
}\n
}\n
}\n
return lst;\n
},scrapeText:function(node,_307){\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 _30c=node.nodeValue;\n
if(typeof (_30c)=="string"){\n
rval.push(_30c);\n
}\n
})(MochiKit.DOM.getElement(node));\n
if(_307){\n
return rval;\n
}else{\n
return rval.join("");\n
}\n
},removeEmptyTextNodes:function(_30d){\n
_30d=MochiKit.DOM.getElement(_30d);\n
for(var i=0;i<_30d.childNodes.length;i++){\n
var node=_30d.childNodes[i];\n
if(node.nodeType==3&&!/\\S/.test(node.nodeValue)){\n
node.parentNode.removeChild(node);\n
}\n
}\n
},makeClipping:function(_310){\n
_310=MochiKit.DOM.getElement(_310);\n
var _311=_310.style.overflow;\n
if((MochiKit.Style.getStyle(_310,"overflow")||"visible")!="hidden"){\n
_310.style.overflow="hidden";\n
}\n
return _311;\n
},undoClipping:function(_312,_313){\n
_312=MochiKit.DOM.getElement(_312);\n
if(!_313){\n
return;\n
}\n
_312.style.overflow=_313;\n
},makePositioned:function(_314){\n
_314=MochiKit.DOM.getElement(_314);\n
var pos=MochiKit.Style.getStyle(_314,"position");\n
if(pos=="static"||!pos){\n
_314.style.position="relative";\n
if(/Opera/.test(navigator.userAgent)){\n
_314.style.top=0;\n
_314.style.left=0;\n
}\n
}\n
},undoPositioned:function(_316){\n
_316=MochiKit.DOM.getElement(_316);\n
if(_316.style.position=="relative"){\n
_316.style.position=_316.style.top=_316.style.left=_316.style.bottom=_316.style.right="";\n
}\n
},getFirstElementByTagAndClassName:function(_317,_318,_319){\n
var self=MochiKit.DOM;\n
if(typeof (_317)=="undefined"||_317===null){\n
_317="*";\n
}\n
if(typeof (_319)=="undefined"||_319===null){\n
_319=self._document;\n
}\n
_319=self.getElement(_319);\n
var _31b=(_319.getElementsByTagName(_317)||self._document.all);\n
if(typeof (_318)=="undefined"||_318===null){\n
return _31b[0];\n
}\n
for(var i=0;i<_31b.length;i++){\n
var _31d=_31b[i];\n
var _31e=_31d.className.split(" ");\n
for(var j=0;j<_31e.length;j++){\n
if(_31e[j]==_318){\n
return _31d;\n
}\n
}\n
}\n
},getFirstParentByTagAndClassName:function(elem,_321,_322){\n
var self=MochiKit.DOM;\n
elem=self.getElement(elem);\n
if(typeof (_321)=="undefined"||_321===null){\n
_321="*";\n
}else{\n
_321=_321.toUpperCase();\n
}\n
if(typeof (_322)=="undefined"||_322===null){\n
_322=null;\n
}\n
var _324="";\n
var _325="";\n
while(elem&&elem.tagName){\n
elem=elem.parentNode;\n
if(_321=="*"&&_322===null){\n
return elem;\n
}\n
_324=elem.className.split(" ");\n
_325=elem.tagName.toUpperCase();\n
if(_322===null&&_321==_325){\n
return elem;\n
}else{\n
if(_322!==null){\n
for(var i=0;i<_324.length;i++){\n
if(_321=="*"&&_324[i]==_322){\n
return elem;\n
}else{\n
if(_321==_325&&_324[i]==_322){\n
return elem;\n
}\n
}\n
}\n
}\n
}\n
}\n
return elem;\n
},isParent:function(_327,_328){\n
if(!_327.parentNode||_327==_328){\n
return false;\n
}\n
if(_327.parentNode==_328){\n
return true;\n
}\n
return MochiKit.DOM.isParent(_327.parentNode,_328);\n
},__new__:function(win){\n
var m=MochiKit.Base;\n
if(typeof (document)!="undefined"){\n
this._document=document;\n
var _32b="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";\n
this._xhtml=(document.documentElement&&document.createElementNS&&document.documentElement.namespaceURI===_32b);\n
}else{\n
if(MochiKit.MockDOM){\n
this._document=MochiKit.MockDOM.document;\n
}\n
}\n
this._window=win;\n
this.domConverters=new m.AdapterRegistry();\n
var _32c=this._document.createElement("span");\n
var _32d;\n
if(_32c&&_32c.attributes&&_32c.attributes.length>0){\n
var _32e=m.filter;\n
_32d=function(node){\n
return _32e(_32d.ignoreAttrFilter,node.attributes);\n
};\n
_32d.ignoreAttr={};\n
var _330=_32c.attributes;\n
var _331=_32d.ignoreAttr;\n
for(var i=0;i<_330.length;i++){\n
var a=_330[i];\n
_331[a.name]=a.value;\n
}\n
_32d.ignoreAttrFilter=function(a){\n
return (_32d.ignoreAttr[a.name]!=a.value);\n
};\n
_32d.compliant=false;\n
_32d.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"};\n
}else{\n
_32d=function(node){\n
return node.attributes;\n
};\n
_32d.compliant=true;\n
_32d.renames={};\n
}\n
this.attributeArray=_32d;\n
var _336=function(_337,arr){\n
var _339=arr[1].split(".");\n
var str="";\n
var obj={};\n
str+="if (!MochiKit."+_339[1]+") { throw new Error(\\"";\n
str+="This function has been deprecated and depends on MochiKit.";\n
str+=_339[1]+".\\");}";\n
str+="return MochiKit."+_339[1]+"."+arr[0];\n
str+=".apply(this, arguments);";\n
obj[_339[2]]=new Function(str);\n
MochiKit.Base.update(MochiKit[_337],obj);\n
};\n
for(var i;i<MochiKit.DOM.DEPRECATED.length;i++){\n
_336("DOM",MochiKit.DOM.DEPRECATED[i]);\n
}\n
var _33c=this.createDOMFunc;\n
this.UL=_33c("ul");\n
this.OL=_33c("ol");\n
this.LI=_33c("li");\n
this.DL=_33c("dl");\n
this.DT=_33c("dt");\n
this.DD=_33c("dd");\n
this.TD=_33c("td");\n
this.TR=_33c("tr");\n
this.TBODY=_33c("tbody");\n
this.THEAD=_33c("thead");\n
this.TFOOT=_33c("tfoot");\n
this.TABLE=_33c("table");\n
this.TH=_33c("th");\n
this.INPUT=_33c("input");\n
this.SPAN=_33c("span");\n
this.A=_33c("a");\n
this.DIV=_33c("div");\n
this.IMG=_33c("img");\n
this.BUTTON=_33c("button");\n
this.TT=_33c("tt");\n
this.PRE=_33c("pre");\n
this.H1=_33c("h1");\n
this.H2=_33c("h2");\n
this.H3=_33c("h3");\n
this.BR=_33c("br");\n
this.HR=_33c("hr");\n
this.LABEL=_33c("label");\n
this.TEXTAREA=_33c("textarea");\n
this.FORM=_33c("form");\n
this.P=_33c("p");\n
this.SELECT=_33c("select");\n
this.OPTION=_33c("option");\n
this.OPTGROUP=_33c("optgroup");\n
this.LEGEND=_33c("legend");\n
this.FIELDSET=_33c("fieldset");\n
this.STRONG=_33c("strong");\n
this.CANVAS=_33c("canvas");\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.__export__){\n
withWindow=MochiKit.DOM.withWindow;\n
withDocument=MochiKit.DOM.withDocument;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.DOM);\n
MochiKit.Base._deps("Style",["Base","DOM"]);\n
MochiKit.Style.NAME="MochiKit.Style";\n
MochiKit.Style.VERSION="1.4";\n
MochiKit.Style.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Style.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Style.EXPORT_OK=[];\n
MochiKit.Style.EXPORT=["setStyle","setOpacity","getStyle","getElementDimensions","elementDimensions","setElementDimensions","getElementPosition","elementPosition","setElementPosition","setDisplayForElement","hideElement","showElement","getViewportDimensions","getViewportPosition","Dimensions","Coordinates"];\n
MochiKit.Style.Dimensions=function(w,h){\n
this.w=w;\n
this.h=h;\n
};\n
MochiKit.Style.Dimensions.prototype.__repr__=function(){\n
var repr=MochiKit.Base.repr;\n
return "{w: "+repr(this.w)+", h: "+repr(this.h)+"}";\n
};\n
MochiKit.Style.Dimensions.prototype.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Style.Coordinates=function(x,y){\n
this.x=x;\n
this.y=y;\n
};\n
MochiKit.Style.Coordinates.prototype.__repr__=function(){\n
var repr=MochiKit.Base.repr;\n
return "{x: "+repr(this.x)+", y: "+repr(this.y)+"}";\n
};\n
MochiKit.Style.Coordinates.prototype.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Base.update(MochiKit.Style,{getStyle:function(elem,_344){\n
var dom=MochiKit.DOM;\n
var d=dom._document;\n
elem=dom.getElement(elem);\n
_344=MochiKit.Base.camelize(_344);\n
if(!elem||elem==d){\n
return undefined;\n
}\n
if(_344=="opacity"&&elem.filters){\n
var _347=(MochiKit.Style.getStyle(elem,"filter")||"").match(/alpha\\(opacity=(.*)\\)/);\n
if(_347&&_347[1]){\n
return parseFloat(_347[1])/100;\n
}\n
return 1;\n
}\n
var _348=elem.style?elem.style[_344]:null;\n
if(!_348){\n
if(d.defaultView&&d.defaultView.getComputedStyle){\n
var css=d.defaultView.getComputedStyle(elem,null);\n
_344=_344.replace(/([A-Z])/g,"-$1").toLowerCase();\n
_348=css?css.getPropertyValue(_344):null;\n
}else{\n
if(elem.currentStyle){\n
_348=elem.currentStyle[_344];\n
}\n
}\n
}\n
if(_344=="opacity"){\n
_348=parseFloat(_348);\n
}\n
if(/Opera/.test(navigator.userAgent)&&(MochiKit.Base.find(["left","top","right","bottom"],_344)!=-1)){\n
if(MochiKit.Style.getStyle(elem,"position")=="static"){\n
_348="auto";\n
}\n
}\n
return _348=="auto"?null:_348;\n
},setStyle:function(elem,_34b){\n
elem=MochiKit.DOM.getElement(elem);\n
for(var name in _34b){\n
if(name=="opacity"){\n
MochiKit.Style.setOpacity(elem,_34b[name]);\n
}else{\n
elem.style[MochiKit.Base.camelize(name)]=_34b[name];\n
}\n
}\n
},setOpacity:function(elem,o){\n
elem=MochiKit.DOM.getElement(elem);\n
var self=MochiKit.Style;\n
if(o==1){\n
var _350=/Gecko/.test(navigator.userAgent)&&!(/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent));\n
elem.style["opacity"]=_350?0.999999:1;\n
if(/MSIE/.test(navigator.userAgent)){\n
elem.style["filter"]=self.getStyle(elem,"filter").replace(/alpha\\([^\\)]*\\)/gi,"");\n
}\n
}else{\n
if(o<0.00001){\n
o=0;\n
}\n
elem.style["opacity"]=o;\n
if(/MSIE/.test(navigator.userAgent)){\n
elem.style["filter"]=self.getStyle(elem,"filter").replace(/alpha\\([^\\)]*\\)/gi,"")+"alpha(opacity="+o*100+")";\n
}\n
}\n
},getElementPosition:function(elem,_352){\n
var self=MochiKit.Style;\n
var dom=MochiKit.DOM;\n
elem=dom.getElement(elem);\n
if(!elem||(!(elem.x&&elem.y)&&(!elem.parentNode===null||self.getStyle(elem,"display")=="none"))){\n
return undefined;\n
}\n
var c=new self.Coordinates(0,0);\n
var box=null;\n
var _357=null;\n
var d=MochiKit.DOM._document;\n
var de=d.documentElement;\n
var b=d.body;\n
if(!elem.parentNode&&elem.x&&elem.y){\n
c.x+=elem.x||0;\n
c.y+=elem.y||0;\n
}else{\n
if(elem.getBoundingClientRect){\n
box=elem.getBoundingClientRect();\n
c.x+=box.left+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||0);\n
c.y+=box.top+(de.scrollTop||b.scrollTop)-(de.clientTop||0);\n
return c;\n
}else{\n
if(elem.offsetParent){\n
c.x+=elem.offsetLeft;\n
c.y+=elem.offsetTop;\n
_357=elem.offsetParent;\n
if(_357!=elem){\n
while(_357){\n
c.x+=_357.offsetLeft;\n
c.y+=_357.offsetTop;\n
_357=_357.offsetParent;\n
}\n
}\n
var ua=navigator.userAgent.toLowerCase();\n
if((typeof (opera)!="undefined"&&parseFloat(opera.version())<9)||(ua.indexOf("AppleWebKit")!=-1&&self.getStyle(elem,"position")=="absolute")){\n
c.x-=b.offsetLeft;\n
c.y-=b.offsetTop;\n
}\n
}\n
}\n
}\n
if(typeof (_352)!="undefined"){\n
_352=arguments.callee(_352);\n
if(_352){\n
c.x-=(_352.x||0);\n
c.y-=(_352.y||0);\n
}\n
}\n
if(elem.parentNode){\n
_357=elem.parentNode;\n
}else{\n
_357=null;\n
}\n
while(_357){\n
var _35c=_357.tagName.toUpperCase();\n
if(_35c==="BODY"||_35c==="HTML"){\n
break;\n
}\n
var disp=self.getStyle(_357,"display");\n
if(disp.search(/^inline|table-row.*$/i)){\n
c.x-=_357.scrollLeft;\n
c.y-=_357.scrollTop;\n
}\n
if(_357.parentNode){\n
_357=_357.parentNode;\n
}else{\n
_357=null;\n
}\n
}\n
return c;\n
},setElementPosition:function(elem,_35f,_360){\n
elem=MochiKit.DOM.getElement(elem);\n
if(typeof (_360)=="undefined"){\n
_360="px";\n
}\n
var _361={};\n
var _362=MochiKit.Base.isUndefinedOrNull;\n
if(!_362(_35f.x)){\n
_361["left"]=_35f.x+_360;\n
}\n
if(!_362(_35f.y)){\n
_361["top"]=_35f.y+_360;\n
}\n
MochiKit.DOM.updateNodeAttributes(elem,{"style":_361});\n
},getElementDimensions:function(elem){\n
var self=MochiKit.Style;\n
var dom=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=dom.getElement(elem);\n
if(!elem){\n
return undefined;\n
}\n
var disp=self.getStyle(elem,"display");\n
if(disp!="none"&&disp!==""&&typeof (disp)!="undefined"){\n
return new self.Dimensions(elem.offsetWidth||0,elem.offsetHeight||0);\n
}\n
var s=elem.style;\n
var _368=s.visibility;\n
var _369=s.position;\n
s.visibility="hidden";\n
s.position="absolute";\n
s.display="";\n
var _36a=elem.offsetWidth;\n
var _36b=elem.offsetHeight;\n
s.display="none";\n
s.position=_369;\n
s.visibility=_368;\n
return new self.Dimensions(_36a,_36b);\n
},setElementDimensions:function(elem,_36d,_36e){\n
elem=MochiKit.DOM.getElement(elem);\n
if(typeof (_36e)=="undefined"){\n
_36e="px";\n
}\n
var _36f={};\n
var _370=MochiKit.Base.isUndefinedOrNull;\n
if(!_370(_36d.w)){\n
_36f["width"]=_36d.w+_36e;\n
}\n
if(!_370(_36d.h)){\n
_36f["height"]=_36d.h+_36e;\n
}\n
MochiKit.DOM.updateNodeAttributes(elem,{"style":_36f});\n
},setDisplayForElement:function(_371,_372){\n
var _373=MochiKit.Base.extend(null,arguments,1);\n
var _374=MochiKit.DOM.getElement;\n
for(var i=0;i<_373.length;i++){\n
_372=_374(_373[i]);\n
if(_372){\n
_372.style.display=_371;\n
}\n
}\n
},getViewportDimensions:function(){\n
var d=new MochiKit.Style.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
},getViewportPosition:function(){\n
var c=new MochiKit.Style.Coordinates(0,0);\n
var d=MochiKit.DOM._document;\n
var de=d.documentElement;\n
var db=d.body;\n
if(de&&(de.scrollTop||de.scrollLeft)){\n
c.x=de.scrollLeft;\n
c.y=de.scrollTop;\n
}else{\n
if(db){\n
c.x=db.scrollLeft;\n
c.y=db.scrollTop;\n
}\n
}\n
return c;\n
},__new__:function(){\n
var m=MochiKit.Base;\n
this.elementPosition=this.getElementPosition;\n
this.elementDimensions=this.getElementDimensions;\n
this.hideElement=m.partial(this.setDisplayForElement,"none");\n
this.showElement=m.partial(this.setDisplayForElement,"block");\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
}});\n
MochiKit.Style.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Style);\n
MochiKit.Base._deps("Signal",["Base","DOM","Style"]);\n
MochiKit.Signal.NAME="MochiKit.Signal";\n
MochiKit.Signal.VERSION="1.4";\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());\n
if(this.type()&&this.type().indexOf("key")===0||this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu"){\n
str+=", 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
}\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"||this.type()=="mouseenter"||this.type()=="mouseleave"){\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:null,relatedTarget:function(){\n
if(this._relatedTarget!==null){\n
return this._relatedTarget;\n
}\n
var elem=null;\n
if(this.type()=="mouseover"||this.type()=="mouseenter"){\n
elem=(this._event.relatedTarget||this._event.fromElement);\n
}else{\n
if(this.type()=="mouseout"||this.type()=="mouseleave"){\n
elem=(this._event.relatedTarget||this._event.toElement);\n
}\n
}\n
if(elem!==null){\n
this._relatedTarget=elem;\n
return elem;\n
}\n
return undefined;\n
},_modifier:null,modifier:function(){\n
if(this._modifier!==null){\n
return this._modifier;\n
}\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
this._modifier=m;\n
return m;\n
},_key:null,key:function(){\n
if(this._key!==null){\n
return this._key;\n
}\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
this._key=k;\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
this._key=k;\n
return k;\n
}\n
}\n
}\n
return undefined;\n
},_mouse:null,mouse:function(){\n
if(this._mouse!==null){\n
return this._mouse;\n
}\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.Style.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.Style.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||0);\n
m.page.y=e.clientY+(de.scrollTop||b.scrollTop)-(de.clientTop||0);\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
this._mouse=m;\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
if(this._confirmUnload===null){\n
this._event.returnValue=false;\n
}\n
}\n
},_confirmUnload:null,confirmUnload:function(msg){\n
if(this.type()=="beforeunload"){\n
this._confirmUnload=msg;\n
this._event.returnValue=msg;\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
(function(){\n
var _38a=MochiKit.Signal._specialMacKeys;\n
for(i=63236;i<=63242;i++){\n
_38a[i]="KEY_F"+(i-63236+1);\n
}\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
(function(){\n
var _38b=MochiKit.Signal._specialKeys;\n
for(var i=48;i<=57;i++){\n
_38b[i]="KEY_"+(i-48);\n
}\n
for(i=65;i<=90;i++){\n
_38b[i]="KEY_"+String.fromCharCode(i);\n
}\n
for(i=96;i<=105;i++){\n
_38b[i]="KEY_NUM_PAD_"+(i-96);\n
}\n
for(i=112;i<=123;i++){\n
_38b[i]="KEY_F"+(i-112+1);\n
}\n
})();\n
MochiKit.Signal.Ident=function(_38d){\n
this.source=_38d.source;\n
this.signal=_38d.signal;\n
this.listener=_38d.listener;\n
this.isDOM=_38d.isDOM;\n
this.objOrFunc=_38d.objOrFunc;\n
this.funcOrStr=_38d.funcOrStr;\n
this.connected=_38d.connected;\n
};\n
MochiKit.Signal.Ident.prototype={};\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 _38f=self._observers;\n
for(var i=0;i<_38f.length;i++){\n
if(_38f[i].signal!=="onload"&&_38f[i].signal!=="onunload"){\n
self._disconnect(_38f[i]);\n
}\n
}\n
},_listener:function(src,sig,func,obj,_395){\n
var self=MochiKit.Signal;\n
var E=self.Event;\n
if(!_395){\n
if(typeof (func.im_self)=="undefined"){\n
return MochiKit.Base.bind(func,obj);\n
}else{\n
return func;\n
}\n
}\n
obj=obj||src;\n
if(typeof (func)=="string"){\n
if(sig==="onload"||sig==="onunload"){\n
return function(_398){\n
obj[func].apply(obj,[new E(src,_398)]);\n
var _399=new MochiKit.Signal.Ident({source:src,signal:sig,objOrFunc:obj,funcOrStr:func});\n
MochiKit.Signal._disconnect(_399);\n
};\n
}else{\n
return function(_39a){\n
obj[func].apply(obj,[new E(src,_39a)]);\n
};\n
}\n
}else{\n
if(sig==="onload"||sig==="onunload"){\n
return function(_39b){\n
func.apply(obj,[new E(src,_39b)]);\n
var _39c=new MochiKit.Signal.Ident({source:src,signal:sig,objOrFunc:func});\n
MochiKit.Signal._disconnect(_39c);\n
};\n
}else{\n
return function(_39d){\n
func.apply(obj,[new E(src,_39d)]);\n
};\n
}\n
}\n
},_browserAlreadyHasMouseEnterAndLeave:function(){\n
return /MSIE/.test(navigator.userAgent);\n
},_mouseEnterListener:function(src,sig,func,obj){\n
var E=MochiKit.Signal.Event;\n
return function(_3a3){\n
var e=new E(src,_3a3);\n
try{\n
e.relatedTarget().nodeName;\n
}\n
catch(err){\n
return;\n
}\n
e.stop();\n
if(MochiKit.DOM.isChildNode(e.relatedTarget(),src)){\n
return;\n
}\n
e.type=function(){\n
return sig;\n
};\n
if(typeof (func)=="string"){\n
return obj[func].apply(obj,[e]);\n
}else{\n
return func.apply(obj,[e]);\n
}\n
};\n
},_getDestPair:function(_3a5,_3a6){\n
var obj=null;\n
var func=null;\n
if(typeof (_3a6)!="undefined"){\n
obj=_3a5;\n
func=_3a6;\n
if(typeof (_3a6)=="string"){\n
if(typeof (_3a5[_3a6])!="function"){\n
throw new Error("\'funcOrStr\' must be a function on \'objOrFunc\'");\n
}\n
}else{\n
if(typeof (_3a6)!="function"){\n
throw new Error("\'funcOrStr\' must be a function or string");\n
}\n
}\n
}else{\n
if(typeof (_3a5)!="function"){\n
throw new Error("\'objOrFunc\' must be a function if \'funcOrStr\' is not given");\n
}else{\n
func=_3a5;\n
}\n
}\n
return [obj,func];\n
},connect:function(src,sig,_3ab,_3ac){\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 _3ae=self._getDestPair(_3ab,_3ac);\n
var obj=_3ae[0];\n
var func=_3ae[1];\n
if(typeof (obj)=="undefined"||obj===null){\n
obj=src;\n
}\n
var _3b1=!!(src.addEventListener||src.attachEvent);\n
if(_3b1&&(sig==="onmouseenter"||sig==="onmouseleave")&&!self._browserAlreadyHasMouseEnterAndLeave()){\n
var _3b2=self._mouseEnterListener(src,sig.substr(2),func,obj);\n
if(sig==="onmouseenter"){\n
sig="onmouseover";\n
}else{\n
sig="onmouseout";\n
}\n
}else{\n
var _3b2=self._listener(src,sig,func,obj,_3b1);\n
}\n
if(src.addEventListener){\n
src.addEventListener(sig.substr(2),_3b2,false);\n
}else{\n
if(src.attachEvent){\n
src.attachEvent(sig,_3b2);\n
}\n
}\n
var _3b3=new MochiKit.Signal.Ident({source:src,signal:sig,listener:_3b2,isDOM:_3b1,objOrFunc:_3ab,funcOrStr:_3ac,connected:true});\n
self._observers.push(_3b3);\n
if(!_3b1&&typeof (src.__connect__)=="function"){\n
var args=MochiKit.Base.extend([_3b3],arguments,1);\n
src.__connect__.apply(src,args);\n
}\n
return _3b3;\n
},_disconnect:function(_3b5){\n
if(!_3b5.connected){\n
return;\n
}\n
_3b5.connected=false;\n
if(!_3b5.isDOM){\n
return;\n
}\n
var src=_3b5.source;\n
var sig=_3b5.signal;\n
var _3b8=_3b5.listener;\n
if(src.removeEventListener){\n
src.removeEventListener(sig.substr(2),_3b8,false);\n
}else{\n
if(src.detachEvent){\n
src.detachEvent(sig,_3b8);\n
}else{\n
throw new Error("\'src\' must be a DOM element");\n
}\n
}\n
},disconnect:function(_3b9){\n
var self=MochiKit.Signal;\n
var _3bb=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=_3bb.length-1;i>=0;i--){\n
var o=_3bb[i];\n
if(o.source===src&&o.signal===sig&&o.objOrFunc===obj&&o.funcOrStr===func){\n
self._disconnect(o);\n
if(!self._lock){\n
_3bb.splice(i,1);\n
}else{\n
self._dirty=true;\n
}\n
return true;\n
}\n
}\n
}else{\n
var idx=m.findIdentical(_3bb,_3b9);\n
if(idx>=0){\n
self._disconnect(_3b9);\n
if(!self._lock){\n
_3bb.splice(idx,1);\n
}else{\n
self._dirty=true;\n
}\n
return true;\n
}\n
}\n
return false;\n
},disconnectAllTo:function(_3c4,_3c5){\n
var self=MochiKit.Signal;\n
var _3c7=self._observers;\n
var _3c8=self._disconnect;\n
var _3c9=self._lock;\n
var _3ca=self._dirty;\n
if(typeof (_3c5)==="undefined"){\n
_3c5=null;\n
}\n
for(var i=_3c7.length-1;i>=0;i--){\n
var _3cc=_3c7[i];\n
if(_3cc.objOrFunc===_3c4&&(_3c5===null||_3cc.funcOrStr===_3c5)){\n
_3c8(_3cc);\n
if(_3c9){\n
_3ca=true;\n
}else{\n
_3c7.splice(i,1);\n
}\n
}\n
}\n
self._dirty=_3ca;\n
},disconnectAll:function(src,sig){\n
src=MochiKit.DOM.getElement(src);\n
var m=MochiKit.Base;\n
var _3d0=m.flattenArguments(m.extend(null,arguments,1));\n
var self=MochiKit.Signal;\n
var _3d2=self._disconnect;\n
var _3d3=self._observers;\n
var i,_3d5;\n
var _3d6=self._lock;\n
var _3d7=self._dirty;\n
if(_3d0.length===0){\n
for(i=_3d3.length-1;i>=0;i--){\n
_3d5=_3d3[i];\n
if(_3d5.source===src){\n
_3d2(_3d5);\n
if(!_3d6){\n
_3d3.splice(i,1);\n
}else{\n
_3d7=true;\n
}\n
}\n
}\n
}else{\n
var sigs={};\n
for(i=0;i<_3d0.length;i++){\n
sigs[_3d0[i]]=true;\n
}\n
for(i=_3d3.length-1;i>=0;i--){\n
_3d5=_3d3[i];\n
if(_3d5.source===src&&_3d5.signal in sigs){\n
_3d2(_3d5);\n
if(!_3d6){\n
_3d3.splice(i,1);\n
}else{\n
_3d7=true;\n
}\n
}\n
}\n
}\n
self._dirty=_3d7;\n
},signal:function(src,sig){\n
var self=MochiKit.Signal;\n
var _3dc=self._observers;\n
src=MochiKit.DOM.getElement(src);\n
var args=MochiKit.Base.extend(null,arguments,2);\n
var _3de=[];\n
self._lock=true;\n
for(var i=0;i<_3dc.length;i++){\n
var _3e0=_3dc[i];\n
if(_3e0.source===src&&_3e0.signal===sig&&_3e0.connected){\n
try{\n
_3e0.listener.apply(src,args);\n
}\n
catch(e){\n
_3de.push(e);\n
}\n
}\n
}\n
self._lock=false;\n
if(self._dirty){\n
self._dirty=false;\n
for(var i=_3dc.length-1;i>=0;i--){\n
if(!_3dc[i].connected){\n
_3dc.splice(i,1);\n
}\n
}\n
}\n
if(_3de.length==1){\n
throw _3de[0];\n
}else{\n
if(_3de.length>1){\n
var e=new Error("Multiple errors thrown in handling \'sig\', see errors property");\n
e.errors=_3de;\n
throw e;\n
}\n
}\n
}});\n
MochiKit.Signal.EXPORT_OK=[];\n
MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll","disconnectAllTo"];\n
MochiKit.Signal.__new__=function(win){\n
var m=MochiKit.Base;\n
this._document=document;\n
this._window=win;\n
this._lock=false;\n
this._dirty=false;\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.__export__){\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
MochiKit.Base._deps("Color",["Base","DOM","Style"]);\n
MochiKit.Color.NAME="MochiKit.Color";\n
MochiKit.Color.VERSION="1.4";\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,_3e5,blue,_3e7){\n
if(typeof (_3e7)=="undefined"||_3e7===null){\n
_3e7=1;\n
}\n
this.rgb={r:red,g:_3e5,b:blue,a:_3e7};\n
};\n
MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_3e8){\n
var rgb=this.rgb;\n
var m=MochiKit.Color;\n
return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_3e8);\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(_3ee){\n
var hsl=this.asHSL();\n
hsl.s=_3ee;\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},colorWithLightness:function(_3f1){\n
var hsl=this.asHSL();\n
hsl.l=_3f1;\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},darkerColorWithLevel:function(_3f4){\n
var hsl=this.asHSL();\n
hsl.l=Math.max(hsl.l-_3f4,0);\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},lighterColorWithLevel:function(_3f7){\n
var hsl=this.asHSL();\n
hsl.l=Math.min(hsl.l+_3f7,1);\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},blendedColor:function(_3fa,_3fb){\n
if(typeof (_3fb)=="undefined"||_3fb===null){\n
_3fb=0.5;\n
}\n
var sf=1-_3fb;\n
var s=this.rgb;\n
var d=_3fa.rgb;\n
var df=_3fb;\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(_400){\n
var a=this.asRGB();\n
var b=_400.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,_417,blue,_419){\n
var _41a=MochiKit.Color.Color;\n
if(arguments.length==1){\n
var rgb=red;\n
red=rgb.r;\n
_417=rgb.g;\n
blue=rgb.b;\n
if(typeof (rgb.a)=="undefined"){\n
_419=undefined;\n
}else{\n
_419=rgb.a;\n
}\n
}\n
return new _41a(red,_417,blue,_419);\n
},fromHSL:function(hue,_41d,_41e,_41f){\n
var m=MochiKit.Color;\n
return m.Color.fromRGB(m.hslToRGB.apply(m,arguments));\n
},fromHSV:function(hue,_422,_423,_424){\n
var m=MochiKit.Color;\n
return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments));\n
},fromName:function(name){\n
var _427=MochiKit.Color.Color;\n
if(name.charAt(0)=="\\""){\n
name=name.substr(1,name.length-2);\n
}\n
var _428=_427._namedColors[name.toLowerCase()];\n
if(typeof (_428)=="string"){\n
return _427.fromHexString(_428);\n
}else{\n
if(name=="transparent"){\n
return _427.transparentColor();\n
}\n
}\n
return null;\n
},fromString:function(_429){\n
var self=MochiKit.Color.Color;\n
var _42b=_429.substr(0,3);\n
if(_42b=="rgb"){\n
return self.fromRGBString(_429);\n
}else{\n
if(_42b=="hsl"){\n
return self.fromHSLString(_429);\n
}else{\n
if(_429.charAt(0)=="#"){\n
return self.fromHexString(_429);\n
}\n
}\n
}\n
return self.fromName(_429);\n
},fromHexString:function(_42c){\n
if(_42c.charAt(0)=="#"){\n
_42c=_42c.substring(1);\n
}\n
var _42d=[];\n
var i,hex;\n
if(_42c.length==3){\n
for(i=0;i<3;i++){\n
hex=_42c.substr(i,1);\n
_42d.push(parseInt(hex+hex,16)/255);\n
}\n
}else{\n
for(i=0;i<6;i+=2){\n
hex=_42c.substr(i,2);\n
_42d.push(parseInt(hex,16)/255);\n
}\n
}\n
var _430=MochiKit.Color.Color;\n
return _430.fromRGB.apply(_430,_42d);\n
},_fromColorString:function(pre,_432,_433,_434){\n
if(_434.indexOf(pre)===0){\n
_434=_434.substring(_434.indexOf("(",3)+1,_434.length-1);\n
}\n
var _435=_434.split(/\\s*,\\s*/);\n
var _436=[];\n
for(var i=0;i<_435.length;i++){\n
var c=_435[i];\n
var val;\n
var _43a=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(_43a=="deg"){\n
val=parseFloat(c)/360;\n
}else{\n
if(_43a=="rad"){\n
val=parseFloat(c)/(Math.PI*2);\n
}else{\n
val=_433[i]*parseFloat(c);\n
}\n
}\n
}\n
_436.push(val);\n
}\n
return this[_432].apply(this,_436);\n
},fromComputedStyle:function(elem,_43c){\n
var d=MochiKit.DOM;\n
var cls=MochiKit.Color.Color;\n
for(elem=d.getElement(elem);elem;elem=elem.parentNode){\n
var _43f=MochiKit.Style.getStyle.apply(d,arguments);\n
if(!_43f){\n
continue;\n
}\n
var _440=cls.fromString(_43f);\n
if(!_440){\n
break;\n
}\n
if(_440.asRGB().a>0){\n
return _440;\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,_446){\n
v*=_446;\n
if(v<0){\n
return 0;\n
}else{\n
if(v>_446){\n
return _446;\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,_44c,_44d,_44e){\n
if(arguments.length==1){\n
var hsv=hue;\n
hue=hsv.h;\n
_44c=hsv.s;\n
_44d=hsv.v;\n
_44e=hsv.a;\n
}\n
var red;\n
var _451;\n
var blue;\n
if(_44c===0){\n
red=_44d;\n
_451=_44d;\n
blue=_44d;\n
}else{\n
var i=Math.floor(hue*6);\n
var f=(hue*6)-i;\n
var p=_44d*(1-_44c);\n
var q=_44d*(1-(_44c*f));\n
var t=_44d*(1-(_44c*(1-f)));\n
switch(i){\n
case 1:\n
red=q;\n
_451=_44d;\n
blue=p;\n
break;\n
case 2:\n
red=p;\n
_451=_44d;\n
blue=t;\n
break;\n
case 3:\n
red=p;\n
_451=q;\n
blue=_44d;\n
break;\n
case 4:\n
red=t;\n
_451=p;\n
blue=_44d;\n
break;\n
case 5:\n
red=_44d;\n
_451=p;\n
blue=q;\n
break;\n
case 6:\n
case 0:\n
red=_44d;\n
_451=t;\n
blue=p;\n
break;\n
}\n
}\n
return {r:red,g:_451,b:blue,a:_44e};\n
},hslToRGB:function(hue,_459,_45a,_45b){\n
if(arguments.length==1){\n
var hsl=hue;\n
hue=hsl.h;\n
_459=hsl.s;\n
_45a=hsl.l;\n
_45b=hsl.a;\n
}\n
var red;\n
var _45e;\n
var blue;\n
if(_459===0){\n
red=_45a;\n
_45e=_45a;\n
blue=_45a;\n
}else{\n
var m2;\n
if(_45a<=0.5){\n
m2=_45a*(1+_459);\n
}else{\n
m2=_45a+_459-(_45a*_459);\n
}\n
var m1=(2*_45a)-m2;\n
var f=MochiKit.Color._hslValue;\n
var h6=hue*6;\n
red=f(m1,m2,h6+2);\n
_45e=f(m1,m2,h6);\n
blue=f(m1,m2,h6-2);\n
}\n
return {r:red,g:_45e,b:blue,a:_45b};\n
},rgbToHSV:function(red,_465,blue,_467){\n
if(arguments.length==1){\n
var rgb=red;\n
red=rgb.r;\n
_465=rgb.g;\n
blue=rgb.b;\n
_467=rgb.a;\n
}\n
var max=Math.max(Math.max(red,_465),blue);\n
var min=Math.min(Math.min(red,_465),blue);\n
var hue;\n
var _46c;\n
var _46d=max;\n
if(min==max){\n
hue=0;\n
_46c=0;\n
}else{\n
var _46e=(max-min);\n
_46c=_46e/max;\n
if(red==max){\n
hue=(_465-blue)/_46e;\n
}else{\n
if(_465==max){\n
hue=2+((blue-red)/_46e);\n
}else{\n
hue=4+((red-_465)/_46e);\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:_46c,v:_46d,a:_467};\n
},rgbToHSL:function(red,_470,blue,_472){\n
if(arguments.length==1){\n
var rgb=red;\n
red=rgb.r;\n
_470=rgb.g;\n
blue=rgb.b;\n
_472=rgb.a;\n
}\n
var max=Math.max(red,Math.max(_470,blue));\n
var min=Math.min(red,Math.min(_470,blue));\n
var hue;\n
var _477;\n
var _478=(max+min)/2;\n
var _479=max-min;\n
if(_479===0){\n
hue=0;\n
_477=0;\n
}else{\n
if(_478<=0.5){\n
_477=_479/(max+min);\n
}else{\n
_477=_479/(2-max-min);\n
}\n
if(red==max){\n
hue=(_470-blue)/_479;\n
}else{\n
if(_470==max){\n
hue=2+((blue-red)/_479);\n
}else{\n
hue=4+((red-_470)/_479);\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:_477,l:_478,a:_472};\n
},toColorPart:function(num){\n
num=Math.round(num);\n
var _47b=num.toString(16);\n
if(num<16){\n
return "0"+_47b;\n
}\n
return _47b;\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 _47d=1/3;\n
var _47e={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_47d,_47d,_47d],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_47d,2*_47d,2*_47d],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 _47f=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 _47e){\n
var name=k+"Color";\n
var _488=m.concat([_47f,this.Color,name],_47e[k]);\n
this.Color[name]=m.bind.apply(null,_488);\n
}\n
var _489=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 _48b=function(a,b){\n
return a.compareRGB(b);\n
};\n
m.nameFunctions(this);\n
m.registerComparator(this.Color.NAME,_489,_48b);\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",hone

]]></string> </value>
        </item>
        <item>
            <key> <string>next</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
  <record id="3" aka="AAAAAAAAAAM=">
    <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[

ydew:"#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
MochiKit.Base._deps("Position",["Base","DOM","Style"]);\n
MochiKit.Position.NAME="MochiKit.Position";\n
MochiKit.Position.VERSION="1.4";\n
MochiKit.Position.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Position.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Position.EXPORT_OK=[];\n
MochiKit.Position.EXPORT=[];\n
MochiKit.Base.update(MochiKit.Position,{includeScrollOffsets:false,prepare:function(){\n
var _48e=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;\n
var _48f=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;\n
this.windowOffset=new MochiKit.Style.Coordinates(_48e,_48f);\n
},cumulativeOffset:function(_490){\n
var _491=0;\n
var _492=0;\n
do{\n
_491+=_490.offsetTop||0;\n
_492+=_490.offsetLeft||0;\n
_490=_490.offsetParent;\n
}while(_490);\n
return new MochiKit.Style.Coordinates(_492,_491);\n
},realOffset:function(_493){\n
var _494=0;\n
var _495=0;\n
do{\n
_494+=_493.scrollTop||0;\n
_495+=_493.scrollLeft||0;\n
_493=_493.parentNode;\n
}while(_493);\n
return new MochiKit.Style.Coordinates(_495,_494);\n
},within:function(_496,x,y){\n
if(this.includeScrollOffsets){\n
return this.withinIncludingScrolloffsets(_496,x,y);\n
}\n
this.xcomp=x;\n
this.ycomp=y;\n
this.offset=this.cumulativeOffset(_496);\n
if(_496.style.position=="fixed"){\n
this.offset.x+=this.windowOffset.x;\n
this.offset.y+=this.windowOffset.y;\n
}\n
return (y>=this.offset.y&&y<this.offset.y+_496.offsetHeight&&x>=this.offset.x&&x<this.offset.x+_496.offsetWidth);\n
},withinIncludingScrolloffsets:function(_499,x,y){\n
var _49c=this.realOffset(_499);\n
this.xcomp=x+_49c.x-this.windowOffset.x;\n
this.ycomp=y+_49c.y-this.windowOffset.y;\n
this.offset=this.cumulativeOffset(_499);\n
return (this.ycomp>=this.offset.y&&this.ycomp<this.offset.y+_499.offsetHeight&&this.xcomp>=this.offset.x&&this.xcomp<this.offset.x+_499.offsetWidth);\n
},overlap:function(mode,_49e){\n
if(!mode){\n
return 0;\n
}\n
if(mode=="vertical"){\n
return ((this.offset.y+_49e.offsetHeight)-this.ycomp)/_49e.offsetHeight;\n
}\n
if(mode=="horizontal"){\n
return ((this.offset.x+_49e.offsetWidth)-this.xcomp)/_49e.offsetWidth;\n
}\n
},absolutize:function(_49f){\n
_49f=MochiKit.DOM.getElement(_49f);\n
if(_49f.style.position=="absolute"){\n
return;\n
}\n
MochiKit.Position.prepare();\n
var _4a0=MochiKit.Position.positionedOffset(_49f);\n
var _4a1=_49f.clientWidth;\n
var _4a2=_49f.clientHeight;\n
var _4a3={"position":_49f.style.position,"left":_4a0.x-parseFloat(_49f.style.left||0),"top":_4a0.y-parseFloat(_49f.style.top||0),"width":_49f.style.width,"height":_49f.style.height};\n
_49f.style.position="absolute";\n
_49f.style.top=_4a0.y+"px";\n
_49f.style.left=_4a0.x+"px";\n
_49f.style.width=_4a1+"px";\n
_49f.style.height=_4a2+"px";\n
return _4a3;\n
},positionedOffset:function(_4a4){\n
var _4a5=0,_4a6=0;\n
do{\n
_4a5+=_4a4.offsetTop||0;\n
_4a6+=_4a4.offsetLeft||0;\n
_4a4=_4a4.offsetParent;\n
if(_4a4){\n
p=MochiKit.Style.getStyle(_4a4,"position");\n
if(p=="relative"||p=="absolute"){\n
break;\n
}\n
}\n
}while(_4a4);\n
return new MochiKit.Style.Coordinates(_4a6,_4a5);\n
},relativize:function(_4a7,_4a8){\n
_4a7=MochiKit.DOM.getElement(_4a7);\n
if(_4a7.style.position=="relative"){\n
return;\n
}\n
MochiKit.Position.prepare();\n
var top=parseFloat(_4a7.style.top||0)-(_4a8["top"]||0);\n
var left=parseFloat(_4a7.style.left||0)-(_4a8["left"]||0);\n
_4a7.style.position=_4a8["position"];\n
_4a7.style.top=top+"px";\n
_4a7.style.left=left+"px";\n
_4a7.style.width=_4a8["width"];\n
_4a7.style.height=_4a8["height"];\n
},clone:function(_4ab,_4ac){\n
_4ab=MochiKit.DOM.getElement(_4ab);\n
_4ac=MochiKit.DOM.getElement(_4ac);\n
_4ac.style.position="absolute";\n
var _4ad=this.cumulativeOffset(_4ab);\n
_4ac.style.top=_4ad.y+"px";\n
_4ac.style.left=_4ad.x+"px";\n
_4ac.style.width=_4ab.offsetWidth+"px";\n
_4ac.style.height=_4ab.offsetHeight+"px";\n
},page:function(_4ae){\n
var _4af=0;\n
var _4b0=0;\n
var _4b1=_4ae;\n
do{\n
_4af+=_4b1.offsetTop||0;\n
_4b0+=_4b1.offsetLeft||0;\n
if(_4b1.offsetParent==document.body&&MochiKit.Style.getStyle(_4b1,"position")=="absolute"){\n
break;\n
}\n
}while(_4b1=_4b1.offsetParent);\n
_4b1=_4ae;\n
do{\n
_4af-=_4b1.scrollTop||0;\n
_4b0-=_4b1.scrollLeft||0;\n
}while(_4b1=_4b1.parentNode);\n
return new MochiKit.Style.Coordinates(_4b0,_4af);\n
}});\n
MochiKit.Position.__new__=function(win){\n
var m=MochiKit.Base;\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
MochiKit.Position.__new__(this);\n
MochiKit.Base._deps("Visual",["Base","DOM","Style","Color","Position"]);\n
MochiKit.Visual.NAME="MochiKit.Visual";\n
MochiKit.Visual.VERSION="1.4";\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,_4b5){\n
e=MochiKit.DOM.getElement(e);\n
this._setOptions(_4b5);\n
if(this.options.__unstable__wrapElement){\n
e=this._doWrap(e);\n
}\n
var _4b6=this.options.color;\n
var C=MochiKit.Color.Color;\n
if(this.options.color==="fromElement"){\n
_4b6=C.fromBackground(e);\n
}else{\n
if(!(_4b6 instanceof C)){\n
_4b6=C.fromString(_4b6);\n
}\n
}\n
this.isTransparent=(_4b6.asRGB().a<=0);\n
var _4b8=this.options.bgColor;\n
if(this.options.bgColor==="fromParent"){\n
_4b8=C.fromBackground(e.offsetParent);\n
}else{\n
if(!(_4b8 instanceof C)){\n
_4b8=C.fromString(_4b8);\n
}\n
}\n
this._roundCornersImpl(e,_4b6,_4b8);\n
};\n
MochiKit.Visual._RoundCorners.prototype={_doWrap:function(e){\n
var _4ba=e.parentNode;\n
var doc=MochiKit.DOM.currentDocument();\n
if(typeof (doc.defaultView)==="undefined"||doc.defaultView===null){\n
return e;\n
}\n
var _4bc=doc.defaultView.getComputedStyle(e,null);\n
if(typeof (_4bc)==="undefined"||_4bc===null){\n
return e;\n
}\n
var _4bd=MochiKit.DOM.DIV({"style":{display:"block",marginTop:_4bc.getPropertyValue("padding-top"),marginRight:_4bc.getPropertyValue("padding-right"),marginBottom:_4bc.getPropertyValue("padding-bottom"),marginLeft:_4bc.getPropertyValue("padding-left"),padding:"0px"}});\n
_4bd.innerHTML=e.innerHTML;\n
e.innerHTML="";\n
e.appendChild(_4bd);\n
return e;\n
},_roundCornersImpl:function(e,_4bf,_4c0){\n
if(this.options.border){\n
this._renderBorder(e,_4c0);\n
}\n
if(this._isTopRounded()){\n
this._roundTopCorners(e,_4bf,_4c0);\n
}\n
if(this._isBottomRounded()){\n
this._roundBottomCorners(e,_4bf,_4c0);\n
}\n
},_renderBorder:function(el,_4c2){\n
var _4c3="1px solid "+this._borderColor(_4c2);\n
var _4c4="border-left: "+_4c3;\n
var _4c5="border-right: "+_4c3;\n
var _4c6="style=\'"+_4c4+";"+_4c5+"\'";\n
el.innerHTML="<div "+_4c6+">"+el.innerHTML+"</div>";\n
},_roundTopCorners:function(el,_4c8,_4c9){\n
var _4ca=this._createCorner(_4c9);\n
for(var i=0;i<this.options.numSlices;i++){\n
_4ca.appendChild(this._createCornerSlice(_4c8,_4c9,i,"top"));\n
}\n
el.style.paddingTop=0;\n
el.insertBefore(_4ca,el.firstChild);\n
},_roundBottomCorners:function(el,_4cd,_4ce){\n
var _4cf=this._createCorner(_4ce);\n
for(var i=(this.options.numSlices-1);i>=0;i--){\n
_4cf.appendChild(this._createCornerSlice(_4cd,_4ce,i,"bottom"));\n
}\n
el.style.paddingBottom=0;\n
el.appendChild(_4cf);\n
},_createCorner:function(_4d1){\n
var dom=MochiKit.DOM;\n
return dom.DIV({style:{backgroundColor:_4d1.toString()}});\n
},_createCornerSlice:function(_4d3,_4d4,n,_4d6){\n
var _4d7=MochiKit.DOM.SPAN();\n
var _4d8=_4d7.style;\n
_4d8.backgroundColor=_4d3.toString();\n
_4d8.display="block";\n
_4d8.height="1px";\n
_4d8.overflow="hidden";\n
_4d8.fontSize="1px";\n
var _4d9=this._borderColor(_4d3,_4d4);\n
if(this.options.border&&n===0){\n
_4d8.borderTopStyle="solid";\n
_4d8.borderTopWidth="1px";\n
_4d8.borderLeftWidth="0px";\n
_4d8.borderRightWidth="0px";\n
_4d8.borderBottomWidth="0px";\n
_4d8.height="0px";\n
_4d8.borderColor=_4d9.toString();\n
}else{\n
if(_4d9){\n
_4d8.borderColor=_4d9.toString();\n
_4d8.borderStyle="solid";\n
_4d8.borderWidth="0px 1px";\n
}\n
}\n
if(!this.options.compact&&(n==(this.options.numSlices-1))){\n
_4d8.height="2px";\n
}\n
this._setMargin(_4d7,n,_4d6);\n
this._setBorder(_4d7,n,_4d6);\n
return _4d7;\n
},_setOptions:function(_4da){\n
this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false,__unstable__wrapElement:false};\n
MochiKit.Base.update(this.options,_4da);\n
this.options.numSlices=(this.options.compact?2:4);\n
},_whichSideTop:function(){\n
var _4db=this.options.corners;\n
if(this._hasString(_4db,"all","top")){\n
return "";\n
}\n
var _4dc=(_4db.indexOf("tl")!=-1);\n
var _4dd=(_4db.indexOf("tr")!=-1);\n
if(_4dc&&_4dd){\n
return "";\n
}\n
if(_4dc){\n
return "left";\n
}\n
if(_4dd){\n
return "right";\n
}\n
return "";\n
},_whichSideBottom:function(){\n
var _4de=this.options.corners;\n
if(this._hasString(_4de,"all","bottom")){\n
return "";\n
}\n
var _4df=(_4de.indexOf("bl")!=-1);\n
var _4e0=(_4de.indexOf("br")!=-1);\n
if(_4df&&_4e0){\n
return "";\n
}\n
if(_4df){\n
return "left";\n
}\n
if(_4e0){\n
return "right";\n
}\n
return "";\n
},_borderColor:function(_4e1,_4e2){\n
if(_4e1=="transparent"){\n
return _4e2;\n
}else{\n
if(this.options.border){\n
return this.options.border;\n
}else{\n
if(this.options.blend){\n
return _4e2.blendedColor(_4e1);\n
}\n
}\n
}\n
return "";\n
},_setMargin:function(el,n,_4e5){\n
var _4e6=this._marginSize(n)+"px";\n
var _4e7=(_4e5=="top"?this._whichSideTop():this._whichSideBottom());\n
var _4e8=el.style;\n
if(_4e7=="left"){\n
_4e8.marginLeft=_4e6;\n
_4e8.marginRight="0px";\n
}else{\n
if(_4e7=="right"){\n
_4e8.marginRight=_4e6;\n
_4e8.marginLeft="0px";\n
}else{\n
_4e8.marginLeft=_4e6;\n
_4e8.marginRight=_4e6;\n
}\n
}\n
},_setBorder:function(el,n,_4eb){\n
var _4ec=this._borderSize(n)+"px";\n
var _4ed=(_4eb=="top"?this._whichSideTop():this._whichSideBottom());\n
var _4ee=el.style;\n
if(_4ed=="left"){\n
_4ee.borderLeftWidth=_4ec;\n
_4ee.borderRightWidth="0px";\n
}else{\n
if(_4ed=="right"){\n
_4ee.borderRightWidth=_4ec;\n
_4ee.borderLeftWidth="0px";\n
}else{\n
_4ee.borderLeftWidth=_4ec;\n
_4ee.borderRightWidth=_4ec;\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 _4f1=[1,0];\n
return _4f1[n];\n
}else{\n
if(o.compact){\n
var _4f2=[2,1];\n
return _4f2[n];\n
}else{\n
if(o.blend){\n
var _4f3=[3,2,1,0];\n
return _4f3[n];\n
}else{\n
var _4f4=[5,3,2,1];\n
return _4f4[n];\n
}\n
}\n
}\n
},_borderSize:function(n){\n
var o=this.options;\n
var _4f7;\n
if(o.compact&&(o.blend||this.isTransparent)){\n
return 1;\n
}else{\n
if(o.compact){\n
_4f7=[1,0];\n
}else{\n
if(o.blend){\n
_4f7=[2,1,1,1];\n
}else{\n
if(o.border){\n
_4f7=[0,2,0,0];\n
}else{\n
if(this.isTransparent){\n
_4f7=[5,3,2,1];\n
}else{\n
return 0;\n
}\n
}\n
}\n
}\n
}\n
return _4f7[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,_4fc){\n
new MochiKit.Visual._RoundCorners(e,_4fc);\n
};\n
MochiKit.Visual.roundClass=function(_4fd,_4fe,_4ff){\n
var _500=MochiKit.DOM.getElementsByTagAndClassName(_4fd,_4fe);\n
for(var i=0;i<_500.length;i++){\n
MochiKit.Visual.roundElement(_500[i],_4ff);\n
}\n
};\n
MochiKit.Visual.tagifyText=function(_502,_503){\n
_503=_503||"position:relative";\n
if(/MSIE/.test(navigator.userAgent)){\n
_503+=";zoom:1";\n
}\n
_502=MochiKit.DOM.getElement(_502);\n
var ma=MochiKit.Base.map;\n
ma(function(_505){\n
if(_505.nodeType==3){\n
ma(function(_506){\n
_502.insertBefore(MochiKit.DOM.SPAN({style:_503},_506==" "?String.fromCharCode(160):_506),_505);\n
},_505.nodeValue.split(""));\n
MochiKit.DOM.removeElement(_505);\n
}\n
},_502.childNodes);\n
};\n
MochiKit.Visual.forceRerendering=function(_507){\n
try{\n
_507=MochiKit.DOM.getElement(_507);\n
var n=document.createTextNode(" ");\n
_507.appendChild(n);\n
_507.removeChild(n);\n
}\n
catch(e){\n
}\n
};\n
MochiKit.Visual.multiple=function(_509,_50a,_50b){\n
_50b=MochiKit.Base.update({speed:0.1,delay:0},_50b);\n
var _50c=_50b.delay;\n
var _50d=0;\n
MochiKit.Base.map(function(_50e){\n
_50b.delay=_50d*_50b.speed+_50c;\n
new _50a(_50e,_50b);\n
_50d+=1;\n
},_509);\n
};\n
MochiKit.Visual.PAIRS={"slide":["slideDown","slideUp"],"blind":["blindDown","blindUp"],"appear":["appear","fade"],"size":["grow","shrink"]};\n
MochiKit.Visual.toggle=function(_50f,_510,_511){\n
_50f=MochiKit.DOM.getElement(_50f);\n
_510=(_510||"appear").toLowerCase();\n
_511=MochiKit.Base.update({queue:{position:"end",scope:(_50f.id||"global"),limit:1}},_511);\n
var v=MochiKit.Visual;\n
v[MochiKit.Style.getStyle(_50f,"display")!="none"?v.PAIRS[_510][1]:v.PAIRS[_510][0]](_50f,_511);\n
};\n
MochiKit.Visual.Transitions={};\n
MochiKit.Visual.Transitions.linear=function(pos){\n
return pos;\n
};\n
MochiKit.Visual.Transitions.sinoidal=function(pos){\n
return (-Math.cos(pos*Math.PI)/2)+0.5;\n
};\n
MochiKit.Visual.Transitions.reverse=function(pos){\n
return 1-pos;\n
};\n
MochiKit.Visual.Transitions.flicker=function(pos){\n
return ((-Math.cos(pos*Math.PI)/4)+0.75)+Math.random()/4;\n
};\n
MochiKit.Visual.Transitions.wobble=function(pos){\n
return (-Math.cos(pos*Math.PI*(9*pos))/2)+0.5;\n
};\n
MochiKit.Visual.Transitions.pulse=function(pos,_519){\n
if(!_519){\n
return (Math.floor(pos*10)%2===0?(pos*10-Math.floor(pos*10)):1-(pos*10-Math.floor(pos*10)));\n
}\n
return (Math.round((pos%(1/_519))*_519)==0?((pos*_519*2)-Math.floor(pos*_519*2)):1-((pos*_519*2)-Math.floor(pos*_519*2)));\n
};\n
MochiKit.Visual.Transitions.none=function(pos){\n
return 0;\n
};\n
MochiKit.Visual.Transitions.full=function(pos){\n
return 1;\n
};\n
MochiKit.Visual.ScopedQueue=function(){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls();\n
}\n
this.__init__();\n
};\n
MochiKit.Base.update(MochiKit.Visual.ScopedQueue.prototype,{__init__:function(){\n
this.effects=[];\n
this.interval=null;\n
},add:function(_51d){\n
var _51e=new Date().getTime();\n
var _51f=(typeof (_51d.options.queue)=="string")?_51d.options.queue:_51d.options.queue.position;\n
var ma=MochiKit.Base.map;\n
switch(_51f){\n
case "front":\n
ma(function(e){\n
if(e.state=="idle"){\n
e.startOn+=_51d.finishOn;\n
e.finishOn+=_51d.finishOn;\n
}\n
},this.effects);\n
break;\n
case "end":\n
var _522;\n
ma(function(e){\n
var i=e.finishOn;\n
if(i>=(_522||i)){\n
_522=i;\n
}\n
},this.effects);\n
_51e=_522||_51e;\n
break;\n
case "break":\n
ma(function(e){\n
e.finalize();\n
},this.effects);\n
break;\n
}\n
_51d.startOn+=_51e;\n
_51d.finishOn+=_51e;\n
if(!_51d.options.queue.limit||this.effects.length<_51d.options.queue.limit){\n
this.effects.push(_51d);\n
}\n
if(!this.interval){\n
this.interval=this.startLoop(MochiKit.Base.bind(this.loop,this),40);\n
}\n
},startLoop:function(func,_527){\n
return setInterval(func,_527);\n
},remove:function(_528){\n
this.effects=MochiKit.Base.filter(function(e){\n
return e!=_528;\n
},this.effects);\n
if(!this.effects.length){\n
this.stopLoop(this.interval);\n
this.interval=null;\n
}\n
},stopLoop:function(_52a){\n
clearInterval(_52a);\n
},loop:function(){\n
var _52b=new Date().getTime();\n
MochiKit.Base.map(function(_52c){\n
_52c.loop(_52b);\n
},this.effects);\n
}});\n
MochiKit.Visual.Queues={instances:{},get:function(_52d){\n
if(typeof (_52d)!="string"){\n
return _52d;\n
}\n
if(!this.instances[_52d]){\n
this.instances[_52d]=new MochiKit.Visual.ScopedQueue();\n
}\n
return this.instances[_52d];\n
}};\n
MochiKit.Visual.Queue=MochiKit.Visual.Queues.get("global");\n
MochiKit.Visual.DefaultOptions={transition:MochiKit.Visual.Transitions.sinoidal,duration:1,fps:25,sync:false,from:0,to:1,delay:0,queue:"parallel"};\n
MochiKit.Visual.Base=function(){\n
};\n
MochiKit.Visual.Base.prototype={__class__:MochiKit.Visual.Base,start:function(_52e){\n
var v=MochiKit.Visual;\n
this.options=MochiKit.Base.setdefault(_52e,v.DefaultOptions);\n
this.currentFrame=0;\n
this.state="idle";\n
this.startOn=this.options.delay*1000;\n
this.finishOn=this.startOn+(this.options.duration*1000);\n
this.event("beforeStart");\n
if(!this.options.sync){\n
v.Queues.get(typeof (this.options.queue)=="string"?"global":this.options.queue.scope).add(this);\n
}\n
},loop:function(_530){\n
if(_530>=this.startOn){\n
if(_530>=this.finishOn){\n
return this.finalize();\n
}\n
var pos=(_530-this.startOn)/(this.finishOn-this.startOn);\n
var _532=Math.round(pos*this.options.fps*this.options.duration);\n
if(_532>this.currentFrame){\n
this.render(pos);\n
this.currentFrame=_532;\n
}\n
}\n
},render:function(pos){\n
if(this.state=="idle"){\n
this.state="running";\n
this.event("beforeSetup");\n
this.setup();\n
this.event("afterSetup");\n
}\n
if(this.state=="running"){\n
if(this.options.transition){\n
pos=this.options.transition(pos);\n
}\n
pos*=(this.options.to-this.options.from);\n
pos+=this.options.from;\n
this.event("beforeUpdate");\n
this.update(pos);\n
this.event("afterUpdate");\n
}\n
},cancel:function(){\n
if(!this.options.sync){\n
MochiKit.Visual.Queues.get(typeof (this.options.queue)=="string"?"global":this.options.queue.scope).remove(this);\n
}\n
this.state="finished";\n
},finalize:function(){\n
this.render(1);\n
this.cancel();\n
this.event("beforeFinish");\n
this.finish();\n
this.event("afterFinish");\n
},setup:function(){\n
},finish:function(){\n
},update:function(_534){\n
},event:function(_535){\n
if(this.options[_535+"Internal"]){\n
this.options[_535+"Internal"](this);\n
}\n
if(this.options[_535]){\n
this.options[_535](this);\n
}\n
},repr:function(){\n
return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]";\n
}};\n
MochiKit.Visual.Parallel=function(_536,_537){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_536,_537);\n
}\n
this.__init__(_536,_537);\n
};\n
MochiKit.Visual.Parallel.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Parallel.prototype,{__class__:MochiKit.Visual.Parallel,__init__:function(_539,_53a){\n
this.effects=_539||[];\n
this.start(_53a);\n
},update:function(_53b){\n
MochiKit.Base.map(function(_53c){\n
_53c.render(_53b);\n
},this.effects);\n
},finish:function(){\n
MochiKit.Base.map(function(_53d){\n
_53d.finalize();\n
},this.effects);\n
}});\n
MochiKit.Visual.Opacity=function(_53e,_53f){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_53e,_53f);\n
}\n
this.__init__(_53e,_53f);\n
};\n
MochiKit.Visual.Opacity.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Opacity.prototype,{__class__:MochiKit.Visual.Opacity,__init__:function(_541,_542){\n
var b=MochiKit.Base;\n
var s=MochiKit.Style;\n
this.element=MochiKit.DOM.getElement(_541);\n
if(this.element.currentStyle&&(!this.element.currentStyle.hasLayout)){\n
s.setStyle(this.element,{zoom:1});\n
}\n
_542=b.update({from:s.getStyle(this.element,"opacity")||0,to:1},_542);\n
this.start(_542);\n
},update:function(_545){\n
MochiKit.Style.setStyle(this.element,{"opacity":_545});\n
}});\n
MochiKit.Visual.Move=function(_546,_547){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_546,_547);\n
}\n
this.__init__(_546,_547);\n
};\n
MochiKit.Visual.Move.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Move.prototype,{__class__:MochiKit.Visual.Move,__init__:function(_549,_54a){\n
this.element=MochiKit.DOM.getElement(_549);\n
_54a=MochiKit.Base.update({x:0,y:0,mode:"relative"},_54a);\n
this.start(_54a);\n
},setup:function(){\n
MochiKit.DOM.makePositioned(this.element);\n
var s=this.element.style;\n
var _54c=s.visibility;\n
var _54d=s.display;\n
if(_54d=="none"){\n
s.visibility="hidden";\n
s.display="";\n
}\n
this.originalLeft=parseFloat(MochiKit.Style.getStyle(this.element,"left")||"0");\n
this.originalTop=parseFloat(MochiKit.Style.getStyle(this.element,"top")||"0");\n
if(this.options.mode=="absolute"){\n
this.options.x-=this.originalLeft;\n
this.options.y-=this.originalTop;\n
}\n
if(_54d=="none"){\n
s.visibility=_54c;\n
s.display=_54d;\n
}\n
},update:function(_54e){\n
MochiKit.Style.setStyle(this.element,{left:Math.round(this.options.x*_54e+this.originalLeft)+"px",top:Math.round(this.options.y*_54e+this.originalTop)+"px"});\n
}});\n
MochiKit.Visual.Scale=function(_54f,_550,_551){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_54f,_550,_551);\n
}\n
this.__init__(_54f,_550,_551);\n
};\n
MochiKit.Visual.Scale.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Scale.prototype,{__class__:MochiKit.Visual.Scale,__init__:function(_553,_554,_555){\n
this.element=MochiKit.DOM.getElement(_553);\n
_555=MochiKit.Base.update({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:_554},_555);\n
this.start(_555);\n
},setup:function(){\n
this.restoreAfterFinish=this.options.restoreAfterFinish||false;\n
this.elementPositioning=MochiKit.Style.getStyle(this.element,"position");\n
var ma=MochiKit.Base.map;\n
var b=MochiKit.Base.bind;\n
this.originalStyle={};\n
ma(b(function(k){\n
this.originalStyle[k]=this.element.style[k];\n
},this),["top","left","width","height","fontSize"]);\n
this.originalTop=this.element.offsetTop;\n
this.originalLeft=this.element.offsetLeft;\n
var _559=MochiKit.Style.getStyle(this.element,"font-size")||"100%";\n
ma(b(function(_55a){\n
if(_559.indexOf(_55a)>0){\n
this.fontSize=parseFloat(_559);\n
this.fontSizeType=_55a;\n
}\n
},this),["em","px","%"]);\n
this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;\n
if(/^content/.test(this.options.scaleMode)){\n
this.dims=[this.element.scrollHeight,this.element.scrollWidth];\n
}else{\n
if(this.options.scaleMode=="box"){\n
this.dims=[this.element.offsetHeight,this.element.offsetWidth];\n
}else{\n
this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth];\n
}\n
}\n
},update:function(_55b){\n
var _55c=(this.options.scaleFrom/100)+(this.factor*_55b);\n
if(this.options.scaleContent&&this.fontSize){\n
MochiKit.Style.setStyle(this.element,{fontSize:this.fontSize*_55c+this.fontSizeType});\n
}\n
this.setDimensions(this.dims[0]*_55c,this.dims[1]*_55c);\n
},finish:function(){\n
if(this.restoreAfterFinish){\n
MochiKit.Style.setStyle(this.element,this.originalStyle);\n
}\n
},setDimensions:function(_55d,_55e){\n
var d={};\n
var r=Math.round;\n
if(/MSIE/.test(navigator.userAgent)){\n
r=Math.ceil;\n
}\n
if(this.options.scaleX){\n
d.width=r(_55e)+"px";\n
}\n
if(this.options.scaleY){\n
d.height=r(_55d)+"px";\n
}\n
if(this.options.scaleFromCenter){\n
var topd=(_55d-this.dims[0])/2;\n
var _562=(_55e-this.dims[1])/2;\n
if(this.elementPositioning=="absolute"){\n
if(this.options.scaleY){\n
d.top=this.originalTop-topd+"px";\n
}\n
if(this.options.scaleX){\n
d.left=this.originalLeft-_562+"px";\n
}\n
}else{\n
if(this.options.scaleY){\n
d.top=-topd+"px";\n
}\n
if(this.options.scaleX){\n
d.left=-_562+"px";\n
}\n
}\n
}\n
MochiKit.Style.setStyle(this.element,d);\n
}});\n
MochiKit.Visual.Highlight=function(_563,_564){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_563,_564);\n
}\n
this.__init__(_563,_564);\n
};\n
MochiKit.Visual.Highlight.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Highlight.prototype,{__class__:MochiKit.Visual.Highlight,__init__:function(_566,_567){\n
this.element=MochiKit.DOM.getElement(_566);\n
_567=MochiKit.Base.update({startcolor:"#ffff99"},_567);\n
this.start(_567);\n
},setup:function(){\n
var b=MochiKit.Base;\n
var s=MochiKit.Style;\n
if(s.getStyle(this.element,"display")=="none"){\n
this.cancel();\n
return;\n
}\n
this.oldStyle={backgroundImage:s.getStyle(this.element,"background-image")};\n
s.setStyle(this.element,{backgroundImage:"none"});\n
if(!this.options.endcolor){\n
this.options.endcolor=MochiKit.Color.Color.fromBackground(this.element).toHexString();\n
}\n
if(b.isUndefinedOrNull(this.options.restorecolor)){\n
this.options.restorecolor=s.getStyle(this.element,"background-color");\n
}\n
this._base=b.map(b.bind(function(i){\n
return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16);\n
},this),[0,1,2]);\n
this._delta=b.map(b.bind(function(i){\n
return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i];\n
},this),[0,1,2]);\n
},update:function(_56c){\n
var m="#";\n
MochiKit.Base.map(MochiKit.Base.bind(function(i){\n
m+=MochiKit.Color.toColorPart(Math.round(this._base[i]+this._delta[i]*_56c));\n
},this),[0,1,2]);\n
MochiKit.Style.setStyle(this.element,{backgroundColor:m});\n
},finish:function(){\n
MochiKit.Style.setStyle(this.element,MochiKit.Base.update(this.oldStyle,{backgroundColor:this.options.restorecolor}));\n
}});\n
MochiKit.Visual.ScrollTo=function(_56f,_570){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_56f,_570);\n
}\n
this.__init__(_56f,_570);\n
};\n
MochiKit.Visual.ScrollTo.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.ScrollTo.prototype,{__class__:MochiKit.Visual.ScrollTo,__init__:function(_572,_573){\n
this.element=MochiKit.DOM.getElement(_572);\n
this.start(_573);\n
},setup:function(){\n
var p=MochiKit.Position;\n
p.prepare();\n
var _575=p.cumulativeOffset(this.element);\n
if(this.options.offset){\n
_575.y+=this.options.offset;\n
}\n
var max;\n
if(window.innerHeight){\n
max=window.innerHeight-window.height;\n
}else{\n
if(document.documentElement&&document.documentElement.clientHeight){\n
max=document.documentElement.clientHeight-document.body.scrollHeight;\n
}else{\n
if(document.body){\n
max=document.body.clientHeight-document.body.scrollHeight;\n
}\n
}\n
}\n
this.scrollStart=p.windowOffset.y;\n
this.delta=(_575.y>max?max:_575.y)-this.scrollStart;\n
},update:function(_577){\n
var p=MochiKit.Position;\n
p.prepare();\n
window.scrollTo(p.windowOffset.x,this.scrollStart+(_577*this.delta));\n
}});\n
MochiKit.Visual.CSS_LENGTH=/^(([\\+\\-]?[0-9\\.]+)(em|ex|px|in|cm|mm|pt|pc|\\%))|0$/;\n
MochiKit.Visual.Morph=function(_579,_57a){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_579,_57a);\n
}\n
this.__init__(_579,_57a);\n
};\n
MochiKit.Visual.Morph.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Morph.prototype,{__class__:MochiKit.Visual.Morph,__init__:function(_57c,_57d){\n
this.element=MochiKit.DOM.getElement(_57c);\n
this.start(_57d);\n
},setup:function(){\n
var b=MochiKit.Base;\n
var _57f=this.options.style;\n
this.styleStart={};\n
this.styleEnd={};\n
this.units={};\n
var _580,unit;\n
for(var s in _57f){\n
_580=_57f[s];\n
s=b.camelize(s);\n
if(MochiKit.Visual.CSS_LENGTH.test(_580)){\n
var _583=_580.match(/^([\\+\\-]?[0-9\\.]+)(.*)$/);\n
_580=parseFloat(_583[1]);\n
unit=(_583.length==3)?_583[2]:null;\n
this.styleEnd[s]=_580;\n
this.units[s]=unit;\n
_580=MochiKit.Style.getStyle(this.element,s);\n
_583=_580.match(/^([\\+\\-]?[0-9\\.]+)(.*)$/);\n
_580=parseFloat(_583[1]);\n
this.styleStart[s]=_580;\n
}else{\n
var c=MochiKit.Color.Color;\n
_580=c.fromString(_580);\n
if(_580){\n
this.units[s]="color";\n
this.styleEnd[s]=_580.toHexString();\n
_580=MochiKit.Style.getStyle(this.element,s);\n
this.styleStart[s]=c.fromString(_580).toHexString();\n
this.styleStart[s]=b.map(b.bind(function(i){\n
return parseInt(this.styleStart[s].slice(i*2+1,i*2+3),16);\n
},this),[0,1,2]);\n
this.styleEnd[s]=b.map(b.bind(function(i){\n
return parseInt(this.styleEnd[s].slice(i*2+1,i*2+3),16);\n
},this),[0,1,2]);\n
}\n
}\n
}\n
},update:function(_587){\n
var _588;\n
for(var s in this.styleStart){\n
if(this.units[s]=="color"){\n
var m="#";\n
var _58b=this.styleStart[s];\n
var end=this.styleEnd[s];\n
MochiKit.Base.map(MochiKit.Base.bind(function(i){\n
m+=MochiKit.Color.toColorPart(Math.round(_58b[i]+(end[i]-_58b[i])*_587));\n
},this),[0,1,2]);\n
this.element.style[s]=m;\n
}else{\n
_588=this.styleStart[s]+Math.round((this.styleEnd[s]-this.styleStart[s])*_587*1000)/1000+this.units[s];\n
this.element.style[s]=_588;\n
}\n
}\n
}});\n
MochiKit.Visual.fade=function(_58e,_58f){\n
var s=MochiKit.Style;\n
var _591=s.getStyle(_58e,"opacity");\n
_58f=MochiKit.Base.update({from:s.getStyle(_58e,"opacity")||1,to:0,afterFinishInternal:function(_592){\n
if(_592.options.to!==0){\n
return;\n
}\n
s.hideElement(_592.element);\n
s.setStyle(_592.element,{"opacity":_591});\n
}},_58f);\n
return new MochiKit.Visual.Opacity(_58e,_58f);\n
};\n
MochiKit.Visual.appear=function(_593,_594){\n
var s=MochiKit.Style;\n
var v=MochiKit.Visual;\n
_594=MochiKit.Base.update({from:(s.getStyle(_593,"display")=="none"?0:s.getStyle(_593,"opacity")||0),to:1,afterFinishInternal:function(_597){\n
v.forceRerendering(_597.element);\n
},beforeSetupInternal:function(_598){\n
s.setStyle(_598.element,{"opacity":_598.options.from});\n
s.showElement(_598.element);\n
}},_594);\n
return new v.Opacity(_593,_594);\n
};\n
MochiKit.Visual.puff=function(_599,_59a){\n
var s=MochiKit.Style;\n
var v=MochiKit.Visual;\n
_599=MochiKit.DOM.getElement(_599);\n
var _59d={position:s.getStyle(_599,"position"),top:_599.style.top,left:_599.style.left,width:_599.style.width,height:_599.style.height,opacity:s.getStyle(_599,"opacity")};\n
_59a=MochiKit.Base.update({beforeSetupInternal:function(_59e){\n
MochiKit.Position.absolutize(_59e.effects[0].element);\n
},afterFinishInternal:function(_59f){\n
s.hideElement(_59f.effects[0].element);\n
s.setStyle(_59f.effects[0].element,_59d);\n
},scaleContent:true,scaleFromCenter:true},_59a);\n
return new v.Parallel([new v.Scale(_599,200,{sync:true,scaleFromCenter:_59a.scaleFromCenter,scaleContent:_59a.scaleContent,restoreAfterFinish:true}),new v.Opacity(_599,{sync:true,to:0})],_59a);\n
};\n
MochiKit.Visual.blindUp=function(_5a0,_5a1){\n
var d=MochiKit.DOM;\n
_5a0=d.getElement(_5a0);\n
var _5a3=d.makeClipping(_5a0);\n
_5a1=MochiKit.Base.update({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(_5a4){\n
MochiKit.Style.hideElement(_5a4.element);\n
d.undoClipping(_5a4.element,_5a3);\n
}},_5a1);\n
return new MochiKit.Visual.Scale(_5a0,0,_5a1);\n
};\n
MochiKit.Visual.blindDown=function(_5a5,_5a6){\n
var d=MochiKit.DOM;\n
var s=MochiKit.Style;\n
_5a5=d.getElement(_5a5);\n
var _5a9=s.getElementDimensions(_5a5);\n
var _5aa;\n
_5a6=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_5a9.h,originalWidth:_5a9.w},restoreAfterFinish:true,afterSetupInternal:function(_5ab){\n
_5aa=d.makeClipping(_5ab.element);\n
s.setStyle(_5ab.element,{height:"0px"});\n
s.showElement(_5ab.element);\n
},afterFinishInternal:function(_5ac){\n
d.undoClipping(_5ac.element,_5aa);\n
}},_5a6);\n
return new MochiKit.Visual.Scale(_5a5,100,_5a6);\n
};\n
MochiKit.Visual.switchOff=function(_5ad,_5ae){\n
var d=MochiKit.DOM;\n
_5ad=d.getElement(_5ad);\n
var _5b0=MochiKit.Style.getStyle(_5ad,"opacity");\n
var _5b1;\n
_5ae=MochiKit.Base.update({duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetupInternal:function(_5b2){\n
d.makePositioned(_5b2.element);\n
_5b1=d.makeClipping(_5b2.element);\n
},afterFinishInternal:function(_5b3){\n
MochiKit.Style.hideElement(_5b3.element);\n
d.undoClipping(_5b3.element,_5b1);\n
d.undoPositioned(_5b3.element);\n
MochiKit.Style.setStyle(_5b3.element,{"opacity":_5b0});\n
}},_5ae);\n
var v=MochiKit.Visual;\n
return new v.appear(_5ad,{duration:0.4,from:0,transition:v.Transitions.flicker,afterFinishInternal:function(_5b5){\n
new v.Scale(_5b5.element,1,_5ae);\n
}});\n
};\n
MochiKit.Visual.dropOut=function(_5b6,_5b7){\n
var d=MochiKit.DOM;\n
var s=MochiKit.Style;\n
_5b6=d.getElement(_5b6);\n
var _5ba={top:s.getStyle(_5b6,"top"),left:s.getStyle(_5b6,"left"),opacity:s.getStyle(_5b6,"opacity")};\n
_5b7=MochiKit.Base.update({duration:0.5,distance:100,beforeSetupInternal:function(_5bb){\n
d.makePositioned(_5bb.effects[0].element);\n
},afterFinishInternal:function(_5bc){\n
s.hideElement(_5bc.effects[0].element);\n
d.undoPositioned(_5bc.effects[0].element);\n
s.setStyle(_5bc.effects[0].element,_5ba);\n
}},_5b7);\n
var v=MochiKit.Visual;\n
return new v.Parallel([new v.Move(_5b6,{x:0,y:_5b7.distance,sync:true}),new v.Opacity(_5b6,{sync:true,to:0})],_5b7);\n
};\n
MochiKit.Visual.shake=function(_5be,_5bf){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var s=MochiKit.Style;\n
_5be=d.getElement(_5be);\n
var _5c3={top:s.getStyle(_5be,"top"),left:s.getStyle(_5be,"left")};\n
_5bf=MochiKit.Base.update({x:-20,y:0,duration:0.05,afterFinishInternal:function(_5c4){\n
d.undoPositioned(_5c4.element);\n
s.setStyle(_5c4.element,_5c3);\n
}},_5bf);\n
return new v.Move(_5be,{x:20,y:0,duration:0.05,afterFinishInternal:function(_5c5){\n
new v.Move(_5c5.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_5c6){\n
new v.Move(_5c6.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_5c7){\n
new v.Move(_5c7.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(_5c8){\n
new v.Move(_5c8.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(_5c9){\n
new v.Move(_5c9.element,_5bf);\n
}});\n
}});\n
}});\n
}});\n
}});\n
};\n
MochiKit.Visual.slideDown=function(_5ca,_5cb){\n
var d=MochiKit.DOM;\n
var b=MochiKit.Base;\n
var s=MochiKit.Style;\n
_5ca=d.getElement(_5ca);\n
if(!_5ca.firstChild){\n
throw "MochiKit.Visual.slideDown must be used on a element with a child";\n
}\n
d.removeEmptyTextNodes(_5ca);\n
var _5cf=s.getStyle(_5ca.firstChild,"bottom")||0;\n
var _5d0=s.getElementDimensions(_5ca);\n
var _5d1;\n
_5cb=b.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_5d0.h,originalWidth:_5d0.w},restoreAfterFinish:true,afterSetupInternal:function(_5d2){\n
d.makePositioned(_5d2.element);\n
d.makePositioned(_5d2.element.firstChild);\n
if(/Opera/.test(navigator.userAgent)){\n
s.setStyle(_5d2.element,{top:""});\n
}\n
_5d1=d.makeClipping(_5d2.element);\n
s.setStyle(_5d2.element,{height:"0px"});\n
s.showElement(_5d2.element);\n
},afterUpdateInternal:function(_5d3){\n
s.setStyle(_5d3.element.firstChild,{bottom:(_5d3.dims[0]-_5d3.element.clientHeight)+"px"});\n
},afterFinishInternal:function(_5d4){\n
d.undoClipping(_5d4.element,_5d1);\n
if(/MSIE/.test(navigator.userAgent)){\n
d.undoPositioned(_5d4.element);\n
d.undoPositioned(_5d4.element.firstChild);\n
}else{\n
d.undoPositioned(_5d4.element.firstChild);\n
d.undoPositioned(_5d4.element);\n
}\n
s.setStyle(_5d4.element.firstChild,{bottom:_5cf});\n
}},_5cb);\n
return new MochiKit.Visual.Scale(_5ca,100,_5cb);\n
};\n
MochiKit.Visual.slideUp=function(_5d5,_5d6){\n
var d=MochiKit.DOM;\n
var b=MochiKit.Base;\n
var s=MochiKit.Style;\n
_5d5=d.getElement(_5d5);\n
if(!_5d5.firstChild){\n
throw "MochiKit.Visual.slideUp must be used on a element with a child";\n
}\n
d.removeEmptyTextNodes(_5d5);\n
var _5da=s.getStyle(_5d5.firstChild,"bottom");\n
var _5db;\n
_5d6=b.update({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_5dc){\n
d.makePositioned(_5dc.element);\n
d.makePositioned(_5dc.element.firstChild);\n
if(/Opera/.test(navigator.userAgent)){\n
s.setStyle(_5dc.element,{top:""});\n
}\n
_5db=d.makeClipping(_5dc.element);\n
s.showElement(_5dc.element);\n
},afterUpdateInternal:function(_5dd){\n
s.setStyle(_5dd.element.firstChild,{bottom:(_5dd.dims[0]-_5dd.element.clientHeight)+"px"});\n
},afterFinishInternal:function(_5de){\n
s.hideElement(_5de.element);\n
d.undoClipping(_5de.element,_5db);\n
d.undoPositioned(_5de.element.firstChild);\n
d.undoPositioned(_5de.element);\n
s.setStyle(_5de.element.firstChild,{bottom:_5da});\n
}},_5d6);\n
return new MochiKit.Visual.Scale(_5d5,0,_5d6);\n
};\n
MochiKit.Visual.squish=function(_5df,_5e0){\n
var d=MochiKit.DOM;\n
var b=MochiKit.Base;\n
var _5e3;\n
_5e0=b.update({restoreAfterFinish:true,beforeSetupInternal:function(_5e4){\n
_5e3=d.makeClipping(_5e4.element);\n
},afterFinishInternal:function(_5e5){\n
MochiKit.Style.hideElement(_5e5.element);\n
d.undoClipping(_5e5.element,_5e3);\n
}},_5e0);\n
return new MochiKit.Visual.Scale(_5df,/Opera/.test(navigator.userAgent)?1:0,_5e0);\n
};\n
MochiKit.Visual.grow=function(_5e6,_5e7){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var s=MochiKit.Style;\n
_5e6=d.getElement(_5e6);\n
_5e7=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.full,scaleContent:true,scaleFromCenter:false},_5e7);\n
var _5eb={top:_5e6.style.top,left:_5e6.style.left,height:_5e6.style.height,width:_5e6.style.width,opacity:s.getStyle(_5e6,"opacity")};\n
var dims=s.getElementDimensions(_5e6);\n
var _5ed,_5ee;\n
var _5ef,_5f0;\n
switch(_5e7.direction){\n
case "top-left":\n
_5ed=_5ee=_5ef=_5f0=0;\n
break;\n
case "top-right":\n
_5ed=dims.w;\n
_5ee=_5f0=0;\n
_5ef=-dims.w;\n
break;\n
case "bottom-left":\n
_5ed=_5ef=0;\n
_5ee=dims.h;\n
_5f0=-dims.h;\n
break;\n
case "bottom-right":\n
_5ed=dims.w;\n
_5ee=dims.h;\n
_5ef=-dims.w;\n
_5f0=-dims.h;\n
break;\n
case "center":\n
_5ed=dims.w/2;\n
_5ee=dims.h/2;\n
_5ef=-dims.w/2;\n
_5f0=-dims.h/2;\n
break;\n
}\n
var _5f1=MochiKit.Base.update({beforeSetupInternal:function(_5f2){\n
s.setStyle(_5f2.effects[0].element,{height:"0px"});\n
s.showElement(_5f2.effects[0].element);\n
},afterFinishInternal:function(_5f3){\n
d.undoClipping(_5f3.effects[0].element);\n
d.undoPositioned(_5f3.effects[0].element);\n
s.setStyle(_5f3.effects[0].element,_5eb);\n
}},_5e7);\n
return new v.Move(_5e6,{x:_5ed,y:_5ee,duration:0.01,beforeSetupInternal:function(_5f4){\n
s.hideElement(_5f4.element);\n
d.makeClipping(_5f4.element);\n
d.makePositioned(_5f4.element);\n
},afterFinishInternal:function(_5f5){\n
new v.Parallel([new v.Opacity(_5f5.element,{sync:true,to:1,from:0,transition:_5e7.opacityTransition}),new v.Move(_5f5.element,{x:_5ef,y:_5f0,sync:true,transition:_5e7.moveTransition}),new v.Scale(_5f5.element,100,{scaleMode:{originalHeight:dims.h,originalWidth:dims.w},sync:true,scaleFrom:/Opera/.test(navigator.userAgent)?1:0,transition:_5e7.scaleTransition,scaleContent:_5e7.scaleContent,scaleFromCenter:_5e7.scaleFromCenter,restoreAfterFinish:true})],_5f1);\n
}});\n
};\n
MochiKit.Visual.shrink=function(_5f6,_5f7){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var s=MochiKit.Style;\n
_5f6=d.getElement(_5f6);\n
_5f7=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.none,scaleContent:true,scaleFromCenter:false},_5f7);\n
var _5fb={top:_5f6.style.top,left:_5f6.style.left,height:_5f6.style.height,width:_5f6.style.width,opacity:s.getStyle(_5f6,"opacity")};\n
var dims=s.getElementDimensions(_5f6);\n
var _5fd,_5fe;\n
switch(_5f7.direction){\n
case "top-left":\n
_5fd=_5fe=0;\n
break;\n
case "top-right":\n
_5fd=dims.w;\n
_5fe=0;\n
break;\n
case "bottom-left":\n
_5fd=0;\n
_5fe=dims.h;\n
break;\n
case "bottom-right":\n
_5fd=dims.w;\n
_5fe=dims.h;\n
break;\n
case "center":\n
_5fd=dims.w/2;\n
_5fe=dims.h/2;\n
break;\n
}\n
var _5ff;\n
var _600=MochiKit.Base.update({beforeStartInternal:function(_601){\n
_5ff=d.makePositioned(_601.effects[0].element);\n
d.makeClipping(_601.effects[0].element);\n
},afterFinishInternal:function(_602){\n
s.hideElement(_602.effects[0].element);\n
d.undoClipping(_602.effects[0].element,_5ff);\n
d.undoPositioned(_602.effects[0].element);\n
s.setStyle(_602.effects[0].element,_5fb);\n
}},_5f7);\n
return new v.Parallel([new v.Opacity(_5f6,{sync:true,to:0,from:1,transition:_5f7.opacityTransition}),new v.Scale(_5f6,/Opera/.test(navigator.userAgent)?1:0,{sync:true,transition:_5f7.scaleTransition,scaleContent:_5f7.scaleContent,scaleFromCenter:_5f7.scaleFromCenter,restoreAfterFinish:true}),new v.Move(_5f6,{x:_5fd,y:_5fe,sync:true,transition:_5f7.moveTransition})],_600);\n
};\n
MochiKit.Visual.pulsate=function(_603,_604){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var b=MochiKit.Base;\n
var _608=MochiKit.Style.getStyle(_603,"opacity");\n
_604=b.update({duration:3,from:0,afterFinishInternal:function(_609){\n
MochiKit.Style.setStyle(_609.element,{"opacity":_608});\n
}},_604);\n
var _60a=_604.transition||v.Transitions.sinoidal;\n
_604.transition=function(pos){\n
return _60a(1-v.Transitions.pulse(pos,_604.pulses));\n
};\n
return new v.Opacity(_603,_604);\n
};\n
MochiKit.Visual.fold=function(_60c,_60d){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var s=MochiKit.Style;\n
_60c=d.getElement(_60c);\n
var _611={top:_60c.style.top,left:_60c.style.left,width:_60c.style.width,height:_60c.style.height};\n
var _612=d.makeClipping(_60c);\n
_60d=MochiKit.Base.update({scaleContent:false,scaleX:false,afterFinishInternal:function(_613){\n
new v.Scale(_60c,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(_614){\n
s.hideElement(_614.element);\n
d.undoClipping(_614.element,_612);\n
s.setStyle(_614.element,_611);\n
}});\n
}},_60d);\n
return new v.Scale(_60c,5,_60d);\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","tagifyText","multiple","toggle","Parallel","Opacity","Move","Scale","Highlight","ScrollTo","Morph","fade","appear","puff","blindUp","blindDown","switchOff","dropOut","shake","slideDown","slideUp","squish","grow","shrink","pulsate","fold"];\n
MochiKit.Visual.EXPORT_OK=["Base","PAIRS"];\n
MochiKit.Visual.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Visual);\n
MochiKit.Base._deps("DragAndDrop",["Base","Iter","DOM","Signal","Visual","Position"]);\n
MochiKit.DragAndDrop.NAME="MochiKit.DragAndDrop";\n
MochiKit.DragAndDrop.VERSION="1.4";\n
MochiKit.DragAndDrop.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.DragAndDrop.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.DragAndDrop.EXPORT=["Droppable","Draggable"];\n
MochiKit.DragAndDrop.EXPORT_OK=["Droppables","Draggables"];\n
MochiKit.DragAndDrop.Droppables={drops:[],remove:function(_616){\n
this.drops=MochiKit.Base.filter(function(d){\n
return d.element!=MochiKit.DOM.getElement(_616);\n
},this.drops);\n
},register:function(drop){\n
this.drops.push(drop);\n
},unregister:function(drop){\n
this.drops=MochiKit.Base.filter(function(d){\n
return d!=drop;\n
},this.drops);\n
},prepare:function(_61b){\n
MochiKit.Base.map(function(drop){\n
if(drop.isAccepted(_61b)){\n
if(drop.options.activeclass){\n
MochiKit.DOM.addElementClass(drop.element,drop.options.activeclass);\n
}\n
drop.options.onactive(drop.element,_61b);\n
}\n
},this.drops);\n
},findDeepestChild:function(_61d){\n
deepest=_61d[0];\n
for(i=1;i<_61d.length;++i){\n
if(MochiKit.DOM.isParent(_61d[i].element,deepest.element)){\n
deepest=_61d[i];\n
}\n
}\n
return deepest;\n
},show:function(_61e,_61f){\n
if(!this.drops.length){\n
return;\n
}\n
var _620=[];\n
if(this.last_active){\n
this.last_active.deactivate();\n
}\n
MochiKit.Iter.forEach(this.drops,function(drop){\n
if(drop.isAffected(_61e,_61f)){\n
_620.push(drop);\n
}\n
});\n
if(_620.length>0){\n
drop=this.findDeepestChild(_620);\n
MochiKit.Position.within(drop.element,_61e.page.x,_61e.page.y);\n
drop.options.onhover(_61f,drop.element,MochiKit.Position.overlap(drop.options.overlap,drop.element));\n
drop.activate();\n
}\n
},fire:function(_622,_623){\n
if(!this.last_active){\n
return;\n
}\n
MochiKit.Position.prepare();\n
if(this.last_active.isAffected(_622.mouse(),_623)){\n
this.last_active.options.ondrop(_623,this.last_active.element,_622);\n
}\n
},reset:function(_624){\n
MochiKit.Base.map(function(drop){\n
if(drop.options.activeclass){\n
MochiKit.DOM.removeElementClass(drop.element,drop.options.activeclass);\n
}\n
drop.options.ondesactive(drop.element,_624);\n
},this.drops);\n
if(this.last_active){\n
this.last_active.deactivate();\n
}\n
}};\n
MochiKit.DragAndDrop.Droppable=function(_626,_627){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_626,_627);\n
}\n
this.__init__(_626,_627);\n
};\n
MochiKit.DragAndDrop.Droppable.prototype={__class__:MochiKit.DragAndDrop.Droppable,__init__:function(_629,_62a){\n
var d=MochiKit.DOM;\n
var b=MochiKit.Base;\n
this.element=d.getElement(_629);\n
this.options=b.update({greedy:true,hoverclass:null,activeclass:null,hoverfunc:b.noop,accept:null,onactive:b.noop,ondesactive:b.noop,onhover:b.noop,ondrop:b.noop,containment:[],tree:false},_62a);\n
this.options._containers=[];\n
b.map(MochiKit.Base.bind(function(c){\n
this.options._containers.push(d.getElement(c));\n
},this),this.options.containment);\n
d.makePositioned(this.element);\n
MochiKit.DragAndDrop.Droppables.register(this);\n
},isContained:function(_62e){\n
if(this.options._containers.length){\n
var _62f;\n
if(this.options.tree){\n
_62f=_62e.treeNode;\n
}else{\n
_62f=_62e.parentNode;\n
}\n
return MochiKit.Iter.some(this.options._containers,function(c){\n
return _62f==c;\n
});\n
}else{\n
return true;\n
}\n
},isAccepted:function(_631){\n
return ((!this.options.accept)||MochiKit.Iter.some(this.options.accept,function(c){\n
return MochiKit.DOM.hasElementClass(_631,c);\n
}));\n
},isAffected:function(_633,_634){\n
return ((this.element!=_634)&&this.isContained(_634)&&this.isAccepted(_634)&&MochiKit.Position.within(this.element,_633.page.x,_633.page.y));\n
},deactivate:function(){\n
if(this.options.hoverclass){\n
MochiKit.DOM.removeElementClass(this.element,this.options.hoverclass);\n
}\n
this.options.hoverfunc(this.element,false);\n
MochiKit.DragAndDrop.Droppables.last_active=null;\n
},activate:function(){\n
if(this.options.hoverclass){\n
MochiKit.DOM.addElementClass(this.element,this.options.hoverclass);\n
}\n
this.options.hoverfunc(this.element,true);\n
MochiKit.DragAndDrop.Droppables.last_active=this;\n
},destroy:function(){\n
MochiKit.DragAndDrop.Droppables.unregister(this);\n
},repr:function(){\n
return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]";\n
}};\n
MochiKit.DragAndDrop.Draggables={drags:[],register:function(_635){\n
if(this.drags.length===0){\n
var conn=MochiKit.Signal.connect;\n
this.eventMouseUp=conn(document,"onmouseup",this,this.endDrag);\n
this.eventMouseMove=conn(document,"onmousemove",this,this.updateDrag);\n
this.eventKeypress=conn(document,"onkeypress",this,this.keyPress);\n
}\n
this.drags.push(_635);\n
},unregister:function(_637){\n
this.drags=MochiKit.Base.filter(function(d){\n
return d!=_637;\n
},this.drags);\n
if(this.drags.length===0){\n
var disc=MochiKit.Signal.disconnect;\n
disc(this.eventMouseUp);\n
disc(this.eventMouseMove);\n
disc(this.eventKeypress);\n
}\n
},activate:function(_63a){\n
window.focus();\n
this.activeDraggable=_63a;\n
},deactivate:function(){\n
this.activeDraggable=null;\n
},updateDrag:function(_63b){\n
if(!this.activeDraggable){\n
return;\n
}\n
var _63c=_63b.mouse();\n
if(this._lastPointer&&(MochiKit.Base.repr(this._lastPointer.page)==MochiKit.Base.repr(_63c.page))){\n
return;\n
}\n
this._lastPointer=_63c;\n
this.activeDraggable.updateDrag(_63b,_63c);\n
},endDrag:function(_63d){\n
if(!this.activeDraggable){\n
return;\n
}\n
this._lastPointer=null;\n
this.activeDraggable.endDrag(_63d);\n
this.activeDraggable=null;\n
},keyPress:function(_63e){\n
if(this.activeDraggable){\n
this.activeDraggable.keyPress(_63e);\n
}\n
},notify:function(_63f,_640,_641){\n
MochiKit.Signal.signal(this,_63f,_640,_641);\n
}};\n
MochiKit.DragAndDrop.Draggable=function(_642,_643){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_642,_643);\n
}\n
this.__init__(_642,_643);\n
};\n
MochiKit.DragAndDrop.Draggable.prototype={__class__:MochiKit.DragAndDrop.Draggable,__init__:function(_645,_646){\n
var v=MochiKit.Visual;\n
var b=MochiKit.Base;\n
_646=b.update({handle:false,starteffect:function(_649){\n
this._savedOpacity=MochiKit.Style.getStyle(_649,"opacity")||1;\n
new v.Opacity(_649,{duration:0.2,from:this._savedOpacity,to:0.7});\n
},reverteffect:function(_64a,_64b,_64c){\n
var dur=Math.sqrt(Math.abs(_64b^2)+Math.abs(_64c^2))*0.02;\n
return new v.Move(_64a,{x:-_64c,y:-_64b,duration:dur});\n
},endeffect:function(_64e){\n
new v.Opacity(_64e,{duration:0.2,from:0.7,to:this._savedOpacity});\n
},onchange:b.noop,zindex:1000,revert:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false},_646);\n
var d=MochiKit.DOM;\n
this.element=d.getElement(_645);\n
if(_646.handle&&(typeof (_646.handle)=="string")){\n
this.handle=d.getFirstElementByTagAndClassName(null,_646.handle,this.element);\n
}\n
if(!this.handle){\n
this.handle=d.getElement(_646.handle);\n
}\n
if(!this.handle){\n
this.handle=this.element;\n
}\n
if(_646.scroll&&!_646.scroll.scrollTo&&!_646.scroll.outerHTML){\n
_646.scroll=d.getElement(_646.scroll);\n
this._isScrollChild=MochiKit.DOM.isChildNode(this.element,_646.scroll);\n
}\n
d.makePositioned(this.element);\n
this.delta=this.currentDelta();\n
this.options=_646;\n
this.dragging=false;\n
this.eventMouseDown=MochiKit.Signal.connect(this.handle,"onmousedown",this,this.initDrag);\n
MochiKit.DragAndDrop.Draggables.register(this);\n
},destroy:function(){\n
MochiKit.Signal.disconnect(this.eventMouseDown);\n
MochiKit.DragAndDrop.Draggables.unregister(this);\n
},currentDelta:function(){\n
var s=MochiKit.Style.getStyle;\n
return [parseInt(s(this.element,"left")||"0"),parseInt(s(this.element,"top")||"0")];\n
},initDrag:function(_651){\n
if(!_651.mouse().button.left){\n
return;\n
}\n
var src=_651.target();\n
var _653=(src.tagName||"").toUpperCase();\n
if(_653==="INPUT"||_653==="SELECT"||_653==="OPTION"||_653==="BUTTON"||_653==="TEXTAREA"){\n
return;\n
}\n
if(this._revert){\n
this._revert.cancel();\n
this._revert=null;\n
}\n
var _654=_651.mouse();\n
var pos=MochiKit.Position.cumulativeOffset(this.element);\n
this.offset=[_654.page.x-pos.x,_654.page.y-pos.y];\n
MochiKit.DragAndDrop.Draggables.activate(this);\n
_651.stop();\n
},startDrag:function(_656){\n
this.dragging=true;\n
if(this.options.selectclass){\n
MochiKit.DOM.addElementClass(this.element,this.options.selectclass);\n
}\n
if(this.options.zindex){\n
this.originalZ=parseInt(MochiKit.Style.getStyle(this.element,"z-index")||"0");\n
this.element.style.zIndex=this.options.zindex;\n
}\n
if(this.options.ghosting){\n
this._clone=this.element.cloneNode(true);\n
this.ghostPosition=MochiKit.Position.absolutize(this.element);\n
this.element.parentNode.insertBefore(this._clone,this.element);\n
}\n
if(this.options.scroll){\n
if(this.options.scroll==window){\n
var _657=this._getWindowScroll(this.options.scroll);\n
this.originalScrollLeft=_657.left;\n
this.originalScrollTop=_657.top;\n
}else{\n
this.originalScrollLeft=this.options.scroll.scrollLeft;\n
this.originalScrollTop=this.options.scroll.scrollTop;\n
}\n
}\n
MochiKit.DragAndDrop.Droppables.prepare(this.element);\n
MochiKit.DragAndDrop.Draggables.notify("start",this,_656);\n
if(this.options.starteffect){\n
this.options.starteffect(this.element);\n
}\n
},updateDrag:function(_658,_659){\n
if(!this.dragging){\n
this.startDrag(_658);\n
}\n
MochiKit.Position.prepare();\n
MochiKit.DragAndDrop.Droppables.show(_659,this.element);\n
MochiKit.DragAndDrop.Draggables.notify("drag",this,_658);\n
this.draw(_659);\n
this.options.onchange(this);\n
if(this.options.scroll){\n
this.stopScrolling();\n
var p,q;\n
if(this.options.scroll==window){\n
var s=this._getWindowScroll(this.options.scroll);\n
p=new MochiKit.Style.Coordinates(s.left,s.top);\n
q=new MochiKit.Style.Coordinates(s.left+s.width,s.top+s.height);\n
}else{\n
p=MochiKit.Position.page(this.options.scroll);\n
p.x+=this.options.scroll.scrollLeft;\n
p.y+=this.options.scroll.scrollTop;\n
p.x+=(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0);\n
p.y+=(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);\n
q=new MochiKit.Style.Coordinates(p.x+this.options.scroll.offsetWidth,p.y+this.options.scroll.offsetHeight);\n
}\n
var _65d=[0,0];\n
if(_659.page.x>(q.x-this.options.scrollSensitivity)){\n
_65d[0]=_659.page.x-(q.x-this.options.scrollSensitivity);\n
}else{\n
if(_659.page.x<(p.x+this.options.scrollSensitivity)){\n
_65d[0]=_659.page.x-(p.x+this.options.scrollSensitivity);\n
}\n
}\n
if(_659.page.y>(q.y-this.options.scrollSensitivity)){\n
_65d[1]=_659.page.y-(q.y-this.options.scrollSensitivity);\n
}else{\n
if(_659.page.y<(p.y+this.options.scrollSensitivity)){\n
_65d[1]=_659.page.y-(p.y+this.options.scrollSensitivity);\n
}\n
}\n
this.startScrolling(_65d);\n
}\n
if(/AppleWebKit/.test(navigator.appVersion)){\n
window.scrollBy(0,0);\n
}\n
_658.stop();\n
},finishDrag:function(_65e,_65f){\n
var dr=MochiKit.DragAndDrop;\n
this.dragging=false;\n
if(this.options.selectclass){\n
MochiKit.DOM.removeElementClass(this.element,this.options.selectclass);\n
}\n
if(this.options.ghosting){\n
MochiKit.Position.relativize(this.element,this.ghostPosition);\n
MochiKit.DOM.removeElement(this._clone);\n
this._clone=null;\n
}\n
if(_65f){\n
dr.Droppables.fire(_65e,this.element);\n
}\n
dr.Draggables.notify("end",this,_65e);\n
var _661=this.options.revert;\n
if(_661&&typeof (_661)=="function"){\n
_661=_661(this.element);\n
}\n
var d=this.currentDelta();\n
if(_661&&this.options.reverteffect){\n
this._revert=this.options.reverteffect(this.element,d[1]-this.delta[1],d[0]-this.delta[0]);\n
}else{\n
this.delta=d;\n
}\n
if(this.options.zindex){\n
this.element.style.zIndex=this.originalZ;\n
}\n
if(this.options.endeffect){\n
this.options.endeffect(this.element);\n
}\n
dr.Draggables.deactivate();\n
dr.Droppables.reset(this.element);\n
},keyPress:function(_663){\n
if(_663.key().string!="KEY_ESCAPE"){\n
return;\n
}\n
this.finishDrag(_663,false);\n
_663.stop();\n
},endDrag:function(_664){\n
if(!this.dragging){\n
return;\n
}\n
this.stopScrolling();\n
this.finishDrag(_664,true);\n
_664.stop();\n
},draw:function(_665){\n
var pos=MochiKit.Position.cumulativeOffset(this.element);\n
var d=this.currentDelta();\n
pos.x-=d[0];\n
pos.y-=d[1];\n
if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){\n
pos.x-=this.options.scroll.scrollLeft-this.originalScrollLeft;\n
pos.y-=this.options.scroll.scrollTop-this.originalScrollTop;\n
}\n
var p=[_665.page.x-pos.x-this.offset[0],_665.page.y-pos.y-this.offset[1]];\n
if(this.options.snap){\n
if(typeof (this.options.snap)=="function"){\n
p=this.options.snap(p[0],p[1]);\n
}else{\n
if(this.options.snap instanceof Array){\n
var i=-1;\n
p=MochiKit.Base.map(MochiKit.Base.bind(function(v){\n
i+=1;\n
return Math.round(v/this.options.snap[i])*this.options.snap[i];\n
},this),p);\n
}else{\n
p=MochiKit.Base.map(MochiKit.Base.bind(function(v){\n
return Math.round(v/this.options.snap)*this.options.snap;\n
},this),p);\n
}\n
}\n
}\n
var _66c=this.element.style;\n
if((!this.options.constraint)||(this.options.constraint=="horizontal")){\n
_66c.left=p[0]+"px";\n
}\n
if((!this.options.constraint)||(this.options.constraint=="vertical")){\n
_66c.top=p[1]+"px";\n
}\n
if(_66c.visibility=="hidden"){\n
_66c.visibility="";\n
}\n
},stopScrolling:function(){\n
if(this.scrollInterval){\n
clearInterval(this.scrollInterval);\n
this.scrollInterval=null;\n
MochiKit.DragAndDrop.Draggables._lastScrollPointer=null;\n
}\n
},startScrolling:function(_66d){\n
if(!_66d[0]&&!_66d[1]){\n
return;\n
}\n
this.scrollSpeed=[_66d[0]*this.options.scrollSpeed,_66d[1]*this.options.scrollSpeed];\n
this.lastScrolled=new Date();\n
this.scrollInterval=setInterval(MochiKit.Base.bind(this.scroll,this),10);\n
},scroll:function(){\n
var _66e=new Date();\n
var _66f=_66e-this.lastScrolled;\n
this.lastScrolled=_66e;\n
if(this.options.scroll==window){\n
var s=this._getWindowScroll(this.options.scroll);\n
if(this.scrollSpeed[0]||this.scrollSpeed[1]){\n
var dm=_66f/1000;\n
this.options.scroll.scrollTo(s.left+dm*this.scrollSpeed[0],s.top+dm*this.scrollSpeed[1]);\n
}\n
}else{\n
this.options.scroll.scrollLeft+=this.scrollSpeed[0]*_66f/1000;\n
this.options.scroll.scrollTop+=this.scrollSpeed[1]*_66f/1000;\n
}\n
var d=MochiKit.DragAndDrop;\n
MochiKit.Position.prepare();\n
d.Droppables.show(d.Draggables._lastPointer,this.element);\n
d.Draggables.notify("drag",this);\n
if(this._isScrollChild){\n
d.Draggables._lastScrollPointer=d.Draggables._lastScrollPointer||d.Draggables._lastPointer;\n
d.Draggables._lastScrollPointer.x+=this.scrollSpeed[0]*_66f/1000;\n
d.Draggables._lastScrollPointer.y+=this.scrollSpeed[1]*_66f/1000;\n
if(d.Draggables._lastScrollPointer.x<0){\n
d.Draggables._lastScrollPointer.x=0;\n
}\n
if(d.Draggables._lastScrollPointer.y<0){\n
d.Draggables._lastScrollPointer.y=0;\n
}\n
this.draw(d.Draggables._lastScrollPointer);\n
}\n
this.options.onchange(this);\n
},_getWindowScroll:function(win){\n
var vp,w,h;\n
MochiKit.DOM.withWindow(win,function(){\n
vp=MochiKit.Style.getViewportPosition(win.document);\n
});\n
if(win.innerWidth){\n
w=win.innerWidth;\n
h=win.innerHeight;\n
}else{\n
if(win.document.documentElement&&win.document.documentElement.clientWidth){\n
w=win.document.documentElement.clientWidth;\n
h=win.document.documentElement.clientHeight;\n
}else{\n
w=win.document.body.offsetWidth;\n
h=win.document.body.offsetHeight;\n
}\n
}\n
return {top:vp.y,left:vp.x,width:w,height:h};\n
},repr:function(){\n
return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]";\n
}};\n
MochiKit.DragAndDrop.__new__=function(){\n
MochiKit.Base.nameFunctions(this);\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};\n
};\n
MochiKit.DragAndDrop.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.DragAndDrop);\n
MochiKit.Base._deps("Sortable",["Base","Iter","DOM","Position","DragAndDrop"]);\n
MochiKit.Sortable.NAME="MochiKit.Sortable";\n
MochiKit.Sortable.VERSION="1.4";\n
MochiKit.Sortable.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Sortable.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Sortable.EXPORT=[];\n
MochiKit.Sortable.EXPORT_OK=[];\n
MochiKit.Base.update(MochiKit.Sortable,{sortables:{},_findRootElement:function(_677){\n
while(_677.tagName.toUpperCase()!="BODY"){\n
if(_677.id&&MochiKit.Sortable.sortables[_677.id]){\n
return _677;\n
}\n
_677=_677.parentNode;\n
}\n
},options:function(_678){\n
_678=MochiKit.Sortable._findRootElement(MochiKit.DOM.getElement(_678));\n
if(!_678){\n
return;\n
}\n
return MochiKit.Sortable.sortables[_678.id];\n
},destroy:function(_679){\n
var s=MochiKit.Sortable.options(_679);\n
var b=MochiKit.Base;\n
var d=MochiKit.DragAndDrop;\n
if(s){\n
MochiKit.Signal.disconnect(s.startHandle);\n
MochiKit.Signal.disconnect(s.endHandle);\n
b.map(function(dr){\n
d.Droppables.remove(dr);\n
},s.droppables);\n
b.map(function(dr){\n
dr.destroy();\n
},s.draggables);\n
delete MochiKit.Sortable.sortables[s.element.id];\n
}\n
},create:function(_67f,_680){\n
_67f=MochiKit.DOM.getElement(_67f);\n
var self=MochiKit.Sortable;\n
_680=MochiKit.Base.update({element:_67f,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:[_67f],handle:false,only:false,hoverclass:null,ghosting:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:/^[^_]*_(.*)$/,onChange:MochiKit.Base.noop,onUpdate:MochiKit.Base.noop,accept:null},_680);\n
self.destroy(_67f);\n
var _682={revert:true,ghosting:_680.ghosting,scroll:_680.scroll,scrollSensitivity:_680.scrollSensitivity,scrollSpeed:_680.scrollSpeed,constraint:_680.constraint,handle:_680.handle};\n
if(_680.starteffect){\n
_682.starteffect=_680.starteffect;\n
}\n
if(_680.reverteffect){\n
_682.reverteffect=_680.reverteffect;\n
}else{\n
if(_680.ghosting){\n
_682.reverteffect=function(_683){\n
_683.style.top=0;\n
_683.style.left=0;\n
};\n
}\n
}\n
if(_680.endeffect){\n
_682.endeffect=_680.endeffect;\n
}\n
if(_680.zindex){\n
_682.zindex=_680.zindex;\n
}\n
var _684={overlap:_680.overlap,containment:_680.containment,hoverclass:_680.hoverclass,onhover:self.onHover,tree:_680.tree,accept:_680.accept};\n
var _685={onhover:self.onEmptyHover,overlap:_680.overlap,containment:_680.containment,hoverclass:_680.hoverclass,accept:_680.accept};\n
MochiKit.DOM.removeEmptyTextNodes(_67f);\n
_680.draggables=[];\n
_680.droppables=[];\n
if(_680.dropOnEmpty||_680.tree){\n
new MochiKit.DragAndDrop.Droppable(_67f,_685);\n
_680.droppables.push(_67f);\n
}\n
MochiKit.Base.map(function(e){\n
var _687=_680.handle?MochiKit.DOM.getFirstElementByTagAndClassName(null,_680.handle,e):e;\n
_680.draggables.push(new MochiKit.DragAndDrop.Draggable(e,MochiKit.Base.update(_682,{handle:_687})));\n
new MochiKit.DragAndDrop.Droppable(e,_684);\n
if(_680.tree){\n
e.treeNode=_67f;\n
}\n
_680.droppables.push(e);\n
},(self.findElements(_67f,_680)||[]));\n
if(_680.tree){\n
MochiKit.Base.map(function(e){\n
new MochiKit.DragAndDrop.Droppable(e,_685);\n
e.treeNode=_67f;\n
_680.droppables.push(e);\n
},(self.findTreeElements(_67f,_680)||[]));\n
}\n
self.sortables[_67f.id]=_680;\n
_680.lastValue=self.serialize(_67f);\n
_680.startHandle=MochiKit.Signal.connect(MochiKit.DragAndDrop.Draggables,"start",MochiKit.Base.partial(self.onStart,_67f));\n
_680.endHandle=MochiKit.Signal.connect(MochiKit.DragAndDrop.Draggables,"end",MochiKit.Base.partial(self.onEnd,_67f));\n
},onStart:function(_689,_68a){\n
var self=MochiKit.Sortable;\n
var _68c=self.options(_689);\n
_68c.lastValue=self.serialize(_68c.element);\n
},onEnd:function(_68d,_68e){\n
var self=MochiKit.Sortable;\n
self.unmark();\n
var _690=self.options(_68d);\n
if(_690.lastValue!=self.serialize(_690.element)){\n
_690.onUpdate(_690.element);\n
}\n
},findElements:function(_691,_692){\n
return MochiKit.Sortable.findChildren(_691,_692.only,_692.tree?true:false,_692.tag);\n
},findTreeElements:function(_693,_694){\n
return MochiKit.Sortable.findChildren(_693,_694.only,_694.tree?true:false,_694.treeTag);\n
},findChildren:function(_695,only,_697,_698){\n
if(!_695.hasChildNodes()){\n
return null;\n
}\n
_698=_698.toUpperCase();\n
if(only){\n
only=MochiKit.Base.flattenArray([only]);\n
}\n
var _699=[];\n
MochiKit.Base.map(function(e){\n
if(e.tagName&&e.tagName.toUpperCase()==_698&&(!only||MochiKit.Iter.some(only,function(c){\n
return MochiKit.DOM.hasElementClass(e,c);\n
}))){\n
_699.push(e);\n
}\n
if(_697){\n
var _69c=MochiKit.Sortable.findChildren(e,only,_697,_698);\n
if(_69c&&_69c.length>0){\n
_699=_699.concat(_69c);\n
}\n
}\n
},_695.childNodes);\n
return _699;\n
},onHover:function(_69d,_69e,_69f){\n
if(MochiKit.DOM.isParent(_69e,_69d)){\n
return;\n
}\n
var self=MochiKit.Sortable;\n
if(_69f>0.33&&_69f<0.66&&self.options(_69e).tree){\n
return;\n
}else{\n
if(_69f>0.5){\n
self.mark(_69e,"before");\n
if(_69e.previousSibling!=_69d){\n
var _6a1=_69d.parentNode;\n
_69d.style.visibility="hidden";\n
_69e.parentNode.insertBefore(_69d,_69e);\n
if(_69e.parentNode!=_6a1){\n
self.options(_6a1).onChange(_69d);\n
}\n
self.options(_69e.parentNode).onChange(_69d);\n
}\n
}else{\n
self.mark(_69e,"after");\n
var _6a2=_69e.nextSibling||null;\n
if(_6a2!=_69d){\n
var _6a1=_69d.parentNode;\n
_69d.style.visibility="hidden";\n
_69e.parentNode.insertBefore(_69d,_6a2);\n
if(_69e.parentNode!=_6a1){\n
self.options(_6a1).onChange(_69d);\n
}\n
self.options(_69e.parentNode).onChange(_69d);\n
}\n
}\n
}\n
},_offsetSize:function(_6a3,type){\n
if(type=="vertical"||type=="height"){\n
return _6a3.offsetHeight;\n
}else{\n
return _6a3.offsetWidth;\n
}\n
},onEmptyHover:function(_6a5,_6a6,_6a7){\n
var _6a8=_6a5.parentNode;\n
var self=MochiKit.Sortable;\n
var _6aa=self.options(_6a6);\n
if(!MochiKit.DOM.isParent(_6a6,_6a5)){\n
var _6ab;\n
var _6ac=self.findElements(_6a6,{tag:_6aa.tag,only:_6aa.only});\n
var _6ad=null;\n
if(_6ac){\n
var _6ae=self._offsetSize(_6a6,_6aa.overlap)*(1-_6a7);\n
for(_6ab=0;_6ab<_6ac.length;_6ab+=1){\n
if(_6ae-self._offsetSize(_6ac[_6ab],_6aa.overlap)>=0){\n
_6ae-=self._offsetSize(_6ac[_6ab],_6aa.overlap);\n
}else{\n
if(_6ae-(self._offsetSize(_6ac[_6ab],_6aa.overlap)/2)>=0){\n
_6ad=_6ab+1<_6ac.length?_6ac[_6ab+1]:null;\n
break;\n
}else{\n
_6ad=_6ac[_6ab];\n
break;\n
}\n
}\n
}\n
}\n
_6a6.insertBefore(_6a5,_6ad);\n
self.options(_6a8).onChange(_6a5);\n
_6aa.onChange(_6a5);\n
}\n
},unmark:function(){\n
var m=MochiKit.Sortable._marker;\n
if(m){\n
MochiKit.Style.hideElement(m);\n
}\n
},mark:function(_6b0,_6b1){\n
var d=MochiKit.DOM;\n
var self=MochiKit.Sortable;\n
var _6b4=self.options(_6b0.parentNode);\n
if(_6b4&&!_6b4.ghosting){\n
return;\n
}\n
if(!self._marker){\n
self._marker=d.getElement("dropmarker")||document.createElement("DIV");\n
MochiKit.Style.hideElement(self._marker);\n
d.addElementClass(self._marker,"dropmarker");\n
self._marker.style.position="absolute";\n
document.getElementsByTagName("body").item(0).appendChild(self._marker);\n
}\n
var _6b5=MochiKit.Position.cumulativeOffset(_6b0);\n
self._marker.style.left=_6b5.x+"px";\n
self._marker.style.top=_6b5.y+"px";\n
if(_6b1=="after"){\n
if(_6b4.overlap=="horizontal"){\n
self._marker.style.left=(_6b5.x+_6b0.clientWidth)+"px";\n
}else{\n
self._marker.style.top=(_6b5.y+_6b0.clientHeight)+"px";\n
}\n
}\n
MochiKit.Style.showElement(self._marker);\n
},_tree:function(_6b6,_6b7,_6b8){\n
var self=MochiKit.Sortable;\n
var _6ba=self.findElements(_6b6,_6b7)||[];\n
for(var i=0;i<_6ba.length;++i){\n
var _6bc=_6ba[i].id.match(_6b7.format);\n
if(!_6bc){\n
continue;\n
}\n
var _6bd={id:encodeURIComponent(_6bc?_6bc[1]:null),element:_6b6,parent:_6b8,children:[],position:_6b8.children.length,container:self._findChildrenElement(_6ba[i],_6b7.treeTag.toUpperCase())};\n
if(_6bd.container){\n
self._tree(_6bd.container,_6b7,_6bd);\n
}\n
_6b8.children.push(_6bd);\n
}\n
return _6b8;\n
},_findChildrenElement:function(_6be,_6bf){\n
if(_6be&&_6be.hasChildNodes){\n
_6bf=_6bf.toUpperCase();\n
for(var i=0;i<_6be.childNodes.length;++i){\n
if(_6be.childNodes[i].tagName.toUpperCase()==_6bf){\n
return _6be.childNodes[i];\n
}\n
}\n
}\n
return null;\n
},tree:function(_6c1,_6c2){\n
_6c1=MochiKit.DOM.getElement(_6c1);\n
var _6c3=MochiKit.Sortable.options(_6c1);\n
_6c2=MochiKit.Base.update({tag:_6c3.tag,treeTag:_6c3.treeTag,only:_6c3.only,name:_6c1.id,format:_6c3.format},_6c2||{});\n
var root={id:null,parent:null,children:new Array,container:_6c1,position:0};\n
return MochiKit.Sortable._tree(_6c1,_6c2,root);\n
},setSequence:function(_6c5,_6c6,_6c7){\n
var self=MochiKit.Sortable;\n
var b=MochiKit.Base;\n
_6c5=MochiKit.DOM.getElement(_6c5);\n
_6c7=b.update(self.options(_6c5),_6c7||{});\n
var _6ca={};\n
b.map(function(n){\n
var m=n.id.match(_6c7.format);\n
if(m){\n
_6ca[m[1]]=[n,n.parentNode];\n
}\n
n.parentNode.removeChild(n);\n
},self.findElements(_6c5,_6c7));\n
b.map(function(_6cd){\n
var n=_6ca[_6cd];\n
if(n){\n
n[1].appendChild(n[0]);\n
delete _6ca[_6cd];\n
}\n
},_6c6);\n
},_constructIndex:function(node){\n
var _6d0="";\n
do{\n
if(node.id){\n
_6d0="["+node.position+"]"+_6d0;\n
}\n
}while((node=node.parent)!=null);\n
return _6d0;\n
},sequence:function(_6d1,_6d2){\n
_6d1=MochiKit.DOM.getElement(_6d1);\n
var self=MochiKit.Sortable;\n
var _6d2=MochiKit.Base.update(self.options(_6d1),_6d2||{});\n
return MochiKit.Base.map(function(item){\n
return item.id.match(_6d2.format)?item.id.match(_6d2.format)[1]:"";\n
},MochiKit.DOM.getElement(self.findElements(_6d1,_6d2)||[]));\n
},serialize:function(_6d5,_6d6){\n
_6d5=MochiKit.DOM.getElement(_6d5);\n
var self=MochiKit.Sortable;\n
_6d6=MochiKit.Base.update(self.options(_6d5),_6d6||{});\n
var name=encodeURIComponent(_6d6.name||_6d5.id);\n
if(_6d6.tree){\n
return MochiKit.Base.flattenArray(MochiKit.Base.map(function(item){\n
return [name+self._constructIndex(item)+"[id]="+encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));\n
},self.tree(_6d5,_6d6).children)).join("&");\n
}else{\n
return MochiKit.Base.map(function(item){\n
return name+"[]="+encodeURIComponent(item);\n
},self.sequence(_6d5,_6d6)).join("&");\n
}\n
}});\n
MochiKit.Sortable.Sortable=MochiKit.Sortable;\n
\n
\n


]]></string> </value>
        </item>
        <item>
            <key> <string>next</string> </key>
            <value>
              <none/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
