ember-source 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +528 -206
- data/dist/ember-data-deps.min.js +8 -10
- data/dist/ember-data-deps.prod.js +516 -196
- data/dist/ember-debug.js +12 -8
- data/dist/ember-runtime.js +528 -206
- data/dist/ember-runtime.min.js +8 -10
- data/dist/ember-runtime.prod.js +516 -196
- data/dist/ember-spade.js +13 -1
- data/dist/ember-template-compiler.js +3 -21
- data/dist/ember-template-compiler.min.js +5 -7
- data/dist/ember-template-compiler.prod.js +1 -17
- data/dist/ember-tests.js +13 -1
- data/dist/ember.js +1030 -525
- data/dist/ember.min.js +12 -14
- data/dist/ember.prod.js +977 -501
- data/lib/ember/version.rb +1 -7
- metadata +5 -5
data/dist/ember.min.js
CHANGED
@@ -1,22 +1,20 @@
|
|
1
1
|
// ==========================================================================
|
2
2
|
// Project: Ember - JavaScript Application Framework
|
3
|
-
// Copyright:
|
4
|
-
// Portions
|
5
|
-
// Portions
|
3
|
+
// Copyright: Copyright 2011-2013 Tilde Inc. and contributors
|
4
|
+
// Portions Copyright 2006-2011 Strobe Inc.
|
5
|
+
// Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
6
6
|
// License: Licensed under MIT license
|
7
7
|
// See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
8
8
|
// ==========================================================================
|
9
9
|
|
10
10
|
|
11
|
-
// Version:
|
12
|
-
// Last commit: 697d46e (2014-01-13 21:44:17 -0500)
|
11
|
+
// Version: 1.1.0
|
13
12
|
|
14
|
-
|
15
|
-
!function(){var e,t;!function(){var r={},n={};e=function(e,t,n){r[e]={deps:t,callback:n}},t=function(e){if(n[e])return n[e];n[e]={};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,l=o.length;l>c;c++)"exports"===o[c]?a.push(u={}):a.push(t(o[c]));var h=s.apply(this,a);return n[e]=u||h}}(),function(){function e(e){var t;r.console?t=r.console:"undefined"!=typeof console&&(t=console);var n="object"==typeof t?t[e]:null;return n?n.apply?function(){n.apply(t,arguments)}:function(){var e=Array.prototype.join.call(arguments,", ");n(e)}:void 0}function t(e,t){if(!e)try{throw new Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},0)}}"undefined"==typeof Ember&&(Ember={});var r=Ember.imports=Ember.imports||this,n=Ember.exports=Ember.exports||this;Ember.lookup=Ember.lookup||this,n.Em=n.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.0.1","undefined"==typeof ENV&&(n.ENV={}),"undefined"==typeof ENV.DISABLE_RANGE_API&&(ENV.DISABLE_RANGE_API=!0),Ember.ENV=Ember.ENV||ENV,Ember.config=Ember.config||{},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,"undefined"==typeof Ember.EXTEND_PROTOTYPES&&(Ember.EXTEND_PROTOTYPES=!0),Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.debug&&(Ember.debug=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(e,t){return t}),Ember.uuid=0,Ember.Logger={log:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K,assert:e("assert")||t},Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.call(t||this);try{return e.call(t||this)}catch(r){Ember.onerror(r)}},Ember.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return Ember.isNone(e)||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(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,o=0,s=[],a={},u=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var c={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t="ember");var n=t+o++;return e&&(c.value=n,r(e,i,c)),n},Ember.guidFor=function(e){if(void 0===e)return"(undefined)";if(null===e)return"(null)";var t,n=typeof e;switch(n){case"number":return t=s[e],t||(t=s[e]="nu"+e),t;case"string":return t=a[e],t||(t=a[e]="st"+o++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+o++,c.value=t,r(e,i,c),t)}};var l={writable:!0,configurable:!1,enumerable:!1,value:null},h=Ember.GUID_KEY+"_meta";Ember.META_KEY=h;var m={descs:{},watching:{}};u&&(m.values={}),Ember.EMPTY_META=m,Object.freeze&&Object.freeze(m);var f=Ember.platform.defineProperty.isSimulated;f&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){}),Ember.meta=function(t,i){var o=t[h];return i===!1?o||m:(o?o.source!==t&&(f||r(t,h,l),o=n(o),o.descs=n(o.descs),o.watching=n(o.watching),o.cache={},o.source=t,u&&(o.values=n(o.values)),t[h]=o):(f||r(t,h,l),o=new e(t),u&&(o.values={}),t[h]=o,o.descs.constructor=null),o)},Ember.getMeta=function(e,t){var r=Ember.meta(e,!1);return r[t]},Ember.setMeta=function(e,t,r){var n=Ember.meta(e,!0);return n[t]=r,r},Ember.metaPath=function(e,t,r){for(var i,o,s=Ember.meta(e,r),a=0,u=t.length;u>a;a++){if(i=t[a],o=s[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=s[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=s[i]={__ember_source__:e}}s=o}return o},Ember.wrap=function(e,t){function r(){}function n(){var n,i=this._super;return this._super=t||r,n=e.apply(this,arguments),this._super=i,n}return n.wrappedFunction=e,n.__ember_observes__=e.__ember_observes__,n.__ember_observesBefore__=e.__ember_observesBefore__,n.__ember_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 d={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){d["[object "+e+"]"]=e.toLowerCase()});var v=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):d[v.call(e)]||"object","function"===t?Ember.Object&&Ember.Object.detect(e)&&(t="class"):"object"===t&&(t=e instanceof Error?"error":Ember.Object&&e instanceof Ember.Object?"instance":"object"),t}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,s=e.length;s>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=function(){var e="undefined"!=typeof window?window.performance||{}:{},t=e.now||e.mozNow||e.webkitNow||e.msNow||e.oNow;return t?t.bind(e):function(){return+new Date}}();Ember.Instrumentation.instrument=function(e,i,o,s){function a(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return o.call(s)}function u(e){i=i||{},i.exception=e}function c(){for(p=0,d=m.length;d>p;p++)f=m[p],f.after(e,n(),i,b[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(l)}var l,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(l=e+": "+i.object,console.time(l)),m||(m=r(e)),0===m.length)return h=o.call(s),Ember.STRUCTURED_PROFILE&&console.timeEnd(l),h;var f,p,d,b=[];return Ember.tryCatchFinally(a,u,c)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),s=[],a=0,u=o.length;u>a;a++)i=o[a],"*"===i?s.push("[^\\.]*"):s.push(i);s=s.join("\\."),s+="(\\..*)?";var c={pattern:r,regex:new RegExp("^"+s+"$"),object:n};return e.push(c),t={},c},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,o=e.length;o>i;i++)e[i]===r&&(n=i);e.splice(n,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e,t,r,n;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,l=t,h=r;a.length;)s=h>c?c:h,0>=s&&(s=0),o=a.splice(0,c),o=[l,s].concat(o),l+=c,h-=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 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,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get)}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i+=3)if(t===e[i]&&r===e[i+1]){n=i;break}return n}function t(e,t){var r,n=f(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=m(n.listeners)),r=n.listeners[t],r&&!n.listeners.hasOwnProperty(t)?r=n.listeners[t]=n.listeners[t].slice():r||(r=n.listeners[t]=[]),r}function r(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r];if(o)for(var s=o.length-3;s>=0;s-=3){var a=o[s],u=o[s+1],c=o[s+2],l=e(n,a,u);-1===l&&n.push(a,u,c)}}function n(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r],s=[];if(o){for(var a=o.length-3;a>=0;a-=3){var u=o[a],c=o[a+1],l=o[a+2],h=e(n,u,c);-1===h&&(n.push(u,c,l),s.push(u,c,l))}return s}}function i(r,n,i,o,s){o||"function"!=typeof i||(o=i,i=null);var a=t(r,n),u=e(a,i,o),c=0;s&&(c|=b),-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!==l&&(c[l+2]&=~v)}o||"function"!=typeof i||(o=i,i=null);var c=t(r,n),l=e(c,i,o);return-1!==l&&(c[l+2]|=v),Ember.tryFinally(a,u)}function a(r,n,i,o,s){function a(){return s.call(i)}function u(){for(var e=0,t=f.length;t>e;e++){var r=f[e];l[r+2]&=~v}}o||"function"!=typeof i||(o=i,i=null);var c,l,h,m,f=[];for(h=0,m=n.length;m>h;h++){c=n[h],l=t(r,c);var p=e(l,i,o);-1!==p&&(l[p+2]|=v,f.push(p))}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&v||(c&b&&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 l(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,s=i.length;s>o;o+=3){var a=i[o],u=i[o+1];r.push([a,u])}return r}var m=Ember.create,f=Ember.meta,p=Ember.META_KEY,d=[].slice,b=1,v=2;Ember.on=function(){var e=d.call(arguments,-1)[0],t=d.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=l,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,s=this.observers,a=e(t),u=o[a];return u||(o[a]=u={}),i=u[r],void 0===i&&(i=s.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),s[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t){var n=h(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=h(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),l(e,t)))}function r(t,r,n){if(!t.isDestroying){var o=w,s=!o;s&&(o=w={}),i(e,t,r,o,n),s&&(w=null)}}function n(e,r,n){if(!e.isDestroying){var o=_,s=!o;s&&(o=_={}),i(t,e,r,o,n),s&&(_=null)}}function i(e,t,r,n,i){var o=m(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(){y++}function u(){y--,0>=y&&(E.clear(),g.flush())}function c(e,t){if(!e.isDestroying){var r,n,i=t+":before";y?(r=E.add(e,t,i),n=b(e,i,r),p(e,i,[e,t],n)):p(e,i,[e,t])}}function l(e,t){if(!e.isDestroying){var r,n=t+":change";y?(r=g.add(e,t,n),d(e,n,r)):p(e,n,[e,t])}}var h=Ember.meta,m=Ember.guidFor,f=Ember.tryFinally,p=Ember.sendEvent,d=Ember.listenersUnion,b=Ember.listenersDiff,v=Ember._ObserverSet,E=new v,g=new v,y=0;Ember.propertyWillChange=e,Ember.propertyDidChange=t;var w,_;Ember.overrideChains=function(e,t,r){s(e,t,r,!0)},Ember.beginPropertyChanges=a,Ember.endPropertyChanges=u,Ember.changeProperties=function(e,t){a(),f(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 Error("You passed an empty path");if(!e){if(o)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return i(e,s,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function(n,i,o,s){if("string"==typeof n&&(o=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,o,s);var a,u,c=n[t],l=c&&c.descs[i];return l?l.set(n,i,o):(a="object"==typeof n&&!(i in n),a&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,o):c&&c.watching[i]>0?(u=r?c.values[i]:n[i],o!==u&&(Ember.propertyWillChange(n,i),r?void 0!==u||i in n?c.values[i]=o:Ember.defineProperty(n,i,null,o):n[i]=o,Ember.propertyDidChange(n,i))):n[i]=o),o};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,r){return i(e,t,r,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet)}(),function(){var e=Ember.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(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,s,a,u,c){var l,h,m,f;return c||(c=t(e)),l=c.descs,h=c.descs[s],m=c.watching[s]>0,h instanceof Ember.Descriptor&&h.teardown(e,s),a instanceof Ember.Descriptor?(f=a,l[s]=a,n&&m?r(e,s,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[s]=void 0):(l[s]=void 0,null==a?(f=u,n&&m?(c.values[s]=u,r(e,s,{configurable:!0,enumerable:!0,set:i,get:o(s)})):e[s]=u):(f=a,r(e,s,a))),m&&Ember.overrideChains(e,s,c),e.didDefineProperty&&e.didDefineProperty(e,s,f),this}}(),function(){var e=Ember.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(l)[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,l=/^([^\.\*]+)/,h=[];Ember.flushPendingChains=function(){if(0!==h.length){var e=h;h=[],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===h.length)}};var m=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)}}},f=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=f.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&&m(e,this._key,this),this._watching=!1}},p.copy=function(e){var t,r=new f(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 h.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 f(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&&(m(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||!h.test(e)}var t=Ember.meta,r=Ember.GUID_KEY,n=Ember.META_KEY,i=Ember.removeChainWatcher,o=Ember.watchKey,s=Ember.unwatchKey,a=Ember.watchPath,u=Ember.unwatchPath,c=Ember.typeOf,l=Ember.generateGuid,h=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"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)&&l(e,"ember"),i&&i.value()!==e&&(n.chains=i.copy(e))};var m=[];Ember.destroy=function(e){var t,r,o,s,a=e[n];if(a&&(e[n]=null,t=a.chains))for(m.push(t);m.length>0;){if(t=m.pop(),r=t._chains)for(o in r)r.hasOwnProperty(o)&&m.push(r[o]);t._watching&&(s=t._object,s&&i(s,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=f(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var s,a,u,c,l,h=r._dependentKeys;if(h)for(s=t(o),a=0,u=h.length;u>a;a++)c=h[a],l=e(s,c),l[i]=(l[i]||0)+1,p(n,c)}function n(r,n,i,o){var s,a,u,c,l,h=r._dependentKeys;if(h)for(s=t(o),a=0,u=h.length;u>a;a++)c=h[a],l=e(s,c),l[i]=(l[i]||0)-1,d(n,c)}function i(e,t){this.func=e,this._cacheable=t&&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=m.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function u(e,t){Ember.computed[e]=function(){var e=m.call(arguments),r=Ember.computed(function(){return t.apply(this,[s(this,e)])});return r.property.apply(r,e)}}var c=Ember.get,l=Ember.set,h=Ember.meta,m=[].slice,f=Ember.create,p=(Ember.META_KEY,Ember.watch),d=Ember.unwatch;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var b=i.prototype;b.cacheable=function(e){return this._cacheable=e!==!1,this},b.volatile=function(){return this.cacheable(!1)},b.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},b.property=function(){for(var e=[],t=0,r=arguments.length;r>t;t++)e.push(arguments[t]);return this._dependentKeys=e,this},b.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},b.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=h(e);t in r.cache&&(delete r.cache[t],n(this,e,t,r))}},b.get=function(e,t){var n,i,s,a;if(this._cacheable){if(s=h(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},b.set=function(e,t,n){var i,o,s,a=this._cacheable,u=this.func,c=h(e,a),l=c.watching[t],m=this._suspended,f=!1,p=c.cache;if(this._readOnly)throw new Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(a&&p.hasOwnProperty(t)&&(o=p[t],f=!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(f&&o===s)return;l&&Ember.propertyWillChange(e,t),f&&delete p[t],a&&(f||r(this,e,t,c),p[t]=s),l&&Ember.propertyDidChange(e,t)}finally{this._suspended=m}return s},b.teardown=function(e,t){var r=h(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=m.call(arguments,0,-1),e=m.call(arguments,-1)[0]),"function"!=typeof e)throw new Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=h(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?!!r.match(t):!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?(l(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;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};
|
16
|
-
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,l,h,m,f=t.options,p=f&&f.before,d=f&&f.after,b=0,v=r.length;for(v&&p&&p();v>b;)c=r[b],l=r[b+1],h=r[b+2],m=r[b+3],"string"==typeof l&&(l=c[l]),l&&(h&&h.length>0?l.apply(c,h):l.call(c)),b+=4;t._queueBeingFlushed=null,v&&d&&d(),-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,t){this.queueNames=e,this.options=t||{},this.options.defaultQueue||(this.options.defaultQueue=e[0]),this.instanceStack=[]}function n(e){e.begin(),s=d.setTimeout(function(){s=null,e.end()})}function i(e){var t,r,n,o,s=+new Date;e.run(function(){for(n=0,o=p.length;o>n&&(t=p[n],!(t>s));n+=2);for(r=p.splice(0,n),n=1,o=r.length;o>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),p.length&&(a=d.setTimeout(function(){i(e),a=null,u=null},p[0]-s),u=p[0])}function o(e,t){for(var r,n=-1,i=0,o=f.length;o>i;i++)if(r=f[i],r[0]===e&&r[1]===t){n=i;break}return n}var s,a,u,c=e.DeferredActionQueues,l=[].slice,h=[].pop,m=[],f=[],p=[],d=this;r.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 c(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,l.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 i=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?l.call(arguments,3):void 0;return this.currentInstance||n(this),this.currentInstance.schedule(e,t,r,o,!1,i)},deferOnce:function(e,t,r){r||(r=t,t=null),"string"==typeof r&&(r=t[r]);var i=this.DEBUG?(new Error).stack:void 0,o=arguments.length>3?l.call(arguments,3):void 0;return this.currentInstance||n(this),this.currentInstance.schedule(e,t,r,o,!0,i)},setTimeout:function(){var e=this,t=h.call(arguments),r=arguments[0],n=arguments[1],o=+new Date+t;n||(n=r,r=null),"string"==typeof n&&(n=r[n]);var s,c;arguments.length>2?(c=l.call(arguments,2),s=function(){n.apply(r,c)}):s=function(){n.call(r)};var m,f;for(m=0,f=p.length;f>m&&!(o<p[m]);m+=2);return p.splice(m,0,o,s),a&&o>u?s:(a&&(clearTimeout(a),a=null),a=d.setTimeout(function(){i(e),a=null,u=null},t),u=o,s)},throttle:function(e,t){for(var r,n=this,i=arguments,o=h.call(i),s=0,a=m.length;a>s;s++)if(r=m[s],r[0]===e&&r[1]===t)return;var u=d.setTimeout(function(){n.run.apply(n,i);for(var o=-1,s=0,a=m.length;a>s;s++)if(r=m[s],r[0]===e&&r[1]===t){o=s;break}o>-1&&m.splice(o,1)},o);m.push([e,t,u])},debounce:function(e,t){var r,n,i,s=this,a=arguments,u=h.call(a);"number"==typeof u?(r=u,u=!1):r=h.call(a),n=o(e,t),-1!==n&&(i=f[n],f.splice(n,1),clearTimeout(i[2]));var c=d.setTimeout(function(){u||s.run.apply(s,a),n=o(e,t),n&&f.splice(n,1)},r);u&&-1===n&&s.run.apply(s,a),f.push([e,t,c])},cancelTimers:function(){var e,t;for(e=0,t=m.length;t>e;e++)clearTimeout(m[e][2]);for(m=[],e=0,t=f.length;t>e;e++)clearTimeout(f[e][2]);f=[],a&&(clearTimeout(a),a=null),p=[],s&&(clearTimeout(s),s=null)},hasTimers:function(){return!!p.length||s},cancel:function(e){if(e&&"object"==typeof e&&e.queue&&e.method)return e.queue.cancel(e);if("function"==typeof e)for(var t=0,r=p.length;r>t;t+=2)if(p[t+1]===e)return p.splice(t,2),!0}},r.prototype.schedule=r.prototype.defer,r.prototype.scheduleOnce=r.prototype.deferOnce,r.prototype.later=r.prototype.setTimeout,t.Backburner=r})}(),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=V(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=C.call(t,function(e){if(e instanceof y)return e;var t=new y;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 y?(r=T(t),e[r]?S:(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=V(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,l,h,m){if(n instanceof Ember.Descriptor){if(n===w&&c[t])return S;n.func&&(n=o(i,t,n,l,c)),c[t]=n,l[t]=void 0}else r(n)?n=s(e,t,n,l,c):h&&O.call(h,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?n=a(e,t,n,l):m&&O.call(m,t)>=0&&(n=u(e,t,n,l)),c[t]=void 0,l[t]=n}function l(e,t,r,o,s,a){function u(e){delete r[e],delete o[e]}for(var h,m,f,p,d,b,v=0,E=e.length;E>v;v++)if(h=e[v],m=n(t,h),m!==S)if(m){b=Ember.meta(s),s.willMergeMixin&&s.willMergeMixin(m),p=i("concatenatedProperties",m,o,s),d=i("mergedProperties",m,o,s);for(f in m)m.hasOwnProperty(f)&&(a.push(f),c(s,f,m[f],b,r,o,p,d));m.hasOwnProperty("toString")&&(s.toString=m.toString)}else h.mixins&&(l(h.mixins,t,r,o,s,a),h._without&&A.call(h._without,u))}function h(e,t,r,n){if(N.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=V(n.bindings)):i=n.bindings={},i[t]=r}}function m(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 f(e,t){return m(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 d(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 b(e,t,r){var n=e[t];"function"==typeof n&&(d(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),d(e,t,n,"__ember_observes__","removeObserver"),d(e,t,n,"__ember_listens__","removeListener")),"function"==typeof r&&(d(e,t,r,"__ember_observesBefore__","addBeforeObserver"),d(e,t,r,"__ember_observes__","addObserver"),d(e,t,r,"__ember_listens__","addListener"))}function v(t,r,n){var i,o,s,a={},u={},c=Ember.meta(t),m=[];l(r,e(t),a,u,t,m);for(var d=0,v=m.length;v>d;d++)if(i=m[d],"constructor"!==i&&u.hasOwnProperty(i)&&(s=a[i],o=u[i],s!==w)){for(;s&&s instanceof _;){var E=p(t,s,c,a,u);s=E.desc,o=E.value}(void 0!==s||void 0!==o)&&(b(t,i,o),h(t,i,o,c),x(t,i,s,o,c))}return n||f(t,c),t}function E(e,t,r){var n=T(e);if(r[n])return!1;if(r[n]=!0,e===t)return!0;for(var i=e.mixins,o=i?i.length:0;--o>=0;)if(E(i[o],t,r))return!0;return!1}function g(e,t,r){if(!r[T(t)])if(r[T(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){g(e,t,r)})}var y,w,_,C=Ember.ArrayPolyfills.map,O=Ember.ArrayPolyfills.indexOf,A=Ember.ArrayPolyfills.forEach,P=[].slice,V=Ember.create,x=Ember.defineProperty,T=Ember.guidFor,S={},N=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=P.call(arguments,1);return v(e,t,!1),e},Ember.Mixin=function(){return t(this,arguments)},y=Ember.Mixin,y.prototype={properties:null,mixins:null,ownerConstructor:null},y._apply=v,y.applyPartial=function(e){var t=P.call(arguments,1);return v(e,t,!0)},y.finishPartial=f,Ember.anyUnprocessedMixins=!1,y.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var D=y.prototype;D.reopen=function(){var e,t;this.properties?(e=y.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 y?i.push(e):(t=y.create(),t.properties=e,i.push(t));return this},D.apply=function(e){return v(e,[this],!1)},D.applyPartial=function(e){return v(e,[this],!0)},D.detect=function(e){if(!e)return!1;if(e instanceof y)return E(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[T(this)]:!1},D.without=function(){var e=new y(this);return e._without=P.call(arguments),e},D.keys=function(){var e={},t={},r=[];g(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},y.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},w=new Ember.Descriptor,w.toString=function(){return"(Required Property)"},Ember.required=function(){return w},_=function(e){this.methodName=e},_.prototype=new Ember.Descriptor,Ember.alias=function(e){return new _(e)},Ember.alias=Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.",Ember.alias),Ember.aliasMethod=function(e){return new _(e)},Ember.observer=function(e){var t=P.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++)arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=P.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),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",["exports"],function(e){"use strict";function t(){return function(e,t){process.nextTick(function(){e(t)})}}function r(){return function(e,t){setImmediate(function(){e(t)})}}function n(){var e=[],t=new a(function(){var t=e.slice();e=[],t.forEach(function(e){var t=e[0],r=e[1];t(r)})}),r=document.createElement("div");return t.observe(r,{attributes:!0}),window.addEventListener("unload",function(){t.disconnect(),t=null},!1),function(t,n){e.push([t,n]),r.setAttribute("drainQueue","drainQueue")}}function i(){return function(e,t){u.setTimeout(function(){e(t)},1)}}var o,s="undefined"!=typeof window?window:{},a=s.MutationObserver||s.WebKitMutationObserver,u="undefined"!=typeof global?global:this;o="function"==typeof setImmediate?r():"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?t():a?n():i(),e.async=o}),e("rsvp/config",["rsvp/async","exports"],function(e,t){"use strict";var r=e.async,n={};n.async=r,t.config=n}),e("rsvp/defer",["rsvp/promise","exports"],function(e,t){"use strict";function r(){var e={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 l=0;l<i.length;l++)o=i[l],s=o[0],a=o[1],"object"!=typeof r&&(r={detail:r}),u=new t(e,r),s.call(a,u)}};e.EventTarget=i}),e("rsvp/hash",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=0;for(var r in e)t++;return t}function n(e){var t={},n=i(),o=r(e);0===o&&n.resolve({});var s=function(e){return function(t){a(e,t)}},a=function(e,r){t[e]=r,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","exports"],function(e,t,r){"use strict";function n(e){return i(e)||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function o(e){l.onerror&&l.onerror(e.detail)}function s(e,t){e===t?u(e,t):a(e,t)||u(e,t)}function a(e,t){var r,o=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(n(t)&&(o=t.then,i(o)))return o.call(t,function(n){return r?!0:(r=!0,t!==n?s(e,n):u(e,n),void 0)},function(t){return r?!0:(r=!0,c(e,t),void 0)}),!0}catch(a){return c(e,a),!0}return!1}function u(e,t){l.async(function(){e.trigger("promise:resolved",{detail:t}),e.isFulfilled=!0,e.fulfillmentValue=t})}function c(e,t){l.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedReason=t})}var l=e.config,h=t.EventTarget,m=function(e){var t=this,r=!1;if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the sole argument to the promise constructor");if(!(t instanceof m))return new m(e);var n=function(e){r||(r=!0,s(t,e))},i=function(e){r||(r=!0,c(t,e))};this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this),this.on("error",o);try{e(n,i)}catch(a){i(a)}},f=function(e,t,r,n){var o,u,l,h,m=i(r);if(m)try{o=r(n.detail),l=!0}catch(f){h=!0,u=f}else o=n.detail,l=!0;a(t,o)||(m&&l?s(t,o):h?c(t,u):"resolve"===e?s(t,o):"reject"===e&&c(t,o))};m.prototype={constructor:m,isRejected:void 0,isFulfilled:void 0,rejectedReason:void 0,fulfillmentValue:void 0,then:function(e,t){this.off("error",o);var r=new this.constructor(function(){});return this.isFulfilled&&l.async(function(t){f("resolve",r,e,{detail:t.fulfillmentValue})},this),this.isRejected&&l.async(function(e){f("reject",r,t,{detail:e.rejectedReason})},this),this.on("promise:resolved",function(t){f("resolve",r,e,t)}),this.on("promise:failed",function(e){f("reject",r,t,e)}),r},fail:function(e){return this.then(null,e)}},h.mixin(m.prototype),r.Promise=m}),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","exports"],function(e,t,r,n,i,o,s,a,u,c,l){"use strict";function h(e,t){g[e]=t}var m=e.EventTarget,f=t.Promise,p=r.denodeify,d=n.all,b=i.hash,v=o.rethrow,E=s.defer,g=a.config,y=u.resolve,w=c.reject;l.Promise=f,l.EventTarget=m,l.all=d,l.hash=b,l.rethrow=v,l.defer=E,l.denodeify=p,l.configure=h,l.resolve=y,l.reject=w})}(),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),!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(i){if(o.has(t))return o.get(t);if("function"!=typeof i.extend||!Ember.MODEL_FACTORY_INJECTIONS&&"model"===s)return i;var c=a(e,t),l=u(e,t);return l._toString=e.makeToString(i,t),r=i.extend(c),r.reopenClass(l),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 l(e,t){e.cache.eachLocal(function(r,n){o(e,r,"instantiate")!==!1&&t(n)})}function h(e){e.cache.eachLocal(function(t,r){o(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}function m(e,t,r,n){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:r,fullName:n})}function f(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,n){var i;-1!==e.indexOf(":")?(n=r,r=t,i=e):i=e+":"+t;var o=this.normalize(i);this.registry.set(o,r),this._options.set(o,n||{})},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 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:!!s(this,e)},optionsForType:function(e,t){this.parent&&r("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,n){this.parent&&r("typeInjection"),m(this.typeInjections,e,t,n)},injection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.typeInjection(e,t,n):(f(this.injections,e,t,n),void 0)},factoryTypeInjection:function(e,t,n){this.parent&&r("factoryTypeInjection"),m(this.factoryTypeInjections,e,t,n)},factoryInjection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.factoryTypeInjection(e,t,n):(f(this.factoryInjections,e,t,n),void 0)},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],l(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++)h(this.children[e]);h(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;Ember.compare=function n(e,t){if(e===t)return 0;var r=Ember.typeOf(e),i=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===r&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===i&&o.detect(t.constructor))return 1-t.constructor.compare(t,e)}var s=Ember.ORDER_DEFINITION_MAPPING;if(!s){var a=Ember.ORDER_DEFINITION;s=Ember.ORDER_DEFINITION_MAPPING={};var u,c;for(u=0,c=a.length;c>u;++u)s[a[u]]=u;delete Ember.ORDER_DEFINITION}var l=s[r],h=s[i];if(h>l)return-1;if(l>h)return 1;switch(r){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var m=e.localeCompare(t);return 0>m?-1:m>0?1:0;case"array":for(var f=e.length,p=t.length,d=Math.min(f,p),b=0,v=0;0===b&&d>v;)b=n(e[v],t[v]),v++;return 0!==b?b:p>f?-1:f>p?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var E=e.getTime(),g=t.getTime();return g>E?-1:E>g?1:0;default:return 0}},Ember.copy=function(t,r){return"object"!=typeof t||null===t?t:Ember.Copyable&&Ember.Copyable.detect(t)?t.copy(r):e(t,r,r?[]:null,r?[]:null)},Ember.inspect=function(e){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)&&(Ember.keys=function(e){var t=[];for(var r in e)"__"!==r.substring(0,2)&&"_super"!==r&&e.hasOwnProperty(r)&&t.push(r);return t});var r=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){for(var e=Error.apply(this,arguments),t=0;t<r.length;t++)this[r[t]]=e[r[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),function(){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,l=e(),h=0;o>h&&!c;h++)s=this.nextObject(h,u,l),(c=r.call(i,s,h,this))&&(a=s),u=s;return s=u=null,l=t(l),a},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:function(){return this.every(r.apply(this,arguments))},everyProperty:Ember.aliasMethod("everyBy"),any:function(e,t){return!!this.find(function(r,n,i){return!!e.call(t,r,n,i)})},some:Ember.aliasMethod("any"),anyBy:function(){return this.any(r.apply(this,arguments))},someProperty:Ember.aliasMethod("anyBy"),reduce:function(e,t,r){if("function"!=typeof e)throw new TypeError;var n=t;return this.forEach(function(t,i){n=e.call(null,n,t,i,this,r)},this),n},invoke:function(e){var t,r=Ember.A();return arguments.length>1&&(t=o.call(arguments,1)),this.forEach(function(n,i){var o=n&&n[e];"function"==typeof o&&(r[i]=t?o.apply(n,t):o.call(n))},this),r},toArray:function(){var e=Ember.A();return this.forEach(function(t,r){e[r]=t}),e},compact:function(){return this.filter(function(e){return null!=e})},without:function(e){if(!this.contains(e))return this;var t=Ember.A();return this.forEach(function(r){r!==e&&(t[t.length]=r)}),t},uniq:function(){var e=Ember.A();return this.forEach(function(t){s(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this
|
17
|
-
}})}(),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"),l=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==l&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){function e(e,t,r){this.callbacks=e,this.cp=t,this.instanceMeta=r,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.changedItems={}}function t(e,t,r){this.dependentArray=e,this.index=t,this.item=e.objectAt(t),this.trackedArray=r,this.beforeObserver=null,this.observer=null}function r(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 n(e,t,n,i,o){E(e,function(s,a){o.setValue(t.addedItem.call(this,o.getValue(),s,r(e,s,a,i,n),o.sugarMeta))},this)}function i(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 o(e,t,r){this.context=e,this.propertyName=t,this.cache=l(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=r}function s(e){var t=this;this.options=e,this._instanceMetas={},this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,r,e)};var r=function(e){var r=(t._dependentKeys,t._instanceMeta(this,e)),o=t._callbacks();i.call(this,t,e),E(t._dependentKeys,function(e){var n=u(this,e),i=r.dependentArrays[e];n===i?t._previousItemPropertyKeys[e]&&(delete t._previousItemPropertyKeys[e],r.dependentArraysObserver.setupPropertyObservers(e,t._itemPropertyKeys[e])):(r.dependentArrays[e]=n,i&&r.dependentArraysObserver.teardownObservers(i,e),n&&r.dependentArraysObserver.setupObservers(n,e))},this),E(t._dependentKeys,function(i){var s=u(this,i);s&&n.call(this,s,o,t,e,r)},this)};this.func=function(e){return r.call(this,e),t._instanceMeta(this,e).getValue()}}function a(e){return e}var u=Ember.get,c=(Ember.set,Ember.guidFor),l=Ember.meta,h=Ember.addBeforeObserver,m=Ember.removeBeforeObserver,f=Ember.addObserver,p=Ember.removeObserver,d=Ember.ComputedProperty,b=[].slice,v=Ember.create,E=Ember.EnumerableUtils.forEach,g=/^(.*)\.@each\.(.*)/,y=/(.*\.@each){2,}/;e.prototype={setValue:function(e){this.instanceMeta.setValue(e)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[c(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[c(e)],this.teardownPropertyObservers(t,r),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},setupPropertyObservers:function(e,t){var r=u(this.instanceMeta.context,e),n=u(r,"length"),i=new Array(n);this.resetTransformations(e,i),E(r,function(n,o){var s=this.createPropertyObserverContext(r,o,this.trackedArraysByGuid[e]);i[o]=s,E(t,function(e){h(n,e,this,s.beforeObserver),f(n,e,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&&E(e,function(e){r=e.beforeObserver,n=e.observer,i=e.item,E(t,function(e){m(i,e,o,r),p(i,e,o,n)})})})},createPropertyObserverContext:function(e,r,n){var i=new t(e,r,n);return this.createPropertyObserver(i),i},createPropertyObserver:function(e){var t=this;e.beforeObserver=function(r,n){return t.updateIndexes(e.trackedArray,e.dependentArray),t.itemPropertyWillChange(r,n,e.dependentArray,e.index)},e.observer=function(r,n){return t.itemPropertyDidChange(r,n,e.dependentArray,e.index)}},resetTransformations:function(e,t){this.trackedArraysByGuid[e]=new Ember.TrackedArray(t)},addTransformation:function(e,t,r){var n=this.trackedArraysByGuid[e];n&&n.addItems(t,r)},removeTransformation:function(e,t,r){var n=this.trackedArraysByGuid[e];return n?n.removeItems(t,r):[]},updateIndexes:function(e,t){var r=u(t,"length");e.apply(function(e,t,n){n!==Ember.TrackedArray.DELETE&&(n!==Ember.TrackedArray.RETAIN||e.length!==r||0!==t)&&E(e,function(e,r){e.index=r+t})})},dependentArrayWillChange:function(e,t,n){function i(e){m(s,e,this,l[u].beforeObserver),p(s,e,this,l[u].observer)}var o,s,a,u,l,h=this.callbacks.removedItem,f=c(e),d=this.dependentKeysByGuid[f],b=this.cp._itemPropertyKeys[d]||[];for(l=this.removeTransformation(d,t,n),u=n-1;u>=0;--u)a=t+u,s=e.objectAt(a),E(b,i,this),o=r(e,s,a,this.instanceMeta.propertyName,this.cp),this.setValue(h.call(this.instanceMeta.context,this.getValue(),s,o,this.instanceMeta.sugarMeta))},dependentArrayDidChange:function(e,t,n,i){var o,s,a=this.callbacks.addedItem,u=c(e),l=this.dependentKeysByGuid[u],m=new Array(i),p=this.cp._itemPropertyKeys[l];E(e.slice(t,t+i),function(n,i){p&&(s=m[i]=this.createPropertyObserverContext(e,t+i,this.trackedArraysByGuid[l]),E(p,function(e){h(n,e,this,s.beforeObserver),f(n,e,this,s.observer)},this)),o=r(e,n,t+i,this.instanceMeta.propertyName,this.cp),this.setValue(a.call(this.instanceMeta.context,this.getValue(),n,o,this.instanceMeta.sugarMeta))},this),this.addTransformation(l,t,m)},itemPropertyWillChange:function(e,t,r,n){var i=c(e);this.changedItems[i]||(this.changedItems[i]={array:r,index:n,obj:e,previousValues:{}}),this.changedItems[i].previousValues[t]=u(e,t)},itemPropertyDidChange:function(){Ember.run.once(this,"flushChanges")},flushChanges:function(){var e,t,n,i=this.changedItems;for(e in i)t=i[e],n=r(t.array,t.obj,t.index,this.instanceMeta.propertyName,this.cp,t.previousValues),this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context,this.getValue(),t.obj,n,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,n,this.instanceMeta.sugarMeta));this.changedItems={}}},o.prototype={getValue:function(){return this.propertyName in this.cache?this.cache[this.propertyName]:this.initialValue},setValue:function(e){void 0!==e?this.cache[this.propertyName]=e:delete this.cache[this.propertyName]}},Ember.ReduceComputedProperty=s,s.prototype=v(d.prototype),s.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||a,addedItem:e.addedItem||a}}return this.callbacks},s.prototype._hasInstanceMeta=function(e,t){var r=c(e),n=r+":"+t;return!!this._instanceMetas[n]},s.prototype._instanceMeta=function(t,r){var n=c(t),i=n+":"+r,s=this._instanceMetas[i];return s||(s=this._instanceMetas[i]=new o(t,r,this.initialValue()),s.dependentArraysObserver=new e(this._callbacks(),this,s,t,r,s.sugarMeta)),s},s.prototype.initialValue=function(){switch(typeof this.options.initialValue){case"undefined":throw new Error("reduce computed properties require an initial value: did you forget to pass one to Ember.reduceComputed?");case"function":return this.options.initialValue();default:return this.options.initialValue}},s.prototype.resetValue=function(){return this.initialValue()},s.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},s.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},s.prototype.property=function(){var e,t,r,n=this,i=(b.call(arguments),[]);return E(b.call(arguments),function(o){if(y.test(o))throw new Error("Nested @each properties not supported: "+o);(e=g.exec(o))?(t=e[1],r=e[2],n.itemPropertyKey(t,r),i.push(t)):i.push(o)}),d.prototype.property.apply(this,i)},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=b.call(arguments,0,-1),e=b.call(arguments,-1)[0]),"object"!=typeof e)throw new Error("Reduce Computed Property declared without an options hash");if(!e.initialValue)throw new Error("Reduce Computed Property declared without an initial value");var r=new s(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 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,n,i,o){function s(e){return Ember.ObjectProxy.detectInstance(e)?r(t(e,"content")):r(e)}var a,u,c,l,h;return arguments.length<4&&(o=t(e,"length")),arguments.length<3&&(i=0),i===o?i:(a=i+Math.floor((o-i)/2),u=e.objectAt(a),l=s(u),h=s(n),l===h?a:(c=this.order(u,n),0===c&&(c=h>l?-1:1),0>c?this.binarySearch(e,n,a+1,o):c>0?this.binarySearch(e,n,i,a):a))}var t=Ember.get,r=(Ember.set,Ember.guidFor),n=Ember.merge,i=[].slice,o=Ember.EnumerableUtils.forEach,s=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(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,r){var n=function(e){return t(e,r)};return Ember.computed.map(e+".@each."+r,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(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,r,n){var i;return i=2===arguments.length?function(e){return t(e,r)}:function(e){return t(e,r)===n},Ember.computed.filter(e+".@each."+r,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=i.call(arguments);return e.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(e,t,n,i){var o=r(t);return i.itemCounts[o]?++i.itemCounts[o]:i.itemCounts[o]=1,e.addObject(t),e},removedItem:function(e,t,n,i){var o=r(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 s(e.property._dependentKeys,function(e){return r(e)})},t=i.call(arguments);return t.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(t,n,i,o){var s=r(n),a=(e(i),r(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(n),t},removedItem:function(t,n,i,o){var s,a=r(n),u=(e(i),r(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(n)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,r){if(2!==arguments.length)throw new Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed.call(null,e,r,{addedItem:function(n,i,o){var s=t(this,e),a=t(this,r);return o.arrayChanged===s?a.contains(i)||n.addObject(i):n.removeObject(i),n},removedItem:function(n,i,o){var s=t(this,e),a=t(this,r);return o.arrayChanged===a?s.contains(i)&&n.addObject(i):n.removeObject(i),n}})},Ember.computed.sort=function(r,i){var s,a;return"function"==typeof i?s=function(t,r,n){n.order=i,n.binarySearch=e}:(a=i,s=function(n,i,s){function u(){var e,n,u,l=t(this,a),h=s.sortProperties=[],m=s.sortPropertyAscending={};i.property.clearItemPropertyKeys(r),o(l,function(t){-1!==(n=t.indexOf(":"))?(e=t.substring(0,n),u="desc"!==t.substring(n+1).toLowerCase()):(e=t,u=!0),h.push(e),m[e]=u,i.property.itemPropertyKey(r,e)}),l.addObserver("@each",this,c)}function c(){Ember.run.once(this,l,i.propertyName)}function l(e){u.call(this),i.property.recomputeOnce.call(this,e)}Ember.addObserver(this,a,c),u.call(this),s.order=function(e,r){for(var n,i,o,s=0;s<this.sortProperties.length;++s)if(n=this.sortProperties[s],i=Ember.compare(t(e,n),t(r,n)),0!==i)return o=this.sortPropertyAscending[n],o?i:-1*i;return 0},s.binarySearch=e}),Ember.arrayComputed.call(null,r,{initialize:s,addedItem:function(e,t,r,n){var i=n.binarySearch(e,t);return e.insertAt(i,t),e},removedItem:function(e,t,r,i){var o,s,a;return r.previousValues?(o=n({content:t},r.previousValues),a=Ember.ObjectProxy.create(o)):a=t,s=i.binarySearch(e,a),e.removeAt(s),e}})}}(),function(){Ember.RSVP=t("rsvp")}(),function(){var e=/[ _]/g,t={},r=/([a-z])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,o=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var r=0;return e.replace(/%@([0-9]+)?/g,function(e,n){return n=n?parseInt(n,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=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 Error(Ember.String.fmt("%@ does not support freezing",[this]))}})}(),function(){var e=Ember.get,t=Ember.set;Ember.Freezable=Ember.Mixin.create({isFrozen:!1,freeze:function(){return e(this,"isFrozen")?this:(t(this,"isFrozen",!0),this)}}),Ember.FROZEN_ERROR="Frozen object cannot be modified."}(),function(){var e=Ember.EnumerableUtils.forEach;Ember.MutableEnumerable=Ember.Mixin.create(Ember.Enumerable,{addObject:Ember.required(Function),addObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.addObject(e)},this),Ember.endPropertyChanges(this),this},removeObject:Ember.required(Function),removeObjects:function(t){return Ember.beginPropertyChanges(this),e(t,function(e){this.removeObject(e)},this),Ember.endPropertyChanges(this),this}})}(),function(){var e="Index out of range",t=[],r=Ember.get;Ember.set,Ember.MutableArray=Ember.Mixin.create(Ember.Array,Ember.MutableEnumerable,{replace:Ember.required(),clear:function(){var e=r(this,"length");return 0===e?this:(this.replace(0,e,t),this)},insertAt:function(t,n){if(t>r(this,"length"))throw new Error(e);return this.replace(t,0,[n]),this},removeAt:function(n,i){if("number"==typeof n){if(0>n||n>=r(this,"length"))throw new Error(e);void 0===i&&(i=1),this.replace(n,i,t)}return this},pushObject:function(e){return this.insertAt(r(this,"length"),e),e},pushObjects:function(e){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,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")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){var e=Ember.get;Ember.set,Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,actionContext:null,targetObject:Ember.computed(function(){var t=e(this,"target");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("target"),actionContextObject:Ember.computed(function(){var t=e(this,"actionContext");if("string"===Ember.typeOf(t)){var r=e(this,t);return void 0===r&&(r=e(Ember.lookup,t)),r}return t}).property("actionContext"),triggerAction:function(t){t=t||{};var r=t.action||e(this,"action"),n=t.target||e(this,"targetObject"),i=t.actionContext||e(this,"actionContextObject")||this;if(n&&r){var o;return o=n.send?n.send.apply(n,[r,i]):n[r].apply(n,[i]),o!==!1&&(o=!0),o}return!1}})}(),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;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){e.actions&&!e._actions&&(e._actions=Ember.merge(e._actions||{},e.actions),delete e.actions)},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){return t(e,"isFulfilled",!0),t(e,"content",r),r},function(r){t(e,"isRejected",!0),t(e,"reason",r)}).fail(i)}var t=Ember.set,r=Ember.get,n=Ember.RSVP.resolve,i=Ember.RSVP.rethrow,o=Ember.computed.not,s=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:o("isSettled").readOnly(),isSettled:s("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;throw new 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.operation=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._content=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,s,a=r(n,"length"),u=this._findArrayOperation(t),c=u.operation,l=u.index,h=u.rangeStart;s=new e(o,a,n),c?u.split?(this._split(l,t-h,s),i=l+1):(this._content.splice(l,0,s),i=l):(this._content.push(s),i=l),this._composeInsert(i)},removeItems:function(t,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._content.splice(a,0,n),i=a),this._composeDelete(i)},apply:function(t){var r=[],o=0;n(this._content,function(e){t(e.items,o,e.operation),e.operation!==s&&(o+=e.count,r=r.concat(e.items))}),this._content=[new e(i,r.length,r)]},_findArrayOperation:function(e){var r,n,i,o,a,u=!1;for(r=o=0,n=this._content.length;n>r;++r)if(i=this._content[r],i.operation!==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._content[t],o=i.items.slice(r),s=new e(i.operation,o.length,o);i.count=r,i.items=i.items.slice(0,r),this._content.splice(t+1,0,n,s)},_composeInsert:function(e){var t=this._content[e],r=this._content[e-1],n=this._content[e+1],i=r&&r.operation,s=n&&n.operation;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._content.splice(e,2)):this._content.splice(e,1)):s===o&&(t.count+=n.count,t.items=t.items.concat(n.items),this._content.splice(e+1,1))},_composeDelete:function(e){var t,r,n,i=this._content[e],a=i.count,u=this._content[e-1],c=u&&u.operation,l=[];c===s&&(i=u,e-=1);for(var h=e+1;a>0;++h)t=this._content[h],r=t.operation,n=t.count,r!==s?(n>a?(l=l.concat(t.items.splice(0,a)),t.count-=a,h-=1,n=a,a=0):(l=l.concat(t.items),a-=n),r===o&&(i.count-=n)):i.count+=n;return i.count>0?this._content.splice(e+1,h-1-e):this._content.splice(e,1),l}}}(),function(){function e(e,t){this.type=e,this.count=t}var t=(Ember.get,Ember.EnumerableUtils.forEach,"r"),r="f";Ember.SubArray=function(r){arguments.length<1&&(r=0),this._operations=r>0?[new e(t,r)]:[]},Ember.SubArray.prototype={addItem:function(n,i){var o=-1,s=i?t:r,a=this;return this._findOperation(n,function(r,u,c,l,h){var m,f;s===r.type?++r.count:n===c?a._operations.splice(u,0,new e(s,1)):(m=new e(s,1),f=new e(r.type,l-n+1),r.count=n-c,a._operations.splice(u+1,0,m,f)),i&&(o=r.type===t?h+(n-c):h),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 r=-1,n=this;return this._findOperation(e,function(i,o,s,a,u){i.type===t&&(r=u+(e-s)),i.count>1?--i.count:(n._operations.splice(o,1),n._composeAt(o))}),r},_findOperation:function(e,r,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 r(s,i,a,u,c),void 0;s.type===t&&(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<this._operations.length-1&&(t=this._operations[e+1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e+1,1))))}}}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function e(){var e,t,o=!1,s=function(){o||s.proto(),n(this,i,g),n(this,"_super",g);var u=a(this),h=u.proto;if(u.proto=this,e){var m=e;e=null,this.reopen.apply(this,m)}if(t){var f=t;t=null;for(var p=this.concatenatedProperties,b=0,y=f.length;y>b;b++){var w=f[b];for(var _ in w)if(w.hasOwnProperty(_)){var C=w[_],O=Ember.IS_BINDING;if(O.test(_)){var A=u.bindings;A?u.hasOwnProperty("bindings")||(A=u.bindings=r(u.bindings)):A=u.bindings={},A[_]=C}var P=u.descs[_];if(p&&E(p,_)>=0){var V=this[_];C=V?"function"==typeof V.concat?V.concat(C):Ember.makeArray(V).concat(C):Ember.makeArray(C)}P?P.set(this,_,C):"function"!=typeof this.setUnknownProperty||_ in this?v?Ember.defineProperty(this,_,null,C):this[_]=C:this.setUnknownProperty(_,C)}}}d(this,u),this.init.apply(this,arguments),u.proto=h,c(this),l(this,"init")};return s.toString=f.prototype.toString,s.willReopen=function(){o&&(s.PrototypeMixin=f.create(s.PrototypeMixin)),o=!1},s._initMixins=function(t){e=t},s._initProperties=function(e){t=e},s.proto=function(){var e=s.superclass;return e&&e.proto(),o||(o=!0,s.PrototypeMixin.applyPartial(s.prototype),u(s.prototype)),this.prototype},s}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,s=Ember.generateGuid,a=Ember.meta,u=Ember.rewatch,c=Ember.finishChains,l=Ember.sendEvent,h=Ember.destroy,m=Ember.run.schedule,f=Ember.Mixin,p=f._apply,d=f.finishPartial,b=f.prototype.reopen,v=Ember.ENV.MANDATORY_SETTER,E=Ember.EnumerableUtils.indexOf,g={configurable:!0,writable:!0,enumerable:!1,value:void 0},y=e();y.toString=function(){return"Ember.CoreObject"},y.PrototypeMixin=f.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,m("actions",this,this.willDestroy),m("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(h(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}}),y.PrototypeMixin.ownerConstructor=y,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(y.PrototypeMixin),y.__super__=null;var w=f.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=f.create(this.ClassMixin),n.PrototypeMixin=f.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,b.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,s(t,"ember"),a(t).proto=t,n.ClassMixin.apply(n),n},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),b.apply(this.PrototypeMixin,arguments),this
|
18
|
-
},reopenClass:function(){return b.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)}});w.ownerConstructor=y,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(w),y.ClassMixin=w,w.apply(y),Ember.CoreObject=y}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var s=t.length;c[t.join(".")]=r;for(var a in r)if(l.call(r,a)){var u=r[a];if(t[s]=a,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=s}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else 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,l={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e="Index out of range",t=[],r=Ember.get;Ember.set,Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return r(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,n){r(this,"content").replace(e,t,n)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){r(this,"content"),this._setupContent()},"content"),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)},"arrangedContent"),_setupArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return r(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=r(this,"arrangedContent");return e?r(e,"length"):0}),_replace:function(e,t,n){var i=r(this,"content");return i&&this.replaceContent(e,t,n),this},replace:function(){if(r(this,"arrangedContent")!==r(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,n){if(t>r(this,"content.length"))throw new Error(e);return this._replace(t,0,[n]),this},insertAt:function(e,t){if(r(this,"arrangedContent")===r(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(n,i){if("number"==typeof n){var o,s=r(this,"content"),a=r(this,"arrangedContent"),u=[];if(0>n||n>=r(this,"length"))throw new Error(e);for(void 0===i&&(i=1),o=n;n+i>o;o++)u.push(s.indexOf(a.objectAt(o)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),o=0;o<u.length;o++)this._replace(u[o],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){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){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,l=Ember.meta,h=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),o(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;s(this,n,null,e),a(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var i=l(this);if(i.proto===this)return h(this,e,null,t),t;var o=r(this,"content");return n(o,e,t)}})}(),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 l=e.objectAt(s);l&&(Ember.removeBeforeObserver(l,t,r,"contentKeyWillChange"),Ember.removeObserver(l,t,r,"contentKeyDidChange"),c=n(l),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),i&&0!==i.length?t(this,r,n,i):this.splice(r,n),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 Error(Ember.FROZEN_ERROR);var n=e(this,"length");if(0===n)return this;var i;this.enumerableContentWillChange(n,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var o=0;n>o;o++)i=r(this[o]),delete this[i],delete this[o];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(n,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var r=e(this,"length");if(e(t,"length")!==r)return!1;for(;--r>=0;)if(!t.contains(this[r]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:void 0}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:void 0}),addObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,s=r(i),a=this[s],u=e(this,"length");return a>=0&&u>a&&this[a]===i?this:(o=[i],this.enumerableContentWillChange(null,o),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[s]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,o),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,s,a=r(i),u=this[a],c=e(this,"length"),l=0===u,h=u===c-1;return u>=0&&c>u&&this[u]===i&&(s=[i],this.enumerableContentWillChange(s,null),l&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),c-1>u&&(o=this[c-1],this[u]=o,this[r(o)]=u),delete this[a],delete this[c-1],t(this,"length",c-1),l&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(s,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin;Ember.get;var t=Ember.Object.extend(e);t.reopenClass({promise:function(e,r){var n=t.create();return e.call(r,n),n}}),Ember.Deferred=t}(),function(){var e=Ember.ArrayPolyfills.forEach,t=Ember.ENV.EMBER_LOAD_HOOKS||{},r={};Ember.onLoad=function(e,n){var i;t[e]=t[e]||Ember.A(),t[e].pushObject(n),(i=r[e])&&n(i)},Ember.runLoadHooks=function(n,i){r[n]=i,t[n]&&e.call(t[n],function(e){e(i)})}}(),function(){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(function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(r,n,i,o){var s=e(this,"isSorted");if(s){var a=e(this,"arrangedContent"),u=r.slice(n,n+i),c=e(this,"sortProperties");t(u,function(e){a.removeObject(e),t(c,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var s=e(this,"isSorted"),a=e(this,"sortProperties");if(s){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(a,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),s=i&&this.orderBy(t,i),a=o&&this.orderBy(t,o);(0>s||a>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,s,a;return r===n?r:(a=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=a.objectAt(i),s=this.orderBy(o,t),0>s?this._binarySearch(t,i+1,n):s>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var s=e(this,"_subControllers"),a=s.slice(n,n+i);t(a,function(e){e&&e.destroy()}),r(s,n,i,new Array(o)),this._super(n,i,o)},init:function(){this._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 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)}(),function(){var e=Ember.imports.jQuery;Ember.$=e}(),function(){if(Ember.$){var e=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(e,function(e){Ember.$.event.fixHooks[e]={props:["dataTransfer"]}})}}(),function(){function e(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,r=e.which>1;return!t&&!r}var t=this.document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),r=this.document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,s=e.childNodes.length;for(r=0;s>r;r++)if(i=e.childNodes[r],o=1===i.nodeType&&n(i,t))return o},i=function(e,i){t&&(i="­"+i);var o=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return o.push([n,t]),r})),e.innerHTML=i,o.length>0){var s,a=o.length;for(s=0;a>s;s++){var u=n(e,o[s][0]),c=document.createTextNode(o[s][1]);u.parentNode.insertBefore(c,u)}}if(t){for(var l=e.firstChild;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&""===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}},o={},s=function(e){if(void 0!==o[e])return o[e];var t=!0;if("select"===e.toLowerCase()){var r=document.createElement("select");i(r,'<option value="test">Test</option>'),t=1===r.options.length}return o[e]=t,t},a=function(e,t){var r=e.tagName;if(s(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),o=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],a="</"+r+">",u=document.createElement("div");for(i(u,o+t+a),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:a,isSimpleClick:e}}(),function(){function e(e){return e?n.test(e)?e.replace(i,""):e:e}function t(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"},r=function(e){return t[e]||"&"},n=e.toString();return s.test(n)?n.replace(o,r):n}Ember.get,Ember.set;var r=function(){this.seen={},this.list=[]};r.prototype={add:function(e){e in this.seen||(this.seen[e]=!0,this.list.push(e))},toDOM:function(){return this.list.join(" ")}};var n=/[^a-zA-Z0-9\-]/,i=/[^a-zA-Z0-9\-]/g,o=/&(?!\w+;)|[<>"'`]/g,s=/[&<>"'`]/;Ember.RenderBuffer=function(e){return new Ember._RenderBuffer(e)},Ember._RenderBuffer=function(e){this.tagNames=[e||null],this.buffer=""},Ember._RenderBuffer.prototype={_element:null,_hasElement:!0,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer+=e,this},addClass:function(e){return this.elementClasses=this.elementClasses||new r,this.elementClasses.add(e),this.classes=this.elementClasses.list,this},setClasses:function(e){this.classes=e},id:function(e){return this.elementId=e,this},attr:function(e,t){var r=this.elementAttributes=this.elementAttributes||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var r=this.elementProperties=this.elementProperties||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){return this.elementStyle=this.elementStyle||{},this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var r=this.currentTagName();if(r){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var n,i,o=this.buffer,s=this.elementId,a=this.classes,u=this.elementAttributes,c=this.elementProperties,l=this.elementStyle;if(o+="<"+e(r),s&&(o+=' id="'+t(s)+'"',this.elementId=null),a&&(o+=' class="'+t(a.join(" "))+'"',this.classes=null),l){o+=' style="';for(i in l)l.hasOwnProperty(i)&&(o+=i+":"+t(l[i])+";");o+='"',this.elementStyle=null}if(u){for(n in u)u.hasOwnProperty(n)&&(o+=" "+n+'="'+t(u[n])+'"');this.elementAttributes=null}if(c){for(i in c)if(c.hasOwnProperty(i)){var h=c[i];(h||"number"==typeof h)&&(o+=h===!0?" "+i+'="'+i+'"':" "+i+'="'+t(c[i])+'"')}this.elementProperties=null}o+=">",this.buffer=o}},pushClosingTag:function(){var t=this.tagNames.pop();t&&(this.buffer+="</"+e(t)+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var e,t,r=this.tagNames.pop(),n=document.createElement(r),i=Ember.$(n),o=this.elementId,s=this.classes,a=this.elementAttributes,u=this.elementProperties,c=this.elementStyle,l="";if(o&&(i.attr("id",o),this.elementId=null),s&&(i.attr("class",s.join(" ")),this.classes=null),c){for(t in c)c.hasOwnProperty(t)&&(l+=t+":"+c[t]+";");i.attr("style",l),this.elementStyle=null}if(a){for(e in a)a.hasOwnProperty(e)&&i.attr(e,a[e]);this.elementAttributes=null}if(u){for(t in u)u.hasOwnProperty(t)&&i.prop(t,u[t]);this.elementProperties=null}return n},element:function(){var e=this.innerString();return e&&(this._element=Ember.ViewUtils.setInnerHTML(this._element,e)),this._element},string:function(){if(this._hasElement&&this._element){var e=this.element(),t=e.outerHTML;return"undefined"==typeof t?Ember.$("<div/>").append(e).html():t}return this.innerString()},innerString:function(){return this.buffer}}}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.EventDispatcher=Ember.Object.extend({events:{touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"},rootElement:"body",setup:function(r,n){var i,o=e(this,"events");Ember.$.extend(o,r||{}),Ember.isNone(n)||t(this,"rootElement",n),n=Ember.$(e(this,"rootElement")),n.addClass("ember-application");for(i in o)o.hasOwnProperty(i)&&this.setupHandler(n,i,o[i])},setupHandler:function(e,t,r){var n=this;e.on(t+".ember",".ember-view",function(e,t){return Ember.handleErrors(function(){var i=Ember.View.views[this.id],o=!0,s=null;return s=n._findNearestEventManager(i,r),s&&s!==t?o=n._dispatchEvent(s,e,r,i):i?o=n._bubbleEvent(i,e,r):e.stopPropagation(),o},this)}),e.on(t+".ember","[data-ember-action]",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),n=Ember.Handlebars.ActionHelper.registeredActions[t];return n&&n.eventName===r?n.handler(e):void 0},this)})},_findNearestEventManager:function(t,r){for(var n=null;t&&(n=e(t,"eventManager"),!n||!n[r]);)t=e(t,"parentView");return n},_dispatchEvent:function(e,t,r,n){var i=!0,o=e[r];return"function"===Ember.typeOf(o)?(i=Ember.run(function(){return o.call(e,t,n)}),t.stopPropagation()):i=this._bubbleEvent(n,t,r),i},_bubbleEvent:function(e,t,r){return Ember.run(function(){return e.handleEvent(r,t)})},destroy:function(){var t=e(this,"rootElement");return Ember.$(t).off(".ember","**").removeClass("ember-application"),this._super()}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"render","afterRender")}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({target:null,namespace:null,view:null,container:null,_childContainers:null,init:function(){this._super(),t(this,"_childContainers",{})},_modelDidChange:Ember.observer(function(){var r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})},"model")})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,o=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.addObject,a=Ember.computed(function(){var e=this._childViews,t=Ember.A(),n=this;return o(e,function(e){var n;e.isVirtual?(n=r(e,"childViews"))&&t.pushObjects(n):t.push(e)}),t.replace=function(e,t,r){if(n instanceof Ember.ContainerView)return n.replace(e,t,r);throw new Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,Ember.ActionHandler,{isView:!0,states:t,init:function(){this._super(),this.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?r(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?r(this,"parentView"):this}).property("parentView"),instrumentName:"core_view",instrumentDetails:function(e){e.object=this.toString()},renderToBuffer:function(e,t){var r="render."+this.instrumentName,n={};return this.instrumentDetails(n),Ember.instrument(r,n,function(){return this._renderToBuffer(e,t)},this)},_renderToBuffer:function(e){var t=this.tagName;(null===t||void 0===t)&&(t="div");var r=this.buffer=e&&e.begin(t)||Ember.RenderBuffer(t);return this.transitionTo("inBuffer",!1),this.beforeRender(r),this.render(r),this.afterRender(r),r},trigger:function(e){this._super.apply(this,arguments);var t=this[e];if(t){var r,n,i=[];for(r=1,n=arguments.length;n>r;r++)i.push(arguments[r]);return t.apply(this,i)}},deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)},has:function(e){return"function"===Ember.typeOf(this[e])||this._super(e)},destroy:function(){var e=this._parentView;if(this._super())return this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroying",!1),this},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K});var u=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};u.prototype={length:0,trigger:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],t.trigger&&t.trigger(e)},triggerRecursively:function(e){for(var t=this.views,r=0,n=t.length;n>r;r++)t[r].triggerRecursively(e)},invokeRecursively:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],e(t)},transitionTo:function(e,t){for(var r=this.views,n=0,i=r.length;i>n;n++)r[n].transitionTo(e,t)},push:function(){this.length+=arguments.length;var e=this.views;return e.push.apply(e,arguments)},objectAt:function(e){return this.views[e]},forEach:function(e){var t=this.views;return o(t,e)},clear:function(){this.length=0,this.views.length=0}};var c=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,template:Ember.computed(function(e,t){if(void 0!==t)return t;var n=r(this,"templateName"),i=this.templateForName(n,"template");return i||r(this,"defaultTemplate")}).property("templateName"),controller:Ember.computed(function(){var e=r(this,"_parentView");return e?r(e,"controller"):null}).property("_parentView"),layout:Ember.computed(function(){var e=r(this,"layoutName"),t=this.templateForName(e,"layout");return t||r(this,"defaultLayout")}).property("layoutName"),_yield:function(e,t){var n=r(this,"template");n&&n(e,t)},templateForName:function(e){if(e){var t=this.container||Ember.Container&&Ember.Container.defaultContainer;return t&&t.lookup("template:"+e)}},context:Ember.computed(function(e,t){return 2===arguments.length?(n(this,"_context",t),t):r(this,"_context")}).volatile(),_context:Ember.computed(function(){var e,t;return(t=r(this,"controller"))?t:(e=this._parentView,e?r(e,"_context"):null)}),_contextDidChange:Ember.observer(function(){this.rerender()},"context"),isVisible:!0,childViews:a,_childViews:c,_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}},"childViews"),nearestInstanceOf:function(e){for(var t=r(this,"parentView");t;){if(t instanceof e)return t;t=r(t,"parentView")}},nearestOfType:function(e){for(var t=r(this,"parentView"),n=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(n(t))return t;t=r(t,"parentView")}},nearestWithProperty:function(e){for(var t=r(this,"parentView");t;){if(e in t)return t;t=r(t,"parentView")}},nearestChildOf:function(e){for(var t=r(this,"parentView");t;){if(r(t,"parentView")instanceof e)return t;t=r(t,"parentView")}},_parentViewDidChange:Ember.observer(function(){this.isDestroying||(this.trigger("parentViewDidChange"),r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller"))},"_parentView"),_controllerDidChange:Ember.observer(function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))},"controller"),cloneKeywords:function(){var e=r(this,"templateData"),t=e?Ember.copy(e.keywords):{};return n(t,"view",r(this,"concreteView")),n(t,"_view",this),n(t,"controller",r(this,"controller")),t},render:function(e){var t=r(this,"layout")||r(this,"template");if(t){var n,i=r(this,"context"),o=this.cloneKeywords(),s={view:this,buffer:e,isRenderData:!0,keywords:o,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:s}),void 0!==n&&e.push(n)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){for(var e=this.lengthBeforeRender,t=this.lengthAfterRender,r=this._childViews,n=t-1;n>=e;n--)r[n]&&r[n].destroy()},_applyClassNameBindings:function(e){var t,r,n,i=this.classNames;o(e,function(e){var o,a=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),o&&(t.removeClass(o),i.removeObject(o)),r?(t.addClass(r),o=r):o=null
|
19
|
-
};n=this._classStringForProperty(e),n&&(s(i,n),o=n),this.registerObserver(this,a.path,u),this.one("willClearRender",function(){o&&(i.removeObject(o),o=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;o(t,function(t){var o=t.split(":"),s=o[0],a=o[1]||s,u=function(){i=this.$(),n=r(this,s),Ember.View.applyAttributeBindings(i,a,n)};this.registerObserver(this,s,u),n=r(this,s),Ember.View.applyAttributeBindings(e,a,n)},this)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),n=t.path,i=r(this,n);return void 0===i&&Ember.isGlobalPath(n)&&(i=r(Ember.lookup,n)),Ember.View._classStringForValue(n,i,t.className,t.falsyClassName)},element:Ember.computed(function(e,t){return void 0!==t?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){for(var t,r=this._childViews,n=r.length;--n>=0;)t=r[n],e(this,t,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var r,n,i=t.length;for(n=0;i>n;n++)r=t[n],e(r);return this},appendTo:function(e){return this._insertElementLater(function(){this.$().appendTo(e)}),this},replaceIn:function(e){return this._insertElementLater(function(){Ember.$(e).empty(),this.$().appendTo(e)}),this},_insertElementLater:function(e){this._scheduledInsert=Ember.run.scheduleOnce("render",this,"_insertElement",e)},_insertElement:function(e){this._scheduledInsert=null,this.currentState.insertElement(this,e)},append:function(){return this.appendTo(document.body)},remove:function(){this.removedFromDOM||this.destroyElement(),this.invokeRecursively(function(e){e.clearRenderedChildren&&e.clearRenderedChildren()})},elementId:null,findElementInParentElement:function(e){var t="#"+this.elementId;return Ember.$(t)[0]||Ember.$(t,e)[0]},createElement:function(){if(r(this,"element"))return this;var e=this.renderToBuffer();return n(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e,t){for(var r,n,i,o=t===!1?this._childViews:[this];o.length;){r=o.slice(),o=[];for(var s=0,a=r.length;a>s;s++)n=r[s],i=n._childViews?n._childViews.slice(0):null,e(n),i&&o.push.apply(o,i)}},triggerRecursively:function(e){for(var t,r,n,i=[this];i.length;){t=i.slice(),i=[];for(var o=0,s=t.length;s>o;o++)r=t[o],n=r._childViews?r._childViews.slice(0):null,r.trigger&&r.trigger(e),n&&i.push.apply(i,n)}},viewHierarchyCollection:function(){for(var e,t=new u([this]),r=0;r<t.length;r++)e=t.objectAt(r),e._childViews&&t.push.apply(t,e._childViews);return t},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:Ember.K,_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_elementWillChange:Ember.beforeObserver(function(){this.forEachChildView(function(e){Ember.propertyWillChange(e,"element")})},"element"),_elementDidChange:Ember.observer(function(){this.forEachChildView(function(e){Ember.propertyDidChange(e,"element")})},"element"),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=r(this,"templateName"),this._super(e)},_renderToBuffer:function(e,t){this.lengthBeforeRender=this._childViews.length;var r=this._super(e,t);return this.lengthAfterRender=this._childViews.length,r},renderToBufferIfNeeded:function(e){return this.currentState.renderToBufferIfNeeded(this,e)},beforeRender:function(e){this.applyAttributesToBuffer(e),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag()},applyAttributesToBuffer:function(e){var t=r(this,"classNameBindings");t.length&&this._applyClassNameBindings(t);var n=r(this,"attributeBindings");n.length&&this._applyAttributeBindings(e,n),e.setClasses(this.classNames),e.id(this.elementId);var i=r(this,"ariaRole");i&&e.attr("role",i),r(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:c,attributeBindings:c,init:function(){this.elementId=this.elementId||i(this),this._super(),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice())},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(!this.isDestroying){n(e,"_parentView",null);var t=this._childViews;return Ember.EnumerableUtils.removeObject(t,e),this.propertyDidChange("childViews"),this}},removeAllChildren:function(){return this.mutateChildViews(function(e,t){e.removeChild(t)})},destroyAllChildren:function(){return this.mutateChildViews(function(e,t){t.destroy()})},removeFromParent:function(){var e=this._parentView;return this.remove(),e&&e.removeChild(this),this},destroy:function(){var e,t,n=this._childViews,i=r(this,"parentView"),o=this.viewName;if(this._super()){for(e=n.length,t=e-1;t>=0;t--)n[t].removedFromDOM=!0;for(o&&i&&i.set(o,null),e=n.length,t=e-1;t>=0;t--)n[t].destroy();return this}},createChildView:function(e,t){if(!e)throw new TypeError("createChildViews first argument must exist");if(e.isView&&e._parentView===this&&e.container===this.container)return e;if(t=t||{},t._parentView=this,Ember.CoreView.detect(e))t.templateData=t.templateData||r(this,"templateData"),t.container=this.container,e=e.create(t),e.viewName&&n(r(this,"concreteView"),e.viewName,e);else if("string"==typeof e){var i="view:"+e,o=this.container.lookupFactory(i);t.templateData=r(this,"templateData"),e=o.create(t)}else t.container=this.container,r(e,"templateData")||(t.templateData=r(this,"templateData")),Ember.setProperties(e,t);return e},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}},"isVisible"),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){for(var e=r(this,"parentView");e;){if(r(e,"isVisible")===!1)return!0;e=r(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(e){e.buffer=null})},transitionTo:function(e,t){var r=this.currentState,n=this.currentState=this.states[e];this.state=e,r&&r.exit&&r.exit(this),n.enter&&n.enter(this),t!==!1&&this.forEachChildView(function(t){t.transitionTo(e)})},handleEvent:function(e,t){return this.currentState.handleEvent(this,e,t)},registerObserver:function(e,t,r,n){n||"function"!=typeof r||(n=r,r=null);var i=this,o=function(){i.currentState.invokeObserver(this,n)},s=function(){Ember.run.scheduleOnce("render",this,o)};Ember.addObserver(e,t,r,s),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,s)})}});var l={prepend:function(t,r){t.$().prepend(r),e()},after:function(t,r){t.$().after(r),e()},html:function(t,r){t.$().html(r),e()},replace:function(t){var i=r(t,"element");n(t,"element",null),t._insertElementLater(function(){Ember.$(i).replaceWith(r(t,"element")),e()})},remove:function(t){t.$().remove(),e()},empty:function(t){t.$().empty(),e()}};Ember.View.reopen({domManager:l}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t,r,n=e.split(":"),i=n[0],o="";return n.length>1&&(t=n[1],3===n.length&&(r=n[2]),o=":"+t,r&&(o+=":"+r)),{path:i,classNames:o,className:""===t?void 0:t,falsyClassName:r}},_classStringForValue:function(e,t,r,n){if(r||n)return r&&t?r:n&&!t?n:null;if(t===!0){var i=e.split(".");return Ember.String.dasherize(i[i.length-1])}return t!==!1&&null!=t?t:null}});var h=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){h.on("change",e)},Ember.View.removeMutationListener=function(e){h.off("change",e)},Ember.View.notifyMutationListeners=function(){h.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=a,Ember.View.applyAttributeBindings=function(e,t,r){var n=Ember.typeOf(r);"value"===t||"string"!==n&&("number"!==n||isNaN(r))?"value"===t||"boolean"===n?(Ember.isNone(r)&&(r=""),r!==e.prop(t)&&e.prop(t,r)):r||e.removeAttr(t):r!==e.attr(t)&&e.attr(t,r)},Ember.View.states=t}(),function(){var e=(Ember.get,Ember.set);Ember.View.states._default={appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return void 0},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(t){return e(t,"element",null),t._scheduledInsert&&(Ember.run.cancel(t._scheduledInsert),t._scheduledInsert=null),t},renderToBufferIfNeeded:function(){return!1},rerender:Ember.K,invokeObserver:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement();var r=e.viewHierarchyCollection();r.trigger("willInsertElement"),t.call(e),r.transitionTo("inDOM",!1),r.trigger("didInsertElement")},renderToBufferIfNeeded:function(e,t){return e.renderToBuffer(t),!0},empty:Ember.K,setElement:function(e,t){return null!==t&&e.transitionTo("hasElement"),t}})}(),function(){Ember.get,Ember.set;var e=Ember.View.states.inBuffer=Ember.create(Ember.View.states._default);Ember.merge(e,{$:function(e){return e.rerender(),Ember.$()},rerender:function(){throw new Ember.Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.")},appendChild:function(e,t,r){var n=e.buffer,i=e._childViews;return t=e.createChildView(t,r),i.length||(i=e._childViews=i.slice()),i.push(t),t.renderToBuffer(n),e.propertyDidChange("childViews"),t},destroyElement:function(e){e.clearBuffer();var t=e._notifyWillDestroyElement();return t.transitionTo("preRender",!1),e},empty:function(){},renderToBufferIfNeeded:function(){return!1},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(e,t){return null===t?e.transitionTo("preRender"):(e.clearBuffer(),e.transitionTo("hasElement")),t},invokeObserver:function(e,t){t.call(e)}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(t,r){var n=e(t,"element");return r?Ember.$(r,n):Ember.$(n)},getElement:function(t){var r=e(t,"parentView");return r&&(r=e(r,"element")),r?t.findElementInParentElement(r):Ember.$("#"+e(t,"elementId"))[0]},setElement:function(e,t){if(null!==t)throw"You cannot set an element to a non-null value when the element is already in the DOM.";return e.transitionTo("preRender"),t},rerender:function(e){return e.triggerRecursively("willClearRender"),e.clearRenderedChildren(),e.domManager.replace(e),e},destroyElement:function(e){return e._notifyWillDestroyElement(),e.domManager.remove(e),t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},empty:function(e){var t,r,n=e._childViews;if(n)for(t=n.length,r=0;t>r;r++)n[r]._notifyWillDestroyElement();e.domManager.empty(e)},handleEvent:function(e,t,r){return e.has(t)?e.trigger(t,r):!0},invokeObserver:function(e,t){t.call(e)}});var n=Ember.View.states.inDOM=Ember.create(r);Ember.merge(n,{enter:function(e){e.isVirtual||(Ember.View.views[e.elementId]=e),e.addBeforeObserver("elementId",function(){throw new Error("Changing a view's elementId after creation is not allowed")})},exit:function(e){this.isVirtual||delete Ember.View.views[e.elementId]},insertElement:function(){throw"You can't insert an element into the DOM that has already been inserted"}})}(),function(){var e="You can't call %@ on a view being destroyed",t=Ember.String.fmt,r=Ember.View.states.destroying=Ember.create(Ember.View.states._default);Ember.merge(r,{appendChild:function(){throw t(e,["appendChild"])},rerender:function(){throw t(e,["rerender"])},destroyElement:function(){throw t(e,["destroyElement"])},empty:function(){throw t(e,["empty"])},setElement:function(){throw t(e,["set('element', ...)"])},renderToBufferIfNeeded:function(){return!1},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroying=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);for(var r in e)e.hasOwnProperty(r)&&Ember.merge(t[r],e[r]);return t}}(),function(){function e(e,t,r,n){t.triggerRecursively("willInsertElement"),r?r.domManager.after(r,n.string()):e.domManager.prepend(e,n.string()),t.forEach(function(e){e.transitionTo("inDOM"),e.propertyDidChange("element"),e.triggerRecursively("didInsertElement")})}var t=Ember.View.cloneStates(Ember.View.states),r=Ember.get,n=Ember.set,i=Ember.EnumerableUtils.forEach,o=Ember._ViewCollection;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:t,init:function(){this._super();var e=r(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var t=this._childViews;i(e,function(e,i){var o;"string"==typeof e?(o=r(this,e),o=this.createChildView(o),n(this,e,o)):o=this.createChildView(e),t[i]=o},this);var o=r(this,"currentView");o&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(o)))},replace:function(e,t,n){var i=n?r(n,"length"):0;if(this.arrayContentWillChange(e,t,i),this.childViewsWillChange(this._childViews,e,t),0===i)this._childViews.splice(e,t);else{var o=[e,t].concat(n);n.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,o)}return this.arrayContentDidChange(e,t,i),this.childViewsDidChange(this._childViews,e,t,i),this},objectAt:function(e){return this._childViews[e]},length:Ember.computed(function(){return this._childViews.length}).volatile(),render:function(e){this.forEachChildView(function(t){t.renderToBuffer(e)})},instrumentName:"container",childViewsWillChange:function(e,t,r){if(this.propertyWillChange("childViews"),r>0){var n=e.slice(t,t+r);this.currentState.childViewsWillChange(this,e,t,r),this.initializeViews(n,null,null)}},removeChild:function(e){return this.removeObject(e),this},childViewsDidChange:function(e,t,n,i){if(i>0){var o=e.slice(t,t+i);this.initializeViews(o,this,r(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,o){i(e,function(e){n(e,"_parentView",t),!e.container&&t&&n(e,"container",t.container),r(e,"templateData")||n(e,"templateData",o)})},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var e=r(this,"currentView");e&&e.destroy()},"currentView"),_currentViewDidChange:Ember.observer(function(){var e=r(this,"currentView");e&&this.pushObject(e)},"currentView"),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}}),Ember.merge(t._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K}),Ember.merge(t.inBuffer,{childViewsDidChange:function(){throw new Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(t.hasElement,{childViewsWillChange:function(e,t,r,n){for(var i=r;r+n>i;i++)t[i].remove()},childViewsDidChange:function(e){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(t){var r,n,i,s,a,u=t._childViews,c=new o;for(r=0,n=u.length;n>r;r++)i=u[r],a||(a=Ember.RenderBuffer(),a._hasElement=!1),i.renderToBufferIfNeeded(a)?c.push(i):c.length?(e(t,c,s,a),a=null,s=i,c.clear()):s=i;c.length&&e(t,c,s,a)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver(function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)},"content"),_contentDidChange:Ember.observer(function(){var t=e(this,"content");t&&(this._assertArrayLike(t),t.addArrayObserver(this));var r=t?e(t,"length"):0;this.arrayDidChange(t,0,null,r)},"content"),_assertArrayLike:function(){},destroy:function(){if(this._super()){var t=e(this,"content");return t&&t.removeArrayObserver(this),this._createdEmptyView&&this._createdEmptyView.destroy(),this}},arrayWillChange:function(t,r,n){var i=e(this,"emptyView");i&&i instanceof Ember.View&&i.removeFromParent();var o,s,a,u=this._childViews;a=this._childViews.length;var c=n===a;for(c&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),s=r+n-1;s>=r;s--)o=u[s],o.destroy()},arrayDidChange:function(r,n,i,o){var s,a,u,c,l,h,m=[];if(c=r?e(r,"length"):0)for(l=e(this,"itemViewClass"),"string"==typeof l&&(l=e(l)||l),u=n;n+o>u;u++)a=r.objectAt(u),s=this.createChildView(l,{content:a,contentIndex:u}),m.push(s);else{if(h=e(this,"emptyView"),!h)return;"string"==typeof h&&(h=e(h)||h),h=this.createChildView(h),m.push(h),t(this,"emptyView",h),Ember.CoreView.detect(h)&&(this._createdEmptyView=h)}this.replace(n,0,m)},createChildView:function(r,n){r=this._super(r,n);var i=e(r,"tagName");return(null===i||void 0===i)&&(i=Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")],t(r,"tagName",i)),r}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){var e=Ember.get,t=Ember.set;Ember.isNone,Ember.Component=Ember.View.extend(Ember.TargetActionSupport,{init:function(){this._super(),t(this,"context",this),t(this,"controller",this)},cloneKeywords:function(){return{view:this,controller:this}},_yield:function(t,r){var n=r.data.view,i=this._parentView,o=e(this,"template");o&&n.appendChild(Ember.View,{isVirtual:!0,tagName:"",_contextView:i,template:e(this,"template"),context:e(i,"context"),controller:e(i,"controller"),templateData:{keywords:i.cloneKeywords()}})},targetObject:Ember.computed(function(){var t=e(this,"_parentView");return t?e(t,"controller"):null}).property("_parentView"),sendAction:function(t,r){var n;n=void 0===t?e(this,"action"):e(this,t),void 0!==n&&this.triggerAction({action:n,actionContext:r})}})}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){e("metamorph",[],function(){"use strict";// Copyright: ©2011 My Company Inc. All rights reserved.
|
20
|
-
var e=function(){},t=0,r=this.document,n=("undefined"==typeof ENV?{}:ENV).DISABLE_RANGE_API,i=!n&&r&&"createRange"in r&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,o=r&&function(){var e=r.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),s=r&&function(){var e=r.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),a=function(r){var n;n=this instanceof a?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=a.prototype;var u,c,l,h,m,f,p,d,b;if(h=function(){return this.startTag()+this.innerHTML+this.endTag()},d=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},b=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"},i)u=function(e,t){var n=r.createRange(),i=r.getElementById(e.start),o=r.getElementById(e.end);return t?(n.setStartBefore(i),n.setEndAfter(o)):(n.setStartAfter(i),n.setEndBefore(o)),n},c=function(e,t){var r=u(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},l=function(){var e=u(this,!0);e.deleteContents()},m=function(e){var t=r.createRange();t.setStart(e),t.collapse(!1);var n=t.createContextualFragment(this.outerHTML());e.appendChild(n)},f=function(e){var t=r.createRange(),n=r.getElementById(this.end);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)},p=function(e){var t=r.createRange(),n=r.getElementById(this.start);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)};else{var v={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},E=function(e,t){if(e.getAttribute("id")===t)return e;var r,n,i,o=e.childNodes.length;for(r=0;o>r;r++)if(n=e.childNodes[r],i=1===n.nodeType&&E(n,t))return i},g=function(e,t){var n=[];if(s&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,i){return n.push([i,t]),r})),e.innerHTML=t,n.length>0){var i,o=n.length;for(i=0;o>i;i++){var a=E(e,n[i][0]),u=r.createTextNode(n[i][1]);a.parentNode.insertBefore(u,a)}}},y=function(e,t){var n=v[e.tagName.toLowerCase()]||v._default,i=n[0],s=n[1],a=n[2];o&&(t="­"+t);var u=r.createElement("div");g(u,s+t+a);for(var c=0;i>=c;c++)u=u.firstChild;if(o){for(var l=u;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&""===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}return u},w=function(e){for(;""===e.parentNode.tagName;)e=e.parentNode;return e},_=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};c=function(e,t){var n,i,o,s=w(r.getElementById(this.start)),a=r.getElementById(this.end),u=a.parentNode;for(_(s,a),n=s.nextSibling;n;){if(i=n.nextSibling,o=n===a){if(!t)break;a=n.nextSibling}if(n.parentNode.removeChild(n),o)break;n=i}for(n=y(s.parentNode,e);n;)i=n.nextSibling,u.insertBefore(n,a),n=i},l=function(){var e=w(r.getElementById(this.start)),t=r.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},m=function(e){for(var t,r=y(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},f=function(e){var t,n,i=r.getElementById(this.end),o=i.nextSibling,s=i.parentNode;for(n=y(s,e);n;)t=n.nextSibling,s.insertBefore(n,o),n=t},p=function(e){var t,n,i=r.getElementById(this.start),o=i.parentNode;n=y(o,e);for(var s=i.nextSibling;n;)t=n.nextSibling,o.insertBefore(n,s),n=t}}return a.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(c.call(this,e),this.innerHTML=e,void 0)},a.prototype.replaceWith=function(e){this.checkRemoved(),c.call(this,e,!0)},a.prototype.remove=l,a.prototype.outerHTML=h,a.prototype.appendTo=m,a.prototype.after=f,a.prototype.prepend=p,a.prototype.startTag=d,a.prototype.endTag=b,a.prototype.isRemoved=function(){var e=r.getElementById(this.start),t=r.getElementById(this.end);return!e||!t},a.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},a})}(),function(){function e(e){var t=e.hash,r=e.hashTypes;for(var n in t)"ID"===r[n]&&(t[n+"Binding"]=t[n],r[n+"Binding"]="STRING",delete t[n],delete r[n])}var t=Object.create||function(e){function t(){}return t.prototype=e,new t},r=this.Handlebars||Ember.imports&&Ember.imports.Handlebars;r||"function"!=typeof require||(r=require("handlebars")),Ember.Handlebars=t(r),Ember.Handlebars.helper=function(t,r){Ember.View.detect(r)?Ember.Handlebars.registerHelper(t,function(t){return e(t),Ember.Handlebars.helpers.view.call(this,r,t)}):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.helpers=t(r.helpers),Ember.Handlebars.Compiler=function(){},r.Compiler&&(Ember.Handlebars.Compiler.prototype=t(r.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},r.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=t(r.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var n="ember"+ +new Date,i=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["controlID",new r.AST.StringNode(n+i++)]);else if(e.params.length||e.hash);else{var t=new r.AST.IdNode([{part:"_triageMustache"}]);e.escaped||(e.hash=e.hash||new r.AST.HashNode([]),e.hash.pairs.push(["unescaped",new r.AST.StringNode("true")])),e=new r.AST.MustacheNode([t].concat([e.id]),e.hash,!e.escaped)}return r.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var t=r.parse(e),n={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0)},r.compile&&(Ember.Handlebars.compile=function(e){var t=r.parse(e),n={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(t,n),o=(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0),s=Ember.Handlebars.template(o);return s.isMethod=!1,s})}(),function(){function e(e,t,r,n){var i,o,s,a,u=[],c=n.hash,l=c.boundOptions;for(a in l)l.hasOwnProperty(a)&&(c[a]=Ember.Handlebars.get(e,l[a],n));for(i=0,o=r.length;o>i;++i)s=r[i],u.push(Ember.Handlebars.get(e,s.path,n));return u.push(n),t.apply(e,u)}var t=Array.prototype.slice,r=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,o=r&&r.keywords||{};return n=t.split(".",1)[0],o.hasOwnProperty(n)&&(e=o[n],i=!0,t=t===n?"":t.substr(n.length+1)),{root:e,path:t,isKeyword:i}},n=Ember.Handlebars.get=function(e,t,n){var i,o=n&&n.data,s=r(e,t,o);return e=s.root,t=s.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.getPath=Ember.deprecateFunc("`Ember.Handlebars.getPath` has been changed to `Ember.Handlebars.get` for consistency.",Ember.Handlebars.get),Ember.Handlebars.resolveParams=function(e,t,r){for(var i,o,s=[],a=r.types,u=0,c=t.length;c>u;u++)i=t[u],o=a[u],"ID"===o?s.push(n(e,i,r)):s.push(i);return s},Ember.Handlebars.resolveHash=function(e,t,r){var i,o={},s=r.hashTypes;for(var a in t)t.hasOwnProperty(a)&&(i=s[a],o[a]="ID"===i?n(e,t[a],r):t[a]);return o},Ember.Handlebars.registerHelper("helperMissing",function(e,t){var r,n="";throw r="%@ Handlebars error: Could not find property '%@' on object %@.",t.data&&(n=t.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerBoundHelper=function(n,i){function o(){var n,o,a,u,c,l=t.call(arguments,0,-1),h=l.length,m=arguments[arguments.length-1],f=[],p=m.types,d=m.data,b=m.hash,v=d.view,E=m.contexts&&m.contexts[0]||this,g="",y=Ember._SimpleHandlebarsView.prototype.normalizedValue,w=b.boundOptions={};for(a in b)Ember.IS_BINDING.test(a)&&(w[a.slice(0,-7)]=b[a]);var _=[];for(d.properties=[],n=0;h>n;++n)if(d.properties.push(l[n]),"ID"===p[n]){var C=r(E,l[n],d);f.push(C),_.push(C)}else f.push(null);if(d.isUnbound)return e(this,i,f,m);var O=new Ember._SimpleHandlebarsView(null,null,!m.hash.unescaped,m.data);O.normalizedValue=function(){var e,t=[];for(e in w)w.hasOwnProperty(e)&&(c=r(E,w[e],d),O.path=c.path,O.pathRoot=c.root,b[e]=y.call(O));for(n=0;h>n;++n)c=f[n],c?(O.path=c.path,O.pathRoot=c.root,t.push(y.call(O))):t.push(l[n]);return t.push(m),i.apply(E,t)},v.appendChild(O);for(u in w)w.hasOwnProperty(u)&&_.push(r(E,w[u],d));for(n=0,o=_.length;o>n;++n)c=_[n],v.registerObserver(c.root,c.path,O,O.rerender);if("ID"===p[0]&&0!==f.length){var A=f[0],P=A.root,V=A.path;Ember.isEmpty(V)||(g=V+".");for(var x=0,T=s.length;T>x;x++)v.registerObserver(P,g+s[x],O,O.rerender)}}var s=t.call(arguments,2);o._rawFunction=i,Ember.Handlebars.registerHelper(n,o)},Ember.Handlebars.template=function(e){var t=Handlebars.template(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.htmlSafe=function(){return e(this)})}(),function(){Ember.Handlebars.resolvePaths=function(e){for(var t=[],r=e.contexts,n=e.roots,i=e.data,o=0,s=r.length;s>o;o++)t.push(Ember.Handlebars.get(n[o],r[o],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}Ember.set,Ember.get;var r=t("metamorph"),n={remove:function(t){t.morph.remove(),e()},prepend:function(t,r){t.morph.prepend(r),e()},after:function(t,r){t.morph.after(r),e()},html:function(t,r){t.morph.html(r),e()},replace:function(t){var r=t.morph;t.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(!t.isDestroying){t.clearRenderedChildren();var n=t.renderToBuffer();t.invokeRecursively(function(e){e.propertyWillChange("element")}),t.triggerRecursively("willInsertElement"),r.replaceWith(n.string()),t.transitionTo("inDOM"),t.invokeRecursively(function(e){e.propertyDidChange("element")}),t.triggerRecursively("didInsertElement"),e()}})},empty:function(t){t.morph.html(""),e()}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",instrumentName:"metamorph",init:function(){this._super(),this.morph=r()},beforeRender:function(e){e.push(this.morph.startTag()),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag(),e.push(this.morph.endTag())},createElement:function(){var e=this.renderToBuffer();this.outerHTML=e.string(),this.clearBuffer()},domManager:n}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function e(e,t,r,n){this.path=e,this.pathRoot=t,this.isEscaped=r,this.templateData=n,this.morph=o(),this.state="preRender",this.updateId=null,this._parentView=null,this.buffer=null}var r=Ember.get,n=Ember.set,i=Ember.Handlebars.get,o=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this._parentView&&this._parentView.removeChild(this),this.morph=null,this.state="destroyed"},propertyWillChange:Ember.K,propertyDidChange:Ember.K,normalizedValue:function(){var e,t,r=this.path,n=this.pathRoot;return""===r?e=n:(t=this.templateData,e=i(n,r,{data:t})),e},renderToBuffer:function(e){var t="";t+=this.morph.startTag(),t+=this.render(),t+=this.morph.endTag(),e.push(t)},render:function(){var e=this.isEscaped,t=this.normalizedValue();return null===t||void 0===t?t="":t instanceof Handlebars.SafeString||(t=String(t)),e&&(t=Handlebars.Utils.escapeExpression(t)),t},rerender:function(){switch(this.state){case"preRender":case"destroyed":break;case"inBuffer":throw new Ember.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");case"hasElement":case"inDOM":this.updateId=Ember.run.scheduleOnce("render",this,"update")}return this},update:function(){this.updateId=null,this.morph.html(this.render())},transitionTo:function(e){this.state=e}};var s=Ember.View.cloneStates(Ember.View.states),a=Ember.merge;a(s._default,{rerenderIfNeeded:Ember.K}),a(s.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:s,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),o=r(this,"pathRoot"),s=r(this,"valueNormalizerFunc");return""===n?e=o:(t=r(this,"templateData"),e=i(o,n,{data:t})),s?s(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),o=r(this,"preserveContext"),s=r(this,"previousContext"),a=r(this,"inverseTemplate"),u=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",u),o)n(this,"_context",s);else{if(!u)return null===c||void 0===c?c="":c instanceof Handlebars.SafeString||(c=String(c)),t&&(c=Handlebars.Utils.escapeExpression(c)),e.push(c),void 0;n(this,"_context",c)}else a?(n(this,"template",a),o?n(this,"_context",s):n(this,"_context",c)):n(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r){var n=o(e,t,r);return null===n||void 0===n?n="":n instanceof Handlebars.SafeString||(n=String(n)),r.hash.unescaped||(n=Handlebars.Utils.escapeExpression(n)),n}function r(e,t,r,n,i,a){var u,c,l,h=t.data,m=t.fn,f=t.inverse,p=h.view,d=this;if(u=s(d,e,h),"object"==typeof this){if(h.insideGroup){c=function(){Ember.run.once(p,"rerender")};var b,v,E=o(d,e,t);E=i?i(E):E,v=r?d:E,n(E)?b=m:f&&(b=f),b(v,{data:t.data})}else{var g=p.createChildView(Ember._HandlebarsBoundView,{preserveContext:r,shouldDisplayFunc:n,valueNormalizerFunc:i,displayTemplate:m,inverseTemplate:f,path:e,pathRoot:d,previousContext:d,isEscaped:!t.hash.unescaped,templateData:t.data});p.appendChild(g),c=function(){Ember.run.scheduleOnce("render",g,"rerenderIfNeeded")}}if(""!==u.path&&(p.registerObserver(u.root,u.path,c),a))for(l=0;l<a.length;l++)p.registerObserver(u.root,u.path+"."+a[l],c)}else h.buffer.push(o(d,e,t))}function n(e,r){var n,i,o=r.data,a=o.view,u=this;if(n=s(u,e,o),"object"==typeof this){if(o.insideGroup)i=function(){Ember.run.once(a,"rerender")},output=t(u,e,r),o.buffer.push(output);else{var c=new Ember._SimpleHandlebarsView(e,u,!r.hash.unescaped,r.data);c._parentView=a,a.appendChild(c),i=function(){Ember.run.scheduleOnce("render",c,"rerender")}}""!==n.path&&a.registerObserver(n.root,n.path,i)}else output=t(u,e,r),o.buffer.push(output)}var i=Ember.get;Ember.set,Ember.String.fmt;var o=Ember.Handlebars.get,s=Ember.Handlebars.normalizePath,a=Ember.ArrayPolyfills.forEach,u=Ember.Handlebars,c=u.helpers;u.registerHelper("_triageMustache",function(e,t){return c[e]?c[e].call(this,t):c.bind.apply(this,arguments)}),u.registerHelper("bind",function(t,i){var o=i.contexts&&i.contexts[0]||this;return i.fn?r.call(o,t,i,!1,e):n.call(o,t,i)}),u.registerHelper("boundIf",function(e,t){var n=t.contexts&&t.contexts[0]||this,o=function(e){var t=e&&i(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?0!==i(e,"length"):!!e};return r.call(n,e,t,!0,o,o,["isTruthy","length"])}),u.registerHelper("with",function(t,n){if(4===arguments.length){var i,o,a,u;if(n=arguments[3],i=arguments[2],o=arguments[0],Ember.isGlobalPath(o))Ember.bind(n.data.keywords,i,o);else{u=s(this,o,n.data),o=u.path,a=u.root;var l=Ember.$.expando+Ember.guidFor(a);n.data.keywords[l]=a;var h=o?l+"."+o:l;Ember.bind(n.data.keywords,i,h)}return r.call(this,o,n,!0,e)}return c.bind.call(n.contexts[0],t,n)}),u.registerHelper("if",function(e,t){return c.boundIf.call(t.contexts[0],e,t)}),u.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,c.boundIf.call(t.contexts[0],e,t)}),u.registerHelper("bind-attr",function(e){var t=e.hash,r=e.data.view,n=[],i=this,c=++Ember.uuid,l=t["class"];if(null!=l){var h=u.bindClasses(this,l,r,c,e);n.push('class="'+Handlebars.Utils.escapeExpression(h.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return a.call(m,function(a){var u,l=t[a];u=s(i,l,e.data);var h,m,f="this"===l?u.root:o(i,l,e),p=Ember.typeOf(f);h=function(){var t=o(i,l,e),n=r.$("[data-bindattr-"+c+"='"+c+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,a,t),void 0):(Ember.removeObserver(u.root,u.path,m),void 0)},"this"===l||u.isKeyword&&""===u.path||r.registerObserver(u.root,u.path,h),"string"===p||"number"===p&&!isNaN(f)?n.push(a+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(a+'="'+a+'"')},this),n.push("data-bindattr-"+c+'="'+c+'"'),new u.SafeString(n.join(" "))}),u.registerHelper("bindAttr",u.helpers["bind-attr"]),u.bindClasses=function(e,t,r,n,i){var u,c,l,h=[],m=function(e,t,r){var n,i=t.path;return n="this"===i?e:""===i?!0:o(e,i,r),Ember.View._classStringForValue(i,n,t.className,t.falsyClassName)};return a.call(t.split(" "),function(t){var o,a,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,v=e;""!==b&&"this"!==b&&(p=s(e,b,i.data),v=p.root,b=p.path),a=function(){u=m(e,d,i),l=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),l&&0!==l.length?(o&&l.removeClass(o),u?(l.addClass(u),o=u):o=null):Ember.removeObserver(v,b,f)},""!==b&&"this"!==b&&r.registerObserver(v,b,a),c=m(e,d,i),c&&(h.push(c),o=c)}),h}}(),function(){Ember.get,Ember.set;var e=Ember.Handlebars,t=/^[a-z]/,r=/^view\./;e.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,r=e.data,n={},i=t["class"],o=!1;t.id&&(n.elementId=t.id,o=!0),t.tag&&(n.tagName=t.tag,o=!0),i&&(i=i.split(" "),n.classNames=i,o=!0),t.classBinding&&(n.classNameBindings=t.classBinding.split(" "),o=!0),t.classNameBindings&&(void 0===n.classNameBindings&&(n.classNameBindings=[]),n.classNameBindings=n.classNameBindings.concat(t.classNameBindings.split(" ")),o=!0),t.attributeBindings&&(n.attributeBindings=null,o=!0),o&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var s;for(var a in t)t.hasOwnProperty(a)&&Ember.IS_BINDING.test(a)&&"string"==typeof t[a]&&(s=this.contextualizeBindingPath(t[a],r),s&&(t[a]=s));if(n.classNameBindings)for(var u in n.classNameBindings){var c=n.classNameBindings[u];if("string"==typeof c){var l=Ember.View._parsePropertyPath(c);s=this.contextualizeBindingPath(l.path,r),s&&(n.classNameBindings[u]=s+l.classNames)}}return Ember.$.extend(t,n)},contextualizeBindingPath:function(e,t){var r=Ember.Handlebars.normalizePath(null,e,t);return r.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:"this"===e?"_parentView.context":"_parentView.context."+e},helper:function(n,i,o){var s,a=o.data,u=o.fn;s="string"==typeof i?"STRING"===o.types[0]&&t.test(i)&&!r.test(i)?a.view.container.lookupFactory("view:"+i):e.get(n,i,o):i;var c=this.propertiesFromHTMLOptions(o,n),l=a.view;c.templateData=a;var h=s.proto?s.proto():s;u&&(c.template=u),h.controller||h.controllerBinding||c.controller||c.controllerBinding||(c._context=n),l.appendChild(s,c)}}),e.registerHelper("view",function(t,r){return t&&t.data&&t.data.isRenderData&&(r=t,t="Ember.View"),e.ViewHelper.helper(this,t,r)})}(),function(){var e=Ember.get,t=Ember.Handlebars.get;Ember.String.fmt,Ember.Handlebars.registerHelper("collection",function(r,n){r&&r.data&&r.data.isRenderData&&(n=r,r=void 0);var i=n.fn,o=n.data,s=n.inverse;n.data.view;var a;a=r?t(this,r,n):Ember.CollectionView;var u,c,l=n.hash,h={},m=a.proto();if(l.itemView){var f=o.keywords.controller,p=f.container;c=p.resolve("view:"+Ember.String.camelize(l.itemView))}else c=l.itemViewClass?t(m,l.itemViewClass,n):m.itemViewClass;delete l.itemViewClass,delete l.itemView;for(var d in l)l.hasOwnProperty(d)&&(u=d.match(/^item(.)(.*)$/),u&&"itemController"!==d&&(h[u[1].toLowerCase()+u[2]]=l[d],delete l[d]));i&&(h.template=i,delete n.fn);var b;s&&s!==Handlebars.VM.noop?(b=e(m,"emptyViewClass"),b=b.extend({template:s,tagName:h.tagName})):l.emptyViewClass&&(b=t(this,l.emptyViewClass,n)),b&&(l.emptyView=b),l.keyword||(h._context=Ember.computed.alias("content"));var v=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:o,hash:h},this);return l.itemViewClass=c.extend(v),Ember.Handlebars.helpers.view.call(this,a,n)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,r){var n,i,o,s=arguments[arguments.length-1];return arguments.length>2?(s.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,o=n.apply(this,Array.prototype.slice.call(arguments,1)),delete s.data.isUnbound,o):(i=r.contexts&&r.contexts[0]||this,e(i,t,r))})}(),function(){var e=Ember.Handlebars.get,t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(r,n){var i=n.contexts&&n.contexts[0]||this,o=t(i,r,n.data),s=o.root,a=o.path,u="this"===a?s:e(s,a,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var r,n=e(this,"itemController");if(n){var i=e(this,"controller.container").lookupFactory("controller:array").create({parentController:e(this,"controller"),itemController:n,target:e(this,"controller"),_eachView:this});this.disableContentObservers(function(){t(this,"content",i),r=new Ember.Binding("content","_eachView.dataSource").oneWay(),r.connect(i)}),t(this,"_arrayController",i)}else this.disableContentObservers(function(){r=new Ember.Binding("content","dataSource").oneWay(),r.connect(this)});return this._super()},_assertArrayLike:function(){},disableContentObservers:function(e){Ember.removeBeforeObserver(this,"content",null,"_contentWillChange"),Ember.removeObserver(this,"content",null,"_contentDidChange"),e.call(this),Ember.addBeforeObserver(this,"content",null,"_contentWillChange"),Ember.addObserver(this,"content",null,"_contentDidChange")},itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(r,n){r=this._super(r,n);var i=e(this,"keyword"),o=e(r,"content");if(i){var s=e(r,"templateData");s=Ember.copy(s),s.keywords=r.cloneKeywords(),t(r,"templateData",s),s.keywords[i]=o}return o&&e(o,"isController")&&t(r,"controller",o),r},destroy:function(){if(this._super()){var t=e(this,"_arrayController");return t&&t.destroy(),this}}});var r=Ember.Handlebars.GroupedEach=function(e,t,r){var n=this,i=Ember.Handlebars.normalizePath(e,t,r.data);this.context=e,this.path=t,this.options=r,this.template=r.fn,this.containingView=r.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){n.destroy()})};r.prototype={contentWillChange:function(){this.removeArrayObservers()},contentDidChange:function(){this.content=this.lookupContent(),this.addArrayObservers(),this.rerenderContainingView()},contentArrayWillChange:Ember.K,contentArrayDidChange:function(){this.rerenderContainingView()},lookupContent:function(){return Ember.Handlebars.get(this.normalizedRoot,this.normalizedPath,this.options)},addArrayObservers:function(){this.content&&this.content.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){this.content&&this.content.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},addContentObservers:function(){Ember.addBeforeObserver(this.normalizedRoot,this.normalizedPath,this,this.contentWillChange),Ember.addObserver(this.normalizedRoot,this.normalizedPath,this,this.contentDidChange)},removeContentObservers:function(){Ember.removeBeforeObserver(this.normalizedRoot,this.normalizedPath,this.contentWillChange),Ember.removeObserver(this.normalizedRoot,this.normalizedPath,this.contentDidChange)},render:function(){if(this.content){var t=this.content,r=e(t,"length"),n=this.options.data,i=this.template;n.insideEach=!0;for(var o=0;r>o;o++)i(t.objectAt(o),{data:n})}},rerenderContainingView:function(){var e=this;Ember.run.scheduleOnce("render",this,function(){e.destroyed||e.containingView.rerender()})},destroy:function(){this.removeContentObservers(),this.content&&this.removeArrayObservers(),this.destroyed=!0}},Ember.Handlebars.registerHelper("each",function(e,t){if(4===arguments.length){var r=arguments[0];t=arguments[3],e=arguments[2],""===e&&(e="this"),t.hash.keyword=r}return 1===arguments.length&&(t=e,e="this"),t.hash.dataSourceBinding=e,!t.data.insideGroup||t.hash.groupedRows||t.hash.itemViewClass?Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",t):(new Ember.Handlebars.GroupedEach(this,e,t).render(),void 0)})}(),function(){Ember.Handlebars.registerHelper("template",function(){return Ember.Handlebars.helpers.partial.apply(this,arguments)})}(),function(){Ember.Handlebars.registerHelper("partial",function(e,t){var r=e.split("/"),n=r[r.length-1];r[r.length-1]="_"+n;var i=t.data.view,o=r.join("/"),s=i.templateForName(o),a=!s&&i.templateForName(e);s=s||a,s(this,{data:t.data})})}(),function(){var e=Ember.get;Ember.set,Ember.Handlebars.registerHelper("yield",function(t){for(var r=t.data.view;r&&!e(r,"layout");)r=r._contextView?r._contextView:e(r,"parentView");r._yield(this,t)})}(),function(){Ember.Handlebars.registerHelper("loc",function(e){return Ember.String.loc(e)})}(),function(){var e=Ember.set;Ember.get,Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","indeterminate","disabled","tabindex","name"],type:"checkbox",checked:!1,disabled:!1,indeterminate:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},didInsertElement:function(){this._super(),this.get("element").indeterminate=!!this.get("indeterminate")},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){function e(e,r,n){var i=t(r,e),o=t(r,"onEvent"),s=t(r,"value");(o===e||"keyPress"===o&&"key-press"===e)&&r.sendAction("action",s),r.sendAction(e,s),(i||o===e)&&(t(r,"bubbles")||n.stopPropagation())}var t=Ember.get,r=Ember.set;Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex"],placeholder:null,disabled:!1,maxlength:null,init:function(){this._super(),this.on("focusOut",this,this._elementValueDidChange),this.on("change",this,this._elementValueDidChange),this.on("paste",this,this._elementValueDidChange),this.on("cut",this,this._elementValueDidChange),this.on("input",this,this._elementValueDidChange),this.on("keyUp",this,this.interpretKeyEvents)},action:null,onEvent:"enter",bubbles:!1,interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,r=t[e.keyCode];return this._elementValueDidChange(),r?this[r](e):void 0},_elementValueDidChange:function(){r(this,"value",this.$().val())},insertNewline:function(t){e("enter",this,t),e("insert-newline",this,t)},cancel:function(t){e("escape-press",this,t)},focusIn:function(t){e("focus-in",this,t)},focusOut:function(t){e("focus-out",this,t)},keyPress:function(t){e("key-press",this,t)}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){Ember.get,Ember.set,Ember.TextField=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name"],value:"",type:"text",size:null,pattern:null})}(),function(){var e=Ember.get,t=Ember.set;Ember.Button=Ember.View.extend(Ember.TargetActionSupport,{classNames:["ember-button"],classNameBindings:["isActive"],tagName:"button",propagateEvents:!1,attributeBindings:["type","disabled","href","tabindex"],targetObject:Ember.computed(function(){var t=e(this,"target"),r=e(this,"context"),n=e(this,"templateData");return"string"!=typeof t?t:Ember.Handlebars.get(r,t,{data:n})}).property("target"),type:Ember.computed(function(){var e=this.tagName;return"input"===e||"button"===e?"button":void 0}),disabled:!1,href:Ember.computed(function(){return"a"===this.tagName?"#":null}),mouseDown:function(){return e(this,"disabled")||(t(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0),e(this,"propagateEvents")},mouseLeave:function(){this._mouseDown&&(t(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(t(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(){return e(this,"isActive")&&(this.triggerAction(),t(this,"isActive",!1)),this._mouseDown=!1,this._mouseEntered=!1,e(this,"propagateEvents")},keyDown:function(e){(13===e.keyCode||32===e.keyCode)&&this.mouseDown()},keyUp:function(e){(13===e.keyCode||32===e.keyCode)&&this.mouseUp()},touchStart:function(e){return this.mouseDown(e)},touchEnd:function(e){return this.mouseUp(e)},init:function(){this._super()}})}(),function(){var e=Ember.get;Ember.set,Ember.TextArea=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)},"value"),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){var e=Ember.set,t=Ember.get,r=Ember.EnumerableUtils.indexOf,n=Ember.EnumerableUtils.indexesOf,i=Ember.EnumerableUtils.forEach,o=Ember.EnumerableUtils.replace,s=Ember.isArray;Ember.Handlebars.compile,Ember.SelectOption=Ember.View.extend({tagName:"option",attributeBindings:["value","selected"],defaultTemplate:function(e,t){t={data:t.data,hash:{}},Ember.Handlebars.helpers.bind.call(e,"view.label",t)},init:function(){this.labelPathDidChange(),this.valuePathDidChange(),this._super()},selected:Ember.computed(function(){var e=t(this,"content"),n=t(this,"parentView.selection");return t(this,"parentView.multiple")?n&&r(n,e.valueOf())>-1:e==n}).property("content","parentView.selection"),labelPathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionLabelPath"),valuePathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionValuePath")}),Ember.SelectOptgroup=Ember.CollectionView.extend({tagName:"optgroup",attributeBindings:["label"],selectionBinding:"parentView.selection",multipleBinding:"parentView.multiple",optionLabelPathBinding:"parentView.optionLabelPath",optionValuePathBinding:"parentView.optionValuePath",itemViewClassBinding:"parentView.optionView"}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,r,n,i){function o(e,t){var n,i,o="";return t.buffer.push('<option value="">'),n={},i={},t.buffer.push(p(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:n,data:t}))),t.buffer.push("</option>"),o}function s(e,t){var n,i,o;i={},o={},n=r.each.call(e,"view.groupedContent",{hash:{},inverse:d.noop,fn:d.program(4,a,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:i,data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function a(e,t){var n,i;n={contentBinding:e,labelBinding:e},i={contentBinding:"ID",labelBinding:"ID"},t.buffer.push(p(r.view.call(e,"view.groupView",{hash:{contentBinding:"content",labelBinding:"label"},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}function u(e,t){var n,i,o;i={},o={},n=r.each.call(e,"view.content",{hash:{},inverse:d.noop,fn:d.program(7,c,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:i,data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function c(e,t){var n,i;n={contentBinding:e},i={contentBinding:"STRING"},t.buffer.push(p(r.view.call(e,"view.optionView",{hash:{contentBinding:"this"},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),i=i||{};
|
21
|
-
var l,h,m,f="",p=this.escapeExpression,d=this;return h={},m={},l=r["if"].call(t,"view.prompt",{hash:{},inverse:d.noop,fn:d.program(1,o,i),contexts:[t],types:["ID"],hashContexts:m,hashTypes:h,data:i}),(l||0===l)&&i.buffer.push(l),h={},m={},l=r["if"].call(t,"view.optionGroupPath",{hash:{},inverse:d.program(6,u,i),fn:d.program(3,s,i),contexts:[t],types:["ID"],hashContexts:m,hashTypes:h,data:i}),(l||0===l)&&i.buffer.push(l),f}),attributeBindings:["multiple","disabled","tabindex","name"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,r){if(2===arguments.length)return r;var n=t(this,"optionValuePath").replace(/^content\.?/,"");return n?t(this,"selection."+n):t(this,"selection")}).property("selection"),prompt:null,optionLabelPath:"content",optionValuePath:"content",optionGroupPath:null,groupView:Ember.SelectOptgroup,groupedContent:Ember.computed(function(){var e=t(this,"optionGroupPath"),r=Ember.A();return i(t(this,"content"),function(n){var i=t(n,e);t(r,"lastObject.label")!==i&&r.pushObject({label:i,content:Ember.A()}),t(r,"lastObject.content").push(n)}),r}).property("optionGroupPath","content.@each"),optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var r=t(this,"selection");if(t(this,"multiple")){if(!s(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection.@each"),valueDidChange:Ember.observer(function(){var e,r=t(this,"content"),n=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),o=i?t(this,"selection."+i):t(this,"selection");n!==o&&(e=r?r.find(function(e){return n===(i?t(e,i):e)}):null,this.set("selection",e))},"value"),_triggerChange:function(){var e=t(this,"selection"),r=t(this,"value");Ember.isNone(e)||this.selectionDidChange(),Ember.isNone(r)||this.valueDidChange(),this._change()},_changeSingle:function(){var r=this.$()[0].selectedIndex,n=t(this,"content"),i=t(this,"prompt");if(n&&t(n,"length")){if(i&&0===r)return e(this,"selection",null),void 0;i&&(r-=1),e(this,"selection",n.objectAt(r))}},_changeMultiple:function(){var r=this.$("option:selected"),n=t(this,"prompt"),i=n?1:0,a=t(this,"content"),u=t(this,"selection");if(a&&r){var c=r.map(function(){return this.index-i}).toArray(),l=a.objectsAt(c);s(u)?o(u,0,t(u,"length"),l):e(this,"selection",l)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),o=n?r(n,i):-1,s=t(this,"prompt");s&&(o+=1),e&&(e.selectedIndex=o)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),o=t(this,"selection"),s=i?n(i,o):[-1],a=t(this,"prompt"),u=a?1:0,c=this.$("option");c&&c.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(s,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){function e(e,t){for(var r in e)"ID"===t[r]&&(e[r+"Binding"]=e[r],delete e[r])}Ember.Handlebars.registerHelper("input",function(t){var r=t.hash,n=t.hashTypes,i=r.type,o=r.on;return delete r.type,delete r.on,e(r,n),"checkbox"===i?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,t):(i&&(r.type=i),r.onEvent=o||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,t))}),Ember.Handlebars.registerHelper("textarea",function(t){var r=t.hash,n=t.hashTypes;return e(r,n),Ember.Handlebars.helpers.view.call(this,Ember.TextArea,t)})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}function t(e){var t,n=Ember.TEMPLATES;if(n)for(var i in n)(t=i.match(/^components\/(.*)$/))&&r(e,t[1])}function r(e,t){e.injection("component:"+t,"layout","template:components/"+t);var r="component:"+t,n=e.lookupFactory(r);n||(e.register("component:"+t,Ember.Component),n=e.lookupFactory(r)),Ember.Handlebars.helper(t,n)}Ember.Handlebars.bootstrap=function(e){var t='script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';Ember.$(t,e).each(function(){var e=Ember.$(this),t="text/x-raw-handlebars"===e.attr("type")?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),r=e.attr("data-template-name")||e.attr("id")||"application",n=t(e.html());if(void 0!==Ember.TEMPLATES[r])throw new Error('Template named "'+r+'" already exists.');Ember.TEMPLATES[r]=n,e.remove()})},Ember.onLoad("Ember.Application",function(r){r.initializer({name:"domTemplates",initialize:e}),r.initializer({name:"registerComponents",after:"domTemplates",initialize:t})})}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",[],function(){"use strict";function e(e){this.string=e}function t(e){this.name=e}function r(e){this.name=e}function n(){}function i(i,o,s){"/"===i.charAt(0)&&(i=i.substr(1));for(var a=i.split("/"),u=[],c=0,l=a.length;l>c;c++){var h,m=a[c];(h=m.match(/^:([^\/]+)$/))?(u.push(new t(h[1])),o.push(h[1]),s.dynamics++):(h=m.match(/^\*([^\/]+)$/))?(u.push(new r(h[1])),o.push(h[1]),s.stars++):""===m?u.push(new n):(u.push(new e(m)),s.statics++)}return u}function o(e){this.charSpec=e,this.nextStates=[]}function s(e){return e.sort(function(e,t){return e.types.stars!==t.types.stars?e.types.stars-t.types.stars:e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?e.types.statics-t.types.statics:0})}function a(e,t){for(var r=[],n=0,i=e.length;i>n;n++){var o=e[n];r=r.concat(o.match(t))}return r}function u(e,t){for(var r=e.handlers,n=e.regex,i=t.match(n),o=1,s=[],a=0,u=r.length;u>a;a++){for(var c=r[a],l=c.names,h={},m=0,f=l.length;f>m;m++)h[l[m]]=i[o++];s.push({handler:c.handler,params:h,isDynamic:!!l.length})}return s}function c(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function l(e,t,r){this.path=e,this.matcher=t,this.delegate=r}function h(e){this.routes={},this.children={},this.target=e}function m(e,t,r){return function(n,i){var o=e+n;return i?(i(m(o,t,r)),void 0):new l(e+n,t,r)}}function f(e,t,r){for(var n=0,i=0,o=e.length;o>i;i++)n+=e[i].path.length;t=t.substr(n),e.push({path:t,handler:r})}function p(e,t,r,n){var i=t.routes;for(var o in i)if(i.hasOwnProperty(o)){var s=e.slice();f(s,o,i[o]),t.children[o]?p(s,t.children[o],r,n):r.call(n,s)}}var d=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],b=new RegExp("(\\"+d.join("|\\")+")","g");e.prototype={eachChar:function(e){for(var t,r=this.string,n=0,i=r.length;i>n;n++)t=r.charAt(n),e({validChars:t})},regex:function(){return this.string.replace(b,"\\$1")},generate:function(){return this.string}},t.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},r.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},n.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},o.prototype={get:function(e){for(var t=this.nextStates,r=0,n=t.length;n>r;r++){var i=t[r],o=i.charSpec.validChars===e.validChars;if(o=o&&i.charSpec.invalidChars===e.invalidChars)return i}},put:function(e){var t;return(t=this.get(e))?t:(t=new o(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,r,n,i=this.nextStates,o=[],s=0,a=i.length;a>s;s++)t=i[s],r=t.charSpec,"undefined"!=typeof(n=r.validChars)?-1!==n.indexOf(e)&&o.push(t):"undefined"!=typeof(n=r.invalidChars)&&-1===n.indexOf(e)&&o.push(t);return o}};var v=function(){this.rootState=new o,this.names={}};return v.prototype={add:function(e,t){for(var r,o=this.rootState,s="^",a={statics:0,dynamics:0,stars:0},u=[],l=[],h=!0,m=0,f=e.length;f>m;m++){var p=e[m],d=[],b=i(p.path,d,a);l=l.concat(b);for(var v=0,E=b.length;E>v;v++){var g=b[v];g instanceof n||(h=!1,o=o.put({validChars:"/"}),s+="/",o=c(o,g),s+=g.regex())}u.push({handler:p.handler,names:d})}h&&(o=o.put({validChars:"/"}),s+="/"),o.handlers=u,o.regex=new RegExp(s+"$"),o.types=a,(r=t&&t.as)&&(this.names[r]={segments:l,handlers:u})},handlersFor:function(e){var t=this.names[e],r=[];if(!t)throw new Error("There is no route named "+e);for(var n=0,i=t.handlers.length;i>n;n++)r.push(t.handlers[n]);return r},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var r=this.names[e],i="";if(!r)throw new Error("There is no route named "+e);for(var o=r.segments,s=0,a=o.length;a>s;s++){var u=o[s];u instanceof n||(i+="/",i+=u.generate(t))}return"/"!==i.charAt(0)&&(i="/"+i),i},recognize:function(e){var t,r,n,i=[this.rootState];for("/"!==e.charAt(0)&&(e="/"+e),t=e.length,t>1&&"/"===e.charAt(t-1)&&(e=e.substr(0,t-1)),r=0,n=e.length;n>r&&(i=a(i,e.charAt(r)),i.length);r++);var o=[];for(r=0,n=i.length;n>r;r++)i[r].handlers&&o.push(i[r]);i=s(o);var c=o[0];return c&&c.handlers?u(c,e):void 0}},l.prototype={to:function(e,t){var r=this.delegate;if(r&&r.willAddRoute&&(e=r.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e),t){if(0===t.length)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,e,t,this.delegate)}}},h.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,r,n){var i=new h(t);this.children[e]=i;var o=m(e,i,n);n&&n.contextEntered&&n.contextEntered(t,o),r(o)}},v.prototype.map=function(e,t){var r=new h;e(m("",r,this.delegate)),p([],r,function(e){t?t(this,e):this.add(e)},this)},v})}(),function(){e("router",["route-recognizer","rsvp"],function(e,t){"use strict";function r(e,t){this.router=e,this.promise=t,this.data={},this.resolvedModels={},this.providedModels={},this.providedModelsArray=[],this.sequence=++r.currentSequence,this.params={}}function n(){this.recognizer=new e}function i(e,n){return new r(e,t.reject(n))}function o(e,t,r,n){var i,o,a=t.length,u={},l=e.currentHandlerInfos||[],h={},m=e.currentParams||{},f=e.activeTransition,p={};for(r=x.call(r),c(h,n),i=t.length-1;i>=0;i--){var d=t[i],b=d.handler,v=l[i],E=!1;if(v&&v.name===d.handler||(E=!0),d.isDynamic)if(o=s(r,b,f,!0,h))E=!0,u[b]=o;else{p[b]={};for(var g in d.params)if(d.params.hasOwnProperty(g)){var y=d.params[g];m[g]!==y&&(E=!0),p[b][g]=h[g]=y}}else if(d.hasOwnProperty("names"))if(r.length&&(E=!0),o=s(r,b,f,d.names[0],h))u[b]=o;else{var w=d.names;p[b]={};for(var _=0,C=w.length;C>_;++_){var O=w[_];p[b][O]=h[O]=h[O]||m[O]}}E&&(a=i)}if(r.length>0)throw new Error("More context objects were passed than there are dynamic segments for the route: "+t[t.length-1].handler);return{matchPoint:a,providedModels:u,params:h,handlerParams:p}}function s(e,t,r,n,i){if(e.length&&n){var o=e.pop();if(!a(o))return o;i[n]=o.toString()}else if(r)return r.resolvedModels[t]||n&&r.providedModels[t]}function a(e){return"string"==typeof e||e instanceof String||!isNaN(e)}function u(e,t,r){var n,i,s,a,u,l=e.recognizer.handlersFor(t),h={},m=o(e,l,r).matchPoint;for(u=0;u<l.length;u++)i=l[u],s=e.getHandler(i.handler),a=i.names,a.length&&(n=u>=m?r.shift():s.context,c(h,V(s,n,a)));return h}function c(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function l(e,t){var r=e.recognizer.handlersFor(t[0]);return A(e,"Attempting transition to "+t[0]),E(e,r,x.call(t,1),e.currentParams)}function h(e,t){var r=e.recognizer.recognize(t);return e.currentHandlerInfos,A(e,"Attempting URL transition to "+t),r?E(e,r,[],{}):i(e,new n.UnrecognizedURLError(t))}function m(e,t){var r=e.router,n=d(r.currentHandlerInfos||[],t);r.targetHandlerInfos=t,p(n.exited,function(e){var t=e.handler;delete t.context,t.exit&&t.exit()});var i=n.unchanged.slice();r.currentHandlerInfos=i,p(n.updatedContext,function(t){f(e,i,t,!1)}),p(n.entered,function(t){f(e,i,t,!0)})}function f(e,t,r,i){var o=r.handler,s=r.context;try{i&&o.enter&&o.enter(),C(e),v(o,s),o.setup&&o.setup(s),C(e)}catch(a){throw a instanceof n.TransitionAborted||b(e.router,t.concat(r),!0,["error",a,e]),a}t.push(r)}function p(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r])}function d(e,t){var r,n,i,o,s={updatedContext:[],exited:[],entered:[],unchanged:[]};for(i=0,o=t.length;o>i;i++){var a=e[i],u=t[i];a&&a.handler===u.handler||(r=!0),r?(s.entered.push(u),a&&s.exited.unshift(a)):n||a.context!==u.context?(n=!0,s.updatedContext.push(u)):s.unchanged.push(a)}for(i=t.length,o=e.length;o>i;i++)s.exited.unshift(e[i]);return s}function b(e,t,r,n){if(e.triggerEvent)return e.triggerEvent(t,r,n),void 0;var i=n.shift();if(!t){if(r)return;throw new Error("Could not trigger event '"+i+"'. There are no active handlers")}for(var o=!1,s=t.length-1;s>=0;s--){var a=t[s],u=a.handler;if(u.events&&u.events[i]){if(u.events[i].apply(u,n)!==!0)return;o=!0}}if(!o&&!r)throw new Error("Nothing handled the event '"+i+"'.")}function v(e,t){e.context=t,e.contextDidChange&&e.contextDidChange()}function E(e,n,i,s,a){function u(){C(d);try{A(e,d.sequence,"Validation succeeded, finalizing transition;"),f&&f.length&&e.recognizer.hasRoute(f[f.length-1].name)&&f.length===l.matchPoint||w(d,v),e.didTransition&&e.didTransition(v),A(e,d.sequence,"TRANSITION COMPLETE."),p.resolve(v[v.length-1].handler)}catch(t){p.reject(t)}d.isAborted||(e.activeTransition=null)}function c(e){p.reject(e)}var l=o(e,n,i,s),h=n[n.length-1].handler,m=!1,f=e.currentHandlerInfos;if(e.activeTransition){if(y(e.activeTransition,h,i))return e.activeTransition;e.activeTransition.abort(),m=!0}var p=t.defer(),d=new r(e,p.promise);d.targetName=h,d.providedModels=l.providedModels,d.providedModelsArray=i,d.params=l.params,d.data=a||{},e.activeTransition=d;var v=g(e,n);return m||b(e,f,!0,["willTransition",d]),A(e,d.sequence,"Beginning validation for transition to "+d.targetName),_(d,v,0,l.matchPoint,l.handlerParams).then(u,c),d}function g(e,t){for(var r=[],n=0,i=t.length;i>n;++n){var o=t[n],s=o.isDynamic||o.names&&o.names.length;r.push({isDynamic:!!s,name:o.handler,handler:e.getHandler(o.handler)})}return r}function y(e,t,r){if(e.targetName!==t)return!1;var n=e.providedModelsArray;if(n.length!==r.length)return!1;for(var i=0,o=n.length;o>i;++i)if(n[i]!==r[i])return!1;return!0}function w(e,t){for(var r=e.router,n=(e.sequence,t[t.length-1].name),i=[],o=e.providedModelsArray.slice(),s=t.length-1;s>=0;--s){var c=t[s];if(c.isDynamic){var l=o.pop();i.unshift(a(l)?l.toString():c.context)}}var h=u(r,n,i);r.currentParams=h;var f=e.urlMethod;if(f){var p=r.recognizer.generate(n,h);"replace"===f?r.replaceURL(p):r.updateURL(p)}m(e,t)}function _(e,i,o,s,a){function u(r){return e.isAborted?(A(e.router,e.sequence,"detected abort."),t.reject(new n.TransitionAborted)):r}function c(r){return r instanceof n.TransitionAborted?t.reject(r):(e.abort(),A(p,g,E+": handling error: "+r),b(p,i.slice(0,o+1),!0,["error",r,e]),t.reject(r))}function l(){A(p,g,E+": calling beforeModel hook");var t=v.beforeModel&&v.beforeModel(e);return t instanceof r?null:t}function h(){A(p,g,E+": resolving model");var t=O(d,e,a[E],o>=s);return t instanceof r?null:t}function m(t){A(p,g,E+": calling afterModel hook"),e.resolvedModels[d.name]=t;var n=v.afterModel&&v.afterModel(t,e);return n instanceof r?null:n}function f(){return A(p,g,E+": validation succeeded, proceeding"),d.context=e.resolvedModels[d.name],_(e,i,o+1,s,a)}if(o===i.length)return t.resolve(e.resolvedModels);var p=e.router,d=i[o],v=d.handler,E=d.name,g=e.sequence;return s>o?(A(p,g,E+": using context from already-active handler"),e.resolvedModels[d.name]=e.providedModels[d.name]||d.handler.context,f()):t.resolve().then(u).then(l).then(u).then(h).then(u).then(m).then(u).then(null,c).then(f)}function C(e){if(e.isAborted)throw A(e.router,e.sequence,"detected abort."),new n.TransitionAborted}function O(e,t,r,n){var i=e.handler,o=e.name;if(!n&&i.hasOwnProperty("context"))return i.context;if(t.providedModels.hasOwnProperty(o)){var s=t.providedModels[o];return"function"==typeof s?s():s}return i.model&&i.model(r||{},t)}function A(e,t,r){e.log&&(3===arguments.length?e.log("Transition #"+t+": "+r):(r=t,e.log(r)))}function P(e,t){var r=t[0]||"/";return"/"===r.charAt(0)?h(e,r):l(e,t)}function V(e,t,r){var n={};if(a(t))return n[r[0]]=t,n;if(e.serialize)return e.serialize(t,r);if(1===r.length){var i=r[0];return n[i]=/_id$/.test(i)?t.id:t,n}}var x=Array.prototype.slice;return r.currentSequence=0,r.prototype={targetName:null,urlMethod:"update",providedModels:null,resolvedModels:null,params:null,promise:null,data:null,then:function(e,t){return this.promise.then(e,t)},abort:function(){return this.isAborted?this:(A(this.router,this.sequence,this.targetName+": transition was aborted"),this.isAborted=!0,this.router.activeTransition=null,this)},retry:function(){this.abort();var e=this.router.recognizer.handlersFor(this.targetName),t=E(this.router,e,this.providedModelsArray,this.params,this.data);return t},method:function(e){return this.urlMethod=e,this}},n.UnrecognizedURLError=function(e){this.message=e||"UnrecognizedURLError",this.name="UnrecognizedURLError"},n.TransitionAborted=function(e){this.message=e||"TransitionAborted",this.name="TransitionAborted"},n.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){var r=t[t.length-1].handler,n=[t,{as:r}];e.add.apply(e,n)})},hasRoute:function(e){return this.recognizer.hasRoute(e)},reset:function(){p(this.currentHandlerInfos||[],function(e){var t=e.handler;t.exit&&t.exit()}),this.currentHandlerInfos=null,this.targetHandlerInfos=null},activeTransition:null,handleURL:function(e){var t=x.call(arguments);return"/"!==e.charAt(0)&&(t[0]="/"+e),P(this,t).method(null)},updateURL:function(){throw new Error("updateURL is not implemented")},replaceURL:function(e){this.updateURL(e)},transitionTo:function(){return P(this,arguments)},replaceWith:function(){return P(this,arguments).method("replace")},paramsForHandler:function(e){return u(this,e,x.call(arguments,1))},generate:function(e){var t=u(this,e,x.call(arguments,1));return this.recognizer.generate(e,t)},isActive:function(e){var t,r,n=x.call(arguments,1),i=this.targetHandlerInfos,o=!1;if(!i)return!1;for(var s=this.recognizer.handlersFor(i[i.length-1].name),u=i.length-1;u>=0;u--)if(r=i[u],r.name===e&&(o=!0),o){if(0===n.length)break;if(r.isDynamic)if(t=n.pop(),a(t)){var c=s[u],l=c.names[0];if(""+t!==this.currentParams[l])return!1}else if(r.context!==t)return!1}return 0===n.length&&o},trigger:function(){var e=x.call(arguments);b(this,this.currentHandlerInfos,!1,e)},log:null},n})}(),function(){function e(e){this.parent=e,this.matches=[]}e.prototype={resource:function(t,r,n){if(2===arguments.length&&"function"==typeof r&&(n=r,r={}),1===arguments.length&&(r={}),"string"!=typeof r.path&&(r.path="/"+t),n){var i=new e(t);n.call(i),this.push(r.path,t,i.generate())}else this.push(r.path,t)},push:function(e,t,r){var n=t.split(".");(""===e||"/"===e||"index"===n[n.length-1])&&(this.explicitIndex=!0),this.matches.push([e,t,r])},route:function(e,t){t=t||{},"string"!=typeof t.path&&(t.path="/"+e),this.parent&&"application"!==this.parent&&(e=this.parent+"."+e),this.push(t.path,e)},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var r=0,n=e.length;n>r;r++){var i=e[r];t(i[0]).to(i[1],i[2])}}}},e.map=function(t){var r=new e;return t.call(r),r},Ember.RouterDSL=e}(),function(){var e=Ember.get;Ember.controllerFor=function(e,t,r){return e.lookup("controller:"+t,r)},Ember.generateController=function(t,r,n){var i,o,s,a,u;return u=n&&Ember.isArray(n)?"array":n?"object":"basic",a="controller:"+u,i=t.lookupFactory(a).extend({isGenerated:!0,toString:function(){return"(generated "+r+" controller)"}}),o="controller:"+r,t.register(o,i),s=t.lookup(o),e(s,"namespace.LOG_ACTIVE_GENERATION")&&Ember.Logger.info("generated -> "+o,{fullName:o}),s}}(),function(){function e(e,t,r){var n=r.shift();if(!e){if(t)return;throw new Error("Could not trigger event '"+n+"'. There are no active handlers")}for(var i=!1,o=e.length-1;o>=0;o--){var s=e[o],a=s.handler;if(a._actions&&a._actions[n]){if(a._actions[n].apply(a,r)!==!0)return;i=!0}else if(a.events&&a.events[n]){if(a.events[n].apply(a,r)!==!0)return;i=!0}}if(!i&&!t)throw new Error("Nothing handled the event '"+n+"'.")}var r=t("router"),n=Ember.get,i=Ember.set,o=Ember.defineProperty,s=Ember._MetamorphView;Ember.Router=Ember.Object.extend({location:"hash",init:function(){this.router=this.constructor.router||this.constructor.map(Ember.K),this._activeViews={},this._setupLocation()},url:Ember.computed(function(){return n(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=n(this,"location"),r=this.container,i=this;this._setupRouter(e,t),r.register("view:default",s),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){i.handleURL(e)}),this.handleURL(t.getURL())},didTransition:function(e){var t=this.container.lookup("controller:application"),r=Ember.Router._routePath(e);"currentPath"in t||o(t,"currentPath"),i(t,"currentPath",r),"currentRouteName"in t||o(t,"currentRouteName"),i(t,"currentRouteName",e[e.length-1].name),this.notifyPropertyChange("url"),n(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+r+"'")},handleURL:function(e){return this._doTransition("handleURL",[e])},transitionTo:function(){return this._doTransition("transitionTo",arguments)},replaceWith:function(){return this._doTransition("replaceWith",arguments)},generate:function(){var e=this.router.generate.apply(this.router,arguments);return this.location.formatURL(e)},isActive:function(){var e=this.router;return e.isActive.apply(e,arguments)},send:function(){this.router.trigger.apply(this.router,arguments)},hasRoute:function(e){return this.router.hasRoute(e)},reset:function(){this.router.reset()},_lookupActiveView:function(e){var t=this._activeViews[e];return t&&t[0]},_connectActiveView:function(e,t){var r=this._activeViews[e];r&&r[0].off("willDestroyElement",this,r[1]);var n=function(){delete this._activeViews[e]};this._activeViews[e]=[t,n],t.one("willDestroyElement",this,n)},_setupLocation:function(){var e=n(this,"location"),t=n(this,"rootURL"),r={};"string"==typeof t&&(r.rootURL=t),"string"==typeof e&&(r.implementation=e,e=i(this,"location",Ember.Location.create(r)))},_getHandlerFunction:function(){var e={},t=this.container,r=t.lookupFactory("route:basic"),i=this;return function(o){var s="route:"+o,a=t.lookup(s);if(e[o])return a;if(e[o]=!0,!a){if("loading"===o)return{};t.register(s,r.extend()),a=t.lookup(s),n(i,"namespace.LOG_ACTIVE_GENERATION")&&Ember.Logger.info("generated -> "+s,{fullName:s})}return"application"===o&&(a.events=a.events||{},a.events.error=a.events.error||Ember.Router._defaultErrorHandler),a.routeName=o,a}},_setupRouter:function(e,t){var r,n=this;e.getHandler=this._getHandlerFunction();var i=function(){t.setURL(r)};if(e.updateURL=function(e){r=e,Ember.run.once(i)},t.replaceURL){var o=function(){t.replaceURL(r)};e.replaceURL=function(e){r=e,Ember.run.once(o)}}e.didTransition=function(e){n.didTransition(e)}},_doTransition:function(e,t){t=[].slice.call(t),t[0]=t[0]||"/";var r,n=t[0],i=this;r="/"===n.charAt(0)?n:this.router.hasRoute(n)?n:t[0]=n+".index";var o=this.router[e].apply(this.router,t);return this.router.activeTransition&&this._scheduleLoadingStateEntry(),o.then(function(e){i._transitionCompleted(e)},function(){}),o},_scheduleLoadingStateEntry:function(){this._loadingStateActive||(this._shouldEnterLoadingState=!0,Ember.run.scheduleOnce("routerTransitions",this,this._enterLoadingState))},_enterLoadingState:function(){if(!this._loadingStateActive&&this._shouldEnterLoadingState){var e=this.router.getHandler("loading");e&&(e.enter&&e.enter(),e.setup&&e.setup(),this._loadingStateActive=!0)}},_exitLoadingState:function(){if(this._shouldEnterLoadingState=!1,this._loadingStateActive){var e=this.router.getHandler("loading");e&&e.exit&&e.exit(),this._loadingStateActive=!1}},_transitionCompleted:function(){this.notifyPropertyChange("url"),this._exitLoadingState()}}),Ember.Router.reopenClass({router:null,map:function(t){var i=this.router;i||(i=new r,i.callbacks=[],i.triggerEvent=e,this.reopenClass({router:i})),n(this,"namespace.LOG_TRANSITIONS_INTERNAL")&&(i.log=Ember.Logger.debug);var o=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){for(var e=0;e<i.callbacks.length;e++)i.callbacks[e].call(this);t.call(this)})});return i.callbacks.push(t),i.map(o.generate()),i},_defaultErrorHandler:function(e){Ember.Logger.error("Error while loading route:",e),setTimeout(function(){throw e})},_routePath:function(e){for(var t=[],r=1,n=e.length;n>r;r++){var i=e[r].name,o=i.split(".");t.push(o[o.length-1])}return t.join(".")}})}(),function(){function e(e){var t=e.router.router.targetHandlerInfos;if(t)for(var r,n,i=0,o=t.length;o>i;i++){if(n=t[i].handler,n===e)return r;r=n}}function t(r){var n,i=e(r);if(i)return(n=i.lastRenderedTemplate)?n:t(i)}function r(e,r,n,i){i=i||{},i.into=i.into?i.into.replace(/\//g,"."):t(e),i.outlet=i.outlet||"main",i.name=r,i.template=n,i.LOG_VIEW_LOOKUPS=a(e.router,"namespace.LOG_VIEW_LOOKUPS");var o,s=i.controller;return s=i.controller?i.controller:(o=e.container.lookup("controller:"+r))?o:e.controllerName||e.routeName,"string"==typeof s&&(s=e.container.lookup("controller:"+s)),i.controller=s,i}function n(e,t,r){if(e)r.LOG_VIEW_LOOKUPS&&Ember.Logger.info("Rendering "+r.name+" with "+e,{fullName:"view:"+r.name});else{var n=r.into?"view:default":"view:toplevel";e=t.lookup(n),r.LOG_VIEW_LOOKUPS&&Ember.Logger.info("Rendering "+r.name+" with default view "+e,{fullName:"view:"+r.name})}return a(e,"templateName")||(u(e,"template",r.template),u(e,"_debugTemplateName",r.name)),u(e,"renderedName",r.name),u(e,"controller",r.controller),e}function i(e,t,r){if(r.into){var n=e.router._lookupActiveView(r.into),i=s(n,r.outlet);e.teardownOutletViews||(e.teardownOutletViews=[]),h(e.teardownOutletViews,0,0,[i]),n.connectOutlet(r.outlet,t)}else{var u=a(e,"router.namespace.rootElement");e.teardownTopLevelView&&e.teardownTopLevelView(),e.router._connectActiveView(r.name,t),e.teardownTopLevelView=o(t),t.appendTo(u)}}function o(e){return function(){e.destroy()}}function s(e,t){return function(){e.disconnectOutlet(t)}}var a=Ember.get,u=Ember.set,c=Ember.getProperties,l=(Ember.String.classify,Ember.String.fmt,Ember.EnumerableUtils.forEach),h=Ember.EnumerableUtils.replace;Ember.Route=Ember.Object.extend(Ember.ActionHandler,{exit:function(){this.deactivate(),this.teardownViews()},enter:function(){this.activate()},actions:null,events:null,mergedProperties:["events"],deactivate:Ember.K,activate:Ember.K,transitionTo:function(){var e=this.router;return e.transitionTo.apply(e,arguments)},replaceWith:function(){return this.router,this.router.replaceWith.apply(this.router,arguments)},send:function(){return this.router.send.apply(this.router,arguments)},setup:function(e){var t=this.controllerName||this.routeName,r=this.controllerFor(t,!0);r||(r=this.generateController(t,e)),this.controller=r,this.setupControllers?this.setupControllers(r,e):this.setupController(r,e),this.renderTemplates?this.renderTemplates(e):this.renderTemplate(r,e)},redirect:Ember.K,beforeModel:Ember.K,afterModel:function(e,t){this.redirect(e,t)},contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,r,n,i;for(var o in e)(t=o.match(/^(.*)_id$/))&&(r=t[1],i=e[o]),n=!0;if(!r&&n)return e;if(r)return this.findModel(r,i)},findModel:function(){var e=a(this,"store");return e.find.apply(e,arguments)},store:Ember.computed(function(){var e=this.container;return this.routeName,a(this,"router.namespace"),{find:function(t,r){var n=e.lookupFactory("model:"+t);return n.find(r)}}}),serialize:function(e,t){if(!(t.length<1)){var r=t[0],n={};return/_id$/.test(r)&&1===t.length?n[r]=a(e,"id"):n=c(e,t),n}},setupController:function(e,t){e&&void 0!==t&&u(e,"model",t)},controllerFor:function(e){var t,r=this.container,n=r.lookup("route:"+e);return n&&n.controllerName&&(e=n.controllerName),t=r.lookup("controller:"+e)},generateController:function(e,t){var r=this.container;return t=t||this.modelFor(e),Ember.generateController(r,e,t)},modelFor:function(e){var t=this.container.lookup("route:"+e),r=this.router.router.activeTransition;if(r){var n=t&&t.routeName||e;if(r.resolvedModels.hasOwnProperty(n))return r.resolvedModels[n]}return t&&t.currentModel},renderTemplate:function(){this.render()},render:function(e,t){"object"!=typeof e||t||(t=e,e=this.routeName),t=t||{},e=e?e.replace(/\//g,"."):this.routeName;var o=t.view||this.viewName||e,s=this.templateName||e,u=this.container,c=u.lookup("view:"+o),l=c?c.get("template"):null;return l||(l=u.lookup("template:"+s)),c||l?(t=r(this,e,l,t),c=n(c,u,t),"main"===t.outlet&&(this.lastRenderedTemplate=e),i(this,c,t),void 0):(a(this.router,"namespace.LOG_VIEW_LOOKUPS")&&Ember.Logger.info('Could not find "'+e+'" template or view. Nothing will be rendered',{fullName:"template:"+e}),void 0)},disconnectOutlet:function(e){e=e||{},e.parentView=e.parentView?e.parentView.replace(/\//g,"."):t(this),e.outlet=e.outlet||"main";var r=this.router._lookupActiveView(e.parentView);r.disconnectOutlet(e.outlet)},willDestroy:function(){this.teardownViews()},teardownViews:function(){this.teardownTopLevelView&&this.teardownTopLevelView();var e=this.teardownOutletViews||[];l(e,function(e){e()}),delete this.teardownTopLevelView,delete this.teardownOutletViews,delete this.lastRenderedTemplate}})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r,i){return n.call(t(e,r,i),function(t,n){return null===t?r[n]:o(e,t,i)})}function t(e,t,o){function s(e,t){return"controller"===t?t:Ember.ControllerMixin.detect(e)?s(i(e,"model"),t?t+".model":"model"):t}var a=r(e,t,o),u=o.types;return n.call(a,function(e,r){return"ID"===u[r]?s(e,t[r]):null})}var r=Ember.Handlebars.resolveParams,n=Ember.ArrayPolyfills.map,i=Ember.get,o=Ember.Handlebars.get;Ember.Router.resolveParams=e,Ember.Router.resolvePaths=t})}(),function(){var e=Ember.get;Ember.set,Ember.String.fmt,Ember.onLoad("Ember.Handlebars",function(){function t(e,t){return e.hasRoute(t)||(t+=".index"),t}function r(e){var t=e.options.types,r=e.options.data;return i(e.context,e.params,{types:t,data:r})}var n=Ember.Router.resolveParams,i=Ember.Router.resolvePaths,o=Ember.ViewUtils.isSimpleClick,s=Ember.LinkView=Ember.View.extend({tagName:"a",currentWhen:null,title:null,rel:null,activeClass:"active",loadingClass:"loading",disabledClass:"disabled",_isDisabled:!1,replace:!1,attributeBindings:["href","title","rel"],classNameBindings:["active","loading","disabled"],eventName:"click",init:function(){this._super.apply(this,arguments);var t=e(this,"eventName");this.on(t,this,this._invoke);var n,i,o=this.parameters,s=o.context,a=r(o),u=a.length;for(i=0;u>i;i++)if(n=a[i],null!==n){var c=Ember.Handlebars.normalizePath(s,n,o.options.data);this.registerObserver(c.root,c.path,this,this._paramsChanged)}},_paramsChanged:function(){this.notifyPropertyChange("resolvedParams")},concreteView:Ember.computed(function(){return e(this,"parentView")}).property("parentView"),disabled:Ember.computed(function(t,r){return void 0!==r&&this.set("_isDisabled",r),r?e(this,"disabledClass"):!1}),active:Ember.computed(function(){if(e(this,"loading"))return!1;var t=e(this,"router"),r=e(this,"routeArgs"),n=r.slice(1),i=e(this,"resolvedParams"),o=this.currentWhen||i[0],s=o+".index",a=t.isActive.apply(t,[o].concat(n))||t.isActive.apply(t,[s].concat(n));return a?e(this,"activeClass"):void 0}).property("resolvedParams","routeArgs","router.url"),loading:Ember.computed(function(){return e(this,"routeArgs")?void 0:e(this,"loadingClass")}).property("routeArgs"),router:Ember.computed(function(){return e(this,"controller").container.lookup("router:main")}),_invoke:function(t){if(!o(t))return!0;if(t.preventDefault(),this.bubbles===!1&&t.stopPropagation(),e(this,"_isDisabled"))return!1;if(e(this,"loading"))return Ember.Logger.warn("This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid."),!1;var r=e(this,"router"),n=e(this,"routeArgs");e(this,"replace")?r.replaceWith.apply(r,n):r.transitionTo.apply(r,n)},resolvedParams:Ember.computed(function(){var e=this.parameters,t=e.options,r=t.types,i=t.data;return n(e.context,e.params,{types:r,data:i})}).property(),routeArgs:Ember.computed(function(){var r=e(this,"resolvedParams").slice(0),n=e(this,"router"),i=r[0];if(i){i=t(n,i),r[0]=i;for(var o=1,s=r.length;s>o;++o){var a=r[o];if(null===a||"undefined"==typeof a)return}return r}}).property("resolvedParams"),href:Ember.computed(function(){if("a"!==e(this,"tagName"))return!1;var t=e(this,"router"),r=e(this,"routeArgs");return r?t.generate.apply(t,r):e(this,"loadingHref")}).property("routeArgs"),loadingHref:"#"});s.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("link-to",function(){var e=[].slice.call(arguments,-1)[0],t=[].slice.call(arguments,0,-1),r=e.hash;
|
22
|
-
return r.disabledBinding=r.disabledWhen,r.parameters={context:this,options:e,params:t},Ember.Handlebars.helpers.view.call(this,s,e)}),Ember.Handlebars.registerHelper("linkTo",Ember.Handlebars.helpers["link-to"])})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,r){var n,i;for(t&&t.data&&t.data.isRenderData&&(r=t,t="main"),n=r.data.view;!n.get("template.isTop");)n=n.get("_parentView");return i=r.hash.viewClass||e.OutletView,r.data.view.set("outletSource",n),r.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,i,r)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,r){var n,i,o,s,a,u,c=3===arguments.length;2===arguments.length&&(r=t,t=void 0),"string"==typeof t&&(a=Ember.Handlebars.get(r.contexts[1],t,r),u={singleton:!1}),e=e.replace(/\//g,"."),n=r.data.keywords.controller.container,i=n.lookup("router:main"),s=n.lookup("view:"+e)||n.lookup("view:default");var l=r.hash.controller;o=l?n.lookup("controller:"+l,u):n.lookup("controller:"+e,u)||Ember.generateController(n,e,a),o&&c&&o.set("model",a);var h=r.contexts[1];h&&s.registerObserver(h,t,function(){o.set("model",Ember.Handlebars.get(h,t,r))}),o.set("target",r.data.keywords.controller),r.hash.viewName=Ember.String.camelize(e),r.hash.template=n.lookup("template:"+e),r.hash.controller=o,i&&!a&&i._connectActiveView(e,s),Ember.Handlebars.helpers.view.call(this,s,r)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r){var n=[];r&&n.push(r);var i=e.options.types.slice(1),o=e.options.data;return n.concat(t(e.context,e.params,{types:i,data:o}))}var t=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,n=Ember.Handlebars,i=n.get,o=n.SafeString,s=Ember.ArrayPolyfills.forEach,a=(Ember.get,Array.prototype.slice),u=n.ActionHelper={registeredActions:{}},c=["alt","shift","meta","ctrl"],l=function(e,t){if("undefined"==typeof t)return r(e);var n=!0;return s.call(c,function(r){e[r+"Key"]&&-1===t.indexOf(r)&&(n=!1)}),n};u.registerAction=function(t,r,n){var o=(++Ember.uuid).toString();return u.registeredActions[o]={eventName:r.eventName,handler:function(o){if(!l(o,n))return!0;o.preventDefault(),r.bubbles===!1&&o.stopPropagation();var s=r.target;s=s.target?i(s.root,s.target,s.options):s.root,Ember.run(function(){s.send?s.send.apply(s,e(r.parameters,t)):s[t].apply(s,e(r.parameters))})}},r.view.on("willClearRender",function(){delete u.registeredActions[o]}),o},n.registerHelper("action",function(e){var t,r=arguments[arguments.length-1],n=a.call(arguments,1,-1),i=r.hash,s={eventName:i.on||"click"};s.parameters={context:this,options:r,params:n},s.view=r.data.view;var c,l;i.target?(c=this,l=i.target):(t=r.data.keywords.controller)&&(c=t),s.target={root:c,target:l,options:r},s.bubbles=i.bubbles;var h=u.registerAction(e,s,i.allowedKeys);return new o('data-ember-action="'+h+'"')})})}(),function(){if(Ember.ENV.EXPERIMENTAL_CONTROL_HELPER){var e=Ember.get,t=Ember.set;Ember.Handlebars.registerHelper("control",function(r,n,i){function o(){var e=Ember.Handlebars.get(this,n,i);t(p,"model",e),f.rerender()}2===arguments.length&&(i=n,n=void 0);var s;n&&(s=Ember.Handlebars.get(this,n,i));var a,u,c=i.data.keywords.controller,l=(i.data.keywords.view,e(c,"_childContainers")),h=i.hash.controlID;l.hasOwnProperty(h)?u=l[h]:(a=e(c,"container"),u=a.child(),l[h]=u);var m=r.replace(/\//g,"."),f=u.lookup("view:"+m)||u.lookup("view:default"),p=u.lookup("controller:"+m),d=u.lookup("template:"+r);t(p,"target",c),t(p,"model",s),i.hash.template=d,i.hash.controller=p,n&&(Ember.addObserver(this,n,o),f.one("willDestroyElement",this,function(){Ember.removeObserver(this,n,o)})),Ember.Handlebars.helpers.view.call(this,f,i)})}}(),function(){var e=Ember.get;Ember.set,Ember.ControllerMixin.reopen({transitionToRoute:function(){var t=e(this,"target"),r=t.transitionToRoute||t.transitionTo;return r.apply(t,arguments)},transitionTo:function(){return this.transitionToRoute.apply(this,arguments)},replaceRoute:function(){var t=e(this,"target"),r=t.replaceRoute||t.replaceWith;return r.apply(t,arguments)},replaceWith:function(){return this.replaceRoute.apply(this,arguments)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.View.reopen({init:function(){t(this,"_outlets",{}),this._super()},connectOutlet:function(r,n){if(this._pendingDisconnections&&delete this._pendingDisconnections[r],this._hasEquivalentView(r,n))return n.destroy(),void 0;var i=e(this,"_outlets"),o=e(this,"container"),s=o&&o.lookup("router:main"),a=e(n,"renderedName");t(i,r,n),s&&a&&s._connectActiveView(a,n)},_hasEquivalentView:function(t,r){var n=e(this,"_outlets."+t);return n&&n.constructor===r.constructor&&n.get("template")===r.get("template")&&n.get("context")===r.get("context")},disconnectOutlet:function(e){this._pendingDisconnections||(this._pendingDisconnections={}),this._pendingDisconnections[e]=!0,Ember.run.once(this,"_finishDisconnections")},_finishDisconnections:function(){var r=e(this,"_outlets"),n=this._pendingDisconnections;this._pendingDisconnections=null;for(var i in n)t(r,i,null)}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"routerTransitions")}(),function(){Ember.get,Ember.set,Ember.Location={create:function(e){var t=e&&e.implementation,r=this.implementations[t];return r.create.apply(r,arguments)},registerImplementation:function(e,t){this.implementations[e]=t},implementations:{}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({path:"",getURL:function(){return e(this,"path")},setURL:function(e){t(this,"path",e)},onUpdateURL:function(e){this.updateCallback=e},handleURL:function(e){t(this,"path",e),this.updateCallback(e)},formatURL:function(e){return e}}),Ember.Location.registerImplementation("none",Ember.NoneLocation)}(),function(){var e=Ember.get,t=Ember.set;Ember.HashLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return e(this,"location").hash.substr(1)},setURL:function(r){e(this,"location").hash=r,t(this,"lastSetURL",r)},replaceURL:function(t){e(this,"location").replace("#"+t)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=location.hash.substr(1);e(n,"lastSetURL")!==i&&(t(n,"lastSetURL",null),r(i))})})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("hashchange.ember-location-"+e)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var e=Ember.get,t=Ember.set,r=!1,n=window.history&&"state"in window.history;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location),this.initState()},initState:function(){t(this,"history",e(this,"history")||window.history),this.replaceState(this.formatURL(this.getURL()))},rootURL:"/",getURL:function(){var t=e(this,"rootURL"),r=e(this,"location").pathname;return t=t.replace(/\/$/,""),r=r.replace(t,"")},setURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.pushState(e)},replaceURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.replaceState(e)},getState:function(){return n?e(this,"history").state:this._historyState},pushState:function(t){var r={path:t};e(this,"history").pushState(r,null,t),n||(this._historyState=r),this._previousURL=this.getURL()},replaceState:function(t){var r={path:t};e(this,"history").replaceState(r,null,t),n||(this._historyState=r),this._previousURL=this.getURL()},onUpdateURL:function(e){var t=Ember.guidFor(this),n=this;Ember.$(window).on("popstate.ember-location-"+t,function(){(r||(r=!0,n.getURL()!==n._previousURL))&&e(n.getURL())})},formatURL:function(t){var r=e(this,"rootURL");return""!==t&&(r=r.replace(/\/$/,"")),r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){function e(t,r,n,i){var o,s=t.name,a=t.incoming,u=t.incomingNames,c=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(s)){for(i.push(s),n[s]=!0,o=0;c>o;o++)e(a[u[o]],r,n,i);r(t,i),i.pop()}}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(e){if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t}},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,r){function n(e,t){if(e.name===r)throw new Error("cycle detected: "+r+" <- "+t.join(" <- "))}if(t&&r&&t!==r){var i=this.add(t),o=this.add(r);o.incoming.hasOwnProperty(t)||(e(i,n),i.hasOutgoing=!0,o.incoming[t]=i,o.incomingNames.push(t))}},t.prototype.topsort=function(t){var r,n,i={},o=this.vertices,s=this.names,a=s.length;for(r=0;a>r;r++)n=o[s[r]],n.hasOutgoing||e(n,t,i)},t.prototype.addEdges=function(e,t,r,n){var i;if(this.map(e,t),r)if("string"==typeof r)this.addEdge(e,r);else for(i=0;i<r.length;i++)this.addEdge(e,r[i]);if(n)if("string"==typeof n)this.addEdge(n,e);else for(i=0;i<n.length;i++)this.addEdge(n[i],e)},Ember.DAG=t}(),function(){var e=Ember.get,t=Ember.String.classify,r=Ember.String.capitalize,n=Ember.String.decamelize;Ember.DefaultResolver=Ember.Object.extend({namespace:null,normalize:function(e){var t=e.split(":",2),r=t[0],n=t[1];if("template"!==r){var i=n;return i.indexOf(".")>-1&&(i=i.replace(/\.(.)/g,function(e){return e.charAt(1).toUpperCase()})),n.indexOf("_")>-1&&(i=i.replace(/_(.)/g,function(e){return e.charAt(1).toUpperCase()})),r+":"+i}return e},resolve:function(e){var t=this.parseName(e),r=this[t.resolveMethodName];if(!t.name||!t.type)throw new TypeError("Invalid fullName: `"+e+"`, must of of the form `type:name` ");if(r){var n=r.call(this,t);if(n)return n}return this.resolveOther(t)},parseName:function(n){var i=n.split(":"),o=i[0],s=i[1],a=s,u=e(this,"namespace"),c=u;if("template"!==o&&-1!==a.indexOf("/")){var l=a.split("/");a=l[l.length-1];var h=r(l.slice(0,-1).join("."));c=Ember.Namespace.byName(h)}return{fullName:n,type:o,fullNameWithoutType:s,name:a,root:c,resolveMethodName:"resolve"+t(o)}},resolveTemplate:function(e){var t=e.fullNameWithoutType.replace(/\./g,"/");return Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:(t=n(t),Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:void 0)},useRouterNaming:function(e){e.name=e.name.replace(/\./g,"_"),"basic"===e.name&&(e.name="")},resolveController:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveRoute:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveView:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveModel:function(r){var n=t(r.name),i=e(r.root,n);return i?i:void 0},resolveOther:function(r){var n=t(r.name)+t(r.type),i=e(r.root,n);return i?i:void 0},lookupDescription:function(e){var r=this.parseName(e);if("template"===r.type)return"template at "+r.fullNameWithoutType.replace(/\./g,"/");var n=r.root+"."+t(r.name);return"model"!==r.type&&(n+=t(r.type)),n},makeToString:function(e){return e.toString()}})}(),function(){function e(e){this._container=e}function t(e){function t(e){return n.resolve(e)}e.get("resolver");var r=e.get("resolver")||e.get("Resolver")||Ember.DefaultResolver,n=r.create({namespace:e});return t.describe=function(e){return n.lookupDescription(e)},t.makeToString=function(e,t){return n.makeToString(e,t)},t.normalize=function(e){return n.normalize?n.normalize(e):e},t}var r=Ember.get,n=Ember.set;e.deprecate=function(e){return function(){var t=this._container;return t[e].apply(t,arguments)}},e.prototype={_container:null,lookup:e.deprecate("lookup"),resolve:e.deprecate("resolve"),register:e.deprecate("register")};var i=Ember.Application=Ember.Namespace.extend(Ember.DeferredMixin,{rootElement:"body",eventDispatcher:null,customEvents:null,_readinessDeferrals:1,init:function(){this.$||(this.$=Ember.$),this.__container__=this.buildContainer(),this.Router=this.Router||this.defaultRouter(),this.Router&&(this.Router.namespace=this),this._super(),this.scheduleInitialize(),Ember.LOG_VERSION&&(Ember.LOG_VERSION=!1)},buildContainer:function(){var e=this.__container__=i.buildContainer(this);return e},defaultRouter:function(){return void 0===this.router?Ember.Router.extend():void 0},scheduleInitialize:function(){var e=this;!this.$||this.$.isReady?Ember.run.schedule("actions",e,"_initialize"):this.$().ready(function(){Ember.run(e,"_initialize")})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,0===this._readinessDeferrals&&Ember.run.once(this,this.didBecomeReady)},register:function(){var e=this.__container__;e.register.apply(e,arguments)},inject:function(){var e=this.__container__;e.injection.apply(e,arguments)},initialize:function(){},_initialize:function(){return this.isDestroyed?void 0:(this.register("router:main",this.Router),this.runInitializers(),Ember.runLoadHooks("application",this),this.advanceReadiness(),this)},reset:function(){function e(){var e=this.__container__.lookup("router:main");e.reset(),Ember.run(this.__container__,"destroy"),this.buildContainer(),Ember.run.schedule("actions",this,function(){this._initialize()})}this._readinessDeferrals=1,Ember.run.join(this,e)},runInitializers:function(){var e,t,n=r(this.constructor,"initializers"),i=this.__container__,o=new Ember.DAG,s=this;for(e=0;e<n.length;e++)t=n[e],o.addEdges(t.name,t.initialize,t.before,t.after);o.topsort(function(e){var t=e.value;t(i,s)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=r(this,"customEvents"),t=r(this,"rootElement"),i=this.__container__.lookup("event_dispatcher:main");n(this,"eventDispatcher",i),i.setup(e,t)},startRouting:function(){var e=this.__container__.lookup("router:main");e&&e.startRouting()},handleURL:function(e){var t=this.__container__.lookup("router:main");t.handleURL(e)},ready:Ember.K,resolver:null,Resolver:null,willDestroy:function(){Ember.BOOTED=!1,this.__container__.destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({concatenatedProperties:["initializers"],initializers:Ember.A(),initializer:function(e){var t=r(this,"initializers");t.push(e)},buildContainer:function(r){var n=new Ember.Container;return Ember.Container.defaultContainer=new e(n),n.set=Ember.set,n.resolver=t(r),n.normalize=n.resolver.normalize,n.describe=n.resolver.describe,n.makeToString=n.resolver.makeToString,n.optionsForType("component",{singleton:!1}),n.optionsForType("view",{singleton:!1}),n.optionsForType("template",{instantiate:!1}),n.register("application:main",r,{instantiate:!1}),n.register("controller:basic",Ember.Controller,{instantiate:!1}),n.register("controller:object",Ember.ObjectController,{instantiate:!1}),n.register("controller:array",Ember.ArrayController,{instantiate:!1}),n.register("route:basic",Ember.Route,{instantiate:!1}),n.register("event_dispatcher:main",Ember.EventDispatcher),n.injection("router:main","namespace","application:main"),n.injection("controller","target","router:main"),n.injection("controller","namespace","application:main"),n.injection("route","router","router:main"),n}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){function e(e,t,r){var n,i,o;for(i=0,o=r.length;o>i;i++)n=r[i],-1===n.indexOf(":")&&(n="controller:"+n),!t.has(n)}var t=Ember.get;Ember.set,Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){var r=t(this,"needs"),n=t(r,"length");n>0&&(e(this,this.container,r),t(this,"controllers")),this._super.apply(this,arguments)},controllerFor:function(e){return Ember.controllerFor(t(this,"container"),e)},controllers:Ember.computed(function(){var e=this;return{needs:t(e,"needs"),container:t(e,"container"),unknownProperty:function(t){var r,n,i,o=this.needs;for(n=0,i=o.length;i>n;n++)if(r=o[n],r===t)return this.container.lookup("controller:"+t);var s=Ember.inspect(e)+"#needs does not include `"+t+"`. To access the "+t+" controller from "+Ember.inspect(e)+", "+Ember.inspect(e)+" should have a `needs` property that is an array of the controllers it has access to.";throw new ReferenceError(s)}}}).readOnly()})}(),function(){Ember.DataAdapter=Ember.Object.extend({init:function(){this._super(),this.releaseMethods=Ember.A()},container:null,attributeLimit:3,releaseMethods:Ember.A(),getFilters:function(){return Ember.A()},watchModelTypes:function(e,t){var r,n=this.getModelTypes(),i=this,o=Ember.A();r=n.map(function(e){var r=i.wrapModelType(e);return o.push(i.observeModelType(e,t)),r}),e(r);var s=function(){o.forEach(function(e){e()}),i.releaseMethods.removeObject(s)};return this.releaseMethods.pushObject(s),s},watchRecords:function(e,t,r,n){var i,o=this,s=Ember.A(),a=this.getRecords(e),u=function(e){r([e])},c=a.map(function(e){return s.push(o.observeRecord(e,u)),o.wrapRecord(e)}),l=function(e,r,i,a){for(var c=r;r+a>c;c++){var l=e.objectAt(c),h=o.wrapRecord(l);s.push(o.observeRecord(l,u)),t([h])}i&&n(r,i)},h={didChange:l,willChange:Ember.K};return a.addArrayObserver(o,h),i=function(){s.forEach(function(e){e()}),a.removeArrayObserver(o,h),o.releaseMethods.removeObject(i)},t(c),this.releaseMethods.pushObject(i),i},willDestroy:function(){this._super(),this.releaseMethods.forEach(function(e){e()})},detect:function(){return!1},columnsForType:function(){return Ember.A()},observeModelType:function(e,t){var r=this,n=this.getRecords(e),i=function(){t([r.wrapModelType(e)])},o={didChange:function(){Ember.run.scheduleOnce("actions",this,i)},willChange:Ember.K};n.addArrayObserver(this,o);var s=function(){n.removeArrayObserver(r,o)};return s},wrapModelType:function(e){var t,r=this.getRecords(e);return t={name:e.toString(),count:Ember.get(r,"length"),columns:this.columnsForType(e),object:e}},getModelTypes:function(){var e=Ember.A(Ember.Namespace.NAMESPACES),t=Ember.A(),r=this;return e.forEach(function(e){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];r.detect(i)&&t.push(i)}}),t},getRecords:function(){return Ember.A()},wrapRecord:function(e){var t={object:e};return t.columnValues=this.getRecordColumnValues(e),t.searchKeywords=this.getRecordKeywords(e),t.filterValues=this.getRecordFilterValues(e),t.color=this.getRecordColor(e),t},getRecordColumnValues:function(){return{}},getRecordKeywords:function(){return Ember.A()},getRecordFilterValues:function(){return{}},getRecordColor:function(){return null},observeRecord:function(){return function(){}}})}()}(),"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.");
|
13
|
+
!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,l=o.length;l>c;c++)"exports"===o[c]?a.push(u={}):a.push(t(o[c]));var h=s.apply(this,a);return n[e]=u||h}}(),function(){function e(e){var t;r.console?t=r.console:"undefined"!=typeof console&&(t=console);var n="object"==typeof t?t[e]:null;return n?n.apply?function(){n.apply(t,arguments)}:function(){var e=Array.prototype.join.call(arguments,", ");n(e)}:void 0}function t(e,t){if(!e)try{throw new Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},0)}}"undefined"==typeof Ember&&(Ember={});var r=Ember.imports=Ember.imports||this,n=Ember.exports=Ember.exports||this;Ember.lookup=Ember.lookup||this,n.Em=n.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.1.0","undefined"==typeof ENV&&(n.ENV={}),"undefined"==typeof ENV.DISABLE_RANGE_API&&(ENV.DISABLE_RANGE_API=!0),Ember.ENV=Ember.ENV||ENV,Ember.config=Ember.config||{},Ember.FEATURES={},Ember.FEATURES.isEnabled=function(e){return Ember.FEATURES[e]},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,"undefined"==typeof Ember.EXTEND_PROTOTYPES&&(Ember.EXTEND_PROTOTYPES=!0),Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.debug&&(Ember.debug=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(e,t){return t}),Ember.uuid=0,Ember.Logger={log:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K,assert:e("assert")||t},Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.call(t||this);try{return e.call(t||this)}catch(r){Ember.onerror(r)}},Ember.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return Ember.isNone(e)||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(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,o=0,s=[],a={},u=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var c={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t="ember");var n=t+o++;return e&&(c.value=n,r(e,i,c)),n},Ember.guidFor=function(e){if(void 0===e)return"(undefined)";if(null===e)return"(null)";var t,n=typeof e;switch(n){case"number":return t=s[e],t||(t=s[e]="nu"+e),t;case"string":return t=a[e],t||(t=a[e]="st"+o++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+o++,c.value=t,r(e,i,c),t)}};var l={writable:!0,configurable:!1,enumerable:!1,value:null},h=Ember.GUID_KEY+"_meta";Ember.META_KEY=h;var m={descs:{},watching:{}};u&&(m.values={}),Ember.EMPTY_META=m,Object.freeze&&Object.freeze(m);var f=Ember.platform.defineProperty.isSimulated;f&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){}),Ember.meta=function(t,i){var o=t[h];return i===!1?o||m:(o?o.source!==t&&(f||r(t,h,l),o=n(o),o.descs=n(o.descs),o.watching=n(o.watching),o.cache={},o.source=t,u&&(o.values=n(o.values)),t[h]=o):(f||r(t,h,l),o=new e(t),u&&(o.values={}),t[h]=o,o.descs.constructor=null),o)},Ember.getMeta=function(e,t){var r=Ember.meta(e,!1);return r[t]},Ember.setMeta=function(e,t,r){var n=Ember.meta(e,!0);return n[t]=r,r},Ember.metaPath=function(e,t,r){for(var i,o,s=Ember.meta(e,r),a=0,u=t.length;u>a;a++){if(i=t[a],o=s[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=s[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=s[i]={__ember_source__:e}}s=o}return o},Ember.wrap=function(e,t){function r(){}function n(){var n,i=this._super;return this._super=t||r,n=e.apply(this,arguments),this._super=i,n}return n.wrappedFunction=e,n.__ember_observes__=e.__ember_observes__,n.__ember_observesBefore__=e.__ember_observesBefore__,n.__ember_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 d={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){d["[object "+e+"]"]=e.toLowerCase()});var E=Object.prototype.toString;Ember.typeOf=function(e){var t;return t=null===e||void 0===e?String(e):d[E.call(e)]||"object","function"===t?Ember.Object&&Ember.Object.detect(e)&&(t="class"):"object"===t&&(t=e instanceof Error?"error":Ember.Object&&e instanceof Ember.Object?"instance":"object"),t}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,s=e.length;s>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=function(){var e="undefined"!=typeof window?window.performance||{}:{},t=e.now||e.mozNow||e.webkitNow||e.msNow||e.oNow;return t?t.bind(e):function(){return+new Date}}();Ember.Instrumentation.instrument=function(e,i,o,s){function a(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return o.call(s)}function u(e){i=i||{},i.exception=e}function c(){for(p=0,d=m.length;d>p;p++)f=m[p],f.after(e,n(),i,b[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(l)}var l,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(l=e+": "+i.object,console.time(l)),m||(m=r(e)),0===m.length)return h=o.call(s),Ember.STRUCTURED_PROFILE&&console.timeEnd(l),h;var f,p,d,b=[];return Ember.tryCatchFinally(a,u,c)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),s=[],a=0,u=o.length;u>a;a++)i=o[a],"*"===i?s.push("[^\\.]*"):s.push(i);s=s.join("\\."),s+="(\\..*)?";var c={pattern:r,regex:new RegExp("^"+s+"$"),object:n};return e.push(c),t={},c},Ember.Instrumentation.unsubscribe=function(r){for(var n,i=0,o=e.length;o>i;i++)e[i]===r&&(n=i);e.splice(n,1),t={}},Ember.Instrumentation.reset=function(){e=[],t={}},Ember.instrument=Ember.Instrumentation.instrument,Ember.subscribe=Ember.Instrumentation.subscribe}(),function(){var e,t,r,n;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,l=t,h=r;a.length;)s=h>c?c:h,0>=s&&(s=0),o=a.splice(0,c),o=[l,s].concat(o),l+=c,h-=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 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,Ember.getPath=Ember.deprecateFunc("getPath is deprecated since get now supports paths",Ember.get)}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i+=3)if(t===e[i]&&r===e[i+1]){n=i;break}return n}function t(e,t){var r,n=f(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=m(n.listeners)),r=n.listeners[t],r&&!n.listeners.hasOwnProperty(t)?r=n.listeners[t]=n.listeners[t].slice():r||(r=n.listeners[t]=[]),r}function r(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r];if(o)for(var s=o.length-3;s>=0;s-=3){var a=o[s],u=o[s+1],c=o[s+2],l=e(n,a,u);-1===l&&n.push(a,u,c)}}function n(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r],s=[];if(o){for(var a=o.length-3;a>=0;a-=3){var u=o[a],c=o[a+1],l=o[a+2],h=e(n,u,c);-1===h&&(n.push(u,c,l),s.push(u,c,l))}return s}}function i(r,n,i,o,s){o||"function"!=typeof i||(o=i,i=null);var a=t(r,n),u=e(a,i,o),c=0;s&&(c|=b),-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!==l&&(c[l+2]&=~E)}o||"function"!=typeof i||(o=i,i=null);var c=t(r,n),l=e(c,i,o);return-1!==l&&(c[l+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=f.length;t>e;e++){var r=f[e];p[e][r+2]&=~E}}o||"function"!=typeof i||(o=i,i=null);var c,l,h,m,f=[],p=[];for(h=0,m=n.length;m>h;h++){c=n[h],l=t(r,c);var d=e(l,i,o);-1!==d&&(l[d+2]|=E,f.push(d),p.push(l))}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&b&&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 l(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,s=i.length;s>o;o+=3){var a=i[o],u=i[o+1];r.push([a,u])}return r}var m=Ember.create,f=Ember.meta,p=Ember.META_KEY,d=[].slice,b=1,E=2;Ember.on=function(){var e=d.call(arguments,-1)[0],t=d.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=l,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,s=this.observers,a=e(t),u=o[a];return u||(o[a]=u={}),i=u[r],void 0===i&&(i=s.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),s[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t){var n=h(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=h(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),l(e,t)))}function r(t,r,n){if(!t.isDestroying){var o=w,s=!o;s&&(o=w={}),i(e,t,r,o,n),s&&(w=null)}}function n(e,r,n){if(!e.isDestroying){var o=_,s=!o;s&&(o=_={}),i(t,e,r,o,n),s&&(_=null)}}function i(e,t,r,n,i){var o=m(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(){y++}function u(){y--,0>=y&&(v.clear(),g.flush())}function c(e,t){if(!e.isDestroying){var r,n,i=t+":before";y?(r=v.add(e,t,i),n=b(e,i,r),p(e,i,[e,t],n)):p(e,i,[e,t])}}function l(e,t){if(!e.isDestroying){var r,n=t+":change";y?(r=g.add(e,t,n),d(e,n,r)):p(e,n,[e,t])}}var h=Ember.meta,m=Ember.guidFor,f=Ember.tryFinally,p=Ember.sendEvent,d=Ember.listenersUnion,b=Ember.listenersDiff,E=Ember._ObserverSet,v=new E,g=new E,y=0;Ember.propertyWillChange=e,Ember.propertyDidChange=t;var w,_;Ember.overrideChains=function(e,t,r){s(e,t,r,!0)},Ember.beginPropertyChanges=a,Ember.endPropertyChanges=u,Ember.changeProperties=function(e,t){a(),f(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 Error("You passed an empty path");if(!e){if(o)return;throw new Error("Object in path "+t+" could not be found or was destroyed.")}return i(e,s,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function(n,i,o,s){if("string"==typeof n&&(o=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,o,s);var a,u,c=n[t],l=c&&c.descs[i];return l?l.set(n,i,o):(a="object"==typeof n&&!(i in n),a&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,o):c&&c.watching[i]>0?(u=r?c.values[i]:n[i],o!==u&&(Ember.propertyWillChange(n,i),r?void 0!==u||i in n?c.values[i]=o:Ember.defineProperty(n,i,null,o):n[i]=o,Ember.propertyDidChange(n,i))):n[i]=o),o};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.setPath=Ember.deprecateFunc("setPath is deprecated since set now supports paths",Ember.set),Ember.trySet=function(e,t,r){return i(e,t,r,!0)},Ember.trySetPath=Ember.deprecateFunc("trySetPath has been renamed to trySet",Ember.trySet)}(),function(){var e=Ember.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(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,s,a,u,c){var l,h,m,f;return c||(c=t(e)),l=c.descs,h=c.descs[s],m=c.watching[s]>0,h instanceof Ember.Descriptor&&h.teardown(e,s),a instanceof Ember.Descriptor?(f=a,l[s]=a,n&&m?r(e,s,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[s]=void 0):(l[s]=void 0,null==a?(f=u,n&&m?(c.values[s]=u,r(e,s,{configurable:!0,enumerable:!0,set:i,get:o(s)})):e[s]=u):(f=a,r(e,s,a))),m&&Ember.overrideChains(e,s,c),e.didDefineProperty&&e.didDefineProperty(e,s,f),this}}(),function(){var e=Ember.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(l)[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,l=/^([^\.\*]+)/,h=[];Ember.flushPendingChains=function(){if(0!==h.length){var e=h;h=[],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===h.length)}};var m=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)}}},f=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=f.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&&m(e,this._key,this),this._watching=!1}},p.copy=function(e){var t,r=new f(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 h.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 f(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&&(m(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||!h.test(e)}var t=Ember.meta,r=Ember.GUID_KEY,n=Ember.META_KEY,i=Ember.removeChainWatcher,o=Ember.watchKey,s=Ember.unwatchKey,a=Ember.watchPath,u=Ember.unwatchPath,c=Ember.typeOf,l=Ember.generateGuid,h=/[\.\*]/;Ember.watch=function(t,r){("length"!==r||"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)&&l(e,"ember"),i&&i.value()!==e&&(n.chains=i.copy(e))};var m=[];Ember.destroy=function(e){var t,r,o,s,a=e[n];if(a&&(e[n]=null,t=a.chains))for(m.push(t);m.length>0;){if(t=m.pop(),r=t._chains)for(o in r)r.hasOwnProperty(o)&&m.push(r[o]);t._watching&&(s=t._object,s&&i(s,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=f(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var s,a,u,c,l,h=r._dependentKeys;if(h)for(s=t(o),a=0,u=h.length;u>a;a++)c=h[a],l=e(s,c),l[i]=(l[i]||0)+1,p(n,c)}function n(r,n,i,o){var s,a,u,c,l,h=r._dependentKeys;if(h)for(s=t(o),a=0,u=h.length;u>a;a++)c=h[a],l=e(s,c),l[i]=(l[i]||0)-1,d(n,c)}function i(e,t){this.func=e,this._cacheable=t&&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=m.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}}function u(e,t){Ember.computed[e]=function(){var e=m.call(arguments),r=Ember.computed(function(){return t.apply(this,[s(this,e)])});return r.property.apply(r,e)}}var c=Ember.get,l=Ember.set,h=Ember.meta,m=[].slice,f=Ember.create,p=(Ember.META_KEY,Ember.watch),d=Ember.unwatch;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var b=i.prototype;b.cacheable=function(e){return this._cacheable=e!==!1,this},b.volatile=function(){return this.cacheable(!1)},b.readOnly=function(e){return this._readOnly=void 0===e||!!e,this},b.property=function(){for(var e=[],t=0,r=arguments.length;r>t;t++)e.push(arguments[t]);return this._dependentKeys=e,this},b.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},b.didChange=function(e,t){if(this._cacheable&&this._suspended!==e){var r=h(e);t in r.cache&&(delete r.cache[t],n(this,e,t,r))}},b.get=function(e,t){var n,i,s,a;if(this._cacheable){if(s=h(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},b.set=function(e,t,n){var i,o,s,a=this._cacheable,u=this.func,c=h(e,a),l=c.watching[t],m=this._suspended,f=!1,p=c.cache;if(this._readOnly)throw new Error("Cannot Set: "+t+" on: "+e.toString());this._suspended=e;try{if(a&&p.hasOwnProperty(t)&&(o=p[t],f=!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(f&&o===s)return;l&&Ember.propertyWillChange(e,t),f&&delete p[t],a&&(f||r(this,e,t,c),p[t]=s),l&&Ember.propertyDidChange(e,t)}finally{this._suspended=m}return s},b.teardown=function(e,t){var r=h(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=m.call(arguments,0,-1),e=m.call(arguments,-1)[0]),"function"!=typeof e)throw new Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=h(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?!!r.match(t):!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?(l(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;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;
|
14
|
+
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,l,h,m,f=t.options,p=f&&f.before,d=f&&f.after,b=0,E=r.length;for(E&&p&&p();E>b;)c=r[b],l=r[b+1],h=r[b+2],m=r[b+3],"string"==typeof l&&(l=c[l]),l&&(h&&h.length>0?l.apply(c,h):l.call(c)),b+=4;t._queueBeingFlushed=null,E&&d&&d(),-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||E.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(),a=b.setTimeout(function(){a=null,e.end()})}function o(e){var t,r,n,i,s=+new Date;e.run(function(){for(n=0,i=d.length;i>n&&(t=d[n],!(t>s));n+=2);for(r=d.splice(0,n),n=1,i=r.length;i>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),d.length&&(u=b.setTimeout(function(){o(e),u=null,c=null},d[0]-s),c=d[0])}function s(e,t){for(var r,n=-1,i=0,o=p.length;o>i;i++)if(r=p[i],r[0]===e&&r[1]===t){n=i;break}return n}var a,u,c,l=e.DeferredActionQueues,h=[].slice,m=[].pop,f=[],p=[],d=[],b=this,E=/\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 l(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,h.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?h.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?h.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,m)}var t,n,i,s,a,l,m=h.call(arguments),f=m.length,p=this;if(0!==f){if(1===f)t=m.shift(),n=0;else if(2===f)s=m[0],a=m[1],"function"==typeof a||"function"==typeof s[a]?(i=m.shift(),t=m.shift(),n=0):r(a)?(t=m.shift(),n=m.shift()):(t=m.shift(),n=0);else{var E=m[m.length-1];r(E)&&(n=m.pop()),s=m[0],l=m[1],"function"==typeof l||"string"==typeof l&&null!==s&&l in s?(i=m.shift(),t=m.shift()):t=m.shift()}var v=+new Date+parseInt(n,10);"string"==typeof t&&(t=i[t]);var g,y;for(g=0,y=d.length;y>g&&!(v<d[g]);g+=2);return d.splice(g,0,v,e),u&&v>c?e:(u&&(clearTimeout(u),u=null),u=b.setTimeout(function(){o(p),u=null,c=null},n),c=v,e)}},throttle:function(e,t){for(var r,n=this,i=arguments,o=m.call(i),s=0,a=f.length;a>s;s++)if(r=f[s],r[0]===e&&r[1]===t)return;var u=b.setTimeout(function(){n.run.apply(n,i);for(var o=-1,s=0,a=f.length;a>s;s++)if(r=f[s],r[0]===e&&r[1]===t){o=s;break}o>-1&&f.splice(o,1)},o);f.push([e,t,u])},debounce:function(e,t){var r,n,i,o=this,a=arguments,u=m.call(a);"number"==typeof u?(r=u,u=!1):r=m.call(a),n=s(e,t),-1!==n&&(i=p[n],p.splice(n,1),clearTimeout(i[2]));var c=b.setTimeout(function(){u||o.run.apply(o,a),n=s(e,t),n&&p.splice(n,1)},r);u&&-1===n&&o.run.apply(o,a),p.push([e,t,c])},cancelTimers:function(){var e,t;for(e=0,t=f.length;t>e;e++)clearTimeout(f[e][2]);for(f=[],e=0,t=p.length;t>e;e++)clearTimeout(p[e][2]);p=[],u&&(clearTimeout(u),u=null),d=[],a&&(clearTimeout(a),a=null)},hasTimers:function(){return!!d.length||a},cancel:function(e){if(e&&"object"==typeof e&&e.queue&&e.method)return e.queue.cancel(e);if("function"==typeof e)for(var t=0,r=d.length;r>t;t+=2)if(d[t+1]===e)return d.splice(t,2),!0}},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=V(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=C.call(t,function(e){if(e instanceof y)return e;var t=new y;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 y?(r=S(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=V(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).slice()}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,l,h,m){if(n instanceof Ember.Descriptor){if(n===w&&c[t])return T;n.func&&(n=o(i,t,n,l,c)),c[t]=n,l[t]=void 0}else h&&O.call(h,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?n=a(e,t,n,l):m&&O.call(m,t)>=0?n=u(e,t,n,l):r(n)&&(n=s(e,t,n,l,c)),c[t]=void 0,l[t]=n}function l(e,t,r,o,s,a){function u(e){delete r[e],delete o[e]}for(var h,m,f,p,d,b,E=0,v=e.length;v>E;E++)if(h=e[E],m=n(t,h),m!==T)if(m){b=Ember.meta(s),s.willMergeMixin&&s.willMergeMixin(m),p=i("concatenatedProperties",m,o,s),d=i("mergedProperties",m,o,s);for(f in m)m.hasOwnProperty(f)&&(a.push(f),c(s,f,m[f],b,r,o,p,d));m.hasOwnProperty("toString")&&(s.toString=m.toString)}else h.mixins&&(l(h.mixins,t,r,o,s,a),h._without&&A.call(h._without,u))}function h(e,t,r,n){if(N.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=V(n.bindings)):i=n.bindings={},i[t]=r}}function m(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 f(e,t){return m(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 d(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 b(e,t,r){var n=e[t];"function"==typeof n&&(d(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),d(e,t,n,"__ember_observes__","removeObserver"),d(e,t,n,"__ember_listens__","removeListener")),"function"==typeof r&&(d(e,t,r,"__ember_observesBefore__","addBeforeObserver"),d(e,t,r,"__ember_observes__","addObserver"),d(e,t,r,"__ember_listens__","addListener"))}function E(t,r,n){var i,o,s,a={},u={},c=Ember.meta(t),m=[];l(r,e(t),a,u,t,m);for(var d=0,E=m.length;E>d;d++)if(i=m[d],"constructor"!==i&&u.hasOwnProperty(i)&&(s=a[i],o=u[i],s!==w)){for(;s&&s instanceof _;){var v=p(t,s,c,a,u);s=v.desc,o=v.value}(void 0!==s||void 0!==o)&&(b(t,i,o),h(t,i,o,c),x(t,i,s,o,c))}return n||f(t,c),t}function v(e,t,r){var n=S(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(v(i[o],t,r))return!0;return!1}function g(e,t,r){if(!r[S(t)])if(r[S(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){g(e,t,r)})}var y,w,_,C=Ember.ArrayPolyfills.map,O=Ember.ArrayPolyfills.indexOf,A=Ember.ArrayPolyfills.forEach,P=[].slice,V=Ember.create,x=Ember.defineProperty,S=Ember.guidFor,T={},N=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)},y=Ember.Mixin,y.prototype={properties:null,mixins:null,ownerConstructor:null},y._apply=E,y.applyPartial=function(e){var t=P.call(arguments,1);return E(e,t,!0)},y.finishPartial=f,Ember.anyUnprocessedMixins=!1,y.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return t(new e,arguments)};var D=y.prototype;D.reopen=function(){var e,t;this.properties?(e=y.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 y?i.push(e):(t=y.create(),t.properties=e,i.push(t));return this},D.apply=function(e){return E(e,[this],!1)},D.applyPartial=function(e){return E(e,[this],!0)},D.detect=function(e){if(!e)return!1;if(e instanceof y)return v(e,this,{});var t=Ember.meta(e,!1).mixins;return t?!!t[S(this)]:!1},D.without=function(){var e=new y(this);return e._without=P.call(arguments),e},D.keys=function(){var e={},t={},r=[];g(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},y.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},w=new Ember.Descriptor,w.toString=function(){return"(Required Property)"},Ember.required=function(){return w},_=function(e){this.methodName=e},_.prototype=new Ember.Descriptor,Ember.alias=function(e){return new _(e)},Ember.aliasMethod=function(e){return new _(e)},Ember.observer=function(e){var t=P.call(arguments,1);return e.__ember_observes__=t,e},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++)arguments[e];return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(e){var t=P.call(arguments,1);return e.__ember_observesBefore__=t,e}}(),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",["exports"],function(e){"use strict";function t(){return function(e,t){process.nextTick(function(){e(t)})}}function r(){return function(e,t){setImmediate(function(){e(t)})}}function n(){var e=[],t=new a(function(){var t=e.slice();e=[],t.forEach(function(e){var t=e[0],r=e[1];t(r)})}),r=document.createElement("div");return t.observe(r,{attributes:!0}),window.addEventListener("unload",function(){t.disconnect(),t=null},!1),function(t,n){e.push([t,n]),r.setAttribute("drainQueue","drainQueue")}}function i(){return function(e,t){u.setTimeout(function(){e(t)},1)}}var o,s="undefined"!=typeof window?window:{},a=s.MutationObserver||s.WebKitMutationObserver,u="undefined"!=typeof global?global:this;o="function"==typeof setImmediate?r():"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?t():a?n():i(),e.async=o}),e("rsvp/config",["rsvp/async","exports"],function(e,t){"use strict";var r=e.async,n={};n.async=r,t.config=n}),e("rsvp/defer",["rsvp/promise","exports"],function(e,t){"use strict";function r(){var e={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 l=0;l<i.length;l++)o=i[l],s=o[0],a=o[1],"object"!=typeof r&&(r={detail:r}),u=new t(e,r),s.call(a,u)}};e.EventTarget=i}),e("rsvp/hash",["rsvp/defer","exports"],function(e,t){"use strict";function r(e){var t=0;for(var r in e)t++;return t}function n(e){var t={},n=i(),o=r(e);0===o&&n.resolve({});var s=function(e){return function(t){a(e,t)}},a=function(e,r){t[e]=r,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","exports"],function(e,t,r){"use strict";function n(e){return i(e)||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function o(e){l.onerror&&l.onerror(e.detail)}function s(e,t){e===t?u(e,t):a(e,t)||u(e,t)}function a(e,t){var r,o=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(n(t)&&(o=t.then,i(o)))return o.call(t,function(n){return r?!0:(r=!0,t!==n?s(e,n):u(e,n),void 0)},function(t){return r?!0:(r=!0,c(e,t),void 0)}),!0}catch(a){return c(e,a),!0}return!1}function u(e,t){l.async(function(){e.trigger("promise:resolved",{detail:t}),e.isFulfilled=!0,e.fulfillmentValue=t})}function c(e,t){l.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedReason=t})}var l=e.config,h=t.EventTarget,m=function(e){var t=this,r=!1;if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the sole argument to the promise constructor");if(!(t instanceof m))return new m(e);var n=function(e){r||(r=!0,s(t,e))},i=function(e){r||(r=!0,c(t,e))};this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this),this.on("error",o);try{e(n,i)}catch(a){i(a)}},f=function(e,t,r,n){var o,u,l,h,m=i(r);if(m)try{o=r(n.detail),l=!0}catch(f){h=!0,u=f}else o=n.detail,l=!0;a(t,o)||(m&&l?s(t,o):h?c(t,u):"resolve"===e?s(t,o):"reject"===e&&c(t,o))};m.prototype={constructor:m,isRejected:void 0,isFulfilled:void 0,rejectedReason:void 0,fulfillmentValue:void 0,then:function(e,t){this.off("error",o);var r=new this.constructor(function(){});return this.isFulfilled&&l.async(function(t){f("resolve",r,e,{detail:t.fulfillmentValue})},this),this.isRejected&&l.async(function(e){f("reject",r,t,{detail:e.rejectedReason})},this),this.on("promise:resolved",function(t){f("resolve",r,e,t)}),this.on("promise:failed",function(e){f("reject",r,t,e)}),r},fail:function(e){return this.then(null,e)}},h.mixin(m.prototype),r.Promise=m}),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","exports"],function(e,t,r,n,i,o,s,a,u,c,l){"use strict";function h(e,t){g[e]=t}var m=e.EventTarget,f=t.Promise,p=r.denodeify,d=n.all,b=i.hash,E=o.rethrow,v=s.defer,g=a.config,y=u.resolve,w=c.reject;l.Promise=f,l.EventTarget=m,l.all=d,l.hash=b,l.rethrow=E,l.defer=v,l.denodeify=p,l.configure=h,l.resolve=y,l.reject=w})}(),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),l=u(e,t);return l._toString=e.makeToString(i,t),r=i.extend(c),r.reopenClass(l),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 l(e,t){e.cache.eachLocal(function(r,n){o(e,r,"instantiate")!==!1&&t(n)})}function h(e){e.cache.eachLocal(function(t,r){o(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}function m(e,t,r,n){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:r,fullName:n})}function f(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:!!s(this,e)},optionsForType:function(e,t){this.parent&&r("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,n){this.parent&&r("typeInjection"),m(this.typeInjections,e,t,n)},injection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.typeInjection(e,t,n):(f(this.injections,e,t,n),void 0)},factoryTypeInjection:function(e,t,n){this.parent&&r("factoryTypeInjection"),m(this.factoryTypeInjections,e,t,n)},factoryInjection:function(e,t,n){return this.parent&&r("injection"),-1===e.indexOf(":")?this.factoryTypeInjection(e,t,n):(f(this.factoryInjections,e,t,n),void 0)},destroy:function(){this.isDestroyed=!0;for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],l(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++)h(this.children[e]);h(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 o(e,t){if(e===t)return 0;var r=Ember.typeOf(e),n=Ember.typeOf(t),i=Ember.Comparable;if(i){if("instance"===r&&i.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===n&&i.detect(t.constructor))return 1-t.constructor.compare(t,e)}var s=Ember.ORDER_DEFINITION_MAPPING;if(!s){var a=Ember.ORDER_DEFINITION;s=Ember.ORDER_DEFINITION_MAPPING={};var u,c;for(u=0,c=a.length;c>u;++u)s[a[u]]=u;delete Ember.ORDER_DEFINITION}var l=s[r],h=s[n];if(h>l)return-1;if(l>h)return 1;switch(r){case"boolean":case"number":return t>e?-1:e>t?1:0;case"string":var m=e.localeCompare(t);return 0>m?-1:m>0?1:0;case"array":for(var f=e.length,p=t.length,d=Math.min(f,p),b=0,E=0;0===b&&d>E;)b=o(e[E],t[E]),E++;return 0!==b?b:p>f?-1:f>p?1:0;case"instance":return Ember.Comparable&&Ember.Comparable.detect(e)?e.compare(e,t):0;case"date":var v=e.getTime(),g=t.getTime();return g>v?-1:v>g?1:0;default:return 0}},Ember.copy=function(t,r){return"object"!=typeof t||null===t?t:Ember.Copyable&&Ember.Copyable.detect(t)?t.copy(r):e(t,r,r?[]:null,r?[]:null)},Ember.inspect=function(e){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}}var i=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){for(var e=Error.apply(this,arguments),t=0;t<i.length;t++)this[i[t]]=e[i[t]]},Ember.Error.prototype=Ember.create(Error.prototype)}(),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,l=e(),h=0;o>h&&!c;h++)s=this.nextObject(h,u,l),(c=r.call(i,s,h,this))&&(a=s),u=s;return s=u=null,l=t(l),a},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:function(){return this.every(r.apply(this,arguments))},everyProperty:Ember.aliasMethod("everyBy"),any:function(e,t){return!!this.find(function(r,n,i){return!!e.call(t,r,n,i)})},some:Ember.aliasMethod("any"),anyBy:function(){return this.any(r.apply(this,arguments))},someProperty:Ember.aliasMethod("anyBy"),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");
|
15
|
+
return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||0!==i-r,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.isNone),r=Ember.EnumerableUtils.map,n=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{length:Ember.required(),objectAt:function(t){return 0>t||t>=e(this,"length")?void 0:e(this,t)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,r){return void 0!==r&&this.replace(0,e(this,"length"),r),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(e(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(r,n){var i=Ember.A(),o=e(this,"length");for(t(r)&&(r=0),(t(n)||n>o)&&(n=o),0>r&&(r=o+r),0>n&&(n=o+n);n>r;)i[i.length]=this.objectAt(r++);return i},indexOf:function(t,r){var n,i=e(this,"length");for(void 0===r&&(r=0),0>r&&(r+=i),n=r;i>n;n++)if(this.objectAt(n)===t)return n;return-1},lastIndexOf:function(t,r){var n,i=e(this,"length");for((void 0===r||r>=i)&&(r=i-1),0>r&&(r+=i),n=r;n>=0;n--)if(this.objectAt(n)===t)return n;return-1},addArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),o||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),o&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,r,n){void 0===t?(t=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,r,n]);var i,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],o=t+r;for(var s=t;o>s;s++)i.push(this.objectAt(s))}else i=r;return this.enumerableContentWillChange(i,n),this},arrayContentDidChange:function(t,r,i){void 0===t?(t=0,r=i=-1):(void 0===r&&(r=-1),void 0===i&&(i=-1));var o,s;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){o=[],s=t+i;for(var a=t;s>a;a++)o.push(this.objectAt(a))}else o=i;this.enumerableContentDidChange(r,o),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),c=n(this,"firstObject"),l=n(this,"lastObject");return this.objectAt(0)!==c&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==l&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){function e(e,t,r){this.callbacks=e,this.cp=t,this.instanceMeta=r,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.changedItems={}}function t(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 r(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 n(e,t,n,i,o){y(e,function(s,a){o.setValue(t.addedItem.call(this,o.getValue(),s,r(e,s,a,i,n),o.sugarMeta))},this)}function i(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 o(e,t,r){this.context=e,this.propertyName=t,this.cache=l(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=r}function s(e){var t=this;this.options=e,this._instanceMetas={},this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,r,e)};var r=function(e){var r=(t._dependentKeys,t._instanceMeta(this,e)),o=t._callbacks();i.call(this,t,e),y(t._dependentKeys,function(e){var n=u(this,e),i=r.dependentArrays[e];n===i?t._previousItemPropertyKeys[e]&&(delete t._previousItemPropertyKeys[e],r.dependentArraysObserver.setupPropertyObservers(e,t._itemPropertyKeys[e])):(r.dependentArrays[e]=n,i&&r.dependentArraysObserver.teardownObservers(i,e),n&&r.dependentArraysObserver.setupObservers(n,e))},this),y(t._dependentKeys,function(i){var s=u(this,i);s&&n.call(this,s,o,t,e,r)},this)};this.func=function(e){return r.call(this,e),t._instanceMeta(this,e).getValue()}}function a(e){return e}var u=Ember.get,c=(Ember.set,Ember.guidFor),l=Ember.meta,h=Ember.propertyWillChange,m=Ember.propertyDidChange,f=Ember.addBeforeObserver,p=Ember.removeBeforeObserver,d=Ember.addObserver,b=Ember.removeObserver,E=Ember.ComputedProperty,v=[].slice,g=Ember.create,y=Ember.EnumerableUtils.forEach,w=/^(.*)\.@each\.(.*)/,_=/(.*\.@each){2,}/;e.prototype={setValue:function(e){this.instanceMeta.setValue(e,!0)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[c(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[c(e)],this.teardownPropertyObservers(t,r),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},setupPropertyObservers:function(e,t){var r=u(this.instanceMeta.context,e),n=u(r,"length"),i=new Array(n);this.resetTransformations(e,i),y(r,function(n,o){var s=this.createPropertyObserverContext(r,o,this.trackedArraysByGuid[e]);i[o]=s,y(t,function(e){f(n,e,this,s.beforeObserver),d(n,e,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&&y(e,function(e){e.destroyed=!0,r=e.beforeObserver,n=e.observer,i=e.item,y(t,function(e){p(i,e,o,r),b(i,e,o,n)})})})},createPropertyObserverContext:function(e,r,n){var i=new t(e,r,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(e,t){var r=u(t,"length");e.apply(function(e,t,n){n!==Ember.TrackedArray.DELETE&&(n!==Ember.TrackedArray.RETAIN||e.length!==r||0!==t)&&y(e,function(e,r){e.index=r+t})})},dependentArrayWillChange:function(e,t,n){function i(e){l[u].destroyed=!0,p(s,e,this,l[u].beforeObserver),b(s,e,this,l[u].observer)}var o,s,a,u,l,h=this.callbacks.removedItem,m=c(e),f=this.dependentKeysByGuid[m],d=this.cp._itemPropertyKeys[f]||[];for(l=this.trackRemove(f,t,n),u=n-1;u>=0;--u)a=t+u,s=e.objectAt(a),y(d,i,this),o=r(e,s,a,this.instanceMeta.propertyName,this.cp),this.setValue(h.call(this.instanceMeta.context,this.getValue(),s,o,this.instanceMeta.sugarMeta))},dependentArrayDidChange:function(e,t,n,i){var o,s,a=this.callbacks.addedItem,u=c(e),l=this.dependentKeysByGuid[u],h=new Array(i),m=this.cp._itemPropertyKeys[l];y(e.slice(t,t+i),function(n,i){m&&(s=h[i]=this.createPropertyObserverContext(e,t+i,this.trackedArraysByGuid[l]),y(m,function(e){f(n,e,this,s.beforeObserver),d(n,e,this,s.observer)},this)),o=r(e,n,t+i,this.instanceMeta.propertyName,this.cp),this.setValue(a.call(this.instanceMeta.context,this.getValue(),n,o,this.instanceMeta.sugarMeta))},this),this.trackAdd(l,t,h)},itemPropertyWillChange:function(e,t,r,n){var i=c(e);this.changedItems[i]||(this.changedItems[i]={array:r,observerContext:n,obj:e,previousValues:{}}),this.changedItems[i].previousValues[t]=u(e,t)},itemPropertyDidChange:function(){this.flushChanges()},flushChanges:function(){var e,t,n,i=this.changedItems;for(e in i)t=i[e],t.observerContext.destroyed||(this.updateIndexes(t.observerContext.trackedArray,t.observerContext.dependentArray),n=r(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,n,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,n,this.instanceMeta.sugarMeta)));this.changedItems={}}},o.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&&h(this.context,this.propertyName),this.cache[this.propertyName]=e,r&&m(this.context,this.propertyName)}else delete this.cache[this.propertyName]}},Ember.ReduceComputedProperty=s,s.prototype=g(E.prototype),s.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||a,addedItem:e.addedItem||a}}return this.callbacks},s.prototype._hasInstanceMeta=function(e,t){var r=c(e),n=r+":"+t;return!!this._instanceMetas[n]},s.prototype._instanceMeta=function(t,r){var n=c(t),i=n+":"+r,s=this._instanceMetas[i];return s||(s=this._instanceMetas[i]=new o(t,r,this.initialValue()),s.dependentArraysObserver=new e(this._callbacks(),this,s,t,r,s.sugarMeta)),s},s.prototype.initialValue=function(){return"function"==typeof this.options.initialValue?this.options.initialValue():this.options.initialValue},s.prototype.resetValue=function(){return this.initialValue()},s.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},s.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},s.prototype.property=function(){var e,t,r,n=this,i=(v.call(arguments),new Ember.Set);return y(v.call(arguments),function(o){if(_.test(o))throw new Ember.Error("Nested @each properties not supported: "+o);(e=w.exec(o))?(t=e[1],r=e[2],n.itemPropertyKey(t,r),i.add(t)):i.add(o)}),E.prototype.property.apply(this,i.toArray())},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=v.call(arguments,0,-1),e=v.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 s(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,n,i,o){function s(e){return Ember.ObjectProxy.detectInstance(e)?r(t(e,"content")):r(e)}var a,u,c,l,h;return arguments.length<4&&(o=t(e,"length")),arguments.length<3&&(i=0),i===o?i:(a=i+Math.floor((o-i)/2),u=e.objectAt(a),l=s(u),h=s(n),l===h?a:(c=this.order(u,n),0===c&&(c=h>l?-1:1),0>c?this.binarySearch(e,n,a+1,o):c>0?this.binarySearch(e,n,i,a):a))}var t=Ember.get,r=(Ember.set,Ember.guidFor),n=Ember.merge,i=[].slice,o=Ember.EnumerableUtils.forEach,s=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,r){var n=function(e){return t(e,r)};return Ember.computed.map(e+".@each."+r,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,r,n){var i;return i=2===arguments.length?function(e){return t(e,r)}:function(e){return t(e,r)===n},Ember.computed.filter(e+".@each."+r,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=i.call(arguments);return e.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(e,t,n,i){var o=r(t);return i.itemCounts[o]?++i.itemCounts[o]:i.itemCounts[o]=1,e.addObject(t),e},removedItem:function(e,t,n,i){var o=r(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 s(e.property._dependentKeys,function(e){return r(e)})},t=i.call(arguments);return t.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(t,n,i,o){var s=r(n),a=(e(i),r(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(n),t},removedItem:function(t,n,i,o){var s,a=r(n),u=(e(i),r(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(n)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,r){if(2!==arguments.length)throw new Ember.Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed.call(null,e,r,{addedItem:function(n,i,o){var s=t(this,e),a=t(this,r);return o.arrayChanged===s?a.contains(i)||n.addObject(i):n.removeObject(i),n},removedItem:function(n,i,o){var s=t(this,e),a=t(this,r);return o.arrayChanged===a?s.contains(i)&&n.addObject(i):n.removeObject(i),n}})},Ember.computed.sort=function(r,i){var s,a;return"function"==typeof i?s=function(t,r,n){n.order=i,n.binarySearch=e}:(a=i,s=function(n,i,s){function u(){var e,n,u,l=t(this,a),h=s.sortProperties=[],m=s.sortPropertyAscending={};i.property.clearItemPropertyKeys(r),o(l,function(t){-1!==(n=t.indexOf(":"))?(e=t.substring(0,n),u="desc"!==t.substring(n+1).toLowerCase()):(e=t,u=!0),h.push(e),m[e]=u,i.property.itemPropertyKey(r,e)}),l.addObserver("@each",this,c)}function c(){Ember.run.once(this,l,i.propertyName)}function l(e){u.call(this),i.property.recomputeOnce.call(this,e)}Ember.addObserver(this,a,c),u.call(this),s.order=function(e,r){for(var n,i,o,s=0;s<this.sortProperties.length;++s)if(n=this.sortProperties[s],i=Ember.compare(t(e,n),t(r,n)),0!==i)return o=this.sortPropertyAscending[n],o?i:-1*i;return 0},s.binarySearch=e}),Ember.arrayComputed.call(null,r,{initialize:s,addedItem:function(e,t,r,n){var i=n.binarySearch(e,t);return e.insertAt(i,t),e},removedItem:function(e,t,r,i){var o,s,a;return r.previousValues?(o=n({content:t},r.previousValues),a=Ember.ObjectProxy.create(o)):a=t,s=i.binarySearch(e,a),e.removeAt(s),e}})}}(),function(){Ember.RSVP=t("rsvp")}(),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=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");return this.replace(r(this,"length"),0,e),this},popObject:function(){var e=r(this,"length");if(0===e)return null;var t=this.objectAt(e-1);return this.removeAt(e-1,1),t},shiftObject:function(){if(0===r(this,"length"))return null;var e=this.objectAt(0);return this.removeAt(0),e},unshiftObject:function(e){return this.insertAt(0,e),e},unshiftObjects:function(e){return this.replace(0,0,e),this},reverseObjects:function(){var e=r(this,"length");if(0===e)return this;var t=this.toArray().reverse();return this.replace(0,e,t),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this.replace(0,t,e),this},removeObject:function(e){for(var t=r(this,"length")||0;--t>=0;){var n=this.objectAt(t);n===e&&this.removeAt(t)}return this},addObject:function(e){return this.contains(e)||this.pushObject(e),this}})}(),function(){var e=Ember.get,t=Ember.set,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")},getPath:function(e){return this.get(e)},setPath:function(e,t){return this.set(e,t)},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){var e=Ember.get;Ember.set,Ember.TargetActionSupport=Ember.Mixin.create({target:null,action:null,actionContext:null,targetObject:Ember.computed(function(){var t=e(this,"target");if("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;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){e.actions&&!e._actions&&(e._actions=Ember.merge(e._actions||{},e.actions),delete e.actions)},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){return t(e,"isFulfilled",!0),t(e,"content",r),r},function(r){t(e,"isRejected",!0),t(e,"reason",r)}).fail(i)}var t=Ember.set,r=Ember.get,n=Ember.RSVP.resolve,i=Ember.RSVP.rethrow,o=Ember.computed.not,s=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:o("isSettled").readOnly(),isSettled:s("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;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,l=u.index,h=u.rangeStart;a=new e(o,i,n),c?u.split?(this._split(l,t-h,a),s=l+1):(this._operations.splice(l,0,a),s=l):(this._operations.push(a),s=l),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,l=!1,h=[];c===s&&(i=u,e-=1);for(var m=e+1;a>0;++m)t=this._operations[m],r=t.type,n=t.count,r!==s?(n>a?(h=h.concat(t.items.splice(0,a)),t.count-=a,m-=1,n=a,a=0):(n===a&&(l=!0),h=h.concat(t.items),a-=n),r===o&&(i.count-=n)):i.count+=n;return i.count>0?this._operations.splice(e+1,m-1-e):this._operations.splice(e,l?2:1),h},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="f";Ember.SubArray=function(r){arguments.length<1&&(r=0),this._operations=r>0?[new e(t,r)]:[]},Ember.SubArray.prototype={addItem:function(n,i){var o=-1,s=i?t:r,a=this;return this._findOperation(n,function(r,u,c,l,h){var m,f;s===r.type?++r.count:n===c?a._operations.splice(u,0,new e(s,1)):(m=new e(s,1),f=new e(r.type,l-n+1),r.count=n-c,a._operations.splice(u+1,0,m,f)),i&&(o=r.type===t?h+(n-c):h),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 r=-1,n=this;return this._findOperation(e,function(i,o,s,a,u){i.type===t&&(r=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.")}),r},_findOperation:function(e,r,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 r(s,i,a,u,c),void 0;s.type===t&&(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))))}}}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){function e(){var e,t,o=!1,s=function(){o||s.proto(),n(this,i,g),n(this,"_super",g);var u=a(this),h=u.proto;if(u.proto=this,e){var m=e;e=null,this.reopen.apply(this,m)}if(t){var f=t;t=null;for(var p=this.concatenatedProperties,b=0,y=f.length;y>b;b++){var w=f[b];if("object"===Ember.typeOf(w))for(var _=Ember.keys(w),C=0,O=_.length;O>C;C++){var A=_[C];if(w.hasOwnProperty(A)){var P=w[A],V=Ember.IS_BINDING;if(V.test(A)){var x=u.bindings;x?u.hasOwnProperty("bindings")||(x=u.bindings=r(u.bindings)):x=u.bindings={},x[A]=P}var S=u.descs[A];if(p&&v(p,A)>=0){var T=this[A];P=T?"function"==typeof T.concat?T.concat(P):Ember.makeArray(T).concat(P):Ember.makeArray(P)}S?S.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)}}}}d(this,u),this.init.apply(this,arguments),u.proto=h,c(this),l(this,"init")};return s.toString=f.prototype.toString,s.willReopen=function(){o&&(s.PrototypeMixin=f.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
|
16
|
+
},s}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,s=Ember.generateGuid,a=Ember.meta,u=Ember.rewatch,c=Ember.finishChains,l=Ember.sendEvent,h=Ember.destroy,m=Ember.run.schedule,f=Ember.Mixin,p=f._apply,d=f.finishPartial,b=f.prototype.reopen,E=Ember.ENV.MANDATORY_SETTER,v=Ember.EnumerableUtils.indexOf,g={configurable:!0,writable:!0,enumerable:!1,value:void 0},y=e();y.toString=function(){return"Ember.CoreObject"},y.PrototypeMixin=f.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,m("actions",this,this.willDestroy),m("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(h(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}}),y.PrototypeMixin.ownerConstructor=y,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(y.PrototypeMixin),y.__super__=null;var w=f.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=f.create(this.ClassMixin),n.PrototypeMixin=f.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,b.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,s(t,"ember"),a(t).proto=t,n.ClassMixin.apply(n),n},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),b.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return b.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)}});w.ownerConstructor=y,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(w),y.ClassMixin=w,w.apply(y),Ember.CoreObject=y}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var s=t.length;c[t.join(".")]=r;for(var a in r)if(l.call(r,a)){var u=r[a];if(t[s]=a,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=s}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else 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,l={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){var e="Index out of range",t=[],r=Ember.get;Ember.set,Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return r(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,n){r(this,"content").replace(e,t,n)},_contentWillChange:Ember.beforeObserver(function(){this._teardownContent()},"content"),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer(function(){r(this,"content"),this._setupContent()},"content"),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)},"arrangedContent"),_arrangedContentDidChange:Ember.observer(function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)},"arrangedContent"),_setupArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return r(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=r(this,"arrangedContent");return e?r(e,"length"):0}),_replace:function(e,t,n){var i=r(this,"content");return i&&this.replaceContent(e,t,n),this},replace:function(){if(r(this,"arrangedContent")!==r(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,n){if(t>r(this,"content.length"))throw new 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){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,l=Ember.meta,h=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer(function(){},"content"),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),o(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;s(this,n,null,e),a(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var i=l(this);if(i.proto===this)return h(this,e,null,t),t;var o=r(this,"content");return n(o,e,t)}})}(),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 l=e.objectAt(s);l&&(Ember.removeBeforeObserver(l,t,r,"contentKeyWillChange"),Ember.removeObserver(l,t,r,"contentKeyDidChange"),c=n(l),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),i&&0!==i.length?t(this,r,n,i):this.splice(r,n),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"),l=0===u,h=u===c-1;return u>=0&&c>u&&this[u]===i&&(s=[i],this.enumerableContentWillChange(s,null),l&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),c-1>u&&(o=this[c-1],this[u]=o,this[r(o)]=u),delete this[a],delete this[c-1],t(this,"length",c-1),l&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(s,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin;Ember.get;var t=Ember.Object.extend(e);t.reopenClass({promise:function(e,r){var n=t.create();return e.call(r,n),n}}),Ember.Deferred=t}(),function(){var e=Ember.ArrayPolyfills.forEach,t=Ember.ENV.EMBER_LOAD_HOOKS||{},r={};Ember.onLoad=function(e,n){var i;t[e]=t[e]||Ember.A(),t[e].pushObject(n),(i=r[e])&&n(i)},Ember.runLoadHooks=function(n,i){r[n]=i,t[n]&&e.call(t[n],function(e){e(i)})}}(),function(){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(function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},"content"),sortAscendingWillChange:Ember.beforeObserver(function(){this._lastSortAscending=e(this,"sortAscending")},"sortAscending"),sortAscendingDidChange:Ember.observer(function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}},"sortAscending"),contentArrayWillChange:function(r,n,i,o){var s=e(this,"isSorted");if(s){var a=e(this,"arrangedContent"),u=r.slice(n,n+i),c=e(this,"sortProperties");t(u,function(e){a.removeObject(e),t(c,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var s=e(this,"isSorted"),a=e(this,"sortProperties");if(s){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(a,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),s=i&&this.orderBy(t,i),a=o&&this.orderBy(t,o);(0>s||a>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,s,a;return r===n?r:(a=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=a.objectAt(i),s=this.orderBy(o,t),0>s?this._binarySearch(t,i+1,n):s>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var s=e(this,"_subControllers"),a=s.slice(n,n+i);t(a,function(e){e&&e.destroy()}),r(s,n,i,new Array(o)),this._super(n,i,o)},init:function(){this._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)}(),function(){var e=Ember.imports.jQuery;Ember.$=e}(),function(){if(Ember.$){var e=Ember.String.w("dragstart drag dragenter dragleave dragover drop dragend");Ember.EnumerableUtils.forEach(e,function(e){Ember.$.event.fixHooks[e]={props:["dataTransfer"]}})}}(),function(){function e(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,r=e.which>1;return!t&&!r}var t=this.document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),r=this.document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,s=e.childNodes.length;for(r=0;s>r;r++)if(i=e.childNodes[r],o=1===i.nodeType&&n(i,t))return o},i=function(e,i){t&&(i="­"+i);var o=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return o.push([n,t]),r})),e.innerHTML=i,o.length>0){var s,a=o.length;for(s=0;a>s;s++){var u=n(e,o[s][0]),c=document.createTextNode(o[s][1]);u.parentNode.insertBefore(c,u)}}if(t){for(var l=e.firstChild;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&""===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}},o={},s=function(e){if(void 0!==o[e])return o[e];var t=!0;if("select"===e.toLowerCase()){var r=document.createElement("select");i(r,'<option value="test">Test</option>'),t=1===r.options.length}return o[e]=t,t},a=function(e,t){var r=e.tagName;if(s(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),o=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],a="</"+r+">",u=document.createElement("div");for(i(u,o+t+a),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:a,isSimpleClick:e}}(),function(){function e(e){return e?n.test(e)?e.replace(i,""):e:e}function t(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"},r=function(e){return t[e]||"&"},n=e.toString();return s.test(n)?n.replace(o,r):n}Ember.get,Ember.set;var r=function(){this.seen={},this.list=[]};r.prototype={add:function(e){e in this.seen||(this.seen[e]=!0,this.list.push(e))},toDOM:function(){return this.list.join(" ")}};var n=/[^a-zA-Z0-9\-]/,i=/[^a-zA-Z0-9\-]/g,o=/&(?!\w+;)|[<>"'`]/g,s=/[&<>"'`]/,a=function(){var e=document.createElement("div"),t=document.createElement("input");return t.setAttribute("name","foo"),e.appendChild(t),!!e.innerHTML.match("foo")}();Ember.RenderBuffer=function(e){return new Ember._RenderBuffer(e)},Ember._RenderBuffer=function(e){this.tagNames=[e||null],this.buffer=""},Ember._RenderBuffer.prototype={_element:null,_hasElement:!0,elementClasses:null,classes:null,elementId:null,elementAttributes:null,elementProperties:null,elementTag:null,elementStyle:null,parentBuffer:null,push:function(e){return this.buffer+=e,this},addClass:function(e){return this.elementClasses=this.elementClasses||new r,this.elementClasses.add(e),this.classes=this.elementClasses.list,this},setClasses:function(e){this.classes=e},id:function(e){return this.elementId=e,this},attr:function(e,t){var r=this.elementAttributes=this.elementAttributes||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var r=this.elementProperties=this.elementProperties||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){return this.elementStyle=this.elementStyle||{},this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var r=this.currentTagName();if(r){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var n,i,o=this.buffer,s=this.elementId,a=this.classes,u=this.elementAttributes,c=this.elementProperties,l=this.elementStyle;if(o+="<"+e(r),s&&(o+=' id="'+t(s)+'"',this.elementId=null),a&&(o+=' class="'+t(a.join(" "))+'"',this.classes=null),l){o+=' style="';for(i in l)l.hasOwnProperty(i)&&(o+=i+":"+t(l[i])+";");o+='"',this.elementStyle=null}if(u){for(n in u)u.hasOwnProperty(n)&&(o+=" "+n+'="'+t(u[n])+'"');this.elementAttributes=null}if(c){for(i in c)if(c.hasOwnProperty(i)){var h=c[i];(h||"number"==typeof h)&&(o+=h===!0?" "+i+'="'+i+'"':" "+i+'="'+t(c[i])+'"')}this.elementProperties=null}o+=">",this.buffer=o}},pushClosingTag:function(){var t=this.tagNames.pop();t&&(this.buffer+="</"+e(t)+">")},currentTagName:function(){return this.tagNames[this.tagNames.length-1]},generateElement:function(){var r,n,i,o=this.tagNames.pop(),s=this.elementId,u=this.classes,c=this.elementAttributes,l=this.elementProperties,h=this.elementStyle,m="";i=c&&c.name&&!a?"<"+e(o)+' name="'+t(c.name)+'">':o;var f=document.createElement(i),p=Ember.$(f);if(s&&(p.attr("id",s),this.elementId=null),u&&(p.attr("class",u.join(" ")),this.classes=null),h){for(n in h)h.hasOwnProperty(n)&&(m+=n+":"+h[n]+";");p.attr("style",m),this.elementStyle=null}if(c){for(r in c)c.hasOwnProperty(r)&&p.attr(r,c[r]);this.elementAttributes=null}if(l){for(n in l)l.hasOwnProperty(n)&&p.prop(n,l[n]);this.elementProperties=null}return f},element:function(){var e=this.innerString();return e&&(this._element=Ember.ViewUtils.setInnerHTML(this._element,e)),this._element},string:function(){if(this._hasElement&&this._element){var e=this.element(),t=e.outerHTML;return"undefined"==typeof t?Ember.$("<div/>").append(e).html():t}return this.innerString()},innerString:function(){return this.buffer}}}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.EventDispatcher=Ember.Object.extend({events:{touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"},rootElement:"body",setup:function(r,n){var i,o=e(this,"events");Ember.$.extend(o,r||{}),Ember.isNone(n)||t(this,"rootElement",n),n=Ember.$(e(this,"rootElement")),n.addClass("ember-application");for(i in o)o.hasOwnProperty(i)&&this.setupHandler(n,i,o[i])},setupHandler:function(e,t,r){var n=this;e.on(t+".ember",".ember-view",function(e,t){return Ember.handleErrors(function(){var i=Ember.View.views[this.id],o=!0,s=null;return s=n._findNearestEventManager(i,r),s&&s!==t?o=n._dispatchEvent(s,e,r,i):i?o=n._bubbleEvent(i,e,r):e.stopPropagation(),o},this)}),e.on(t+".ember","[data-ember-action]",function(e){return Ember.handleErrors(function(){var t=Ember.$(e.currentTarget).attr("data-ember-action"),n=Ember.Handlebars.ActionHelper.registeredActions[t];return n&&n.eventName===r?n.handler(e):void 0},this)})},_findNearestEventManager:function(t,r){for(var n=null;t&&(n=e(t,"eventManager"),!n||!n[r]);)t=e(t,"parentView");return n},_dispatchEvent:function(e,t,r,n){var i=!0,o=e[r];return"function"===Ember.typeOf(o)?(i=Ember.run(function(){return o.call(e,t,n)}),t.stopPropagation()):i=this._bubbleEvent(n,t,r),i},_bubbleEvent:function(e,t,r){return Ember.run(function(){return e.handleEvent(r,t)})},destroy:function(){var t=e(this,"rootElement");return Ember.$(t).off(".ember","**").removeClass("ember-application"),this._super()}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"render","afterRender")}(),function(){var e=Ember.get,t=Ember.set;Ember.ControllerMixin.reopen({target:null,namespace:null,view:null,container:null,_childContainers:null,init:function(){this._super(),t(this,"_childContainers",{})},_modelDidChange:Ember.observer(function(){var r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})},"model")})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,o=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.addObject,a=Ember.meta,u=Ember.computed(function(){var e=this._childViews,t=Ember.A(),n=this;return o(e,function(e){var n;e.isVirtual?(n=r(e,"childViews"))&&t.pushObjects(n):t.push(e)}),t.replace=function(e,t,r){if(n instanceof Ember.ContainerView)return n.replace(e,t,r);throw new Ember.Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,Ember.ActionHandler,{isView:!0,states:t,init:function(){this._super(),this.transitionTo("preRender")},parentView:Ember.computed(function(){var e=this._parentView;return e&&e.isVirtual?r(e,"parentView"):e}).property("_parentView"),state:null,_parentView:null,concreteView:Ember.computed(function(){return this.isVirtual?r(this,"parentView"):this}).property("parentView"),instrumentName:"core_view",instrumentDetails:function(e){e.object=this.toString()},renderToBuffer:function(e,t){var r="render."+this.instrumentName,n={};return this.instrumentDetails(n),Ember.instrument(r,n,function(){return this._renderToBuffer(e,t)},this)},_renderToBuffer:function(e){var t=this.tagName;(null===t||void 0===t)&&(t="div");var r=this.buffer=e&&e.begin(t)||Ember.RenderBuffer(t);return this.transitionTo("inBuffer",!1),this.beforeRender(r),this.render(r),this.afterRender(r),r},trigger:function(e){this._super.apply(this,arguments);var t=this[e];if(t){var r,n,i=[];for(r=1,n=arguments.length;n>r;r++)i.push(arguments[r]);return t.apply(this,i)}},deprecatedSendHandles:function(e){return!!this[e]},deprecatedSend:function(e){var t=[].slice.call(arguments,1);this[e].apply(this,t)},has:function(e){return"function"===Ember.typeOf(this[e])||this._super(e)},destroy:function(){var e=this._parentView;if(this._super())return this.removedFromDOM||this.destroyElement(),e&&e.removeChild(this),this.transitionTo("destroying",!1),this},clearRenderedChildren:Ember.K,triggerRecursively:Ember.K,invokeRecursively:Ember.K,transitionTo:Ember.K,destroyElement:Ember.K});var c=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};c.prototype={length:0,trigger:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],t.trigger&&t.trigger(e)},triggerRecursively:function(e){for(var t=this.views,r=0,n=t.length;n>r;r++)t[r].triggerRecursively(e)},invokeRecursively:function(e){for(var t,r=this.views,n=0,i=r.length;i>n;n++)t=r[n],e(t)},transitionTo:function(e,t){for(var r=this.views,n=0,i=r.length;i>n;n++)r[n].transitionTo(e,t)},push:function(){this.length+=arguments.length;var e=this.views;return e.push.apply(e,arguments)},objectAt:function(e){return this.views[e]},forEach:function(e){var t=this.views;return o(t,e)},clear:function(){this.length=0,this.views.length=0}};var l=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,templates:Ember.TEMPLATES,template:Ember.computed(function(e,t){if(void 0!==t)return t;var n=r(this,"templateName"),i=this.templateForName(n,"template");return i||r(this,"defaultTemplate")}).property("templateName"),controller:Ember.computed(function(){var e=r(this,"_parentView");return e?r(e,"controller"):null}).property("_parentView"),layout:Ember.computed(function(){var e=r(this,"layoutName"),t=this.templateForName(e,"layout");return t||r(this,"defaultLayout")}).property("layoutName"),_yield:function(e,t){var n=r(this,"template");n&&n(e,t)},templateForName:function(e){if(e){var t=this.container||Ember.Container&&Ember.Container.defaultContainer;
|
17
|
+
return t&&t.lookup("template:"+e)}},context:Ember.computed(function(e,t){return 2===arguments.length?(n(this,"_context",t),t):r(this,"_context")}).volatile(),_context:Ember.computed(function(){var e,t;return(t=r(this,"controller"))?t:(e=this._parentView,e?r(e,"_context"):null)}),_contextDidChange:Ember.observer(function(){this.rerender()},"context"),isVisible:!0,childViews:u,_childViews:l,_childViewsWillChange:Ember.beforeObserver(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}},"childViews"),_childViewsDidChange:Ember.observer(function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}},"childViews"),nearestInstanceOf:function(e){for(var t=r(this,"parentView");t;){if(t instanceof e)return t;t=r(t,"parentView")}},nearestOfType:function(e){for(var t=r(this,"parentView"),n=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(n(t))return t;t=r(t,"parentView")}},nearestWithProperty:function(e){for(var t=r(this,"parentView");t;){if(e in t)return t;t=r(t,"parentView")}},nearestChildOf:function(e){for(var t=r(this,"parentView");t;){if(r(t,"parentView")instanceof e)return t;t=r(t,"parentView")}},_parentViewDidChange:Ember.observer(function(){this.isDestroying||(this.trigger("parentViewDidChange"),r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller"))},"_parentView"),_controllerDidChange:Ember.observer(function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))},"controller"),cloneKeywords:function(){var e=r(this,"templateData"),t=e?Ember.copy(e.keywords):{};return n(t,"view",r(this,"concreteView")),n(t,"_view",this),n(t,"controller",r(this,"controller")),t},render:function(e){var t=r(this,"layout")||r(this,"template");if(t){var n,i=r(this,"context"),o=this.cloneKeywords(),s={view:this,buffer:e,isRenderData:!0,keywords:o,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:s}),void 0!==n&&e.push(n)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){for(var e=this.lengthBeforeRender,t=this.lengthAfterRender,r=this._childViews,n=t-1;n>=e;n--)r[n]&&r[n].destroy()},_applyClassNameBindings:function(e){var t,r,n,i=this.classNames;o(e,function(e){var o,a=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),o&&(t.removeClass(o),i.removeObject(o)),r?(t.addClass(r),o=r):o=null};n=this._classStringForProperty(e),n&&(s(i,n),o=n),this.registerObserver(this,a.path,u),this.one("willClearRender",function(){o&&(i.removeObject(o),o=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;o(t,function(t){var o=t.split(":"),s=o[0],a=o[1]||s,u=function(){i=this.$(),n=r(this,s),Ember.View.applyAttributeBindings(i,a,n)};this.registerObserver(this,s,u),n=r(this,s),Ember.View.applyAttributeBindings(e,a,n)},this)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),n=t.path,i=r(this,n);return void 0===i&&Ember.isGlobalPath(n)&&(i=r(Ember.lookup,n)),Ember.View._classStringForValue(n,i,t.className,t.falsyClassName)},element:Ember.computed(function(e,t){return void 0!==t?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){for(var t,r=this._childViews,n=r.length;--n>=0;)t=r[n],e(this,t,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var r,n,i=t.length;for(n=0;i>n;n++)r=t[n],e(r);return this},appendTo:function(e){return this._insertElementLater(function(){this.$().appendTo(e)}),this},replaceIn:function(e){return this._insertElementLater(function(){Ember.$(e).empty(),this.$().appendTo(e)}),this},_insertElementLater:function(e){this._scheduledInsert=Ember.run.scheduleOnce("render",this,"_insertElement",e)},_insertElement:function(e){this._scheduledInsert=null,this.currentState.insertElement(this,e)},append:function(){return this.appendTo(document.body)},remove:function(){this.removedFromDOM||this.destroyElement(),this.invokeRecursively(function(e){e.clearRenderedChildren&&e.clearRenderedChildren()})},elementId:null,findElementInParentElement:function(e){var t="#"+this.elementId;return Ember.$(t)[0]||Ember.$(t,e)[0]},createElement:function(){if(r(this,"element"))return this;var e=this.renderToBuffer();return n(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e,t){for(var r,n,i,o=t===!1?this._childViews:[this];o.length;){r=o.slice(),o=[];for(var s=0,a=r.length;a>s;s++)n=r[s],i=n._childViews?n._childViews.slice(0):null,e(n),i&&o.push.apply(o,i)}},triggerRecursively:function(e){for(var t,r,n,i=[this];i.length;){t=i.slice(),i=[];for(var o=0,s=t.length;s>o;o++)r=t[o],n=r._childViews?r._childViews.slice(0):null,r.trigger&&r.trigger(e),n&&i.push.apply(i,n)}},viewHierarchyCollection:function(){for(var e,t=new c([this]),r=0;r<t.length;r++)e=t.objectAt(r),e._childViews&&t.push.apply(t,e._childViews);return t},destroyElement:function(){return this.currentState.destroyElement(this)},willDestroyElement:Ember.K,_notifyWillDestroyElement:function(){var e=this.viewHierarchyCollection();return e.trigger("willClearRender"),e.trigger("willDestroyElement"),e},_elementDidChange:Ember.observer(function(){this.forEachChildView(function(e){delete a(e).cache.element})},"element"),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=r(this,"templateName"),this._super(e)},_renderToBuffer:function(e,t){this.lengthBeforeRender=this._childViews.length;var r=this._super(e,t);return this.lengthAfterRender=this._childViews.length,r},renderToBufferIfNeeded:function(e){return this.currentState.renderToBufferIfNeeded(this,e)},beforeRender:function(e){this.applyAttributesToBuffer(e),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag()},applyAttributesToBuffer:function(e){var t=r(this,"classNameBindings");t.length&&this._applyClassNameBindings(t);var n=r(this,"attributeBindings");n.length&&this._applyAttributeBindings(e,n),e.setClasses(this.classNames),e.id(this.elementId);var i=r(this,"ariaRole");i&&e.attr("role",i),r(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:l,attributeBindings:l,init:function(){this.elementId=this.elementId||i(this),this._super(),this._childViews=this._childViews.slice(),this.classNameBindings=Ember.A(this.classNameBindings.slice()),this.classNames=Ember.A(this.classNames.slice())},appendChild:function(e,t){return this.currentState.appendChild(this,e,t)},removeChild:function(e){if(!this.isDestroying){n(e,"_parentView",null);var t=this._childViews;return Ember.EnumerableUtils.removeObject(t,e),this.propertyDidChange("childViews"),this}},removeAllChildren:function(){return this.mutateChildViews(function(e,t){e.removeChild(t)})},destroyAllChildren:function(){return this.mutateChildViews(function(e,t){t.destroy()})},removeFromParent:function(){var e=this._parentView;return this.remove(),e&&e.removeChild(this),this},destroy:function(){var e,t,n=this._childViews,i=r(this,"parentView"),o=this.viewName;if(this._super()){for(e=n.length,t=e-1;t>=0;t--)n[t].removedFromDOM=!0;for(o&&i&&i.set(o,null),e=n.length,t=e-1;t>=0;t--)n[t].destroy();return this}},createChildView:function(e,t){if(!e)throw new TypeError("createChildViews first argument must exist");if(e.isView&&e._parentView===this&&e.container===this.container)return e;if(t=t||{},t._parentView=this,Ember.CoreView.detect(e))t.templateData=t.templateData||r(this,"templateData"),t.container=this.container,e=e.create(t),e.viewName&&n(r(this,"concreteView"),e.viewName,e);else if("string"==typeof e){var i="view:"+e,o=this.container.lookupFactory(i);t.templateData=r(this,"templateData"),e=o.create(t)}else t.container=this.container,r(e,"templateData")||(t.templateData=r(this,"templateData")),Ember.setProperties(e,t);return e},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer(function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}},"isVisible"),_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var t=r(e,"isVisible");(t||null===t)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){for(var e=r(this,"parentView");e;){if(r(e,"isVisible")===!1)return!0;e=r(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(function(e){e.buffer=null})},transitionTo:function(e,t){var r=this.currentState,n=this.currentState=this.states[e];this.state=e,r&&r.exit&&r.exit(this),n.enter&&n.enter(this),"inDOM"===e&&delete Ember.meta(this).cache.element,t!==!1&&this.forEachChildView(function(t){t.transitionTo(e)})},handleEvent:function(e,t){return this.currentState.handleEvent(this,e,t)},registerObserver:function(e,t,r,n){if(n||"function"!=typeof r||(n=r,r=null),e&&"object"==typeof e){var i=this,o=function(){i.currentState.invokeObserver(this,n)},s=function(){Ember.run.scheduleOnce("render",this,o)};Ember.addObserver(e,t,r,s),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,s)})}}});var h={prepend:function(t,r){t.$().prepend(r),e()},after:function(t,r){t.$().after(r),e()},html:function(t,r){t.$().html(r),e()},replace:function(t){var i=r(t,"element");n(t,"element",null),t._insertElementLater(function(){Ember.$(i).replaceWith(r(t,"element")),e()})},remove:function(t){t.$().remove(),e()},empty:function(t){t.$().empty(),e()}};Ember.View.reopen({domManager:h}),Ember.View.reopenClass({_parsePropertyPath:function(e){var t,r,n=e.split(":"),i=n[0],o="";return n.length>1&&(t=n[1],3===n.length&&(r=n[2]),o=":"+t,r&&(o+=":"+r)),{path:i,classNames:o,className:""===t?void 0:t,falsyClassName:r}},_classStringForValue:function(e,t,r,n){if(r||n)return r&&t?r:n&&!t?n:null;if(t===!0){var i=e.split(".");return Ember.String.dasherize(i[i.length-1])}return t!==!1&&null!=t?t:null}});var m=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){m.on("change",e)},Ember.View.removeMutationListener=function(e){m.off("change",e)},Ember.View.notifyMutationListeners=function(){m.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=u,Ember.View.applyAttributeBindings=function(e,t,r){var n=Ember.typeOf(r);"value"===t||"string"!==n&&("number"!==n||isNaN(r))?"value"===t||"boolean"===n?(Ember.isNone(r)&&(r=""),r!==e.prop(t)&&e.prop(t,r)):r||e.removeAttr(t):r!==e.attr(t)&&e.attr(t,r)},Ember.View.states=t}(),function(){var e=(Ember.get,Ember.set);Ember.View.states._default={appendChild:function(){throw"You can't use appendChild outside of the rendering process"},$:function(){return void 0},getElement:function(){return null},handleEvent:function(){return!0},destroyElement:function(t){return e(t,"element",null),t._scheduledInsert&&(Ember.run.cancel(t._scheduledInsert),t._scheduledInsert=null),t},renderToBufferIfNeeded:function(){return!1},rerender:Ember.K,invokeObserver:Ember.K}}(),function(){var e=Ember.View.states.preRender=Ember.create(Ember.View.states._default);Ember.merge(e,{insertElement:function(e,t){e.createElement();var r=e.viewHierarchyCollection();r.trigger("willInsertElement"),t.call(e);for(var n=e.get("element");n=n.parentNode;)n===document&&(r.transitionTo("inDOM",!1),r.trigger("didInsertElement"))},renderToBufferIfNeeded:function(e,t){return e.renderToBuffer(t),!0},empty:Ember.K,setElement:function(e,t){return null!==t&&e.transitionTo("hasElement"),t}})}(),function(){Ember.get,Ember.set;var e=Ember.View.states.inBuffer=Ember.create(Ember.View.states._default);Ember.merge(e,{$:function(e){return e.rerender(),Ember.$()},rerender:function(){throw new Ember.Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.")},appendChild:function(e,t,r){var n=e.buffer,i=e._childViews;return t=e.createChildView(t,r),i.length||(i=e._childViews=i.slice()),i.push(t),t.renderToBuffer(n),e.propertyDidChange("childViews"),t},destroyElement:function(e){e.clearBuffer();var t=e._notifyWillDestroyElement();return t.transitionTo("preRender",!1),e},empty:function(){},renderToBufferIfNeeded:function(){return!1},insertElement:function(){throw"You can't insert an element that has already been rendered"},setElement:function(e,t){return null===t?e.transitionTo("preRender"):(e.clearBuffer(),e.transitionTo("hasElement")),t},invokeObserver:function(e,t){t.call(e)}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.View.states.hasElement=Ember.create(Ember.View.states._default);Ember.merge(r,{$:function(t,r){var n=e(t,"element");return r?Ember.$(r,n):Ember.$(n)},getElement:function(t){var r=e(t,"parentView");return r&&(r=e(r,"element")),r?t.findElementInParentElement(r):Ember.$("#"+e(t,"elementId"))[0]},setElement:function(e,t){if(null!==t)throw"You cannot set an element to a non-null value when the element is already in the DOM.";return e.transitionTo("preRender"),t},rerender:function(e){return e.triggerRecursively("willClearRender"),e.clearRenderedChildren(),e.domManager.replace(e),e},destroyElement:function(e){return e._notifyWillDestroyElement(),e.domManager.remove(e),t(e,"element",null),e._scheduledInsert&&(Ember.run.cancel(e._scheduledInsert),e._scheduledInsert=null),e},empty:function(e){var t,r,n=e._childViews;if(n)for(t=n.length,r=0;t>r;r++)n[r]._notifyWillDestroyElement();e.domManager.empty(e)},handleEvent:function(e,t,r){return e.has(t)?e.trigger(t,r):!0},invokeObserver:function(e,t){t.call(e)}});var n=Ember.View.states.inDOM=Ember.create(r);Ember.merge(n,{enter:function(e){e.isVirtual||(Ember.View.views[e.elementId]=e),e.addBeforeObserver("elementId",function(){throw new Ember.Error("Changing a view's elementId after creation is not allowed")})},exit:function(e){this.isVirtual||delete Ember.View.views[e.elementId]},insertElement:function(){throw"You can't insert an element into the DOM that has already been inserted"}})}(),function(){var e="You can't call %@ on a view being destroyed",t=Ember.String.fmt,r=Ember.View.states.destroying=Ember.create(Ember.View.states._default);Ember.merge(r,{appendChild:function(){throw t(e,["appendChild"])},rerender:function(){throw t(e,["rerender"])},destroyElement:function(){throw t(e,["destroyElement"])},empty:function(){throw t(e,["empty"])},setElement:function(){throw t(e,["set('element', ...)"])},renderToBufferIfNeeded:function(){return!1},insertElement:Ember.K})}(),function(){Ember.View.cloneStates=function(e){var t={};t._default={},t.preRender=Ember.create(t._default),t.destroying=Ember.create(t._default),t.inBuffer=Ember.create(t._default),t.hasElement=Ember.create(t._default),t.inDOM=Ember.create(t.hasElement);for(var r in e)e.hasOwnProperty(r)&&Ember.merge(t[r],e[r]);return t}}(),function(){function e(e,t,r,n){t.triggerRecursively("willInsertElement"),r?r.domManager.after(r,n.string()):e.domManager.prepend(e,n.string()),t.forEach(function(e){e.transitionTo("inDOM"),e.propertyDidChange("element"),e.triggerRecursively("didInsertElement")})}var t=Ember.View.cloneStates(Ember.View.states),r=Ember.get,n=Ember.set,i=Ember.EnumerableUtils.forEach,o=Ember._ViewCollection;Ember.ContainerView=Ember.View.extend(Ember.MutableArray,{states:t,init:function(){this._super();var e=r(this,"childViews");Ember.defineProperty(this,"childViews",Ember.View.childViewsProperty);var t=this._childViews;i(e,function(e,i){var o;"string"==typeof e?(o=r(this,e),o=this.createChildView(o),n(this,e,o)):o=this.createChildView(e),t[i]=o},this);var o=r(this,"currentView");o&&(t.length||(t=this._childViews=this._childViews.slice()),t.push(this.createChildView(o)))},replace:function(e,t,n){var i=n?r(n,"length"):0;if(this.arrayContentWillChange(e,t,i),this.childViewsWillChange(this._childViews,e,t),0===i)this._childViews.splice(e,t);else{var o=[e,t].concat(n);n.length&&!this._childViews.length&&(this._childViews=this._childViews.slice()),this._childViews.splice.apply(this._childViews,o)}return this.arrayContentDidChange(e,t,i),this.childViewsDidChange(this._childViews,e,t,i),this},objectAt:function(e){return this._childViews[e]},length:Ember.computed(function(){return this._childViews.length}).volatile(),render:function(e){this.forEachChildView(function(t){t.renderToBuffer(e)})},instrumentName:"container",childViewsWillChange:function(e,t,r){if(this.propertyWillChange("childViews"),r>0){var n=e.slice(t,t+r);this.currentState.childViewsWillChange(this,e,t,r),this.initializeViews(n,null,null)}},removeChild:function(e){return this.removeObject(e),this},childViewsDidChange:function(e,t,n,i){if(i>0){var o=e.slice(t,t+i);this.initializeViews(o,this,r(this,"templateData")),this.currentState.childViewsDidChange(this,e,t,i)}this.propertyDidChange("childViews")},initializeViews:function(e,t,o){i(e,function(e){n(e,"_parentView",t),!e.container&&t&&n(e,"container",t.container),r(e,"templateData")||n(e,"templateData",o)})},currentView:null,_currentViewWillChange:Ember.beforeObserver(function(){var e=r(this,"currentView");e&&e.destroy()},"currentView"),_currentViewDidChange:Ember.observer(function(){var e=r(this,"currentView");e&&this.pushObject(e)},"currentView"),_ensureChildrenAreInDOM:function(){this.currentState.ensureChildrenAreInDOM(this)}}),Ember.merge(t._default,{childViewsWillChange:Ember.K,childViewsDidChange:Ember.K,ensureChildrenAreInDOM:Ember.K}),Ember.merge(t.inBuffer,{childViewsDidChange:function(){throw new Ember.Error("You cannot modify child views while in the inBuffer state")}}),Ember.merge(t.hasElement,{childViewsWillChange:function(e,t,r,n){for(var i=r;r+n>i;i++)t[i].remove()},childViewsDidChange:function(e){Ember.run.scheduleOnce("render",e,"_ensureChildrenAreInDOM")},ensureChildrenAreInDOM:function(t){var r,n,i,s,a,u=t._childViews,c=new o;for(r=0,n=u.length;n>r;r++)i=u[r],a||(a=Ember.RenderBuffer(),a._hasElement=!1),i.renderToBufferIfNeeded(a)?c.push(i):c.length?(e(t,c,s,a),a=null,s=i,c.clear()):s=i;c.length&&e(t,c,s,a)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.String.fmt,Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver(function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)},"content"),_contentDidChange:Ember.observer(function(){var t=e(this,"content");t&&(this._assertArrayLike(t),t.addArrayObserver(this));var r=t?e(t,"length"):0;this.arrayDidChange(t,0,null,r)},"content"),_assertArrayLike:function(){},destroy:function(){if(this._super()){var t=e(this,"content");return t&&t.removeArrayObserver(this),this._createdEmptyView&&this._createdEmptyView.destroy(),this}},arrayWillChange:function(t,r,n){var i=e(this,"emptyView");i&&i instanceof Ember.View&&i.removeFromParent();var o,s,a,u=this._childViews;a=this._childViews.length;var c=n===a;for(c&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),s=r+n-1;s>=r;s--)o=u[s],o.destroy()},arrayDidChange:function(r,n,i,o){var s,a,u,c,l,h,m=[];if(c=r?e(r,"length"):0)for(l=e(this,"itemViewClass"),"string"==typeof l&&(l=e(l)||l),u=n;n+o>u;u++)a=r.objectAt(u),s=this.createChildView(l,{content:a,contentIndex:u}),m.push(s);else{if(h=e(this,"emptyView"),!h)return;"string"==typeof h&&(h=e(h)||h),h=this.createChildView(h),m.push(h),t(this,"emptyView",h),Ember.CoreView.detect(h)&&(this._createdEmptyView=h)}this.replace(n,0,m)},createChildView:function(r,n){r=this._super(r,n);var i=e(r,"tagName");return(null===i||void 0===i)&&(i=Ember.CollectionView.CONTAINER_MAP[e(this,"tagName")],t(r,"tagName",i)),r}}),Ember.CollectionView.CONTAINER_MAP={ul:"li",ol:"li",table:"tr",thead:"tr",tbody:"tr",tfoot:"tr",tr:"td",select:"option"}}(),function(){var e=Ember.get,t=Ember.set,r=(Ember.isNone,Array.prototype.slice);Ember.Component=Ember.View.extend(Ember.TargetActionSupport,{init:function(){this._super(),t(this,"context",this),t(this,"controller",this)},cloneKeywords:function(){return{view:this,controller:this}},_yield:function(t,r){var n=r.data.view,i=this._parentView,o=e(this,"template");o&&n.appendChild(Ember.View,{isVirtual:!0,tagName:"",_contextView:i,template:o,context:e(i,"context"),controller:e(i,"controller"),templateData:{keywords:i.cloneKeywords()}})},targetObject:Ember.computed(function(){var t=e(this,"_parentView");return t?e(t,"controller"):null}).property("_parentView"),sendAction:function(t){var n,i=r.call(arguments,1);n=void 0===t?e(this,"action"):e(this,t),void 0!==n&&this.triggerAction({action:n,actionContext:i})}})}(),function(){Ember.ViewTargetActionSupport=Ember.Mixin.create(Ember.TargetActionSupport,{target:Ember.computed.alias("controller"),actionContext:Ember.computed.alias("context")})}(),function(){e("metamorph",[],function(){"use strict";// Copyright: ©2011 My Company Inc. All rights reserved.
|
18
|
+
var e=function(){},t=0,r=this.document,n=("undefined"==typeof ENV?{}:ENV).DISABLE_RANGE_API,i=!n&&r&&"createRange"in r&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,o=r&&function(){var e=r.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),s=r&&function(){var e=r.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),a=function(r){var n;n=this instanceof a?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=a.prototype;var u,c,l,h,m,f,p,d,b;if(h=function(){return this.startTag()+this.innerHTML+this.endTag()},d=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},b=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"},i)u=function(e,t){var n=r.createRange(),i=r.getElementById(e.start),o=r.getElementById(e.end);return t?(n.setStartBefore(i),n.setEndAfter(o)):(n.setStartAfter(i),n.setEndBefore(o)),n},c=function(e,t){var r=u(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},l=function(){var e=u(this,!0);e.deleteContents()},m=function(e){var t=r.createRange();t.setStart(e),t.collapse(!1);var n=t.createContextualFragment(this.outerHTML());e.appendChild(n)},f=function(e){var t=r.createRange(),n=r.getElementById(this.end);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)},p=function(e){var t=r.createRange(),n=r.getElementById(this.start);t.setStartAfter(n),t.setEndAfter(n);var i=t.createContextualFragment(e);t.insertNode(i)};else{var E={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},v=function(e,t){if(e.getAttribute("id")===t)return e;var r,n,i,o=e.childNodes.length;for(r=0;o>r;r++)if(n=e.childNodes[r],i=1===n.nodeType&&v(n,t))return i},g=function(e,t){var n=[];if(s&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,i){return n.push([i,t]),r})),e.innerHTML=t,n.length>0){var i,o=n.length;for(i=0;o>i;i++){var a=v(e,n[i][0]),u=r.createTextNode(n[i][1]);a.parentNode.insertBefore(u,a)}}},y=function(e,t){var n=E[e.tagName.toLowerCase()]||E._default,i=n[0],s=n[1],a=n[2];o&&(t="­"+t);var u=r.createElement("div");g(u,s+t+a);for(var c=0;i>=c;c++)u=u.firstChild;if(o){for(var l=u;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&""===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}return u},w=function(e){for(;""===e.parentNode.tagName;)e=e.parentNode;return e},_=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};c=function(e,t){var n,i,o,s=w(r.getElementById(this.start)),a=r.getElementById(this.end),u=a.parentNode;for(_(s,a),n=s.nextSibling;n;){if(i=n.nextSibling,o=n===a){if(!t)break;a=n.nextSibling}if(n.parentNode.removeChild(n),o)break;n=i}for(n=y(s.parentNode,e);n;)i=n.nextSibling,u.insertBefore(n,a),n=i},l=function(){var e=w(r.getElementById(this.start)),t=r.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},m=function(e){for(var t,r=y(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},f=function(e){var t,n,i=r.getElementById(this.end),o=i.nextSibling,s=i.parentNode;for(n=y(s,e);n;)t=n.nextSibling,s.insertBefore(n,o),n=t},p=function(e){var t,n,i=r.getElementById(this.start),o=i.parentNode;n=y(o,e);for(var s=i.nextSibling;n;)t=n.nextSibling,o.insertBefore(n,s),n=t}}return a.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(c.call(this,e),this.innerHTML=e,void 0)},a.prototype.replaceWith=function(e){this.checkRemoved(),c.call(this,e,!0)},a.prototype.remove=l,a.prototype.outerHTML=h,a.prototype.appendTo=m,a.prototype.after=f,a.prototype.prepend=p,a.prototype.startTag=d,a.prototype.endTag=b,a.prototype.isRemoved=function(){var e=r.getElementById(this.start),t=r.getElementById(this.end);return!e||!t},a.prototype.checkRemoved=function(){if(this.isRemoved())throw new Error("Cannot perform operations on a Metamorph that is not in the DOM.")},a})}(),function(){var e=Object.create||function(e){function t(){}return t.prototype=e,new t},t=this.Handlebars||Ember.imports&&Ember.imports.Handlebars;t||"function"!=typeof require||(t=require("handlebars")),Ember.Handlebars=e(t),Ember.Handlebars.helper=function(e,t){Ember.View.detect(t)?Ember.Handlebars.registerHelper(e,function(e){return Ember.Handlebars.helpers.view.call(this,t,e)}):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.helpers=e(t.helpers),Ember.Handlebars.Compiler=function(){},t.Compiler&&(Ember.Handlebars.Compiler.prototype=e(t.Compiler.prototype)),Ember.Handlebars.Compiler.prototype.compiler=Ember.Handlebars.Compiler,Ember.Handlebars.JavaScriptCompiler=function(){},t.JavaScriptCompiler&&(Ember.Handlebars.JavaScriptCompiler.prototype=e(t.JavaScriptCompiler.prototype),Ember.Handlebars.JavaScriptCompiler.prototype.compiler=Ember.Handlebars.JavaScriptCompiler),Ember.Handlebars.JavaScriptCompiler.prototype.namespace="Ember.Handlebars",Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer=function(){return"''"},Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer=function(e){return"data.buffer.push("+e+");"};var r="ember"+ +new Date,n=1;Ember.Handlebars.Compiler.prototype.mustache=function(e){if(e.isHelper&&"control"===e.id.string)e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["controlID",new t.AST.StringNode(r+n++)]);else if(e.params.length||e.hash);else{var i=new t.AST.IdNode([{part:"_triageMustache"}]);e.escaped||(e.hash=e.hash||new t.AST.HashNode([]),e.hash.pairs.push(["unescaped",new t.AST.StringNode("true")])),e=new t.AST.MustacheNode([i].concat([e.id]),e.hash,!e.escaped)}return t.Compiler.prototype.mustache.call(this,e)},Ember.Handlebars.precompile=function(e){var r=t.parse(e),n={knownHelpers:{action:!0,unbound:!0,bindAttr:!0,template:!0,view:!0,_triageMustache:!0},data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(r,n);return(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0)},t.compile&&(Ember.Handlebars.compile=function(e){var r=t.parse(e),n={data:!0,stringParams:!0},i=(new Ember.Handlebars.Compiler).compile(r,n),o=(new Ember.Handlebars.JavaScriptCompiler).compile(i,n,void 0,!0),s=Ember.Handlebars.template(o);return s.isMethod=!1,s})}(),function(){function e(e,t,r,n){var i,o,s,a,u=[],c=n.hash,l=c.boundOptions;for(a in l)l.hasOwnProperty(a)&&(c[a]=Ember.Handlebars.get(e,l[a],n));for(i=0,o=r.length;o>i;++i)s=r[i],u.push(Ember.Handlebars.get(s.root,s.path,n));return u.push(n),t.apply(e,u)}var t=Array.prototype.slice,r=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,o=r&&r.keywords||{};return n=t.split(".",1)[0],o.hasOwnProperty(n)&&(e=o[n],i=!0,t=t===n?"":t.substr(n.length+1)),{root:e,path:t,isKeyword:i}},n=Ember.Handlebars.get=function(e,t,n){var i,o=n&&n.data,s=r(e,t,o);return e=s.root,t=s.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.getPath=Ember.deprecateFunc("`Ember.Handlebars.getPath` has been changed to `Ember.Handlebars.get` for consistency.",Ember.Handlebars.get),Ember.Handlebars.resolveParams=function(e,t,r){for(var i,o,s=[],a=r.types,u=0,c=t.length;c>u;u++)i=t[u],o=a[u],"ID"===o?s.push(n(e,i,r)):s.push(i);return s},Ember.Handlebars.resolveHash=function(e,t,r){var i,o={},s=r.hashTypes;for(var a in t)t.hasOwnProperty(a)&&(i=s[a],o[a]="ID"===i?n(e,t[a],r):t[a]);return o},Ember.Handlebars.registerHelper("helperMissing",function(e,t){var r,n="";throw r="%@ Handlebars error: Could not find property '%@' on object %@.",t.data&&(n=t.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerBoundHelper=function(n,i){function o(){var n,o,a,u,c,l=t.call(arguments,0,-1),h=l.length,m=arguments[arguments.length-1],f=[],p=m.types,d=m.data,b=m.hash,E=d.view,v=m.contexts,g=v&&v.length?v[0]:this,y="",w=Ember._SimpleHandlebarsView.prototype.normalizedValue,_=b.boundOptions={};for(a in b)Ember.IS_BINDING.test(a)&&(_[a.slice(0,-7)]=b[a]);var C=[];for(d.properties=[],n=0;h>n;++n)if(d.properties.push(l[n]),"ID"===p[n]){var O=r(g,l[n],d);f.push(O),C.push(O)}else f.push(null);if(d.isUnbound)return e(this,i,f,m);var A=new Ember._SimpleHandlebarsView(null,null,!m.hash.unescaped,m.data);A.normalizedValue=function(){var e,t=[];for(e in _)_.hasOwnProperty(e)&&(c=r(g,_[e],d),A.path=c.path,A.pathRoot=c.root,b[e]=w.call(A));for(n=0;h>n;++n)c=f[n],c?(A.path=c.path,A.pathRoot=c.root,t.push(w.call(A))):t.push(l[n]);return t.push(m),i.apply(g,t)},E.appendChild(A);for(u in _)_.hasOwnProperty(u)&&C.push(r(g,_[u],d));for(n=0,o=C.length;o>n;++n)c=C[n],E.registerObserver(c.root,c.path,A,A.rerender);if("ID"===p[0]&&0!==f.length){var P=f[0],V=P.root,x=P.path;Ember.isEmpty(x)||(y=x+".");for(var S=0,T=s.length;T>S;S++)E.registerObserver(V,y+s[S],A,A.rerender)}}var s=t.call(arguments,2);o._rawFunction=i,Ember.Handlebars.registerHelper(n,o)},Ember.Handlebars.template=function(e){var t=Handlebars.template(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.htmlSafe=function(){return e(this)})}(),function(){Ember.Handlebars.resolvePaths=function(e){for(var t=[],r=e.contexts,n=e.roots,i=e.data,o=0,s=r.length;s>o;o++)t.push(Ember.Handlebars.get(n[o],r[o],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}Ember.set,Ember.get;var r=t("metamorph"),n={remove:function(t){t.morph.remove(),e()},prepend:function(t,r){t.morph.prepend(r),e()},after:function(t,r){t.morph.after(r),e()},html:function(t,r){t.morph.html(r),e()},replace:function(t){var r=t.morph;t.transitionTo("preRender"),Ember.run.schedule("render",this,function(){if(!t.isDestroying){t.clearRenderedChildren();var n=t.renderToBuffer();t.invokeRecursively(function(e){e.propertyWillChange("element")}),t.triggerRecursively("willInsertElement"),r.replaceWith(n.string()),t.transitionTo("inDOM"),t.invokeRecursively(function(e){e.propertyDidChange("element")}),t.triggerRecursively("didInsertElement"),e()}})},empty:function(t){t.morph.html(""),e()}};Ember._Metamorph=Ember.Mixin.create({isVirtual:!0,tagName:"",instrumentName:"metamorph",init:function(){this._super(),this.morph=r()},beforeRender:function(e){e.push(this.morph.startTag()),e.pushOpeningTag()},afterRender:function(e){e.pushClosingTag(),e.push(this.morph.endTag())},createElement:function(){var e=this.renderToBuffer();this.outerHTML=e.string(),this.clearBuffer()},domManager:n}),Ember._MetamorphView=Ember.View.extend(Ember._Metamorph),Ember._SimpleMetamorphView=Ember.CoreView.extend(Ember._Metamorph)}(),function(){function e(e,t,r,n){this.path=e,this.pathRoot=t,this.isEscaped=r,this.templateData=n,this.morph=o(),this.state="preRender",this.updateId=null,this._parentView=null,this.buffer=null}var r=Ember.get,n=Ember.set,i=Ember.Handlebars.get,o=t("metamorph");Ember._SimpleHandlebarsView=e,e.prototype={isVirtual:!0,isView:!0,destroy:function(){this.updateId&&(Ember.run.cancel(this.updateId),this.updateId=null),this._parentView&&this._parentView.removeChild(this),this.morph=null,this.state="destroyed"},propertyWillChange:Ember.K,propertyDidChange:Ember.K,normalizedValue:function(){var e,t,r=this.path,n=this.pathRoot;return""===r?e=n:(t=this.templateData,e=i(n,r,{data:t})),e},renderToBuffer:function(e){var t="";t+=this.morph.startTag(),t+=this.render(),t+=this.morph.endTag(),e.push(t)},render:function(){var e=this.isEscaped,t=this.normalizedValue();return null===t||void 0===t?t="":t instanceof Handlebars.SafeString||(t=String(t)),e&&(t=Handlebars.Utils.escapeExpression(t)),t},rerender:function(){switch(this.state){case"preRender":case"destroyed":break;case"inBuffer":throw new Ember.Error("Something you did tried to replace an {{expression}} before it was inserted into the DOM.");case"hasElement":case"inDOM":this.updateId=Ember.run.scheduleOnce("render",this,"update")}return this},update:function(){this.updateId=null,this.morph.html(this.render())},transitionTo:function(e){this.state=e}};var s=Ember.View.cloneStates(Ember.View.states),a=Ember.merge;a(s._default,{rerenderIfNeeded:Ember.K}),a(s.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:s,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),o=r(this,"pathRoot"),s=r(this,"valueNormalizerFunc");return""===n?e=o:(t=r(this,"templateData"),e=i(o,n,{data:t})),s?s(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),o=r(this,"preserveContext"),s=r(this,"previousContext"),a=r(this,"inverseTemplate"),u=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",u),o)n(this,"_context",s);else{if(!u)return null===c||void 0===c?c="":c instanceof Handlebars.SafeString||(c=String(c)),t&&(c=Handlebars.Utils.escapeExpression(c)),e.push(c),void 0;n(this,"_context",c)}else a?(n(this,"template",a),o?n(this,"_context",s):n(this,"_context",c)):n(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r,n,s,a){var u,c,l,h=t.data,m=t.fn,f=t.inverse,p=h.view,d=this;if(u=o(d,e,h),"object"==typeof this){if(h.insideGroup){c=function(){Ember.run.once(p,"rerender")};var b,E,v=i(d,e,t);v=s?s(v):v,E=r?d:v,n(v)?b=m:f&&(b=f),b(E,{data:t.data})}else{var g=p.createChildView(Ember._HandlebarsBoundView,{preserveContext:r,shouldDisplayFunc:n,valueNormalizerFunc:s,displayTemplate:m,inverseTemplate:f,path:e,pathRoot:d,previousContext:d,isEscaped:!t.hash.unescaped,templateData:t.data});p.appendChild(g),c=function(){Ember.run.scheduleOnce("render",g,"rerenderIfNeeded")}}if(""!==u.path&&(p.registerObserver(u.root,u.path,c),a))for(l=0;l<a.length;l++)p.registerObserver(u.root,u.path+"."+a[l],c)}else h.buffer.push(i(d,e,t))}function r(e,t,r){var n,s,a,u,c=r.data,l=c.view;if(n=o(e,t,c),a=n.root,a&&"object"==typeof a){if(c.insideGroup){s=function(){Ember.run.once(l,"rerender")};var h=i(e,t,r);(null===h||void 0===h)&&(h=""),c.buffer.push(h)}else{var m=new Ember._SimpleHandlebarsView(t,e,!r.hash.unescaped,r.data);m._parentView=l,l.appendChild(m),s=function(){Ember.run.scheduleOnce("render",m,"rerender")}}""!==n.path&&l.registerObserver(n.root,n.path,s)}else u=i(e,t,r),c.buffer.push(null===u||"undefined"==typeof u?"":u)}var n=Ember.get;Ember.set,Ember.String.fmt;var i=Ember.Handlebars.get,o=Ember.Handlebars.normalizePath,s=Ember.ArrayPolyfills.forEach,a=Ember.Handlebars,u=a.helpers;a.registerHelper("_triageMustache",function(e,t){return u[e]?u[e].call(this,t):u.bind.apply(this,arguments)}),a.registerHelper("bind",function(n,i){var o=i.contexts&&i.contexts.length?i.contexts[0]:this;return i.fn?t.call(o,n,i,!1,e):r(o,n,i)}),a.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts.length?r.contexts[0]:this,o=function(e){var t=e&&n(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?0!==n(e,"length"):!!e};return t.call(i,e,r,!0,o,o,["isTruthy","length"])}),a.registerHelper("with",function(r,n){if(4===arguments.length){var i,s,a,c;if(n=arguments[3],i=arguments[2],s=arguments[0],Ember.isGlobalPath(s))Ember.bind(n.data.keywords,i,s);else{c=o(this,s,n.data),s=c.path,a=c.root;var l=Ember.$.expando+Ember.guidFor(a);n.data.keywords[l]=a;var h=s?l+"."+s:l;Ember.bind(n.data.keywords,i,h)}return t.call(this,s,n,!0,e)}return u.bind.call(n.contexts[0],r,n)}),a.registerHelper("if",function(e,t){return u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,u.boundIf.call(t.contexts[0],e,t)}),a.registerHelper("bind-attr",function(e){var t=e.hash,r=e.data.view,n=[],u=this,c=++Ember.uuid,l=t["class"];if(null!=l){var h=a.bindClasses(this,l,r,c,e);n.push('class="'+Handlebars.Utils.escapeExpression(h.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return s.call(m,function(s){var a,l=t[s];a=o(u,l,e.data);var h,m,f="this"===l?a.root:i(u,l,e),p=Ember.typeOf(f);h=function(){var t=i(u,l,e),n=r.$("[data-bindattr-"+c+"='"+c+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,s,t),void 0):(Ember.removeObserver(a.root,a.path,m),void 0)},"this"===l||a.isKeyword&&""===a.path||r.registerObserver(a.root,a.path,h),"string"===p||"number"===p&&!isNaN(f)?n.push(s+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(s+'="'+s+'"')},this),n.push("data-bindattr-"+c+'="'+c+'"'),new a.SafeString(n.join(" "))}),a.registerHelper("bindAttr",a.helpers["bind-attr"]),a.bindClasses=function(e,t,r,n,a){var u,c,l,h=[],m=function(e,t,r){var n,o=t.path;return n="this"===o?e:""===o?!0:i(e,o,r),Ember.View._classStringForValue(o,n,t.className,t.falsyClassName)};return s.call(t.split(" "),function(t){var i,s,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,E=e;""!==b&&"this"!==b&&(p=o(e,b,a.data),E=p.root,b=p.path),s=function(){u=m(e,d,a),l=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),l&&0!==l.length?(i&&l.removeClass(i),u?(l.addClass(u),i=u):i=null):Ember.removeObserver(E,b,f)},""!==b&&"this"!==b&&r.registerObserver(E,b,s),c=m(e,d,a),c&&(h.push(c),i=c)}),h}}(),function(){function e(e,r){var n=r.hash,i=r.hashTypes;for(var o in n)if("ID"===i[o]){var s=n[o];Ember.IS_BINDING.test(o)||(n[o+"Binding"]=s,i[o+"Binding"]="STRING",delete n[o],delete i[o])}n.hasOwnProperty("idBinding")&&(n.id=t.get(e,n.idBinding,r),i.id="STRING",delete n.idBinding,delete i.idBinding)}Ember.get,Ember.set;var t=Ember.Handlebars,r=/^[a-z]/,n=/^view\./;t.ViewHelper=Ember.Object.create({propertiesFromHTMLOptions:function(e){var t=e.hash,r=e.data,n={},i=t["class"],o=!1;t.id&&(n.elementId=t.id,o=!0),t.tag&&(n.tagName=t.tag,o=!0),i&&(i=i.split(" "),n.classNames=i,o=!0),t.classBinding&&(n.classNameBindings=t.classBinding.split(" "),o=!0),t.classNameBindings&&(void 0===n.classNameBindings&&(n.classNameBindings=[]),n.classNameBindings=n.classNameBindings.concat(t.classNameBindings.split(" ")),o=!0),t.attributeBindings&&(n.attributeBindings=null,o=!0),o&&(t=Ember.$.extend({},t),delete t.id,delete t.tag,delete t["class"],delete t.classBinding);var s;for(var a in t)t.hasOwnProperty(a)&&Ember.IS_BINDING.test(a)&&"string"==typeof t[a]&&(s=this.contextualizeBindingPath(t[a],r),s&&(t[a]=s));if(n.classNameBindings)for(var u in n.classNameBindings){var c=n.classNameBindings[u];if("string"==typeof c){var l=Ember.View._parsePropertyPath(c);s=this.contextualizeBindingPath(l.path,r),s&&(n.classNameBindings[u]=s+l.classNames)}}return Ember.$.extend(t,n)},contextualizeBindingPath:function(e,t){var r=Ember.Handlebars.normalizePath(null,e,t);return r.isKeyword?"templateData.keywords."+e:Ember.isGlobalPath(e)?null:"this"===e?"_parentView.context":"_parentView.context."+e},helper:function(i,o,s){var a,u=s.data,c=s.fn;e(i,s),a="string"==typeof o?"STRING"===s.types[0]&&r.test(o)&&!n.test(o)?u.view.container.lookupFactory("view:"+o):t.get(i,o,s):o;var l=this.propertiesFromHTMLOptions(s,i),h=u.view;l.templateData=u;var m=a.proto?a.proto():a;c&&(l.template=c),m.controller||m.controllerBinding||l.controller||l.controllerBinding||(l._context=i),h.appendChild(a,l)}}),t.registerHelper("view",function(e,r){return e&&e.data&&e.data.isRenderData&&(r=e,e="Ember.View"),t.ViewHelper.helper(this,e,r)})}(),function(){var e=Ember.get,t=Ember.Handlebars.get;Ember.String.fmt,Ember.Handlebars.registerHelper("collection",function(r,n){r&&r.data&&r.data.isRenderData&&(n=r,r=void 0);var i=n.fn,o=n.data,s=n.inverse;n.data.view;var a;a=r?t(this,r,n):Ember.CollectionView;var u,c,l=n.hash,h={},m=a.proto();if(l.itemView){var f=o.keywords.controller,p=f.container;c=p.resolve("view:"+Ember.String.camelize(l.itemView))}else c=l.itemViewClass?t(m,l.itemViewClass,n):m.itemViewClass;delete l.itemViewClass,delete l.itemView;for(var d in l)l.hasOwnProperty(d)&&(u=d.match(/^item(.)(.*)$/),u&&"itemController"!==d&&(h[u[1].toLowerCase()+u[2]]=l[d],delete l[d]));i&&(h.template=i,delete n.fn);var b;s&&s!==Handlebars.VM.noop?(b=e(m,"emptyViewClass"),b=b.extend({template:s,tagName:h.tagName})):l.emptyViewClass&&(b=t(this,l.emptyViewClass,n)),b&&(l.emptyView=b),l.keyword||(h._context=Ember.computed.alias("content"));var E=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:o,hash:h},this);return l.itemViewClass=c.extend(E),Ember.Handlebars.helpers.view.call(this,a,n)})}(),function(){var e=Ember.Handlebars.get;Ember.Handlebars.registerHelper("unbound",function(t,r){var n,i,o,s=arguments[arguments.length-1];return arguments.length>2?(s.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helperMissing,o=n.apply(this,Array.prototype.slice.call(arguments,1)),delete s.data.isUnbound,o):(i=r.contexts&&r.contexts.length?r.contexts[0]:this,e(i,t,r))})}(),function(){var e=Ember.Handlebars.get,t=Ember.Handlebars.normalizePath;Ember.Handlebars.registerHelper("log",function(r,n){var i=n.contexts&&n.contexts.length?n.contexts[0]:this,o=t(i,r,n.data),s=o.root,a=o.path,u="this"===a?s:e(s,a,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){})}(),function(){var e=Ember.get,t=Ember.set;Ember.Handlebars.EachView=Ember.CollectionView.extend(Ember._Metamorph,{init:function(){var r,n=e(this,"itemController");if(n){var i=e(this,"controller.container").lookupFactory("controller:array").create({parentController:e(this,"controller"),itemController:n,target:e(this,"controller"),_eachView:this});this.disableContentObservers(function(){t(this,"content",i),r=new Ember.Binding("content","_eachView.dataSource").oneWay(),r.connect(i)}),t(this,"_arrayController",i)}else this.disableContentObservers(function(){r=new Ember.Binding("content","dataSource").oneWay(),r.connect(this)});return this._super()},_assertArrayLike:function(){},disableContentObservers:function(e){Ember.removeBeforeObserver(this,"content",null,"_contentWillChange"),Ember.removeObserver(this,"content",null,"_contentDidChange"),e.call(this),Ember.addBeforeObserver(this,"content",null,"_contentWillChange"),Ember.addObserver(this,"content",null,"_contentDidChange")},itemViewClass:Ember._MetamorphView,emptyViewClass:Ember._MetamorphView,createChildView:function(r,n){r=this._super(r,n);var i=e(this,"keyword"),o=e(r,"content");if(i){var s=e(r,"templateData");s=Ember.copy(s),s.keywords=r.cloneKeywords(),t(r,"templateData",s),s.keywords[i]=o}return o&&e(o,"isController")&&t(r,"controller",o),r},destroy:function(){if(this._super()){var t=e(this,"_arrayController");return t&&t.destroy(),this}}});var r=Ember.Handlebars.GroupedEach=function(e,t,r){var n=this,i=Ember.Handlebars.normalizePath(e,t,r.data);this.context=e,this.path=t,this.options=r,this.template=r.fn,this.containingView=r.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){n.destroy()})};r.prototype={contentWillChange:function(){this.removeArrayObservers()},contentDidChange:function(){this.content=this.lookupContent(),this.addArrayObservers(),this.rerenderContainingView()},contentArrayWillChange:Ember.K,contentArrayDidChange:function(){this.rerenderContainingView()},lookupContent:function(){return Ember.Handlebars.get(this.normalizedRoot,this.normalizedPath,this.options)},addArrayObservers:function(){this.content&&this.content.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},removeArrayObservers:function(){this.content&&this.content.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},addContentObservers:function(){Ember.addBeforeObserver(this.normalizedRoot,this.normalizedPath,this,this.contentWillChange),Ember.addObserver(this.normalizedRoot,this.normalizedPath,this,this.contentDidChange)},removeContentObservers:function(){Ember.removeBeforeObserver(this.normalizedRoot,this.normalizedPath,this.contentWillChange),Ember.removeObserver(this.normalizedRoot,this.normalizedPath,this.contentDidChange)},render:function(){if(this.content){var t=this.content,r=e(t,"length"),n=this.options.data,i=this.template;n.insideEach=!0;for(var o=0;r>o;o++)i(t.objectAt(o),{data:n})}},rerenderContainingView:function(){var e=this;Ember.run.scheduleOnce("render",this,function(){e.destroyed||e.containingView.rerender()})},destroy:function(){this.removeContentObservers(),this.content&&this.removeArrayObservers(),this.destroyed=!0}},Ember.Handlebars.registerHelper("each",function(e,t){if(4===arguments.length){var r=arguments[0];t=arguments[3],e=arguments[2],""===e&&(e="this"),t.hash.keyword=r}return 1===arguments.length&&(t=e,e="this"),t.hash.dataSourceBinding=e,!t.data.insideGroup||t.hash.groupedRows||t.hash.itemViewClass?Ember.Handlebars.helpers.collection.call(this,"Ember.Handlebars.EachView",t):(new Ember.Handlebars.GroupedEach(this,e,t).render(),void 0)})}(),function(){Ember.Handlebars.registerHelper("template",function(){return Ember.Handlebars.helpers.partial.apply(this,arguments)})}(),function(){Ember.Handlebars.registerHelper("partial",function(e,t){var r=e.split("/"),n=r[r.length-1];r[r.length-1]="_"+n;var i=t.data.view,o=r.join("/"),s=i.templateForName(o),a=!s&&i.templateForName(e);s=s||a,s(this,{data:t.data})})}(),function(){var e=Ember.get;Ember.set,Ember.Handlebars.registerHelper("yield",function(t){for(var r=t.data.view;r&&!e(r,"layout");)r=r._contextView?r._contextView:e(r,"parentView");r._yield(this,t)})}(),function(){Ember.Handlebars.registerHelper("loc",function(e){return Ember.String.loc(e)})}(),function(){var e=Ember.set;Ember.get,Ember.Checkbox=Ember.View.extend({classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","indeterminate","disabled","tabindex","name"],type:"checkbox",checked:!1,disabled:!1,indeterminate:!1,init:function(){this._super(),this.on("change",this,this._updateElementValue)},didInsertElement:function(){this._super(),this.get("element").indeterminate=!!this.get("indeterminate")},_updateElementValue:function(){e(this,"checked",this.$().prop("checked"))}})}(),function(){function e(e,r,n){var i=t(r,e),o=t(r,"onEvent"),s=t(r,"value");(o===e||"keyPress"===o&&"key-press"===e)&&r.sendAction("action",s),r.sendAction(e,s),(i||o===e)&&(t(r,"bubbles")||n.stopPropagation())}var t=Ember.get,r=Ember.set;Ember.TextSupport=Ember.Mixin.create({value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex"],placeholder:null,disabled:!1,maxlength:null,init:function(){this._super(),this.on("focusOut",this,this._elementValueDidChange),this.on("change",this,this._elementValueDidChange),this.on("paste",this,this._elementValueDidChange),this.on("cut",this,this._elementValueDidChange),this.on("input",this,this._elementValueDidChange),this.on("keyUp",this,this.interpretKeyEvents)},action:null,onEvent:"enter",bubbles:!1,interpretKeyEvents:function(e){var t=Ember.TextSupport.KEY_EVENTS,r=t[e.keyCode];return this._elementValueDidChange(),r?this[r](e):void 0},_elementValueDidChange:function(){r(this,"value",this.$().val())},insertNewline:function(t){e("enter",this,t),e("insert-newline",this,t)},cancel:function(t){e("escape-press",this,t)},focusIn:function(t){e("focus-in",this,t)},focusOut:function(t){e("focus-out",this,t)},keyPress:function(t){e("key-press",this,t)}}),Ember.TextSupport.KEY_EVENTS={13:"insertNewline",27:"cancel"}}(),function(){Ember.get,Ember.set,Ember.TextField=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-field"],tagName:"input",attributeBindings:["type","value","size","pattern","name"],value:"",type:"text",size:null,pattern:null})}(),function(){var e=Ember.get,t=Ember.set;Ember.Button=Ember.View.extend(Ember.TargetActionSupport,{classNames:["ember-button"],classNameBindings:["isActive"],tagName:"button",propagateEvents:!1,attributeBindings:["type","disabled","href","tabindex"],targetObject:Ember.computed(function(){var t=e(this,"target"),r=e(this,"context"),n=e(this,"templateData");return"string"!=typeof t?t:Ember.Handlebars.get(r,t,{data:n})}).property("target"),type:Ember.computed(function(){var e=this.tagName;return"input"===e||"button"===e?"button":void 0}),disabled:!1,href:Ember.computed(function(){return"a"===this.tagName?"#":null}),mouseDown:function(){return e(this,"disabled")||(t(this,"isActive",!0),this._mouseDown=!0,this._mouseEntered=!0),e(this,"propagateEvents")},mouseLeave:function(){this._mouseDown&&(t(this,"isActive",!1),this._mouseEntered=!1)},mouseEnter:function(){this._mouseDown&&(t(this,"isActive",!0),this._mouseEntered=!0)},mouseUp:function(){return e(this,"isActive")&&(this.triggerAction(),t(this,"isActive",!1)),this._mouseDown=!1,this._mouseEntered=!1,e(this,"propagateEvents")},keyDown:function(e){(13===e.keyCode||32===e.keyCode)&&this.mouseDown()},keyUp:function(e){(13===e.keyCode||32===e.keyCode)&&this.mouseUp()},touchStart:function(e){return this.mouseDown(e)},touchEnd:function(e){return this.mouseUp(e)},init:function(){this._super()}})}(),function(){var e=Ember.get;Ember.set,Ember.TextArea=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name"],rows:null,cols:null,_updateElementValue:Ember.observer(function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)},"value"),init:function(){this._super(),this.on("didInsertElement",this,this._updateElementValue)}})}(),function(){var e=Ember.set,t=Ember.get,r=Ember.EnumerableUtils.indexOf,n=Ember.EnumerableUtils.indexesOf,i=Ember.EnumerableUtils.forEach,o=Ember.EnumerableUtils.replace,s=Ember.isArray;Ember.Handlebars.compile,Ember.SelectOption=Ember.View.extend({tagName:"option",attributeBindings:["value","selected"],defaultTemplate:function(e,t){t={data:t.data,hash:{}},Ember.Handlebars.helpers.bind.call(e,"view.label",t)},init:function(){this.labelPathDidChange(),this.valuePathDidChange(),this._super()},selected:Ember.computed(function(){var e=t(this,"content"),n=t(this,"parentView.selection");return t(this,"parentView.multiple")?n&&r(n,e.valueOf())>-1:e==n}).property("content","parentView.selection"),labelPathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionLabelPath"),valuePathDidChange:Ember.observer(function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))},"parentView.optionValuePath")}),Ember.SelectOptgroup=Ember.CollectionView.extend({tagName:"optgroup",attributeBindings:["label"],selectionBinding:"parentView.selection",multipleBinding:"parentView.multiple",optionLabelPathBinding:"parentView.optionLabelPath",optionValuePathBinding:"parentView.optionValuePath",itemViewClassBinding:"parentView.optionView"}),Ember.Select=Ember.View.extend({tagName:"select",classNames:["ember-select"],defaultTemplate:Ember.Handlebars.template(function(e,t,r,n,i){function o(e,t){var n,i,o="";return t.buffer.push('<option value="">'),n={},i={},t.buffer.push(p(r._triageMustache.call(e,"view.prompt",{hash:{},contexts:[e],types:["ID"],hashContexts:i,hashTypes:n,data:t}))),t.buffer.push("</option>"),o}function s(e,t){var n,i,o;i={},o={},n=r.each.call(e,"view.groupedContent",{hash:{},inverse:d.noop,fn:d.program(4,a,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:i,data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function a(e,t){var n,i;n={content:e,label:e},i={content:"ID",label:"ID"},t.buffer.push(p(r.view.call(e,"view.groupView",{hash:{content:"content",label:"label"},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}function u(e,t){var n,i,o;i={},o={},n=r.each.call(e,"view.content",{hash:{},inverse:d.noop,fn:d.program(7,c,t),contexts:[e],types:["ID"],hashContexts:o,hashTypes:i,data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function c(e,t){var n,i;n={content:e},i={content:"ID"},t.buffer.push(p(r.view.call(e,"view.optionView",{hash:{content:""},contexts:[e],types:["ID"],hashContexts:n,hashTypes:i,data:t})))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),i=i||{};
|
19
|
+
var l,h,m,f="",p=this.escapeExpression,d=this;return h={},m={},l=r["if"].call(t,"view.prompt",{hash:{},inverse:d.noop,fn:d.program(1,o,i),contexts:[t],types:["ID"],hashContexts:m,hashTypes:h,data:i}),(l||0===l)&&i.buffer.push(l),h={},m={},l=r["if"].call(t,"view.optionGroupPath",{hash:{},inverse:d.program(6,u,i),fn:d.program(3,s,i),contexts:[t],types:["ID"],hashContexts:m,hashTypes:h,data:i}),(l||0===l)&&i.buffer.push(l),f}),attributeBindings:["multiple","disabled","tabindex","name"],multiple:!1,disabled:!1,content:null,selection:null,value:Ember.computed(function(e,r){if(2===arguments.length)return r;var n=t(this,"optionValuePath").replace(/^content\.?/,"");return n?t(this,"selection."+n):t(this,"selection")}).property("selection"),prompt:null,optionLabelPath:"content",optionValuePath:"content",optionGroupPath:null,groupView:Ember.SelectOptgroup,groupedContent:Ember.computed(function(){var e=t(this,"optionGroupPath"),r=Ember.A(),n=t(this,"content")||[];return i(n,function(n){var i=t(n,e);t(r,"lastObject.label")!==i&&r.pushObject({label:i,content:Ember.A()}),t(r,"lastObject.content").push(n)}),r}).property("optionGroupPath","content.@each"),optionView:Ember.SelectOption,_change:function(){t(this,"multiple")?this._changeMultiple():this._changeSingle()},selectionDidChange:Ember.observer(function(){var r=t(this,"selection");if(t(this,"multiple")){if(!s(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()},"selection.@each"),valueDidChange:Ember.observer(function(){var e,r=t(this,"content"),n=t(this,"value"),i=t(this,"optionValuePath").replace(/^content\.?/,""),o=i?t(this,"selection."+i):t(this,"selection");n!==o&&(e=r?r.find(function(e){return n===(i?t(e,i):e)}):null,this.set("selection",e))},"value"),_triggerChange:function(){var e=t(this,"selection"),r=t(this,"value");Ember.isNone(e)||this.selectionDidChange(),Ember.isNone(r)||this.valueDidChange(),this._change()},_changeSingle:function(){var r=this.$()[0].selectedIndex,n=t(this,"content"),i=t(this,"prompt");if(n&&t(n,"length")){if(i&&0===r)return e(this,"selection",null),void 0;i&&(r-=1),e(this,"selection",n.objectAt(r))}},_changeMultiple:function(){var r=this.$("option:selected"),n=t(this,"prompt"),i=n?1:0,a=t(this,"content"),u=t(this,"selection");if(a&&r){var c=r.map(function(){return this.index-i}).toArray(),l=a.objectsAt(c);s(u)?o(u,0,t(u,"length"),l):e(this,"selection",l)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),o=n?r(n,i):-1,s=t(this,"prompt");s&&(o+=1),e&&(e.selectedIndex=o)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),o=t(this,"selection"),s=i?n(i,o):[-1],a=t(this,"prompt"),u=a?1:0,c=this.$("option");c&&c.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(s,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){Ember.Handlebars.registerHelper("input",function(e){var t=e.hash,r=(e.hashTypes,t.type),n=t.on;return delete t.type,delete t.on,"checkbox"===r?Ember.Handlebars.helpers.view.call(this,Ember.Checkbox,e):(r&&(t.type=r),t.onEvent=n||"enter",Ember.Handlebars.helpers.view.call(this,Ember.TextField,e))}),Ember.Handlebars.registerHelper("textarea",function(e){return e.hash,e.hashTypes,Ember.Handlebars.helpers.view.call(this,Ember.TextArea,e)})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}function t(e){var t,n=Ember.TEMPLATES;if(n)for(var i in n)(t=i.match(/^components\/(.*)$/))&&r(e,t[1])}function r(e,t){var r="component:"+t;e.injection(r,"layout","template:components/"+t);var n=e.lookupFactory(r);n||(e.register(r,Ember.Component),n=e.lookupFactory(r)),Ember.Handlebars.helper(t,n)}Ember.Handlebars.bootstrap=function(e){var t='script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]';Ember.$(t,e).each(function(){var e=Ember.$(this),t="text/x-raw-handlebars"===e.attr("type")?Ember.$.proxy(Handlebars.compile,Handlebars):Ember.$.proxy(Ember.Handlebars.compile,Ember.Handlebars),r=e.attr("data-template-name")||e.attr("id")||"application",n=t(e.html());if(void 0!==Ember.TEMPLATES[r])throw new Ember.Error('Template named "'+r+'" already exists.');Ember.TEMPLATES[r]=n,e.remove()})},Ember.onLoad("Ember.Application",function(r){r.initializer({name:"domTemplates",initialize:e}),r.initializer({name:"registerComponents",after:"domTemplates",initialize:t})})}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",[],function(){"use strict";function e(e){this.string=e}function t(e){this.name=e}function r(e){this.name=e}function n(){}function i(i,o,s){"/"===i.charAt(0)&&(i=i.substr(1));for(var a=i.split("/"),u=[],c=0,l=a.length;l>c;c++){var h,m=a[c];(h=m.match(/^:([^\/]+)$/))?(u.push(new t(h[1])),o.push(h[1]),s.dynamics++):(h=m.match(/^\*([^\/]+)$/))?(u.push(new r(h[1])),o.push(h[1]),s.stars++):""===m?u.push(new n):(u.push(new e(m)),s.statics++)}return u}function o(e){this.charSpec=e,this.nextStates=[]}function s(e){return e.sort(function(e,t){return e.types.stars!==t.types.stars?e.types.stars-t.types.stars:e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?e.types.statics-t.types.statics:0})}function a(e,t){for(var r=[],n=0,i=e.length;i>n;n++){var o=e[n];r=r.concat(o.match(t))}return r}function u(e,t){for(var r=e.handlers,n=e.regex,i=t.match(n),o=1,s=[],a=0,u=r.length;u>a;a++){for(var c=r[a],l=c.names,h={},m=0,f=l.length;f>m;m++)h[l[m]]=i[o++];s.push({handler:c.handler,params:h,isDynamic:!!l.length})}return s}function c(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function l(e,t,r){this.path=e,this.matcher=t,this.delegate=r}function h(e){this.routes={},this.children={},this.target=e}function m(e,t,r){return function(n,i){var o=e+n;return i?(i(m(o,t,r)),void 0):new l(e+n,t,r)}}function f(e,t,r){for(var n=0,i=0,o=e.length;o>i;i++)n+=e[i].path.length;t=t.substr(n),e.push({path:t,handler:r})}function p(e,t,r,n){var i=t.routes;for(var o in i)if(i.hasOwnProperty(o)){var s=e.slice();f(s,o,i[o]),t.children[o]?p(s,t.children[o],r,n):r.call(n,s)}}var d=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],b=new RegExp("(\\"+d.join("|\\")+")","g");e.prototype={eachChar:function(e){for(var t,r=this.string,n=0,i=r.length;i>n;n++)t=r.charAt(n),e({validChars:t})},regex:function(){return this.string.replace(b,"\\$1")},generate:function(){return this.string}},t.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},r.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},n.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},o.prototype={get:function(e){for(var t=this.nextStates,r=0,n=t.length;n>r;r++){var i=t[r],o=i.charSpec.validChars===e.validChars;if(o=o&&i.charSpec.invalidChars===e.invalidChars)return i}},put:function(e){var t;return(t=this.get(e))?t:(t=new o(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,r,n,i=this.nextStates,o=[],s=0,a=i.length;a>s;s++)t=i[s],r=t.charSpec,"undefined"!=typeof(n=r.validChars)?-1!==n.indexOf(e)&&o.push(t):"undefined"!=typeof(n=r.invalidChars)&&-1===n.indexOf(e)&&o.push(t);return o}};var E=function(){this.rootState=new o,this.names={}};return E.prototype={add:function(e,t){for(var r,o=this.rootState,s="^",a={statics:0,dynamics:0,stars:0},u=[],l=[],h=!0,m=0,f=e.length;f>m;m++){var p=e[m],d=[],b=i(p.path,d,a);l=l.concat(b);for(var E=0,v=b.length;v>E;E++){var g=b[E];g instanceof n||(h=!1,o=o.put({validChars:"/"}),s+="/",o=c(o,g),s+=g.regex())}u.push({handler:p.handler,names:d})}h&&(o=o.put({validChars:"/"}),s+="/"),o.handlers=u,o.regex=new RegExp(s+"$"),o.types=a,(r=t&&t.as)&&(this.names[r]={segments:l,handlers:u})},handlersFor:function(e){var t=this.names[e],r=[];if(!t)throw new Error("There is no route named "+e);for(var n=0,i=t.handlers.length;i>n;n++)r.push(t.handlers[n]);return r},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var r=this.names[e],i="";if(!r)throw new Error("There is no route named "+e);for(var o=r.segments,s=0,a=o.length;a>s;s++){var u=o[s];u instanceof n||(i+="/",i+=u.generate(t))}return"/"!==i.charAt(0)&&(i="/"+i),i},recognize:function(e){var t,r,n,i=[this.rootState];for("/"!==e.charAt(0)&&(e="/"+e),t=e.length,t>1&&"/"===e.charAt(t-1)&&(e=e.substr(0,t-1)),r=0,n=e.length;n>r&&(i=a(i,e.charAt(r)),i.length);r++);var o=[];for(r=0,n=i.length;n>r;r++)i[r].handlers&&o.push(i[r]);i=s(o);var c=o[0];return c&&c.handlers?u(c,e):void 0}},l.prototype={to:function(e,t){var r=this.delegate;if(r&&r.willAddRoute&&(e=r.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e),t){if(0===t.length)throw new Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,e,t,this.delegate)}}},h.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,r,n){var i=new h(t);this.children[e]=i;var o=m(e,i,n);n&&n.contextEntered&&n.contextEntered(t,o),r(o)}},E.prototype.map=function(e,t){var r=new h;e(m("",r,this.delegate)),p([],r,function(e){t?t(this,e):this.add(e)},this)},E})}(),function(){e("router",["route-recognizer","rsvp"],function(e,t){"use strict";function r(e,t){this.router=e,this.promise=t,this.data={},this.resolvedModels={},this.providedModels={},this.providedModelsArray=[],this.sequence=++r.currentSequence,this.params={}}function n(){this.recognizer=new e}function i(e,n){return new r(e,t.reject(n))}function o(e,t,r,n){var i,o,a=t.length,u={},l=e.currentHandlerInfos||[],h={},m=e.currentParams||{},f=e.activeTransition,p={};for(r=x.call(r),c(h,n),i=t.length-1;i>=0;i--){var d=t[i],b=d.handler,E=l[i],v=!1;if(E&&E.name===d.handler||(v=!0),d.isDynamic)if(o=s(r,b,f,!0,h))v=!0,u[b]=o;else{p[b]={};for(var g in d.params)if(d.params.hasOwnProperty(g)){var y=d.params[g];m[g]!==y&&(v=!0),p[b][g]=h[g]=y}}else if(d.hasOwnProperty("names"))if(r.length&&(v=!0),o=s(r,b,f,d.names[0],h))u[b]=o;else{var w=d.names;p[b]={};for(var _=0,C=w.length;C>_;++_){var O=w[_];p[b][O]=h[O]=h[O]||m[O]}}v&&(a=i)}if(r.length>0)throw new Error("More context objects were passed than there are dynamic segments for the route: "+t[t.length-1].handler);return{matchPoint:a,providedModels:u,params:h,handlerParams:p}}function s(e,t,r,n,i){if(e.length&&n){var o=e.pop();if(!a(o))return o;i[n]=o.toString()}else if(r)return r.resolvedModels[t]||n&&r.providedModels[t]}function a(e){return"string"==typeof e||e instanceof String||!isNaN(e)}function u(e,t,r){var n,i,s,a,u,l=e.recognizer.handlersFor(t),h={},m=o(e,l,r).matchPoint;for(u=0;u<l.length;u++)i=l[u],s=e.getHandler(i.handler),a=i.names,a.length&&(n=u>=m?r.shift():s.context,c(h,V(s,n,a)));return h}function c(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function l(e,t){var r=e.recognizer.handlersFor(t[0]);return A(e,"Attempting transition to "+t[0]),v(e,r,x.call(t,1),e.currentParams)}function h(e,t){var r=e.recognizer.recognize(t);return e.currentHandlerInfos,A(e,"Attempting URL transition to "+t),r?v(e,r,[],{}):i(e,new n.UnrecognizedURLError(t))}function m(e,t){var r=e.router,n=d(r.currentHandlerInfos||[],t);r.targetHandlerInfos=t,p(n.exited,function(e){var t=e.handler;delete t.context,t.exit&&t.exit()});var i=n.unchanged.slice();r.currentHandlerInfos=i,p(n.updatedContext,function(t){f(e,i,t,!1)}),p(n.entered,function(t){f(e,i,t,!0)})}function f(e,t,r,i){var o=r.handler,s=r.context;try{i&&o.enter&&o.enter(),C(e),E(o,s),o.setup&&o.setup(s),C(e)}catch(a){throw a instanceof n.TransitionAborted||b(e.router,t.concat(r),!0,["error",a,e]),a}t.push(r)}function p(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r])}function d(e,t){var r,n,i,o,s={updatedContext:[],exited:[],entered:[],unchanged:[]};for(i=0,o=t.length;o>i;i++){var a=e[i],u=t[i];a&&a.handler===u.handler||(r=!0),r?(s.entered.push(u),a&&s.exited.unshift(a)):n||a.context!==u.context?(n=!0,s.updatedContext.push(u)):s.unchanged.push(a)}for(i=t.length,o=e.length;o>i;i++)s.exited.unshift(e[i]);return s}function b(e,t,r,n){if(e.triggerEvent)return e.triggerEvent(t,r,n),void 0;var i=n.shift();if(!t){if(r)return;throw new Error("Could not trigger event '"+i+"'. There are no active handlers")}for(var o=!1,s=t.length-1;s>=0;s--){var a=t[s],u=a.handler;if(u.events&&u.events[i]){if(u.events[i].apply(u,n)!==!0)return;o=!0}}if(!o&&!r)throw new Error("Nothing handled the event '"+i+"'.")}function E(e,t){e.context=t,e.contextDidChange&&e.contextDidChange()}function v(e,n,i,s,a){function u(){C(d);try{A(e,d.sequence,"Validation succeeded, finalizing transition;"),f&&f.length&&e.recognizer.hasRoute(f[f.length-1].name)&&f.length===l.matchPoint||w(d,E),e.didTransition&&e.didTransition(E),A(e,d.sequence,"TRANSITION COMPLETE."),p.resolve(E[E.length-1].handler)}catch(t){p.reject(t)}d.isAborted||(e.activeTransition=null)}function c(e){p.reject(e)}var l=o(e,n,i,s),h=n[n.length-1].handler,m=!1,f=e.currentHandlerInfos;if(e.activeTransition){if(y(e.activeTransition,h,i))return e.activeTransition;e.activeTransition.abort(),m=!0}var p=t.defer(),d=new r(e,p.promise);d.targetName=h,d.providedModels=l.providedModels,d.providedModelsArray=i,d.params=l.params,d.data=a||{},e.activeTransition=d;var E=g(e,n);return m||b(e,f,!0,["willTransition",d]),A(e,d.sequence,"Beginning validation for transition to "+d.targetName),_(d,E,0,l.matchPoint,l.handlerParams).then(u,c),d}function g(e,t){for(var r=[],n=0,i=t.length;i>n;++n){var o=t[n],s=o.isDynamic||o.names&&o.names.length;r.push({isDynamic:!!s,name:o.handler,handler:e.getHandler(o.handler)})}return r}function y(e,t,r){if(e.targetName!==t)return!1;var n=e.providedModelsArray;if(n.length!==r.length)return!1;for(var i=0,o=n.length;o>i;++i)if(n[i]!==r[i])return!1;return!0}function w(e,t){for(var r=e.router,n=(e.sequence,t[t.length-1].name),i=[],o=e.providedModelsArray.slice(),s=t.length-1;s>=0;--s){var c=t[s];if(c.isDynamic){var l=o.pop();i.unshift(a(l)?l.toString():c.context)}}var h=u(r,n,i);r.currentParams=h;var f=e.urlMethod;if(f){var p=r.recognizer.generate(n,h);"replace"===f?r.replaceURL(p):r.updateURL(p)}m(e,t)}function _(e,i,o,s,a){function u(r){return e.isAborted?(A(e.router,e.sequence,"detected abort."),t.reject(new n.TransitionAborted)):r}function c(r){return r instanceof n.TransitionAborted?t.reject(r):(e.abort(),A(p,g,v+": handling error: "+r),b(p,i.slice(0,o+1),!0,["error",r,e]),t.reject(r))}function l(){A(p,g,v+": calling beforeModel hook");var t=E.beforeModel&&E.beforeModel(e);return t instanceof r?null:t}function h(){A(p,g,v+": resolving model");var t=O(d,e,a[v],o>=s);return t instanceof r?null:t}function m(t){A(p,g,v+": calling afterModel hook"),e.resolvedModels[d.name]=t;var n=E.afterModel&&E.afterModel(t,e);return n instanceof r?null:n}function f(){return A(p,g,v+": validation succeeded, proceeding"),d.context=e.resolvedModels[d.name],_(e,i,o+1,s,a)}if(o===i.length)return t.resolve(e.resolvedModels);var p=e.router,d=i[o],E=d.handler,v=d.name,g=e.sequence;return s>o?(A(p,g,v+": using context from already-active handler"),e.resolvedModels[d.name]=e.providedModels[d.name]||d.handler.context,f()):t.resolve().then(u).then(l).then(u).then(h).then(u).then(m).then(u).then(null,c).then(f)}function C(e){if(e.isAborted)throw A(e.router,e.sequence,"detected abort."),new n.TransitionAborted}function O(e,t,r,n){var i=e.handler,o=e.name;if(!n&&i.hasOwnProperty("context"))return i.context;if(t.providedModels.hasOwnProperty(o)){var s=t.providedModels[o];return"function"==typeof s?s():s}return i.model&&i.model(r||{},t)}function A(e,t,r){e.log&&(3===arguments.length?e.log("Transition #"+t+": "+r):(r=t,e.log(r)))}function P(e,t){var r=t[0]||"/";return"/"===r.charAt(0)?h(e,r):l(e,t)}function V(e,t,r){var n={};if(a(t))return n[r[0]]=t,n;if(e.serialize)return e.serialize(t,r);if(1===r.length){var i=r[0];return n[i]=/_id$/.test(i)?t.id:t,n}}var x=Array.prototype.slice;return r.currentSequence=0,r.prototype={targetName:null,urlMethod:"update",providedModels:null,resolvedModels:null,params:null,promise:null,data:null,then:function(e,t){return this.promise.then(e,t)},abort:function(){return this.isAborted?this:(A(this.router,this.sequence,this.targetName+": transition was aborted"),this.isAborted=!0,this.router.activeTransition=null,this)},retry:function(){this.abort();var e=this.router.recognizer.handlersFor(this.targetName),t=v(this.router,e,this.providedModelsArray,this.params,this.data);return t},method:function(e){return this.urlMethod=e,this}},n.UnrecognizedURLError=function(e){this.message=e||"UnrecognizedURLError",this.name="UnrecognizedURLError"},n.TransitionAborted=function(e){this.message=e||"TransitionAborted",this.name="TransitionAborted"},n.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){var r=t[t.length-1].handler,n=[t,{as:r}];e.add.apply(e,n)})},hasRoute:function(e){return this.recognizer.hasRoute(e)},reset:function(){p(this.currentHandlerInfos||[],function(e){var t=e.handler;t.exit&&t.exit()}),this.currentHandlerInfos=null,this.targetHandlerInfos=null},activeTransition:null,handleURL:function(e){var t=x.call(arguments);return"/"!==e.charAt(0)&&(t[0]="/"+e),P(this,t).method(null)},updateURL:function(){throw new Error("updateURL is not implemented")},replaceURL:function(e){this.updateURL(e)},transitionTo:function(){return P(this,arguments)},replaceWith:function(){return P(this,arguments).method("replace")},paramsForHandler:function(e){return u(this,e,x.call(arguments,1))},generate:function(e){var t=u(this,e,x.call(arguments,1));return this.recognizer.generate(e,t)},isActive:function(e){var t,r,n=x.call(arguments,1),i=this.targetHandlerInfos,o=!1;if(!i)return!1;for(var s=this.recognizer.handlersFor(i[i.length-1].name),u=i.length-1;u>=0;u--)if(r=i[u],r.name===e&&(o=!0),o){if(0===n.length)break;if(r.isDynamic)if(t=n.pop(),a(t)){var c=s[u],l=c.names[0];if(""+t!==this.currentParams[l])return!1}else if(r.context!==t)return!1}return 0===n.length&&o},trigger:function(){var e=x.call(arguments);b(this,this.currentHandlerInfos,!1,e)},log:null},n})}(),function(){function e(e){this.parent=e,this.matches=[]}e.prototype={resource:function(t,r,n){if(2===arguments.length&&"function"==typeof r&&(n=r,r={}),1===arguments.length&&(r={}),"string"!=typeof r.path&&(r.path="/"+t),n){var i=new e(t);n.call(i),this.push(r.path,t,i.generate())}else this.push(r.path,t)},push:function(e,t,r){var n=t.split(".");(""===e||"/"===e||"index"===n[n.length-1])&&(this.explicitIndex=!0),this.matches.push([e,t,r])},route:function(e,t){t=t||{},"string"!=typeof t.path&&(t.path="/"+e),this.parent&&"application"!==this.parent&&(e=this.parent+"."+e),this.push(t.path,e)},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var r=0,n=e.length;n>r;r++){var i=e[r];t(i[0]).to(i[1],i[2])}}}},e.map=function(t){var r=new e;return t.call(r),r},Ember.RouterDSL=e}(),function(){var e=Ember.get;Ember.controllerFor=function(e,t,r){return e.lookup("controller:"+t,r)},Ember.generateController=function(t,r,n){var i,o,s,a,u;return u=n&&Ember.isArray(n)?"array":n?"object":"basic",a="controller:"+u,i=t.lookupFactory(a).extend({isGenerated:!0,toString:function(){return"(generated "+r+" controller)"}}),o="controller:"+r,t.register(o,i),s=t.lookup(o),e(s,"namespace.LOG_ACTIVE_GENERATION")&&Ember.Logger.info("generated -> "+o,{fullName:o}),s}}(),function(){function e(e,t,r){var n=r.shift();if(!e){if(t)return;throw new Ember.Error("Could not trigger event '"+n+"'. There are no active handlers")}for(var i=!1,o=e.length-1;o>=0;o--){var s=e[o],a=s.handler;if(a._actions&&a._actions[n]){if(a._actions[n].apply(a,r)!==!0)return;i=!0}else if(a.events&&a.events[n]){if(a.events[n].apply(a,r)!==!0)return;i=!0}}if(!i&&!t)throw new Ember.Error("Nothing handled the event '"+n+"'.")}var r=t("router"),n=Ember.get,i=Ember.set,o=Ember.defineProperty,s=Ember._MetamorphView;Ember.Router=Ember.Object.extend({location:"hash",init:function(){this.router=this.constructor.router||this.constructor.map(Ember.K),this._activeViews={},this._setupLocation()},url:Ember.computed(function(){return n(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=n(this,"location"),r=this.container,i=this;this._setupRouter(e,t),r.register("view:default",s),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){i.handleURL(e)}),this.handleURL(t.getURL())},didTransition:function(e){var t=this.container.lookup("controller:application"),r=Ember.Router._routePath(e);"currentPath"in t||o(t,"currentPath"),i(t,"currentPath",r),"currentRouteName"in t||o(t,"currentRouteName"),i(t,"currentRouteName",e[e.length-1].name),this.notifyPropertyChange("url"),n(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+r+"'")},handleURL:function(e){return this._doTransition("handleURL",[e])},transitionTo:function(){return this._doTransition("transitionTo",arguments)},replaceWith:function(){return this._doTransition("replaceWith",arguments)},generate:function(){var e=this.router.generate.apply(this.router,arguments);return this.location.formatURL(e)},isActive:function(){var e=this.router;return e.isActive.apply(e,arguments)},send:function(){this.router.trigger.apply(this.router,arguments)},hasRoute:function(e){return this.router.hasRoute(e)},reset:function(){this.router.reset()},_lookupActiveView:function(e){var t=this._activeViews[e];return t&&t[0]},_connectActiveView:function(e,t){var r=this._activeViews[e];r&&r[0].off("willDestroyElement",this,r[1]);var n=function(){delete this._activeViews[e]};this._activeViews[e]=[t,n],t.one("willDestroyElement",this,n)},_setupLocation:function(){var e=n(this,"location"),t=n(this,"rootURL"),r={};"string"==typeof t&&(r.rootURL=t),"string"==typeof e&&(r.implementation=e,e=i(this,"location",Ember.Location.create(r)))},_getHandlerFunction:function(){var e={},t=this.container,r=t.lookupFactory("route:basic"),i=this;return function(o){var s="route:"+o,a=t.lookup(s);if(e[o])return a;if(e[o]=!0,!a){if("loading"===o)return{};t.register(s,r.extend()),a=t.lookup(s),n(i,"namespace.LOG_ACTIVE_GENERATION")&&Ember.Logger.info("generated -> "+s,{fullName:s})}if("application"===o){var u=a._actions||a.events;u||(u=a._actions={}),u.error=u.error||Ember.Router._defaultErrorHandler}return a.routeName=o,a}},_setupRouter:function(e,t){var r,n=this;e.getHandler=this._getHandlerFunction();var i=function(){t.setURL(r)};if(e.updateURL=function(e){r=e,Ember.run.once(i)},t.replaceURL){var o=function(){t.replaceURL(r)};e.replaceURL=function(e){r=e,Ember.run.once(o)}}e.didTransition=function(e){n.didTransition(e)}},_doTransition:function(e,t){t=[].slice.call(t),t[0]=t[0]||"/";var r,n=t[0],i=this;r="/"===n.charAt(0)?n:this.router.hasRoute(n)?n:t[0]=n+".index";var o=this.router[e].apply(this.router,t);return this.router.activeTransition&&this._scheduleLoadingStateEntry(),o.then(function(e){i._transitionCompleted(e)},function(e){"UnrecognizedURLError"===e.name}),o},_scheduleLoadingStateEntry:function(){this._loadingStateActive||(this._shouldEnterLoadingState=!0,Ember.run.scheduleOnce("routerTransitions",this,this._enterLoadingState))},_enterLoadingState:function(){if(!this._loadingStateActive&&this._shouldEnterLoadingState){var e=this.router.getHandler("loading");e&&(e.enter&&e.enter(),e.setup&&e.setup(),this._loadingStateActive=!0)}},_exitLoadingState:function(){if(this._shouldEnterLoadingState=!1,this._loadingStateActive){var e=this.router.getHandler("loading");e&&e.exit&&e.exit(),this._loadingStateActive=!1}},_transitionCompleted:function(){this.notifyPropertyChange("url"),this._exitLoadingState()}}),Ember.Router.reopenClass({router:null,map:function(t){var i=this.router;i||(i=new r,i.callbacks=[],i.triggerEvent=e,this.reopenClass({router:i})),n(this,"namespace.LOG_TRANSITIONS_INTERNAL")&&(i.log=Ember.Logger.debug);var o=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){for(var e=0;e<i.callbacks.length;e++)i.callbacks[e].call(this);t.call(this)})});return i.callbacks.push(t),i.map(o.generate()),i},_defaultErrorHandler:function(e){Ember.Logger.error("Error while loading route:",e),setTimeout(function(){throw e})},_routePath:function(e){for(var t=[],r=1,n=e.length;n>r;r++){var i=e[r].name,o=i.split(".");t.push(o[o.length-1])}return t.join(".")}})}(),function(){function e(e){var t=e.router.router.targetHandlerInfos;if(t)for(var r,n,i=0,o=t.length;o>i;i++){if(n=t[i].handler,n===e)return r;r=n}}function t(r){var n,i=e(r);if(i)return(n=i.lastRenderedTemplate)?n:t(i)}function r(e,r,n,i){i=i||{},i.into=i.into?i.into.replace(/\//g,"."):t(e),i.outlet=i.outlet||"main",i.name=r,i.template=n,i.LOG_VIEW_LOOKUPS=a(e.router,"namespace.LOG_VIEW_LOOKUPS");var o,s=i.controller;return s=i.controller?i.controller:(o=e.container.lookup("controller:"+r))?o:e.controllerName||e.routeName,"string"==typeof s&&(s=e.container.lookup("controller:"+s)),i.controller=s,i}function n(e,t,r){if(e)r.LOG_VIEW_LOOKUPS&&Ember.Logger.info("Rendering "+r.name+" with "+e,{fullName:"view:"+r.name});else{var n=r.into?"view:default":"view:toplevel";e=t.lookup(n),r.LOG_VIEW_LOOKUPS&&Ember.Logger.info("Rendering "+r.name+" with default view "+e,{fullName:"view:"+r.name})}return a(e,"templateName")||(u(e,"template",r.template),u(e,"_debugTemplateName",r.name)),u(e,"renderedName",r.name),u(e,"controller",r.controller),e}function i(e,t,r){if(r.into){var n=e.router._lookupActiveView(r.into),i=s(n,r.outlet);e.teardownOutletViews||(e.teardownOutletViews=[]),h(e.teardownOutletViews,0,0,[i]),n.connectOutlet(r.outlet,t)}else{var u=a(e,"router.namespace.rootElement");e.teardownTopLevelView&&e.teardownTopLevelView(),e.router._connectActiveView(r.name,t),e.teardownTopLevelView=o(t),t.appendTo(u)}}function o(e){return function(){e.destroy()}}function s(e,t){return function(){e.disconnectOutlet(t)}}var a=Ember.get,u=Ember.set,c=Ember.getProperties,l=(Ember.String.classify,Ember.String.fmt,Ember.EnumerableUtils.forEach),h=Ember.EnumerableUtils.replace;Ember.Route=Ember.Object.extend(Ember.ActionHandler,{exit:function(){this.deactivate(),this.teardownViews()},enter:function(){this.activate()},actions:null,events:null,mergedProperties:["events"],deactivate:Ember.K,activate:Ember.K,transitionTo:function(){var e=this.router;return e.transitionTo.apply(e,arguments)},replaceWith:function(){return this.router,this.router.replaceWith.apply(this.router,arguments)},send:function(){return this.router.send.apply(this.router,arguments)},setup:function(e){var t=this.controllerName||this.routeName,r=this.controllerFor(t,!0);r||(r=this.generateController(t,e)),this.controller=r,this.setupControllers?this.setupControllers(r,e):this.setupController(r,e),this.renderTemplates?this.renderTemplates(e):this.renderTemplate(r,e)},redirect:Ember.K,beforeModel:Ember.K,afterModel:function(e,t){this.redirect(e,t)},contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,r,n,i;for(var o in e)(t=o.match(/^(.*)_id$/))&&(r=t[1],i=e[o]),n=!0;if(!r&&n)return e;if(r)return this.findModel(r,i)},findModel:function(){var e=a(this,"store");return e.find.apply(e,arguments)},store:Ember.computed(function(){var e=this.container;return this.routeName,a(this,"router.namespace"),{find:function(t,r){var n=e.lookupFactory("model:"+t);return n.find(r)}}}),serialize:function(e,t){if(!(t.length<1)){var r=t[0],n={};return/_id$/.test(r)&&1===t.length?n[r]=a(e,"id"):n=c(e,t),n}},setupController:function(e,t){e&&void 0!==t&&u(e,"model",t)},controllerFor:function(e){var t,r=this.container,n=r.lookup("route:"+e);return n&&n.controllerName&&(e=n.controllerName),t=r.lookup("controller:"+e)},generateController:function(e,t){var r=this.container;return t=t||this.modelFor(e),Ember.generateController(r,e,t)},modelFor:function(e){var t=this.container.lookup("route:"+e),r=this.router.router.activeTransition;if(r){var n=t&&t.routeName||e;if(r.resolvedModels.hasOwnProperty(n))return r.resolvedModels[n]}return t&&t.currentModel},renderTemplate:function(){this.render()},render:function(e,t){"object"!=typeof e||t||(t=e,e=this.routeName),t=t||{},e=e?e.replace(/\//g,"."):this.routeName;var o=t.view||this.viewName||e,s=this.templateName||e,u=this.container,c=u.lookup("view:"+o),l=c?c.get("template"):null;return l||(l=u.lookup("template:"+s)),c||l?(t=r(this,e,l,t),c=n(c,u,t),"main"===t.outlet&&(this.lastRenderedTemplate=e),i(this,c,t),void 0):(a(this.router,"namespace.LOG_VIEW_LOOKUPS")&&Ember.Logger.info('Could not find "'+e+'" template or view. Nothing will be rendered',{fullName:"template:"+e}),void 0)},disconnectOutlet:function(e){e=e||{},e.parentView=e.parentView?e.parentView.replace(/\//g,"."):t(this),e.outlet=e.outlet||"main";var r=this.router._lookupActiveView(e.parentView);r.disconnectOutlet(e.outlet)},willDestroy:function(){this.teardownViews()},teardownViews:function(){this.teardownTopLevelView&&this.teardownTopLevelView();var e=this.teardownOutletViews||[];l(e,function(e){e()}),delete this.teardownTopLevelView,delete this.teardownOutletViews,delete this.lastRenderedTemplate}})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r,i){return n.call(t(e,r,i),function(t,n){return null===t?r[n]:o(e,t,i)})}function t(e,t,o){function s(e,t){return"controller"===t?t:Ember.ControllerMixin.detect(e)?s(i(e,"model"),t?t+".model":"model"):t}var a=r(e,t,o),u=o.types;return n.call(a,function(e,r){return"ID"===u[r]?s(e,t[r]):null})}var r=Ember.Handlebars.resolveParams,n=Ember.ArrayPolyfills.map,i=Ember.get,o=Ember.Handlebars.get;Ember.Router.resolveParams=e,Ember.Router.resolvePaths=t})}(),function(){var e=Ember.get;Ember.set,Ember.String.fmt,Ember.onLoad("Ember.Handlebars",function(){function t(e,t){return e.hasRoute(t)||(t+=".index"),t}function r(e){var t=e.options.types,r=e.options.data;return i(e.context,e.params,{types:t,data:r})}var n=Ember.Router.resolveParams,i=Ember.Router.resolvePaths,o=Ember.ViewUtils.isSimpleClick,s=Ember.LinkView=Ember.View.extend({tagName:"a",currentWhen:null,title:null,rel:null,activeClass:"active",loadingClass:"loading",disabledClass:"disabled",_isDisabled:!1,replace:!1,attributeBindings:["href","title","rel"],classNameBindings:["active","loading","disabled"],eventName:"click",init:function(){this._super.apply(this,arguments);var t=e(this,"eventName");this.on(t,this,this._invoke);var n,i,o=this.parameters,s=o.context,a=r(o),u=a.length;for(i=0;u>i;i++)if(n=a[i],null!==n){var c=Ember.Handlebars.normalizePath(s,n,o.options.data);this.registerObserver(c.root,c.path,this,this._paramsChanged)}},_paramsChanged:function(){this.notifyPropertyChange("resolvedParams")},concreteView:Ember.computed(function(){return e(this,"parentView")}).property("parentView"),disabled:Ember.computed(function(t,r){return void 0!==r&&this.set("_isDisabled",r),r?e(this,"disabledClass"):!1}),active:Ember.computed(function(){if(e(this,"loading"))return!1;var t=e(this,"router"),r=e(this,"routeArgs"),n=r.slice(1),i=e(this,"resolvedParams"),o=this.currentWhen||i[0],s=o+".index",a=t.isActive.apply(t,[o].concat(n))||t.isActive.apply(t,[s].concat(n));return a?e(this,"activeClass"):void 0}).property("resolvedParams","routeArgs","router.url"),loading:Ember.computed(function(){return e(this,"routeArgs")?void 0:e(this,"loadingClass")}).property("routeArgs"),router:Ember.computed(function(){return e(this,"controller").container.lookup("router:main")}),_invoke:function(t){if(!o(t))return!0;if(t.preventDefault(),this.bubbles===!1&&t.stopPropagation(),e(this,"_isDisabled"))return!1;if(e(this,"loading"))return Ember.Logger.warn("This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid."),!1;var r=e(this,"router"),n=e(this,"routeArgs");e(this,"replace")?r.replaceWith.apply(r,n):r.transitionTo.apply(r,n)},resolvedParams:Ember.computed(function(){var e=this.parameters,t=e.options,r=t.types,i=t.data;return n(e.context,e.params,{types:r,data:i})}).property(),routeArgs:Ember.computed(function(){var r=e(this,"resolvedParams").slice(0),n=e(this,"router"),i=r[0];if(i){i=t(n,i),r[0]=i;for(var o=1,s=r.length;s>o;++o){var a=r[o];if(null===a||"undefined"==typeof a)return}return r}}).property("resolvedParams"),href:Ember.computed(function(){if("a"===e(this,"tagName")){var t=e(this,"router"),r=e(this,"routeArgs");return r?t.generate.apply(t,r):e(this,"loadingHref")}}).property("routeArgs"),loadingHref:"#"});s.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("link-to",function(){var e=[].slice.call(arguments,-1)[0],t=[].slice.call(arguments,0,-1),r=e.hash;
|
20
|
+
return r.disabledBinding=r.disabledWhen,r.parameters={context:this,options:e,params:t},Ember.Handlebars.helpers.view.call(this,s,e)}),Ember.Handlebars.registerHelper("linkTo",Ember.Handlebars.helpers["link-to"])})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(e){e.OutletView=Ember.ContainerView.extend(Ember._Metamorph),e.registerHelper("outlet",function(t,r){var n,i;for(t&&t.data&&t.data.isRenderData&&(r=t,t="main"),n=r.data.view;!n.get("template.isTop");)n=n.get("_parentView");return i=r.hash.viewClass||e.OutletView,r.data.view.set("outletSource",n),r.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,i,r)})})}(),function(){Ember.get,Ember.set,Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,r){var n,i,o,s,a,u,c=3===arguments.length;2===arguments.length&&(r=t,t=void 0),"string"==typeof t&&(a=Ember.Handlebars.get(r.contexts[1],t,r),u={singleton:!1}),e=e.replace(/\//g,"."),n=r.data.keywords.controller.container,i=n.lookup("router:main"),s=n.lookup("view:"+e)||n.lookup("view:default");var l=r.hash.controller;o=l?n.lookup("controller:"+l,u):n.lookup("controller:"+e,u)||Ember.generateController(n,e,a),o&&c&&o.set("model",a);var h=r.contexts[1];h&&s.registerObserver(h,t,function(){o.set("model",Ember.Handlebars.get(h,t,r))}),o.set("target",r.data.keywords.controller),r.hash.viewName=Ember.String.camelize(e),r.hash.template=n.lookup("template:"+e),r.hash.controller=o,i&&!a&&i._connectActiveView(e,s),Ember.Handlebars.helpers.view.call(this,s,r)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r){var n=[];r&&n.push(r);var i=e.options.types.slice(1),o=e.options.data;return n.concat(t(e.context,e.params,{types:i,data:o}))}var t=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,n=Ember.Handlebars,i=n.get,o=n.SafeString,s=Ember.ArrayPolyfills.forEach,a=(Ember.get,Array.prototype.slice),u=n.ActionHelper={registeredActions:{}},c=["alt","shift","meta","ctrl"],l=function(e,t){if("undefined"==typeof t)return r(e);if(t.indexOf("any")>=0)return!0;var n=!0;return s.call(c,function(r){e[r+"Key"]&&-1===t.indexOf(r)&&(n=!1)}),n};u.registerAction=function(t,r,n){var o=(++Ember.uuid).toString();return u.registeredActions[o]={eventName:r.eventName,handler:function(o){if(!l(o,n))return!0;o.preventDefault(),r.bubbles===!1&&o.stopPropagation();var s=r.target;s=s.target?i(s.root,s.target,s.options):s.root,Ember.run(function(){s.send?s.send.apply(s,e(r.parameters,t)):s[t].apply(s,e(r.parameters))})}},r.view.on("willClearRender",function(){delete u.registeredActions[o]}),o},n.registerHelper("action",function(e){var t,r=arguments[arguments.length-1],n=a.call(arguments,1,-1),i=r.hash,s={eventName:i.on||"click"};s.parameters={context:this,options:r,params:n},s.view=r.data.view;var c,l;i.target?(c=this,l=i.target):(t=r.data.keywords.controller)&&(c=t),s.target={root:c,target:l,options:r},s.bubbles=i.bubbles;var h=u.registerAction(e,s,i.allowedKeys);return new o('data-ember-action="'+h+'"')})})}(),function(){if(Ember.ENV.EXPERIMENTAL_CONTROL_HELPER){var e=Ember.get,t=Ember.set;Ember.Handlebars.registerHelper("control",function(r,n,i){function o(){var e=Ember.Handlebars.get(this,n,i);t(p,"model",e),f.rerender()}2===arguments.length&&(i=n,n=void 0);var s;n&&(s=Ember.Handlebars.get(this,n,i));var a,u,c=i.data.keywords.controller,l=(i.data.keywords.view,e(c,"_childContainers")),h=i.hash.controlID;l.hasOwnProperty(h)?u=l[h]:(a=e(c,"container"),u=a.child(),l[h]=u);var m=r.replace(/\//g,"."),f=u.lookup("view:"+m)||u.lookup("view:default"),p=u.lookup("controller:"+m),d=u.lookup("template:"+r);t(p,"target",c),t(p,"model",s),i.hash.template=d,i.hash.controller=p,n&&(Ember.addObserver(this,n,o),f.one("willDestroyElement",this,function(){Ember.removeObserver(this,n,o)})),Ember.Handlebars.helpers.view.call(this,f,i)})}}(),function(){var e=Ember.get;Ember.set,Ember.ControllerMixin.reopen({transitionToRoute:function(){var t=e(this,"target"),r=t.transitionToRoute||t.transitionTo;return r.apply(t,arguments)},transitionTo:function(){return this.transitionToRoute.apply(this,arguments)},replaceRoute:function(){var t=e(this,"target"),r=t.replaceRoute||t.replaceWith;return r.apply(t,arguments)},replaceWith:function(){return this.replaceRoute.apply(this,arguments)}})}(),function(){var e=Ember.get,t=Ember.set;Ember.View.reopen({init:function(){t(this,"_outlets",{}),this._super()},connectOutlet:function(r,n){if(this._pendingDisconnections&&delete this._pendingDisconnections[r],this._hasEquivalentView(r,n))return n.destroy(),void 0;var i=e(this,"_outlets"),o=e(this,"container"),s=o&&o.lookup("router:main"),a=e(n,"renderedName");t(i,r,n),s&&a&&s._connectActiveView(a,n)},_hasEquivalentView:function(t,r){var n=e(this,"_outlets."+t);return n&&n.constructor===r.constructor&&n.get("template")===r.get("template")&&n.get("context")===r.get("context")},disconnectOutlet:function(e){this._pendingDisconnections||(this._pendingDisconnections={}),this._pendingDisconnections[e]=!0,Ember.run.once(this,"_finishDisconnections")},_finishDisconnections:function(){var r=e(this,"_outlets"),n=this._pendingDisconnections;this._pendingDisconnections=null;for(var i in n)t(r,i,null)}})}(),function(){var e=Ember.run.queues,t=Ember.ArrayPolyfills.indexOf;e.splice(t.call(e,"actions")+1,0,"routerTransitions")}(),function(){Ember.get,Ember.set,Ember.Location={create:function(e){var t=e&&e.implementation,r=this.implementations[t];return r.create.apply(r,arguments)},registerImplementation:function(e,t){this.implementations[e]=t},implementations:{}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({path:"",getURL:function(){return e(this,"path")},setURL:function(e){t(this,"path",e)},onUpdateURL:function(e){this.updateCallback=e},handleURL:function(e){t(this,"path",e),this.updateCallback(e)},formatURL:function(e){return e}}),Ember.Location.registerImplementation("none",Ember.NoneLocation)}(),function(){var e=Ember.get,t=Ember.set;Ember.HashLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return e(this,"location").hash.substr(1)},setURL:function(r){e(this,"location").hash=r,t(this,"lastSetURL",r)},replaceURL:function(t){e(this,"location").replace("#"+t)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=location.hash.substr(1);e(n,"lastSetURL")!==i&&(t(n,"lastSetURL",null),r(i))})})},formatURL:function(e){return"#"+e},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("hashchange.ember-location-"+e)}}),Ember.Location.registerImplementation("hash",Ember.HashLocation)}(),function(){var e=Ember.get,t=Ember.set,r=!1,n=window.history&&"state"in window.history;Ember.HistoryLocation=Ember.Object.extend({init:function(){t(this,"location",e(this,"location")||window.location),this.initState()},initState:function(){t(this,"history",e(this,"history")||window.history),this.replaceState(this.formatURL(this.getURL()))},rootURL:"/",getURL:function(){var t=e(this,"rootURL"),r=e(this,"location").pathname;return t=t.replace(/\/$/,""),r=r.replace(t,"")},setURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.pushState(e)},replaceURL:function(e){var t=this.getState();e=this.formatURL(e),t&&t.path!==e&&this.replaceState(e)},getState:function(){return n?e(this,"history").state:this._historyState},pushState:function(t){var r={path:t};e(this,"history").pushState(r,null,t),n||(this._historyState=r),this._previousURL=this.getURL()},replaceState:function(t){var r={path:t};e(this,"history").replaceState(r,null,t),n||(this._historyState=r),this._previousURL=this.getURL()},onUpdateURL:function(e){var t=Ember.guidFor(this),n=this;Ember.$(window).on("popstate.ember-location-"+t,function(){(r||(r=!0,n.getURL()!==n._previousURL))&&e(n.getURL())})},formatURL:function(t){var r=e(this,"rootURL");return""!==t&&(r=r.replace(/\/$/,"")),r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("popstate.ember-location-"+e)}}),Ember.Location.registerImplementation("history",Ember.HistoryLocation)}(),function(){function e(t,r,n,i){var o,s=t.name,a=t.incoming,u=t.incomingNames,c=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(s)){for(i.push(s),n[s]=!0,o=0;c>o;o++)e(a[u[o]],r,n,i);r(t,i),i.pop()}}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(e){if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t}},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,r){function n(e,t){if(e.name===r)throw new Ember.Error("cycle detected: "+r+" <- "+t.join(" <- "))}if(t&&r&&t!==r){var i=this.add(t),o=this.add(r);o.incoming.hasOwnProperty(t)||(e(i,n),i.hasOutgoing=!0,o.incoming[t]=i,o.incomingNames.push(t))}},t.prototype.topsort=function(t){var r,n,i={},o=this.vertices,s=this.names,a=s.length;for(r=0;a>r;r++)n=o[s[r]],n.hasOutgoing||e(n,t,i)},t.prototype.addEdges=function(e,t,r,n){var i;if(this.map(e,t),r)if("string"==typeof r)this.addEdge(e,r);else for(i=0;i<r.length;i++)this.addEdge(e,r[i]);if(n)if("string"==typeof n)this.addEdge(n,e);else for(i=0;i<n.length;i++)this.addEdge(n[i],e)},Ember.DAG=t}(),function(){var e=Ember.get,t=Ember.String.classify,r=Ember.String.capitalize,n=Ember.String.decamelize;Ember.DefaultResolver=Ember.Object.extend({namespace:null,normalize:function(e){var t=e.split(":",2),r=t[0],n=t[1];if("template"!==r){var i=n;return i.indexOf(".")>-1&&(i=i.replace(/\.(.)/g,function(e){return e.charAt(1).toUpperCase()})),n.indexOf("_")>-1&&(i=i.replace(/_(.)/g,function(e){return e.charAt(1).toUpperCase()})),r+":"+i}return e},resolve:function(e){var t=this.parseName(e),r=this[t.resolveMethodName];if(!t.name||!t.type)throw new TypeError("Invalid fullName: `"+e+"`, must of of the form `type:name` ");if(r){var n=r.call(this,t);if(n)return n}return this.resolveOther(t)},parseName:function(n){var i=n.split(":"),o=i[0],s=i[1],a=s,u=e(this,"namespace"),c=u;if("template"!==o&&-1!==a.indexOf("/")){var l=a.split("/");a=l[l.length-1];var h=r(l.slice(0,-1).join("."));c=Ember.Namespace.byName(h)}return{fullName:n,type:o,fullNameWithoutType:s,name:a,root:c,resolveMethodName:"resolve"+t(o)}},resolveTemplate:function(e){var t=e.fullNameWithoutType.replace(/\./g,"/");return Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:(t=n(t),Ember.TEMPLATES[t]?Ember.TEMPLATES[t]:void 0)},useRouterNaming:function(e){e.name=e.name.replace(/\./g,"_"),"basic"===e.name&&(e.name="")},resolveController:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveRoute:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveView:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveModel:function(r){var n=t(r.name),i=e(r.root,n);return i?i:void 0},resolveOther:function(r){var n=t(r.name)+t(r.type),i=e(r.root,n);return i?i:void 0},lookupDescription:function(e){var r=this.parseName(e);if("template"===r.type)return"template at "+r.fullNameWithoutType.replace(/\./g,"/");var n=r.root+"."+t(r.name);return"model"!==r.type&&(n+=t(r.type)),n},makeToString:function(e){return e.toString()}})}(),function(){function e(e){this._container=e}function t(e){function t(e){return n.resolve(e)}e.get("resolver");var r=e.get("resolver")||e.get("Resolver")||Ember.DefaultResolver,n=r.create({namespace:e});return t.describe=function(e){return n.lookupDescription(e)},t.makeToString=function(e,t){return n.makeToString(e,t)},t.normalize=function(e){return n.normalize?n.normalize(e):e},t}var r=Ember.get,n=Ember.set;e.deprecate=function(e){return function(){var t=this._container;return t[e].apply(t,arguments)}},e.prototype={_container:null,lookup:e.deprecate("lookup"),resolve:e.deprecate("resolve"),register:e.deprecate("register")};var i=Ember.Application=Ember.Namespace.extend(Ember.DeferredMixin,{rootElement:"body",eventDispatcher:null,customEvents:null,_readinessDeferrals:1,init:function(){if(this.$||(this.$=Ember.$),this.__container__=this.buildContainer(),this.Router=this.Router||this.defaultRouter(),this.Router&&(this.Router.namespace=this),this._super(),this.scheduleInitialize(),Ember.libraries.registerCoreLibrary("Handlebars",Ember.Handlebars.VERSION),Ember.libraries.registerCoreLibrary("jQuery",Ember.$().jquery),Ember.LOG_VERSION){Ember.LOG_VERSION=!1;var e=Math.max.apply(this,Ember.A(Ember.libraries).mapBy("name.length"));Ember.libraries.each(function(t){new Array(e-t.length+1).join(" ")})}},buildContainer:function(){var e=this.__container__=i.buildContainer(this);return e},defaultRouter:function(){return void 0===this.router?Ember.Router.extend():void 0},scheduleInitialize:function(){var e=this;!this.$||this.$.isReady?Ember.run.schedule("actions",e,"_initialize"):this.$().ready(function(){Ember.run(e,"_initialize")})},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,0===this._readinessDeferrals&&Ember.run.once(this,this.didBecomeReady)},register:function(){var e=this.__container__;e.register.apply(e,arguments)},inject:function(){var e=this.__container__;e.injection.apply(e,arguments)},initialize:function(){},_initialize:function(){return this.isDestroyed?void 0:(this.Router&&this.register("router:main",this.Router),this.runInitializers(),Ember.runLoadHooks("application",this),this.advanceReadiness(),this)},reset:function(){function e(){var e=this.__container__.lookup("router:main");e.reset(),Ember.run(this.__container__,"destroy"),this.buildContainer(),Ember.run.schedule("actions",this,function(){this._initialize()})}this._readinessDeferrals=1,Ember.run.join(this,e)},runInitializers:function(){var e,t,n=r(this.constructor,"initializers"),i=this.__container__,o=new Ember.DAG,s=this;for(e=0;e<n.length;e++)t=n[e],o.addEdges(t.name,t.initialize,t.before,t.after);o.topsort(function(e){var t=e.value;t(i,s)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=r(this,"customEvents"),t=r(this,"rootElement"),i=this.__container__.lookup("event_dispatcher:main");n(this,"eventDispatcher",i),i.setup(e,t)},startRouting:function(){var e=this.__container__.lookup("router:main");e&&e.startRouting()},handleURL:function(e){var t=this.__container__.lookup("router:main");t.handleURL(e)},ready:Ember.K,resolver:null,Resolver:null,willDestroy:function(){Ember.BOOTED=!1,this.__container__.destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({concatenatedProperties:["initializers"],initializers:Ember.A(),initializer:function(e){var t=r(this,"initializers");t.push(e)},buildContainer:function(r){var n=new Ember.Container;return Ember.Container.defaultContainer=new e(n),n.set=Ember.set,n.resolver=t(r),n.normalize=n.resolver.normalize,n.describe=n.resolver.describe,n.makeToString=n.resolver.makeToString,n.optionsForType("component",{singleton:!1}),n.optionsForType("view",{singleton:!1}),n.optionsForType("template",{instantiate:!1}),n.register("application:main",r,{instantiate:!1}),n.register("controller:basic",Ember.Controller,{instantiate:!1}),n.register("controller:object",Ember.ObjectController,{instantiate:!1}),n.register("controller:array",Ember.ArrayController,{instantiate:!1}),n.register("route:basic",Ember.Route,{instantiate:!1}),n.register("event_dispatcher:main",Ember.EventDispatcher),n.injection("router:main","namespace","application:main"),n.injection("controller","target","router:main"),n.injection("controller","namespace","application:main"),n.injection("route","router","router:main"),n}}),Ember.runLoadHooks("Ember.Application",Ember.Application)}(),function(){function e(e,t,r){var n,i,o;for(i=0,o=r.length;o>i;i++)n=r[i],-1===n.indexOf(":")&&(n="controller:"+n),!t.has(n)}var t=Ember.get;Ember.set,Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){var r=t(this,"needs"),n=t(r,"length");n>0&&(e(this,this.container,r),t(this,"controllers")),this._super.apply(this,arguments)},controllerFor:function(e){return Ember.controllerFor(t(this,"container"),e)},controllers:Ember.computed(function(){var e=this;return{needs:t(e,"needs"),container:t(e,"container"),unknownProperty:function(t){var r,n,i,o=this.needs;for(n=0,i=o.length;i>n;n++)if(r=o[n],r===t)return this.container.lookup("controller:"+t);var s=Ember.inspect(e)+"#needs does not include `"+t+"`. To access the "+t+" controller from "+Ember.inspect(e)+", "+Ember.inspect(e)+" should have a `needs` property that is an array of the controllers it has access to.";throw new ReferenceError(s)}}}).readOnly()})}(),function(){Ember.DataAdapter=Ember.Object.extend({init:function(){this._super(),this.releaseMethods=Ember.A()},container:null,attributeLimit:3,releaseMethods:Ember.A(),getFilters:function(){return Ember.A()},watchModelTypes:function(e,t){var r,n=this.getModelTypes(),i=this,o=Ember.A();r=n.map(function(e){var r=i.wrapModelType(e);return o.push(i.observeModelType(e,t)),r}),e(r);var s=function(){o.forEach(function(e){e()}),i.releaseMethods.removeObject(s)};return this.releaseMethods.pushObject(s),s},watchRecords:function(e,t,r,n){var i,o=this,s=Ember.A(),a=this.getRecords(e),u=function(e){r([e])},c=a.map(function(e){return s.push(o.observeRecord(e,u)),o.wrapRecord(e)}),l=function(e,r,i,a){for(var c=r;r+a>c;c++){var l=e.objectAt(c),h=o.wrapRecord(l);s.push(o.observeRecord(l,u)),t([h])}i&&n(r,i)},h={didChange:l,willChange:Ember.K};return a.addArrayObserver(o,h),i=function(){s.forEach(function(e){e()}),a.removeArrayObserver(o,h),o.releaseMethods.removeObject(i)},t(c),this.releaseMethods.pushObject(i),i},willDestroy:function(){this._super(),this.releaseMethods.forEach(function(e){e()})},detect:function(){return!1},columnsForType:function(){return Ember.A()},observeModelType:function(e,t){var r=this,n=this.getRecords(e),i=function(){t([r.wrapModelType(e)])},o={didChange:function(){Ember.run.scheduleOnce("actions",this,i)},willChange:Ember.K};n.addArrayObserver(this,o);var s=function(){n.removeArrayObserver(r,o)};return s},wrapModelType:function(e){var t,r=this.getRecords(e);return t={name:e.toString(),count:Ember.get(r,"length"),columns:this.columnsForType(e),object:e}},getModelTypes:function(){var e=Ember.A(Ember.Namespace.NAMESPACES),t=Ember.A(),r=this;return e.forEach(function(e){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];r.detect(i)&&t.push(i)}}),t},getRecords:function(){return Ember.A()},wrapRecord:function(e){var t={object:e};return t.columnValues=this.getRecordColumnValues(e),t.searchKeywords=this.getRecordKeywords(e),t.filterValues=this.getRecordFilterValues(e),t.color=this.getRecordColor(e),t},getRecordColumnValues:function(){return{}},getRecordKeywords:function(){return Ember.A()},getRecordFilterValues:function(){return{}},getRecordColor:function(){return null},observeRecord:function(){return function(){}}})}()}(),"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.prod.js
CHANGED
@@ -61,7 +61,7 @@ var define, requireModule;
|
|
61
61
|
|
62
62
|
@class Ember
|
63
63
|
@static
|
64
|
-
@version 1.0
|
64
|
+
@version 1.1.0
|
65
65
|
*/
|
66
66
|
|
67
67
|
if ('undefined' === typeof Ember) {
|
@@ -88,10 +88,10 @@ Ember.toString = function() { return "Ember"; };
|
|
88
88
|
/**
|
89
89
|
@property VERSION
|
90
90
|
@type String
|
91
|
-
@default '1.0
|
91
|
+
@default '1.1.0'
|
92
92
|
@final
|
93
93
|
*/
|
94
|
-
Ember.VERSION = '1.0
|
94
|
+
Ember.VERSION = '1.1.0';
|
95
95
|
|
96
96
|
/**
|
97
97
|
Standard environmental variables. You can define these in a global `ENV`
|
@@ -116,6 +116,27 @@ Ember.ENV = Ember.ENV || ENV;
|
|
116
116
|
|
117
117
|
Ember.config = Ember.config || {};
|
118
118
|
|
119
|
+
/**
|
120
|
+
Hash of enabled Canary features. Add to before creating your application.
|
121
|
+
|
122
|
+
@property FEATURES
|
123
|
+
@type Hash
|
124
|
+
*/
|
125
|
+
|
126
|
+
Ember.FEATURES = {};
|
127
|
+
|
128
|
+
/**
|
129
|
+
Test that a feature is enabled. Parsed by Ember's build tools to leave
|
130
|
+
experimental features out of beta/stable builds.
|
131
|
+
|
132
|
+
@method isEnabled
|
133
|
+
@param {string} feature
|
134
|
+
*/
|
135
|
+
|
136
|
+
Ember.FEATURES.isEnabled = function(feature) {
|
137
|
+
return Ember.FEATURES[feature];
|
138
|
+
};
|
139
|
+
|
119
140
|
// ..........................................................
|
120
141
|
// BOOTSTRAP
|
121
142
|
//
|
@@ -326,7 +347,7 @@ Ember.Logger = {
|
|
326
347
|
|
327
348
|
@method assert
|
328
349
|
@for Ember.Logger
|
329
|
-
@param
|
350
|
+
@param {Boolean} bool Value to test
|
330
351
|
*/
|
331
352
|
assert: consoleMethod('assert') || assertPolyfill
|
332
353
|
};
|
@@ -2074,6 +2095,7 @@ function suspendListeners(obj, eventNames, target, method, callback) {
|
|
2074
2095
|
}
|
2075
2096
|
|
2076
2097
|
var suspendedActions = [],
|
2098
|
+
actionsList = [],
|
2077
2099
|
eventName, actions, i, l;
|
2078
2100
|
|
2079
2101
|
for (i=0, l=eventNames.length; i<l; i++) {
|
@@ -2084,6 +2106,7 @@ function suspendListeners(obj, eventNames, target, method, callback) {
|
|
2084
2106
|
if (actionIndex !== -1) {
|
2085
2107
|
actions[actionIndex+2] |= SUSPENDED;
|
2086
2108
|
suspendedActions.push(actionIndex);
|
2109
|
+
actionsList.push(actions);
|
2087
2110
|
}
|
2088
2111
|
}
|
2089
2112
|
|
@@ -2092,7 +2115,7 @@ function suspendListeners(obj, eventNames, target, method, callback) {
|
|
2092
2115
|
function finalizer() {
|
2093
2116
|
for (var i = 0, l = suspendedActions.length; i < l; i++) {
|
2094
2117
|
var actionIndex = suspendedActions[i];
|
2095
|
-
|
2118
|
+
actionsList[i][actionIndex+2] &= ~SUSPENDED;
|
2096
2119
|
}
|
2097
2120
|
}
|
2098
2121
|
|
@@ -4429,18 +4452,18 @@ function registerComputedWithProperties(name, macro) {
|
|
4429
4452
|
}
|
4430
4453
|
|
4431
4454
|
/**
|
4432
|
-
A computed property that returns true
|
4455
|
+
A computed property that returns true if the value of the dependent
|
4433
4456
|
property is null, an empty string, empty array, or empty function.
|
4434
4457
|
|
4435
4458
|
Note: When using `Ember.computed.empty` to watch an array make sure to
|
4436
|
-
use the `array.
|
4459
|
+
use the `array.[]` syntax so the computed can subscribe to transitions
|
4437
4460
|
from empty to non-empty states.
|
4438
4461
|
|
4439
4462
|
Example
|
4440
4463
|
|
4441
4464
|
```javascript
|
4442
4465
|
var ToDoList = Ember.Object.extend({
|
4443
|
-
done: Ember.computed.empty('todos.
|
4466
|
+
done: Ember.computed.empty('todos.[]') // detect array changes
|
4444
4467
|
});
|
4445
4468
|
var todoList = ToDoList.create({todos: ['Unit Test', 'Documentation', 'Release']});
|
4446
4469
|
todoList.get('done'); // false
|
@@ -4459,7 +4482,7 @@ registerComputed('empty', function(dependentKey) {
|
|
4459
4482
|
});
|
4460
4483
|
|
4461
4484
|
/**
|
4462
|
-
A computed property that returns true
|
4485
|
+
A computed property that returns true if the value of the dependent
|
4463
4486
|
property is NOT null, an empty string, empty array, or empty function.
|
4464
4487
|
|
4465
4488
|
Example
|
@@ -4485,7 +4508,7 @@ registerComputed('notEmpty', function(dependentKey) {
|
|
4485
4508
|
});
|
4486
4509
|
|
4487
4510
|
/**
|
4488
|
-
A computed property that returns true
|
4511
|
+
A computed property that returns true if the value of the dependent
|
4489
4512
|
property is null or undefined. This avoids errors from JSLint complaining
|
4490
4513
|
about use of ==, which can be technically confusing.
|
4491
4514
|
|
@@ -4524,9 +4547,9 @@ registerComputed('none', function(dependentKey) {
|
|
4524
4547
|
isAnonymous: Ember.computed.not('loggedIn')
|
4525
4548
|
});
|
4526
4549
|
var user = User.create({loggedIn: false});
|
4527
|
-
user.get('isAnonymous'); // false
|
4528
|
-
user.set('loggedIn', true);
|
4529
4550
|
user.get('isAnonymous'); // true
|
4551
|
+
user.set('loggedIn', true);
|
4552
|
+
user.get('isAnonymous'); // false
|
4530
4553
|
```
|
4531
4554
|
|
4532
4555
|
@method computed.not
|
@@ -4560,7 +4583,7 @@ registerComputed('not', function(dependentKey) {
|
|
4560
4583
|
@method computed.bool
|
4561
4584
|
@for Ember
|
4562
4585
|
@param {String} dependentKey
|
4563
|
-
@return {Ember.ComputedProperty} computed property which
|
4586
|
+
@return {Ember.ComputedProperty} computed property which converts
|
4564
4587
|
to boolean the original value for property
|
4565
4588
|
*/
|
4566
4589
|
registerComputed('bool', function(dependentKey) {
|
@@ -4611,7 +4634,7 @@ registerComputed('match', function(dependentKey, regexp) {
|
|
4611
4634
|
var hampster = Hampster.create();
|
4612
4635
|
hampster.get('napTime'); // false
|
4613
4636
|
hampster.set('state', 'sleepy');
|
4614
|
-
hampster.get('napTime'); //
|
4637
|
+
hampster.get('napTime'); // true
|
4615
4638
|
hampster.set('state', 'hungry');
|
4616
4639
|
hampster.get('napTime'); // false
|
4617
4640
|
```
|
@@ -4778,7 +4801,7 @@ registerComputedWithProperties('and', function(properties) {
|
|
4778
4801
|
});
|
4779
4802
|
|
4780
4803
|
/**
|
4781
|
-
A computed property
|
4804
|
+
A computed property which performs a logical `or` on the
|
4782
4805
|
original values for the provided dependent properties.
|
4783
4806
|
|
4784
4807
|
Example
|
@@ -4945,7 +4968,7 @@ Ember.computed.alias = function(dependentKey) {
|
|
4945
4968
|
@method computed.oneWay
|
4946
4969
|
@for Ember
|
4947
4970
|
@param {String} dependentKey
|
4948
|
-
@return {Ember.ComputedProperty} computed property which creates
|
4971
|
+
@return {Ember.ComputedProperty} computed property which creates a
|
4949
4972
|
one way computed property to the original value for property.
|
4950
4973
|
*/
|
4951
4974
|
Ember.computed.oneWay = function(dependentKey) {
|
@@ -4957,7 +4980,7 @@ Ember.computed.oneWay = function(dependentKey) {
|
|
4957
4980
|
|
4958
4981
|
/**
|
4959
4982
|
A computed property that acts like a standard getter and setter,
|
4960
|
-
but
|
4983
|
+
but returns the value at the provided `defaultPath` if the
|
4961
4984
|
property itself has not been set to a value
|
4962
4985
|
|
4963
4986
|
Example
|
@@ -5325,7 +5348,12 @@ define("backburner",
|
|
5325
5348
|
debouncees = [],
|
5326
5349
|
timers = [],
|
5327
5350
|
autorun, laterTimer, laterTimerExpiresAt,
|
5328
|
-
global = this
|
5351
|
+
global = this,
|
5352
|
+
NUMBER = /\d+/;
|
5353
|
+
|
5354
|
+
function isCoercableNumber(number) {
|
5355
|
+
return typeof number === 'number' || NUMBER.test(number);
|
5356
|
+
}
|
5329
5357
|
|
5330
5358
|
function Backburner(queueNames, options) {
|
5331
5359
|
this.queueNames = queueNames;
|
@@ -5440,32 +5468,60 @@ define("backburner",
|
|
5440
5468
|
},
|
5441
5469
|
|
5442
5470
|
setTimeout: function() {
|
5443
|
-
var
|
5444
|
-
|
5445
|
-
|
5446
|
-
|
5447
|
-
|
5471
|
+
var args = slice.call(arguments);
|
5472
|
+
var length = args.length;
|
5473
|
+
var method, wait, target;
|
5474
|
+
var self = this;
|
5475
|
+
var methodOrTarget, methodOrWait, methodOrArgs;
|
5448
5476
|
|
5449
|
-
if (
|
5450
|
-
|
5451
|
-
|
5477
|
+
if (length === 0) {
|
5478
|
+
return;
|
5479
|
+
} else if (length === 1) {
|
5480
|
+
method = args.shift();
|
5481
|
+
wait = 0;
|
5482
|
+
} else if (length === 2) {
|
5483
|
+
methodOrTarget = args[0];
|
5484
|
+
methodOrWait = args[1];
|
5485
|
+
|
5486
|
+
if (typeof methodOrWait === 'function' || typeof methodOrTarget[methodOrWait] === 'function') {
|
5487
|
+
target = args.shift();
|
5488
|
+
method = args.shift();
|
5489
|
+
wait = 0;
|
5490
|
+
} else if (isCoercableNumber(methodOrWait)) {
|
5491
|
+
method = args.shift();
|
5492
|
+
wait = args.shift();
|
5493
|
+
} else {
|
5494
|
+
method = args.shift();
|
5495
|
+
wait = 0;
|
5496
|
+
}
|
5497
|
+
} else {
|
5498
|
+
var last = args[args.length - 1];
|
5499
|
+
|
5500
|
+
if (isCoercableNumber(last)) {
|
5501
|
+
wait = args.pop();
|
5502
|
+
}
|
5503
|
+
|
5504
|
+
methodOrTarget = args[0];
|
5505
|
+
methodOrArgs = args[1];
|
5506
|
+
|
5507
|
+
if (typeof methodOrArgs === 'function' || (typeof methodOrArgs === 'string' &&
|
5508
|
+
methodOrTarget !== null &&
|
5509
|
+
methodOrArgs in methodOrTarget)) {
|
5510
|
+
target = args.shift();
|
5511
|
+
method = args.shift();
|
5512
|
+
} else {
|
5513
|
+
method = args.shift();
|
5514
|
+
}
|
5452
5515
|
}
|
5453
5516
|
|
5517
|
+
var executeAt = (+new Date()) + parseInt(wait, 10);
|
5518
|
+
|
5454
5519
|
if (typeof method === 'string') {
|
5455
5520
|
method = target[method];
|
5456
5521
|
}
|
5457
5522
|
|
5458
|
-
|
5459
|
-
|
5460
|
-
args = slice.call(arguments, 2);
|
5461
|
-
|
5462
|
-
fn = function() {
|
5463
|
-
method.apply(target, args);
|
5464
|
-
};
|
5465
|
-
} else {
|
5466
|
-
fn = function() {
|
5467
|
-
method.call(target);
|
5468
|
-
};
|
5523
|
+
function fn() {
|
5524
|
+
method.apply(target, args);
|
5469
5525
|
}
|
5470
5526
|
|
5471
5527
|
// find position to insert - TODO: binary search
|
@@ -5666,6 +5722,7 @@ define("backburner",
|
|
5666
5722
|
|
5667
5723
|
__exports__.Backburner = Backburner;
|
5668
5724
|
});
|
5725
|
+
|
5669
5726
|
})();
|
5670
5727
|
|
5671
5728
|
|
@@ -6801,7 +6858,9 @@ function applyConcatenatedProperties(obj, key, value, values) {
|
|
6801
6858
|
return Ember.makeArray(baseValue).concat(value);
|
6802
6859
|
}
|
6803
6860
|
} else {
|
6804
|
-
|
6861
|
+
// Make sure this mixin has its own array so it is not
|
6862
|
+
// accidentally mutated by another child's interactions
|
6863
|
+
return Ember.makeArray(value).slice();
|
6805
6864
|
}
|
6806
6865
|
}
|
6807
6866
|
|
@@ -6839,15 +6898,14 @@ function addNormalizedProperty(base, key, value, meta, descs, values, concats, m
|
|
6839
6898
|
descs[key] = value;
|
6840
6899
|
values[key] = undefined;
|
6841
6900
|
} else {
|
6842
|
-
|
6843
|
-
if (isMethod(value)) {
|
6844
|
-
value = giveMethodSuper(base, key, value, values, descs);
|
6845
|
-
} else if ((concats && a_indexOf.call(concats, key) >= 0) ||
|
6901
|
+
if ((concats && a_indexOf.call(concats, key) >= 0) ||
|
6846
6902
|
key === 'concatenatedProperties' ||
|
6847
6903
|
key === 'mergedProperties') {
|
6848
6904
|
value = applyConcatenatedProperties(base, key, value, values);
|
6849
6905
|
} else if ((mergings && a_indexOf.call(mergings, key) >= 0)) {
|
6850
6906
|
value = applyMergedProperties(base, key, value, values);
|
6907
|
+
} else if (isMethod(value)) {
|
6908
|
+
value = giveMethodSuper(base, key, value, values, descs);
|
6851
6909
|
}
|
6852
6910
|
|
6853
6911
|
descs[key] = undefined;
|
@@ -7283,11 +7341,10 @@ Alias.prototype = new Ember.Descriptor();
|
|
7283
7341
|
@deprecated Use `Ember.aliasMethod` or `Ember.computed.alias` instead
|
7284
7342
|
*/
|
7285
7343
|
Ember.alias = function(methodName) {
|
7344
|
+
|
7286
7345
|
return new Alias(methodName);
|
7287
7346
|
};
|
7288
7347
|
|
7289
|
-
Ember.alias = Ember.deprecateFunc("Ember.alias is deprecated. Please use Ember.aliasMethod or Ember.computed.alias instead.", Ember.alias);
|
7290
|
-
|
7291
7348
|
/**
|
7292
7349
|
Makes a method available via an additional name.
|
7293
7350
|
|
@@ -7429,6 +7486,55 @@ Ember.beforeObserver = function(func) {
|
|
7429
7486
|
|
7430
7487
|
|
7431
7488
|
|
7489
|
+
(function() {
|
7490
|
+
// Provides a way to register library versions with ember.
|
7491
|
+
var forEach = Ember.EnumerableUtils.forEach,
|
7492
|
+
indexOf = Ember.EnumerableUtils.indexOf;
|
7493
|
+
|
7494
|
+
Ember.libraries = function() {
|
7495
|
+
var libraries = [];
|
7496
|
+
var coreLibIndex = 0;
|
7497
|
+
|
7498
|
+
var getLibrary = function(name) {
|
7499
|
+
for (var i = 0; i < libraries.length; i++) {
|
7500
|
+
if (libraries[i].name === name) {
|
7501
|
+
return libraries[i];
|
7502
|
+
}
|
7503
|
+
}
|
7504
|
+
};
|
7505
|
+
|
7506
|
+
libraries.register = function(name, version) {
|
7507
|
+
if (!getLibrary(name)) {
|
7508
|
+
libraries.push({name: name, version: version});
|
7509
|
+
}
|
7510
|
+
};
|
7511
|
+
|
7512
|
+
libraries.registerCoreLibrary = function(name, version) {
|
7513
|
+
if (!getLibrary(name)) {
|
7514
|
+
libraries.splice(coreLibIndex++, 0, {name: name, version: version});
|
7515
|
+
}
|
7516
|
+
};
|
7517
|
+
|
7518
|
+
libraries.deRegister = function(name) {
|
7519
|
+
var lib = getLibrary(name);
|
7520
|
+
if (lib) libraries.splice(indexOf(libraries, lib), 1);
|
7521
|
+
};
|
7522
|
+
|
7523
|
+
libraries.each = function (callback) {
|
7524
|
+
forEach(libraries, function(lib) {
|
7525
|
+
callback(lib.name, lib.version);
|
7526
|
+
});
|
7527
|
+
};
|
7528
|
+
|
7529
|
+
return libraries;
|
7530
|
+
}();
|
7531
|
+
|
7532
|
+
Ember.libraries.registerCoreLibrary('Ember', Ember.VERSION);
|
7533
|
+
|
7534
|
+
})();
|
7535
|
+
|
7536
|
+
|
7537
|
+
|
7432
7538
|
(function() {
|
7433
7539
|
/**
|
7434
7540
|
Ember Metal
|
@@ -8087,6 +8193,13 @@ define("rsvp",
|
|
8087
8193
|
|
8088
8194
|
(function() {
|
8089
8195
|
/**
|
8196
|
+
@private
|
8197
|
+
Public api for the container is still in flux.
|
8198
|
+
The public api, specified on the application namespace should be considered the stable api.
|
8199
|
+
// @module container
|
8200
|
+
*/
|
8201
|
+
|
8202
|
+
/*
|
8090
8203
|
Flag to enable/disable model factory injections (disabled by default)
|
8091
8204
|
If model factory injections are enabled, models should not be
|
8092
8205
|
accessed globally (only through `container.lookupFactory('model:modelName'))`);
|
@@ -8097,11 +8210,7 @@ define("container",
|
|
8097
8210
|
[],
|
8098
8211
|
function() {
|
8099
8212
|
|
8100
|
-
|
8101
|
-
A safe and simple inheriting object.
|
8102
|
-
|
8103
|
-
@class InheritingDict
|
8104
|
-
*/
|
8213
|
+
// A safe and simple inheriting object.
|
8105
8214
|
function InheritingDict(parent) {
|
8106
8215
|
this.parent = parent;
|
8107
8216
|
this.dict = {};
|
@@ -8174,7 +8283,7 @@ define("container",
|
|
8174
8283
|
|
8175
8284
|
@method has
|
8176
8285
|
@param {String} key
|
8177
|
-
@
|
8286
|
+
@return {Boolean}
|
8178
8287
|
*/
|
8179
8288
|
has: function(key) {
|
8180
8289
|
var dict = this.dict;
|
@@ -8208,11 +8317,10 @@ define("container",
|
|
8208
8317
|
}
|
8209
8318
|
};
|
8210
8319
|
|
8211
|
-
/**
|
8212
|
-
A lightweight container that helps to assemble and decouple components.
|
8213
8320
|
|
8214
|
-
|
8215
|
-
|
8321
|
+
// A lightweight container that helps to assemble and decouple components.
|
8322
|
+
// Public api for the container is still in flux.
|
8323
|
+
// The public api, specified on the application namespace should be considered the stable api.
|
8216
8324
|
function Container(parent) {
|
8217
8325
|
this.parent = parent;
|
8218
8326
|
this.children = [];
|
@@ -8301,7 +8409,7 @@ define("container",
|
|
8301
8409
|
to correctly inherit from the current container.
|
8302
8410
|
|
8303
8411
|
@method child
|
8304
|
-
@
|
8412
|
+
@return {Container}
|
8305
8413
|
*/
|
8306
8414
|
child: function() {
|
8307
8415
|
var container = new Container(this);
|
@@ -8337,25 +8445,25 @@ define("container",
|
|
8337
8445
|
```
|
8338
8446
|
|
8339
8447
|
@method register
|
8340
|
-
@param {String}
|
8341
|
-
@param {String} name
|
8448
|
+
@param {String} fullName
|
8342
8449
|
@param {Function} factory
|
8343
8450
|
@param {Object} options
|
8344
8451
|
*/
|
8345
|
-
register: function(
|
8346
|
-
|
8347
|
-
|
8348
|
-
|
8349
|
-
options = factory;
|
8350
|
-
factory = name;
|
8351
|
-
fullName = type;
|
8352
|
-
} else {
|
8452
|
+
register: function(fullName, factory, options) {
|
8453
|
+
if (fullName.indexOf(':') === -1) {
|
8454
|
+
throw new TypeError("malformed fullName, expected: `type:name` got: " + fullName + "");
|
8455
|
+
}
|
8353
8456
|
|
8354
|
-
|
8457
|
+
if (factory === undefined) {
|
8458
|
+
throw new TypeError('Attempting to register an unknown factory: `' + fullName + '`');
|
8355
8459
|
}
|
8356
8460
|
|
8357
8461
|
var normalizedName = this.normalize(fullName);
|
8358
8462
|
|
8463
|
+
if (this.cache.has(normalizedName)) {
|
8464
|
+
throw new Error('Cannot re-register: `' + fullName +'`, as it has already been looked up.');
|
8465
|
+
}
|
8466
|
+
|
8359
8467
|
this.registry.set(normalizedName, factory);
|
8360
8468
|
this._options.set(normalizedName, options || {});
|
8361
8469
|
},
|
@@ -8415,7 +8523,7 @@ define("container",
|
|
8415
8523
|
|
8416
8524
|
@method resolve
|
8417
8525
|
@param {String} fullName
|
8418
|
-
@
|
8526
|
+
@return {Function} fullName's factory
|
8419
8527
|
*/
|
8420
8528
|
resolve: function(fullName) {
|
8421
8529
|
return this.resolver(fullName) || this.registry.get(fullName);
|
@@ -8450,7 +8558,7 @@ define("container",
|
|
8450
8558
|
@method makeToString
|
8451
8559
|
|
8452
8560
|
@param {any} factory
|
8453
|
-
@param {string}
|
8561
|
+
@param {string} fullName
|
8454
8562
|
@return {function} toString function
|
8455
8563
|
*/
|
8456
8564
|
makeToString: function(factory, fullName) {
|
@@ -8507,7 +8615,7 @@ define("container",
|
|
8507
8615
|
|
8508
8616
|
var value = instantiate(this, fullName);
|
8509
8617
|
|
8510
|
-
if (
|
8618
|
+
if (value === undefined) { return; }
|
8511
8619
|
|
8512
8620
|
if (isSingleton(this, fullName) && options.singleton !== false) {
|
8513
8621
|
this.cache.set(fullName, value);
|
@@ -8585,7 +8693,7 @@ define("container",
|
|
8585
8693
|
this.optionsForType(type, options);
|
8586
8694
|
},
|
8587
8695
|
|
8588
|
-
|
8696
|
+
/**
|
8589
8697
|
@private
|
8590
8698
|
|
8591
8699
|
Used only via `injection`.
|
@@ -8627,7 +8735,7 @@ define("container",
|
|
8627
8735
|
addTypeInjection(this.typeInjections, type, property, fullName);
|
8628
8736
|
},
|
8629
8737
|
|
8630
|
-
|
8738
|
+
/**
|
8631
8739
|
Defines injection rules.
|
8632
8740
|
|
8633
8741
|
These rules are used to inject dependencies onto objects when they
|
@@ -8635,8 +8743,8 @@ define("container",
|
|
8635
8743
|
|
8636
8744
|
Two forms of injections are possible:
|
8637
8745
|
|
8638
|
-
|
8639
|
-
|
8746
|
+
* Injecting one fullName on another fullName
|
8747
|
+
* Injecting one fullName on a type
|
8640
8748
|
|
8641
8749
|
Example:
|
8642
8750
|
|
@@ -8682,7 +8790,7 @@ define("container",
|
|
8682
8790
|
},
|
8683
8791
|
|
8684
8792
|
|
8685
|
-
|
8793
|
+
/**
|
8686
8794
|
@private
|
8687
8795
|
|
8688
8796
|
Used only via `factoryInjection`.
|
@@ -8719,7 +8827,7 @@ define("container",
|
|
8719
8827
|
addTypeInjection(this.factoryTypeInjections, type, property, fullName);
|
8720
8828
|
},
|
8721
8829
|
|
8722
|
-
|
8830
|
+
/**
|
8723
8831
|
Defines factory injection rules.
|
8724
8832
|
|
8725
8833
|
Similar to regular injection rules, but are run against factories, via
|
@@ -8730,8 +8838,8 @@ define("container",
|
|
8730
8838
|
|
8731
8839
|
Two forms of injections are possible:
|
8732
8840
|
|
8733
|
-
|
8734
|
-
|
8841
|
+
* Injecting one fullName on another fullName
|
8842
|
+
* Injecting one fullName on a type
|
8735
8843
|
|
8736
8844
|
Example:
|
8737
8845
|
|
@@ -8833,7 +8941,7 @@ define("container",
|
|
8833
8941
|
injection = injections[i];
|
8834
8942
|
lookup = container.lookup(injection.fullName);
|
8835
8943
|
|
8836
|
-
if (lookup) {
|
8944
|
+
if (lookup !== undefined) {
|
8837
8945
|
hash[injection.property] = lookup;
|
8838
8946
|
} else {
|
8839
8947
|
throw new Error('Attempting to inject an unknown injection: `' + injection.fullName + '`');
|
@@ -8865,13 +8973,13 @@ define("container",
|
|
8865
8973
|
var cache = container.factoryCache;
|
8866
8974
|
var type = fullName.split(":")[0];
|
8867
8975
|
|
8868
|
-
if (
|
8976
|
+
if (factory === undefined) { return; }
|
8869
8977
|
|
8870
8978
|
if (cache.has(fullName)) {
|
8871
8979
|
return cache.get(fullName);
|
8872
8980
|
}
|
8873
8981
|
|
8874
|
-
if (typeof factory.extend !== 'function' || (!Ember.MODEL_FACTORY_INJECTIONS && type === 'model')) {
|
8982
|
+
if (!factory || typeof factory.extend !== 'function' || (!Ember.MODEL_FACTORY_INJECTIONS && type === 'model')) {
|
8875
8983
|
// TODO: think about a 'safe' merge style extension
|
8876
8984
|
// for now just fallback to create time injection
|
8877
8985
|
return factory;
|
@@ -9246,16 +9354,39 @@ Ember.ORDER_DEFINITION = Ember.ENV.ORDER_DEFINITION || [
|
|
9246
9354
|
Ember.keys = Object.keys;
|
9247
9355
|
|
9248
9356
|
if (!Ember.keys || Ember.create.isSimulated) {
|
9357
|
+
var prototypeProperties = [
|
9358
|
+
'constructor',
|
9359
|
+
'hasOwnProperty',
|
9360
|
+
'isPrototypeOf',
|
9361
|
+
'propertyIsEnumerable',
|
9362
|
+
'valueOf',
|
9363
|
+
'toLocaleString',
|
9364
|
+
'toString'
|
9365
|
+
],
|
9366
|
+
pushPropertyName = function(obj, array, key) {
|
9367
|
+
// Prevents browsers that don't respect non-enumerability from
|
9368
|
+
// copying internal Ember properties
|
9369
|
+
if (key.substring(0,2) === '__') return;
|
9370
|
+
if (key === '_super') return;
|
9371
|
+
if (indexOf(array, key) >= 0) return;
|
9372
|
+
if (!obj.hasOwnProperty(key)) return;
|
9373
|
+
|
9374
|
+
array.push(key);
|
9375
|
+
};
|
9376
|
+
|
9249
9377
|
Ember.keys = function(obj) {
|
9250
|
-
var ret = [];
|
9251
|
-
for(
|
9252
|
-
|
9253
|
-
|
9254
|
-
if (key.substring(0,2) === '__') continue;
|
9255
|
-
if (key === '_super') continue;
|
9378
|
+
var ret = [], key;
|
9379
|
+
for (key in obj) {
|
9380
|
+
pushPropertyName(obj, ret, key);
|
9381
|
+
}
|
9256
9382
|
|
9257
|
-
|
9383
|
+
// IE8 doesn't enumerate property that named the same as prototype properties.
|
9384
|
+
for (var i = 0, l = prototypeProperties.length; i < l; i++) {
|
9385
|
+
key = prototypeProperties[i];
|
9386
|
+
|
9387
|
+
pushPropertyName(obj, ret, key);
|
9258
9388
|
}
|
9389
|
+
|
9259
9390
|
return ret;
|
9260
9391
|
};
|
9261
9392
|
}
|
@@ -10695,6 +10826,8 @@ var get = Ember.get,
|
|
10695
10826
|
set = Ember.set,
|
10696
10827
|
guidFor = Ember.guidFor,
|
10697
10828
|
metaFor = Ember.meta,
|
10829
|
+
propertyWillChange = Ember.propertyWillChange,
|
10830
|
+
propertyDidChange = Ember.propertyDidChange,
|
10698
10831
|
addBeforeObserver = Ember.addBeforeObserver,
|
10699
10832
|
removeBeforeObserver = Ember.removeBeforeObserver,
|
10700
10833
|
addObserver = Ember.addObserver,
|
@@ -10749,11 +10882,13 @@ function ItemPropertyObserverContext (dependentArray, index, trackedArray) {
|
|
10749
10882
|
this.trackedArray = trackedArray;
|
10750
10883
|
this.beforeObserver = null;
|
10751
10884
|
this.observer = null;
|
10885
|
+
|
10886
|
+
this.destroyed = false;
|
10752
10887
|
}
|
10753
10888
|
|
10754
10889
|
DependentArraysObserver.prototype = {
|
10755
10890
|
setValue: function (newValue) {
|
10756
|
-
this.instanceMeta.setValue(newValue);
|
10891
|
+
this.instanceMeta.setValue(newValue, true);
|
10757
10892
|
},
|
10758
10893
|
getValue: function () {
|
10759
10894
|
return this.instanceMeta.getValue();
|
@@ -10818,6 +10953,7 @@ DependentArraysObserver.prototype = {
|
|
10818
10953
|
if (operation === Ember.TrackedArray.DELETE) { return; }
|
10819
10954
|
|
10820
10955
|
forEach(observerContexts, function (observerContext) {
|
10956
|
+
observerContext.destroyed = true;
|
10821
10957
|
beforeObserver = observerContext.beforeObserver;
|
10822
10958
|
observer = observerContext.observer;
|
10823
10959
|
item = observerContext.item;
|
@@ -10842,11 +10978,10 @@ DependentArraysObserver.prototype = {
|
|
10842
10978
|
var dependentArrayObserver = this;
|
10843
10979
|
|
10844
10980
|
observerContext.beforeObserver = function (obj, keyName) {
|
10845
|
-
dependentArrayObserver.
|
10846
|
-
return dependentArrayObserver.itemPropertyWillChange(obj, keyName, observerContext.dependentArray, observerContext.index);
|
10981
|
+
return dependentArrayObserver.itemPropertyWillChange(obj, keyName, observerContext.dependentArray, observerContext);
|
10847
10982
|
};
|
10848
10983
|
observerContext.observer = function (obj, keyName) {
|
10849
|
-
return dependentArrayObserver.itemPropertyDidChange(obj, keyName, observerContext.dependentArray, observerContext
|
10984
|
+
return dependentArrayObserver.itemPropertyDidChange(obj, keyName, observerContext.dependentArray, observerContext);
|
10850
10985
|
};
|
10851
10986
|
},
|
10852
10987
|
|
@@ -10854,14 +10989,14 @@ DependentArraysObserver.prototype = {
|
|
10854
10989
|
this.trackedArraysByGuid[dependentKey] = new Ember.TrackedArray(observerContexts);
|
10855
10990
|
},
|
10856
10991
|
|
10857
|
-
|
10992
|
+
trackAdd: function (dependentKey, index, newItems) {
|
10858
10993
|
var trackedArray = this.trackedArraysByGuid[dependentKey];
|
10859
10994
|
if (trackedArray) {
|
10860
10995
|
trackedArray.addItems(index, newItems);
|
10861
10996
|
}
|
10862
10997
|
},
|
10863
10998
|
|
10864
|
-
|
10999
|
+
trackRemove: function (dependentKey, index, removedCount) {
|
10865
11000
|
var trackedArray = this.trackedArraysByGuid[dependentKey];
|
10866
11001
|
|
10867
11002
|
if (trackedArray) {
|
@@ -10902,10 +11037,10 @@ DependentArraysObserver.prototype = {
|
|
10902
11037
|
sliceIndex,
|
10903
11038
|
observerContexts;
|
10904
11039
|
|
10905
|
-
observerContexts = this.
|
10906
|
-
|
11040
|
+
observerContexts = this.trackRemove(dependentKey, index, removedCount);
|
10907
11041
|
|
10908
11042
|
function removeObservers(propertyKey) {
|
11043
|
+
observerContexts[sliceIndex].destroyed = true;
|
10909
11044
|
removeBeforeObserver(item, propertyKey, this, observerContexts[sliceIndex].beforeObserver);
|
10910
11045
|
removeObserver(item, propertyKey, this, observerContexts[sliceIndex].observer);
|
10911
11046
|
}
|
@@ -10947,33 +11082,38 @@ DependentArraysObserver.prototype = {
|
|
10947
11082
|
this.instanceMeta.context, this.getValue(), item, changeMeta, this.instanceMeta.sugarMeta));
|
10948
11083
|
}, this);
|
10949
11084
|
|
10950
|
-
this.
|
11085
|
+
this.trackAdd(dependentKey, index, observerContexts);
|
10951
11086
|
},
|
10952
11087
|
|
10953
|
-
itemPropertyWillChange: function (obj, keyName, array,
|
11088
|
+
itemPropertyWillChange: function (obj, keyName, array, observerContext) {
|
10954
11089
|
var guid = guidFor(obj);
|
10955
11090
|
|
10956
11091
|
if (!this.changedItems[guid]) {
|
10957
11092
|
this.changedItems[guid] = {
|
10958
|
-
array:
|
10959
|
-
|
10960
|
-
obj:
|
10961
|
-
previousValues:
|
11093
|
+
array: array,
|
11094
|
+
observerContext: observerContext,
|
11095
|
+
obj: obj,
|
11096
|
+
previousValues: {}
|
10962
11097
|
};
|
10963
11098
|
}
|
10964
11099
|
|
10965
11100
|
this.changedItems[guid].previousValues[keyName] = get(obj, keyName);
|
10966
11101
|
},
|
10967
11102
|
|
10968
|
-
itemPropertyDidChange: function(obj, keyName, array,
|
10969
|
-
|
11103
|
+
itemPropertyDidChange: function(obj, keyName, array, observerContext) {
|
11104
|
+
this.flushChanges();
|
10970
11105
|
},
|
10971
11106
|
|
10972
11107
|
flushChanges: function() {
|
10973
11108
|
var changedItems = this.changedItems, key, c, changeMeta;
|
11109
|
+
|
10974
11110
|
for (key in changedItems) {
|
10975
11111
|
c = changedItems[key];
|
10976
|
-
|
11112
|
+
if (c.observerContext.destroyed) { continue; }
|
11113
|
+
|
11114
|
+
this.updateIndexes(c.observerContext.trackedArray, c.observerContext.dependentArray);
|
11115
|
+
|
11116
|
+
changeMeta = createChangeMeta(c.array, c.obj, c.observerContext.index, this.instanceMeta.propertyName, this.cp, c.previousValues);
|
10977
11117
|
this.setValue(
|
10978
11118
|
this.callbacks.removedItem.call(this.instanceMeta.context, this.getValue(), c.obj, changeMeta, this.instanceMeta.sugarMeta));
|
10979
11119
|
this.setValue(
|
@@ -11043,11 +11183,21 @@ ReduceComputedPropertyInstanceMeta.prototype = {
|
|
11043
11183
|
}
|
11044
11184
|
},
|
11045
11185
|
|
11046
|
-
setValue: function(newValue) {
|
11186
|
+
setValue: function(newValue, triggerObservers) {
|
11047
11187
|
// This lets sugars force a recomputation, handy for very simple
|
11048
11188
|
// implementations of eg max.
|
11049
11189
|
if (newValue !== undefined) {
|
11190
|
+
var fireObservers = triggerObservers && (newValue !== this.cache[this.propertyName]);
|
11191
|
+
|
11192
|
+
if (fireObservers) {
|
11193
|
+
propertyWillChange(this.context, this.propertyName);
|
11194
|
+
}
|
11195
|
+
|
11050
11196
|
this.cache[this.propertyName] = newValue;
|
11197
|
+
|
11198
|
+
if (fireObservers) {
|
11199
|
+
propertyDidChange(this.context, this.propertyName);
|
11200
|
+
}
|
11051
11201
|
} else {
|
11052
11202
|
delete this.cache[this.propertyName];
|
11053
11203
|
}
|
@@ -11173,13 +11323,11 @@ ReduceComputedProperty.prototype._instanceMeta = function (context, propertyName
|
|
11173
11323
|
};
|
11174
11324
|
|
11175
11325
|
ReduceComputedProperty.prototype.initialValue = function () {
|
11176
|
-
|
11177
|
-
|
11178
|
-
|
11179
|
-
|
11180
|
-
|
11181
|
-
default:
|
11182
|
-
return this.options.initialValue;
|
11326
|
+
if (typeof this.options.initialValue === 'function') {
|
11327
|
+
return this.options.initialValue();
|
11328
|
+
}
|
11329
|
+
else {
|
11330
|
+
return this.options.initialValue;
|
11183
11331
|
}
|
11184
11332
|
};
|
11185
11333
|
|
@@ -11202,25 +11350,25 @@ ReduceComputedProperty.prototype.clearItemPropertyKeys = function (dependentArra
|
|
11202
11350
|
ReduceComputedProperty.prototype.property = function () {
|
11203
11351
|
var cp = this,
|
11204
11352
|
args = a_slice.call(arguments),
|
11205
|
-
propertyArgs =
|
11353
|
+
propertyArgs = new Ember.Set(),
|
11206
11354
|
match,
|
11207
11355
|
dependentArrayKey,
|
11208
11356
|
itemPropertyKey;
|
11209
11357
|
|
11210
11358
|
forEach(a_slice.call(arguments), function (dependentKey) {
|
11211
11359
|
if (doubleEachPropertyPattern.test(dependentKey)) {
|
11212
|
-
throw new Error("Nested @each properties not supported: " + dependentKey);
|
11360
|
+
throw new Ember.Error("Nested @each properties not supported: " + dependentKey);
|
11213
11361
|
} else if (match = eachPropertyPattern.exec(dependentKey)) {
|
11214
11362
|
dependentArrayKey = match[1];
|
11215
11363
|
itemPropertyKey = match[2];
|
11216
11364
|
cp.itemPropertyKey(dependentArrayKey, itemPropertyKey);
|
11217
|
-
propertyArgs.
|
11365
|
+
propertyArgs.add(dependentArrayKey);
|
11218
11366
|
} else {
|
11219
|
-
propertyArgs.
|
11367
|
+
propertyArgs.add(dependentKey);
|
11220
11368
|
}
|
11221
11369
|
});
|
11222
11370
|
|
11223
|
-
return ComputedProperty.prototype.property.apply(this, propertyArgs);
|
11371
|
+
return ComputedProperty.prototype.property.apply(this, propertyArgs.toArray());
|
11224
11372
|
};
|
11225
11373
|
|
11226
11374
|
/**
|
@@ -11232,7 +11380,7 @@ ReduceComputedProperty.prototype.property = function () {
|
|
11232
11380
|
If there are more than one arguments the first arguments are
|
11233
11381
|
considered to be dependent property keys. The last argument is
|
11234
11382
|
required to be an options object. The options object can have the
|
11235
|
-
following four properties
|
11383
|
+
following four properties:
|
11236
11384
|
|
11237
11385
|
`initialValue` - A value or function that will be used as the initial
|
11238
11386
|
value for the computed. If this property is a function the result of calling
|
@@ -11313,6 +11461,12 @@ ReduceComputedProperty.prototype.property = function () {
|
|
11313
11461
|
to invalidate the computation. This is generally not a good idea for
|
11314
11462
|
arrayComputed but it's used in eg max and min.
|
11315
11463
|
|
11464
|
+
Note that observers will be fired if either of these functions return a value
|
11465
|
+
that differs from the accumulated value. When returning an object that
|
11466
|
+
mutates in response to array changes, for example an array that maps
|
11467
|
+
everything from some other array (see `Ember.computed.map`), it is usually
|
11468
|
+
important that the *same* array be returned to avoid accidentally triggering observers.
|
11469
|
+
|
11316
11470
|
Example
|
11317
11471
|
|
11318
11472
|
```javascript
|
@@ -11337,7 +11491,7 @@ ReduceComputedProperty.prototype.property = function () {
|
|
11337
11491
|
@for Ember
|
11338
11492
|
@param {String} [dependentKeys*]
|
11339
11493
|
@param {Object} options
|
11340
|
-
@
|
11494
|
+
@return {Ember.ComputedProperty}
|
11341
11495
|
*/
|
11342
11496
|
Ember.reduceComputed = function (options) {
|
11343
11497
|
var args;
|
@@ -11348,11 +11502,11 @@ Ember.reduceComputed = function (options) {
|
|
11348
11502
|
}
|
11349
11503
|
|
11350
11504
|
if (typeof options !== "object") {
|
11351
|
-
throw new Error("Reduce Computed Property declared without an options hash");
|
11505
|
+
throw new Ember.Error("Reduce Computed Property declared without an options hash");
|
11352
11506
|
}
|
11353
11507
|
|
11354
|
-
if (!options
|
11355
|
-
throw new Error("Reduce Computed Property declared without an initial value");
|
11508
|
+
if (!('initialValue' in options)) {
|
11509
|
+
throw new Ember.Error("Reduce Computed Property declared without an initial value");
|
11356
11510
|
}
|
11357
11511
|
|
11358
11512
|
var cp = new ReduceComputedProperty(options);
|
@@ -11520,7 +11674,7 @@ ArrayComputedProperty.prototype.resetValue = function (array) {
|
|
11520
11674
|
@for Ember
|
11521
11675
|
@param {String} [dependentKeys*]
|
11522
11676
|
@param {Object} options
|
11523
|
-
@
|
11677
|
+
@return {Ember.ComputedProperty}
|
11524
11678
|
*/
|
11525
11679
|
Ember.arrayComputed = function (options) {
|
11526
11680
|
var args;
|
@@ -11531,7 +11685,7 @@ Ember.arrayComputed = function (options) {
|
|
11531
11685
|
}
|
11532
11686
|
|
11533
11687
|
if (typeof options !== "object") {
|
11534
|
-
throw new Error("Array Computed Property declared without an options hash");
|
11688
|
+
throw new Ember.Error("Array Computed Property declared without an options hash");
|
11535
11689
|
}
|
11536
11690
|
|
11537
11691
|
var cp = new ArrayComputedProperty(options);
|
@@ -11678,7 +11832,7 @@ Ember.computed.min = function (dependentKey) {
|
|
11678
11832
|
Ember.computed.map = function(dependentKey, callback) {
|
11679
11833
|
var options = {
|
11680
11834
|
addedItem: function(array, item, changeMeta, instanceMeta) {
|
11681
|
-
var mapped = callback(item);
|
11835
|
+
var mapped = callback.call(this, item);
|
11682
11836
|
array.insertAt(changeMeta.index, mapped);
|
11683
11837
|
return array;
|
11684
11838
|
},
|
@@ -11698,16 +11852,15 @@ Ember.computed.map = function(dependentKey, callback) {
|
|
11698
11852
|
|
11699
11853
|
```javascript
|
11700
11854
|
App.Person = Ember.Object.extend({
|
11701
|
-
childAges: Ember.computed.mapBy('children', 'age')
|
11702
|
-
minChildAge: Ember.computed.min('childAges')
|
11855
|
+
childAges: Ember.computed.mapBy('children', 'age')
|
11703
11856
|
});
|
11704
11857
|
|
11705
11858
|
var lordByron = App.Person.create({children: []});
|
11706
|
-
lordByron.get('
|
11859
|
+
lordByron.get('childAges'); // []
|
11707
11860
|
lordByron.get('children').pushObject({name: 'Augusta Ada Byron', age: 7});
|
11708
|
-
lordByron.get('
|
11861
|
+
lordByron.get('childAges'); // [7]
|
11709
11862
|
lordByron.get('children').pushObjects([{name: 'Allegra Byron', age: 5}, {name: 'Elizabeth Medora Leigh', age: 8}]);
|
11710
|
-
lordByron.get('
|
11863
|
+
lordByron.get('childAges'); // [7, 5, 8]
|
11711
11864
|
```
|
11712
11865
|
|
11713
11866
|
@method computed.mapBy
|
@@ -11771,7 +11924,7 @@ Ember.computed.filter = function(dependentKey, callback) {
|
|
11771
11924
|
},
|
11772
11925
|
|
11773
11926
|
addedItem: function(array, item, changeMeta, instanceMeta) {
|
11774
|
-
var match = !!callback(item),
|
11927
|
+
var match = !!callback.call(this, item),
|
11775
11928
|
filterIndex = instanceMeta.filteredArrayIndexes.addItem(changeMeta.index, match);
|
11776
11929
|
|
11777
11930
|
if (match) {
|
@@ -12020,7 +12173,7 @@ Ember.computed.intersect = function () {
|
|
12020
12173
|
*/
|
12021
12174
|
Ember.computed.setDiff = function (setAProperty, setBProperty) {
|
12022
12175
|
if (arguments.length !== 2) {
|
12023
|
-
throw new Error("setDiff requires exactly two dependent arrays.");
|
12176
|
+
throw new Ember.Error("setDiff requires exactly two dependent arrays.");
|
12024
12177
|
}
|
12025
12178
|
return Ember.arrayComputed.call(null, setAProperty, setBProperty, {
|
12026
12179
|
addedItem: function (array, item, changeMeta, instanceMeta) {
|
@@ -12135,7 +12288,7 @@ function binarySearch(array, item, low, high) {
|
|
12135
12288
|
]});
|
12136
12289
|
|
12137
12290
|
todoList.get('sortedTodos'); // [{name:'Documentation', priority:3}, {name:'Release', priority:1}, {name:'Unit Test', priority:2}]
|
12138
|
-
todoList.get('
|
12291
|
+
todoList.get('priorityTodos'); // [{name:'Release', priority:1}, {name:'Unit Test', priority:2}, {name:'Documentation', priority:3}]
|
12139
12292
|
```
|
12140
12293
|
|
12141
12294
|
@method computed.sort
|
@@ -12275,7 +12428,7 @@ Ember.RSVP = requireModule('rsvp');
|
|
12275
12428
|
|
12276
12429
|
var STRING_DASHERIZE_REGEXP = (/[ _]/g);
|
12277
12430
|
var STRING_DASHERIZE_CACHE = {};
|
12278
|
-
var STRING_DECAMELIZE_REGEXP = (/([a-z])([A-Z])/g);
|
12431
|
+
var STRING_DECAMELIZE_REGEXP = (/([a-z\d])([A-Z])/g);
|
12279
12432
|
var STRING_CAMELIZE_REGEXP = (/(\-|_|\.|\s)+(.)?/g);
|
12280
12433
|
var STRING_UNDERSCORE_REGEXP_1 = (/([a-z\d])([A-Z]+)/g);
|
12281
12434
|
var STRING_UNDERSCORE_REGEXP_2 = (/\-|\s+/g);
|
@@ -12942,7 +13095,7 @@ Ember.Copyable = Ember.Mixin.create(/** @scope Ember.Copyable.prototype */ {
|
|
12942
13095
|
if (Ember.Freezable && Ember.Freezable.detect(this)) {
|
12943
13096
|
return get(this, 'isFrozen') ? this : this.copy().freeze();
|
12944
13097
|
} else {
|
12945
|
-
throw new Error(Ember.String.fmt("%@ does not support freezing", [this]));
|
13098
|
+
throw new Ember.Error(Ember.String.fmt("%@ does not support freezing", [this]));
|
12946
13099
|
}
|
12947
13100
|
}
|
12948
13101
|
});
|
@@ -13251,7 +13404,7 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/**
|
|
13251
13404
|
@return this
|
13252
13405
|
*/
|
13253
13406
|
insertAt: function(idx, object) {
|
13254
|
-
if (idx > get(this, 'length')) throw new Error(OUT_OF_RANGE_EXCEPTION) ;
|
13407
|
+
if (idx > get(this, 'length')) throw new Ember.Error(OUT_OF_RANGE_EXCEPTION) ;
|
13255
13408
|
this.replace(idx, 0, [object]) ;
|
13256
13409
|
return this ;
|
13257
13410
|
},
|
@@ -13279,7 +13432,7 @@ Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable,/**
|
|
13279
13432
|
if ('number' === typeof start) {
|
13280
13433
|
|
13281
13434
|
if ((start < 0) || (start >= get(this, 'length'))) {
|
13282
|
-
throw new Error(OUT_OF_RANGE_EXCEPTION);
|
13435
|
+
throw new Ember.Error(OUT_OF_RANGE_EXCEPTION);
|
13283
13436
|
}
|
13284
13437
|
|
13285
13438
|
// fast case
|
@@ -14092,18 +14245,29 @@ Ember.TargetActionSupport = Ember.Mixin.create({
|
|
14092
14245
|
*/
|
14093
14246
|
triggerAction: function(opts) {
|
14094
14247
|
opts = opts || {};
|
14095
|
-
var action = opts
|
14096
|
-
target = opts
|
14097
|
-
actionContext = opts
|
14248
|
+
var action = opts.action || get(this, 'action'),
|
14249
|
+
target = opts.target || get(this, 'targetObject'),
|
14250
|
+
actionContext = opts.actionContext;
|
14251
|
+
|
14252
|
+
function args(options, actionName) {
|
14253
|
+
var ret = [];
|
14254
|
+
if (actionName) { ret.push(actionName); }
|
14255
|
+
|
14256
|
+
return ret.concat(options);
|
14257
|
+
}
|
14258
|
+
|
14259
|
+
if (typeof actionContext === 'undefined') {
|
14260
|
+
actionContext = get(this, 'actionContextObject') || this;
|
14261
|
+
}
|
14098
14262
|
|
14099
14263
|
if (target && action) {
|
14100
14264
|
var ret;
|
14101
14265
|
|
14102
14266
|
if (target.send) {
|
14103
|
-
ret = target.send.apply(target,
|
14267
|
+
ret = target.send.apply(target, args(actionContext, action));
|
14104
14268
|
} else {
|
14105
14269
|
|
14106
|
-
ret = target[action].apply(target,
|
14270
|
+
ret = target[action].apply(target, args(actionContext));
|
14107
14271
|
}
|
14108
14272
|
|
14109
14273
|
if (ret !== false) ret = true;
|
@@ -14494,6 +14658,7 @@ function installPromise(proxy, promise) {
|
|
14494
14658
|
|
14495
14659
|
If the controller is backing a template, the attributes are
|
14496
14660
|
bindable from within that template
|
14661
|
+
|
14497
14662
|
```handlebars
|
14498
14663
|
{{#if isPending}}
|
14499
14664
|
loading...
|
@@ -14517,7 +14682,7 @@ Ember.PromiseProxyMixin = Ember.Mixin.create({
|
|
14517
14682
|
installPromise(this, promise);
|
14518
14683
|
return promise;
|
14519
14684
|
} else {
|
14520
|
-
throw new Error("PromiseProxy's promise must be set");
|
14685
|
+
throw new Ember.Error("PromiseProxy's promise must be set");
|
14521
14686
|
}
|
14522
14687
|
}),
|
14523
14688
|
|
@@ -14560,9 +14725,9 @@ Ember.TrackedArray = function (items) {
|
|
14560
14725
|
var length = get(items, 'length');
|
14561
14726
|
|
14562
14727
|
if (length) {
|
14563
|
-
this.
|
14728
|
+
this._operations = [new ArrayOperation(RETAIN, length, items)];
|
14564
14729
|
} else {
|
14565
|
-
this.
|
14730
|
+
this._operations = [];
|
14566
14731
|
}
|
14567
14732
|
};
|
14568
14733
|
|
@@ -14580,8 +14745,10 @@ Ember.TrackedArray.prototype = {
|
|
14580
14745
|
@param newItems
|
14581
14746
|
*/
|
14582
14747
|
addItems: function (index, newItems) {
|
14583
|
-
var count = get(newItems, 'length')
|
14584
|
-
|
14748
|
+
var count = get(newItems, 'length');
|
14749
|
+
if (count < 1) { return; }
|
14750
|
+
|
14751
|
+
var match = this._findArrayOperation(index),
|
14585
14752
|
arrayOperation = match.operation,
|
14586
14753
|
arrayOperationIndex = match.index,
|
14587
14754
|
arrayOperationRangeStart = match.rangeStart,
|
@@ -14596,7 +14763,7 @@ Ember.TrackedArray.prototype = {
|
|
14596
14763
|
if (arrayOperation) {
|
14597
14764
|
if (!match.split) {
|
14598
14765
|
// insert left of arrayOperation
|
14599
|
-
this.
|
14766
|
+
this._operations.splice(arrayOperationIndex, 0, newArrayOperation);
|
14600
14767
|
composeIndex = arrayOperationIndex;
|
14601
14768
|
} else {
|
14602
14769
|
this._split(arrayOperationIndex, index - arrayOperationRangeStart, newArrayOperation);
|
@@ -14604,7 +14771,7 @@ Ember.TrackedArray.prototype = {
|
|
14604
14771
|
}
|
14605
14772
|
} else {
|
14606
14773
|
// insert at end
|
14607
|
-
this.
|
14774
|
+
this._operations.push(newArrayOperation);
|
14608
14775
|
composeIndex = arrayOperationIndex;
|
14609
14776
|
}
|
14610
14777
|
|
@@ -14619,6 +14786,8 @@ Ember.TrackedArray.prototype = {
|
|
14619
14786
|
@param count
|
14620
14787
|
*/
|
14621
14788
|
removeItems: function (index, count) {
|
14789
|
+
if (count < 1) { return; }
|
14790
|
+
|
14622
14791
|
var match = this._findArrayOperation(index),
|
14623
14792
|
arrayOperation = match.operation,
|
14624
14793
|
arrayOperationIndex = match.index,
|
@@ -14629,7 +14798,7 @@ Ember.TrackedArray.prototype = {
|
|
14629
14798
|
newArrayOperation = new ArrayOperation(DELETE, count);
|
14630
14799
|
if (!match.split) {
|
14631
14800
|
// insert left of arrayOperation
|
14632
|
-
this.
|
14801
|
+
this._operations.splice(arrayOperationIndex, 0, newArrayOperation);
|
14633
14802
|
composeIndex = arrayOperationIndex;
|
14634
14803
|
} else {
|
14635
14804
|
this._split(arrayOperationIndex, index - arrayOperationRangeStart, newArrayOperation);
|
@@ -14644,30 +14813,29 @@ Ember.TrackedArray.prototype = {
|
|
14644
14813
|
items in the array.
|
14645
14814
|
|
14646
14815
|
`callback` will be called for each operation and will be passed the following arguments:
|
14647
|
-
|
14648
|
-
|
14649
|
-
|
14650
|
-
|
14651
|
-
|
14816
|
+
* {array} items The items for the given operation
|
14817
|
+
* {number} offset The computed offset of the items, ie the index in the
|
14818
|
+
array of the first item for this operation.
|
14819
|
+
* {string} operation The type of the operation. One of
|
14820
|
+
`Ember.TrackedArray.{RETAIN, DELETE, INSERT}`
|
14652
14821
|
|
14653
14822
|
@method apply
|
14654
|
-
|
14655
14823
|
@param {function} callback
|
14656
14824
|
*/
|
14657
14825
|
apply: function (callback) {
|
14658
14826
|
var items = [],
|
14659
14827
|
offset = 0;
|
14660
14828
|
|
14661
|
-
forEach(this.
|
14662
|
-
callback(arrayOperation.items, offset, arrayOperation.
|
14829
|
+
forEach(this._operations, function (arrayOperation) {
|
14830
|
+
callback(arrayOperation.items, offset, arrayOperation.type);
|
14663
14831
|
|
14664
|
-
if (arrayOperation.
|
14832
|
+
if (arrayOperation.type !== DELETE) {
|
14665
14833
|
offset += arrayOperation.count;
|
14666
14834
|
items = items.concat(arrayOperation.items);
|
14667
14835
|
}
|
14668
14836
|
});
|
14669
14837
|
|
14670
|
-
this.
|
14838
|
+
this._operations = [new ArrayOperation(RETAIN, items.length, items)];
|
14671
14839
|
},
|
14672
14840
|
|
14673
14841
|
/**
|
@@ -14689,10 +14857,10 @@ Ember.TrackedArray.prototype = {
|
|
14689
14857
|
|
14690
14858
|
// OPTIMIZE: we could search these faster if we kept a balanced tree.
|
14691
14859
|
// find leftmost arrayOperation to the right of `index`
|
14692
|
-
for (arrayOperationIndex = arrayOperationRangeStart = 0, len = this.
|
14693
|
-
arrayOperation = this.
|
14860
|
+
for (arrayOperationIndex = arrayOperationRangeStart = 0, len = this._operations.length; arrayOperationIndex < len; ++arrayOperationIndex) {
|
14861
|
+
arrayOperation = this._operations[arrayOperationIndex];
|
14694
14862
|
|
14695
|
-
if (arrayOperation.
|
14863
|
+
if (arrayOperation.type === DELETE) { continue; }
|
14696
14864
|
|
14697
14865
|
arrayOperationRangeEnd = arrayOperationRangeStart + arrayOperation.count - 1;
|
14698
14866
|
|
@@ -14710,25 +14878,24 @@ Ember.TrackedArray.prototype = {
|
|
14710
14878
|
},
|
14711
14879
|
|
14712
14880
|
_split: function (arrayOperationIndex, splitIndex, newArrayOperation) {
|
14713
|
-
var arrayOperation = this.
|
14881
|
+
var arrayOperation = this._operations[arrayOperationIndex],
|
14714
14882
|
splitItems = arrayOperation.items.slice(splitIndex),
|
14715
|
-
splitArrayOperation = new ArrayOperation(arrayOperation.
|
14883
|
+
splitArrayOperation = new ArrayOperation(arrayOperation.type, splitItems.length, splitItems);
|
14716
14884
|
|
14717
14885
|
// truncate LHS
|
14718
14886
|
arrayOperation.count = splitIndex;
|
14719
14887
|
arrayOperation.items = arrayOperation.items.slice(0, splitIndex);
|
14720
14888
|
|
14721
|
-
this.
|
14889
|
+
this._operations.splice(arrayOperationIndex + 1, 0, newArrayOperation, splitArrayOperation);
|
14722
14890
|
},
|
14723
14891
|
|
14724
|
-
// TODO: unify _composeInsert, _composeDelete
|
14725
14892
|
// see SubArray for a better implementation.
|
14726
14893
|
_composeInsert: function (index) {
|
14727
|
-
var newArrayOperation = this.
|
14728
|
-
leftArrayOperation = this.
|
14729
|
-
rightArrayOperation = this.
|
14730
|
-
leftOp = leftArrayOperation && leftArrayOperation.
|
14731
|
-
rightOp = rightArrayOperation && rightArrayOperation.
|
14894
|
+
var newArrayOperation = this._operations[index],
|
14895
|
+
leftArrayOperation = this._operations[index-1], // may be undefined
|
14896
|
+
rightArrayOperation = this._operations[index+1], // may be undefined
|
14897
|
+
leftOp = leftArrayOperation && leftArrayOperation.type,
|
14898
|
+
rightOp = rightArrayOperation && rightArrayOperation.type;
|
14732
14899
|
|
14733
14900
|
if (leftOp === INSERT) {
|
14734
14901
|
// merge left
|
@@ -14736,30 +14903,31 @@ Ember.TrackedArray.prototype = {
|
|
14736
14903
|
leftArrayOperation.items = leftArrayOperation.items.concat(newArrayOperation.items);
|
14737
14904
|
|
14738
14905
|
if (rightOp === INSERT) {
|
14739
|
-
// also merge right
|
14906
|
+
// also merge right (we have split an insert with an insert)
|
14740
14907
|
leftArrayOperation.count += rightArrayOperation.count;
|
14741
14908
|
leftArrayOperation.items = leftArrayOperation.items.concat(rightArrayOperation.items);
|
14742
|
-
this.
|
14909
|
+
this._operations.splice(index, 2);
|
14743
14910
|
} else {
|
14744
14911
|
// only merge left
|
14745
|
-
this.
|
14912
|
+
this._operations.splice(index, 1);
|
14746
14913
|
}
|
14747
14914
|
} else if (rightOp === INSERT) {
|
14748
14915
|
// merge right
|
14749
14916
|
newArrayOperation.count += rightArrayOperation.count;
|
14750
14917
|
newArrayOperation.items = newArrayOperation.items.concat(rightArrayOperation.items);
|
14751
|
-
this.
|
14918
|
+
this._operations.splice(index + 1, 1);
|
14752
14919
|
}
|
14753
14920
|
},
|
14754
14921
|
|
14755
14922
|
_composeDelete: function (index) {
|
14756
|
-
var arrayOperation = this.
|
14923
|
+
var arrayOperation = this._operations[index],
|
14757
14924
|
deletesToGo = arrayOperation.count,
|
14758
|
-
leftArrayOperation = this.
|
14759
|
-
leftOp = leftArrayOperation && leftArrayOperation.
|
14925
|
+
leftArrayOperation = this._operations[index-1], // may be undefined
|
14926
|
+
leftOp = leftArrayOperation && leftArrayOperation.type,
|
14760
14927
|
nextArrayOperation,
|
14761
14928
|
nextOp,
|
14762
14929
|
nextCount,
|
14930
|
+
removeNewAndNextOp = false,
|
14763
14931
|
removedItems = [];
|
14764
14932
|
|
14765
14933
|
if (leftOp === DELETE) {
|
@@ -14768,8 +14936,8 @@ Ember.TrackedArray.prototype = {
|
|
14768
14936
|
}
|
14769
14937
|
|
14770
14938
|
for (var i = index + 1; deletesToGo > 0; ++i) {
|
14771
|
-
nextArrayOperation = this.
|
14772
|
-
nextOp = nextArrayOperation.
|
14939
|
+
nextArrayOperation = this._operations[i];
|
14940
|
+
nextOp = nextArrayOperation.type;
|
14773
14941
|
nextCount = nextArrayOperation.count;
|
14774
14942
|
|
14775
14943
|
if (nextOp === DELETE) {
|
@@ -14778,6 +14946,7 @@ Ember.TrackedArray.prototype = {
|
|
14778
14946
|
}
|
14779
14947
|
|
14780
14948
|
if (nextCount > deletesToGo) {
|
14949
|
+
// d:2 {r,i}:5 we reduce the retain or insert, but it stays
|
14781
14950
|
removedItems = removedItems.concat(nextArrayOperation.items.splice(0, deletesToGo));
|
14782
14951
|
nextArrayOperation.count -= deletesToGo;
|
14783
14952
|
|
@@ -14789,29 +14958,57 @@ Ember.TrackedArray.prototype = {
|
|
14789
14958
|
|
14790
14959
|
deletesToGo = 0;
|
14791
14960
|
} else {
|
14961
|
+
if (nextCount === deletesToGo) {
|
14962
|
+
// Handle edge case of d:2 i:2 in which case both operations go away
|
14963
|
+
// during composition.
|
14964
|
+
removeNewAndNextOp = true;
|
14965
|
+
}
|
14792
14966
|
removedItems = removedItems.concat(nextArrayOperation.items);
|
14793
14967
|
deletesToGo -= nextCount;
|
14794
14968
|
}
|
14795
14969
|
|
14796
14970
|
if (nextOp === INSERT) {
|
14971
|
+
// d:2 i:3 will result in delete going away
|
14797
14972
|
arrayOperation.count -= nextCount;
|
14798
14973
|
}
|
14799
14974
|
}
|
14800
14975
|
|
14801
14976
|
if (arrayOperation.count > 0) {
|
14802
|
-
|
14977
|
+
// compose our new delete with possibly several operations to the right of
|
14978
|
+
// disparate types
|
14979
|
+
this._operations.splice(index+1, i-1-index);
|
14803
14980
|
} else {
|
14804
14981
|
// The delete operation can go away; it has merely reduced some other
|
14805
|
-
// operation, as in
|
14806
|
-
|
14982
|
+
// operation, as in d:3 i:4; it may also have eliminated that operation,
|
14983
|
+
// as in d:3 i:3.
|
14984
|
+
this._operations.splice(index, removeNewAndNextOp ? 2 : 1);
|
14807
14985
|
}
|
14808
14986
|
|
14809
14987
|
return removedItems;
|
14988
|
+
},
|
14989
|
+
|
14990
|
+
toString: function () {
|
14991
|
+
var str = "";
|
14992
|
+
forEach(this._operations, function (operation) {
|
14993
|
+
str += " " + operation.type + ":" + operation.count;
|
14994
|
+
});
|
14995
|
+
return str.substring(1);
|
14810
14996
|
}
|
14811
14997
|
};
|
14812
14998
|
|
14999
|
+
/**
|
15000
|
+
Internal data structure to represent an array operation.
|
15001
|
+
|
15002
|
+
@method ArrayOperation
|
15003
|
+
@private
|
15004
|
+
@property {string} type The type of the operation. One of
|
15005
|
+
`Ember.TrackedArray.{RETAIN, INSERT, DELETE}`
|
15006
|
+
@property {number} count The number of items in this operation.
|
15007
|
+
@property {array} items The items of the operation, if included. RETAIN and
|
15008
|
+
INSERT include their items, DELETE does not.
|
15009
|
+
*/
|
14813
15010
|
function ArrayOperation (operation, count, items) {
|
14814
|
-
this.
|
15011
|
+
this.type = operation; // RETAIN | INSERT | DELETE
|
14815
15012
|
this.count = count;
|
14816
15013
|
this.items = items;
|
14817
15014
|
}
|
@@ -14879,7 +15076,7 @@ Ember.SubArray.prototype = {
|
|
14879
15076
|
@param {number} index The index of the item in the tracked array.
|
14880
15077
|
@param {boolean} match `true` iff the item is included in the subarray.
|
14881
15078
|
|
14882
|
-
@
|
15079
|
+
@return {number} The index of the item in the subarray.
|
14883
15080
|
*/
|
14884
15081
|
addItem: function(index, match) {
|
14885
15082
|
var returnValue = -1,
|
@@ -14931,7 +15128,7 @@ Ember.SubArray.prototype = {
|
|
14931
15128
|
|
14932
15129
|
@param {number} index The index of the item in the tracked array.
|
14933
15130
|
|
14934
|
-
@
|
15131
|
+
@return {number} The index of the item in the subarray, or `-1` if the item
|
14935
15132
|
was not in the subarray.
|
14936
15133
|
*/
|
14937
15134
|
removeItem: function(index) {
|
@@ -14949,6 +15146,8 @@ Ember.SubArray.prototype = {
|
|
14949
15146
|
self._operations.splice(operationIndex, 1);
|
14950
15147
|
self._composeAt(operationIndex);
|
14951
15148
|
}
|
15149
|
+
}, function() {
|
15150
|
+
throw new Ember.Error("Can't remove an item that has never been added.");
|
14952
15151
|
});
|
14953
15152
|
|
14954
15153
|
return returnValue;
|
@@ -14995,6 +15194,7 @@ Ember.SubArray.prototype = {
|
|
14995
15194
|
if (otherOp.type === op.type) {
|
14996
15195
|
op.count += otherOp.count;
|
14997
15196
|
this._operations.splice(index-1, 1);
|
15197
|
+
--index;
|
14998
15198
|
}
|
14999
15199
|
}
|
15000
15200
|
|
@@ -15090,7 +15290,11 @@ function makeCtor() {
|
|
15090
15290
|
var properties = props[i];
|
15091
15291
|
|
15092
15292
|
|
15093
|
-
|
15293
|
+
if (Ember.typeOf(properties) !== 'object') { continue; }
|
15294
|
+
|
15295
|
+
var keyNames = Ember.keys(properties);
|
15296
|
+
for (var j = 0, ll = keyNames.length; j < ll; j++) {
|
15297
|
+
var keyName = keyNames[j];
|
15094
15298
|
if (!properties.hasOwnProperty(keyName)) { continue; }
|
15095
15299
|
|
15096
15300
|
var value = properties[keyName],
|
@@ -15275,7 +15479,10 @@ CoreObject.PrototypeMixin = Mixin.create({
|
|
15275
15479
|
are also concatenated, in addition to `classNames`.
|
15276
15480
|
|
15277
15481
|
This feature is available for you to use throughout the Ember object model,
|
15278
|
-
although typical app developers are likely to use it infrequently.
|
15482
|
+
although typical app developers are likely to use it infrequently. Since
|
15483
|
+
it changes expectations about behavior of properties, you should properly
|
15484
|
+
document its usage in each individual concatenated property (to not
|
15485
|
+
mislead your users to think they can override the property in a subclass).
|
15279
15486
|
|
15280
15487
|
@property concatenatedProperties
|
15281
15488
|
@type Array
|
@@ -15415,6 +15622,86 @@ var ClassMixin = Mixin.create({
|
|
15415
15622
|
|
15416
15623
|
isMethod: false,
|
15417
15624
|
|
15625
|
+
/**
|
15626
|
+
Creates a new subclass.
|
15627
|
+
|
15628
|
+
```javascript
|
15629
|
+
App.Person = Ember.Object.extend({
|
15630
|
+
say: function(thing) {
|
15631
|
+
alert(thing);
|
15632
|
+
}
|
15633
|
+
});
|
15634
|
+
```
|
15635
|
+
|
15636
|
+
This defines a new subclass of Ember.Object: `App.Person`. It contains one method: `say()`.
|
15637
|
+
|
15638
|
+
You can also create a subclass from any existing class by calling its `extend()` method. For example, you might want to create a subclass of Ember's built-in `Ember.View` class:
|
15639
|
+
|
15640
|
+
```javascript
|
15641
|
+
App.PersonView = Ember.View.extend({
|
15642
|
+
tagName: 'li',
|
15643
|
+
classNameBindings: ['isAdministrator']
|
15644
|
+
});
|
15645
|
+
```
|
15646
|
+
|
15647
|
+
When defining a subclass, you can override methods but still access the implementation of your parent class by calling the special `_super()` method:
|
15648
|
+
|
15649
|
+
```javascript
|
15650
|
+
App.Person = Ember.Object.extend({
|
15651
|
+
say: function(thing) {
|
15652
|
+
var name = this.get('name');
|
15653
|
+
alert(name + ' says: ' + thing);
|
15654
|
+
}
|
15655
|
+
});
|
15656
|
+
|
15657
|
+
App.Soldier = App.Person.extend({
|
15658
|
+
say: function(thing) {
|
15659
|
+
this._super(thing + ", sir!");
|
15660
|
+
},
|
15661
|
+
march: function(numberOfHours) {
|
15662
|
+
alert(this.get('name') + ' marches for ' + numberOfHours + ' hours.')
|
15663
|
+
}
|
15664
|
+
});
|
15665
|
+
|
15666
|
+
var yehuda = App.Soldier.create({
|
15667
|
+
name: "Yehuda Katz"
|
15668
|
+
});
|
15669
|
+
|
15670
|
+
yehuda.say("Yes"); // alerts "Yehuda Katz says: Yes, sir!"
|
15671
|
+
```
|
15672
|
+
|
15673
|
+
The `create()` on line #17 creates an *instance* of the `App.Soldier` class. The `extend()` on line #8 creates a *subclass* of `App.Person`. Any instance of the `App.Person` class will *not* have the `march()` method.
|
15674
|
+
|
15675
|
+
You can also pass `Ember.Mixin` classes to add additional properties to the subclass.
|
15676
|
+
|
15677
|
+
```javascript
|
15678
|
+
App.Person = Ember.Object.extend({
|
15679
|
+
say: function(thing) {
|
15680
|
+
alert(this.get('name') + ' says: ' + thing);
|
15681
|
+
}
|
15682
|
+
});
|
15683
|
+
|
15684
|
+
App.SingingMixin = Ember.Mixin.create({
|
15685
|
+
sing: function(thing){
|
15686
|
+
alert(this.get('name') + ' sings: la la la ' + thing);
|
15687
|
+
}
|
15688
|
+
});
|
15689
|
+
|
15690
|
+
App.BroadwayStar = App.Person.extend(App.SingingMixin, {
|
15691
|
+
dance: function() {
|
15692
|
+
alert(this.get('name') + ' dances: tap tap tap tap ');
|
15693
|
+
}
|
15694
|
+
});
|
15695
|
+
```
|
15696
|
+
|
15697
|
+
The `App.BroadwayStar` class contains three methods: `say()`, `sing()`, and `dance()`.
|
15698
|
+
|
15699
|
+
@method extend
|
15700
|
+
@static
|
15701
|
+
|
15702
|
+
@param {Ember.Mixin} [mixins]* One or more Ember.Mixin classes
|
15703
|
+
@param {Object} [arguments]* Object containing values to use within the new class
|
15704
|
+
*/
|
15418
15705
|
extend: function() {
|
15419
15706
|
var Class = makeCtor(), proto;
|
15420
15707
|
Class.ClassMixin = Mixin.create(this.ClassMixin);
|
@@ -15546,6 +15833,39 @@ var ClassMixin = Mixin.create({
|
|
15546
15833
|
MyObject.canBuild; // false
|
15547
15834
|
o = MyObject.create();
|
15548
15835
|
```
|
15836
|
+
|
15837
|
+
In other words, this creates static properties and functions for the class. These are only available on the class
|
15838
|
+
and not on any instance of that class.
|
15839
|
+
|
15840
|
+
```javascript
|
15841
|
+
App.Person = Ember.Object.extend({
|
15842
|
+
name : "",
|
15843
|
+
sayHello : function(){
|
15844
|
+
alert("Hello. My name is " + this.get('name'));
|
15845
|
+
}
|
15846
|
+
});
|
15847
|
+
|
15848
|
+
App.Person.reopenClass({
|
15849
|
+
species : "Homo sapiens",
|
15850
|
+
createPerson: function(newPersonsName){
|
15851
|
+
return App.Person.create({
|
15852
|
+
name:newPersonsName
|
15853
|
+
});
|
15854
|
+
}
|
15855
|
+
});
|
15856
|
+
|
15857
|
+
var tom = App.Person.create({
|
15858
|
+
name : "Tom Dale"
|
15859
|
+
});
|
15860
|
+
var yehuda = App.Person.createPerson("Yehuda Katz");
|
15861
|
+
|
15862
|
+
tom.sayHello(); // "Hello. My name is Tom Dale"
|
15863
|
+
yehuda.sayHello(); // "Hello. My name is Yehuda Katz"
|
15864
|
+
alert(App.Person.species); // "Homo sapiens"
|
15865
|
+
```
|
15866
|
+
|
15867
|
+
Note that `species` and `createPerson` are *not* valid on the `tom` and `yehuda`
|
15868
|
+
variables. They are only valid on `App.Person`.
|
15549
15869
|
|
15550
15870
|
To add functions and properties to instances of
|
15551
15871
|
a constructor by extending the constructor's prototype
|
@@ -16108,7 +16428,7 @@ Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,/** @scope Ember.Array
|
|
16108
16428
|
},
|
16109
16429
|
|
16110
16430
|
_insertAt: function(idx, object) {
|
16111
|
-
if (idx > get(this, 'content.length')) throw new Error(OUT_OF_RANGE_EXCEPTION);
|
16431
|
+
if (idx > get(this, 'content.length')) throw new Ember.Error(OUT_OF_RANGE_EXCEPTION);
|
16112
16432
|
this._replace(idx, 0, [object]);
|
16113
16433
|
return this;
|
16114
16434
|
},
|
@@ -16128,7 +16448,7 @@ Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray,/** @scope Ember.Array
|
|
16128
16448
|
indices = [], i;
|
16129
16449
|
|
16130
16450
|
if ((start < 0) || (start >= get(this, 'length'))) {
|
16131
|
-
throw new Error(OUT_OF_RANGE_EXCEPTION);
|
16451
|
+
throw new Ember.Error(OUT_OF_RANGE_EXCEPTION);
|
16132
16452
|
}
|
16133
16453
|
|
16134
16454
|
if (len === undefined) len = 1;
|
@@ -16895,7 +17215,7 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
|
|
16895
17215
|
@return {Ember.Set} An empty Set
|
16896
17216
|
*/
|
16897
17217
|
clear: function() {
|
16898
|
-
if (this.isFrozen) { throw new Error(Ember.FROZEN_ERROR); }
|
17218
|
+
if (this.isFrozen) { throw new Ember.Error(Ember.FROZEN_ERROR); }
|
16899
17219
|
|
16900
17220
|
var len = get(this, 'length');
|
16901
17221
|
if (len === 0) { return this; }
|
@@ -17005,7 +17325,7 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
|
|
17005
17325
|
@return {Object} The removed object from the set or null.
|
17006
17326
|
*/
|
17007
17327
|
pop: function() {
|
17008
|
-
if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
|
17328
|
+
if (get(this, 'isFrozen')) throw new Ember.Error(Ember.FROZEN_ERROR);
|
17009
17329
|
var obj = this.length > 0 ? this[this.length-1] : null;
|
17010
17330
|
this.remove(obj);
|
17011
17331
|
return obj;
|
@@ -17122,7 +17442,7 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
|
|
17122
17442
|
|
17123
17443
|
// implements Ember.MutableEnumerable
|
17124
17444
|
addObject: function(obj) {
|
17125
|
-
if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
|
17445
|
+
if (get(this, 'isFrozen')) throw new Ember.Error(Ember.FROZEN_ERROR);
|
17126
17446
|
if (isNone(obj)) return this; // nothing to do
|
17127
17447
|
|
17128
17448
|
var guid = guidFor(obj),
|
@@ -17150,7 +17470,7 @@ Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Emb
|
|
17150
17470
|
|
17151
17471
|
// implements Ember.MutableEnumerable
|
17152
17472
|
removeObject: function(obj) {
|
17153
|
-
if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR);
|
17473
|
+
if (get(this, 'isFrozen')) throw new Ember.Error(Ember.FROZEN_ERROR);
|
17154
17474
|
if (isNone(obj)) return this; // nothing to do
|
17155
17475
|
|
17156
17476
|
var guid = guidFor(obj),
|
@@ -17856,7 +18176,7 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
|
|
17856
18176
|
fullName = "controller:" + controllerClass;
|
17857
18177
|
|
17858
18178
|
if (!container.has(fullName)) {
|
17859
|
-
throw new Error('Could not resolve itemController: "' + controllerClass + '"');
|
18179
|
+
throw new Ember.Error('Could not resolve itemController: "' + controllerClass + '"');
|
17860
18180
|
}
|
17861
18181
|
|
17862
18182
|
subController = container.lookupFactory(fullName).create({
|
@@ -18178,6 +18498,19 @@ function escapeAttribute(value) {
|
|
18178
18498
|
return string.replace(BAD_CHARS_REGEXP, escapeChar);
|
18179
18499
|
}
|
18180
18500
|
|
18501
|
+
// IE 6/7 have bugs arond setting names on inputs during creation.
|
18502
|
+
// From http://msdn.microsoft.com/en-us/library/ie/ms536389(v=vs.85).aspx:
|
18503
|
+
// "To include the NAME attribute at run time on objects created with the createElement method, use the eTag."
|
18504
|
+
var canSetNameOnInputs = (function() {
|
18505
|
+
var div = document.createElement('div'),
|
18506
|
+
el = document.createElement('input');
|
18507
|
+
|
18508
|
+
el.setAttribute('name', 'foo');
|
18509
|
+
div.appendChild(el);
|
18510
|
+
|
18511
|
+
return !!div.innerHTML.match('foo');
|
18512
|
+
})();
|
18513
|
+
|
18181
18514
|
/**
|
18182
18515
|
`Ember.RenderBuffer` gathers information regarding the a view and generates the
|
18183
18516
|
final representation. `Ember.RenderBuffer` will generate HTML which can be pushed
|
@@ -18537,14 +18870,22 @@ Ember._RenderBuffer.prototype =
|
|
18537
18870
|
|
18538
18871
|
generateElement: function() {
|
18539
18872
|
var tagName = this.tagNames.pop(), // pop since we don't need to close
|
18540
|
-
element = document.createElement(tagName),
|
18541
|
-
$element = Ember.$(element),
|
18542
18873
|
id = this.elementId,
|
18543
18874
|
classes = this.classes,
|
18544
18875
|
attrs = this.elementAttributes,
|
18545
18876
|
props = this.elementProperties,
|
18546
18877
|
style = this.elementStyle,
|
18547
|
-
styleBuffer = '', attr, prop;
|
18878
|
+
styleBuffer = '', attr, prop, tagString;
|
18879
|
+
|
18880
|
+
if (attrs && attrs.name && !canSetNameOnInputs) {
|
18881
|
+
// IE allows passing a tag to createElement. See note on `canSetNameOnInputs` above as well.
|
18882
|
+
tagString = '<'+stripTagName(tagName)+' name="'+escapeAttribute(attrs.name)+'">';
|
18883
|
+
} else {
|
18884
|
+
tagString = tagName;
|
18885
|
+
}
|
18886
|
+
|
18887
|
+
var element = document.createElement(tagString),
|
18888
|
+
$element = Ember.$(element);
|
18548
18889
|
|
18549
18890
|
if (id) {
|
18550
18891
|
$element.attr('id', id);
|
@@ -18937,6 +19278,7 @@ var get = Ember.get, set = Ember.set;
|
|
18937
19278
|
var guidFor = Ember.guidFor;
|
18938
19279
|
var a_forEach = Ember.EnumerableUtils.forEach;
|
18939
19280
|
var a_addObject = Ember.EnumerableUtils.addObject;
|
19281
|
+
var meta = Ember.meta;
|
18940
19282
|
|
18941
19283
|
var childViewsProperty = Ember.computed(function() {
|
18942
19284
|
var childViews = this._childViews, ret = Ember.A(), view = this;
|
@@ -18957,7 +19299,7 @@ var childViewsProperty = Ember.computed(function() {
|
|
18957
19299
|
|
18958
19300
|
return view.replace(idx, removedCount, addedViews);
|
18959
19301
|
}
|
18960
|
-
throw new Error("childViews is immutable");
|
19302
|
+
throw new Ember.Error("childViews is immutable");
|
18961
19303
|
};
|
18962
19304
|
|
18963
19305
|
return ret;
|
@@ -20643,8 +20985,8 @@ Ember.View = Ember.CoreView.extend(
|
|
20643
20985
|
If you write a `willDestroyElement()` handler, you can assume that your
|
20644
20986
|
`didInsertElement()` handler was called earlier for the same element.
|
20645
20987
|
|
20646
|
-
|
20647
|
-
want to implement the above callbacks
|
20988
|
+
You should not call or override this method yourself, but you may
|
20989
|
+
want to implement the above callbacks.
|
20648
20990
|
|
20649
20991
|
@method destroyElement
|
20650
20992
|
@return {Ember.View} receiver
|
@@ -20681,12 +21023,6 @@ Ember.View = Ember.CoreView.extend(
|
|
20681
21023
|
return viewCollection;
|
20682
21024
|
},
|
20683
21025
|
|
20684
|
-
_elementWillChange: Ember.beforeObserver(function() {
|
20685
|
-
this.forEachChildView(function(view) {
|
20686
|
-
Ember.propertyWillChange(view, 'element');
|
20687
|
-
});
|
20688
|
-
}, 'element'),
|
20689
|
-
|
20690
21026
|
/**
|
20691
21027
|
@private
|
20692
21028
|
|
@@ -20698,7 +21034,7 @@ Ember.View = Ember.CoreView.extend(
|
|
20698
21034
|
*/
|
20699
21035
|
_elementDidChange: Ember.observer(function() {
|
20700
21036
|
this.forEachChildView(function(view) {
|
20701
|
-
|
21037
|
+
delete meta(view).cache.element;
|
20702
21038
|
});
|
20703
21039
|
}, 'element'),
|
20704
21040
|
|
@@ -21143,6 +21479,7 @@ Ember.View = Ember.CoreView.extend(
|
|
21143
21479
|
|
21144
21480
|
if (priorState && priorState.exit) { priorState.exit(this); }
|
21145
21481
|
if (currentState.enter) { currentState.enter(this); }
|
21482
|
+
if (state === 'inDOM') { delete Ember.meta(this).cache.element; }
|
21146
21483
|
|
21147
21484
|
if (children !== false) {
|
21148
21485
|
this.forEachChildView(function(view) {
|
@@ -21174,6 +21511,10 @@ Ember.View = Ember.CoreView.extend(
|
|
21174
21511
|
target = null;
|
21175
21512
|
}
|
21176
21513
|
|
21514
|
+
if (!root || typeof root !== 'object') {
|
21515
|
+
return;
|
21516
|
+
}
|
21517
|
+
|
21177
21518
|
var view = this,
|
21178
21519
|
stateCheckedObserver = function() {
|
21179
21520
|
view.currentState.invokeObserver(this, observer);
|
@@ -21490,10 +21831,18 @@ Ember.merge(preRender, {
|
|
21490
21831
|
var viewCollection = view.viewHierarchyCollection();
|
21491
21832
|
|
21492
21833
|
viewCollection.trigger('willInsertElement');
|
21493
|
-
|
21834
|
+
|
21494
21835
|
fn.call(view);
|
21495
|
-
|
21496
|
-
|
21836
|
+
|
21837
|
+
// We transition to `inDOM` if the element exists in the DOM
|
21838
|
+
var element = view.get('element');
|
21839
|
+
while (element = element.parentNode) {
|
21840
|
+
if (element === document) {
|
21841
|
+
viewCollection.transitionTo('inDOM', false);
|
21842
|
+
viewCollection.trigger('didInsertElement');
|
21843
|
+
}
|
21844
|
+
}
|
21845
|
+
|
21497
21846
|
},
|
21498
21847
|
|
21499
21848
|
renderToBufferIfNeeded: function(view, buffer) {
|
@@ -21702,7 +22051,7 @@ Ember.merge(inDOM, {
|
|
21702
22051
|
}
|
21703
22052
|
|
21704
22053
|
view.addBeforeObserver('elementId', function() {
|
21705
|
-
throw new Error("Changing a view's elementId after creation is not allowed");
|
22054
|
+
throw new Ember.Error("Changing a view's elementId after creation is not allowed");
|
21706
22055
|
});
|
21707
22056
|
},
|
21708
22057
|
|
@@ -21942,30 +22291,6 @@ var ViewCollection = Ember._ViewCollection;
|
|
21942
22291
|
or layout being rendered. The HTML contents of a `Ember.ContainerView`'s DOM
|
21943
22292
|
representation will only be the rendered HTML of its child views.
|
21944
22293
|
|
21945
|
-
## Binding a View to Display
|
21946
|
-
|
21947
|
-
If you would like to display a single view in your ContainerView, you can set
|
21948
|
-
its `currentView` property. When the `currentView` property is set to a view
|
21949
|
-
instance, it will be added to the ContainerView. If the `currentView` property
|
21950
|
-
is later changed to a different view, the new view will replace the old view.
|
21951
|
-
If `currentView` is set to `null`, the last `currentView` will be removed.
|
21952
|
-
|
21953
|
-
This functionality is useful for cases where you want to bind the display of
|
21954
|
-
a ContainerView to a controller or state manager. For example, you can bind
|
21955
|
-
the `currentView` of a container to a controller like this:
|
21956
|
-
|
21957
|
-
```javascript
|
21958
|
-
App.appController = Ember.Object.create({
|
21959
|
-
view: Ember.View.create({
|
21960
|
-
templateName: 'person_template'
|
21961
|
-
})
|
21962
|
-
});
|
21963
|
-
```
|
21964
|
-
|
21965
|
-
```handlebars
|
21966
|
-
{{view Ember.ContainerView currentViewBinding="App.appController.view"}}
|
21967
|
-
```
|
21968
|
-
|
21969
22294
|
@class ContainerView
|
21970
22295
|
@namespace Ember
|
21971
22296
|
@extends Ember.View
|
@@ -22150,7 +22475,7 @@ Ember.merge(states._default, {
|
|
22150
22475
|
|
22151
22476
|
Ember.merge(states.inBuffer, {
|
22152
22477
|
childViewsDidChange: function(parentView, views, start, added) {
|
22153
|
-
throw new Error('You cannot modify child views while in the inBuffer state');
|
22478
|
+
throw new Ember.Error('You cannot modify child views while in the inBuffer state');
|
22154
22479
|
}
|
22155
22480
|
});
|
22156
22481
|
|
@@ -22641,7 +22966,9 @@ Ember.CollectionView.CONTAINER_MAP = {
|
|
22641
22966
|
|
22642
22967
|
|
22643
22968
|
(function() {
|
22644
|
-
var get = Ember.get, set = Ember.set, isNone = Ember.isNone
|
22969
|
+
var get = Ember.get, set = Ember.set, isNone = Ember.isNone,
|
22970
|
+
a_slice = Array.prototype.slice;
|
22971
|
+
|
22645
22972
|
|
22646
22973
|
/**
|
22647
22974
|
@module ember
|
@@ -22699,8 +23026,10 @@ var get = Ember.get, set = Ember.set, isNone = Ember.isNone;
|
|
22699
23026
|
|
22700
23027
|
```javascript
|
22701
23028
|
App.AppProfileComponent = Ember.Component.extend({
|
22702
|
-
|
22703
|
-
|
23029
|
+
actions: {
|
23030
|
+
hello: function(name) {
|
23031
|
+
console.log("Hello", name);
|
23032
|
+
}
|
22704
23033
|
}
|
22705
23034
|
});
|
22706
23035
|
```
|
@@ -22754,7 +23083,7 @@ Ember.Component = Ember.View.extend(Ember.TargetActionSupport, {
|
|
22754
23083
|
isVirtual: true,
|
22755
23084
|
tagName: '',
|
22756
23085
|
_contextView: parentView,
|
22757
|
-
template:
|
23086
|
+
template: template,
|
22758
23087
|
context: get(parentView, 'context'),
|
22759
23088
|
controller: get(parentView, 'controller'),
|
22760
23089
|
templateData: { keywords: parentView.cloneKeywords() }
|
@@ -22813,8 +23142,10 @@ Ember.Component = Ember.View.extend(Ember.TargetActionSupport, {
|
|
22813
23142
|
});
|
22814
23143
|
|
22815
23144
|
App.CategoriesController = Ember.Controller.extend({
|
22816
|
-
|
22817
|
-
|
23145
|
+
actions: {
|
23146
|
+
didClickCategory: function(category) {
|
23147
|
+
//Do something with the node/category that was clicked
|
23148
|
+
}
|
22818
23149
|
}
|
22819
23150
|
});
|
22820
23151
|
```
|
@@ -22828,8 +23159,9 @@ Ember.Component = Ember.View.extend(Ember.TargetActionSupport, {
|
|
22828
23159
|
@param [action] {String} the action to trigger
|
22829
23160
|
@param [context] {*} a context to send with the action
|
22830
23161
|
*/
|
22831
|
-
sendAction: function(action
|
22832
|
-
var actionName
|
23162
|
+
sendAction: function(action) {
|
23163
|
+
var actionName,
|
23164
|
+
contexts = a_slice.call(arguments, 1);
|
22833
23165
|
|
22834
23166
|
// Send the default action
|
22835
23167
|
if (action === undefined) {
|
@@ -22845,7 +23177,7 @@ Ember.Component = Ember.View.extend(Ember.TargetActionSupport, {
|
|
22845
23177
|
|
22846
23178
|
this.triggerAction({
|
22847
23179
|
action: actionName,
|
22848
|
-
actionContext:
|
23180
|
+
actionContext: contexts
|
22849
23181
|
});
|
22850
23182
|
}
|
22851
23183
|
});
|
@@ -23058,6 +23390,14 @@ define("metamorph",
|
|
23058
23390
|
range.insertNode(fragment);
|
23059
23391
|
};
|
23060
23392
|
|
23393
|
+
/**
|
23394
|
+
* @public
|
23395
|
+
*
|
23396
|
+
* Remove this object (including starting and ending
|
23397
|
+
* placeholders).
|
23398
|
+
*
|
23399
|
+
* @method remove
|
23400
|
+
*/
|
23061
23401
|
removeFunc = function() {
|
23062
23402
|
// get a range for the current metamorph object including
|
23063
23403
|
// the starting and ending placeholders.
|
@@ -23098,7 +23438,7 @@ define("metamorph",
|
|
23098
23438
|
};
|
23099
23439
|
|
23100
23440
|
} else {
|
23101
|
-
|
23441
|
+
/*
|
23102
23442
|
* This code is mostly taken from jQuery, with one exception. In jQuery's case, we
|
23103
23443
|
* have some HTML and we need to figure out how to convert it into some nodes.
|
23104
23444
|
*
|
@@ -23152,12 +23492,12 @@ define("metamorph",
|
|
23152
23492
|
}
|
23153
23493
|
};
|
23154
23494
|
|
23155
|
-
|
23495
|
+
/*
|
23156
23496
|
* Given a parent node and some HTML, generate a set of nodes. Return the first
|
23157
23497
|
* node, which will allow us to traverse the rest using nextSibling.
|
23158
23498
|
*
|
23159
23499
|
* We need to do this because innerHTML in IE does not really parse the nodes.
|
23160
|
-
|
23500
|
+
*/
|
23161
23501
|
var firstNodeFor = function(parentNode, html) {
|
23162
23502
|
var arr = wrapMap[parentNode.tagName.toLowerCase()] || wrapMap._default;
|
23163
23503
|
var depth = arr[0], start = arr[1], end = arr[2];
|
@@ -23190,7 +23530,7 @@ define("metamorph",
|
|
23190
23530
|
return element;
|
23191
23531
|
};
|
23192
23532
|
|
23193
|
-
|
23533
|
+
/*
|
23194
23534
|
* In some cases, Internet Explorer can create an anonymous node in
|
23195
23535
|
* the hierarchy with no tagName. You can create this scenario via:
|
23196
23536
|
*
|
@@ -23200,7 +23540,7 @@ define("metamorph",
|
|
23200
23540
|
*
|
23201
23541
|
* If our script markers are inside such a node, we need to find that
|
23202
23542
|
* node and use *it* as the marker.
|
23203
|
-
|
23543
|
+
*/
|
23204
23544
|
var realNode = function(start) {
|
23205
23545
|
while (start.parentNode.tagName === "") {
|
23206
23546
|
start = start.parentNode;
|
@@ -23209,7 +23549,7 @@ define("metamorph",
|
|
23209
23549
|
return start;
|
23210
23550
|
};
|
23211
23551
|
|
23212
|
-
|
23552
|
+
/*
|
23213
23553
|
* When automatically adding a tbody, Internet Explorer inserts the
|
23214
23554
|
* tbody immediately before the first <tr>. Other browsers create it
|
23215
23555
|
* before the first node, no matter what.
|
@@ -23236,7 +23576,8 @@ define("metamorph",
|
|
23236
23576
|
*
|
23237
23577
|
* This code reparents the first script tag by making it the tbody's
|
23238
23578
|
* first child.
|
23239
|
-
|
23579
|
+
*
|
23580
|
+
*/
|
23240
23581
|
var fixParentage = function(start, end) {
|
23241
23582
|
if (start.parentNode !== end.parentNode) {
|
23242
23583
|
end.parentNode.insertBefore(start, end.parentNode.firstChild);
|
@@ -23434,20 +23775,6 @@ if (!Handlebars && typeof require === 'function') {
|
|
23434
23775
|
*/
|
23435
23776
|
Ember.Handlebars = objectCreate(Handlebars);
|
23436
23777
|
|
23437
|
-
function makeBindings(options) {
|
23438
|
-
var hash = options.hash,
|
23439
|
-
hashType = options.hashTypes;
|
23440
|
-
|
23441
|
-
for (var prop in hash) {
|
23442
|
-
if (hashType[prop] === 'ID') {
|
23443
|
-
hash[prop + 'Binding'] = hash[prop];
|
23444
|
-
hashType[prop + 'Binding'] = 'STRING';
|
23445
|
-
delete hash[prop];
|
23446
|
-
delete hashType[prop];
|
23447
|
-
}
|
23448
|
-
}
|
23449
|
-
}
|
23450
|
-
|
23451
23778
|
/**
|
23452
23779
|
Register a bound helper or custom view helper.
|
23453
23780
|
|
@@ -23507,7 +23834,6 @@ Ember.Handlebars.helper = function(name, value) {
|
|
23507
23834
|
if (Ember.View.detect(value)) {
|
23508
23835
|
Ember.Handlebars.registerHelper(name, function(options) {
|
23509
23836
|
|
23510
|
-
makeBindings(options);
|
23511
23837
|
return Ember.Handlebars.helpers.view.call(this, value, options);
|
23512
23838
|
});
|
23513
23839
|
} else {
|
@@ -23555,7 +23881,6 @@ if (Handlebars.JavaScriptCompiler) {
|
|
23555
23881
|
|
23556
23882
|
Ember.Handlebars.JavaScriptCompiler.prototype.namespace = "Ember.Handlebars";
|
23557
23883
|
|
23558
|
-
|
23559
23884
|
Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer = function() {
|
23560
23885
|
return "''";
|
23561
23886
|
};
|
@@ -23659,7 +23984,7 @@ if (Handlebars.compile) {
|
|
23659
23984
|
|
23660
23985
|
var template = Ember.Handlebars.template(templateSpec);
|
23661
23986
|
template.isMethod = false; //Make sure we don't wrap templates with ._super
|
23662
|
-
|
23987
|
+
|
23663
23988
|
return template;
|
23664
23989
|
};
|
23665
23990
|
}
|
@@ -23927,7 +24252,8 @@ Ember.Handlebars.registerBoundHelper = function(name, fn) {
|
|
23927
24252
|
data = options.data,
|
23928
24253
|
hash = options.hash,
|
23929
24254
|
view = data.view,
|
23930
|
-
|
24255
|
+
contexts = options.contexts,
|
24256
|
+
currentContext = (contexts && contexts.length) ? contexts[0] : this,
|
23931
24257
|
prefixPathForDependentKeys = '',
|
23932
24258
|
loc, len, hashOption,
|
23933
24259
|
boundOption, property,
|
@@ -24051,7 +24377,7 @@ function evaluateUnboundHelper(context, fn, normalizedProperties, options) {
|
|
24051
24377
|
|
24052
24378
|
for(loc = 0, len = normalizedProperties.length; loc < len; ++loc) {
|
24053
24379
|
property = normalizedProperties[loc];
|
24054
|
-
args.push(Ember.Handlebars.get(
|
24380
|
+
args.push(Ember.Handlebars.get(property.root, property.path, options));
|
24055
24381
|
}
|
24056
24382
|
args.push(options);
|
24057
24383
|
return fn.apply(context, args);
|
@@ -24621,20 +24947,6 @@ function exists(value) {
|
|
24621
24947
|
return !Ember.isNone(value);
|
24622
24948
|
}
|
24623
24949
|
|
24624
|
-
function sanitizedHandlebarsGet(currentContext, property, options) {
|
24625
|
-
var result = handlebarsGet(currentContext, property, options);
|
24626
|
-
if (result === null || result === undefined) {
|
24627
|
-
result = "";
|
24628
|
-
} else if (!(result instanceof Handlebars.SafeString)) {
|
24629
|
-
result = String(result);
|
24630
|
-
}
|
24631
|
-
if (!options.hash.unescaped){
|
24632
|
-
result = Handlebars.Utils.escapeExpression(result);
|
24633
|
-
}
|
24634
|
-
|
24635
|
-
return result;
|
24636
|
-
}
|
24637
|
-
|
24638
24950
|
// Binds a property into the DOM. This will create a hook in DOM that the
|
24639
24951
|
// KVO system will look for and update if the property changes.
|
24640
24952
|
function bind(property, options, preserveContext, shouldDisplay, valueNormalizer, childProperties) {
|
@@ -24709,24 +25021,24 @@ function bind(property, options, preserveContext, shouldDisplay, valueNormalizer
|
|
24709
25021
|
}
|
24710
25022
|
}
|
24711
25023
|
|
24712
|
-
function simpleBind(property, options) {
|
25024
|
+
function simpleBind(currentContext, property, options) {
|
24713
25025
|
var data = options.data,
|
24714
25026
|
view = data.view,
|
24715
|
-
|
24716
|
-
normalized, observer;
|
25027
|
+
normalized, observer, pathRoot, output;
|
24717
25028
|
|
24718
25029
|
normalized = normalizePath(currentContext, property, data);
|
25030
|
+
pathRoot = normalized.root;
|
24719
25031
|
|
24720
25032
|
// Set up observers for observable objects
|
24721
|
-
if ('object' === typeof
|
25033
|
+
if (pathRoot && ('object' === typeof pathRoot)) {
|
24722
25034
|
if (data.insideGroup) {
|
24723
25035
|
observer = function() {
|
24724
25036
|
Ember.run.once(view, 'rerender');
|
24725
25037
|
};
|
24726
25038
|
|
24727
|
-
|
24728
|
-
|
24729
|
-
data.buffer.push(
|
25039
|
+
var result = handlebarsGet(currentContext, property, options);
|
25040
|
+
if (result === null || result === undefined) { result = ""; }
|
25041
|
+
data.buffer.push(result);
|
24730
25042
|
} else {
|
24731
25043
|
var bindView = new Ember._SimpleHandlebarsView(
|
24732
25044
|
property, currentContext, !options.hash.unescaped, options.data
|
@@ -24750,9 +25062,8 @@ function simpleBind(property, options) {
|
|
24750
25062
|
} else {
|
24751
25063
|
// The object is not observable, so just render it out and
|
24752
25064
|
// be done with it.
|
24753
|
-
output =
|
24754
|
-
|
24755
|
-
data.buffer.push(output);
|
25065
|
+
output = handlebarsGet(currentContext, property, options);
|
25066
|
+
data.buffer.push((output === null || typeof output === 'undefined') ? '' : output);
|
24756
25067
|
}
|
24757
25068
|
}
|
24758
25069
|
|
@@ -24809,10 +25120,10 @@ EmberHandlebars.registerHelper('_triageMustache', function(property, fn) {
|
|
24809
25120
|
EmberHandlebars.registerHelper('bind', function(property, options) {
|
24810
25121
|
|
24811
25122
|
|
24812
|
-
var context = (options.contexts && options.contexts[0]
|
25123
|
+
var context = (options.contexts && options.contexts.length) ? options.contexts[0] : this;
|
24813
25124
|
|
24814
25125
|
if (!options.fn) {
|
24815
|
-
return simpleBind
|
25126
|
+
return simpleBind(context, property, options);
|
24816
25127
|
}
|
24817
25128
|
|
24818
25129
|
return bind.call(context, property, options, false, exists);
|
@@ -24837,7 +25148,7 @@ EmberHandlebars.registerHelper('bind', function(property, options) {
|
|
24837
25148
|
@return {String} HTML string
|
24838
25149
|
*/
|
24839
25150
|
EmberHandlebars.registerHelper('boundIf', function(property, fn) {
|
24840
|
-
var context = (fn.contexts && fn.contexts[0]
|
25151
|
+
var context = (fn.contexts && fn.contexts.length) ? fn.contexts[0] : this;
|
24841
25152
|
var func = function(result) {
|
24842
25153
|
var truthy = result && get(result, 'isTruthy');
|
24843
25154
|
if (typeof truthy === 'boolean') { return truthy; }
|
@@ -25281,6 +25592,35 @@ var EmberHandlebars = Ember.Handlebars;
|
|
25281
25592
|
var LOWERCASE_A_Z = /^[a-z]/;
|
25282
25593
|
var VIEW_PREFIX = /^view\./;
|
25283
25594
|
|
25595
|
+
function makeBindings(thisContext, options) {
|
25596
|
+
var hash = options.hash,
|
25597
|
+
hashType = options.hashTypes;
|
25598
|
+
|
25599
|
+
for (var prop in hash) {
|
25600
|
+
if (hashType[prop] === 'ID') {
|
25601
|
+
|
25602
|
+
var value = hash[prop];
|
25603
|
+
|
25604
|
+
if (Ember.IS_BINDING.test(prop)) {
|
25605
|
+
|
25606
|
+
} else {
|
25607
|
+
hash[prop + 'Binding'] = value;
|
25608
|
+
hashType[prop + 'Binding'] = 'STRING';
|
25609
|
+
delete hash[prop];
|
25610
|
+
delete hashType[prop];
|
25611
|
+
}
|
25612
|
+
}
|
25613
|
+
}
|
25614
|
+
|
25615
|
+
if (hash.hasOwnProperty('idBinding')) {
|
25616
|
+
// id can't be bound, so just perform one-time lookup.
|
25617
|
+
hash.id = EmberHandlebars.get(thisContext, hash.idBinding, options);
|
25618
|
+
hashType.id = 'STRING';
|
25619
|
+
delete hash.idBinding;
|
25620
|
+
delete hashType.idBinding;
|
25621
|
+
}
|
25622
|
+
}
|
25623
|
+
|
25284
25624
|
EmberHandlebars.ViewHelper = Ember.Object.create({
|
25285
25625
|
|
25286
25626
|
propertiesFromHTMLOptions: function(options, thisContext) {
|
@@ -25390,6 +25730,8 @@ EmberHandlebars.ViewHelper = Ember.Object.create({
|
|
25390
25730
|
fn = options.fn,
|
25391
25731
|
newView;
|
25392
25732
|
|
25733
|
+
makeBindings(thisContext, options);
|
25734
|
+
|
25393
25735
|
if ('string' === typeof path) {
|
25394
25736
|
|
25395
25737
|
// TODO: this is a lame conditional, this should likely change
|
@@ -25877,7 +26219,7 @@ Ember.Handlebars.registerHelper('unbound', function(property, fn) {
|
|
25877
26219
|
return out;
|
25878
26220
|
}
|
25879
26221
|
|
25880
|
-
context = (fn.contexts && fn.contexts[0]
|
26222
|
+
context = (fn.contexts && fn.contexts.length) ? fn.contexts[0] : this;
|
25881
26223
|
return handlebarsGet(context, property, fn);
|
25882
26224
|
});
|
25883
26225
|
|
@@ -25907,7 +26249,7 @@ var handlebarsGet = Ember.Handlebars.get, normalizePath = Ember.Handlebars.norma
|
|
25907
26249
|
@param {String} property
|
25908
26250
|
*/
|
25909
26251
|
Ember.Handlebars.registerHelper('log', function(property, options) {
|
25910
|
-
var context = (options.contexts && options.contexts[0]
|
26252
|
+
var context = (options.contexts && options.contexts.length) ? options.contexts[0] : this,
|
25911
26253
|
normalized = normalizePath(context, property, options.data),
|
25912
26254
|
pathRoot = normalized.root,
|
25913
26255
|
path = normalized.path,
|
@@ -26462,7 +26804,6 @@ Ember.Handlebars.registerHelper('partial', function(name, options) {
|
|
26462
26804
|
var get = Ember.get, set = Ember.set;
|
26463
26805
|
|
26464
26806
|
/**
|
26465
|
-
|
26466
26807
|
`{{yield}}` denotes an area of a template that will be rendered inside
|
26467
26808
|
of another template. It has two main uses:
|
26468
26809
|
|
@@ -26521,11 +26862,11 @@ var get = Ember.get, set = Ember.set;
|
|
26521
26862
|
<!-- application.hbs -->
|
26522
26863
|
{{#labeled-textfield value=someProperty}}
|
26523
26864
|
First name:
|
26524
|
-
{{/
|
26865
|
+
{{/labeled-textfield}}
|
26525
26866
|
```
|
26526
26867
|
|
26527
26868
|
```handlebars
|
26528
|
-
<!-- components/
|
26869
|
+
<!-- components/labeled-textfield.hbs -->
|
26529
26870
|
<label>
|
26530
26871
|
{{yield}} {{input value=value}}
|
26531
26872
|
</label>
|
@@ -26722,7 +27063,7 @@ Ember.TextSupport = Ember.Mixin.create({
|
|
26722
27063
|
Options are:
|
26723
27064
|
|
26724
27065
|
* `enter`: the user pressed enter
|
26725
|
-
* `
|
27066
|
+
* `keyPress`: the user pressed a key
|
26726
27067
|
|
26727
27068
|
@property onEvent
|
26728
27069
|
@type String
|
@@ -26765,7 +27106,7 @@ Ember.TextSupport = Ember.Mixin.create({
|
|
26765
27106
|
Called by the `Ember.TextSupport` mixin on keyUp if keycode matches 13.
|
26766
27107
|
Uses sendAction to send the `enter` action to the controller.
|
26767
27108
|
|
26768
|
-
@method
|
27109
|
+
@method insertNewline
|
26769
27110
|
@param {Event} event
|
26770
27111
|
*/
|
26771
27112
|
insertNewline: function(event) {
|
@@ -26776,8 +27117,8 @@ Ember.TextSupport = Ember.Mixin.create({
|
|
26776
27117
|
/**
|
26777
27118
|
Called when the user hits escape.
|
26778
27119
|
|
26779
|
-
Called by the `Ember.TextSupport` mixin on keyUp if keycode matches
|
26780
|
-
Uses sendAction to send the `
|
27120
|
+
Called by the `Ember.TextSupport` mixin on keyUp if keycode matches 27.
|
27121
|
+
Uses sendAction to send the `escape-press` action to the controller.
|
26781
27122
|
|
26782
27123
|
@method cancel
|
26783
27124
|
@param {Event} event
|
@@ -26867,7 +27208,7 @@ var get = Ember.get, set = Ember.set;
|
|
26867
27208
|
The internal class used to create text inputs when the `{{input}}`
|
26868
27209
|
helper is used with `type` of `text`.
|
26869
27210
|
|
26870
|
-
See Handlebars.helpers.
|
27211
|
+
See [handlebars.helpers.input](api/classes/Ember.Handlebars.helpers.html#method_input) for usage details.
|
26871
27212
|
|
26872
27213
|
## Layout and LayoutName properties
|
26873
27214
|
|
@@ -26877,7 +27218,7 @@ var get = Ember.get, set = Ember.set;
|
|
26877
27218
|
|
26878
27219
|
@class TextField
|
26879
27220
|
@namespace Ember
|
26880
|
-
@extends Ember.
|
27221
|
+
@extends Ember.Component
|
26881
27222
|
@uses Ember.TextSupport
|
26882
27223
|
*/
|
26883
27224
|
Ember.TextField = Ember.Component.extend(Ember.TextSupport,
|
@@ -27069,7 +27410,7 @@ var get = Ember.get, set = Ember.set;
|
|
27069
27410
|
The internal class used to create textarea element when the `{{textarea}}`
|
27070
27411
|
helper is used.
|
27071
27412
|
|
27072
|
-
See handlebars.helpers.textarea
|
27413
|
+
See [handlebars.helpers.textarea](/api/classes/Ember.Handlebars.helpers.html#method_textarea) for usage details.
|
27073
27414
|
|
27074
27415
|
## Layout and LayoutName properties
|
27075
27416
|
|
@@ -27079,7 +27420,7 @@ var get = Ember.get, set = Ember.set;
|
|
27079
27420
|
|
27080
27421
|
@class TextArea
|
27081
27422
|
@namespace Ember
|
27082
|
-
@extends Ember.
|
27423
|
+
@extends Ember.Component
|
27083
27424
|
@uses Ember.TextSupport
|
27084
27425
|
*/
|
27085
27426
|
Ember.TextArea = Ember.Component.extend(Ember.TextSupport, {
|
@@ -27198,7 +27539,7 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27198
27539
|
`content` property. The underlying data object of the selected `<option>` is
|
27199
27540
|
stored in the `Element.Select`'s `value` property.
|
27200
27541
|
|
27201
|
-
|
27542
|
+
## The Content Property (array of strings)
|
27202
27543
|
|
27203
27544
|
The simplest version of an `Ember.Select` takes an array of strings as its
|
27204
27545
|
`content` property. The string will be used as both the `value` property and
|
@@ -27213,7 +27554,7 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27213
27554
|
```
|
27214
27555
|
|
27215
27556
|
```handlebars
|
27216
|
-
{{view Ember.Select
|
27557
|
+
{{view Ember.Select content=names}}
|
27217
27558
|
```
|
27218
27559
|
|
27219
27560
|
Would result in the following HTML:
|
@@ -27226,7 +27567,7 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27226
27567
|
```
|
27227
27568
|
|
27228
27569
|
You can control which `<option>` is selected through the `Ember.Select`'s
|
27229
|
-
`value` property
|
27570
|
+
`value` property:
|
27230
27571
|
|
27231
27572
|
```javascript
|
27232
27573
|
App.ApplicationController = Ember.Controller.extend({
|
@@ -27237,8 +27578,8 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27237
27578
|
|
27238
27579
|
```handlebars
|
27239
27580
|
{{view Ember.Select
|
27240
|
-
|
27241
|
-
|
27581
|
+
content=names
|
27582
|
+
value=selectedName
|
27242
27583
|
}}
|
27243
27584
|
```
|
27244
27585
|
|
@@ -27254,7 +27595,7 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27254
27595
|
A user interacting with the rendered `<select>` to choose "Yehuda" would
|
27255
27596
|
update the value of `selectedName` to "Yehuda".
|
27256
27597
|
|
27257
|
-
|
27598
|
+
## The Content Property (array of Objects)
|
27258
27599
|
|
27259
27600
|
An `Ember.Select` can also take an array of JavaScript or Ember objects as
|
27260
27601
|
its `content` property.
|
@@ -27279,7 +27620,7 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27279
27620
|
|
27280
27621
|
```handlebars
|
27281
27622
|
{{view Ember.Select
|
27282
|
-
|
27623
|
+
content=programmers
|
27283
27624
|
optionValuePath="content.id"
|
27284
27625
|
optionLabelPath="content.firstName"}}
|
27285
27626
|
```
|
@@ -27294,8 +27635,7 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27294
27635
|
```
|
27295
27636
|
|
27296
27637
|
The `value` attribute of the selected `<option>` within an `Ember.Select`
|
27297
|
-
can be bound to a property on another object
|
27298
|
-
`valueBinding` option:
|
27638
|
+
can be bound to a property on another object:
|
27299
27639
|
|
27300
27640
|
```javascript
|
27301
27641
|
App.ApplicationController = Ember.Controller.extend({
|
@@ -27311,10 +27651,10 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27311
27651
|
|
27312
27652
|
```handlebars
|
27313
27653
|
{{view Ember.Select
|
27314
|
-
|
27654
|
+
content=programmers
|
27315
27655
|
optionValuePath="content.id"
|
27316
27656
|
optionLabelPath="content.firstName"
|
27317
|
-
|
27657
|
+
value=currentProgrammer.id}}
|
27318
27658
|
```
|
27319
27659
|
|
27320
27660
|
Would result in the following HTML with a selected option:
|
@@ -27331,8 +27671,8 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27331
27671
|
to match the `value` property of the newly selected `<option>`.
|
27332
27672
|
|
27333
27673
|
Alternatively, you can control selection through the underlying objects
|
27334
|
-
used to render each object
|
27335
|
-
`<option>` is changed, the property path provided to `
|
27674
|
+
used to render each object by binding the `selection` option. When the selected
|
27675
|
+
`<option>` is changed, the property path provided to `selection`
|
27336
27676
|
will be updated to match the content object of the rendered `<option>`
|
27337
27677
|
element:
|
27338
27678
|
|
@@ -27348,10 +27688,10 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27348
27688
|
|
27349
27689
|
```handlebars
|
27350
27690
|
{{view Ember.Select
|
27351
|
-
|
27691
|
+
content=programmers
|
27352
27692
|
optionValuePath="content.id"
|
27353
27693
|
optionLabelPath="content.firstName"
|
27354
|
-
|
27694
|
+
selection=selectedPerson}}
|
27355
27695
|
```
|
27356
27696
|
|
27357
27697
|
Would result in the following HTML with a selected option:
|
@@ -27364,11 +27704,11 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27364
27704
|
```
|
27365
27705
|
|
27366
27706
|
Interacting with the rendered element by selecting the first option
|
27367
|
-
('Yehuda') will update the `selectedPerson` to match the object of
|
27707
|
+
('Yehuda') will update the `selectedPerson` to match the object of
|
27368
27708
|
the newly selected `<option>`. In this case it is the first object
|
27369
27709
|
in the `programmers`
|
27370
27710
|
|
27371
|
-
|
27711
|
+
## Supplying a Prompt
|
27372
27712
|
|
27373
27713
|
A `null` value for the `Ember.Select`'s `value` or `selection` property
|
27374
27714
|
results in there being no `<option>` with a `selected` attribute:
|
@@ -27385,8 +27725,8 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27385
27725
|
|
27386
27726
|
``` handlebars
|
27387
27727
|
{{view Ember.Select
|
27388
|
-
|
27389
|
-
|
27728
|
+
content=programmers
|
27729
|
+
value=selectedProgrammer
|
27390
27730
|
}}
|
27391
27731
|
```
|
27392
27732
|
|
@@ -27417,8 +27757,8 @@ Ember.SelectOptgroup = Ember.CollectionView.extend({
|
|
27417
27757
|
|
27418
27758
|
```handlebars
|
27419
27759
|
{{view Ember.Select
|
27420
|
-
|
27421
|
-
|
27760
|
+
content=programmers
|
27761
|
+
value=selectedProgrammer
|
27422
27762
|
prompt="Please select a name"
|
27423
27763
|
}}
|
27424
27764
|
```
|
@@ -27470,11 +27810,11 @@ function program3(depth0,data) {
|
|
27470
27810
|
function program4(depth0,data) {
|
27471
27811
|
|
27472
27812
|
var hashContexts, hashTypes;
|
27473
|
-
hashContexts = {'
|
27474
|
-
hashTypes = {'
|
27813
|
+
hashContexts = {'content': depth0,'label': depth0};
|
27814
|
+
hashTypes = {'content': "ID",'label': "ID"};
|
27475
27815
|
data.buffer.push(escapeExpression(helpers.view.call(depth0, "view.groupView", {hash:{
|
27476
|
-
'
|
27477
|
-
'
|
27816
|
+
'content': ("content"),
|
27817
|
+
'label': ("label")
|
27478
27818
|
},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
27479
27819
|
}
|
27480
27820
|
|
@@ -27490,10 +27830,10 @@ function program6(depth0,data) {
|
|
27490
27830
|
function program7(depth0,data) {
|
27491
27831
|
|
27492
27832
|
var hashContexts, hashTypes;
|
27493
|
-
hashContexts = {'
|
27494
|
-
hashTypes = {'
|
27833
|
+
hashContexts = {'content': depth0};
|
27834
|
+
hashTypes = {'content': "ID"};
|
27495
27835
|
data.buffer.push(escapeExpression(helpers.view.call(depth0, "view.optionView", {hash:{
|
27496
|
-
'
|
27836
|
+
'content': ("")
|
27497
27837
|
},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
|
27498
27838
|
}
|
27499
27839
|
|
@@ -27524,7 +27864,7 @@ function program7(depth0,data) {
|
|
27524
27864
|
The `disabled` attribute of the select element. Indicates whether
|
27525
27865
|
the element is disabled from interactions.
|
27526
27866
|
|
27527
|
-
@property
|
27867
|
+
@property disabled
|
27528
27868
|
@type Boolean
|
27529
27869
|
@default false
|
27530
27870
|
*/
|
@@ -27633,8 +27973,9 @@ function program7(depth0,data) {
|
|
27633
27973
|
groupedContent: Ember.computed(function() {
|
27634
27974
|
var groupPath = get(this, 'optionGroupPath');
|
27635
27975
|
var groupedContent = Ember.A();
|
27976
|
+
var content = get(this, 'content') || [];
|
27636
27977
|
|
27637
|
-
forEach(
|
27978
|
+
forEach(content, function(item) {
|
27638
27979
|
var label = get(item, groupPath);
|
27639
27980
|
|
27640
27981
|
if (get(groupedContent, 'lastObject.label') !== label) {
|
@@ -27786,18 +28127,9 @@ function program7(depth0,data) {
|
|
27786
28127
|
(function() {
|
27787
28128
|
/**
|
27788
28129
|
@module ember
|
27789
|
-
@submodule ember-handlebars
|
28130
|
+
@submodule ember-handlebars-compiler
|
27790
28131
|
*/
|
27791
28132
|
|
27792
|
-
function normalizeHash(hash, hashTypes) {
|
27793
|
-
for (var prop in hash) {
|
27794
|
-
if (hashTypes[prop] === 'ID') {
|
27795
|
-
hash[prop + 'Binding'] = hash[prop];
|
27796
|
-
delete hash[prop];
|
27797
|
-
}
|
27798
|
-
}
|
27799
|
-
}
|
27800
|
-
|
27801
28133
|
/**
|
27802
28134
|
|
27803
28135
|
The `{{input}}` helper inserts an HTML `<input>` tag into the template,
|
@@ -27809,30 +28141,32 @@ function normalizeHash(hash, hashTypes) {
|
|
27809
28141
|
An `{{input}}` with no `type` or a `type` of `text` will render an HTML text input.
|
27810
28142
|
The following HTML attributes can be set via the helper:
|
27811
28143
|
|
27812
|
-
|
27813
|
-
|
27814
|
-
|
27815
|
-
|
27816
|
-
|
27817
|
-
|
27818
|
-
|
27819
|
-
|
28144
|
+
* `value`
|
28145
|
+
* `size`
|
28146
|
+
* `name`
|
28147
|
+
* `pattern`
|
28148
|
+
* `placeholder`
|
28149
|
+
* `disabled`
|
28150
|
+
* `maxlength`
|
28151
|
+
* `tabindex`
|
28152
|
+
|
27820
28153
|
|
27821
28154
|
When set to a quoted string, these values will be directly applied to the HTML
|
27822
28155
|
element. When left unquoted, these values will be bound to a property on the
|
27823
28156
|
template's current rendering context (most typically a controller instance).
|
27824
28157
|
|
27825
|
-
Unbound:
|
28158
|
+
## Unbound:
|
27826
28159
|
|
27827
28160
|
```handlebars
|
27828
28161
|
{{input value="http://www.facebook.com"}}
|
27829
28162
|
```
|
27830
28163
|
|
28164
|
+
|
27831
28165
|
```html
|
27832
28166
|
<input type="text" value="http://www.facebook.com"/>
|
27833
28167
|
```
|
27834
28168
|
|
27835
|
-
Bound:
|
28169
|
+
## Bound:
|
27836
28170
|
|
27837
28171
|
```javascript
|
27838
28172
|
App.ApplicationController = Ember.Controller.extend({
|
@@ -27841,15 +28175,18 @@ function normalizeHash(hash, hashTypes) {
|
|
27841
28175
|
});
|
27842
28176
|
```
|
27843
28177
|
|
28178
|
+
|
27844
28179
|
```handlebars
|
27845
28180
|
{{input type="text" value=firstName disabled=entryNotAllowed size="50"}}
|
27846
28181
|
```
|
27847
28182
|
|
28183
|
+
|
27848
28184
|
```html
|
27849
28185
|
<input type="text" value="Stanley" disabled="disabled" size="50"/>
|
27850
28186
|
```
|
27851
28187
|
|
27852
|
-
|
28188
|
+
## Extension
|
28189
|
+
|
27853
28190
|
Internally, `{{input type="text"}}` creates an instance of `Ember.TextField`, passing
|
27854
28191
|
arguments from the helper to `Ember.TextField`'s `create` method. You can extend the
|
27855
28192
|
capablilties of text inputs in your applications by reopening this class. For example,
|
@@ -27862,21 +28199,29 @@ function normalizeHash(hash, hashTypes) {
|
|
27862
28199
|
});
|
27863
28200
|
```
|
27864
28201
|
|
28202
|
+
Keep in mind when writing `Ember.TextField` subclasses that `Ember.TextField`
|
28203
|
+
itself extends `Ember.Component`, meaning that it does NOT inherit
|
28204
|
+
the `controller` of the parent view.
|
28205
|
+
|
28206
|
+
See more about [Ember components](api/classes/Ember.Component.html)
|
28207
|
+
|
28208
|
+
|
27865
28209
|
## Use as checkbox
|
28210
|
+
|
27866
28211
|
An `{{input}}` with a `type` of `checkbox` will render an HTML checkbox input.
|
27867
28212
|
The following HTML attributes can be set via the helper:
|
27868
28213
|
|
27869
|
-
|
27870
|
-
|
27871
|
-
|
27872
|
-
|
27873
|
-
|
28214
|
+
* `checked`
|
28215
|
+
* `disabled`
|
28216
|
+
* `tabindex`
|
28217
|
+
* `indeterminate`
|
28218
|
+
* `name`
|
27874
28219
|
|
27875
28220
|
When set to a quoted string, these values will be directly applied to the HTML
|
27876
28221
|
element. When left unquoted, these values will be bound to a property on the
|
27877
28222
|
template's current rendering context (most typically a controller instance).
|
27878
28223
|
|
27879
|
-
Unbound:
|
28224
|
+
## Unbound:
|
27880
28225
|
|
27881
28226
|
```handlebars
|
27882
28227
|
{{input type="checkbox" name="isAdmin"}}
|
@@ -27886,7 +28231,7 @@ function normalizeHash(hash, hashTypes) {
|
|
27886
28231
|
<input type="checkbox" name="isAdmin" />
|
27887
28232
|
```
|
27888
28233
|
|
27889
|
-
Bound:
|
28234
|
+
## Bound:
|
27890
28235
|
|
27891
28236
|
```javascript
|
27892
28237
|
App.ApplicationController = Ember.Controller.extend({
|
@@ -27894,15 +28239,18 @@ function normalizeHash(hash, hashTypes) {
|
|
27894
28239
|
});
|
27895
28240
|
```
|
27896
28241
|
|
28242
|
+
|
27897
28243
|
```handlebars
|
27898
28244
|
{{input type="checkbox" checked=isAdmin }}
|
27899
28245
|
```
|
27900
28246
|
|
28247
|
+
|
27901
28248
|
```html
|
27902
28249
|
<input type="checkbox" checked="checked" />
|
27903
28250
|
```
|
27904
28251
|
|
27905
|
-
|
28252
|
+
## Extension
|
28253
|
+
|
27906
28254
|
Internally, `{{input type="checkbox"}}` creates an instance of `Ember.Checkbox`, passing
|
27907
28255
|
arguments from the helper to `Ember.Checkbox`'s `create` method. You can extend the
|
27908
28256
|
capablilties of checkbox inputs in your applications by reopening this class. For example,
|
@@ -27914,6 +28262,7 @@ function normalizeHash(hash, hashTypes) {
|
|
27914
28262
|
});
|
27915
28263
|
```
|
27916
28264
|
|
28265
|
+
|
27917
28266
|
@method input
|
27918
28267
|
@for Ember.Handlebars.helpers
|
27919
28268
|
@param {Hash} options
|
@@ -27929,8 +28278,6 @@ Ember.Handlebars.registerHelper('input', function(options) {
|
|
27929
28278
|
delete hash.type;
|
27930
28279
|
delete hash.on;
|
27931
28280
|
|
27932
|
-
normalizeHash(hash, types);
|
27933
|
-
|
27934
28281
|
if (inputType === 'checkbox') {
|
27935
28282
|
return Ember.Handlebars.helpers.view.call(this, Ember.Checkbox, options);
|
27936
28283
|
} else {
|
@@ -28060,7 +28407,7 @@ Ember.Handlebars.registerHelper('input', function(options) {
|
|
28060
28407
|
</textarea>
|
28061
28408
|
```
|
28062
28409
|
|
28063
|
-
|
28410
|
+
## Extension
|
28064
28411
|
|
28065
28412
|
Internally, `{{textarea}}` creates an instance of `Ember.TextArea`, passing
|
28066
28413
|
arguments from the helper to `Ember.TextArea`'s `create` method. You can
|
@@ -28077,6 +28424,12 @@ Ember.Handlebars.registerHelper('input', function(options) {
|
|
28077
28424
|
});
|
28078
28425
|
```
|
28079
28426
|
|
28427
|
+
Keep in mind when writing `Ember.TextArea` subclasses that `Ember.TextArea`
|
28428
|
+
itself extends `Ember.Component`, meaning that it does NOT inherit
|
28429
|
+
the `controller` of the parent view.
|
28430
|
+
|
28431
|
+
See more about [Ember components](api/classes/Ember.Component.html)
|
28432
|
+
|
28080
28433
|
@method textarea
|
28081
28434
|
@for Ember.Handlebars.helpers
|
28082
28435
|
@param {Hash} options
|
@@ -28087,7 +28440,6 @@ Ember.Handlebars.registerHelper('textarea', function(options) {
|
|
28087
28440
|
var hash = options.hash,
|
28088
28441
|
types = options.hashTypes;
|
28089
28442
|
|
28090
|
-
normalizeHash(hash, types);
|
28091
28443
|
return Ember.Handlebars.helpers.view.call(this, Ember.TextArea, options);
|
28092
28444
|
});
|
28093
28445
|
|
@@ -28138,7 +28490,7 @@ Ember.Handlebars.bootstrap = function(ctx) {
|
|
28138
28490
|
|
28139
28491
|
// Check if template of same name already exists
|
28140
28492
|
if (Ember.TEMPLATES[templateName] !== undefined) {
|
28141
|
-
throw new Error('Template named "' + templateName + '" already exists.');
|
28493
|
+
throw new Ember.Error('Template named "' + templateName + '" already exists.');
|
28142
28494
|
}
|
28143
28495
|
|
28144
28496
|
// For templates which have a name, we save them and then remove them from the DOM
|
@@ -28168,13 +28520,14 @@ function registerComponents(container) {
|
|
28168
28520
|
function registerComponent(container, name) {
|
28169
28521
|
|
28170
28522
|
|
28171
|
-
container.injection('component:' + name, 'layout', 'template:components/' + name);
|
28172
|
-
|
28173
28523
|
var fullName = 'component:' + name;
|
28524
|
+
|
28525
|
+
container.injection(fullName, 'layout', 'template:components/' + name);
|
28526
|
+
|
28174
28527
|
var Component = container.lookupFactory(fullName);
|
28175
28528
|
|
28176
28529
|
if (!Component) {
|
28177
|
-
container.register(
|
28530
|
+
container.register(fullName, Ember.Component);
|
28178
28531
|
Component = container.lookupFactory(fullName);
|
28179
28532
|
}
|
28180
28533
|
|
@@ -30190,8 +30543,12 @@ Ember.Router = Ember.Object.extend({
|
|
30190
30543
|
|
30191
30544
|
if (name === 'application') {
|
30192
30545
|
// Inject default `error` handler.
|
30193
|
-
|
30194
|
-
|
30546
|
+
// Note: `events` is deprecated, but we'll let the
|
30547
|
+
// deprecation warnings be handled at event-handling time rather
|
30548
|
+
// than duplicating that logic here.
|
30549
|
+
var actions = handler._actions || handler.events;
|
30550
|
+
if (!actions) { actions = handler._actions = {}; }
|
30551
|
+
actions.error = actions.error || Ember.Router._defaultErrorHandler;
|
30195
30552
|
}
|
30196
30553
|
|
30197
30554
|
handler.routeName = name;
|
@@ -30257,8 +30614,10 @@ Ember.Router = Ember.Object.extend({
|
|
30257
30614
|
|
30258
30615
|
transitionPromise.then(function(route) {
|
30259
30616
|
self._transitionCompleted(route);
|
30260
|
-
}, function(error){
|
30617
|
+
}, function(error) {
|
30618
|
+
if (error.name === "UnrecognizedURLError") {
|
30261
30619
|
|
30620
|
+
}
|
30262
30621
|
});
|
30263
30622
|
|
30264
30623
|
// We want to return the configurable promise object
|
@@ -30304,7 +30663,7 @@ function triggerEvent(handlerInfos, ignoreFailure, args) {
|
|
30304
30663
|
|
30305
30664
|
if (!handlerInfos) {
|
30306
30665
|
if (ignoreFailure) { return; }
|
30307
|
-
throw new Error("Could not trigger event '" + name + "'. There are no active handlers");
|
30666
|
+
throw new Ember.Error("Could not trigger event '" + name + "'. There are no active handlers");
|
30308
30667
|
}
|
30309
30668
|
|
30310
30669
|
var eventWasHandled = false;
|
@@ -30330,7 +30689,7 @@ function triggerEvent(handlerInfos, ignoreFailure, args) {
|
|
30330
30689
|
}
|
30331
30690
|
|
30332
30691
|
if (!eventWasHandled && !ignoreFailure) {
|
30333
|
-
throw new Error("Nothing handled the event '" + name + "'.");
|
30692
|
+
throw new Ember.Error("Nothing handled the event '" + name + "'.");
|
30334
30693
|
}
|
30335
30694
|
}
|
30336
30695
|
|
@@ -30649,6 +31008,7 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
|
|
30649
31008
|
@deprecated
|
30650
31009
|
|
30651
31010
|
Please use `actions` instead.
|
31011
|
+
@method events
|
30652
31012
|
*/
|
30653
31013
|
events: null,
|
30654
31014
|
|
@@ -30671,11 +31031,13 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
|
|
30671
31031
|
activate: Ember.K,
|
30672
31032
|
|
30673
31033
|
/**
|
30674
|
-
Transition into another route. Optionally supply
|
30675
|
-
route in question.
|
30676
|
-
|
31034
|
+
Transition into another route. Optionally supply model(s) for the
|
31035
|
+
route in question. If multiple models are supplied they will be applied
|
31036
|
+
last to first recursively up the resource tree (see Multiple Models Example
|
31037
|
+
below). The model(s) will be serialized into the URL using the appropriate
|
31038
|
+
route's `serialize` hook. See also 'replaceWith'.
|
30677
31039
|
|
30678
|
-
Example
|
31040
|
+
Simple Transition Example
|
30679
31041
|
|
30680
31042
|
```javascript
|
30681
31043
|
App.Router.map(function() {
|
@@ -30696,9 +31058,31 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
|
|
30696
31058
|
});
|
30697
31059
|
```
|
30698
31060
|
|
31061
|
+
Multiple Models Example
|
31062
|
+
|
31063
|
+
```javascript
|
31064
|
+
App.Router.map(function() {
|
31065
|
+
this.route("index");
|
31066
|
+
this.resource('breakfast', {path:':breakfastId'}, function(){
|
31067
|
+
this.resource('cereal', {path: ':cerealId'});
|
31068
|
+
});
|
31069
|
+
});
|
31070
|
+
|
31071
|
+
App.IndexRoute = Ember.Route.extend({
|
31072
|
+
actions: {
|
31073
|
+
moveToChocolateCereal: function(){
|
31074
|
+
var cereal = { cerealId: "ChocolateYumminess"},
|
31075
|
+
breakfast = {breakfastId: "CerealAndMilk"};
|
31076
|
+
|
31077
|
+
this.transitionTo('cereal', breakfast, cereal);
|
31078
|
+
}
|
31079
|
+
}
|
31080
|
+
});
|
31081
|
+
|
30699
31082
|
@method transitionTo
|
30700
31083
|
@param {String} name the name of the route
|
30701
|
-
@param {...Object} models
|
31084
|
+
@param {...Object} models the model(s) to be used while transitioning
|
31085
|
+
to the route.
|
30702
31086
|
*/
|
30703
31087
|
transitionTo: function(name, context) {
|
30704
31088
|
var router = this.router;
|
@@ -30706,8 +31090,10 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
|
|
30706
31090
|
},
|
30707
31091
|
|
30708
31092
|
/**
|
30709
|
-
Transition into another route while replacing the current URL if
|
30710
|
-
|
31093
|
+
Transition into another route while replacing the current URL, if possible.
|
31094
|
+
This will replace the current history entry instead of adding a new one.
|
31095
|
+
Beside that, it is identical to `transitionTo` in all other respects. See
|
31096
|
+
'transitionTo' for additional information regarding multiple models.
|
30711
31097
|
|
30712
31098
|
Example
|
30713
31099
|
|
@@ -30728,7 +31114,8 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
|
|
30728
31114
|
|
30729
31115
|
@method replaceWith
|
30730
31116
|
@param {String} name the name of the route
|
30731
|
-
@param {...Object} models
|
31117
|
+
@param {...Object} models the model(s) to be used while transitioning
|
31118
|
+
to the route.
|
30732
31119
|
*/
|
30733
31120
|
replaceWith: function() {
|
30734
31121
|
var router = this.router;
|
@@ -30807,15 +31194,15 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
|
|
30807
31194
|
},
|
30808
31195
|
|
30809
31196
|
/**
|
30810
|
-
@deprecated
|
30811
|
-
|
30812
31197
|
A hook you can implement to optionally redirect to another route.
|
30813
31198
|
|
30814
31199
|
If you call `this.transitionTo` from inside of this hook, this route
|
30815
31200
|
will not be entered in favor of the other hook.
|
30816
31201
|
|
30817
|
-
|
30818
|
-
|
31202
|
+
Note that this hook is called by the default implementation of
|
31203
|
+
`afterModel`, so if you override `afterModel`, you must either
|
31204
|
+
explicitly call `redirect` or just put your redirecting
|
31205
|
+
`this.transitionTo()` call within `afterModel`.
|
30819
31206
|
|
30820
31207
|
@method redirect
|
30821
31208
|
@param {Object} model the model for this route
|
@@ -30909,7 +31296,7 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
|
|
30909
31296
|
resolved.
|
30910
31297
|
|
30911
31298
|
```js
|
30912
|
-
App.
|
31299
|
+
App.PostsRoute = Ember.Route.extend({
|
30913
31300
|
afterModel: function(posts, transition) {
|
30914
31301
|
if (posts.length === 1) {
|
30915
31302
|
this.transitionTo('post.show', posts[0]);
|
@@ -31825,6 +32212,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
31825
32212
|
|
31826
32213
|
This method is invoked by observers installed during `init` that fire
|
31827
32214
|
whenever the helpers
|
32215
|
+
@method _paramsChanged
|
31828
32216
|
*/
|
31829
32217
|
_paramsChanged: function() {
|
31830
32218
|
this.notifyPropertyChange('resolvedParams');
|
@@ -31997,7 +32385,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
31997
32385
|
@property href
|
31998
32386
|
**/
|
31999
32387
|
href: Ember.computed(function() {
|
32000
|
-
if (get(this, 'tagName') !== 'a') { return
|
32388
|
+
if (get(this, 'tagName') !== 'a') { return; }
|
32001
32389
|
|
32002
32390
|
var router = get(this, 'router'),
|
32003
32391
|
routeArgs = get(this, 'routeArgs');
|
@@ -32056,7 +32444,44 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32056
32444
|
|
32057
32445
|
To override this option for your entire application, see
|
32058
32446
|
"Overriding Application-wide Defaults".
|
32059
|
-
|
32447
|
+
|
32448
|
+
### Disabling the `link-to` helper
|
32449
|
+
By default `{{link-to}}` is enabled.
|
32450
|
+
any passed value to `disabled` helper property will disable the `link-to` helper.
|
32451
|
+
|
32452
|
+
static use: the `disabled` option:
|
32453
|
+
|
32454
|
+
```handlebars
|
32455
|
+
{{#link-to 'photoGallery' disabled=true}}
|
32456
|
+
Great Hamster Photos
|
32457
|
+
{{/link-to}}
|
32458
|
+
```
|
32459
|
+
|
32460
|
+
dynamic use: the `disabledWhen` option:
|
32461
|
+
|
32462
|
+
```handlebars
|
32463
|
+
{{#link-to 'photoGallery' disabledWhen=controller.someProperty}}
|
32464
|
+
Great Hamster Photos
|
32465
|
+
{{/link-to}}
|
32466
|
+
```
|
32467
|
+
|
32468
|
+
any passed value to `disabled` will disable it except `undefined`.
|
32469
|
+
to ensure that only `true` disable the `link-to` helper you can
|
32470
|
+
override the global behaviour of `Ember.LinkView`.
|
32471
|
+
|
32472
|
+
```javascript
|
32473
|
+
Ember.LinkView.reopen({
|
32474
|
+
disabled: Ember.computed(function(key, value) {
|
32475
|
+
if (value !== undefined) {
|
32476
|
+
this.set('_isDisabled', value === true);
|
32477
|
+
}
|
32478
|
+
return value === true ? get(this, 'disabledClass') : false;
|
32479
|
+
})
|
32480
|
+
});
|
32481
|
+
```
|
32482
|
+
|
32483
|
+
see "Overriding Application-wide Defaults" for more.
|
32484
|
+
|
32060
32485
|
### Handling `href`
|
32061
32486
|
`{{link-to}}` will use your application's Router to
|
32062
32487
|
fill the element's `href` property with a url that
|
@@ -32112,7 +32537,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32112
32537
|
```javascript
|
32113
32538
|
App.Router.map(function() {
|
32114
32539
|
this.resource("photoGallery", {path: "hamster-photos/:photo_id"});
|
32115
|
-
})
|
32540
|
+
});
|
32116
32541
|
```
|
32117
32542
|
|
32118
32543
|
```handlebars
|
@@ -32154,6 +32579,34 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32154
32579
|
A+++ would snuggle again.
|
32155
32580
|
</a>
|
32156
32581
|
```
|
32582
|
+
|
32583
|
+
### Supplying an explicit dynamic segment value
|
32584
|
+
If you don't have a model object available to pass to `{{link-to}}`,
|
32585
|
+
an optional string or integer argument can be passed for routes whose
|
32586
|
+
paths contain dynamic segments. This argument will become the value
|
32587
|
+
of the dynamic segment:
|
32588
|
+
|
32589
|
+
```javascript
|
32590
|
+
App.Router.map(function() {
|
32591
|
+
this.resource("photoGallery", {path: "hamster-photos/:photo_id"});
|
32592
|
+
});
|
32593
|
+
```
|
32594
|
+
|
32595
|
+
```handlebars
|
32596
|
+
{{#link-to 'photoGallery' aPhotoId}}
|
32597
|
+
{{aPhoto.title}}
|
32598
|
+
{{/link-to}}
|
32599
|
+
```
|
32600
|
+
|
32601
|
+
```html
|
32602
|
+
<a href="/hamster-photos/42">
|
32603
|
+
Tomster
|
32604
|
+
</a>
|
32605
|
+
```
|
32606
|
+
|
32607
|
+
When transitioning into the linked route, the `model` hook will
|
32608
|
+
be triggered with parameters including this passed identifier.
|
32609
|
+
|
32157
32610
|
### Overriding attributes
|
32158
32611
|
You can override any given property of the Ember.LinkView
|
32159
32612
|
that is generated by the `{{link-to}}` helper by passing
|
@@ -32163,8 +32616,9 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32163
32616
|
{{#link-to aPhoto tagName='li' title='Following this link will change your life' classNames=['pic', 'sweet']}}
|
32164
32617
|
Uh-mazing!
|
32165
32618
|
{{/link-to}}
|
32619
|
+
```
|
32166
32620
|
|
32167
|
-
See
|
32621
|
+
See [Ember.LinkView](/api/classes/Ember.LinkView.html) for a
|
32168
32622
|
complete list of overrideable properties. Be sure to also
|
32169
32623
|
check out inherited properties of `LinkView`.
|
32170
32624
|
|
@@ -32194,7 +32648,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32194
32648
|
@for Ember.Handlebars.helpers
|
32195
32649
|
@param {String} routeName
|
32196
32650
|
@param {Object} [context]*
|
32197
|
-
@param [options] {Object} Handlebars key/value pairs of options, you can
|
32651
|
+
@param [options] {Object} Handlebars key/value pairs of options, you can override any property of Ember.LinkView
|
32198
32652
|
@return {String} HTML string
|
32199
32653
|
@see {Ember.LinkView}
|
32200
32654
|
*/
|
@@ -32215,7 +32669,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32215
32669
|
});
|
32216
32670
|
|
32217
32671
|
/**
|
32218
|
-
See
|
32672
|
+
See [link-to](/api/classes/Ember.Handlebars.helpers.html#method_link-to)
|
32219
32673
|
|
32220
32674
|
@method linkTo
|
32221
32675
|
@for Ember.Handlebars.helpers
|
@@ -32360,7 +32814,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32360
32814
|
Example:
|
32361
32815
|
|
32362
32816
|
```javascript
|
32363
|
-
App.NavigationController = Ember.Controller.
|
32817
|
+
App.NavigationController = Ember.Controller.extend({
|
32364
32818
|
who: "world"
|
32365
32819
|
});
|
32366
32820
|
```
|
@@ -32518,6 +32972,10 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32518
32972
|
return isSimpleClick(event);
|
32519
32973
|
}
|
32520
32974
|
|
32975
|
+
if (allowedKeys.indexOf("any") >= 0) {
|
32976
|
+
return true;
|
32977
|
+
}
|
32978
|
+
|
32521
32979
|
var allowed = true;
|
32522
32980
|
|
32523
32981
|
forEach.call(keys, function(key) {
|
@@ -32571,16 +33029,16 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32571
33029
|
|
32572
33030
|
/**
|
32573
33031
|
The `{{action}}` helper registers an HTML element within a template for DOM
|
32574
|
-
event handling and forwards that interaction to the
|
33032
|
+
event handling and forwards that interaction to the templates's controller
|
32575
33033
|
or supplied `target` option (see 'Specifying a Target').
|
32576
33034
|
|
32577
|
-
If the
|
33035
|
+
If the controller does not implement the event, the event is sent
|
32578
33036
|
to the current route, and it bubbles up the route hierarchy from there.
|
32579
33037
|
|
32580
33038
|
User interaction with that element will invoke the supplied action name on
|
32581
33039
|
the appropriate target.
|
32582
33040
|
|
32583
|
-
Given the following Handlebars template on the page
|
33041
|
+
Given the following application Handlebars template on the page
|
32584
33042
|
|
32585
33043
|
```handlebars
|
32586
33044
|
<div {{action 'anActionName'}}>
|
@@ -32591,17 +33049,13 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32591
33049
|
And application code
|
32592
33050
|
|
32593
33051
|
```javascript
|
32594
|
-
|
32595
|
-
|
32596
|
-
|
32597
|
-
|
32598
|
-
|
32599
|
-
|
32600
|
-
templateName: 'a-template'
|
33052
|
+
App.ApplicationController = Ember.Controller.extend({
|
33053
|
+
actions: {
|
33054
|
+
anActionName: function() {
|
33055
|
+
|
33056
|
+
}
|
33057
|
+
}
|
32601
33058
|
});
|
32602
|
-
|
32603
|
-
aView = AView.create();
|
32604
|
-
aView.appendTo('body');
|
32605
33059
|
```
|
32606
33060
|
|
32607
33061
|
Will result in the following rendered HTML
|
@@ -32614,8 +33068,8 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32614
33068
|
</div>
|
32615
33069
|
```
|
32616
33070
|
|
32617
|
-
Clicking "click me" will trigger the `anActionName`
|
32618
|
-
`
|
33071
|
+
Clicking "click me" will trigger the `anActionName` action of the
|
33072
|
+
`App.ApplicationController`. In this case, no additional parameters will be passed.
|
32619
33073
|
|
32620
33074
|
If you provide additional parameters to the helper:
|
32621
33075
|
|
@@ -32648,11 +33102,9 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32648
33102
|
supply an `on` option to the helper to specify a different DOM event name:
|
32649
33103
|
|
32650
33104
|
```handlebars
|
32651
|
-
<
|
32652
|
-
|
32653
|
-
|
32654
|
-
</div>
|
32655
|
-
</script>
|
33105
|
+
<div {{action "anActionName" on="doubleClick"}}>
|
33106
|
+
click me
|
33107
|
+
</div>
|
32656
33108
|
```
|
32657
33109
|
|
32658
33110
|
See `Ember.View` 'Responding to Browser Events' for a list of
|
@@ -32670,15 +33122,21 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32670
33122
|
keys. You can supply an `allowedKeys` option to specify which keys should not be ignored.
|
32671
33123
|
|
32672
33124
|
```handlebars
|
32673
|
-
<
|
32674
|
-
|
32675
|
-
|
32676
|
-
</div>
|
32677
|
-
</script>
|
33125
|
+
<div {{action "anActionName" allowedKeys="alt"}}>
|
33126
|
+
click me
|
33127
|
+
</div>
|
32678
33128
|
```
|
32679
33129
|
|
32680
33130
|
This way the `{{action}}` will fire when clicking with the alt key pressed down.
|
32681
33131
|
|
33132
|
+
Alternatively, supply "any" to the `allowedKeys` option to accept any combination of modifier keys.
|
33133
|
+
|
33134
|
+
```handlebars
|
33135
|
+
<div {{action "anActionName" allowedKeys="any"}}>
|
33136
|
+
click me with any key pressed
|
33137
|
+
</div>
|
33138
|
+
```
|
33139
|
+
|
32682
33140
|
### Specifying a Target
|
32683
33141
|
|
32684
33142
|
There are several possible target objects for `{{action}}` helpers:
|
@@ -32692,43 +33150,21 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32692
33150
|
to an object, accessible in the current context:
|
32693
33151
|
|
32694
33152
|
```handlebars
|
32695
|
-
|
32696
|
-
|
32697
|
-
|
32698
|
-
|
32699
|
-
</script>
|
32700
|
-
```
|
32701
|
-
|
32702
|
-
Clicking "click me" in the rendered HTML of the above template will trigger
|
32703
|
-
the `anActionName` method of the object at `MyApplication.someObject`.
|
32704
|
-
|
32705
|
-
If an action's target does not implement a method that matches the supplied
|
32706
|
-
action name an error will be thrown.
|
32707
|
-
|
32708
|
-
```handlebars
|
32709
|
-
<script type="text/x-handlebars" data-template-name='a-template'>
|
32710
|
-
<div {{action 'aMethodNameThatIsMissing'}}>
|
32711
|
-
click me
|
32712
|
-
</div>
|
32713
|
-
</script>
|
33153
|
+
{{! the application template }}
|
33154
|
+
<div {{action "anActionName" target=view}}>
|
33155
|
+
click me
|
33156
|
+
</div>
|
32714
33157
|
```
|
32715
33158
|
|
32716
|
-
With the following application code
|
32717
|
-
|
32718
33159
|
```javascript
|
32719
|
-
|
32720
|
-
|
32721
|
-
|
32722
|
-
|
33160
|
+
App.ApplicationView = Ember.View.extend({
|
33161
|
+
actions: {
|
33162
|
+
anActionName: function(){}
|
33163
|
+
}
|
32723
33164
|
});
|
32724
33165
|
|
32725
|
-
aView = AView.create();
|
32726
|
-
aView.appendTo('body');
|
32727
33166
|
```
|
32728
33167
|
|
32729
|
-
Will throw `Uncaught TypeError: Cannot call method 'call' of undefined` when
|
32730
|
-
"click me" is clicked.
|
32731
|
-
|
32732
33168
|
### Additional Parameters
|
32733
33169
|
|
32734
33170
|
You may specify additional parameters to the `{{action}}` helper. These
|
@@ -32736,17 +33172,15 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
|
|
32736
33172
|
implementing the action.
|
32737
33173
|
|
32738
33174
|
```handlebars
|
32739
|
-
|
32740
|
-
{{
|
32741
|
-
|
32742
|
-
|
32743
|
-
|
32744
|
-
{{/each}}
|
32745
|
-
</script>
|
33175
|
+
{{#each person in people}}
|
33176
|
+
<div {{action "edit" person}}>
|
33177
|
+
click me
|
33178
|
+
</div>
|
33179
|
+
{{/each}}
|
32746
33180
|
```
|
32747
33181
|
|
32748
|
-
Clicking "click me" will trigger the `edit` method on the current
|
32749
|
-
|
33182
|
+
Clicking "click me" will trigger the `edit` method on the current controller
|
33183
|
+
with the value of `person` as a parameter.
|
32750
33184
|
|
32751
33185
|
@method action
|
32752
33186
|
@for Ember.Handlebars.helpers
|
@@ -32930,8 +33364,23 @@ Ember.ControllerMixin.reopen({
|
|
32930
33364
|
aController.transitionToRoute('blogPost', aPost);
|
32931
33365
|
```
|
32932
33366
|
|
33367
|
+
Multiple models will be applied last to first recursively up the
|
33368
|
+
resource tree.
|
33369
|
+
|
33370
|
+
```javascript
|
33371
|
+
|
33372
|
+
this.resource('blogPost', {path:':blogPostId'}, function(){
|
33373
|
+
this.resource('blogComment', {path: ':blogCommentId'});
|
33374
|
+
});
|
33375
|
+
|
33376
|
+
aController.transitionToRoute('blogComment', aPost, aComment);
|
33377
|
+
```
|
33378
|
+
|
33379
|
+
See also 'replaceRoute'.
|
33380
|
+
|
32933
33381
|
@param {String} name the name of the route
|
32934
|
-
@param {...Object} models the
|
33382
|
+
@param {...Object} models the model(s) to be used while transitioning
|
33383
|
+
to the route.
|
32935
33384
|
@for Ember.ControllerMixin
|
32936
33385
|
@method transitionToRoute
|
32937
33386
|
*/
|
@@ -32953,8 +33402,9 @@ Ember.ControllerMixin.reopen({
|
|
32953
33402
|
},
|
32954
33403
|
|
32955
33404
|
/**
|
32956
|
-
|
32957
|
-
|
33405
|
+
Transition into another route while replacing the current URL, if possible.
|
33406
|
+
This will replace the current history entry instead of adding a new one.
|
33407
|
+
Beside that, it is identical to `transitionToRoute` in all other respects.
|
32958
33408
|
|
32959
33409
|
```javascript
|
32960
33410
|
aController.replaceRoute('blogPosts');
|
@@ -32969,8 +33419,21 @@ Ember.ControllerMixin.reopen({
|
|
32969
33419
|
aController.replaceRoute('blogPost', aPost);
|
32970
33420
|
```
|
32971
33421
|
|
33422
|
+
Multiple models will be applied last to first recursively up the
|
33423
|
+
resource tree.
|
33424
|
+
|
33425
|
+
```javascript
|
33426
|
+
|
33427
|
+
this.resource('blogPost', {path:':blogPostId'}, function(){
|
33428
|
+
this.resource('blogComment', {path: ':blogCommentId'});
|
33429
|
+
});
|
33430
|
+
|
33431
|
+
aController.replaceRoute('blogComment', aPost, aComment);
|
33432
|
+
```
|
33433
|
+
|
32972
33434
|
@param {String} name the name of the route
|
32973
|
-
@param {...Object} models the
|
33435
|
+
@param {...Object} models the model(s) to be used while transitioning
|
33436
|
+
to the route.
|
32974
33437
|
@for Ember.ControllerMixin
|
32975
33438
|
@method replaceRoute
|
32976
33439
|
*/
|
@@ -33773,7 +34236,7 @@ DAG.prototype.addEdge = function(fromName, toName) {
|
|
33773
34236
|
}
|
33774
34237
|
function checkCycle(vertex, path) {
|
33775
34238
|
if (vertex.name === toName) {
|
33776
|
-
throw new Error("cycle detected: " + toName + " <- " + path.join(" <- "));
|
34239
|
+
throw new Ember.Error("cycle detected: " + toName + " <- " + path.join(" <- "));
|
33777
34240
|
}
|
33778
34241
|
}
|
33779
34242
|
visit(from, checkCycle);
|
@@ -33841,11 +34304,11 @@ var get = Ember.get,
|
|
33841
34304
|
container lookups before consulting the container for registered
|
33842
34305
|
items:
|
33843
34306
|
|
33844
|
-
|
33845
|
-
|
33846
|
-
|
33847
|
-
|
33848
|
-
|
34307
|
+
* templates are looked up on `Ember.TEMPLATES`
|
34308
|
+
* other names are looked up on the application after converting
|
34309
|
+
the name. For example, `controller:post` looks up
|
34310
|
+
`App.PostController` by default.
|
34311
|
+
* there are some nuances (see examples below)
|
33849
34312
|
|
33850
34313
|
### How Resolving Works
|
33851
34314
|
|
@@ -34211,16 +34674,15 @@ DeprecatedContainer.prototype = {
|
|
34211
34674
|
example, the `keypress` event causes the `keyPress` method on the view to be
|
34212
34675
|
called, the `dblclick` event causes `doubleClick` to be called, and so on.
|
34213
34676
|
|
34214
|
-
If there is a browser event that Ember does not listen for by
|
34215
|
-
can specify custom events and their corresponding view method
|
34216
|
-
setting the application's `customEvents` property:
|
34677
|
+
If there is a bubbling browser event that Ember does not listen for by
|
34678
|
+
default, you can specify custom events and their corresponding view method
|
34679
|
+
names by setting the application's `customEvents` property:
|
34217
34680
|
|
34218
34681
|
```javascript
|
34219
34682
|
App = Ember.Application.create({
|
34220
34683
|
customEvents: {
|
34221
|
-
// add support for the
|
34222
|
-
|
34223
|
-
'loadedmetadata': "loadedMetadata"
|
34684
|
+
// add support for the paste event
|
34685
|
+
'paste: "paste"
|
34224
34686
|
}
|
34225
34687
|
});
|
34226
34688
|
```
|
@@ -34333,7 +34795,7 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
|
|
34333
34795
|
`keyup`, and delegates them to your application's `Ember.View`
|
34334
34796
|
instances.
|
34335
34797
|
|
34336
|
-
If you would like additional events to be delegated to your
|
34798
|
+
If you would like additional bubbling events to be delegated to your
|
34337
34799
|
views, set your `Ember.Application`'s `customEvents` property
|
34338
34800
|
to a hash containing the DOM event name as the key and the
|
34339
34801
|
corresponding view method name as the value. For example:
|
@@ -34341,9 +34803,8 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
|
|
34341
34803
|
```javascript
|
34342
34804
|
App = Ember.Application.create({
|
34343
34805
|
customEvents: {
|
34344
|
-
// add support for the
|
34345
|
-
|
34346
|
-
'loadedmetadata': "loadedMetadata"
|
34806
|
+
// add support for the paste event
|
34807
|
+
'paste: "paste"
|
34347
34808
|
}
|
34348
34809
|
});
|
34349
34810
|
```
|
@@ -34369,12 +34830,17 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
|
|
34369
34830
|
|
34370
34831
|
this.scheduleInitialize();
|
34371
34832
|
|
34372
|
-
|
34373
|
-
|
34374
|
-
|
34833
|
+
Ember.libraries.registerCoreLibrary('Handlebars', Ember.Handlebars.VERSION);
|
34834
|
+
Ember.libraries.registerCoreLibrary('jQuery', Ember.$().jquery);
|
34375
34835
|
|
34836
|
+
if ( Ember.LOG_VERSION ) {
|
34837
|
+
Ember.LOG_VERSION = false; // we only need to see this once per Application#init
|
34838
|
+
var maxNameLength = Math.max.apply(this, Ember.A(Ember.libraries).mapBy("name.length"));
|
34376
34839
|
|
34840
|
+
Ember.libraries.each(function(name, version) {
|
34841
|
+
var spaces = new Array(maxNameLength - name.length + 1).join(" ");
|
34377
34842
|
|
34843
|
+
});
|
34378
34844
|
|
34379
34845
|
}
|
34380
34846
|
},
|
@@ -34508,19 +34974,20 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
|
|
34508
34974
|
```javascript
|
34509
34975
|
App = Ember.Application.create();
|
34510
34976
|
|
34511
|
-
App.Person
|
34512
|
-
App.Orange
|
34513
|
-
App.Email
|
34977
|
+
App.Person = Ember.Object.extend({});
|
34978
|
+
App.Orange = Ember.Object.extend({});
|
34979
|
+
App.Email = Ember.Object.extend({});
|
34980
|
+
App.Session = Ember.Object.create({});
|
34514
34981
|
|
34515
34982
|
App.register('model:user', App.Person, {singleton: false });
|
34516
34983
|
App.register('fruit:favorite', App.Orange);
|
34517
34984
|
App.register('communication:main', App.Email, {singleton: false});
|
34985
|
+
App.register('session', App.Session, {instantiate: false});
|
34518
34986
|
```
|
34519
34987
|
|
34520
34988
|
@method register
|
34521
|
-
@param
|
34522
|
-
@param
|
34523
|
-
@param factory {String}
|
34989
|
+
@param fullName {String} type:name (e.g., 'model:user')
|
34990
|
+
@param factory {Function} (e.g., App.Person)
|
34524
34991
|
@param options {String} (optional)
|
34525
34992
|
**/
|
34526
34993
|
register: function() {
|
@@ -34577,7 +35044,9 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
|
|
34577
35044
|
if (this.isDestroyed) { return; }
|
34578
35045
|
|
34579
35046
|
// At this point, the App.Router must already be assigned
|
34580
|
-
|
35047
|
+
if (this.Router) {
|
35048
|
+
this.register('router:main', this.Router);
|
35049
|
+
}
|
34581
35050
|
|
34582
35051
|
this.runInitializers();
|
34583
35052
|
Ember.runLoadHooks('application', this);
|
@@ -34740,8 +35209,8 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
|
|
34740
35209
|
/**
|
34741
35210
|
@private
|
34742
35211
|
|
34743
|
-
If the application has a router, use it to route to the current URL, and
|
34744
35212
|
trigger a new call to `route` whenever the URL changes.
|
35213
|
+
If the application has a router, use it to route to the current URL, and
|
34745
35214
|
|
34746
35215
|
@method startRouting
|
34747
35216
|
@property router {Ember.Router}
|
@@ -34768,10 +35237,10 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
|
|
34768
35237
|
ready: Ember.K,
|
34769
35238
|
|
34770
35239
|
/**
|
34771
|
-
|
34772
35240
|
@deprecated Use 'Resolver' instead
|
34773
35241
|
Set this to provide an alternate class to `Ember.DefaultResolver`
|
34774
35242
|
|
35243
|
+
|
34775
35244
|
@property resolver
|
34776
35245
|
*/
|
34777
35246
|
resolver: null,
|
@@ -34992,6 +35461,8 @@ Ember.ControllerMixin.reopen({
|
|
34992
35461
|
length = get(needs, 'length');
|
34993
35462
|
|
34994
35463
|
if (length > 0) {
|
35464
|
+
|
35465
|
+
|
34995
35466
|
verifyNeedsDependencies(this, this.container, needs);
|
34996
35467
|
|
34997
35468
|
// if needs then initialize controllers proxy
|
@@ -35001,6 +35472,11 @@ Ember.ControllerMixin.reopen({
|
|
35001
35472
|
this._super.apply(this, arguments);
|
35002
35473
|
},
|
35003
35474
|
|
35475
|
+
/**
|
35476
|
+
@method controllerFor
|
35477
|
+
@see {Ember.Route#controllerFor}
|
35478
|
+
@deprecated Use `needs` instead
|
35479
|
+
*/
|
35004
35480
|
controllerFor: function(controllerName) {
|
35005
35481
|
|
35006
35482
|
return Ember.controllerFor(get(this, 'container'), controllerName);
|