ember-source 1.3.0.beta.2 → 1.3.0.beta.3
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dist/ember-data-deps.js +1080 -432
- data/dist/ember-data-deps.min.js +5 -5
- data/dist/ember-data-deps.prod.js +1079 -431
- data/dist/ember-debug.js +1 -1
- data/dist/ember-runtime.js +1080 -432
- data/dist/ember-runtime.min.js +5 -5
- data/dist/ember-runtime.prod.js +1079 -431
- data/dist/ember-spade.js +30 -14
- data/dist/ember-template-compiler.js +3 -3
- data/dist/ember-template-compiler.min.js +2 -2
- data/dist/ember-template-compiler.prod.js +3 -3
- data/dist/ember-tests.js +2 -2
- data/dist/ember.js +1264 -571
- data/dist/ember.min.js +9 -9
- data/dist/ember.prod.js +1260 -555
- metadata +2 -2
data/dist/ember-runtime.min.js
CHANGED
@@ -8,12 +8,12 @@
|
|
8
8
|
// ==========================================================================
|
9
9
|
|
10
10
|
|
11
|
-
// Version: 1.3.0-beta.
|
11
|
+
// Version: 1.3.0-beta.3
|
12
12
|
|
13
13
|
// Copyright: Copyright 2011-2013 Tilde Inc. and contributors
|
14
14
|
// Portions Copyright 2006-2011 Strobe Inc.
|
15
15
|
// Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
16
|
-
!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]={};var i,o,s,a,u;if(i=r[e],!i)throw new Error("Module '"+e+"' not found.");o=i.deps,s=i.callback,a=[];for(var c=0,h=o.length;h>c;c++)"exports"===o[c]?a.push(u={}):a.push(t(o[c]));var l=s.apply(this,a);return n[e]=u||l}}(),function(){"undefined"==typeof Ember&&(Ember={});{var e=(Ember.imports=Ember.imports||this,Ember.exports=Ember.exports||this);Ember.lookup=Ember.lookup||this}e.Em=e.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.3.0-beta.2","undefined"==typeof ENV&&(e.ENV={}),"undefined"==typeof ENV.DISABLE_RANGE_API&&(ENV.DISABLE_RANGE_API=!0),Ember.ENV=Ember.ENV||ENV,Ember.config=Ember.config||{},Ember.FEATURES=Ember.ENV.FEATURES||{},Ember.FEATURES.isEnabled=function(e){var t=Ember.FEATURES[e];return Ember.ENV.ENABLE_ALL_FEATURES?!0:t===!0||t===!1||void 0===t?t:Ember.ENV.ENABLE_OPTIONAL_FEATURES?!0:!1},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.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)||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&&2!==Ember.create({a:1},{a:{value:2}}).a&&(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&&"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(){var e=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){for(var t=Error.apply(this,arguments),r=0;r<e.length;r++)this[e[r]]=t[e[r]]},Ember.Error.prototype=Ember.create(Error.prototype),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)}}}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}Ember.GUID_PREFIX="ember";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.GUID_PREFIX);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 h={writable:!0,configurable:!1,enumerable:!1,value:null},l=Ember.GUID_KEY+"_meta";Ember.META_KEY=l;var f={descs:{},watching:{}};u&&(f.values={}),Ember.EMPTY_META=f,Object.freeze&&Object.freeze(f);var m=Ember.platform.defineProperty.isSimulated;m&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){}),Ember.meta=function(t,i){var o=t[l];return i===!1?o||f:(o?o.source!==t&&(m||r(t,l,h),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[l]=o):(m||r(t,l,h),o=new e(t),u&&(o.values={}),t[l]=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_listens__=e.__ember_listens__,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(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 b={},d="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(d,function(e){b["[object "+e+"]"]=e.toLowerCase()});var E=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):b[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,b=f.length;b>p;p++)m=f[p],d[p]=m.before(e,n(),i);return o.call(s)}function u(e){i=i||{},i.exception=e}function c(){for(p=0,b=f.length;b>p;p++)m=f[p],m.after(e,n(),i,d[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(h)}var h,l,f=t[e];if(Ember.STRUCTURED_PROFILE&&(h=e+": "+i.object,console.time(h)),f||(f=r(e)),0===f.length)return l=o.call(s),Ember.STRUCTURED_PROFILE&&console.timeEnd(h),l;var m,p,b,d=[];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;e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf,n=Array.prototype.splice;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){for(var o,s,a=[].concat(i),u=[],c=6e4,h=t,l=r;a.length;)s=l>c?c:l,0>=s&&(s=0),o=a.splice(0,c),o=[h,s].concat(o),h+=c,l-=s,u=u.concat(n.apply(e,o));return u},replace:function(e,t,r,n){return e.replace?e.replace(t,r,n):i._replace(e,t,r,n)},intersection:function(e,t){var r=[];return i.forEach(e,function(e){i.indexOf(t,e)>=0&&r.push(e)}),r}}}(),function(){var e,t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,i=/^this[\.\*]/,o=/^([^\.\*]+)/;e=function(e,n){if(""===n)return e;if(n||"string"!=typeof e||(n=e,e=null),null===e||-1!==n.indexOf("."))return a(e,n);var i,o=e[t],s=o&&o.descs[n];return s?s.get(e,n):(i=r&&o&&o.watching[n]>0?o.values[n]:e[n],void 0!==i||"object"!=typeof e||n in e||"function"!=typeof e.unknownProperty?i:e.unknownProperty(n))},Ember.config.overrideAccessors&&(Ember.get=e,Ember.config.overrideAccessors(),e=Ember.get);var s=Ember.normalizeTuple=function(t,r){var s,a=i.test(r),u=!a&&n.test(r);if((!t||u)&&(t=Ember.lookup),a&&(r=r.slice(5)),t===Ember.lookup&&(s=r.match(o)[0],t=e(t,s),r=r.slice(s.length+1)),!r||0===r.length)throw new Ember.Error("Invalid Path");return[t,r]},a=Ember._getPath=function(t,r){var n,o,a,u,c;if(null===t&&-1===r.indexOf("."))return e(Ember.lookup,r);for(n=i.test(r),(!t||n)&&(a=s(t,r),t=a[0],r=a[1],a.length=0),o=r.split("."),c=o.length,u=0;null!=t&&c>u;u++)if(t=e(t,o[u],!0),t&&t.isDestroyed)return void 0;return t};Ember.getWithDefault=function(t,r,n){var i=e(t,r);return void 0===i?n:i},Ember.get=e}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i+=3)if(t===e[i]&&r===e[i+1]){n=i;break}return n}function t(e,t){var r,n=m(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=f(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-3;s>=0;s-=3){var a=o[s],u=o[s+1],c=o[s+2],h=e(n,a,u);-1===h&&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-3;a>=0;a-=3){var u=o[a],c=o[a+1],h=o[a+2],l=e(n,u,c);-1===l&&(n.push(u,c,h),s.push(u,c,h))}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,3),"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-3;c>=0;c-=3)s(u[c],u[c+1])}}function s(r,n,i,o,s){function a(){return s.call(i)}function u(){-1!==h&&(c[h+2]&=~E)}o||"function"!=typeof i||(o=i,i=null);var c=t(r,n),h=e(c,i,o);return-1!==h&&(c[h+2]|=E),Ember.tryFinally(a,u)}function a(r,n,i,o,s){function a(){return s.call(i)}function u(){for(var e=0,t=m.length;t>e;e++){var r=m[e];p[e][r+2]&=~E}}o||"function"!=typeof i||(o=i,i=null);var c,h,l,f,m=[],p=[];for(l=0,f=n.length;f>l;l++){c=n[l],h=t(r,c);var b=e(h,i,o);-1!==b&&(h[b+2]|=E,m.push(b),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-3;s>=0;s-=3){var a=n[s],u=n[s+1],c=n[s+2];u&&(c&E||(c&d&&o(e,t,a,u),a||(a=e),"string"==typeof u&&(u=a[u]),r?u.apply(a,r):u.call(a)))}return!0}}function h(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function l(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+=3){var a=i[o],u=i[o+1];r.push([a,u])}return r}var f=Ember.create,m=Ember.meta,p=Ember.META_KEY,b=[].slice,d=1,E=2;Ember.on=function(){var e=b.call(arguments,-1)[0],t=b.call(arguments,0,-1);return e.__ember_listens__=t,e},Ember.addListener=i,Ember.removeListener=o,Ember._suspendListener=s,Ember._suspendListeners=a,Ember.sendEvent=c,Ember.hasListeners=h,Ember.watchedEvents=u,Ember.listenersFor=l,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){var n=l(e,!1),i=n.watching[t]>0||"length"===t,s=n.proto,a=n.descs[t];i&&s!==e&&(a&&a.willChange&&a.willChange(e,t),r(e,t,n),o(e,t,n),c(e,t))}function t(e,t){var r=l(e,!1),i=r.watching[t]>0||"length"===t,o=r.proto,a=r.descs[t];o!==e&&(a&&a.didChange&&a.didChange(e,t),(i||"length"===t)&&(n(e,t,r),s(e,t,r,!1),h(e,t)))}function r(t,r,n){if(!t.isDestroying){var o=_,s=!o;s&&(o=_={}),i(e,t,r,o,n),s&&(_=null)}}function n(e,r,n){if(!e.isDestroying){var o=O,s=!o;s&&(o=O={}),i(t,e,r,o,n),s&&(O=null)}}function i(e,t,r,n,i){var o=f(t);if(n[o]||(n[o]={}),!n[o][r]){n[o][r]=!0;var s=i.deps;if(s=s&&s[r])for(var a in s){var u=i.descs[a];u&&u._suspended===t||e(t,a)}}}function o(t,r,n){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var i,o,s=n.chainWatchers[r],a=[];for(i=0,o=s.length;o>i;i++)s[i].willChange(a);for(i=0,o=a.length;o>i;i+=2)e(a[i],a[i+1])}}function s(e,r,n,i){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var o,s,a=n.chainWatchers[r],u=i?null:[];for(o=0,s=a.length;s>o;o++)a[o].didChange(u);if(!i)for(o=0,s=u.length;s>o;o+=2)t(u[o],u[o+1])}}function a(){g++}function u(){g--,0>=g&&(y.clear(),v.flush())}function c(e,t){if(!e.isDestroying){var r,n,i=t+":before";g?(r=y.add(e,t,i),n=d(e,i,r),p(e,i,[e,t],n)):p(e,i,[e,t])}}function h(e,t){if(!e.isDestroying){var r,n=t+":change";g?(r=v.add(e,t,n),b(e,n,r)):p(e,n,[e,t])}}var l=Ember.meta,f=Ember.guidFor,m=Ember.tryFinally,p=Ember.sendEvent,b=Ember.listenersUnion,d=Ember.listenersDiff,E=Ember._ObserverSet,y=new E,v=new E,g=0;Ember.propertyWillChange=e,Ember.propertyDidChange=t;var _,O;Ember.overrideChains=function(e,t,r){s(e,t,r,!0)},Ember.beginPropertyChanges=a,Ember.endPropertyChanges=u,Ember.changeProperties=function(e,t){a(),m(e,u,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||0===s.length)throw new Ember.Error("You passed an empty path");if(!e){if(o)return;throw new Ember.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||-1!==i.indexOf("."))return e(n,i,o,s);var a,u,c=n[t],h=c&&c.descs[i];return h?h.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.trySet=function(e,t,r){return i(e,t,r,!0)}}(),function(){var e=Ember.set,t=Ember.guidFor,r=Ember.ArrayPolyfills.indexOf,n=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},i=function(e,t){var r=e.keys.copy(),i=n(e.values);return t.keys=r,t.values=i,t.length=e.length,t},o=Ember.OrderedSet=function(){this.clear()};o.create=function(){return new o},o.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(e){var r=t(e),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(e))},remove:function(e){var n=t(e),i=this.presenceSet,o=this.list;delete i[n];var s=r.call(o,e);s>-1&&o.splice(s,1)},isEmpty:function(){return 0===this.list.length},has:function(e){var r=t(e),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 o;return e.presenceSet=n(this.presenceSet),e.list=this.toArray(),e}};var s=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};s.create=function(){return new s},s.prototype={length:0,get:function(e){var r=this.values,n=t(e);return r[n]},set:function(r,n){var i=this.keys,o=this.values,s=t(r);i.add(r),o[s]=n,e(this,"length",i.list.length)},remove:function(r){var n=this.keys,i=this.values,o=t(r);return i.hasOwnProperty(o)?(n.remove(r),delete i[o],e(this,"length",n.list.length),!0):!1},has:function(e){var r=this.values,n=t(e);return r.hasOwnProperty(n)},forEach:function(e,r){var n=this.keys,i=this.values;n.forEach(function(n){var o=t(n);e.call(r,n,i[o])})},copy:function(){return i(this,new s)}};var a=Ember.MapWithDefault=function(e){s.call(this),this.defaultValue=e.defaultValue};a.create=function(e){return e?new a(e):new s},a.prototype=Ember.create(s.prototype),a.prototype.get=function(e){var t=this.has(e);if(t)return s.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},a.prototype.copy=function(){return i(this,new a({defaultValue:this.defaultValue}))}}(),function(){function e(e){var t;Ember.imports.console?t=Ember.imports.console:"undefined"!=typeof console&&(t=console);var r="object"==typeof t?t[e]:null;return r?r.apply?function(){r.apply(t,arguments)}:function(){var e=Array.prototype.join.call(arguments,", ");r(e)}:void 0}function t(e,t){if(!e)try{throw new Ember.Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},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,assert:e("assert")||t}}(),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 h,l,f,m;return c||(c=t(e)),h=c.descs,l=c.descs[s],f=c.watching[s]>0,l instanceof Ember.Descriptor&&l.teardown(e,s),a instanceof Ember.Descriptor?(m=a,h[s]=a,n&&f?r(e,s,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[s]=void 0):(h[s]=void 0,null==a?(m=u,n&&f?(c.values[s]=u,r(e,s,{configurable:!0,enumerable:!0,set:i,get:o(s)})):e[s]=u):(m=a,r(e,s,a))),f&&Ember.overrideChains(e,s,c),e.didDefineProperty&&e.didDefineProperty(e,s,m),this}}(),function(){var e=Ember.get;Ember.getProperties=function(t){var r={},n=arguments,i=1;2===arguments.length&&"array"===Ember.typeOf(arguments[1])&&(i=0,n=arguments[1]);for(var o=n.length;o>i;i++)r[n[i]]=e(t,n[i]);return r}}(),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 s=e(i),a=s.watching;a[o]?a[o]=(a[o]||0)+1:(a[o]=1,"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=e(t),s=o.watching;1===s[i]?(s[i]=0,"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&(n(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o.values[i]}),delete o.values[i])):s[i]>1&&s[i]--}}(),function(){function e(e){return e.match(h)[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,t){if(!e)return void 0;var r=n(e,!1);if(r.proto===e)return void 0;if("@each"===t)return i(e,t);var o=r.descs[t];return o&&o._cacheable?t in r.cache?r.cache[t]:void 0:i(e,t)}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,s=Ember.ArrayPolyfills.forEach,a=Ember.warn,u=Ember.watchKey,c=Ember.unwatchKey,h=/^([^\.\*]+)/,l=[];Ember.flushPendingChains=function(){if(0!==l.length){var e=l;l=[],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",0===l.length)}};var f=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)}}},m=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()},p=m.prototype;p.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=r(e,this._key)}return this._value},p.destroy=function(){if(this._watching){var e=this._object;e&&f(e,this._key,this),this._watching=!1}},p.copy=function(e){var t,r=new m(null,null,e),n=this._paths;for(t in n)n[t]<=0||r.add(t);return r},p.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 l.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)},p.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)},p.count=0,p.chain=function(t,r,n){var i,o=this._chains;o||(o=this._chains={}),i=o[t],i||(i=o[t]=new m(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},p.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())},p.willChange=function(e){var t=this._chains;if(t)for(var r in t)t.hasOwnProperty(r)&&t[r].willChange(e);this._parent&&this._parent.chainWillChange(this,this._key,1,e)},p.chainWillChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},p.chainDidChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},p.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(f(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);null!==e&&this._parent&&this._parent.chainDidChange(this,this._key,1,e)},Ember.finishChains=function(e){var t=n(e,!1),r=t.chains;r&&(r.value()!==e&&(t.chains=r=r.copy(e)),r.didChange(null))}}(),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),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;1===o[n]?(o[n]=0,e(r).remove(n)):o[n]>1&&o[n]--}}(),function(){function e(e){return"*"===e||!l.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,h=Ember.generateGuid,l=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"array"!==c(t))&&(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||"array"!==c(t))&&(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)&&h(e),i&&i.value()!==e&&(n.chains=i.copy(e))};var f=[];Ember.destroy=function(e){var t,r,o,s,a=e[n];if(a&&(e[n]=null,t=a.chains))for(f.push(t);f.length>0;){if(t=f.pop(),r=t._chains)for(o in r)r.hasOwnProperty(o)&&f.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,h,l=r._dependentKeys;if(l)for(s=t(o),a=0,u=l.length;u>a;a++)c=l[a],h=e(s,c),h[i]=(h[i]||0)+1,p(n,c)}function n(r,n,i,o){var s,a,u,c,h,l=r._dependentKeys;if(l)for(s=t(o),a=0,u=l.length;u>a;a++)c=l[a],h=e(s,c),h[i]=(h[i]||0)-1,b(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){for(var t=0,r=e.length;r>t;t++)e[t].didChange(null)}function s(e,t){for(var r={},n=0;n<t.length;n++)r[t[n]]=c(e,t[n]);return r}function a(e,t){Ember.computed[e]=function(e){var r=f.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function u(e,t){Ember.computed[e]=function(){var e=f.call(arguments),r=Ember.computed(function(){return t.apply(this,[s(this,e)])});return r.property.apply(r,e)}}var c=Ember.get,h=Ember.set,l=Ember.meta,f=[].slice,m=Ember.create,p=(Ember.META_KEY,Ember.watch),b=Ember.unwatch;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var d=i.prototype;d.cacheable=function(e){return this._cacheable=e!==!1,this},d.volatile=function(){return this.cacheable(!1)},d.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},d.property=function(){var e;return e=f.call(arguments),this._dependentKeys=e,this},d.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},d.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=l(e);t in r.cache&&(delete r.cache[t],n(this,e,t,r))}},d.get=function(e,t){var n,i,s,a;if(this._cacheable){if(s=l(e),i=s.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),a=s.chainWatchers&&s.chainWatchers[t],a&&o(a),r(this,e,t,s)}else n=this.func.call(e,t);return n},d.set=function(e,t,n){var i,o,s,a=this._cacheable,u=this.func,c=l(e,a),h=c.watching[t],f=this._suspended,m=!1,p=c.cache;if(this._readOnly)throw new Ember.Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(a&&p.hasOwnProperty(t)&&(o=p[t],m=!0),i=u.wrappedFunction?u.wrappedFunction.length:u.length,3===i)s=u.call(e,t,n,o);else{if(2!==i)return Ember.defineProperty(e,t,null,o),Ember.set(e,t,n),void 0;s=u.call(e,t,n)}if(m&&o===s)return;h&&Ember.propertyWillChange(e,t),m&&delete p[t],a&&(m||r(this,e,t,c),p[t]=s),h&&Ember.propertyDidChange(e,t)}finally{this._suspended=f}return s},d.teardown=function(e,t){var r=l(e);return 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=f.call(arguments,0,-1),e=f.call(arguments,-1)[0]),"function"!=typeof e)throw new Ember.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(c(this,e))}),a("notEmpty",function(e){return!Ember.isEmpty(c(this,e))}),a("none",function(e){return Ember.isNone(c(this,e))}),a("not",function(e){return!c(this,e)}),a("bool",function(e){return!!c(this,e)}),a("match",function(e,t){var r=c(this,e);return"string"==typeof r?t.test(r):!1}),a("equal",function(e,t){return c(this,e)===t}),a("gt",function(e,t){return c(this,e)>t}),a("gte",function(e,t){return c(this,e)>=t}),a("lt",function(e,t){return c(this,e)<t}),a("lte",function(e,t){return c(this,e)<=t}),u("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),u("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),u("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),u("collect",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?(h(this,e,r),r):c(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return c(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:c(this,e):null!=r?r:c(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(){e("backburner/queue",["exports"],function(e){"use strict";function t(e,t,r){this.daq=e,this.name=t,this.options=r,this._queue=[]}t.prototype={daq:null,name:null,options:null,_queue:null,push:function(e,t,r,n){var i=this._queue;
|
17
|
-
return i.push(e,t,r,n),{queue:this,target:e,method:t}},pushUnique:function(e,t,r,n){var i,o,s,a,u=this._queue;for(s=0,a=u.length;a>s;s+=4)if(i=u[s],o=u[s+1],i===e&&o===t)return u[s+2]=r,u[s+3]=n,{queue:this,target:e,method:t};return this._queue.push(e,t,r,n),{queue:this,target:e,method:t}},flush:function(){var e,t,r,n,i,o=this._queue,s=this.options,a=s&&s.before,u=s&&s.after,c=o.length;for(c&&a&&a(),i=0;c>i;i+=4)e=o[i],t=o[i+1],r=o[i+2],n=o[i+3],r&&r.length>0?t.apply(e,r):t.call(e);c&&u&&u(),o.length>c?(this._queue=o.slice(c),this.flush()):this._queue.length=0},cancel:function(e){var t,r,n,i,o=this._queue;for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o.splice(n,4),!0;if(o=this._queueBeingFlushed)for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o[n+1]=null,!0}},e.Queue=t}),e("backburner/deferred_action_queues",["backburner/queue","exports"],function(e,t){"use strict";function r(e,t){var r=this.queues={};this.queueNames=e=e||[];for(var n,o=0,s=e.length;s>o;o++)n=e[o],r[n]=new i(this,n,t[n])}function n(e,t){for(var r,n,i=0,o=t;o>=i;i++)if(r=e.queueNames[i],n=e.queues[r],n._queue.length)return i;return-1}var i=e.Queue;r.prototype={queueNames:null,queues:null,schedule:function(e,t,r,n,i,o){var s=this.queues,a=s[e];if(!a)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?a.pushUnique(t,r,n,o):a.push(t,r,n,o)},flush:function(){for(var e,t,r,i,o=this.queues,s=this.queueNames,a=0,u=s.length;u>a;){e=s[a],t=o[e],r=t._queueBeingFlushed=t._queue.slice(),t._queue=[];var c,h,l,f,m=t.options,p=m&&m.before,b=m&&m.after,d=0,E=r.length;for(E&&p&&p();E>d;)c=r[d],h=r[d+1],l=r[d+2],f=r[d+3],"string"==typeof h&&(h=c[h]),h&&(l&&l.length>0?h.apply(c,l):h.call(c)),d+=4;t._queueBeingFlushed=null,E&&b&&b(),-1===(i=n(this,a))?a++:a=i}}},t.DeferredActionQueues=r}),e("backburner",["backburner/deferred_action_queues","exports"],function(e,t){"use strict";function r(e){return"number"==typeof e||v.test(e)}function n(e,t){this.queueNames=e,this.options=t||{},this.options.defaultQueue||(this.options.defaultQueue=e[0]),this.instanceStack=[]}function i(e){e.begin(),c=y.setTimeout(function(){c=null,e.end()})}function o(e,t,r){(!h||l>t)&&(h&&clearTimeout(h),h=y.setTimeout(function(){h=null,l=null,s(e)},r),l=t)}function s(e){var t,r,n,i,s=+new Date;e.run(function(){for(n=0,i=E.length;i>n&&(t=E[n],!(t>s));n+=2);for(r=E.splice(0,n),n=1,i=r.length;i>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),E.length&&o(e,E[0],E[0]-s)}function a(e,t){for(var r,n=-1,i=0,o=d.length;o>i;i++)if(r=d[i],r[0]===e&&r[1]===t){n=i;break}return n}function u(e,t){for(var r,n=-1,i=0,o=b.length;o>i;i++)if(r=b[i],r[0]===e&&r[1]===t){n=i;break}return n}var c,h,l,f=e.DeferredActionQueues,m=[].slice,p=[].pop,b=[],d=[],E=[],y=this,v=/\d+/;n.prototype={queueNames:null,options:null,currentInstance:null,instanceStack:null,begin:function(){var e=this.options&&this.options.onBegin,t=this.currentInstance;t&&this.instanceStack.push(t),this.currentInstance=new f(this.queueNames,this.options),e&&e(this.currentInstance,t)},end:function(){var e=this.options&&this.options.onEnd,t=this.currentInstance,r=null;try{t.flush()}finally{this.currentInstance=null,this.instanceStack.length&&(r=this.instanceStack.pop(),this.currentInstance=r),e&&e(t,r)}},run:function(e,t){var r;this.begin(),t||(t=e,e=null),"string"==typeof t&&(t=e[t]);var n=!1;try{r=arguments.length>2?t.apply(e,m.call(arguments,2)):t.call(e)}finally{n||(n=!0,this.end())}return r},defer:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?m.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!1,n)},deferOnce:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?m.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!0,n)},setTimeout:function(){function e(){t.apply(i,c)}var t,n,i,s,a,u,c=m.call(arguments),h=c.length,l=this;if(0!==h){if(1===h)t=c.shift(),n=0;else if(2===h)s=c[0],a=c[1],"function"==typeof a||"function"==typeof s[a]?(i=c.shift(),t=c.shift(),n=0):r(a)?(t=c.shift(),n=c.shift()):(t=c.shift(),n=0);else{var f=c[c.length-1];r(f)&&(n=c.pop()),s=c[0],u=c[1],"function"==typeof u||"string"==typeof u&&null!==s&&u in s?(i=c.shift(),t=c.shift()):t=c.shift()}var p=+new Date+parseInt(n,10);"string"==typeof t&&(t=i[t]);var b,d;for(b=0,d=E.length;d>b&&!(p<E[b]);b+=2);return E.splice(b,0,p,e),o(l,p,n),e}},throttle:function(e,t){var r,n,i,o=this,s=arguments,a=parseInt(p.call(s),10);return n=u(e,t),n>-1?b[n]:(i=y.setTimeout(function(){o.run.apply(o,s);var r=u(e,t);r>-1&&b.splice(r,1)},a),r=[e,t,i],b.push(r),r)},debounce:function(e,t){var r,n,i,o,s=this,u=arguments,c=p.call(u);return"number"==typeof c||"string"==typeof c?(r=c,c=!1):r=p.call(u),r=parseInt(r,10),n=a(e,t),n>-1&&(i=d[n],d.splice(n,1),clearTimeout(i[2])),o=y.setTimeout(function(){c||s.run.apply(s,u);var r=a(e,t);r>-1&&d.splice(r,1)},r),c&&-1===n&&s.run.apply(s,u),i=[e,t,o],d.push(i),i},cancelTimers:function(){var e,t;for(e=0,t=b.length;t>e;e++)clearTimeout(b[e][2]);for(b=[],e=0,t=d.length;t>e;e++)clearTimeout(d[e][2]);d=[],h&&(clearTimeout(h),h=null),E=[],c&&(clearTimeout(c),c=null)},hasTimers:function(){return!!E.length||c},cancel:function(e){var t=typeof e;if(e&&"object"===t&&e.queue&&e.method)return e.queue.cancel(e);if("function"!==t)return"[object Array]"===window.toString.call(e)?this._cancelItem(u,b,e)||this._cancelItem(a,d,e):void 0;for(var r=0,n=E.length;n>r;r+=2)if(E[r+1]===e)return E.splice(r,2),!0},_cancelItem:function(e,t,r){var n,i;return r.length<3?!1:(i=e(r[0],r[1]),i>-1&&(n=t[i],n[2]===r[2])?(t.splice(i,1),clearTimeout(r[2]),!0):!1)}},n.prototype.schedule=n.prototype.defer,n.prototype.scheduleOnce=n.prototype.deferOnce,n.prototype.later=n.prototype.setTimeout,t.Backburner=n})}(),function(){function e(){!Ember.run.currentRunLoop}var r=function(e){Ember.run.currentRunLoop=e},n=function(e,t){Ember.run.currentRunLoop=t},i=t("backburner").Backburner,o=new i(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:r,onEnd:n}),s=[].slice;Ember.run=function(){var e;if(Ember.onerror)try{e=o.run.apply(o,arguments)}catch(t){Ember.onerror(t)}else e=o.run.apply(o,arguments);return e},Ember.run.join=function(){if(!Ember.run.currentRunLoop)return Ember.run.apply(Ember.run,arguments);var e=s.call(arguments);e.unshift("actions"),Ember.run.schedule.apply(Ember.run,e)},Ember.run.backburner=o;Ember.run;Ember.run.currentRunLoop=null,Ember.run.queues=o.queueNames,Ember.run.begin=function(){o.begin()},Ember.run.end=function(){o.end()},Ember.run.schedule=function(){e(),o.schedule.apply(o,arguments)},Ember.run.hasScheduledTimers=function(){return o.hasTimers()},Ember.run.cancelTimers=function(){o.cancelTimers()},Ember.run.sync=function(){o.currentInstance&&o.currentInstance.queues.sync.flush()},Ember.run.later=function(){return o.later.apply(o,arguments)},Ember.run.once=function(){e();var t=s.call(arguments);return t.unshift("actions"),o.scheduleOnce.apply(o,t)},Ember.run.scheduleOnce=function(){return e(),o.scheduleOnce.apply(o,arguments)},Ember.run.next=function(){var e=s.call(arguments);return e.push(1),o.later.apply(o,e)},Ember.run.cancel=function(e){return o.cancel(e)},Ember.run.debounce=function(){return o.debounce.apply(o,arguments)},Ember.run.throttle=function(){return o.throttle.apply(o,arguments)}}(),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=j(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=C.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=x(t),e[r]?D:(e[r]=t,t.properties)):t}function i(e,t,r,n){var i;return i=r[e]||n[e],t[e]&&(i=i?i.concat(t[e]):t[e]),i}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=j(r),r.func=Ember.wrap(r.func,o.func),r):r}function s(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 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){var o=i[t]||e[t];if(!o)return n;var a=Ember.merge({},o);for(var u in n)if(n.hasOwnProperty(u)){var c=n[u];a[u]=r(c)?s(e,u,c,o,{}):c}return a}function c(e,t,n,i,c,h,l,f){if(n instanceof Ember.Descriptor){if(n===_&&c[t])return D;n.func&&(n=o(i,t,n,h,c)),c[t]=n,h[t]=void 0}else l&&w.call(l,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?n=a(e,t,n,h):f&&w.call(f,t)>=0?n=u(e,t,n,h):r(n)&&(n=s(e,t,n,h,c)),c[t]=void 0,h[t]=n}function h(e,t,r,o,s,a){function u(e){delete r[e],delete o[e]}for(var l,f,m,p,b,d,E=0,y=e.length;y>E;E++)if(l=e[E],f=n(t,l),f!==D)if(f){d=Ember.meta(s),s.willMergeMixin&&s.willMergeMixin(f),p=i("concatenatedProperties",f,o,s),b=i("mergedProperties",f,o,s);for(m in f)f.hasOwnProperty(m)&&(a.push(m),c(s,m,f[m],d,r,o,p,b));f.hasOwnProperty("toString")&&(s.toString=f.toString)}else l.mixins&&(h(l.mixins,t,r,o,s,a),l._without&&A.call(l._without,u))}function l(e,t,r,n){if(I.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=j(n.bindings)):i=n.bindings={},i[t]=r}}function f(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 f(e,t||Ember.meta(e)),e}function p(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 b(e,t,r,n,i){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];"function"==typeof n&&(b(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),b(e,t,n,"__ember_observes__","removeObserver"),b(e,t,n,"__ember_listens__","removeListener")),"function"==typeof r&&(b(e,t,r,"__ember_observesBefore__","addBeforeObserver"),b(e,t,r,"__ember_observes__","addObserver"),b(e,t,r,"__ember_listens__","addListener"))}function E(t,r,n){var i,o,s,a={},u={},c=Ember.meta(t),f=[];h(r,e(t),a,u,t,f);for(var b=0,E=f.length;E>b;b++)if(i=f[b],"constructor"!==i&&u.hasOwnProperty(i)&&(s=a[i],o=u[i],s!==_)){for(;s&&s instanceof O;){var y=p(t,s,c,a,u);s=y.desc,o=y.value}(void 0!==s||void 0!==o)&&(d(t,i,o),l(t,i,o,c),S(t,i,s,o,c))}return n||m(t,c),t}function y(e,t,r){var n=x(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(y(i[o],t,r))return!0;return!1}function v(e,t,r){if(!r[x(t)])if(r[x(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&A.call(t.mixins,function(t){v(e,t,r)})}var g,_,O,C=Ember.ArrayPolyfills.map,w=Ember.ArrayPolyfills.indexOf,A=Ember.ArrayPolyfills.forEach,P=[].slice,j=Ember.create,S=Ember.defineProperty,x=Ember.guidFor,D={},I=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=P.call(arguments,1);return E(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},g=Ember.Mixin,g.prototype={properties:null,mixins:null,ownerConstructor:null},g._apply=E,g.applyPartial=function(e){var t=P.call(arguments,1);return E(e,t,!0)},g.finishPartial=m,Ember.anyUnprocessedMixins=!1,g.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var T=g.prototype;T.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},T.apply=function(e){return E(e,[this],!1)},T.applyPartial=function(e){return E(e,[this],!0)},T.detect=function(e){if(!e)return!1;if(e instanceof g)return y(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[x(this)]:!1},T.without=function(){var e=new g(this);return e._without=P.call(arguments),e},T.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},_=new Ember.Descriptor,_.toString=function(){return"(Required Property)"},Ember.required=function(){return _},O=function(e){this.methodName=e},O.prototype=new Ember.Descriptor,Ember.alias=function(e){return new O(e)},Ember.aliasMethod=function(e){return new O(e)},Ember.observer=function(){var e,t=P.call(arguments,-1)[0];if(e=P.call(arguments,0,-1),"function"!=typeof t&&(t=arguments[0],e=P.call(arguments,1)),"function"!=typeof t)throw new Ember.Error("Ember.observer called without a function");return t.__ember_observes__=e,t},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(){var e,t=P.call(arguments,-1)[0];if(e=P.call(arguments,0,-1),"function"!=typeof t&&(t=arguments[0],e=P.call(arguments,1)),"function"!=typeof t)throw new Ember.Error("Ember.beforeObserver called without a function");return t.__ember_observesBefore__=e,t}}(),function(){var e=Ember.EnumerableUtils.forEach,t=Ember.EnumerableUtils.indexOf;Ember.libraries=function(){var r=[],n=0,i=function(e){for(var t=0;t<r.length;t++)if(r[t].name===e)return r[t]};return r.register=function(e,t){i(e)||r.push({name:e,version:t})},r.registerCoreLibrary=function(e,t){i(e)||r.splice(n++,0,{name:e,version:t})},r.deRegister=function(e){var n=i(e);n&&r.splice(t(r,n),1)},r.each=function(t){e(r,function(e){t(e.name,e.version)})},r}(),Ember.libraries.registerCoreLibrary("Ember",Ember.VERSION)}(),function(){e("rsvp/all",["rsvp/promise","exports"],function(e,t){"use strict";function r(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("You must pass an array to all.");return new n(function(t,r){function n(e){return function(t){i(e,t)}}function i(e,r){s[e]=r,0===--a&&t(s)}var o,s=[],a=e.length;0===a&&t([]);for(var u=0;u<e.length;u++)o=e[u],o&&"function"==typeof o.then?o.then(n(u),r):i(u,o)})}var n=e.Promise;t.all=r}),e("rsvp/async",["rsvp/config","exports"],function(e,t){"use strict";function r(){return function(){process.nextTick(o)}}function n(){var e=new l(o),t=document.createElement("div");return e.observe(t,{attributes:!0}),window.addEventListener("unload",function(){e.disconnect(),e=null},!1),function(){t.setAttribute("drainQueue","drainQueue")}}function i(){return function(){f.setTimeout(o,1)}}function o(){for(var e=0;e<m.length;e++){var t=m[e],r=t[0],n=t[1];r(n)}m=[]}function s(e,t){var r=m.push([e,t]);1===r&&u()}function a(e,t){c.async(e,t)}var u,c=e.config,h="undefined"!=typeof window?window:{},l=h.MutationObserver||h.WebKitMutationObserver,f="undefined"!=typeof global?global:this,m=[];u="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?r():l?n():i(),c.async=s,t.async=a,t.asyncDefault=s}),e("rsvp/cast",["exports"],function(e){"use strict";function t(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=this;return new t(function(t){t(e)})}e.cast=t}),e("rsvp/config",["rsvp/events","exports"],function(e,t){"use strict";function r(e,t){"onerror"===e?a.on("error",function(e){t(e.detail)}):a[e]=t}function n(){return a.on.apply(a,arguments)}function i(){return a.off.apply(a,arguments)}function o(){return a.trigger.apply(a,arguments)}var s=e.EventTarget,a={};s.mixin(a),t.config=a,t.configure=r,t.on=n,t.off=i,t.trigger=o}),e("rsvp/defer",["rsvp/promise","exports"],function(e,t){"use strict";function r(){var e={resolve:void 0,reject:void 0,promise:void 0};return e.promise=new n(function(t,r){e.resolve=t,e.reject=r}),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]=[]),-1===r(o,t)&&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 h=0;h<i.length;h++)o=i[h],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,0===--o&&n.resolve(t)},u=function(e){n.reject(e)};for(var c in e)e[c]&&"function"==typeof e[c].then?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=this,u=new o(function(e,n){t=e,r=n});return s(i).then(function(i){i.push(n(t,r));try{e.apply(a,i)}catch(o){r(o)}}),u}}var o=e.Promise,s=t.all;r.denodeify=i}),e("rsvp/promise",["rsvp/config","rsvp/events","rsvp/cast","exports"],function(e,t,r,n){"use strict";function i(e){return o(e)||"object"==typeof e&&null!==e}function o(e){return"function"==typeof e}function s(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 s))return new s(e);var n=function(e){r||(r=!0,a(t,e))},i=function(e){r||(r=!0,h(t,e))};try{e(n,i)}catch(o){i(o)}}function a(e,t){e===t?c(e,t):u(e,t)||c(e,t)}function u(e,t){var r,n=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(i(t)&&(n=t.then,o(n)))return n.call(t,function(n){return r?!0:(r=!0,t!==n?a(e,n):c(e,n),void 0)},function(t){return r?!0:(r=!0,h(e,t),void 0)}),!0}catch(s){return h(e,s),!0}return!1}function c(e,t){l.async(function(){e.trigger("promise:resolved",{detail:t}),e.isFulfilled=!0,e.fulfillmentValue=t})}function h(e,t){l.async(function(){e._onerror&&e._onerror(t),e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedReason=t})}var l=e.config,f=t.EventTarget,m=r.cast,p=function(e,t,r,n){var i,s,c,l,f=o(r);if(f)try{i=r(n.detail),c=!0}catch(m){l=!0,s=m}else i=n.detail,c=!0;u(t,i)||(f&&c?a(t,i):l?h(t,s):"resolve"===e?a(t,i):"reject"===e&&h(t,i))};s.prototype={constructor:s,isRejected:void 0,isFulfilled:void 0,rejectedReason:void 0,fulfillmentValue:void 0,_onerror:function(e){l.trigger("error",{detail:e})},then:function(e,t){this._onerror=null;var r=new this.constructor(function(){});return this.isFulfilled&&l.async(function(t){p("resolve",r,e,{detail:t.fulfillmentValue})},this),this.isRejected&&l.async(function(e){p("reject",r,t,{detail:e.rejectedReason})},this),this.on("promise:resolved",function(t){p("resolve",r,e,t)}),this.on("promise:failed",function(e){p("reject",r,t,e)}),r},fail:function(e){return this.then(null,e)},"finally":function(e){var t=this.constructor;return this.then(function(r){return t.cast(e()).then(function(){return r})},function(r){return t.cast(e()).then(function(){throw r})})}},s.prototype["catch"]=s.prototype.fail,s.cast=m,f.mixin(s.prototype),n.Promise=s}),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 new n(function(t){t(e)})}var n=e.Promise;t.resolve=r}),e("rsvp/rethrow",["exports"],function(e){"use strict";function t(e){throw r.setTimeout(function(){throw e}),e}var r="undefined"==typeof global?this:global;e.rethrow=t}),e("rsvp",["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/rethrow","rsvp/defer","rsvp/config","rsvp/resolve","rsvp/reject","rsvp/async","exports"],function(e,t,r,n,i,o,s,a,u,c,h,l){"use strict";var f=e.EventTarget,m=t.Promise,p=r.denodeify,b=n.all,d=i.hash,E=o.rethrow,y=s.defer,v=(a.config,a.configure),g=a.on,_=a.off,O=a.trigger,C=u.resolve,w=c.reject,A=h.async,P=h.asyncDefault;l.Promise=m,l.EventTarget=f,l.all=b,l.hash=d,l.rethrow=E,l.defer=y,l.denodeify=p,l.configure=v,l.trigger=O,l.on=g,l.off=_,l.resolve=C,l.reject=w,l.async=A,l.asyncDefault=P})}(),function(){Ember.MODEL_FACTORY_INJECTIONS=!1||!!Ember.ENV.MODEL_FACTORY_INJECTIONS,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.factoryCache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this.factoryTypeInjections=new e(t&&t.factoryTypeInjections),this.factoryInjections={},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++){if(n=t[o],i=e.lookup(n.fullName),void 0===i)throw new Error("Attempting to inject an unknown injection: `"+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 s(e,t){var r,n=e.normalize(t),i=e.resolve(n),o=e.factoryCache,s=t.split(":")[0];if(void 0!==i){if(o.has(t))return o.get(t);if(!i||"function"!=typeof i.extend||!Ember.MODEL_FACTORY_INJECTIONS&&"model"===s)return i;var c=a(e,t),h=u(e,t);return h._toString=e.makeToString(i,t),r=i.extend(c),r.reopenClass(h),o.set(t,r),r}}function a(e,t){var r=t.split(":"),n=r[0],o=[];return o=o.concat(e.typeInjections.get(n)||[]),o=o.concat(e.injections[t]||[]),o=i(e,o),o._debugContainerKey=t,o.container=e,o}function u(e,t){var r=t.split(":"),n=r[0],o=[];return o=o.concat(e.factoryTypeInjections.get(n)||[]),o=o.concat(e.factoryInjections[t]||[]),o=i(e,o),o._debugContainerKey=t,o}function c(e,t){var r=s(e,t);return o(e,t,"instantiate")===!1?r:r?"function"==typeof r.extend?r.create():r.create(a(e,t)):void 0}function h(e,t){e.cache.eachLocal(function(r,n){o(e,r,"instantiate")!==!1&&t(n)})}function l(e){e.cache.eachLocal(function(t,r){o(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}function f(e,t,r,n){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:r,fullName:n})}function m(e,t,r,n){var i=e[t]=e[t]||[];i.push({property:r,fullName:n})}return e.prototype={parent:null,dict:null,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},remove:function(e){delete this.dict[e]},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={parent:null,children:null,resolver:null,registry:null,cache:null,typeInjections:null,injections:null,_options:null,_typeOptions:null,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){if(-1===e.indexOf(":"))throw new TypeError("malformed fullName, expected: `type:name` got: "+e);if(void 0===t)throw new TypeError("Attempting to register an unknown factory: `"+e+"`");var n=this.normalize(e);if(this.cache.has(n))throw new Error("Cannot re-register: `"+e+"`, as it has already been looked up.");this.registry.set(n,t),this._options.set(n,r||{})},unregister:function(e){var t=this.normalize(e);this.registry.remove(t),this.cache.remove(t),this.factoryCache.remove(t),this._options.remove(t)},resolve:function(e){return this.resolver(e)||this.registry.get(e)},describe:function(e){return e},normalize:function(e){return e},makeToString:function(e){return e.toString()},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=c(this,e);return void 0!==r?(n(this,e)&&t.singleton!==!1&&this.cache.set(e,r),r):void 0},lookupFactory:function(e){return s(this,e)},has:function(e){return this.cache.has(e)?!0:!!this.resolve(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"),f(this.typeInjections,e,t,n)},injection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.typeInjection(e,t,n):(m(this.injections,e,t,n),void 0)},factoryTypeInjection:function(e,t,n){this.parent&&r("factoryTypeInjection"),f(this.factoryTypeInjections,e,t,n)},factoryInjection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.factoryTypeInjection(e,t,n):(m(this.factoryInjections,e,t,n),void 0)},destroy:function(){for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],h(this,function(e){e.destroy()}),this.parent=void 0,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)l(this.children[e]);l(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("array"===Ember.typeOf(r)){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;if(Ember.compare=function i(e,t){if(e===t)return 0;var r=Ember.typeOf(e),n=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===r&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===n&&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 h=s[r],l=s[n];if(l>h)return-1;if(h>l)return 1;switch(r){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var f=e.localeCompare(t);return 0>f?-1:f>0?1:0;case"array":for(var m=e.length,p=t.length,b=Math.min(m,p),d=0,E=0;0===d&&b>E;)d=i(e[E],t[E]),E++;return 0!==d?d:p>m?-1:m>p?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var y=e.getTime(),v=t.getTime();return v>y?-1:y>v?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){var t=Ember.typeOf(e);if("array"===t)return"["+e+"]";if("object"!==t)return e+"";var r,n=[];for(var i in e)if(e.hasOwnProperty(i)){if(r=e[i],"toString"===r)continue;"function"===Ember.typeOf(r)&&(r="function() { ... }"),n.push(i+": "+r)}return"{"+n.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.create.isSimulated){var r=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","valueOf","toLocaleString","toString"],n=function(e,r,n){"__"!==n.substring(0,2)&&"_super"!==n&&(t(r,n)>=0||e.hasOwnProperty(n)&&r.push(n))};Ember.keys=function(e){var t,i=[];for(t in e)n(e,i,t);for(var o=0,s=r.length;s>o;o++)t=r[o],n(e,i,t);return i}}}(),function(){var e=/[ _]/g,t={},r=/([a-z\d])([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,10)-1:r++,e=t[n],null===e?"(null)":void 0===e?"":Ember.inspect(e)})},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=Ember.get,t=Ember.set,r=Array.prototype.slice,n=Ember.getProperties;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){return n.apply(null,[this].concat(r.call(arguments)))},set:function(e,r){return t(this,e,r),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this
|
18
|
-
},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")},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(){function e(){var e,t,o=!1,s=function(){o||s.proto(),n(this,i,v),n(this,"_super",v);var u=a(this),l=u.proto;if(u.proto=this,e){var f=e;e=null,this.reopen.apply(this,f)}if(t){var m=t;t=null;for(var p=this.concatenatedProperties,d=0,g=m.length;g>d;d++){var _=m[d];if("object"!=typeof _&&void 0!==_)throw new Ember.Error("Ember.Object.create only accepts objects.");if(_)for(var O=Ember.keys(_),C=0,w=O.length;w>C;C++){var A=O[C];if(_.hasOwnProperty(A)){var P=_[A],j=Ember.IS_BINDING;if(j.test(A)){var S=u.bindings;S?u.hasOwnProperty("bindings")||(S=u.bindings=r(u.bindings)):S=u.bindings={},S[A]=P}var x=u.descs[A];if(p&&y(p,A)>=0){var D=this[A];P=D?"function"==typeof D.concat?D.concat(P):Ember.makeArray(D).concat(P):Ember.makeArray(P)}x?x.set(this,A,P):"function"!=typeof this.setUnknownProperty||A in this?E?Ember.defineProperty(this,A,null,P):this[A]=P:this.setUnknownProperty(A,P)}}}}b(this,u),this.init.apply(this,arguments),u.proto=l,c(this),h(this,"init")};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,h=Ember.sendEvent,l=Ember.destroy,f=Ember.run.schedule,m=Ember.Mixin,p=m._apply,b=m.finishPartial,d=m.prototype.reopen,E=Ember.ENV.MANDATORY_SETTER,y=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 p(this,arguments,!0),this},init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,f("actions",this,this.willDestroy),f("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(l(this),this.isDestroyed=!0)},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 _=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),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),p(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)}});_.ownerConstructor=g,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(_),g.ClassMixin=_,_.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(h.call(r,a)){var u=r[a];if(t[s]=a,u&&u.toString===n)u.toString=o(t.join(".")),u[f]=t.join(".");else if(u&&u.isNamespace){if(i[l(u)])continue;i[l(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[f]=i)}}function r(e){var t=e.superclass;return t?t[f]?t[f]:r(t):void 0}function n(){Ember.BOOTED||this[f]||i();var e;if(this[f])e=this[f];else if(this._toString)e=this._toString;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,h={}.hasOwnProperty,l=Ember.guidFor,f=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),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,h=Ember.meta,l=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer("content",function(){}),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=h(this);if(i.proto===this)return l(this,e,null,t),t;var o=r(this,"content");return n(o,e,t)}})}(),function(){function e(){return 0===a.length?{}: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=2===arguments.length;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,s=Ember.EnumerableUtils.indexOf,a=[];Ember.Enumerable=Ember.Mixin.create({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(),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 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"),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.mapBy(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},mapBy:function(e){return this.map(function(t){return n(t,e)})},mapProperty:Ember.aliasMethod("mapBy"),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)})},filterBy:function(){return this.filter(r.apply(this,arguments))},filterProperty:Ember.aliasMethod("filterBy"),rejectBy: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)},rejectProperty:Ember.aliasMethod("rejectBy"),find:function(r,i){var o=n(this,"length");void 0===i&&(i=null);for(var s,a,u=null,c=!1,h=e(),l=0;o>l&&!c;l++)s=this.nextObject(l,u,h),(c=r.call(i,s,l,this))&&(a=s),u=s;return s=u=null,h=t(h),a},findBy:function(){return this.find(r.apply(this,arguments))},findProperty:Ember.aliasMethod("findBy"),every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyBy:Ember.aliasMethod("isEvery"),everyProperty:Ember.aliasMethod("isEvery"),isEvery:function(){return this.every(r.apply(this,arguments))},any:function(e,t){var r=this.find(function(r,n,i){return!!e.call(t,r,n,i)});return"undefined"!=typeof r},some:Ember.aliasMethod("any"),isAny:function(){return this.any(r.apply(this,arguments))},anyBy:Ember.aliasMethod("isAny"),someProperty:Ember.aliasMethod("isAny"),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||i-r!==0,-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||i-r!==0,-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},sortBy:function(){var e=arguments;return this.toArray().sort(function(t,r){for(var i=0;i<e.length;i++){var o=e[i],s=n(t,o),a=n(r,o),u=Ember.compare(s,a);if(u)return u}return 0})}})}(),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)===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"),h=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==h&&(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(){function e(e,t){return"@this"===t?e:f(e,t)}function t(e,t,r){this.callbacks=e,this.cp=t,this.instanceMeta=r,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.suspended=!1,this.changedItems={}}function r(e,t,r){this.dependentArray=e,this.index=t,this.item=e.objectAt(t),this.trackedArray=r,this.beforeObserver=null,this.observer=null,this.destroyed=!1}function n(e,t,r){return 0>e?Math.max(0,t+e):t>e?e:Math.min(t-r,e)}function i(e,t,r){return Math.min(r,t-e)}function o(e,t,r,n,i,o){var s={arrayChanged:e,index:r,item:t,propertyName:n,property:i};return o&&(s.previousValues=o),s}function s(e,t,r,n,i){w(e,function(s,a){i.setValue(t.addedItem.call(this,i.getValue(),s,o(e,s,a,n,r),i.sugarMeta))},this)}function a(e,t){{var r;e._callbacks()}e._hasInstanceMeta(this,t)?(r=e._instanceMeta(this,t),r.setValue(e.resetValue(r.getValue()))):r=e._instanceMeta(this,t),e.options.initialize&&e.options.initialize.call(this,r.getValue(),{property:e,propertyName:t},r.sugarMeta)}function u(t,r){if(j.test(r))return!1;var n=e(t,r);return Ember.Array.detect(n)}function c(e,t,r){this.context=e,this.propertyName=t,this.cache=p(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=r}function h(t){var r=this;this.options=t,this._instanceMetas={},this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,n,e)};var n=function(t){var n=(r._dependentKeys,r._instanceMeta(this,t)),i=r._callbacks();a.call(this,r,t),n.dependentArraysObserver.suspendArrayObservers(function(){w(r._dependentKeys,function(t){if(u(this,t)){var i=e(this,t),o=n.dependentArrays[t];i===o?r._previousItemPropertyKeys[t]&&(delete r._previousItemPropertyKeys[t],n.dependentArraysObserver.setupPropertyObservers(t,r._itemPropertyKeys[t])):(n.dependentArrays[t]=i,o&&n.dependentArraysObserver.teardownObservers(o,t),i&&n.dependentArraysObserver.setupObservers(i,t))}},this)},this),w(r._dependentKeys,function(o){if(u(this,o)){var a=e(this,o);a&&s.call(this,a,i,r,t,n)}},this)};this.func=function(e){return n.call(this,e),r._instanceMeta(this,e).getValue()}}function l(e){return e}var f=Ember.get,m=(Ember.set,Ember.guidFor),p=Ember.meta,b=Ember.propertyWillChange,d=Ember.propertyDidChange,E=Ember.addBeforeObserver,y=Ember.removeBeforeObserver,v=Ember.addObserver,g=Ember.removeObserver,_=Ember.ComputedProperty,O=[].slice,C=Ember.create,w=Ember.EnumerableUtils.forEach,A=/^(.*)\.@each\.(.*)/,P=/(.*\.@each){2,}/,j=/\.\[\]$/;t.prototype={setValue:function(e){this.instanceMeta.setValue(e,!0)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[m(e)]=t,e.addArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"}),this.cp._itemPropertyKeys[t]&&this.setupPropertyObservers(t,this.cp._itemPropertyKeys[t])},teardownObservers:function(e,t){var r=this.cp._itemPropertyKeys[t]||[];delete this.dependentKeysByGuid[m(e)],this.teardownPropertyObservers(t,r),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},suspendArrayObservers:function(e,t){var r=this.suspended;this.suspended=!0,e.call(t),this.suspended=r},setupPropertyObservers:function(t,r){var n=e(this.instanceMeta.context,t),i=e(n,"length"),o=new Array(i);this.resetTransformations(t,o),w(n,function(e,i){var s=this.createPropertyObserverContext(n,i,this.trackedArraysByGuid[t]);o[i]=s,w(r,function(t){E(e,t,this,s.beforeObserver),v(e,t,this,s.observer)},this)},this)},teardownPropertyObservers:function(e,t){var r,n,i,o=this,s=this.trackedArraysByGuid[e];s&&s.apply(function(e,s,a){a!==Ember.TrackedArray.DELETE&&w(e,function(e){e.destroyed=!0,r=e.beforeObserver,n=e.observer,i=e.item,w(t,function(e){y(i,e,o,r),g(i,e,o,n)})})})},createPropertyObserverContext:function(e,t,n){var i=new r(e,t,n);return this.createPropertyObserver(i),i},createPropertyObserver:function(e){var t=this;e.beforeObserver=function(r,n){return t.itemPropertyWillChange(r,n,e.dependentArray,e)},e.observer=function(r,n){return t.itemPropertyDidChange(r,n,e.dependentArray,e)}},resetTransformations:function(e,t){this.trackedArraysByGuid[e]=new Ember.TrackedArray(t)},trackAdd:function(e,t,r){var n=this.trackedArraysByGuid[e];n&&n.addItems(t,r)},trackRemove:function(e,t,r){var n=this.trackedArraysByGuid[e];return n?n.removeItems(t,r):[]},updateIndexes:function(t,r){var n=e(r,"length");t.apply(function(e,t,r){r!==Ember.TrackedArray.DELETE&&(r!==Ember.TrackedArray.RETAIN||e.length!==n||0!==t)&&w(e,function(e,r){e.index=r+t})})},dependentArrayWillChange:function(t,r,s){function a(e){f[l].destroyed=!0,y(c,e,this,f[l].beforeObserver),g(c,e,this,f[l].observer)}if(!this.suspended){var u,c,h,l,f,p=this.callbacks.removedItem,b=m(t),d=this.dependentKeysByGuid[b],E=this.cp._itemPropertyKeys[d]||[],v=e(t,"length"),_=n(r,v,0),O=i(_,v,s);for(f=this.trackRemove(d,_,O),l=O-1;l>=0&&(h=_+l,!(h>=v));--l)c=t.objectAt(h),w(E,a,this),u=o(t,c,h,this.instanceMeta.propertyName,this.cp),this.setValue(p.call(this.instanceMeta.context,this.getValue(),c,u,this.instanceMeta.sugarMeta))}},dependentArrayDidChange:function(t,r,i,s){if(!this.suspended){var a,u,c=this.callbacks.addedItem,h=m(t),l=this.dependentKeysByGuid[h],f=new Array(s),p=this.cp._itemPropertyKeys[l],b=e(t,"length"),d=n(r,b,s);w(t.slice(d,d+s),function(e,r){p&&(u=f[r]=this.createPropertyObserverContext(t,d+r,this.trackedArraysByGuid[l]),w(p,function(t){E(e,t,this,u.beforeObserver),v(e,t,this,u.observer)},this)),a=o(t,e,d+r,this.instanceMeta.propertyName,this.cp),this.setValue(c.call(this.instanceMeta.context,this.getValue(),e,a,this.instanceMeta.sugarMeta))},this),this.trackAdd(l,d,f)}},itemPropertyWillChange:function(t,r,n,i){var o=m(t);this.changedItems[o]||(this.changedItems[o]={array:n,observerContext:i,obj:t,previousValues:{}}),this.changedItems[o].previousValues[r]=e(t,r)},itemPropertyDidChange:function(){this.flushChanges()},flushChanges:function(){var e,t,r,n=this.changedItems;for(e in n)t=n[e],t.observerContext.destroyed||(this.updateIndexes(t.observerContext.trackedArray,t.observerContext.dependentArray),r=o(t.array,t.obj,t.observerContext.index,this.instanceMeta.propertyName,this.cp,t.previousValues),this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)));this.changedItems={}}},c.prototype={getValue:function(){return this.propertyName in this.cache?this.cache[this.propertyName]:this.initialValue},setValue:function(e,t){if(void 0!==e){var r=t&&e!==this.cache[this.propertyName];r&&b(this.context,this.propertyName),this.cache[this.propertyName]=e,r&&d(this.context,this.propertyName)}else delete this.cache[this.propertyName]}},Ember.ReduceComputedProperty=h,h.prototype=C(_.prototype),h.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||l,addedItem:e.addedItem||l}}return this.callbacks},h.prototype._hasInstanceMeta=function(e,t){var r=m(e),n=r+":"+t;return!!this._instanceMetas[n]},h.prototype._instanceMeta=function(e,r){var n=m(e),i=n+":"+r,o=this._instanceMetas[i];return o||(o=this._instanceMetas[i]=new c(e,r,this.initialValue()),o.dependentArraysObserver=new t(this._callbacks(),this,o,e,r,o.sugarMeta)),o},h.prototype.initialValue=function(){return"function"==typeof this.options.initialValue?this.options.initialValue():this.options.initialValue},h.prototype.resetValue=function(){return this.initialValue()},h.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},h.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},h.prototype.property=function(){var e,t,r,n=this,i=(O.call(arguments),new Ember.Set);return w(O.call(arguments),function(o){if(P.test(o))throw new Ember.Error("Nested @each properties not supported: "+o);(e=A.exec(o))?(t=e[1],r=e[2],n.itemPropertyKey(t,r),i.add(t)):i.add(o)}),_.prototype.property.apply(this,i.toArray())},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=O.call(arguments,0,-1),e=O.call(arguments,-1)[0]),"object"!=typeof e)throw new Ember.Error("Reduce Computed Property declared without an options hash");if(!("initialValue"in e))throw new Ember.Error("Reduce Computed Property declared without an initial value");var r=new h(e);return t&&r.property.apply(r,t),r}}(),function(){function e(){var e=this;return t.apply(this,arguments),this.func=function(t){return function(r){return e._hasInstanceMeta(this,r)||i(e._dependentKeys,function(t){Ember.addObserver(this,t,function(){e.recomputeOnce.call(this,r)})},this),t.apply(this,arguments)}}(this.func),this}var t=Ember.ReduceComputedProperty,r=[].slice,n=Ember.create,i=Ember.EnumerableUtils.forEach;Ember.ArrayComputedProperty=e,e.prototype=n(t.prototype),e.prototype.initialValue=function(){return Ember.A()},e.prototype.resetValue=function(e){return e.clear(),e},Ember.arrayComputed=function(t){var n;if(arguments.length>1&&(n=r.call(arguments,0,-1),t=r.call(arguments,-1)[0]),"object"!=typeof t)throw new Ember.Error("Array Computed Property declared without an options hash");var i=new e(t);return n&&i.property.apply(i,n),i}}(),function(){function e(e,i,o,s){function a(e){return t.detectInstance(e)?n(r(e,"content")):n(e)}var u,c,h,l,f;return arguments.length<4&&(s=r(e,"length")),arguments.length<3&&(o=0),o===s?o:(u=o+Math.floor((s-o)/2),c=e.objectAt(u),l=a(c),f=a(i),l===f?u:(h=this.order(c,i),0===h&&(h=f>l?-1:1),0>h?this.binarySearch(e,i,u+1,s):h>0?this.binarySearch(e,i,o,u):u))}var t,r=Ember.get,n=(Ember.set,Ember.guidFor),i=Ember.merge,o=[].slice,s=Ember.EnumerableUtils.forEach,a=Ember.EnumerableUtils.map;Ember.computed.max=function(e){return Ember.reduceComputed.call(null,e,{initialValue:-1/0,addedItem:function(e,t){return Math.max(e,t)},removedItem:function(e,t){return e>t?e:void 0}})},Ember.computed.min=function(e){return Ember.reduceComputed.call(null,e,{initialValue:1/0,addedItem:function(e,t){return Math.min(e,t)},removedItem:function(e,t){return t>e?e:void 0}})},Ember.computed.map=function(e,t){var r={addedItem:function(e,r,n){var i=t.call(this,r);return e.insertAt(n.index,i),e},removedItem:function(e,t,r){return e.removeAt(r.index,1),e}};return Ember.arrayComputed(e,r)},Ember.computed.mapBy=function(e,t){var n=function(e){return r(e,t)};return Ember.computed.map(e+".@each."+t,n)},Ember.computed.mapProperty=Ember.computed.mapBy,Ember.computed.filter=function(e,t){var r={initialize:function(e,t,r){r.filteredArrayIndexes=new Ember.SubArray},addedItem:function(e,r,n,i){var o=!!t.call(this,r),s=i.filteredArrayIndexes.addItem(n.index,o);return o&&e.insertAt(s,r),e},removedItem:function(e,t,r,n){var i=n.filteredArrayIndexes.removeItem(r.index);return i>-1&&e.removeAt(i),e}};return Ember.arrayComputed(e,r)},Ember.computed.filterBy=function(e,t,n){var i;return i=2===arguments.length?function(e){return r(e,t)}:function(e){return r(e,t)===n},Ember.computed.filter(e+".@each."+t,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=o.call(arguments);return e.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(e,t,r,i){var o=n(t);return i.itemCounts[o]?++i.itemCounts[o]:i.itemCounts[o]=1,e.addObject(t),e},removedItem:function(e,t,r,i){var o=n(t),s=i.itemCounts;return 0===--s[o]&&e.removeObject(t),e}}),Ember.arrayComputed.apply(null,e)},Ember.computed.union=Ember.computed.uniq,Ember.computed.intersect=function(){var e=function(e){return a(e.property._dependentKeys,function(e){return n(e)})},t=o.call(arguments);return t.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(t,r,i,o){var s=n(r),a=(e(i),n(i.arrayChanged)),u=i.property._dependentKeys.length,c=o.itemCounts;return c[s]||(c[s]={}),void 0===c[s][a]&&(c[s][a]=0),1===++c[s][a]&&u===Ember.keys(c[s]).length&&t.addObject(r),t},removedItem:function(t,r,i,o){var s,a=n(r),u=(e(i),n(i.arrayChanged)),c=(i.property._dependentKeys.length,o.itemCounts);return void 0===c[a][u]&&(c[a][u]=0),0===--c[a][u]&&(delete c[a][u],s=Ember.keys(c[a]).length,0===s&&delete c[a],t.removeObject(r)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,t){if(2!==arguments.length)throw new Ember.Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed.call(null,e,t,{addedItem:function(n,i,o){var s=r(this,e),a=r(this,t);return o.arrayChanged===s?a.contains(i)||n.addObject(i):n.removeObject(i),n},removedItem:function(n,i,o){var s=r(this,e),a=r(this,t);return o.arrayChanged===a?s.contains(i)&&n.addObject(i):n.removeObject(i),n}})},t=Ember.ObjectProxy.extend(),Ember.computed.sort=function(n,o){var a,u;return"function"==typeof o?a=function(t,r,n){n.order=o,n.binarySearch=e}:(u=o,a=function(t,i,o){function a(){var e,t,a,h=r(this,u),l=o.sortProperties=[],f=o.sortPropertyAscending={};i.property.clearItemPropertyKeys(n),s(h,function(r){-1!==(t=r.indexOf(":"))?(e=r.substring(0,t),a="desc"!==r.substring(t+1).toLowerCase()):(e=r,a=!0),l.push(e),f[e]=a,i.property.itemPropertyKey(n,e)}),h.addObserver("@each",this,c)}function c(){Ember.run.once(this,h,i.propertyName)}function h(e){a.call(this),i.property.recomputeOnce.call(this,e)}Ember.addObserver(this,u,c),a.call(this),o.order=function(e,t){for(var n,i,o,s=0;s<this.sortProperties.length;++s)if(n=this.sortProperties[s],i=Ember.compare(r(e,n),r(t,n)),0!==i)return o=this.sortPropertyAscending[n],o?i:-1*i;return 0},o.binarySearch=e}),Ember.arrayComputed.call(null,n,{initialize:a,addedItem:function(e,t,r,n){var i=n.binarySearch(e,t);return e.insertAt(i,t),e},removedItem:function(e,r,n,o){var s,a,u;return n.previousValues?(s=i({content:r},n.previousValues),u=t.create(s)):u=r,a=o.binarySearch(e,u),e.removeAt(a),e}})}}(),function(){Ember.RSVP=t("rsvp"),Ember.RSVP.onerrorDefault=function(e){var t=e.detail;if(t instanceof Error&&(Ember.Logger.error(t.stack),Ember.testing))throw t},Ember.RSVP.on("error",Ember.RSVP.onerrorDefault)}(),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.observesImmediately=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return this.observes.apply(this,arguments)},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this},Function.prototype.on=function(){var t=e.call(arguments);return this.__ember_listens__=t,this})}(),function(){Ember.Comparable=Ember.Mixin.create({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 Ember.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 Ember.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 Ember.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){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");
|
19
|
-
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;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){function r(e,t){var r=[];return t&&r.push(t),r.concat(e)}t=t||{};var n=t.action||e(this,"action"),i=t.target||e(this,"targetObject"),o=t.actionContext;if("undefined"==typeof o&&(o=e(this,"actionContextObject")||this),i&&n){var s;return s=i.send?i.send.apply(i,r(o,n)):i[n].apply(i,r(o)),s!==!1&&(s=!0),s}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)},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,t)});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(){var e=Ember.get,t=Ember.typeOf;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){var r;e._actions||("object"===t(e.actions)?r="actions":"object"===t(e.events)&&(r="events"),r&&(e._actions=Ember.merge(e._actions||{},e[r])),delete e[r])},send:function(t){var r,n=[].slice.call(arguments,1);if(this._actions&&this._actions[t]){if(this._actions[t].apply(this,n)!==!0)return}else if(this.deprecatedSend&&this.deprecatedSendHandles&&this.deprecatedSendHandles(t)&&this.deprecatedSend.apply(this,[].slice.call(arguments))!==!0)return;(r=e(this,"target"))&&r.send.apply(r,arguments)}})}(),function(){function e(e,r){r.then(function(r){t(e,"isFulfilled",!0),t(e,"content",r)},function(r){t(e,"isRejected",!0),t(e,"reason",r)})}var t=Ember.set,r=Ember.get,n=Ember.RSVP.resolve,i=(Ember.RSVP.rethrow,Ember.computed.not),o=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:i("isSettled").readOnly(),isSettled:o("isRejected","isFulfilled").readOnly(),isRejected:!1,isFulfilled:!1,promise:Ember.computed(function(t,r){if(2===arguments.length)return r=n(r),e(this,r),r.then();throw new Ember.Error("PromiseProxy's promise must be set")}),then:function(e,t){return r(this,"promise").then(e,t)}})}(),function(){function e(e,t,r){this.type=e,this.count=t,this.items=r}function t(e,t,r,n){this.operation=e,this.index=t,this.split=r,this.rangeStart=n}var r=Ember.get,n=Ember.EnumerableUtils.forEach,i="r",o="i",s="d";Ember.TrackedArray=function(t){arguments.length<1&&(t=[]);var n=r(t,"length");this._operations=n?[new e(i,n,t)]:[]},Ember.TrackedArray.RETAIN=i,Ember.TrackedArray.INSERT=o,Ember.TrackedArray.DELETE=s,Ember.TrackedArray.prototype={addItems:function(t,n){var i=r(n,"length");if(!(1>i)){var s,a,u=this._findArrayOperation(t),c=u.operation,h=u.index,l=u.rangeStart;a=new e(o,i,n),c?u.split?(this._split(h,t-l,a),s=h+1):(this._operations.splice(h,0,a),s=h):(this._operations.push(a),s=h),this._composeInsert(s)}},removeItems:function(t,r){if(!(1>r)){var n,i,o=this._findArrayOperation(t),a=(o.operation,o.index),u=o.rangeStart;return n=new e(s,r),o.split?(this._split(a,t-u,n),i=a+1):(this._operations.splice(a,0,n),i=a),this._composeDelete(i)}},apply:function(t){var r=[],o=0;n(this._operations,function(e){t(e.items,o,e.type),e.type!==s&&(o+=e.count,r=r.concat(e.items))}),this._operations=[new e(i,r.length,r)]},_findArrayOperation:function(e){var r,n,i,o,a,u=!1;for(r=o=0,n=this._operations.length;n>r;++r)if(i=this._operations[r],i.type!==s){if(a=o+i.count-1,e===o)break;if(e>o&&a>=e){u=!0;break}o=a+1}return new t(i,r,u,o)},_split:function(t,r,n){var i=this._operations[t],o=i.items.slice(r),s=new e(i.type,o.length,o);i.count=r,i.items=i.items.slice(0,r),this._operations.splice(t+1,0,n,s)},_composeInsert:function(e){var t=this._operations[e],r=this._operations[e-1],n=this._operations[e+1],i=r&&r.type,s=n&&n.type;i===o?(r.count+=t.count,r.items=r.items.concat(t.items),s===o?(r.count+=n.count,r.items=r.items.concat(n.items),this._operations.splice(e,2)):this._operations.splice(e,1)):s===o&&(t.count+=n.count,t.items=t.items.concat(n.items),this._operations.splice(e+1,1))},_composeDelete:function(e){var t,r,n,i=this._operations[e],a=i.count,u=this._operations[e-1],c=u&&u.type,h=!1,l=[];c===s&&(i=u,e-=1);for(var f=e+1;a>0;++f)t=this._operations[f],r=t.type,n=t.count,r!==s?(n>a?(l=l.concat(t.items.splice(0,a)),t.count-=a,f-=1,n=a,a=0):(n===a&&(h=!0),l=l.concat(t.items),a-=n),r===o&&(i.count-=n)):i.count+=n;return i.count>0?this._operations.splice(e+1,f-1-e):this._operations.splice(e,h?2:1),l},toString:function(){var e="";return n(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){function e(e,t){this.type=e,this.count=t}var t=(Ember.get,Ember.EnumerableUtils.forEach),r="r",n="f";Ember.SubArray=function(t){arguments.length<1&&(t=0),this._operations=t>0?[new e(r,t)]:[]},Ember.SubArray.prototype={addItem:function(t,i){var o=-1,s=i?r:n,a=this;return this._findOperation(t,function(n,u,c,h,l){var f,m;s===n.type?++n.count:t===c?a._operations.splice(u,0,new e(s,1)):(f=new e(s,1),m=new e(n.type,h-t+1),n.count=t-c,a._operations.splice(u+1,0,f,m)),i&&(o=n.type===r?l+(t-c):l),a._composeAt(u)},function(t){a._operations.push(new e(s,1)),i&&(o=t),a._composeAt(a._operations.length-1)}),o},removeItem:function(e){var t=-1,n=this;return this._findOperation(e,function(i,o,s,a,u){i.type===r&&(t=u+(e-s)),i.count>1?--i.count:(n._operations.splice(o,1),n._composeAt(o))},function(){throw new Ember.Error("Can't remove an item that has never been added.")}),t},_findOperation:function(e,t,n){var i,o,s,a,u,c=0;for(i=a=0,o=this._operations.length;o>i;a=u+1,++i){if(s=this._operations[i],u=a+s.count-1,e>=a&&u>=e)return t(s,i,a,u,c),void 0;s.type===r&&(c+=s.count)}n(c)},_composeAt:function(e){var t,r=this._operations[e];r&&(e>0&&(t=this._operations[e-1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e-1,1),--e)),e<this._operations.length-1&&(t=this._operations[e+1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e+1,1))))},toString:function(){var e="";return t(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),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("content",function(){this._teardownContent()}),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer("content",function(){r(this,"content");this._setupContent()}),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver("arrangedContent",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)}),_arrangedContentDidChange:Ember.observer("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)}),_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 Ember.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 Ember.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){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");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,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,s){var a=r._objects;a||(a=r._objects={});for(var u,c;--s>=i;){var h=e.objectAt(s);h&&(Ember.removeBeforeObserver(h,t,r,"contentKeyWillChange"),Ember.removeObserver(h,t,r,"contentKeyDidChange"),c=n(h),u=a[c],u[o.call(u,s)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.ArrayPolyfills.indexOf,s=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 s(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=this._keys;o=i>0?r+i:-1,Ember.changeProperties(function(){for(var n in s)s.hasOwnProperty(n)&&(o>0&&e(t,n,this,r,o),Ember.propertyDidChange(this,n));Ember.propertyDidChange(this._content,"@each")},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&&--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,t=(Ember.set,Ember.EnumerableUtils._replace),r=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(r,n,i){if(this.isFrozen)throw Ember.FROZEN_ERROR;var o=i?e(i,"length"):0;return this.arrayContentWillChange(r,n,o),0===o?this.splice(r,n):t(this,r,n,i),this.arrayContentDidChange(r,n,o),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()}}),n=["length"];Ember.EnumerableUtils.forEach(r.keys(),function(e){Array.prototype[e]&&n.push(e)}),n.length>0&&(r=r.without.apply(r,n)),Ember.NativeArray=r,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){r.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 Ember.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 Ember.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 Ember.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 Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,s,a=r(i),u=this[a],c=e(this,"length"),h=0===u,l=u===c-1;return u>=0&&c>u&&this[u]===i&&(s=[i],this.enumerableContentWillChange(s,null),h&&Ember.propertyWillChange(this,"firstObject"),l&&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),h&&Ember.propertyDidChange(this,"firstObject"),l&&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,t=(Ember.get,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(){Ember.get;Ember.ControllerMixin=Ember.Mixin.create(Ember.ActionHandler,{isController:!0,target:null,container:null,parentController:null,store:null,model:Ember.computed.alias("content"),deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)}}),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,sortFunction:Ember.compare,orderBy:function(r,n){var i=0,o=e(this,"sortProperties"),s=e(this,"sortAscending"),a=e(this,"sortFunction");return t(o,function(t){0===i&&(i=a(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("content",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()}),sortAscendingWillChange:Ember.beforeObserver("sortAscending",function(){this._lastSortAscending=e(this,"sortAscending")}),sortAscendingDidChange:Ember.observer("sortAscending",function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}}),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._super(),this.set("_subControllers",Ember.A())},content:Ember.computed(function(){return Ember.A()}),controllerAt:function(t,r,n){var i,o=e(this,"container"),s=e(this,"_subControllers"),a=s[t];if(a)return a;if(i="controller:"+n,!o.has(i))throw new Ember.Error('Could not resolve itemController: "'+n+'"');return a=o.lookupFactory(i).create({target:this,parentController:e(this,"parentController")||this,content:r}),s[t]=a,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)}()}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||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.");
|
16
|
+
!function(){var e,t,r,n;!function(){var i={},o={};e=function(e,t,r){i[e]={deps:t,callback:r}},n=r=t=function(e){function r(t){if("."!==t.charAt(0))return t;for(var r=t.split("/"),n=e.split("/").slice(0,-1),i=0,o=r.length;o>i;i++){var s=r[i];if(".."===s)n.pop();else{if("."===s)continue;n.push(s)}}return n.join("/")}if(n._eak_seen=i,o[e])return o[e];if(o[e]={},!i[e])throw new Error("Could not find module "+e);for(var s,a=i[e],u=a.deps,c=a.callback,h=[],l=0,f=u.length;f>l;l++)"exports"===u[l]?h.push(s={}):h.push(t(r(u[l])));var m=c.apply(this,h);return o[e]=s||m}}(),function(){"undefined"==typeof Ember&&(Ember={});{var e=(Ember.imports=Ember.imports||this,Ember.exports=Ember.exports||this);Ember.lookup=Ember.lookup||this}e.Em=e.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.3.0-beta.3","undefined"==typeof ENV&&(e.ENV={}),"undefined"==typeof ENV.DISABLE_RANGE_API&&(ENV.DISABLE_RANGE_API=!0),Ember.ENV=Ember.ENV||ENV,Ember.config=Ember.config||{},Ember.FEATURES=Ember.ENV.FEATURES||{},Ember.FEATURES.isEnabled=function(e){var t=Ember.FEATURES[e];return Ember.ENV.ENABLE_ALL_FEATURES?!0:t===!0||t===!1||void 0===t?t:Ember.ENV.ENABLE_OPTIONAL_FEATURES?!0:!1},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.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)||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&&2!==Ember.create({a:1},{a:{value:2}}).a&&(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&&"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(){var e=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var t=Error.apply(this,arguments);Error.captureStackTrace&&Error.captureStackTrace(this,Ember.Error);for(var r=0;r<e.length;r++)this[e[r]]=t[e[r]]},Ember.Error.prototype=Ember.create(Error.prototype),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)}}}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}Ember.GUID_PREFIX="ember";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.GUID_PREFIX);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 h={writable:!0,configurable:!1,enumerable:!1,value:null},l=Ember.GUID_KEY+"_meta";Ember.META_KEY=l;var f={descs:{},watching:{}};u&&(f.values={}),Ember.EMPTY_META=f,Object.freeze&&Object.freeze(f);var m=Ember.platform.defineProperty.isSimulated;m&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){}),Ember.meta=function(t,i){var o=t[l];return i===!1?o||f:(o?o.source!==t&&(m||r(t,l,h),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[l]=o):(m||r(t,l,h),o=new e(t),u&&(o.values={}),t[l]=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_listens__=e.__ember_listens__,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(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 b={},d="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(d,function(e){b["[object "+e+"]"]=e.toLowerCase()});var E=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):b[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,b=f.length;b>p;p++)m=f[p],d[p]=m.before(e,n(),i);return o.call(s)}function u(e){i=i||{},i.exception=e}function c(){for(p=0,b=f.length;b>p;p++)m=f[p],m.after(e,n(),i,d[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(h)}var h,l,f=t[e];if(Ember.STRUCTURED_PROFILE&&(h=e+": "+i.object,console.time(h)),f||(f=r(e)),0===f.length)return l=o.call(s),Ember.STRUCTURED_PROFILE&&console.timeEnd(h),l;var m,p,b,d=[];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;e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf,n=Array.prototype.splice;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){for(var o,s,a=[].concat(i),u=[],c=6e4,h=t,l=r;a.length;)s=l>c?c:l,0>=s&&(s=0),o=a.splice(0,c),o=[h,s].concat(o),h+=c,l-=s,u=u.concat(n.apply(e,o));return u},replace:function(e,t,r,n){return e.replace?e.replace(t,r,n):i._replace(e,t,r,n)},intersection:function(e,t){var r=[];return i.forEach(e,function(e){i.indexOf(t,e)>=0&&r.push(e)}),r}}}(),function(){var e,t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=/^([A-Z$]|([0-9][A-Z$])).*[\.\*]/,i=/^this[\.\*]/,o=/^([^\.\*]+)/;e=function(e,n){if(""===n)return e;if(n||"string"!=typeof e||(n=e,e=null),null===e||-1!==n.indexOf("."))return a(e,n);var i,o=e[t],s=o&&o.descs[n];return s?s.get(e,n):(i=r&&o&&o.watching[n]>0?o.values[n]:e[n],void 0!==i||"object"!=typeof e||n in e||"function"!=typeof e.unknownProperty?i:e.unknownProperty(n))},Ember.config.overrideAccessors&&(Ember.get=e,Ember.config.overrideAccessors(),e=Ember.get);var s=Ember.normalizeTuple=function(t,r){var s,a=i.test(r),u=!a&&n.test(r);if((!t||u)&&(t=Ember.lookup),a&&(r=r.slice(5)),t===Ember.lookup&&(s=r.match(o)[0],t=e(t,s),r=r.slice(s.length+1)),!r||0===r.length)throw new Ember.Error("Invalid Path");return[t,r]},a=Ember._getPath=function(t,r){var n,o,a,u,c;if(null===t&&-1===r.indexOf("."))return e(Ember.lookup,r);for(n=i.test(r),(!t||n)&&(a=s(t,r),t=a[0],r=a[1],a.length=0),o=r.split("."),c=o.length,u=0;null!=t&&c>u;u++)if(t=e(t,o[u],!0),t&&t.isDestroyed)return void 0;return t};Ember.getWithDefault=function(t,r,n){var i=e(t,r);return void 0===i?n:i},Ember.get=e}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i+=3)if(t===e[i]&&r===e[i+1]){n=i;break}return n}function t(e,t){var r,n=m(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=f(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-3;s>=0;s-=3){var a=o[s],u=o[s+1],c=o[s+2],h=e(n,a,u);-1===h&&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-3;a>=0;a-=3){var u=o[a],c=o[a+1],h=o[a+2],l=e(n,u,c);-1===l&&(n.push(u,c,h),s.push(u,c,h))}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,3),"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-3;c>=0;c-=3)s(u[c],u[c+1])}}function s(r,n,i,o,s){function a(){return s.call(i)}function u(){-1!==h&&(c[h+2]&=~E)}o||"function"!=typeof i||(o=i,i=null);var c=t(r,n),h=e(c,i,o);return-1!==h&&(c[h+2]|=E),Ember.tryFinally(a,u)}function a(r,n,i,o,s){function a(){return s.call(i)}function u(){for(var e=0,t=m.length;t>e;e++){var r=m[e];p[e][r+2]&=~E}}o||"function"!=typeof i||(o=i,i=null);var c,h,l,f,m=[],p=[];for(l=0,f=n.length;f>l;l++){c=n[l],h=t(r,c);var b=e(h,i,o);-1!==b&&(h[b+2]|=E,m.push(b),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-3;s>=0;s-=3){var a=n[s],u=n[s+1],c=n[s+2];u&&(c&E||(c&d&&o(e,t,a,u),a||(a=e),"string"==typeof u&&(u=a[u]),r?u.apply(a,r):u.call(a)))}return!0}}function h(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function l(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+=3){var a=i[o],u=i[o+1];r.push([a,u])}return r}var f=Ember.create,m=Ember.meta,p=Ember.META_KEY,b=[].slice,d=1,E=2;Ember.on=function(){var e=b.call(arguments,-1)[0],t=b.call(arguments,0,-1);return e.__ember_listens__=t,e},Ember.addListener=i,Ember.removeListener=o,Ember._suspendListener=s,Ember._suspendListeners=a,Ember.sendEvent=c,Ember.hasListeners=h,Ember.watchedEvents=u,Ember.listenersFor=l,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){var n=l(e,!1),i=n.watching[t]>0||"length"===t,s=n.proto,a=n.descs[t];i&&s!==e&&(a&&a.willChange&&a.willChange(e,t),r(e,t,n),o(e,t,n),c(e,t))}function t(e,t){var r=l(e,!1),i=r.watching[t]>0||"length"===t,o=r.proto,a=r.descs[t];o!==e&&(a&&a.didChange&&a.didChange(e,t),(i||"length"===t)&&(n(e,t,r),s(e,t,r,!1),h(e,t)))}function r(t,r,n){if(!t.isDestroying){var o=_,s=!o;s&&(o=_={}),i(e,t,r,o,n),s&&(_=null)}}function n(e,r,n){if(!e.isDestroying){var o=O,s=!o;s&&(o=O={}),i(t,e,r,o,n),s&&(O=null)}}function i(e,t,r,n,i){var o=f(t);if(n[o]||(n[o]={}),!n[o][r]){n[o][r]=!0;var s=i.deps;if(s=s&&s[r])for(var a in s){var u=i.descs[a];u&&u._suspended===t||e(t,a)}}}function o(t,r,n){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var i,o,s=n.chainWatchers[r],a=[];for(i=0,o=s.length;o>i;i++)s[i].willChange(a);for(i=0,o=a.length;o>i;i+=2)e(a[i],a[i+1])}}function s(e,r,n,i){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var o,s,a=n.chainWatchers[r],u=i?null:[];for(o=0,s=a.length;s>o;o++)a[o].didChange(u);if(!i)for(o=0,s=u.length;s>o;o+=2)t(u[o],u[o+1])}}function a(){g++}function u(){g--,0>=g&&(y.clear(),v.flush())}function c(e,t){if(!e.isDestroying){var r,n,i=t+":before";g?(r=y.add(e,t,i),n=d(e,i,r),p(e,i,[e,t],n)):p(e,i,[e,t])}}function h(e,t){if(!e.isDestroying){var r,n=t+":change";g?(r=v.add(e,t,n),b(e,n,r)):p(e,n,[e,t])}}var l=Ember.meta,f=Ember.guidFor,m=Ember.tryFinally,p=Ember.sendEvent,b=Ember.listenersUnion,d=Ember.listenersDiff,E=Ember._ObserverSet,y=new E,v=new E,g=0;Ember.propertyWillChange=e,Ember.propertyDidChange=t;var _,O;Ember.overrideChains=function(e,t,r){s(e,t,r,!0)},Ember.beginPropertyChanges=a,Ember.endPropertyChanges=u,Ember.changeProperties=function(e,t){a(),m(e,u,t)}}(),function(){function e(e,t,r,o){var s;if(s=t.slice(t.lastIndexOf(".")+1),t=t===s?s:t.slice(0,t.length-(s.length+1)),"this"!==t&&(e=n(e,t)),!s||0===s.length)throw new Ember.Error("Property set failed: You passed an empty path");if(!e){if(o)return;throw new Ember.Error('Property set failed: 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||-1!==i.indexOf("."))return e(n,i,o,s);var a,u,c=n[t],h=c&&c.descs[i];return h?h.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.trySet=function(e,t,r){return i(e,t,r,!0)}}(),function(){var e=Ember.set,t=Ember.guidFor,r=Ember.ArrayPolyfills.indexOf,n=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},i=function(e,t){var r=e.keys.copy(),i=n(e.values);return t.keys=r,t.values=i,t.length=e.length,t},o=Ember.OrderedSet=function(){this.clear()};o.create=function(){return new o},o.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(e){var r=t(e),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(e))},remove:function(e){var n=t(e),i=this.presenceSet,o=this.list;delete i[n];var s=r.call(o,e);s>-1&&o.splice(s,1)},isEmpty:function(){return 0===this.list.length},has:function(e){var r=t(e),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 o;return e.presenceSet=n(this.presenceSet),e.list=this.toArray(),e}};var s=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};s.create=function(){return new s},s.prototype={length:0,get:function(e){var r=this.values,n=t(e);return r[n]},set:function(r,n){var i=this.keys,o=this.values,s=t(r);i.add(r),o[s]=n,e(this,"length",i.list.length)},remove:function(r){var n=this.keys,i=this.values,o=t(r);return i.hasOwnProperty(o)?(n.remove(r),delete i[o],e(this,"length",n.list.length),!0):!1},has:function(e){var r=this.values,n=t(e);return r.hasOwnProperty(n)},forEach:function(e,r){var n=this.keys,i=this.values;n.forEach(function(n){var o=t(n);e.call(r,n,i[o])})},copy:function(){return i(this,new s)}};var a=Ember.MapWithDefault=function(e){s.call(this),this.defaultValue=e.defaultValue};a.create=function(e){return e?new a(e):new s},a.prototype=Ember.create(s.prototype),a.prototype.get=function(e){var t=this.has(e);if(t)return s.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},a.prototype.copy=function(){return i(this,new a({defaultValue:this.defaultValue}))}}(),function(){function e(e){var t,r;Ember.imports.console?t=Ember.imports.console:"undefined"!=typeof console&&(t=console);var n="object"==typeof t?t[e]:null;return n?n.apply?(r=function(){n.apply(t,arguments)},r.displayName="console."+e,r):function(){var e=Array.prototype.join.call(arguments,", ");n(e)}:void 0}function t(e,t){if(!e)try{throw new Ember.Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},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,assert:e("assert")||t}}(),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 h,l,f,m;return c||(c=t(e)),h=c.descs,l=c.descs[s],f=c.watching[s]>0,l instanceof Ember.Descriptor&&l.teardown(e,s),a instanceof Ember.Descriptor?(m=a,h[s]=a,n&&f?r(e,s,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[s]=void 0):(h[s]=void 0,null==a?(m=u,n&&f?(c.values[s]=u,r(e,s,{configurable:!0,enumerable:!0,set:i,get:o(s)})):e[s]=u):(m=a,r(e,s,a))),f&&Ember.overrideChains(e,s,c),e.didDefineProperty&&e.didDefineProperty(e,s,m),this}}(),function(){var e=Ember.get;Ember.getProperties=function(t){var r={},n=arguments,i=1;2===arguments.length&&"array"===Ember.typeOf(arguments[1])&&(i=0,n=arguments[1]);for(var o=n.length;o>i;i++)r[n[i]]=e(t,n[i]);return r}}(),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 s=e(i),a=s.watching;a[o]?a[o]=(a[o]||0)+1:(a[o]=1,"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=e(t),s=o.watching;1===s[i]?(s[i]=0,"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&(n(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o.values[i]}),delete o.values[i])):s[i]>1&&s[i]--}}(),function(){function e(e){return e.match(h)[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,t){if(!e)return void 0;var r=n(e,!1);if(r.proto===e)return void 0;if("@each"===t)return i(e,t);var o=r.descs[t];return o&&o._cacheable?t in r.cache?r.cache[t]:void 0:i(e,t)}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,s=Ember.ArrayPolyfills.forEach,a=Ember.warn,u=Ember.watchKey,c=Ember.unwatchKey,h=/^([^\.\*]+)/,l=[];Ember.flushPendingChains=function(){if(0!==l.length){var e=l;l=[],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",0===l.length)}};var f=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)}}},m=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()},p=m.prototype;p.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=r(e,this._key)}return this._value},p.destroy=function(){if(this._watching){var e=this._object;e&&f(e,this._key,this),this._watching=!1}},p.copy=function(e){var t,r=new m(null,null,e),n=this._paths;for(t in n)n[t]<=0||r.add(t);return r},p.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 l.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)},p.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)},p.count=0,p.chain=function(t,r,n){var i,o=this._chains;o||(o=this._chains={}),i=o[t],i||(i=o[t]=new m(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},p.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())},p.willChange=function(e){var t=this._chains;if(t)for(var r in t)t.hasOwnProperty(r)&&t[r].willChange(e);this._parent&&this._parent.chainWillChange(this,this._key,1,e)},p.chainWillChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainWillChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},p.chainDidChange=function(e,t,r,n){this._key&&(t=this._key+"."+t),this._parent?this._parent.chainDidChange(this,t,r+1,n):(r>1&&n.push(this.value(),t),t="this."+t,this._paths[t]>0&&n.push(this.value(),t))},p.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(f(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);null!==e&&this._parent&&this._parent.chainDidChange(this,this._key,1,e)},Ember.finishChains=function(e){var t=n(e,!1),r=t.chains;r&&(r.value()!==e&&(t.chains=r=r.copy(e)),r.didChange(null))}}(),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),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;1===o[n]?(o[n]=0,e(r).remove(n)):o[n]>1&&o[n]--}}(),function(){function e(e){return"*"===e||!l.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,h=Ember.generateGuid,l=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"array"!==c(t))&&(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||"array"!==c(t))&&(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)&&h(e),i&&i.value()!==e&&(n.chains=i.copy(e))};var f=[];Ember.destroy=function(e){var t,r,o,s,a=e[n];if(a&&(e[n]=null,t=a.chains))for(f.push(t);f.length>0;){if(t=f.pop(),r=t._chains)for(o in r)r.hasOwnProperty(o)&&f.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,h,l=r._dependentKeys;if(l)for(s=t(o),a=0,u=l.length;u>a;a++)c=l[a],h=e(s,c),h[i]=(h[i]||0)+1,p(n,c)}function n(r,n,i,o){var s,a,u,c,h,l=r._dependentKeys;if(l)for(s=t(o),a=0,u=l.length;u>a;a++)c=l[a],h=e(s,c),h[i]=(h[i]||0)-1,b(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){for(var t=0,r=e.length;r>t;t++)e[t].didChange(null)}function s(e,t){for(var r={},n=0;n<t.length;n++)r[t[n]]=c(e,t[n]);return r}function a(e,t){Ember.computed[e]=function(e){var r=f.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function u(e,t){Ember.computed[e]=function(){var e=f.call(arguments),r=Ember.computed(function(){return t.apply(this,[s(this,e)])});return r.property.apply(r,e)}}var c=Ember.get,h=Ember.set,l=Ember.meta,f=[].slice,m=Ember.create,p=(Ember.META_KEY,Ember.watch),b=Ember.unwatch;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var d=i.prototype;d.cacheable=function(e){return this._cacheable=e!==!1,this},d.volatile=function(){return this.cacheable(!1)},d.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},d.property=function(){var e;return e=f.call(arguments),this._dependentKeys=e,this},d.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},d.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=l(e);t in r.cache&&(delete r.cache[t],n(this,e,t,r))}},d.get=function(e,t){var n,i,s,a;if(this._cacheable){if(s=l(e),i=s.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),a=s.chainWatchers&&s.chainWatchers[t],a&&o(a),r(this,e,t,s)}else n=this.func.call(e,t);return n},d.set=function(e,t,n){var i,o,s,a=this._cacheable,u=this.func,c=l(e,a),h=c.watching[t],f=this._suspended,m=!1,p=c.cache;if(this._readOnly)throw new Ember.Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(a&&p.hasOwnProperty(t)&&(o=p[t],m=!0),i=u.wrappedFunction?u.wrappedFunction.length:u.length,3===i)s=u.call(e,t,n,o);else{if(2!==i)return Ember.defineProperty(e,t,null,o),Ember.set(e,t,n),void 0;s=u.call(e,t,n)}if(m&&o===s)return;h&&Ember.propertyWillChange(e,t),m&&delete p[t],a&&(m||r(this,e,t,c),p[t]=s),h&&Ember.propertyDidChange(e,t)}finally{this._suspended=f}return s},d.teardown=function(e,t){var r=l(e);return 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=f.call(arguments,0,-1),e=f.call(arguments,-1)[0]),"function"!=typeof e)throw new Ember.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(c(this,e))}),a("notEmpty",function(e){return!Ember.isEmpty(c(this,e))}),a("none",function(e){return Ember.isNone(c(this,e))}),a("not",function(e){return!c(this,e)}),a("bool",function(e){return!!c(this,e)}),a("match",function(e,t){var r=c(this,e);return"string"==typeof r?t.test(r):!1}),a("equal",function(e,t){return c(this,e)===t}),a("gt",function(e,t){return c(this,e)>t}),a("gte",function(e,t){return c(this,e)>=t}),a("lt",function(e,t){return c(this,e)<t}),a("lte",function(e,t){return c(this,e)<=t}),u("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),u("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),u("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),u("collect",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?(h(this,e,r),r):c(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return c(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:c(this,e):null!=r?r:c(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))
|
17
|
+
},Ember.removeBeforeObserver=function(e,r,n,i){return Ember.unwatch(e,r),Ember.removeListener(e,t(r),n,i),this}}(),function(){e("backburner/queue",["exports"],function(e){"use strict";function t(e,t,r){this.daq=e,this.name=t,this.options=r,this._queue=[]}t.prototype={daq:null,name:null,options:null,_queue:null,push:function(e,t,r,n){var i=this._queue;return i.push(e,t,r,n),{queue:this,target:e,method:t}},pushUnique:function(e,t,r,n){var i,o,s,a,u=this._queue;for(s=0,a=u.length;a>s;s+=4)if(i=u[s],o=u[s+1],i===e&&o===t)return u[s+2]=r,u[s+3]=n,{queue:this,target:e,method:t};return this._queue.push(e,t,r,n),{queue:this,target:e,method:t}},flush:function(){var e,t,r,n,i,o=this._queue,s=this.options,a=s&&s.before,u=s&&s.after,c=o.length;for(c&&a&&a(),i=0;c>i;i+=4)e=o[i],t=o[i+1],r=o[i+2],n=o[i+3],r&&r.length>0?t.apply(e,r):t.call(e);c&&u&&u(),o.length>c?(this._queue=o.slice(c),this.flush()):this._queue.length=0},cancel:function(e){var t,r,n,i,o=this._queue;for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o.splice(n,4),!0;if(o=this._queueBeingFlushed)for(n=0,i=o.length;i>n;n+=4)if(t=o[n],r=o[n+1],t===e.target&&r===e.method)return o[n+1]=null,!0}},e.Queue=t}),e("backburner/deferred_action_queues",["backburner/queue","exports"],function(e,t){"use strict";function r(e,t){var r=this.queues={};this.queueNames=e=e||[];for(var n,o=0,s=e.length;s>o;o++)n=e[o],r[n]=new i(this,n,t[n])}function n(e,t){for(var r,n,i=0,o=t;o>=i;i++)if(r=e.queueNames[i],n=e.queues[r],n._queue.length)return i;return-1}var i=e.Queue;r.prototype={queueNames:null,queues:null,schedule:function(e,t,r,n,i,o){var s=this.queues,a=s[e];if(!a)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?a.pushUnique(t,r,n,o):a.push(t,r,n,o)},flush:function(){for(var e,t,r,i,o=this.queues,s=this.queueNames,a=0,u=s.length;u>a;){e=s[a],t=o[e],r=t._queueBeingFlushed=t._queue.slice(),t._queue=[];var c,h,l,f,m=t.options,p=m&&m.before,b=m&&m.after,d=0,E=r.length;for(E&&p&&p();E>d;)c=r[d],h=r[d+1],l=r[d+2],f=r[d+3],"string"==typeof h&&(h=c[h]),h&&(l&&l.length>0?h.apply(c,l):h.call(c)),d+=4;t._queueBeingFlushed=null,E&&b&&b(),-1===(i=n(this,a))?a++:a=i}}},t.DeferredActionQueues=r}),e("backburner",["backburner/deferred_action_queues","exports"],function(e,t){"use strict";function r(e){return"number"==typeof e||v.test(e)}function n(e,t){this.queueNames=e,this.options=t||{},this.options.defaultQueue||(this.options.defaultQueue=e[0]),this.instanceStack=[]}function i(e){e.begin(),c=y.setTimeout(function(){c=null,e.end()})}function o(e,t,r){(!h||l>t)&&(h&&clearTimeout(h),h=y.setTimeout(function(){h=null,l=null,s(e)},r),l=t)}function s(e){var t,r,n,i,s=+new Date;e.run(function(){for(n=0,i=E.length;i>n&&(t=E[n],!(t>s));n+=2);for(r=E.splice(0,n),n=1,i=r.length;i>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),E.length&&o(e,E[0],E[0]-s)}function a(e,t){for(var r,n=-1,i=0,o=d.length;o>i;i++)if(r=d[i],r[0]===e&&r[1]===t){n=i;break}return n}function u(e,t){for(var r,n=-1,i=0,o=b.length;o>i;i++)if(r=b[i],r[0]===e&&r[1]===t){n=i;break}return n}var c,h,l,f=e.DeferredActionQueues,m=[].slice,p=[].pop,b=[],d=[],E=[],y=this,v=/\d+/;n.prototype={queueNames:null,options:null,currentInstance:null,instanceStack:null,begin:function(){var e=this.options&&this.options.onBegin,t=this.currentInstance;t&&this.instanceStack.push(t),this.currentInstance=new f(this.queueNames,this.options),e&&e(this.currentInstance,t)},end:function(){var e=this.options&&this.options.onEnd,t=this.currentInstance,r=null;try{t.flush()}finally{this.currentInstance=null,this.instanceStack.length&&(r=this.instanceStack.pop(),this.currentInstance=r),e&&e(t,r)}},run:function(e,t){var r;this.begin(),t||(t=e,e=null),"string"==typeof t&&(t=e[t]);var n=!1;try{r=arguments.length>2?t.apply(e,m.call(arguments,2)):t.call(e)}finally{n||(n=!0,this.end())}return r},defer:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?m.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!1,n)},deferOnce:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var n=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?m.call(arguments,3):void 0;return this.currentInstance||i(this),this.currentInstance.schedule(e,t,r,o,!0,n)},setTimeout:function(){function e(){t.apply(i,c)}var t,n,i,s,a,u,c=m.call(arguments),h=c.length,l=this;if(0!==h){if(1===h)t=c.shift(),n=0;else if(2===h)s=c[0],a=c[1],"function"==typeof a||"function"==typeof s[a]?(i=c.shift(),t=c.shift(),n=0):r(a)?(t=c.shift(),n=c.shift()):(t=c.shift(),n=0);else{var f=c[c.length-1];r(f)&&(n=c.pop()),s=c[0],u=c[1],"function"==typeof u||"string"==typeof u&&null!==s&&u in s?(i=c.shift(),t=c.shift()):t=c.shift()}var p=+new Date+parseInt(n,10);"string"==typeof t&&(t=i[t]);var b,d;for(b=0,d=E.length;d>b&&!(p<E[b]);b+=2);return E.splice(b,0,p,e),o(l,p,n),e}},throttle:function(e,t){var r,n,i,o=this,s=arguments,a=parseInt(p.call(s),10);return n=u(e,t),n>-1?b[n]:(i=y.setTimeout(function(){o.run.apply(o,s);var r=u(e,t);r>-1&&b.splice(r,1)},a),r=[e,t,i],b.push(r),r)},debounce:function(e,t){var r,n,i,o,s=this,u=arguments,c=p.call(u);return"number"==typeof c||"string"==typeof c?(r=c,c=!1):r=p.call(u),r=parseInt(r,10),n=a(e,t),n>-1&&(i=d[n],d.splice(n,1),clearTimeout(i[2])),o=y.setTimeout(function(){c||s.run.apply(s,u);var r=a(e,t);r>-1&&d.splice(r,1)},r),c&&-1===n&&s.run.apply(s,u),i=[e,t,o],d.push(i),i},cancelTimers:function(){var e,t;for(e=0,t=b.length;t>e;e++)clearTimeout(b[e][2]);for(b=[],e=0,t=d.length;t>e;e++)clearTimeout(d[e][2]);d=[],h&&(clearTimeout(h),h=null),E=[],c&&(clearTimeout(c),c=null)},hasTimers:function(){return!!E.length||c},cancel:function(e){var t=typeof e;if(e&&"object"===t&&e.queue&&e.method)return e.queue.cancel(e);if("function"!==t)return"[object Array]"===window.toString.call(e)?this._cancelItem(u,b,e)||this._cancelItem(a,d,e):void 0;for(var r=0,n=E.length;n>r;r+=2)if(E[r+1]===e)return E.splice(r,2),!0},_cancelItem:function(e,t,r){var n,i;return r.length<3?!1:(i=e(r[0],r[1]),i>-1&&(n=t[i],n[2]===r[2])?(t.splice(i,1),clearTimeout(r[2]),!0):!1)}},n.prototype.schedule=n.prototype.defer,n.prototype.scheduleOnce=n.prototype.deferOnce,n.prototype.later=n.prototype.setTimeout,t.Backburner=n})}(),function(){function e(){!Ember.run.currentRunLoop}var r=function(e){Ember.run.currentRunLoop=e},n=function(e,t){Ember.run.currentRunLoop=t},i=t("backburner").Backburner,o=new i(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:r,onEnd:n}),s=[].slice;Ember.run=function(){var e;if(Ember.onerror)try{e=o.run.apply(o,arguments)}catch(t){Ember.onerror(t)}else e=o.run.apply(o,arguments);return e},Ember.run.join=function(){if(!Ember.run.currentRunLoop)return Ember.run.apply(Ember.run,arguments);var e=s.call(arguments);e.unshift("actions"),Ember.run.schedule.apply(Ember.run,e)},Ember.run.backburner=o;Ember.run;Ember.run.currentRunLoop=null,Ember.run.queues=o.queueNames,Ember.run.begin=function(){o.begin()},Ember.run.end=function(){o.end()},Ember.run.schedule=function(){e(),o.schedule.apply(o,arguments)},Ember.run.hasScheduledTimers=function(){return o.hasTimers()},Ember.run.cancelTimers=function(){o.cancelTimers()},Ember.run.sync=function(){o.currentInstance&&o.currentInstance.queues.sync.flush()},Ember.run.later=function(){return o.later.apply(o,arguments)},Ember.run.once=function(){e();var t=s.call(arguments);return t.unshift("actions"),o.scheduleOnce.apply(o,t)},Ember.run.scheduleOnce=function(){return e(),o.scheduleOnce.apply(o,arguments)},Ember.run.next=function(){var e=s.call(arguments);return e.push(1),o.later.apply(o,e)},Ember.run.cancel=function(e){return o.cancel(e)},Ember.run.debounce=function(){return o.debounce.apply(o,arguments)},Ember.run.throttle=function(){return o.throttle.apply(o,arguments)}}(),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=j(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=C.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=x(t),e[r]?T:(e[r]=t,t.properties)):t}function i(e,t,r,n){var i;return i=r[e]||n[e],t[e]&&(i=i?i.concat(t[e]):t[e]),i}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=j(r),r.func=Ember.wrap(r.func,o.func),r):r}function s(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 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){var o=i[t]||e[t];if(!o)return n;var a=Ember.merge({},o);for(var u in n)if(n.hasOwnProperty(u)){var c=n[u];a[u]=r(c)?s(e,u,c,o,{}):c}return a}function c(e,t,n,i,c,h,l,f){if(n instanceof Ember.Descriptor){if(n===_&&c[t])return T;n.func&&(n=o(i,t,n,h,c)),c[t]=n,h[t]=void 0}else l&&w.call(l,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?n=a(e,t,n,h):f&&w.call(f,t)>=0?n=u(e,t,n,h):r(n)&&(n=s(e,t,n,h,c)),c[t]=void 0,h[t]=n}function h(e,t,r,o,s,a){function u(e){delete r[e],delete o[e]}for(var l,f,m,p,b,d,E=0,y=e.length;y>E;E++)if(l=e[E],f=n(t,l),f!==T)if(f){d=Ember.meta(s),s.willMergeMixin&&s.willMergeMixin(f),p=i("concatenatedProperties",f,o,s),b=i("mergedProperties",f,o,s);for(m in f)f.hasOwnProperty(m)&&(a.push(m),c(s,m,f[m],d,r,o,p,b));f.hasOwnProperty("toString")&&(s.toString=f.toString)}else l.mixins&&(h(l.mixins,t,r,o,s,a),l._without&&A.call(l._without,u))}function l(e,t,r,n){if(D.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=j(n.bindings)):i=n.bindings={},i[t]=r}}function f(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 f(e,t||Ember.meta(e)),e}function p(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 b(e,t,r,n,i){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];"function"==typeof n&&(b(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),b(e,t,n,"__ember_observes__","removeObserver"),b(e,t,n,"__ember_listens__","removeListener")),"function"==typeof r&&(b(e,t,r,"__ember_observesBefore__","addBeforeObserver"),b(e,t,r,"__ember_observes__","addObserver"),b(e,t,r,"__ember_listens__","addListener"))}function E(t,r,n){var i,o,s,a={},u={},c=Ember.meta(t),f=[];h(r,e(t),a,u,t,f);for(var b=0,E=f.length;E>b;b++)if(i=f[b],"constructor"!==i&&u.hasOwnProperty(i)&&(s=a[i],o=u[i],s!==_)){for(;s&&s instanceof O;){var y=p(t,s,c,a,u);s=y.desc,o=y.value}(void 0!==s||void 0!==o)&&(d(t,i,o),l(t,i,o,c),S(t,i,s,o,c))}return n||m(t,c),t}function y(e,t,r){var n=x(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(y(i[o],t,r))return!0;return!1}function v(e,t,r){if(!r[x(t)])if(r[x(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&A.call(t.mixins,function(t){v(e,t,r)})}var g,_,O,C=Ember.ArrayPolyfills.map,w=Ember.ArrayPolyfills.indexOf,A=Ember.ArrayPolyfills.forEach,P=[].slice,j=Ember.create,S=Ember.defineProperty,x=Ember.guidFor,T={},D=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=P.call(arguments,1);return E(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},g=Ember.Mixin,g.prototype={properties:null,mixins:null,ownerConstructor:null},g._apply=E,g.applyPartial=function(e){var t=P.call(arguments,1);return E(e,t,!0)},g.finishPartial=m,Ember.anyUnprocessedMixins=!1,g.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var I=g.prototype;I.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},I.apply=function(e){return E(e,[this],!1)},I.applyPartial=function(e){return E(e,[this],!0)},I.detect=function(e){if(!e)return!1;if(e instanceof g)return y(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[x(this)]:!1},I.without=function(){var e=new g(this);return e._without=P.call(arguments),e},I.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},_=new Ember.Descriptor,_.toString=function(){return"(Required Property)"},Ember.required=function(){return _},O=function(e){this.methodName=e},O.prototype=new Ember.Descriptor,Ember.alias=function(e){return new O(e)},Ember.aliasMethod=function(e){return new O(e)},Ember.observer=function(){var e,t=P.call(arguments,-1)[0];if(e=P.call(arguments,0,-1),"function"!=typeof t&&(t=arguments[0],e=P.call(arguments,1)),"function"!=typeof t)throw new Ember.Error("Ember.observer called without a function");return t.__ember_observes__=e,t},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(){var e,t=P.call(arguments,-1)[0];if(e=P.call(arguments,0,-1),"function"!=typeof t&&(t=arguments[0],e=P.call(arguments,1)),"function"!=typeof t)throw new Ember.Error("Ember.beforeObserver called without a function");return t.__ember_observesBefore__=e,t}}(),function(){var e=Ember.EnumerableUtils.forEach,t=Ember.EnumerableUtils.indexOf;Ember.libraries=function(){var r=[],n=0,i=function(e){for(var t=0;t<r.length;t++)if(r[t].name===e)return r[t]};return r.register=function(e,t){i(e)||r.push({name:e,version:t})},r.registerCoreLibrary=function(e,t){i(e)||r.splice(n++,0,{name:e,version:t})},r.deRegister=function(e){var n=i(e);n&&r.splice(t(r,n),1)},r.each=function(t){e(r,function(e){t(e.name,e.version)})},r}(),Ember.libraries.registerCoreLibrary("Ember",Ember.VERSION)}(),function(){e("rsvp/all",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e,t){if(!o(e))throw new TypeError("You must pass an array to all.");return new i(function(t,r){function n(e){return function(t){i(e,t)}}function i(e,r){a[e]=r,0===--u&&t(a)}var o,a=[],u=e.length;0===u&&t([]);for(var c=0;c<e.length;c++)o=e[c],o&&s(o.then)?o.then(n(c),r,"RSVP: RSVP#all"):i(c,o)},t)}var i=e.Promise,o=t.isArray,s=t.isFunction;r.all=n}),e("rsvp/cast",["exports"],function(e){"use strict";function t(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=this;return new t(function(t){t(e)})}e.cast=t}),e("rsvp/config",["./events","exports"],function(e,t){"use strict";function r(e,t){return"onerror"===e?(i.on("error",t),void 0):2!==arguments.length?i[e]:(i[e]=t,void 0)}var n=e.EventTarget,i={instrument:!1};n.mixin(i),t.config=i,t.configure=r}),e("rsvp/defer",["./promise","exports"],function(e,t){"use strict";function r(e){var t={resolve:void 0,reject:void 0,promise:void 0};return t.promise=new n(function(e,r){t.resolve=e,t.reject=r},e),t}var n=e.Promise;t.defer=r}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1},r=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},n={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,n){var i,o=r(this);i=o[e],i||(i=o[e]=[]),-1===t(i,n)&&i.push(n)},off:function(e,n){var i,o,s=r(this);return n?(i=s[e],o=t(i,n),-1!==o&&i.splice(o,1),void 0):(s[e]=[],void 0)},trigger:function(e,t){var n,i,o=r(this);if(n=o[e])for(var s=0;s<n.length;s++)i=n[s],i(t)}};e.EventTarget=n}),e("rsvp/hash",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e){var t={},r=s(e),n=r.length;return new i(function(i,s){var a,u;if(0===n)return i({}),void 0;for(var c=function(e){return function(t){h(e,t)}},h=function(e,r){t[e]=r,0===--n&&i(t)},l=0,f=r.length;f>l;l++)u=r[l],a=e[u],a&&o(a.then)?a.then(c(u),s,"RSVP: RSVP#hash"):h(u,a)})}var i=e.Promise,o=t.isFunction,s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};r.hash=n}),e("rsvp/instrument",["./config","./utils","exports"],function(e,t,r){"use strict";function n(e,t,r){try{i.trigger(e,{guid:t._guidKey+t._id,eventName:e,detail:t._detail,childGuid:r&&t._guidKey+r._id,label:t._label,timeStamp:o()})}catch(n){setTimeout(function(){throw n},0)}}var i=e.config,o=t.now;r.instrument=n}),e("rsvp/node",["./promise","./all","exports"],function(e,t,r){"use strict";function n(e,t){return function(r,n){r?t(r):arguments.length>2?e(a.call(arguments,1)):e(n)}}function i(e,t){return function(){var r=a.call(arguments),i=this||t;return new o(function(t,o){s(r).then(function(r){try{r.push(n(t,o)),e.apply(i,r)}catch(s){o(s)}})})}}var o=e.Promise,s=t.all,a=Array.prototype.slice;r.denodeify=i}),e("rsvp/promise",["./config","./events","./cast","./instrument","./utils","exports"],function(e,t,r,n,i,o){"use strict";function s(e,t){if(!_(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof s))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._id=w++,this._label=t,this._subscribers=[],E.instrument&&v("created",this),a(e,this)}function a(e,t){function r(e){f(t,e)}function n(e){p(t,e)}try{e(r,n)}catch(i){n(i)}}function u(e,t,r,n){var i,o,s,a,u=_(r);if(u)try{i=r(n),s=!0}catch(c){a=!0,o=c}else i=n,s=!0;l(t,i)||(u&&s?f(t,i):a?p(t,o):e===j?f(t,i):e===S&&p(t,i))}function c(e,t,r,n){var i=e._subscribers,o=i.length;i[o]=t,i[o+j]=r,i[o+S]=n}function h(e,t){var r,n,i=e._subscribers,o=e._detail;E.instrument&&v(t===j?"fulfilled":"rejected",e);for(var s=0;s<i.length;s+=3)r=i[s],n=i[s+t],u(t,r,n,o);e._subscribers=null}function l(e,t){var r,n=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(g(t)&&(n=t.then,_(n)))return n.call(t,function(n){return r?!0:(r=!0,t!==n?f(e,n):m(e,n),void 0)},function(t){return r?!0:(r=!0,p(e,t),void 0)},"Locked onto "+(e._label||" unknown promise")),!0}catch(i){return r?!0:(p(e,i),!0)}return!1}function f(e,t){e===t?m(e,t):l(e,t)||m(e,t)}function m(e,t){e._state===A&&(e._state=P,e._detail=t,E.async(b,e))}function p(e,t){e._state===A&&(e._state=P,e._detail=t,E.async(d,e))}function b(e){h(e,e._state=j)}function d(e){e._onerror&&e._onerror(e._detail),h(e,e._state=S)}var E=e.config,y=(t.EventTarget,r.cast),v=n.instrument,g=i.objectOrFunction,_=i.isFunction,O=i.now,C="rsvp_"+O()+"-",w=0,A=void 0,P=0,j=1,S=2;s.prototype={constructor:s,_id:void 0,_guidKey:C,_label:void 0,_state:void 0,_detail:void 0,_subscribers:void 0,_onerror:function(e){E.trigger("error",e)},then:function(e,t,r){var n=this;this._onerror=null;var i=new this.constructor(function(){},r);if(this._state){var o=arguments;E.async(function(){u(n._state,i,o[n._state-1],n._detail)})}else c(this,i,e,t);return E.instrument&&v("chained",n,i),i},"catch":function(e,t){return this.then(null,e,t)},"finally":function(e,t){var r=this.constructor;return this.then(function(t){return r.cast(e()).then(function(){return t})},function(t){return r.cast(e()).then(function(){throw t})},t)}},s.cast=y,o.Promise=s}),e("rsvp/race",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e,t){if(!o(e))throw new TypeError("You must pass an array to race.");return new i(function(t,r){for(var n,i=0;i<e.length;i++)n=e[i],n&&"function"==typeof n.then?n.then(t,r,"RSVP: RSVP#race"):t(n)},t)}var i=e.Promise,o=t.isArray;r.race=n}),e("rsvp/reject",["./promise","exports"],function(e,t){"use strict";function r(e,t){return new n(function(t,r){r(e)},t)}var n=e.Promise;t.reject=r}),e("rsvp/resolve",["./promise","exports"],function(e,t){"use strict";function r(e,t){return new n(function(t){t(e)},t)}var n=e.Promise;t.resolve=r}),e("rsvp/rethrow",["exports"],function(e){"use strict";function t(e){throw r.setTimeout(function(){throw e}),e}var r="undefined"==typeof global?this:global;e.rethrow=t}),e("rsvp/utils",["exports"],function(e){"use strict";function t(e){return r(e)||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function n(e){return"[object Array]"===Object.prototype.toString.call(e)}var i=Date.now||function(){return(new Date).getTime()};e.objectOrFunction=t,e.isFunction=r,e.isArray=n,e.now=i}),e("rsvp",["./rsvp/events","./rsvp/promise","./rsvp/node","./rsvp/all","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/resolve","./rsvp/reject","exports"],function(e,t,r,n,i,o,s,a,u,c,h,l){"use strict";function f(e,t){C.async(e,t)}function m(){C.on.apply(C,arguments)}function p(){C.off.apply(C,arguments)}var b=e.EventTarget,d=t.Promise,E=r.denodeify,y=n.all,v=i.race,g=o.hash,_=s.rethrow,O=a.defer,C=u.config,w=u.configure,A=c.resolve,P=h.reject;l.Promise=d,l.EventTarget=b,l.all=y,l.race=v,l.hash=g,l.rethrow=_,l.defer=O,l.denodeify=E,l.configure=w,l.on=m,l.off=p,l.resolve=A,l.reject=P,l.async=f})}(),function(){Ember.MODEL_FACTORY_INJECTIONS=!1||!!Ember.ENV.MODEL_FACTORY_INJECTIONS,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.factoryCache=new e(t&&t.cache),this.typeInjections=new e(t&&t.typeInjections),this.injections={},this.factoryTypeInjections=new e(t&&t.factoryTypeInjections),this.factoryInjections={},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++){if(n=t[o],i=e.lookup(n.fullName),void 0===i)throw new Error("Attempting to inject an unknown injection: `"+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 s(e,t){var r,n=e.normalize(t),i=e.resolve(n),o=e.factoryCache,s=t.split(":")[0];if(void 0!==i){if(o.has(t))return o.get(t);if(!i||"function"!=typeof i.extend||!Ember.MODEL_FACTORY_INJECTIONS&&"model"===s)return i;var c=a(e,t),h=u(e,t);return h._toString=e.makeToString(i,t),r=i.extend(c),r.reopenClass(h),o.set(t,r),r}}function a(e,t){var r=t.split(":"),n=r[0],o=[];return o=o.concat(e.typeInjections.get(n)||[]),o=o.concat(e.injections[t]||[]),o=i(e,o),o._debugContainerKey=t,o.container=e,o}function u(e,t){var r=t.split(":"),n=r[0],o=[];return o=o.concat(e.factoryTypeInjections.get(n)||[]),o=o.concat(e.factoryInjections[t]||[]),o=i(e,o),o._debugContainerKey=t,o}function c(e,t){var r=s(e,t);return o(e,t,"instantiate")===!1?r:r?"function"==typeof r.extend?r.create():r.create(a(e,t)):void 0}function h(e,t){e.cache.eachLocal(function(r,n){o(e,r,"instantiate")!==!1&&t(n)})}function l(e){e.cache.eachLocal(function(t,r){o(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}function f(e,t,r,n){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:r,fullName:n})}function m(e,t,r,n){var i=e[t]=e[t]||[];i.push({property:r,fullName:n})}return e.prototype={parent:null,dict:null,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},remove:function(e){delete this.dict[e]},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={parent:null,children:null,resolver:null,registry:null,cache:null,typeInjections:null,injections:null,_options:null,_typeOptions:null,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){if(-1===e.indexOf(":"))throw new TypeError("malformed fullName, expected: `type:name` got: "+e);if(void 0===t)throw new TypeError("Attempting to register an unknown factory: `"+e+"`");var n=this.normalize(e);if(this.cache.has(n))throw new Error("Cannot re-register: `"+e+"`, as it has already been looked up.");this.registry.set(n,t),this._options.set(n,r||{})},unregister:function(e){var t=this.normalize(e);this.registry.remove(t),this.cache.remove(t),this.factoryCache.remove(t),this._options.remove(t)},resolve:function(e){return this.resolver(e)||this.registry.get(e)},describe:function(e){return e},normalize:function(e){return e},makeToString:function(e){return e.toString()},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=c(this,e);return void 0!==r?(n(this,e)&&t.singleton!==!1&&this.cache.set(e,r),r):void 0},lookupFactory:function(e){return s(this,e)},has:function(e){return this.cache.has(e)?!0:!!this.resolve(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"),f(this.typeInjections,e,t,n)},injection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.typeInjection(e,t,n):(m(this.injections,e,t,n),void 0)},factoryTypeInjection:function(e,t,n){this.parent&&r("factoryTypeInjection"),f(this.factoryTypeInjections,e,t,n)},factoryInjection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.factoryTypeInjection(e,t,n):(m(this.factoryInjections,e,t,n),void 0)},destroy:function(){for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],h(this,function(e){e.destroy()}),this.parent=void 0,this.isDestroyed=!0},reset:function(){for(var e=0,t=this.children.length;t>e;e++)l(this.children[e]);l(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("array"===Ember.typeOf(r)){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;if(Ember.compare=function i(e,t){if(e===t)return 0;var r=Ember.typeOf(e),n=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===r&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===n&&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 h=s[r],l=s[n];if(l>h)return-1;if(h>l)return 1;switch(r){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var f=e.localeCompare(t);return 0>f?-1:f>0?1:0;case"array":for(var m=e.length,p=t.length,b=Math.min(m,p),d=0,E=0;0===d&&b>E;)d=i(e[E],t[E]),E++;return 0!==d?d:p>m?-1:m>p?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var y=e.getTime(),v=t.getTime();return v>y?-1:y>v?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){var t=Ember.typeOf(e);if("array"===t)return"["+e+"]";if("object"!==t)return e+"";var r,n=[];for(var i in e)if(e.hasOwnProperty(i)){if(r=e[i],"toString"===r)continue;"function"===Ember.typeOf(r)&&(r="function() { ... }"),n.push(i+": "+r)}return"{"+n.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.create.isSimulated){var r=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","valueOf","toLocaleString","toString"],n=function(e,r,n){"__"!==n.substring(0,2)&&"_super"!==n&&(t(r,n)>=0||e.hasOwnProperty(n)&&r.push(n))};Ember.keys=function(e){var t,i=[];for(t in e)n(e,i,t);for(var o=0,s=r.length;s>o;o++)t=r[o],n(e,i,t);return i}}}(),function(){var e=/[ _]/g,t={},r=/([a-z\d])([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,10)-1:r++,e=t[n],null===e?"(null)":void 0===e?"":Ember.inspect(e)})},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)
|
18
|
+
},String.prototype.underscore=function(){return s(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return a(this)})}(),function(){var e=Ember.get,t=Ember.set,r=Array.prototype.slice,n=Ember.getProperties;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){return n.apply(null,[this].concat(r.call(arguments)))},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")},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(){function e(){var e,t,o=!1,s=function(){o||s.proto(),n(this,i,v),n(this,"_super",v);var u=a(this),l=u.proto;if(u.proto=this,e){var f=e;e=null,this.reopen.apply(this,f)}if(t){var m=t;t=null;for(var p=this.concatenatedProperties,d=0,g=m.length;g>d;d++){var _=m[d];if("object"!=typeof _&&void 0!==_)throw new Ember.Error("Ember.Object.create only accepts objects.");if(_)for(var O=Ember.keys(_),C=0,w=O.length;w>C;C++){var A=O[C];if(_.hasOwnProperty(A)){var P=_[A],j=Ember.IS_BINDING;if(j.test(A)){var S=u.bindings;S?u.hasOwnProperty("bindings")||(S=u.bindings=r(u.bindings)):S=u.bindings={},S[A]=P}var x=u.descs[A];if(p&&y(p,A)>=0){var T=this[A];P=T?"function"==typeof T.concat?T.concat(P):Ember.makeArray(T).concat(P):Ember.makeArray(P)}x?x.set(this,A,P):"function"!=typeof this.setUnknownProperty||A in this?E?Ember.defineProperty(this,A,null,P):this[A]=P:this.setUnknownProperty(A,P)}}}}b(this,u),this.init.apply(this,arguments),u.proto=l,c(this),h(this,"init")};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,h=Ember.sendEvent,l=Ember.destroy,f=Ember.run.schedule,m=Ember.Mixin,p=m._apply,b=m.finishPartial,d=m.prototype.reopen,E=Ember.ENV.MANDATORY_SETTER,y=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 p(this,arguments,!0),this},init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,f("actions",this,this.willDestroy),f("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(l(this),this.isDestroyed=!0)},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 _=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),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),p(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)}});_.ownerConstructor=g,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(_),g.ClassMixin=_,_.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(h.call(r,a)){var u=r[a];if(t[s]=a,u&&u.toString===n)u.toString=o(t.join(".")),u[f]=t.join(".");else if(u&&u.isNamespace){if(i[l(u)])continue;i[l(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[f]=i)}}function r(e){var t=e.superclass;return t?t[f]?t[f]:r(t):void 0}function n(){Ember.BOOTED||this[f]||i();var e;if(this[f])e=this[f];else if(this._toString)e=this._toString;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,h={}.hasOwnProperty,l=Ember.guidFor,f=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),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,h=Ember.meta,l=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer("content",function(){}),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=h(this);if(i.proto===this)return l(this,e,null,t),t;var o=r(this,"content");return n(o,e,t)}})}(),function(){function e(){return 0===a.length?{}: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=2===arguments.length;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,s=Ember.EnumerableUtils.indexOf,a=[];Ember.Enumerable=Ember.Mixin.create({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(),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 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"),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.mapBy(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},mapBy:function(e){return this.map(function(t){return n(t,e)})},mapProperty:Ember.aliasMethod("mapBy"),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)})},filterBy:function(){return this.filter(r.apply(this,arguments))},filterProperty:Ember.aliasMethod("filterBy"),rejectBy: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)},rejectProperty:Ember.aliasMethod("rejectBy"),find:function(r,i){var o=n(this,"length");void 0===i&&(i=null);for(var s,a,u=null,c=!1,h=e(),l=0;o>l&&!c;l++)s=this.nextObject(l,u,h),(c=r.call(i,s,l,this))&&(a=s),u=s;return s=u=null,h=t(h),a},findBy:function(){return this.find(r.apply(this,arguments))},findProperty:Ember.aliasMethod("findBy"),every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyBy:Ember.aliasMethod("isEvery"),everyProperty:Ember.aliasMethod("isEvery"),isEvery:function(){return this.every(r.apply(this,arguments))},any:function(e,t){var r=this.find(function(r,n,i){return!!e.call(t,r,n,i)});return"undefined"!=typeof r},some:Ember.aliasMethod("any"),isAny:function(){return this.any(r.apply(this,arguments))},anyBy:Ember.aliasMethod("isAny"),someProperty:Ember.aliasMethod("isAny"),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||i-r!==0,-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||i-r!==0,-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},sortBy:function(){var e=arguments;return this.toArray().sort(function(t,r){for(var i=0;i<e.length;i++){var o=e[i],s=n(t,o),a=n(r,o),u=Ember.compare(s,a);if(u)return u}return 0})}})}(),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)===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"),h=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==h&&(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(){function e(e,t){return"@this"===t?e:f(e,t)}function t(e,t,r){this.callbacks=e,this.cp=t,this.instanceMeta=r,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.suspended=!1,this.changedItems={}}function r(e,t,r){this.dependentArray=e,this.index=t,this.item=e.objectAt(t),this.trackedArray=r,this.beforeObserver=null,this.observer=null,this.destroyed=!1}function n(e,t,r){return 0>e?Math.max(0,t+e):t>e?e:Math.min(t-r,e)}function i(e,t,r){return Math.min(r,t-e)}function o(e,t,r,n,i,o){var s={arrayChanged:e,index:r,item:t,propertyName:n,property:i};return o&&(s.previousValues=o),s}function s(e,t,r,n,i){w(e,function(s,a){i.setValue(t.addedItem.call(this,i.getValue(),s,o(e,s,a,n,r),i.sugarMeta))},this)}function a(e,t){{var r;e._callbacks()}e._hasInstanceMeta(this,t)?(r=e._instanceMeta(this,t),r.setValue(e.resetValue(r.getValue()))):r=e._instanceMeta(this,t),e.options.initialize&&e.options.initialize.call(this,r.getValue(),{property:e,propertyName:t},r.sugarMeta)}function u(t,r){if(j.test(r))return!1;var n=e(t,r);return Ember.Array.detect(n)}function c(e,t,r){this.context=e,this.propertyName=t,this.cache=p(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=r}function h(t){var r=this;this.options=t,this._instanceMetas={},this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,n,e)};var n=function(t){var n=(r._dependentKeys,r._instanceMeta(this,t)),i=r._callbacks();a.call(this,r,t),n.dependentArraysObserver.suspendArrayObservers(function(){w(r._dependentKeys,function(t){if(u(this,t)){var i=e(this,t),o=n.dependentArrays[t];i===o?r._previousItemPropertyKeys[t]&&(delete r._previousItemPropertyKeys[t],n.dependentArraysObserver.setupPropertyObservers(t,r._itemPropertyKeys[t])):(n.dependentArrays[t]=i,o&&n.dependentArraysObserver.teardownObservers(o,t),i&&n.dependentArraysObserver.setupObservers(i,t))}},this)},this),w(r._dependentKeys,function(o){if(u(this,o)){var a=e(this,o);a&&s.call(this,a,i,r,t,n)}},this)};this.func=function(e){return n.call(this,e),r._instanceMeta(this,e).getValue()}}function l(e){return e}var f=Ember.get,m=(Ember.set,Ember.guidFor),p=Ember.meta,b=Ember.propertyWillChange,d=Ember.propertyDidChange,E=Ember.addBeforeObserver,y=Ember.removeBeforeObserver,v=Ember.addObserver,g=Ember.removeObserver,_=Ember.ComputedProperty,O=[].slice,C=Ember.create,w=Ember.EnumerableUtils.forEach,A=/^(.*)\.@each\.(.*)/,P=/(.*\.@each){2,}/,j=/\.\[\]$/;t.prototype={setValue:function(e){this.instanceMeta.setValue(e,!0)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[m(e)]=t,e.addArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"}),this.cp._itemPropertyKeys[t]&&this.setupPropertyObservers(t,this.cp._itemPropertyKeys[t])},teardownObservers:function(e,t){var r=this.cp._itemPropertyKeys[t]||[];delete this.dependentKeysByGuid[m(e)],this.teardownPropertyObservers(t,r),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},suspendArrayObservers:function(e,t){var r=this.suspended;this.suspended=!0,e.call(t),this.suspended=r},setupPropertyObservers:function(t,r){var n=e(this.instanceMeta.context,t),i=e(n,"length"),o=new Array(i);this.resetTransformations(t,o),w(n,function(e,i){var s=this.createPropertyObserverContext(n,i,this.trackedArraysByGuid[t]);o[i]=s,w(r,function(t){E(e,t,this,s.beforeObserver),v(e,t,this,s.observer)},this)},this)},teardownPropertyObservers:function(e,t){var r,n,i,o=this,s=this.trackedArraysByGuid[e];s&&s.apply(function(e,s,a){a!==Ember.TrackedArray.DELETE&&w(e,function(e){e.destroyed=!0,r=e.beforeObserver,n=e.observer,i=e.item,w(t,function(e){y(i,e,o,r),g(i,e,o,n)})})})},createPropertyObserverContext:function(e,t,n){var i=new r(e,t,n);return this.createPropertyObserver(i),i},createPropertyObserver:function(e){var t=this;e.beforeObserver=function(r,n){return t.itemPropertyWillChange(r,n,e.dependentArray,e)},e.observer=function(r,n){return t.itemPropertyDidChange(r,n,e.dependentArray,e)}},resetTransformations:function(e,t){this.trackedArraysByGuid[e]=new Ember.TrackedArray(t)},trackAdd:function(e,t,r){var n=this.trackedArraysByGuid[e];n&&n.addItems(t,r)},trackRemove:function(e,t,r){var n=this.trackedArraysByGuid[e];return n?n.removeItems(t,r):[]},updateIndexes:function(t,r){var n=e(r,"length");t.apply(function(e,t,r){r!==Ember.TrackedArray.DELETE&&(r!==Ember.TrackedArray.RETAIN||e.length!==n||0!==t)&&w(e,function(e,r){e.index=r+t})})},dependentArrayWillChange:function(t,r,s){function a(e){f[l].destroyed=!0,y(c,e,this,f[l].beforeObserver),g(c,e,this,f[l].observer)}if(!this.suspended){var u,c,h,l,f,p=this.callbacks.removedItem,b=m(t),d=this.dependentKeysByGuid[b],E=this.cp._itemPropertyKeys[d]||[],v=e(t,"length"),_=n(r,v,0),O=i(_,v,s);for(f=this.trackRemove(d,_,O),l=O-1;l>=0&&(h=_+l,!(h>=v));--l)c=t.objectAt(h),w(E,a,this),u=o(t,c,h,this.instanceMeta.propertyName,this.cp),this.setValue(p.call(this.instanceMeta.context,this.getValue(),c,u,this.instanceMeta.sugarMeta))}},dependentArrayDidChange:function(t,r,i,s){if(!this.suspended){var a,u,c=this.callbacks.addedItem,h=m(t),l=this.dependentKeysByGuid[h],f=new Array(s),p=this.cp._itemPropertyKeys[l],b=e(t,"length"),d=n(r,b,s);w(t.slice(d,d+s),function(e,r){p&&(u=f[r]=this.createPropertyObserverContext(t,d+r,this.trackedArraysByGuid[l]),w(p,function(t){E(e,t,this,u.beforeObserver),v(e,t,this,u.observer)},this)),a=o(t,e,d+r,this.instanceMeta.propertyName,this.cp),this.setValue(c.call(this.instanceMeta.context,this.getValue(),e,a,this.instanceMeta.sugarMeta))},this),this.trackAdd(l,d,f)}},itemPropertyWillChange:function(t,r,n,i){var o=m(t);this.changedItems[o]||(this.changedItems[o]={array:n,observerContext:i,obj:t,previousValues:{}}),this.changedItems[o].previousValues[r]=e(t,r)},itemPropertyDidChange:function(){this.flushChanges()},flushChanges:function(){var e,t,r,n=this.changedItems;for(e in n)t=n[e],t.observerContext.destroyed||(this.updateIndexes(t.observerContext.trackedArray,t.observerContext.dependentArray),r=o(t.array,t.obj,t.observerContext.index,this.instanceMeta.propertyName,this.cp,t.previousValues),this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)));this.changedItems={}}},c.prototype={getValue:function(){return this.propertyName in this.cache?this.cache[this.propertyName]:this.initialValue},setValue:function(e,t){if(void 0!==e){var r=t&&e!==this.cache[this.propertyName];r&&b(this.context,this.propertyName),this.cache[this.propertyName]=e,r&&d(this.context,this.propertyName)}else delete this.cache[this.propertyName]}},Ember.ReduceComputedProperty=h,h.prototype=C(_.prototype),h.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||l,addedItem:e.addedItem||l}}return this.callbacks},h.prototype._hasInstanceMeta=function(e,t){var r=m(e),n=r+":"+t;return!!this._instanceMetas[n]},h.prototype._instanceMeta=function(e,r){var n=m(e),i=n+":"+r,o=this._instanceMetas[i];return o||(o=this._instanceMetas[i]=new c(e,r,this.initialValue()),o.dependentArraysObserver=new t(this._callbacks(),this,o,e,r,o.sugarMeta)),o},h.prototype.initialValue=function(){return"function"==typeof this.options.initialValue?this.options.initialValue():this.options.initialValue},h.prototype.resetValue=function(){return this.initialValue()},h.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},h.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},h.prototype.property=function(){var e,t,r,n=this,i=(O.call(arguments),new Ember.Set);return w(O.call(arguments),function(o){if(P.test(o))throw new Ember.Error("Nested @each properties not supported: "+o);(e=A.exec(o))?(t=e[1],r=e[2],n.itemPropertyKey(t,r),i.add(t)):i.add(o)}),_.prototype.property.apply(this,i.toArray())},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=O.call(arguments,0,-1),e=O.call(arguments,-1)[0]),"object"!=typeof e)throw new Ember.Error("Reduce Computed Property declared without an options hash");if(!("initialValue"in e))throw new Ember.Error("Reduce Computed Property declared without an initial value");var r=new h(e);return t&&r.property.apply(r,t),r}}(),function(){function e(){var e=this;return t.apply(this,arguments),this.func=function(t){return function(r){return e._hasInstanceMeta(this,r)||i(e._dependentKeys,function(t){Ember.addObserver(this,t,function(){e.recomputeOnce.call(this,r)})},this),t.apply(this,arguments)}}(this.func),this}var t=Ember.ReduceComputedProperty,r=[].slice,n=Ember.create,i=Ember.EnumerableUtils.forEach;Ember.ArrayComputedProperty=e,e.prototype=n(t.prototype),e.prototype.initialValue=function(){return Ember.A()},e.prototype.resetValue=function(e){return e.clear(),e},Ember.arrayComputed=function(t){var n;if(arguments.length>1&&(n=r.call(arguments,0,-1),t=r.call(arguments,-1)[0]),"object"!=typeof t)throw new Ember.Error("Array Computed Property declared without an options hash");var i=new e(t);return n&&i.property.apply(i,n),i}}(),function(){function e(e,i,o,s){function a(e){return t.detectInstance(e)?n(r(e,"content")):n(e)}var u,c,h,l,f;return arguments.length<4&&(s=r(e,"length")),arguments.length<3&&(o=0),o===s?o:(u=o+Math.floor((s-o)/2),c=e.objectAt(u),l=a(c),f=a(i),l===f?u:(h=this.order(c,i),0===h&&(h=f>l?-1:1),0>h?this.binarySearch(e,i,u+1,s):h>0?this.binarySearch(e,i,o,u):u))}var t,r=Ember.get,n=(Ember.set,Ember.guidFor),i=Ember.merge,o=[].slice,s=Ember.EnumerableUtils.forEach,a=Ember.EnumerableUtils.map;Ember.computed.max=function(e){return Ember.reduceComputed.call(null,e,{initialValue:-1/0,addedItem:function(e,t){return Math.max(e,t)},removedItem:function(e,t){return e>t?e:void 0}})},Ember.computed.min=function(e){return Ember.reduceComputed.call(null,e,{initialValue:1/0,addedItem:function(e,t){return Math.min(e,t)},removedItem:function(e,t){return t>e?e:void 0}})},Ember.computed.map=function(e,t){var r={addedItem:function(e,r,n){var i=t.call(this,r);return e.insertAt(n.index,i),e},removedItem:function(e,t,r){return e.removeAt(r.index,1),e}};return Ember.arrayComputed(e,r)},Ember.computed.mapBy=function(e,t){var n=function(e){return r(e,t)};return Ember.computed.map(e+".@each."+t,n)},Ember.computed.mapProperty=Ember.computed.mapBy,Ember.computed.filter=function(e,t){var r={initialize:function(e,t,r){r.filteredArrayIndexes=new Ember.SubArray},addedItem:function(e,r,n,i){var o=!!t.call(this,r),s=i.filteredArrayIndexes.addItem(n.index,o);return o&&e.insertAt(s,r),e},removedItem:function(e,t,r,n){var i=n.filteredArrayIndexes.removeItem(r.index);return i>-1&&e.removeAt(i),e}};return Ember.arrayComputed(e,r)},Ember.computed.filterBy=function(e,t,n){var i;return i=2===arguments.length?function(e){return r(e,t)}:function(e){return r(e,t)===n},Ember.computed.filter(e+".@each."+t,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=o.call(arguments);return e.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(e,t,r,i){var o=n(t);return i.itemCounts[o]?++i.itemCounts[o]:i.itemCounts[o]=1,e.addObject(t),e},removedItem:function(e,t,r,i){var o=n(t),s=i.itemCounts;return 0===--s[o]&&e.removeObject(t),e}}),Ember.arrayComputed.apply(null,e)},Ember.computed.union=Ember.computed.uniq,Ember.computed.intersect=function(){var e=function(e){return a(e.property._dependentKeys,function(e){return n(e)})},t=o.call(arguments);return t.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(t,r,i,o){var s=n(r),a=(e(i),n(i.arrayChanged)),u=i.property._dependentKeys.length,c=o.itemCounts;return c[s]||(c[s]={}),void 0===c[s][a]&&(c[s][a]=0),1===++c[s][a]&&u===Ember.keys(c[s]).length&&t.addObject(r),t},removedItem:function(t,r,i,o){var s,a=n(r),u=(e(i),n(i.arrayChanged)),c=(i.property._dependentKeys.length,o.itemCounts);return void 0===c[a][u]&&(c[a][u]=0),0===--c[a][u]&&(delete c[a][u],s=Ember.keys(c[a]).length,0===s&&delete c[a],t.removeObject(r)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,t){if(2!==arguments.length)throw new Ember.Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed.call(null,e,t,{addedItem:function(n,i,o){var s=r(this,e),a=r(this,t);return o.arrayChanged===s?a.contains(i)||n.addObject(i):n.removeObject(i),n},removedItem:function(n,i,o){var s=r(this,e),a=r(this,t);return o.arrayChanged===a?s.contains(i)&&n.addObject(i):n.removeObject(i),n}})},t=Ember.ObjectProxy.extend(),Ember.computed.sort=function(n,o){var a,u;return"function"==typeof o?a=function(t,r,n){n.order=o,n.binarySearch=e}:(u=o,a=function(t,i,o){function a(){var e,t,a,h=r(this,u),l=o.sortProperties=[],f=o.sortPropertyAscending={};i.property.clearItemPropertyKeys(n),s(h,function(r){-1!==(t=r.indexOf(":"))?(e=r.substring(0,t),a="desc"!==r.substring(t+1).toLowerCase()):(e=r,a=!0),l.push(e),f[e]=a,i.property.itemPropertyKey(n,e)}),h.addObserver("@each",this,c)}function c(){Ember.run.once(this,h,i.propertyName)}function h(e){a.call(this),i.property.recomputeOnce.call(this,e)}Ember.addObserver(this,u,c),a.call(this),o.order=function(e,t){for(var n,i,o,s=0;s<this.sortProperties.length;++s)if(n=this.sortProperties[s],i=Ember.compare(r(e,n),r(t,n)),0!==i)return o=this.sortPropertyAscending[n],o?i:-1*i;return 0},o.binarySearch=e}),Ember.arrayComputed.call(null,n,{initialize:a,addedItem:function(e,t,r,n){var i=n.binarySearch(e,t);return e.insertAt(i,t),e},removedItem:function(e,r,n,o){var s,a,u;return n.previousValues?(s=i({content:r},n.previousValues),u=t.create(s)):u=r,a=o.binarySearch(e,u),e.removeAt(a),e}})}}(),function(){Ember.RSVP=t("rsvp"),Ember.RSVP.onerrorDefault=function(e){if(e instanceof Error)if(Ember.testing){if(!Ember.Test||!Ember.Test.adapter)throw e;Ember.Test.adapter.exception(e)}else Ember.Logger.error(e.stack)},Ember.RSVP.on("error",Ember.RSVP.onerrorDefault)}(),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.observesImmediately=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return this.observes.apply(this,arguments)},Function.prototype.observesBefore=function(){return this.__ember_observesBefore__=e.call(arguments),this},Function.prototype.on=function(){var t=e.call(arguments);return this.__ember_listens__=t,this})}(),function(){Ember.Comparable=Ember.Mixin.create({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 Ember.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;
|
19
|
+
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 Ember.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 Ember.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){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");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;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){function r(e,t){var r=[];return t&&r.push(t),r.concat(e)}t=t||{};var n=t.action||e(this,"action"),i=t.target||e(this,"targetObject"),o=t.actionContext;if("undefined"==typeof o&&(o=e(this,"actionContextObject")||this),i&&n){var s;return s=i.send?i.send.apply(i,r(o,n)):i[n].apply(i,r(o)),s!==!1&&(s=!0),s}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)},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,t)});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(){var e=Ember.get,t=Ember.typeOf;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){var r;e._actions||("object"===t(e.actions)?r="actions":"object"===t(e.events)&&(r="events"),r&&(e._actions=Ember.merge(e._actions||{},e[r])),delete e[r])},send:function(t){var r,n=[].slice.call(arguments,1);if(this._actions&&this._actions[t]){if(this._actions[t].apply(this,n)!==!0)return}else if(this.deprecatedSend&&this.deprecatedSendHandles&&this.deprecatedSendHandles(t)&&this.deprecatedSend.apply(this,[].slice.call(arguments))!==!0)return;(r=e(this,"target"))&&r.send.apply(r,arguments)}})}(),function(){function e(e,r){r.then(function(r){t(e,"isFulfilled",!0),t(e,"content",r)},function(r){t(e,"isRejected",!0),t(e,"reason",r)})}var t=Ember.set,r=Ember.get,n=Ember.RSVP.resolve,i=(Ember.RSVP.rethrow,Ember.computed.not),o=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:i("isSettled").readOnly(),isSettled:o("isRejected","isFulfilled").readOnly(),isRejected:!1,isFulfilled:!1,promise:Ember.computed(function(t,r){if(2===arguments.length)return r=n(r),e(this,r),r.then();throw new Ember.Error("PromiseProxy's promise must be set")}),then:function(e,t){return r(this,"promise").then(e,t)}})}(),function(){function e(e,t,r){this.type=e,this.count=t,this.items=r}function t(e,t,r,n){this.operation=e,this.index=t,this.split=r,this.rangeStart=n}var r=Ember.get,n=Ember.EnumerableUtils.forEach,i="r",o="i",s="d";Ember.TrackedArray=function(t){arguments.length<1&&(t=[]);var n=r(t,"length");this._operations=n?[new e(i,n,t)]:[]},Ember.TrackedArray.RETAIN=i,Ember.TrackedArray.INSERT=o,Ember.TrackedArray.DELETE=s,Ember.TrackedArray.prototype={addItems:function(t,n){var i=r(n,"length");if(!(1>i)){var s,a,u=this._findArrayOperation(t),c=u.operation,h=u.index,l=u.rangeStart;a=new e(o,i,n),c?u.split?(this._split(h,t-l,a),s=h+1):(this._operations.splice(h,0,a),s=h):(this._operations.push(a),s=h),this._composeInsert(s)}},removeItems:function(t,r){if(!(1>r)){var n,i,o=this._findArrayOperation(t),a=(o.operation,o.index),u=o.rangeStart;return n=new e(s,r),o.split?(this._split(a,t-u,n),i=a+1):(this._operations.splice(a,0,n),i=a),this._composeDelete(i)}},apply:function(t){var r=[],o=0;n(this._operations,function(e){t(e.items,o,e.type),e.type!==s&&(o+=e.count,r=r.concat(e.items))}),this._operations=[new e(i,r.length,r)]},_findArrayOperation:function(e){var r,n,i,o,a,u=!1;for(r=o=0,n=this._operations.length;n>r;++r)if(i=this._operations[r],i.type!==s){if(a=o+i.count-1,e===o)break;if(e>o&&a>=e){u=!0;break}o=a+1}return new t(i,r,u,o)},_split:function(t,r,n){var i=this._operations[t],o=i.items.slice(r),s=new e(i.type,o.length,o);i.count=r,i.items=i.items.slice(0,r),this._operations.splice(t+1,0,n,s)},_composeInsert:function(e){var t=this._operations[e],r=this._operations[e-1],n=this._operations[e+1],i=r&&r.type,s=n&&n.type;i===o?(r.count+=t.count,r.items=r.items.concat(t.items),s===o?(r.count+=n.count,r.items=r.items.concat(n.items),this._operations.splice(e,2)):this._operations.splice(e,1)):s===o&&(t.count+=n.count,t.items=t.items.concat(n.items),this._operations.splice(e+1,1))},_composeDelete:function(e){var t,r,n,i=this._operations[e],a=i.count,u=this._operations[e-1],c=u&&u.type,h=!1,l=[];c===s&&(i=u,e-=1);for(var f=e+1;a>0;++f)t=this._operations[f],r=t.type,n=t.count,r!==s?(n>a?(l=l.concat(t.items.splice(0,a)),t.count-=a,f-=1,n=a,a=0):(n===a&&(h=!0),l=l.concat(t.items),a-=n),r===o&&(i.count-=n)):i.count+=n;return i.count>0?this._operations.splice(e+1,f-1-e):this._operations.splice(e,h?2:1),l},toString:function(){var e="";return n(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){function e(e,t){this.type=e,this.count=t}var t=(Ember.get,Ember.EnumerableUtils.forEach),r="r",n="f";Ember.SubArray=function(t){arguments.length<1&&(t=0),this._operations=t>0?[new e(r,t)]:[]},Ember.SubArray.prototype={addItem:function(t,i){var o=-1,s=i?r:n,a=this;return this._findOperation(t,function(n,u,c,h,l){var f,m;s===n.type?++n.count:t===c?a._operations.splice(u,0,new e(s,1)):(f=new e(s,1),m=new e(n.type,h-t+1),n.count=t-c,a._operations.splice(u+1,0,f,m)),i&&(o=n.type===r?l+(t-c):l),a._composeAt(u)},function(t){a._operations.push(new e(s,1)),i&&(o=t),a._composeAt(a._operations.length-1)}),o},removeItem:function(e){var t=-1,n=this;return this._findOperation(e,function(i,o,s,a,u){i.type===r&&(t=u+(e-s)),i.count>1?--i.count:(n._operations.splice(o,1),n._composeAt(o))},function(){throw new Ember.Error("Can't remove an item that has never been added.")}),t},_findOperation:function(e,t,n){var i,o,s,a,u,c=0;for(i=a=0,o=this._operations.length;o>i;a=u+1,++i){if(s=this._operations[i],u=a+s.count-1,e>=a&&u>=e)return t(s,i,a,u,c),void 0;s.type===r&&(c+=s.count)}n(c)},_composeAt:function(e){var t,r=this._operations[e];r&&(e>0&&(t=this._operations[e-1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e-1,1),--e)),e<this._operations.length-1&&(t=this._operations[e+1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e+1,1))))},toString:function(){var e="";return t(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),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("content",function(){this._teardownContent()}),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer("content",function(){r(this,"content");this._setupContent()}),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver("arrangedContent",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)}),_arrangedContentDidChange:Ember.observer("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)}),_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 Ember.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 Ember.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){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");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,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,s){var a=r._objects;a||(a=r._objects={});for(var u,c;--s>=i;){var h=e.objectAt(s);h&&(Ember.removeBeforeObserver(h,t,r,"contentKeyWillChange"),Ember.removeObserver(h,t,r,"contentKeyDidChange"),c=n(h),u=a[c],u[o.call(u,s)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.ArrayPolyfills.indexOf,s=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 s(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=this._keys;o=i>0?r+i:-1,Ember.changeProperties(function(){for(var n in s)s.hasOwnProperty(n)&&(o>0&&e(t,n,this,r,o),Ember.propertyDidChange(this,n));Ember.propertyDidChange(this._content,"@each")},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&&--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,t=(Ember.set,Ember.EnumerableUtils._replace),r=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(r,n,i){if(this.isFrozen)throw Ember.FROZEN_ERROR;var o=i?e(i,"length"):0;return this.arrayContentWillChange(r,n,o),0===o?this.splice(r,n):t(this,r,n,i),this.arrayContentDidChange(r,n,o),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()}}),n=["length"];Ember.EnumerableUtils.forEach(r.keys(),function(e){Array.prototype[e]&&n.push(e)}),n.length>0&&(r=r.without.apply(r,n)),Ember.NativeArray=r,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){r.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 Ember.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 Ember.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 Ember.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 Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,s,a=r(i),u=this[a],c=e(this,"length"),h=0===u,l=u===c-1;return u>=0&&c>u&&this[u]===i&&(s=[i],this.enumerableContentWillChange(s,null),h&&Ember.propertyWillChange(this,"firstObject"),l&&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),h&&Ember.propertyDidChange(this,"firstObject"),l&&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,t=(Ember.get,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(){Ember.get;Ember.ControllerMixin=Ember.Mixin.create(Ember.ActionHandler,{isController:!0,target:null,container:null,parentController:null,store:null,model:Ember.computed.alias("content"),deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)}}),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,sortFunction:Ember.compare,orderBy:function(r,n){var i=0,o=e(this,"sortProperties"),s=e(this,"sortAscending"),a=e(this,"sortFunction");return t(o,function(t){0===i&&(i=a(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("content",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()}),sortAscendingWillChange:Ember.beforeObserver("sortAscending",function(){this._lastSortAscending=e(this,"sortAscending")}),sortAscendingDidChange:Ember.observer("sortAscending",function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}}),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._super(),this.set("_subControllers",Ember.A())},content:Ember.computed(function(){return Ember.A()}),controllerAt:function(t,r,n){var i,o=e(this,"container"),s=e(this,"_subControllers"),a=s[t];if(a)return a;if(i="controller:"+n,!o.has(i))throw new Ember.Error('Could not resolve itemController: "'+n+'"');return a=o.lookupFactory(i).create({target:this,parentController:e(this,"parentController")||this,content:r}),s[t]=a,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)}()}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||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.");
|
data/dist/ember-runtime.prod.js
CHANGED
@@ -8,10 +8,10 @@
|
|
8
8
|
// ==========================================================================
|
9
9
|
|
10
10
|
|
11
|
-
// Version: 1.3.0-beta.
|
11
|
+
// Version: 1.3.0-beta.3
|
12
12
|
|
13
13
|
(function() {
|
14
|
-
var define, requireModule;
|
14
|
+
var define, requireModule, require, requirejs;
|
15
15
|
|
16
16
|
(function() {
|
17
17
|
var registry = {}, seen = {};
|
@@ -20,32 +20,48 @@ var define, requireModule;
|
|
20
20
|
registry[name] = { deps: deps, callback: callback };
|
21
21
|
};
|
22
22
|
|
23
|
-
requireModule = function(name) {
|
23
|
+
requirejs = require = requireModule = function(name) {
|
24
|
+
requirejs._eak_seen = registry;
|
25
|
+
|
24
26
|
if (seen[name]) { return seen[name]; }
|
25
27
|
seen[name] = {};
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
-
mod = registry[name];
|
30
|
-
|
31
|
-
if (!mod) {
|
32
|
-
throw new Error("Module '" + name + "' not found.");
|
29
|
+
if (!registry[name]) {
|
30
|
+
throw new Error("Could not find module " + name);
|
33
31
|
}
|
34
32
|
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
var mod = registry[name],
|
34
|
+
deps = mod.deps,
|
35
|
+
callback = mod.callback,
|
36
|
+
reified = [],
|
37
|
+
exports;
|
38
38
|
|
39
39
|
for (var i=0, l=deps.length; i<l; i++) {
|
40
40
|
if (deps[i] === 'exports') {
|
41
41
|
reified.push(exports = {});
|
42
42
|
} else {
|
43
|
-
reified.push(requireModule(deps[i]));
|
43
|
+
reified.push(requireModule(resolve(deps[i])));
|
44
44
|
}
|
45
45
|
}
|
46
46
|
|
47
47
|
var value = callback.apply(this, reified);
|
48
48
|
return seen[name] = exports || value;
|
49
|
+
|
50
|
+
function resolve(child) {
|
51
|
+
if (child.charAt(0) !== '.') { return child; }
|
52
|
+
var parts = child.split("/");
|
53
|
+
var parentBase = name.split("/").slice(0, -1);
|
54
|
+
|
55
|
+
for (var i=0, l=parts.length; i<l; i++) {
|
56
|
+
var part = parts[i];
|
57
|
+
|
58
|
+
if (part === '..') { parentBase.pop(); }
|
59
|
+
else if (part === '.') { continue; }
|
60
|
+
else { parentBase.push(part); }
|
61
|
+
}
|
62
|
+
|
63
|
+
return parentBase.join("/");
|
64
|
+
}
|
49
65
|
};
|
50
66
|
})();
|
51
67
|
(function() {
|
@@ -73,7 +89,7 @@ var define, requireModule;
|
|
73
89
|
|
74
90
|
@class Ember
|
75
91
|
@static
|
76
|
-
@version 1.3.0-beta.
|
92
|
+
@version 1.3.0-beta.3
|
77
93
|
*/
|
78
94
|
|
79
95
|
if ('undefined' === typeof Ember) {
|
@@ -100,10 +116,10 @@ Ember.toString = function() { return "Ember"; };
|
|
100
116
|
/**
|
101
117
|
@property VERSION
|
102
118
|
@type String
|
103
|
-
@default '1.3.0-beta.
|
119
|
+
@default '1.3.0-beta.3'
|
104
120
|
@final
|
105
121
|
*/
|
106
|
-
Ember.VERSION = '1.3.0-beta.
|
122
|
+
Ember.VERSION = '1.3.0-beta.3';
|
107
123
|
|
108
124
|
/**
|
109
125
|
Standard environmental variables. You can define these in a global `ENV`
|
@@ -609,6 +625,16 @@ var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'n
|
|
609
625
|
Ember.Error = function() {
|
610
626
|
var tmp = Error.apply(this, arguments);
|
611
627
|
|
628
|
+
// Adds a `stack` property to the given error object that will yield the
|
629
|
+
// stack trace at the time captureStackTrace was called.
|
630
|
+
// When collecting the stack trace all frames above the topmost call
|
631
|
+
// to this function, including that call, will be left out of the
|
632
|
+
// stack trace.
|
633
|
+
// This is useful because we can hide Ember implementation details
|
634
|
+
// that are not very helpful for the user.
|
635
|
+
if (Error.captureStackTrace) {
|
636
|
+
Error.captureStackTrace(this, Ember.Error);
|
637
|
+
}
|
612
638
|
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
613
639
|
for (var idx = 0; idx < errorProps.length; idx++) {
|
614
640
|
this[errorProps[idx]] = tmp[errorProps[idx]];
|
@@ -2012,7 +2038,7 @@ function suspendListener(obj, eventName, target, method, callback) {
|
|
2012
2038
|
|
2013
2039
|
Suspends multiple listeners during a callback.
|
2014
2040
|
|
2015
|
-
|
2041
|
+
|
2016
2042
|
@method suspendListeners
|
2017
2043
|
@for Ember
|
2018
2044
|
@param obj
|
@@ -2080,7 +2106,7 @@ function watchedEvents(obj) {
|
|
2080
2106
|
is skipped, and once listeners are removed. A listener without
|
2081
2107
|
a target is executed on the passed object. If an array of actions
|
2082
2108
|
is not passed, the actions stored on the passed object are invoked.
|
2083
|
-
|
2109
|
+
|
2084
2110
|
@method sendEvent
|
2085
2111
|
@for Ember
|
2086
2112
|
@param obj
|
@@ -2159,13 +2185,16 @@ function listenersFor(obj, eventName) {
|
|
2159
2185
|
Define a property as a function that should be executed when
|
2160
2186
|
a specified event or events are triggered.
|
2161
2187
|
|
2162
|
-
|
2163
|
-
|
2164
|
-
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2188
|
+
|
2189
|
+
``` javascript
|
2190
|
+
var Job = Ember.Object.extend({
|
2191
|
+
logCompleted: Ember.on('completed', function(){
|
2192
|
+
console.log('Job completed!');
|
2193
|
+
})
|
2194
|
+
});
|
2195
|
+
var job = Job.create();
|
2196
|
+
Ember.sendEvent(job, 'completed'); // Logs "Job completed!"
|
2197
|
+
```
|
2169
2198
|
|
2170
2199
|
@method on
|
2171
2200
|
@for Ember
|
@@ -2602,7 +2631,7 @@ function setPath(root, path, value, tolerant) {
|
|
2602
2631
|
keyName = path.slice(path.lastIndexOf('.') + 1);
|
2603
2632
|
|
2604
2633
|
// get the first part of the part
|
2605
|
-
path = path.slice(0, path.length-(keyName.length+1));
|
2634
|
+
path = (path === keyName) ? keyName : path.slice(0, path.length-(keyName.length+1));
|
2606
2635
|
|
2607
2636
|
// unless the path is this, look up the first part to
|
2608
2637
|
// get the root
|
@@ -2611,12 +2640,12 @@ function setPath(root, path, value, tolerant) {
|
|
2611
2640
|
}
|
2612
2641
|
|
2613
2642
|
if (!keyName || keyName.length === 0) {
|
2614
|
-
throw new Ember.Error('You passed an empty path');
|
2643
|
+
throw new Ember.Error('Property set failed: You passed an empty path');
|
2615
2644
|
}
|
2616
2645
|
|
2617
2646
|
if (!root) {
|
2618
2647
|
if (tolerant) { return; }
|
2619
|
-
else { throw new Ember.Error('
|
2648
|
+
else { throw new Ember.Error('Property set failed: object in path "'+path+'" could not be found or was destroyed.'); }
|
2620
2649
|
}
|
2621
2650
|
|
2622
2651
|
return set(root, keyName, value);
|
@@ -3026,7 +3055,7 @@ MapWithDefault.prototype.copy = function() {
|
|
3026
3055
|
|
3027
3056
|
(function() {
|
3028
3057
|
function consoleMethod(name) {
|
3029
|
-
var consoleObj;
|
3058
|
+
var consoleObj, logToConsole;
|
3030
3059
|
if (Ember.imports.console) {
|
3031
3060
|
consoleObj = Ember.imports.console;
|
3032
3061
|
} else if (typeof console !== 'undefined') {
|
@@ -3038,9 +3067,11 @@ function consoleMethod(name) {
|
|
3038
3067
|
if (method) {
|
3039
3068
|
// Older IE doesn't support apply, but Chrome needs it
|
3040
3069
|
if (method.apply) {
|
3041
|
-
|
3070
|
+
logToConsole = function() {
|
3042
3071
|
method.apply(consoleObj, arguments);
|
3043
3072
|
};
|
3073
|
+
logToConsole.displayName = 'console.' + name;
|
3074
|
+
return logToConsole;
|
3044
3075
|
} else {
|
3045
3076
|
return function() {
|
3046
3077
|
var message = Array.prototype.join.call(arguments, ', ');
|
@@ -3085,6 +3116,7 @@ Ember.Logger = {
|
|
3085
3116
|
@param {*} arguments
|
3086
3117
|
*/
|
3087
3118
|
log: consoleMethod('log') || Ember.K,
|
3119
|
+
|
3088
3120
|
/**
|
3089
3121
|
Prints the arguments to the console with a warning icon.
|
3090
3122
|
You can pass as many arguments as you want and they will be joined together with a space.
|
@@ -3098,8 +3130,9 @@ Ember.Logger = {
|
|
3098
3130
|
@param {*} arguments
|
3099
3131
|
*/
|
3100
3132
|
warn: consoleMethod('warn') || Ember.K,
|
3133
|
+
|
3101
3134
|
/**
|
3102
|
-
Prints the arguments to the console with an error icon, red text and a stack
|
3135
|
+
Prints the arguments to the console with an error icon, red text and a stack trace.
|
3103
3136
|
You can pass as many arguments as you want and they will be joined together with a space.
|
3104
3137
|
|
3105
3138
|
```javascript
|
@@ -3111,6 +3144,7 @@ Ember.Logger = {
|
|
3111
3144
|
@param {*} arguments
|
3112
3145
|
*/
|
3113
3146
|
error: consoleMethod('error') || Ember.K,
|
3147
|
+
|
3114
3148
|
/**
|
3115
3149
|
Logs the arguments to the console.
|
3116
3150
|
You can pass as many arguments as you want and they will be joined together with a space.
|
@@ -3125,6 +3159,7 @@ Ember.Logger = {
|
|
3125
3159
|
@param {*} arguments
|
3126
3160
|
*/
|
3127
3161
|
info: consoleMethod('info') || Ember.K,
|
3162
|
+
|
3128
3163
|
/**
|
3129
3164
|
Logs the arguments to the console in blue text.
|
3130
3165
|
You can pass as many arguments as you want and they will be joined together with a space.
|
@@ -3139,9 +3174,9 @@ Ember.Logger = {
|
|
3139
3174
|
@param {*} arguments
|
3140
3175
|
*/
|
3141
3176
|
debug: consoleMethod('debug') || consoleMethod('info') || Ember.K,
|
3142
|
-
/**
|
3143
3177
|
|
3144
|
-
|
3178
|
+
/**
|
3179
|
+
If the value passed into `Ember.Logger.assert` is not truthy it will throw an error with a stack trace.
|
3145
3180
|
|
3146
3181
|
```javascript
|
3147
3182
|
Ember.Logger.assert(true); // undefined
|
@@ -4185,11 +4220,11 @@ ComputedPropertyPrototype.cacheable = function(aFlag) {
|
|
4185
4220
|
mode the computed property will not automatically cache the return value.
|
4186
4221
|
|
4187
4222
|
```javascript
|
4188
|
-
MyApp.outsideService = Ember.Object.
|
4223
|
+
MyApp.outsideService = Ember.Object.extend({
|
4189
4224
|
value: function() {
|
4190
4225
|
return OutsideService.getValue();
|
4191
4226
|
}.property().volatile()
|
4192
|
-
});
|
4227
|
+
}).create();
|
4193
4228
|
```
|
4194
4229
|
|
4195
4230
|
@method volatile
|
@@ -4205,12 +4240,14 @@ ComputedPropertyPrototype.volatile = function() {
|
|
4205
4240
|
mode the computed property will throw an error when set.
|
4206
4241
|
|
4207
4242
|
```javascript
|
4208
|
-
MyApp.
|
4243
|
+
MyApp.Person = Ember.Object.extend({
|
4209
4244
|
guid: function() {
|
4210
4245
|
return 'guid-guid-guid';
|
4211
4246
|
}.property().readOnly()
|
4212
4247
|
});
|
4213
4248
|
|
4249
|
+
MyApp.person = MyApp.Person.create();
|
4250
|
+
|
4214
4251
|
MyApp.person.set('guid', 'new-guid'); // will throw an exception
|
4215
4252
|
```
|
4216
4253
|
|
@@ -4228,7 +4265,7 @@ ComputedPropertyPrototype.readOnly = function(readOnly) {
|
|
4228
4265
|
arguments containing key paths that this computed property depends on.
|
4229
4266
|
|
4230
4267
|
```javascript
|
4231
|
-
MyApp.
|
4268
|
+
MyApp.President = Ember.Object.extend({
|
4232
4269
|
fullName: Ember.computed(function() {
|
4233
4270
|
return this.get('firstName') + ' ' + this.get('lastName');
|
4234
4271
|
|
@@ -4236,6 +4273,12 @@ ComputedPropertyPrototype.readOnly = function(readOnly) {
|
|
4236
4273
|
// and lastName
|
4237
4274
|
}).property('firstName', 'lastName')
|
4238
4275
|
});
|
4276
|
+
|
4277
|
+
MyApp.president = MyApp.President.create({
|
4278
|
+
firstName: 'Barack',
|
4279
|
+
lastName: 'Obama',
|
4280
|
+
});
|
4281
|
+
MyApp.president.get('fullName'); // Barack Obama
|
4239
4282
|
```
|
4240
4283
|
|
4241
4284
|
@method property
|
@@ -5924,6 +5967,7 @@ Ember.run = function(target, method) {
|
|
5924
5967
|
|
5925
5968
|
If invoked when not within a run loop:
|
5926
5969
|
|
5970
|
+
|
5927
5971
|
```javascript
|
5928
5972
|
Ember.run.join(function() {
|
5929
5973
|
// creates a new run-loop
|
@@ -5932,6 +5976,7 @@ Ember.run = function(target, method) {
|
|
5932
5976
|
|
5933
5977
|
Alternatively, if called within an existing run loop:
|
5934
5978
|
|
5979
|
+
|
5935
5980
|
```javascript
|
5936
5981
|
Ember.run(function() {
|
5937
5982
|
// creates a new run-loop
|
@@ -7698,16 +7743,67 @@ Ember Metal
|
|
7698
7743
|
})();
|
7699
7744
|
|
7700
7745
|
(function() {
|
7746
|
+
/**
|
7747
|
+
@class RSVP
|
7748
|
+
@module RSVP
|
7749
|
+
*/
|
7701
7750
|
define("rsvp/all",
|
7702
|
-
["
|
7703
|
-
function(__dependency1__, __exports__) {
|
7751
|
+
["./promise","./utils","exports"],
|
7752
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
7704
7753
|
"use strict";
|
7705
|
-
var Promise = __dependency1__.Promise;
|
7706
7754
|
/* global toString */
|
7707
7755
|
|
7756
|
+
var Promise = __dependency1__.Promise;
|
7757
|
+
var isArray = __dependency2__.isArray;
|
7758
|
+
var isFunction = __dependency2__.isFunction;
|
7759
|
+
|
7760
|
+
/**
|
7761
|
+
Returns a promise that is fulfilled when all the given promises have been
|
7762
|
+
fulfilled, or rejected if any of them become rejected. The return promise
|
7763
|
+
is fulfilled with an array that gives all the values in the order they were
|
7764
|
+
passed in the `promises` array argument.
|
7765
|
+
|
7766
|
+
Example:
|
7767
|
+
|
7768
|
+
```javascript
|
7769
|
+
var promise1 = RSVP.resolve(1);
|
7770
|
+
var promise2 = RSVP.resolve(2);
|
7771
|
+
var promise3 = RSVP.resolve(3);
|
7772
|
+
var promises = [ promise1, promise2, promise3 ];
|
7773
|
+
|
7774
|
+
RSVP.all(promises).then(function(array){
|
7775
|
+
// The array here would be [ 1, 2, 3 ];
|
7776
|
+
});
|
7777
|
+
```
|
7778
|
+
|
7779
|
+
If any of the `promises` given to `RSVP.all` are rejected, the first promise
|
7780
|
+
that is rejected will be given as an argument to the returned promises's
|
7781
|
+
rejection handler. For example:
|
7782
|
+
|
7783
|
+
Example:
|
7708
7784
|
|
7709
|
-
|
7710
|
-
|
7785
|
+
```javascript
|
7786
|
+
var promise1 = RSVP.resolve(1);
|
7787
|
+
var promise2 = RSVP.reject(new Error("2"));
|
7788
|
+
var promise3 = RSVP.reject(new Error("3"));
|
7789
|
+
var promises = [ promise1, promise2, promise3 ];
|
7790
|
+
|
7791
|
+
RSVP.all(promises).then(function(array){
|
7792
|
+
// Code here never runs because there are rejected promises!
|
7793
|
+
}, function(error) {
|
7794
|
+
// error.message === "2"
|
7795
|
+
});
|
7796
|
+
```
|
7797
|
+
|
7798
|
+
@method all
|
7799
|
+
@for RSVP
|
7800
|
+
@param {Array} promises
|
7801
|
+
@param {String} label
|
7802
|
+
@return {Promise} promise that is fulfilled when all `promises` have been
|
7803
|
+
fulfilled, or rejected if any of them become rejected.
|
7804
|
+
*/
|
7805
|
+
function all(promises, label) {
|
7806
|
+
if (!isArray(promises)) {
|
7711
7807
|
throw new TypeError('You must pass an array to all.');
|
7712
7808
|
}
|
7713
7809
|
|
@@ -7735,102 +7831,74 @@ define("rsvp/all",
|
|
7735
7831
|
for (var i = 0; i < promises.length; i++) {
|
7736
7832
|
promise = promises[i];
|
7737
7833
|
|
7738
|
-
if (promise &&
|
7739
|
-
promise.then(resolver(i), reject);
|
7834
|
+
if (promise && isFunction(promise.then)) {
|
7835
|
+
promise.then(resolver(i), reject, "RSVP: RSVP#all");
|
7740
7836
|
} else {
|
7741
7837
|
resolveAll(i, promise);
|
7742
7838
|
}
|
7743
7839
|
}
|
7744
|
-
});
|
7840
|
+
}, label);
|
7745
7841
|
}
|
7746
7842
|
|
7747
|
-
|
7748
7843
|
__exports__.all = all;
|
7749
7844
|
});
|
7750
|
-
define("rsvp/async",
|
7751
|
-
["rsvp/config","exports"],
|
7752
|
-
function(__dependency1__, __exports__) {
|
7753
|
-
"use strict";
|
7754
|
-
var config = __dependency1__.config;
|
7755
|
-
|
7756
|
-
var browserGlobal = (typeof window !== 'undefined') ? window : {};
|
7757
|
-
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
|
7758
|
-
var local = (typeof global !== 'undefined') ? global : this;
|
7759
7845
|
|
7760
|
-
|
7761
|
-
|
7762
|
-
|
7763
|
-
|
7764
|
-
|
7765
|
-
|
7766
|
-
|
7767
|
-
function useMutationObserver() {
|
7768
|
-
var observer = new BrowserMutationObserver(flush);
|
7769
|
-
var element = document.createElement('div');
|
7770
|
-
observer.observe(element, { attributes: true });
|
7846
|
+
define("rsvp/cast",
|
7847
|
+
["exports"],
|
7848
|
+
function(__exports__) {
|
7849
|
+
"use strict";
|
7850
|
+
/**
|
7851
|
+
`RSVP.Promise.cast` returns the same promise if that promise shares a constructor
|
7852
|
+
with the promise being casted.
|
7771
7853
|
|
7772
|
-
|
7773
|
-
window.addEventListener('unload', function(){
|
7774
|
-
observer.disconnect();
|
7775
|
-
observer = null;
|
7776
|
-
}, false);
|
7854
|
+
Example:
|
7777
7855
|
|
7778
|
-
|
7779
|
-
|
7780
|
-
|
7781
|
-
}
|
7856
|
+
```javascript
|
7857
|
+
var promise = RSVP.resolve(1);
|
7858
|
+
var casted = RSVP.Promise.cast(promise);
|
7782
7859
|
|
7783
|
-
|
7784
|
-
|
7785
|
-
local.setTimeout(flush, 1);
|
7786
|
-
};
|
7787
|
-
}
|
7860
|
+
console.log(promise === casted); // true
|
7861
|
+
```
|
7788
7862
|
|
7789
|
-
|
7790
|
-
|
7791
|
-
|
7792
|
-
var tuple = queue[i];
|
7793
|
-
var callback = tuple[0], arg = tuple[1];
|
7794
|
-
callback(arg);
|
7795
|
-
}
|
7796
|
-
queue = [];
|
7797
|
-
}
|
7863
|
+
In the case of a promise whose constructor does not match, it is assimilated.
|
7864
|
+
The resulting promise will fulfill or reject based on the outcome of the
|
7865
|
+
promise being casted.
|
7798
7866
|
|
7799
|
-
|
7867
|
+
In the case of a non-promise, a promise which will fulfill with that value is
|
7868
|
+
returned.
|
7800
7869
|
|
7801
|
-
|
7802
|
-
if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
|
7803
|
-
scheduleFlush = useNextTick();
|
7804
|
-
} else if (BrowserMutationObserver) {
|
7805
|
-
scheduleFlush = useMutationObserver();
|
7806
|
-
} else {
|
7807
|
-
scheduleFlush = useSetTimeout();
|
7808
|
-
}
|
7870
|
+
Example:
|
7809
7871
|
|
7810
|
-
|
7811
|
-
var
|
7812
|
-
|
7813
|
-
// If length is 1, that means that we need to schedule an async flush.
|
7814
|
-
// If additional callbacks are queued before the queue is flushed, they
|
7815
|
-
// will be processed by this flush that we are scheduling.
|
7816
|
-
scheduleFlush();
|
7817
|
-
}
|
7818
|
-
}
|
7872
|
+
```javascript
|
7873
|
+
var value = 1; // could be a number, boolean, string, undefined...
|
7874
|
+
var casted = RSVP.Promise.cast(value);
|
7819
7875
|
|
7820
|
-
|
7876
|
+
console.log(value === casted); // false
|
7877
|
+
console.log(casted instanceof RSVP.Promise) // true
|
7821
7878
|
|
7822
|
-
|
7823
|
-
|
7824
|
-
|
7879
|
+
casted.then(function(val) {
|
7880
|
+
val === value // => true
|
7881
|
+
});
|
7882
|
+
```
|
7883
|
+
|
7884
|
+
`RSVP.Promise.cast` is similar to `RSVP.resolve`, but `RSVP.Promise.cast` differs in the
|
7885
|
+
following ways:
|
7886
|
+
* `RSVP.Promise.cast` serves as a memory-efficient way of getting a promise, when you
|
7887
|
+
have something that could either be a promise or a value. RSVP.resolve
|
7888
|
+
will have the same effect but will create a new promise wrapper if the
|
7889
|
+
argument is a promise.
|
7890
|
+
* `RSVP.Promise.cast` is a way of casting incoming thenables or promise subclasses to
|
7891
|
+
promises of the exact class specified, so that the resulting object's `then` is
|
7892
|
+
ensured to have the behavior of the constructor you are calling cast on (i.e., RSVP.Promise).
|
7893
|
+
|
7894
|
+
@method cast
|
7895
|
+
@for RSVP
|
7896
|
+
@param {Object} object to be casted
|
7897
|
+
@return {Promise} promise that is fulfilled when all properties of `promises`
|
7898
|
+
have been fulfilled, or rejected if any of them become rejected.
|
7899
|
+
*/
|
7825
7900
|
|
7826
7901
|
|
7827
|
-
__exports__.async = async;
|
7828
|
-
__exports__.asyncDefault = asyncDefault;
|
7829
|
-
});
|
7830
|
-
define("rsvp/cast",
|
7831
|
-
["exports"],
|
7832
|
-
function(__exports__) {
|
7833
|
-
"use strict";
|
7834
7902
|
function cast(object) {
|
7835
7903
|
/*jshint validthis:true */
|
7836
7904
|
if (object && typeof object === 'object' && object.constructor === this) {
|
@@ -7844,16 +7912,18 @@ define("rsvp/cast",
|
|
7844
7912
|
});
|
7845
7913
|
}
|
7846
7914
|
|
7847
|
-
|
7848
7915
|
__exports__.cast = cast;
|
7849
7916
|
});
|
7850
7917
|
define("rsvp/config",
|
7851
|
-
["
|
7918
|
+
["./events","exports"],
|
7852
7919
|
function(__dependency1__, __exports__) {
|
7853
7920
|
"use strict";
|
7854
7921
|
var EventTarget = __dependency1__.EventTarget;
|
7855
7922
|
|
7856
|
-
var config = {
|
7923
|
+
var config = {
|
7924
|
+
instrument: false
|
7925
|
+
};
|
7926
|
+
|
7857
7927
|
EventTarget.mixin(config);
|
7858
7928
|
|
7859
7929
|
function configure(name, value) {
|
@@ -7861,40 +7931,58 @@ define("rsvp/config",
|
|
7861
7931
|
// handle for legacy users that expect the actual
|
7862
7932
|
// error to be passed to their function added via
|
7863
7933
|
// `RSVP.configure('onerror', someFunctionHere);`
|
7864
|
-
config.on('error',
|
7865
|
-
|
7866
|
-
});
|
7867
|
-
} else {
|
7868
|
-
config[name] = value;
|
7934
|
+
config.on('error', value);
|
7935
|
+
return;
|
7869
7936
|
}
|
7870
|
-
}
|
7871
|
-
|
7872
|
-
function on(){
|
7873
|
-
return config.on.apply(config, arguments);
|
7874
|
-
}
|
7875
|
-
|
7876
|
-
function off(){
|
7877
|
-
return config.off.apply(config, arguments);
|
7878
|
-
}
|
7879
7937
|
|
7880
|
-
|
7881
|
-
|
7938
|
+
if (arguments.length === 2) {
|
7939
|
+
config[name] = value;
|
7940
|
+
} else {
|
7941
|
+
return config[name];
|
7942
|
+
}
|
7882
7943
|
}
|
7883
7944
|
|
7884
|
-
|
7885
7945
|
__exports__.config = config;
|
7886
7946
|
__exports__.configure = configure;
|
7887
|
-
__exports__.on = on;
|
7888
|
-
__exports__.off = off;
|
7889
|
-
__exports__.trigger = trigger;
|
7890
7947
|
});
|
7891
7948
|
define("rsvp/defer",
|
7892
|
-
["
|
7949
|
+
["./promise","exports"],
|
7893
7950
|
function(__dependency1__, __exports__) {
|
7894
7951
|
"use strict";
|
7895
7952
|
var Promise = __dependency1__.Promise;
|
7896
7953
|
|
7897
|
-
|
7954
|
+
/**
|
7955
|
+
`RSVP.defer` returns an object similar to jQuery's `$.Deferred` objects.
|
7956
|
+
`RSVP.defer` should be used when porting over code reliant on `$.Deferred`'s
|
7957
|
+
interface. New code should use the `RSVP.Promise` constructor instead.
|
7958
|
+
|
7959
|
+
The object returned from `RSVP.defer` is a plain object with three properties:
|
7960
|
+
|
7961
|
+
* promise - an `RSVP.Promise`.
|
7962
|
+
* reject - a function that causes the `promise` property on this object to
|
7963
|
+
become rejected
|
7964
|
+
* resolve - a function that causes the `promise` property on this object to
|
7965
|
+
become fulfilled.
|
7966
|
+
|
7967
|
+
Example:
|
7968
|
+
|
7969
|
+
```javascript
|
7970
|
+
var deferred = RSVP.defer();
|
7971
|
+
|
7972
|
+
deferred.resolve("Success!");
|
7973
|
+
|
7974
|
+
defered.promise.then(function(value){
|
7975
|
+
// value here is "Success!"
|
7976
|
+
});
|
7977
|
+
```
|
7978
|
+
|
7979
|
+
@method defer
|
7980
|
+
@for RSVP
|
7981
|
+
@param {String} -
|
7982
|
+
@return {Object}
|
7983
|
+
*/
|
7984
|
+
|
7985
|
+
function defer(label) {
|
7898
7986
|
var deferred = {
|
7899
7987
|
// pre-allocate shape
|
7900
7988
|
resolve: undefined,
|
@@ -7905,31 +7993,20 @@ define("rsvp/defer",
|
|
7905
7993
|
deferred.promise = new Promise(function(resolve, reject) {
|
7906
7994
|
deferred.resolve = resolve;
|
7907
7995
|
deferred.reject = reject;
|
7908
|
-
});
|
7996
|
+
}, label);
|
7909
7997
|
|
7910
7998
|
return deferred;
|
7911
7999
|
}
|
7912
8000
|
|
7913
|
-
|
7914
8001
|
__exports__.defer = defer;
|
7915
8002
|
});
|
7916
8003
|
define("rsvp/events",
|
7917
8004
|
["exports"],
|
7918
8005
|
function(__exports__) {
|
7919
8006
|
"use strict";
|
7920
|
-
var Event = function(type, options) {
|
7921
|
-
this.type = type;
|
7922
|
-
|
7923
|
-
for (var option in options) {
|
7924
|
-
if (!options.hasOwnProperty(option)) { continue; }
|
7925
|
-
|
7926
|
-
this[option] = options[option];
|
7927
|
-
}
|
7928
|
-
};
|
7929
|
-
|
7930
8007
|
var indexOf = function(callbacks, callback) {
|
7931
8008
|
for (var i=0, l=callbacks.length; i<l; i++) {
|
7932
|
-
if (callbacks[i]
|
8009
|
+
if (callbacks[i] === callback) { return i; }
|
7933
8010
|
}
|
7934
8011
|
|
7935
8012
|
return -1;
|
@@ -7945,214 +8022,523 @@ define("rsvp/events",
|
|
7945
8022
|
return callbacks;
|
7946
8023
|
};
|
7947
8024
|
|
8025
|
+
/**
|
8026
|
+
//@module RSVP
|
8027
|
+
//@class EventTarget
|
8028
|
+
*/
|
7948
8029
|
var EventTarget = {
|
8030
|
+
|
8031
|
+
/**
|
8032
|
+
@private
|
8033
|
+
`RSVP.EventTarget.mixin` extends an object with EventTarget methods. For
|
8034
|
+
Example:
|
8035
|
+
|
8036
|
+
```javascript
|
8037
|
+
var object = {};
|
8038
|
+
|
8039
|
+
RSVP.EventTarget.mixin(object);
|
8040
|
+
|
8041
|
+
object.on("finished", function(event) {
|
8042
|
+
// handle event
|
8043
|
+
});
|
8044
|
+
|
8045
|
+
object.trigger("finished", { detail: value });
|
8046
|
+
```
|
8047
|
+
|
8048
|
+
`EventTarget.mixin` also works with prototypes:
|
8049
|
+
|
8050
|
+
```javascript
|
8051
|
+
var Person = function() {};
|
8052
|
+
RSVP.EventTarget.mixin(Person.prototype);
|
8053
|
+
|
8054
|
+
var yehuda = new Person();
|
8055
|
+
var tom = new Person();
|
8056
|
+
|
8057
|
+
yehuda.on("poke", function(event) {
|
8058
|
+
console.log("Yehuda says OW");
|
8059
|
+
});
|
8060
|
+
|
8061
|
+
tom.on("poke", function(event) {
|
8062
|
+
console.log("Tom says OW");
|
8063
|
+
});
|
8064
|
+
|
8065
|
+
yehuda.trigger("poke");
|
8066
|
+
tom.trigger("poke");
|
8067
|
+
```
|
8068
|
+
|
8069
|
+
@method mixin
|
8070
|
+
@param {Object} object object to extend with EventTarget methods
|
8071
|
+
*/
|
7949
8072
|
mixin: function(object) {
|
7950
8073
|
object.on = this.on;
|
7951
8074
|
object.off = this.off;
|
7952
8075
|
object.trigger = this.trigger;
|
8076
|
+
object._promiseCallbacks = undefined;
|
7953
8077
|
return object;
|
7954
8078
|
},
|
7955
8079
|
|
7956
|
-
|
7957
|
-
|
7958
|
-
eventNames = eventNames.split(/\s+/);
|
7959
|
-
binding = binding || this;
|
8080
|
+
/**
|
8081
|
+
@private
|
7960
8082
|
|
7961
|
-
|
7962
|
-
callbacks = allCallbacks[eventName];
|
8083
|
+
Registers a callback to be executed when `eventName` is triggered
|
7963
8084
|
|
7964
|
-
|
7965
|
-
|
7966
|
-
|
8085
|
+
```javascript
|
8086
|
+
object.on('event', function(eventInfo){
|
8087
|
+
// handle the event
|
8088
|
+
});
|
7967
8089
|
|
7968
|
-
|
7969
|
-
|
7970
|
-
|
8090
|
+
object.trigger('event');
|
8091
|
+
```
|
8092
|
+
|
8093
|
+
@method on
|
8094
|
+
@param {String} eventName name of the event to listen for
|
8095
|
+
@param {Function} callback function to be called when the event is triggered.
|
8096
|
+
*/
|
8097
|
+
on: function(eventName, callback) {
|
8098
|
+
var allCallbacks = callbacksFor(this), callbacks;
|
8099
|
+
|
8100
|
+
callbacks = allCallbacks[eventName];
|
8101
|
+
|
8102
|
+
if (!callbacks) {
|
8103
|
+
callbacks = allCallbacks[eventName] = [];
|
8104
|
+
}
|
8105
|
+
|
8106
|
+
if (indexOf(callbacks, callback) === -1) {
|
8107
|
+
callbacks.push(callback);
|
7971
8108
|
}
|
7972
8109
|
},
|
7973
8110
|
|
7974
|
-
|
7975
|
-
|
7976
|
-
eventNames = eventNames.split(/\s+/);
|
8111
|
+
/**
|
8112
|
+
@private
|
7977
8113
|
|
7978
|
-
|
7979
|
-
if (!callback) {
|
7980
|
-
allCallbacks[eventName] = [];
|
7981
|
-
continue;
|
7982
|
-
}
|
8114
|
+
You can use `off` to stop firing a particular callback for an event:
|
7983
8115
|
|
7984
|
-
|
8116
|
+
```javascript
|
8117
|
+
function doStuff() { // do stuff! }
|
8118
|
+
object.on('stuff', doStuff);
|
7985
8119
|
|
7986
|
-
|
8120
|
+
object.trigger('stuff'); // doStuff will be called
|
7987
8121
|
|
7988
|
-
|
8122
|
+
// Unregister ONLY the doStuff callback
|
8123
|
+
object.off('stuff', doStuff);
|
8124
|
+
object.trigger('stuff'); // doStuff will NOT be called
|
8125
|
+
```
|
8126
|
+
|
8127
|
+
If you don't pass a `callback` argument to `off`, ALL callbacks for the
|
8128
|
+
event will not be executed when the event fires. For example:
|
8129
|
+
|
8130
|
+
```javascript
|
8131
|
+
var callback1 = function(){};
|
8132
|
+
var callback2 = function(){};
|
8133
|
+
|
8134
|
+
object.on('stuff', callback1);
|
8135
|
+
object.on('stuff', callback2);
|
8136
|
+
|
8137
|
+
object.trigger('stuff'); // callback1 and callback2 will be executed.
|
8138
|
+
|
8139
|
+
object.off('stuff');
|
8140
|
+
object.trigger('stuff'); // callback1 and callback2 will not be executed!
|
8141
|
+
```
|
8142
|
+
|
8143
|
+
@method off
|
8144
|
+
@param {String} eventName event to stop listening to
|
8145
|
+
@param {Function} callback optional argument. If given, only the function
|
8146
|
+
given will be removed from the event's callback queue. If no `callback`
|
8147
|
+
argument is given, all callbacks will be removed from the event's callback
|
8148
|
+
queue.
|
8149
|
+
*/
|
8150
|
+
off: function(eventName, callback) {
|
8151
|
+
var allCallbacks = callbacksFor(this), callbacks, index;
|
8152
|
+
|
8153
|
+
if (!callback) {
|
8154
|
+
allCallbacks[eventName] = [];
|
8155
|
+
return;
|
7989
8156
|
}
|
8157
|
+
|
8158
|
+
callbacks = allCallbacks[eventName];
|
8159
|
+
|
8160
|
+
index = indexOf(callbacks, callback);
|
8161
|
+
|
8162
|
+
if (index !== -1) { callbacks.splice(index, 1); }
|
7990
8163
|
},
|
7991
8164
|
|
8165
|
+
/**
|
8166
|
+
@private
|
8167
|
+
|
8168
|
+
Use `trigger` to fire custom events. For example:
|
8169
|
+
|
8170
|
+
```javascript
|
8171
|
+
object.on('foo', function(){
|
8172
|
+
console.log('foo event happened!');
|
8173
|
+
});
|
8174
|
+
object.trigger('foo');
|
8175
|
+
// 'foo event happened!' logged to the console
|
8176
|
+
```
|
8177
|
+
|
8178
|
+
You can also pass a value as a second argument to `trigger` that will be
|
8179
|
+
passed as an argument to all event listeners for the event:
|
8180
|
+
|
8181
|
+
```javascript
|
8182
|
+
object.on('foo', function(value){
|
8183
|
+
console.log(value.name);
|
8184
|
+
});
|
8185
|
+
|
8186
|
+
object.trigger('foo', { name: 'bar' });
|
8187
|
+
// 'bar' logged to the console
|
8188
|
+
```
|
8189
|
+
|
8190
|
+
@method trigger
|
8191
|
+
@param {String} eventName name of the event to be triggered
|
8192
|
+
@param {Any} options optional value to be passed to any event handlers for
|
8193
|
+
the given `eventName`
|
8194
|
+
*/
|
7992
8195
|
trigger: function(eventName, options) {
|
7993
8196
|
var allCallbacks = callbacksFor(this),
|
7994
|
-
callbacks, callbackTuple, callback, binding
|
8197
|
+
callbacks, callbackTuple, callback, binding;
|
7995
8198
|
|
7996
8199
|
if (callbacks = allCallbacks[eventName]) {
|
7997
8200
|
// Don't cache the callbacks.length since it may grow
|
7998
8201
|
for (var i=0; i<callbacks.length; i++) {
|
7999
|
-
|
8000
|
-
callback = callbackTuple[0];
|
8001
|
-
binding = callbackTuple[1];
|
8202
|
+
callback = callbacks[i];
|
8002
8203
|
|
8003
|
-
|
8004
|
-
options = { detail: options };
|
8005
|
-
}
|
8006
|
-
|
8007
|
-
event = new Event(eventName, options);
|
8008
|
-
callback.call(binding, event);
|
8204
|
+
callback(options);
|
8009
8205
|
}
|
8010
8206
|
}
|
8011
8207
|
}
|
8012
8208
|
};
|
8013
8209
|
|
8014
|
-
|
8015
8210
|
__exports__.EventTarget = EventTarget;
|
8016
8211
|
});
|
8017
8212
|
define("rsvp/hash",
|
8018
|
-
["
|
8019
|
-
function(__dependency1__, __exports__) {
|
8213
|
+
["./promise","./utils","exports"],
|
8214
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
8020
8215
|
"use strict";
|
8021
|
-
var
|
8216
|
+
var Promise = __dependency1__.Promise;
|
8217
|
+
var isFunction = __dependency2__.isFunction;
|
8022
8218
|
|
8023
|
-
function
|
8024
|
-
var
|
8219
|
+
var keysOf = Object.keys || function(object) {
|
8220
|
+
var result = [];
|
8025
8221
|
|
8026
8222
|
for (var prop in object) {
|
8027
|
-
|
8223
|
+
result.push(prop);
|
8028
8224
|
}
|
8029
8225
|
|
8030
|
-
return
|
8031
|
-
}
|
8226
|
+
return result;
|
8227
|
+
};
|
8032
8228
|
|
8033
|
-
|
8034
|
-
|
8229
|
+
/**
|
8230
|
+
`RSVP.hash` is similar to `RSVP.all`, but takes an object instead of an array
|
8231
|
+
for its `promises` argument.
|
8035
8232
|
|
8036
|
-
|
8037
|
-
|
8038
|
-
|
8233
|
+
Returns a promise that is fulfilled when all the given promises have been
|
8234
|
+
fulfilled, or rejected if any of them become rejected. The returned promise
|
8235
|
+
is fulfilled with a hash that has the same key names as the `promises` object
|
8236
|
+
argument. If any of the values in the object are not promises, they will
|
8237
|
+
simply be copied over to the fulfilled object.
|
8039
8238
|
|
8040
|
-
|
8041
|
-
|
8042
|
-
|
8043
|
-
|
8239
|
+
Example:
|
8240
|
+
|
8241
|
+
```javascript
|
8242
|
+
var promises = {
|
8243
|
+
myPromise: RSVP.resolve(1),
|
8244
|
+
yourPromise: RSVP.resolve(2),
|
8245
|
+
theirPromise: RSVP.resolve(3),
|
8246
|
+
notAPromise: 4
|
8044
8247
|
};
|
8045
8248
|
|
8046
|
-
|
8047
|
-
|
8048
|
-
|
8049
|
-
|
8050
|
-
|
8249
|
+
RSVP.hash(promises).then(function(hash){
|
8250
|
+
// hash here is an object that looks like:
|
8251
|
+
// {
|
8252
|
+
// myPromise: 1,
|
8253
|
+
// yourPromise: 2,
|
8254
|
+
// theirPromise: 3,
|
8255
|
+
// notAPromise: 4
|
8256
|
+
// }
|
8257
|
+
});
|
8258
|
+
````
|
8259
|
+
|
8260
|
+
If any of the `promises` given to `RSVP.hash` are rejected, the first promise
|
8261
|
+
that is rejected will be given as as the first argument, or as the reason to
|
8262
|
+
the rejection handler. For example:
|
8263
|
+
|
8264
|
+
```javascript
|
8265
|
+
var promises = {
|
8266
|
+
myPromise: RSVP.resolve(1),
|
8267
|
+
rejectedPromise: RSVP.reject(new Error("rejectedPromise")),
|
8268
|
+
anotherRejectedPromise: RSVP.reject(new Error("anotherRejectedPromise")),
|
8051
8269
|
};
|
8052
8270
|
|
8053
|
-
|
8054
|
-
|
8271
|
+
RSVP.hash(promises).then(function(hash){
|
8272
|
+
// Code here never runs because there are rejected promises!
|
8273
|
+
}, function(reason) {
|
8274
|
+
// reason.message === "rejectedPromise"
|
8275
|
+
});
|
8276
|
+
```
|
8277
|
+
|
8278
|
+
An important note: `RSVP.hash` is intended for plain JavaScript objects that
|
8279
|
+
are just a set of keys and values. `RSVP.hash` will NOT preserve prototype
|
8280
|
+
chains.
|
8281
|
+
|
8282
|
+
Example:
|
8283
|
+
|
8284
|
+
```javascript
|
8285
|
+
function MyConstructor(){
|
8286
|
+
this.example = RSVP.resolve("Example");
|
8287
|
+
}
|
8288
|
+
|
8289
|
+
MyConstructor.prototype = {
|
8290
|
+
protoProperty: RSVP.resolve("Proto Property")
|
8055
8291
|
};
|
8056
8292
|
|
8057
|
-
|
8058
|
-
|
8059
|
-
|
8060
|
-
|
8061
|
-
|
8293
|
+
var myObject = new MyConstructor();
|
8294
|
+
|
8295
|
+
RSVP.hash(myObject).then(function(hash){
|
8296
|
+
// protoProperty will not be present, instead you will just have an
|
8297
|
+
// object that looks like:
|
8298
|
+
// {
|
8299
|
+
// example: "Example"
|
8300
|
+
// }
|
8301
|
+
//
|
8302
|
+
// hash.hasOwnProperty('protoProperty'); // false
|
8303
|
+
// 'undefined' === typeof hash.protoProperty
|
8304
|
+
});
|
8305
|
+
```
|
8306
|
+
|
8307
|
+
@method hash
|
8308
|
+
@for RSVP
|
8309
|
+
@param {Object} promises
|
8310
|
+
@param {String} label - optional string that describes the promise.
|
8311
|
+
Useful for tooling.
|
8312
|
+
@return {Promise} promise that is fulfilled when all properties of `promises`
|
8313
|
+
have been fulfilled, or rejected if any of them become rejected.
|
8314
|
+
*/
|
8315
|
+
function hash(object, label) {
|
8316
|
+
var results = {},
|
8317
|
+
keys = keysOf(object),
|
8318
|
+
remaining = keys.length;
|
8319
|
+
|
8320
|
+
return new Promise(function(resolve, reject){
|
8321
|
+
var promise, prop;
|
8322
|
+
|
8323
|
+
if (remaining === 0) {
|
8324
|
+
resolve({});
|
8325
|
+
return;
|
8062
8326
|
}
|
8063
|
-
}
|
8064
8327
|
|
8065
|
-
|
8066
|
-
|
8328
|
+
var resolver = function(prop) {
|
8329
|
+
return function(value) {
|
8330
|
+
resolveAll(prop, value);
|
8331
|
+
};
|
8332
|
+
};
|
8067
8333
|
|
8334
|
+
var resolveAll = function(prop, value) {
|
8335
|
+
results[prop] = value;
|
8336
|
+
if (--remaining === 0) {
|
8337
|
+
resolve(results);
|
8338
|
+
}
|
8339
|
+
};
|
8340
|
+
|
8341
|
+
|
8342
|
+
for (var i = 0, l = keys.length; i < l; i ++) {
|
8343
|
+
prop = keys[i];
|
8344
|
+
promise = object[prop];
|
8345
|
+
|
8346
|
+
if (promise && isFunction(promise.then)) {
|
8347
|
+
promise.then(resolver(prop), reject, "RSVP: RSVP#hash");
|
8348
|
+
} else {
|
8349
|
+
resolveAll(prop, promise);
|
8350
|
+
}
|
8351
|
+
}
|
8352
|
+
});
|
8353
|
+
}
|
8068
8354
|
|
8069
8355
|
__exports__.hash = hash;
|
8070
8356
|
});
|
8357
|
+
define("rsvp/instrument",
|
8358
|
+
["./config","./utils","exports"],
|
8359
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
8360
|
+
"use strict";
|
8361
|
+
var config = __dependency1__.config;
|
8362
|
+
var now = __dependency2__.now;
|
8363
|
+
|
8364
|
+
function instrument(eventName, promise, child) {
|
8365
|
+
// instrumentation should not disrupt normal usage.
|
8366
|
+
try {
|
8367
|
+
config.trigger(eventName, {
|
8368
|
+
guid: promise._guidKey + promise._id,
|
8369
|
+
eventName: eventName,
|
8370
|
+
detail: promise._detail,
|
8371
|
+
childGuid: child && promise._guidKey + child._id,
|
8372
|
+
label: promise._label,
|
8373
|
+
timeStamp: now()
|
8374
|
+
});
|
8375
|
+
} catch(error) {
|
8376
|
+
setTimeout(function(){
|
8377
|
+
throw error;
|
8378
|
+
}, 0);
|
8379
|
+
}
|
8380
|
+
}
|
8381
|
+
|
8382
|
+
__exports__.instrument = instrument;
|
8383
|
+
});
|
8071
8384
|
define("rsvp/node",
|
8072
|
-
["
|
8385
|
+
["./promise","./all","exports"],
|
8073
8386
|
function(__dependency1__, __dependency2__, __exports__) {
|
8074
8387
|
"use strict";
|
8075
8388
|
var Promise = __dependency1__.Promise;
|
8076
8389
|
var all = __dependency2__.all;
|
8077
8390
|
|
8391
|
+
var slice = Array.prototype.slice;
|
8392
|
+
|
8078
8393
|
function makeNodeCallbackFor(resolve, reject) {
|
8079
8394
|
return function (error, value) {
|
8080
8395
|
if (error) {
|
8081
8396
|
reject(error);
|
8082
8397
|
} else if (arguments.length > 2) {
|
8083
|
-
resolve(
|
8398
|
+
resolve(slice.call(arguments, 1));
|
8084
8399
|
} else {
|
8085
8400
|
resolve(value);
|
8086
8401
|
}
|
8087
8402
|
};
|
8088
8403
|
}
|
8089
8404
|
|
8090
|
-
|
8091
|
-
|
8092
|
-
|
8093
|
-
|
8405
|
+
/**
|
8406
|
+
`RSVP.denodeify` takes a "node-style" function and returns a function that
|
8407
|
+
will return an `RSVP.Promise`. You can use `denodeify` in Node.js or the
|
8408
|
+
browser when you'd prefer to use promises over using callbacks. For example,
|
8409
|
+
`denodeify` transforms the following:
|
8094
8410
|
|
8095
|
-
|
8096
|
-
|
8097
|
-
reject = nodeReject;
|
8098
|
-
});
|
8411
|
+
```javascript
|
8412
|
+
var fs = require('fs');
|
8099
8413
|
|
8100
|
-
|
8101
|
-
|
8414
|
+
fs.readFile('myfile.txt', function(err, data){
|
8415
|
+
if (err) return handleError(err);
|
8416
|
+
handleData(data);
|
8417
|
+
});
|
8418
|
+
```
|
8102
8419
|
|
8103
|
-
|
8104
|
-
|
8105
|
-
|
8106
|
-
|
8107
|
-
}
|
8108
|
-
});
|
8420
|
+
into:
|
8421
|
+
|
8422
|
+
```javascript
|
8423
|
+
var fs = require('fs');
|
8109
8424
|
|
8110
|
-
|
8425
|
+
var readFile = RSVP.denodeify(fs.readFile);
|
8426
|
+
|
8427
|
+
readFile('myfile.txt').then(handleData, handleError);
|
8428
|
+
```
|
8429
|
+
|
8430
|
+
Using `denodeify` makes it easier to compose asynchronous operations instead
|
8431
|
+
of using callbacks. For example, instead of:
|
8432
|
+
|
8433
|
+
```javascript
|
8434
|
+
var fs = require('fs');
|
8435
|
+
var log = require('some-async-logger');
|
8436
|
+
|
8437
|
+
fs.readFile('myfile.txt', function(err, data){
|
8438
|
+
if (err) return handleError(err);
|
8439
|
+
fs.writeFile('myfile2.txt', data, function(err){
|
8440
|
+
if (err) throw err;
|
8441
|
+
log('success', function(err) {
|
8442
|
+
if (err) throw err;
|
8443
|
+
});
|
8444
|
+
});
|
8445
|
+
});
|
8446
|
+
```
|
8447
|
+
|
8448
|
+
You can chain the operations together using `then` from the returned promise:
|
8449
|
+
|
8450
|
+
```javascript
|
8451
|
+
var fs = require('fs');
|
8452
|
+
var denodeify = RSVP.denodeify;
|
8453
|
+
var readFile = denodeify(fs.readFile);
|
8454
|
+
var writeFile = denodeify(fs.writeFile);
|
8455
|
+
var log = denodeify(require('some-async-logger'));
|
8456
|
+
|
8457
|
+
readFile('myfile.txt').then(function(data){
|
8458
|
+
return writeFile('myfile2.txt', data);
|
8459
|
+
}).then(function(){
|
8460
|
+
return log('SUCCESS');
|
8461
|
+
}).then(function(){
|
8462
|
+
// success handler
|
8463
|
+
}, function(reason){
|
8464
|
+
// rejection handler
|
8465
|
+
});
|
8466
|
+
```
|
8467
|
+
|
8468
|
+
@method denodeify
|
8469
|
+
@for RSVP
|
8470
|
+
@param {Function} nodeFunc a "node-style" function that takes a callback as
|
8471
|
+
its last argument. The callback expects an error to be passed as its first
|
8472
|
+
argument (if an error occurred, otherwise null), and the value from the
|
8473
|
+
operation as its second argument ("function(err, value){ }").
|
8474
|
+
@param {Any} binding optional argument for binding the "this" value when
|
8475
|
+
calling the `nodeFunc` function.
|
8476
|
+
@return {Function} a function that wraps `nodeFunc` to return an
|
8477
|
+
`RSVP.Promise`
|
8478
|
+
*/
|
8479
|
+
function denodeify(nodeFunc, binding) {
|
8480
|
+
return function() {
|
8481
|
+
var nodeArgs = slice.call(arguments), resolve, reject;
|
8482
|
+
var thisArg = this || binding;
|
8483
|
+
|
8484
|
+
return new Promise(function(resolve, reject) {
|
8485
|
+
all(nodeArgs).then(function(nodeArgs) {
|
8486
|
+
try {
|
8487
|
+
nodeArgs.push(makeNodeCallbackFor(resolve, reject));
|
8488
|
+
nodeFunc.apply(thisArg, nodeArgs);
|
8489
|
+
} catch(e) {
|
8490
|
+
reject(e);
|
8491
|
+
}
|
8492
|
+
});
|
8493
|
+
});
|
8111
8494
|
};
|
8112
8495
|
}
|
8113
8496
|
|
8114
|
-
|
8115
8497
|
__exports__.denodeify = denodeify;
|
8116
8498
|
});
|
8117
8499
|
define("rsvp/promise",
|
8118
|
-
["
|
8119
|
-
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
8500
|
+
["./config","./events","./cast","./instrument","./utils","exports"],
|
8501
|
+
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __exports__) {
|
8120
8502
|
"use strict";
|
8121
8503
|
var config = __dependency1__.config;
|
8122
8504
|
var EventTarget = __dependency2__.EventTarget;
|
8123
8505
|
var cast = __dependency3__.cast;
|
8506
|
+
var instrument = __dependency4__.instrument;
|
8507
|
+
var objectOrFunction = __dependency5__.objectOrFunction;
|
8508
|
+
var isFunction = __dependency5__.isFunction;
|
8509
|
+
var now = __dependency5__.now;
|
8124
8510
|
|
8125
|
-
|
8126
|
-
|
8127
|
-
}
|
8128
|
-
|
8129
|
-
function isFunction(x){
|
8130
|
-
return typeof x === "function";
|
8131
|
-
}
|
8511
|
+
var guidKey = 'rsvp_' + now() + '-';
|
8512
|
+
var counter = 0;
|
8132
8513
|
|
8133
|
-
function Promise(resolver) {
|
8134
|
-
|
8135
|
-
|
8514
|
+
function Promise(resolver, label) {
|
8515
|
+
if (!isFunction(resolver)) {
|
8516
|
+
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
|
8517
|
+
}
|
8136
8518
|
|
8137
|
-
if (
|
8138
|
-
throw new TypeError('
|
8519
|
+
if (!(this instanceof Promise)) {
|
8520
|
+
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
8139
8521
|
}
|
8140
8522
|
|
8141
|
-
|
8142
|
-
|
8523
|
+
this._id = counter++;
|
8524
|
+
this._label = label;
|
8525
|
+
this._subscribers = [];
|
8526
|
+
|
8527
|
+
if (config.instrument) {
|
8528
|
+
instrument('created', this);
|
8143
8529
|
}
|
8144
8530
|
|
8145
|
-
|
8146
|
-
|
8147
|
-
|
8531
|
+
invokeResolver(resolver, this);
|
8532
|
+
}
|
8533
|
+
|
8534
|
+
function invokeResolver(resolver, promise) {
|
8535
|
+
function resolvePromise(value) {
|
8148
8536
|
resolve(promise, value);
|
8149
|
-
}
|
8537
|
+
}
|
8150
8538
|
|
8151
|
-
|
8152
|
-
|
8153
|
-
|
8154
|
-
reject(promise, value);
|
8155
|
-
};
|
8539
|
+
function rejectPromise(reason) {
|
8540
|
+
reject(promise, reason);
|
8541
|
+
}
|
8156
8542
|
|
8157
8543
|
try {
|
8158
8544
|
resolver(resolvePromise, rejectPromise);
|
@@ -8161,20 +8547,20 @@ define("rsvp/promise",
|
|
8161
8547
|
}
|
8162
8548
|
}
|
8163
8549
|
|
8164
|
-
|
8550
|
+
function invokeCallback(settled, promise, callback, detail) {
|
8165
8551
|
var hasCallback = isFunction(callback),
|
8166
8552
|
value, error, succeeded, failed;
|
8167
8553
|
|
8168
8554
|
if (hasCallback) {
|
8169
8555
|
try {
|
8170
|
-
value = callback(
|
8556
|
+
value = callback(detail);
|
8171
8557
|
succeeded = true;
|
8172
8558
|
} catch(e) {
|
8173
8559
|
failed = true;
|
8174
8560
|
error = e;
|
8175
8561
|
}
|
8176
8562
|
} else {
|
8177
|
-
value =
|
8563
|
+
value = detail;
|
8178
8564
|
succeeded = true;
|
8179
8565
|
}
|
8180
8566
|
|
@@ -8184,58 +8570,86 @@ define("rsvp/promise",
|
|
8184
8570
|
resolve(promise, value);
|
8185
8571
|
} else if (failed) {
|
8186
8572
|
reject(promise, error);
|
8187
|
-
} else if (
|
8573
|
+
} else if (settled === FULFILLED) {
|
8188
8574
|
resolve(promise, value);
|
8189
|
-
} else if (
|
8575
|
+
} else if (settled === REJECTED) {
|
8190
8576
|
reject(promise, value);
|
8191
8577
|
}
|
8192
|
-
}
|
8578
|
+
}
|
8579
|
+
|
8580
|
+
var PENDING = void 0;
|
8581
|
+
var SEALED = 0;
|
8582
|
+
var FULFILLED = 1;
|
8583
|
+
var REJECTED = 2;
|
8584
|
+
|
8585
|
+
function subscribe(parent, child, onFulfillment, onRejection) {
|
8586
|
+
var subscribers = parent._subscribers;
|
8587
|
+
var length = subscribers.length;
|
8588
|
+
|
8589
|
+
subscribers[length] = child;
|
8590
|
+
subscribers[length + FULFILLED] = onFulfillment;
|
8591
|
+
subscribers[length + REJECTED] = onRejection;
|
8592
|
+
}
|
8593
|
+
|
8594
|
+
function publish(promise, settled) {
|
8595
|
+
var child, callback, subscribers = promise._subscribers, detail = promise._detail;
|
8596
|
+
|
8597
|
+
if (config.instrument) {
|
8598
|
+
instrument(settled === FULFILLED ? 'fulfilled' : 'rejected', promise);
|
8599
|
+
}
|
8600
|
+
|
8601
|
+
for (var i = 0; i < subscribers.length; i += 3) {
|
8602
|
+
child = subscribers[i];
|
8603
|
+
callback = subscribers[i + settled];
|
8604
|
+
|
8605
|
+
invokeCallback(settled, child, callback, detail);
|
8606
|
+
}
|
8607
|
+
|
8608
|
+
promise._subscribers = null;
|
8609
|
+
}
|
8193
8610
|
|
8194
8611
|
Promise.prototype = {
|
8195
8612
|
constructor: Promise,
|
8196
|
-
|
8197
|
-
|
8198
|
-
|
8199
|
-
|
8613
|
+
|
8614
|
+
_id: undefined,
|
8615
|
+
_guidKey: guidKey,
|
8616
|
+
_label: undefined,
|
8617
|
+
|
8618
|
+
_state: undefined,
|
8619
|
+
_detail: undefined,
|
8620
|
+
_subscribers: undefined,
|
8200
8621
|
|
8201
8622
|
_onerror: function (reason) {
|
8202
|
-
config.trigger('error',
|
8203
|
-
detail: reason
|
8204
|
-
});
|
8623
|
+
config.trigger('error', reason);
|
8205
8624
|
},
|
8206
8625
|
|
8207
|
-
then: function(
|
8626
|
+
then: function(onFulfillment, onRejection, label) {
|
8627
|
+
var promise = this;
|
8208
8628
|
this._onerror = null;
|
8209
8629
|
|
8210
|
-
var thenPromise = new this.constructor(function() {});
|
8630
|
+
var thenPromise = new this.constructor(function() {}, label);
|
8211
8631
|
|
8212
|
-
if (this.
|
8213
|
-
|
8214
|
-
|
8215
|
-
|
8632
|
+
if (this._state) {
|
8633
|
+
var callbacks = arguments;
|
8634
|
+
config.async(function invokePromiseCallback() {
|
8635
|
+
invokeCallback(promise._state, thenPromise, callbacks[promise._state - 1], promise._detail);
|
8636
|
+
});
|
8637
|
+
} else {
|
8638
|
+
subscribe(this, thenPromise, onFulfillment, onRejection);
|
8216
8639
|
}
|
8217
8640
|
|
8218
|
-
if (
|
8219
|
-
|
8220
|
-
invokeCallback('reject', thenPromise, fail, { detail: promise.rejectedReason });
|
8221
|
-
}, this);
|
8641
|
+
if (config.instrument) {
|
8642
|
+
instrument('chained', promise, thenPromise);
|
8222
8643
|
}
|
8223
8644
|
|
8224
|
-
this.on('promise:resolved', function(event) {
|
8225
|
-
invokeCallback('resolve', thenPromise, done, event);
|
8226
|
-
});
|
8227
|
-
|
8228
|
-
this.on('promise:failed', function(event) {
|
8229
|
-
invokeCallback('reject', thenPromise, fail, event);
|
8230
|
-
});
|
8231
|
-
|
8232
8645
|
return thenPromise;
|
8233
8646
|
},
|
8234
8647
|
|
8235
|
-
|
8236
|
-
return this.then(null, onRejection);
|
8648
|
+
'catch': function(onRejection, label) {
|
8649
|
+
return this.then(null, onRejection, label);
|
8237
8650
|
},
|
8238
|
-
|
8651
|
+
|
8652
|
+
'finally': function(callback, label) {
|
8239
8653
|
var constructor = this.constructor;
|
8240
8654
|
|
8241
8655
|
return this.then(function(value) {
|
@@ -8246,23 +8660,12 @@ define("rsvp/promise",
|
|
8246
8660
|
return constructor.cast(callback()).then(function(){
|
8247
8661
|
throw reason;
|
8248
8662
|
});
|
8249
|
-
});
|
8663
|
+
}, label);
|
8250
8664
|
}
|
8251
8665
|
};
|
8252
8666
|
|
8253
|
-
Promise.prototype['catch'] = Promise.prototype.fail;
|
8254
8667
|
Promise.cast = cast;
|
8255
8668
|
|
8256
|
-
EventTarget.mixin(Promise.prototype);
|
8257
|
-
|
8258
|
-
function resolve(promise, value) {
|
8259
|
-
if (promise === value) {
|
8260
|
-
fulfill(promise, value);
|
8261
|
-
} else if (!handleThenable(promise, value)) {
|
8262
|
-
fulfill(promise, value);
|
8263
|
-
}
|
8264
|
-
}
|
8265
|
-
|
8266
8669
|
function handleThenable(promise, value) {
|
8267
8670
|
var then = null,
|
8268
8671
|
resolved;
|
@@ -8290,12 +8693,13 @@ define("rsvp/promise",
|
|
8290
8693
|
resolved = true;
|
8291
8694
|
|
8292
8695
|
reject(promise, val);
|
8293
|
-
});
|
8696
|
+
}, 'Locked onto ' + (promise._label || ' unknown promise'));
|
8294
8697
|
|
8295
8698
|
return true;
|
8296
8699
|
}
|
8297
8700
|
}
|
8298
8701
|
} catch (error) {
|
8702
|
+
if (resolved) { return true; }
|
8299
8703
|
reject(promise, error);
|
8300
8704
|
return true;
|
8301
8705
|
}
|
@@ -8303,53 +8707,229 @@ define("rsvp/promise",
|
|
8303
8707
|
return false;
|
8304
8708
|
}
|
8305
8709
|
|
8710
|
+
function resolve(promise, value) {
|
8711
|
+
if (promise === value) {
|
8712
|
+
fulfill(promise, value);
|
8713
|
+
} else if (!handleThenable(promise, value)) {
|
8714
|
+
fulfill(promise, value);
|
8715
|
+
}
|
8716
|
+
}
|
8717
|
+
|
8306
8718
|
function fulfill(promise, value) {
|
8307
|
-
|
8308
|
-
|
8309
|
-
|
8310
|
-
|
8311
|
-
|
8719
|
+
if (promise._state !== PENDING) { return; }
|
8720
|
+
promise._state = SEALED;
|
8721
|
+
promise._detail = value;
|
8722
|
+
|
8723
|
+
config.async(publishFulfillment, promise);
|
8312
8724
|
}
|
8313
8725
|
|
8314
|
-
function reject(promise,
|
8315
|
-
|
8316
|
-
|
8317
|
-
|
8318
|
-
|
8319
|
-
|
8320
|
-
});
|
8726
|
+
function reject(promise, reason) {
|
8727
|
+
if (promise._state !== PENDING) { return; }
|
8728
|
+
promise._state = SEALED;
|
8729
|
+
promise._detail = reason;
|
8730
|
+
|
8731
|
+
config.async(publishRejection, promise);
|
8321
8732
|
}
|
8322
8733
|
|
8734
|
+
function publishFulfillment(promise) {
|
8735
|
+
publish(promise, promise._state = FULFILLED);
|
8736
|
+
}
|
8737
|
+
|
8738
|
+
function publishRejection(promise) {
|
8739
|
+
if (promise._onerror) {
|
8740
|
+
promise._onerror(promise._detail);
|
8741
|
+
}
|
8742
|
+
|
8743
|
+
publish(promise, promise._state = REJECTED);
|
8744
|
+
}
|
8323
8745
|
|
8324
8746
|
__exports__.Promise = Promise;
|
8325
8747
|
});
|
8748
|
+
define("rsvp/race",
|
8749
|
+
["./promise","./utils","exports"],
|
8750
|
+
function(__dependency1__, __dependency2__, __exports__) {
|
8751
|
+
"use strict";
|
8752
|
+
/* global toString */
|
8753
|
+
|
8754
|
+
var Promise = __dependency1__.Promise;
|
8755
|
+
var isArray = __dependency2__.isArray;
|
8756
|
+
|
8757
|
+
/**
|
8758
|
+
`RSVP.race` allows you to watch a series of promises and act as soon as the
|
8759
|
+
first promise given to the `promises` argument fulfills or rejects.
|
8760
|
+
|
8761
|
+
Example:
|
8762
|
+
|
8763
|
+
```javascript
|
8764
|
+
var promise1 = new RSVP.Promise(function(resolve, reject){
|
8765
|
+
setTimeout(function(){
|
8766
|
+
resolve("promise 1");
|
8767
|
+
}, 200);
|
8768
|
+
});
|
8769
|
+
|
8770
|
+
var promise2 = new RSVP.Promise(function(resolve, reject){
|
8771
|
+
setTimeout(function(){
|
8772
|
+
resolve("promise 2");
|
8773
|
+
}, 100);
|
8774
|
+
});
|
8775
|
+
|
8776
|
+
RSVP.race([promise1, promise2]).then(function(result){
|
8777
|
+
// result === "promise 2" because it was resolved before promise1
|
8778
|
+
// was resolved.
|
8779
|
+
});
|
8780
|
+
```
|
8781
|
+
|
8782
|
+
`RSVP.race` is deterministic in that only the state of the first completed
|
8783
|
+
promise matters. For example, even if other promises given to the `promises`
|
8784
|
+
array argument are resolved, but the first completed promise has become
|
8785
|
+
rejected before the other promises became fulfilled, the returned promise
|
8786
|
+
will become rejected:
|
8787
|
+
|
8788
|
+
```javascript
|
8789
|
+
var promise1 = new RSVP.Promise(function(resolve, reject){
|
8790
|
+
setTimeout(function(){
|
8791
|
+
resolve("promise 1");
|
8792
|
+
}, 200);
|
8793
|
+
});
|
8794
|
+
|
8795
|
+
var promise2 = new RSVP.Promise(function(resolve, reject){
|
8796
|
+
setTimeout(function(){
|
8797
|
+
reject(new Error("promise 2"));
|
8798
|
+
}, 100);
|
8799
|
+
});
|
8800
|
+
|
8801
|
+
RSVP.race([promise1, promise2]).then(function(result){
|
8802
|
+
// Code here never runs because there are rejected promises!
|
8803
|
+
}, function(reason){
|
8804
|
+
// reason.message === "promise2" because promise 2 became rejected before
|
8805
|
+
// promise 1 became fulfilled
|
8806
|
+
});
|
8807
|
+
```
|
8808
|
+
|
8809
|
+
@method race
|
8810
|
+
@for RSVP
|
8811
|
+
@param {Array} promises array of promises to observe
|
8812
|
+
@param {String} label optional string for describing the promise returned.
|
8813
|
+
Useful for tooling.
|
8814
|
+
@return {Promise} a promise that becomes fulfilled with the value the first
|
8815
|
+
completed promises is resolved with if the first completed promise was
|
8816
|
+
fulfilled, or rejected with the reason that the first completed promise
|
8817
|
+
was rejected with.
|
8818
|
+
*/
|
8819
|
+
function race(promises, label) {
|
8820
|
+
if (!isArray(promises)) {
|
8821
|
+
throw new TypeError('You must pass an array to race.');
|
8822
|
+
}
|
8823
|
+
return new Promise(function(resolve, reject) {
|
8824
|
+
var results = [], promise;
|
8825
|
+
|
8826
|
+
for (var i = 0; i < promises.length; i++) {
|
8827
|
+
promise = promises[i];
|
8828
|
+
|
8829
|
+
if (promise && typeof promise.then === 'function') {
|
8830
|
+
promise.then(resolve, reject, "RSVP: RSVP#race");
|
8831
|
+
} else {
|
8832
|
+
resolve(promise);
|
8833
|
+
}
|
8834
|
+
}
|
8835
|
+
}, label);
|
8836
|
+
}
|
8837
|
+
|
8838
|
+
__exports__.race = race;
|
8839
|
+
});
|
8326
8840
|
define("rsvp/reject",
|
8327
|
-
["
|
8841
|
+
["./promise","exports"],
|
8328
8842
|
function(__dependency1__, __exports__) {
|
8329
8843
|
"use strict";
|
8330
8844
|
var Promise = __dependency1__.Promise;
|
8331
8845
|
|
8332
|
-
|
8846
|
+
/**
|
8847
|
+
`RSVP.reject` returns a promise that will become rejected with the passed
|
8848
|
+
`reason`. `RSVP.reject` is essentially shorthand for the following:
|
8849
|
+
|
8850
|
+
```javascript
|
8851
|
+
var promise = new RSVP.Promise(function(resolve, reject){
|
8852
|
+
reject(new Error('WHOOPS'));
|
8853
|
+
});
|
8854
|
+
|
8855
|
+
promise.then(function(value){
|
8856
|
+
// Code here doesn't run because the promise is rejected!
|
8857
|
+
}, function(reason){
|
8858
|
+
// reason.message === 'WHOOPS'
|
8859
|
+
});
|
8860
|
+
```
|
8861
|
+
|
8862
|
+
Instead of writing the above, your code now simply becomes the following:
|
8863
|
+
|
8864
|
+
```javascript
|
8865
|
+
var promise = RSVP.reject(new Error('WHOOPS'));
|
8866
|
+
|
8867
|
+
promise.then(function(value){
|
8868
|
+
// Code here doesn't run because the promise is rejected!
|
8869
|
+
}, function(reason){
|
8870
|
+
// reason.message === 'WHOOPS'
|
8871
|
+
});
|
8872
|
+
```
|
8873
|
+
|
8874
|
+
@method reject
|
8875
|
+
@for RSVP
|
8876
|
+
@param {Any} reason value that the returned promise will be rejected with.
|
8877
|
+
@param {String} label optional string for identifying the returned promise.
|
8878
|
+
Useful for tooling.
|
8879
|
+
@return {Promise} a promise that will become rejected with the given
|
8880
|
+
`reason`.
|
8881
|
+
*/
|
8882
|
+
function reject(reason, label) {
|
8333
8883
|
return new Promise(function (resolve, reject) {
|
8334
8884
|
reject(reason);
|
8335
|
-
});
|
8885
|
+
}, label);
|
8336
8886
|
}
|
8337
8887
|
|
8338
|
-
|
8339
8888
|
__exports__.reject = reject;
|
8340
8889
|
});
|
8341
8890
|
define("rsvp/resolve",
|
8342
|
-
["
|
8891
|
+
["./promise","exports"],
|
8343
8892
|
function(__dependency1__, __exports__) {
|
8344
8893
|
"use strict";
|
8345
8894
|
var Promise = __dependency1__.Promise;
|
8346
8895
|
|
8347
|
-
|
8348
|
-
|
8349
|
-
|
8896
|
+
/**
|
8897
|
+
`RSVP.resolve` returns a promise that will become fulfilled with the passed
|
8898
|
+
`value`. `RSVP.resolve` is essentially shorthand for the following:
|
8899
|
+
|
8900
|
+
```javascript
|
8901
|
+
var promise = new RSVP.Promise(function(resolve, reject){
|
8902
|
+
resolve(1);
|
8350
8903
|
});
|
8351
|
-
}
|
8352
8904
|
|
8905
|
+
promise.then(function(value){
|
8906
|
+
// value === 1
|
8907
|
+
});
|
8908
|
+
```
|
8909
|
+
|
8910
|
+
Instead of writing the above, your code now simply becomes the following:
|
8911
|
+
|
8912
|
+
```javascript
|
8913
|
+
var promise = RSVP.resolve(1);
|
8914
|
+
|
8915
|
+
promise.then(function(value){
|
8916
|
+
// value === 1
|
8917
|
+
});
|
8918
|
+
```
|
8919
|
+
|
8920
|
+
@method resolve
|
8921
|
+
@for RSVP
|
8922
|
+
@param {Any} value value that the returned promise will be resolved with
|
8923
|
+
@param {String} label optional string for identifying the returned promise.
|
8924
|
+
Useful for tooling.
|
8925
|
+
@return {Promise} a promise that will become fulfilled with the given
|
8926
|
+
`value`
|
8927
|
+
*/
|
8928
|
+
function resolve(value, label) {
|
8929
|
+
return new Promise(function(resolve, reject) {
|
8930
|
+
resolve(value);
|
8931
|
+
}, label);
|
8932
|
+
}
|
8353
8933
|
|
8354
8934
|
__exports__.resolve = resolve;
|
8355
8935
|
});
|
@@ -8359,6 +8939,44 @@ define("rsvp/rethrow",
|
|
8359
8939
|
"use strict";
|
8360
8940
|
var local = (typeof global === "undefined") ? this : global;
|
8361
8941
|
|
8942
|
+
/**
|
8943
|
+
`RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event
|
8944
|
+
loop in order to aid debugging.
|
8945
|
+
|
8946
|
+
Promises A+ specifies that any exceptions that occur with a promise must be
|
8947
|
+
caught by the promises implementation and bubbled to the last handler. For
|
8948
|
+
this reason, it is recommended that you always specify a second rejection
|
8949
|
+
handler function to `then`. However, `RSVP.rethrow` will throw the exception
|
8950
|
+
outside of the promise, so it bubbles up to your console if in the browser,
|
8951
|
+
or domain/cause uncaught exception in Node. `rethrow` will throw the error
|
8952
|
+
again so the error can be handled by the promise.
|
8953
|
+
|
8954
|
+
```javascript
|
8955
|
+
function throws(){
|
8956
|
+
throw new Error('Whoops!');
|
8957
|
+
}
|
8958
|
+
|
8959
|
+
var promise = new RSVP.Promise(function(resolve, reject){
|
8960
|
+
throws();
|
8961
|
+
});
|
8962
|
+
|
8963
|
+
promise.fail(RSVP.rethrow).then(function(){
|
8964
|
+
// Code here doesn't run because the promise became rejected due to an
|
8965
|
+
// error!
|
8966
|
+
}, function (err){
|
8967
|
+
// handle the error here
|
8968
|
+
});
|
8969
|
+
```
|
8970
|
+
|
8971
|
+
The 'Whoops' error will be thrown on the next turn of the event loop
|
8972
|
+
and you can watch for it in your console. You can also handle it using a
|
8973
|
+
rejection handler given to `.then` or `.fail` on the returned promise.
|
8974
|
+
|
8975
|
+
@method rethrow
|
8976
|
+
@for RSVP
|
8977
|
+
@param {Error} reason reason the promise became rejected.
|
8978
|
+
@throws Error
|
8979
|
+
*/
|
8362
8980
|
function rethrow(reason) {
|
8363
8981
|
local.setTimeout(function() {
|
8364
8982
|
throw reason;
|
@@ -8366,48 +8984,78 @@ define("rsvp/rethrow",
|
|
8366
8984
|
throw reason;
|
8367
8985
|
}
|
8368
8986
|
|
8369
|
-
|
8370
8987
|
__exports__.rethrow = rethrow;
|
8371
8988
|
});
|
8989
|
+
define("rsvp/utils",
|
8990
|
+
["exports"],
|
8991
|
+
function(__exports__) {
|
8992
|
+
"use strict";
|
8993
|
+
function objectOrFunction(x) {
|
8994
|
+
return isFunction(x) || (typeof x === "object" && x !== null);
|
8995
|
+
}
|
8996
|
+
|
8997
|
+
function isFunction(x) {
|
8998
|
+
return typeof x === "function";
|
8999
|
+
}
|
9000
|
+
|
9001
|
+
function isArray(x) {
|
9002
|
+
return Object.prototype.toString.call(x) === "[object Array]";
|
9003
|
+
}
|
9004
|
+
|
9005
|
+
// Date.now is not available in browsers < IE9
|
9006
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility
|
9007
|
+
var now = Date.now || function() { return new Date().getTime(); };
|
9008
|
+
|
9009
|
+
|
9010
|
+
__exports__.objectOrFunction = objectOrFunction;
|
9011
|
+
__exports__.isFunction = isFunction;
|
9012
|
+
__exports__.isArray = isArray;
|
9013
|
+
__exports__.now = now;
|
9014
|
+
});
|
8372
9015
|
define("rsvp",
|
8373
|
-
["rsvp/events","rsvp/promise","rsvp/node","rsvp/all","rsvp/hash","rsvp/rethrow","rsvp/defer","rsvp/config","rsvp/resolve","rsvp/reject","
|
9016
|
+
["./rsvp/events","./rsvp/promise","./rsvp/node","./rsvp/all","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/resolve","./rsvp/reject", "exports"],
|
8374
9017
|
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __exports__) {
|
8375
9018
|
"use strict";
|
8376
9019
|
var EventTarget = __dependency1__.EventTarget;
|
8377
9020
|
var Promise = __dependency2__.Promise;
|
8378
9021
|
var denodeify = __dependency3__.denodeify;
|
8379
9022
|
var all = __dependency4__.all;
|
8380
|
-
var
|
8381
|
-
var
|
8382
|
-
var
|
8383
|
-
var
|
8384
|
-
var
|
8385
|
-
var
|
8386
|
-
var
|
8387
|
-
var
|
8388
|
-
|
8389
|
-
|
8390
|
-
|
8391
|
-
|
9023
|
+
var race = __dependency5__.race;
|
9024
|
+
var hash = __dependency6__.hash;
|
9025
|
+
var rethrow = __dependency7__.rethrow;
|
9026
|
+
var defer = __dependency8__.defer;
|
9027
|
+
var config = __dependency9__.config;
|
9028
|
+
var configure = __dependency9__.configure;
|
9029
|
+
var resolve = __dependency10__.resolve;
|
9030
|
+
var reject = __dependency11__.reject;
|
9031
|
+
|
9032
|
+
function async(callback, arg) {
|
9033
|
+
config.async(callback, arg);
|
9034
|
+
}
|
9035
|
+
|
9036
|
+
function on() {
|
9037
|
+
config.on.apply(config, arguments);
|
9038
|
+
}
|
8392
9039
|
|
9040
|
+
function off() {
|
9041
|
+
config.off.apply(config, arguments);
|
9042
|
+
}
|
8393
9043
|
|
8394
9044
|
__exports__.Promise = Promise;
|
8395
9045
|
__exports__.EventTarget = EventTarget;
|
8396
9046
|
__exports__.all = all;
|
9047
|
+
__exports__.race = race;
|
8397
9048
|
__exports__.hash = hash;
|
8398
9049
|
__exports__.rethrow = rethrow;
|
8399
9050
|
__exports__.defer = defer;
|
8400
9051
|
__exports__.denodeify = denodeify;
|
8401
9052
|
__exports__.configure = configure;
|
8402
|
-
__exports__.trigger = trigger;
|
8403
9053
|
__exports__.on = on;
|
8404
9054
|
__exports__.off = off;
|
8405
9055
|
__exports__.resolve = resolve;
|
8406
9056
|
__exports__.reject = reject;
|
8407
9057
|
__exports__.async = async;
|
8408
|
-
__exports__.asyncDefault = asyncDefault;
|
8409
9058
|
});
|
8410
|
-
|
8411
9059
|
})();
|
8412
9060
|
|
8413
9061
|
(function() {
|
@@ -8460,6 +9108,7 @@ define("container",
|
|
8460
9108
|
no matching key is found, return undefined.
|
8461
9109
|
|
8462
9110
|
@method get
|
9111
|
+
@param {String} key
|
8463
9112
|
@return {any}
|
8464
9113
|
*/
|
8465
9114
|
get: function(key) {
|
@@ -8757,6 +9406,8 @@ define("container",
|
|
8757
9406
|
to find the `fullName`.
|
8758
9407
|
|
8759
9408
|
@method describe
|
9409
|
+
@param {String} fullName
|
9410
|
+
@return {string} described fullName
|
8760
9411
|
*/
|
8761
9412
|
describe: function(fullName) {
|
8762
9413
|
return fullName;
|
@@ -8800,7 +9451,7 @@ define("container",
|
|
8800
9451
|
twitter instanceof Twitter; // => true
|
8801
9452
|
|
8802
9453
|
// by default the container will return singletons
|
8803
|
-
twitter2 = container.lookup('api:twitter');
|
9454
|
+
var twitter2 = container.lookup('api:twitter');
|
8804
9455
|
twitter instanceof Twitter; // => true
|
8805
9456
|
|
8806
9457
|
twitter === twitter2; //=> true
|
@@ -8962,8 +9613,8 @@ define("container",
|
|
8962
9613
|
|
8963
9614
|
Two forms of injections are possible:
|
8964
9615
|
|
8965
|
-
|
8966
|
-
|
9616
|
+
* Injecting one fullName on another fullName
|
9617
|
+
* Injecting one fullName on a type
|
8967
9618
|
|
8968
9619
|
Example:
|
8969
9620
|
|
@@ -10182,9 +10833,11 @@ Ember.Observable = Ember.Mixin.create({
|
|
10182
10833
|
return this;
|
10183
10834
|
},
|
10184
10835
|
|
10836
|
+
|
10185
10837
|
/**
|
10186
|
-
|
10187
|
-
|
10838
|
+
Sets a list of properties at once. These properties are set inside
|
10839
|
+
a single `beginPropertyChanges` and `endPropertyChanges` batch, so
|
10840
|
+
observers will be buffered.
|
10188
10841
|
|
10189
10842
|
```javascript
|
10190
10843
|
record.setProperties({ firstName: 'Charles', lastName: 'Jolley' });
|
@@ -10480,8 +11133,8 @@ Ember.Observable = Ember.Mixin.create({
|
|
10480
11133
|
|
10481
11134
|
(function() {
|
10482
11135
|
/**
|
10483
|
-
@module ember
|
10484
|
-
@submodule ember-runtime
|
11136
|
+
@module ember
|
11137
|
+
@submodule ember-runtime
|
10485
11138
|
*/
|
10486
11139
|
|
10487
11140
|
|
@@ -10828,27 +11481,33 @@ CoreObject.PrototypeMixin = Mixin.create({
|
|
10828
11481
|
than Javascript's `toString` typically does, in a generic way for all Ember
|
10829
11482
|
objects.
|
10830
11483
|
|
10831
|
-
|
10832
|
-
|
10833
|
-
|
11484
|
+
```javascript
|
11485
|
+
App.Person = Em.Object.extend()
|
11486
|
+
person = App.Person.create()
|
11487
|
+
person.toString() //=> "<App.Person:ember1024>"
|
11488
|
+
```
|
10834
11489
|
|
10835
11490
|
If the object's class is not defined on an Ember namespace, it will
|
10836
11491
|
indicate it is a subclass of the registered superclass:
|
10837
11492
|
|
10838
|
-
|
10839
|
-
|
10840
|
-
|
11493
|
+
```javascript
|
11494
|
+
Student = App.Person.extend()
|
11495
|
+
student = Student.create()
|
11496
|
+
student.toString() //=> "<(subclass of App.Person):ember1025>"
|
11497
|
+
```
|
10841
11498
|
|
10842
11499
|
If the method `toStringExtension` is defined, its return value will be
|
10843
11500
|
included in the output.
|
10844
11501
|
|
10845
|
-
|
10846
|
-
|
10847
|
-
|
10848
|
-
|
10849
|
-
|
10850
|
-
|
10851
|
-
|
11502
|
+
```javascript
|
11503
|
+
App.Teacher = App.Person.extend({
|
11504
|
+
toStringExtension: function() {
|
11505
|
+
return this.get('fullName');
|
11506
|
+
}
|
11507
|
+
});
|
11508
|
+
teacher = App.Teacher.create()
|
11509
|
+
teacher.toString(); //=> "<App.Teacher:ember1026:Tom Dale>"
|
11510
|
+
```
|
10852
11511
|
|
10853
11512
|
@method toString
|
10854
11513
|
@return {String} string representation
|
@@ -11044,7 +11703,6 @@ var ClassMixin = Mixin.create({
|
|
11044
11703
|
},
|
11045
11704
|
|
11046
11705
|
/**
|
11047
|
-
|
11048
11706
|
Augments a constructor's prototype with additional
|
11049
11707
|
properties and functions:
|
11050
11708
|
|
@@ -11087,7 +11745,6 @@ var ClassMixin = Mixin.create({
|
|
11087
11745
|
name: 'an object'
|
11088
11746
|
});
|
11089
11747
|
|
11090
|
-
|
11091
11748
|
MyObject.reopenClass({
|
11092
11749
|
canBuild: false
|
11093
11750
|
});
|
@@ -11969,7 +12626,9 @@ Ember.Enumerable = Ember.Mixin.create({
|
|
11969
12626
|
The callback method you provide should have the following signature (all
|
11970
12627
|
parameters are optional):
|
11971
12628
|
|
11972
|
-
|
12629
|
+
```javascript
|
12630
|
+
function(item, index, enumerable);
|
12631
|
+
```
|
11973
12632
|
|
11974
12633
|
- *item* is the current item in the iteration.
|
11975
12634
|
- *index* is the current index in the iteration
|
@@ -12275,7 +12934,7 @@ Ember.Enumerable = Ember.Mixin.create({
|
|
12275
12934
|
Returns `true` if the passed property resolves to `true` for any item in
|
12276
12935
|
the enumerable. This method is often simpler/faster than using a callback.
|
12277
12936
|
|
12278
|
-
@method
|
12937
|
+
@method isAny
|
12279
12938
|
@param {String} key the property to test
|
12280
12939
|
@param {String} [value] optional value to test against.
|
12281
12940
|
@return {Boolean} `true` if the passed function returns `true` for any item
|
@@ -12285,7 +12944,7 @@ Ember.Enumerable = Ember.Mixin.create({
|
|
12285
12944
|
},
|
12286
12945
|
|
12287
12946
|
/**
|
12288
|
-
@method
|
12947
|
+
@method anyBy
|
12289
12948
|
@param {String} key the property to test
|
12290
12949
|
@param {String} [value] optional value to test against.
|
12291
12950
|
@return {Boolean} `true` if the passed function returns `true` for any item
|
@@ -14766,26 +15425,18 @@ Ember.computed.sort = function (itemsKey, sortDefinition) {
|
|
14766
15425
|
|
14767
15426
|
|
14768
15427
|
(function() {
|
14769
|
-
/**
|
14770
|
-
Expose RSVP implementation
|
14771
|
-
|
14772
|
-
Documentation can be found here: https://github.com/tildeio/rsvp.js/blob/master/README.md
|
14773
|
-
|
14774
|
-
@class RSVP
|
14775
|
-
@namespace Ember
|
14776
|
-
@constructor
|
14777
|
-
*/
|
14778
15428
|
Ember.RSVP = requireModule('rsvp');
|
14779
15429
|
|
14780
|
-
Ember.RSVP.onerrorDefault = function(
|
14781
|
-
var error = event.detail;
|
14782
|
-
|
15430
|
+
Ember.RSVP.onerrorDefault = function(error) {
|
14783
15431
|
if (error instanceof Error) {
|
14784
|
-
Ember.Logger.error(error.stack);
|
14785
|
-
|
14786
15432
|
if (Ember.testing) {
|
14787
|
-
|
15433
|
+
if (Ember.Test && Ember.Test.adapter) {
|
15434
|
+
Ember.Test.adapter.exception(error);
|
15435
|
+
} else {
|
15436
|
+
throw error;
|
15437
|
+
}
|
14788
15438
|
} else {
|
15439
|
+
Ember.Logger.error(error.stack);
|
14789
15440
|
|
14790
15441
|
}
|
14791
15442
|
}
|
@@ -15429,7 +16080,7 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/**
|
|
15429
16080
|
method. You can pass either a single index, or a start and a length.
|
15430
16081
|
|
15431
16082
|
If you pass a start and length that is beyond the
|
15432
|
-
length this method will throw an `OUT_OF_RANGE_EXCEPTION
|
16083
|
+
length this method will throw an `OUT_OF_RANGE_EXCEPTION`.
|
15433
16084
|
|
15434
16085
|
```javascript
|
15435
16086
|
var colors = ["red", "green", "blue", "yellow", "orange"];
|
@@ -15463,18 +16114,18 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/**
|
|
15463
16114
|
is KVO-compliant.
|
15464
16115
|
|
15465
16116
|
```javascript
|
15466
|
-
var colors = ["red", "green"
|
15467
|
-
colors.pushObject("black");
|
15468
|
-
colors.pushObject(["yellow"
|
16117
|
+
var colors = ["red", "green"];
|
16118
|
+
colors.pushObject("black"); // ["red", "green", "black"]
|
16119
|
+
colors.pushObject(["yellow"]); // ["red", "green", ["yellow"]]
|
15469
16120
|
```
|
15470
16121
|
|
15471
16122
|
@method pushObject
|
15472
16123
|
@param {*} obj object to push
|
15473
|
-
@return
|
16124
|
+
@return The same obj passed as param
|
15474
16125
|
*/
|
15475
16126
|
pushObject: function(obj) {
|
15476
16127
|
this.insertAt(get(this, 'length'), obj) ;
|
15477
|
-
return obj
|
16128
|
+
return obj;
|
15478
16129
|
},
|
15479
16130
|
|
15480
16131
|
/**
|
@@ -15482,9 +16133,8 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/**
|
|
15482
16133
|
notifying observers of the change until all objects are added.
|
15483
16134
|
|
15484
16135
|
```javascript
|
15485
|
-
var colors = ["red"
|
15486
|
-
colors.pushObjects(["
|
15487
|
-
colors.pushObjects(["yellow", "orange"]); // ["red", "green", "blue", "black", "yellow", "orange"]
|
16136
|
+
var colors = ["red"];
|
16137
|
+
colors.pushObjects(["yellow", "orange"]); // ["red", "yellow", "orange"]
|
15488
16138
|
```
|
15489
16139
|
|
15490
16140
|
@method pushObjects
|
@@ -15546,14 +16196,14 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/**
|
|
15546
16196
|
KVO-compliant.
|
15547
16197
|
|
15548
16198
|
```javascript
|
15549
|
-
var colors = ["red"
|
15550
|
-
colors.unshiftObject("yellow");
|
15551
|
-
colors.unshiftObject(["black"
|
16199
|
+
var colors = ["red"];
|
16200
|
+
colors.unshiftObject("yellow"); // ["yellow", "red"]
|
16201
|
+
colors.unshiftObject(["black"]); // [["black"], "yellow", "red"]
|
15552
16202
|
```
|
15553
16203
|
|
15554
16204
|
@method unshiftObject
|
15555
16205
|
@param {*} obj object to unshift
|
15556
|
-
@return
|
16206
|
+
@return The same obj passed as param
|
15557
16207
|
*/
|
15558
16208
|
unshiftObject: function(obj) {
|
15559
16209
|
this.insertAt(0, obj) ;
|
@@ -15565,9 +16215,9 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/**
|
|
15565
16215
|
observers until all objects have been added.
|
15566
16216
|
|
15567
16217
|
```javascript
|
15568
|
-
var colors = ["red"
|
15569
|
-
colors.unshiftObjects(["black", "white"]); // ["black", "white", "red"
|
15570
|
-
colors.unshiftObjects("yellow");
|
16218
|
+
var colors = ["red"];
|
16219
|
+
colors.unshiftObjects(["black", "white"]); // ["black", "white", "red"]
|
16220
|
+
colors.unshiftObjects("yellow"); // Type Error: 'undefined' is not a function
|
15571
16221
|
```
|
15572
16222
|
|
15573
16223
|
@method unshiftObjects
|
@@ -17953,32 +18603,31 @@ Ember.Deferred = Deferred;
|
|
17953
18603
|
var forEach = Ember.ArrayPolyfills.forEach;
|
17954
18604
|
|
17955
18605
|
/**
|
17956
|
-
@module ember
|
17957
|
-
@submodule ember-runtime
|
18606
|
+
@module ember
|
18607
|
+
@submodule ember-runtime
|
17958
18608
|
*/
|
17959
18609
|
|
17960
18610
|
var loadHooks = Ember.ENV.EMBER_LOAD_HOOKS || {};
|
17961
18611
|
var loaded = {};
|
17962
18612
|
|
17963
18613
|
/**
|
18614
|
+
Detects when a specific package of Ember (e.g. 'Ember.Handlebars')
|
18615
|
+
has fully loaded and is available for extension.
|
17964
18616
|
|
17965
|
-
|
17966
|
-
|
18617
|
+
The provided `callback` will be called with the `name` passed
|
18618
|
+
resolved from a string into the object:
|
17967
18619
|
|
17968
|
-
The provided `callback` will be called with the `name` passed
|
17969
|
-
resolved from a string into the object:
|
17970
|
-
|
17971
|
-
```javascript
|
17972
|
-
Ember.onLoad('Ember.Handlebars' function(hbars){
|
17973
|
-
hbars.registerHelper(...);
|
17974
|
-
});
|
17975
|
-
```
|
17976
18620
|
|
18621
|
+
``` javascript
|
18622
|
+
Ember.onLoad('Ember.Handlebars' function(hbars){
|
18623
|
+
hbars.registerHelper(...);
|
18624
|
+
});
|
18625
|
+
```
|
17977
18626
|
|
17978
|
-
@method onLoad
|
17979
|
-
@for Ember
|
17980
|
-
@param name {String} name of hook
|
17981
|
-
@param callback {Function} callback to be called
|
18627
|
+
@method onLoad
|
18628
|
+
@for Ember
|
18629
|
+
@param name {String} name of hook
|
18630
|
+
@param callback {Function} callback to be called
|
17982
18631
|
*/
|
17983
18632
|
Ember.onLoad = function(name, callback) {
|
17984
18633
|
var object;
|
@@ -17992,14 +18641,13 @@ Ember.onLoad = function(name, callback) {
|
|
17992
18641
|
};
|
17993
18642
|
|
17994
18643
|
/**
|
18644
|
+
Called when an Ember.js package (e.g Ember.Handlebars) has finished
|
18645
|
+
loading. Triggers any callbacks registered for this event.
|
17995
18646
|
|
17996
|
-
|
17997
|
-
|
17998
|
-
|
17999
|
-
@
|
18000
|
-
@for Ember
|
18001
|
-
@param name {String} name of hook
|
18002
|
-
@param object {Object} object to pass to callbacks
|
18647
|
+
@method runLoadHooks
|
18648
|
+
@for Ember
|
18649
|
+
@param name {String} name of hook
|
18650
|
+
@param object {Object} object to pass to callbacks
|
18003
18651
|
*/
|
18004
18652
|
Ember.runLoadHooks = function(name, object) {
|
18005
18653
|
loaded[name] = object;
|