define("lib/clerk",function(){var a;(function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(this===void 0||this===null)throw new TypeError;var b=Object(this),c=b.length>>>0;if(c===0)return-1;var d=0;arguments.length>0&&(d=Number(arguments[1]),d!==d?d=0:d!==0&&d!==1/0&&d!==-Infinity&&(d=(d>0||-1)*Math.floor(Math.abs(d))));if(d<c){var e=d<0?Math.max(c-Math.abs(d),0):d;for(;e<c;e++)if(e in b&&b[e]===a)return e;return-1}return-1});var b=function(){var a=[],b={};this._index=function(b,c){c=c===undefined?!0:!1;var d=a.indexOf(b);return d==-1&&c&&(d=a.push(b)-1),d},this._state=function(a){var c=b[a];return c||(b[a]=c={queue:[],flushed:!1}),c},this._istate=function(a,b){return this._state(this._index(a,b))},this._bind=function(a,c){var d,e,f,g;return d=this._index(a,!1),e=this._index(c,!1),d>-1&&e>-1?this._state(d):(e<0?(g=this._istate(a),f=this._index(c)):d<0&&(g=this._istate(c),f=this._index(a)),g.object=c,b[f]=g,g)},this.bind=function(a,b){this._bind(a,b)},this.send=function(a,b,c,d){var e=this._istate(a);e.flushed==1?(e.object&&(arguments[0]=e.object),this._receive.apply(this,Array.prototype.slice.call(arguments,0))):e.queue.push([b,c,d])},this._receive=function(a,b,c,d){c=Array.prototype.slice.call(c,0),typeof b=="string"&&(b=a[b]),d=d||a,b.apply(d,c)},this.receive=function(a,b){var c,d;typeof a!="object"?c=this._bind(a,b):(c=this._istate(a),b=a);if(c.flushed==1)return;while(c.queue[0])d=c.queue.shift(),this._receive.apply(this,[b].concat(d));c.flushed=!0},this.peek=function(a){var b=this._istate(a,!1);if(b)return b.queue}};window.clerk=a=new b})()})