sproutcore-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,19 @@
1
+ SproutCore-Rails
2
+ ================
3
+
4
+ SproutCore 2.0 for Rails 3.1.
5
+
6
+
7
+ Getting started
8
+ ---------------
9
+
10
+ Add the gem to your application Gemfile:
11
+
12
+ gem "sproutcore-rails"
13
+
14
+ Run `bundle install` and add the following line to
15
+ `app/assets/javascripts/application.js`:
16
+
17
+ //= require sproutcore
18
+
19
+
@@ -0,0 +1,4 @@
1
+ module SproutCoreRails
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module SproutCoreRails
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,11 @@
1
+ // ==========================================================================
2
+ // Project: SproutCore - JavaScript Application Framework
3
+ // Copyright: ©2006-2011 Strobe Inc. and contributors.
4
+ // Portions ©2008-2011 Apple Inc. All rights reserved.
5
+ // License: Licensed under MIT license (see license.js)
6
+ // ==========================================================================
7
+
8
+ (function(){var a=function(){var a={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,statements:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,OPEN_PARTIAL:24,params:25,hash:26,param:27,STRING:28,hashSegments:29,hashSegment:30,ID:31,EQUALS:32,pathSegments:33,SEP:34,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",31:"ID",32:"EQUALS",34:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[26,1],[29,2],[29,1],[30,3],[30,3],[21,1],[33,3],[33,1]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=new d.ProgramNode(f[h-2],f[h]);break;case 3:this.$=new d.ProgramNode(f[h]);break;case 4:this.$=new d.ProgramNode([]);break;case 5:this.$=[f[h]];break;case 6:f[h-1].push(f[h]),this.$=f[h-1];break;case 7:this.$=new d.InverseNode(f[h-2],f[h-1],f[h]);break;case 8:this.$=new d.BlockNode(f[h-2],f[h-1],f[h]);break;case 9:this.$=f[h];break;case 10:this.$=f[h];break;case 11:this.$=new d.ContentNode(f[h]);break;case 12:this.$=new d.CommentNode(f[h]);break;case 13:this.$=new d.MustacheNode(f[h-1][0],f[h-1][1]);break;case 14:this.$=new d.MustacheNode(f[h-1][0],f[h-1][1]);break;case 15:this.$=f[h-1];break;case 16:this.$=new d.MustacheNode(f[h-1][0],f[h-1][1]);break;case 17:this.$=new d.MustacheNode(f[h-1][0],f[h-1][1],!0);break;case 18:this.$=new d.PartialNode(f[h-1]);break;case 19:this.$=new d.PartialNode(f[h-2],f[h-1]);break;case 20:break;case 21:this.$=[[f[h-2]].concat(f[h-1]),f[h]];break;case 22:this.$=[[f[h-1]].concat(f[h]),null];break;case 23:this.$=[[f[h-1]],f[h]];break;case 24:this.$=[[f[h]],null];break;case 25:f[h-1].push(f[h]),this.$=f[h-1];break;case 26:this.$=[f[h]];break;case 27:this.$=f[h];break;case 28:this.$=new d.StringNode(f[h]);break;case 29:this.$=new d.HashNode(f[h]);break;case 30:f[h-1].push(f[h]),this.$=f[h-1];break;case 31:this.$=[f[h]];break;case 32:this.$=[f[h-2],f[h]];break;case 33:this.$=[f[h-2],new d.StringNode(f[h])];break;case 34:this.$=new d.IdNode(f[h]);break;case 35:f[h-2].push(f[h]),this.$=f[h-2];break;case 36:this.$=[f[h]]}},table:[{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,31:[1,25],33:24},{17:26,21:23,31:[1,25],33:24},{17:27,21:23,31:[1,25],33:24},{17:28,21:23,31:[1,25],33:24},{21:29,31:[1,25],33:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,31:[1,25],33:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:39,30:42,31:[1,43],33:24},{18:[2,34],28:[2,34],31:[2,34],34:[1,44]},{18:[2,36],28:[2,36],31:[2,36],34:[2,36]},{18:[1,45]},{18:[1,46]},{18:[1,47]},{18:[1,48],21:49,31:[1,25],33:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:50,31:[1,25],33:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:51,27:52,28:[1,41],29:39,30:42,31:[1,43],33:24},{18:[2,23]},{18:[2,26],28:[2,26],31:[2,26]},{18:[2,29],30:53,31:[1,54]},{18:[2,27],28:[2,27],31:[2,27]},{18:[2,28],28:[2,28],31:[2,28]},{18:[2,31],31:[2,31]},{18:[2,36],28:[2,36],31:[2,36],32:[1,55],34:[2,36]},{31:[1,56]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,57]},{18:[1,58]},{18:[2,21]},{18:[2,25],28:[2,25],31:[2,25]},{18:[2,30],31:[2,30]},{32:[1,55]},{21:59,28:[1,60],31:[1,25],33:24},{18:[2,35],28:[2,35],31:[2,35],34:[2,35]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,32],31:[2,32]},{18:[2,33],31:[2,33]}],defaultActions:{16:[2,1],37:[2,23],51:[2,21]},parseError:function(a,b){throw new Error(a)},parse:function(a){function o(){var a;a=b.lexer.lex()||1,typeof a!="number"&&(a=b.symbols_[a]||a);return a}function n(a){c.length=c.length-2*a,d.length=d.length-a,e.length=e.length-a}var b=this,c=[0],d=[null],e=[],f=this.table,g="",h=0,i=0,j=0,k=2,l=1;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var m=this.lexer.yylloc;e.push(m),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var p,q,r,s,t,u,v={},w,x,y,z;for(;;){r=c[c.length-1],this.defaultActions[r]?s=this.defaultActions[r]:(p==null&&(p=o()),s=f[r]&&f[r][p]);if(typeof s=="undefined"||!s.length||!s[0]){if(!j){z=[];for(w in f[r])this.terminals_[w]&&w>2&&z.push("'"+this.terminals_[w]+"'");var A="";this.lexer.showPosition?A="Parse error on line "+(h+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+z.join(", "):A="Parse error on line "+(h+1)+": Unexpected "+(p==1?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(A,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:m,expected:z})}if(j==3){if(p==l)throw new Error(A||"Parsing halted.");i=this.lexer.yyleng,g=this.lexer.yytext,h=this.lexer.yylineno,m=this.lexer.yylloc,p=o()}for(;;){if(k.toString()in f[r])break;if(r==0)throw new Error(A||"Parsing halted.");n(1),r=c[c.length-1]}q=p,p=k,r=c[c.length-1],s=f[r]&&f[r][k],j=3}if(s[0]instanceof Array&&s.length>1)throw new Error("Parse Error: multiple actions possible at state: "+r+", token: "+p);switch(s[0]){case 1:c.push(p),d.push(this.lexer.yytext),e.push(this.lexer.yylloc),c.push(s[1]),p=null,q?(p=q,q=null):(i=this.lexer.yyleng,g=this.lexer.yytext,h=this.lexer.yylineno,m=this.lexer.yylloc,j>0&&j--);break;case 2:x=this.productions_[s[1]][1],v.$=d[d.length-x],v._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},u=this.performAction.call(v,g,i,h,this.yy,s[1],d,e);if(typeof u!="undefined")return u;x&&(c=c.slice(0,-1*x*2),d=d.slice(0,-1*x),e=e.slice(0,-1*x)),c.push(this.productions_[s[1]][0]),d.push(v.$),e.push(v._$),y=f[c[c.length-2]][c[c.length-1]],c.push(y);break;case 3:return!0}}return!0}},f=function(){var a={EOF:1,parseError:function(a,b){if(this.yy.parseError)this.yy.parseError(a,b);else throw new Error(a)},setInput:function(a){this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};return this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.match+=a,this.matched+=a;var b=a.match(/\n/);b&&this.yylineno++,this._input=this._input.slice(1);return a},unput:function(a){this._input=a+this._input;return this},more:function(){this._more=!0;return this},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;a.length<20&&(a+=this._input.substr(0,20-a.length));return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d;this._more||(this.yytext="",this.match="");var e=this._currentRules();for(var f=0;f<e.length;f++){b=this._input.match(this.rules[e[f]]);if(b){d=b[0].match(/\n.*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-1:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,e[f],this.conditionStack[this.conditionStack.length-1]);if(a)return a;return}}if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return typeof a!="undefined"?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules}};a.performAction=function(a,b,c,d){var e=d;switch(c){case 0:this.begin("mu");if(b.yytext)return 14;break;case 1:return 14;case 2:return 24;case 3:return 16;case 4:return 20;case 5:return 19;case 6:return 19;case 7:return 23;case 8:return 23;case 9:b.yytext=b.yytext.substr(3,b.yyleng-5),this.begin("INITIAL");return 15;case 10:return 22;case 11:return 32;case 12:return 31;case 13:return 31;case 14:return 34;case 15:break;case 16:this.begin("INITIAL");return 18;case 17:this.begin("INITIAL");return 18;case 18:b.yytext=b.yytext.substr(1,b.yyleng-2).replace(/\\"/g,'"');return 28;case 19:return 31;case 20:return"INVALID";case 21:return 5}},a.rules=[/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^[a-zA-Z0-9_-]+(?=[=} /.])/,/^./,/^$/],a.conditions={mu:{rules:[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],inclusive:!1},INITIAL:{rules:[0,1,21],inclusive:!0}};return a}();a.lexer=f;return a}();Handlebars={},Handlebars.VERSION="1.0.beta.1",Handlebars.Parser=a,Handlebars.parse=function(a){Handlebars.Parser.yy=Handlebars.AST;return Handlebars.Parser.parse(a)},Handlebars.print=function(a){return(new Handlebars.PrintVisitor).accept(a)},Handlebars.helpers={},Handlebars.partials={},Handlebars.registerHelper=function(a,b,c){c&&(b.not=c),this.helpers[a]=b},Handlebars.registerPartial=function(a,b){this.partials[a]=b},Handlebars.registerHelper("helperMissing",function(a){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+a+"'")}),Handlebars.registerHelper("blockHelperMissing",function(a,b,c){c=c||function(){};var d="",e=Object.prototype.toString.call(a);e==="[object Function]"&&(a=a());if(a===!0)return b(this);if(a===!1||a==null)return c(this);if(e==="[object Array]"){if(a.length>0)for(var f=0,g=a.length;f<g;f++)d=d+b(a[f]);else d=c(this);return d}return b(a)},function(a,b){return b(a)}),Handlebars.registerHelper("each",function(a,b,c){var d="";if(a&&a.length>0)for(var e=0,f=a.length;e<f;e++)d=d+b(a[e]);else d=c(this);return d}),Handlebars.registerHelper("if",function(a,b,c){return!a||a==[]?c(this):b(this)}),Handlebars.registerHelper("unless",function(a,b,c){return Handlebars.helpers["if"].call(this,a,c,b)}),Handlebars.registerHelper("with",function(a,b){return b(a)}),Handlebars.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){}},Handlebars.log=function(a,b){Handlebars.logger.log(a,b)},function(){Handlebars.AST={},Handlebars.AST.ProgramNode=function(a,b){this.type="program",this.statements=a,b&&(this.inverse=new Handlebars.AST.ProgramNode(b))},Handlebars.AST.MustacheNode=function(a,b,c){this.type="mustache",this.id=a[0],this.params=a.slice(1),this.hash=b,this.escaped=!c},Handlebars.AST.PartialNode=function(a,b){this.type="partial",this.id=a,this.context=b};var a=function(a,b){if(a.original!==b.original)throw new Handlebars.Exception(a.original+" doesn't match "+b.original)};Handlebars.AST.BlockNode=function(b,c,d){a(b.id,d),this.type="block",this.mustache=b,this.program=c},Handlebars.AST.InverseNode=function(b,c,d){a(b.id,d),this.type="inverse",this.mustache=b,this.program=c},Handlebars.AST.ContentNode=function(a){this.type="content",this.string=a},Handlebars.AST.HashNode=function(a){this.type="hash",this.pairs=a},Handlebars.AST.IdNode=function(a){this.type="ID",this.original=a.join(".");var b=[],c=0;for(var d=0,e=a.length;d<e;d++){var f=a[d];if(f==="..")c++;else{if(f==="."||f==="this")continue;b.push(f)}}this.parts=b,this.string=b.join("."),this.depth=c,this.isSimple=b.length===1&&c===0},Handlebars.AST.StringNode=function(a){this.type="STRING",this.string=a},Handlebars.AST.CommentNode=function(a){this.type="comment",this.comment=a}}(),Handlebars.Visitor=function(){},Handlebars.Visitor.prototype={accept:function(a){return this[a.type](a)}},Handlebars.Exception=function(a){this.message=a},Handlebars.SafeString=function(a){this.string=a},Handlebars.SafeString.prototype.toString=function(){return this.string.toString()},function(){var a={"<":"&lt;",">":"&gt;"},b=/&(?!\w+;)|[<>]/g,c=/[&<>]/,d=function(b){return a[b]||"&amp;"};Handlebars.Utils={escapeExpression:function(a){if(a instanceof Handlebars.SafeString)return a.toString();if(a==null||a===!1)return"";if(!c.test(a))return a;return a.replace(b,d)},isEmpty:function(a){return typeof a=="undefined"?!0:a===null?!0:a===!1?!0:Object.prototype.toString.call(a)==="[object Array]"&&a.length===0?!0:!1}}}(),Handlebars.Compiler=function(){},Handlebars.JavaScriptCompiler=function(){},function(a,b){a.OPCODE_MAP={appendContent:1,getContext:2,lookupWithHelpers:3,lookup:4,append:5,invokeMustache:6,appendEscaped:7,pushString:8,truthyOrFallback:9,functionOrFallback:10,invokeProgram:11,invokePartial:12,push:13,invokeInverse:14,assignToHash:15,pushStringParam:16},a.MULTI_PARAM_OPCODES={appendContent:1,getContext:1,lookupWithHelpers:1,lookup:1,invokeMustache:2,pushString:1,truthyOrFallback:1,functionOrFallback:1,invokeProgram:2,invokePartial:1,push:1,invokeInverse:1,assignToHash:1,pushStringParam:1},a.DISASSEMBLE_MAP={};for(var c in a.OPCODE_MAP){var d=a.OPCODE_MAP[c];a.DISASSEMBLE_MAP[d]=c}a.multiParamSize=function(b){return a.MULTI_PARAM_OPCODES[a.DISASSEMBLE_MAP[b]]},a.prototype={compiler:a,disassemble:function(){var b=this.opcodes,c,d,e=[],f,g,h;for(var i=0,j=b.length;i<j;i++){c=b[i];if(c==="DECLARE")g=b[++i],h=b[++i],e.push("DECLARE "+g+" = "+h);else{f=a.DISASSEMBLE_MAP[c];var k=a.multiParamSize(c),l=[];for(var m=0;m<k;m++)d=b[++i],typeof d=="string"&&(d='"'+d.replace("\n","\\n")+'"'),l.push(d);f=f+" "+l.join(" "),e.push(f)}}return e.join("\n")},guid:0,compile:function(a,b){this.children=[],this.depths={list:[]},this.options=b||{};return this.program(a)},accept:function(a){return this[a.type](a)},program:function(a){var b=a.statements,c;this.opcodes=[];for(var d=0,e=b.length;d<e;d++)c=b[d],this[c.type](c);this.depths.list=this.depths.list.sort(function(a,b){return a-b});return this},compileProgram:function(a){var b=(new this.compiler).compile(a,this.options),c=this.guid++;this.usePartial=this.usePartial||b.usePartial,this.children[c]=b;for(var d=0,e=b.depths.list.length;d<e;d++){depth=b.depths.list[d];if(depth<2)continue;this.addDepth(depth-1)}return c},block:function(a){var b=a.mustache,c,d,e,f,g=this.setupStackForMustache(b),h=this.compileProgram(a.program);a.program.inverse&&(f=this.compileProgram(a.program.inverse),this.declare("inverse",f)),this.opcode("invokeProgram",h,g.length),this.declare("inverse",null),this.opcode("append")},inverse:function(a){this.ID(a.mustache.id);var b=this.compileProgram(a.program);this.opcode("invokeInverse",b),this.opcode("append")},hash:function(a){var b=a.pairs,c,d;this.opcode("push","{}");for(var e=0,f=b.length;e<f;e++)c=b[e],d=c[1],this.accept(d),this.opcode("assignToHash",c[0])},partial:function(a){var b=a.id;this.usePartial=!0,a.context?this.ID(a.context):this.opcode("push","context"),this.opcode("invokePartial",b.original),this.opcode("append")},content:function(a){this.opcode("appendContent",a.string)},mustache:function(a){var b=this.setupStackForMustache(a);this.opcode("invokeMustache",b.length,a.id.original),a.escaped?this.opcode("appendEscaped"):this.opcode("append")},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth),this.opcode("lookupWithHelpers",a.parts[0]||null);for(var b=1,c=a.parts.length;b<c;b++)this.opcode("lookup",a.parts[b])},STRING:function(a){this.opcode("pushString",a.string)},comment:function(){},pushParams:function(a){var b=a.length,c;while(b--)c=a[b],this.options.stringParams?(c.depth&&this.addDepth(c.depth),this.opcode("getContext",c.depth||0),this.opcode("pushStringParam",c.string)):this[c.type](c)},opcode:function(b,c,d){this.opcodes.push(a.OPCODE_MAP[b]),c!==undefined&&this.opcodes.push(c),d!==undefined&&this.opcodes.push(d)},declare:function(a,b){this.opcodes.push("DECLARE"),this.opcodes.push(a),this.opcodes.push(b)},addDepth:function(a){a!==0&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},setupStackForMustache:function(a){var b=a.params;this.pushParams(b),a.hash?this.hash(a.hash):this.opcode("push","{}"),this.ID(a.id);return b}},b.prototype={nameLookup:function(a,c,d){return b.RESERVED_WORDS[c]||c.indexOf("-")!==-1?a+"['"+c+"']":a+"."+c},appendToBuffer:function(a){return"buffer = buffer + "+a+";"},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b){this.environment=a,this.options=b||{},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.compileChildren(a,b),Handlebars.log(Handlebars.logger.DEBUG,a.disassemble()+"\n\n");var c=a.opcodes,d,e,f,h;this.i=0;for(g=c.length;this.i<g;this.i++)d=this.nextOpcode(0),d[0]==="DECLARE"?(this.i=this.i+2,this[d[1]]=d[2]):(this.i=this.i+d[1].length,this[d[0]].apply(this,d[1]));return this.createFunction()},nextOpcode:function(b){var c=this.environment.opcodes,d=c[this.i+b],e,f,g,h;if(d==="DECLARE"){e=c[this.i+1],f=c[this.i+2];return["DECLARE",e,f]}e=a.DISASSEMBLE_MAP[d],g=a.multiParamSize(d),h=[];for(var i=0;i<g;i++)h.push(c[this.i+i+1+b]);return[e,h]},eat:function(a){this.i=this.i+a.length},preamble:function(){var a=[];a.push("var buffer = "+this.initializeBuffer()+", currentContext = context");var b="helpers = helpers || Handlebars.helpers;";this.environment.usePartial&&(b=b+" partials = partials || Handlebars.partials;"),a.push(b),this.lastContext=0,this.source=a},createFunction:function(){var a={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(a,b,c,d){var e=this.programs[a];if(d)return Handlebars.VM.program(this.children[a],b,c,d);if(e)return e;e=this.programs[a]=Handlebars.VM.program(this.children[a],b,c);return e},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop},b=this.stackVars.concat(this.registers.list);b.length>0&&(this.source[0]=this.source[0]+", "+b.join(", ")),this.source[0]=this.source[0]+";",this.source.push("return buffer;");var c=["Handlebars","context","helpers","partials"];this.options.data&&c.push("data");for(var d=0,e=this.environment.depths.list.length;d<e;d++)c.push("depth"+this.environment.depths.list[d]);c.length===4&&!this.environment.usePartial&&c.pop(),c.push(this.source.join("\n"));var f=Function.apply(this,c);f.displayName="Handlebars.js",Handlebars.log(Handlebars.logger.DEBUG,f.toString()+"\n\n"),a.render=f,a.children=this.environment.children;return function(b,c,d){try{c=c||{};var e=[Handlebars,b,c.helpers,c.partials,c.data],f=Array.prototype.slice.call(arguments,2);e=e.concat(f);return a.render.apply(a,e)}catch(g){throw g}}},appendContent:function(a){this.source.push(this.appendToBuffer(this.quotedString(a)))},append:function(){var a=this.popStack();this.source.push("if("+a+" || "+a+" === 0) { "+this.appendToBuffer(a)+" }")},appendEscaped:function(){var a=this.nextOpcode(1),b="";a[0]==="appendContent"&&(b=" + "+this.quotedString(a[1][0]),this.eat(a)),this.source.push(this.appendToBuffer("this.escapeExpression("+this.popStack()+")"+b))},getContext:function(a){this.lastContext!==a&&(this.lastContext=a,a===0?this.source.push("currentContext = context;"):this.source.push("currentContext = depth"+a+";"))},lookupWithHelpers:function(a){if(a){var b=this.nextStack(),c="if('"+a+"' in helpers) { "+b+" = "+this.nameLookup("helpers",a,"helper")+"; } else { "+b+" = "+this.nameLookup("currentContext",a,"context")+"; }";this.source.push(c)}else this.pushStack("currentContext")},lookup:function(a){var b=this.topStack();this.source.push(b+" = "+this.nameLookup(b,a,"context")+";")},pushStringParam:function(a){this.pushStack("currentContext"),this.pushString(a)},pushString:function(a){this.pushStack(this.quotedString(a))},push:function(a){this.pushStack(a)},invokeMustache:function(a,b){this.populateParams(a,this.quotedString(b),"{}",null,function(a,b,c){this.source.push("else if("+c+"=== undefined) { "+a+" = helpers.helperMissing.call("+b+"); }"),this.source.push("else { "+a+" = "+c+"; }")})},invokeProgram:function(a,b){var c=this.programExpression(this.inverse),d=this.programExpression(a);this.populateParams(b,null,d,c,function(a,b,c){this.source.push("else { "+a+" = helpers.blockHelperMissing.call("+b+"); }")})},populateParams:function(a,b,c,d,e){var f=this.popStack(),g,h=[],i,j,k=this.popStack();this.register("tmp1",c),this.source.push("tmp1.hash = "+k+";"),this.options.stringParams&&this.source.push("tmp1.contexts = [];");for(var l=0;l<a;l++)i=this.popStack(),h.push(i),this.options.stringParams&&this.source.push("tmp1.contexts.push("+this.popStack()+");");d&&(this.source.push("tmp1.fn = tmp1;"),this.source.push("tmp1.inverse = "+d+";")),this.options.data&&this.source.push("tmp1.data = data;"),h.push("tmp1"),d&&h.push(d),this.populateCall(h,f,b||f,e)},populateCall:function(a,b,c,d){var e=["context"].concat(a).join(", "),f=["context"].concat(c).concat(a).join(", ");nextStack=this.nextStack(),this.source.push("if(typeof "+b+" === 'function') { "+nextStack+" = "+b+".call("+e+"); }"),d.call(this,nextStack,f,b)},invokeInverse:function(a){var b=this.programExpression(a),c=["context",this.topStack(),"this.noop",b];this.pushStack("helpers.blockHelperMissing.call("+c.join(", ")+")")},invokePartial:function(a){this.pushStack("this.invokePartial("+this.nameLookup("partials",a,"partial")+", '"+a+"', "+this.popStack()+", helpers, partials);")},assignToHash:function(a){var b=this.popStack(),c=this.topStack();this.source.push(c+"['"+a+"'] = "+b+";")},compiler:b,compileChildren:function(a,b){var c=a.children,d,e,f=[];for(var g=0,h=c.length;g<h;g++)d=c[g],e=new this.compiler,f[g]=e.compile(d,b);a.rawChildren=c,a.children=f},programExpression:function(a){if(a==null)return"this.noop";var b=[a,"helpers","partials"],c=this.environment.rawChildren[a].depths.list;this.options.data&&b.push("data");for(var d=0,e=c.length;d<e;d++)depth=c[d],depth===1?b.push("context"):b.push("depth"+(depth-1));this.environment.usePartial||(b[3]?b[2]="null":b.pop());if(c.length===0)return"this.program("+b.join(", ")+")";b[0]="this.children["+a+"]";return"this.programWithDepth("+b.join(", ")+")"},register:function(a,b){this.useRegister(a),this.source.push(a+" = "+b+";")},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStack:function(a){this.source.push(this.nextStack()+" = "+a+";");return"stack"+this.stackSlot},nextStack:function(){this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot);return"stack"+this.stackSlot},popStack:function(){return"stack"+this.stackSlot--},topStack:function(){return"stack"+this.stackSlot},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'}};var e="break case catch continue default delete do else finally for function if in instanceof new return switch this throw try typeof var void while with null true false".split(" ");compilerWords=b.RESERVED_WORDS={};for(var f=0,g=e.length;f<g;f++)compilerWords[e[f]]=!0}(Handlebars.Compiler,Handlebars.JavaScriptCompiler),Handlebars.VM={programWithDepth:function(a,b,c,d,e){var f=Array.prototype.slice.call(arguments,4);return function(e,g){g=g||{},g={helpers:g.helpers||b,partials:g.partials||c,data:g.data||d};return a.apply(this,[e,g].concat(f))}},program:function(a,b,c,d){return function(e,f){f=f||{};return a(e,{helpers:f.helpers||b,partials:f.partials||c,data:f.data||d})}},noop:function(){return""},compile:function(a,b){var c=Handlebars.parse(a),d=(new Handlebars.Compiler).compile(c,b);return(new Handlebars.JavaScriptCompiler).compile(d,b)},invokePartial:function(a,b,c,d,e){if(a===undefined)throw new Handlebars.Exception("The partial "+b+" could not be found");if(a instanceof Function)return a(c,{helpers:d,partials:e});e[b]=Handlebars.VM.compile(a);return e[b](c,{helpers:d,partials:e})}},Handlebars.compile=Handlebars.VM.compile})(),function(){"undefined"==typeof SC&&(SC={},"undefined"!=typeof window&&(window.SC=window.SproutCore=SproutCore=SC)),SC.VERSION="2.0.alpha",SC.ENV="undefined"==typeof ENV?{}:ENV,window.sc_assert=function(a,b){"function"==typeof b&&(b=b()!==!1);if(!b)throw new Error("assertion failed: "+a)}}(),function(){SC.platform={},SC.platform.create=Object.create;if(!SC.platform.create){var a=function(){},b=a.prototype;SC.platform.create=function(c,d){a.prototype=c,c=new a,a.prototype=b;if(d!==undefined)for(var e in d){if(!d.hasOwnProperty(e))continue;SC.platform.defineProperty(c,e,d[e])}return c},SC.platform.create.isSimulated=!0}SC.platform.defineProperty=Object.defineProperty,SC.platform.hasPropertyAccessors=!0,SC.platform.defineProperty||(SC.platform.hasPropertyAccessors=!!SC.platform.defineProperty,SC.platform.defineProperty=function(a,b,c){sc_assert("property descriptor cannot have `get` or `set` on this platform",!c.get&&!c.set),a[b]=c.value},SC.platform.defineProperty.isSimulated=!0)}(),function(){var a="__sc"+Date.now(),b,c,d;b=0,c=[],d={};var e={configurable:!0,writable:!0,enumerable:!1},f=SC.platform.defineProperty,g=SC.platform.create;SC.GUID_KEY=a,SC.generateGuid=function(c,d){d||(d="sc");var e=d+b++;c&&(c[a]=e);return e},SC.guidFor=function(e){if(e===undefined)return"(undefined)";if(e===null)return"(null)";var f,g,h=typeof e;switch(h){case"number":g=c[e],g||(g=c[e]="nu"+e);return g;case"string":g=d[e],g||(g=d[e]="st"+b++);return g;case"boolean":return e?"(true)":"(false)";default:if(e[a])return e[a];if(e===Object)return"(Object)";if(e===Array)return"(Array)";return SC.generateGuid(e,"sc")}};var h={writable:!0,confgurable:!1,enumerable:!1,value:null},i=SC.GUID_KEY+"_meta";SC.META_KEY=i;var j={descs:{},watching:{}};Object.freeze&&Object.freeze(j),SC.meta=function(a,b){var c=a[i];if(b===!1)return c||j;c?c.source!==a&&(c=a[i]=g(c),c.descs=g(c.descs),c.values=g(c.values),c.watching=g(c.watching),c.lastSetValues={},c.cache={},c.source=a):(f(a,i,h),c=a[i]={descs:{},watching:{},values:{},lastSetValues:{},cache:{},source:a},c.descs.constructor=null);return c},SC.wrap=function(a,b){function c(){}var d=function(){var d,e=this._super;this._super=b||c,d=a.apply(this,arguments),this._super=e;return d};d.base=a;return d},SC.isArray=function(a){if(!a||a.setInterval)return!1;if(Array.isArray&&Array.isArray(a))return!0;if(SC.Array&&SC.Array.detect(a))return!0;if(a.length!==undefined&&"object"==typeof a)return!0;return!1},SC.makeArray=function(a){if(a==null)return[];return SC.isArray(a)?a:[a]}}(),function(){function o(a,d){var e=l.test(d),f=!e&&j.test(d),g;if(!a||f)a=window;e&&(d=d.slice(5));var k=d.indexOf("*");k>0&&d[k-1]!=="."?(a&&b(a,!1).proto!==a?a=h(a,d.slice(0,k)):a=null,d=d.slice(k+1)):a===window&&(g=n(d),a=c(a,g),d=d.slice(g.length+1));if(!d||d.length===0)throw new Error("Invalid Path");i[0]=a,i[1]=d;return i}function n(a){return a.match(m)[0]}function h(a,b){var d=b.length,e,f,g;e=b.indexOf("*");if(e>0&&b[e-1]!==".")return h(h(a,b.slice(0,e)),b.slice(e+1));e=0;while(a&&e<d)f=b.indexOf(".",e),f<0&&(f=d),g=b.slice(e,f),a=g==="*"?a:c(a,g),e=f+1;return a}function g(a){sc_assert("must pass non-empty string to normalizePath()",a&&a!=="");if(a==="*")return a;var b=a[0];if(b===".")return"this"+a;if(b==="*"&&a[1]!==".")return"this."+a.slice(1);return a}var a=SC.platform.hasPropertyAccessors&&SC.ENV.USE_ACCESSORS;SC.USE_ACCESSORS=!!a;var b=SC.meta,c,d;c=function c(a,b){b===undefined&&"string"==typeof a&&(b=a,a=SC);if(!a)return undefined;var c=a[b];c===undefined&&"function"==typeof a.unknownProperty&&(c=a.unknownProperty(b));return c},d=function d(a,b,c){"object"!=typeof a||b in a?a[b]=c:"function"==typeof a.setUnknownProperty?a.setUnknownProperty(b,c):"function"==typeof a.unknownProperty?a.unknownProperty(b,c):a[b]=c;return c};if(!a){var e=c,f=d;c=function(a,c){c===undefined&&"string"==typeof a&&(c=a,a=SC);if(!a)return undefined;var d=b(a,!1).descs[c];return d?d.get(a,c):e(a,c)},d=function(a,c,d){var e=b(a,!1).descs[c];e?e.set(a,c,d):f(a,c,d);return d}}SC.get=c,SC.set=d;var i=[],j=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,k=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]?/,l=/^this[\.\*]/,m=/^([^\.\*]+)/;SC.normalizePath=g,SC.normalizeTuple=function(a,b){return o(a,g(b))},SC.normalizeTuple.primitive=o,SC.getPath=function(a,b){var c,d;!b&&"string"==typeof a&&(b=a,a=null),b=g(b),c=l.test(b),d=!c&&j.test(b);if(!a||c||d||b.indexOf("*")>0){var e=o(a,b);a=e[0],b=e[1]}return h(a,b)},SC.setPath=function(a,b,c){var d;arguments.length===2&&"string"==typeof a&&(c=b,b=a,a=null),b=g(b);if(b.indexOf("*")>0){var e=o(a,b);a=e[0],b=e[1]}if(b.indexOf(".")>0)d=b.slice(b.lastIndexOf(".")+1),b=b.slice(0,b.length-(d.length+1)),!l.test(b)&&k.test(b)&&b.indexOf(".")<0?a=window[b]:b!=="this"&&(a=SC.getPath(a,b));else{if(k.test(b))throw new Error("Invalid Path");d=b}if(!d||d.length===0||d==="*")throw new Error("Invalid Path");return SC.set(a,d,c)}}(),function(){function r(a,b){return b==="toString"?"function"!=typeof a.toString:!!a[b]}function q(a){var b=p[a];b||(b=p[a]=function(b){return m(this,a,b)});return b}function o(a){var b=n[a];b||(b=n[a]=function(){return l(this,a)});return b}function m(a,b,c){var e=d(a),f;f=e.watching[b]>0&&c!==e.values[b],f&&SC.propertyWillChange(a,b),e.values[b]=c,f&&SC.propertyDidChange(a,b);return c}function l(a,b){var c=d(a,!1);return c.source===a&&c.values[b]}var a=SC.USE_ACCESSORS,b=SC.GUID_KEY,c=SC.META_KEY,d=SC.meta,e=SC.platform.create,f=SC.platform.defineProperty,g,h,i={writable:!0,configurable:!0,enumerable:!0,value:null};SC.Descriptor=function(){};var j=SC.Descriptor.prototype;j.set=function(a,b,c){a[b]=c;return c},j.get=function(a,b){return a[b]},j.setup=function(a,b,c){i.value=c,f(a,b,i),i.value=null},j.teardown=function(a,b){return a[b]},j.val=function(a,b){return a[b]},a||(SC.Descriptor.MUST_USE_GETTER=function(){sc_assert("Must use SC.get() to access this property",!1)},SC.Descriptor.MUST_USE_SETTER=function(){sc_assert("Must use SC.set() to access this property",!1)});var k={configurable:!0,enumerable:!0,set:SC.Descriptor.MUST_USE_SETTER},n={},p={};h=new SC.Descriptor,SC.platform.hasPropertyAccessors?(h.get=l,h.set=m,a?h.setup=function(a,b,c){k.get=o(b),k.set=q(b),f(a,b,k),k.get=k.set=null,c!==undefined&&(d(a).values[b]=c)}:h.setup=function(a,b,c){k.get=o(b),f(a,b,k),k.get=null,c!==undefined&&(d(a).values[b]=c)},h.teardown=function(a,b){var c=d(a).values[b];delete d(a).values[b];return c}):h.set=function(a,b,c){var e=d(a),f;f=e.watching[b]>0&&c!==a[b],f&&SC.propertyWillChange(a,b),a[b]=c,f&&SC.propertyDidChange(a,b);return c},SC.SIMPLE_PROPERTY=new SC.Descriptor,g=SC.SIMPLE_PROPERTY,g.unwatched=h.unwatched=g,g.watched=
9
+ h.watched=h,SC.defineProperty=function(a,b,c,e){var h=d(a,!1),i=h.descs,j=h.watching[b]>0;e===undefined?e=r(i,b)?i[b].teardown(a,b):a[b]:r(i,b)&&i[b].teardown(a,b),c||(c=g),c instanceof SC.Descriptor?(h=d(a,!0),i=h.descs,c=(j?c.watched:c.unwatched)||c,i[b]=c,c.setup(a,b,e,j)):(i[b]&&(d(a).descs[b]=null),f(a,b,c));return this},SC.create=function(a,d){var f=e(a,d);b in f&&SC.generateGuid(f,"sc"),c in f&&SC.rewatch(f);return f},SC.createPrototype=function(a,f){var g=e(a,f);d(g,!0).proto=g,b in g&&SC.generateGuid(g,"sc"),c in g&&SC.rewatch(g);return g},SC.destroy=function(a){a[c]&&(a[c]=null)}}(),function(){function n(c,d){var e=d._cacheable,f=d.func;return function(g){var h=a(this,e),i=h.source===this&&h.watching[c]>0,j,k,l;k=d._suspended,d._suspended=this,i=i&&h.lastSetValues[c]!==b(g),i&&(h.lastSetValues[c]=b(g),SC.propertyWillChange(this,c)),e&&delete h.cache[c],j=f.call(this,c,g),e&&(h.cache[c]=j),i&&SC.propertyDidChange(this,c),d._suspended=k;return j}}function m(b,c){var d=c._cacheable,e=c.func;return d?function(){var c,d=a(this).cache;if(b in d)return d[b];c=d[b]=e.call(this,b);return c}:function(){return e.call(this,b)}}function k(a,b){this.func=a,this._cacheable=b&&b.cacheable,this._dependentKeys=b&&b.dependentKeys}function j(a,b,c){var d=a._dependentKeys,e=d?d.length:0;for(var f=0;f<e;f++)h(b,c,d[f])}function i(a,b,c){var d=g(a,c);d[b]=(d[b]||0)-1,SC.unwatch(a,c)}function h(a,b,c){var d=g(a,c);d[b]=(d[b]||0)+1,SC.watch(a,c)}function g(b,c){var d=a(b),f,g;f=d.deps,f?f.__scproto__!==b&&(f=d.deps=e(f),f.__scproto__=b):f=d.deps={__scproto__:b},g=f[c],g?g.__scproto__!==b&&(g=f[c]=e(g),g.__scproto__=b):g=f[c]={__scproto__:b};return g}var a=SC.meta,b=SC.guidFor,c=SC.USE_ACCESSORS,d=Array.prototype.slice,e=SC.platform.create,f=SC.platform.defineProperty;SC.ComputedProperty=k,k.prototype=new SC.Descriptor;var l={configurable:!0,enumerable:!0,get:function(){return undefined},set:SC.Descriptor.MUST_USE_SETTER},o=k.prototype;o.cacheable=function(a){this._cacheable=a!==!1;return this},o.property=function(){this._dependentKeys=d.call(arguments);return this},o.setup=function(a,b,c){l.get=m(b,this),l.set=n(b,this),f(a,b,l),l.get=l.set=null,j(this,a,b)},o.teardown=function(b,c){var d=this._dependentKeys,e=d?d.length:0;for(var f=0;f<e;f++)i(b,c,d[f]);this._cacheable&&delete a(b).cache[c];return null},o.didChange=function(b,c){this._cacheable&&this._suspended!==b&&delete a(b).cache[c]},o.get=function(b,c){var d,e;if(this._cacheable){e=a(b).cache;if(c in e)return e[c];d=e[c]=this.func.call(b,c)}else d=this.func.call(b,c);return d},o.set=function(c,d,e){var f=this._cacheable,g=a(c,f),h=g.source===c&&g.watching[d]>0,i,j,k;j=this._suspended,this._suspended=c,h=h&&g.lastSetValues[d]!==b(e),h&&(g.lastSetValues[d]=b(e),SC.propertyWillChange(c,d)),f&&delete g.cache[d],i=this.func.call(c,d,e),f&&(g.cache[d]=i),h&&SC.propertyDidChange(c,d),this._suspended=j;return i},o.val=function(b,c){return a(b,!1).values[c]},SC.platform.hasPropertyAccessors?c||(o.setup=function(a,b){f(a,b,l),j(this,a,b)}):o.setup=function(a,b,c){a[b]=undefined,j(this,a,b)},SC.computed=function(a){return new k(a)}}(),function(){function n(a,c){var d=b(a,!1).listeners,e=[];d&&(d=d[c]);if(!d)return e;var f,h,i,j;for(f in d){if(g[f]||!d[f])continue;i=d[f];for(h in i){if(g[h]||!i[h])continue;j=i[h],e.push([j.target,j.method])}}return e}function m(a,c){var d=b(a,!1).listeners;d&&(d=d[c]);if(!d)return!1;var f,h,i;for(f in d){if(g[f]||!d[f])continue;i=d[f];for(h in i){if(g[h]||!i[h])continue;return!0}}var j=e(b(a,!0),a,!0,"listeners");j[c]=null;return!1}function l(a,c){a&&"function"==typeof a.sendEvent&&a.sendEvent.apply(a,d.call(arguments,1));var e=b(a,!1).listeners;if(e&&(e=e[c])){h(e,arguments);return!0}return!1}function k(a){var c=b(a,!1).listeners,d=[];if(c)for(var e in c)!g[e]&&c[e]&&d.push(e);return d}function j(a,b,d,e){!e&&"function"==typeof d&&(e=d,d=null);var g=f(a,b,d,!0),h=c(e);g&&g[h]&&(g[h]=null),a&&"function"==typeof a.didRemoveListener&&a.didRemoveListener(b,d,e)}function i(a,b,d,e,g){!e&&"function"==typeof d&&(e=d,d=null);var h=f(a,b,d,!0),i=c(e),j;h[i]?h[i].xform=g:h[i]={target:d,method:e,xform:g},a&&"function"==typeof a.didAddListener&&a.didAddListener(b,d,e);return j}function h(a,b){var c,d,e,f,h,i;for(c in a){if(g[c])continue;e=a[c];for(d in e){if(g[d]||!(f=e[d]))continue;h=f.method,i=f.target,i||(i=b[0]),"string"==typeof h&&(h=i[h]),f.xform?f.xform(i,h,b):h.apply(i,b)}}}function f(a,c,d,f){return e(b(a,f),a,f,"listeners",c,d)}function e(b,c,d){var e=arguments.length,f,g,h;for(f=3;f<e;f++){g=arguments[f],h=b[g];if(d)h?h.__scproto__!==c&&(h=b[g]=a(h),h.__scproto__=c):h=b[g]={__scproto__:c};else if(!h||h.__scproto__!==c)return undefined;b=h}return h}var a=SC.platform.create,b=SC.meta,c=SC.guidFor,d=Array.prototype.slice,g={__scproto__:!0};SC.addListener=i,SC.removeListener=j,SC.sendEvent=l,SC.hasListeners=m,SC.watchedEvents=k,SC.listenersFor=n}(),function(){function o(a,b,c){var d=c[0],e=m(c[1]),f;b.length>2&&(f=SC.getPath(d,e)),b.call(a,d,e,f)}function n(a,b,c){var d=c[0],e=l(c[1]),f;b.length>2&&(f=SC.getPath(d,e)),b.call(a,d,e,f)}function m(a){return a.slice(0,-7)}function l(a){return a.slice(0,-7)}function k(a){return a+b}function j(b){return b+a}function i(){if(!!f&&f.length!==0){var a=f;f=[],g={},a.forEach(function(a){SC.sendEvent(a[0],a[1])})}}function h(a,b){if(e){var d=c(a);g[d]||(g[d]={}),g[d][b]||(g[d][b]=!0,f.push([a,b]))}else SC.sendEvent(a,b)}var a=":change",b=":before",c=SC.guidFor,d=SC.normalizePath,e=0,f=[],g={};SC.beginPropertyChanges=function(){e++;return this},SC.endPropertyChanges=function(){e--,e<=0&&i()},SC.addObserver=function(a,b,c,e){b=d(b),SC.addListener(a,j(b),c,e,n),SC.watch(a,b);return this},SC.observersFor=function(a,b){return SC.listenersFor(a,j(b))},SC.removeObserver=function(a,b,c,e){b=d(b),SC.unwatch(a,b),SC.removeListener(a,j(b),c,e);return this},SC.addBeforeObserver=function(a,b,c,e){b=d(b),SC.addListener(a,k(b),c,e,o),SC.watch(a,b);return this},SC.beforeObserversFor=function(a,b){return SC.listenersFor(a,k(b))},SC.removeBeforeObserver=function(a,b,c,e){b=d(b),SC.unwatch(a,b),SC.removeListener(a,k(b),c,e);return this},SC.notifyObservers=function(a,b){h(a,j(b))},SC.notifyBeforeObservers=function(a,b){h(a,k(b))}}(),function(){function D(a,b){B(a,b,"didChange")}function C(a,b){B(a,b,"willChange")}function B(a,c,d){var e=b(a,!1),f=e.chainWatchers;if(!!f&&f.__scproto__===a){f=f[c];if(!f)return;for(var g in f){if(!f.hasOwnProperty(g))continue;f[g][d](a,c)}}}function A(a){var c=b(a),d=c.chains;d?d._value!==a&&(d=c.chains=d.copy(a)):d=c.chains=new y(null,null,a);return d}function x(a){return b(a,!1).proto===a}function w(a){if(v.length!==0){var b=v;v=[],b.forEach(function(a){a[0].add(a[1])}),a!==!1&&v.length>0&&setTimeout(w,1)}}function u(c,d,e){if(!!c&&"object"==typeof c){var f=b(c,!1),g=f.chainWatchers;if(!g||g.__scproto__!==c)return;g[d]&&delete g[d][a(e)],SC.unwatch(c,d)}}function t(c,d,e){if(!!c&&"object"==typeof c){var f=b(c),g=f.chainWatchers;if(!g||g.__scproto__!==c)g=f.chainWatchers={__scproto__:c};g[d]||(g[d]={}),g[d][a(e)]=e,SC.watch(c,d)}}function s(a,b){var c=q,d=!c;d&&(c=q={}),o("propertyDidChange",a,b,c),d&&(q=null)}function r(a,b){var c=p,d=!c;d&&(c=p={}),o("propertyWillChange",a,b,c),d&&(p=null)}function o(c,d,e,f){var g=a(d);f[g]||(f[g]={});if(!f[g][e]){f[g][e]=!0;var h=b(d,!1).deps,i=SC[c];h=h&&h[e];if(h)for(var j in h){if(n[j])continue;i(d,j)}}}function m(a){return a==="*"||!k.test(a)}function l(a){return a.match(j)[0]}var a=SC.guidFor,b=SC.meta,c=SC.get,d=SC.set,e=SC.normalizeTuple.primitive,f=SC.normalizePath,g=SC.SIMPLE_PROPERTY,h=SC.GUID_KEY,i=SC.notifyObservers,j=/^([^\.\*]+)/,k=/[\.\*]/,n={__scproto__:!0},p,q,v=[],y=function(a,b,d,e){var f;this._parent=a,this._key=b,this._watching=d===undefined,this._value=d||a._value&&!x(a._value)&&c(a._value,b),this._separator=e||".",this._paths={},this._watching&&(this._object=a._value,this._object&&t(this._object,this._key,this))},z=y.prototype;z.destroy=function(){if(this._watching){var a=this._object;a&&u(a,this._key,this),this._watching=!1}},z.copy=function(a){var b=new y(null,null,a,this._separator),c=this._paths,d;for(d in c){if(!(c[d]>0))continue;b.add(d)}return b},z.add=function(a){var b,c,d,f,g,h;h=this._paths,h[a]=(h[a]||0)+1,b=this._value,c=e(b,a);if(c[0]&&c[0]===b)a=c[1],d=l(a),a=a.slice(d.length+1);else{if(!c[0]){v.push([this,a]);return}f=c[0],d=a.slice(0,0-(c[1].length+1)),g=a.slice(d.length,d.length+1),a=c[1]}this.chain(d,a,f,g)},z.remove=function(a){var b,c,d,f,g;g=this._paths,g[a]>0&&g[a]--,b=this._value,c=e(b,a),c[0]===b?(a=c[1],d=l(a),a=a.slice(d.length+1)):(f=c[0],d=a.slice(0,0-(c[1].length+1)),a=c[1]),this.unchain(d,a)},z.count=0,z.chain=function(a,b,c,d){var e=this._chains,f;e||(e=this._chains={}),f=e[a],f||(f=e[a]=new y(this,a,c,d)),f.count++,b&&b.length>0&&(a=l(b),b=b.slice(a.length+1),f.chain(a,b))},z.unchain=function(a,b){var c=this._chains,d=c[a];b&&b.length>1&&(a=l(b),b=b.slice(a.length+1),d.unchain(a,b)),d.count--,d.count<=0&&(delete c[d._key],d.destroy())},z.willChange=function(){var a=this._chains;if(a)for(var b in a){if(!a.hasOwnProperty(b))continue;a[b].willChange()}this._parent&&this._parent.chainWillChange(this,this._key,1)},z.chainWillChange=function(a,b,c){this._key&&(b=this._key+this._separator+b),this._parent?this._parent.chainWillChange(this,b,c+1):(c>1&&SC.propertyWillChange(this._value,b),b="this."+b,this._paths[b]>0&&SC.propertyWillChange(this._value,b))},z.chainDidChange=function(a,b,c){this._key&&(b=this._key+this._separator+b),this._parent?this._parent.chainDidChange(this,b,c+1):(c>1&&SC.propertyDidChange(this._value,b),b="this."+b,this._paths[b]>0&&SC.propertyDidChange(this._value,b))},z.didChange=function(){if(this._watching){var a=this._parent._value;a!==this._object&&(u(this._object,this._key,this),this._object=a,t(a,this._key,this)),this._value=a&&!x(a)?c(a,this._key):undefined}var b=this._chains;if(b)for(var d in b){if(!b.hasOwnProperty(d))continue;b[d].didChange()}this._parent&&this._parent.chainDidChange(this,this._key,1)};var E=SC.SIMPLE_PROPERTY.watched;SC.watch=function(a,c){if(c==="length"&&SC.typeOf(a)==="array")return this;var d=b(a),e=d.watching,g;c=f(c),e[c]?e[c]=(e[c]||0)+1:(e[c]=1,m(c)?(g=d.descs[c],g=g?g.watched:E,g&&SC.defineProperty(a,c,g)):A(a).add(c));return this},SC.watch.flushPending=w,SC.unwatch=function(a,c){if(c==="length"&&SC.typeOf(a)==="array")return this;var d=b(a).watching,e,h;c=f(c),d[c]===1?(d[c]=0,m(c)?(e=b(a).descs[c],e=e?e.unwatched:g,e&&SC.defineProperty(a,c,e)):A(a).remove(c)):d[c]>1&&d[c]--;return this},SC.rewatch=function(a){var c=b(a,!1),d=c.chains,e=c.bindings,f,g;h in a&&!a.hasOwnProperty(h)&&SC.generateGuid(a,"sc"),d&&d._value!==a&&A(a);if(e&&c.proto!==a)for(f in e)g=!n[f]&&a[f],g&&g instanceof SC.Binding&&g.fromDidChange(a);return this},SC.propertyWillChange=function(a,c){var d=b(a,!1),e=d.proto,f=d.descs[c];e!==a&&(f&&f.willChange&&f.willChange(a,c),r(a,c),C(a,c),SC.notifyBeforeObservers(a,c))},SC.propertyDidChange=function(a,c){var d=b(a,!1),e=d.proto,f=d.descs[c];e!==a&&(f&&f.didChange&&f.didChange(a,c),s(a,c),D(a,c),SC.notifyObservers(a,c))}}(),function(){function w(a,b,c){var d=a.length;for(var f in b){if(!b.hasOwnProperty(f))continue;var g=b[f];a[d]=f;if(g&&g.toString===e)g[v]=a.join(".");else if(f==="SC"||g instanceof SC.Namespace){if(c[SC.guidFor(g)])continue;c[SC.guidFor(g)]=!0,w(a,g,c)}}a.length=d}function u(a,b,c){if(!c[SC.guidFor(b)]){c[SC.guidFor(b)]=!0;if(b.properties){var d=b.properties;for(var e in d)d.hasOwnProperty(e)&&(a[e]=!0)}else b.mixins&&b.mixins.forEach(function(b){u(a,b,c)})}}function t(a,b,c){var d=SC.guidFor(a);if(c[d])return!1;c[d]=!0;if(a===b)return!0;var e=a.mixins,f=e?e.length:0;while(--f>=0)if(t(e[f],b,c))return!0;return!1}function r(a,e,f){var g={},j={},k=SC.meta(a),l=k.required,r,s,t,u,v,w=SC._mixinBindings;m(e,i(a),g,j,a),b.detect(a)&&(s=j.willApplyProperty||a.willApplyProperty,t=j.didApplyProperty||a.didApplyProperty);for(r in g){if(!g.hasOwnProperty(r))continue;v=g[r],u=j[r];if(v===c){if(!(r in a)){if(!f)throw new Error("Required property not defined: "+r);l=o(a),l.__sc_count__++,l[r]=!0}}else{while(v instanceof d){var x=v.methodName;g[x]?(u=j[x],v=g[x]):k.descs[x]?(v=k.descs[x],u=v.val(a,x)):(u=a[x],v=SC.SIMPLE_PROPERTY)}s&&s.call(a,r);var y=p(u),z=y&&p(a[r]),A=q(u),B=A&&q(a[r]),C,D;if(z){C=z.length;for(D=0;D<C;D++)SC.removeObserver(a,z[D],null,r)}if(B){C=B.length;for(D=0;D<C;D++)SC.removeBeforeObserver(a,B[D],null,r)}u=w(a,r,u,k),n(a,r,v,u);if(y){C=y.length;for(D=0;D<C;D++)SC.addObserver(a,y[D],null,r)}if(A){C=A.length;for(D=0;D<C;D++)SC.addBeforeObserver(a,A[D],null,r)}l&&l[r]&&(l=o(a),l.__sc_count__--,l[r]=!1),t&&t.call(a,r)}}if(!f&&l&&l.__sc_count__>0){var E=[];for(r in l){if(h[r])continue;E.push(r)}throw new Error("Required properties not defined: "+E.join(","))}return a}function q(a){return"function"==typeof a&&a.__sc_observesBefore__}function p(a){return"function"==typeof a&&a.__sc_observes__}function o(a){var b=SC.meta(a),c=b.required;if(!c||c.__scproto__!==a)c=b.required=c?Object.create(c):{__sc_count__:0},c.__scproto__=a;return c}function m(b,d,e,f,g){function s(a){delete e[a],delete f[a]}var h=b.length,i,j,k,n,o,p,q,r;for(i=0;i<h;i++){j=b[i];if(!j)throw new Error("Null value found in SC.mixin()");if(j instanceof a){k=SC.guidFor(j);if(d[k])continue;d[k]=j,n=j.properties}else n=j;if(n){r=f.concatenatedProperties||g.concatenatedProperties,n.concatenatedProperties&&(r=r?r.concat(n.concatenatedProperties):n.concatenatedProperties);for(p in n){if(!n.hasOwnProperty(p))continue;o=n[p];if(o instanceof SC.Descriptor){if(o===c&&e[p])continue;e[p]=o,f[p]=undefined}else{if(l(o)){q=e[p]===SC.SIMPLE_PROPERTY&&f[p],q||(q=g[p]),"function"!=typeof q&&(q=null);if(q){var t=o.__sc_observes__,u=o.__sc_observesBefore__;o=SC.wrap(o,q),o.__sc_observes__=t,o.__sc_observesBefore__=u}}else if(r&&r.indexOf(p)>=0||p==="concatenatedProperties"){var v=f[p]||g[p];o=v?v.concat(o):SC.makeArray(o)}e[p]=SC.SIMPLE_PROPERTY,f[p]=o}}}else j.mixins&&(m(j.mixins,d,e,f,g),j._without&&j._without.forEach(s))}}function l(a){if("function"!=typeof a||a.isMethod===!1)return!1;return k.indexOf(a)<0}function j(b,c){c&&c.length>0&&(b.mixins=f.call(c,function(b){if(b instanceof a)return b;var c=new a;c.properties=b;return c}));return b}function i(a,b){var c=SC.meta(a,b!==!1),d=c.mixins;if(b===!1)return d||g;d?d.__scproto__!==a&&(d=c.mixins=Object.create(d),d.__scproto__=a):d=c.mixins={__scproto__:a};return d}var a,b,c,d,e,f=Array.prototype.map,g={},h={__scproto__:!0,__sc_count__:!0},k=[Boolean,Object,Number,Array,Date,String],n=SC.defineProperty;SC._mixinBindings=function(a,b,c,d){return c},SC.mixin=function(a){var b=Array.prototype.slice.call(arguments,1);return r(a,b,!1)},a=function(){return j(this,arguments)},a._apply=r,a.applyPartial=function(a){var b=Array.prototype.slice.call(arguments,1);return r(a,b,!0)},a.create=function(){e.processed=!1;var a=this;return j(new a,arguments)},a.prototype.reopen=function(){var b,c;this.properties&&(b=a.create(),b.properties=this.properties,delete this.properties,this.mixins=[b]);var d=arguments.length,e=this.mixins,f;for(f=0;f<d;f++)b=arguments[f],b instanceof a?e.push(b):(c=a.create(),c.properties=b,e.push(c));return this};var s=[];a.prototype.apply=function(a){s.length=0,s[0]=this;return r(a,s,!1)},a.prototype.applyPartial=function(a){s.length=0,s[0]=this;return r(a,s,!0)},a.prototype.detect=function(b){if(!b)return!1;if(b instanceof a)return t(b,this,{});return!!i(b,!1)[SC.guidFor(this)]},a.prototype.without=function(){var b=new a(this);b._without=Array.prototype.slice.call(arguments);return b},a.prototype.keys=function(){var a={},b={},c=[];u(a,this,b);for(var d in a)a.hasOwnProperty(d)&&c.push(d);return c};var v=SC.GUID_KEY+"_name";e=function(){!this[v]&&!e.processed&&(e.processed=!0,w([],window,{}));return this[v]||"(unknown mixin)"},a.prototype.toString=e,a.mixins=function(a){var b=[],c=i(a,!1),d,e;for(d in c){if(h[d])continue;e=c[d],e.properties||b.push(c[d])}return b},c=new SC.Descriptor,c.toString=function(){return"(Required Property)"},SC.required=function(){return c},d=function(a){this.methodName=a},d.prototype=new SC.Descriptor,SC.alias=function(a){return new d(a)},SC.Mixin=a,b=a.create({willApplyProperty:SC.required(),didApplyProperty:SC.required()}),SC.MixinDelegate=b,SC.observer=function(a){var b=Array.prototype.slice.call(arguments,1);a.__sc_observes__=b;return a},SC.beforeObserver=function(a){var b=Array.prototype.slice.call(arguments,1);a.__sc_observesBefore__=b;return a}}(),function(){}(),function(){function d(a,b,c,e){var f,g,h;if("object"!=typeof a)return a;if(b&&(g=c.indexOf(a))>=0)return e[g];sc_assert("Cannot clone an SC.Object that does not implement SC.Copyable",!(a instanceof SC.Object)||SC.Copyable&&SC.Copyable.detect(a));if(SC.typeOf(a)==="array"){f=a.slice();if(b){g=f.length;while(--g>=0)f[g]=d(f[g],b,c,e)}}else if(SC.Copyable&&SC.Copyable.detect(a))f=a.copy(b,c,e);else{f={};for(h in a){if(!a.hasOwnProperty(h))continue;f[h]=b?d(a[h],b,c,e):a[h]}}b&&(c.push(a),e.push(f));return f}YES=!0,NO=!1,typeof console=="undefined"&&(window.console={},console.log=console.info=console.warn=console.error=function(){}),SC.EXTEND_PROTOTYPES=SC.ENV.EXTEND_PROTOTYPES!==!1;var a={},b="Boolean Number String Function Array Date RegExp Object".split(" ");b.forEach(function(b){a["[object "+b+"]"]=b.toLowerCase()});var c=Object.prototype.toString;SC.typeOf=function(b){var d;d=b==null?String(b):a[c.call(b)]||"object",d==="function"?SC.Object&&SC.Object.detect(b)&&(d="class"):d==="object"&&(b instanceof Error?d="error":SC.Object&&b instanceof SC.Object?d="instance":d="object");return d},SC.none=function(a){return a===null||a===undefined},SC.empty=function(a){return a===null||a===undefined||a===""},SC.isArray=function(a){if(!a||a.setInterval)return!1;if(Array.isArray&&Array.isArray(a))return!0;if(SC.Array&&SC.Array.detect(a))return!0;if(a.length!==undefined&&"object"==typeof a)return!0;return!1},SC.compare=function(a,b){if(a===b)return 0;var c=SC.typeOf(a),d=SC.typeOf(b),e=SC.Comparable;if(e){if(c==="instance"&&e.detect(a.constructor))return a.constructor.compare(a,b);if(d==="instance"&&e.detect(b.constructor))return 1-b.constructor.compare(b,a)}var f=SC.ORDER_DEFINITION_MAPPING;if(!f){var g=SC.ORDER_DEFINITION;f=SC.ORDER_DEFINITION_MAPPING={};var h,i;for(h=0,i=g.length;h<i;++h)f[g[h]]=h;delete SC.ORDER_DEFINITION}var j=f[c],k=f[d];if(j<k)return-1;if(j>k)return 1;switch(c){case"boolean":case"number":if(a<b)return-1;if(a>b)return 1;return 0;case"string":var l=a.localeCompare(b);if(l<0)return-1;if(l>0)return 1;return 0;case"array":var m=a.length,n=b.length,o=Math.min(m,n),p=0,q=0,r=arguments.callee;while(p===0&&q<o)p=r(a[q],b[q]),q++;if(p!==0)return p;if(m<n)return-1;if(m>n)return 1;return 0;case"instance":if(SC.Comparable&&SC.Comparable.detect(a))return a.compare(a,b);return 0;default:return 0}},SC.copy=function(a,b){if("object"!=typeof a)return a;if(SC.Copyable&&SC.Copyable.detect(a))return a.copy(b);return d(a,b,b?[]:null,b?[]:null)},SC.inspect=function(a){var b,c=[];for(var d in a)if(a.hasOwnProperty(d)){b=a[d];if(b==="toString")continue;SC.typeOf(b)===SC.T_FUNCTION&&(b="function() { ... }"),c.push(d+": "+b)}return"{"+c.join(" , ")+"}"},SC.isEqual=function(a,b){if(a&&"function"==typeof a.isEqual)return a.isEqual(b);return a===b},SC.ORDER_DEFINITION=SC.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class"],SC.keys=Object.keys,SC.keys||(SC.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),SC.K=function(){return this},SC.Error=function(){var a=Error.prototype.constructor.apply(this,arguments);for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b])},SC.Error.prototype=SC.create(Error.prototype),SC.Logger=window.console,"undefined"==typeof require&&(require=SC.K)}(),function(){SC.EXTEND_PROTOTYPES&&(Function.prototype.property=function(){var a=SC.computed(this);return a.property.apply(a,arguments)},Function.prototype.observes=function(){this.__sc_observes__=Array.prototype.slice.call(arguments);return this},Function.prototype.observesBefore=function(){this.__sc_observesBefore__=Array.prototype.slice.call(arguments);return this})}(),function(){var a=/^.+Binding$/;SC._mixinBindings=function(b,c,d,e){if(a.test(c)){d instanceof SC.Binding?d.to(c.slice(0,-7)):d=new SC.Binding(c.slice(0,-7),d),d.connect(b);var f=e.bindings;f?f.__scproto__!==b&&(f=e.bindings=SC.create(e.bindings),f.__scproto__=b):f=e.bindings={__scproto__:b},f[c]=!0}return d}}(),function(){var a=/[ _]/g,b={},c=/([a-z])([A-Z])/g;SC.STRINGS={},SC.String={fmt:function(a,b){var c=0;return a.replace(/%@([0-9]+)?/g,function(a,d){d=d?parseInt(d,0)-1:c++,a=b[d];return(a===null?"(null)":a===undefined?"":a).toString()})},loc:function(a,b){a=SC.STRINGS[a]||a;return SC.String.fmt(a,b)},w:function(a){return a.split(/\s+/)},decamelize:function(a){return a.replace(c,"$1_$2").toLowerCase()},dasherize:function(c){var d=b,e=d[c];if(e)return e;e=SC.String.decamelize(c).replace(a,"-"),d[c]=e;return e}}}(),function(){var a=SC.String.fmt,b=SC.String.w,c=SC.String.loc,d=SC.String.decamelize,e=SC.String.dasherize;SC.EXTEND_PROTOTYPES&&(String.prototype.fmt=function(){return a(this,arguments)},String.prototype.w=function(){return b(this)},String.prototype.loc=function(){return c(this,arguments)},String.prototype.decamelize=function(){return d(this)},String.prototype.dashersize=function(){return e(this)})}(),function(){}(),function(){}(),function(){function g(a,b,c){b.call(a,c[0],c[2],c[3])}function f(b,c){function d(d){var e=a(d,b);return c===undefined?!!e:c===e}return d}function e(a){c.push(a);return null}function d(){return c.length===0?{}:c.pop()}var a=SC.get,b=SC.set,c=[];SC.Enumerable=SC.Mixin.create({isEnumerable:!0,nextObject:SC.required(Function),firstObject:SC.computed(function(){if(a(this,"length")===0)return undefined;if(SC.Array&&SC.Array.detect(this))return this.objectAt(0);var b=d(),c;c=this.nextObject(0,null,b),e(b);return c}).property("[]").cacheable(),lastObject:SC.computed(function(){var b=a(this,"length");if(b===0)return undefined;if(SC.Array&&SC.Array.detect(this))return this.objectAt(b-1);var c=d(),f=0,g,h=null;do h=g,g=this.nextObject(f++,h,c);while(g!==undefined);e(c);return h}).property("[]").cacheable(),contains:function(a){return this.find(function(b){return b===a})!==undefined},forEach:function(b,c){if(typeof b!="function")throw new TypeError;var f=a(this,"length"),g=null,h=d();c===undefined&&(c=null);for(var i=0;i<f;i++){var j=this.nextObject(i,g,h);b.call(c,j,i,this),g=j}g=null,h=e(h);return this},getEach:function(b){return this.map(function(c){return a(c,b)})},setEach:function(a,c){return this.forEach(function(d){b(d,a,c)})},map:function(a,b){var c=[];this.forEach(function(d,e,f){c[e]=a.call(b,d,e,f)});return c},mapProperty:function(b){return this.map(function(c){return a(c,b)})},filter:function(a,b){var c=[];this.forEach(function(d,e,f){a.call(b,d,e,f)&&c.push(d)});return c},filterProperty:function(a,b){return this.filter(f(a,b))},find:function(b,c){var f=a(this,"length");c===undefined&&(c=null);var g=null,h,i=!1,j=undefined,k=d();for(var l=0;l<f&&!i;l++){h=this.nextObject(l,g,k);if(i=b.call(c,h,l,this))j=h;g=h}h=g=null,k=e(k);return j},findProperty:function(a,b){return this.find(f(a,b))},every:function(a,b){return!this.find(function(c,d,e){return!a.call(b,c,d,e)})},everyProperty:function(a,b){return this.every(f(a,b))},some:function(a,b){return!!this.find(function(c,d,e){return!!a.call(b,c,d,e)})},someProperty:function(a,b){return this.some(f(a,b))},reduce:function(a,b,c){if(typeof a!="function")throw new TypeError;var d=b;this.forEach(function(b,e){d=a.call(null,d,b,e,this,c)},this);return d},invoke:function(a){var b,c=[];arguments.length>1&&(b=Array.prototype.slice.call(arguments,1)),this.forEach(function(d,e){var f=d&&d[a];"function"==typeof f&&(c[e]=b?f.apply(d,b):f.call(d))},this);return c},toArray:function(){var a=[];this.forEach(function(b,c){a[c]=b});return a},compact:function(){return this.without(null)},without:function(a){if(!this.contains(a))return this;var b=[];this.forEach(function(c){c!==a&&(b[b.length]=c)});return b},uniq:function(){var a=[],b=!1;this.forEach(function(c){a.indexOf(c)<0?a[a.length]=c:b=!0});return b?a:this},"[]":function(a,b){return this}.property().cacheable(),addEnumerableObserver:function(b,c){var d=c&&c.willChange||"enumerableWillChange",e=c&&c.didChange||"enumerableDidChange",f=a(this,"hasEnumerableObservers");f||SC.propertyWillChange(this,"hasEnumerableObservers"),SC.addListener(this,"@enumerable:before",b,d,g),SC.addListener(this,"@enumerable:change",b,e,g),f||SC.propertyDidChange(this,"hasEnumerableObservers");return this},removeEnumerableObserver:function(b,c){var d=c&&c.willChange||"enumerableWillChange",e=c&&c.didChange||"enumerableDidChange",f=a(this,"hasEnumerableObservers");f&&SC.propertyWillChange(this,"hasEnumerableObservers"),SC.removeListener(this,"@enumerable:before",b,d),SC.removeListener(this,"@enumerable:change",b,e),f&&SC.propertyDidChange(this,"hasEnumerableObservers");return this},hasEnumerableObservers:function(){return SC.hasListeners(this,"@enumerable:change")||SC.hasListeners(this,"@enumerable:before")}.property().cacheable(),enumerableContentWillChange:function(b,c){var d,e,f;"number"==typeof b?d=b:b?d=a(b,"length"):d=b=-1,"number"==typeof c?e=c:c?e=a(c,"length"):e=c=-1,f=e<0||d<0||e-d!==0,b===-1&&(b=null),c===-1&&(c=null),SC.propertyWillChange(this,"[]"),f&&SC.propertyWillChange(this,"length"),SC.sendEvent(this,"@enumerable:before",b,c);return this},enumerableContentDidChange:function(b,c){var d=this.propertyDidChange,e,f,g;"number"==typeof b?e=b:b?e=a(b,"length"):e=b=-1,"number"==typeof c?f=c:c?f=a(c,"length"):f=c=-1,g=f<0||e<0||f-e!==0,b===-1&&(b=null),c===-1&&(c=null),SC.sendEvent(this,"@enumerable:change",b,c),g&&SC.propertyDidChange(this,"length"),SC.propertyDidChange(this,"[]");return this}})}(),function(){function d(a,b,c){b.call(a,c[0],c[2],c[3],c[4])}function c(a){return a===null||a===undefined}var a=SC.get,b=SC.set;SC.Array=SC.Mixin.create(SC.Enumerable,{isSCArray:!0,length:SC.required(),objectAt:function(b){if(b<0||b>=a(this,"length"))return undefined;return a(this,b)},nextObject:function(a){return this.objectAt(a)},"[]":function(b,c){c!==undefined&&this.replace(0,a(this,"length"),c);return this}.property().cacheable(),contains:function(a){return this.indexOf(a)>=0},slice:function(b,d){var e=[],f=a(this,"length");c(b)&&(b=0);if(c(d)||d>f)d=f;while(b<d)e[e.length]=this.objectAt(b++);return e},indexOf:function(b,c){var d,e=a(this,"length");c===undefined&&(c=0),c<0&&(c+=e);for(d=c;d<e;d++)if(this.objectAt(d,!0)===b)return d;return-1},lastIndexOf:function(b,c){var d,e=a(this,"length");c===undefined&&(c=e-1),c<0&&(c+=e);for(d=c;d>=0;d--)if(this.objectAt(d)===b)return d;return-1},addArrayObserver:function(b,c){var e=c&&c.willChange||"arrayWillChange",f=c&&c.didChange||"arrayDidChange",g=a(this,"hasArrayObservers");g||SC.propertyWillChange(this,"hasArrayObservers"),SC.addListener(this,"@array:before",b,e,d),SC.addListener(this,"@array:change",b,f,d),g||SC.propertyDidChange(this,"hasArrayObservers");return this},removeArrayObserver:function(b,c){var e=c&&c.willChange||"arrayWillChange",f=c&&c.didChange||"arrayDidChange",g=a(this,"hasArrayObservers");g&&SC.propertyWillChange(this,"hasArrayObservers"),SC.removeListener(this,"@array:before",b,e,d),SC.removeListener(this,"@array:change",b,f,d),g&&SC.propertyDidChange(this,"hasArrayObservers");return this},hasArrayObservers:function(){return SC.hasListeners(this,"@array:change")||SC.hasListeners(this,"@array:before")}.property().cacheable(),arrayContentWillChange:function(b,c,d){b===undefined?(b=0,c=d=-1):(c||(c=0),d||(d=0)),SC.sendEvent(this,"@array:before",b,c,d);var e,f;if(b>=0&&c>=0&&a(this,"hasEnumerableObservers")){e=[],f=b+c;for(var g=b;g<f;g++)e.push(this.objectAt(g))}else e=c;this.enumerableContentWillChange(e,d);return this},arrayContentDidChange:function(b,c,d){b===undefined?(b=0,c=d=-1):(c||(c=0),d||(d=0));var e,f;if(b>=0&&d>=0&&a(this,"hasEnumerableObservers")){e=[],f=b+d;for(var g=b;g<f;g++)e.push(this.objectAt(g))}else e=d;this.enumerableContentDidChange(c,e),SC.sendEvent(this,"@array:change",b,c,d);return this},"@each":function(){this.__each||(this.__each=new SC.EachProxy(this));return this.__each}.property().cacheable()})}(),function(){SC.Comparable=SC.Mixin.create({isComparable:!0,compare:SC.required(Function)})}(),function(){var a=SC.get,b=SC.set;SC.Copyable=SC.Mixin.create({copy:SC.required(Function),frozenCopy:function(){if(SC.Freezable&&SC.Freezable.detect(this))return a(this,"isFrozen")?this:this.copy().freeze();throw new Error(SC.String.fmt("%@ does not support freezing",this))}})}(),function(){var a=SC.get,b=SC.set;SC.Freezable=SC.Mixin.create({isFrozen:!1,freeze:function(){if(a(this,"isFrozen"))return this;b(this,"isFrozen",!0);return this}}),SC.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){SC.MutableEnumerable=SC.Mixin.create(SC.Enumerable,{addObject:SC.required(Function),addObjects:function(a){SC.beginPropertyChanges(this),a.forEach(function(a){this.addObject(a)},this),SC.endPropertyChanges(this);return this},removeObject:SC.required(Function),removeObjects:function(a){SC.beginPropertyChanges(this),a.forEach(function(a){this.removeObject(a)},this),SC.endPropertyChanges(this);return this}})}(),function(){var a="Index out of range",b=[],c=SC.get,d=SC.set;SC.MutableArray=SC.Mixin.create(SC.Array,SC.MutableEnumerable,{replace:SC.required(),insertAt:function(b,d){if(b>c(this,"length"))throw new Error(a);this.replace(b,0,[d]);return this},removeAt:function(d,e){var f=0;if("number"==typeof d){if(d<0||d>=c(this,"length"))throw new Error(a);e===undefined&&(e=1),this.replace(d,e,b)}return this},pushObject:function(a){this.insertAt(c(this,"length"),a);return a},pushObjects:function(a){this.beginPropertyChanges(),a.forEach(function(a){this.pushObject(a)},this),this.endPropertyChanges();return this},popObject:function(){var a=c(this,"length");if(a===0)return null;var b=this.objectAt(a-1);this.removeAt(a-1,1);return b},shiftObject:function(){if(c(this,"length")===0)return null;var a=this.objectAt(0);this.removeAt(0);return a},unshiftObject:function(a){this.insertAt(0,a);return a},unshiftObjects:function(a){this.beginPropertyChanges(),a.forEach(function(a){this.unshiftObject(a)},this),this.endPropertyChanges();return this},removeObject:function(a){var b=c(this,"length")||0;while(--b>=0){var d=this.objectAt(b);d===a&&this.removeAt(b)}return this},addObject:function(a){this.contains(a)||this.pushObject(a);return this}})}(),function(){var a=SC.get,b=SC.set;SC.Observable=SC.Mixin.create({isObserverable:!0,get:function(b){return a(this,b)},set:function(a,c){b(this,a,c);return this},setProperties:function(a){SC.beginPropertyChanges(this);for(var c in a)a.hasOwnProperty(c)&&b(this,c,a[c]);SC.endPropertyChanges(this);return this},beginPropertyChanges:function(){SC.beginPropertyChanges();return this},endPropertyChanges:function(){SC.endPropertyChanges();return this},propertyWillChange:function(a){SC.propertyWillChange(this,a);return this},propertyDidChange:function(a){SC.propertyDidChange(this,a);return this},notifyPropertyChange:function(a){this.propertyWillChange(a),this.propertyDidChange(a);return this},addObserver:function(a,b,c){SC.addObserver(this,a,b,c)},removeObserver:function(a,b,c){SC.removeObserver(this,a,b,c)},hasObserverFor:function(a){return SC.hasListeners(this,a+":change")},unknownProperty:function(a){return undefined},setUnknownProperty:function(a,b){this[a]=b},getPath:function(a){return SC.getPath(this,a)},setPath:function(a,b){SC.setPath(this,a,b);return this},incrementProperty:function(c,d){d||(d=1),b(this,c,(a(this,c)||0)+d);return a(this,c)},decrementProperty:function(c,d){d||(d=1),b(this,c,(a(this,c)||0)-d);return a(this,c)},toggleProperty:function(c){b(this,c,!a(this,c));return a(this,c)},observersForKey:function(a){return SC.observersFor(this,a)}})}(),function(){}(),function(){function g(){var c=!1,e,g=!1,h=!1,i=function(){c||d(i,"proto"),e?(this.reopen.apply(this,e),e=null,a(this),this.init.apply(this,arguments)):(h&&a(this),g===!1&&(g=this.init),g.apply(this,arguments))};i.toString=b,i._prototypeMixinDidChange=function(){c=!1},i._initMixins=function(a){e=a},SC.defineProperty(i,"proto",SC.computed(function(){c||(c=!0,i.PrototypeMixin.applyPartial(i.prototype),h=!!f(i.prototype,!1).chains);return this.prototype}));return i}var a=SC.rewatch,b=SC.Mixin.prototype.toString,c=SC.set,d=SC.get,e=SC.platform.create,f=SC.meta,h=g();h.PrototypeMixin=SC.Mixin.create({reopen:function(){SC.Mixin._apply(this,arguments,!0);return this},init:function(){},isDestroyed:!1,destroy:function(){c(this,"isDestroyed",!0);return this},bind:function(a,b){b instanceof SC.
10
+ Binding||(b=SC.Binding.from(b)),b.to(a).connect(this);return b},toString:function(){return"<"+this.constructor.toString()+":"+SC.guidFor(this)+">"}}),h.__super__=null;var i=SC.Mixin.create({ClassMixin:SC.required(),PrototypeMixin:SC.required(),isMethod:!1,extend:function(){var a=g(),b;a.ClassMixin=SC.Mixin.create(this.ClassMixin),a.PrototypeMixin=SC.Mixin.create(this.PrototypeMixin);var c=a.PrototypeMixin;c.reopen.apply(c,arguments),a.superclass=this,a.__super__=this.prototype,b=a.prototype=e(this.prototype),b.constructor=a,SC.generateGuid(b,"sc"),f(b).proto=b,SC.rewatch(b),a.subclasses=SC.Set?new SC.Set:null,this.subclasses&&this.subclasses.add(a),a.ClassMixin.apply(a);return a},create:function(){var a=this;arguments.length>0&&this._initMixins(arguments);return new a},reopen:function(){var a=this.PrototypeMixin;a.reopen.apply(a,arguments),this._prototypeMixinDidChange();return this},reopenClass:function(){var a=this.ClassMixin;a.reopen.apply(a,arguments),SC.Mixin._apply(this,arguments,!1);return this},detect:function(a){if("function"!=typeof a)return!1;while(a){if(a===this)return!0;a=a.superclass}return!1}});h.ClassMixin=i,i.apply(h),SC.CoreObject=h}(),function(){var a=SC.get,b=SC.set,c=SC.guidFor,d=SC.none;SC.Set=SC.CoreObject.extend(SC.MutableEnumerable,SC.Copyable,SC.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Error(SC.FROZEN_ERROR);var c=a(this,"length");this.enumerableContentWillChange(c,0),b(this,"length",0),this.enumerableContentDidChange(c,0);return this},isEqual:function(b){if(!SC.Enumerable.detect(b))return!1;var c=a(this,"length");if(a(b,"length")!==c)return!1;while(--c>=0)if(!b.contains(this[c]))return!1;return!0},add:SC.alias("addObject"),remove:SC.alias("removeObject"),pop:function(){if(a(this,"isFrozen"))throw new Error(SC.FROZEN_ERROR);var b=this.length>0?this[this.length-1]:null;this.remove(b);return b},push:SC.alias("addObject"),shift:SC.alias("pop"),unshift:SC.alias("push"),addEach:SC.alias("addObjects"),removeEach:SC.alias("removeObjects"),init:function(a){this._super(),a&&this.addObjects(a)},nextObject:function(a){return this[a]},firstObject:function(){return this.length>0?this[0]:undefined}.property("[]").cacheable(),lastObject:function(){return this.length>0?this[this.length-1]:undefined}.property("[]").cacheable(),addObject:function(e){if(a(this,"isFrozen"))throw new Error(SC.FROZEN_ERROR);if(d(e))return this;var f=c(e),g=this[f],h=a(this,"length"),i;if(g>=0&&g<h&&this[g]===e)return this;i=[e],this.enumerableContentWillChange(null,i),h=a(this,"length"),this[f]=h,this[h]=e,b(this,"length",h+1),this.enumerableContentDidChange(null,i);return this},removeObject:function(e){if(a(this,"isFrozen"))throw new Error(SC.FROZEN_ERROR);if(d(e))return this;var f=c(e),g=this[f],h=a(this,"length"),i,j;g>=0&&g<h&&this[g]===e&&(j=[e],this.enumerableContentWillChange(j,null),g<h-1&&(i=this[h-1],this[g]=i,this[c(i)]=g),delete this[f],delete this[h-1],b(this,"length",h-1),this.enumerableContentDidChange(j,null));return this},contains:function(a){return this[c(a)]>=0},copy:function(){var d=this.constructor,e=new d,f=a(this,"length");b(e,"length",f);while(--f>=0)e[f]=this[f],e[c(this[f])]=f;return e},toString:function(){var a=this.length,b,c=[];for(b=0;b<a;b++)c[b]=this[b];return"SC.Set<%@>".fmt(c.join(","))},isSet:YES});var e=SC.Set.create;SC.Set.create=function(a){if(a&&SC.Enumerable.detect(a)){SC.Logger.warn("Passing an enumerable to SC.Set.create() is deprecated and will be removed in a future version of SproutCore. Use new SC.Set(items) instead");return new SC.Set(a)}return e.apply(this,arguments)}}(),function(){SC.CoreObject.subclasses=new SC.Set,SC.Object=SC.CoreObject.extend(SC.Observable)}(),function(){SC.Namespace=SC.Object.extend()}(),function(){SC.Application=SC.Namespace.extend()}(),function(){var a=SC.get,b=SC.set;SC.ArrayProxy=SC.Object.extend(SC.MutableArray,{content:null,objectAtContent:function(b){return a(this,"content").objectAt(b)},replaceContent:function(b,c,d){a(this,"content").replace(b,c,d)},contentWillChange:function(){var b=a(this,"content"),c=b?a(b,"length"):0;this.arrayWillChange(b,0,c,undefined),b&&b.removeArrayObserver(this)}.observesBefore("content"),contentDidChange:function(){var b=a(this,"content"),c=b?a(b,"length"):0;b&&b.addArrayObserver(this),this.arrayDidChange(b,0,undefined,c)}.observes("content"),objectAt:function(b){return a(this,"content")&&this.objectAtContent(b)},length:function(){var b=a(this,"content");return b?a(b,"length"):0}.property("content.length").cacheable(),replace:function(b,c,d){a(this,"content")&&this.replaceContent(b,c,d);return this},arrayWillChange:function(a,b,c,d){this.arrayContentWillChange(b,c,d)},arrayDidChange:function(a,b,c,d){this.arrayContentDidChange(b,c,d)},init:function(a){this._super(),a&&b(this,"content",a),this.contentDidChange()}})}(),function(){function m(){l=null;for(var a in h){if(!h.hasOwnProperty(a))continue;var c=h[a];c.next&&(delete h[a],b(c.target,c.method,c.args,2))}}function k(a,c){c[this.tguid]&&delete c[this.tguid][this.mguid],h[a]&&b(this.target,this.method,this.args,2),delete h[a]}function j(){var a=Date.now(),c=-1;for(var d in h){if(!h.hasOwnProperty(d))continue;var e=h[d];if(e&&e.expires)if(a>=e.expires)delete h[d],b(e.target,e.method,e.args,2);else if(c<0||e.expires<c)c=e.expires}c>0&&setTimeout(j,c-Date.now())}function g(){f=null,e.currentRunLoop&&e.end()}function b(b,c,d,e){c===undefined&&(c=b,b=undefined),"string"==typeof c&&(c=b[c]),d&&e>0&&(d=d.length>e?a.call(d,e):null);return c.apply(b,d)}var a=Array.prototype.slice,c,d=SC.Object.extend({_prev:null,init:function(a){this._prev=a,this.onceTimers={}},end:function(){this.flush();return this._prev},schedule:function(b,c,d){var e=this._queues,f;e||(e=this._queues={}),f=e[b],f||(f=e[b]=[]);var g=arguments.length>3?a.call(arguments,3):null;f.push({target:c,method:d,args:g});return this},flush:function(a){function j(a){b(a.target,a.method,a.args)}var d=this._queues,e,f,g,h,i;if(!d)return this;SC.watch.flushPending();if(a)while(this._queues&&(h=this._queues[a]))this._queues[a]=null,i=SC.LOG_BINDINGS&&a==="sync",i&&SC.Logger.log("Begin: Flush Sync Queue"),a==="sync"&&SC.beginPropertyChanges(),h.forEach(j),a==="sync"&&SC.endPropertyChanges(),i&&SC.Logger.log("End: Flush Sync Queue");else{e=SC.run.queues,g=e.length;do{this._queues=null;for(f=0;f<g;f++)a=e[f],h=d[a],i=SC.LOG_BINDINGS&&a==="sync",i&&SC.Logger.log("Begin: Flush Sync Queue"),a==="sync"&&SC.beginPropertyChanges(),h&&h.forEach(j),a==="sync"&&SC.endPropertyChanges(),i&&SC.Logger.log("End: Flush Sync Queue")}while(d=this._queues)}c=null;return this}});SC.RunLoop=d;var e;SC.run=e=function(a,c){var d,f;e.begin();if(a||c)d=b(a,c);e.end();return d},SC.run.begin=function(){e.currentRunLoop=new d(e.currentRunLoop)},SC.run.end=function(){sc_assert("must have a current run loop",e.currentRunLoop),e.currentRunLoop=e.currentRunLoop.end()},SC.run.queues=["sync","actions","timers"],SC.run.schedule=function(a,b,c){var d=e.autorun();d.schedule.apply(d,arguments)};var f;SC.run.autorun=function(){e.currentRunLoop||e.begin(),f||(f=setTimeout(g,1));return e.currentRunLoop},SC.run.sync=function(){e.autorun(),e.currentRunLoop.flush("sync")};var h={},i=!1;SC.run.later=function(b,c){var d,f,g,i,k;arguments.length===2&&"function"==typeof b?(k=c,c=b,b=undefined,d=[b,c]):(d=a.call(arguments),k=d.pop()),f=Date.now()+k,g={target:b,method:c,expires:f,args:d},i=SC.guidFor(g),h[i]=g,e.once(h,j);return i},SC.run.once=function(b,c){var d=SC.guidFor(b),f=SC.guidFor(c),g,i,j=e.autorun().onceTimers;g=j[d]&&j[d][f],g&&h[g]?h[g].args=a.call(arguments):(i={target:b,method:c,args:a.call(arguments),tguid:d,mguid:f},g=SC.guidFor(i),h[g]=i,j[d]||(j[d]={}),j[d][f]=g,e.schedule("timers",i,k,g,j));return g};var l=!1;SC.run.next=function(b,c){var d,e;d={target:b,method:c,args:a.call(arguments),next:!0},e=SC.guidFor(d),h[e]=d,l||(l=setTimeout(m,1));return e},SC.run.cancel=function(a){delete h[a]},SC.RunLoop.begin=SC.run.begin,SC.RunLoop.end=SC.run.end}(),function(){function k(a,b){var c=b._logic;return c?c(a,b._from,b._from2):f(a,b._from)}function j(a){return a===undefined||a===null||a===""||SC.isArray(a)&&e(a,"length")===0}function i(a,b,c){var d=a._forceKind;d&&(b=d(b,a._placeholder));var e=a._transforms,f=e?e.length:0,g;for(g=0;g<f;g++)b=e[g].call(this,b,c);return b}function d(a){return!a}function c(a){return!!a}function b(a,b){if(a instanceof Array)return a.length>1?b:a[0];return a}function a(a){if(a instanceof Array)return a;if(a===undefined||a===null)return[];return[a]}SC.LOG_BINDINGS=!1||!!SC.ENV.LOG_BINDINGS,SC.BENCHMARK_BINDING_NOTIFICATIONS=!!SC.ENV.BENCHMARK_BINDING_NOTIFICATIONS,SC.BENCHMARK_BINDING_SETUP=!!SC.ENV.BENCHMARK_BINDING_SETUP,SC.MULTIPLE_PLACEHOLDER="@@MULT@@",SC.EMPTY_PLACEHOLDER="@@EMPTY@@";var e=SC.get,f=SC.getPath,g=SC.setPath,h=SC.guidFor,l=function(a,b,c){return f(a,b)&&f(a,c)},m=function(a,b,c){return f(a,b)||f(a,c)},n=SC.Object.extend({_direction:"fwd",init:function(a,b){this._from=b,this._to=a},from:function(a){this._from=a;return this},to:function(a){this._to=a;return this},oneWay:function(a){this._oneWay=a===undefined?!0:!!a;return this},transform:function(a){this._transforms||(this._transforms=[]),this._transforms.push(a);return this},resetTransforms:function(){this._transforms=null;return this},single:function(a){a===undefined&&(a=SC.MULTIPLE_PLACEHOLDER),this._forceKind=b,this._placeholder=a;return this},multiple:function(){this._forceKind=a,this._placeholder=null;return this},bool:function(){this.transform(c);return this},notEmpty:function(a,b){b&&(a&&this.from(a),a=b),a||(a=SC.EMPTY_PLACEHOLDER),this.transform(function(b){return j(b)?a:b});return this},notNull:function(a){throw new Error("SC.Binding.notNull not yet implemented")},not:function(){this.transform(d);return this},isNull:function(a){throw new Error("SC.Binding.isNull not yet implemented")},toString:function(){var a=this._oneWay?"[oneWay]":"";return SC.String.fmt("SC.Binding<%@>(%@ -> %@)%@",[h(this),this._from,this._to,a])},connect:function(a){sc_assert("Must pass a valid object to SC.Binding.connect()",!!a);var b=this._oneWay,c=this._from2;SC.addObserver(a,this._from,this,this.fromDidChange),c&&SC.addObserver(a,c,this,this.fromDidChange),b||SC.addObserver(a,this._to,this,this.toDidChange),SC.meta(a,!1).proto!==a&&this._scheduleSync(a,"fwd"),this._readyToSync=!0;return this},disconnect:function(a){sc_assert("Must pass a valid object to SC.Binding.disconnect()",!!a);var b=this._oneWay,c=this._from2;SC.removeObserver(a,this._from,this,this.fromDidChange),c&&SC.removeObserver(a,c,this,this.fromDidChange),b||SC.removeObserver(a,this._to,this,this.toDidChange),this._readyToSync=!1;return this},fromDidChange:function(a){this._scheduleSync(a,"fwd")},toDidChange:function(a){this._scheduleSync(a,"back")},_scheduleSync:function(a,b){var c=h(a);this[c]||SC.run.schedule("sync",this,this._sync,a),this[c]=this[c]==="fwd"||!b?"fwd":b},_sync:function(a){var b=SC.LOG_BINDINGS,c=h(a),d=this[c],e,g;!this._readyToSync||(delete this[c],d==="fwd"?(e=k(a,this),g=i(this,e,a),b&&SC.Logger.log(" ",this.toString(),e,"->",g,a),SC.setPath(a,this._to,g)):d==="back"&&!this._oneWay&&(e=f(a,this._to),g=i(this,k(a,this),a),e!==g&&(b&&SC.Logger.log(" ",this.toString(),e,"<-",g,a),SC.setPath(a,this._from,e))))}});n.reopenClass({from:function(){var a=this,b=new a;return b.from.apply(b,arguments)},to:function(){var a=this,b=new a;return b.to.apply(b,arguments)},oneWay:function(a,b){var c=this,d=new c(null,a);return d.oneWay(b)},single:function(a){var b=this,c=new b(null,a);return c.single()},multiple:function(a){var b=this,c=new b(null,a);return c.multiple()},oneWay:function(a,b){var c=this,d=new c(null,a);return d.oneWay(b)},transform:function(a){var b=this,c=new b;return c.transform(a)},notEmpty:function(a,b){var c=this,d=new c(null,a);return d.notEmpty(b)},bool:function(a){var b=this,c=new b(null,a);return c.bool()},not:function(a){var b=this,c=new b(null,a);return c.not()},and:function(a,b){var c=this,d=(new c(null,a)).oneWay();d._from2=b,d._logic=l;return d},or:function(a,b){var c=this,d=(new c(null,a)).oneWay();d._from2=b,d._logic=m;return d}}),SC.Binding=n,SC.bind=function(a,b,c){return(new SC.Binding(b,c)).connect(a)}}(),function(){function g(a,b,d,e,f){var g=d._objects;g||(g=d._objects={});var h,i;while(--f>=e){var j=a.objectAt(f);j&&(SC.removeBeforeObserver(j,b,d,"contentKeyWillChange"),SC.removeObserver(j,b,d,"contentKeyDidChange"),i=c(j),h=g[i],h[h.indexOf(f)]=null)}}function f(a,b,d,e,f){var g=d._objects,h;g||(g=d._objects={});while(--f>=e){var i=a.objectAt(f);i&&(SC.addBeforeObserver(i,b,d,"contentKeyWillChange"),SC.addObserver(i,b,d,"contentKeyDidChange"),h=c(i),g[h]||(g[h]=[]),g[h].push(f))}}var a=SC.set,b=SC.get,c=SC.guidFor,d=SC.Object.extend(SC.Array,{init:function(a,b,c){this._super(),this._keyName=b,this._owner=c,this._content=a},objectAt:function(a){var c=this._content.objectAt(a);return c&&b(c,this._keyName)},length:function(){var a=this._content;return a?b(a,"length"):0}.property("[]").cacheable()}),e=/^.+:(before|change)$/;SC.EachProxy=SC.Object.extend({init:function(a){this._super(),this._content=a,a.addArrayObserver(this),SC.watchedEvents(this).forEach(function(a){this.didAddListener(a)},this)},unknownProperty:function(b){var c;c=new d(this._content,b,this),a(this,b,c),this.beginObservingContentKey(b);return c},arrayWillChange:function(a,c,d,e){var f=this._keys,h,i,j;if(!!f){j=d>0?c+d:-1,SC.beginPropertyChanges(this);for(h in f){if(!f.hasOwnProperty(h))continue;j>0&&g(a,h,this,c,j),i=b(this,h),SC.propertyWillChange(this,h),i&&i.arrayContentWillChange(c,d,e)}SC.endPropertyChanges(this)}},arrayDidChange:function(a,c,d,e){var g=this._keys,h,i,j;if(!!g){j=e>0?c+e:-1,SC.beginPropertyChanges(this);for(h in g){if(!g.hasOwnProperty(h))continue;j>0&&f(a,h,this,c,j),i=b(this,h),i&&i.arrayContentDidChange(c,d,e),SC.propertyDidChange(this,h)}SC.endPropertyChanges(this)}},didAddListener:function(a){e.test(a)&&this.beginObservingContentKey(a.slice(0,-7))},didRemoveListener:function(a){e.test(a)&&this.stopObservingContentKey(a.slice(0,-7))},beginObservingContentKey:function(a){var c=this._keys;c||(c=this._keys={});if(!c[a]){c[a]=1;var d=this._content,e=b(d,"length");f(d,a,this,0,e)}else c[a]++},stopObservingContentKey:function(a){var c=this._keys;if(c&&c[a]>0&&--c[a]<=0){var d=this._content,e=b(d,"length");g(d,a,this,0,e)}},contentKeyWillChange:function(a,d){var e=this._objects[c(a)],f=b(this,d),g=f&&e?e.length:0,h;for(h=0;h<g;h++)f.arrayContentWillChange(e[h],1,1)},contentKeyDidChange:function(a,d){var e=this._objects[c(a)],f=b(this,d),g=f&&e?e.length:0,h;for(h=0;h<g;h++)f.arrayContentDidChange(e[h],1,1);SC.propertyDidChange(this,d)}})}(),function(){var a=SC.get,b=SC.set,c=SC.Mixin.create(SC.MutableArray,SC.Observable,SC.Copyable,{get:function(a){return a==="length"?this.length:"number"==typeof a?this[a]:this._super(a)},objectAt:function(a){return this[a]},replace:function(b,c,d){if(this.isFrozen)throw SC.FROZEN_ERROR;var e=d?a(d,"length"):0;this.arrayContentWillChange(b,c,e);if(!d||d.length===0)this.splice(b,c);else{var f=[b,c].concat(d);this.splice.apply(this,f)}this.arrayContentDidChange(b,c,e);return this},unknownProperty:function(a,b){var c;b!==undefined&&c===undefined&&(c=this[a]=b);return c},indexOf:function(a,b){var c,d=this.length;b===undefined?b=0:b=b<0?Math.ceil(b):Math.floor(b),b<0&&(b+=d);for(c=b;c<d;c++)if(this[c]===a)return c;return-1},lastIndexOf:function(a,b){var c,d=this.length;b===undefined?b=d-1:b=b<0?Math.ceil(b):Math.floor(b),b<0&&(b+=d);for(c=b;c>=0;c--)if(this[c]===a)return c;return-1},copy:function(){return this.slice()}}),d=["length"];c.keys().forEach(function(a){Array.prototype[a]&&d.push(a)}),d.length>0&&(c=c.without.apply(c,d)),SC.NativeArray=c,SC.NativeArray.activate=function(){c.apply(Array.prototype)},SC.EXTEND_PROTOTYPES&&SC.NativeArray.activate()}(),function(){}(),function(){}(),function(){var a=SC.get,b=SC.set;SC.RenderBuffer=function(a){return SC._RenderBuffer.create({elementTag:a})},SC._RenderBuffer=SC.Object.extend({elementClasses:null,elementId:null,elementAttributes:null,elementContent:null,elementTag:null,elementStyle:null,escapeContent:!1,escapeFunction:null,parentBuffer:null,init:function(){this._super(),b(this,"elementClasses",[]),b(this,"elementAttributes",{}),b(this,"elementStyle",{}),b(this,"elementContent",[])},push:function(b){a(this,"elementContent").pushObject(b);return this},addClass:function(b){a(this,"elementClasses").pushObject(b);return this},id:function(a){b(this,"elementId",a);return this},attr:function(b,c){a(this,"elementAttributes")[b]=c;return this},style:function(b,c){a(this,"elementStyle")[b]=c;return this},begin:function(a){return SC._RenderBuffer.create({parentBuffer:this,elementTag:a})},end:function(){var b=a(this,"parentBuffer");if(b){var c=this.string();b.push(c);return b}return this},element:function(){return SC.$(this.string())[0]},string:function(){var b=a(this,"elementId"),c=a(this,"elementClasses"),d=a(this,"elementAttributes"),e=a(this,"elementStyle"),f=a(this,"elementContent"),g=a(this,"elementTag"),h=[],i,j=["<"+g];b&&j.push('id="'+b+'"'),c.length&&j.push('class="'+c.join(" ")+'"');if(!jQuery.isEmptyObject(e)){for(i in e)e.hasOwnProperty(i)&&h.push(i+":"+e[i]+";");j.push('style="'+h.join()+'"')}for(i in d)d.hasOwnProperty(i)&&j.push(i+'="'+d[i]+'"');j.push(">"),j=j.join(" "),f=f.join(),a(this,"escapeContent")&&(f=a(this,"escapeFunction")(f));return j+f+"</"+g+">"}})}(),function(){var a=SC.get,b=SC.set;SC.EventDispatcher=SC.Object.extend({rootElement:document,setup:function(){var a,b={touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",change:"change"};for(a in b)b.hasOwnProperty(a)&&this.setupHandler(a,b[a])},setupHandler:function(b,c){var d=a(this,"rootElement");SC.$(d).delegate(".sc-view",b+".sproutcore",function(b){var d=SC.View.views[this.id],e=!0,f;SC.run(function(){while(e!==!1&&d)f=d[c],SC.typeOf(f)==="function"&&(e=f.call(d,b)),d=a(d,"parentView")});return e})},destroy:function(){var b=a(this,"rootElement");SC.$(b).undelegate(".sproutcore")}})}(),function(){var a=SC.get,b=SC.set;SC.Application=SC.Object.extend({rootElement:document,eventDispatcher:null,init:function(){var c,d=a(this,"rootElement");c=SC.EventDispatcher.create({rootElement:d}),b(this,"eventDispatcher",c),SC.$(document).ready(function(){c.setup()})},destroy:function(){a(this,"eventDispatcher").destroy()}})}(),function(){}(),function(){var a=SC.get,b=SC.set;SC.TEMPLATES={},SC.View=SC.Object.extend({concatenatedProperties:["classNames","classNameBindings"],isView:YES,templateName:null,templates:SC.TEMPLATES,template:function(b,c){if(c!==undefined)return c;var d=a(this,"templateName"),e=a(a(this,"templates"),d);if(!e&&d)throw new SC.Error('%@ - Unable to find template "%@".'.fmt(this,d));return e||a(this,"defaultTemplate")}.property("templateName").cacheable(),templateContext:function(a,b){return b!==undefined?b:this}.property().cacheable(),parentView:null,isVisible:!0,childViews:[],render:function(b){var c=a(this,"template");if(!!c){var d=a(this,"templateContext"),e={data:{view:this,isRenderData:!0}};this._didRenderChildViews=YES;var f=c(d,e);b.push(f)}},_applyClassNameBindings:function(){var b=a(this,"classNameBindings"),c=a(this,"classNames"),d,e,f;!b||b.forEach(function(a){var b,g=function(){e=this._classStringForProperty(a),d=this.$(),b&&d.removeClass(b),e?(d.addClass(e),b=e):b=null};SC.addObserver(this,a,g),f=this._classStringForProperty(a),f&&(c.push(f),b=f)},this)},_classStringForProperty:function(b){var c=b.split(":"),d=c[1];b=c[0];var e=SC.getPath(this,b);if(e===YES){if(d)return d;return SC.String.dasherize(a(b.split("."),"lastObject"))}return e!==NO&&e!==undefined&&e!==null?e:null},element:function(b,c){if(c!==undefined)return c;var d=a(this,"parentView");d&&(d=a(d,"element"));if(d)return this.findElementInParentElement(d)}.property("parentView").cacheable(),$:function(b){var c=a(this,"element");return c?b===undefined?SC.$(c):SC.$(b,c):SC.$()},mutateChildViews:function(b){var c=a(this,"childViews"),d=a(c,"length"),e;while(--d>=0)e=c[d],b.call(this,e);return this},forEachChildView:function(b){var c=a(this,"childViews"),d=a(c,"length"),e,f;for(f=0;f<d;f++)e=c[f],b.call(this,e);return this},appendTo:function(b){var c=a(this,"element");c||this.createElement(),this.$().appendTo(b);return this},append:function(){return this.appendTo(document.body)},remove:function(){this.destroyElement()},elementId:function(a,b){return b!==undefined?b:SC.guidFor(this)}.property().cacheable(),findElementInParentElement:function(b){var c="#"+a(this,"elementId");return jQuery(c)[0]||jQuery(c,b)[0]},renderBuffer:function(a){return SC.RenderBuffer(a)},createElement:function(){if(a(this,"element"))return this;var c=this.renderBuffer(a(this,"tagName"));this.renderToBuffer(c),b(this,"element",c.element()),this._notifyDidCreateElement();return this},didCreateElement:function(){},_notifyDidCreateElement:function(){this.didCreateElement(),this.forEachChildView(function(a){a._notifyDidCreateElement()})},destroyElement:function(){var c=a(this,"element");c&&(this._notifyWillDestroyElement(),SC.$(c).remove(),b(this,"element",null));return this},willDestroyElement:function(){},_notifyWillDestroyElement:function(){this.willDestroyElement(),this.forEachChildView(function(a){a._notifyWillDestroyElement()})},_sccv_elementWillChange:function(){this.forEachChildView(function(a){SC.propertyWillChange(a,"element")})}.observesBefore("element"),_sccv_elementDidChange:function(){this.forEachChildView(function(a){SC.propertyDidChange(a,"element")})}.observes("element"),parentViewDidChange:SC.K,renderToBuffer:function(a){var c,d,e;SC.beginPropertyChanges(this),b(this,"elementNeedsUpdate",NO),this.applyAttributesToBuffer(a),this.render(a),this._didRenderChildViews||this.renderChildViews(a),this._didRenderChildViews=NO,SC.endPropertyChanges(this)},applyAttributesToBuffer:function(b){this._applyClassNameBindings(),b.addClass(a(this,"classNames").join(" ")),b.id(a(this,"elementId"));var c=a(this,"ariaRole");c&&b.attr("role",c),a(this,"isVisible")||b.style("display","none")},renderChildViews:function(b){this.forEachChildView(function(c){b=b.begin(a(c,"tagName")),c.renderToBuffer(b),b=b.end()}),this._didRenderChildViews=YES;return b},tagName:"div",ariaRole:null,classNames:["sc-view"],classNameBindings:[],init:function(){var b=a(this,"parentView");this._super(),SC.View.views[a(this,"elementId")]=this,this.childViews=a(this,"childViews").slice(),this.classNameBindings=a(this,"classNameBindings").slice(),this.classNames=a(this,"classNames").slice(),this.createChildViews()},removeChild:function(c){b(c,"parentView",null);var d=a(this,"childViews");d.removeObject(c);return this},removeAllChildren:function(){return this.mutateChildViews(function(a){this.removeChild(a)})},destroyAllChildren:function(){return this.mutateChildViews(function(a){a.destroy()})},removeFromParent:function(){var b=a(this,"parentView");this.remove(),b&&b.removeChild(this);return this},destroy:function(){if(a(this,"isDestroyed"))return this;this.destroyElement(),this.mutateChildViews(function(a){a.destroy()}),delete SC.View.views[a(this,"elementId")],a(this,"parentView")&&this.removeFromParent(),this._super();return this},createChildViews:function(){var b=a(this,"childViews"),c=a(b,"length"),d,e,f,g;SC.beginPropertyChanges(this);for(d=0;d<c;++d){e=g=b[d];if(e){typeof e=="string"?g=this[e]:e=null;if(!g){SC.Logger.error("No view with name "+e+" has been found in "+this.toString());continue}g=this.createChildView(g),e&&(this[e]=g)}b[d]=g}SC.endPropertyChanges(this);return this},createChildView:function(a,c){SC.View.detect(a)?a=a.create(c||{},{parentView:this}):(sc_assert("must pass instance of View",a instanceof SC.View),b(a,"parentView",this));return a},_isVisibleDidChange:function(){this.$().toggle(a(this,"isVisible"))}.observes("isVisible")}),SC.View.views={}}(),function(){var a=SC.get,b=SC.set;SC.CollectionView=SC.View.extend({content:null,emptyView:null,itemViewClass:SC.View,init:function(){var a=this._super();this._sctcv_contentDidChange();return a},didCreateElement:function(){var b=a(this,"content");if(b){var c=a(b,"length");this.arrayWillChange(b,0,0,c),this.arrayDidChange(b,0,0,c)}},_sctcv_contentDidChange:function(){this.$().empty();var b=this._sccv_content,c=a(this,"content"),d=0,e=0;b&&(b.removeArrayObserver(this),d=a(b,"length")),c&&(c.addArrayObserver(this),e=a(c,"length")),this.arrayWillChange(b,0,d,e),this._sccv_content=c,this.arrayDidChange(c,0,d,e)}.observes("content"),destroy:function(){b(this,"content",null);return this._super()},arrayWillChange:function(b,c,d,e){if(!!a(this,"element")){var f=a(this,"emptyView");f&&!SC.Object.detect(f)&&f.removeFromParent();var g=a(this,"childViews"),h,i,j;j=a(g,"length");for(i=c+d-1;i>=c;i--)g[i].destroy()}},arrayDidChange:function(c,d,e,f){if(!!a(this,"element")){var g=a(this,"itemViewClass"),h=a(this,"childViews"),i=[],j,k,l,m,n,o,p,q,r,s;n=this.$();if(c){var t=c.slice(d,d+f);l=h.objectAt(d-1),o=l?l.$():null,s=a(t,"length");for(r=0;r<s;r++)p=t.objectAt(r),k=this.createChildView(g,{content:p}),q=k.createElement().$(),o?q.insertAfter(o):n.append(q),o=q,i.push(k);h.replace(d,0,i)}var u=a(this,"emptyView");a(h,"length")===0&&u&&(SC.Object.detect(u)&&(u=this.createChildView(u)),b(this,"emptyView",u),u.createElement().$().appendTo(n),b(this,"childViews",[u]))}}})}(),function(){}(),function(){"undefined"==typeof jQuery&&require("jquery"),SC.$=jQuery}(),function(){var a=SC.get,b=SC.set;SC.Button=SC.View.extend({classNames:["sc-button"],classNameBindings:["isActive"],tagName:"button",targetObject:function(){var b=a(this,"target");return SC.typeOf(b)==="string"?SC.getPath(b):b}.property("target").cacheable(),mouseDown:function(){b(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0},mouseLeave:function(){this._mouseDown&&(b(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(b(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(c){if(a(this,"isActive")){var d=a(this,"action"),e=a(this,"targetObject");e&&d&&(typeof d=="string"&&(d=e[d]),d.call(e,this)),b(this,"isActive",!1)}this._mouseDown=!1,this._mouseEntered=!1},touchStart:function(a){this.mouseDown(a)},touchEnd:function(a){this.mouseUp(a)}})}(),function(){SC.Handlebars={},SC.Handlebars.Compiler=function(){},SC.Handlebars.Compiler.prototype=SC.create(Handlebars.Compiler.prototype),SC.Handlebars.Compiler.prototype.compiler=SC.Handlebars.Compiler,SC.Handlebars.JavaScriptCompiler=function(){},SC.Handlebars.JavaScriptCompiler.prototype=SC.create(Handlebars.JavaScriptCompiler.prototype),SC.Handlebars.JavaScriptCompiler.prototype.compiler=SC.Handlebars.JavaScriptCompiler,SC.Handlebars.JavaScriptCompiler.prototype.nameLookup=function(a,b,c){return c==="context"?"SC.get("+a+", "+this.quotedString(b)+");":Handlebars.JavaScriptCompiler.prototype.nameLookup.call(this,a,b,c)},SC.Handlebars.Compiler.prototype.mustache=function(a){if(a.params.length||a.hash)return Handlebars.Compiler.prototype.mustache.call(this,a);var b=new Handlebars.AST.IdNode(["bind"]);a.escaped&&(a.hash=a.hash||new Handlebars.AST.HashNode([]),a.hash.pairs.push(["escaped",new Handlebars.AST.StringNode("true")])),a=new Handlebars.AST.MustacheNode([b].concat([a.id]),a.hash,!a.escaped);return Handlebars.Compiler.prototype.mustache.call(this,a)},SC.Handlebars.compile=function(a){var b=Handlebars.parse(a),c=(new SC.Handlebars.Compiler).compile(b,{data:!0,stringParams:!0}),d=(new SC.Handlebars.JavaScriptCompiler).compile(c,{data:!0,stringParams:!0});d.rawTemplate=a;return d},Handlebars.registerHelper("helperMissing",function(a,b){var c;c="%@ Handlebars error: Could not find property '%@' on object %@.";throw new SC.Error(SC.String.fmt(c,b.data.view,a,this))}),SC._RenderBuffer.reopen({escapeFunction:Handlebars.Utils.escapeExpression})}(),function(){var a=SC.set,b=SC.get;SC.Checkbox=SC.View.extend({title:null,value:!1,classNames:["sc-checkbox"],defaultTemplate:SC.Handlebars.compile('<label><input type="checkbox" {{bindAttr checked="value"}}>{{title}}</label>'),change:function(){SC.run.once(this,this._updateElementValue);return!1},_updateElementValue:function(){var b=this.$("input:checkbox");a(this,"value",b.prop("checked"))}})}(),function(){var a=SC.get,b=SC.set;SC.TextField=SC.View.extend({classNames:["sc-text-field"],insertNewline:SC.K,cancel:SC.K,type:"text",value:"",placeholder:null,defaultTemplate:function(){var b=a(this,"type");return SC.Handlebars.compile('<input type="%@" {{bindAttr value="value" placeholder="placeholder"}}>'.fmt(b))}.property(),focusOut:function(a){this._elementValueDidChange();return!1},change:function(a){this._elementValueDidChange();return!1},keyUp:function(a){this.interpretKeyEvents(a);return!1},interpretKeyEvents:function(a){var b=SC.TextField.KEY_EVENTS,c=b[a.keyCode];if(c)return this[c](a);this._elementValueDidChange()},_elementValueDidChange:function(){var a=this.$("input");b(this,"value",a.val())},_valueDidChange:function(){SC.run.once(this,this._updateElementValue)},_updateElementValue:function(){var b=this.$("input");b.val(a(this,"value"))}}),SC.TextField.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){}(),function(){var a=SC.get,b=SC.set,c=SC.getPath;SC._BindableSpanView=SC.View.extend({tagName:"span",shouldDisplayFunc:null,preserveContext:!1,displayTemplate:null,inverseTemplate:null,property:null,render:function(d){a(this,"isEscaped")&&b(d,"escapeContent",!0);var e=a(this,"shouldDisplayFunc"),f=a(this,"property"),g=a(this,"preserveContext"),h=a(this,"previousContext"),i=a(this,"inverseTemplate"),j=a(this,"displayTemplate"),k=c(h,f);if(e(k)){b(this,"template",j);if(g)b(this,"templateContext",h);else if(j)b(this,"templateContext",k);else{d.push(k);return}}else i?(b(this,"template",i),g?b(this,"templateContext",h):b(this,"templateContext",k)):b(this,"template",function(){return""});return this._super(d)},rerender:function(){var c;this.destroyAllChildren();var d=this.renderBuffer(a(this,"tagName"));a(this,"isEscaped")&&b(d,"escapeContent",!0),this.renderToBuffer(d),c=d.element(),this.$().replaceWith(c),b(this,"element",c),this._notifyDidCreateElement()}})}(),function(){var a=SC.get,b=SC.getPath;(function(){var c=function(c,d,e,f){var g=d.data,h=d.fn,i=d.inverse,j=g.view,k=this;if("object"==typeof this){var l=j.createChildView(SC._BindableSpanView,{preserveContext:e,shouldDisplayFunc:f,displayTemplate:h,inverseTemplate:i,property:c,previousContext:k,isEscaped:d.hash.escaped}),m,n;a(j,"childViews").pushObject(l),m=function(){a(l,"element")?l.rerender():SC.removeObserver(k,c,n)},n=function(){SC.run.once(m)},SC.addObserver(k,c,n);var o=l.renderBuffer(a(l,"tagName"));l.renderToBuffer(o);return new Handlebars.SafeString(o.string())}return b(this,c)};Handlebars.registerHelper("bind",function(a,b){return c.call(this,a,b,!1,function(a){return!SC.none(a)})}),Handlebars.registerHelper("boundIf",function(b,d){if(d)return c.call(this,b,d,!0,function(b){return SC.typeOf(b)==="array"?a(b,"length")!==0:!!b});throw new SC.Error("Cannot use boundIf helper without a block.")})})(),Handlebars.registerHelper("with",function(a,b){return Handlebars.helpers.bind.call(b.contexts[0],a,b)}),Handlebars.registerHelper("if",function(a,b){return Handlebars.helpers.boundIf.call(b.contexts[0],a,b)}),Handlebars.registerHelper("unless",function(a,b){var c=b.fn,d=b.inverse;b.fn=d,b.inverse=c;return Handlebars.helpers.boundIf.call(b.contexts[0],a,b)}),Handlebars.registerHelper("bindAttr",function(a){var c=a.hash,d=a.data.view,e=[],f=this,g=jQuery.uuid++,h=c["class"];if(h!==null&&h!==undefined){var i=SC.Handlebars.bindClasses(this,h,d,g);e.push('class="'+i.join(" ")+'"'),delete c["class"]}var j=SC.keys(c);j.forEach(function(a){var h=c[a],i=b(f,h),j,k;j=function j(){var c=b(f,h),e=d.$("[data-handlebars-id='"+g+"']");e.length===0?SC.removeObserver(f,h,k):c===NO?e.removeAttr(a):c===YES?e.attr(a,a):e.attr(a,c)},k=function(){SC.run.once(j)},SC.addObserver(f,h,k),i===YES&&(i=a),i!==NO&&e.push(a+'="'+i+'"')},this),e.push('data-handlebars-id="'+g+'"');return e.join(" ")}),SC.Handlebars.bindClasses=function(c,d,e,f){var g=[],h,i,j,k=function(d){var e=b(c,d);return e===YES?SC.String.dasherize(a(d.split("."),"lastObject")):e!==NO&&e!==undefined&&e!==null?e:null};d.split(" ").forEach(function(a){var b,d,l;d=function(){h=k(a),j=f?e.$("[data-handlebars-id='"+f+"']"):e.$(),j.length===0?SC.removeObserver(c,a,l):(b&&j.removeClass(b),h?(j.addClass(h),b=h):b=null)},l=function(){SC.run.once(d)},SC.addObserver(c,a,l),i=k(a),i&&(g.push(i),b=i)});return g}}(),function(){
11
+ var a=SC.get,b=SC.set;SC.Handlebars.ViewHelper=SC.Object.create({viewClassFromHTMLOptions:function(a,b){var c={},d=b["class"],e=!1;b.id&&(c.elementId=b.id,e=!0),d&&(d=d.split(" "),c.classNames=d,e=!0),b.classBinding&&(c.classNameBindings=b.classBinding.split(" "),e=!0),e&&(b=jQuery.extend({},b),delete b.id,delete b["class"],delete b.classBinding);return a.extend(b,c)},helper:function(c,d,e){var f=e.inverse,g=e.data,h=g.view,i=e.fn,j=e.hash,k;if("string"==typeof d){k=SC.getPath(c,d);if(!k)throw new SC.Error("Unable to find view at path '"+d+"'")}else sc_assert("You must pass a string or a view class to the #view helper",SC.View.detect(d)),k=d;sc_assert("Null or undefined object was passed to the #view helper. Did you mean to pass a property path string?",!!k),k=this.viewClassFromHTMLOptions(k,j);var l=g.view,m=a(l,"childViews"),n=l.createChildView(k);i&&b(n,"template",i),m.pushObject(n);var o=SC.RenderBuffer(a(n,"tagName"));n.renderToBuffer(o);return new Handlebars.SafeString(o.string())}}),Handlebars.registerHelper("view",function(a,b){a&&a.data&&a.data.isRenderData&&(b=a,a="SC.View");return SC.Handlebars.ViewHelper.helper(this,a,b)})}(),function(){var a=SC.get;SC.Handlebars.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td"},Handlebars.registerHelper("collection",function(b,c){b&&b.data&&b.data.isRenderData&&(c=b,b=undefined);var d=c.fn,e=c.data,f=c.inverse,g;g=b?SC.getPath(b):SC.CollectionView,sc_assert("%@ #collection: Could not find %@".fmt(e.view,b),!!g);var h=c.hash,i={},j;for(var k in h)h.hasOwnProperty(k)&&(j=k.match(/^item(.)(.*)$/),j&&(i[j[1].toLowerCase()+j[2]]=h[k],delete h[k]));var l=h.tagName||a(g,"proto").tagName,m=SC.Handlebars.CONTAINER_MAP[l];m&&(i.tagName=i.tagName||m),d&&(i.template=d,delete c.fn),f&&(h.emptyView=SC.View.extend({template:f})),h.preserveContext&&(i.templateContext=function(){return a(this,"content")}.property("content"),delete h.preserveContext);var n=a(g,"proto").itemViewClass;h.itemViewClass=SC.Handlebars.ViewHelper.viewClassFromHTMLOptions(n,i);return Handlebars.helpers.view.call(this,g,c)}),Handlebars.registerHelper("each",function(a,b){b.hash.contentBinding=SC.Binding.from("parentView."+a).oneWay(),b.hash.preserveContext=!0;return Handlebars.helpers.collection.call(this,null,b)})}(),function(){}(),function(){SC.$(document).ready(function(){SC.$('head script[type="text/html"]').each(function(){var a=SC.$(this),b=a.attr("data-template-name")||a.attr("id");if(!b)throw new SC.Error("Template found without a name specified.Please provide a data-template-name attribute.\n"+a.html());SC.TEMPLATES[b]=SC.Handlebars.compile(a.html()),a.remove()}),SC.$('body script[type="text/html"]').each(function(){var a=SC.$(this),b=SC.Handlebars.compile(a.html()),c=a.attr("data-view"),d=c?SC.getPath(c):SC.View;d=d.create({template:b}),d.createElement(),a.replaceWith(d.$())})})}(),function(){}(),function(){}()
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sproutcore-rails
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.0
6
+ platform: ruby
7
+ authors:
8
+ - Joao Carlos
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-05-26 00:00:00 Z
14
+ dependencies: []
15
+
16
+ description:
17
+ email:
18
+ - contact@kiskolabs.com
19
+ executables: []
20
+
21
+ extensions: []
22
+
23
+ extra_rdoc_files: []
24
+
25
+ files:
26
+ - README.md
27
+ - lib/sproutcore-rails/version.rb
28
+ - lib/sproutcore-rails.rb
29
+ - vendor/assets/javascripts/sproutcore.js
30
+ homepage: https://github.com/kiskolabs/sproutcore-rails
31
+ licenses: []
32
+
33
+ post_install_message:
34
+ rdoc_options: []
35
+
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: "0"
50
+ requirements: []
51
+
52
+ rubyforge_project:
53
+ rubygems_version: 1.8.3
54
+ signing_key:
55
+ specification_version: 3
56
+ summary: SproutCore 2 for Rails 3.1.
57
+ test_files: []
58
+