ember-source 1.0.0.rc3.4 → 1.0.0.rc3.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ember-source might be problematic. Click here for more details.

@@ -8,14 +8,14 @@
8
8
  // ==========================================================================
9
9
 
10
10
 
11
- // Version: v1.0.0-rc.3-251-gcd5dfe3
12
- // Last commit: cd5dfe3 (2013-05-18 11:06:43 -0700)
11
+ // Version: v1.0.0-rc.3-2-g85bfdbf
12
+ // Last commit: 85bfdbf (2013-07-25 20:16:20 -0400)
13
13
 
14
14
 
15
- (function(){var e,t;(function(){var r={},n={};e=function(e,t,n){r[e]={deps:t,callback:n}},t=function(e){if(n[e])return n[e];n[e]={};for(var i,o=r[e],s=o.deps,a=o.callback,u=[],c=0,l=s.length;l>c;c++)s[c]==="exports"?u.push(i={}):u.push(t(s[c]));var h=a.apply(this,u);return n[e]=i||h}})(),function(){function e(e){return t.console&&t.console[e]?t.console[e].apply?function(){t.console[e].apply(t.console,arguments)}:function(){var r=Array.prototype.join.call(arguments,", ");t.console[e](r)}:void 0}"undefined"==typeof Ember&&(Ember={});var t=Ember.imports=Ember.imports||this,r=Ember.exports=Ember.exports||this;Ember.lookup=Ember.lookup||this,r.Em=r.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.0.0-rc.3",Ember.ENV=Ember.ENV||("undefined"==typeof ENV?{}:ENV),Ember.config=Ember.config||{},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,typeof Ember.EXTEND_PROTOTYPES=="undefined"&&(Ember.EXTEND_PROTOTYPES=!0),Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.debug&&(Ember.debug=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(e,t){return t}),Ember.uuid=0,Ember.Logger={log:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K},Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.call(t||this);try{return e.call(t||this)}catch(r){Ember.onerror(r)}},Ember.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return Ember.isNone(e)||e.length===0&&"function"!=typeof e||"object"==typeof e&&Ember.get(e,"length")===0},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty)}(),function(){var e=Ember.platform={};if(Ember.create=Object.create,Ember.create&&Ember.create({a:1},{a:{value:2}}).a!==2&&(Ember.create=null),!Ember.create||Ember.ENV.STUB_OBJECT_CREATE){var t=function(){};Ember.create=function(e,r){if(t.prototype=e,e=new t,r){t.prototype=e;for(var n in r)t.prototype[n]=r[n].value;e=new t}return t.prototype=null,e},Ember.create.isSimulated=!0}var r,n,i=Object.defineProperty;if(i)try{i({},"a",{get:function(){}})}catch(o){i=null}i&&(r=function(){var e={};return i(e,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),i(e,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),e.a===!0}(),n=function(){try{return i(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),r?n||(i=function(e,t,r){var n;return n="object"==typeof Node?e instanceof Node:"object"==typeof e&&typeof e.nodeType=="number"&&typeof e.nodeName=="string",n?e[t]=r.value:Object.defineProperty(e,t,r)}):i=null),e.defineProperty=i,e.hasPropertyAccessors=!0,e.defineProperty||(e.hasPropertyAccessors=!1,e.defineProperty=function(e,t,r){r.get||(e[t]=r.value)},e.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!e.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),function(){var e=function(e){return e&&Function.prototype.toString.call(e).indexOf("[native code]")>-1},t=e(Array.prototype.map)?Array.prototype.map:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=new Array(r),i=arguments[1],o=0;r>o;o++)o in t&&(n[o]=e.call(i,t[o],o,t));return n},r=e(Array.prototype.forEach)?Array.prototype.forEach:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=arguments[1],i=0;r>i;i++)i in t&&e.call(n,t[i],i,t)},n=e(Array.prototype.indexOf)?Array.prototype.indexOf:function(e,t){null===t||void 0===t?t=0:0>t&&(t=Math.max(0,this.length+t));for(var r=t,n=this.length;n>r;r++)if(this[r]===e)return r;return-1};Ember.ArrayPolyfills={map:t,forEach:r,indexOf:n},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=r),Array.prototype.indexOf||(Array.prototype.indexOf=n))}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||typeof e[t]!="function")}var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,o=0,s=[],a={},u=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var c={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t="ember");var n=t+o++;return e&&(c.value=n,r(e,i,c)),n},Ember.guidFor=function(e){if(void 0===e)return"(undefined)";if(null===e)return"(null)";var t,n=typeof e;switch(n){case"number":return t=s[e],t||(t=s[e]="nu"+e),t;case"string":return t=a[e],t||(t=a[e]="st"+o++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+o++,c.value=t,r(e,i,c),t)}};var l={writable:!0,configurable:!1,enumerable:!1,value:null},h=Ember.GUID_KEY+"_meta";Ember.META_KEY=h;var m={descs:{},watching:{}};u&&(m.values={}),Ember.EMPTY_META=m,Object.freeze&&Object.freeze(m);var f=Ember.platform.defineProperty.isSimulated;f&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){}),Ember.meta=function(t,i){var o=t[h];return i===!1?o||m:(o?o.source!==t&&(f||r(t,h,l),o=n(o),o.descs=n(o.descs),o.watching=n(o.watching),o.cache={},o.source=t,u&&(o.values=n(o.values)),t[h]=o):(f||r(t,h,l),o=new e(t),u&&(o.values={}),t[h]=o,o.descs.constructor=null),o)},Ember.getMeta=function(e,t){var r=Ember.meta(e,!1);return r[t]},Ember.setMeta=function(e,t,r){var n=Ember.meta(e,!0);return n[t]=r,r},Ember.metaPath=function(e,t,r){for(var i,o,s=Ember.meta(e,r),a=0,u=t.length;u>a;a++){if(i=t[a],o=s[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=s[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=s[i]={__ember_source__:e}}s=o}return o},Ember.wrap=function(e,t){function r(){}function n(){var n,i=this._super;return this._super=t||r,n=e.apply(this,arguments),this._super=i,n}return n.wrappedFunction=e,n.__ember_observes__=e.__ember_observes__,n.__ember_observesBefore__=e.__ember_observesBefore__,n},Ember.isArray=function(e){return!e||e.setInterval?!1:Array.isArray&&Array.isArray(e)?!0:Ember.Array&&Ember.Array.detect(e)?!0:e.length!==void 0&&"object"==typeof e?!0:!1},Ember.makeArray=function(e){return null===e||void 0===e?[]:Ember.isArray(e)?e:[e]},Ember.canInvoke=t,Ember.tryInvoke=function(e,r,n){return t(e,r)?e[r].apply(e,n||[]):void 0};var p=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return 1!==e}();Ember.tryFinally=p?function(e,t,r){var n,i,o;r=r||this;try{n=e.call(r)}finally{try{i=t.call(r)}catch(s){o=s}}if(o)throw o;return void 0===i?n:i}:function(e,t,r){var n,i;r=r||this;try{n=e.call(r)}finally{i=t.call(r)}return void 0===i?n:i},Ember.tryCatchFinally=p?function(e,t,r,n){var i,o,s;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{try{o=r.call(n)}catch(u){s=u}}if(s)throw s;return void 0===o?i:o}:function(e,t,r,n){var i,o;n=n||this;try{i=e.call(n)}catch(s){i=t.call(n,s)}finally{o=r.call(n)}return void 0===o?i:o};var d={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){d["[object "+e+"]"]=e.toLowerCase()});var E=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):d[E.call(e)]||"object","function"===t?Ember.Object&&Ember.Object.detect(e)&&(t="class"):"object"===t&&(t=e instanceof Error?"error":Ember.Object&&e instanceof Ember.Object?"instance":"object"),t}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,s=e.length;s>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=function(){var e="undefined"!=typeof window?window.performance||{}:{},t=e.now||e.mozNow||e.webkitNow||e.msNow||e.oNow;return t?t.bind(e):function(){return+new Date}}();Ember.Instrumentation.instrument=function(e,i,o,s){function a(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return o.call(s)}function u(e){i=i||{},i.exception=e}function c(){for(p=0,d=m.length;d>p;p++)f=m[p],f.after(e,n(),i,b[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(l)}var l,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(l=e+": "+i.object,console.time(l)),m||(m=r(e)),m.length===0)return h=o.call(s),Ember.STRUCTURED_PROFILE&&console.timeEnd(l),h;var f,p,d,b=[];return Ember.tryCatchFinally(a,u,c)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),s=[],a=0,u=o.length;u>a;a++)i=o[a],"*"===i?s.push("[^\\.]*"):s.push(i);s=s.join("\\."),s+="(\\..*)?";var c={pattern:r,regex:new RegExp("^"+s+"$"),object:n};return e.push(c),t={},c},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,o=e.length;o>i;i++)e[i]===r&&(n=i);e.splice(n,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e,t,r,n;n=Array.prototype.concat,e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf;var i=Ember.EnumerableUtils={map:function(t,r,n){return t.map?t.map.call(t,r,n):e.call(t,r,n)},forEach:function(e,r,n){return e.forEach?e.forEach.call(e,r,n):t.call(e,r,n)},indexOf:function(e,t,n){return e.indexOf?e.indexOf.call(e,t,n):r.call(e,t,n)},indexesOf:function(e,t){return void 0===t?[]:i.map(t,function(t){return i.indexOf(e,t)})},addObject:function(e,t){var r=i.indexOf(e,t);-1===r&&e.push(t)},removeObject:function(e,t){var r=i.indexOf(e,t);-1!==r&&e.splice(r,1)},replace:function(e,t,r,i){if(e.replace)return e.replace(t,r,i);var o=n.apply([t,r],i);return e.splice.apply(e,o)},intersection:function(e,t){var r=[];return i.forEach(e,function(e){i.indexOf(t,e)>=0&&r.push(e)}),r}}}(),function(){var e=Ember.guidFor,t=Ember.ArrayPolyfills.indexOf,r=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},n=function(e,t){var n=e.keys.copy(),i=r(e.values);return t.keys=n,t.values=i,t},i=Ember.OrderedSet=function(){this.clear()};i.create=function(){return new i},i.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(t){var r=e(t),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(t))},remove:function(r){var n=e(r),i=this.presenceSet,o=this.list;delete i[n];var s=t.call(o,r);s>-1&&o.splice(s,1)},isEmpty:function(){return this.list.length===0},has:function(t){var r=e(t),n=this.presenceSet;return r in n},forEach:function(e,t){for(var r=this.toArray(),n=0,i=r.length;i>n;n++)e.call(t,r[n])},toArray:function(){return this.list.slice()},copy:function(){var e=new i;return e.presenceSet=r(this.presenceSet),e.list=this.toArray(),e}};var o=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};o.create=function(){return new o},o.prototype={get:function(t){var r=this.values,n=e(t);return r[n]},set:function(t,r){var n=this.keys,i=this.values,o=e(t);n.add(t),i[o]=r},remove:function(t){var r=this.keys,n=this.values,i=e(t);return n.hasOwnProperty(i)?(r.remove(t),delete n[i],!0):!1},has:function(t){var r=this.values,n=e(t);return r.hasOwnProperty(n)},forEach:function(t,r){var n=this.keys,i=this.values;n.forEach(function(n){var o=e(n);t.call(r,n,i[o])})},copy:function(){return n(this,new o)}};var s=Ember.MapWithDefault=function(e){o.call(this),this.defaultValue=e.defaultValue};s.create=function(e){return e?new s(e):new o},s.prototype=Ember.create(o.prototype),s.prototype.get=function(e){var t=this.has(e);if(t)return o.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},s.prototype.copy=function(){return n(this,new s({defaultValue:this.defaultValue}))}}(),function(){function e(e){return e.match(a)[0]}function t(t,n){var i,a=s.test(n),u=!a&&o.test(n);if((!t||u)&&(t=Ember.lookup),a&&(n=n.slice(5)),t===Ember.lookup&&(i=e(n),t=r(t,i),n=n.slice(i.length+1)),!n||n.length===0)throw new Error("Invalid Path");return[t,n]}var r,n=Ember.META_KEY,i=Ember.ENV.MANDATORY_SETTER,o=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,s=/^this[\.\*]/,a=/^([^\.\*]+)/;r=function(e,t){if(""===t)return e;if(t||"string"!=typeof e||(t=e,e=null),null===e||t.indexOf(".")!==-1)return u(e,t);var r,o=e[n],s=o&&o.descs[t];return s?s.get(e,t):(r=i&&o&&o.watching[t]>0?o.values[t]:e[t],void 0!==r||"object"!=typeof e||t in e||"function"!=typeof e.unknownProperty?r:e.unknownProperty(t))},Ember.config.overrideAccessors&&(Ember.get=r,Ember.config.overrideAccessors(),r=Ember.get);var u=Ember._getPath=function(e,n){var i,o,a,u,c;if(null===e&&n.indexOf(".")===-1)return r(Ember.lookup,n);for(i=s.test(n),(!e||i)&&(a=t(e,n),e=a[0],n=a[1],a.length=0),o=n.split("."),c=o.length,u=0;void 0!==e&&null!==e&&c>u;u++)if(e=r(e,o[u],!0),e&&e.isDestroyed)return void 0;return e};Ember.normalizeTuple=function(e,r){return t(e,r)},Ember.getWithDefault=function(e,t,n){var i=r(e,t);return void 0===i?n:i},Ember.get=r,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get)}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i++)if(t===e[i][0]&&r===e[i][1]){n=i;break}return n}function t(e,t){var r,n=f(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=m(n.listeners)),r=n.listeners[t],r&&!n.listeners.hasOwnProperty(t)?r=n.listeners[t]=n.listeners[t].slice():r||(r=n.listeners[t]=[]),r}function r(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r];if(o)for(var s=o.length-1;s>=0;s--){var a=o[s][0],u=o[s][1],c=o[s][2],l=e(n,a,u);-1===l&&n.push([a,u,c])}}function n(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r],s=[];if(o){for(var a=o.length-1;a>=0;a--){var u=o[a][0],c=o[a][1],l=o[a][2],h=e(n,u,c);-1===h&&(n.push([u,c,l]),s.push([u,c,l]))}return s}}function i(r,n,i,o,s){o||"function"!=typeof i||(o=i,i=null);var a=t(r,n),u=e(a,i,o),c=0;s&&(c|=d),-1===u&&(a.push([i,o,c]),"function"==typeof r.didAddListener&&r.didAddListener(n,i,o))}function o(r,n,i,o){function s(i,o){var s=t(r,n),a=e(s,i,o);-1!==a&&(s.splice(a,1),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,o))}if(o||"function"!=typeof i||(o=i,i=null),o)s(i,o);else{var a=r[p],u=a&&a.listeners&&a.listeners[n];if(!u)return;for(var c=u.length-1;c>=0;c--)s(u[c][0],u[c][1])}}function s(r,n,i,o,s){function a(){return s.call(i)}function u(){c&&(c[2]&=~b)}o||"function"!=typeof i||(o=i,i=null);var c,l=t(r,n),h=e(l,i,o);return-1!==h&&(c=l[h].slice(),c[2]|=b,l[h]=c),Ember.tryFinally(a,u)}function a(r,n,i,o,s){function a(){return s.call(i)}function u(){for(m=0,f=p.length;f>m;m++)p[m][2]&=~b}o||"function"!=typeof i||(o=i,i=null);var c,l,h,m,f,p=[];for(m=0,f=n.length;f>m;m++){c=n[m],l=t(r,c);var d=e(l,i,o);-1!==d&&(h=l[d].slice(),h[2]|=b,l[d]=h,p.push(h))}return Ember.tryFinally(a,u)}function u(e){var t=e[p].listeners,r=[];if(t)for(var n in t)t[n]&&r.push(n);return r}function c(e,t,r,n){if(e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,r),!n){var i=e[p];n=i&&i.listeners&&i.listeners[t]}if(n){for(var s=n.length-1;s>=0;s--){var a=n[s];if(a){var u=a[0],c=a[1],l=a[2];l&b||(l&d&&o(e,t,u,c),u||(u=e),"string"==typeof c&&(c=u[c]),r?c.apply(u,r):c.call(u))}}return!0}}function l(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,s=i.length;s>o;o++){var a=i[o][0],u=i[o][1];r.push([a,u])}return r}var m=Ember.create,f=Ember.meta,p=Ember.META_KEY,d=1,b=2;Ember.addListener=i,Ember.removeListener=o,Ember._suspendListener=s,Ember._suspendListeners=a,Ember.sendEvent=c,Ember.hasListeners=l,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,s=this.observers,a=e(t),u=o[a];return u||(o[a]=u={}),i=u[r],void 0===i&&(i=s.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),s[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t,i){if(!e.isDestroying){var o=n,s=!o;s&&(o=n={}),r(d,e,t,o,i),s&&(n=null)}}function t(e,t,n){if(!e.isDestroying){var o=i,s=!o;s&&(o=i={}),r(b,e,t,o,n),s&&(i=null)}}function r(e,t,r,n,i){var o=s(t);if(n[o]||(n[o]={}),!n[o][r]){n[o][r]=!0;var a=i.deps;if(a=a&&a[r])for(var u in a){var c=i.descs[u];c&&c._suspended===t||e(t,u)}}}var n,i,o=Ember.meta,s=Ember.guidFor,a=Ember.tryFinally,u=Ember.sendEvent,c=Ember.listenersUnion,l=Ember.listenersDiff,h=Ember._ObserverSet,m=new h,f=new h,p=0,d=Ember.propertyWillChange=function(t,r){var n=o(t,!1),i=n.watching[r]>0||"length"===r,s=n.proto,a=n.descs[r];i&&s!==t&&(a&&a.willChange&&a.willChange(t,r),e(t,r,n),E(t,r,n),w(t,r))},b=Ember.propertyDidChange=function(e,r){var n=o(e,!1),i=n.watching[r]>0||"length"===r,s=n.proto,a=n.descs[r];s!==e&&(a&&a.didChange&&a.didChange(e,r),(i||"length"===r)&&(t(e,r,n),v(e,r,n),_(e,r)))},E=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var o=0,s=i.length;s>o;o++)i[o].willChange(n)}},v=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var o=i.length-1;o>=0;o--)i[o].didChange(n)}};Ember.overrideChains=function(e,t,r){v(e,t,r,!0)};var g=Ember.beginPropertyChanges=function(){p++},y=Ember.endPropertyChanges=function(){p--,0>=p&&(m.clear(),f.flush())};Ember.changeProperties=function(e,t){g(),a(e,y,t)};var w=function(e,t){if(!e.isDestroying){var r,n,i=t+":before";p?(r=m.add(e,t,i),n=l(e,i,r),u(e,i,[e,t],n)):u(e,i,[e,t])}},_=function(e,t){if(!e.isDestroying){var r,n=t+":change";p?(r=f.add(e,t,n),c(e,n,r)):u(e,n,[e,t])}}}(),function(){function e(e,t,r,o){var s;if(s=t.slice(t.lastIndexOf(".")+1),t=t.slice(0,t.length-(s.length+1)),"this"!==t&&(e=n(e,t)),!s||s.length===0)throw new Error("You passed an empty path");if(!e){if(o)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return i(e,s,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function(n,i,o,s){if("string"==typeof n&&(o=i,i=n,n=null),!n||i.indexOf(".")!==-1)return e(n,i,o,s);var a,u,c=n[t],l=c&&c.descs[i];return l?l.set(n,i,o):(a="object"==typeof n&&!(i in n),a&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,o):c&&c.watching[i]>0?(u=r?c.values[i]:n[i],o!==u&&(Ember.propertyWillChange(n,i),r?void 0!==u||i in n?c.values[i]=o:Ember.defineProperty(n,i,null,o):n[i]=o,Ember.propertyDidChange(n,i))):n[i]=o),o};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,r){return i(e,t,r,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet)}(),function(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,s,a,u,c){var l,h,m,f;return c||(c=t(e)),l=c.descs,h=c.descs[s],m=c.watching[s]>0,h instanceof Ember.Descriptor&&h.teardown(e,s),a instanceof Ember.Descriptor?(f=a,l[s]=a,n&&m?r(e,s,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[s]=void 0,a.setup(e,s)):(l[s]=void 0,null==a?(f=u,n&&m?(c.values[s]=u,r(e,s,{configurable:!0,enumerable:!0,set:i,get:o(s)})):e[s]=u):(f=a,r(e,s,a))),m&&Ember.overrideChains(e,s,c),e.didDefineProperty&&e.didDefineProperty(e,s,f),this}}(),function(){var e=Ember.changeProperties,t=Ember.set;Ember.setProperties=function(r,n){return e(function(){for(var e in n)n.hasOwnProperty(e)&&t(r,e,n[e])}),r}}(),function(){var e=Ember.meta,t=Ember.typeOf,r=Ember.ENV.MANDATORY_SETTER,n=Ember.platform.defineProperty;Ember.watchKey=function(i,o){if("length"!==o||t(i)!=="array"){var s,a=e(i),u=a.watching;u[o]?u[o]=(u[o]||0)+1:(u[o]=1,s=a.descs[o],s&&s.willWatch&&s.willWatch(i,o),"function"==typeof i.willWatchProperty&&i.willWatchProperty(o),r&&o in i&&(a.values[o]=i[o],n(i,o,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(o)})))}},Ember.unwatchKey=function(t,i){var o,s=e(t),a=s.watching;a[i]===1?(a[i]=0,o=s.descs[i],o&&o.didUnwatch&&o.didUnwatch(t,i),"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&(n(t,i,{configurable:!0,enumerable:!0,writable:!0,value:s.values[i]}),delete s.values[i])):a[i]>1&&a[i]--}}(),function(){function e(e){return e.match(m)[0]}function t(e,t,r){if(e&&"object"==typeof e){var i=n(e),o=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(o=i.chainWatchers={}),o[t]||(o[t]=[]),o[t].push(r),u(e,t)}}function r(e){return n(e,!1).proto===e}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,s=Ember.ArrayPolyfills.forEach,a=Ember.warn,u=Ember.watchKey,c=Ember.unwatchKey,l=Ember.propertyWillChange,h=Ember.propertyDidChange,m=/^([^\.\*]+)/,f=[];Ember.flushPendingChains=function(){if(f.length!==0){var e=f;f=[],s.call(e,function(e){e[0].add(e[1])}),a("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",f.length===0)}};var p=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var i=n(e,!1);if(i.hasOwnProperty("chainWatchers")){var o=i.chainWatchers;if(o[t]){o=o[t];for(var s=0,a=o.length;a>s;s++)o[s]===r&&o.splice(s,1)}c(e,t)}}},d=Ember._ChainNode=function(e,r,n){this._parent=e,this._key=r,this._watching=void 0===n,this._value=n,this._paths={},this._watching&&(this._object=e.value(),this._object&&t(this._object,this._key,this)),this._parent&&this._parent._key==="@each"&&this.value()},b=d.prototype;b.value=function(){if(this._value===void 0&&this._watching){var e=this._parent.value();this._value=e&&!r(e)?i(e,this._key):void 0}return this._value},b.destroy=function(){if(this._watching){var e=this._object;e&&p(e,this._key,this),this._watching=!1}},b.copy=function(e){var t,r=new d(null,null,e),n=this._paths;for(t in n)n[t]<=0||r.add(t);return r},b.add=function(t){var r,n,i,s,a;if(a=this._paths,a[t]=(a[t]||0)+1,r=this.value(),n=o(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return f.push([this,t]),n.length=0,void 0;s=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,s)},b.remove=function(t){var r,n,i,s,a;a=this._paths,a[t]>0&&a[t]--,r=this.value(),n=o(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(s=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},b.count=0,b.chain=function(t,r,n){var i,o=this._chains;o||(o=this._chains={}),i=o[t],i||(i=o[t]=new d(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},b.unchain=function(t,r){var n=this._chains,i=n[t];r&&r.length>1&&(t=e(r),r=r.slice(t.length+1),i.unchain(t,r)),i.count--,i.count<=0&&(delete n[i._key],i.destroy())},b.willChange=function(){var e=this._chains;if(e)for(var t in e)e.hasOwnProperty(t)&&e[t].willChange();this._parent&&this._parent.chainWillChange(this,this._key,1)},b.chainWillChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1):(r>1&&l(this.value(),t),t="this."+t,this._paths[t]>0&&l(this.value(),t))},b.chainDidChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1):(r>1&&h(this.value(),t),t="this."+t,this._paths[t]>0&&h(this.value(),t))},b.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(p(this._object,this._key,this),this._object=r,t(r,this._key,this)),this._value=void 0,this._parent&&this._parent._key==="@each"&&this.value()}var n=this._chains;if(n)for(var i in n)n.hasOwnProperty(i)&&n[i].didChange(e);e||this._parent&&this._parent.chainDidChange(this,this._key,1)},Ember.finishChains=function(e){var t=n(e,!1),r=t.chains;r&&(r.value()!==e&&(t.chains=r=r.copy(e)),r.didChange(!0))}}(),function(){function e(e){var r=t(e),i=r.chains;return i?i.value()!==e&&(i=r.chains=i.copy(e)):i=r.chains=new n(null,null,e),i}var t=Ember.meta,r=Ember.typeOf,n=Ember._ChainNode;Ember.watchPath=function(n,i){if("length"!==i||r(n)!=="array"){var o=t(n),s=o.watching;s[i]?s[i]=(s[i]||0)+1:(s[i]=1,e(n).add(i))}},Ember.unwatchPath=function(r,n){var i=t(r),o=i.watching;o[n]===1?(o[n]=0,e(r).remove(n)):o[n]>1&&o[n]--}}(),function(){function e(e){return"*"===e||!h.test(e)}var t=Ember.meta,r=Ember.GUID_KEY,n=Ember.META_KEY,i=Ember.removeChainWatcher,o=Ember.watchKey,s=Ember.unwatchKey,a=Ember.watchPath,u=Ember.unwatchPath,c=Ember.typeOf,l=Ember.generateGuid,h=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||c(t)!=="array")&&(e(r)?o(t,r):a(t,r))},Ember.isWatching=function(e,t){var r=e[n];return(r&&r.watching[t])>0},Ember.watch.flushPending=Ember.flushPendingChains,Ember.unwatch=function(t,r){("length"!==r||c(t)!=="array")&&(e(r)?s(t,r):u(t,r))},Ember.rewatch=function(e){var n=t(e,!1),i=n.chains;r in e&&!e.hasOwnProperty(r)&&l(e,"ember"),i&&i.value()!==e&&(n.chains=i.copy(e))};var m=[];Ember.destroy=function(e){var t,r,o,s,a=e[n];if(a&&(e[n]=null,t=a.chains))for(m.push(t);m.length>0;){if(t=m.pop(),r=t._chains)for(o in r)r.hasOwnProperty(o)&&m.push(r[o]);t._watching&&(s=t._object,s&&i(s,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=m(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var s,a,u,c,l,h=r._dependentKeys;if(h)for(s=t(o),a=0,u=h.length;u>a;a++)c=h[a],l=e(s,c),l[i]=(l[i]||0)+1,p(n,c)}function n(r,n,i,o){var s,a,u,c,l,h=r._dependentKeys;if(h)for(s=t(o),a=0,u=h.length;u>a;a++)c=h[a],l=e(s,c),l[i]=(l[i]||0)-1,d(n,c)}function i(e,t){this.func=e,this._cacheable=t&&t.cacheable!==void 0?t.cacheable:!0,this._dependentKeys=t&&t.dependentKeys,this._readOnly=t&&(t.readOnly!==void 0||!!t.readOnly)}function o(e,t){for(var r={},n=0;n<t.length;n++)r[t[n]]=u(e,t[n]);return r}function s(e,t){Ember.computed[e]=function(e){var r=h.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function a(e,t){Ember.computed[e]=function(){var e=h.call(arguments),r=Ember.computed(function(){return t.apply(this,[o(this,e)])});return r.property.apply(r,e)}}var u=Ember.get,c=Ember.set,l=Ember.meta,h=[].slice,m=Ember.create,f=Ember.META_KEY,p=Ember.watch,d=Ember.unwatch;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var b=i.prototype;b.cacheable=function(e){return this._cacheable=e!==!1,this},b.volatile=function(){return this.cacheable(!1)},b.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},b.property=function(){for(var e=[],t=0,r=arguments.length;r>t;t++)e.push(arguments[t]);return this._dependentKeys=e,this},b.meta=function(e){return arguments.length===0?this._meta||{}:(this._meta=e,this)},b.willWatch=function(e,t){var n=e[f];t in n.cache||r(this,e,t,n)},b.didUnwatch=function(e,t){var r=e[f];t in r.cache||n(this,e,t,r)},b.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=l(e);t in r.cache&&(delete r.cache[t],r.watching[t]||n(this,e,t,r))}},b.get=function(e,t){var n,i,o;if(this._cacheable){if(o=l(e),i=o.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),o.watching[t]||r(this,e,t,o)}else n=this.func.call(e,t);return n},b.set=function(e,t,n){var i,o,s=this._cacheable,a=this.func,u=l(e,s),c=u.watching[t],h=this._suspended,m=!1,f=u.cache;if(this._readOnly)throw new Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(s&&f.hasOwnProperty(t)&&(i=f[t],m=!0),a.wrappedFunction&&(a=a.wrappedFunction),a.length===3)o=a.call(e,t,n,i);else{if(a.length!==2)return Ember.defineProperty(e,t,null,i),Ember.set(e,t,n),void 0;o=a.call(e,t,n)}if(m&&i===o)return;c&&Ember.propertyWillChange(e,t),m&&delete f[t],s&&(c||m||r(this,e,t,u),f[t]=o),c&&Ember.propertyDidChange(e,t)}finally{this._suspended=h}return o},b.setup=function(e,t){var n=e[f];n&&n.watching[t]&&r(this,e,t,l(e))},b.teardown=function(e,t){var r=l(e);return(r.watching[t]||t in r.cache)&&n(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;if(arguments.length>1&&(t=h.call(arguments,0,-1),e=h.call(arguments,-1)[0]),"function"!=typeof e)throw new Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=l(e,!1).cache;return r&&t in r?r[t]:void 0},s("empty",function(e){return Ember.isEmpty(u(this,e))}),s("notEmpty",function(e){return!Ember.isEmpty(u(this,e))}),s("none",function(e){return Ember.isNone(u(this,e))}),s("not",function(e){return!u(this,e)}),s("bool",function(e){return!!u(this,e)}),s("match",function(e,t){var r=u(this,e);return"string"==typeof r?!!r.match(t):!1}),s("equal",function(e,t){return u(this,e)===t}),s("gt",function(e,t){return u(this,e)>t}),s("gte",function(e,t){return u(this,e)>=t}),s("lt",function(e,t){return u(this,e)<t}),s("lte",function(e,t){return u(this,e)<=t}),a("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),a("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),a("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),a("map",function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&(Ember.isNone(e[r])?t.push(null):t.push(e[r]));return t}),Ember.computed.alias=function(e){return Ember.computed(e,function(t,r){return arguments.length>1?(c(this,e,r),r):u(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return u(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return arguments.length===1?null!=n?n:u(this,e):null!=r?r:u(this,e)})}}(),function(){function e(e){return e+r}function t(e){return e+n}var r=":change",n=":before";Ember.addObserver=function(t,r,n,i){return Ember.addListener(t,e(r),n,i),Ember.watch(t,r),this},Ember.observersFor=function(t,r){return Ember.listenersFor(t,e(r))},Ember.removeObserver=function(t,r,n,i){return Ember.unwatch(t,r),Ember.removeListener(t,e(r),n,i),this},Ember.addBeforeObserver=function(e,r,n,i){return Ember.addListener(e,t(r),n,i),Ember.watch(e,r),this},Ember._suspendBeforeObserver=function(e,r,n,i,o){return Ember._suspendListener(e,t(r),n,i,o)},Ember._suspendObserver=function(t,r,n,i,o){return Ember._suspendListener(t,e(r),n,i,o)};var i=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,r,n,o,s){var a=i.call(r,t);return Ember._suspendListeners(e,a,n,o,s)},Ember._suspendObservers=function(t,r,n,o,s){var a=i.call(r,e);return Ember._suspendListeners(t,a,n,o,s)},Ember.beforeObserversFor=function(e,r){return Ember.listenersFor(e,t(r))},Ember.removeBeforeObserver=function(e,r,n,i){return Ember.unwatch(e,r),Ember.removeListener(e,t(r),n,i),this}}(),function(){function e(e,t,r,n){return void 0===t&&(t=e,e=void 0),"string"==typeof t&&(t=e[t]),r&&n>0&&(r=r.length>n?s.call(r,n):null),Ember.handleErrors(function(){return t.apply(e||this,r||[])},this)}function t(){l=null,c.currentRunLoop&&c.end()}function r(e,t){var r=e.expires,n=t.expires;return r>n?1:n>r?-1:0}function n(){h=null,c(function(){var t=+new Date,i=-1,o=[];for(var s in f)if(f.hasOwnProperty(s)){var u=f[s];u&&u.expires&&(t>=u.expires?(delete f[s],o.push(u)):(0>i||u.expires<i)&&(i=u.expires))}a.call(o.sort(r),function(t){e(t.target,t.method,t.args,2)}),i>0&&(h=window.setTimeout(n,i-t),m=i)})}function i(t,r){r[this.tguid]&&delete r[this.tguid][this.mguid],f[t]&&e(this.target,this.method,this.args),delete f[t]}function o(e,t,r,n){var o,s=Ember.guidFor(t),a=Ember.guidFor(r),u=c.autorun().onceTimers,l=u[s]&&u[s][a];return l&&f[l]?f[l].args=n:(o={target:t,method:r,args:n,tguid:s,mguid:a},l=Ember.guidFor(o),f[l]=o,u[s]||(u[s]={}),u[s][a]=l,c.schedule(e,o,i,l,u)),l}var s=[].slice,a=Ember.ArrayPolyfills.forEach,u=function(e){this._prev=e||null,this.onceTimers={}};u.prototype={end:function(){this.flush()},prev:function(){return this._prev},schedule:function(e,t,r){var n,i=this._queues;i||(i=this._queues={}),n=i[e],n||(n=i[e]=[]);var o=arguments.length>3?s.call(arguments,3):null;
16
- return n.push({target:t,method:r,args:o}),this},flush:function(t){function r(t){e(t.target,t.method,t.args)}function n(){a.call(u,r)}var i,o,s,u,c;if(!this._queues)return this;if(Ember.watch.flushPending(),t)for(;this._queues&&(u=this._queues[t]);)this._queues[t]=null,"sync"===t?(c=Ember.LOG_BINDINGS,c&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(n,Ember.endPropertyChanges),c&&Ember.Logger.log("End: Flush Sync Queue")):a.call(u,r);else{i=Ember.run.queues,s=i.length,o=0;e:for(;s>o;){t=i[o],u=this._queues&&this._queues[t],delete this._queues[t],u&&("sync"===t?(c=Ember.LOG_BINDINGS,c&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(n,Ember.endPropertyChanges),c&&Ember.Logger.log("End: Flush Sync Queue")):a.call(u,r));for(var l=0;o>=l;l++)if(this._queues&&this._queues[i[l]]){o=l;continue e}o++}}return this}},Ember.RunLoop=u,Ember.run=function(t,r){function n(){return t||r?e(t,r,i,2):void 0}var i=arguments;return c.begin(),Ember.tryFinally(n,c.end)};var c=Ember.run;Ember.run.begin=function(){c.currentRunLoop=new u(c.currentRunLoop)},Ember.run.end=function(){function e(){c.currentRunLoop.end()}function t(){c.currentRunLoop=c.currentRunLoop.prev()}Ember.tryFinally(e,t)},Ember.run.queues=["sync","actions","destroy"],Ember.run.schedule=function(){var e=c.autorun();e.schedule.apply(e,arguments)};var l;Ember.run.hasScheduledTimers=function(){return!(!l&&!h)},Ember.run.cancelTimers=function(){l&&(clearTimeout(l),l=null),h&&(clearTimeout(h),h=null),f={}},Ember.run.autorun=function(){return c.currentRunLoop||(c.begin(),l||(l=setTimeout(t,1))),c.currentRunLoop},Ember.run.sync=function(){c.autorun(),c.currentRunLoop.flush("sync")};var h,m,f={};Ember.run.later=function(e,t){var r,i,o,a,u;return arguments.length===2&&"function"==typeof e?(u=t,t=e,e=void 0,r=[e,t]):(r=s.call(arguments),u=r.pop()),i=+new Date+u,o={target:e,method:t,expires:i,args:r},a=Ember.guidFor(o),f[a]=o,h&&m>i&&(clearTimeout(h),h=null),h||(h=setTimeout(n,u),m=i),a},Ember.run.once=function(e,t){return o("actions",e,t,s.call(arguments,2))},Ember.run.scheduleOnce=function(e,t,r){return o(e,t,r,s.call(arguments,3))},Ember.run.next=function(){var e=s.call(arguments);return e.push(1),c.later.apply(this,e)},Ember.run.cancel=function(e){delete f[e]}}(),function(){function e(e,t){return r(o(t)?Ember.lookup:e,t)}function t(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}Ember.LOG_BINDINGS=!1||!!Ember.ENV.LOG_BINDINGS;var r=Ember.get,n=(Ember.set,Ember.guidFor),i=/^([A-Z$]|([0-9][A-Z$]))/,o=Ember.isGlobalPath=function(e){return i.test(e)},s=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};s.prototype={copy:function(){var e=new s(this._to,this._from);return this._oneWay&&(e._oneWay=!0),e},from:function(e){return this._from=e,this},to:function(e){return this._to=e,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var e=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+n(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(t){var r=this._from,n=this._to;return Ember.trySet(t,n,e(t,r)),Ember.addObserver(t,r,this,this.fromDidChange),this._oneWay||Ember.addObserver(t,n,this,this.toDidChange),this._readyToSync=!0,this},disconnect:function(e){var t=!this._oneWay;return Ember.removeObserver(e,this._from,this,this.fromDidChange),t&&Ember.removeObserver(e,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(e){this._scheduleSync(e,"fwd")},toDidChange:function(e){this._scheduleSync(e,"back")},_scheduleSync:function(e,t){var r=this._directionMap,n=r.get(e);n||(Ember.run.schedule("sync",this,this._sync,e),r.set(e,t)),"back"===n&&"fwd"===t&&r.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(!t.isDestroyed&&this._readyToSync){var i=this._directionMap,o=i.get(t),s=this._from,a=this._to;if(i.remove(t),"fwd"===o){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,a,u):Ember._suspendObserver(t,a,this,this.toDidChange,function(){Ember.trySet(t,a,u)})}else if("back"===o){var c=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",c,t),Ember._suspendObserver(t,s,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(s)?Ember.lookup:t,s,c)})}}}},t(s,{from:function(){var e=this,t=new e;return t.from.apply(t,arguments)},to:function(){var e=this,t=new e;return t.to.apply(t,arguments)},oneWay:function(e,t){var r=this,n=new r(null,e);return n.oneWay(t)}}),Ember.Binding=s,Ember.bind=function(e,t,r){return new Ember.Binding(t,r).connect(e)},Ember.oneWay=function(e,t,r){return new Ember.Binding(t,r).oneWay().connect(e)}}(),function(){function e(e){var t=Ember.meta(e,!0),r=t.mixins;return r?t.hasOwnProperty("mixins")||(r=t.mixins=x(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=_.call(t,function(e){if(e instanceof g)return e;var t=new g;return t.properties=e,t})),e}function r(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function n(e,t){var r;return t instanceof g?(r=P(t),e[r]?V:(e[r]=t,t.properties)):t}function i(e,t,r){var n;return n=t.concatenatedProperties||r.concatenatedProperties,e.concatenatedProperties&&(n=n?n.concat(e.concatenatedProperties):e.concatenatedProperties),n}function o(e,t,r,n,i){var o;return n[t]===void 0&&(o=i[t]),o=o||e.descs[t],o&&o instanceof Ember.ComputedProperty?(r=x(r),r.func=Ember.wrap(r.func,o.func),r):r}function s(e,t,r,n,i){var o;return i[t]===void 0&&(o=n[t]),o=o||e[t],"function"!=typeof o?r:Ember.wrap(r,o)}function a(e,t,r,n){var i=n[t]||e[t];return i?"function"==typeof i.concat?i.concat(r):Ember.makeArray(i).concat(r):Ember.makeArray(r)}function u(e,t,n,i,u,c,l){if(n instanceof Ember.Descriptor){if(n===y&&u[t])return V;n.func&&(n=o(i,t,n,c,u)),u[t]=n,c[t]=void 0}else r(n)?n=s(e,t,n,c,u):(l&&C.call(l,t)>=0||"concatenatedProperties"===t)&&(n=a(e,t,n,c)),u[t]=void 0,c[t]=n}function c(e,t,r,o,s,a){function l(e){delete r[e],delete o[e]}for(var h,m,f,p,d,b=0,E=e.length;E>b;b++)if(h=e[b],m=n(t,h),m!==V)if(m){d=Ember.meta(s),p=i(m,o,s);for(f in m)m.hasOwnProperty(f)&&(a.push(f),u(s,f,m[f],d,r,o,p));m.hasOwnProperty("toString")&&(s.toString=m.toString)}else h.mixins&&(c(h.mixins,t,r,o,s,a),h._without&&O.call(h._without,l))}function l(e,t,r,n){if(T.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=x(n.bindings)):i=n.bindings={},i[t]=r}}function h(e,t){var r,n,i,o=t.bindings;if(o){for(r in o)n=o[r],n&&(i=r.slice(0,-7),n instanceof Ember.Binding?(n=n.copy(),n.to(i)):n=new Ember.Binding(i,n),n.connect(e),e[r]=n);t.bindings={}}}function m(e,t){return h(e,t||Ember.meta(e)),e}function f(e,t,r,n,i){var o,s=t.methodName;return n[s]||i[s]?(o=i[s],t=n[s]):r.descs[s]?(t=r.descs[s],o=void 0):(t=void 0,o=e[s]),{desc:t,value:o}}function p(e,t,r,n,i){if("function"==typeof r){var o=r[n];if(o)for(var s=0,a=o.length;a>s;s++)Ember[i](e,o[s],null,t)}}function d(e,t,r){var n=e[t];p(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),p(e,t,n,"__ember_observes__","removeObserver"),p(e,t,r,"__ember_observesBefore__","addBeforeObserver"),p(e,t,r,"__ember_observes__","addObserver")}function b(t,r,n){var i,o,s,a={},u={},h=Ember.meta(t),p=[];c(r,e(t),a,u,t,p);for(var b=0,E=p.length;E>b;b++)if(i=p[b],"constructor"!==i&&u.hasOwnProperty(i)&&(s=a[i],o=u[i],s!==y)){for(;s&&s instanceof w;){var v=f(t,s,h,a,u);s=v.desc,o=v.value}(void 0!==s||void 0!==o)&&(d(t,i,o),l(t,i,o,h),A(t,i,s,o,h))}return n||m(t,h),t}function E(e,t,r){var n=P(e);if(r[n])return!1;if(r[n]=!0,e===t)return!0;for(var i=e.mixins,o=i?i.length:0;--o>=0;)if(E(i[o],t,r))return!0;return!1}function v(e,t,r){if(!r[P(t)])if(r[P(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&O.call(t.mixins,function(t){v(e,t,r)})}var g,y,w,_=Ember.ArrayPolyfills.map,C=Ember.ArrayPolyfills.indexOf,O=Ember.ArrayPolyfills.forEach,S=[].slice,x=Ember.create,A=Ember.defineProperty,P=Ember.guidFor,V={},T=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=S.call(arguments,1);return b(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},g=Ember.Mixin,g.prototype={properties:null,mixins:null,ownerConstructor:null},g._apply=b,g.applyPartial=function(e){var t=S.call(arguments,1);return b(e,t,!0)},g.finishPartial=m,Ember.anyUnprocessedMixins=!1,g.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var D=g.prototype;D.reopen=function(){var e,t;this.properties?(e=g.create(),e.properties=this.properties,delete this.properties,this.mixins=[e]):this.mixins||(this.mixins=[]);var r,n=arguments.length,i=this.mixins;for(r=0;n>r;r++)e=arguments[r],e instanceof g?i.push(e):(t=g.create(),t.properties=e,i.push(t));return this},D.apply=function(e){return b(e,[this],!1)},D.applyPartial=function(e){return b(e,[this],!0)},D.detect=function(e){if(!e)return!1;if(e instanceof g)return E(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[P(this)]:!1},D.without=function(){var e=new g(this);return e._without=S.call(arguments),e},D.keys=function(){var e={},t={},r=[];v(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},g.mixins=function(e){var t=Ember.meta(e,!1).mixins,r=[];if(!t)return r;for(var n in t){var i=t[n];i.properties||r.push(i)}return r},y=new Ember.Descriptor,y.toString=function(){return"(Required Property)"},Ember.required=function(){return y},w=function(e){this.methodName=e},w.prototype=new Ember.Descriptor,Ember.alias=function(e){return new w(e)},Ember.alias=Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new w(e)},Ember.observer=function(e){var t=S.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++)arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=S.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),function(){e("rsvp/all",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=[],r=n(),i=e.length;0===i&&r.resolve([]);for(var o=function(e){return function(t){s(e,t)}},s=function(e,n){t[e]=n,--i===0&&r.resolve(t)},a=function(e){r.reject(e)},u=0;u<e.length;u++)e[u]&&typeof e[u].then=="function"?e[u].then(o(u),a):s(u,e[u]);return r.promise}var n=e.defer;t.all=r}),e("rsvp/async",["exports"],function(e){"use strict";var t,r="undefined"!=typeof window?window:{},n=r.MutationObserver||r.WebKitMutationObserver;if("undefined"!=typeof process&&{}.toString.call(process)==="[object process]")t=function(e,t){process.nextTick(function(){e.call(t)})};else if(n){var i=[],o=new n(function(){var e=i.slice();i=[],e.forEach(function(e){var t=e[0],r=e[1];t.call(r)})}),s=document.createElement("div");o.observe(s,{attributes:!0}),window.addEventListener("unload",function(){o.disconnect(),o=null}),t=function(e,t){i.push([e,t]),s.setAttribute("drainQueue","drainQueue")}}else t=function(e,t){setTimeout(function(){e.call(t)},1)};e.async=t}),e("rsvp/config",["rsvp/async","exports"],function(e,t){"use strict";var r=e.async,n={};n.async=r,t.config=n}),e("rsvp/defer",["rsvp/promise","exports"],function(e,t){"use strict";function r(){var e={},t=new n(function(t,r){e.resolve=t,e.reject=r});return e.promise=t,e}var n=e.Promise;t.defer=r}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){this.type=e;for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r])},r=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r][0]===t)return r;return-1},n=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},i={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,i){var o,s,a=n(this);for(e=e.split(/\s+/),i=i||this;s=e.shift();)o=a[s],o||(o=a[s]=[]),r(o,t)===-1&&o.push([t,i])},off:function(e,t){var i,o,s,a=n(this);for(e=e.split(/\s+/);o=e.shift();)t?(i=a[o],s=r(i,t),-1!==s&&i.splice(s,1)):a[o]=[]},trigger:function(e,r){var i,o,s,a,u,c=n(this);if(i=c[e])for(var l=0;l<i.length;l++)o=i[l],s=o[0],a=o[1],"object"!=typeof r&&(r={detail:r}),u=new t(e,r),s.call(a,u)}};e.EventTarget=i}),e("rsvp/hash",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=0;for(var r in e)t++;return t}function n(e){var t={},n=i(),o=r(e);0===o&&n.resolve({});var s=function(e){return function(t){a(e,t)}},a=function(e,r){t[e]=r,--o===0&&n.resolve(t)},u=function(e){n.reject(e)};for(var c in e)e[c]&&typeof e[c].then=="function"?e[c].then(s(c),u):a(c,e[c]);return n.promise}var i=e.defer;t.hash=n}),e("rsvp/node",["rsvp/promise","rsvp/all","exports"],function(e,t,r){"use strict";function n(e,t){return function(r,n){r?t(r):arguments.length>2?e(Array.prototype.slice.call(arguments,1)):e(n)}}function i(e){return function(){var t,r,i=Array.prototype.slice.call(arguments),a=new o(function(e,n){t=e,r=n});return s(i).then(function(i){i.push(n(t,r));try{e.apply(this,i)}catch(o){r(o)}}),a}}var o=e.Promise,s=t.all;r.denodeify=i}),e("rsvp/promise",["rsvp/config","rsvp/events","exports"],function(e,t,r){"use strict";function n(e){return i(e)||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function o(e,t){e===t?a(e,t):s(e,t)||a(e,t)}function s(e,t){var r=null;if(n(t)){try{r=t.then}catch(s){return u(e,s),!0}if(i(r)){try{r.call(t,function(r){t!==r?o(e,r):a(e,r)},function(t){u(e,t)})}catch(s){u(e,s)}return!0}}return!1}function a(e,t){c.async(function(){e.trigger("promise:resolved",{detail:t}),e.isFulfilled=!0,e.fulfillmentValue=t})}function u(e,t){c.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedReason=t})}var c=e.config,l=t.EventTarget,h=function(e){var t=this,r=!1;if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the sole argument to the promise constructor");if(!(t instanceof h))return new h(e);var n=function(e){r||(r=!0,o(t,e))},i=function(e){r||(r=!0,u(t,e))};this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this);try{e(n,i)}catch(s){i(s)}},m=function(e,t,r,n){var a,c,l,h,m=i(r);if(m)try{a=r(n.detail),l=!0}catch(f){h=!0,c=f}else a=n.detail,l=!0;s(t,a)||(m&&l?o(t,a):h?u(t,c):"resolve"===e?o(t,a):"reject"===e&&u(t,a))};h.prototype={constructor:h,then:function(e,t){var r=new h(function(){});return this.isFulfilled&&c.async(function(){m("resolve",r,e,{detail:this.fulfillmentValue})},this),this.isRejected&&c.async(function(){m("reject",r,t,{detail:this.rejectedReason})},this),this.on("promise:resolved",function(t){m("resolve",r,e,t)}),this.on("promise:failed",function(e){m("reject",r,t,e)}),r}},l.mixin(h.prototype),r.Promise=h}),e("rsvp/reject",["rsvp/promise","exports"],function(e,t){"use strict";function r(e){return new n(function(t,r){r(e)})}var n=e.Promise;t.reject=r}),e("rsvp/resolve",["rsvp/promise","exports"],function(e,t){"use strict";function r(e){return"function"==typeof e||"object"==typeof e&&null!==e}function n(e){var t=new i(function(t,n){var i;try{r(e)?(i=e.then,"function"==typeof i?i.call(e,t,n):t(e)):t(e)}catch(o){n(o)}});return t}var i=e.Promise;t.resolve=n}),e("rsvp",["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/defer","rsvp/config","rsvp/resolve","rsvp/reject","exports"],function(e,t,r,n,i,o,s,a,u,c){"use strict";function l(e,t){E[e]=t}var h=e.EventTarget,m=t.Promise,f=r.denodeify,p=n.all,d=i.hash,b=o.defer,E=s.config,v=a.resolve,g=u.reject;c.Promise=m,c.EventTarget=h,c.all=p,c.hash=d,c.defer=b,c.denodeify=f,c.configure=l,c.resolve=v,c.reject=g})}(),function(){e("container",[],function(){function e(e){this.parent=e,this.dict={}}function t(t){this.parent=t,this.children=[],this.resolver=t&&t.resolver||function(){},this.registry=new e(t&&t.registry),this.cache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function r(e){throw new Error(e+" is not currently supported on child containers")}function n(e,t){var r=o(e,t,"singleton");return r!==!1}function i(e,t){var r={};if(!t)return r;for(var n,i,o=0,s=t.length;s>o;o++)n=t[o],i=e.lookup(n.fullName),r[n.property]=i;return r}function o(e,t,r){var n=e._options.get(t);if(n&&n[r]!==void 0)return n[r];var i=t.split(":")[0];return n=e._typeOptions.get(i),n?n[r]:void 0}function s(e,t){var r=e.normalize(t);return e.resolve(r)}function a(e,t){var r,n=s(e,t),a=t.split(":"),u=a[0];if(o(e,t,"instantiate")===!1)return n;if(n){var c=[];c=c.concat(e.typeInjections.get(u)||[]),c=c.concat(e.injections[t]||[]);var l=i(e,c);return l.container=e,l._debugContainerKey=t,r=n.create(l)}}function u(e,t){e.cache.eachLocal(function(r,n){o(e,r,"instantiate")!==!1&&t(n)})}function c(e){e.cache.eachLocal(function(t,r){o(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}return e.prototype={get:function(e){var t=this.dict;return t.hasOwnProperty(e)?t[e]:this.parent?this.parent.get(e):void 0},set:function(e,t){this.dict[e]=t},has:function(e){var t=this.dict;return t.hasOwnProperty(e)?!0:this.parent?this.parent.has(e):!1},eachLocal:function(e,t){var r=this.dict;for(var n in r)r.hasOwnProperty(n)&&e.call(t,n,r[n])}},t.prototype={child:function(){var e=new t(this);return this.children.push(e),e},set:function(e,t,r){e[t]=r},register:function(e,t,r,n){var i;e.indexOf(":")!==-1?(n=r,r=t,i=e):i=e+":"+t;var o=this.normalize(i);this.registry.set(o,r),this._options.set(o,n||{})},resolve:function(e){return this.resolver(e)||this.registry.get(e)},normalize:function(e){return e},lookup:function(e,t){if(e=this.normalize(e),t=t||{},this.cache.has(e)&&t.singleton!==!1)return this.cache.get(e);var r=a(this,e);return r?(n(this,e)&&t.singleton!==!1&&this.cache.set(e,r),r):void 0},has:function(e){return this.cache.has(e)?!0:!!s(this,e)},optionsForType:function(e,t){this.parent&&r("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,n){this.parent&&r("typeInjection");var i=this.typeInjections.get(e);i||(i=[],this.typeInjections.set(e,i)),i.push({property:t,fullName:n})},injection:function(e,t,n){if(this.parent&&r("injection"),e.indexOf(":")===-1)return this.typeInjection(e,t,n);var i=this.injections[e]=this.injections[e]||[];i.push({property:t,fullName:n})},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],u(this,function(e){e.isDestroying=!0}),u(this,function(e){e.destroy()}),delete this.parent,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)c(this.children[e]);c(this)}},t})}(),function(){function e(r,n,i,o){var s,a,u;if("object"!=typeof r||null===r)return r;if(n&&(a=t(i,r))>=0)return o[a];if(Ember.typeOf(r)==="array"){if(s=r.slice(),n)for(a=s.length;--a>=0;)s[a]=e(s[a],n,i,o)}else if(Ember.Copyable&&Ember.Copyable.detect(r))s=r.copy(n,i,o);else{s={};for(u in r)r.hasOwnProperty(u)&&u.substring(0,2)!=="__"&&(s[u]=n?e(r[u],n,i,o):r[u])}return n&&(i.push(r),o.push(s)),s}var t=Ember.EnumerableUtils.indexOf;Ember.compare=function n(e,t){if(e===t)return 0;var r=Ember.typeOf(e),i=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===r&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===i&&o.detect(t.constructor))return 1-t.constructor.compare(t,e)}var s=Ember.ORDER_DEFINITION_MAPPING;if(!s){var a=Ember.ORDER_DEFINITION;s=Ember.ORDER_DEFINITION_MAPPING={};var u,c;for(u=0,c=a.length;c>u;++u)s[a[u]]=u;delete Ember.ORDER_DEFINITION}var l=s[r],h=s[i];if(h>l)return-1;if(l>h)return 1;switch(r){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var m=e.localeCompare(t);return 0>m?-1:m>0?1:0;case"array":for(var f=e.length,p=t.length,d=Math.min(f,p),b=0,E=0;0===b&&d>E;)b=n(e[E],t[E]),E++;return 0!==b?b:p>f?-1:f>p?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var v=e.getTime(),g=t.getTime();return g>v?-1:v>g?1:0;default:return 0}},Ember.copy=function(t,r){return"object"!=typeof t||null===t?t:Ember.Copyable&&Ember.Copyable.detect(t)?t.copy(r):e(t,r,r?[]:null,r?[]:null)},Ember.inspect=function(e){if("object"!=typeof e||null===e)return e+"";var t,r=[];for(var n in e)if(e.hasOwnProperty(n)){if(t=e[n],"toString"===t)continue;Ember.typeOf(t)==="function"&&(t="function() { ... }"),r.push(n+": "+t)}return"{"+r.join(", ")+"}"},Ember.isEqual=function(e,t){return e&&"function"==typeof e.isEqual?e.isEqual(t):e===t},Ember.ORDER_DEFINITION=Ember.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class","date"],Ember.keys=Object.keys,Ember.keys||(Ember.keys=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t});var r=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){for(var e=Error.apply(this,arguments),t=0;t<r.length;t++)this[r[t]]=e[r[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){Ember.RSVP=t("rsvp")}(),function(){var e=/[ _]/g,t={},r=/([a-z])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,o=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var r=0;return e.replace(/%@([0-9]+)?/g,function(e,n){return n=n?parseInt(n,0)-1:r++,e=t[n],(null===e?"(null)":void 0===e?"":e).toString()})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,o=i.hasOwnProperty(r);return o?i[r]:(n=Ember.String.decamelize(r).replace(e,"-"),i[r]=n,n)},camelize:function(e){return e.replace(n,function(e,t,r){return r?r.toUpperCase():""}).replace(/^([A-Z])/,function(e){return e.toLowerCase()})},classify:function(e){for(var t=e.split("."),r=[],n=0,i=t.length;i>n;n++){var o=Ember.String.camelize(t[n]);r.push(o.charAt(0).toUpperCase()+o.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(o,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,o=Ember.String.dasherize,s=Ember.String.underscore,a=Ember.String.capitalize,u=Ember.String.classify;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.fmt=function(){return e(this,arguments)},String.prototype.w=function(){return t(this)},String.prototype.loc=function(){return r(this,arguments)},String.prototype.camelize=function(){return n(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return o(this)},String.prototype.underscore=function(){return s(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return a(this)})}(),function(){var e=Array.prototype.slice;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Function)&&(Function.prototype.property=function(){var e=Ember.computed(this);return e.property.apply(e,arguments)},Function.prototype.observes=function(){return this.__ember_observes__=e.call(arguments),this},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this})}(),function(){function e(){return a.length===0?{}:a.pop()}function t(e){return a.push(e),null}function r(e,t){function r(r){var o=n(r,e);return i?t===o:!!o}var i=arguments.length===2;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,s=Ember.EnumerableUtils.indexOf,a=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(n(this,"length")===0)return void 0;var r,i=e();return r=this.nextObject(0,null,i),t(i),r}).property("[]"),lastObject:Ember.computed(function(){var r=n(this,"length");if(0===r)return void 0;var i,o=e(),s=0,a=null;do a=i,i=this.nextObject(s++,a,o);while(void 0!==i);return t(o),a}).property("[]"),contains:function(e){return this.find(function(t){return t===e})!==void 0},forEach:function(r,i){if("function"!=typeof r)throw new TypeError;var o=n(this,"length"),s=null,a=e();void 0===i&&(i=null);for(var u=0;o>u;u++){var c=this.nextObject(u,s,a);r.call(i,c,u,this),s=c}return s=null,a=t(a),this},getEach:function(e){return this.mapProperty(e)},setEach:function(e,t){return this.forEach(function(r){i(r,e,t)})},map:function(e,t){var r=Ember.A([]);return this.forEach(function(n,i,o){r[i]=e.call(t,n,i,o)}),r},mapProperty:function(e){return this.map(function(t){return n(t,e)})},filter:function(e,t){var r=Ember.A([]);return this.forEach(function(n,i,o){e.call(t,n,i,o)&&r.push(n)}),r},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterProperty:function(){return this.filter(r.apply(this,arguments))},rejectProperty:function(e,t){var r=function(r){return n(r,e)===t},i=function(t){return!!n(t,e)},o=arguments.length===2?r:i;return this.reject(o)},find:function(r,i){var o=n(this,"length");void 0===i&&(i=null);for(var s,a,u=null,c=!1,l=e(),h=0;o>h&&!c;h++)s=this.nextObject(h,u,l),(c=r.call(i,s,h,this))&&(a=s),u=s;return s=u=null,l=t(l),a},findProperty:function(){return this.find(r.apply(this,arguments))},every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyProperty:function(){return this.every(r.apply(this,arguments))},some:function(e,t){return!!this.find(function(r,n,i){return!!e.call(t,r,n,i)})},someProperty:function(){return this.some(r.apply(this,arguments))},reduce:function(e,t,r){if("function"!=typeof e)throw new TypeError;var n=t;return this.forEach(function(t,i){n=e.call(null,n,t,i,this,r)},this),n},invoke:function(e){var t,r=Ember.A([]);return arguments.length>1&&(t=o.call(arguments,1)),this.forEach(function(n,i){var o=n&&n[e];"function"==typeof o&&(r[i]=t?o.apply(n,t):o.call(n))},this),r},toArray:function(){var e=Ember.A([]);return this.forEach(function(t,r){e[r]=t}),e},compact:function(){return this.filter(function(e){return null!=e})},without:function(e){if(!this.contains(e))return this;var t=Ember.A([]);return this.forEach(function(r){r!==e&&(t[t.length]=r)}),t},uniq:function(){var e=Ember.A([]);return this.forEach(function(t){s(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.isNone),r=Ember.EnumerableUtils.map,n=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{length:Ember.required(),objectAt:function(t){return 0>t||t>=e(this,"length")?void 0:e(this,t)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,r){return void 0!==r&&this.replace(0,e(this,"length"),r),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(e(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(r,n){var i=Ember.A([]),o=e(this,"length");for(t(r)&&(r=0),(t(n)||n>o)&&(n=o),0>r&&(r=o+r),0>n&&(n=o+n);n>r;)i[i.length]=this.objectAt(r++);return i},indexOf:function(t,r){var n,i=e(this,"length");for(void 0===r&&(r=0),0>r&&(r+=i),n=r;i>n;n++)if(this.objectAt(n,!0)===t)return n;return-1},lastIndexOf:function(t,r){var n,i=e(this,"length");for((void 0===r||r>=i)&&(r=i-1),0>r&&(r+=i),n=r;n>=0;n--)if(this.objectAt(n)===t)return n;return-1},addArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),o||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),o&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,r,n){void 0===t?(t=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,r,n]);var i,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],o=t+r;for(var s=t;o>s;s++)i.push(this.objectAt(s))}else i=r;return this.enumerableContentWillChange(i,n),this},arrayContentDidChange:function(t,r,i){void 0===t?(t=0,r=i=-1):(void 0===r&&(r=-1),void 0===i&&(i=-1));var o,s;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){o=[],s=t+i;for(var a=t;s>a;a++)o.push(this.objectAt(a))}else o=i;this.enumerableContentDidChange(r,o),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),c=n(this,"firstObject"),l=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==l&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){Ember.Comparable=Ember.Mixin.create({isComparable:!0,compare:Ember.required(Function)})}(),function(){var e=Ember.get;Ember.set,Ember.Copyable=Ember.Mixin.create({copy:Ember.required(Function),frozenCopy:function(){if(Ember.Freezable&&Ember.Freezable.detect(this))return e(this,"isFrozen")?this:this.copy().freeze();throw new Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return e(this,"isFrozen")?this:(t(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var e=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.addObject(e)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.removeObject(e)},this),Ember.endPropertyChanges(this),this}})}(),function(){var e="Index out of range",t=[],r=Ember.get;Ember.set,Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=r(this,"length");return 0===e?this:(this.replace(0,e,t),this)},insertAt:function(t,n){if(t>r(this,"length"))throw new Error(e);return this.replace(t,0,[n]),this},removeAt:function(n,i){if("number"==typeof n){if(0>n||n>=r(this,"length"))throw new Error(e);void 0===i&&(i=1),this.replace(n,i,t)}return this},pushObject:function(e){return this.insertAt(r(this,"length"),e),e},pushObjects:function(e){return this.replace(r(this,"length"),0,e),this
17
- },popObject:function(){var e=r(this,"length");if(0===e)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(r(this,"length")===0)return null;var e=this.objectAt(0);return this.removeAt(0),e},unshiftObject:function(e){return this.insertAt(0,e),e},unshiftObjects:function(e){return this.replace(0,0,e),this},reverseObjects:function(){var e=r(this,"length");if(0===e)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(e.length===0)return this.clear();var t=r(this,"length");return this.replace(0,t,e),this},removeObject:function(e){for(var t=r(this,"length")||0;--t>=0;){var n=this.objectAt(t);n===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){var t={},r=arguments;arguments.length===1&&Ember.typeOf(arguments[0])==="array"&&(r=arguments[0]);for(var n=0;n<r.length;n++)t[r[n]]=e(this,r[n]);return t},set:function(e,r){return t(this,e,r),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,r){Ember.addBeforeObserver(this,e,t,r)},addObserver:function(e,t,r){Ember.addObserver(this,e,t,r)},removeObserver:function(e,t,r){Ember.removeObserver(this,e,t,r)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){var e=Ember.get;Ember.set,Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,actionContext:null,targetObject:Ember.computed(function(){var t=e(this,"target");if(Ember.typeOf(t)==="string"){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("target"),actionContextObject:Ember.computed(function(){var t=e(this,"actionContext");if(Ember.typeOf(t)==="string"){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("actionContext"),triggerAction:function(t){t=t||{};var r=t.action||e(this,"action"),n=t.target||e(this,"targetObject"),i=t.actionContext||e(this,"actionContextObject")||this;if(n&&r){var o;return o=n.send?n.send.apply(n,[r,i]):n[r].apply(n,[i]),o!==!1&&(o=!0),o}return!1}})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,r){return Ember.addListener(this,e,t,r),this},one:function(e,t,r){return r||(r=t,t=null),Ember.addListener(this,e,t,r,!0),this},trigger:function(e){var t,r,n=[];for(t=1,r=arguments.length;r>t;t++)n.push(arguments[t]);Ember.sendEvent(this,e,n)},fire:function(){this.trigger.apply(this,arguments)},off:function(e,t,r){return Ember.removeListener(this,e,t,r),this},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");e.configure("async",function(e,t){Ember.run.schedule("actions",t,e)});var r=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t){function n(t){return t===o?e(s):e(t)}var i,o,s;return s=this,i=r(this,"_deferred"),o=i.promise,o.then(e&&n,t)},resolve:function(e){var t,n;t=r(this,"_deferred"),n=t.promise,e===this?t.resolve(n):t.resolve(e)},reject:function(e){r(this,"_deferred").reject(e)},_deferred:Ember.computed(function(){return e.defer()})})}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function e(){var e,t,o=!1,s=function(){o||s.proto(),n(this,i,v),n(this,"_super",v);var u=a(this);if(u.proto=this,e){var l=e;e=null,this.reopen.apply(this,l)}if(t){var h=t;t=null;for(var m=this.concatenatedProperties,f=0,d=h.length;d>f;f++){var g=h[f];for(var y in g)if(g.hasOwnProperty(y)){var w=g[y],_=Ember.IS_BINDING;if(_.test(y)){var C=u.bindings;C?u.hasOwnProperty("bindings")||(C=u.bindings=r(u.bindings)):C=u.bindings={},C[y]=w}var O=u.descs[y];if(m&&E(m,y)>=0){var S=this[y];w=S?"function"==typeof S.concat?S.concat(w):Ember.makeArray(S).concat(w):Ember.makeArray(w)}O?O.set(this,y,w):typeof this.setUnknownProperty!="function"||y in this?b?Ember.defineProperty(this,y,null,w):this[y]=w:this.setUnknownProperty(y,w)}}}p(this,u),delete u.proto,c(this),this.init.apply(this,arguments)};return s.toString=m.prototype.toString,s.willReopen=function(){o&&(s.PrototypeMixin=m.create(s.PrototypeMixin)),o=!1},s._initMixins=function(t){e=t},s._initProperties=function(e){t=e},s.proto=function(){var e=s.superclass;return e&&e.proto(),o||(o=!0,s.PrototypeMixin.applyPartial(s.prototype),u(s.prototype)),this.prototype},s}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,s=Ember.generateGuid,a=Ember.meta,u=Ember.rewatch,c=Ember.finishChains,l=Ember.destroy,h=Ember.run.schedule,m=Ember.Mixin,f=m._apply,p=m.finishPartial,d=m.prototype.reopen,b=Ember.ENV.MANDATORY_SETTER,E=Ember.EnumerableUtils.indexOf,v={configurable:!0,writable:!0,enumerable:!1,value:void 0},g=e();g.toString=function(){return"Ember.CoreObject"},g.PrototypeMixin=m.create({reopen:function(){return f(this,arguments,!0),this},isInstance:!0,init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this._didCallDestroy?void 0:(this.isDestroying=!0,this._didCallDestroy=!0,h("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.willDestroy&&this.willDestroy(),l(this),this.isDestroyed=!0,this.didDestroy&&this.didDestroy()},bind:function(e,t){return t instanceof Ember.Binding||(t=Ember.Binding.from(t)),t.to(e).connect(this),t},toString:function(){var e=typeof this.toStringExtension=="function",r=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+r+">";return this.toString=t(n),n}}),g.PrototypeMixin.ownerConstructor=g,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(g.PrototypeMixin),g.__super__=null;var y=m.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=m.create(this.ClassMixin),n.PrototypeMixin=m.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,d.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,s(t,"ember"),a(t).proto=t,n.ClassMixin.apply(n),n},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),d.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return d.apply(this.ClassMixin,arguments),f(this,arguments,!1),this},detect:function(e){if("function"!=typeof e)return!1;for(;e;){if(e===this)return!0;e=e.superclass}return!1},detectInstance:function(e){return e instanceof this},metaForProperty:function(e){var t=a(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var r,n=this.proto(),i=a(n).descs,o={};for(var s in i)r=i[s],r instanceof Ember.ComputedProperty&&e.call(t||this,s,r._meta||o)}});y.ownerConstructor=g,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(y),g.ClassMixin=y,y.apply(g),Ember.CoreObject=g}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var s=t.length;c[t.join(".")]=r;for(var a in r)if(l.call(r,a)){var u=r[a];if(t[s]=a,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=s}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else{var t=r(this);e=t?"(subclass of "+t+")":"(unknown mixin)",this.toString=o(e)}return e}function i(){var r=!u.PROCESSED,n=Ember.anyUnprocessedMixins;if(r&&(t(),u.PROCESSED=!0),r||n){for(var i,o=u.NAMESPACES,s=0,a=o.length;a>s;s++)i=o[s],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function o(e){return function(){return e}}var s=Ember.get,a=Ember.ArrayPolyfills.indexOf,u=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var e=s(this,"name");return e?e:(t(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){e([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=void 0,e.splice(a.call(e,this),1),this._super()}});u.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:i,byName:function(e){return Ember.BOOTED||i(),c[e]}});var c=u.NAMESPACES_BY_ID,l={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e="Index out of range",t=[],r=Ember.get;Ember.set,Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return r(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,n){r(this,"content").replace(e,t,n)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){r(this,"content"),this._setupContent()},"content"),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)},"arrangedContent"),_setupArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return r(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=r(this,"arrangedContent");return e?r(e,"length"):0}),_replace:function(e,t,n){var i=r(this,"content");return i&&this.replaceContent(e,t,n),this},replace:function(){if(r(this,"arrangedContent")!==r(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,n){if(t>r(this,"content.length"))throw new Error(e);return this._replace(t,0,[n]),this},insertAt:function(e,t){if(r(this,"arrangedContent")===r(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(n,i){if("number"==typeof n){var o,s=r(this,"content"),a=r(this,"arrangedContent"),u=[];if(0>n||n>=r(this,"length"))throw new Error(e);for(void 0===i&&(i=1),o=n;n+i>o;o++)u.push(s.indexOf(a.objectAt(o)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),o=0;o<u.length;o++)this._replace(u[o],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){return this._replace(r(this,"length"),0,e),this},setObjects:function(e){if(e.length===0)return this.clear();var t=r(this,"length");return this._replace(0,t,e),this},unshiftObject:function(e){return this._insertAt(0,e),e},unshiftObjects:function(e){return this._replace(0,0,e),this},slice:function(){var e=this.toArray();return e.slice.apply(e,arguments)},arrangedContentArrayWillChange:function(e,t,r,n){this.arrayContentWillChange(t,r,n)},arrangedContentArrayDidChange:function(e,t,r,n){this.arrayContentDidChange(t,r,n)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function e(e,t){var r=t.slice(8);r in this||u(this,r)}function t(e,t){var r=t.slice(8);r in this||c(this,r)}var r=Ember.get,n=Ember.set,i=(Ember.String.fmt,Ember.addBeforeObserver),o=Ember.addObserver,s=Ember.removeBeforeObserver,a=Ember.removeObserver,u=Ember.propertyWillChange,c=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),o(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;s(this,n,null,e),a(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var i=r(this,"content");return n(i,e,t)}}),Ember.ObjectProxy.reopenClass({create:function(){var e,t,r,n,i,o;if(arguments.length){for(t=this.proto(),r=0,n=arguments.length;n>r;r++){i=arguments[r];for(o in i)!i.hasOwnProperty(o)||o in t||(e||(e={}),e[o]=null)}e&&this._initMixins([e])}return this._super.apply(this,arguments)}})}(),function(){function e(e,t,r,i,o){var s,a=r._objects;for(a||(a=r._objects={});--o>=i;){var u=e.objectAt(o);u&&(Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),s=n(u),a[s]||(a[s]=[]),a[s].push(o))}}function t(e,t,r,i,o){var s=r._objects;s||(s=r._objects={});for(var a,u;--o>=i;){var c=e.objectAt(o);c&&(Ember.removeBeforeObserver(c,t,r,"contentKeyWillChange"),Ember.removeObserver(c,t,r,"contentKeyDidChange"),u=n(c),a=s[u],a[a.indexOf(o)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.Object.extend(Ember.Array,{init:function(e,t,r){this._super(),this._keyName=t,this._owner=r,this._content=e},objectAt:function(e){var t=this._content.objectAt(e);return t&&r(t,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?r(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),i(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e){var t;return t=new o(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,o,s=this._keys;o=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in s)s.hasOwnProperty(i)&&(o>0&&t(e,i,this,r,o),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var o,s,a=this._keys;s=i>0?r+i:-1,Ember.beginPropertyChanges(this);for(o in a)a.hasOwnProperty(o)&&(s>0&&e(t,o,this,r,s),Ember.propertyDidChange(this,o));Ember.propertyDidChange(this._content,"@each"),Ember.endPropertyChanges(this)},didAddListener:function(e){s.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){s.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(t){var n=this._keys;if(n||(n=this._keys={}),n[t])n[t]++;else{n[t]=1;var i=this._content,o=r(i,"length");e(i,t,this,0,o)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var i=this._content,o=r(i,"length");t(i,e,this,0,o)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get;Ember.set;var t=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return"length"===e?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(t,r,n){if(this.isFrozen)throw Ember.FROZEN_ERROR;var i=n?e(n,"length"):0;if(this.arrayContentWillChange(t,r,i),n&&n.length!==0){var o=[t,r].concat(n);this.splice.apply(this,o)}else this.splice(t,r);return this.arrayContentDidChange(t,r,i),this},unknownProperty:function(e,t){var r;return void 0!==t&&void 0===r&&(r=this[e]=t),r},indexOf:function(e,t){var r,n=this.length;for(t=void 0===t?0:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var r,n=this.length;for(t=void 0===t?n-1:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;r>=0;r--)if(this[r]===e)return r;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),r=["length"];Ember.EnumerableUtils.forEach(t.keys(),function(e){Array.prototype[e]&&r.push(e)}),r.length>0&&(t=t.without.apply(t,r)),Ember.NativeArray=t,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){t.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.get,t=Ember.set,r=Ember.guidFor,n=Ember.isNone,i=Ember.String.fmt;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Error(Ember.FROZEN_ERROR);var n=e(this,"length");if(0===n)return this;var i;this.enumerableContentWillChange(n,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var o=0;n>o;o++)i=r(this[o]),delete this[i],delete this[o];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(n,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var r=e(this,"length");if(e(t,"length")!==r)return!1;for(;--r>=0;)if(!t.contains(this[r]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:void 0}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:void 0}),addObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,s=r(i),a=this[s],u=e(this,"length");return a>=0&&u>a&&this[a]===i?this:(o=[i],this.enumerableContentWillChange(null,o),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[s]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,o),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,s,a=r(i),u=this[a],c=e(this,"length"),l=0===u,h=u===c-1;return u>=0&&c>u&&this[u]===i&&(s=[i],this.enumerableContentWillChange(s,null),l&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),c-1>u&&(o=this[c-1],this[u]=o,this[r(o)]=u),delete this[a],delete this[c-1],t(this,"length",c-1),l&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(s,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin;Ember.get;var t=Ember.Object.extend(e);t.reopenClass({promise:function(e,r){var n=t.create();return e.call(r,n),n}}),Ember.Deferred=t}(),function(){var e=Ember.ArrayPolyfills.forEach,t=Ember.ENV.EMBER_LOAD_HOOKS||{},r={};Ember.onLoad=function(e,n){var i;t[e]=t[e]||Ember.A(),t[e].pushObject(n),(i=r[e])&&n(i)},Ember.runLoadHooks=function(n,i){r[n]=i,t[n]&&e.call(t[n],function(e){e(i)})}}(),function(){var e=Ember.get;Ember.ControllerMixin=Ember.Mixin.create({isController:!0,target:null,container:null,parentController:null,store:null,model:Ember.computed.alias("content"),send:function(t){var r,n=[].slice.call(arguments,1);this[t]?this[t].apply(this,n):(r=e(this,"target"))&&r.send.apply(r,arguments)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach);Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,orderBy:function(r,n){var i=0,o=e(this,"sortProperties"),s=e(this,"sortAscending");return t(o,function(t){0===i&&(i=Ember.compare(e(r,t),e(n,t)),0===i||s||(i=-1*i))}),i},destroy:function(){var r=e(this,"content"),n=e(this,"sortProperties");return r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(){var r=e(this,"content"),n=e(this,"isSorted"),i=e(this,"sortProperties"),o=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return o.orderBy(e,t)}),t(r,function(e){t(i,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(r)):r}),_contentWillChange:Ember.beforeObserver(function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(r,n,i,o){var s=e(this,"isSorted");if(s){var a=e(this,"arrangedContent"),u=r.slice(n,n+i),c=e(this,"sortProperties");t(u,function(e){a.removeObject(e),t(c,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var s=e(this,"isSorted"),a=e(this,"sortProperties");if(s){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(a,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),s=i&&this.orderBy(t,i),a=o&&this.orderBy(t,o);(0>s||a>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,s,a;return r===n?r:(a=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=a.objectAt(i),s=this.orderBy(o,t),0>s?this._binarySearch(t,i+1,n):s>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var s=e(this,"_subControllers"),a=s.slice(n,n+i);t(a,function(e){e&&e.destroy()}),r(s,n,i,new Array(o)),this._super(n,i,o)},init:function(){this.get("content")||Ember.defineProperty(this,"content",void 0,Ember.A()),this._super(),this.set("_subControllers",Ember.A())},controllerAt:function(t,r,n){var i=e(this,"container"),o=e(this,"_subControllers"),s=o[t];if(s||(s=i.lookup("controller:"+n,{singleton:!1}),o[t]=s),!s)throw new Error('Could not resolve itemController: "'+n+'"');return s.set("target",this),s.set("parentController",e(this,"parentController")||this),s.set("content",r),s},_subControllers:null,_resetSubControllers:function(){var r=e(this,"_subControllers");r&&t(r,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){var e=Ember.imports.jQuery;Ember.$=e}(),function(){if(Ember.$){var e=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(e,function(e){Ember.$.event.fixHooks[e]={props:["dataTransfer"]}})}}(),function(){function e(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,r=e.which>1;return!t&&!r}var t=this.document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",e.firstChild.innerHTML===""}(),r=this.document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value",e.childNodes[0].nodeValue==="Test:"&&e.childNodes[2].nodeValue===" Value"}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,s=e.childNodes.length;for(r=0;s>r;r++)if(i=e.childNodes[r],o=i.nodeType===1&&n(i,t))return o},i=function(e,i){t&&(i="&shy;"+i);var o=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return o.push([n,t]),r})),e.innerHTML=i,o.length>0){var s,a=o.length;for(s=0;a>s;s++){var u=n(e,o[s][0]),c=document.createTextNode(o[s][1]);u.parentNode.insertBefore(c,u)}}if(t){for(var l=e.firstChild;l.nodeType===1&&!l.nodeName;)l=l.firstChild;l.nodeType===3&&l.nodeValue.charAt(0)==="­"&&(l.nodeValue=l.nodeValue.slice(1))}},o={},s=function(e){if(o[e]!==void 0)return o[e];var t=!0;if(e.toLowerCase()==="select"){var r=document.createElement("select");i(r,'<option value="test">Test</option>'),t=r.options.length===1}return o[e]=t,t},a=function(e,t){var r=e.tagName;if(s(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),o=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],a="</"+r+">",u=document.createElement("div");for(i(u,o+t+a),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:a,isSimpleClick:e}}(),function(){Ember.get,Ember.set;var e=function(){this.seen={},this.list=[]};e.prototype={add:function(e){e in this.seen||(this.seen[e]=!0,this.list.push(e))},toDOM:function(){return this.list.join(" ")}},Ember.RenderBuffer=function(e){return new Ember._RenderBuffer(e)},Ember._RenderBuffer=function(e){this.tagNames=[e||null],this.buffer=""},Ember._RenderBuffer.prototype={_element:null,_hasElement:!0,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer+=e,this},addClass:function(t){return this.elementClasses=this.elementClasses||new e,this.elementClasses.add(t),this.classes=this.elementClasses.list,this},setClasses:function(e){this.classes=e},id:function(e){return this.elementId=e,this},attr:function(e,t){var r=this.elementAttributes=this.elementAttributes||{};return arguments.length===1?r[e]:(r[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var r=this.elementProperties=this.elementProperties||{};return arguments.length===1?r[e]:(r[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){return this.elementStyle=this.elementStyle||{},this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var e=this.currentTagName();if(e){if(this._hasElement&&!this._element&&this.buffer.length===0)return this._element=this.generateElement(),void 0;var t,r,n=this.buffer,i=this.elementId,o=this.classes,s=this.elementAttributes,a=this.elementProperties,u=this.elementStyle;if(n+="<"+e,i&&(n+=' id="'+this._escapeAttribute(i)+'"',this.elementId=null),o&&(n+=' class="'+this._escapeAttribute(o.join(" "))+'"',this.classes=null),u){n+=' style="';for(r in u)u.hasOwnProperty(r)&&(n+=r+":"+this._escapeAttribute(u[r])+";");n+='"',this.elementStyle=null}if(s){for(t in s)s.hasOwnProperty(t)&&(n+=" "+t+'="'+this._escapeAttribute(s[t])+'"');this.elementAttributes=null}if(a){for(r in a)if(a.hasOwnProperty(r)){var c=a[r];(c||"number"==typeof c)&&(n+=c===!0?" "+r+'="'+r+'"':" "+r+'="'+this._escapeAttribute(a[r])+'"')}this.elementProperties=null}n+=">",this.buffer=n}},pushClosingTag:function(){var e=this.tagNames.pop();e&&(this.buffer+="</"+e+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var e,t,r=this.tagNames.pop(),n=document.createElement(r),i=Ember.$(n),o=this.elementId,s=this.classes,a=this.elementAttributes,u=this.elementProperties,c=this.elementStyle,l="";if(o&&(i.attr("id",o),this.elementId=null),s&&(i.attr("class",s.join(" ")),this.classes=null),c){for(t in c)c.hasOwnProperty(t)&&(l+=t+":"+c[t]+";");i.attr("style",l),this.elementStyle=null}if(a){for(e in a)a.hasOwnProperty(e)&&i.attr(e,a[e]);this.elementAttributes=null}if(u){for(t in u)u.hasOwnProperty(t)&&i.prop(t,u[t]);this.elementProperties=null}return n},element:function(){var e=this.innerString();return e&&(this._element=Ember.ViewUtils.setInnerHTML(this._element,e)),this._element},string:function(){if(this._hasElement&&this._element){var e=this.element(),t=e.outerHTML;return"undefined"==typeof t?Ember.$("<div/>").append(e).html():t}return this.innerString()},innerString:function(){return this.buffer},_escapeAttribute:function(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=/&(?!\w+;)|[<>"'`]/g,n=/[&<>"'`]/,i=function(e){return t[e]||"&amp;"},o=e.toString();return n.test(o)?o.replace(r,i):o}}}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.EventDispatcher=Ember.Object.extend({rootElement:"body",setup:function(r,n){var i,o={touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"};Ember.$.extend(o,r||{}),Ember.isNone(n)||t(this,"rootElement",n),n=Ember.$(e(this,"rootElement")),n.addClass("ember-application");for(i in o)o.hasOwnProperty(i)&&this.setupHandler(n,i,o[i])},setupHandler:function(e,t,r){var n=this;e.on(t+".ember",".ember-view",function(e,t){return Ember.handleErrors(function(){var i=Ember.View.views[this.id],o=!0,s=null;
18
- return s=n._findNearestEventManager(i,r),s&&s!==t?o=n._dispatchEvent(s,e,r,i):i?o=n._bubbleEvent(i,e,r):e.stopPropagation(),o},this)}),e.on(t+".ember","[data-ember-action]",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),n=Ember.Handlebars.ActionHelper.registeredActions[t];return n&&n.eventName===r?n.handler(e):void 0},this)})},_findNearestEventManager:function(t,r){for(var n=null;t&&(n=e(t,"eventManager"),!n||!n[r]);)t=e(t,"parentView");return n},_dispatchEvent:function(e,t,r,n){var i=!0,o=e[r];return Ember.typeOf(o)==="function"?(i=o.call(e,t,n),t.stopPropagation()):i=this._bubbleEvent(n,t,r),i},_bubbleEvent:function(e,t,r){return Ember.run(function(){return e.handleEvent(r,t)})},destroy:function(){var t=e(this,"rootElement");return Ember.$(t).off(".ember","**").removeClass("ember-application"),this._super()}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"render","afterRender")}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({target:null,namespace:null,view:null,container:null,_childContainers:null,init:function(){this._super(),t(this,"_childContainers",{})},_modelDidChange:Ember.observer(function(){var r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})},"model")})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,o=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.addObject,a=Ember.computed(function(){var e=this._childViews,t=Ember.A(),n=this;return o(e,function(e){e.isVirtual?t.pushObjects(r(e,"childViews")):t.push(e)}),t.replace=function(e,t,r){if(n instanceof Ember.ContainerView)return n.replace(e,t,r);throw new Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,{isView:!0,states:t,init:function(){this._super(),this.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?r(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?r(this,"parentView"):this}).property("parentView"),instrumentName:"core_view",instrumentDetails:function(e){e.object=this.toString()},renderToBuffer:function(e,t){var r="render."+this.instrumentName,n={};return this.instrumentDetails(n),Ember.instrument(r,n,function(){return this._renderToBuffer(e,t)},this)},_renderToBuffer:function(e){var t=this.tagName;(null===t||void 0===t)&&(t="div");var r=this.buffer=e&&e.begin(t)||Ember.RenderBuffer(t);return this.transitionTo("inBuffer",!1),this.beforeRender(r),this.render(r),this.afterRender(r),r},trigger:function(e){this._super.apply(this,arguments);var t=this[e];if(t){var r,n,i=[];for(r=1,n=arguments.length;n>r;r++)i.push(arguments[r]);return t.apply(this,i)}},has:function(e){return Ember.typeOf(this[e])==="function"||this._super(e)},destroy:function(){var e=this._parentView;if(this._super())return this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroying",!1),this},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K});var u=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};u.prototype={length:0,trigger:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],t.trigger&&t.trigger(e)},triggerRecursively:function(e){for(var t=this.views,r=0,n=t.length;n>r;r++)t[r].triggerRecursively(e)},invokeRecursively:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],e(t)},transitionTo:function(e,t){for(var r=this.views,n=0,i=r.length;i>n;n++)r[n].transitionTo(e,t)},push:function(){this.length+=arguments.length;var e=this.views;return e.push.apply(e,arguments)},objectAt:function(e){return this.views[e]},forEach:function(e){var t=this.views;return o(t,e)},clear:function(){this.length=0,this.views.length=0}};var c=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,template:Ember.computed(function(e,t){if(void 0!==t)return t;var n=r(this,"templateName"),i=this.templateForName(n,"template");return i||r(this,"defaultTemplate")}).property("templateName"),controller:Ember.computed(function(){var e=r(this,"_parentView");return e?r(e,"controller"):null}).property("_parentView"),layout:Ember.computed(function(){var e=r(this,"layoutName"),t=this.templateForName(e,"layout");return t||r(this,"defaultLayout")}).property("layoutName"),templateForName:function(e){if(e){var t=this.container||Ember.Container&&Ember.Container.defaultContainer;return t&&t.lookup("template:"+e)}},context:Ember.computed(function(e,t){return arguments.length===2?(n(this,"_context",t),t):r(this,"_context")}).volatile(),_context:Ember.computed(function(){var e,t;return(t=r(this,"controller"))?t:(e=this._parentView,e?r(e,"_context"):null)}),_contextDidChange:Ember.observer(function(){this.rerender()},"context"),isVisible:!0,childViews:a,_childViews:c,_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}},"childViews"),nearestInstanceOf:function(e){for(var t=r(this,"parentView");t;){if(t instanceof e)return t;t=r(t,"parentView")}},nearestOfType:function(e){for(var t=r(this,"parentView"),n=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(n(t))return t;t=r(t,"parentView")}},nearestWithProperty:function(e){for(var t=r(this,"parentView");t;){if(e in t)return t;t=r(t,"parentView")}},nearestChildOf:function(e){for(var t=r(this,"parentView");t;){if(r(t,"parentView")instanceof e)return t;t=r(t,"parentView")}},_parentViewDidChange:Ember.observer(function(){this.isDestroying||r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller")},"_parentView"),_controllerDidChange:Ember.observer(function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))},"controller"),cloneKeywords:function(){var e=r(this,"templateData"),t=e?Ember.copy(e.keywords):{};return n(t,"view",r(this,"concreteView")),n(t,"_view",this),n(t,"controller",r(this,"controller")),t},render:function(e){var t=r(this,"layout")||r(this,"template");if(t){var n,i=r(this,"context"),o=this.cloneKeywords(),s={view:this,buffer:e,isRenderData:!0,keywords:o,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:s}),void 0!==n&&e.push(n)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){for(var e=this.lengthBeforeRender,t=this.lengthAfterRender,r=this._childViews,n=t-1;n>=e;n--)r[n]&&r[n].destroy()},_applyClassNameBindings:function(e){var t,r,n,i=this.classNames;o(e,function(e){var o,a=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),o&&(t.removeClass(o),i.removeObject(o)),r?(t.addClass(r),o=r):o=null};n=this._classStringForProperty(e),n&&(s(i,n),o=n),this.registerObserver(this,a.path,u),this.one("willClearRender",function(){o&&(i.removeObject(o),o=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;o(t,function(t){var o=t.split(":"),s=o[0],a=o[1]||s,u=function(){i=this.$(),n=r(this,s),Ember.View.applyAttributeBindings(i,a,n)};this.registerObserver(this,s,u),n=r(this,s),Ember.View.applyAttributeBindings(e,a,n)},this)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),n=t.path,i=r(this,n);return void 0===i&&Ember.isGlobalPath(n)&&(i=r(Ember.lookup,n)),Ember.View._classStringForValue(n,i,t.className,t.falsyClassName)},element:Ember.computed(function(e,t){return void 0!==t?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){for(var t,r=this._childViews,n=r.length;--n>=0;)t=r[n],e(this,t,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var r,n,i=t.length;for(n=0;i>n;n++)r=t[n],e(r);return this},appendTo:function(e){return this._insertElementLater(function(){this.$().appendTo(e)}),this},replaceIn:function(e){return this._insertElementLater(function(){Ember.$(e).empty(),this.$().appendTo(e)}),this},_insertElementLater:function(e){this._scheduledInsert=Ember.run.scheduleOnce("render",this,"_insertElement",e)},_insertElement:function(e){this._scheduledInsert=null,this.currentState.insertElement(this,e)},append:function(){return this.appendTo(document.body)},remove:function(){this.removedFromDOM||this.destroyElement(),this.invokeRecursively(function(e){e.clearRenderedChildren&&e.clearRenderedChildren()})},elementId:null,findElementInParentElement:function(e){var t="#"+this.elementId;return Ember.$(t)[0]||Ember.$(t,e)[0]},createElement:function(){if(r(this,"element"))return this;var e=this.renderToBuffer();return n(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e,t){for(var r,n,i=t===!1?this._childViews:[this];i.length;){r=i.slice(),i=[];for(var o=0,s=r.length;s>o;o++)n=r[o],e(n),n._childViews&&i.push.apply(i,n._childViews)}},triggerRecursively:function(e){for(var t,r,n=[this];n.length;){t=n.slice(),n=[];for(var i=0,o=t.length;o>i;i++)r=t[i],r.trigger&&r.trigger(e),r._childViews&&n.push.apply(n,r._childViews)}},viewHierarchyCollection:function(){for(var e,t=new u([this]),r=0;r<t.length;r++)e=t.objectAt(r),e._childViews&&t.push.apply(t,e._childViews);return t},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:function(){},_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_elementWillChange:Ember.beforeObserver(function(){this.forEachChildView(function(e){Ember.propertyWillChange(e,"element")})},"element"),_elementDidChange:Ember.observer(function(){this.forEachChildView(function(e){Ember.propertyDidChange(e,"element")})},"element"),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=r(this,"templateName"),this._super(e)},_renderToBuffer:function(e,t){this.lengthBeforeRender=this._childViews.length;var r=this._super(e,t);return this.lengthAfterRender=this._childViews.length,r},renderToBufferIfNeeded:function(e){return this.currentState.renderToBufferIfNeeded(this,e)},beforeRender:function(e){this.applyAttributesToBuffer(e),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag()},applyAttributesToBuffer:function(e){var t=r(this,"classNameBindings");t.length&&this._applyClassNameBindings(t);var n=r(this,"attributeBindings");n.length&&this._applyAttributeBindings(e,n),e.setClasses(this.classNames),e.id(this.elementId);var i=r(this,"ariaRole");i&&e.attr("role",i),r(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:c,attributeBindings:c,init:function(){this.elementId=this.elementId||i(this),this._super(),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice());var e=r(this,"viewController");e&&(e=r(e),e&&n(e,"view",this))},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(!this.isDestroying){n(e,"_parentView",null);var t=this._childViews;return Ember.EnumerableUtils.removeObject(t,e),this.propertyDidChange("childViews"),this}},removeAllChildren:function(){return this.mutateChildViews(function(e,t){e.removeChild(t)})},destroyAllChildren:function(){return this.mutateChildViews(function(e,t){t.destroy()})},removeFromParent:function(){var e=this._parentView;return this.remove(),e&&e.removeChild(this),this},destroy:function(){var e,t,n=this._childViews,i=r(this,"parentView"),o=this.viewName;if(this._super()){for(e=n.length,t=e-1;t>=0;t--)n[t].removedFromDOM=!0;for(o&&i&&i.set(o,null),e=n.length,t=e-1;t>=0;t--)n[t].destroy();return this}},createChildView:function(e,t){return e.isView&&e._parentView===this?e:(Ember.CoreView.detect(e)?(t=t||{},t._parentView=this,t.container=this.container,t.templateData=t.templateData||r(this,"templateData"),e=e.create(t),e.viewName&&n(r(this,"concreteView"),e.viewName,e)):(t&&e.setProperties(t),r(e,"templateData")||n(e,"templateData",r(this,"templateData")),n(e,"_parentView",this)),e)},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}},"isVisible"),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){for(var e=r(this,"parentView");e;){if(r(e,"isVisible")===!1)return!0;e=r(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(e){e.buffer=null})},transitionTo:function(e,t){var r=this.currentState,n=this.currentState=this.states[e];this.state=e,r&&r.exit&&r.exit(this),n.enter&&n.enter(this),t!==!1&&this.forEachChildView(function(t){t.transitionTo(e)})},handleEvent:function(e,t){return this.currentState.handleEvent(this,e,t)},registerObserver:function(e,t,r,n){n||"function"!=typeof r||(n=r,r=null);var i=this,o=function(){i.currentState.invokeObserver(this,n)},s=function(){Ember.run.scheduleOnce("render",this,o)};Ember.addObserver(e,t,r,s),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,s)})}});var l={prepend:function(t,r){t.$().prepend(r),e()},after:function(t,r){t.$().after(r),e()},html:function(t,r){t.$().html(r),e()},replace:function(t){var i=r(t,"element");n(t,"element",null),t._insertElementLater(function(){Ember.$(i).replaceWith(r(t,"element")),e()})},remove:function(t){t.$().remove(),e()},empty:function(t){t.$().empty(),e()}};Ember.View.reopen({domManager:l}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t,r,n=e.split(":"),i=n[0],o="";return n.length>1&&(t=n[1],n.length===3&&(r=n[2]),o=":"+t,r&&(o+=":"+r)),{path:i,classNames:o,className:""===t?void 0:t,falsyClassName:r}},_classStringForValue:function(e,t,r,n){if(r||n)return r&&t?r:n&&!t?n:null;if(t===!0){var i=e.split(".");return Ember.String.dasherize(i[i.length-1])}return t!==!1&&void 0!==t&&null!==t?t:null}});var h=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){h.on("change",e)},Ember.View.removeMutationListener=function(e){h.off("change",e)},Ember.View.notifyMutationListeners=function(){h.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=a,Ember.View.applyAttributeBindings=function(e,t,r){var n=Ember.typeOf(r);"value"===t||"string"!==n&&("number"!==n||isNaN(r))?"value"===t||"boolean"===n?(void 0===r&&(r=null),r!==e.prop(t)&&e.prop(t,r)):r||e.removeAttr(t):r!==e.attr(t)&&e.attr(t,r)},Ember.View.states=t}(),function(){var e=(Ember.get,Ember.set);Ember.View.states._default={appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return void 0},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(t){return e(t,"element",null),t._scheduledInsert&&(Ember.run.cancel(t._scheduledInsert),t._scheduledInsert=null),t},renderToBufferIfNeeded:function(){return!1},rerender:Ember.K,invokeObserver:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement();var r=e.viewHierarchyCollection();r.trigger("willInsertElement"),t.call(e),r.transitionTo("inDOM",!1),r.trigger("didInsertElement")},renderToBufferIfNeeded:function(e,t){return e.renderToBuffer(t),!0},empty:Ember.K,setElement:function(e,t){return null!==t&&e.transitionTo("hasElement"),t}})}(),function(){Ember.get,Ember.set;var e=Ember.View.states.inBuffer=Ember.create(Ember.View.states._default);Ember.merge(e,{$:function(e){return e.rerender(),Ember.$()},rerender:function(){throw new Ember.Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.")},appendChild:function(e,t,r){var n=e.buffer,i=e._childViews;return t=e.createChildView(t,r),i.length||(i=e._childViews=i.slice()),i.push(t),t.renderToBuffer(n),e.propertyDidChange("childViews"),t},destroyElement:function(e){e.clearBuffer();var t=e._notifyWillDestroyElement();return t.transitionTo("preRender",!1),e},empty:function(){},renderToBufferIfNeeded:function(){return!1},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(e,t){return null===t?e.transitionTo("preRender"):(e.clearBuffer(),e.transitionTo("hasElement")),t},invokeObserver:function(e,t){t.call(e)}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(t,r){var n=e(t,"element");return r?Ember.$(r,n):Ember.$(n)},getElement:function(t){var r=e(t,"parentView");return r&&(r=e(r,"element")),r?t.findElementInParentElement(r):Ember.$("#"+e(t,"elementId"))[0]},setElement:function(e,t){if(null!==t)throw"You cannot set an element to a non-null value when the element is already in the DOM.";return e.transitionTo("preRender"),t},rerender:function(e){return e.triggerRecursively("willClearRender"),e.clearRenderedChildren(),e.domManager.replace(e),e},destroyElement:function(e){return e._notifyWillDestroyElement(),e.domManager.remove(e),t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},empty:function(e){var t,r,n=e._childViews;if(n)for(t=n.length,r=0;t>r;r++)n[r]._notifyWillDestroyElement();e.domManager.empty(e)},handleEvent:function(e,t,r){return e.has(t)?e.trigger(t,r):!0},invokeObserver:function(e,t){t.call(e)}});var n=Ember.View.states.inDOM=Ember.create(r);Ember.merge(n,{enter:function(e){e.isVirtual||(Ember.View.views[e.elementId]=e),e.addBeforeObserver("elementId",function(){throw new Error("Changing a view's elementId after creation is not allowed")})},exit:function(e){this.isVirtual||delete Ember.View.views[e.elementId]},insertElement:function(){throw"You can't insert an element into the DOM that has already been inserted"}})}(),function(){var e="You can't call %@ on a view being destroyed",t=Ember.String.fmt,r=Ember.View.states.destroying=Ember.create(Ember.View.states._default);Ember.merge(r,{appendChild:function(){throw t(e,["appendChild"])},rerender:function(){throw t(e,["rerender"])},destroyElement:function(){throw t(e,["destroyElement"])},empty:function(){throw t(e,["empty"])},setElement:function(){throw t(e,["set('element', ...)"])},renderToBufferIfNeeded:function(){return!1},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroying=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);for(var r in e)e.hasOwnProperty(r)&&Ember.merge(t[r],e[r]);return t}}(),function(){function e(e,t,r,n){t.triggerRecursively("willInsertElement"),r?r.domManager.after(r,n.string()):e.domManager.prepend(e,n.string()),t.forEach(function(e){e.transitionTo("inDOM"),e.propertyDidChange("element"),e.triggerRecursively("didInsertElement")})}var t=Ember.View.cloneStates(Ember.View.states),r=Ember.get,n=Ember.set,i=Ember.EnumerableUtils.forEach,o=Ember._ViewCollection;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:t,init:function(){this._super();var e=r(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var t=this._childViews;i(e,function(e,i){var o;"string"==typeof e?(o=r(this,e),o=this.createChildView(o),n(this,e,o)):o=this.createChildView(e),t[i]=o},this);var o=r(this,"currentView");o&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(o)))},replace:function(e,t,n){var i=n?r(n,"length"):0;if(this.arrayContentWillChange(e,t,i),this.childViewsWillChange(this._childViews,e,t),0===i)this._childViews.splice(e,t);else{var o=[e,t].concat(n);n.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,o)}return this.arrayContentDidChange(e,t,i),this.childViewsDidChange(this._childViews,e,t,i),this},objectAt:function(e){return this._childViews[e]},length:Ember.computed(function(){return this._childViews.length}),render:function(e){this.forEachChildView(function(t){t.renderToBuffer(e)})},instrumentName:"container",childViewsWillChange:function(e,t,r){if(this.propertyWillChange("childViews"),r>0){var n=e.slice(t,t+r);this.currentState.childViewsWillChange(this,e,t,r),this.initializeViews(n,null,null)}},removeChild:function(e){return this.removeObject(e),this},childViewsDidChange:function(e,t,n,i){if(i>0){var o=e.slice(t,t+i);this.initializeViews(o,this,r(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,o){i(e,function(e){n(e,"_parentView",t),r(e,"templateData")||n(e,"templateData",o)})},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var e=r(this,"currentView");e&&e.destroy()},"currentView"),_currentViewDidChange:Ember.observer(function(){var e=r(this,"currentView");e&&this.pushObject(e)},"currentView"),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}}),Ember.merge(t._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K}),Ember.merge(t.inBuffer,{childViewsDidChange:function(){throw new Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(t.hasElement,{childViewsWillChange:function(e,t,r,n){for(var i=r;r+n>i;i++)t[i].remove()},childViewsDidChange:function(e){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(t){var r,n,i,s,a,u=t._childViews,c=new o;for(r=0,n=u.length;n>r;r++)i=u[r],a||(a=Ember.RenderBuffer(),a._hasElement=!1),i.renderToBufferIfNeeded(a)?c.push(i):c.length?(e(t,c,s,a),a=null,s=i,c.clear()):s=i;c.length&&e(t,c,s,a)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver(function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)},"content"),_contentDidChange:Ember.observer(function(){var t=e(this,"content");t&&t.addArrayObserver(this);var r=t?e(t,"length"):0;this.arrayDidChange(t,0,null,r)},"content"),destroy:function(){if(this._super()){var t=e(this,"content");return t&&t.removeArrayObserver(this),this._createdEmptyView&&this._createdEmptyView.destroy(),this}},arrayWillChange:function(t,r,n){var i=e(this,"emptyView");i&&i instanceof Ember.View&&i.removeFromParent();var o,s,a,u=this._childViews;a=this._childViews.length;var c=n===a;for(c&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),s=r+n-1;s>=r;s--)o=u[s],o.destroy()},arrayDidChange:function(r,n,i,o){var s,a,u,c,l=e(this,"itemViewClass"),h=[];if("string"==typeof l&&(l=e(l)),c=r?e(r,"length"):0)for(u=n;n+o>u;u++)a=r.objectAt(u),s=this.createChildView(l,{content:a,contentIndex:u}),h.push(s);else{var m=e(this,"emptyView");if(!m)return;var f=Ember.CoreView.detect(m);m=this.createChildView(m),h.push(m),t(this,"emptyView",m),f&&(this._createdEmptyView=m)}this.replace(n,0,h)},createChildView:function(r,n){r=this._super(r,n);var i=e(r,"tagName"),o=null===i||void 0===i?Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")]:i;return t(r,"tagName",o),r}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){e("metamorph",[],function(){"use strict";// Copyright: ©2011 My Company Inc. All rights reserved.
19
- var e=function(){},t=0,r=this.document,n=r&&"createRange"in r&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,i=r&&function(){var e=r.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",e.firstChild.innerHTML===""}(),o=r&&function(){var e=r.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value",e.childNodes[0].nodeValue==="Test:"&&e.childNodes[2].nodeValue===" Value"}(),s=function(r){var n;n=this instanceof s?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=s.prototype;var a,u,c,l,h,m,f,p,d;if(l=function(){return this.startTag()+this.innerHTML+this.endTag()},p=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},d=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"},n)a=function(e,t){var n=r.createRange(),i=r.getElementById(e.start),o=r.getElementById(e.end);return t?(n.setStartBefore(i),n.setEndAfter(o)):(n.setStartAfter(i),n.setEndBefore(o)),n},u=function(e,t){var r=a(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},c=function(){var e=a(this,!0);e.deleteContents()},h=function(e){var t=r.createRange();t.setStart(e),t.collapse(!1);var n=t.createContextualFragment(this.outerHTML());e.appendChild(n)},m=function(e){var t=r.createRange(),n=r.getElementById(this.end);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)},f=function(e){var t=r.createRange(),n=r.getElementById(this.start);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)};else{var b={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},E=function(e,t){if(e.getAttribute("id")===t)return e;var r,n,i,o=e.childNodes.length;for(r=0;o>r;r++)if(n=e.childNodes[r],i=n.nodeType===1&&E(n,t))return i},v=function(e,t){var n=[];if(o&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,i){return n.push([i,t]),r})),e.innerHTML=t,n.length>0){var i,s=n.length;for(i=0;s>i;i++){var a=E(e,n[i][0]),u=r.createTextNode(n[i][1]);a.parentNode.insertBefore(u,a)}}},g=function(e,t){var n=b[e.tagName.toLowerCase()]||b._default,o=n[0],s=n[1],a=n[2];i&&(t="&shy;"+t);var u=r.createElement("div");v(u,s+t+a);for(var c=0;o>=c;c++)u=u.firstChild;if(i){for(var l=u;l.nodeType===1&&!l.nodeName;)l=l.firstChild;l.nodeType===3&&l.nodeValue.charAt(0)==="­"&&(l.nodeValue=l.nodeValue.slice(1))}return u},y=function(e){for(;e.parentNode.tagName==="";)e=e.parentNode;return e},w=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};u=function(e,t){var n,i,o,s=y(r.getElementById(this.start)),a=r.getElementById(this.end),u=a.parentNode;for(w(s,a),n=s.nextSibling;n;){if(i=n.nextSibling,o=n===a){if(!t)break;a=n.nextSibling}if(n.parentNode.removeChild(n),o)break;n=i}for(n=g(s.parentNode,e);n;)i=n.nextSibling,u.insertBefore(n,a),n=i},c=function(){var e=y(r.getElementById(this.start)),t=r.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},h=function(e){for(var t,r=g(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},m=function(e){var t,n,i=r.getElementById(this.end),o=i.nextSibling,s=i.parentNode;for(n=g(s,e);n;)t=n.nextSibling,s.insertBefore(n,o),n=t},f=function(e){var t,n,i=r.getElementById(this.start),o=i.parentNode;n=g(o,e);for(var s=i.nextSibling;n;)t=n.nextSibling,o.insertBefore(n,s),n=t}}return s.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(u.call(this,e),this.innerHTML=e,void 0)},s.prototype.replaceWith=function(e){this.checkRemoved(),u.call(this,e,!0)},s.prototype.remove=c,s.prototype.outerHTML=l,s.prototype.appendTo=h,s.prototype.after=m,s.prototype.prepend=f,s.prototype.startTag=p,s.prototype.endTag=d,s.prototype.isRemoved=function(){var e=r.getElementById(this.start),t=r.getElementById(this.end);return!e||!t},s.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},s})}(),function(){function e(e){var t=e.hash,r=e.hashTypes;for(var n in t)r[n]==="ID"&&(t[n+"Binding"]=t[n],r[n+"Binding"]="STRING",delete t[n],delete r[n])}var t=Object.create||function(e){function t(){}return t.prototype=e,new t},r=this.Handlebars||Ember.imports&&Ember.imports.Handlebars;r||"function"!=typeof require||(r=require("handlebars")),Ember.Handlebars=t(r),Ember.Handlebars.helper=function(t,r){Ember.View.detect(r)?Ember.Handlebars.registerHelper(t,function(t){return e(t),Ember.Handlebars.helpers.view.call(this,r,t)}):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.helpers=t(r.helpers),Ember.Handlebars.Compiler=function(){},r.Compiler&&(Ember.Handlebars.Compiler.prototype=t(r.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},r.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=t(r.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var n="ember"+ +new Date,i=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&e.id.string==="control")e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["controlID",new r.AST.StringNode(n+i++)]);else if(e.params.length||e.hash);else{var t=new r.AST.IdNode(["_triageMustache"]);e.escaped||(e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["unescaped",new r.AST.StringNode("true")])),e=new r.AST.MustacheNode([t].concat([e.id]),e.hash,!e.escaped)}return r.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var t=r.parse(e),n={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0)},r.compile&&(Ember.Handlebars.compile=function(e){var t=r.parse(e),n={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n),o=(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0);return Ember.Handlebars.template(o)})}(),function(){function e(e,t,r,i){var o,s,a,u,c,l,h=r.length,m=i.data,f=m.view,p=i.hash,d=p.boundOptions;a=new Ember._SimpleHandlebarsView(null,null,!p.unescaped,m),a.normalizedValue=function(){var o,s=[];for(o in d)d.hasOwnProperty(o)&&(c=n(e,d[o],m),a.path=c.path,a.pathRoot=c.root,p[o]=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(a));for(u=0;h>u;++u)c=r[u],a.path=c.path,a.pathRoot=c.root,s.push(Ember._SimpleHandlebarsView.prototype.normalizedValue.call(a));return s.push(i),t.apply(e,s)},f.appendChild(a),o=[];for(s in d)d.hasOwnProperty(s)&&o.push(n(e,d[s],m));for(o=o.concat(r),u=0,l=o.length;l>u;++u)c=o[u],f.registerObserver(c.root,c.path,a,a.rerender)}function t(e,t,r,n){var i,o,s,a,u=[],c=n.hash,l=c.boundOptions;for(a in l)l.hasOwnProperty(a)&&(c[a]=Ember.Handlebars.get(e,l[a],n));for(i=0,o=r.length;o>i;++i)s=r[i],u.push(Ember.Handlebars.get(e,s.path,n));return u.push(n),t.apply(e,u)}var r=Array.prototype.slice,n=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,o=r&&r.keywords||{};return n=t.split(".",1)[0],o.hasOwnProperty(n)&&(e=o[n],i=!0,t=t===n?"":t.substr(n.length+1)),{root:e,path:t,isKeyword:i}},i=Ember.Handlebars.get=function(e,t,r){var i,o=r&&r.data,s=n(e,t,o);return e=s.root,t=s.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.getPath=Ember.deprecateFunc("`Ember.Handlebars.getPath` has been changed to `Ember.Handlebars.get` for consistency.",Ember.Handlebars.get),Ember.Handlebars.resolveParams=function(e,t,r){for(var n,o,s=[],a=r.types,u=0,c=t.length;c>u;u++)n=t[u],o=a[u],"ID"===o?s.push(i(e,n,r)):s.push(n);return s},Ember.Handlebars.resolveHash=function(e,t,r){var n,o={},s=r.hashTypes;for(var a in t)t.hasOwnProperty(a)&&(n=s[a],o[a]="ID"===n?i(e,t[a],r):t[a]);return o},Ember.Handlebars.registerHelper("helperMissing",function(e,t){var r,n="";throw r="%@ Handlebars error: Could not find property '%@' on object %@.",t.data&&(n=t.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerBoundHelper=function(i,o){function s(){var i,s,u,c,l,h=r.call(arguments,0,-1),m=h.length,f=arguments[arguments.length-1],p=[],d=f.data,b=f.hash,E=d.view,v=f.contexts&&f.contexts[0]||this;b.boundOptions={};for(l in b)b.hasOwnProperty(l)&&Ember.IS_BINDING.test(l)&&typeof b[l]=="string"&&(b.boundOptions[l.slice(0,-7)]=b[l]);for(d.properties=[],c=0;m>c;++c)d.properties.push(h[c]),p.push(n(v,h[c],d));if(d.isUnbound)return t(this,o,p,f);if(a.length===0)return e(v,o,p,f);i=p[0],s=i.root,u=i.path;var g=new Ember._SimpleHandlebarsView(u,s,!f.hash.unescaped,f.data);g.normalizedValue=function(){var e=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(g);return o.call(E,e,f)},E.appendChild(g),E.registerObserver(s,u,g,g.rerender);for(var y=0,w=a.length;w>y;y++)E.registerObserver(s,u+"."+a[y],g,g.rerender)}var a=r.call(arguments,2);s._rawFunction=o,Ember.Handlebars.registerHelper(i,s)},Ember.Handlebars.template=function(e){var t=Handlebars.template(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.htmlSafe=function(){return e(this)})}(),function(){Ember.Handlebars.resolvePaths=function(e){for(var t=[],r=e.contexts,n=e.roots,i=e.data,o=0,s=r.length;s>o;o++)t.push(Ember.Handlebars.get(n[o],r[o],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}Ember.set,Ember.get;var r=t("metamorph"),n={remove:function(t){t.morph.remove(),e()},prepend:function(t,r){t.morph.prepend(r),e()},after:function(t,r){t.morph.after(r),e()},html:function(t,r){t.morph.html(r),e()},replace:function(t){var r=t.morph;t.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(!t.isDestroying){t.clearRenderedChildren();var n=t.renderToBuffer();t.invokeRecursively(function(e){e.propertyWillChange("element")}),t.triggerRecursively("willInsertElement"),r.replaceWith(n.string()),t.transitionTo("inDOM"),t.invokeRecursively(function(e){e.propertyDidChange("element")}),t.triggerRecursively("didInsertElement"),e()}})},empty:function(t){t.morph.html(""),e()}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",instrumentName:"metamorph",init:function(){this._super(),this.morph=r()},beforeRender:function(e){e.push(this.morph.startTag()),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag(),e.push(this.morph.endTag())},createElement:function(){var e=this.renderToBuffer();this.outerHTML=e.string(),this.clearBuffer()},domManager:n}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function e(e,t,r,n){this.path=e,this.pathRoot=t,this.isEscaped=r,this.templateData=n,this.morph=o(),this.state="preRender",this.updateId=null}var r=Ember.get,n=Ember.set,i=Ember.Handlebars.get,o=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this.morph=null},propertyWillChange:Ember.K,propertyDidChange:Ember.K,normalizedValue:function(){var e,t,r=this.path,n=this.pathRoot;return""===r?e=n:(t=this.templateData,e=i(n,r,{data:t})),e},renderToBuffer:function(e){var t="";t+=this.morph.startTag(),t+=this.render(),t+=this.morph.endTag(),e.push(t)},render:function(){var e=this.isEscaped,t=this.normalizedValue();return null===t||void 0===t?t="":t instanceof Handlebars.SafeString||(t=String(t)),e&&(t=Handlebars.Utils.escapeExpression(t)),t},rerender:function(){switch(this.state){case"preRender":case"destroying":break;case"inBuffer":throw new Ember.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");case"hasElement":case"inDOM":this.updateId=Ember.run.scheduleOnce("render",this,"update")}return this},update:function(){this.updateId=null,this.morph.html(this.render())},transitionTo:function(e){this.state=e}};var s=Ember.View.cloneStates(Ember.View.states),a=Ember.merge;a(s._default,{rerenderIfNeeded:Ember.K}),a(s.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:s,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),o=r(this,"pathRoot"),s=r(this,"valueNormalizerFunc");return""===n?e=o:(t=r(this,"templateData"),e=i(o,n,{data:t})),s?s(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),o=r(this,"preserveContext"),s=r(this,"previousContext"),a=r(this,"inverseTemplate"),u=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",u),o)n(this,"_context",s);else{if(!u)return null===c||void 0===c?c="":c instanceof Handlebars.SafeString||(c=String(c)),t&&(c=Handlebars.Utils.escapeExpression(c)),e.push(c),void 0;n(this,"_context",c)}else a?(n(this,"template",a),o?n(this,"_context",s):n(this,"_context",c)):n(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r,n,s,a){var u,c,l,h=t.data,m=t.fn,f=t.inverse,p=h.view,d=this;if(u=o(d,e,h),"object"==typeof this){if(h.insideGroup){c=function(){Ember.run.once(p,"rerender")};var b,E,v=i(d,e,t);v=s(v),E=r?d:v,n(v)?b=m:f&&(b=f),b(E,{data:t.data})}else{var g=p.createChildView(Ember._HandlebarsBoundView,{preserveContext:r,shouldDisplayFunc:n,valueNormalizerFunc:s,displayTemplate:m,inverseTemplate:f,path:e,pathRoot:d,previousContext:d,isEscaped:!t.hash.unescaped,templateData:t.data});p.appendChild(g),c=function(){Ember.run.scheduleOnce("render",g,"rerenderIfNeeded")}}if(u.path!==""&&(p.registerObserver(u.root,u.path,c),a))for(l=0;l<a.length;l++)p.registerObserver(u.root,u.path+"."+a[l],c)}else h.buffer.push(i(d,e,t))}function r(e,t){var r,n,s=t.data,a=s.view,u=this;if(r=o(u,e,s),"object"==typeof this){if(s.insideGroup){n=function(){Ember.run.once(a,"rerender")};var c=i(u,e,t);(null===c||void 0===c)&&(c=""),s.buffer.push(c)}else{var l=new Ember._SimpleHandlebarsView(e,u,!t.hash.unescaped,t.data);l._parentView=a,a.appendChild(l),n=function(){Ember.run.scheduleOnce("render",l,"rerender")}}r.path!==""&&a.registerObserver(r.root,r.path,n)}else s.buffer.push(i(u,e,t))}var n=Ember.get;Ember.set,Ember.String.fmt;var i=Ember.Handlebars.get,o=Ember.Handlebars.normalizePath,s=Ember.ArrayPolyfills.forEach,a=Ember.Handlebars,u=a.helpers;a.registerHelper("_triageMustache",function(e,t){return u[e]?u[e].call(this,t):u.bind.apply(this,arguments)}),a.registerHelper("bind",function(n,i){var o=i.contexts&&i.contexts[0]||this;return i.fn?t.call(o,n,i,!1,e):r.call(o,n,i)}),a.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts[0]||this,o=function(e){var t=e&&n(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?n(e,"length")!==0:!!e};return t.call(i,e,r,!0,o,o,["isTruthy","length"])}),a.registerHelper("with",function(r,n){if(arguments.length===4){var i,s,a,c;if(n=arguments[3],i=arguments[2],s=arguments[0],Ember.isGlobalPath(s))Ember.bind(n.data.keywords,i,s);else{c=o(this,s,n.data),s=c.path,a=c.root;var l=Ember.$.expando+Ember.guidFor(a);n.data.keywords[l]=a;var h=s?l+"."+s:l;Ember.bind(n.data.keywords,i,h)}return t.call(this,s,n,!0,e)}return u.bind.call(n.contexts[0],r,n)}),a.registerHelper("if",function(e,t){return u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("bindAttr",function(e){var t=e.hash,r=e.data.view,n=[],u=this,c=++Ember.uuid,l=t["class"];if(null!==l&&void 0!==l){var h=a.bindClasses(this,l,r,c,e);n.push('class="'+Handlebars.Utils.escapeExpression(h.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return s.call(m,function(s){var a,l=t[s];a=o(u,l,e.data);var h,m,f="this"===l?a.root:i(u,l,e),p=Ember.typeOf(f);h=function(){var t=i(u,l,e),n=r.$("[data-bindattr-"+c+"='"+c+"']");return n&&n.length!==0?(Ember.View.applyAttributeBindings(n,s,t),void 0):(Ember.removeObserver(a.root,a.path,m),void 0)},"this"===l||a.isKeyword&&a.path===""||r.registerObserver(a.root,a.path,h),"string"===p||"number"===p&&!isNaN(f)?n.push(s+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(s+'="'+s+'"')},this),n.push("data-bindattr-"+c+'="'+c+'"'),new a.SafeString(n.join(" "))}),a.bindClasses=function(e,t,r,n,a){var u,c,l,h=[],m=function(e,t,r){var n,o=t.path;return n="this"===o?e:""===o?!0:i(e,o,r),Ember.View._classStringForValue(o,n,t.className,t.falsyClassName)};return s.call(t.split(" "),function(t){var i,s,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,E=e;""!==b&&"this"!==b&&(p=o(e,b,a.data),E=p.root,b=p.path),s=function(){u=m(e,d,a),l=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),l&&l.length!==0?(i&&l.removeClass(i),u?(l.addClass(u),i=u):i=null):Ember.removeObserver(E,b,f)},""!==b&&"this"!==b&&r.registerObserver(E,b,s),c=m(e,d,a),c&&(h.push(c),i=c)}),h}}(),function(){Ember.get,Ember.set;var e=Ember.Handlebars;e.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,r=e.data,n={},i=t["class"],o=!1;t.id&&(n.elementId=t.id,o=!0),t.tag&&(n.tagName=t.tag,o=!0),i&&(i=i.split(" "),n.classNames=i,o=!0),t.classBinding&&(n.classNameBindings=t.classBinding.split(" "),o=!0),t.classNameBindings&&(n.classNameBindings===void 0&&(n.classNameBindings=[]),n.classNameBindings=n.classNameBindings.concat(t.classNameBindings.split(" ")),o=!0),t.attributeBindings&&(n.attributeBindings=null,o=!0),o&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var s;for(var a in t)t.hasOwnProperty(a)&&Ember.IS_BINDING.test(a)&&typeof t[a]=="string"&&(s=this.contextualizeBindingPath(t[a],r),s&&(t[a]=s));if(n.classNameBindings)for(var u in n.classNameBindings){var c=n.classNameBindings[u];if("string"==typeof c){var l=Ember.View._parsePropertyPath(c);s=this.contextualizeBindingPath(l.path,r),s&&(n.classNameBindings[u]=s+l.classNames)}}return Ember.$.extend(t,n)},contextualizeBindingPath:function(e,t){var r=Ember.Handlebars.normalizePath(null,e,t);return r.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:"this"===e?"_parentView.context":"_parentView.context."+e},helper:function(t,r,n){var i,o=n.data,s=n.fn;i="string"==typeof r?e.get(t,r,n):r;var a=this.propertiesFromHTMLOptions(n,t),u=o.view;a.templateData=o;var c=i.proto?i.proto():i;s&&(a.template=s),c.controller||c.controllerBinding||a.controller||a.controllerBinding||(a._context=t),u.appendChild(i,a)}}),e.registerHelper("view",function(t,r){return t&&t.data&&t.data.isRenderData&&(r=t,t="Ember.View"),e.ViewHelper.helper(this,t,r)})}(),function(){var e=Ember.get,t=Ember.Handlebars.get;Ember.String.fmt,Ember.Handlebars.registerHelper("collection",function(r,n){r&&r.data&&r.data.isRenderData&&(n=r,r=void 0);var i=n.fn,o=n.data,s=n.inverse;n.data.view;var a;a=r?t(this,r,n):Ember.CollectionView;var u,c,l=n.hash,h={},m=l.itemViewClass,f=a.proto();delete l.itemViewClass,c=m?t(f,m,n):f.itemViewClass;for(var p in l)l.hasOwnProperty(p)&&(u=p.match(/^item(.)(.*)$/),u&&"itemController"!==p&&(h[u[1].toLowerCase()+u[2]]=l[p],delete l[p]));i&&(h.template=i,delete n.fn);var d;s&&s!==Handlebars.VM.noop?(d=e(f,"emptyViewClass"),d=d.extend({template:s,tagName:h.tagName})):l.emptyViewClass&&(d=t(this,l.emptyViewClass,n)),d&&(l.emptyView=d),l.keyword||(h._context=Ember.computed.alias("content"));var b=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:o,hash:h},this);return l.itemViewClass=c.extend(b),Ember.Handlebars.helpers.view.call(this,a,n)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,r){var n,i,o,s=arguments[arguments.length-1];return arguments.length>2?(s.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,o=n.apply(this,Array.prototype.slice.call(arguments,1)),delete s.data.isUnbound,o):(i=r.contexts&&r.contexts[0]||this,e(i,t,r))})}(),function(){var e=Ember.Handlebars.get,t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(r,n){var i=n.contexts&&n.contexts[0]||this,o=t(i,r,n.data),s=o.root,a=o.path,u="this"===a?s:e(s,a,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var r,n=e(this,"itemController");if(n){var i=Ember.ArrayController.create();t(i,"itemController",n),t(i,"container",e(this,"controller.container")),t(i,"_eachView",this),t(i,"target",e(this,"controller")),t(i,"parentController",e(this,"controller")),this.disableContentObservers(function(){t(this,"content",i),r=new Ember.Binding("content","_eachView.dataSource").oneWay(),r.connect(i)}),t(this,"_arrayController",i)}else this.disableContentObservers(function(){r=new Ember.Binding("content","dataSource").oneWay(),r.connect(this)});return this._super()},disableContentObservers:function(e){Ember.removeBeforeObserver(this,"content",null,"_contentWillChange"),Ember.removeObserver(this,"content",null,"_contentDidChange"),e.call(this),Ember.addBeforeObserver(this,"content",null,"_contentWillChange"),Ember.addObserver(this,"content",null,"_contentDidChange")},itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(r,n){r=this._super(r,n);var i=e(this,"keyword"),o=e(r,"content");if(i){var s=e(r,"templateData");s=Ember.copy(s),s.keywords=r.cloneKeywords(),t(r,"templateData",s),s.keywords[i]=o}return o&&e(o,"isController")&&t(r,"controller",o),r},destroy:function(){if(this._super()){var t=e(this,"_arrayController");return t&&t.destroy(),this}}});var r=Ember.Handlebars.GroupedEach=function(e,t,r){var n=this,i=Ember.Handlebars.normalizePath(e,t,r.data);this.context=e,this.path=t,this.options=r,this.template=r.fn,this.containingView=r.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){n.destroy()})};r.prototype={contentWillChange:function(){this.removeArrayObservers()},contentDidChange:function(){this.content=this.lookupContent(),this.addArrayObservers(),this.rerenderContainingView()},contentArrayWillChange:Ember.K,contentArrayDidChange:function(){this.rerenderContainingView()},lookupContent:function(){return Ember.Handlebars.get(this.normalizedRoot,this.normalizedPath,this.options)},addArrayObservers:function(){this.content.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){this.content.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},addContentObservers:function(){Ember.addBeforeObserver(this.normalizedRoot,this.normalizedPath,this,this.contentWillChange),Ember.addObserver(this.normalizedRoot,this.normalizedPath,this,this.contentDidChange)},removeContentObservers:function(){Ember.removeBeforeObserver(this.normalizedRoot,this.normalizedPath,this.contentWillChange),Ember.removeObserver(this.normalizedRoot,this.normalizedPath,this.contentDidChange)},render:function(){var t=this.content,r=e(t,"length"),n=this.options.data,i=this.template;n.insideEach=!0;for(var o=0;r>o;o++)i(t.objectAt(o),{data:n})},rerenderContainingView:function(){Ember.run.scheduleOnce("render",this.containingView,"rerender")},destroy:function(){this.removeContentObservers(),this.removeArrayObservers()}},Ember.Handlebars.registerHelper("each",function(e,t){if(arguments.length===4){var r=arguments[0];t=arguments[3],e=arguments[2],""===e&&(e="this"),t.hash.keyword=r}return t.hash.dataSourceBinding=e,!t.data.insideGroup||t.hash.groupedRows||t.hash.itemViewClass?Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",t):(new Ember.Handlebars.GroupedEach(this,e,t).render(),void 0)})}(),function(){Ember.Handlebars.registerHelper("template",function(e,t){var r=t.data.view,n=r.templateForName(e);n(this,{data:t.data})})}(),function(){Ember.Handlebars.registerHelper("partial",function(e,t){var r=e.split("/"),n=r[r.length-1];r[r.length-1]="_"+n;var i=t.data.view,o=r.join("/"),s=i.templateForName(o),a=!s&&i.templateForName(e);s=s||a,s(this,{data:t.data})})}(),function(){var e=Ember.get;Ember.set,Ember.Handlebars.registerHelper("yield",function(t){for(var r,n=t.data.view;n&&!e(n,"layout");)n=e(n,"parentView");r=e(n,"template"),r&&r(this,t)})}(),function(){var e=Ember.set;Ember.get,Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","disabled","tabindex","name"],type:"checkbox",checked:!1,disabled:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){var e=(Ember.get,Ember.set);Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex"],placeholder:null,disabled:!1,maxlength:null,insertNewline:Ember.K,cancel:Ember.K,init:function(){this._super(),this.on("focusOut",this,this._elementValueDidChange),this.on("change",this,this._elementValueDidChange),this.on("paste",this,this._elementValueDidChange),this.on("cut",this,this._elementValueDidChange),this.on("input",this,this._elementValueDidChange),this.on("keyUp",this,this.interpretKeyEvents)},interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,r=t[e.keyCode];return this._elementValueDidChange(),r?this[r](e):void 0},_elementValueDidChange:function(){e(this,"value",this.$().val())}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){function e(e,r,n){var i=t(r,"action"),o=t(r,"onEvent");if(i&&o===e){var s=t(r,"controller"),a=t(r,"value"),u=t(r,"bubbles");s.send(i,a,r),u||n.stopPropagation()}}var t=Ember.get;Ember.set,Ember.TextField=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name"],value:"",type:"text",size:null,pattern:null,action:null,onEvent:"enter",bubbles:!1,insertNewline:function(t){e("enter",this,t)},keyPress:function(t){e("keyPress",this,t)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Button=Ember.View.extend(Ember.TargetActionSupport,{classNames:["ember-button"],classNameBindings:["isActive"],tagName:"button",propagateEvents:!1,attributeBindings:["type","disabled","href","tabindex"],targetObject:Ember.computed(function(){var t=e(this,"target"),r=e(this,"context"),n=e(this,"templateData");return"string"!=typeof t?t:Ember.Handlebars.get(r,t,{data:n})}).property("target"),type:Ember.computed(function(){var e=this.tagName;return"input"===e||"button"===e?"button":void 0}),disabled:!1,href:Ember.computed(function(){return this.tagName==="a"?"#":null}),mouseDown:function(){return e(this,"disabled")||(t(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0),e(this,"propagateEvents")},mouseLeave:function(){this._mouseDown&&(t(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(t(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(){return e(this,"isActive")&&(this.triggerAction(),t(this,"isActive",!1)),this._mouseDown=!1,this._mouseEntered=!1,e(this,"propagateEvents")},keyDown:function(e){(e.keyCode===13||e.keyCode===32)&&this.mouseDown()},keyUp:function(e){(e.keyCode===13||e.keyCode===32)&&this.mouseUp()},touchStart:function(e){return this.mouseDown(e)},touchEnd:function(e){return this.mouseUp(e)},init:function(){this._super()}})}(),function(){var e=Ember.get;Ember.set,Ember.TextArea=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)},"value"),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){var e=Ember.set,t=Ember.get,r=Ember.EnumerableUtils.indexOf,n=Ember.EnumerableUtils.indexesOf,i=Ember.EnumerableUtils.replace,o=Ember.isArray;Ember.Handlebars.compile,Ember.SelectOption=Ember.View.extend({tagName:"option",attributeBindings:["value","selected"],defaultTemplate:function(e,t){t={data:t.data,hash:{}},Ember.Handlebars.helpers.bind.call(e,"view.label",t)},init:function(){this.labelPathDidChange(),this.valuePathDidChange(),this._super()},selected:Ember.computed(function(){var e=t(this,"content"),n=t(this,"parentView.selection");return t(this,"parentView.multiple")?n&&r(n,e.valueOf())>-1:e==n}).property("content","parentView.selection"),labelPathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionLabelPath"),valuePathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionValuePath")}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,r,n,i){function o(e,t){var n,i,o="";return t.buffer.push('<option value="">'),n={},i={},t.buffer.push(h(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:n,data:t}))),t.buffer.push("</option>"),o}function s(e,t){var n,i;n={contentBinding:e},i={contentBinding:"STRING"},t.buffer.push(h(r.view.call(e,"view.optionView",{hash:{contentBinding:"this"},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}this.compilerInfo=[3,">= 1.0.0-rc.4"],r=r||Ember.Handlebars.helpers,i=i||{};var a,u,c,l="",h=this.escapeExpression,m=this;return u={},c={},a=r["if"].call(t,"view.prompt",{hash:{},inverse:m.noop,fn:m.program(1,o,i),contexts:[t],types:["ID"],hashContexts:c,hashTypes:u,data:i}),(a||0===a)&&i.buffer.push(a),u={},c={},a=r.each.call(t,"view.content",{hash:{},inverse:m.noop,fn:m.program(3,s,i),contexts:[t],types:["ID"],hashContexts:c,hashTypes:u,data:i}),(a||0===a)&&i.buffer.push(a),l}),attributeBindings:["multiple","disabled","tabindex","name"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,r){if(arguments.length===2)return r;var n=t(this,"optionValuePath").replace(/^content\.?/,"");return n?t(this,"selection."+n):t(this,"selection")}).property("selection"),prompt:null,optionLabelPath:"content",optionValuePath:"content",optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var r=t(this,"selection");if(t(this,"multiple")){if(!o(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection.@each"),valueDidChange:Ember.observer(function(){var e,r=t(this,"content"),n=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),o=i?t(this,"selection."+i):t(this,"selection");n!==o&&(e=r?r.find(function(e){return n===(i?t(e,i):e)}):null,this.set("selection",e))},"value"),_triggerChange:function(){var e=t(this,"selection"),r=t(this,"value");e&&this.selectionDidChange(),r&&this.valueDidChange(),this._change()},_changeSingle:function(){var r=this.$()[0].selectedIndex,n=t(this,"content"),i=t(this,"prompt");if(n&&t(n,"length")){if(i&&0===r)return e(this,"selection",null),void 0;i&&(r-=1),e(this,"selection",n.objectAt(r))}},_changeMultiple:function(){var r=this.$("option:selected"),n=t(this,"prompt"),s=n?1:0,a=t(this,"content"),u=t(this,"selection");if(a&&r){var c=r.map(function(){return this.index-s
20
- }).toArray(),l=a.objectsAt(c);o(u)?i(u,0,t(u,"length"),l):e(this,"selection",l)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),o=n?r(n,i):-1,s=t(this,"prompt");s&&(o+=1),e&&(e.selectedIndex=o)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),o=t(this,"selection"),s=i?n(i,o):[-1],a=t(this,"prompt"),u=a?1:0,c=this.$("option");c&&c.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(s,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){function e(e,t){for(var r in e)t[r]==="ID"&&(e[r+"Binding"]=e[r],delete e[r])}Ember.Handlebars.registerHelper("input",function(t){var r=t.hash,n=t.hashTypes,i=r.type,o=r.on;return delete r.type,delete r.on,e(r,n),"checkbox"===i?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,t):(r.type=i||"text",r.onEvent=o||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,t))}),Ember.Handlebars.registerHelper("textarea",function(t){var r=t.hash,n=t.hashTypes;return e(r,n),Ember.Handlebars.helpers.view.call(this,Ember.TextArea,t)})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}Ember.Handlebars.bootstrap=function(e){var t='script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';Ember.$(t,e).each(function(){var e=Ember.$(this),t=e.attr("type")==="text/x-raw-handlebars"?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),r=e.attr("data-template-name")||e.attr("id")||"application",n=t(e.html());Ember.TEMPLATES[r]=n,e.remove()})},Ember.onLoad("application",e)}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",[],function(){"use strict";function e(e){this.string=e}function t(e){this.name=e}function r(e){this.name=e}function n(){}function i(i,o,s){i.charAt(0)==="/"&&(i=i.substr(1));for(var a=i.split("/"),u=[],c=0,l=a.length;l>c;c++){var h,m=a[c];(h=m.match(/^:([^\/]+)$/))?(u.push(new t(h[1])),o.push(h[1]),s.dynamics++):(h=m.match(/^\*([^\/]+)$/))?(u.push(new r(h[1])),o.push(h[1]),s.stars++):""===m?u.push(new n):(u.push(new e(m)),s.statics++)}return u}function o(e){this.charSpec=e,this.nextStates=[]}function s(e){return e.sort(function(e,t){return e.types.stars!==t.types.stars?e.types.stars-t.types.stars:e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?e.types.statics-t.types.statics:0})}function a(e,t){for(var r=[],n=0,i=e.length;i>n;n++){var o=e[n];r=r.concat(o.match(t))}return r}function u(e,t){for(var r=e.handlers,n=e.regex,i=t.match(n),o=1,s=[],a=0,u=r.length;u>a;a++){for(var c=r[a],l=c.names,h={},m=0,f=l.length;f>m;m++)h[l[m]]=i[o++];s.push({handler:c.handler,params:h,isDynamic:!!l.length})}return s}function c(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function l(e,t,r){this.path=e,this.matcher=t,this.delegate=r}function h(e){this.routes={},this.children={},this.target=e}function m(e,t,r){return function(n,i){var o=e+n;return i?(i(m(o,t,r)),void 0):new l(e+n,t,r)}}function f(e,t,r){for(var n=0,i=0,o=e.length;o>i;i++)n+=e[i].path.length;t=t.substr(n),e.push({path:t,handler:r})}function p(e,t,r,n){var i=t.routes;for(var o in i)if(i.hasOwnProperty(o)){var s=e.slice();f(s,o,i[o]),t.children[o]?p(s,t.children[o],r,n):r.call(n,s)}}var d=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],b=new RegExp("(\\"+d.join("|\\")+")","g");e.prototype={eachChar:function(e){for(var t,r=this.string,n=0,i=r.length;i>n;n++)t=r.charAt(n),e({validChars:t})},regex:function(){return this.string.replace(b,"\\$1")},generate:function(){return this.string}},t.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},r.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},n.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},o.prototype={get:function(e){for(var t=this.nextStates,r=0,n=t.length;n>r;r++){var i=t[r],o=i.charSpec.validChars===e.validChars;if(o=o&&i.charSpec.invalidChars===e.invalidChars)return i}},put:function(e){var t;return(t=this.get(e))?t:(t=new o(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,r,n,i=this.nextStates,o=[],s=0,a=i.length;a>s;s++)t=i[s],r=t.charSpec,typeof(n=r.validChars)!="undefined"?n.indexOf(e)!==-1&&o.push(t):typeof(n=r.invalidChars)!="undefined"&&n.indexOf(e)===-1&&o.push(t);return o}};var E=function(){this.rootState=new o,this.names={}};return E.prototype={add:function(e,t){for(var r,o=this.rootState,s="^",a={statics:0,dynamics:0,stars:0},u=[],l=[],h=!0,m=0,f=e.length;f>m;m++){var p=e[m],d=[],b=i(p.path,d,a);l=l.concat(b);for(var E=0,v=b.length;v>E;E++){var g=b[E];g instanceof n||(h=!1,o=o.put({validChars:"/"}),s+="/",o=c(o,g),s+=g.regex())}u.push({handler:p.handler,names:d})}h&&(o=o.put({validChars:"/"}),s+="/"),o.handlers=u,o.regex=new RegExp(s+"$"),o.types=a,(r=t&&t.as)&&(this.names[r]={segments:l,handlers:u})},handlersFor:function(e){var t=this.names[e],r=[];if(!t)throw new Error("There is no route named "+e);for(var n=0,i=t.handlers.length;i>n;n++)r.push(t.handlers[n]);return r},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var r=this.names[e],i="";if(!r)throw new Error("There is no route named "+e);for(var o=r.segments,s=0,a=o.length;a>s;s++){var u=o[s];u instanceof n||(i+="/",i+=u.generate(t))}return i.charAt(0)!=="/"&&(i="/"+i),i},recognize:function(e){var t,r,n,i=[this.rootState];for(e.charAt(0)!=="/"&&(e="/"+e),t=e.length,t>1&&e.charAt(t-1)==="/"&&(e=e.substr(0,t-1)),r=0,n=e.length;n>r&&(i=a(i,e.charAt(r)),i.length);r++);var o=[];for(r=0,n=i.length;n>r;r++)i[r].handlers&&o.push(i[r]);i=s(o);var c=o[0];return c&&c.handlers?u(c,e):void 0}},l.prototype={to:function(e,t){var r=this.delegate;if(r&&r.willAddRoute&&(e=r.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e),t){if(t.length===0)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,e,t,this.delegate)}}},h.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,r,n){var i=new h(t);this.children[e]=i;var o=m(e,i,n);n&&n.contextEntered&&n.contextEntered(t,o),r(o)}},E.prototype.map=function(e,t){var r=new h;e(m("",r,this.delegate)),p([],r,function(e){t?t(this,e):this.add(e)},this)},E})}(),function(){e("router",["route-recognizer"],function(e){"use strict";function t(){this.recognizer=new e}function r(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function n(e){if(!e.isLoading){e.isLoading=!0;var t=e.getHandler("loading");t&&(t.enter&&t.enter(),t.setup&&t.setup())}}function i(e){e.isLoading=!1;var t=e.getHandler("loading");t&&t.exit&&t.exit()}function o(e,t){i(e);var r=e.getHandler("failure");r&&(r.enter&&r.enter(),r.setup&&r.setup(t))}function s(e,t,r,n){var i=e._paramsForHandler(t,n,!0),o=i.params,s=i.toSetup,a=e.recognizer.generate(t,o);r.call(e,a),u(e,s)}function a(e,t,r,s){function c(n){d.context!==b&&m(d,b);var i=s.concat([{context:n,name:p.handler,handler:e.getHandler(p.handler),isDynamic:p.isDynamic}]);a(e,t,r+1,i)}if(t.length===r){var l=s[s.length-1],h=l&&l.handler;if(!h||!h.additionalHandler)return i(e),u(e,s),void 0;var f={handler:h.additionalHandler(),params:{},isDynamic:!1};t.push(f)}var p=t[r],d=e.getHandler(p.handler),b=d.deserialize&&d.deserialize(p.params);b&&typeof b.then=="function"?(n(e),b.then(c).then(null,function(t){o(e,t)})):c(b)}function u(e,t){var r=l(e.currentHandlerInfos||[],t);e.targetHandlerInfos=t,c(r.exited,function(e){delete e.context,e.exit&&e.exit()});var n=r.unchanged.slice();e.currentHandlerInfos=n,c(r.updatedContext,function(e,t,r){m(e,t),e.setup&&e.setup(t),n.push(r)});var i=!1;c(r.entered,function(e,t,r){i||(e.enter&&e.enter(),m(e,t),e.setup&&!1===e.setup(t)&&(i=!0),i||n.push(r))}),!i&&e.didTransition&&e.didTransition(t)}function c(e,t){for(var r=0,n=e.length;n>r;r++){var i=e[r],o=i.handler,s=i.context;t(o,s,i)}}function l(e,t){var r,n,i,o,s={updatedContext:[],exited:[],entered:[],unchanged:[]};for(i=0,o=t.length;o>i;i++){var a=e[i],u=t[i];a&&a.handler===u.handler||(r=!0),r?(s.entered.push(u),a&&s.exited.unshift(a)):n||a.context!==u.context?(n=!0,s.updatedContext.push(u)):s.unchanged.push(a)}for(i=t.length,o=e.length;o>i;i++)s.exited.unshift(e[i]);return s}function h(e,t){var r=e.currentHandlerInfos,n=t.shift();if(!r)throw new Error("Could not trigger event '"+n+"'. There are no active handlers");for(var i=!1,o=r.length-1;o>=0;o--){var s=r[o],a=s.handler;if(a.events&&a.events[n]){if(a.events[n].apply(a,t)!==!0)return;i=!0}}if(!i)throw new Error("Nothing handled the event '"+n+"'.")}function m(e,t){e.context=t,e.contextDidChange&&e.contextDidChange()}return t.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){var r=t[t.length-1].handler,n=[t,{as:r}];e.add.apply(e,n)})},hasRoute:function(e){return this.recognizer.hasRoute(e)},handleURL:function(e){var t=this.recognizer.recognize(e);if(!t)throw new Error("No route matched the URL '"+e+"'");a(this,t,0,[])},updateURL:function(){throw"updateURL is not implemented"},replaceURL:function(e){this.updateURL(e)},transitionTo:function(e){var t=Array.prototype.slice.call(arguments,1);s(this,e,this.updateURL,t)},replaceWith:function(e){var t=Array.prototype.slice.call(arguments,1);s(this,e,this.replaceURL,t)},paramsForHandler:function(e){var t=this._paramsForHandler(e,[].slice.call(arguments,1));return t.params},generate:function(e){var t=this.paramsForHandler.apply(this,arguments);return this.recognizer.generate(e,t)},_paramsForHandler:function(e,t,n){var i,o,s,a,u,c,l=this.recognizer.handlersFor(e),h={},f=[],p=l.length,d=t.length;for(c=l.length-1;c>=0&&d>0;c--)l[c].names.length&&(d--,p=c);if(d>0)throw"More context objects were passed than there are dynamic segments for the route: "+e;for(c=0;c<l.length;c++)if(s=l[c],a=this.getHandler(s.handler),u=s.names,o=!1,u.length?(c>=p?(i=t.shift(),o=!0):i=a.context,a.serialize&&r(h,a.serialize(i,u))):n&&(c>p||!a.hasOwnProperty("context")?a.deserialize&&(i=a.deserialize({}),o=!0):i=a.context),n&&o&&m(a,i),f.push({isDynamic:!!s.names.length,name:s.handler,handler:a,context:i}),c===l.length-1){var b,E=f[f.length-1];(b=E.handler.additionalHandler)&&l.push({handler:b.call(E.handler),names:[]})}return{params:h,toSetup:f}},isActive:function(e){var t,r,n=[].slice.call(arguments,1),i=this.targetHandlerInfos,o=!1;if(i){for(var s=i.length-1;s>=0;s--)if(r=i[s],r.name===e&&(o=!0),o){if(n.length===0)break;if(r.isDynamic&&(t=n.pop(),r.context!==t))return!1}return n.length===0&&o}},trigger:function(){var e=[].slice.call(arguments);h(this,e)}},t})}(),function(){function e(e){this.parent=e,this.matches=[]}e.prototype={resource:function(t,r,n){if(arguments.length===2&&"function"==typeof r&&(n=r,r={}),arguments.length===1&&(r={}),typeof r.path!="string"&&(r.path="/"+t),n){var i=new e(t);n.call(i),this.push(r.path,t,i.generate())}else this.push(r.path,t)},push:function(e,t,r){var n=t.split(".");(""===e||"/"===e||n[n.length-1]==="index")&&(this.explicitIndex=!0),this.matches.push([e,t,r])},route:function(e,t){t=t||{},typeof t.path!="string"&&(t.path="/"+e),this.parent&&this.parent!=="application"&&(e=this.parent+"."+e),this.push(t.path,e)},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var r=0,n=e.length;n>r;r++){var i=e[r];t(i[0]).to(i[1],i[2])}}}},e.map=function(t){var r=new e;return t.call(r),r},Ember.RouterDSL=e}(),function(){Ember.controllerFor=function(e,t,r,n){return e.lookup("controller:"+t,n)||Ember.generateController(e,t,r)},Ember.generateController=function(e,t,r){var n,i,o;return r&&Ember.isArray(r)?(i=e.resolve("controller:array"),n=i.extend({content:r})):r?(i=e.resolve("controller:object"),n=i.extend({content:r})):(i=e.resolve("controller:basic"),n=i.extend()),n.toString=function(){return"(generated "+t+" controller)"},o="controller:"+t,e.register(o,n),e.lookup(o)}}(),function(){function e(e){var t=a(e,"location"),r=a(e,"rootURL"),n={};"string"==typeof r&&(n.rootURL=r),"string"==typeof t&&(n.implementation=t,t=u(e,"location",Ember.Location.create(n)))}function r(e){var t={},r=e.container,n=r.resolve("route:basic");return function(i){var o="route:"+i,s=r.lookup(o);if(t[i])return s;if(t[i]=!0,!s){if("loading"===i)return{};if("failure"===i)return e.constructor.defaultFailureHandler;r.register(o,n.extend()),s=r.lookup(o)}return"application"===i&&(s.events=s.events||{},s.events.routeTo=s.events.routeTo||Ember.TransitionEvent.defaultHandler),s.routeName=i,s}}function n(e){for(var t=[],r=1,n=e.length;n>r;r++){var i=e[r].name,o=i.split(".");t.push(o[o.length-1])}return t.join(".")}function i(e,t,n){var i;t.getHandler=r(e);var o=function(){n.setURL(i)};if(t.updateURL=function(e){i=e,Ember.run.once(o)},n.replaceURL){var s=function(){n.replaceURL(i)};t.replaceURL=function(e){i=e,Ember.run.once(s)}}t.didTransition=function(t){e.didTransition(t)}}function o(e,t,r){var n,i=r[0];n=e.router.hasRoute(r[0])?i:r[0]=i+".index",e.router[t].apply(e.router,r),e.notifyPropertyChange("url")}var s=t("router"),a=Ember.get,u=Ember.set,c=Ember._MetamorphView;Ember.Router=Ember.Object.extend({location:"hash",init:function(){this.router=this.constructor.router,this._activeViews={},e(this)},url:Ember.computed(function(){return a(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=a(this,"location"),r=this.container,n=this;i(this,e,t),r.register("view:default",c),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){n.handleURL(e)}),this.handleURL(t.getURL())},didTransition:function(e){var t=this.container.lookup("controller:application"),r=n(e);u(t,"currentPath",r),this.notifyPropertyChange("url"),a(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+r+"'")},handleURL:function(e){this.router.handleURL(e),this.notifyPropertyChange("url")},routeTo:function(e){var t=this.router.currentHandlerInfos;t&&(e.sourceRoute=t[t.length-1].handler),this.send("routeTo",e)},transitionTo:function(){var e=[].slice.call(arguments);o(this,"transitionTo",e)},replaceWith:function(){var e=[].slice.call(arguments);o(this,"replaceWith",e)},generate:function(){var e=this.router.generate.apply(this.router,arguments);return this.location.formatURL(e)},isActive:function(){var e=this.router;return e.isActive.apply(e,arguments)},send:function(){this.router.trigger.apply(this.router,arguments)},hasRoute:function(e){return this.router.hasRoute(e)},_lookupActiveView:function(e){var t=this._activeViews[e];return t&&t[0]},_connectActiveView:function(e,t){var r=this._activeViews[e];r&&r[0].off("willDestroyElement",this,r[1]);var n=function(){delete this._activeViews[e]};this._activeViews[e]=[t,n],t.one("willDestroyElement",this,n)}}),Ember.Router.reopenClass({defaultFailureHandler:{setup:function(e){Ember.Logger.error("Error while loading route:",e),setTimeout(function(){throw e})}}}),Ember.Router.reopenClass({map:function(e){var t=this.router=new s,r=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){e.call(this)})});return t.map(r.generate()),t}})}(),function(){function e(e){for(var t,r,n=e.router.router.targetHandlerInfos,i=0,o=n.length;o>i;i++){if(r=n[i].handler,r===e)return t;t=r}}function t(r){var n,i=e(r);if(i)return(n=i.lastRenderedTemplate)?n:t(i,!0)}function r(e,r,n,i){i=i||{},i.into=i.into?i.into.replace(/\//g,"."):t(e),i.outlet=i.outlet||"main",i.name=r,i.template=n;var o,s=i.controller;return s=i.controller?i.controller:(o=e.container.lookup("controller:"+r))?o:e.routeName,"string"==typeof s&&(s=e.container.lookup("controller:"+s)),i.controller=s,i}function n(e,t,r){var n=r.into?"view:default":"view:toplevel";return e=e||t.lookup(n),u(e,"templateName")||(c(e,"template",r.template),c(e,"_debugTemplateName",r.name)),c(e,"renderedName",r.name),c(e,"controller",r.controller),e}function i(e,t,r){if(r.into){var n=e.router._lookupActiveView(r.into);e.teardownView=s(n,r.outlet),n.connectOutlet(r.outlet,t)}else{var i=u(e,"router.namespace.rootElement");e.teardownView&&e.teardownView(),e.router._connectActiveView(r.name,t),e.teardownView=o(t),t.appendTo(i)}}function o(e){return function(){e.destroy()}}function s(e,t){return function(){e.disconnectOutlet(t)}}function a(e){e.teardownView&&e.teardownView(),delete e.teardownView,delete e.lastRenderedTemplate}var u=Ember.get,c=Ember.set,l=Ember.String.classify;Ember.String.fmt,Ember.Route=Ember.Object.extend({exit:function(){this.deactivate(),a(this)},enter:function(){this.activate()},events:null,deactivate:Ember.K,activate:Ember.K,routeTo:function(e){this.router.routeTo(e)},transitionTo:function(){var e=this.router;if(!e.isActive.apply(e,arguments))return this._checkingRedirect&&(this._redirected[this._redirectDepth]=!0),e.transitionTo.apply(e,arguments)},replaceWith:function(){var e=this.router;if(!e.isActive.apply(e,arguments))return this._checkingRedirect&&(this._redirected[this._redirectDepth]=!0),this.router.replaceWith.apply(this.router,arguments)},send:function(){return this.router.send.apply(this.router,arguments)},_redirectDepth:0,setup:function(e){var t;this._redirected||(t=!0,this._redirected=[]),this._checkingRedirect=!0;var r=++this._redirectDepth;void 0===e?this.redirect():this.redirect(e),this._redirectDepth--,this._checkingRedirect=!1;var n=this._redirected;if(t&&(this._redirected=null),n[r])return!1;var i=this.controllerFor(this.routeName,e);i&&(this.controller=i,c(i,"model",e)),this.setupControllers?this.setupControllers(i,e):this.setupController(i,e),this.renderTemplates?this.renderTemplates(e):this.renderTemplate(i,e)},redirect:Ember.K,deserialize:function(e){var t=this.model(e);return this.currentModel=t},contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,r,n,i;for(var o in e)(t=o.match(/^(.*)_id$/))&&(r=t[1],i=e[o]),n=!0;if(!r&&n)return e;if(r){var s=l(r),a=this.router.namespace,u=a[s];return u.find(i)}},serialize:function(e,t){if(t.length===1){var r=t[0],n={};return n[r]=/_id$/.test(r)?u(e,"id"):e,n}},setupController:Ember.K,controllerFor:function(e,t){var r=this.router.container,n=r.lookup("controller:"+e);return n||(t=t||this.modelFor(e),n=Ember.generateController(r,e,t)),n},modelFor:function(e){var t=this.container.lookup("route:"+e);return t&&t.currentModel},renderTemplate:function(){this.render()},render:function(e,t){"object"!=typeof e||t||(t=e,e=this.routeName),e=e?e.replace(/\//g,"."):this.routeName;var o=this.container,s=o.lookup("view:"+e),a=o.lookup("template:"+e);(s||a)&&(t=r(this,e,a,t),s=n(s,o,t),t.outlet==="main"&&(this.lastRenderedTemplate=e),i(this,s,t))},willDestroy:function(){a(this)}})}(),function(){Ember.TransitionEvent=Ember.Object.extend({transitionMethod:"transitionTo",destinationRouteName:null,sourceRoute:null,contexts:null,init:function(){this._super(),this.contexts=this.contexts||[]},transitionToArgs:function(){return[this.destinationRouteName].concat(this.contexts)}}),Ember.TransitionEvent.reopenClass({defaultHandler:function(e){var t=this.router;t[e.transitionMethod].apply(t,e.transitionToArgs())}})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,i,o){function s(e,t){return i[t]==="controller"?e:Ember.ControllerMixin.detect(e)?s(n(e,"model")):e}var a=t(e,i,o);return r.call(a,s)}var t=Ember.Handlebars.resolveParams,r=Ember.ArrayPolyfills.map,n=Ember.get;Ember.Router.resolveParams=e})}(),function(){var e=Ember.get;Ember.set,Ember.String.fmt,Ember.onLoad("Ember.Handlebars",function(){function t(e,t){return e.hasRoute(t)||(t+=".index"),t}function r(e){var t=e.options.types.slice(1),r=e.options.data;return i(e.context,e.params,{types:t,data:r})}function n(e,n,i){var o,s=i||e.namedRoute;o=t(n,s);var a=[o];return a.concat(r(e.parameters))}var i=Ember.Router.resolveParams,o=Ember.ViewUtils.isSimpleClick,s=Ember.LinkView=Ember.View.extend({tagName:"a",namedRoute:null,currentWhen:null,title:null,activeClass:"active",disabledClass:"disabled",_isDisabled:!1,replace:!1,attributeBindings:["href","title"],classNameBindings:["active","disabled"],concreteView:Ember.computed(function(){return e(this,"parentView")}).property("parentView"),disabled:Ember.computed(function(e,t){return void 0!==t&&this.set("_isDisabled",t),t?this.get("disabledClass"):!1}),active:Ember.computed(function(){var t=this.get("router"),n=r(this.parameters),i=this.currentWhen+".index",o=t.isActive.apply(t,[this.currentWhen].concat(n))||t.isActive.apply(t,[i].concat(n));return o?e(this,"activeClass"):void 0}).property("namedRoute","router.url"),router:Ember.computed(function(){return this.get("controller").container.lookup("router:main")}),click:function(t){if(!o(t))return!0;if(t.preventDefault(),this.bubbles===!1&&t.stopPropagation(),e(this,"_isDisabled"))return!1;var r=this.get("router");if(Ember.ENV.ENABLE_ROUTE_TO){var i=n(this,r);r.routeTo(Ember.TransitionEvent.create({transitionMethod:this.get("replace")?"replaceWith":"transitionTo",destinationRouteName:i[0],contexts:i.slice(1)}))}else this.get("replace")?r.replaceWith.apply(r,n(this,r)):r.transitionTo.apply(r,n(this,r))},href:Ember.computed(function(){if(this.get("tagName")!=="a")return!1;var e=this.get("router");return e.generate.apply(e,n(this,e))})});s.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("linkTo",function(e){var t=[].slice.call(arguments,-1)[0],r=[].slice.call(arguments,1,-1),n=t.hash;return n.namedRoute=e,n.currentWhen=n.currentWhen||e,n.disabledBinding=n.disabledWhen,n.parameters={context:this,options:t,params:r},Ember.Handlebars.helpers.view.call(this,s,t)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,r){var n;for(t&&t.data&&t.data.isRenderData&&(r=t,t="main"),n=r.data.view;!n.get("template.isTop");)n=n.get("_parentView");return r.data.view.set("outletSource",n),r.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,e.OutletView,r)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,r){var n,i,o,s,a,u;arguments.length===2&&(r=t,t=void 0),"string"==typeof t&&(a=Ember.Handlebars.get(r.contexts[1],t,r),u={singleton:!1}),e=e.replace(/\//g,"."),n=r.data.keywords.controller.container,i=n.lookup("router:main"),s=n.lookup("view:"+e)||n.lookup("view:default"),o=(o=r.hash.controller)?n.lookup("controller:"+o,u):Ember.controllerFor(n,e,a,u),o&&a&&o.set("model",a);var c=r.contexts[1];c&&s.registerObserver(c,t,function(){o.set("model",Ember.Handlebars.get(c,t,r))}),o.set("target",r.data.keywords.controller),r.hash.viewName=Ember.String.camelize(e),r.hash.template=n.lookup("template:"+e),r.hash.controller=o,i&&!a&&i._connectActiveView(e,s),Ember.Handlebars.helpers.view.call(this,s,r)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r){var n=[];r&&n.push(r);var i=e.options.types.slice(1),o=e.options.data;return n.concat(t(e.context,e.params,{types:i,data:o}))}var t=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,n=Ember.Handlebars,i=n.get,o=n.SafeString,s=Ember.ArrayPolyfills.forEach,a=(Ember.get,Array.prototype.slice),u=n.ActionHelper={registeredActions:{}},c=["alt","shift","meta","ctrl"],l=function(e,t){if("undefined"==typeof t)return r(e);var n=!0;return s.call(c,function(r){e[r+"Key"]&&t.indexOf(r)===-1&&(n=!1)}),n};u.registerAction=function(t,r,n){var o=(++Ember.uuid).toString();return u.registeredActions[o]={eventName:r.eventName,handler:function(o){if(!l(o,n))return!0;o.preventDefault(),r.bubbles===!1&&o.stopPropagation();var s=r.target;s=s.target?i(s.root,s.target,s.options):s.root,Ember.run(function(){s.send?s.send.apply(s,e(r.parameters,t)):s[t].apply(s,e(r.parameters))})}},r.view.on("willClearRender",function(){delete u.registeredActions[o]}),o},n.registerHelper("action",function(e){var t,r=arguments[arguments.length-1],n=a.call(arguments,1,-1),i=r.hash,s={eventName:i.on||"click"};s.parameters={context:this,options:r,params:n},s.view=r.data.view;var c,l;i.target?(c=this,l=i.target):(t=r.data.keywords.controller)&&(c=t),s.target={root:c,target:l,options:r},s.bubbles=i.bubbles;var h=u.registerAction(e,s,i.allowedKeys);return new o('data-ember-action="'+h+'"')})})}(),function(){if(Ember.ENV.EXPERIMENTAL_CONTROL_HELPER){var e=Ember.get,t=Ember.set;Ember.Handlebars.registerHelper("control",function(r,n,i){function o(){var e=Ember.Handlebars.get(this,n,i);t(p,"model",e),f.rerender()}arguments.length===2&&(i=n,n=void 0);var s;n&&(s=Ember.Handlebars.get(this,n,i));var a,u,c=i.data.keywords.controller,l=(i.data.keywords.view,e(c,"_childContainers")),h=i.hash.controlID;l.hasOwnProperty(h)?u=l[h]:(a=e(c,"container"),u=a.child(),l[h]=u);var m=r.replace(/\//g,"."),f=u.lookup("view:"+m)||u.lookup("view:default"),p=u.lookup("controller:"+m),d=u.lookup("template:"+r);t(p,"target",c),t(p,"model",s),i.hash.template=d,i.hash.controller=p,Ember.addObserver(this,n,o),f.one("willDestroyElement",this,function(){Ember.removeObserver(this,n,o)}),Ember.Handlebars.helpers.view.call(this,f,i)})}}(),function(){var e=Ember.get;Ember.set,Ember.ControllerMixin.reopen({transitionToRoute:function(){var t=e(this,"target"),r=t.transitionToRoute||t.transitionTo;return r.apply(t,arguments)},transitionTo:function(){return this.transitionToRoute.apply(this,arguments)},replaceRoute:function(){var t=e(this,"target"),r=t.replaceRoute||t.replaceWith;return r.apply(t,arguments)},replaceWith:function(){return this.replaceRoute.apply(this,arguments)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.View.reopen({init:function(){t(this,"_outlets",{}),this._super()},connectOutlet:function(r,n){if(this._pendingDisconnections&&delete this._pendingDisconnections[r],!this._hasEquivalentView(r,n)){var i=e(this,"_outlets"),o=e(this,"container"),s=o&&o.lookup("router:main"),a=e(n,"renderedName");t(i,r,n),s&&a&&s._connectActiveView(a,n)}},_hasEquivalentView:function(t,r){var n=e(this,"_outlets."+t);return n&&n.prototype===r.prototype&&n.get("template")===r.get("template")&&n.get("context")===r.get("context")},disconnectOutlet:function(e){this._pendingDisconnections||(this._pendingDisconnections={}),this._pendingDisconnections[e]=!0,Ember.run.once(this,"_finishDisconnections")},_finishDisconnections:function(){var r=e(this,"_outlets"),n=this._pendingDisconnections;this._pendingDisconnections=null;for(var i in n)t(r,i,null)}})}(),function(){Ember.get,Ember.set,Ember.Location={create:function(e){var t=e&&e.implementation,r=this.implementations[t];return r.create.apply(r,arguments)},registerImplementation:function(e,t){this.implementations[e]=t},implementations:{}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({path:"",getURL:function(){return e(this,"path")},setURL:function(e){t(this,"path",e)},onUpdateURL:function(e){this.updateCallback=e},handleURL:function(e){t(this,"path",e),this.updateCallback(e)},formatURL:function(e){return e}}),Ember.Location.registerImplementation("none",Ember.NoneLocation)}(),function(){var e=Ember.get,t=Ember.set;Ember.HashLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return e(this,"location").hash.substr(1)},setURL:function(r){e(this,"location").hash=r,t(this,"lastSetURL",r)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=location.hash.substr(1);e(n,"lastSetURL")!==i&&(t(n,"lastSetURL",null),r(i))})})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("hashchange.ember-location-"+e)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var e=Ember.get,t=Ember.set,r=!1;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location),this.initState()},initState:function(){t(this,"history",e(this,"history")||window.history),this.replaceState(this.formatURL(this.getURL()))},rootURL:"/",getURL:function(){var t=e(this,"rootURL"),r=e(this,"location").pathname;return t=t.replace(/\/$/,""),r=r.replace(t,"")},setURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&this.pushState(e)},replaceURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&this.replaceState(e)},getState:function(){return e(this,"history").state},pushState:function(t){e(this,"history").pushState({path:t},null,t),this._previousURL=this.getURL()},replaceState:function(t){e(this,"history").replaceState({path:t},null,t),this._previousURL=this.getURL()},onUpdateURL:function(e){var t=Ember.guidFor(this),n=this;Ember.$(window).on("popstate.ember-location-"+t,function(){(r||(r=!0,n.getURL()!==n._previousURL))&&e(n.getURL())})},formatURL:function(t){var r=e(this,"rootURL");return""!==t&&(r=r.replace(/\/$/,"")),r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){function e(t,r,n,i){var o,s=t.name,a=t.incoming,u=t.incomingNames,c=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(s)){for(i.push(s),n[s]=!0,o=0;c>o;o++)e(a[u[o]],r,n,i);r(t,i),i.pop()}}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(e){if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t}},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,r){function n(e,t){if(e.name===r)throw new Error("cycle detected: "+r+" <- "+t.join(" <- "))}if(t&&r&&t!==r){var i=this.add(t),o=this.add(r);o.incoming.hasOwnProperty(t)||(e(i,n),i.hasOutgoing=!0,o.incoming[t]=i,o.incomingNames.push(t))}},t.prototype.topsort=function(t){var r,n,i={},o=this.vertices,s=this.names,a=s.length;for(r=0;a>r;r++)n=o[s[r]],n.hasOutgoing||e(n,t,i)},t.prototype.addEdges=function(e,t,r,n){var i;if(this.map(e,t),r)if("string"==typeof r)this.addEdge(e,r);else for(i=0;i<r.length;i++)this.addEdge(e,r[i]);if(n)if("string"==typeof n)this.addEdge(n,e);else for(i=0;i<n.length;i++)this.addEdge(n[i],e)},Ember.DAG=t}(),function(){var e=Ember.get,t=Ember.String.classify,r=Ember.String.capitalize,n=Ember.String.decamelize;Ember.DefaultResolver=Ember.Object.extend({namespace:null,resolve:function(e){var t=this.parseName(e),r=this[t.resolveMethodName];if(r){var n=r.call(this,t);if(n)return n}return this.resolveOther(t)},parseName:function(n){var i=n.split(":"),o=i[0],s=i[1],a=s,u=e(this,"namespace"),c=u;if("template"!==o&&a.indexOf("/")!==-1){var l=a.split("/");a=l[l.length-1];var h=r(l.slice(0,-1).join("."));c=Ember.Namespace.byName(h)}return{fullName:n,type:o,fullNameWithoutType:s,name:a,root:c,resolveMethodName:"resolve"+t(o)}},resolveTemplate:function(e){var t=e.fullNameWithoutType.replace(/\./g,"/");return Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:(t=n(t),Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:void 0)},useRouterNaming:function(e){e.name=e.name.replace(/\./g,"_"),e.name==="basic"&&(e.name="")},resolveController:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveRoute:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveView:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveOther:function(r){var n=t(r.name)+t(r.type),i=e(r.root,n);return i?i:void 0}})}(),function(){function e(e){this._container=e}function t(e){var t=e.get("resolver")||Ember.DefaultResolver,r=t.create({namespace:e});return function(e){return r.resolve(e)}}function r(e){var t=e.split(":"),r=t[0],n=t[1];if("template"!==r){var i=n;return i.indexOf(".")>-1&&(i=i.replace(/\.(.)/g,function(e){return e.charAt(1).toUpperCase()})),n.indexOf("_")>-1&&(i=i.replace(/_(.)/g,function(e){return e.charAt(1).toUpperCase()})),r+":"+i}return e}var n=Ember.get,i=Ember.set;e.deprecate=function(e){return function(){var t=this._container;return t[e].apply(t,arguments)}},e.prototype={_container:null,lookup:e.deprecate("lookup"),resolve:e.deprecate("resolve"),register:e.deprecate("register")};var o=Ember.Application=Ember.Namespace.extend(Ember.DeferredMixin,{rootElement:"body",eventDispatcher:null,customEvents:null,_readinessDeferrals:1,init:function(){this.$||(this.$=Ember.$),this.__container__=this.buildContainer(),this.Router=this.Router||this.defaultRouter(),this.Router&&(this.Router.namespace=this),this._super(),this.scheduleInitialize(),Ember.LOG_VERSION&&(Ember.LOG_VERSION=!1)
21
- },buildContainer:function(){var e=this.__container__=o.buildContainer(this);return e},defaultRouter:function(){return this.router===void 0?Ember.Router.extend():void 0},scheduleInitialize:function(){var e=this;!this.$||this.$.isReady?Ember.run.schedule("actions",e,"_initialize"):this.$().ready(function(){Ember.run(e,"_initialize")})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,this._readinessDeferrals===0&&Ember.run.once(this,this.didBecomeReady)},register:function(){var e=this.__container__;e.register.apply(e,arguments)},inject:function(){var e=this.__container__;e.injection.apply(e,arguments)},initialize:function(){},_initialize:function(){return this.isDestroyed?void 0:(this.register("router:main",this.Router),this.runInitializers(),Ember.runLoadHooks("application",this),this.advanceReadiness(),this)},reset:function(){function e(){Ember.run(this.__container__,"destroy"),this.buildContainer(),this._readinessDeferrals=1,Ember.run.schedule("actions",this,function(){this._initialize(),this.startRouting()})}Ember.run.currentRunLoop?e.call(this):Ember.run(this,e)},runInitializers:function(){var e,t,r=n(this.constructor,"initializers"),i=this.__container__,o=new Ember.DAG,s=this;for(e=0;e<r.length;e++)t=r[e],o.addEdges(t.name,t.initialize,t.before,t.after);o.topsort(function(e){var t=e.value;t(i,s)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=n(this,"customEvents"),t=n(this,"rootElement"),r=this.__container__.lookup("event_dispatcher:main");i(this,"eventDispatcher",r),r.setup(e,t)},startRouting:function(){var e=this.__container__.lookup("router:main");e&&e.startRouting()},handleURL:function(e){var t=this.__container__.lookup("router:main");t.handleURL(e)},ready:Ember.K,resolver:null,willDestroy:function(){Ember.BOOTED=!1,this.__container__.destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({concatenatedProperties:["initializers"],initializers:Ember.A(),initializer:function(e){var t=n(this,"initializers");t.push(e)},buildContainer:function(n){var i=new Ember.Container;return Ember.Container.defaultContainer=new e(i),i.set=Ember.set,i.normalize=r,i.resolver=t(n),i.optionsForType("view",{singleton:!1}),i.optionsForType("template",{instantiate:!1}),i.register("application:main",n,{instantiate:!1}),i.register("controller:basic",Ember.Controller,{instantiate:!1}),i.register("controller:object",Ember.ObjectController,{instantiate:!1}),i.register("controller:array",Ember.ArrayController,{instantiate:!1}),i.register("route:basic",Ember.Route,{instantiate:!1}),i.register("event_dispatcher:main",Ember.EventDispatcher),i.injection("router:main","namespace","application:main"),i.injection("controller","target","router:main"),i.injection("controller","namespace","application:main"),i.injection("route","router","router:main"),i}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){function e(e){for(var r,n=t(e,"needs"),i=t(e,"container"),o=!0,s=0,a=n.length;a>s;s++)r=n[s],r.indexOf(":")===-1&&(r="controller:"+r),i.has(r)||(o=!1);return o}var t=Ember.get;Ember.set;var r=Ember.Object.extend({controller:null,unknownProperty:function(e){for(var r,n=t(this,"controller"),i=t(n,"needs"),o=n.get("container"),s=0,a=i.length;a>s;s++)if(r=i[s],r===e)return o.lookup("controller:"+e)}});Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){this._super.apply(this,arguments),!e(this)},controllerFor:function(e){var r=t(this,"container");return r.lookup("controller:"+e)},controllers:Ember.computed(function(){return r.create({controller:this})})})}(),function(){var e=Ember.get,t=Ember.set;Ember.State=Ember.Object.extend(Ember.Evented,{isState:!0,parentState:null,start:null,name:null,path:Ember.computed(function(){var t=e(this,"parentState.path"),r=e(this,"name");return t&&(r=t+"."+r),r}),trigger:function(e){this[e]&&this[e].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var r=e(this,"states");t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var n,i,o;if(r)for(n in r)this.setupChild(r,n,r[n]);else{r={};for(n in this)"constructor"!==n&&(i=this[n])&&((o=i.transitionTarget)&&(this.eventTransitions[n]=o),this.setupChild(r,n,i));t(this,"states",r)}t(this,"pathsCaches",{})},setPathsCache:function(t,r,n){var i=Ember.guidFor(t.constructor),o=e(this,"pathsCaches"),s=o[i]||{};s[r]=n,o[i]=s},getPathsCache:function(t,r){var n=Ember.guidFor(t.constructor),i=e(this,"pathsCaches"),o=i[n]||{};return o[r]},setupChild:function(r,n,i){return i?(i.isState?t(i,"name",n):Ember.State.detect(i)&&(i=i.create({name:n})),i.isState?(t(i,"parentState",this),e(this,"childStates").pushObject(i),r[n]=i,i):void 0):!1},lookupEventTransition:function(e){for(var t,r=this;r&&!t;)t=r.eventTransitions[e],r=r.get("parentState");return t},isLeaf:Ember.computed(function(){return!e(this,"childStates").length}),hasContext:!0,setup:Ember.K,enter:Ember.K,exit:Ember.K}),Ember.State.reopenClass({transitionTo:function(e){var t=function(t,r){var n=[],i=Ember.$&&Ember.$.Event;r&&i&&r instanceof i?r.hasOwnProperty("contexts")&&(n=r.contexts.slice()):n=[].slice.call(arguments,1),n.unshift(e),t.transitionTo.apply(t,n)};return t.transitionTarget=e,t}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.String.fmt,n=Ember.ArrayPolyfills.forEach,i=function(e){this.enterStates=e.enterStates.slice(),this.exitStates=e.exitStates.slice(),this.resolveState=e.resolveState,this.finalState=e.enterStates[e.enterStates.length-1]||e.resolveState};i.prototype={normalize:function(e,t){return this.matchContextsToStates(t),this.addInitialStates(),this.removeUnchangedContexts(e),this},matchContextsToStates:function(t){for(var r,n,i=this.enterStates.length-1,o=[];t.length>0;){if(i>=0)r=this.enterStates[i--];else{if(this.enterStates.length){if(r=e(this.enterStates[0],"parentState"),!r)throw"Cannot match all contexts to states"}else r=this.resolveState;this.enterStates.unshift(r),this.exitStates.unshift(r)}n=e(r,"hasContext")?t.pop():null,o.unshift(n)}this.contexts=o},addInitialStates:function(){for(var t,r=this.finalState;;){if(t=e(r,"initialState")||"start",r=e(r,"states."+t),!r)break;this.finalState=r,this.enterStates.push(r),this.contexts.push(void 0)}},removeUnchangedContexts:function(e){for(;this.enterStates.length>0&&this.enterStates[0]===this.exitStates[0];){if(this.enterStates.length===this.contexts.length){if(e.getStateMeta(this.enterStates[0],"context")!==this.contexts[0])break;this.contexts.shift()}this.resolveState=this.enterStates.shift(),this.exitStates.shift()}}};var o=function(t,n,i){var a,u,c,l=this.enableLogging,h=i?"unhandledEvent":t,m=n[h];if(a=[].slice.call(arguments,3),"function"==typeof m)return l&&(i?Ember.Logger.log(r("STATEMANAGER: Unhandled event '%@' being sent to state %@.",[t,e(n,"path")])):Ember.Logger.log(r("STATEMANAGER: Sending event '%@' to state %@.",[t,e(n,"path")]))),c=a,i&&c.unshift(t),c.unshift(this),m.apply(n,c);var f=e(n,"parentState");return f?(u=a,u.unshift(t,f,i),o.apply(this,u)):i?void 0:s.call(this,t,a,!0)},s=function(t,r,n){return r.unshift(t,e(this,"currentState"),n),o.apply(this,r)};Ember.StateManager=Ember.State.extend({init:function(){this._super(),t(this,"stateMeta",Ember.Map.create());var r=e(this,"initialState");!r&&e(this,"states.start")&&(r="start"),r&&this.transitionTo(r)},stateMetaFor:function(t){var r=e(this,"stateMeta"),n=r.get(t);return n||(n={},r.set(t,n)),n},setStateMeta:function(e,r,n){return t(this.stateMetaFor(e),r,n)},getStateMeta:function(t,r){return e(this.stateMetaFor(t),r)},currentState:null,currentPath:Ember.computed.alias("currentState.path"),transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(e){var t=[].slice.call(arguments,1);return s.call(this,e,t,!1)},unhandledEvent:function(t,r){if(e(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+r+" in state "+e(this,"currentState.path")+".")},getStateByPath:function(t,r){for(var n=r.split("."),i=t,o=0,s=n.length;s>o&&(i=e(e(i,"states"),n[o]),i);o++);return i},findStateByPath:function(t,r){for(var n;!n&&t;)n=this.getStateByPath(t,r),t=e(t,"parentState");return n},getStatesInPath:function(t,r){if(!r||""===r)return void 0;for(var n,i,o=r.split("."),s=[],a=0,u=o.length;u>a;a++){if(n=e(t,"states"),!n)return void 0;if(i=e(n,o[a]),!i)return void 0;t=i,s.push(i)}return s},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(t,r){if(!Ember.isEmpty(t)){var n=r?Array.prototype.slice.call(arguments,1):[],o=e(this,"currentState")||this,s=this.contextFreeTransition(o,t),a=new i(s).normalize(this,n);this.enterState(a),this.triggerSetupContext(a)}},contextFreeTransition:function(t,r){var n=t.getPathsCache(this,r);if(n)return n;for(var i=this.getStatesInPath(t,r),o=[],s=t;s&&!i;){if(o.unshift(s),s=e(s,"parentState"),!s&&(i=this.getStatesInPath(this,r),!i))return;i=this.getStatesInPath(s,r)}for(;i.length>0&&i[0]===o[0];)s=i.shift(),o.shift();var a={exitStates:o,enterStates:i,resolveState:s};return t.setPathsCache(this,r,a),a},triggerSetupContext:function(t){var r=t.contexts,i=t.enterStates.length-r.length,o=t.enterStates,s=e(this,"transitionEvent");n.call(o,function(e,t){e.trigger(s,this,r[t-i])},this)},getState:function(t){var r=e(this,t),n=e(this,"parentState");return r?r:n?n.getState(t):void 0},enterState:function(r){var i=this.enableLogging,o=r.exitStates.slice(0).reverse();n.call(o,function(e){e.trigger("exit",this)},this),n.call(r.enterStates,function(t){i&&Ember.Logger.log("STATEMANAGER: Entering "+e(t,"path")),t.trigger("enter",this)},this),t(this,"currentState",r.finalState)}})}(),function(){function e(e,r){return function(){var n=t.call(arguments);return n.unshift(e),r.apply(e,n)}}var t=[].slice,r={},n={},i=[];Ember.Test={registerHelper:function(e,t){r[e]=t},unregisterHelper:function(e){delete r[e],n[e]&&(window[e]=n[e]),delete n[e]},onInjectHelpers:function(e){i.push(e)},promise:function(e){var t=new Ember.RSVP.Promise(e),r={chained:!1};return r.then=function(e,n){var i,o;return r.chained=!0,i=t.then(e,n),o=Ember.Test.promise(function(e){e(i)}),i.then(null,function(e){o.chained||Ember.Test.failure(e)}),o},r},failure:function(e){setTimeout(function(){throw e})}},Ember.Application.reopen({testHelpers:{},setupForTesting:function(){this.deferReadiness(),this.Router.reopen({location:"none"})},injectTestHelpers:function(){this.testHelpers={};for(var t in r)n[t]=window[t],this.testHelpers[t]=window[t]=e(this,r[t]);for(var o=0,s=i.length;s>o;o++)i[o](this)},removeTestHelpers:function(){for(var e in r)window[e]=n[e],delete this.testHelpers[e],delete n[e]}})}(),function(){function e(e,t){return Ember.run(e,e.handleURL,t),e.__container__.lookup("router:main").location.setURL(t),i(e)}function t(e,t,r){return n(e,t,r),Ember.run(function(){e.$(t).click()}),i(e)}function r(e,t,r,o){var s;return"undefined"==typeof o&&(o=r,r=null),s=n(e,t,r),Ember.run(function(){s.val(o).change()}),i(e)}function n(e,t,r){var n;if(r=r||o(e,"rootElement"),n=e.$(t,r),n.length===0)throw"Element "+t+" not found.";return n}function i(e,t){return Ember.Test.promise(function(r){stop();var n=setInterval(function(){var i=e.__container__.lookup("router:main").router.isLoading;i||a||Ember.run.hasScheduledTimers()||Ember.run.currentRunLoop||(clearInterval(n),start(),Ember.run(function(){r(t)}))},10)})}var o=Ember.get,s=Ember.Test.registerHelper,a=0;Ember.Test.onInjectHelpers(function(){Ember.$(document).ajaxStart(function(){a++}),Ember.$(document).ajaxStop(function(){a--})}),s("visit",e),s("click",t),s("fillIn",r),s("find",n),s("wait",i)}()})(),"undefined"==typeof location||location.hostname!=="localhost"&&location.hostname!=="127.0.0.1"||Ember.Logger.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website.");
15
+ (function(){var e,t;(function(){var r={},n={};e=function(e,t,n){r[e]={deps:t,callback:n}},t=function(e){if(n[e])return n[e];n[e]={};for(var i,o=r[e],a=o.deps,s=o.callback,u=[],c=0,l=a.length;l>c;c++)"exports"===a[c]?u.push(i={}):u.push(t(a[c]));var h=s.apply(this,u);return n[e]=i||h}})(),function(){function e(e){return t.console&&t.console[e]?t.console[e].apply?function(){t.console[e].apply(t.console,arguments)}:function(){var r=Array.prototype.join.call(arguments,", ");t.console[e](r)}:void 0}"undefined"==typeof Ember&&(Ember={});var t=Ember.imports=Ember.imports||this,r=Ember.exports=Ember.exports||this;Ember.lookup=Ember.lookup||this,r.Em=r.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.0.0-rc.3",Ember.ENV=Ember.ENV||("undefined"==typeof ENV?{}:ENV),Ember.config=Ember.config||{},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,"undefined"==typeof Ember.EXTEND_PROTOTYPES&&(Ember.EXTEND_PROTOTYPES=!0),Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.debug&&(Ember.debug=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(e,t){return t}),Ember.uuid=0,Ember.Logger={log:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K},Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.call(t||this);try{return e.call(t||this)}catch(r){Ember.onerror(r)}},Ember.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return null===e||void 0===e||0===e.length&&"function"!=typeof e||"object"==typeof e&&0===Ember.get(e,"length")},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty)}(),function(){var e=Ember.platform={};if(Ember.create=Object.create,!Ember.create||Ember.ENV.STUB_OBJECT_CREATE){var t=function(){};Ember.create=function(e,r){if(t.prototype=e,e=new t,r){t.prototype=e;for(var n in r)t.prototype[n]=r[n].value;e=new t}return t.prototype=null,e},Ember.create.isSimulated=!0}var r,n,i=Object.defineProperty;if(i)try{i({},"a",{get:function(){}})}catch(o){i=null}i&&(r=function(){var e={};return i(e,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),i(e,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),e.a===!0}(),n=function(){try{return i(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),r?n||(i=function(e,t,r){var n;return n="object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName,n?e[t]=r.value:Object.defineProperty(e,t,r)}):i=null),e.defineProperty=i,e.hasPropertyAccessors=!0,e.defineProperty||(e.hasPropertyAccessors=!1,e.defineProperty=function(e,t,r){r.get||(e[t]=r.value)},e.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!e.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),function(){var e=function(e){return e&&Function.prototype.toString.call(e).indexOf("[native code]")>-1},t=e(Array.prototype.map)?Array.prototype.map:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=new Array(r),i=arguments[1],o=0;r>o;o++)o in t&&(n[o]=e.call(i,t[o],o,t));return n},r=e(Array.prototype.forEach)?Array.prototype.forEach:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=arguments[1],i=0;r>i;i++)i in t&&e.call(n,t[i],i,t)},n=e(Array.prototype.indexOf)?Array.prototype.indexOf:function(e,t){null===t||void 0===t?t=0:0>t&&(t=Math.max(0,this.length+t));for(var r=t,n=this.length;n>r;r++)if(this[r]===e)return r;return-1};Ember.ArrayPolyfills={map:t,forEach:r,indexOf:n},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=r),Array.prototype.indexOf||(Array.prototype.indexOf=n))}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,o=0,a=[],s={},u=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var c={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t="ember");var n=t+o++;return e&&(c.value=n,r(e,i,c)),n},Ember.guidFor=function(e){if(void 0===e)return"(undefined)";if(null===e)return"(null)";var t,n=typeof e;switch(n){case"number":return t=a[e],t||(t=a[e]="nu"+e),t;case"string":return t=s[e],t||(t=s[e]="st"+o++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+o++,c.value=t,r(e,i,c),t)}};var l={writable:!0,configurable:!1,enumerable:!1,value:null},h=Ember.GUID_KEY+"_meta";Ember.META_KEY=h;var m={descs:{},watching:{}};u&&(m.values={}),Ember.EMPTY_META=m,Object.freeze&&Object.freeze(m);var f=Ember.platform.defineProperty.isSimulated;f&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){}),Ember.meta=function(t,i){var o=t[h];return i===!1?o||m:(o?o.source!==t&&(f||r(t,h,l),o=n(o),o.descs=n(o.descs),o.watching=n(o.watching),o.cache={},o.source=t,u&&(o.values=n(o.values)),t[h]=o):(f||r(t,h,l),o=new e(t),u&&(o.values={}),t[h]=o,o.descs.constructor=null),o)},Ember.getMeta=function(e,t){var r=Ember.meta(e,!1);return r[t]},Ember.setMeta=function(e,t,r){var n=Ember.meta(e,!0);return n[t]=r,r},Ember.metaPath=function(e,t,r){for(var i,o,a=Ember.meta(e,r),s=0,u=t.length;u>s;s++){if(i=t[s],o=a[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=a[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=a[i]={__ember_source__:e}}a=o}return o},Ember.wrap=function(e,t){function r(){}function n(){var n,i=this._super;return this._super=t||r,n=e.apply(this,arguments),this._super=i,n}return n.wrappedFunction=e,n.__ember_observes__=e.__ember_observes__,n.__ember_observesBefore__=e.__ember_observesBefore__,n},Ember.isArray=function(e){return!e||e.setInterval?!1:Array.isArray&&Array.isArray(e)?!0:Ember.Array&&Ember.Array.detect(e)?!0:void 0!==e.length&&"object"==typeof e?!0:!1},Ember.makeArray=function(e){return null===e||void 0===e?[]:Ember.isArray(e)?e:[e]},Ember.canInvoke=t,Ember.tryInvoke=function(e,r,n){return t(e,r)?e[r].apply(e,n||[]):void 0};var p=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return 1!==e}();Ember.tryFinally=p?function(e,t,r){var n,i,o;r=r||this;try{n=e.call(r)}finally{try{i=t.call(r)}catch(a){o=a}}if(o)throw o;return void 0===i?n:i}:function(e,t,r){var n,i;r=r||this;try{n=e.call(r)}finally{i=t.call(r)}return void 0===i?n:i},Ember.tryCatchFinally=p?function(e,t,r,n){var i,o,a;n=n||this;try{i=e.call(n)}catch(s){i=t.call(n,s)}finally{try{o=r.call(n)}catch(u){a=u}}if(a)throw a;return void 0===o?i:o}:function(e,t,r,n){var i,o;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{o=r.call(n)}return void 0===o?i:o};var d={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){d["[object "+e+"]"]=e.toLowerCase()});var E=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):d[E.call(e)]||"object","function"===t?Ember.Object&&Ember.Object.detect(e)&&(t="class"):"object"===t&&(t=e instanceof Error?"error":Ember.Object&&e instanceof Ember.Object?"instance":"object"),t}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,a=e.length;a>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=function(){var e="undefined"!=typeof window?window.performance||{}:{},t=e.now||e.mozNow||e.webkitNow||e.msNow||e.oNow;return t?t.bind(e):function(){return+new Date}}();Ember.Instrumentation.instrument=function(e,i,o,a){function s(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return o.call(a)}function u(e){i=i||{},i.exception=e}function c(){for(p=0,d=m.length;d>p;p++)f=m[p],f.after(e,n(),i,b[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(l)}var l,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(l=e+": "+i.object,console.time(l)),m||(m=r(e)),0===m.length)return h=o.call(a),Ember.STRUCTURED_PROFILE&&console.timeEnd(l),h;var f,p,d,b=[];return Ember.tryCatchFinally(s,u,c)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),a=[],s=0,u=o.length;u>s;s++)i=o[s],"*"===i?a.push("[^\\.]*"):a.push(i);a=a.join("\\."),a+="(\\..*)?";var c={pattern:r,regex:new RegExp("^"+a+"$"),object:n};return e.push(c),t={},c},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,o=e.length;o>i;i++)e[i]===r&&(n=i);e.splice(n,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e,t,r,n;n=Array.prototype.concat,e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf;var i=Ember.EnumerableUtils={map:function(t,r,n){return t.map?t.map.call(t,r,n):e.call(t,r,n)},forEach:function(e,r,n){return e.forEach?e.forEach.call(e,r,n):t.call(e,r,n)},indexOf:function(e,t,n){return e.indexOf?e.indexOf.call(e,t,n):r.call(e,t,n)},indexesOf:function(e,t){return void 0===t?[]:i.map(t,function(t){return i.indexOf(e,t)})},addObject:function(e,t){var r=i.indexOf(e,t);-1===r&&e.push(t)},removeObject:function(e,t){var r=i.indexOf(e,t);-1!==r&&e.splice(r,1)},replace:function(e,t,r,i){if(e.replace)return e.replace(t,r,i);var o=n.apply([t,r],i);return e.splice.apply(e,o)},intersection:function(e,t){var r=[];return i.forEach(e,function(e){i.indexOf(t,e)>=0&&r.push(e)}),r}}}(),function(){var e=Ember.guidFor,t=Ember.ArrayPolyfills.indexOf,r=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},n=function(e,t){var n=e.keys.copy(),i=r(e.values);return t.keys=n,t.values=i,t},i=Ember.OrderedSet=function(){this.clear()};i.create=function(){return new i},i.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(t){var r=e(t),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(t))},remove:function(r){var n=e(r),i=this.presenceSet,o=this.list;delete i[n];var a=t.call(o,r);a>-1&&o.splice(a,1)},isEmpty:function(){return 0===this.list.length},has:function(t){var r=e(t),n=this.presenceSet;return r in n},forEach:function(e,t){for(var r=this.toArray(),n=0,i=r.length;i>n;n++)e.call(t,r[n])},toArray:function(){return this.list.slice()},copy:function(){var e=new i;return e.presenceSet=r(this.presenceSet),e.list=this.toArray(),e}};var o=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};o.create=function(){return new o},o.prototype={get:function(t){var r=this.values,n=e(t);return r[n]},set:function(t,r){var n=this.keys,i=this.values,o=e(t);n.add(t),i[o]=r},remove:function(t){var r=this.keys,n=this.values,i=e(t);return n.hasOwnProperty(i)?(r.remove(t),delete n[i],!0):!1},has:function(t){var r=this.values,n=e(t);return r.hasOwnProperty(n)},forEach:function(t,r){var n=this.keys,i=this.values;n.forEach(function(n){var o=e(n);t.call(r,n,i[o])})},copy:function(){return n(this,new o)}};var a=Ember.MapWithDefault=function(e){o.call(this),this.defaultValue=e.defaultValue};a.create=function(e){return e?new a(e):new o},a.prototype=Ember.create(o.prototype),a.prototype.get=function(e){var t=this.has(e);if(t)return o.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},a.prototype.copy=function(){return n(this,new a({defaultValue:this.defaultValue}))}}(),function(){function e(e){return e.match(s)[0]}function t(t,n){var i,s=a.test(n),u=!s&&o.test(n);if((!t||u)&&(t=Ember.lookup),s&&(n=n.slice(5)),t===Ember.lookup&&(i=e(n),t=r(t,i),n=n.slice(i.length+1)),!n||0===n.length)throw new Error("Invalid Path");return[t,n]}var r,n=Ember.META_KEY,i=Ember.ENV.MANDATORY_SETTER,o=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,a=/^this[\.\*]/,s=/^([^\.\*]+)/;r=function r(e,t){if(""===t)return e;if(t||"string"!=typeof e||(t=e,e=null),!e||-1!==t.indexOf("."))return u(e,t);var r,o=e[n],a=o&&o.descs[t];return a?a.get(e,t):(r=i&&o&&o.watching[t]>0?o.values[t]:e[t],void 0!==r||"object"!=typeof e||t in e||"function"!=typeof e.unknownProperty?r:e.unknownProperty(t))},Ember.config.overrideAccessors&&(Ember.get=r,Ember.config.overrideAccessors(),r=Ember.get);var u=Ember._getPath=function(e,n){var i,o,s,u,c;if(null===e&&-1===n.indexOf("."))return r(Ember.lookup,n);for(i=a.test(n),(!e||i)&&(s=t(e,n),e=s[0],n=s[1],s.length=0),o=n.split("."),c=o.length,u=0;e&&c>u;u++)if(e=r(e,o[u],!0),e&&e.isDestroyed)return void 0;return e};Ember.normalizeTuple=function(e,r){return t(e,r)},Ember.getWithDefault=function(e,t,n){var i=r(e,t);return void 0===i?n:i},Ember.get=r,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get)}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i++)if(t===e[i][0]&&r===e[i][1]){n=i;break}return n}function t(e,t){var r,n=f(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=m(n.listeners)),r=n.listeners[t],r&&!n.listeners.hasOwnProperty(t)?r=n.listeners[t]=n.listeners[t].slice():r||(r=n.listeners[t]=[]),r}function r(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r];if(o)for(var a=o.length-1;a>=0;a--){var s=o[a][0],u=o[a][1],c=o[a][2],l=o[a][3],h=e(n,s,u);-1===h&&n.push([s,u,c,l])}}function n(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r],a=[];if(o){for(var s=o.length-1;s>=0;s--){var u=o[s][0],c=o[s][1],l=o[s][2],h=o[s][3],m=e(n,u,c);-1===m&&(n.push([u,c,l,h]),a.push([u,c,l,h]))}return a}}function i(r,n,i,o,a){o||"function"!=typeof i||(o=i,i=null);var s=t(r,n),u=e(s,i,o);-1===u&&(s.push([i,o,a,void 0]),"function"==typeof r.didAddListener&&r.didAddListener(n,i,o))}function o(r,n,i,o){function a(i,o){var a=t(r,n),s=e(a,i,o);-1!==s&&(a.splice(s,1),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,o))}if(o||"function"!=typeof i||(o=i,i=null),o)a(i,o);else{var s=r[p],u=s&&s.listeners&&s.listeners[n];if(!u)return;for(var c=u.length-1;c>=0;c--)a(u[c][0],u[c][1])}}function a(r,n,i,o,a){function s(){return a.call(i)}function u(){c&&(c[3]=void 0)}o||"function"!=typeof i||(o=i,i=null);var c,l=t(r,n),h=e(l,i,o);return-1!==h&&(c=l[h].slice(),c[3]=!0,l[h]=c),Ember.tryFinally(s,u)}function s(r,n,i,o,a){function s(){return a.call(i)}function u(){for(m=0,f=p.length;f>m;m++)p[m][3]=void 0}o||"function"!=typeof i||(o=i,i=null);var c,l,h,m,f,p=[];for(m=0,f=n.length;f>m;m++){c=n[m],l=t(r,c);var d=e(l,i,o);-1!==d&&(h=l[d].slice(),h[3]=!0,l[d]=h,p.push(h))}return Ember.tryFinally(s,u)}function u(e){var t=e[p].listeners,r=[];if(t)for(var n in t)t[n]&&r.push(n);return r}function c(e,t,r,n){if(e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,r),!n){var i=e[p];n=i&&i.listeners&&i.listeners[t]}if(n){for(var a=n.length-1;a>=0;a--)if(n[a]&&n[a][3]!==!0){var s=n[a][0],u=n[a][1],c=n[a][2];c&&o(e,t,s,u),s||(s=e),"string"==typeof u&&(u=s[u]),r?u.apply(s,r):u.call(s)}return!0}}function l(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,a=i.length;a>o;o++){var s=i[o][0],u=i[o][1];r.push([s,u])}return r}var m=Ember.create,f=Ember.meta,p=Ember.META_KEY;Ember.addListener=i,Ember.removeListener=o,Ember._suspendListener=a,Ember._suspendListeners=s,Ember.sendEvent=c,Ember.hasListeners=l,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,a=this.observers,s=e(t),u=o[s];return u||(o[s]=u={}),i=u[r],void 0===i&&(i=a.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),a[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t,i){if(!e.isDestroying){var o=n,a=!o;a&&(o=n={}),r(d,e,t,o,i),a&&(n=null)}}function t(e,t,n){if(!e.isDestroying){var o=i,a=!o;a&&(o=i={}),r(b,e,t,o,n),a&&(i=null)}}function r(e,t,r,n,i){var o=a(t);if(n[o]||(n[o]={}),!n[o][r]){n[o][r]=!0;var s=i.deps;if(s=s&&s[r])for(var u in s){var c=i.descs[u];c&&c._suspended===t||e(t,u)}}}var n,i,o=Ember.meta,a=Ember.guidFor,s=Ember.tryFinally,u=Ember.sendEvent,c=Ember.listenersUnion,l=Ember.listenersDiff,h=Ember._ObserverSet,m=new h,f=new h,p=0,d=Ember.propertyWillChange=function(t,r){var n=o(t,!1),i=n.watching[r]>0||"length"===r,a=n.proto,s=n.descs[r];i&&a!==t&&(s&&s.willChange&&s.willChange(t,r),e(t,r,n),E(t,r,n),w(t,r))},b=Ember.propertyDidChange=function(e,r){var n=o(e,!1),i=n.watching[r]>0||"length"===r,a=n.proto,s=n.descs[r];a!==e&&(s&&s.didChange&&s.didChange(e,r),(i||"length"===r)&&(t(e,r,n),v(e,r,n),_(e,r)))},E=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var o=0,a=i.length;a>o;o++)i[o].willChange(n)}},v=function(e,t,r,n){if(r.hasOwnProperty("chainWatchers")){var i=r.chainWatchers;if(i=i[t])for(var o=i.length-1;o>=0;o--)i[o].didChange(n)}};Ember.overrideChains=function(e,t,r){v(e,t,r,!0)};var g=Ember.beginPropertyChanges=function(){p++},y=Ember.endPropertyChanges=function(){p--,0>=p&&(m.clear(),f.flush())};Ember.changeProperties=function(e,t){g(),s(e,y,t)};var w=function(e,t){if(!e.isDestroying){var r,n,i=t+":before";p?(r=m.add(e,t,i),n=l(e,i,r),u(e,i,[e,t],n)):u(e,i,[e,t])}},_=function(e,t){if(!e.isDestroying){var r,n=t+":change";p?(r=f.add(e,t,n),c(e,n,r)):u(e,n,[e,t])}}}(),function(){function e(e,t,r,o){var a;if(a=t.slice(t.lastIndexOf(".")+1),t=t.slice(0,t.length-(a.length+1)),"this"!==t&&(e=n(e,t)),!a||0===a.length)throw new Error("You passed an empty path");if(!e){if(o)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return i(e,a,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function i(n,i,o,a){if("string"==typeof n&&(o=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,o,a);var s,u,c=n[t],l=c&&c.descs[i];return l?l.set(n,i,o):(s="object"==typeof n&&!(i in n),s&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,o):c&&c.watching[i]>0?(u=r?c.values[i]:n[i],o!==u&&(Ember.propertyWillChange(n,i),r?void 0!==u||i in n?c.values[i]=o:Ember.defineProperty(n,i,null,o):n[i]=o,Ember.propertyDidChange(n,i))):n[i]=o),o};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,r){return i(e,t,r,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet)}(),function(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,a,s,u,c){var l,h,m,f;return c||(c=t(e)),l=c.descs,h=c.descs[a],m=c.watching[a]>0,h instanceof Ember.Descriptor&&h.teardown(e,a),s instanceof Ember.Descriptor?(f=s,l[a]=s,n&&m?r(e,a,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[a]=void 0,s.setup(e,a)):(l[a]=void 0,null==s?(f=u,n&&m?(c.values[a]=u,r(e,a,{configurable:!0,enumerable:!0,set:i,get:o(a)})):e[a]=u):(f=s,r(e,a,s))),m&&Ember.overrideChains(e,a,c),e.didDefineProperty&&e.didDefineProperty(e,a,f),this}}(),function(){var e=Ember.changeProperties,t=Ember.set;Ember.setProperties=function(r,n){return e(function(){for(var e in n)n.hasOwnProperty(e)&&t(r,e,n[e])}),r}}(),function(){var e=Ember.meta,t=Ember.typeOf,r=Ember.ENV.MANDATORY_SETTER,n=Ember.platform.defineProperty;Ember.watchKey=function(i,o){if("length"!==o||"array"!==t(i)){var a,s=e(i),u=s.watching;u[o]?u[o]=(u[o]||0)+1:(u[o]=1,a=s.descs[o],a&&a.willWatch&&a.willWatch(i,o),"function"==typeof i.willWatchProperty&&i.willWatchProperty(o),r&&o in i&&(s.values[o]=i[o],n(i,o,{configurable:!0,enumerable:!0,set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(o)})))}},Ember.unwatchKey=function(t,i){var o,a=e(t),s=a.watching;1===s[i]?(s[i]=0,o=a.descs[i],o&&o.didUnwatch&&o.didUnwatch(t,i),"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&(n(t,i,{configurable:!0,enumerable:!0,writable:!0,value:a.values[i]}),delete a.values[i])):s[i]>1&&s[i]--}}(),function(){function e(e){return e.match(m)[0]}function t(e,t,r){if(e&&"object"==typeof e){var i=n(e),o=i.chainWatchers;i.hasOwnProperty("chainWatchers")||(o=i.chainWatchers={}),o[t]||(o[t]=[]),o[t].push(r),u(e,t)}}function r(e){return n(e,!1).proto===e}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,a=Ember.ArrayPolyfills.forEach,s=Ember.warn,u=Ember.watchKey,c=Ember.unwatchKey,l=Ember.propertyWillChange,h=Ember.propertyDidChange,m=/^([^\.\*]+)/,f=[];Ember.flushPendingChains=function(){if(0!==f.length){var e=f;f=[],a.call(e,function(e){e[0].add(e[1])}),s("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===f.length)}};var p=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var i=n(e,!1);if(i.hasOwnProperty("chainWatchers")){var o=i.chainWatchers;if(o[t]){o=o[t];for(var a=0,s=o.length;s>a;a++)o[a]===r&&o.splice(a,1)}c(e,t)}}},d=Ember._ChainNode=function(e,r,n){this._parent=e,this._key=r,this._watching=void 0===n,this._value=n,this._paths={},this._watching&&(this._object=e.value(),this._object&&t(this._object,this._key,this)),this._parent&&"@each"===this._parent._key&&this.value()},b=d.prototype;b.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=e&&!r(e)?i(e,this._key):void 0}return this._value},b.destroy=function(){if(this._watching){var e=this._object;e&&p(e,this._key,this),this._watching=!1}},b.copy=function(e){var t,r=new d(null,null,e),n=this._paths;for(t in n)0>=n[t]||r.add(t);return r},b.add=function(t){var r,n,i,a,s;if(s=this._paths,s[t]=(s[t]||0)+1,r=this.value(),n=o(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return f.push([this,t]),n.length=0,void 0;a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,a)},b.remove=function(t){var r,n,i,a,s;s=this._paths,s[t]>0&&s[t]--,r=this.value(),n=o(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},b.count=0,b.chain=function(t,r,n){var i,o=this._chains;o||(o=this._chains={}),i=o[t],i||(i=o[t]=new d(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},b.unchain=function(t,r){var n=this._chains,i=n[t];r&&r.length>1&&(t=e(r),r=r.slice(t.length+1),i.unchain(t,r)),i.count--,0>=i.count&&(delete n[i._key],i.destroy())},b.willChange=function(){var e=this._chains;if(e)for(var t in e)e.hasOwnProperty(t)&&e[t].willChange();this._parent&&this._parent.chainWillChange(this,this._key,1)},b.chainWillChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1):(r>1&&l(this.value(),t),t="this."+t,this._paths[t]>0&&l(this.value(),t))},b.chainDidChange=function(e,t,r){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1):(r>1&&h(this.value(),t),t="this."+t,this._paths[t]>0&&h(this.value(),t))},b.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(p(this._object,this._key,this),this._object=r,t(r,this._key,this)),this._value=void 0,this._parent&&"@each"===this._parent._key&&this.value()}var n=this._chains;if(n)for(var i in n)n.hasOwnProperty(i)&&n[i].didChange(e);e||this._parent&&this._parent.chainDidChange(this,this._key,1)},Ember.finishChains=function(e){var t=n(e,!1),r=t.chains;r&&(r.value()!==e&&(t.chains=r=r.copy(e)),r.didChange(!0))}}(),function(){function e(e){var r=t(e),i=r.chains;return i?i.value()!==e&&(i=r.chains=i.copy(e)):i=r.chains=new n(null,null,e),i}var t=Ember.meta,r=Ember.typeOf,n=Ember._ChainNode;Ember.watchPath=function(n,i){if("length"!==i||"array"!==r(n)){var o=t(n),a=o.watching;a[i]?a[i]=(a[i]||0)+1:(a[i]=1,e(n).add(i))}},Ember.unwatchPath=function(r,n){var i=t(r),o=i.watching;1===o[n]?(o[n]=0,e(r).remove(n)):o[n]>1&&o[n]--}}(),function(){function e(e){return"*"===e||!h.test(e)}var t=Ember.meta,r=Ember.GUID_KEY,n=Ember.META_KEY,i=Ember.removeChainWatcher,o=Ember.watchKey,a=Ember.unwatchKey,s=Ember.watchPath,u=Ember.unwatchPath,c=Ember.typeOf,l=Ember.generateGuid,h=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?o(t,r):s(t,r))},Ember.isWatching=function(e,t){var r=e[n];return(r&&r.watching[t])>0},Ember.watch.flushPending=Ember.flushPendingChains,Ember.unwatch=function(t,r){("length"!==r||"array"!==c(t))&&(e(r)?a(t,r):u(t,r))},Ember.rewatch=function(e){var n=t(e,!1),i=n.chains;r in e&&!e.hasOwnProperty(r)&&l(e,"ember"),i&&i.value()!==e&&(n.chains=i.copy(e))};var m=[];Ember.destroy=function(e){var t,r,o,a,s=e[n];if(s&&(e[n]=null,t=s.chains))for(m.push(t);m.length>0;){if(t=m.pop(),r=t._chains)for(o in r)r.hasOwnProperty(o)&&m.push(r[o]);t._watching&&(a=t._object,a&&i(a,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=m(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var a,s,u,c,l,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)c=h[s],l=e(a,c),l[i]=(l[i]||0)+1,p(n,c)}function n(r,n,i,o){var a,s,u,c,l,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)c=h[s],l=e(a,c),l[i]=(l[i]||0)-1,d(n,c)}function i(e,t){this.func=e,this._cacheable=t&&void 0!==t.cacheable?t.cacheable:!0,this._dependentKeys=t&&t.dependentKeys,this._readOnly=t&&(void 0!==t.readOnly||!!t.readOnly)}function o(e,t){for(var r={},n=0;t.length>n;n++)r[t[n]]=u(e,t[n]);return r}function a(e,t){Ember.computed[e]=function(e){var r=h.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function s(e,t){Ember.computed[e]=function(){var e=h.call(arguments),r=Ember.computed(function(){return t.apply(this,[o(this,e)])});return r.property.apply(r,e)}}var u=Ember.get,c=Ember.set,l=Ember.meta,h=[].slice,m=Ember.create,f=Ember.META_KEY,p=Ember.watch,d=Ember.unwatch;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var b=i.prototype;b.cacheable=function(e){return this._cacheable=e!==!1,this},b.volatile=function(){return this.cacheable(!1)},b.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},b.property=function(){for(var e=[],t=0,r=arguments.length;r>t;t++)e.push(arguments[t]);return this._dependentKeys=e,this},b.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},b.willWatch=function(e,t){var n=e[f];t in n.cache||r(this,e,t,n)},b.didUnwatch=function(e,t){var r=e[f];t in r.cache||n(this,e,t,r)},b.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=l(e);t in r.cache&&(delete r.cache[t],r.watching[t]||n(this,e,t,r))}},b.get=function(e,t){var n,i,o;if(this._cacheable){if(o=l(e),i=o.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),o.watching[t]||r(this,e,t,o)}else n=this.func.call(e,t);return n},b.set=function(e,t,n){var i,o,a=this._cacheable,s=this.func,u=l(e,a),c=u.watching[t],h=this._suspended,m=!1,f=u.cache;if(this._readOnly)throw new Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(a&&f.hasOwnProperty(t)&&(i=f[t],m=!0),s.wrappedFunction&&(s=s.wrappedFunction),3===s.length)o=s.call(e,t,n,i);else{if(2!==s.length)return Ember.defineProperty(e,t,null,i),Ember.set(e,t,n),void 0;o=s.call(e,t,n)}if(m&&i===o)return;c&&Ember.propertyWillChange(e,t),m&&delete f[t],a&&(c||m||r(this,e,t,u),f[t]=o),c&&Ember.propertyDidChange(e,t)}finally{this._suspended=h}return o},b.setup=function(e,t){var n=e[f];n&&n.watching[t]&&r(this,e,t,l(e))},b.teardown=function(e,t){var r=l(e);return(r.watching[t]||t in r.cache)&&n(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;if(arguments.length>1&&(t=h.call(arguments,0,-1),e=h.call(arguments,-1)[0]),"function"!=typeof e)throw new Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=l(e,!1).cache;return r&&t in r?r[t]:void 0},a("empty",function(e){return Ember.isEmpty(u(this,e))}),a("notEmpty",function(e){return!Ember.isEmpty(u(this,e))}),a("none",function(e){return Ember.isNone(u(this,e))}),a("not",function(e){return!u(this,e)}),a("bool",function(e){return!!u(this,e)}),a("match",function(e,t){var r=u(this,e);return"string"==typeof r?!!r.match(t):!1}),a("equal",function(e,t){return u(this,e)===t}),a("gt",function(e,t){return u(this,e)>t}),a("gte",function(e,t){return u(this,e)>=t}),a("lt",function(e,t){return t>u(this,e)}),a("lte",function(e,t){return t>=u(this,e)}),s("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),s("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),s("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),s("map",function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&(Ember.isNone(e[r])?t.push(null):t.push(e[r]));return t}),Ember.computed.alias=function(e){return Ember.computed(e,function(t,r){return arguments.length>1?(c(this,e,r),r):u(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:u(this,e):null!=r?r:u(this,e)})}}(),function(){function e(e){return e+r}function t(e){return e+n}var r=":change",n=":before";Ember.guidFor,Ember.addObserver=function(t,r,n,i){return Ember.addListener(t,e(r),n,i),Ember.watch(t,r),this},Ember.observersFor=function(t,r){return Ember.listenersFor(t,e(r))},Ember.removeObserver=function(t,r,n,i){return Ember.unwatch(t,r),Ember.removeListener(t,e(r),n,i),this},Ember.addBeforeObserver=function(e,r,n,i){return Ember.addListener(e,t(r),n,i),Ember.watch(e,r),this},Ember._suspendBeforeObserver=function(e,r,n,i,o){return Ember._suspendListener(e,t(r),n,i,o)},Ember._suspendObserver=function(t,r,n,i,o){return Ember._suspendListener(t,e(r),n,i,o)};var i=Ember.ArrayPolyfills.map;Ember._suspendBeforeObservers=function(e,r,n,o,a){var s=i.call(r,t);return Ember._suspendListeners(e,s,n,o,a)},Ember._suspendObservers=function(t,r,n,o,a){var s=i.call(r,e);return Ember._suspendListeners(t,s,n,o,a)},Ember.beforeObserversFor=function(e,r){return Ember.listenersFor(e,t(r))},Ember.removeBeforeObserver=function(e,r,n,i){return Ember.unwatch(e,r),Ember.removeListener(e,t(r),n,i),this}}(),function(){function e(e,t,r,n){return void 0===t&&(t=e,e=void 0),"string"==typeof t&&(t=e[t]),r&&n>0&&(r=r.length>n?o.call(r,n):null),Ember.handleErrors(function(){return t.apply(e||this,r||[])},this)}function t(){c=null,u.currentRunLoop&&u.end()}function r(){l=null,u(function(){var t=+new Date,n=-1;for(var i in m)if(m.hasOwnProperty(i)){var o=m[i];o&&o.expires&&(t>=o.expires?(delete m[i],e(o.target,o.method,o.args,2)):(0>n||n>o.expires)&&(n=o.expires))}n>0&&(l=setTimeout(r,n-t),h=n)})}function n(t,r){r[this.tguid]&&delete r[this.tguid][this.mguid],m[t]&&e(this.target,this.method,this.args),delete m[t]}function i(e,t,r,i){var o,a=Ember.guidFor(t),s=Ember.guidFor(r),c=u.autorun().onceTimers,l=c[a]&&c[a][s];return l&&m[l]?m[l].args=i:(o={target:t,method:r,args:i,tguid:a,mguid:s},l=Ember.guidFor(o),m[l]=o,c[a]||(c[a]={}),c[a][s]=l,u.schedule(e,o,n,l,c)),l}var o=[].slice,a=Ember.ArrayPolyfills.forEach,s=function(e){this._prev=e||null,this.onceTimers={}};s.prototype={end:function(){this.flush()},prev:function(){return this._prev},schedule:function(e,t,r){var n,i=this._queues;i||(i=this._queues={}),n=i[e],n||(n=i[e]=[]);var a=arguments.length>3?o.call(arguments,3):null;return n.push({target:t,method:r,args:a}),this},flush:function(t){function r(t){e(t.target,t.method,t.args)}function n(){a.call(u,r)}var i,o,s,u,c;if(!this._queues)return this;if(Ember.watch.flushPending(),t)for(;this._queues&&(u=this._queues[t]);)this._queues[t]=null,"sync"===t?(c=Ember.LOG_BINDINGS,c&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(n,Ember.endPropertyChanges),c&&Ember.Logger.log("End: Flush Sync Queue")):a.call(u,r);
16
+ else{i=Ember.run.queues,s=i.length,o=0;e:for(;s>o;){t=i[o],u=this._queues&&this._queues[t],delete this._queues[t],u&&("sync"===t?(c=Ember.LOG_BINDINGS,c&&Ember.Logger.log("Begin: Flush Sync Queue"),Ember.beginPropertyChanges(),Ember.tryFinally(n,Ember.endPropertyChanges),c&&Ember.Logger.log("End: Flush Sync Queue")):a.call(u,r));for(var l=0;o>=l;l++)if(this._queues&&this._queues[i[l]]){o=l;continue e}o++}}return this}},Ember.RunLoop=s,Ember.run=function(t,r){function n(){return t||r?e(t,r,i,2):void 0}var i=arguments;return u.begin(),Ember.tryFinally(n,u.end)};var u=Ember.run;Ember.run.begin=function(){u.currentRunLoop=new s(u.currentRunLoop)},Ember.run.end=function(){function e(){u.currentRunLoop.end()}function t(){u.currentRunLoop=u.currentRunLoop.prev()}Ember.tryFinally(e,t)},Ember.run.queues=["sync","actions","destroy"],Ember.run.schedule=function(){var e=u.autorun();e.schedule.apply(e,arguments)};var c;Ember.run.hasScheduledTimers=function(){return!(!c&&!l)},Ember.run.cancelTimers=function(){c&&(clearTimeout(c),c=null),l&&(clearTimeout(l),l=null),m={}},Ember.run.autorun=function(){return u.currentRunLoop||(u.begin(),c||(c=setTimeout(t,1))),u.currentRunLoop},Ember.run.sync=function(){u.autorun(),u.currentRunLoop.flush("sync")};var l,h,m={};Ember.run.later=function(e,t){var n,i,a,s,u;return 2===arguments.length&&"function"==typeof e?(u=t,t=e,e=void 0,n=[e,t]):(n=o.call(arguments),u=n.pop()),i=+new Date+u,a={target:e,method:t,expires:i,args:n},s=Ember.guidFor(a),m[s]=a,l&&h>i&&(clearTimeout(l),l=null),l||(l=setTimeout(r,u),h=i),s},Ember.run.once=function(e,t){return i("actions",e,t,o.call(arguments,2))},Ember.run.scheduleOnce=function(e,t,r){return i(e,t,r,o.call(arguments,3))},Ember.run.next=function(){var e=o.call(arguments);return e.push(1),u.later.apply(this,e)},Ember.run.cancel=function(e){delete m[e]}}(),function(){function e(e,t){return r(o(t)?Ember.lookup:e,t)}function t(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}Ember.LOG_BINDINGS=!1||!!Ember.ENV.LOG_BINDINGS;var r=Ember.get,n=(Ember.set,Ember.guidFor),i=/^([A-Z$]|([0-9][A-Z$]))/,o=Ember.isGlobalPath=function(e){return i.test(e)},a=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};a.prototype={copy:function(){var e=new a(this._to,this._from);return this._oneWay&&(e._oneWay=!0),e},from:function(e){return this._from=e,this},to:function(e){return this._to=e,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var e=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+n(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(t){var r=this._from,n=this._to;return Ember.trySet(t,n,e(t,r)),Ember.addObserver(t,r,this,this.fromDidChange),this._oneWay||Ember.addObserver(t,n,this,this.toDidChange),this._readyToSync=!0,this},disconnect:function(e){var t=!this._oneWay;return Ember.removeObserver(e,this._from,this,this.fromDidChange),t&&Ember.removeObserver(e,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(e){this._scheduleSync(e,"fwd")},toDidChange:function(e){this._scheduleSync(e,"back")},_scheduleSync:function(e,t){var r=this._directionMap,n=r.get(e);n||(Ember.run.schedule("sync",this,this._sync,e),r.set(e,t)),"back"===n&&"fwd"===t&&r.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(!t.isDestroyed&&this._readyToSync){var i=this._directionMap,o=i.get(t),a=this._from,s=this._to;if(i.remove(t),"fwd"===o){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,s,u):Ember._suspendObserver(t,s,this,this.toDidChange,function(){Ember.trySet(t,s,u)})}else if("back"===o){var c=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",c,t),Ember._suspendObserver(t,a,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(a)?Ember.lookup:t,a,c)})}}}},t(a,{from:function(){var e=this,t=new e;return t.from.apply(t,arguments)},to:function(){var e=this,t=new e;return t.to.apply(t,arguments)},oneWay:function(e,t){var r=this,n=new r(null,e);return n.oneWay(t)}}),Ember.Binding=a,Ember.bind=function(e,t,r){return new Ember.Binding(t,r).connect(e)},Ember.oneWay=function(e,t,r){return new Ember.Binding(t,r).oneWay().connect(e)}}(),function(){function e(e){var t=Ember.meta(e,!0),r=t.mixins;return r?t.hasOwnProperty("mixins")||(r=t.mixins=x(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=_.call(t,function(e){if(e instanceof g)return e;var t=new g;return t.properties=e,t})),e}function r(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function n(e,t){var r;return t instanceof g?(r=P(t),e[r]?V:(e[r]=t,t.properties)):t}function i(e,t,r){var n;return n=t.concatenatedProperties||r.concatenatedProperties,e.concatenatedProperties&&(n=n?n.concat(e.concatenatedProperties):e.concatenatedProperties),n}function o(e,t,r,n,i){var o;return void 0===n[t]&&(o=i[t]),o=o||e.descs[t],o&&o instanceof Ember.ComputedProperty?(r=x(r),r.func=Ember.wrap(r.func,o.func),r):r}function a(e,t,r,n,i){var o;return void 0===i[t]&&(o=n[t]),o=o||e[t],"function"!=typeof o?r:Ember.wrap(r,o)}function s(e,t,r,n){var i=n[t]||e[t];return i?"function"==typeof i.concat?i.concat(r):Ember.makeArray(i).concat(r):Ember.makeArray(r)}function u(e,t,n,i,u,c,l){if(n instanceof Ember.Descriptor){if(n===y&&u[t])return V;n.func&&(n=o(i,t,n,c,u)),u[t]=n,c[t]=void 0}else r(n)?n=a(e,t,n,c,u):(l&&C.call(l,t)>=0||"concatenatedProperties"===t)&&(n=s(e,t,n,c)),u[t]=void 0,c[t]=n}function c(e,t,r,o,a,s){function l(e){delete r[e],delete o[e]}for(var h,m,f,p,d,b=0,E=e.length;E>b;b++)if(h=e[b],m=n(t,h),m!==V)if(m){d=Ember.meta(a),p=i(m,o,a);for(f in m)m.hasOwnProperty(f)&&(s.push(f),u(a,f,m[f],d,r,o,p));m.hasOwnProperty("toString")&&(a.toString=m.toString)}else h.mixins&&(c(h.mixins,t,r,o,a,s),h._without&&O.call(h._without,l))}function l(e,t,r,n){if(T.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=x(n.bindings)):i=n.bindings={},i[t]=r}}function h(e,t){var r,n,i,o=t.bindings;if(o){for(r in o)n=o[r],n&&(i=r.slice(0,-7),n instanceof Ember.Binding?(n=n.copy(),n.to(i)):n=new Ember.Binding(i,n),n.connect(e),e[r]=n);t.bindings={}}}function m(e,t){return h(e,t||Ember.meta(e)),e}function f(e,t,r,n,i){var o,a=t.methodName;return n[a]||i[a]?(o=i[a],t=n[a]):r.descs[a]?(t=r.descs[a],o=void 0):(t=void 0,o=e[a]),{desc:t,value:o}}function p(e,t,r,n,i){if("function"==typeof r){var o=r[n];if(o)for(var a=0,s=o.length;s>a;a++)Ember[i](e,o[a],null,t)}}function d(e,t,r){var n=e[t];p(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),p(e,t,n,"__ember_observes__","removeObserver"),p(e,t,r,"__ember_observesBefore__","addBeforeObserver"),p(e,t,r,"__ember_observes__","addObserver")}function b(t,r,n){var i,o,a,s={},u={},h=Ember.meta(t),p=[];c(r,e(t),s,u,t,p);for(var b=0,E=p.length;E>b;b++)if(i=p[b],"constructor"!==i&&u.hasOwnProperty(i)&&(a=s[i],o=u[i],a!==y)){for(;a&&a instanceof w;){var v=f(t,a,h,s,u);a=v.desc,o=v.value}(void 0!==a||void 0!==o)&&(d(t,i,o),l(t,i,o,h),A(t,i,a,o,h))}return n||m(t,h),t}function E(e,t,r){var n=P(e);if(r[n])return!1;if(r[n]=!0,e===t)return!0;for(var i=e.mixins,o=i?i.length:0;--o>=0;)if(E(i[o],t,r))return!0;return!1}function v(e,t,r){if(!r[P(t)])if(r[P(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&O.call(t.mixins,function(t){v(e,t,r)})}var g,y,w,_=Ember.ArrayPolyfills.map,C=Ember.ArrayPolyfills.indexOf,O=Ember.ArrayPolyfills.forEach,S=[].slice,x=Ember.create,A=Ember.defineProperty,P=Ember.guidFor,V={},T=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=S.call(arguments,1);return b(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},g=Ember.Mixin,g.prototype={properties:null,mixins:null,ownerConstructor:null},g._apply=b,g.applyPartial=function(e){var t=S.call(arguments,1);return b(e,t,!0)},g.finishPartial=m,Ember.anyUnprocessedMixins=!1,g.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var D=g.prototype;D.reopen=function(){var e,t;this.properties?(e=g.create(),e.properties=this.properties,delete this.properties,this.mixins=[e]):this.mixins||(this.mixins=[]);var r,n=arguments.length,i=this.mixins;for(r=0;n>r;r++)e=arguments[r],e instanceof g?i.push(e):(t=g.create(),t.properties=e,i.push(t));return this},D.apply=function(e){return b(e,[this],!1)},D.applyPartial=function(e){return b(e,[this],!0)},D.detect=function(e){if(!e)return!1;if(e instanceof g)return E(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[P(this)]:!1},D.without=function(){var e=new g(this);return e._without=S.call(arguments),e},D.keys=function(){var e={},t={},r=[];v(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},g.mixins=function(e){var t=Ember.meta(e,!1).mixins,r=[];if(!t)return r;for(var n in t){var i=t[n];i.properties||r.push(i)}return r},y=new Ember.Descriptor,y.toString=function(){return"(Required Property)"},Ember.required=function(){return y},w=function(e){this.methodName=e},w.prototype=new Ember.Descriptor,Ember.alias=function(e){return new w(e)},Ember.alias=Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new w(e)},Ember.observer=function(e){var t=S.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++)arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=S.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),function(){e("rsvp",[],function(){"use strict";function e(e,t){n.async(function(){e.trigger("promise:resolved",{detail:t}),e.isResolved=!0,e.resolvedValue=t})}function t(e,t){n.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedValue=t})}function r(e){var t,r=[],n=new p,i=e.length;0===i&&n.resolve([]);var o=function(e){return function(t){a(e,t)}},a=function(e,t){r[e]=t,0===--i&&n.resolve(r)},s=function(e){n.reject(e)};for(t=0;i>t;t++)e[t].then(o(t),s);return n}var n,i,o="undefined"!=typeof window?window:{},a=o.MutationObserver||o.WebKitMutationObserver;if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))i=function(e,t){process.nextTick(function(){e.call(t)})};else if(a){var s=[],u=new a(function(){var e=s.slice();s=[],e.forEach(function(e){var t=e[0],r=e[1];t.call(r)})}),c=document.createElement("div");u.observe(c,{attributes:!0}),window.addEventListener("unload",function(){u.disconnect(),u=null}),i=function(e,t){s.push([e,t]),c.setAttribute("drainQueue","drainQueue")}}else i=function(e,t){setTimeout(function(){e.call(t)},1)};var l=function(e,t){this.type=e;for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r])},h=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r][0]===t)return r;return-1},m=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},f={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,r){var n,i,o=m(this);for(e=e.split(/\s+/),r=r||this;i=e.shift();)n=o[i],n||(n=o[i]=[]),-1===h(n,t)&&n.push([t,r])},off:function(e,t){var r,n,i,o=m(this);for(e=e.split(/\s+/);n=e.shift();)t?(r=o[n],i=h(r,t),-1!==i&&r.splice(i,1)):o[n]=[]},trigger:function(e,t){var r,n,i,o,a,s=m(this);if(r=s[e])for(var u=0;r.length>u;u++)n=r[u],i=n[0],o=n[1],"object"!=typeof t&&(t={detail:t}),a=new l(e,t),i.call(o,a)}},p=function(){this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this)},d=function(){},b=function(e,t,r,n){var i,o,a,s,u="function"==typeof r;if(u)try{i=r(n.detail),a=!0}catch(c){s=!0,o=c}else i=n.detail,a=!0;i&&"function"==typeof i.then?i.then(function(e){t.resolve(e)},function(e){t.reject(e)}):u&&a?t.resolve(i):s?t.reject(o):t[e](i)};return p.prototype={then:function(e,t){var r=new p;return this.isResolved&&n.async(function(){b("resolve",r,e,{detail:this.resolvedValue})},this),this.isRejected&&n.async(function(){b("reject",r,t,{detail:this.rejectedValue})},this),this.on("promise:resolved",function(t){b("resolve",r,e,t)}),this.on("promise:failed",function(e){b("reject",r,t,e)}),r},resolve:function(t){e(this,t),this.resolve=d,this.reject=d},reject:function(e){t(this,e),this.resolve=d,this.reject=d}},f.mixin(p.prototype),n={async:i,Promise:p,Event:l,EventTarget:f,all:r,raiseOnUncaughtExceptions:!0}})}(),function(){e("container",[],function(){function e(e){this.parent=e,this.dict={}}function t(t){this.parent=t,this.children=[],this.resolver=t&&t.resolver||function(){},this.registry=new e(t&&t.registry),this.cache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this._options=new e(t&&t._options),this._typeOptions=new e(t&&t._typeOptions)}function r(e){throw new Error(e+" is not currently supported on child containers")}function n(e,t){var r=o(e,t,"singleton");return r!==!1}function i(e,t){var r={};if(!t)return r;for(var n,i,o=0,a=t.length;a>o;o++)n=t[o],i=e.lookup(n.fullName),r[n.property]=i;return r}function o(e,t,r){var n=e._options.get(t);if(n&&void 0!==n[r])return n[r];var i=t.split(":")[0];return n=e._typeOptions.get(i),n?n[r]:void 0}function a(e,t){var r=e.normalize(t);return e.resolve(r)}function s(e,t){var r,n=a(e,t),s=t.split(":"),u=s[0];if(o(e,t,"instantiate")===!1)return n;if(n){var c=[];c=c.concat(e.typeInjections.get(u)||[]),c=c.concat(e.injections[t]||[]);var l=i(e,c);return l.container=e,l._debugContainerKey=t,r=n.create(l)}}function u(e,t){e.cache.eachLocal(function(r,n){o(e,r,"instantiate")!==!1&&t(n)})}function c(e){e.cache.eachLocal(function(t,r){o(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}return e.prototype={get:function(e){var t=this.dict;return t.hasOwnProperty(e)?t[e]:this.parent?this.parent.get(e):void 0},set:function(e,t){this.dict[e]=t},has:function(e){var t=this.dict;return t.hasOwnProperty(e)?!0:this.parent?this.parent.has(e):!1},eachLocal:function(e,t){var r=this.dict;for(var n in r)r.hasOwnProperty(n)&&e.call(t,n,r[n])}},t.prototype={child:function(){var e=new t(this);return this.children.push(e),e},set:function(e,t,r){e[t]=r},register:function(e,t,r,n){var i;-1!==e.indexOf(":")?(n=r,r=t,i=e):i=e+":"+t;var o=this.normalize(i);this.registry.set(o,r),this._options.set(o,n||{})},resolve:function(e){return this.resolver(e)||this.registry.get(e)},normalize:function(e){return e},lookup:function(e,t){if(e=this.normalize(e),t=t||{},this.cache.has(e)&&t.singleton!==!1)return this.cache.get(e);var r=s(this,e);return r?(n(this,e)&&t.singleton!==!1&&this.cache.set(e,r),r):void 0},has:function(e){return this.cache.has(e)?!0:!!a(this,e)},optionsForType:function(e,t){this.parent&&r("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,n){this.parent&&r("typeInjection");var i=this.typeInjections.get(e);i||(i=[],this.typeInjections.set(e,i)),i.push({property:t,fullName:n})},injection:function(e,t,n){if(this.parent&&r("injection"),-1===e.indexOf(":"))return this.typeInjection(e,t,n);var i=this.injections[e]=this.injections[e]||[];i.push({property:t,fullName:n})},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],u(this,function(e){e.isDestroying=!0}),u(this,function(e){e.destroy()}),delete this.parent,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)c(this.children[e]);c(this)}},t})}(),function(){function e(r,n,i,o){var a,s,u;if("object"!=typeof r||null===r)return r;if(n&&(s=t(i,r))>=0)return o[s];if("array"===Ember.typeOf(r)){if(a=r.slice(),n)for(s=a.length;--s>=0;)a[s]=e(a[s],n,i,o)}else if(Ember.Copyable&&Ember.Copyable.detect(r))a=r.copy(n,i,o);else{a={};for(u in r)r.hasOwnProperty(u)&&"__"!==u.substring(0,2)&&(a[u]=n?e(r[u],n,i,o):r[u])}return n&&(i.push(r),o.push(a)),a}var t=Ember.EnumerableUtils.indexOf;Ember.compare=function r(e,t){if(e===t)return 0;var n=Ember.typeOf(e),i=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===n&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===i&&o.detect(t.constructor))return 1-t.constructor.compare(t,e)}var a=Ember.ORDER_DEFINITION_MAPPING;if(!a){var s=Ember.ORDER_DEFINITION;a=Ember.ORDER_DEFINITION_MAPPING={};var u,c;for(u=0,c=s.length;c>u;++u)a[s[u]]=u;delete Ember.ORDER_DEFINITION}var l=a[n],h=a[i];if(h>l)return-1;if(l>h)return 1;switch(n){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var m=e.localeCompare(t);return 0>m?-1:m>0?1:0;case"array":for(var f=e.length,p=t.length,d=Math.min(f,p),b=0,E=0;0===b&&d>E;)b=r(e[E],t[E]),E++;return 0!==b?b:p>f?-1:f>p?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var v=e.getTime(),g=t.getTime();return g>v?-1:v>g?1:0;default:return 0}},Ember.copy=function(t,r){return"object"!=typeof t||null===t?t:Ember.Copyable&&Ember.Copyable.detect(t)?t.copy(r):e(t,r,r?[]:null,r?[]:null)},Ember.inspect=function(e){if("object"!=typeof e||null===e)return e+"";var t,r=[];for(var n in e)if(e.hasOwnProperty(n)){if(t=e[n],"toString"===t)continue;"function"===Ember.typeOf(t)&&(t="function() { ... }"),r.push(n+": "+t)}return"{"+r.join(", ")+"}"},Ember.isEqual=function(e,t){return e&&"function"==typeof e.isEqual?e.isEqual(t):e===t},Ember.ORDER_DEFINITION=Ember.ENV.ORDER_DEFINITION||["undefined","null","boolean","number","string","array","object","instance","function","class","date"],Ember.keys=Object.keys,Ember.keys||(Ember.keys=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t});var n=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){for(var e=Error.prototype.constructor.apply(this,arguments),t=0;n.length>t;t++)this[n[t]]=e[n[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){Ember.RSVP=t("rsvp")}(),function(){var e=/[ _]/g,t={},r=/([a-z])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,o=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var r=0;return e.replace(/%@([0-9]+)?/g,function(e,n){return n=n?parseInt(n,0)-1:r++,e=t[n],(null===e?"(null)":void 0===e?"":e).toString()})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,o=i.hasOwnProperty(r);return o?i[r]:(n=Ember.String.decamelize(r).replace(e,"-"),i[r]=n,n)},camelize:function(e){return e.replace(n,function(e,t,r){return r?r.toUpperCase():""}).replace(/^([A-Z])/,function(e){return e.toLowerCase()})},classify:function(e){for(var t=e.split("."),r=[],n=0,i=t.length;i>n;n++){var o=Ember.String.camelize(t[n]);r.push(o.charAt(0).toUpperCase()+o.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(o,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,o=Ember.String.dasherize,a=Ember.String.underscore,s=Ember.String.capitalize,u=Ember.String.classify;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.fmt=function(){return e(this,arguments)},String.prototype.w=function(){return t(this)},String.prototype.loc=function(){return r(this,arguments)},String.prototype.camelize=function(){return n(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return o(this)},String.prototype.underscore=function(){return a(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return s(this)})}(),function(){var e=Array.prototype.slice;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Function)&&(Function.prototype.property=function(){var e=Ember.computed(this);return e.property.apply(e,arguments)},Function.prototype.observes=function(){return this.__ember_observes__=e.call(arguments),this},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this})}(),function(){function e(){return 0===s.length?{}:s.pop()}function t(e){return s.push(e),null}function r(e,t){function r(r){var o=n(r,e);return i?t===o:!!o}var i=2===arguments.length;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,a=Ember.EnumerableUtils.indexOf,s=[];Ember.Enumerable=Ember.Mixin.create({isEnumerable:!0,nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(0===n(this,"length"))return void 0;var r,i=e();return r=this.nextObject(0,null,i),t(i),r}).property("[]"),lastObject:Ember.computed(function(){var r=n(this,"length");if(0===r)return void 0;var i,o=e(),a=0,s=null;do s=i,i=this.nextObject(a++,s,o);while(void 0!==i);return t(o),s}).property("[]"),contains:function(e){return void 0!==this.find(function(t){return t===e})},forEach:function(r,i){if("function"!=typeof r)throw new TypeError;var o=n(this,"length"),a=null,s=e();void 0===i&&(i=null);for(var u=0;o>u;u++){var c=this.nextObject(u,a,s);r.call(i,c,u,this),a=c}return a=null,s=t(s),this},getEach:function(e){return this.mapProperty(e)},setEach:function(e,t){return this.forEach(function(r){i(r,e,t)})},map:function(e,t){var r=Ember.A([]);return this.forEach(function(n,i,o){r[i]=e.call(t,n,i,o)}),r},mapProperty:function(e){return this.map(function(t){return n(t,e)})},filter:function(e,t){var r=Ember.A([]);return this.forEach(function(n,i,o){e.call(t,n,i,o)&&r.push(n)}),r},reject:function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},filterProperty:function(){return this.filter(r.apply(this,arguments))},rejectProperty:function(e,t){var r=function(r){return n(r,e)===t},i=function(t){return!!n(t,e)},o=2===arguments.length?r:i;return this.reject(o)},find:function(r,i){var o=n(this,"length");void 0===i&&(i=null);for(var a,s,u=null,c=!1,l=e(),h=0;o>h&&!c;h++)a=this.nextObject(h,u,l),(c=r.call(i,a,h,this))&&(s=a),u=a;return a=u=null,l=t(l),s},findProperty:function(){return this.find(r.apply(this,arguments))},every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyProperty:function(){return this.every(r.apply(this,arguments))},some:function(e,t){return!!this.find(function(r,n,i){return!!e.call(t,r,n,i)})},someProperty:function(){return this.some(r.apply(this,arguments))},reduce:function(e,t,r){if("function"!=typeof e)throw new TypeError;var n=t;return this.forEach(function(t,i){n=e.call(null,n,t,i,this,r)},this),n},invoke:function(e){var t,r=Ember.A([]);return arguments.length>1&&(t=o.call(arguments,1)),this.forEach(function(n,i){var o=n&&n[e];"function"==typeof o&&(r[i]=t?o.apply(n,t):o.call(n))},this),r},toArray:function(){var e=Ember.A([]);return this.forEach(function(t,r){e[r]=t}),e},compact:function(){return this.filter(function(e){return null!=e})},without:function(e){if(!this.contains(e))return this;var t=Ember.A([]);return this.forEach(function(r){r!==e&&(t[t.length]=r)}),t},uniq:function(){var e=Ember.A([]);return this.forEach(function(t){0>a(e,t)&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){function e(e){return null===e||void 0===e}var t=Ember.get,r=(Ember.set,Ember.EnumerableUtils.map),n=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{isSCArray:!0,length:Ember.required(),objectAt:function(e){return 0>e||e>=t(this,"length")?void 0:t(this,e)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(e,r){return void 0!==r&&this.replace(0,t(this,"length"),r),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(t(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(r,n){var i=Ember.A([]),o=t(this,"length");for(e(r)&&(r=0),(e(n)||n>o)&&(n=o),0>r&&(r=o+r),0>n&&(n=o+n);n>r;)i[i.length]=this.objectAt(r++);return i},indexOf:function(e,r){var n,i=t(this,"length");for(void 0===r&&(r=0),0>r&&(r+=i),n=r;i>n;n++)if(this.objectAt(n,!0)===e)return n;return-1},lastIndexOf:function(e,r){var n,i=t(this,"length");for((void 0===r||r>=i)&&(r=i-1),0>r&&(r+=i),n=r;n>=0;n--)if(this.objectAt(n)===e)return n;return-1},addArrayObserver:function(e,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=t(this,"hasArrayObservers");return o||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",e,n),Ember.addListener(this,"@array:change",e,i),o||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(e,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=t(this,"hasArrayObservers");return o&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",e,n),Ember.removeListener(this,"@array:change",e,i),o&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(e,r,n){void 0===e?(e=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),Ember.isWatching(this,"@each")&&t(this,"@each"),Ember.sendEvent(this,"@array:before",[this,e,r,n]);var i,o;if(e>=0&&r>=0&&t(this,"hasEnumerableObservers")){i=[],o=e+r;for(var a=e;o>a;a++)i.push(this.objectAt(a))}else i=r;return this.enumerableContentWillChange(i,n),this},arrayContentDidChange:function(e,r,i){void 0===e?(e=0,r=i=-1):(void 0===r&&(r=-1),void 0===i&&(i=-1));var o,a;if(e>=0&&i>=0&&t(this,"hasEnumerableObservers")){o=[],a=e+i;for(var s=e;a>s;s++)o.push(this.objectAt(s))}else o=i;this.enumerableContentDidChange(r,o),Ember.sendEvent(this,"@array:change",[this,e,r,i]);var u=t(this,"length"),c=n(this,"firstObject"),l=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==l&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){Ember.Comparable=Ember.Mixin.create({isComparable:!0,compare:Ember.required(Function)})}(),function(){var e=Ember.get;Ember.set,Ember.Copyable=Ember.Mixin.create({copy:Ember.required(Function),frozenCopy:function(){if(Ember.Freezable&&Ember.Freezable.detect(this))return e(this,"isFrozen")?this:this.copy().freeze();throw new Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return e(this,"isFrozen")?this:(t(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var e=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.addObject(e)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.removeObject(e)},this),Ember.endPropertyChanges(this),this}})}(),function(){var e="Index out of range",t=[],r=Ember.get;Ember.set,Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=r(this,"length");return 0===e?this:(this.replace(0,e,t),this)},insertAt:function(t,n){if(t>r(this,"length"))throw new Error(e);return this.replace(t,0,[n]),this},removeAt:function(n,i){if("number"==typeof n){if(0>n||n>=r(this,"length"))throw new Error(e);void 0===i&&(i=1),this.replace(n,i,t)}return this},pushObject:function(e){return this.insertAt(r(this,"length"),e),e},pushObjects:function(e){return this.replace(r(this,"length"),0,e),this},popObject:function(){var e=r(this,"length");if(0===e)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(0===r(this,"length"))return null;var e=this.objectAt(0);return this.removeAt(0),e},unshiftObject:function(e){return this.insertAt(0,e),e},unshiftObjects:function(e){return this.replace(0,0,e),this},reverseObjects:function(){var e=r(this,"length");if(0===e)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this.replace(0,t,e),this},removeObject:function(e){for(var t=r(this,"length")||0;--t>=0;){var n=this.objectAt(t);n===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){var t={},r=arguments;1===arguments.length&&"array"===Ember.typeOf(arguments[0])&&(r=arguments[0]);for(var n=0;r.length>n;n++)t[r[n]]=e(this,r[n]);return t},set:function(e,r){return t(this,e,r),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,r){Ember.addBeforeObserver(this,e,t,r)},addObserver:function(e,t,r){Ember.addObserver(this,e,t,r)},removeObserver:function(e,t,r){Ember.removeObserver(this,e,t,r)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(r,n){return n||(n=1),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return n||(n=1),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){var e=Ember.get;Ember.set,Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,actionContext:null,targetObject:Ember.computed(function(){var t=e(this,"target");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("target"),actionContextObject:Ember.computed(function(){var t=e(this,"actionContext");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("actionContext"),triggerAction:function(t){t=t||{};var r=t.action||e(this,"action"),n=t.target||e(this,"targetObject"),i=t.actionContext||e(this,"actionContextObject")||this;if(n&&r){var o;return o=n.send?n.send.apply(n,[r,i]):n[r].apply(n,[i]),o!==!1&&(o=!0),o}return!1
17
+ }})}(),function(){Ember.Evented=Ember.Mixin.create({on:function(e,t,r){return Ember.addListener(this,e,t,r),this},one:function(e,t,r){return r||(r=t,t=null),Ember.addListener(this,e,t,r,!0),this},trigger:function(e){var t,r,n=[];for(t=1,r=arguments.length;r>t;t++)n.push(arguments[t]);Ember.sendEvent(this,e,n)},fire:function(){this.trigger.apply(this,arguments)},off:function(e,t,r){return Ember.removeListener(this,e,t,r),this},has:function(e){return Ember.hasListeners(this,e)}})}(),function(){var e=t("rsvp");e.async=function(e,t){Ember.run.schedule("actions",t,e)};var r=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(){var e=r(this,"promise");return e.then.apply(e,arguments)},resolve:function(e){r(this,"promise").resolve(e)},reject:function(e){r(this,"promise").reject(e)},promise:Ember.computed(function(){return new e.Promise})})}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function e(){var e,t,o=!1,a=function(){o||a.proto(),n(this,i,v),n(this,"_super",v);var u=s(this);if(u.proto=this,e){var l=e;e=null,this.reopen.apply(this,l)}if(t){var h=t;t=null;for(var m=this.concatenatedProperties,f=0,d=h.length;d>f;f++){var g=h[f];for(var y in g)if(g.hasOwnProperty(y)){var w=g[y],_=Ember.IS_BINDING;if(_.test(y)){var C=u.bindings;C?u.hasOwnProperty("bindings")||(C=u.bindings=r(u.bindings)):C=u.bindings={},C[y]=w}var O=u.descs[y];if(m&&E(m,y)>=0){var S=this[y];w=S?"function"==typeof S.concat?S.concat(w):Ember.makeArray(S).concat(w):Ember.makeArray(w)}O?O.set(this,y,w):"function"!=typeof this.setUnknownProperty||y in this?b?Ember.defineProperty(this,y,null,w):this[y]=w:this.setUnknownProperty(y,w)}}}p(this,u),delete u.proto,c(this),this.init.apply(this,arguments)};return a.toString=m.prototype.toString,a.willReopen=function(){o&&(a.PrototypeMixin=m.create(a.PrototypeMixin)),o=!1},a._initMixins=function(t){e=t},a._initProperties=function(e){t=e},a.proto=function(){var e=a.superclass;return e&&e.proto(),o||(o=!0,a.PrototypeMixin.applyPartial(a.prototype),u(a.prototype)),this.prototype},a}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,a=Ember.generateGuid,s=Ember.meta,u=Ember.rewatch,c=Ember.finishChains,l=Ember.destroy,h=Ember.run.schedule,m=Ember.Mixin,f=m._apply,p=m.finishPartial,d=m.prototype.reopen,b=Ember.ENV.MANDATORY_SETTER,E=Ember.EnumerableUtils.indexOf,v={configurable:!0,writable:!0,enumerable:!1,value:void 0},g=e();g.toString=function(){return"Ember.CoreObject"},g.PrototypeMixin=m.create({reopen:function(){return f(this,arguments,!0),this},isInstance:!0,init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this._didCallDestroy?void 0:(this.isDestroying=!0,this._didCallDestroy=!0,h("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.willDestroy&&this.willDestroy(),l(this),this.isDestroyed=!0,this.didDestroy&&this.didDestroy()},bind:function(e,t){return t instanceof Ember.Binding||(t=Ember.Binding.from(t)),t.to(e).connect(this),t},toString:function(){var e="function"==typeof this.toStringExtension,r=e?":"+this.toStringExtension():"",n="<"+this.constructor.toString()+":"+o(this)+r+">";return this.toString=t(n),n}}),g.PrototypeMixin.ownerConstructor=g,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(g.PrototypeMixin),g.__super__=null;var y=m.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=m.create(this.ClassMixin),n.PrototypeMixin=m.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,d.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,a(t,"ember"),s(t).proto=t,n.ClassMixin.apply(n),n},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),d.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return d.apply(this.ClassMixin,arguments),f(this,arguments,!1),this},detect:function(e){if("function"!=typeof e)return!1;for(;e;){if(e===this)return!0;e=e.superclass}return!1},detectInstance:function(e){return e instanceof this},metaForProperty:function(e){var t=s(this.proto(),!1).descs[e];return t._meta||{}},eachComputedProperty:function(e,t){var r,n=this.proto(),i=s(n).descs,o={};for(var a in i)r=i[a],r instanceof Ember.ComputedProperty&&e.call(t||this,a,r._meta||o)}});y.ownerConstructor=g,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(y),g.ClassMixin=y,y.apply(g),Ember.CoreObject=g}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var a=t.length;c[t.join(".")]=r;for(var s in r)if(l.call(r,s)){var u=r[s];if(t[a]=s,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=a}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else{var t=r(this);e=t?"(subclass of "+t+")":"(unknown mixin)",this.toString=o(e)}return e}function i(){var r=!u.PROCESSED,n=Ember.anyUnprocessedMixins;if(r&&(t(),u.PROCESSED=!0),r||n){for(var i,o=u.NAMESPACES,a=0,s=o.length;s>a;a++)i=o[a],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function o(e){return function(){return e}}var a=Ember.get,s=Ember.ArrayPolyfills.indexOf,u=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var e=a(this,"name");return e?e:(t(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){e([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=void 0,e.splice(s.call(e,this),1),this._super()}});u.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:i,byName:function(e){return Ember.BOOTED||i(),c[e]}});var c=u.NAMESPACES_BY_ID,l={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e="Index out of range",t=[],r=Ember.get;Ember.set,Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return r(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,n){r(this,"content").replace(e,t,n)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){r(this,"content"),this._setupContent()},"content"),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)},"arrangedContent"),_setupArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return r(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=r(this,"arrangedContent");return e?r(e,"length"):0}),_replace:function(e,t,n){var i=r(this,"content");return i&&this.replaceContent(e,t,n),this},replace:function(){if(r(this,"arrangedContent")!==r(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,n){if(t>r(this,"content.length"))throw new Error(e);return this._replace(t,0,[n]),this},insertAt:function(e,t){if(r(this,"arrangedContent")===r(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(n,i){if("number"==typeof n){var o,a=r(this,"content"),s=r(this,"arrangedContent"),u=[];if(0>n||n>=r(this,"length"))throw new Error(e);for(void 0===i&&(i=1),o=n;n+i>o;o++)u.push(a.indexOf(s.objectAt(o)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),o=0;u.length>o;o++)this._replace(u[o],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){return this._replace(r(this,"length"),0,e),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this._replace(0,t,e),this},unshiftObject:function(e){return this._insertAt(0,e),e},unshiftObjects:function(e){return this._replace(0,0,e),this},slice:function(){var e=this.toArray();return e.slice.apply(e,arguments)},arrangedContentArrayWillChange:function(e,t,r,n){this.arrayContentWillChange(t,r,n)},arrangedContentArrayDidChange:function(e,t,r,n){this.arrayContentDidChange(t,r,n)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function e(e,t){var r=t.slice(8);r in this||u(this,r)}function t(e,t){var r=t.slice(8);r in this||c(this,r)}var r=Ember.get,n=Ember.set,i=(Ember.String.fmt,Ember.addBeforeObserver),o=Ember.addObserver,a=Ember.removeBeforeObserver,s=Ember.removeObserver,u=Ember.propertyWillChange,c=Ember.propertyDidChange;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),o(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;a(this,n,null,e),s(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var i=r(this,"content");return n(i,e,t)}}),Ember.ObjectProxy.reopenClass({create:function(){var e,t,r,n,i,o;if(arguments.length){for(t=this.proto(),r=0,n=arguments.length;n>r;r++){i=arguments[r];for(o in i)!i.hasOwnProperty(o)||o in t||(e||(e={}),e[o]=null)}e&&this._initMixins([e])}return this._super.apply(this,arguments)}})}(),function(){function e(e,t,r,i,o){var a,s=r._objects;for(s||(s=r._objects={});--o>=i;){var u=e.objectAt(o);u&&(Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),a=n(u),s[a]||(s[a]=[]),s[a].push(o))}}function t(e,t,r,i,o){var a=r._objects;a||(a=r._objects={});for(var s,u;--o>=i;){var c=e.objectAt(o);c&&(Ember.removeBeforeObserver(c,t,r,"contentKeyWillChange"),Ember.removeObserver(c,t,r,"contentKeyDidChange"),u=n(c),s=a[u],s[s.indexOf(o)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.Object.extend(Ember.Array,{init:function(e,t,r){this._super(),this._keyName=t,this._owner=r,this._content=e},objectAt:function(e){var t=this._content.objectAt(e);return t&&r(t,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?r(e,"length"):0})}),a=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),i(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e){var t;return t=new o(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,o,a=this._keys;o=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in a)a.hasOwnProperty(i)&&(o>0&&t(e,i,this,r,o),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var o,a,s=this._keys;a=i>0?r+i:-1,Ember.beginPropertyChanges(this);for(o in s)s.hasOwnProperty(o)&&(a>0&&e(t,o,this,r,a),Ember.propertyDidChange(this,o));Ember.propertyDidChange(this._content,"@each"),Ember.endPropertyChanges(this)},didAddListener:function(e){a.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){a.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(t){var n=this._keys;if(n||(n=this._keys={}),n[t])n[t]++;else{n[t]=1;var i=this._content,o=r(i,"length");e(i,t,this,0,o)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&0>=--n[e]){var i=this._content,o=r(i,"length");t(i,e,this,0,o)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get;Ember.set;var t=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return"length"===e?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(t,r,n){if(this.isFrozen)throw Ember.FROZEN_ERROR;var i=n?e(n,"length"):0;if(this.arrayContentWillChange(t,r,i),n&&0!==n.length){var o=[t,r].concat(n);this.splice.apply(this,o)}else this.splice(t,r);return this.arrayContentDidChange(t,r,i),this},unknownProperty:function(e,t){var r;return void 0!==t&&void 0===r&&(r=this[e]=t),r},indexOf:function(e,t){var r,n=this.length;for(t=void 0===t?0:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var r,n=this.length;for(t=void 0===t?n-1:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;r>=0;r--)if(this[r]===e)return r;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),r=["length"];Ember.EnumerableUtils.forEach(t.keys(),function(e){Array.prototype[e]&&r.push(e)}),r.length>0&&(t=t.without.apply(t,r)),Ember.NativeArray=t,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){t.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.get,t=Ember.set,r=Ember.guidFor,n=Ember.isNone,i=Ember.String.fmt;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Error(Ember.FROZEN_ERROR);var n=e(this,"length");if(0===n)return this;var i;this.enumerableContentWillChange(n,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var o=0;n>o;o++)i=r(this[o]),delete this[i],delete this[o];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(n,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var r=e(this,"length");if(e(t,"length")!==r)return!1;for(;--r>=0;)if(!t.contains(this[r]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:void 0}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:void 0}),addObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a=r(i),s=this[a],u=e(this,"length");return s>=0&&u>s&&this[s]===i?this:(o=[i],this.enumerableContentWillChange(null,o),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[a]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,o),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a,s=r(i),u=this[s],c=e(this,"length"),l=0===u,h=u===c-1;return u>=0&&c>u&&this[u]===i&&(a=[i],this.enumerableContentWillChange(a,null),l&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),c-1>u&&(o=this[c-1],this[u]=o,this[r(o)]=u),delete this[s],delete this[c-1],t(this,"length",c-1),l&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(a,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin,t=Ember.get,r=Ember.Object.extend(e);r.reopenClass({promise:function(e,n){var i=r.create();return e.call(n,i),t(i,"promise")}}),Ember.Deferred=r}(),function(){var e=Ember.ENV.EMBER_LOAD_HOOKS||{},t={};Ember.onLoad=function(r,n){var i;e[r]=e[r]||Ember.A(),e[r].pushObject(n),(i=t[r])&&n(i)},Ember.runLoadHooks=function(r,n){var i;t[r]=n,(i=e[r])&&e[r].forEach(function(e){e(n)})}}(),function(){var e=Ember.get;Ember.ControllerMixin=Ember.Mixin.create({isController:!0,target:null,container:null,store:null,model:Ember.computed.alias("content"),send:function(t){var r,n=[].slice.call(arguments,1);this[t]?this[t].apply(this,n):(r=e(this,"target"))&&r.send.apply(r,arguments)}}),Ember.Controller=Ember.Object.extend(Ember.ControllerMixin)}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach);Ember.SortableMixin=Ember.Mixin.create(Ember.MutableEnumerable,{sortProperties:null,sortAscending:!0,orderBy:function(r,n){var i=0,o=e(this,"sortProperties"),a=e(this,"sortAscending");return t(o,function(t){0===i&&(i=Ember.compare(e(r,t),e(n,t)),0===i||a||(i=-1*i))}),i},destroy:function(){var r=e(this,"content"),n=e(this,"sortProperties");return r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(){var r=e(this,"content"),n=e(this,"isSorted"),i=e(this,"sortProperties"),o=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return o.orderBy(e,t)}),t(r,function(e){t(i,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(r)):r}),_contentWillChange:Ember.beforeObserver(function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(r,n,i,o){var a=e(this,"isSorted");if(a){var s=e(this,"arrangedContent"),u=r.slice(n,n+i),c=e(this,"sortProperties");t(u,function(e){s.removeObject(e),t(c,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var a=e(this,"isSorted"),s=e(this,"sortProperties");if(a){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(s,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),a=i&&this.orderBy(t,i),s=o&&this.orderBy(t,o);(0>a||s>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,a,s;return r===n?r:(s=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=s.objectAt(i),a=this.orderBy(o,t),0>a?this._binarySearch(t,i+1,n):a>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var a=e(this,"_subControllers"),s=a.slice(n,n+i);t(s,function(e){e&&e.destroy()}),r(a,n,i,new Array(o)),this._super(n,i,o)},init:function(){this.get("content")||Ember.defineProperty(this,"content",void 0,Ember.A()),this._super(),this.set("_subControllers",Ember.A())},controllerAt:function(t,r,n){var i=e(this,"container"),o=e(this,"_subControllers"),a=o[t];if(a||(a=i.lookup("controller:"+n,{singleton:!1}),o[t]=a),!a)throw new Error('Could not resolve itemController: "'+n+'"');return a.set("target",this),a.set("content",r),a},_subControllers:null,_resetSubControllers:function(){var r=e(this,"_subControllers");r&&t(r,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){var e=Ember.imports.jQuery;Ember.$=e}(),function(){if(Ember.$){var e=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(e,function(e){Ember.$.event.fixHooks[e]={props:["dataTransfer"]}})}}(),function(){function e(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,r=e.which>1;return!t&&!r}var t=this.document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),r=this.document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,a=e.childNodes.length;for(r=0;a>r;r++)if(i=e.childNodes[r],o=1===i.nodeType&&n(i,t))return o},i=function(e,i){t&&(i="&shy;"+i);var o=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return o.push([n,t]),r})),e.innerHTML=i,o.length>0){var a,s=o.length;for(a=0;s>a;a++){var u=n(e,o[a][0]),c=document.createTextNode(o[a][1]);u.parentNode.insertBefore(c,u)}}if(t){for(var l=e.firstChild;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&"­"===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}},o={},a=function(e){if(void 0!==o[e])return o[e];var t=!0;if("select"===e.toLowerCase()){var r=document.createElement("select");i(r,'<option value="test">Test</option>'),t=1===r.options.length}return o[e]=t,t},s=function(e,t){var r=e.tagName;if(a(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),o=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],s="</"+r+">",u=document.createElement("div");for(i(u,o+t+s),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:s,isSimpleClick:e}}(),function(){function e(e){return e?n.test(e)?e.replace(i,""):e:e}function t(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=function(e){return t[e]||"&amp;"},n=e.toString();return a.test(n)?n.replace(o,r):n}Ember.get,Ember.set;var r=function(){this.seen={},this.list=[]};r.prototype={add:function(e){e in this.seen||(this.seen[e]=!0,this.list.push(e))},toDOM:function(){return this.list.join(" ")}};var n=/[^a-zA-Z\-]/,i=/[^a-zA-Z\-]/g,o=/&(?!\w+;)|[<>"'`]/g,a=/[&<>"'`]/;Ember.RenderBuffer=function(e){return new Ember._RenderBuffer(e)},Ember._RenderBuffer=function(e){this.tagNames=[e||null],this.buffer=""},Ember._RenderBuffer.prototype={_element:null,_hasElement:!0,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer+=e,this},addClass:function(e){return this.elementClasses=this.elementClasses||new r,this.elementClasses.add(e),this.classes=this.elementClasses.list,this},setClasses:function(e){this.classes=e},id:function(e){return this.elementId=e,this},attr:function(e,t){var r=this.elementAttributes=this.elementAttributes||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var r=this.elementProperties=this.elementProperties||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){return this.elementStyle=this.elementStyle||{},this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var r=this.currentTagName();if(r){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var n,i,o=this.buffer,a=this.elementId,s=this.classes,u=this.elementAttributes,c=this.elementProperties,l=this.elementStyle;if(o+="<"+e(r),a&&(o+=' id="'+t(a)+'"',this.elementId=null),s&&(o+=' class="'+t(s.join(" "))+'"',this.classes=null),l){o+=' style="';for(i in l)l.hasOwnProperty(i)&&(o+=i+":"+t(l[i])+";");o+='"',this.elementStyle=null}if(u){for(n in u)u.hasOwnProperty(n)&&(o+=" "+n+'="'+t(u[n])+'"');this.elementAttributes=null}if(c){for(i in c)if(c.hasOwnProperty(i)){var h=c[i];(h||"number"==typeof h)&&(o+=h===!0?" "+i+'="'+i+'"':" "+i+'="'+t(c[i])+'"')}this.elementProperties=null}o+=">",this.buffer=o}},pushClosingTag:function(){var t=this.tagNames.pop();t&&(this.buffer+="</"+e(t)+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var e,t,r=this.tagNames.pop(),n=document.createElement(r),i=Ember.$(n),o=this.elementId,a=this.classes,s=this.elementAttributes,u=this.elementProperties,c=this.elementStyle,l="";if(o&&(i.attr("id",o),this.elementId=null),a&&(i.attr("class",a.join(" ")),this.classes=null),c){for(t in c)c.hasOwnProperty(t)&&(l+=t+":"+c[t]+";");i.attr("style",l),this.elementStyle=null}if(s){for(e in s)s.hasOwnProperty(e)&&i.attr(e,s[e]);this.elementAttributes=null}if(u){for(t in u)u.hasOwnProperty(t)&&i.prop(t,u[t]);this.elementProperties=null}return n},element:function(){var e=this.innerString();return e&&(this._element=Ember.ViewUtils.setInnerHTML(this._element,e)),this._element},string:function(){if(this._hasElement&&this._element){var e=this.element(),t=e.outerHTML;return"undefined"==typeof t?Ember.$("<div/>").append(e).html():t}return this.innerString()},innerString:function(){return this.buffer}}}(),function(){var e=Ember.get;Ember.set,Ember.String.fmt,Ember.EventDispatcher=Ember.Object.extend({rootElement:"body",setup:function(t){var r,n={touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"};Ember.$.extend(n,t||{});var i=Ember.$(e(this,"rootElement"));i.addClass("ember-application");for(r in n)n.hasOwnProperty(r)&&this.setupHandler(i,r,n[r])},setupHandler:function(e,t,r){var n=this;e.delegate(".ember-view",t+".ember",function(e,t){return Ember.handleErrors(function(){var i=Ember.View.views[this.id],o=!0,a=null;return a=n._findNearestEventManager(i,r),a&&a!==t?o=n._dispatchEvent(a,e,r,i):i?o=n._bubbleEvent(i,e,r):e.stopPropagation(),o},this)}),e.delegate("[data-ember-action]",t+".ember",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),n=Ember.Handlebars.ActionHelper.registeredActions[t];return n&&n.eventName===r?n.handler(e):void 0},this)})},_findNearestEventManager:function(t,r){for(var n=null;t&&(n=e(t,"eventManager"),!n||!n[r]);)t=e(t,"parentView");return n},_dispatchEvent:function(e,t,r,n){var i=!0,o=e[r];return"function"===Ember.typeOf(o)?(i=o.call(e,t,n),t.stopPropagation()):i=this._bubbleEvent(n,t,r),i},_bubbleEvent:function(e,t,r){return Ember.run(function(){return e.handleEvent(r,t)})},destroy:function(){var t=e(this,"rootElement");return Ember.$(t).undelegate(".ember").removeClass("ember-application"),this._super()}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"render","afterRender")}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({target:null,namespace:null,view:null,container:null,_childContainers:null,init:function(){this._super(),t(this,"_childContainers",{})},_modelDidChange:Ember.observer(function(){var r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})},"model")})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,o=Ember.EnumerableUtils.forEach,a=Ember.EnumerableUtils.addObject,s=Ember.computed(function(){var e=this._childViews,t=Ember.A(),n=this;return o(e,function(e){e.isVirtual?t.pushObjects(r(e,"childViews")):t.push(e)}),t.replace=function(e,t,r){if(n instanceof Ember.ContainerView)return n.replace(e,t,r);throw new Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,{isView:!0,states:t,init:function(){this._super(),this.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?r(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?r(this,"parentView"):this}).property("parentView"),instrumentName:"core_view",instrumentDetails:function(e){e.object=this.toString()},renderToBuffer:function(e,t){var r="render."+this.instrumentName,n={};return this.instrumentDetails(n),Ember.instrument(r,n,function(){return this._renderToBuffer(e,t)},this)},_renderToBuffer:function(e){var t=this.tagName;(null===t||void 0===t)&&(t="div");var r=this.buffer=e&&e.begin(t)||Ember.RenderBuffer(t);return this.transitionTo("inBuffer",!1),this.beforeRender(r),this.render(r),this.afterRender(r),r},trigger:function(e){this._super.apply(this,arguments);var t=this[e];if(t){var r,n,i=[];for(r=1,n=arguments.length;n>r;r++)i.push(arguments[r]);return t.apply(this,i)}},has:function(e){return"function"===Ember.typeOf(this[e])||this._super(e)},destroy:function(){var e=this._parentView;if(this._super())return this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroying",!1),this},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K});var u=Ember._ViewCollection=function(e){var t=this.views=e||[];
18
+ this.length=t.length};u.prototype={length:0,trigger:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],t.trigger&&t.trigger(e)},triggerRecursively:function(e){for(var t=this.views,r=0,n=t.length;n>r;r++)t[r].triggerRecursively(e)},invokeRecursively:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],e(t)},transitionTo:function(e,t){for(var r=this.views,n=0,i=r.length;i>n;n++)r[n].transitionTo(e,t)},push:function(){this.length+=arguments.length;var e=this.views;return e.push.apply(e,arguments)},objectAt:function(e){return this.views[e]},forEach:function(e){var t=this.views;return o(t,e)},clear:function(){this.length=0,this.views.length=0}};var c=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,template:Ember.computed(function(e,t){if(void 0!==t)return t;var n=r(this,"templateName"),i=this.templateForName(n,"template");return i||r(this,"defaultTemplate")}).property("templateName"),controller:Ember.computed(function(){var e=r(this,"_parentView");return e?r(e,"controller"):null}).property("_parentView"),layout:Ember.computed(function(){var e=r(this,"layoutName"),t=this.templateForName(e,"layout");return t||r(this,"defaultLayout")}).property("layoutName"),templateForName:function(e){if(e){var t=this.container||Ember.Container&&Ember.Container.defaultContainer;return t&&t.lookup("template:"+e)}},context:Ember.computed(function(e,t){return 2===arguments.length?(n(this,"_context",t),t):r(this,"_context")}).volatile(),_context:Ember.computed(function(){var e,t;return(t=r(this,"controller"))?t:(e=this._parentView,e?r(e,"_context"):null)}),_contextDidChange:Ember.observer(function(){this.rerender()},"context"),isVisible:!0,childViews:s,_childViews:c,_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}},"childViews"),nearestInstanceOf:function(e){for(var t=r(this,"parentView");t;){if(t instanceof e)return t;t=r(t,"parentView")}},nearestOfType:function(e){for(var t=r(this,"parentView"),n=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(n(t))return t;t=r(t,"parentView")}},nearestWithProperty:function(e){for(var t=r(this,"parentView");t;){if(e in t)return t;t=r(t,"parentView")}},nearestChildOf:function(e){for(var t=r(this,"parentView");t;){if(r(t,"parentView")instanceof e)return t;t=r(t,"parentView")}},_parentViewDidChange:Ember.observer(function(){this.isDestroying||r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller")},"_parentView"),_controllerDidChange:Ember.observer(function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))},"controller"),cloneKeywords:function(){var e=r(this,"templateData"),t=e?Ember.copy(e.keywords):{};return n(t,"view",r(this,"concreteView")),n(t,"_view",this),n(t,"controller",r(this,"controller")),t},render:function(e){var t=r(this,"layout")||r(this,"template");if(t){var n,i=r(this,"context"),o=this.cloneKeywords(),a={view:this,buffer:e,isRenderData:!0,keywords:o,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:a}),void 0!==n&&e.push(n)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){for(var e=this.lengthBeforeRender,t=this.lengthAfterRender,r=this._childViews,n=t-1;n>=e;n--)r[n]&&r[n].destroy()},_applyClassNameBindings:function(e){var t,r,n,i=this.classNames;o(e,function(e){var o,s=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),o&&(t.removeClass(o),i.removeObject(o)),r?(t.addClass(r),o=r):o=null};n=this._classStringForProperty(e),n&&(a(i,n),o=n),this.registerObserver(this,s.path,u),this.one("willClearRender",function(){o&&(i.removeObject(o),o=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;o(t,function(t){var o=t.split(":"),a=o[0],s=o[1]||a,u=function(){i=this.$(),n=r(this,a),Ember.View.applyAttributeBindings(i,s,n)};this.registerObserver(this,a,u),n=r(this,a),Ember.View.applyAttributeBindings(e,s,n)},this)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),n=t.path,i=r(this,n);return void 0===i&&Ember.isGlobalPath(n)&&(i=r(Ember.lookup,n)),Ember.View._classStringForValue(n,i,t.className,t.falsyClassName)},element:Ember.computed(function(e,t){return void 0!==t?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){for(var t,r=this._childViews,n=r.length;--n>=0;)t=r[n],e(this,t,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var r,n,i=t.length;for(n=0;i>n;n++)r=t[n],e(r);return this},appendTo:function(e){return this._insertElementLater(function(){this.$().appendTo(e)}),this},replaceIn:function(e){return this._insertElementLater(function(){Ember.$(e).empty(),this.$().appendTo(e)}),this},_insertElementLater:function(e){this._scheduledInsert=Ember.run.scheduleOnce("render",this,"_insertElement",e)},_insertElement:function(e){this._scheduledInsert=null,this.currentState.insertElement(this,e)},append:function(){return this.appendTo(document.body)},remove:function(){this.removedFromDOM||this.destroyElement(),this.invokeRecursively(function(e){e.clearRenderedChildren&&e.clearRenderedChildren()})},elementId:null,findElementInParentElement:function(e){var t="#"+this.elementId;return Ember.$(t)[0]||Ember.$(t,e)[0]},createElement:function(){if(r(this,"element"))return this;var e=this.renderToBuffer();return n(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e,t){for(var r,n,i=t===!1?this._childViews:[this];i.length;){r=i.slice(),i=[];for(var o=0,a=r.length;a>o;o++)n=r[o],e(n),n._childViews&&i.push.apply(i,n._childViews)}},triggerRecursively:function(e){for(var t,r,n=[this];n.length;){t=n.slice(),n=[];for(var i=0,o=t.length;o>i;i++)r=t[i],r.trigger&&r.trigger(e),r._childViews&&n.push.apply(n,r._childViews)}},viewHierarchyCollection:function(){for(var e,t=new u([this]),r=0;t.length>r;r++)e=t.objectAt(r),e._childViews&&t.push.apply(t,e._childViews);return t},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:function(){},_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_elementWillChange:Ember.beforeObserver(function(){this.forEachChildView(function(e){Ember.propertyWillChange(e,"element")})},"element"),_elementDidChange:Ember.observer(function(){this.forEachChildView(function(e){Ember.propertyDidChange(e,"element")})},"element"),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=r(this,"templateName"),this._super(e)},_renderToBuffer:function(e,t){this.lengthBeforeRender=this._childViews.length;var r=this._super(e,t);return this.lengthAfterRender=this._childViews.length,r},renderToBufferIfNeeded:function(e){return this.currentState.renderToBufferIfNeeded(this,e)},beforeRender:function(e){this.applyAttributesToBuffer(e),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag()},applyAttributesToBuffer:function(e){var t=r(this,"classNameBindings");t.length&&this._applyClassNameBindings(t);var n=r(this,"attributeBindings");n.length&&this._applyAttributeBindings(e,n),e.setClasses(this.classNames),e.id(this.elementId);var i=r(this,"ariaRole");i&&e.attr("role",i),r(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:c,attributeBindings:c,init:function(){this.elementId=this.elementId||i(this),this._super(),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice());var e=r(this,"viewController");e&&(e=r(e),e&&n(e,"view",this))},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(!this.isDestroying){n(e,"_parentView",null);var t=this._childViews;return Ember.EnumerableUtils.removeObject(t,e),this.propertyDidChange("childViews"),this}},removeAllChildren:function(){return this.mutateChildViews(function(e,t){e.removeChild(t)})},destroyAllChildren:function(){return this.mutateChildViews(function(e,t){t.destroy()})},removeFromParent:function(){var e=this._parentView;return this.remove(),e&&e.removeChild(this),this},destroy:function(){var e,t,n=this._childViews,i=r(this,"parentView"),o=this.viewName;if(this._super()){for(e=n.length,t=e-1;t>=0;t--)n[t].removedFromDOM=!0;for(o&&i&&i.set(o,null),e=n.length,t=e-1;t>=0;t--)n[t].destroy();return this}},createChildView:function(e,t){return e.isView&&e._parentView===this?e:(Ember.CoreView.detect(e)?(t=t||{},t._parentView=this,t.container=this.container,t.templateData=t.templateData||r(this,"templateData"),e=e.create(t),e.viewName&&n(r(this,"concreteView"),e.viewName,e)):(t&&e.setProperties(t),r(e,"templateData")||n(e,"templateData",r(this,"templateData")),n(e,"_parentView",this)),e)},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}},"isVisible"),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){for(var e=r(this,"parentView");e;){if(r(e,"isVisible")===!1)return!0;e=r(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(e){e.buffer=null})},transitionTo:function(e,t){var r=this.currentState,n=this.currentState=this.states[e];this.state=e,r&&r.exit&&r.exit(this),n.enter&&n.enter(this),t!==!1&&this.forEachChildView(function(t){t.transitionTo(e)})},handleEvent:function(e,t){return this.currentState.handleEvent(this,e,t)},registerObserver:function(e,t,r,n){n||"function"!=typeof r||(n=r,r=null);var i=this,o=function(){i.currentState.invokeObserver(this,n)},a=function(){Ember.run.scheduleOnce("render",this,o)};Ember.addObserver(e,t,r,a),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,a)})}});var l={prepend:function(t,r){t.$().prepend(r),e()},after:function(t,r){t.$().after(r),e()},html:function(t,r){t.$().html(r),e()},replace:function(t){var i=r(t,"element");n(t,"element",null),t._insertElementLater(function(){Ember.$(i).replaceWith(r(t,"element")),e()})},remove:function(t){t.$().remove(),e()},empty:function(t){t.$().empty(),e()}};Ember.View.reopen({domManager:l}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t,r,n=e.split(":"),i=n[0],o="";return n.length>1&&(t=n[1],3===n.length&&(r=n[2]),o=":"+t,r&&(o+=":"+r)),{path:i,classNames:o,className:""===t?void 0:t,falsyClassName:r}},_classStringForValue:function(e,t,r,n){if(r||n)return r&&t?r:n&&!t?n:null;if(t===!0){var i=e.split(".");return Ember.String.dasherize(i[i.length-1])}return t!==!1&&void 0!==t&&null!==t?t:null}});var h=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){h.on("change",e)},Ember.View.removeMutationListener=function(e){h.off("change",e)},Ember.View.notifyMutationListeners=function(){h.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=s,Ember.View.applyAttributeBindings=function(e,t,r){var n=Ember.typeOf(r);"value"===t||"string"!==n&&("number"!==n||isNaN(r))?"value"===t||"boolean"===n?(void 0===r&&(r=null),r!==e.prop(t)&&e.prop(t,r)):r||e.removeAttr(t):r!==e.attr(t)&&e.attr(t,r)},Ember.View.states=t}(),function(){var e=(Ember.get,Ember.set);Ember.View.states._default={appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return void 0},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(t){return e(t,"element",null),t._scheduledInsert&&(Ember.run.cancel(t._scheduledInsert),t._scheduledInsert=null),t},renderToBufferIfNeeded:function(){return!1},rerender:Ember.K,invokeObserver:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement();var r=e.viewHierarchyCollection();r.trigger("willInsertElement"),t.call(e),r.transitionTo("inDOM",!1),r.trigger("didInsertElement")},renderToBufferIfNeeded:function(e,t){return e.renderToBuffer(t),!0},empty:Ember.K,setElement:function(e,t){return null!==t&&e.transitionTo("hasElement"),t}})}(),function(){Ember.get,Ember.set;var e=Ember.View.states.inBuffer=Ember.create(Ember.View.states._default);Ember.merge(e,{$:function(e){return e.rerender(),Ember.$()},rerender:function(){throw new Ember.Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.")},appendChild:function(e,t,r){var n=e.buffer,i=e._childViews;return t=e.createChildView(t,r),i.length||(i=e._childViews=i.slice()),i.push(t),t.renderToBuffer(n),e.propertyDidChange("childViews"),t},destroyElement:function(e){e.clearBuffer();var t=e._notifyWillDestroyElement();return t.transitionTo("preRender",!1),e},empty:function(){},renderToBufferIfNeeded:function(){return!1},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(e,t){return null===t?e.transitionTo("preRender"):(e.clearBuffer(),e.transitionTo("hasElement")),t},invokeObserver:function(e,t){t.call(e)}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(t,r){var n=e(t,"element");return r?Ember.$(r,n):Ember.$(n)},getElement:function(t){var r=e(t,"parentView");return r&&(r=e(r,"element")),r?t.findElementInParentElement(r):Ember.$("#"+e(t,"elementId"))[0]},setElement:function(e,t){if(null!==t)throw"You cannot set an element to a non-null value when the element is already in the DOM.";return e.transitionTo("preRender"),t},rerender:function(e){return e.triggerRecursively("willClearRender"),e.clearRenderedChildren(),e.domManager.replace(e),e},destroyElement:function(e){return e._notifyWillDestroyElement(),e.domManager.remove(e),t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},empty:function(e){var t,r,n=e._childViews;if(n)for(t=n.length,r=0;t>r;r++)n[r]._notifyWillDestroyElement();e.domManager.empty(e)},handleEvent:function(e,t,r){return e.has(t)?e.trigger(t,r):!0},invokeObserver:function(e,t){t.call(e)}});var n=Ember.View.states.inDOM=Ember.create(r);Ember.merge(n,{enter:function(e){e.isVirtual||(Ember.View.views[e.elementId]=e),e.addBeforeObserver("elementId",function(){throw new Error("Changing a view's elementId after creation is not allowed")})},exit:function(e){this.isVirtual||delete Ember.View.views[e.elementId]},insertElement:function(){throw"You can't insert an element into the DOM that has already been inserted"}})}(),function(){var e="You can't call %@ on a view being destroyed",t=Ember.String.fmt,r=Ember.View.states.destroying=Ember.create(Ember.View.states._default);Ember.merge(r,{appendChild:function(){throw t(e,["appendChild"])},rerender:function(){throw t(e,["rerender"])},destroyElement:function(){throw t(e,["destroyElement"])},empty:function(){throw t(e,["empty"])},setElement:function(){throw t(e,["set('element', ...)"])},renderToBufferIfNeeded:function(){return!1},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroying=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);for(var r in e)e.hasOwnProperty(r)&&Ember.merge(t[r],e[r]);return t}}(),function(){function e(e,t,r,n){t.triggerRecursively("willInsertElement"),r?r.domManager.after(r,n.string()):e.domManager.prepend(e,n.string()),t.forEach(function(e){e.transitionTo("inDOM"),e.propertyDidChange("element"),e.triggerRecursively("didInsertElement")})}var t=Ember.View.cloneStates(Ember.View.states),r=Ember.get,n=Ember.set,i=Ember.EnumerableUtils.forEach,o=Ember._ViewCollection;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:t,init:function(){this._super();var e=r(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var t=this._childViews;i(e,function(e,i){var o;"string"==typeof e?(o=r(this,e),o=this.createChildView(o),n(this,e,o)):o=this.createChildView(e),t[i]=o},this);var o=r(this,"currentView");o&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(o)))},replace:function(e,t,n){var i=n?r(n,"length"):0;if(this.arrayContentWillChange(e,t,i),this.childViewsWillChange(this._childViews,e,t),0===i)this._childViews.splice(e,t);else{var o=[e,t].concat(n);n.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,o)}return this.arrayContentDidChange(e,t,i),this.childViewsDidChange(this._childViews,e,t,i),this},objectAt:function(e){return this._childViews[e]},length:Ember.computed(function(){return this._childViews.length}),render:function(e){this.forEachChildView(function(t){t.renderToBuffer(e)})},instrumentName:"render.container",childViewsWillChange:function(e,t,r){if(this.propertyWillChange("childViews"),r>0){var n=e.slice(t,t+r);this.currentState.childViewsWillChange(this,e,t,r),this.initializeViews(n,null,null)}},removeChild:function(e){return this.removeObject(e),this},childViewsDidChange:function(e,t,n,i){if(i>0){var o=e.slice(t,t+i);this.initializeViews(o,this,r(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,o){i(e,function(e){n(e,"_parentView",t),r(e,"templateData")||n(e,"templateData",o)})},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var e=r(this,"currentView");e&&e.destroy()},"currentView"),_currentViewDidChange:Ember.observer(function(){var e=r(this,"currentView");e&&this.pushObject(e)},"currentView"),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}}),Ember.merge(t._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K}),Ember.merge(t.inBuffer,{childViewsDidChange:function(){throw new Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(t.hasElement,{childViewsWillChange:function(e,t,r,n){for(var i=r;r+n>i;i++)t[i].remove()},childViewsDidChange:function(e){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(t){var r,n,i,a,s,u=t._childViews,c=new o;for(r=0,n=u.length;n>r;r++)i=u[r],s||(s=Ember.RenderBuffer(),s._hasElement=!1),i.renderToBufferIfNeeded(s)?c.push(i):c.length?(e(t,c,a,s),s=null,a=i,c.clear()):a=i;c.length&&e(t,c,a,s)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver(function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)},"content"),_contentDidChange:Ember.observer(function(){var t=e(this,"content");t&&t.addArrayObserver(this);var r=t?e(t,"length"):0;this.arrayDidChange(t,0,null,r)},"content"),destroy:function(){if(this._super()){var t=e(this,"content");return t&&t.removeArrayObserver(this),this._createdEmptyView&&this._createdEmptyView.destroy(),this}},arrayWillChange:function(t,r,n){var i=e(this,"emptyView");i&&i instanceof Ember.View&&i.removeFromParent();var o,a,s,u=this._childViews;s=this._childViews.length;var c=n===s;for(c&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),a=r+n-1;a>=r;a--)o=u[a],o.destroy()},arrayDidChange:function(r,n,i,o){var a,s,u,c,l=e(this,"itemViewClass"),h=[];if("string"==typeof l&&(l=e(l)),c=r?e(r,"length"):0)for(u=n;n+o>u;u++)s=r.objectAt(u),a=this.createChildView(l,{content:s,contentIndex:u}),h.push(a);else{var m=e(this,"emptyView");if(!m)return;var f=Ember.CoreView.detect(m);m=this.createChildView(m),h.push(m),t(this,"emptyView",m),f&&(this._createdEmptyView=m)}this.replace(n,0,h)},createChildView:function(r,n){r=this._super(r,n);var i=e(r,"tagName"),o=null===i||void 0===i?Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")]:i;return t(r,"tagName",o),r}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){e("metamorph",[],function(){"use strict";// Copyright: ©2011 My Company Inc. All rights reserved.
19
+ var e=function(){},t=0,r=this.document,n=r&&"createRange"in r&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,i=r&&function(){var e=r.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),o=r&&function(){var e=r.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),a=function(r){var n;n=this instanceof a?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=a.prototype;var s,u,c,l,h,m,f,p,d;if(l=function(){return this.startTag()+this.innerHTML+this.endTag()},p=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},d=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"},n)s=function(e,t){var n=r.createRange(),i=r.getElementById(e.start),o=r.getElementById(e.end);return t?(n.setStartBefore(i),n.setEndAfter(o)):(n.setStartAfter(i),n.setEndBefore(o)),n},u=function(e,t){var r=s(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},c=function(){var e=s(this,!0);e.deleteContents()},h=function(e){var t=r.createRange();t.setStart(e),t.collapse(!1);var n=t.createContextualFragment(this.outerHTML());e.appendChild(n)},m=function(e){var t=r.createRange(),n=r.getElementById(this.end);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)},f=function(e){var t=r.createRange(),n=r.getElementById(this.start);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)};else{var b={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},E=function(e,t){if(e.getAttribute("id")===t)return e;var r,n,i,o=e.childNodes.length;for(r=0;o>r;r++)if(n=e.childNodes[r],i=1===n.nodeType&&E(n,t))return i},v=function(e,t){var n=[];if(o&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,i){return n.push([i,t]),r})),e.innerHTML=t,n.length>0){var i,a=n.length;for(i=0;a>i;i++){var s=E(e,n[i][0]),u=r.createTextNode(n[i][1]);s.parentNode.insertBefore(u,s)}}},g=function(e,t){var n=b[e.tagName.toLowerCase()]||b._default,o=n[0],a=n[1],s=n[2];i&&(t="&shy;"+t);var u=r.createElement("div");v(u,a+t+s);for(var c=0;o>=c;c++)u=u.firstChild;if(i){for(var l=u;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&"­"===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}return u},y=function(e){for(;""===e.parentNode.tagName;)e=e.parentNode;return e},w=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};u=function(e,t){var n,i,o,a=y(r.getElementById(this.start)),s=r.getElementById(this.end),u=s.parentNode;for(w(a,s),n=a.nextSibling;n;){if(i=n.nextSibling,o=n===s){if(!t)break;s=n.nextSibling}if(n.parentNode.removeChild(n),o)break;n=i}for(n=g(a.parentNode,e);n;)i=n.nextSibling,u.insertBefore(n,s),n=i},c=function(){var e=y(r.getElementById(this.start)),t=r.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},h=function(e){for(var t,r=g(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},m=function(e){var t,n,i=r.getElementById(this.end),o=i.nextSibling,a=i.parentNode;for(n=g(a,e);n;)t=n.nextSibling,a.insertBefore(n,o),n=t},f=function(e){var t,n,i=r.getElementById(this.start),o=i.parentNode;n=g(o,e);for(var a=i.nextSibling;n;)t=n.nextSibling,o.insertBefore(n,a),n=t}}return a.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(u.call(this,e),this.innerHTML=e,void 0)},a.prototype.replaceWith=function(e){this.checkRemoved(),u.call(this,e,!0)},a.prototype.remove=c,a.prototype.outerHTML=l,a.prototype.appendTo=h,a.prototype.after=m,a.prototype.prepend=f,a.prototype.startTag=p,a.prototype.endTag=d,a.prototype.isRemoved=function(){var e=r.getElementById(this.start),t=r.getElementById(this.end);return!e||!t},a.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},a})}(),function(){var e=Object.create||function(e){function t(){}return t.prototype=e,new t},t=this.Handlebars||Ember.imports&&Ember.imports.Handlebars;t||"function"!=typeof require||(t=require("handlebars")),Ember.Handlebars=e(t),Ember.Handlebars.helper=function(e,t){Ember.View.detect(t)?Ember.Handlebars.registerHelper(e,function(e,r){return Ember.Handlebars.helpers.view.call(this,t,r)}):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.helpers=e(t.helpers),Ember.Handlebars.Compiler=function(){},t.Compiler&&(Ember.Handlebars.Compiler.prototype=e(t.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},t.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=e(t.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var r="ember"+ +new Date,n=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["controlID",new t.AST.StringNode(r+n++)]);else if(e.params.length||e.hash);else{var i=new t.AST.IdNode(["_triageMustache"]);e.escaped||(e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["unescaped",new t.AST.StringNode("true")])),e=new t.AST.MustacheNode([i].concat([e.id]),e.hash,!e.escaped)}return t.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var r=t.parse(e),n={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(r,n);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0)},t.compile&&(Ember.Handlebars.compile=function(e){var r=t.parse(e),n={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(r,n),o=(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0);return Ember.Handlebars.template(o)})}(),function(){function e(e,t,r,i){var o,a,s,u,c,l,h=r.length,m=i.data,f=m.view,p=i.hash,d=p.boundOptions;s=new Ember._SimpleHandlebarsView(null,null,!p.unescaped,m),s.normalizedValue=function(){var o,a=[];for(o in d)d.hasOwnProperty(o)&&(c=n(e,d[o],m),s.path=c.path,s.pathRoot=c.root,p[o]=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(s));for(u=0;h>u;++u)c=r[u],s.path=c.path,s.pathRoot=c.root,a.push(Ember._SimpleHandlebarsView.prototype.normalizedValue.call(s));return a.push(i),t.apply(e,a)},f.appendChild(s),o=[];for(a in d)d.hasOwnProperty(a)&&o.push(n(e,d[a],m));for(o=o.concat(r),u=0,l=o.length;l>u;++u)c=o[u],f.registerObserver(c.root,c.path,s,s.rerender)}function t(e,t,r,n){var i,o,a,s,u=[],c=n.hash,l=c.boundOptions;for(s in l)l.hasOwnProperty(s)&&(c[s]=Ember.Handlebars.get(e,l[s],n));for(i=0,o=r.length;o>i;++i)a=r[i],u.push(Ember.Handlebars.get(e,a.path,n));return u.push(n),t.apply(e,u)}var r=Array.prototype.slice,n=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,o=r&&r.keywords||{};return n=t.split(".",1)[0],o.hasOwnProperty(n)&&(e=o[n],i=!0,t=t===n?"":t.substr(n.length+1)),{root:e,path:t,isKeyword:i}},i=Ember.Handlebars.get=function(e,t,r){var i,o=r&&r.data,a=n(e,t,o);return e=a.root,t=a.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.getPath=Ember.deprecateFunc("`Ember.Handlebars.getPath` has been changed to `Ember.Handlebars.get` for consistency.",Ember.Handlebars.get),Ember.Handlebars.resolveParams=function(e,t,r){for(var n,o,a=[],s=r.types,u=0,c=t.length;c>u;u++)n=t[u],o=s[u],"ID"===o?a.push(i(e,n,r)):a.push(n);return a},Ember.Handlebars.resolveHash=function(e,t,r){var n,o={},a=r.hashTypes;for(var s in t)t.hasOwnProperty(s)&&(n=a[s],o[s]="ID"===n?i(e,t[s],r):t[s]);return o},Ember.Handlebars.registerHelper("helperMissing",function(e,t){var r,n="";throw r="%@ Handlebars error: Could not find property '%@' on object %@.",t.data&&(n=t.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerBoundHelper=function(i,o){function a(){var i,a,u,c,l,h=r.call(arguments,0,-1),m=h.length,f=arguments[arguments.length-1],p=[],d=f.data,b=f.hash,E=d.view,v=f.contexts&&f.contexts[0]||this;b.boundOptions={};for(l in b)b.hasOwnProperty(l)&&Ember.IS_BINDING.test(l)&&"string"==typeof b[l]&&(b.boundOptions[l.slice(0,-7)]=b[l]);for(d.properties=[],c=0;m>c;++c)d.properties.push(h[c]),p.push(n(v,h[c],d));if(d.isUnbound)return t(this,o,p,f);if(0===s.length)return e(v,o,p,f);i=p[0],a=i.root,u=i.path;var g=new Ember._SimpleHandlebarsView(u,a,!f.hash.unescaped,f.data);g.normalizedValue=function(){var e=Ember._SimpleHandlebarsView.prototype.normalizedValue.call(g);return o.call(E,e,f)},E.appendChild(g),E.registerObserver(a,u,g,g.rerender);for(var y=0,w=s.length;w>y;y++)E.registerObserver(a,u+"."+s[y],g,g.rerender)}var s=r.call(arguments,2);a._rawFunction=o,Ember.Handlebars.registerHelper(i,a)},Ember.Handlebars.template=function(e){var t=Handlebars.template(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.htmlSafe=function(){return e(this)})}(),function(){Ember.Handlebars.resolvePaths=function(e){for(var t=[],r=e.contexts,n=e.roots,i=e.data,o=0,a=r.length;a>o;o++)t.push(Ember.Handlebars.get(n[o],r[o],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}Ember.set,Ember.get;var r=t("metamorph"),n={remove:function(t){t.morph.remove(),e()},prepend:function(t,r){t.morph.prepend(r),e()},after:function(t,r){t.morph.after(r),e()},html:function(t,r){t.morph.html(r),e()},replace:function(t){var r=t.morph;t.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(!t.isDestroying){t.clearRenderedChildren();var n=t.renderToBuffer();t.invokeRecursively(function(e){e.propertyWillChange("element")}),t.triggerRecursively("willInsertElement"),r.replaceWith(n.string()),t.transitionTo("inDOM"),t.invokeRecursively(function(e){e.propertyDidChange("element")}),t.triggerRecursively("didInsertElement"),e()}})},empty:function(t){t.morph.html(""),e()}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",instrumentName:"render.metamorph",init:function(){this._super(),this.morph=r()},beforeRender:function(e){e.push(this.morph.startTag()),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag(),e.push(this.morph.endTag())},createElement:function(){var e=this.renderToBuffer();this.outerHTML=e.string(),this.clearBuffer()},domManager:n}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function e(e,t,r,n){this.path=e,this.pathRoot=t,this.isEscaped=r,this.templateData=n,this.morph=o(),this.state="preRender",this.updateId=null}var r=Ember.get,n=Ember.set,i=Ember.Handlebars.get,o=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this.morph=null},propertyWillChange:Ember.K,propertyDidChange:Ember.K,normalizedValue:function(){var e,t,r=this.path,n=this.pathRoot;return""===r?e=n:(t=this.templateData,e=i(n,r,{data:t})),e},renderToBuffer:function(e){var t="";t+=this.morph.startTag(),t+=this.render(),t+=this.morph.endTag(),e.push(t)},render:function(){var e=this.isEscaped,t=this.normalizedValue();return null===t||void 0===t?t="":t instanceof Handlebars.SafeString||(t=String(t)),e&&(t=Handlebars.Utils.escapeExpression(t)),t},rerender:function(){switch(this.state){case"preRender":case"destroying":break;case"inBuffer":throw new Ember.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");case"hasElement":case"inDOM":this.updateId=Ember.run.scheduleOnce("render",this,"update")}return this},update:function(){this.updateId=null,this.morph.html(this.render())},transitionTo:function(e){this.state=e}};var a=Ember.View.cloneStates(Ember.View.states),s=Ember.merge;s(a._default,{rerenderIfNeeded:Ember.K}),s(a.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"render.boundHandlebars",states:a,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),o=r(this,"pathRoot"),a=r(this,"valueNormalizerFunc");return""===n?e=o:(t=r(this,"templateData"),e=i(o,n,{data:t})),a?a(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),o=r(this,"preserveContext"),a=r(this,"previousContext"),s=r(this,"inverseTemplate"),u=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",u),o)n(this,"_context",a);else{if(!u)return null===c||void 0===c?c="":c instanceof Handlebars.SafeString||(c=String(c)),t&&(c=Handlebars.Utils.escapeExpression(c)),e.push(c),void 0;n(this,"_context",c)}else s?(n(this,"template",s),o?n(this,"_context",a):n(this,"_context",c)):n(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r,n,a,s){var u,c,l,h=t.data,m=t.fn,f=t.inverse,p=h.view,d=this;if(u=o(d,e,h),"object"==typeof this){if(h.insideGroup){c=function(){Ember.run.once(p,"rerender")};var b,E,v=i(d,e,t);v=a(v),E=r?d:v,n(v)?b=m:f&&(b=f),b(E,{data:t.data})}else{var g=p.createChildView(Ember._HandlebarsBoundView,{preserveContext:r,shouldDisplayFunc:n,valueNormalizerFunc:a,displayTemplate:m,inverseTemplate:f,path:e,pathRoot:d,previousContext:d,isEscaped:!t.hash.unescaped,templateData:t.data});p.appendChild(g),c=function(){Ember.run.scheduleOnce("render",g,"rerenderIfNeeded")}}if(""!==u.path&&(p.registerObserver(u.root,u.path,c),s))for(l=0;s.length>l;l++)p.registerObserver(u.root,u.path+"."+s[l],c)}else h.buffer.push(i(d,e,t))}function r(e,t){var r,n,a=t.data,s=a.view,u=this;if(r=o(u,e,a),"object"==typeof this){if(a.insideGroup){n=function(){Ember.run.once(s,"rerender")};var c=i(u,e,t);(null===c||void 0===c)&&(c=""),a.buffer.push(c)}else{var l=new Ember._SimpleHandlebarsView(e,u,!t.hash.unescaped,t.data);l._parentView=s,s.appendChild(l),n=function(){Ember.run.scheduleOnce("render",l,"rerender")}}""!==r.path&&s.registerObserver(r.root,r.path,n)}else a.buffer.push(i(u,e,t))}var n=Ember.get;Ember.set,Ember.String.fmt;var i=Ember.Handlebars.get,o=Ember.Handlebars.normalizePath,a=Ember.ArrayPolyfills.forEach,s=Ember.Handlebars,u=s.helpers;s.registerHelper("_triageMustache",function(e,t){return u[e]?u[e].call(this,t):u.bind.apply(this,arguments)}),s.registerHelper("bind",function(n,i){var o=i.contexts&&i.contexts[0]||this;return i.fn?t.call(o,n,i,!1,e):r.call(o,n,i)}),s.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts[0]||this,o=function(e){var t=e&&n(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?0!==n(e,"length"):!!e};return t.call(i,e,r,!0,o,o,["isTruthy","length"])}),s.registerHelper("with",function(r,n){if(4===arguments.length){var i,a,s,c;if(n=arguments[3],i=arguments[2],a=arguments[0],Ember.isGlobalPath(a))Ember.bind(n.data.keywords,i,a);else{c=o(this,a,n.data),a=c.path,s=c.root;var l=Ember.$.expando+Ember.guidFor(s);n.data.keywords[l]=s;var h=a?l+"."+a:l;Ember.bind(n.data.keywords,i,h)}return t.call(this,a,n,!0,e)}return u.bind.call(n.contexts[0],r,n)}),s.registerHelper("if",function(e,t){return u.boundIf.call(t.contexts[0],e,t)}),s.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,u.boundIf.call(t.contexts[0],e,t)}),s.registerHelper("bindAttr",function(e){var t=e.hash,r=e.data.view,n=[],u=this,c=++Ember.uuid,l=t["class"];if(null!==l&&void 0!==l){var h=s.bindClasses(this,l,r,c,e);n.push('class="'+Handlebars.Utils.escapeExpression(h.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return a.call(m,function(a){var s,l=t[a];s=o(u,l,e.data);var h,m,f="this"===l?s.root:i(u,l,e),p=Ember.typeOf(f);h=function h(){var t=i(u,l,e),n=r.$("[data-bindattr-"+c+"='"+c+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,a,t),void 0):(Ember.removeObserver(s.root,s.path,m),void 0)},"this"===l||s.isKeyword&&""===s.path||r.registerObserver(s.root,s.path,h),"string"===p||"number"===p&&!isNaN(f)?n.push(a+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(a+'="'+a+'"')},this),n.push("data-bindattr-"+c+'="'+c+'"'),new s.SafeString(n.join(" "))}),s.bindClasses=function(e,t,r,n,s){var u,c,l,h=[],m=function(e,t,r){var n,o=t.path;return n="this"===o?e:""===o?!0:i(e,o,r),Ember.View._classStringForValue(o,n,t.className,t.falsyClassName)};return a.call(t.split(" "),function(t){var i,a,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,E=e;""!==b&&"this"!==b&&(p=o(e,b,s.data),E=p.root,b=p.path),a=function(){u=m(e,d,s),l=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),l&&0!==l.length?(i&&l.removeClass(i),u?(l.addClass(u),i=u):i=null):Ember.removeObserver(E,b,f)},""!==b&&"this"!==b&&r.registerObserver(E,b,a),c=m(e,d,s),c&&(h.push(c),i=c)}),h}}(),function(){Ember.get,Ember.set;var e=Ember.Handlebars;e.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,r=e.data,n={},i=t["class"],o=!1;t.id&&(n.elementId=t.id,o=!0),t.tag&&(n.tagName=t.tag,o=!0),i&&(i=i.split(" "),n.classNames=i,o=!0),t.classBinding&&(n.classNameBindings=t.classBinding.split(" "),o=!0),t.classNameBindings&&(void 0===n.classNameBindings&&(n.classNameBindings=[]),n.classNameBindings=n.classNameBindings.concat(t.classNameBindings.split(" ")),o=!0),t.attributeBindings&&(n.attributeBindings=null,o=!0),o&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var a;for(var s in t)t.hasOwnProperty(s)&&Ember.IS_BINDING.test(s)&&"string"==typeof t[s]&&(a=this.contextualizeBindingPath(t[s],r),a&&(t[s]=a));if(n.classNameBindings)for(var u in n.classNameBindings){var c=n.classNameBindings[u];if("string"==typeof c){var l=Ember.View._parsePropertyPath(c);a=this.contextualizeBindingPath(l.path,r),a&&(n.classNameBindings[u]=a+l.classNames)}}return Ember.$.extend(t,n)},contextualizeBindingPath:function(e,t){var r=Ember.Handlebars.normalizePath(null,e,t);return r.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:"this"===e?"_parentView.context":"_parentView.context."+e},helper:function(t,r,n){var i,o=n.data,a=n.fn;i="string"==typeof r?e.get(t,r,n):r;var s=this.propertiesFromHTMLOptions(n,t),u=o.view;s.templateData=o;var c=i.proto?i.proto():i;a&&(s.template=a),c.controller||c.controllerBinding||s.controller||s.controllerBinding||(s._context=t),u.appendChild(i,s)}}),e.registerHelper("view",function(t,r){return t&&t.data&&t.data.isRenderData&&(r=t,t="Ember.View"),e.ViewHelper.helper(this,t,r)})}(),function(){var e=Ember.get,t=Ember.Handlebars.get;Ember.String.fmt,Ember.Handlebars.registerHelper("collection",function(r,n){r&&r.data&&r.data.isRenderData&&(n=r,r=void 0);var i=n.fn,o=n.data,a=n.inverse;n.data.view;var s;s=r?t(this,r,n):Ember.CollectionView;var u,c,l=n.hash,h={},m=l.itemViewClass,f=s.proto();delete l.itemViewClass,c=m?t(f,m,n):f.itemViewClass;for(var p in l)l.hasOwnProperty(p)&&(u=p.match(/^item(.)(.*)$/),u&&"itemController"!==p&&(h[u[1].toLowerCase()+u[2]]=l[p],delete l[p]));i&&(h.template=i,delete n.fn);var d;a&&a!==Handlebars.VM.noop?(d=e(f,"emptyViewClass"),d=d.extend({template:a,tagName:h.tagName})):l.emptyViewClass&&(d=t(this,l.emptyViewClass,n)),d&&(l.emptyView=d),l.keyword||(h._context=Ember.computed.alias("content"));var b=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:o,hash:h},this);return l.itemViewClass=c.extend(b),Ember.Handlebars.helpers.view.call(this,s,n)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,r){var n,i,o,a=arguments[arguments.length-1];return arguments.length>2?(a.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,o=n.apply(this,Array.prototype.slice.call(arguments,1)),delete a.data.isUnbound,o):(i=r.contexts&&r.contexts[0]||this,e(i,t,r))})}(),function(){var e=Ember.Handlebars.get,t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(r,n){var i=n.contexts&&n.contexts[0]||this,o=t(i,r,n.data),a=o.root,s=o.path,u="this"===s?a:e(a,s,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var r,n=e(this,"itemController");if(n){var i=Ember.ArrayController.create();t(i,"itemController",n),t(i,"container",e(this,"controller.container")),t(i,"_eachView",this),t(i,"target",e(this,"controller")),this.disableContentObservers(function(){t(this,"content",i),r=new Ember.Binding("content","_eachView.dataSource").oneWay(),r.connect(i)}),t(this,"_arrayController",i)}else this.disableContentObservers(function(){r=new Ember.Binding("content","dataSource").oneWay(),r.connect(this)});return this._super()},disableContentObservers:function(e){Ember.removeBeforeObserver(this,"content",null,"_contentWillChange"),Ember.removeObserver(this,"content",null,"_contentDidChange"),e.call(this),Ember.addBeforeObserver(this,"content",null,"_contentWillChange"),Ember.addObserver(this,"content",null,"_contentDidChange")},itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(r,n){r=this._super(r,n);var i=e(this,"keyword"),o=e(r,"content");if(i){var a=e(r,"templateData");a=Ember.copy(a),a.keywords=r.cloneKeywords(),t(r,"templateData",a),a.keywords[i]=o}return o&&e(o,"isController")&&t(r,"controller",o),r},destroy:function(){if(this._super()){var t=e(this,"_arrayController");return t&&t.destroy(),this}}});var r=Ember.Handlebars.GroupedEach=function(e,t,r){var n=this,i=Ember.Handlebars.normalizePath(e,t,r.data);this.context=e,this.path=t,this.options=r,this.template=r.fn,this.containingView=r.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){n.destroy()})};r.prototype={contentWillChange:function(){this.removeArrayObservers()},contentDidChange:function(){this.content=this.lookupContent(),this.addArrayObservers(),this.rerenderContainingView()},contentArrayWillChange:Ember.K,contentArrayDidChange:function(){this.rerenderContainingView()},lookupContent:function(){return Ember.Handlebars.get(this.normalizedRoot,this.normalizedPath,this.options)},addArrayObservers:function(){this.content.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){this.content.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},addContentObservers:function(){Ember.addBeforeObserver(this.normalizedRoot,this.normalizedPath,this,this.contentWillChange),Ember.addObserver(this.normalizedRoot,this.normalizedPath,this,this.contentDidChange)},removeContentObservers:function(){Ember.removeBeforeObserver(this.normalizedRoot,this.normalizedPath,this.contentWillChange),Ember.removeObserver(this.normalizedRoot,this.normalizedPath,this.contentDidChange)},render:function(){var t=this.content,r=e(t,"length"),n=this.options.data,i=this.template;n.insideEach=!0;for(var o=0;r>o;o++)i(t.objectAt(o),{data:n})},rerenderContainingView:function(){Ember.run.scheduleOnce("render",this.containingView,"rerender")},destroy:function(){this.removeContentObservers(),this.removeArrayObservers()}},Ember.Handlebars.registerHelper("each",function(e,t){if(4===arguments.length){var r=arguments[0];t=arguments[3],e=arguments[2],""===e&&(e="this"),t.hash.keyword=r}return t.hash.dataSourceBinding=e,!t.data.insideGroup||t.hash.groupedRows||t.hash.itemViewClass?Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",t):(new Ember.Handlebars.GroupedEach(this,e,t).render(),void 0)})}(),function(){Ember.Handlebars.registerHelper("template",function(e,t){var r=t.data.view,n=r.templateForName(e);n(this,{data:t.data})})}(),function(){Ember.Handlebars.registerHelper("partial",function(e,t){var r=e.split("/"),n=r[r.length-1];r[r.length-1]="_"+n;var i=t.data.view,o=r.join("/"),a=i.templateForName(o),s=i.templateForName(e);a=a||s,a(this,{data:t.data})})}(),function(){var e=Ember.get;Ember.set,Ember.Handlebars.registerHelper("yield",function(t){for(var r,n=t.data.view;n&&!e(n,"layout");)n=e(n,"parentView");r=e(n,"template"),r&&r(this,t)})}(),function(){var e=Ember.set;Ember.get,Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","disabled","tabindex","name"],type:"checkbox",checked:!1,disabled:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){var e=(Ember.get,Ember.set);Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex"],placeholder:null,disabled:!1,maxlength:null,insertNewline:Ember.K,cancel:Ember.K,init:function(){this._super(),this.on("focusOut",this,this._elementValueDidChange),this.on("change",this,this._elementValueDidChange),this.on("paste",this,this._elementValueDidChange),this.on("cut",this,this._elementValueDidChange),this.on("input",this,this._elementValueDidChange),this.on("keyUp",this,this.interpretKeyEvents)},interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,r=t[e.keyCode];return this._elementValueDidChange(),r?this[r](e):void 0},_elementValueDidChange:function(){e(this,"value",this.$().val())}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){function e(e,r,n){var i=t(r,"action"),o=t(r,"onEvent");if(i&&o===e){var a=t(r,"controller"),s=t(r,"value"),u=t(r,"bubbles");a.send(i,s,r),u||n.stopPropagation()}}var t=Ember.get;Ember.set,Ember.TextField=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name"],value:"",type:"text",size:null,pattern:null,action:null,onEvent:"enter",bubbles:!1,insertNewline:function(t){e("enter",this,t)},keyPress:function(t){e("keyPress",this,t)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Button=Ember.View.extend(Ember.TargetActionSupport,{classNames:["ember-button"],classNameBindings:["isActive"],tagName:"button",propagateEvents:!1,attributeBindings:["type","disabled","href","tabindex"],targetObject:Ember.computed(function(){var t=e(this,"target"),r=e(this,"context"),n=e(this,"templateData");return"string"!=typeof t?t:Ember.Handlebars.get(r,t,{data:n})}).property("target"),type:Ember.computed(function(){var e=this.tagName;return"input"===e||"button"===e?"button":void 0}),disabled:!1,href:Ember.computed(function(){return"a"===this.tagName?"#":null}),mouseDown:function(){return e(this,"disabled")||(t(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0),e(this,"propagateEvents")},mouseLeave:function(){this._mouseDown&&(t(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(t(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(){return e(this,"isActive")&&(this.triggerAction(),t(this,"isActive",!1)),this._mouseDown=!1,this._mouseEntered=!1,e(this,"propagateEvents")},keyDown:function(e){(13===e.keyCode||32===e.keyCode)&&this.mouseDown()},keyUp:function(e){(13===e.keyCode||32===e.keyCode)&&this.mouseUp()},touchStart:function(e){return this.mouseDown(e)},touchEnd:function(e){return this.mouseUp(e)},init:function(){this._super()}})}(),function(){var e=Ember.get;Ember.set,Ember.TextArea=Ember.View.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)},"value"),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){var e=Ember.set,t=Ember.get,r=Ember.EnumerableUtils.indexOf,n=Ember.EnumerableUtils.indexesOf,i=Ember.EnumerableUtils.replace,o=Ember.isArray;Ember.Handlebars.compile,Ember.SelectOption=Ember.View.extend({tagName:"option",attributeBindings:["value","selected"],defaultTemplate:function(e,t){t={data:t.data,hash:{}},Ember.Handlebars.helpers.bind.call(e,"view.label",t)},init:function(){this.labelPathDidChange(),this.valuePathDidChange(),this._super()},selected:Ember.computed(function(){var e=t(this,"content"),n=t(this,"parentView.selection");return t(this,"parentView.multiple")?n&&r(n,e.valueOf())>-1:e==n}).property("content","parentView.selection"),labelPathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionLabelPath"),valuePathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionValuePath")}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,r,n,i){function o(e,t){var n,i="";return t.buffer.push('<option value="">'),n={},t.buffer.push(l(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashTypes:n,data:t}))),t.buffer.push("</option>"),i}function a(e,t){var n;n={contentBinding:"STRING"},t.buffer.push(l(r.view.call(e,"view.optionView",{hash:{contentBinding:"this"},contexts:[e],types:["ID"],hashTypes:n,data:t})))}this.compilerInfo=[2,">= 1.0.0-rc.3"],r=r||Ember.Handlebars.helpers,i=i||{};var s,u,c="",l=this.escapeExpression,h=this;return u={},s=r["if"].call(t,"view.prompt",{hash:{},inverse:h.noop,fn:h.program(1,o,i),contexts:[t],types:["ID"],hashTypes:u,data:i}),(s||0===s)&&i.buffer.push(s),u={},s=r.each.call(t,"view.content",{hash:{},inverse:h.noop,fn:h.program(3,a,i),contexts:[t],types:["ID"],hashTypes:u,data:i}),(s||0===s)&&i.buffer.push(s),c}),attributeBindings:["multiple","disabled","tabindex","name"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,r){if(2===arguments.length)return r;var n=t(this,"optionValuePath").replace(/^content\.?/,"");return n?t(this,"selection."+n):t(this,"selection")}).property("selection"),prompt:null,optionLabelPath:"content",optionValuePath:"content",optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var r=t(this,"selection");if(t(this,"multiple")){if(!o(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection.@each"),valueDidChange:Ember.observer(function(){var e,r=t(this,"content"),n=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),o=i?t(this,"selection."+i):t(this,"selection");n!==o&&(e=r.find(function(e){return n===(i?t(e,i):e)}),this.set("selection",e))},"value"),_triggerChange:function(){var e=t(this,"selection"),r=t(this,"value");e&&this.selectionDidChange(),r&&this.valueDidChange(),this._change()},_changeSingle:function(){var r=this.$()[0].selectedIndex,n=t(this,"content"),i=t(this,"prompt");if(t(n,"length")){if(i&&0===r)return e(this,"selection",null),void 0;i&&(r-=1),e(this,"selection",n.objectAt(r))}},_changeMultiple:function(){var r=this.$("option:selected"),n=t(this,"prompt"),a=n?1:0,s=t(this,"content"),u=t(this,"selection");if(s&&r){var c=r.map(function(){return this.index-a}).toArray(),l=s.objectsAt(c);o(u)?i(u,0,t(u,"length"),l):e(this,"selection",l)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),o=n?r(n,i):-1,a=t(this,"prompt");a&&(o+=1),e&&(e.selectedIndex=o)
20
+ }},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),o=t(this,"selection"),a=i?n(i,o):[-1],s=t(this,"prompt"),u=s?1:0,c=this.$("option");c&&c.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(a,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){function e(e,t){for(var r in e)"ID"===t[r]&&(e[r+"Binding"]=e[r],delete e[r])}Ember.Handlebars.registerHelper("input",function(t){var r=t.hash,n=t.hashTypes,i=r.type,o=r.on;return delete r.type,delete r.on,e(r,n),"checkbox"===i?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,t):(r.type=i,r.onEvent=o||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,t))}),Ember.Handlebars.registerHelper("textarea",function(t){var r=t.hash,n=t.hashTypes;return e(r,n),Ember.Handlebars.helpers.view.call(this,Ember.TextArea,t)})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}Ember.Handlebars.bootstrap=function(e){var t='script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';Ember.$(t,e).each(function(){var e=Ember.$(this),t="text/x-raw-handlebars"===e.attr("type")?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),r=e.attr("data-template-name")||e.attr("id")||"application",n=t(e.html());Ember.TEMPLATES[r]=n,e.remove()})},Ember.onLoad("application",e)}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",[],function(){"use strict";function e(e){this.string=e}function t(e){this.name=e}function r(e){this.name=e}function n(){}function i(i,o,a){"/"===i.charAt(0)&&(i=i.substr(1));for(var s=i.split("/"),u=[],c=0,l=s.length;l>c;c++){var h,m=s[c];(h=m.match(/^:([^\/]+)$/))?(u.push(new t(h[1])),o.push(h[1]),a.dynamics++):(h=m.match(/^\*([^\/]+)$/))?(u.push(new r(h[1])),o.push(h[1]),a.stars++):""===m?u.push(new n):(u.push(new e(m)),a.statics++)}return u}function o(e){this.charSpec=e,this.nextStates=[]}function a(e){return e.sort(function(e,t){return e.types.stars!==t.types.stars?e.types.stars-t.types.stars:e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?e.types.statics-t.types.statics:0})}function s(e,t){for(var r=[],n=0,i=e.length;i>n;n++){var o=e[n];r=r.concat(o.match(t))}return r}function u(e,t){for(var r=e.handlers,n=e.regex,i=t.match(n),o=1,a=[],s=0,u=r.length;u>s;s++){for(var c=r[s],l=c.names,h={},m=0,f=l.length;f>m;m++)h[l[m]]=i[o++];a.push({handler:c.handler,params:h,isDynamic:!!l.length})}return a}function c(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function l(e,t,r){this.path=e,this.matcher=t,this.delegate=r}function h(e){this.routes={},this.children={},this.target=e}function m(e,t,r){return function(n,i){var o=e+n;return i?(i(m(o,t,r)),void 0):new l(e+n,t,r)}}function f(e,t,r){for(var n=0,i=0,o=e.length;o>i;i++)n+=e[i].path.length;t=t.substr(n),e.push({path:t,handler:r})}function p(e,t,r,n){var i=t.routes;for(var o in i)if(i.hasOwnProperty(o)){var a=e.slice();f(a,o,i[o]),t.children[o]?p(a,t.children[o],r,n):r.call(n,a)}}var d=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],b=new RegExp("(\\"+d.join("|\\")+")","g");e.prototype={eachChar:function(e){for(var t,r=this.string,n=0,i=r.length;i>n;n++)t=r.charAt(n),e({validChars:t})},regex:function(){return this.string.replace(b,"\\$1")},generate:function(){return this.string}},t.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},r.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},n.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},o.prototype={get:function(e){for(var t=this.nextStates,r=0,n=t.length;n>r;r++){var i=t[r],o=i.charSpec.validChars===e.validChars;if(o=o&&i.charSpec.invalidChars===e.invalidChars)return i}},put:function(e){var t;return(t=this.get(e))?t:(t=new o(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,r,n,i=this.nextStates,o=[],a=0,s=i.length;s>a;a++)t=i[a],r=t.charSpec,"undefined"!=typeof(n=r.validChars)?-1!==n.indexOf(e)&&o.push(t):"undefined"!=typeof(n=r.invalidChars)&&-1===n.indexOf(e)&&o.push(t);return o}};var E=function(){this.rootState=new o,this.names={}};return E.prototype={add:function(e,t){for(var r,o=this.rootState,a="^",s={statics:0,dynamics:0,stars:0},u=[],l=[],h=!0,m=0,f=e.length;f>m;m++){var p=e[m],d=[],b=i(p.path,d,s);l=l.concat(b);for(var E=0,v=b.length;v>E;E++){var g=b[E];g instanceof n||(h=!1,o=o.put({validChars:"/"}),a+="/",o=c(o,g),a+=g.regex())}u.push({handler:p.handler,names:d})}h&&(o=o.put({validChars:"/"}),a+="/"),o.handlers=u,o.regex=new RegExp(a+"$"),o.types=s,(r=t&&t.as)&&(this.names[r]={segments:l,handlers:u})},handlersFor:function(e){var t=this.names[e],r=[];if(!t)throw new Error("There is no route named "+e);for(var n=0,i=t.handlers.length;i>n;n++)r.push(t.handlers[n]);return r},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var r=this.names[e],i="";if(!r)throw new Error("There is no route named "+e);for(var o=r.segments,a=0,s=o.length;s>a;a++){var u=o[a];u instanceof n||(i+="/",i+=u.generate(t))}return"/"!==i.charAt(0)&&(i="/"+i),i},recognize:function(e){var t,r,n=[this.rootState],i=e.length;for("/"!==e.charAt(0)&&(e="/"+e),i>1&&"/"===e.charAt(i-1)&&(e=e.substr(0,i-1)),t=0,r=e.length;r>t&&(n=s(n,e.charAt(t)),n.length);t++);var o=[];for(t=0,r=n.length;r>t;t++)n[t].handlers&&o.push(n[t]);n=a(o);var c=o[0];return c&&c.handlers?u(c,e):void 0}},l.prototype={to:function(e,t){var r=this.delegate;if(r&&r.willAddRoute&&(e=r.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e),t){if(0===t.length)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,e,t,this.delegate)}}},h.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,r,n){var i=new h(t);this.children[e]=i;var o=m(e,i,n);n&&n.contextEntered&&n.contextEntered(t,o),r(o)}},E.prototype.map=function(e,t){var r=new h;e(m("",r,this.delegate)),p([],r,function(e){t?t(this,e):this.add(e)},this)},E})}(),function(){e("router",["route-recognizer"],function(e){"use strict";function t(){this.recognizer=new e}function r(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function n(e){if(!e.isLoading){e.isLoading=!0;var t=e.getHandler("loading");t&&(t.enter&&t.enter(),t.setup&&t.setup())}}function i(e){e.isLoading=!1;var t=e.getHandler("loading");t&&t.exit&&t.exit()}function o(e,t){i(e);var r=e.getHandler("failure");r&&r.setup&&r.setup(t)}function a(e,t,r,n){var i=e._paramsForHandler(t,n,!0),o=i.params,a=i.toSetup,s=e.recognizer.generate(t,o);r.call(e,s),u(e,a)}function s(e,t,r,a){function c(n){d.context!==b&&m(d,b);var i=a.concat([{context:n,name:p.handler,handler:e.getHandler(p.handler),isDynamic:p.isDynamic}]);s(e,t,r+1,i)}if(t.length===r){var l=a[a.length-1],h=l&&l.handler;if(!h||!h.additionalHandler)return i(e),u(e,a),void 0;var f={handler:h.additionalHandler(),params:{},isDynamic:!1};t.push(f)}var p=t[r],d=e.getHandler(p.handler),b=d.deserialize&&d.deserialize(p.params);b&&"function"==typeof b.then?(n(e),b.then(c).then(null,function(t){o(e,t)})):c(b)}function u(e,t){var r=l(e.currentHandlerInfos||[],t);e.currentHandlerInfos=t,c(r.exited,function(e){delete e.context,e.exit&&e.exit()}),c(r.updatedContext,function(e,t){m(e,t),e.setup&&e.setup(t)});var n=!1;c(r.entered,function(e,t){n||(e.enter&&e.enter(),m(e,t),e.setup&&!1===e.setup(t)&&(n=!0))}),!n&&e.didTransition&&e.didTransition(t)}function c(e,t){for(var r=0,n=e.length;n>r;r++){var i=e[r],o=i.handler,a=i.context;t(o,a)}}function l(e,t){var r,n,i,o,a={updatedContext:[],exited:[],entered:[]};for(i=0,o=t.length;o>i;i++){var s=e[i],u=t[i];s&&s.handler===u.handler||(r=!0),r?(a.entered.push(u),s&&a.exited.unshift(s)):(n||s.context!==u.context)&&(n=!0,a.updatedContext.push(u))}for(i=t.length,o=e.length;o>i;i++)a.exited.unshift(e[i]);return a}function h(e,t){var r=e.currentHandlerInfos,n=t.shift();if(!r)throw new Error("Could not trigger event '"+n+"'. There are no active handlers");for(var i=r.length-1;i>=0;i--){var o=r[i],a=o.handler;if(a.events&&a.events[n])return a.events[n].apply(a,t),void 0}throw new Error("Nothing handled the event '"+n+"'.")}function m(e,t){e.context=t,e.contextDidChange&&e.contextDidChange()}return t.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){var r=t[t.length-1].handler,n=[t,{as:r}];e.add.apply(e,n)})},hasRoute:function(e){return this.recognizer.hasRoute(e)},handleURL:function(e){var t=this.recognizer.recognize(e);if(!t)throw new Error("No route matched the URL '"+e+"'");s(this,t,0,[])},updateURL:function(){throw"updateURL is not implemented"},replaceURL:function(e){this.updateURL(e)},transitionTo:function(e){var t=Array.prototype.slice.call(arguments,1);a(this,e,this.updateURL,t)},replaceWith:function(e){var t=Array.prototype.slice.call(arguments,1);a(this,e,this.replaceURL,t)},paramsForHandler:function(e){var t=this._paramsForHandler(e,[].slice.call(arguments,1));return t.params},generate:function(e){var t=this.paramsForHandler.apply(this,arguments);return this.recognizer.generate(e,t)},_paramsForHandler:function(e,t,n){var i,o,a,s,u,c,l=this.recognizer.handlersFor(e),h={},f=[],p=l.length,d=t.length;for(c=l.length-1;c>=0&&d>0;c--)l[c].names.length&&(d--,p=c);if(d>0)throw"More context objects were passed than there are dynamic segments for the route: "+e;for(c=0;l.length>c;c++)if(a=l[c],s=this.getHandler(a.handler),u=a.names,o=!1,u.length?(c>=p?(i=t.shift(),o=!0):i=s.context,s.serialize&&r(h,s.serialize(i,u))):n&&(c>p||!s.hasOwnProperty("context")?s.deserialize&&(i=s.deserialize({}),o=!0):i=s.context),n&&o&&m(s,i),f.push({isDynamic:!!a.names.length,name:a.handler,handler:s,context:i}),c===l.length-1){var b,E=f[f.length-1];(b=E.handler.additionalHandler)&&l.push({handler:b.call(E.handler),names:[]})}return{params:h,toSetup:f}},isActive:function(e){for(var t,r,n=[].slice.call(arguments,1),i=this.currentHandlerInfos,o=!1,a=i.length-1;a>=0;a--)if(r=i[a],r.name===e&&(o=!0),o){if(0===n.length)break;if(r.isDynamic&&(t=n.pop(),r.context!==t))return!1}return 0===n.length&&o},trigger:function(){var e=[].slice.call(arguments);h(this,e)}},t})}(),function(){function e(e){this.parent=e,this.matches=[]}e.prototype={resource:function(t,r,n){if(2===arguments.length&&"function"==typeof r&&(n=r,r={}),1===arguments.length&&(r={}),"string"!=typeof r.path&&(r.path="/"+t),n){var i=new e(t);n.call(i),this.push(r.path,t,i.generate())}else this.push(r.path,t)},push:function(e,t,r){var n=t.split(".");(""===e||"/"===e||"index"===n[n.length-1])&&(this.explicitIndex=!0),this.matches.push([e,t,r])},route:function(e,t){t=t||{},"string"!=typeof t.path&&(t.path="/"+e),this.parent&&"application"!==this.parent&&(e=this.parent+"."+e),this.push(t.path,e)},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var r=0,n=e.length;n>r;r++){var i=e[r];t(i[0]).to(i[1],i[2])}}}},e.map=function(t){var r=new e;return t.call(r),r},Ember.RouterDSL=e}(),function(){Ember.controllerFor=function(e,t,r,n){return e.lookup("controller:"+t,n)||Ember.generateController(e,t,r)},Ember.generateController=function(e,t,r){var n,i,o;return r&&Ember.isArray(r)?(i=e.resolve("controller:array"),n=i.extend({content:r})):r?(i=e.resolve("controller:object"),n=i.extend({content:r})):(i=e.resolve("controller:basic"),n=i.extend()),n.toString=function(){return"(generated "+t+" controller)"},o="controller:"+t,e.register(o,n),e.lookup(o)}}(),function(){function e(e){var t=s(e,"location"),r=s(e,"rootURL"),n={};"string"==typeof r&&(n.rootURL=r),"string"==typeof t&&(n.implementation=t,t=u(e,"location",Ember.Location.create(n)))}function r(e){var t={},r=e.container,n=r.resolve("route:basic");return function(i){var o="route:"+i,a=r.lookup(o);if(t[i])return a;if(t[i]=!0,!a){if("loading"===i)return{};if("failure"===i)return e.constructor.defaultFailureHandler;r.register(o,n.extend()),a=r.lookup(o)}return a.routeName=i,a}}function n(e){for(var t=[],r=1,n=e.length;n>r;r++){var i=e[r].name,o=i.split(".");t.push(o[o.length-1])}return t.join(".")}function i(e,t,n){var i;t.getHandler=r(e);var o=function(){n.setURL(i)};if(t.updateURL=function(e){i=e,Ember.run.once(o)},n.replaceURL){var a=function(){n.replaceURL(i)};t.replaceURL=function(e){i=e,Ember.run.once(a)}}t.didTransition=function(t){e.didTransition(t)}}function o(e,t,r){var n,i=r[0];n=e.router.hasRoute(r[0])?i:r[0]=i+".index",e.router[t].apply(e.router,r),e.notifyPropertyChange("url")}var a=t("router"),s=Ember.get,u=Ember.set,c=Ember._MetamorphView;Ember.Router=Ember.Object.extend({location:"hash",init:function(){this.router=this.constructor.router,this._activeViews={},e(this)},url:Ember.computed(function(){return s(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=s(this,"location"),r=this.container,n=this;i(this,e,t),r.register("view:default",c),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){n.handleURL(e)}),this.handleURL(t.getURL())},didTransition:function(e){var t=this.container.lookup("controller:application"),r=n(e);u(t,"currentPath",r),this.notifyPropertyChange("url"),s(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+r+"'")},handleURL:function(e){this.router.handleURL(e),this.notifyPropertyChange("url")},transitionTo:function(){var e=[].slice.call(arguments);o(this,"transitionTo",e)},replaceWith:function(){var e=[].slice.call(arguments);o(this,"replaceWith",e)},generate:function(){var e=this.router.generate.apply(this.router,arguments);return this.location.formatURL(e)},isActive:function(){var e=this.router;return e.isActive.apply(e,arguments)},send:function(){this.router.trigger.apply(this.router,arguments)},hasRoute:function(e){return this.router.hasRoute(e)},_lookupActiveView:function(e){var t=this._activeViews[e];return t&&t[0]},_connectActiveView:function(e,t){var r=this._activeViews[e];r&&r[0].off("willDestroyElement",this,r[1]);var n=function(){delete this._activeViews[e]};this._activeViews[e]=[t,n],t.one("willDestroyElement",this,n)}}),Ember.Router.reopenClass({defaultFailureHandler:{setup:function(e){Ember.Logger.error("Error while loading route:",e),setTimeout(function(){throw e})}}}),Ember.Router.reopenClass({map:function(e){var t=this.router=new a,r=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){e.call(this)})});return t.map(r.generate()),t}})}(),function(){function e(e){for(var t,r,n=e.router.router.currentHandlerInfos,i=0,o=n.length;o>i;i++){if(r=n[i].handler,r===e)return t;t=r}}function t(r){var n,i=e(r);if(i)return(n=i.lastRenderedTemplate)?n:t(i,!0)}function r(e,r,n,i){i=i||{},i.into=i.into?i.into.replace(/\//g,"."):t(e),i.outlet=i.outlet||"main",i.name=r,i.template=n;var o,a=i.controller;return a=i.controller?i.controller:(o=e.container.lookup("controller:"+r))?o:e.routeName,"string"==typeof a&&(a=e.container.lookup("controller:"+a)),i.controller=a,i}function n(e,t,r){var n=r.into?"view:default":"view:toplevel";return e=e||t.lookup(n),u(e,"templateName")||(c(e,"template",r.template),c(e,"_debugTemplateName",r.name)),c(e,"renderedName",r.name),c(e,"controller",r.controller),e}function i(e,t,r){if(r.into){var n=e.router._lookupActiveView(r.into);e.teardownView=a(n,r.outlet),n.connectOutlet(r.outlet,t)}else{var i=u(e,"router.namespace.rootElement");e.teardownView&&e.teardownView(),e.router._connectActiveView(r.name,t),e.teardownView=o(t),t.appendTo(i)}}function o(e){return function(){e.destroy()}}function a(e,t){return function(){e.disconnectOutlet(t)}}function s(e){e.teardownView&&e.teardownView(),delete e.teardownView,delete e.lastRenderedTemplate}var u=Ember.get,c=Ember.set,l=Ember.String.classify;Ember.String.fmt,Ember.Route=Ember.Object.extend({exit:function(){this.deactivate(),s(this)},enter:function(){this.activate()},events:null,deactivate:Ember.K,activate:Ember.K,transitionTo:function(){var e=this.router;if(!e.isActive.apply(e,arguments))return this._checkingRedirect&&(this._redirected[this._redirectDepth]=!0),e.transitionTo.apply(e,arguments)},replaceWith:function(){var e=this.router;if(!e.isActive.apply(e,arguments))return this._checkingRedirect&&(this._redirected[this._redirectDepth]=!0),this.router.replaceWith.apply(this.router,arguments)},send:function(){return this.router.send.apply(this.router,arguments)},_redirectDepth:0,setup:function(e){var t;this._redirected||(t=!0,this._redirected=[]),this._checkingRedirect=!0;var r=++this._redirectDepth;void 0===e?this.redirect():this.redirect(e),this._redirectDepth--,this._checkingRedirect=!1;var n=this._redirected;if(t&&(this._redirected=null),n[r])return!1;var i=this.controllerFor(this.routeName,e);i&&(this.controller=i,c(i,"model",e)),this.setupControllers?this.setupControllers(i,e):this.setupController(i,e),this.renderTemplates?this.renderTemplates(e):this.renderTemplate(i,e)},redirect:Ember.K,deserialize:function(e){var t=this.model(e);return this.currentModel=t},contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,r,n,i;for(var o in e)(t=o.match(/^(.*)_id$/))&&(r=t[1],i=e[o]),n=!0;if(!r&&n)return e;if(r){var a=l(r),s=this.router.namespace,u=s[a];return u.find(i)}},serialize:function(e,t){if(1===t.length){var r=t[0],n={};return n[r]=/_id$/.test(r)?u(e,"id"):e,n}},setupController:Ember.K,controllerFor:function(e,t){var r=this.router.container,n=r.lookup("controller:"+e);return n||(t=t||this.modelFor(e),n=Ember.generateController(r,e,t)),n},modelFor:function(e){var t=this.container.lookup("route:"+e);return t&&t.currentModel},renderTemplate:function(){this.render()},render:function(e,t){"object"!=typeof e||t||(t=e,e=this.routeName),e=e?e.replace(/\//g,"."):this.routeName;var o=this.container,a=o.lookup("view:"+e),s=o.lookup("template:"+e);(a||s)&&(t=r(this,e,s,t),a=n(a,o,t),"main"===t.outlet&&(this.lastRenderedTemplate=e),i(this,a,t))},willDestroy:function(){s(this)}})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,i,o){function a(e,t){return"controller"===i[t]?e:Ember.ControllerMixin.detect(e)?a(n(e,"model")):e}var s=t(e,i,o);return r.call(s,a)}var t=Ember.Handlebars.resolveParams,r=Ember.ArrayPolyfills.map,n=Ember.get;Ember.Router.resolveParams=e})}(),function(){var e=Ember.get;Ember.set,Ember.String.fmt,Ember.onLoad("Ember.Handlebars",function(){function t(e,t){return e.hasRoute(t)||(t+=".index"),t}function r(e){var t=e.options.types.slice(1),r=e.options.data;return i(e.context,e.params,{types:t,data:r})}function n(e,n,i){var o,a=i||e.namedRoute;o=t(n,a);var s=[o];return s.concat(r(e.parameters))}var i=Ember.Router.resolveParams,o=Ember.ViewUtils.isSimpleClick,a=Ember.LinkView=Ember.View.extend({tagName:"a",namedRoute:null,currentWhen:null,title:null,activeClass:"active",replace:!1,attributeBindings:["href","title"],classNameBindings:"active",concreteView:Ember.computed(function(){return e(this,"parentView")}).property("parentView"),active:Ember.computed(function(){var t=this.get("router"),n=r(this.parameters),i=this.currentWhen+".index",o=t.isActive.apply(t,[this.currentWhen].concat(n))||t.isActive.apply(t,[i].concat(n));return o?e(this,"activeClass"):void 0}).property("namedRoute","router.url"),router:Ember.computed(function(){return this.get("controller").container.lookup("router:main")}),click:function(e){if(!o(e))return!0;e.preventDefault(),this.bubbles===!1&&e.stopPropagation();var t=this.get("router");this.get("replace")?t.replaceWith.apply(t,n(this,t)):t.transitionTo.apply(t,n(this,t))},href:Ember.computed(function(){if("a"!==this.get("tagName"))return!1;var e=this.get("router");return e.generate.apply(e,n(this,e))})});a.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("linkTo",function(e){var t=[].slice.call(arguments,-1)[0],r=[].slice.call(arguments,1,-1),n=t.hash;return n.namedRoute=e,n.currentWhen=n.currentWhen||e,n.parameters={context:this,options:t,params:r},Ember.Handlebars.helpers.view.call(this,a,t)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,r){var n;for(t&&t.data&&t.data.isRenderData&&(r=t,t="main"),n=r.data.view;!n.get("template.isTop");)n=n.get("_parentView");return r.data.view.set("outletSource",n),r.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,e.OutletView,r)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,r){var n,i,o,a,s,u;2===arguments.length&&(r=t,t=void 0),"string"==typeof t&&(s=Ember.Handlebars.get(r.contexts[1],t,r),u={singleton:!1}),e=e.replace(/\//g,"."),n=r.data.keywords.controller.container,i=n.lookup("router:main"),a=n.lookup("view:"+e)||n.lookup("view:default"),o=(o=r.hash.controller)?n.lookup("controller:"+o,u):Ember.controllerFor(n,e,s,u),o&&s&&o.set("model",s);var c=r.contexts[1];c&&a.registerObserver(c,t,function(){o.set("model",Ember.Handlebars.get(c,t,r))}),o.set("target",r.data.keywords.controller),r.hash.viewName=Ember.String.camelize(e),r.hash.template=n.lookup("template:"+e),r.hash.controller=o,i&&!s&&i._connectActiveView(e,a),Ember.Handlebars.helpers.view.call(this,a,r)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r){var n=[];r&&n.push(r);var i=e.options.types.slice(1),o=e.options.data;return n.concat(t(e.context,e.params,{types:i,data:o}))}var t=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,n=Ember.Handlebars,i=n.get,o=n.SafeString,a=(Ember.get,Array.prototype.slice),s=n.ActionHelper={registeredActions:{}},u=["alt","shift","meta","ctrl"],c=function(e,t){if("undefined"==typeof t)return r(e);var n=!0;return u.forEach(function(r){e[r+"Key"]&&-1===t.indexOf(r)&&(n=!1)}),n};s.registerAction=function(t,r,n){var o=(++Ember.uuid).toString();return s.registeredActions[o]={eventName:r.eventName,handler:function(o){if(!c(o,n))return!0;o.preventDefault(),r.bubbles===!1&&o.stopPropagation();var a=r.target;a=a.target?i(a.root,a.target,a.options):a.root,Ember.run(function(){a.send?a.send.apply(a,e(r.parameters,t)):a[t].apply(a,e(r.parameters))})}},r.view.on("willClearRender",function(){delete s.registeredActions[o]}),o},n.registerHelper("action",function(e){var t,r=arguments[arguments.length-1],n=a.call(arguments,1,-1),i=r.hash,u={eventName:i.on||"click"};u.parameters={context:this,options:r,params:n},u.view=r.data.view;var c,l;i.target?(c=this,l=i.target):(t=r.data.keywords.controller)&&(c=t),u.target={root:c,target:l,options:r},u.bubbles=i.bubbles;var h=s.registerAction(e,u,i.allowedKeys);return new o('data-ember-action="'+h+'"')})})}(),function(){if(Ember.ENV.EXPERIMENTAL_CONTROL_HELPER){var e=Ember.get,t=Ember.set;Ember.Handlebars.registerHelper("control",function(r,n,i){function o(){var e=Ember.Handlebars.get(this,n,i);t(p,"model",e),f.rerender()}2===arguments.length&&(i=n,n=void 0);var a;n&&(a=Ember.Handlebars.get(this,n,i));var s,u,c=i.data.keywords.controller,l=(i.data.keywords.view,e(c,"_childContainers")),h=i.hash.controlID;l.hasOwnProperty(h)?u=l[h]:(s=e(c,"container"),u=s.child(),l[h]=u);var m=r.replace(/\//g,"."),f=u.lookup("view:"+m)||u.lookup("view:default"),p=u.lookup("controller:"+m),d=u.lookup("template:"+r);t(p,"target",c),t(p,"model",a),i.hash.template=d,i.hash.controller=p,Ember.addObserver(this,n,o),f.one("willDestroyElement",this,function(){Ember.removeObserver(this,n,o)}),Ember.Handlebars.helpers.view.call(this,f,i)})}}(),function(){var e=Ember.get;Ember.set,Ember.ControllerMixin.reopen({transitionToRoute:function(){var t=e(this,"target"),r=t.transitionToRoute||t.transitionTo;return r.apply(t,arguments)},transitionTo:function(){return this.transitionToRoute.apply(this,arguments)},replaceRoute:function(){var t=e(this,"target"),r=t.replaceRoute||t.replaceWith;return r.apply(t,arguments)},replaceWith:function(){return this.replaceRoute.apply(this,arguments)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.View.reopen({init:function(){t(this,"_outlets",{}),this._super()},connectOutlet:function(r,n){var i=e(this,"_outlets"),o=e(this,"container"),a=o&&o.lookup("router:main"),s=e(n,"renderedName");t(i,r,n),a&&s&&a._connectActiveView(s,n)},disconnectOutlet:function(r){var n=e(this,"_outlets");t(n,r,null)}})}(),function(){Ember.get,Ember.set,Ember.Location={create:function(e){var t=e&&e.implementation,r=this.implementations[t];return r.create.apply(r,arguments)},registerImplementation:function(e,t){this.implementations[e]=t},implementations:{}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({path:"",getURL:function(){return e(this,"path")},setURL:function(e){t(this,"path",e)},onUpdateURL:function(e){this.updateCallback=e},handleURL:function(e){t(this,"path",e),this.updateCallback(e)},formatURL:function(e){return e}}),Ember.Location.registerImplementation("none",Ember.NoneLocation)}(),function(){var e=Ember.get,t=Ember.set;Ember.HashLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return e(this,"location").hash.substr(1)},setURL:function(r){e(this,"location").hash=r,t(this,"lastSetURL",r)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).bind("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=location.hash.substr(1);e(n,"lastSetURL")!==i&&(t(n,"lastSetURL",null),r(i))})})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("hashchange.ember-location-"+e)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var e=Ember.get,t=Ember.set,r=!1;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location),this.initState()},initState:function(){t(this,"history",e(this,"history")||window.history),this.replaceState(this.formatURL(this.getURL()))},rootURL:"/",getURL:function(){var t=e(this,"rootURL"),r=e(this,"location").pathname;return t=t.replace(/\/$/,""),r=r.replace(t,"")},setURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&this.pushState(e)},replaceURL:function(e){e=this.formatURL(e),this.getState()&&this.getState().path!==e&&this.replaceState(e)},getState:function(){return e(this,"history").state},pushState:function(t){e(this,"history").pushState({path:t},null,t),this._previousURL=this.getURL()},replaceState:function(t){e(this,"history").replaceState({path:t},null,t),this._previousURL=this.getURL()},onUpdateURL:function(e){var t=Ember.guidFor(this),n=this;Ember.$(window).bind("popstate.ember-location-"+t,function(){(r||(r=!0,n.getURL()!==n._previousURL))&&e(n.getURL())})},formatURL:function(t){var r=e(this,"rootURL");return""!==t&&(r=r.replace(/\/$/,"")),r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).unbind("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){function e(t,r,n,i){var o,a=t.name,s=t.incoming,u=t.incomingNames,c=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(a)){for(i.push(a),n[a]=!0,o=0;c>o;o++)e(s[u[o]],r,n,i);r(t,i),i.pop()}}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(e){if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t}},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,r){function n(e,t){if(e.name===r)throw new Error("cycle detected: "+r+" <- "+t.join(" <- "))}if(t&&r&&t!==r){var i=this.add(t),o=this.add(r);o.incoming.hasOwnProperty(t)||(e(i,n),i.hasOutgoing=!0,o.incoming[t]=i,o.incomingNames.push(t))}},t.prototype.topsort=function(t){var r,n,i={},o=this.vertices,a=this.names,s=a.length;for(r=0;s>r;r++)n=o[a[r]],n.hasOutgoing||e(n,t,i)},t.prototype.addEdges=function(e,t,r,n){var i;if(this.map(e,t),r)if("string"==typeof r)this.addEdge(e,r);else for(i=0;r.length>i;i++)this.addEdge(e,r[i]);if(n)if("string"==typeof n)this.addEdge(n,e);else for(i=0;n.length>i;i++)this.addEdge(n[i],e)},Ember.DAG=t}(),function(){var e=Ember.get,t=Ember.String.classify,r=Ember.String.capitalize,n=Ember.String.decamelize;Ember.DefaultResolver=Ember.Object.extend({namespace:null,resolve:function(e){var t=this.parseName(e),r=this[t.resolveMethodName];if(r){var n=r.call(this,t);if(n)return n}return this.resolveOther(t)},parseName:function(n){var i=n.split(":"),o=i[0],a=i[1],s=a,u=e(this,"namespace"),c=u;if("template"!==o&&-1!==s.indexOf("/")){var l=s.split("/");s=l[l.length-1];var h=r(l.slice(0,-1).join("."));c=Ember.Namespace.byName(h)}return{fullName:n,type:o,fullNameWithoutType:a,name:s,root:c,resolveMethodName:"resolve"+t(o)}},resolveTemplate:function(e){var t=e.fullNameWithoutType.replace(/\./g,"/");return Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:(t=n(t),Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:void 0)},useRouterNaming:function(e){e.name=e.name.replace(/\./g,"_"),"basic"===e.name&&(e.name="")},resolveController:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveRoute:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveView:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveOther:function(r){var n=t(r.name)+t(r.type),i=e(r.root,n);return i?i:void 0}})}(),function(){function e(e){var t=e.get("resolver")||Ember.DefaultResolver,r=t.create({namespace:e});return function(e){return r.resolve(e)}}function t(e){var t=e.split(":"),r=t[0],n=t[1];if("template"!==r){var i=n;return i.indexOf(".")>-1&&(i=i.replace(/\.(.)/g,function(e){return e.charAt(1).toUpperCase()})),n.indexOf("_")>-1&&(i=i.replace(/_(.)/g,function(e){return e.charAt(1).toUpperCase()})),r+":"+i}return e}var r=Ember.get,n=Ember.set,i=Ember.Application=Ember.Namespace.extend(Ember.DeferredMixin,{rootElement:"body",eventDispatcher:null,customEvents:null,_readinessDeferrals:1,init:function(){this.$||(this.$=Ember.$),this.__container__=this.buildContainer(),this.Router=this.Router||this.defaultRouter(),this.Router&&(this.Router.namespace=this),this._super(),this.scheduleInitialize(),Ember.LOG_VERSION&&(Ember.LOG_VERSION=!1)},buildContainer:function(){var e=this.__container__=i.buildContainer(this);return e},defaultRouter:function(){return void 0===this.router?Ember.Router.extend():void 0},scheduleInitialize:function(){var e=this;!this.$||this.$.isReady?Ember.run.schedule("actions",e,"_initialize"):this.$().ready(function(){Ember.run(e,"_initialize")})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,0===this._readinessDeferrals&&Ember.run.once(this,this.didBecomeReady)},register:function(){var e=this.__container__;e.register.apply(e,arguments)},inject:function(){var e=this.__container__;e.injection.apply(e,arguments)},initialize:function(){},_initialize:function(){return this.isDestroyed?void 0:(this.register("router:main",this.Router),this.runInitializers(),Ember.runLoadHooks("application",this),this.advanceReadiness(),this)},reset:function(){Ember.run(this,function(){Ember.run(r(this,"__container__"),"destroy"),this.buildContainer(),this._readinessDeferrals=1,this.$(this.rootElement).removeClass("ember-application"),Ember.run.schedule("actions",this,function(){this._initialize(),this.startRouting()})})},runInitializers:function(){var e,t,n=r(this.constructor,"initializers"),i=this.__container__,o=new Ember.DAG,a=this;for(e=0;n.length>e;e++)t=n[e],o.addEdges(t.name,t.initialize,t.before,t.after);o.topsort(function(e){var t=e.value;t(i,a)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=this.createEventDispatcher(),t=r(this,"customEvents");e.setup(t)},createEventDispatcher:function(){var e=r(this,"rootElement"),t=Ember.EventDispatcher.create({rootElement:e});return n(this,"eventDispatcher",t),t},startRouting:function(){var e=this.__container__.lookup("router:main");e&&e.startRouting()},handleURL:function(e){var t=this.__container__.lookup("router:main");t.handleURL(e)},ready:Ember.K,resolver:null,willDestroy:function(){Ember.BOOTED=!1;var e=r(this,"eventDispatcher");e&&e.destroy(),r(this,"__container__").destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({concatenatedProperties:["initializers"],initializers:Ember.A(),initializer:function(e){var t=r(this,"initializers");
21
+ t.push(e)},buildContainer:function(r){var n=new Ember.Container;return Ember.Container.defaultContainer=Ember.Container.defaultContainer||n,n.set=Ember.set,n.normalize=t,n.resolver=e(r),n.optionsForType("view",{singleton:!1}),n.optionsForType("template",{instantiate:!1}),n.register("application:main",r,{instantiate:!1}),n.register("controller:basic",Ember.Controller,{instantiate:!1}),n.register("controller:object",Ember.ObjectController,{instantiate:!1}),n.register("controller:array",Ember.ArrayController,{instantiate:!1}),n.register("route:basic",Ember.Route,{instantiate:!1}),n.injection("router:main","namespace","application:main"),n.typeInjection("controller","target","router:main"),n.typeInjection("controller","namespace","application:main"),n.typeInjection("route","router","router:main"),n}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){function e(e){for(var r,n=t(e,"needs"),i=t(e,"container"),o=!0,a=0,s=n.length;s>a;a++)r=n[a],-1===r.indexOf(":")&&(r="controller:"+r),i.has(r)||(o=!1);return o}var t=Ember.get;Ember.set;var r=Ember.Object.extend({controller:null,unknownProperty:function(e){for(var r,n=t(this,"controller"),i=t(n,"needs"),o=n.get("container"),a=0,s=i.length;s>a;a++)if(r=i[a],r===e)return o.lookup("controller:"+e)}});Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){this._super.apply(this,arguments),!e(this)},controllerFor:function(e){var r=t(this,"container");return r.lookup("controller:"+e)},controllers:Ember.computed(function(){return r.create({controller:this})})})}(),function(){var e=Ember.get,t=Ember.set;Ember.State=Ember.Object.extend(Ember.Evented,{isState:!0,parentState:null,start:null,name:null,path:Ember.computed(function(){var t=e(this,"parentState.path"),r=e(this,"name");return t&&(r=t+"."+r),r}),trigger:function(e){this[e]&&this[e].apply(this,[].slice.call(arguments,1)),this._super.apply(this,arguments)},init:function(){var r=e(this,"states");t(this,"childStates",Ember.A()),t(this,"eventTransitions",e(this,"eventTransitions")||{});var n,i,o;if(r)for(n in r)this.setupChild(r,n,r[n]);else{r={};for(n in this)"constructor"!==n&&(i=this[n])&&((o=i.transitionTarget)&&(this.eventTransitions[n]=o),this.setupChild(r,n,i));t(this,"states",r)}t(this,"pathsCaches",{})},setPathsCache:function(t,r,n){var i=Ember.guidFor(t.constructor),o=e(this,"pathsCaches"),a=o[i]||{};a[r]=n,o[i]=a},getPathsCache:function(t,r){var n=Ember.guidFor(t.constructor),i=e(this,"pathsCaches"),o=i[n]||{};return o[r]},setupChild:function(r,n,i){return i?(i.isState?t(i,"name",n):Ember.State.detect(i)&&(i=i.create({name:n})),i.isState?(t(i,"parentState",this),e(this,"childStates").pushObject(i),r[n]=i,i):void 0):!1},lookupEventTransition:function(e){for(var t,r=this;r&&!t;)t=r.eventTransitions[e],r=r.get("parentState");return t},isLeaf:Ember.computed(function(){return!e(this,"childStates").length}),hasContext:!0,setup:Ember.K,enter:Ember.K,exit:Ember.K}),Ember.State.reopenClass({transitionTo:function(e){var t=function(t,r){var n=[],i=Ember.$&&Ember.$.Event;r&&i&&r instanceof i?r.hasOwnProperty("contexts")&&(n=r.contexts.slice()):n=[].slice.call(arguments,1),n.unshift(e),t.transitionTo.apply(t,n)};return t.transitionTarget=e,t}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.String.fmt,n=Ember.ArrayPolyfills.forEach,i=function(e){this.enterStates=e.enterStates.slice(),this.exitStates=e.exitStates.slice(),this.resolveState=e.resolveState,this.finalState=e.enterStates[e.enterStates.length-1]||e.resolveState};i.prototype={normalize:function(e,t){return this.matchContextsToStates(t),this.addInitialStates(),this.removeUnchangedContexts(e),this},matchContextsToStates:function(t){for(var r,n,i=this.enterStates.length-1,o=[];t.length>0;){if(i>=0)r=this.enterStates[i--];else{if(this.enterStates.length){if(r=e(this.enterStates[0],"parentState"),!r)throw"Cannot match all contexts to states"}else r=this.resolveState;this.enterStates.unshift(r),this.exitStates.unshift(r)}n=e(r,"hasContext")?t.pop():null,o.unshift(n)}this.contexts=o},addInitialStates:function(){for(var t,r=this.finalState;;){if(t=e(r,"initialState")||"start",r=e(r,"states."+t),!r)break;this.finalState=r,this.enterStates.push(r),this.contexts.push(void 0)}},removeUnchangedContexts:function(e){for(;this.enterStates.length>0&&this.enterStates[0]===this.exitStates[0];){if(this.enterStates.length===this.contexts.length){if(e.getStateMeta(this.enterStates[0],"context")!==this.contexts[0])break;this.contexts.shift()}this.resolveState=this.enterStates.shift(),this.exitStates.shift()}}};var o=function(t,n,i){var s,u,c,l=this.enableLogging,h=i?"unhandledEvent":t,m=n[h];if(s=[].slice.call(arguments,3),"function"==typeof m)return l&&(i?Ember.Logger.log(r("STATEMANAGER: Unhandled event '%@' being sent to state %@.",[t,e(n,"path")])):Ember.Logger.log(r("STATEMANAGER: Sending event '%@' to state %@.",[t,e(n,"path")]))),c=s,i&&c.unshift(t),c.unshift(this),m.apply(n,c);var f=e(n,"parentState");return f?(u=s,u.unshift(t,f,i),o.apply(this,u)):i?void 0:a.call(this,t,s,!0)},a=function(t,r,n){return r.unshift(t,e(this,"currentState"),n),o.apply(this,r)};Ember.StateManager=Ember.State.extend({init:function(){this._super(),t(this,"stateMeta",Ember.Map.create());var r=e(this,"initialState");!r&&e(this,"states.start")&&(r="start"),r&&this.transitionTo(r)},stateMetaFor:function(t){var r=e(this,"stateMeta"),n=r.get(t);return n||(n={},r.set(t,n)),n},setStateMeta:function(e,r,n){return t(this.stateMetaFor(e),r,n)},getStateMeta:function(t,r){return e(this.stateMetaFor(t),r)},currentState:null,currentPath:Ember.computed.alias("currentState.path"),transitionEvent:"setup",errorOnUnhandledEvent:!0,send:function(e){var t=[].slice.call(arguments,1);return a.call(this,e,t,!1)},unhandledEvent:function(t,r){if(e(this,"errorOnUnhandledEvent"))throw new Ember.Error(this.toString()+" could not respond to event "+r+" in state "+e(this,"currentState.path")+".")},getStateByPath:function(t,r){for(var n=r.split("."),i=t,o=0,a=n.length;a>o&&(i=e(e(i,"states"),n[o]),i);o++);return i},findStateByPath:function(t,r){for(var n;!n&&t;)n=this.getStateByPath(t,r),t=e(t,"parentState");return n},getStatesInPath:function(t,r){if(!r||""===r)return void 0;for(var n,i,o=r.split("."),a=[],s=0,u=o.length;u>s;s++){if(n=e(t,"states"),!n)return void 0;if(i=e(n,o[s]),!i)return void 0;t=i,a.push(i)}return a},goToState:function(){return this.transitionTo.apply(this,arguments)},transitionTo:function(t,r){if(!Ember.isEmpty(t)){var n=r?Array.prototype.slice.call(arguments,1):[],o=e(this,"currentState")||this,a=this.contextFreeTransition(o,t),s=new i(a).normalize(this,n);this.enterState(s),this.triggerSetupContext(s)}},contextFreeTransition:function(t,r){var n=t.getPathsCache(this,r);if(n)return n;for(var i=this.getStatesInPath(t,r),o=[],a=t;a&&!i;){if(o.unshift(a),a=e(a,"parentState"),!a&&(i=this.getStatesInPath(this,r),!i))return;i=this.getStatesInPath(a,r)}for(;i.length>0&&i[0]===o[0];)a=i.shift(),o.shift();var s={exitStates:o,enterStates:i,resolveState:a};return t.setPathsCache(this,r,s),s},triggerSetupContext:function(t){var r=t.contexts,i=t.enterStates.length-r.length,o=t.enterStates,a=e(this,"transitionEvent");n.call(o,function(e,t){e.trigger(a,this,r[t-i])},this)},getState:function(t){var r=e(this,t),n=e(this,"parentState");return r?r:n?n.getState(t):void 0},enterState:function(r){var i=this.enableLogging,o=r.exitStates.slice(0).reverse();n.call(o,function(e){e.trigger("exit",this)},this),n.call(r.enterStates,function(t){i&&Ember.Logger.log("STATEMANAGER: Entering "+e(t,"path")),t.trigger("enter",this)},this),t(this,"currentState",r.finalState)}})}(),function(){function e(e){var t=new a;return Ember.run(EMBER_APP_BEING_TESTED,EMBER_APP_BEING_TESTED.handleURL,e),i(t,t.resolve),t}function t(e){var t=new a;return Ember.run(function(){Ember.$(e).click()}),i(t,t.resolve),t}function r(e,t){var r=new a,o=n(e);return Ember.run(function(){o.val(t)}),i(r,r.resolve),r}function n(e){return Ember.$(".ember-application").find(e)}function i(e,t){t||(t=e,e=null),stop();var r=setInterval(function(){var n=EMBER_APP_BEING_TESTED.__container__.lookup("router:main").router.isLoading;n||s||Ember.run.hasScheduledTimers()||Ember.run.currentRunLoop||(clearInterval(r),start(),Ember.run(e,t))},200)}var o,a=Ember.RSVP.Promise,s=0;Ember.Application.reopen({setupForTesting:function(){this.deferReadiness(),this.Router.reopen({location:"none"}),window.EMBER_APP_BEING_TESTED=this},injectTestHelpers:function(){Ember.$(document).ajaxStart(function(){s++}),Ember.$(document).ajaxStop(function(){s--}),window.visit=e,window.click=t,window.fillIn=r,o=window.find,window.find=n},removeTestHelpers:function(){window.visit=null,window.click=null,window.fillIn=null,window.find=o}})}()})(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||console.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website.");
@@ -310,7 +310,7 @@ Ember.none = Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isN
310
310
  @return {Boolean}
311
311
  */
312
312
  Ember.isEmpty = function(obj) {
313
- return Ember.isNone(obj) || (obj.length === 0 && typeof obj !== 'function') || (typeof obj === 'object' && Ember.get(obj, 'length') === 0);
313
+ return obj === null || obj === undefined || (obj.length === 0 && typeof obj !== 'function') || (typeof obj === 'object' && Ember.get(obj, 'length') === 0);
314
314
  };
315
315
  Ember.empty = Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.", Ember.isEmpty) ;
316
316
 
@@ -343,13 +343,6 @@ var platform = Ember.platform = {};
343
343
  */
344
344
  Ember.create = Object.create;
345
345
 
346
- // IE8 has Object.create but it couldn't treat property descripters.
347
- if (Ember.create) {
348
- if (Ember.create({a: 1}, {a: {value: 2}}).a !== 2) {
349
- Ember.create = null;
350
- }
351
- }
352
-
353
346
  // STUB_OBJECT_CREATE allows us to override other libraries that stub
354
347
  // Object.create different than we would prefer
355
348
  if (!Ember.create || Ember.ENV.STUB_OBJECT_CREATE) {
@@ -670,7 +663,7 @@ Ember.guidFor = function guidFor(obj) {
670
663
  if (obj === undefined) return "(undefined)";
671
664
  if (obj === null) return "(null)";
672
665
 
673
- var ret;
666
+ var cache, ret;
674
667
  var type = typeof obj;
675
668
 
676
669
  // Don't allow prototype changes to String etc. to change the guidFor
@@ -1071,7 +1064,7 @@ if (needsFinallyFix) {
1071
1064
  */
1072
1065
  if (needsFinallyFix) {
1073
1066
  Ember.tryCatchFinally = function(tryable, catchable, finalizer, binding) {
1074
- var result, finalResult, finalError;
1067
+ var result, finalResult, finalError, finalReturn;
1075
1068
 
1076
1069
  binding = binding || this;
1077
1070
 
@@ -1842,11 +1835,12 @@ get = function get(obj, keyName) {
1842
1835
  obj = null;
1843
1836
  }
1844
1837
 
1838
+ if (!obj || keyName.indexOf('.') !== -1) {
1845
1839
 
1846
- if (obj === null || keyName.indexOf('.') !== -1) {
1847
1840
  return getPath(obj, keyName);
1848
1841
  }
1849
1842
 
1843
+
1850
1844
  var meta = obj[META_KEY], desc = meta && meta.descs[keyName], ret;
1851
1845
  if (desc) {
1852
1846
  return desc.get(obj, keyName);
@@ -1918,7 +1912,7 @@ var getPath = Ember._getPath = function(root, path) {
1918
1912
 
1919
1913
  parts = path.split(".");
1920
1914
  len = parts.length;
1921
- for (idx=0; root !== undefined && root !== null && idx<len; idx++) {
1915
+ for (idx=0; root && idx<len; idx++) {
1922
1916
  root = get(root, parts[idx], true);
1923
1917
  if (root && root.isDestroyed) { return undefined; }
1924
1918
  }
@@ -1964,9 +1958,7 @@ Ember.getPath = Ember.deprecateFunc('getPath is deprecated since get now support
1964
1958
 
1965
1959
  var o_create = Ember.create,
1966
1960
  metaFor = Ember.meta,
1967
- META_KEY = Ember.META_KEY,
1968
- /* listener flags */
1969
- ONCE = 1, SUSPENDED = 2;
1961
+ META_KEY = Ember.META_KEY;
1970
1962
 
1971
1963
  /*
1972
1964
  The event system uses a series of nested hashes to store listeners on an
@@ -1979,7 +1971,7 @@ var o_create = Ember.create,
1979
1971
  {
1980
1972
  listeners: { // variable name: `listenerSet`
1981
1973
  "foo:changed": [ // variable name: `actions`
1982
- [target, method, flags]
1974
+ [target, method, onceFlag, suspendedFlag]
1983
1975
  ]
1984
1976
  }
1985
1977
  }
@@ -2025,11 +2017,12 @@ function actionsUnion(obj, eventName, otherActions) {
2025
2017
  for (var i = actions.length - 1; i >= 0; i--) {
2026
2018
  var target = actions[i][0],
2027
2019
  method = actions[i][1],
2028
- flags = actions[i][2],
2020
+ once = actions[i][2],
2021
+ suspended = actions[i][3],
2029
2022
  actionIndex = indexOf(otherActions, target, method);
2030
2023
 
2031
2024
  if (actionIndex === -1) {
2032
- otherActions.push([target, method, flags]);
2025
+ otherActions.push([target, method, once, suspended]);
2033
2026
  }
2034
2027
  }
2035
2028
  }
@@ -2043,13 +2036,14 @@ function actionsDiff(obj, eventName, otherActions) {
2043
2036
  for (var i = actions.length - 1; i >= 0; i--) {
2044
2037
  var target = actions[i][0],
2045
2038
  method = actions[i][1],
2046
- flags = actions[i][2],
2039
+ once = actions[i][2],
2040
+ suspended = actions[i][3],
2047
2041
  actionIndex = indexOf(otherActions, target, method);
2048
2042
 
2049
2043
  if (actionIndex !== -1) { continue; }
2050
2044
 
2051
- otherActions.push([target, method, flags]);
2052
- diffActions.push([target, method, flags]);
2045
+ otherActions.push([target, method, once, suspended]);
2046
+ diffActions.push([target, method, once, suspended]);
2053
2047
  }
2054
2048
 
2055
2049
  return diffActions;
@@ -2075,14 +2069,11 @@ function addListener(obj, eventName, target, method, once) {
2075
2069
  }
2076
2070
 
2077
2071
  var actions = actionsFor(obj, eventName),
2078
- actionIndex = indexOf(actions, target, method),
2079
- flags = 0;
2080
-
2081
- if (once) flags |= ONCE;
2072
+ actionIndex = indexOf(actions, target, method);
2082
2073
 
2083
2074
  if (actionIndex !== -1) { return; }
2084
2075
 
2085
- actions.push([target, method, flags]);
2076
+ actions.push([target, method, once, undefined]);
2086
2077
 
2087
2078
  if ('function' === typeof obj.didAddListener) {
2088
2079
  obj.didAddListener(eventName, target, method);
@@ -2109,7 +2100,7 @@ function removeListener(obj, eventName, target, method) {
2109
2100
  target = null;
2110
2101
  }
2111
2102
 
2112
- function _removeListener(target, method) {
2103
+ function _removeListener(target, method, once) {
2113
2104
  var actions = actionsFor(obj, eventName),
2114
2105
  actionIndex = indexOf(actions, target, method);
2115
2106
 
@@ -2166,12 +2157,12 @@ function suspendListener(obj, eventName, target, method, callback) {
2166
2157
 
2167
2158
  if (actionIndex !== -1) {
2168
2159
  action = actions[actionIndex].slice(); // copy it, otherwise we're modifying a shared object
2169
- action[2] |= SUSPENDED; // mark the action as suspended
2160
+ action[3] = true; // mark the action as suspended
2170
2161
  actions[actionIndex] = action; // replace the shared object with our copy
2171
2162
  }
2172
2163
 
2173
2164
  function tryable() { return callback.call(target); }
2174
- function finalizer() { if (action) { action[2] &= ~SUSPENDED; } }
2165
+ function finalizer() { if (action) { action[3] = undefined; } }
2175
2166
 
2176
2167
  return Ember.tryFinally(tryable, finalizer);
2177
2168
  }
@@ -2210,7 +2201,7 @@ function suspendListeners(obj, eventNames, target, method, callback) {
2210
2201
 
2211
2202
  if (actionIndex !== -1) {
2212
2203
  action = actions[actionIndex].slice();
2213
- action[2] |= SUSPENDED;
2204
+ action[3] = true;
2214
2205
  actions[actionIndex] = action;
2215
2206
  suspendedActions.push(action);
2216
2207
  }
@@ -2220,7 +2211,7 @@ function suspendListeners(obj, eventNames, target, method, callback) {
2220
2211
 
2221
2212
  function finalizer() {
2222
2213
  for (i = 0, l = suspendedActions.length; i < l; i++) {
2223
- suspendedActions[i][2] &= ~SUSPENDED;
2214
+ suspendedActions[i][3] = undefined;
2224
2215
  }
2225
2216
  }
2226
2217
 
@@ -2270,11 +2261,13 @@ function sendEvent(obj, eventName, params, actions) {
2270
2261
  if (!actions) { return; }
2271
2262
 
2272
2263
  for (var i = actions.length - 1; i >= 0; i--) { // looping in reverse for once listeners
2273
- var action = actions[i];
2274
- if (!action) { continue; }
2275
- var target = action[0], method = action[1], flags = action[2];
2276
- if (flags & SUSPENDED) { continue; }
2277
- if (flags & ONCE) { removeListener(obj, eventName, target, method); }
2264
+ if (!actions[i] || actions[i][3] === true) { continue; }
2265
+
2266
+ var target = actions[i][0],
2267
+ method = actions[i][1],
2268
+ once = actions[i][2];
2269
+
2270
+ if (once) { removeListener(obj, eventName, target, method); }
2278
2271
  if (!target) { target = obj; }
2279
2272
  if ('string' === typeof method) { method = target[method]; }
2280
2273
  if (params) {
@@ -2354,7 +2347,7 @@ var guidFor = Ember.guidFor,
2354
2347
  keyName: keyName,
2355
2348
  eventName: eventName,
2356
2349
  listeners: [
2357
- [target, method, flags]
2350
+ [target, method, onceFlag, suspendedFlag]
2358
2351
  ]
2359
2352
  },
2360
2353
  ...
@@ -2583,11 +2576,11 @@ var endPropertyChanges = Ember.endPropertyChanges = function() {
2583
2576
  });
2584
2577
  ```
2585
2578
 
2586
- @method changeProperties
2579
+ @method changePropertiess
2587
2580
  @param {Function} callback
2588
2581
  @param [binding]
2589
2582
  */
2590
- Ember.changeProperties = function(cb, binding){
2583
+ var changeProperties = Ember.changeProperties = function(cb, binding){
2591
2584
  beginPropertyChanges();
2592
2585
  tryFinally(cb, endPropertyChanges, binding);
2593
2586
  };
@@ -2791,7 +2784,7 @@ var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
2791
2784
  @private
2792
2785
  @constructor
2793
2786
  */
2794
- Ember.Descriptor = function() {};
2787
+ var Descriptor = Ember.Descriptor = function() {};
2795
2788
 
2796
2789
  // ..........................................................
2797
2790
  // DEFINING PROPERTIES API
@@ -3352,7 +3345,7 @@ Ember.watchPath = function(obj, keyPath) {
3352
3345
  };
3353
3346
 
3354
3347
  Ember.unwatchPath = function(obj, keyPath) {
3355
- var m = metaFor(obj), watching = m.watching;
3348
+ var m = metaFor(obj), watching = m.watching, desc;
3356
3349
 
3357
3350
  if (watching[keyPath] === 1) {
3358
3351
  watching[keyPath] = 0;
@@ -3897,6 +3890,7 @@ ComputedPropertyPrototype.teardown = function(obj, keyName) {
3897
3890
  The function should accept two parameters, key and value. If value is not
3898
3891
  undefined you should set the value first. In either case return the
3899
3892
  current value of the property.
3893
+
3900
3894
  @method computed
3901
3895
  @for Ember
3902
3896
  @param {Function} func The computed property function.
@@ -4138,7 +4132,7 @@ registerComputedWithProperties('or', function(properties) {
4138
4132
  @for Ember
4139
4133
  @param {String} dependentKey, [dependentKey...]
4140
4134
  @return {Ember.ComputedProperty} computed property which returns
4141
- the first truthy value of given list of properties.
4135
+ the first trouthy value of given list of properties.
4142
4136
  */
4143
4137
  registerComputedWithProperties('any', function(properties) {
4144
4138
  for (var key in properties) {
@@ -4188,48 +4182,6 @@ Ember.computed.alias = function(dependentKey) {
4188
4182
  });
4189
4183
  };
4190
4184
 
4191
- /**
4192
- @method computed.oneWay
4193
- @for Ember
4194
- @param {String} dependentKey
4195
- @return {Ember.ComputedProperty} computed property which creates an
4196
- one way computed property to the original value for property.
4197
-
4198
- Where `computed.alias` aliases `get` and `set`, and allows for bidirectional
4199
- data flow, `computed.oneWay` only provides an aliased `get`. The `set` will
4200
- not mutate the upstream property, rather causes the current property to
4201
- become the value set. This causes the downstream property to permentantly
4202
- diverge from the upstream property.
4203
-
4204
- ```javascript
4205
- User = Ember.Object.extend({
4206
- firstName: null,
4207
- lastName: null,
4208
- nickName: Ember.computed.oneWay('firstName')
4209
- });
4210
-
4211
- user = User.create({
4212
- firstName: 'Teddy',
4213
- lastName: 'Zeenny'
4214
- });
4215
-
4216
- user.get('nickName');
4217
- # 'Teddy'
4218
-
4219
- user.set('nickName', 'TeddyBear');
4220
- # 'TeddyBear'
4221
-
4222
- user.get('firstName');
4223
- # 'Teddy'
4224
- ```
4225
- */
4226
- Ember.computed.oneWay = function(dependentKey) {
4227
- return Ember.computed(dependentKey, function() {
4228
- return get(this, dependentKey);
4229
- });
4230
- };
4231
-
4232
-
4233
4185
  /**
4234
4186
  @method computed.defaultTo
4235
4187
  @for Ember
@@ -4259,6 +4211,8 @@ Ember.computed.defaultTo = function(defaultPath) {
4259
4211
  var AFTER_OBSERVERS = ':change';
4260
4212
  var BEFORE_OBSERVERS = ':before';
4261
4213
 
4214
+ var guidFor = Ember.guidFor;
4215
+
4262
4216
  function changeEvent(keyName) {
4263
4217
  return keyName+AFTER_OBSERVERS;
4264
4218
  }
@@ -4750,44 +4704,27 @@ Ember.run.sync = function() {
4750
4704
 
4751
4705
  var timers = {}; // active timers...
4752
4706
 
4753
- function sortByExpires(timerA, timerB) {
4754
- var a = timerA.expires,
4755
- b = timerB.expires;
4756
-
4757
- if (a > b) { return 1; }
4758
- if (a < b) { return -1; }
4759
- return 0;
4760
- }
4761
-
4762
4707
  var scheduledLater, scheduledLaterExpires;
4763
4708
  function invokeLaterTimers() {
4764
4709
  scheduledLater = null;
4765
4710
  run(function() {
4766
4711
  var now = (+ new Date()), earliest = -1;
4767
- var timersToBeInvoked = [];
4768
4712
  for (var key in timers) {
4769
4713
  if (!timers.hasOwnProperty(key)) { continue; }
4770
4714
  var timer = timers[key];
4771
4715
  if (timer && timer.expires) {
4772
4716
  if (now >= timer.expires) {
4773
4717
  delete timers[key];
4774
- timersToBeInvoked.push(timer);
4718
+ invoke(timer.target, timer.method, timer.args, 2);
4775
4719
  } else {
4776
4720
  if (earliest < 0 || (timer.expires < earliest)) { earliest = timer.expires; }
4777
4721
  }
4778
4722
  }
4779
4723
  }
4780
4724
 
4781
- forEach.call(timersToBeInvoked.sort(sortByExpires), function(timer) {
4782
- invoke(timer.target, timer.method, timer.args, 2);
4783
- });
4784
-
4785
4725
  // schedule next timeout to fire when the earliest timer expires
4786
4726
  if (earliest > 0) {
4787
- // To allow overwrite `setTimeout` as stub from test code.
4788
- // The assignment to `window.setTimeout` doesn't equal to `setTimeout` in older IE.
4789
- // So `window` is required.
4790
- scheduledLater = window.setTimeout(invokeLaterTimers, earliest - now);
4727
+ scheduledLater = setTimeout(invokeLaterTimers, earliest - now);
4791
4728
  scheduledLaterExpires = earliest;
4792
4729
  }
4793
4730
  });
@@ -5417,7 +5354,7 @@ mixinProperties(Binding, {
5417
5354
 
5418
5355
  You should consider using one way bindings anytime you have an object that
5419
5356
  may be created frequently and you do not intend to change a property; only
5420
- to monitor it for changes (such as in the example above).
5357
+ to monitor it for changes. (such as in the example above).
5421
5358
 
5422
5359
  ## Adding Bindings Manually
5423
5360
 
@@ -5718,6 +5655,14 @@ function mergeMixins(mixins, m, descs, values, base, keys) {
5718
5655
  }
5719
5656
  }
5720
5657
 
5658
+ function writableReq(obj) {
5659
+ var m = Ember.meta(obj), req = m.required;
5660
+ if (!req || !m.hasOwnProperty('required')) {
5661
+ req = m.required = req ? o_create(req) : {};
5662
+ }
5663
+ return req;
5664
+ }
5665
+
5721
5666
  var IS_BINDING = Ember.IS_BINDING = /^.+Binding$/;
5722
5667
 
5723
5668
  function detectBinding(obj, key, value, m) {
@@ -6203,57 +6148,14 @@ Ember Metal
6203
6148
  })();
6204
6149
 
6205
6150
  (function() {
6206
- define("rsvp/all",
6207
- ["rsvp/defer","exports"],
6208
- function(__dependency1__, __exports__) {
6209
- "use strict";
6210
- var defer = __dependency1__.defer;
6211
-
6212
- function all(promises) {
6213
- var results = [], deferred = defer(), remaining = promises.length;
6214
-
6215
- if (remaining === 0) {
6216
- deferred.resolve([]);
6217
- }
6218
-
6219
- var resolver = function(index) {
6220
- return function(value) {
6221
- resolveAll(index, value);
6222
- };
6223
- };
6224
-
6225
- var resolveAll = function(index, value) {
6226
- results[index] = value;
6227
- if (--remaining === 0) {
6228
- deferred.resolve(results);
6229
- }
6230
- };
6231
-
6232
- var rejectAll = function(error) {
6233
- deferred.reject(error);
6234
- };
6235
-
6236
- for (var i = 0; i < promises.length; i++) {
6237
- if (promises[i] && typeof promises[i].then === 'function') {
6238
- promises[i].then(resolver(i), rejectAll);
6239
- } else {
6240
- resolveAll(i, promises[i]);
6241
- }
6242
- }
6243
- return deferred.promise;
6244
- }
6245
-
6246
- __exports__.all = all;
6247
- });
6248
-
6249
- define("rsvp/async",
6250
- ["exports"],
6251
- function(__exports__) {
6151
+ define("rsvp",
6152
+ [],
6153
+ function() {
6252
6154
  "use strict";
6253
6155
  var browserGlobal = (typeof window !== 'undefined') ? window : {};
6254
6156
 
6255
- var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
6256
- var async;
6157
+ var MutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
6158
+ var RSVP, async;
6257
6159
 
6258
6160
  if (typeof process !== 'undefined' &&
6259
6161
  {}.toString.call(process) === '[object process]') {
@@ -6262,10 +6164,10 @@ define("rsvp/async",
6262
6164
  callback.call(binding);
6263
6165
  });
6264
6166
  };
6265
- } else if (BrowserMutationObserver) {
6167
+ } else if (MutationObserver) {
6266
6168
  var queue = [];
6267
6169
 
6268
- var observer = new BrowserMutationObserver(function() {
6170
+ var observer = new MutationObserver(function() {
6269
6171
  var toProcess = queue.slice();
6270
6172
  queue = [];
6271
6173
 
@@ -6296,47 +6198,6 @@ define("rsvp/async",
6296
6198
  };
6297
6199
  }
6298
6200
 
6299
-
6300
- __exports__.async = async;
6301
- });
6302
-
6303
- define("rsvp/config",
6304
- ["rsvp/async","exports"],
6305
- function(__dependency1__, __exports__) {
6306
- "use strict";
6307
- var async = __dependency1__.async;
6308
-
6309
- var config = {};
6310
- config.async = async;
6311
-
6312
- __exports__.config = config;
6313
- });
6314
-
6315
- define("rsvp/defer",
6316
- ["rsvp/promise","exports"],
6317
- function(__dependency1__, __exports__) {
6318
- "use strict";
6319
- var Promise = __dependency1__.Promise;
6320
-
6321
- function defer() {
6322
- var deferred = {};
6323
-
6324
- var promise = new Promise(function(resolve, reject) {
6325
- deferred.resolve = resolve;
6326
- deferred.reject = reject;
6327
- });
6328
-
6329
- deferred.promise = promise;
6330
- return deferred;
6331
- }
6332
-
6333
- __exports__.defer = defer;
6334
- });
6335
-
6336
- define("rsvp/events",
6337
- ["exports"],
6338
- function(__exports__) {
6339
- "use strict";
6340
6201
  var Event = function(type, options) {
6341
6202
  this.type = type;
6342
6203
 
@@ -6431,148 +6292,7 @@ define("rsvp/events",
6431
6292
  }
6432
6293
  };
6433
6294
 
6434
-
6435
- __exports__.EventTarget = EventTarget;
6436
- });
6437
-
6438
- define("rsvp/hash",
6439
- ["rsvp/defer","exports"],
6440
- function(__dependency1__, __exports__) {
6441
- "use strict";
6442
- var defer = __dependency1__.defer;
6443
-
6444
- function size(object) {
6445
- var size = 0;
6446
-
6447
- for (var prop in object) {
6448
- size++;
6449
- }
6450
-
6451
- return size;
6452
- }
6453
-
6454
- function hash(promises) {
6455
- var results = {}, deferred = defer(), remaining = size(promises);
6456
-
6457
- if (remaining === 0) {
6458
- deferred.resolve({});
6459
- }
6460
-
6461
- var resolver = function(prop) {
6462
- return function(value) {
6463
- resolveAll(prop, value);
6464
- };
6465
- };
6466
-
6467
- var resolveAll = function(prop, value) {
6468
- results[prop] = value;
6469
- if (--remaining === 0) {
6470
- deferred.resolve(results);
6471
- }
6472
- };
6473
-
6474
- var rejectAll = function(error) {
6475
- deferred.reject(error);
6476
- };
6477
-
6478
- for (var prop in promises) {
6479
- if (promises[prop] && typeof promises[prop].then === 'function') {
6480
- promises[prop].then(resolver(prop), rejectAll);
6481
- } else {
6482
- resolveAll(prop, promises[prop]);
6483
- }
6484
- }
6485
-
6486
- return deferred.promise;
6487
- }
6488
-
6489
- __exports__.hash = hash;
6490
- });
6491
-
6492
- define("rsvp/node",
6493
- ["rsvp/promise","rsvp/all","exports"],
6494
- function(__dependency1__, __dependency2__, __exports__) {
6495
- "use strict";
6496
- var Promise = __dependency1__.Promise;
6497
- var all = __dependency2__.all;
6498
-
6499
- function makeNodeCallbackFor(resolve, reject) {
6500
- return function (error, value) {
6501
- if (error) {
6502
- reject(error);
6503
- } else if (arguments.length > 2) {
6504
- resolve(Array.prototype.slice.call(arguments, 1));
6505
- } else {
6506
- resolve(value);
6507
- }
6508
- };
6509
- }
6510
-
6511
- function denodeify(nodeFunc) {
6512
- return function() {
6513
- var nodeArgs = Array.prototype.slice.call(arguments), resolve, reject;
6514
-
6515
- var promise = new Promise(function(nodeResolve, nodeReject) {
6516
- resolve = nodeResolve;
6517
- reject = nodeReject;
6518
- });
6519
-
6520
- all(nodeArgs).then(function(nodeArgs) {
6521
- nodeArgs.push(makeNodeCallbackFor(resolve, reject));
6522
-
6523
- try {
6524
- nodeFunc.apply(this, nodeArgs);
6525
- } catch(e) {
6526
- reject(e);
6527
- }
6528
- });
6529
-
6530
- return promise;
6531
- };
6532
- }
6533
-
6534
- __exports__.denodeify = denodeify;
6535
- });
6536
-
6537
- define("rsvp/promise",
6538
- ["rsvp/config","rsvp/events","exports"],
6539
- function(__dependency1__, __dependency2__, __exports__) {
6540
- "use strict";
6541
- var config = __dependency1__.config;
6542
- var EventTarget = __dependency2__.EventTarget;
6543
-
6544
- function objectOrFunction(x) {
6545
- return isFunction(x) || (typeof x === "object" && x !== null);
6546
- }
6547
-
6548
- function isFunction(x){
6549
- return typeof x === "function";
6550
- }
6551
-
6552
- var Promise = function(resolver) {
6553
- var promise = this,
6554
- resolved = false;
6555
-
6556
- if (typeof resolver !== 'function') {
6557
- throw new TypeError('You must pass a resolver function as the sole argument to the promise constructor');
6558
- }
6559
-
6560
- if (!(promise instanceof Promise)) {
6561
- return new Promise(resolver);
6562
- }
6563
-
6564
- var resolvePromise = function(value) {
6565
- if (resolved) { return; }
6566
- resolved = true;
6567
- resolve(promise, value);
6568
- };
6569
-
6570
- var rejectPromise = function(value) {
6571
- if (resolved) { return; }
6572
- resolved = true;
6573
- reject(promise, value);
6574
- };
6575
-
6295
+ var Promise = function() {
6576
6296
  this.on('promise:resolved', function(event) {
6577
6297
  this.trigger('success', { detail: event.detail });
6578
6298
  }, this);
@@ -6580,16 +6300,12 @@ define("rsvp/promise",
6580
6300
  this.on('promise:failed', function(event) {
6581
6301
  this.trigger('error', { detail: event.detail });
6582
6302
  }, this);
6583
-
6584
- try {
6585
- resolver(resolvePromise, rejectPromise);
6586
- } catch(e) {
6587
- rejectPromise(e);
6588
- }
6589
6303
  };
6590
6304
 
6305
+ var noop = function() {};
6306
+
6591
6307
  var invokeCallback = function(type, promise, callback, event) {
6592
- var hasCallback = isFunction(callback),
6308
+ var hasCallback = typeof callback === 'function',
6593
6309
  value, error, succeeded, failed;
6594
6310
 
6595
6311
  if (hasCallback) {
@@ -6605,34 +6321,34 @@ define("rsvp/promise",
6605
6321
  succeeded = true;
6606
6322
  }
6607
6323
 
6608
- if (handleThenable(promise, value)) {
6609
- return;
6324
+ if (value && typeof value.then === 'function') {
6325
+ value.then(function(value) {
6326
+ promise.resolve(value);
6327
+ }, function(error) {
6328
+ promise.reject(error);
6329
+ });
6610
6330
  } else if (hasCallback && succeeded) {
6611
- resolve(promise, value);
6331
+ promise.resolve(value);
6612
6332
  } else if (failed) {
6613
- reject(promise, error);
6614
- } else if (type === 'resolve') {
6615
- resolve(promise, value);
6616
- } else if (type === 'reject') {
6617
- reject(promise, value);
6333
+ promise.reject(error);
6334
+ } else {
6335
+ promise[type](value);
6618
6336
  }
6619
6337
  };
6620
6338
 
6621
6339
  Promise.prototype = {
6622
- constructor: Promise,
6623
-
6624
6340
  then: function(done, fail) {
6625
- var thenPromise = new Promise(function() {});
6341
+ var thenPromise = new Promise();
6626
6342
 
6627
- if (this.isFulfilled) {
6628
- config.async(function() {
6629
- invokeCallback('resolve', thenPromise, done, { detail: this.fulfillmentValue });
6343
+ if (this.isResolved) {
6344
+ RSVP.async(function() {
6345
+ invokeCallback('resolve', thenPromise, done, { detail: this.resolvedValue });
6630
6346
  }, this);
6631
6347
  }
6632
6348
 
6633
6349
  if (this.isRejected) {
6634
- config.async(function() {
6635
- invokeCallback('reject', thenPromise, fail, { detail: this.rejectedReason });
6350
+ RSVP.async(function() {
6351
+ invokeCallback('reject', thenPromise, fail, { detail: this.rejectedValue });
6636
6352
  }, this);
6637
6353
  }
6638
6354
 
@@ -6645,162 +6361,75 @@ define("rsvp/promise",
6645
6361
  });
6646
6362
 
6647
6363
  return thenPromise;
6648
- }
6649
- };
6650
-
6651
- EventTarget.mixin(Promise.prototype);
6364
+ },
6652
6365
 
6653
- function resolve(promise, value) {
6654
- if (promise === value) {
6655
- fulfill(promise, value);
6656
- } else if (!handleThenable(promise, value)) {
6657
- fulfill(promise, value);
6658
- }
6659
- }
6366
+ resolve: function(value) {
6367
+ resolve(this, value);
6660
6368
 
6661
- function handleThenable(promise, value) {
6662
- var then = null;
6369
+ this.resolve = noop;
6370
+ this.reject = noop;
6371
+ },
6663
6372
 
6664
- if (objectOrFunction(value)) {
6665
- try {
6666
- then = value.then;
6667
- } catch(e) {
6668
- reject(promise, e);
6669
- return true;
6670
- }
6373
+ reject: function(value) {
6374
+ reject(this, value);
6671
6375
 
6672
- if (isFunction(then)) {
6673
- try {
6674
- then.call(value, function(val) {
6675
- if (value !== val) {
6676
- resolve(promise, val);
6677
- } else {
6678
- fulfill(promise, val);
6679
- }
6680
- }, function(val) {
6681
- reject(promise, val);
6682
- });
6683
- } catch (e) {
6684
- reject(promise, e);
6685
- }
6686
- return true;
6687
- }
6376
+ this.resolve = noop;
6377
+ this.reject = noop;
6688
6378
  }
6379
+ };
6689
6380
 
6690
- return false;
6691
- }
6692
-
6693
- function fulfill(promise, value) {
6694
- config.async(function() {
6381
+ function resolve(promise, value) {
6382
+ RSVP.async(function() {
6695
6383
  promise.trigger('promise:resolved', { detail: value });
6696
- promise.isFulfilled = true;
6697
- promise.fulfillmentValue = value;
6384
+ promise.isResolved = true;
6385
+ promise.resolvedValue = value;
6698
6386
  });
6699
6387
  }
6700
6388
 
6701
6389
  function reject(promise, value) {
6702
- config.async(function() {
6390
+ RSVP.async(function() {
6703
6391
  promise.trigger('promise:failed', { detail: value });
6704
6392
  promise.isRejected = true;
6705
- promise.rejectedReason = value;
6706
- });
6707
- }
6708
-
6709
-
6710
- __exports__.Promise = Promise;
6711
- });
6712
-
6713
- define("rsvp/reject",
6714
- ["rsvp/promise","exports"],
6715
- function(__dependency1__, __exports__) {
6716
- "use strict";
6717
- var Promise = __dependency1__.Promise;
6718
-
6719
-
6720
- function objectOrFunction(x) {
6721
- return typeof x === "function" || (typeof x === "object" && x !== null);
6722
- }
6723
-
6724
-
6725
- function reject(reason) {
6726
- return new Promise(function (resolve, reject) {
6727
- reject(reason);
6393
+ promise.rejectedValue = value;
6728
6394
  });
6729
6395
  }
6730
6396
 
6397
+ function all(promises) {
6398
+ var i, results = [];
6399
+ var allPromise = new Promise();
6400
+ var remaining = promises.length;
6731
6401
 
6732
- __exports__.reject = reject;
6733
- });
6734
-
6735
- define("rsvp/resolve",
6736
- ["rsvp/promise","exports"],
6737
- function(__dependency1__, __exports__) {
6738
- "use strict";
6739
- var Promise = __dependency1__.Promise;
6740
-
6741
-
6742
- function objectOrFunction(x) {
6743
- return typeof x === "function" || (typeof x === "object" && x !== null);
6744
- }
6745
-
6746
- function resolve(thenable){
6747
- var promise = new Promise(function(resolve, reject){
6748
- var then;
6749
-
6750
- try {
6751
- if ( objectOrFunction(thenable) ) {
6752
- then = thenable.then;
6753
-
6754
- if (typeof then === "function") {
6755
- then.call(thenable, resolve, reject);
6756
- } else {
6757
- resolve(thenable);
6758
- }
6402
+ if (remaining === 0) {
6403
+ allPromise.resolve([]);
6404
+ }
6759
6405
 
6760
- } else {
6761
- resolve(thenable);
6762
- }
6406
+ var resolver = function(index) {
6407
+ return function(value) {
6408
+ resolve(index, value);
6409
+ };
6410
+ };
6763
6411
 
6764
- } catch(error) {
6765
- reject(error);
6412
+ var resolve = function(index, value) {
6413
+ results[index] = value;
6414
+ if (--remaining === 0) {
6415
+ allPromise.resolve(results);
6766
6416
  }
6767
- });
6417
+ };
6768
6418
 
6769
- return promise;
6770
- }
6419
+ var reject = function(error) {
6420
+ allPromise.reject(error);
6421
+ };
6771
6422
 
6423
+ for (i = 0; i < remaining; i++) {
6424
+ promises[i].then(resolver(i), reject);
6425
+ }
6426
+ return allPromise;
6427
+ }
6772
6428
 
6773
- __exports__.resolve = resolve;
6774
- });
6429
+ EventTarget.mixin(Promise.prototype);
6775
6430
 
6776
- define("rsvp",
6777
- ["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/defer","rsvp/config","rsvp/resolve","rsvp/reject","exports"],
6778
- function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __exports__) {
6779
- "use strict";
6780
- var EventTarget = __dependency1__.EventTarget;
6781
- var Promise = __dependency2__.Promise;
6782
- var denodeify = __dependency3__.denodeify;
6783
- var all = __dependency4__.all;
6784
- var hash = __dependency5__.hash;
6785
- var defer = __dependency6__.defer;
6786
- var config = __dependency7__.config;
6787
- var resolve = __dependency8__.resolve;
6788
- var reject = __dependency9__.reject;
6789
-
6790
- function configure(name, value) {
6791
- config[name] = value;
6792
- }
6793
-
6794
-
6795
- __exports__.Promise = Promise;
6796
- __exports__.EventTarget = EventTarget;
6797
- __exports__.all = all;
6798
- __exports__.hash = hash;
6799
- __exports__.defer = defer;
6800
- __exports__.denodeify = denodeify;
6801
- __exports__.configure = configure;
6802
- __exports__.resolve = resolve;
6803
- __exports__.reject = reject;
6431
+ RSVP = { async: async, Promise: Promise, Event: Event, EventTarget: EventTarget, all: all, raiseOnUncaughtExceptions: true };
6432
+ return RSVP;
6804
6433
  });
6805
6434
 
6806
6435
  })();
@@ -7375,7 +7004,7 @@ var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'n
7375
7004
  @constructor
7376
7005
  */
7377
7006
  Ember.Error = function() {
7378
- var tmp = Error.apply(this, arguments);
7007
+ var tmp = Error.prototype.constructor.apply(this, arguments);
7379
7008
 
7380
7009
  // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
7381
7010
  for (var idx = 0; idx < errorProps.length; idx++) {
@@ -7637,12 +7266,10 @@ Ember.String = {
7637
7266
  /**
7638
7267
  Returns the Capitalized form of a string
7639
7268
 
7640
- ```javascript
7641
- 'innerHTML'.capitalize() // 'InnerHTML'
7642
- 'action_name'.capitalize() // 'Action_name'
7643
- 'css-class-name'.capitalize() // 'Css-class-name'
7644
- 'my favorite items'.capitalize() // 'My favorite items'
7645
- ```
7269
+ 'innerHTML'.capitalize() // 'InnerHTML'
7270
+ 'action_name'.capitalize() // 'Action_name'
7271
+ 'css-class-name'.capitalize() // 'Css-class-name'
7272
+ 'my favorite items'.capitalize() // 'My favorite items'
7646
7273
 
7647
7274
  @method capitalize
7648
7275
  @param {String} str
@@ -8787,7 +8414,9 @@ Ember.Enumerable = Ember.Mixin.create({
8787
8414
  // HELPERS
8788
8415
  //
8789
8416
 
8790
- var get = Ember.get, set = Ember.set, isNone = Ember.isNone, map = Ember.EnumerableUtils.map, cacheFor = Ember.cacheFor;
8417
+ var get = Ember.get, set = Ember.set, map = Ember.EnumerableUtils.map, cacheFor = Ember.cacheFor;
8418
+
8419
+ function none(obj) { return obj===null || obj===undefined; }
8791
8420
 
8792
8421
  // ..........................................................
8793
8422
  // ARRAY
@@ -8810,7 +8439,7 @@ var get = Ember.get, set = Ember.set, isNone = Ember.isNone, map = Ember.Enumera
8810
8439
 
8811
8440
  You can use the methods defined in this module to access and modify array
8812
8441
  contents in a KVO-friendly way. You can also be notified whenever the
8813
- membership of an array changes by changing the syntax of the property to
8442
+ membership if an array changes by changing the syntax of the property to
8814
8443
  `.observes('*myProperty.[]')`.
8815
8444
 
8816
8445
  To support `Ember.Array` in your own class, you must override two
@@ -8827,6 +8456,9 @@ var get = Ember.get, set = Ember.set, isNone = Ember.isNone, map = Ember.Enumera
8827
8456
  */
8828
8457
  Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.prototype */ {
8829
8458
 
8459
+ // compatibility
8460
+ isSCArray: true,
8461
+
8830
8462
  /**
8831
8463
  Your array must support the `length` property. Your replace methods should
8832
8464
  set this property whenever it changes.
@@ -8934,8 +8566,8 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
8934
8566
  slice: function(beginIndex, endIndex) {
8935
8567
  var ret = Ember.A([]);
8936
8568
  var length = get(this, 'length') ;
8937
- if (isNone(beginIndex)) beginIndex = 0 ;
8938
- if (isNone(endIndex) || (endIndex > length)) endIndex = length ;
8569
+ if (none(beginIndex)) beginIndex = 0 ;
8570
+ if (none(endIndex) || (endIndex > length)) endIndex = length ;
8939
8571
 
8940
8572
  if (beginIndex < 0) beginIndex = length + beginIndex;
8941
8573
  if (endIndex < 0) endIndex = length + endIndex;
@@ -9095,7 +8727,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
9095
8727
  @param {Number} startIdx The starting index in the array that will change.
9096
8728
  @param {Number} removeAmt The number of items that will be removed. If you
9097
8729
  pass `null` assumes 0
9098
- @param {Number} addAmt The number of items that will be added. If you
8730
+ @param {Number} addAmt The number of items that will be added If you
9099
8731
  pass `null` assumes 0.
9100
8732
  @return {Ember.Array} receiver
9101
8733
  */
@@ -9129,20 +8761,6 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
9129
8761
  return this;
9130
8762
  },
9131
8763
 
9132
- /**
9133
- If you are implementing an object that supports `Ember.Array`, call this
9134
- method just after the array content changes to notify any observers and
9135
- invalidate any related properties. Pass the starting index of the change
9136
- as well as a delta of the amounts to change.
9137
-
9138
- @method arrayContentDidChange
9139
- @param {Number} startIdx The starting index in the array that did change.
9140
- @param {Number} removeAmt The number of items that were removed. If you
9141
- pass `null` assumes 0
9142
- @param {Number} addAmt The number of items that were added. If you
9143
- pass `null` assumes 0.
9144
- @return {Ember.Array} receiver
9145
- */
9146
8764
  arrayContentDidChange: function(startIdx, removeAmt, addAmt) {
9147
8765
 
9148
8766
  // if no args are passed assume everything changes
@@ -9283,7 +8901,8 @@ var get = Ember.get, set = Ember.set;
9283
8901
  @extends Ember.Mixin
9284
8902
  @since Ember 0.9
9285
8903
  */
9286
- Ember.Copyable = Ember.Mixin.create(/** @scope Ember.Copyable.prototype */ {
8904
+ Ember.Copyable = Ember.Mixin.create(
8905
+ /** @scope Ember.Copyable.prototype */ {
9287
8906
 
9288
8907
  /**
9289
8908
  Override to return a copy of the receiver. Default implementation raises
@@ -9388,7 +9007,8 @@ var get = Ember.get, set = Ember.set;
9388
9007
  @extends Ember.Mixin
9389
9008
  @since Ember 0.9
9390
9009
  */
9391
- Ember.Freezable = Ember.Mixin.create(/** @scope Ember.Freezable.prototype */ {
9010
+ Ember.Freezable = Ember.Mixin.create(
9011
+ /** @scope Ember.Freezable.prototype */ {
9392
9012
 
9393
9013
  /**
9394
9014
  Set to `true` when the object is frozen. Use this property to detect
@@ -9569,7 +9189,8 @@ var get = Ember.get, set = Ember.set;
9569
9189
  @uses Ember.Array
9570
9190
  @uses Ember.MutableEnumerable
9571
9191
  */
9572
- Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/** @scope Ember.MutableArray.prototype */ {
9192
+ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,
9193
+ /** @scope Ember.MutableArray.prototype */ {
9573
9194
 
9574
9195
  /**
9575
9196
  __Required.__ You must implement this method to apply this mixin.
@@ -9840,6 +9461,7 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/**
9840
9461
 
9841
9462
  });
9842
9463
 
9464
+
9843
9465
  })();
9844
9466
 
9845
9467
 
@@ -9887,7 +9509,7 @@ var get = Ember.get, set = Ember.set;
9887
9509
  For example:
9888
9510
 
9889
9511
  ```javascript
9890
- Ember.Object.extend({
9512
+ Ember.Object.create({
9891
9513
  valueObserver: function() {
9892
9514
  // Executes whenever the "value" property changes
9893
9515
  }.observes('value')
@@ -9906,8 +9528,8 @@ var get = Ember.get, set = Ember.set;
9906
9528
  object.addObserver('propertyKey', targetObject, targetAction)
9907
9529
  ```
9908
9530
 
9909
- This will call the `targetAction` method on the `targetObject` whenever
9910
- the value of the `propertyKey` changes.
9531
+ This will call the `targetAction` method on the `targetObject` to be called
9532
+ whenever the value of the `propertyKey` changes.
9911
9533
 
9912
9534
  Note that if `propertyKey` is a computed property, the observer will be
9913
9535
  called when any of the property dependencies are changed, even if the
@@ -10167,8 +9789,8 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10167
9789
 
10168
9790
  This is the core method used to register an observer for a property.
10169
9791
 
10170
- Once you call this method, any time the key's value is set, your observer
10171
- will be notified. Note that the observers are triggered any time the
9792
+ Once you call this method, anytime the key's value is set, your observer
9793
+ will be notified. Note that the observers are triggered anytime the
10172
9794
  value is set, regardless of whether it has actually changed. Your
10173
9795
  observer should be prepared to handle that.
10174
9796
 
@@ -10293,11 +9915,11 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10293
9915
 
10294
9916
  @method incrementProperty
10295
9917
  @param {String} keyName The name of the property to increment
10296
- @param {Number} increment The amount to increment by. Defaults to 1
10297
- @return {Number} The new property value
9918
+ @param {Object} increment The amount to increment by. Defaults to 1
9919
+ @return {Object} The new property value
10298
9920
  */
10299
9921
  incrementProperty: function(keyName, increment) {
10300
- if (Ember.isNone(increment)) { increment = 1; }
9922
+ if (!increment) { increment = 1; }
10301
9923
  set(this, keyName, (get(this, keyName) || 0)+increment);
10302
9924
  return get(this, keyName);
10303
9925
  },
@@ -10312,12 +9934,12 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10312
9934
 
10313
9935
  @method decrementProperty
10314
9936
  @param {String} keyName The name of the property to decrement
10315
- @param {Number} decrement The amount to decrement by. Defaults to 1
10316
- @return {Number} The new property value
9937
+ @param {Object} increment The amount to decrement by. Defaults to 1
9938
+ @return {Object} The new property value
10317
9939
  */
10318
- decrementProperty: function(keyName, decrement) {
10319
- if (Ember.isNone(decrement)) { decrement = 1; }
10320
- set(this, keyName, (get(this, keyName) || 0)-decrement);
9940
+ decrementProperty: function(keyName, increment) {
9941
+ if (!increment) { increment = 1; }
9942
+ set(this, keyName, (get(this, keyName) || 0)-increment);
10321
9943
  return get(this, keyName);
10322
9944
  },
10323
9945
 
@@ -10326,7 +9948,7 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10326
9948
  current value.
10327
9949
 
10328
9950
  ```javascript
10329
- starship.toggleProperty('warpDriveEngaged');
9951
+ starship.toggleProperty('warpDriveEnaged');
10330
9952
  ```
10331
9953
 
10332
9954
  @method toggleProperty
@@ -10358,6 +9980,7 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
10358
9980
  }
10359
9981
  });
10360
9982
 
9983
+
10361
9984
  })();
10362
9985
 
10363
9986
 
@@ -10652,9 +10275,9 @@ Ember.Evented = Ember.Mixin.create({
10652
10275
  (function() {
10653
10276
  var RSVP = requireModule("rsvp");
10654
10277
 
10655
- RSVP.configure('async', function(callback, binding) {
10278
+ RSVP.async = function(callback, binding) {
10656
10279
  Ember.run.schedule('actions', binding, callback);
10657
- });
10280
+ };
10658
10281
 
10659
10282
  /**
10660
10283
  @module ember
@@ -10676,22 +10299,9 @@ Ember.DeferredMixin = Ember.Mixin.create({
10676
10299
  @param {Function} doneCallback a callback function to be called when done
10677
10300
  @param {Function} failCallback a callback function to be called when failed
10678
10301
  */
10679
- then: function(resolve, reject) {
10680
- var deferred, promise, entity;
10681
-
10682
- entity = this;
10683
- deferred = get(this, '_deferred');
10684
- promise = deferred.promise;
10685
-
10686
- function fulfillmentHandler(fulfillment) {
10687
- if (fulfillment === promise) {
10688
- return resolve(entity);
10689
- } else {
10690
- return resolve(fulfillment);
10691
- }
10692
- }
10693
-
10694
- return promise.then(resolve && fulfillmentHandler, reject);
10302
+ then: function(doneCallback, failCallback) {
10303
+ var promise = get(this, 'promise');
10304
+ return promise.then.apply(promise, arguments);
10695
10305
  },
10696
10306
 
10697
10307
  /**
@@ -10700,16 +10310,7 @@ Ember.DeferredMixin = Ember.Mixin.create({
10700
10310
  @method resolve
10701
10311
  */
10702
10312
  resolve: function(value) {
10703
- var deferred, promise;
10704
-
10705
- deferred = get(this, '_deferred');
10706
- promise = deferred.promise;
10707
-
10708
- if (value === this){
10709
- deferred.resolve(promise);
10710
- } else {
10711
- deferred.resolve(value);
10712
- }
10313
+ get(this, 'promise').resolve(value);
10713
10314
  },
10714
10315
 
10715
10316
  /**
@@ -10718,11 +10319,11 @@ Ember.DeferredMixin = Ember.Mixin.create({
10718
10319
  @method reject
10719
10320
  */
10720
10321
  reject: function(value) {
10721
- get(this, '_deferred').reject(value);
10322
+ get(this, 'promise').reject(value);
10722
10323
  },
10723
10324
 
10724
- _deferred: Ember.computed(function() {
10725
- return RSVP.defer();
10325
+ promise: Ember.computed(function() {
10326
+ return new RSVP.Promise();
10726
10327
  })
10727
10328
  });
10728
10329
 
@@ -11552,7 +11153,8 @@ var get = Ember.get, set = Ember.set;
11552
11153
  @extends Ember.Object
11553
11154
  @uses Ember.MutableArray
11554
11155
  */
11555
- Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,/** @scope Ember.ArrayProxy.prototype */ {
11156
+ Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,
11157
+ /** @scope Ember.ArrayProxy.prototype */ {
11556
11158
 
11557
11159
  /**
11558
11160
  The content array. Must be an object that implements `Ember.Array` and/or
@@ -11826,6 +11428,7 @@ Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,/** @scope Ember.Array
11826
11428
  }
11827
11429
  });
11828
11430
 
11431
+
11829
11432
  })();
11830
11433
 
11831
11434
 
@@ -11925,7 +11528,8 @@ function contentPropertyDidChange(content, contentKey) {
11925
11528
  @namespace Ember
11926
11529
  @extends Ember.Object
11927
11530
  */
11928
- Ember.ObjectProxy = Ember.Object.extend(/** @scope Ember.ObjectProxy.prototype */ {
11531
+ Ember.ObjectProxy = Ember.Object.extend(
11532
+ /** @scope Ember.ObjectProxy.prototype */ {
11929
11533
  /**
11930
11534
  The object whose properties will be forwarded.
11931
11535
 
@@ -12363,7 +11967,7 @@ if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Array) {
12363
11967
  @submodule ember-runtime
12364
11968
  */
12365
11969
 
12366
- var get = Ember.get, set = Ember.set, guidFor = Ember.guidFor, isNone = Ember.isNone, fmt = Ember.String.fmt;
11970
+ var get = Ember.get, set = Ember.set, guidFor = Ember.guidFor, none = Ember.isNone, fmt = Ember.String.fmt;
12367
11971
 
12368
11972
  /**
12369
11973
  An unordered collection of objects.
@@ -12721,7 +12325,7 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
12721
12325
  // implements Ember.MutableEnumerable
12722
12326
  addObject: function(obj) {
12723
12327
  if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
12724
- if (isNone(obj)) return this; // nothing to do
12328
+ if (none(obj)) return this; // nothing to do
12725
12329
 
12726
12330
  var guid = guidFor(obj),
12727
12331
  idx = this[guid],
@@ -12749,7 +12353,7 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
12749
12353
  // implements Ember.MutableEnumerable
12750
12354
  removeObject: function(obj) {
12751
12355
  if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
12752
- if (isNone(obj)) return this; // nothing to do
12356
+ if (none(obj)) return this; // nothing to do
12753
12357
 
12754
12358
  var guid = guidFor(obj),
12755
12359
  idx = this[guid],
@@ -12824,7 +12428,7 @@ Deferred.reopenClass({
12824
12428
  promise: function(callback, binding) {
12825
12429
  var deferred = Deferred.create();
12826
12430
  callback.call(binding, deferred);
12827
- return deferred;
12431
+ return get(deferred, 'promise');
12828
12432
  }
12829
12433
  });
12830
12434
 
@@ -12835,8 +12439,6 @@ Ember.Deferred = Deferred;
12835
12439
 
12836
12440
 
12837
12441
  (function() {
12838
- var forEach = Ember.ArrayPolyfills.forEach;
12839
-
12840
12442
  /**
12841
12443
  @module ember
12842
12444
  @submodule ember-runtime
@@ -12869,10 +12471,12 @@ Ember.onLoad = function(name, callback) {
12869
12471
  @param object {Object} object to pass to callbacks
12870
12472
  */
12871
12473
  Ember.runLoadHooks = function(name, object) {
12474
+ var hooks;
12475
+
12872
12476
  loaded[name] = object;
12873
12477
 
12874
- if (loadHooks[name]) {
12875
- forEach.call(loadHooks[name], function(callback) {
12478
+ if (hooks = loadHooks[name]) {
12479
+ loadHooks[name].forEach(function(callback) {
12876
12480
  callback(object);
12877
12481
  });
12878
12482
  }
@@ -12946,8 +12550,6 @@ Ember.ControllerMixin = Ember.Mixin.create({
12946
12550
 
12947
12551
  container: null,
12948
12552
 
12949
- parentController: null,
12950
-
12951
12553
  store: null,
12952
12554
 
12953
12555
  model: Ember.computed.alias('content'),
@@ -13289,10 +12891,6 @@ var get = Ember.get, set = Ember.set, forEach = Ember.EnumerableUtils.forEach,
13289
12891
  });
13290
12892
  ```
13291
12893
 
13292
- The itemController instances will have a `parentController` property set to
13293
- either the the `parentController` property of the `ArrayController`
13294
- or to the `ArrayController` instance itself.
13295
-
13296
12894
  @class ArrayController
13297
12895
  @namespace Ember
13298
12896
  @extends Ember.ArrayProxy
@@ -13403,7 +13001,6 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
13403
13001
  }
13404
13002
 
13405
13003
  subController.set('target', this);
13406
- subController.set('parentController', get(this, 'parentController') || this);
13407
13004
  subController.set('content', object);
13408
13005
 
13409
13006
  return subController;
@@ -13517,7 +13114,7 @@ if (Ember.$) {
13517
13114
  @submodule ember-views
13518
13115
  */
13519
13116
 
13520
- /* BEGIN METAMORPH HELPERS */
13117
+ /*** BEGIN METAMORPH HELPERS ***/
13521
13118
 
13522
13119
  // Internet Explorer prior to 9 does not allow setting innerHTML if the first element
13523
13120
  // is a "zero-scope" element. This problem can be worked around by making
@@ -13590,7 +13187,7 @@ var setInnerHTMLWithoutFix = function(element, html) {
13590
13187
  }
13591
13188
  };
13592
13189
 
13593
- /* END METAMORPH HELPERS */
13190
+ /*** END METAMORPH HELPERS */
13594
13191
 
13595
13192
 
13596
13193
  var innerHTMLTags = {};
@@ -13679,6 +13276,45 @@ ClassSet.prototype = {
13679
13276
  }
13680
13277
  };
13681
13278
 
13279
+ var BAD_TAG_NAME_TEST_REGEXP = /[^a-zA-Z\-]/;
13280
+ var BAD_TAG_NAME_REPLACE_REGEXP = /[^a-zA-Z\-]/g;
13281
+
13282
+ function stripTagName(tagName) {
13283
+ if (!tagName) {
13284
+ return tagName;
13285
+ }
13286
+
13287
+ if (!BAD_TAG_NAME_TEST_REGEXP.test(tagName)) {
13288
+ return tagName;
13289
+ }
13290
+
13291
+ return tagName.replace(BAD_TAG_NAME_REPLACE_REGEXP, '');
13292
+ }
13293
+
13294
+ var BAD_CHARS_REGEXP = /&(?!\w+;)|[<>"'`]/g;
13295
+ var POSSIBLE_CHARS_REGEXP = /[&<>"'`]/;
13296
+
13297
+ function escapeAttribute(value) {
13298
+ // Stolen shamelessly from Handlebars
13299
+
13300
+ var escape = {
13301
+ "<": "&lt;",
13302
+ ">": "&gt;",
13303
+ '"': "&quot;",
13304
+ "'": "&#x27;",
13305
+ "`": "&#x60;"
13306
+ };
13307
+
13308
+ var escapeChar = function(chr) {
13309
+ return escape[chr] || "&amp;";
13310
+ };
13311
+
13312
+ var string = value.toString();
13313
+
13314
+ if(!POSSIBLE_CHARS_REGEXP.test(string)) { return string; }
13315
+ return string.replace(BAD_CHARS_REGEXP, escapeChar);
13316
+ }
13317
+
13682
13318
  /**
13683
13319
  `Ember.RenderBuffer` gathers information regarding the a view and generates the
13684
13320
  final representation. `Ember.RenderBuffer` will generate HTML which can be pushed
@@ -13966,14 +13602,14 @@ Ember._RenderBuffer.prototype =
13966
13602
  style = this.elementStyle,
13967
13603
  attr, prop;
13968
13604
 
13969
- buffer += '<' + tagName;
13605
+ buffer += '<' + stripTagName(tagName);
13970
13606
 
13971
13607
  if (id) {
13972
- buffer += ' id="' + this._escapeAttribute(id) + '"';
13608
+ buffer += ' id="' + escapeAttribute(id) + '"';
13973
13609
  this.elementId = null;
13974
13610
  }
13975
13611
  if (classes) {
13976
- buffer += ' class="' + this._escapeAttribute(classes.join(' ')) + '"';
13612
+ buffer += ' class="' + escapeAttribute(classes.join(' ')) + '"';
13977
13613
  this.classes = null;
13978
13614
  }
13979
13615
 
@@ -13982,7 +13618,7 @@ Ember._RenderBuffer.prototype =
13982
13618
 
13983
13619
  for (prop in style) {
13984
13620
  if (style.hasOwnProperty(prop)) {
13985
- buffer += prop + ':' + this._escapeAttribute(style[prop]) + ';';
13621
+ buffer += prop + ':' + escapeAttribute(style[prop]) + ';';
13986
13622
  }
13987
13623
  }
13988
13624
 
@@ -13994,7 +13630,7 @@ Ember._RenderBuffer.prototype =
13994
13630
  if (attrs) {
13995
13631
  for (attr in attrs) {
13996
13632
  if (attrs.hasOwnProperty(attr)) {
13997
- buffer += ' ' + attr + '="' + this._escapeAttribute(attrs[attr]) + '"';
13633
+ buffer += ' ' + attr + '="' + escapeAttribute(attrs[attr]) + '"';
13998
13634
  }
13999
13635
  }
14000
13636
 
@@ -14009,7 +13645,7 @@ Ember._RenderBuffer.prototype =
14009
13645
  if (value === true) {
14010
13646
  buffer += ' ' + prop + '="' + prop + '"';
14011
13647
  } else {
14012
- buffer += ' ' + prop + '="' + this._escapeAttribute(props[prop]) + '"';
13648
+ buffer += ' ' + prop + '="' + escapeAttribute(props[prop]) + '"';
14013
13649
  }
14014
13650
  }
14015
13651
  }
@@ -14024,7 +13660,7 @@ Ember._RenderBuffer.prototype =
14024
13660
 
14025
13661
  pushClosingTag: function() {
14026
13662
  var tagName = this.tagNames.pop();
14027
- if (tagName) { this.buffer += '</' + tagName + '>'; }
13663
+ if (tagName) { this.buffer += '</' + stripTagName(tagName) + '>'; }
14028
13664
  },
14029
13665
 
14030
13666
  currentTagName: function() {
@@ -14122,32 +13758,7 @@ Ember._RenderBuffer.prototype =
14122
13758
 
14123
13759
  innerString: function() {
14124
13760
  return this.buffer;
14125
- },
14126
-
14127
- _escapeAttribute: function(value) {
14128
- // Stolen shamelessly from Handlebars
14129
-
14130
- var escape = {
14131
- "<": "&lt;",
14132
- ">": "&gt;",
14133
- '"': "&quot;",
14134
- "'": "&#x27;",
14135
- "`": "&#x60;"
14136
- };
14137
-
14138
- var badChars = /&(?!\w+;)|[<>"'`]/g;
14139
- var possible = /[&<>"'`]/;
14140
-
14141
- var escapeChar = function(chr) {
14142
- return escape[chr] || "&amp;";
14143
- };
14144
-
14145
- var string = value.toString();
14146
-
14147
- if(!possible.test(string)) { return string; }
14148
- return string.replace(badChars, escapeChar);
14149
13761
  }
14150
-
14151
13762
  };
14152
13763
 
14153
13764
  })();
@@ -14173,7 +13784,8 @@ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
14173
13784
  @private
14174
13785
  @extends Ember.Object
14175
13786
  */
14176
- Ember.EventDispatcher = Ember.Object.extend(/** @scope Ember.EventDispatcher.prototype */{
13787
+ Ember.EventDispatcher = Ember.Object.extend(
13788
+ /** @scope Ember.EventDispatcher.prototype */{
14177
13789
 
14178
13790
  /**
14179
13791
  @private
@@ -14205,7 +13817,7 @@ Ember.EventDispatcher = Ember.Object.extend(/** @scope Ember.EventDispatcher.pro
14205
13817
  @method setup
14206
13818
  @param addedEvents {Hash}
14207
13819
  */
14208
- setup: function(addedEvents, rootElement) {
13820
+ setup: function(addedEvents) {
14209
13821
  var event, events = {
14210
13822
  touchstart : 'touchStart',
14211
13823
  touchmove : 'touchMove',
@@ -14238,12 +13850,7 @@ Ember.EventDispatcher = Ember.Object.extend(/** @scope Ember.EventDispatcher.pro
14238
13850
 
14239
13851
  Ember.$.extend(events, addedEvents || {});
14240
13852
 
14241
-
14242
- if (!Ember.isNone(rootElement)) {
14243
- set(this, 'rootElement', rootElement);
14244
- }
14245
-
14246
- rootElement = Ember.$(get(this, 'rootElement'));
13853
+ var rootElement = Ember.$(get(this, 'rootElement'));
14247
13854
 
14248
13855
 
14249
13856
 
@@ -14283,7 +13890,7 @@ Ember.EventDispatcher = Ember.Object.extend(/** @scope Ember.EventDispatcher.pro
14283
13890
  setupHandler: function(rootElement, event, eventName) {
14284
13891
  var self = this;
14285
13892
 
14286
- rootElement.on(event + '.ember', '.ember-view', function(evt, triggeringManager) {
13893
+ rootElement.delegate('.ember-view', event + '.ember', function(evt, triggeringManager) {
14287
13894
  return Ember.handleErrors(function() {
14288
13895
  var view = Ember.View.views[this.id],
14289
13896
  result = true, manager = null;
@@ -14302,7 +13909,7 @@ Ember.EventDispatcher = Ember.Object.extend(/** @scope Ember.EventDispatcher.pro
14302
13909
  }, this);
14303
13910
  });
14304
13911
 
14305
- rootElement.on(event + '.ember', '[data-ember-action]', function(evt) {
13912
+ rootElement.delegate('[data-ember-action]', event + '.ember', function(evt) {
14306
13913
  return Ember.handleErrors(function() {
14307
13914
  var actionId = Ember.$(evt.currentTarget).attr('data-ember-action'),
14308
13915
  action = Ember.Handlebars.ActionHelper.registeredActions[actionId];
@@ -14354,7 +13961,7 @@ Ember.EventDispatcher = Ember.Object.extend(/** @scope Ember.EventDispatcher.pro
14354
13961
 
14355
13962
  destroy: function() {
14356
13963
  var rootElement = get(this, 'rootElement');
14357
- Ember.$(rootElement).off('.ember', '**').removeClass('ember-application');
13964
+ Ember.$(rootElement).undelegate('.ember').removeClass('ember-application');
14358
13965
  return this._super();
14359
13966
  }
14360
13967
  });
@@ -15348,8 +14955,6 @@ Ember.View = Ember.CoreView.extend(
15348
14955
  templateForName: function(name, type) {
15349
14956
  if (!name) { return; }
15350
14957
 
15351
-
15352
- // the defaultContainer is deprecated
15353
14958
  var container = this.container || (Ember.Container && Ember.Container.defaultContainer);
15354
14959
  return container && container.lookup('template:' + name);
15355
14960
  },
@@ -17465,8 +17070,6 @@ Ember.ContainerView = Ember.View.extend(Ember.MutableArray, {
17465
17070
 
17466
17071
  replace: function(idx, removedCount, addedViews) {
17467
17072
  var addedCount = addedViews ? get(addedViews, 'length') : 0;
17468
- var self = this;
17469
-
17470
17073
 
17471
17074
  this.arrayContentWillChange(idx, removedCount, addedCount);
17472
17075
  this.childViewsWillChange(this._childViews, idx, removedCount);
@@ -17507,7 +17110,7 @@ Ember.ContainerView = Ember.View.extend(Ember.MutableArray, {
17507
17110
  });
17508
17111
  },
17509
17112
 
17510
- instrumentName: 'container',
17113
+ instrumentName: 'render.container',
17511
17114
 
17512
17115
  /**
17513
17116
  @private
@@ -17587,7 +17190,6 @@ Ember.ContainerView = Ember.View.extend(Ember.MutableArray, {
17587
17190
  _currentViewDidChange: Ember.observer(function() {
17588
17191
  var currentView = get(this, 'currentView');
17589
17192
  if (currentView) {
17590
-
17591
17193
  this.pushObject(currentView);
17592
17194
  }
17593
17195
  }, 'currentView'),
@@ -17828,7 +17430,8 @@ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
17828
17430
  @extends Ember.ContainerView
17829
17431
  @since Ember 0.9
17830
17432
  */
17831
- Ember.CollectionView = Ember.ContainerView.extend(/** @scope Ember.CollectionView.prototype */ {
17433
+ Ember.CollectionView = Ember.ContainerView.extend(
17434
+ /** @scope Ember.CollectionView.prototype */ {
17832
17435
 
17833
17436
  /**
17834
17437
  A list of items to be displayed by the `Ember.CollectionView`.
@@ -17954,10 +17557,9 @@ Ember.CollectionView = Ember.ContainerView.extend(/** @scope Ember.CollectionVie
17954
17557
  This array observer is added in `contentDidChange`.
17955
17558
 
17956
17559
  @method arrayDidChange
17957
- @param {Array} content the managed collection of objects
17958
- @param {Number} start the index at which the changes occurred
17959
- @param {Number} removed number of object removed from content
17960
- @param {Number} added number of object added to content
17560
+ @param {Array} addedObjects the objects that were added to the content
17561
+ @param {Array} removedObjects the objects that were removed from the content
17562
+ @param {Number} changeIndex the index at which the changes occurred
17961
17563
  */
17962
17564
  arrayDidChange: function(content, start, removed, added) {
17963
17565
  var itemViewClass = get(this, 'itemViewClass'),
@@ -18595,7 +18197,6 @@ if(!Handlebars && typeof require === 'function') {
18595
18197
  }
18596
18198
 
18597
18199
 
18598
-
18599
18200
  /**
18600
18201
  Prepares the Handlebars templating library for use inside Ember's view
18601
18202
  system.
@@ -18612,25 +18213,10 @@ if(!Handlebars && typeof require === 'function') {
18612
18213
  */
18613
18214
  Ember.Handlebars = objectCreate(Handlebars);
18614
18215
 
18615
- function makeBindings(options) {
18616
- var hash = options.hash,
18617
- hashType = options.hashTypes;
18618
-
18619
- for (var prop in hash) {
18620
- if (hashType[prop] === 'ID') {
18621
- hash[prop + 'Binding'] = hash[prop];
18622
- hashType[prop + 'Binding'] = 'STRING';
18623
- delete hash[prop];
18624
- delete hashType[prop];
18625
- }
18626
- }
18627
- }
18628
-
18629
18216
  Ember.Handlebars.helper = function(name, value) {
18630
18217
  if (Ember.View.detect(value)) {
18631
- Ember.Handlebars.registerHelper(name, function(options) {
18218
+ Ember.Handlebars.registerHelper(name, function(name, options) {
18632
18219
 
18633
- makeBindings(options);
18634
18220
  return Ember.Handlebars.helpers.view.call(this, value, options);
18635
18221
  });
18636
18222
  } else {
@@ -19006,15 +18592,15 @@ Ember.Handlebars.registerHelper('helperMissing', function(path, options) {
19006
18592
  });
19007
18593
  ```
19008
18594
 
19009
- Which allows for template syntax such as `{{concatenate prop1 prop2}}` or
19010
- `{{concatenate prop1 prop2 prop3}}`. If any of the properties change,
18595
+ Which allows for template syntax such as {{concatenate prop1 prop2}} or
18596
+ {{concatenate prop1 prop2 prop3}}. If any of the properties change,
19011
18597
  the helpr will re-render. Note that dependency keys cannot be
19012
18598
  using in conjunction with multi-property helpers, since it is ambiguous
19013
18599
  which property the dependent keys would belong to.
19014
18600
 
19015
18601
  ## Use with unbound helper
19016
18602
 
19017
- The `{{unbound}}` helper can be used with bound helper invocations
18603
+ The {{unbound}} helper can be used with bound helper invocations
19018
18604
  to render them in their unbound form, e.g.
19019
18605
 
19020
18606
  ```handlebars
@@ -19024,10 +18610,6 @@ Ember.Handlebars.registerHelper('helperMissing', function(path, options) {
19024
18610
  In this example, if the name property changes, the helper
19025
18611
  will not re-render.
19026
18612
 
19027
- ## Use with blocks not supported
19028
-
19029
- Bound helpers do not support use with Handlebars blocks or
19030
- the addition of child views of any kind.
19031
18613
 
19032
18614
  @method registerBoundHelper
19033
18615
  @for Ember.Handlebars
@@ -19051,7 +18633,6 @@ Ember.Handlebars.registerBoundHelper = function(name, fn) {
19051
18633
  pathRoot, path,
19052
18634
  loc, hashOption;
19053
18635
 
19054
-
19055
18636
  // Detect bound options (e.g. countBinding="otherCount")
19056
18637
  hash.boundOptions = {};
19057
18638
  for (hashOption in hash) {
@@ -19211,6 +18792,7 @@ Ember.Handlebars.template = function(spec){
19211
18792
  return t;
19212
18793
  };
19213
18794
 
18795
+
19214
18796
  })();
19215
18797
 
19216
18798
 
@@ -19346,7 +18928,7 @@ Ember._Metamorph = Ember.Mixin.create({
19346
18928
  isVirtual: true,
19347
18929
  tagName: '',
19348
18930
 
19349
- instrumentName: 'metamorph',
18931
+ instrumentName: 'render.metamorph',
19350
18932
 
19351
18933
  init: function() {
19352
18934
  this._super();
@@ -19535,7 +19117,7 @@ merge(states.inDOM, {
19535
19117
  @private
19536
19118
  */
19537
19119
  Ember._HandlebarsBoundView = Ember._MetamorphView.extend({
19538
- instrumentName: 'boundHandlebars',
19120
+ instrumentName: 'render.boundHandlebars',
19539
19121
  states: states,
19540
19122
 
19541
19123
  /**
@@ -21017,7 +20599,6 @@ Ember.Handlebars.EachView = Ember.CollectionView.extend(Ember._Metamorph, {
21017
20599
  set(controller, 'container', get(this, 'controller.container'));
21018
20600
  set(controller, '_eachView', this);
21019
20601
  set(controller, 'target', get(this, 'controller'));
21020
- set(controller, 'parentController', get(this, 'controller'));
21021
20602
 
21022
20603
  this.disableContentObservers(function() {
21023
20604
  set(this, 'content', controller);
@@ -21291,9 +20872,6 @@ GroupedEach.prototype = {
21291
20872
  {{/each}}
21292
20873
  ```
21293
20874
 
21294
- Each itemController will receive a reference to the current controller as
21295
- a `parentController` property.
21296
-
21297
20875
  @method each
21298
20876
  @for Ember.Handlebars.helpers
21299
20877
  @param [name] {String} name for item (used with `in`)
@@ -21432,7 +21010,7 @@ Ember.Handlebars.registerHelper('partial', function(name, options) {
21432
21010
  var view = options.data.view,
21433
21011
  underscoredName = nameParts.join("/"),
21434
21012
  template = view.templateForName(underscoredName),
21435
- deprecatedTemplate = !template && view.templateForName(name);
21013
+ deprecatedTemplate = view.templateForName(name);
21436
21014
 
21437
21015
 
21438
21016
 
@@ -21556,7 +21134,7 @@ var set = Ember.set, get = Ember.get;
21556
21134
  You can add a `label` tag yourself in the template where the `Ember.Checkbox`
21557
21135
  is being used.
21558
21136
 
21559
- ```handlebars
21137
+ ```html
21560
21138
  <label>
21561
21139
  {{view Ember.Checkbox classNames="applicaton-specific-checkbox"}}
21562
21140
  Some Title
@@ -21776,7 +21354,7 @@ Ember.TextField = Ember.View.extend(Ember.TextSupport,
21776
21354
  * `enter`: the user pressed enter
21777
21355
  * `keypress`: the user pressed a key
21778
21356
 
21779
- @property onEvent
21357
+ @property on
21780
21358
  @type String
21781
21359
  @default enter
21782
21360
  */
@@ -22343,38 +21921,34 @@ Ember.Select = Ember.View.extend(
22343
21921
  tagName: 'select',
22344
21922
  classNames: ['ember-select'],
22345
21923
  defaultTemplate: Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
22346
- this.compilerInfo = [3,'>= 1.0.0-rc.4'];
21924
+ this.compilerInfo = [2,'>= 1.0.0-rc.3'];
22347
21925
  helpers = helpers || Ember.Handlebars.helpers; data = data || {};
22348
- var buffer = '', stack1, hashTypes, hashContexts, escapeExpression=this.escapeExpression, self=this;
21926
+ var buffer = '', stack1, hashTypes, escapeExpression=this.escapeExpression, self=this;
22349
21927
 
22350
21928
  function program1(depth0,data) {
22351
21929
 
22352
- var buffer = '', hashTypes, hashContexts;
21930
+ var buffer = '', hashTypes;
22353
21931
  data.buffer.push("<option value=\"\">");
22354
21932
  hashTypes = {};
22355
- hashContexts = {};
22356
- data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "view.prompt", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
21933
+ data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "view.prompt", {hash:{},contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data})));
22357
21934
  data.buffer.push("</option>");
22358
21935
  return buffer;
22359
21936
  }
22360
21937
 
22361
21938
  function program3(depth0,data) {
22362
21939
 
22363
- var hashContexts, hashTypes;
22364
- hashContexts = {'contentBinding': depth0};
21940
+ var hashTypes;
22365
21941
  hashTypes = {'contentBinding': "STRING"};
22366
21942
  data.buffer.push(escapeExpression(helpers.view.call(depth0, "view.optionView", {hash:{
22367
21943
  'contentBinding': ("this")
22368
- },contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
21944
+ },contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data})));
22369
21945
  }
22370
21946
 
22371
21947
  hashTypes = {};
22372
- hashContexts = {};
22373
- stack1 = helpers['if'].call(depth0, "view.prompt", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
21948
+ stack1 = helpers['if'].call(depth0, "view.prompt", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data});
22374
21949
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
22375
21950
  hashTypes = {};
22376
- hashContexts = {};
22377
- stack1 = helpers.each.call(depth0, "view.content", {hash:{},inverse:self.noop,fn:self.program(3, program3, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
21951
+ stack1 = helpers.each.call(depth0, "view.content", {hash:{},inverse:self.noop,fn:self.program(3, program3, data),contexts:[depth0],types:["ID"],hashTypes:hashTypes,data:data});
22378
21952
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
22379
21953
  return buffer;
22380
21954
 
@@ -22512,9 +22086,9 @@ function program3(depth0,data) {
22512
22086
  selection;
22513
22087
 
22514
22088
  if (value !== selectedValue) {
22515
- selection = content ? content.find(function(obj) {
22089
+ selection = content.find(function(obj) {
22516
22090
  return value === (valuePath ? get(obj, valuePath) : obj);
22517
- }) : null;
22091
+ });
22518
22092
 
22519
22093
  this.set('selection', selection);
22520
22094
  }
@@ -22536,7 +22110,7 @@ function program3(depth0,data) {
22536
22110
  content = get(this, 'content'),
22537
22111
  prompt = get(this, 'prompt');
22538
22112
 
22539
- if (!content || !get(content, 'length')) { return; }
22113
+ if (!get(content, 'length')) { return; }
22540
22114
  if (prompt && selectedIndex === 0) { set(this, 'selection', null); return; }
22541
22115
 
22542
22116
  if (prompt) { selectedIndex -= 1; }
@@ -22617,15 +22191,6 @@ function normalizeHash(hash, hashTypes) {
22617
22191
  }
22618
22192
  }
22619
22193
 
22620
- /**
22621
- * `{{input}}` inserts a new instance of either Ember.TextField or
22622
- * Ember.Checkbox, depending on the `type` option passed in. If no `type`
22623
- * is supplied it defaults to Ember.TextField.
22624
- *
22625
- * @method input
22626
- * @for Ember.Handlebars.helpers
22627
- * @param {Hash} options
22628
- */
22629
22194
  Ember.Handlebars.registerHelper('input', function(options) {
22630
22195
 
22631
22196
 
@@ -22642,20 +22207,12 @@ Ember.Handlebars.registerHelper('input', function(options) {
22642
22207
  if (inputType === 'checkbox') {
22643
22208
  return Ember.Handlebars.helpers.view.call(this, Ember.Checkbox, options);
22644
22209
  } else {
22645
- hash.type = inputType || 'text';
22210
+ hash.type = inputType;
22646
22211
  hash.onEvent = onEvent || 'enter';
22647
22212
  return Ember.Handlebars.helpers.view.call(this, Ember.TextField, options);
22648
22213
  }
22649
22214
  });
22650
22215
 
22651
- /**
22652
- * `{{textarea}}` inserts a new instance of Ember.TextArea into the template
22653
- * passing its options to `Ember.TextArea`'s `create` method.
22654
- *
22655
- * @method textarea
22656
- * @for Ember.Handlebars.helpers
22657
- * @param {Hash} options
22658
- */
22659
22216
  Ember.Handlebars.registerHelper('textarea', function(options) {
22660
22217
 
22661
22218
 
@@ -23129,14 +22686,14 @@ define("route-recognizer",
23129
22686
  },
23130
22687
 
23131
22688
  recognize: function(path) {
23132
- var states = [ this.rootState ],
23133
- pathLen, i, l;
22689
+ var states = [ this.rootState ], i, l;
23134
22690
 
23135
22691
  // DEBUG GROUP path
23136
22692
 
22693
+ var pathLen = path.length;
22694
+
23137
22695
  if (path.charAt(0) !== "/") { path = "/" + path; }
23138
22696
 
23139
- pathLen = path.length;
23140
22697
  if (pathLen > 1 && path.charAt(pathLen - 1) === "/") {
23141
22698
  path = path.substr(0, pathLen - 1);
23142
22699
  }
@@ -23512,13 +23069,11 @@ define("router",
23512
23069
  isActive: function(handlerName) {
23513
23070
  var contexts = [].slice.call(arguments, 1);
23514
23071
 
23515
- var targetHandlerInfos = this.targetHandlerInfos,
23516
- found = false, names, object, handlerInfo, handlerObj;
23072
+ var currentHandlerInfos = this.currentHandlerInfos,
23073
+ found = false, object, handlerInfo;
23517
23074
 
23518
- if (!targetHandlerInfos) { return; }
23519
-
23520
- for (var i=targetHandlerInfos.length-1; i>=0; i--) {
23521
- handlerInfo = targetHandlerInfos[i];
23075
+ for (var i=currentHandlerInfos.length-1; i>=0; i--) {
23076
+ handlerInfo = currentHandlerInfos[i];
23522
23077
  if (handlerInfo.name === handlerName) { found = true; }
23523
23078
 
23524
23079
  if (found) {
@@ -23609,10 +23164,7 @@ define("router",
23609
23164
  function failure(router, error) {
23610
23165
  loaded(router);
23611
23166
  var handler = router.getHandler('failure');
23612
- if (handler) {
23613
- if (handler.enter) { handler.enter(); }
23614
- if (handler.setup) { handler.setup(error); }
23615
- }
23167
+ if (handler && handler.setup) { handler.setup(error); }
23616
23168
  }
23617
23169
 
23618
23170
  /**
@@ -23739,24 +23291,20 @@ define("router",
23739
23291
  var partition =
23740
23292
  partitionHandlers(router.currentHandlerInfos || [], handlerInfos);
23741
23293
 
23742
- router.targetHandlerInfos = handlerInfos;
23294
+ router.currentHandlerInfos = handlerInfos;
23743
23295
 
23744
23296
  eachHandler(partition.exited, function(handler, context) {
23745
23297
  delete handler.context;
23746
23298
  if (handler.exit) { handler.exit(); }
23747
23299
  });
23748
23300
 
23749
- var currentHandlerInfos = partition.unchanged.slice();
23750
- router.currentHandlerInfos = currentHandlerInfos;
23751
-
23752
- eachHandler(partition.updatedContext, function(handler, context, handlerInfo) {
23301
+ eachHandler(partition.updatedContext, function(handler, context) {
23753
23302
  setContext(handler, context);
23754
23303
  if (handler.setup) { handler.setup(context); }
23755
- currentHandlerInfos.push(handlerInfo);
23756
23304
  });
23757
23305
 
23758
23306
  var aborted = false;
23759
- eachHandler(partition.entered, function(handler, context, handlerInfo) {
23307
+ eachHandler(partition.entered, function(handler, context) {
23760
23308
  if (aborted) { return; }
23761
23309
  if (handler.enter) { handler.enter(); }
23762
23310
  setContext(handler, context);
@@ -23765,10 +23313,6 @@ define("router",
23765
23313
  aborted = true;
23766
23314
  }
23767
23315
  }
23768
-
23769
- if (!aborted) {
23770
- currentHandlerInfos.push(handlerInfo);
23771
- }
23772
23316
  });
23773
23317
 
23774
23318
  if (!aborted && router.didTransition) {
@@ -23791,7 +23335,7 @@ define("router",
23791
23335
  handler = handlerInfo.handler,
23792
23336
  context = handlerInfo.context;
23793
23337
 
23794
- callback(handler, context, handlerInfo);
23338
+ callback(handler, context);
23795
23339
  }
23796
23340
  }
23797
23341
 
@@ -23817,7 +23361,7 @@ define("router",
23817
23361
  * entered: the handler was not active in the old URL, but
23818
23362
  is now active.
23819
23363
 
23820
- The PartitionedHandlers structure has four fields:
23364
+ The PartitionedHandlers structure has three fields:
23821
23365
 
23822
23366
  * `updatedContext`: a list of `HandlerInfo` objects that
23823
23367
  represent handlers that remain active but have a changed
@@ -23826,7 +23370,6 @@ define("router",
23826
23370
  handlers that are newly active
23827
23371
  * `exited`: a list of `HandlerInfo` objects that are no
23828
23372
  longer active.
23829
- * `unchanged`: a list of `HanderInfo` objects that remain active.
23830
23373
 
23831
23374
  @param {Array[HandlerInfo]} oldHandlers a list of the handler
23832
23375
  information for the previous URL (or `[]` if this is the
@@ -23840,8 +23383,7 @@ define("router",
23840
23383
  var handlers = {
23841
23384
  updatedContext: [],
23842
23385
  exited: [],
23843
- entered: [],
23844
- unchanged: []
23386
+ entered: []
23845
23387
  };
23846
23388
 
23847
23389
  var handlerChanged, contextChanged, i, l;
@@ -23859,8 +23401,6 @@ define("router",
23859
23401
  } else if (contextChanged || oldHandler.context !== newHandler.context) {
23860
23402
  contextChanged = true;
23861
23403
  handlers.updatedContext.push(newHandler);
23862
- } else {
23863
- handlers.unchanged.push(oldHandler);
23864
23404
  }
23865
23405
  }
23866
23406
 
@@ -23880,24 +23420,17 @@ define("router",
23880
23420
  throw new Error("Could not trigger event '" + name + "'. There are no active handlers");
23881
23421
  }
23882
23422
 
23883
- var eventWasHandled = false;
23884
-
23885
23423
  for (var i=currentHandlerInfos.length-1; i>=0; i--) {
23886
23424
  var handlerInfo = currentHandlerInfos[i],
23887
23425
  handler = handlerInfo.handler;
23888
23426
 
23889
23427
  if (handler.events && handler.events[name]) {
23890
- if (handler.events[name].apply(handler, args) === true) {
23891
- eventWasHandled = true;
23892
- } else {
23893
- return;
23894
- }
23428
+ handler.events[name].apply(handler, args);
23429
+ return;
23895
23430
  }
23896
23431
  }
23897
23432
 
23898
- if (!eventWasHandled) {
23899
- throw new Error("Nothing handled the event '" + name + "'.");
23900
- }
23433
+ throw new Error("Nothing handled the event '" + name + "'.");
23901
23434
  }
23902
23435
 
23903
23436
  function setContext(handler, context) {
@@ -24130,22 +23663,6 @@ Ember.Router = Ember.Object.extend({
24130
23663
  this.notifyPropertyChange('url');
24131
23664
  },
24132
23665
 
24133
- /**
24134
- Transition to another route via the `routeTo` event which
24135
- will by default be handled by ApplicationRoute.
24136
-
24137
- @method routeTo
24138
- @param {TransitionEvent} transitionEvent
24139
- */
24140
- routeTo: function(transitionEvent) {
24141
- var handlerInfos = this.router.currentHandlerInfos;
24142
- if (handlerInfos) {
24143
- transitionEvent.sourceRoute = handlerInfos[handlerInfos.length - 1].handler;
24144
- }
24145
-
24146
- this.send('routeTo', transitionEvent);
24147
- },
24148
-
24149
23666
  transitionTo: function(name) {
24150
23667
  var args = [].slice.call(arguments);
24151
23668
  doTransition(this, 'transitionTo', args);
@@ -24226,12 +23743,6 @@ function getHandlerFunction(router) {
24226
23743
  handler = container.lookup(routeName);
24227
23744
  }
24228
23745
 
24229
- if (name === 'application') {
24230
- // Inject default `routeTo` handler.
24231
- handler.events = handler.events || {};
24232
- handler.events.routeTo = handler.events.routeTo || Ember.TransitionEvent.defaultHandler;
24233
- }
24234
-
24235
23746
  handler.routeName = name;
24236
23747
  return handler;
24237
23748
  };
@@ -24352,16 +23863,15 @@ Ember.Route = Ember.Object.extend({
24352
23863
  },
24353
23864
 
24354
23865
  /**
24355
- The collection of functions, keyed by name, available on this route as
23866
+ The collection of functions keyed by name available on this route as
24356
23867
  action targets.
24357
23868
 
24358
23869
  These functions will be invoked when a matching `{{action}}` is triggered
24359
23870
  from within a template and the application's current route is this route.
24360
23871
 
24361
- Events can also be invoked from other parts of your application via `Route#send`
24362
- or `Controller#send`.
23872
+ Events can also be invoked from other parts of your application via `Route#send`.
24363
23873
 
24364
- The context of the event will be this route.
23874
+ The context of event will be the this route.
24365
23875
 
24366
23876
  @see {Ember.Route#send}
24367
23877
  @see {Handlebars.helpers.action}
@@ -24388,17 +23898,6 @@ Ember.Route = Ember.Object.extend({
24388
23898
  */
24389
23899
  activate: Ember.K,
24390
23900
 
24391
- /**
24392
- Transition to another route via the `routeTo` event which
24393
- will by default be handled by ApplicationRoute.
24394
-
24395
- @method routeTo
24396
- @param {TransitionEvent} transitionEvent
24397
- */
24398
- routeTo: function(transitionEvent) {
24399
- this.router.routeTo(transitionEvent);
24400
- },
24401
-
24402
23901
  /**
24403
23902
  Transition into another route. Optionally supply a model for the
24404
23903
  route in question. The model will be serialized into the URL
@@ -24847,7 +24346,7 @@ Ember.Route = Ember.Object.extend({
24847
24346
  });
24848
24347
 
24849
24348
  function parentRoute(route) {
24850
- var handlerInfos = route.router.router.targetHandlerInfos;
24349
+ var handlerInfos = route.router.router.currentHandlerInfos;
24851
24350
 
24852
24351
  var parent, current;
24853
24352
 
@@ -24951,65 +24450,6 @@ function teardownView(route) {
24951
24450
 
24952
24451
 
24953
24452
 
24954
- (function() {
24955
- /**
24956
- @module ember
24957
- @submodule ember-routing
24958
- */
24959
-
24960
-
24961
- /*
24962
- A TransitionEvent is passed as the argument for `transitionTo`
24963
- events and contains information about an attempted transition
24964
- that can be modified or decorated by leafier `transitionTo` event
24965
- handlers before the actual transition is committed by ApplicationRoute.
24966
-
24967
- @class TransitionEvent
24968
- @namespace Ember
24969
- @extends Ember.Deferred
24970
- */
24971
- Ember.TransitionEvent = Ember.Object.extend({
24972
-
24973
- /*
24974
- The Ember.Route method used to perform the transition. Presently,
24975
- the only valid values are 'transitionTo' and 'replaceWith'.
24976
- */
24977
- transitionMethod: 'transitionTo',
24978
- destinationRouteName: null,
24979
- sourceRoute: null,
24980
- contexts: null,
24981
-
24982
- init: function() {
24983
- this._super();
24984
- this.contexts = this.contexts || [];
24985
- },
24986
-
24987
- /*
24988
- Convenience method that returns an array that can be used for
24989
- legacy `transitionTo` and `replaceWith`.
24990
- */
24991
- transitionToArgs: function() {
24992
- return [this.destinationRouteName].concat(this.contexts);
24993
- }
24994
- });
24995
-
24996
-
24997
- Ember.TransitionEvent.reopenClass({
24998
- /*
24999
- This is the default transition event handler that will be injected
25000
- into ApplicationRoute. The context, like all route event handlers in
25001
- the events hash, will be an `Ember.Route`.
25002
- */
25003
- defaultHandler: function(transitionEvent) {
25004
- var router = this.router;
25005
- router[transitionEvent.transitionMethod].apply(router, transitionEvent.transitionToArgs());
25006
- }
25007
- });
25008
-
25009
- })();
25010
-
25011
-
25012
-
25013
24453
  (function() {
25014
24454
 
25015
24455
  })();
@@ -25081,87 +24521,6 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25081
24521
  return ret.concat(resolvedPaths(linkView.parameters));
25082
24522
  }
25083
24523
 
25084
- /**
25085
- @class LinkView
25086
- @namespace Ember
25087
- @extends Ember.View
25088
- **/
25089
- var LinkView = Ember.LinkView = Ember.View.extend({
25090
- tagName: 'a',
25091
- namedRoute: null,
25092
- currentWhen: null,
25093
- title: null,
25094
- activeClass: 'active',
25095
- disabledClass: 'disabled',
25096
- _isDisabled: false,
25097
- replace: false,
25098
- attributeBindings: ['href', 'title'],
25099
- classNameBindings: ['active', 'disabled'],
25100
-
25101
- // Even though this isn't a virtual view, we want to treat it as if it is
25102
- // so that you can access the parent with {{view.prop}}
25103
- concreteView: Ember.computed(function() {
25104
- return get(this, 'parentView');
25105
- }).property('parentView'),
25106
-
25107
- disabled: Ember.computed(function(key, value) {
25108
- if (value !== undefined) { this.set('_isDisabled', value); }
25109
-
25110
- return value ? this.get('disabledClass') : false;
25111
- }),
25112
-
25113
- active: Ember.computed(function() {
25114
- var router = this.get('router'),
25115
- params = resolvedPaths(this.parameters),
25116
- currentWithIndex = this.currentWhen + '.index',
25117
- isActive = router.isActive.apply(router, [this.currentWhen].concat(params)) ||
25118
- router.isActive.apply(router, [currentWithIndex].concat(params));
25119
-
25120
- if (isActive) { return get(this, 'activeClass'); }
25121
- }).property('namedRoute', 'router.url'),
25122
-
25123
- router: Ember.computed(function() {
25124
- return this.get('controller').container.lookup('router:main');
25125
- }),
25126
-
25127
- click: function(event) {
25128
- if (!isSimpleClick(event)) { return true; }
25129
-
25130
- event.preventDefault();
25131
- if (this.bubbles === false) { event.stopPropagation(); }
25132
-
25133
- if (get(this, '_isDisabled')) { return false; }
25134
-
25135
- var router = this.get('router');
25136
-
25137
- if (Ember.ENV.ENABLE_ROUTE_TO) {
25138
-
25139
- var routeArgs = args(this, router);
25140
-
25141
- router.routeTo(Ember.TransitionEvent.create({
25142
- transitionMethod: this.get('replace') ? 'replaceWith' : 'transitionTo',
25143
- destinationRouteName: routeArgs[0],
25144
- contexts: routeArgs.slice(1)
25145
- }));
25146
- } else {
25147
- if (this.get('replace')) {
25148
- router.replaceWith.apply(router, args(this, router));
25149
- } else {
25150
- router.transitionTo.apply(router, args(this, router));
25151
- }
25152
- }
25153
- },
25154
-
25155
- href: Ember.computed(function() {
25156
- if (this.get('tagName') !== 'a') { return false; }
25157
-
25158
- var router = this.get('router');
25159
- return router.generate.apply(router, args(this, router));
25160
- })
25161
- });
25162
-
25163
- LinkView.toString = function() { return "LinkView"; };
25164
-
25165
24524
  /**
25166
24525
  The `{{linkTo}}` helper renders a link to the supplied
25167
24526
  `routeName` passing an optionally supplied model to the
@@ -25181,12 +24540,12 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25181
24540
  </a>
25182
24541
  ```
25183
24542
 
25184
- ### Supplying a tagName
25185
- By default `{{linkTo}}` renders an `<a>` element. This can
24543
+ ## Supplying a tagName
24544
+ By default `{{linkTo}} renders an `<a>` element. This can
25186
24545
  be overridden for a single use of `{{linkTo}}` by supplying
25187
24546
  a `tagName` option:
25188
24547
 
25189
- ```handlebars
24548
+ ```
25190
24549
  {{#linkTo photoGallery tagName="li"}}
25191
24550
  Great Hamster Photos
25192
24551
  {{/linkTo}}
@@ -25201,21 +24560,21 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25201
24560
  To override this option for your entire application, see
25202
24561
  "Overriding Application-wide Defaults".
25203
24562
 
25204
- ### Handling `href`
24563
+ ## Handling `href`
25205
24564
  `{{linkTo}}` will use your application's Router to
25206
24565
  fill the element's `href` property with a url that
25207
24566
  matches the path to the supplied `routeName` for your
25208
24567
  routers's configured `Location` scheme, which defaults
25209
24568
  to Ember.HashLocation.
25210
24569
 
25211
- ### Handling current route
24570
+ ## Handling current route
25212
24571
  `{{linkTo}}` will apply a CSS class name of 'active'
25213
24572
  when the application's current route matches
25214
24573
  the supplied routeName. For example, if the application's
25215
24574
  current route is 'photoGallery.recent' the following
25216
24575
  use of `{{linkTo}}`:
25217
24576
 
25218
- ```handlebars
24577
+ ```
25219
24578
  {{#linkTo photoGallery.recent}}
25220
24579
  Great Hamster Photos from the last week
25221
24580
  {{/linkTo}}
@@ -25233,7 +24592,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25233
24592
  for a single use of `{{linkTo}}` by passing an `activeClass`
25234
24593
  option:
25235
24594
 
25236
- ```handlebars
24595
+ ```
25237
24596
  {{#linkTo photoGallery.recent activeClass="current-url"}}
25238
24597
  Great Hamster Photos from the last week
25239
24598
  {{/linkTo}}
@@ -25248,7 +24607,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25248
24607
  To override this option for your entire application, see
25249
24608
  "Overriding Application-wide Defaults".
25250
24609
 
25251
- ### Supplying a model
24610
+ ## Supplying a model
25252
24611
  An optional model argument can be used for routes whose
25253
24612
  paths contain dynamic segments. This argument will become
25254
24613
  the model context of the linked route:
@@ -25271,7 +24630,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25271
24630
  </a>
25272
24631
  ```
25273
24632
 
25274
- ### Supplying multiple models
24633
+ ## Supplying multiple models
25275
24634
  For deep-linking to route paths that contain multiple
25276
24635
  dynamic segments, multiple model arguments can be used.
25277
24636
  As the router transitions through the route path, each
@@ -25299,7 +24658,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25299
24658
  </a>
25300
24659
  ```
25301
24660
 
25302
- ### Overriding Application-wide Defaults
24661
+ ## Overriding Application-wide Defaults
25303
24662
  ``{{linkTo}}`` creates an instance of Ember.LinkView
25304
24663
  for rendering. To override options for your entire
25305
24664
  application, reopen Ember.LinkView and supply the
@@ -25311,7 +24670,67 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25311
24670
  tagName: 'li'
25312
24671
  })
25313
24672
  ```
24673
+
24674
+ @class LinkView
24675
+ @namespace Ember
24676
+ @extends Ember.View
24677
+ **/
24678
+ var LinkView = Ember.LinkView = Ember.View.extend({
24679
+ tagName: 'a',
24680
+ namedRoute: null,
24681
+ currentWhen: null,
24682
+ title: null,
24683
+ activeClass: 'active',
24684
+ replace: false,
24685
+ attributeBindings: ['href', 'title'],
24686
+ classNameBindings: 'active',
24687
+
24688
+ // Even though this isn't a virtual view, we want to treat it as if it is
24689
+ // so that you can access the parent with {{view.prop}}
24690
+ concreteView: Ember.computed(function() {
24691
+ return get(this, 'parentView');
24692
+ }).property('parentView'),
24693
+
24694
+ active: Ember.computed(function() {
24695
+ var router = this.get('router'),
24696
+ params = resolvedPaths(this.parameters),
24697
+ currentWithIndex = this.currentWhen + '.index',
24698
+ isActive = router.isActive.apply(router, [this.currentWhen].concat(params)) ||
24699
+ router.isActive.apply(router, [currentWithIndex].concat(params));
24700
+
24701
+ if (isActive) { return get(this, 'activeClass'); }
24702
+ }).property('namedRoute', 'router.url'),
24703
+
24704
+ router: Ember.computed(function() {
24705
+ return this.get('controller').container.lookup('router:main');
24706
+ }),
24707
+
24708
+ click: function(event) {
24709
+ if (!isSimpleClick(event)) { return true; }
24710
+
24711
+ event.preventDefault();
24712
+ if (this.bubbles === false) { event.stopPropagation(); }
24713
+
24714
+ var router = this.get('router');
24715
+
24716
+ if (this.get('replace')) {
24717
+ router.replaceWith.apply(router, args(this, router));
24718
+ } else {
24719
+ router.transitionTo.apply(router, args(this, router));
24720
+ }
24721
+ },
25314
24722
 
24723
+ href: Ember.computed(function() {
24724
+ if (this.get('tagName') !== 'a') { return false; }
24725
+
24726
+ var router = this.get('router');
24727
+ return router.generate.apply(router, args(this, router));
24728
+ })
24729
+ });
24730
+
24731
+ LinkView.toString = function() { return "LinkView"; };
24732
+
24733
+ /**
25315
24734
  @method linkTo
25316
24735
  @for Ember.Handlebars.helpers
25317
24736
  @param {String} routeName
@@ -25326,7 +24745,6 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25326
24745
 
25327
24746
  hash.namedRoute = name;
25328
24747
  hash.currentWhen = hash.currentWhen || name;
25329
- hash.disabledBinding = hash.disabledWhen;
25330
24748
 
25331
24749
  hash.parameters = {
25332
24750
  context: this,
@@ -25441,23 +24859,15 @@ var get = Ember.get, set = Ember.set;
25441
24859
  Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25442
24860
 
25443
24861
  /**
25444
- Renders the named template in the current context with the same-named
25445
- controller.
24862
+ Renders the named template in the current context using the singleton
24863
+ instance of the same-named controller.
25446
24864
 
25447
- If a view class with the same name exists, the view class will be used.
24865
+ If a view class with the same name exists, uses the view class.
25448
24866
 
25449
- The optional second argument is a property path that will be bound
25450
- to the `model` property of the controller.
25451
-
25452
- If a `model` property path is specified, then a new instance of the
25453
- controller will be created.
25454
-
25455
- If no `model` property path is provided, then the helper will use the
25456
- singleton instance of the controller. A given controller may only be used
25457
- one time in your app in this manner.
24867
+ If a `model` is specified, it becomes the model for that controller.
25458
24868
 
25459
24869
  The default target for `{{action}}`s in the rendered template is the
25460
- controller.
24870
+ named controller.
25461
24871
 
25462
24872
  @method render
25463
24873
  @for Ember.Handlebars.helpers
@@ -25536,7 +24946,6 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25536
24946
  var EmberHandlebars = Ember.Handlebars,
25537
24947
  handlebarsGet = EmberHandlebars.get,
25538
24948
  SafeString = EmberHandlebars.SafeString,
25539
- forEach = Ember.ArrayPolyfills.forEach,
25540
24949
  get = Ember.get,
25541
24950
  a_slice = Array.prototype.slice;
25542
24951
 
@@ -25563,7 +24972,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25563
24972
 
25564
24973
  var allowed = true;
25565
24974
 
25566
- forEach.call(keys, function(key) {
24975
+ keys.forEach(function(key) {
25567
24976
  if (event[key + "Key"] && allowedKeys.indexOf(key) === -1) {
25568
24977
  allowed = false;
25569
24978
  }
@@ -25649,7 +25058,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
25649
25058
  aView.appendTo('body');
25650
25059
  ```
25651
25060
 
25652
- Will result in the following rendered HTML
25061
+ Will results in the following rendered HTML
25653
25062
 
25654
25063
  ```html
25655
25064
  <div class="ember-view">
@@ -26011,14 +25420,6 @@ Ember.View.reopen({
26011
25420
  },
26012
25421
 
26013
25422
  connectOutlet: function(outletName, view) {
26014
- if (this._pendingDisconnections) {
26015
- delete this._pendingDisconnections[outletName];
26016
- }
26017
-
26018
- if (this._hasEquivalentView(outletName, view)) {
26019
- return;
26020
- }
26021
-
26022
25423
  var outlets = get(this, '_outlets'),
26023
25424
  container = get(this, 'container'),
26024
25425
  router = container && container.lookup('router:main'),
@@ -26031,30 +25432,10 @@ Ember.View.reopen({
26031
25432
  }
26032
25433
  },
26033
25434
 
26034
- _hasEquivalentView: function(outletName, view) {
26035
- var existingView = get(this, '_outlets.'+outletName);
26036
- return existingView &&
26037
- existingView.prototype === view.prototype &&
26038
- existingView.get('template') === view.get('template') &&
26039
- existingView.get('context') === view.get('context');
26040
- },
26041
-
26042
25435
  disconnectOutlet: function(outletName) {
26043
- if (!this._pendingDisconnections) {
26044
- this._pendingDisconnections = {};
26045
- }
26046
- this._pendingDisconnections[outletName] = true;
26047
- Ember.run.once(this, '_finishDisconnections');
26048
- },
26049
-
26050
- _finishDisconnections: function() {
26051
25436
  var outlets = get(this, '_outlets');
26052
- var pendingDisconnections = this._pendingDisconnections;
26053
- this._pendingDisconnections = null;
26054
25437
 
26055
- for (var outletName in pendingDisconnections) {
26056
- set(outlets, outletName, null);
26057
- }
25438
+ set(outlets, outletName, null);
26058
25439
  }
26059
25440
  });
26060
25441
 
@@ -26240,7 +25621,7 @@ Ember.HashLocation = Ember.Object.extend({
26240
25621
  var self = this;
26241
25622
  var guid = Ember.guidFor(this);
26242
25623
 
26243
- Ember.$(window).on('hashchange.ember-location-'+guid, function() {
25624
+ Ember.$(window).bind('hashchange.ember-location-'+guid, function() {
26244
25625
  Ember.run(function() {
26245
25626
  var path = location.hash.substr(1);
26246
25627
  if (get(self, 'lastSetURL') === path) { return; }
@@ -26427,7 +25808,7 @@ Ember.HistoryLocation = Ember.Object.extend({
26427
25808
  var guid = Ember.guidFor(this),
26428
25809
  self = this;
26429
25810
 
26430
- Ember.$(window).on('popstate.ember-location-'+guid, function(e) {
25811
+ Ember.$(window).bind('popstate.ember-location-'+guid, function(e) {
26431
25812
  // Ignore initial page load popstate event in Chrome
26432
25813
  if(!popstateFired) {
26433
25814
  popstateFired = true;
@@ -26814,25 +26195,6 @@ Ember.DefaultResolver = Ember.Object.extend({
26814
26195
 
26815
26196
  var get = Ember.get, set = Ember.set;
26816
26197
 
26817
- function DeprecatedContainer(container) {
26818
- this._container = container;
26819
- }
26820
-
26821
- DeprecatedContainer.deprecate = function(method) {
26822
- return function() {
26823
- var container = this._container;
26824
-
26825
- return container[method].apply(container, arguments);
26826
- };
26827
- };
26828
-
26829
- DeprecatedContainer.prototype = {
26830
- _container: null,
26831
- lookup: DeprecatedContainer.deprecate('lookup'),
26832
- resolve: DeprecatedContainer.deprecate('resolve'),
26833
- register: DeprecatedContainer.deprecate('register')
26834
- };
26835
-
26836
26198
  /**
26837
26199
  An instance of `Ember.Application` is the starting point for every Ember
26838
26200
  application. It helps to instantiate, initialize and coordinate the many
@@ -27270,88 +26632,21 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
27270
26632
  return this;
27271
26633
  },
27272
26634
 
27273
- /**
27274
- Reset the application. This is typically used only in tests.
27275
-
27276
- Typical Example:
27277
-
27278
- ```javascript
27279
-
27280
- var App;
27281
-
27282
- Ember.run(function(){
27283
- App = Ember.Application.create();
27284
- });
27285
-
27286
- module("acceptance test", {
27287
- setup: function() {
27288
- App.reset();
27289
- }
27290
- });
27291
-
27292
- test("first test", function(){
27293
- // App is freshly reset
27294
- });
27295
-
27296
- test("first test", function(){
27297
- // App is again freshly reset
27298
- });
27299
- ```
27300
-
27301
- Advanced Example:
27302
-
27303
- Occasionally you may want to prevent the app from initializing during
27304
- setup. This could enable extra configuration, or enable asserting prior
27305
- to the app becoming ready.
27306
-
27307
- ```javascript
27308
-
27309
- var App;
27310
-
27311
- Ember.run(function(){
27312
- App = Ember.Application.create();
27313
- });
27314
-
27315
- module("acceptance test", {
27316
- setup: function() {
27317
- Ember.run(function() {
27318
- App.reset();
27319
- App.deferReadiness();
27320
- });
27321
- }
27322
- });
27323
-
27324
- test("first test", function(){
27325
- ok(true, 'something before app is initialized');
27326
-
27327
- Ember.run(function(){
27328
- App.advanceReadiness();
27329
- });
27330
- ok(true, 'something after app is initialized');
27331
- });
27332
- ```
27333
-
27334
- @method reset
27335
- **/
27336
26635
  reset: function() {
27337
- function handleReset() {
27338
- Ember.run(this.__container__, 'destroy');
26636
+
26637
+ Ember.run(this, function(){
26638
+ Ember.run(get(this,'__container__'), 'destroy');
27339
26639
 
27340
26640
  this.buildContainer();
27341
26641
 
27342
26642
  this._readinessDeferrals = 1;
26643
+ this.$(this.rootElement).removeClass('ember-application');
27343
26644
 
27344
26645
  Ember.run.schedule('actions', this, function(){
27345
26646
  this._initialize();
27346
26647
  this.startRouting();
27347
26648
  });
27348
- }
27349
-
27350
- if (Ember.run.currentRunLoop) {
27351
- handleReset.call(this);
27352
- } else {
27353
- Ember.run(this, handleReset);
27354
- }
26649
+ });
27355
26650
  },
27356
26651
 
27357
26652
  /**
@@ -27405,12 +26700,27 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
27405
26700
  @method setupEventDispatcher
27406
26701
  */
27407
26702
  setupEventDispatcher: function() {
27408
- var customEvents = get(this, 'customEvents'),
27409
- rootElement = get(this, 'rootElement'),
27410
- dispatcher = this.__container__.lookup('event_dispatcher:main');
26703
+ var eventDispatcher = this.createEventDispatcher(),
26704
+ customEvents = get(this, 'customEvents');
26705
+
26706
+ eventDispatcher.setup(customEvents);
26707
+ },
26708
+
26709
+ /**
26710
+ @private
27411
26711
 
27412
- set(this, 'eventDispatcher', dispatcher);
27413
- dispatcher.setup(customEvents, rootElement);
26712
+ Create an event dispatcher for the application's `rootElement`.
26713
+
26714
+ @method createEventDispatcher
26715
+ */
26716
+ createEventDispatcher: function() {
26717
+ var rootElement = get(this, 'rootElement'),
26718
+ eventDispatcher = Ember.EventDispatcher.create({
26719
+ rootElement: rootElement
26720
+ });
26721
+
26722
+ set(this, 'eventDispatcher', eventDispatcher);
26723
+ return eventDispatcher;
27414
26724
  },
27415
26725
 
27416
26726
  /**
@@ -27453,7 +26763,10 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
27453
26763
  willDestroy: function() {
27454
26764
  Ember.BOOTED = false;
27455
26765
 
27456
- this.__container__.destroy();
26766
+ var eventDispatcher = get(this, 'eventDispatcher');
26767
+ if (eventDispatcher) { eventDispatcher.destroy(); }
26768
+
26769
+ get(this, '__container__').destroy();
27457
26770
  },
27458
26771
 
27459
26772
  initializer: function(options) {
@@ -27501,8 +26814,7 @@ Ember.Application.reopenClass({
27501
26814
  */
27502
26815
  buildContainer: function(namespace) {
27503
26816
  var container = new Ember.Container();
27504
-
27505
- Ember.Container.defaultContainer = new DeprecatedContainer(container);
26817
+ Ember.Container.defaultContainer = Ember.Container.defaultContainer || container;
27506
26818
 
27507
26819
  container.set = Ember.set;
27508
26820
  container.normalize = normalize;
@@ -27515,14 +26827,13 @@ Ember.Application.reopenClass({
27515
26827
  container.register('controller:object', Ember.ObjectController, { instantiate: false });
27516
26828
  container.register('controller:array', Ember.ArrayController, { instantiate: false });
27517
26829
  container.register('route:basic', Ember.Route, { instantiate: false });
27518
- container.register('event_dispatcher:main', Ember.EventDispatcher);
27519
26830
 
27520
26831
  container.injection('router:main', 'namespace', 'application:main');
27521
26832
 
27522
- container.injection('controller', 'target', 'router:main');
27523
- container.injection('controller', 'namespace', 'application:main');
26833
+ container.typeInjection('controller', 'target', 'router:main');
26834
+ container.typeInjection('controller', 'namespace', 'application:main');
27524
26835
 
27525
- container.injection('route', 'router', 'router:main');
26836
+ container.typeInjection('route', 'router', 'router:main');
27526
26837
 
27527
26838
  return container;
27528
26839
  }
@@ -27637,31 +26948,6 @@ function verifyDependencies(controller) {
27637
26948
 
27638
26949
  Ember.ControllerMixin.reopen({
27639
26950
  concatenatedProperties: ['needs'],
27640
-
27641
- /**
27642
- An array of other controller objects available inside
27643
- instances of this controller via the `controllers`
27644
- property:
27645
-
27646
- For example, when you define a controller:
27647
-
27648
- ```javascript
27649
- App.CommentsController = Ember.ArrayController.extend({
27650
- needs: ['post']
27651
- });
27652
- ```
27653
-
27654
- The application's single instance of these other
27655
- controllers are accessible by name through the
27656
- `controllers` property:
27657
-
27658
- ```javascript
27659
- this.get('controllers.post'); // instance of App.PostController
27660
- ```
27661
-
27662
- @property {Array} needs
27663
- @default []
27664
- */
27665
26951
  needs: [],
27666
26952
 
27667
26953
  init: function() {
@@ -28968,282 +28254,94 @@ Ember States
28968
28254
  })();
28969
28255
 
28970
28256
  (function() {
28971
- var slice = [].slice,
28972
- helpers = {},
28973
- originalMethods = {},
28974
- injectHelpersCallbacks = [];
28975
-
28976
- /**
28977
- @class Test
28978
- @namespace Ember
28979
- */
28980
- Ember.Test = {
28981
-
28982
- /**
28983
- @public
28984
-
28985
- `registerHelper` is used to register a
28986
- test helper that will be injected when
28987
- `App.injectTestHelpers` is called.
28988
-
28989
- The helper method will always be called
28990
- with the current Application as the first
28991
- parameter.
28992
-
28993
- For example:
28994
- ```javascript
28995
- Ember.Test.registerHelper('boot', function(app)) {
28996
- Ember.run(app, app.deferReadiness);
28997
- }
28998
- ```
28999
-
29000
- This helper can later be called without arguments
29001
- because it will be called with `app` as the
29002
- first parameter.
29003
-
29004
- ```javascript
29005
- App = Ember.Application.create();
29006
- App.injectTestHelpers();
29007
- boot();
29008
- ```
29009
-
29010
- Whenever you register a helper that
29011
- performs async operations,
29012
- make sure you `return wait();` at the
29013
- end of the helper.
29014
-
29015
- If an async helper also needs to return a value,
29016
- pass it to the `wait` helper as a first argument:
29017
- `return wait(val);`
29018
-
29019
- @method registerHelper
29020
- @param name {String}
29021
- @param helperMethod {Function}
29022
- */
29023
- registerHelper: function(name, helperMethod) {
29024
- helpers[name] = helperMethod;
29025
- },
29026
- /**
29027
- @public
29028
- @method unregisterHelper
29029
- @param name {String}
29030
- */
29031
- unregisterHelper: function(name) {
29032
- delete helpers[name];
29033
- if (originalMethods[name]) {
29034
- window[name] = originalMethods[name];
29035
- }
29036
- delete originalMethods[name];
29037
- },
29038
-
29039
- /**
29040
- @public
29041
-
29042
- Used to register callbacks to be fired
29043
- whenever `App.injectTestHelpers` is called
29044
-
29045
- The callback will receive the current application
29046
- as an argument.
29047
-
29048
- @method unregisterHelper
29049
- @param name {String}
29050
- */
29051
- onInjectHelpers: function(callback) {
29052
- injectHelpersCallbacks.push(callback);
29053
- },
28257
+ /*globals EMBER_APP_BEING_TESTED */
29054
28258
 
29055
- /**
29056
- @public
28259
+ var Promise = Ember.RSVP.Promise,
28260
+ pendingAjaxRequests = 0,
28261
+ originalFind;
29057
28262
 
29058
- This returns a thenable tailored
29059
- for testing. It catches failed
29060
- `onSuccess` callbacks and invokes
29061
- the `Ember.Test.failure` function
29062
- in the last chained then.
29063
-
29064
- This method should be returned
29065
- by async helpers such as `wait`.
29066
-
29067
- @method promise
29068
- @param resolver {Function}
29069
- */
29070
- promise: function(resolver) {
29071
- var promise = new Ember.RSVP.Promise(resolver);
29072
- var thenable = {
29073
- chained: false
29074
- };
29075
- thenable.then = function(onSuccess, onFailure) {
29076
- var self = this, thenPromise, nextPromise;
29077
- thenable.chained = true;
29078
- thenPromise = promise.then(onSuccess, onFailure);
29079
- // this is to ensure all downstream fulfillment
29080
- // handlers are wrapped in the error handling
29081
- nextPromise = Ember.Test.promise(function(resolve) {
29082
- resolve(thenPromise);
29083
- });
29084
- thenPromise.then(null, function(reason) {
29085
- // ensure this is the last promise in the chain
29086
- // if not, ignore and the exception will propagate
29087
- // this prevents the same error from being fired multiple times
29088
- if (!nextPromise.chained) {
29089
- Ember.Test.failure(reason);
29090
- }
29091
- });
29092
- return nextPromise;
29093
- };
29094
- return thenable;
29095
- },
28263
+ function visit(url) {
28264
+ var promise = new Promise();
28265
+ Ember.run(EMBER_APP_BEING_TESTED, EMBER_APP_BEING_TESTED.handleURL, url);
28266
+ wait(promise, promise.resolve);
28267
+ return promise;
28268
+ }
29096
28269
 
29097
- /**
29098
- @public
28270
+ function click(selector) {
28271
+ var promise = new Promise();
28272
+ Ember.run(function() {
28273
+ Ember.$(selector).click();
28274
+ });
28275
+ wait(promise, promise.resolve);
28276
+ return promise;
28277
+ }
29099
28278
 
29100
- Override this method with your
29101
- testing framework's false assertion
29102
- This function is called whenever
29103
- an exception occurs causing the testing
29104
- promise to fail.
28279
+ function fillIn(selector, text) {
28280
+ var promise = new Promise();
28281
+ var $el = find(selector);
28282
+ Ember.run(function() {
28283
+ $el.val(text);
28284
+ });
29105
28285
 
29106
- QUnit example:
28286
+ wait(promise, promise.resolve);
28287
+ return promise;
28288
+ }
29107
28289
 
29108
- ```javascript
29109
- Ember.Test.failure = function(reason) {
29110
- ok(false, reason);
29111
- }
29112
- ```
28290
+ function find(selector) {
28291
+ return Ember.$('.ember-application').find(selector);
28292
+ }
29113
28293
 
29114
- @method failure
29115
- @param reason {String}
29116
- */
29117
- failure: function(error) {
29118
- setTimeout(function() {
29119
- throw error;
29120
- });
28294
+ function wait(target, method) {
28295
+ if (!method) {
28296
+ method = target;
28297
+ target = null;
29121
28298
  }
29122
- };
29123
-
29124
-
29125
- function curry(app, fn) {
29126
- return function() {
29127
- var args = slice.call(arguments);
29128
- args.unshift(app);
29129
- return fn.apply(app, args);
29130
- };
28299
+ stop();
28300
+ var watcher = setInterval(function() {
28301
+ var routerIsLoading = EMBER_APP_BEING_TESTED.__container__.lookup('router:main').router.isLoading;
28302
+ if (routerIsLoading) { return; }
28303
+ if (pendingAjaxRequests) { return; }
28304
+ if (Ember.run.hasScheduledTimers() || Ember.run.currentRunLoop) { return; }
28305
+ clearInterval(watcher);
28306
+ start();
28307
+ Ember.run(target, method);
28308
+ }, 200);
29131
28309
  }
29132
28310
 
29133
-
29134
28311
  Ember.Application.reopen({
29135
- testHelpers: {},
29136
-
29137
28312
  setupForTesting: function() {
29138
28313
  this.deferReadiness();
29139
28314
 
29140
28315
  this.Router.reopen({
29141
28316
  location: 'none'
29142
28317
  });
28318
+
28319
+ window.EMBER_APP_BEING_TESTED = this;
29143
28320
  },
29144
28321
 
29145
28322
  injectTestHelpers: function() {
29146
- this.testHelpers = {};
29147
- for (var name in helpers) {
29148
- originalMethods[name] = window[name];
29149
- this.testHelpers[name] = window[name] = curry(this, helpers[name]);
29150
- }
28323
+ Ember.$(document).ajaxStart(function() {
28324
+ pendingAjaxRequests++;
28325
+ });
29151
28326
 
29152
- for(var i = 0, l = injectHelpersCallbacks.length; i < l; i++) {
29153
- injectHelpersCallbacks[i](this);
29154
- }
28327
+ Ember.$(document).ajaxStop(function() {
28328
+ pendingAjaxRequests--;
28329
+ });
28330
+
28331
+ window.visit = visit;
28332
+ window.click = click;
28333
+ window.fillIn = fillIn;
28334
+ originalFind = window.find;
28335
+ window.find = find;
29155
28336
  },
29156
28337
 
29157
28338
  removeTestHelpers: function() {
29158
- for (var name in helpers) {
29159
- window[name] = originalMethods[name];
29160
- delete this.testHelpers[name];
29161
- delete originalMethods[name];
29162
- }
28339
+ window.visit = null;
28340
+ window.click = null;
28341
+ window.fillIn = null;
28342
+ window.find = originalFind;
29163
28343
  }
29164
28344
  });
29165
-
29166
- })();
29167
-
29168
-
29169
-
29170
- (function() {
29171
- var get = Ember.get,
29172
- helper = Ember.Test.registerHelper,
29173
- pendingAjaxRequests = 0;
29174
-
29175
-
29176
- Ember.Test.onInjectHelpers(function() {
29177
- Ember.$(document).ajaxStart(function() {
29178
- pendingAjaxRequests++;
29179
- });
29180
-
29181
- Ember.$(document).ajaxStop(function() {
29182
- pendingAjaxRequests--;
29183
- });
29184
- });
29185
-
29186
-
29187
- function visit(app, url) {
29188
- Ember.run(app, app.handleURL, url);
29189
- app.__container__.lookup('router:main').location.setURL(url);
29190
- return wait(app);
29191
- }
29192
-
29193
- function click(app, selector, context) {
29194
- var $el = find(app, selector, context);
29195
- Ember.run(function() {
29196
- app.$(selector).click();
29197
- });
29198
- return wait(app);
29199
- }
29200
-
29201
- function fillIn(app, selector, context, text) {
29202
- var $el;
29203
- if (typeof text === 'undefined') {
29204
- text = context;
29205
- context = null;
29206
- }
29207
- $el = find(app, selector, context);
29208
- Ember.run(function() {
29209
- $el.val(text).change();
29210
- });
29211
- return wait(app);
29212
- }
29213
-
29214
- function find(app, selector, context) {
29215
- var $el;
29216
- context = context || get(app, 'rootElement');
29217
- $el = app.$(selector, context);
29218
- if ($el.length === 0) {
29219
- throw("Element " + selector + " not found.");
29220
- }
29221
- return $el;
29222
- }
29223
-
29224
- function wait(app, value) {
29225
- return Ember.Test.promise(function(resolve) {
29226
- stop();
29227
- var watcher = setInterval(function() {
29228
- var routerIsLoading = app.__container__.lookup('router:main').router.isLoading;
29229
- if (routerIsLoading) { return; }
29230
- if (pendingAjaxRequests) { return; }
29231
- if (Ember.run.hasScheduledTimers() || Ember.run.currentRunLoop) { return; }
29232
- clearInterval(watcher);
29233
- start();
29234
- Ember.run(function() {
29235
- resolve(value);
29236
- });
29237
- }, 10);
29238
- });
29239
- }
29240
-
29241
- // expose these methods as test helpers
29242
- helper('visit', visit);
29243
- helper('click', click);
29244
- helper('fillIn', fillIn);
29245
- helper('find', find);
29246
- helper('wait', wait);
29247
28345
  })();
29248
28346
 
29249
28347
 
@@ -29257,6 +28355,6 @@ helper('wait', wait);
29257
28355
 
29258
28356
 
29259
28357
  if (typeof location !== 'undefined' && (location.hostname === 'localhost' || location.hostname === '127.0.0.1')) {
29260
- Ember.Logger.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. "+
28358
+ console.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. "+
29261
28359
  "If you want full error messages please use the non-minified build provided on the Ember website.");
29262
28360
  }