ember-source 1.4.0 → 1.5.0.beta.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,14 +5,15 @@
5
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
- * @version 1.4.0
8
+ * @version 1.5.0-beta.1.1
9
9
  */
10
- !function(){var e,t,r,n;!function(){var i={},o={};e=function(e,t,r){i[e]={deps:t,callback:r}},n=r=t=function(e){function r(t){if("."!==t.charAt(0))return t;for(var r=t.split("/"),n=e.split("/").slice(0,-1),i=0,o=r.length;o>i;i++){var a=r[i];if(".."===a)n.pop();else{if("."===a)continue;n.push(a)}}return n.join("/")}if(n._eak_seen=i,o[e])return o[e];if(o[e]={},!i[e])throw new Error("Could not find module "+e);for(var a,s=i[e],u=s.deps,l=s.callback,c=[],h=0,m=u.length;m>h;h++)"exports"===u[h]?c.push(a={}):c.push(t(r(u[h])));var f=l.apply(this,c);return o[e]=a||f}}(),function(){"undefined"==typeof Ember&&(Ember={});{var e=(Ember.imports=Ember.imports||this,Ember.exports=Ember.exports||this);Ember.lookup=Ember.lookup||this}e.Em=e.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.4.0",Ember.ENV||(Ember.ENV="undefined"!=typeof EmberENV?EmberENV:"undefined"!=typeof ENV?ENV:{}),Ember.config=Ember.config||{},"undefined"==typeof Ember.ENV.DISABLE_RANGE_API&&(Ember.ENV.DISABLE_RANGE_API=!0),"undefined"==typeof MetamorphENV&&(e.MetamorphENV={}),MetamorphENV.DISABLE_RANGE_API=Ember.ENV.DISABLE_RANGE_API,Ember.FEATURES=Ember.ENV.FEATURES||{},Ember.FEATURES.isEnabled=function(e){var t=Ember.FEATURES[e];return Ember.ENV.ENABLE_ALL_FEATURES?!0:t===!0||t===!1||void 0===t?t:Ember.ENV.ENABLE_OPTIONAL_FEATURES?!0:!1},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,"undefined"==typeof Ember.EXTEND_PROTOTYPES&&(Ember.EXTEND_PROTOTYPES=!0),Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.debug&&(Ember.debug=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(e,t){return t}),Ember.uuid=0,Ember.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return Ember.isNone(e)||0===e.length&&"function"!=typeof e||"object"==typeof e&&0===Ember.get(e,"length")},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty)}(),function(){var e=Ember.platform={};if(Ember.create=Object.create,Ember.create&&2!==Ember.create({a:1},{a:{value:2}}).a&&(Ember.create=null),!Ember.create||Ember.ENV.STUB_OBJECT_CREATE){var t=function(){};Ember.create=function(e,r){if(t.prototype=e,e=new t,r){t.prototype=e;for(var n in r)t.prototype[n]=r[n].value;e=new t}return t.prototype=null,e},Ember.create.isSimulated=!0}var r,n,i=Object.defineProperty;if(i)try{i({},"a",{get:function(){}})}catch(o){i=null}i&&(r=function(){var e={};return i(e,"a",{configurable:!0,enumerable:!0,get:function(){},set:function(){}}),i(e,"a",{configurable:!0,enumerable:!0,writable:!0,value:!0}),e.a===!0}(),n=function(){try{return i(document.createElement("div"),"definePropertyOnDOM",{}),!0}catch(e){}return!1}(),r?n||(i=function(e,t,r){var n;return n="object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName,n?e[t]=r.value:Object.defineProperty(e,t,r)}):i=null),e.defineProperty=i,e.hasPropertyAccessors=!0,e.defineProperty||(e.hasPropertyAccessors=!1,e.defineProperty=function(e,t,r){r.get||(e[t]=r.value)},e.defineProperty.isSimulated=!0),Ember.ENV.MANDATORY_SETTER&&!e.hasPropertyAccessors&&(Ember.ENV.MANDATORY_SETTER=!1)}(),function(){var e=function(e){return e&&Function.prototype.toString.call(e).indexOf("[native code]")>-1},t=e(Array.prototype.map)?Array.prototype.map:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=new Array(r),i=arguments[1],o=0;r>o;o++)o in t&&(n[o]=e.call(i,t[o],o,t));return n},r=e(Array.prototype.forEach)?Array.prototype.forEach:function(e){if(void 0===this||null===this)throw new TypeError;var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=arguments[1],i=0;r>i;i++)i in t&&e.call(n,t[i],i,t)},n=e(Array.prototype.indexOf)?Array.prototype.indexOf:function(e,t){null===t||void 0===t?t=0:0>t&&(t=Math.max(0,this.length+t));for(var r=t,n=this.length;n>r;r++)if(this[r]===e)return r;return-1};Ember.ArrayPolyfills={map:t,forEach:r,indexOf:n},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=r),Array.prototype.indexOf||(Array.prototype.indexOf=n))}(),function(){var e=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var t=Error.apply(this,arguments);Error.captureStackTrace&&Error.captureStackTrace(this,Ember.Error);for(var r=0;r<e.length;r++)this[e[r]]=t[e[r]]},Ember.Error.prototype=Ember.create(Error.prototype),Ember.onerror=null,Ember.handleErrors=function(e,t){if("function"!=typeof Ember.onerror)return e.call(t||this);try{return e.call(t||this)}catch(r){Ember.onerror(r)}}}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}Ember.GUID_PREFIX="ember";var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,o=0,a=[],s={},u=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var l={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t=Ember.GUID_PREFIX);var n=t+o++;return e&&(l.value=n,r(e,i,l)),n},Ember.guidFor=function(e){if(void 0===e)return"(undefined)";if(null===e)return"(null)";var t,n=typeof e;switch(n){case"number":return t=a[e],t||(t=a[e]="nu"+e),t;case"string":return t=s[e],t||(t=s[e]="st"+o++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+o++,l.value=t,r(e,i,l),t)}};var c=Ember.META_DESC={writable:!0,configurable:!1,enumerable:!1,value:null},h=Ember.GUID_KEY+"_meta";Ember.META_KEY=h;var m=Ember.platform.defineProperty.isSimulated;e.prototype={descs:null,deps:null,watching:null,listeners:null,cache:null,source:null,mixins:null,bindings:null,chains:null,chainWatchers:null,values:null,proto:null},m&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){});var f=new e(null);u&&(f.values={}),Ember.EMPTY_META=f,Ember.meta=function(t,i){var o=t[h];return i===!1?o||f:(o?o.source!==t&&(m||r(t,h,c),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):(m||r(t,h,c),o=new e(t),u&&(o.values={}),t[h]=o,o.descs.constructor=null),o)},Ember.getMeta=function(e,t){var r=Ember.meta(e,!1);return r[t]},Ember.setMeta=function(e,t,r){var n=Ember.meta(e,!0);return n[t]=r,r},Ember.metaPath=function(e,t,r){for(var i,o,a=Ember.meta(e,r),s=0,u=t.length;u>s;s++){if(i=t[s],o=a[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=a[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=a[i]={__ember_source__:e}}a=o}return o},Ember.wrap=function(e,t){function r(){}function n(){var n,i=this._super;return this._super=t||r,n=e.apply(this,arguments),this._super=i,n}return n.wrappedFunction=e,n.__ember_observes__=e.__ember_observes__,n.__ember_observesBefore__=e.__ember_observesBefore__,n.__ember_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(a){o=a}}if(o)throw o;return void 0===i?n:i}:function(e,t,r){var n,i;r=r||this;try{n=e.call(r)}finally{i=t.call(r)}return void 0===i?n:i},Ember.tryCatchFinally=p?function(e,t,r,n){var i,o,a;n=n||this;try{i=e.call(n)}catch(s){i=t.call(n,s)}finally{try{o=r.call(n)}catch(u){a=u}}if(a)throw a;return void 0===o?i:o}:function(e,t,r,n){var i,o;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{o=r.call(n)}return void 0===o?i:o};var d={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){d["[object "+e+"]"]=e.toLowerCase()});var 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&&(e instanceof Error?t="error":Ember.Object&&e instanceof Ember.Object?t="instance":e instanceof Date&&(t="date")),t},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(", ")+"}"}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,a=e.length;a>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=function(){var e="undefined"!=typeof window?window.performance||{}:{},t=e.now||e.mozNow||e.webkitNow||e.msNow||e.oNow;return t?t.bind(e):function(){return+new Date}}();Ember.Instrumentation.instrument=function(e,i,o,a){function s(){for(p=0,d=m.length;d>p;p++)f=m[p],b[p]=f.before(e,n(),i);return o.call(a)}function u(e){i=i||{},i.exception=e}function l(){for(p=0,d=m.length;d>p;p++)f=m[p],f.after(e,n(),i,b[p]);Ember.STRUCTURED_PROFILE&&console.timeEnd(c)}var c,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(c=e+": "+i.object,console.time(c)),m||(m=r(e)),0===m.length)return h=o.call(a),Ember.STRUCTURED_PROFILE&&console.timeEnd(c),h;var f,p,d,b=[];return Ember.tryCatchFinally(s,u,l)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),a=[],s=0,u=o.length;u>s;s++)i=o[s],"*"===i?a.push("[^\\.]*"):a.push(i);a=a.join("\\."),a+="(\\..*)?";var l={pattern:r,regex:new RegExp("^"+a+"$"),object:n};return e.push(l),t={},l},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,i;e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf,i=Array.prototype.filter||Ember.ArrayPolyfills.filter,n=Array.prototype.splice;var o=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)},filter:function(e,t,r){return e.filter?e.filter.call(e,t,r):i.call(e,t,r)},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?[]:o.map(t,function(t){return o.indexOf(e,t)})},addObject:function(e,t){var r=o.indexOf(e,t);-1===r&&e.push(t)},removeObject:function(e,t){var r=o.indexOf(e,t);-1!==r&&e.splice(r,1)},_replace:function(e,t,r,i){for(var o,a,s=[].concat(i),u=[],l=6e4,c=t,h=r;s.length;)a=h>l?l:h,0>=a&&(a=0),o=s.splice(0,l),o=[c,a].concat(o),c+=l,h-=a,u=u.concat(n.apply(e,o));return u},replace:function(e,t,r,n){return e.replace?e.replace(t,r,n):o._replace(e,t,r,n)},intersection:function(e,t){var r=[];return o.forEach(e,function(e){o.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 s(e,n);var i,o=e[t],a=o&&o.descs[n];return a?a.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 a=Ember.normalizeTuple=function(t,r){var a,s=i.test(r),u=!s&&n.test(r);if((!t||u)&&(t=Ember.lookup),s&&(r=r.slice(5)),t===Ember.lookup&&(a=r.match(o)[0],t=e(t,a),r=r.slice(a.length+1)),!r||0===r.length)throw new Ember.Error("Path cannot be empty");return[t,r]},s=Ember._getPath=function(t,r){var n,o,s,u,l;if(null===t&&-1===r.indexOf("."))return e(Ember.lookup,r);for(n=i.test(r),(!t||n)&&(s=a(t,r),t=s[0],r=s[1],s.length=0),o=r.split("."),l=o.length,u=0;null!=t&&l>u;u++)if(t=e(t,o[u],!0),t&&t.isDestroyed)return void 0;return t};Ember.getWithDefault=function(t,r,n){var i=e(t,r);return void 0===i?n:i},Ember.get=e}(),function(){function e(e,t,r){for(var n=-1,i=0,o=e.length;o>i;i+=3)if(t===e[i]&&r===e[i+1]){n=i;break}return n}function t(e,t){var r,n=f(e,!0);return n.listeners||(n.listeners={}),n.hasOwnProperty("listeners")||(n.listeners=m(n.listeners)),r=n.listeners[t],r&&!n.listeners.hasOwnProperty(t)?r=n.listeners[t]=n.listeners[t].slice():r||(r=n.listeners[t]=[]),r}function r(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r];if(o)for(var a=o.length-3;a>=0;a-=3){var s=o[a],u=o[a+1],l=o[a+2],c=e(n,s,u);-1===c&&n.push(s,u,l)}}function n(t,r,n){var i=t[p],o=i&&i.listeners&&i.listeners[r],a=[];if(o){for(var s=o.length-3;s>=0;s-=3){var u=o[s],l=o[s+1],c=o[s+2],h=e(n,u,l);-1===h&&(n.push(u,l,c),a.push(u,l,c))}return a}}function i(r,n,i,o,a){o||"function"!=typeof i||(o=i,i=null);var s=t(r,n),u=e(s,i,o),l=0;a&&(l|=b),-1===u&&(s.push(i,o,l),"function"==typeof r.didAddListener&&r.didAddListener(n,i,o))}function o(r,n,i,o){function a(i,o){var a=t(r,n),s=e(a,i,o);-1!==s&&(a.splice(s,3),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,o))}if(o||"function"!=typeof i||(o=i,i=null),o)a(i,o);else{var s=r[p],u=s&&s.listeners&&s.listeners[n];if(!u)return;for(var l=u.length-3;l>=0;l-=3)a(u[l],u[l+1])}}function a(r,n,i,o,a){function s(){return a.call(i)}function u(){-1!==c&&(l[c+2]&=~v)}o||"function"!=typeof i||(o=i,i=null);var l=t(r,n),c=e(l,i,o);return-1!==c&&(l[c+2]|=v),Ember.tryFinally(s,u)}function s(r,n,i,o,a){function s(){return a.call(i)}function u(){for(var e=0,t=f.length;t>e;e++){var r=f[e];p[e][r+2]&=~v}}o||"function"!=typeof i||(o=i,i=null);var l,c,h,m,f=[],p=[];for(h=0,m=n.length;m>h;h++){l=n[h],c=t(r,l);var d=e(c,i,o);-1!==d&&(c[d+2]|=v,f.push(d),p.push(c))}return Ember.tryFinally(s,u)}function u(e){var t=e[p].listeners,r=[];if(t)for(var n in t)t[n]&&r.push(n);return r}function l(e,t,r,n){if(e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,r),!n){var i=e[p];n=i&&i.listeners&&i.listeners[t]}if(n){for(var a=n.length-3;a>=0;a-=3){var s=n[a],u=n[a+1],l=n[a+2];u&&(l&v||(l&b&&o(e,t,s,u),s||(s=e),"string"==typeof u&&(u=s[u]),r?u.apply(s,r):u.call(s)))}return!0}}function c(e,t){var r=e[p],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[p],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,a=i.length;a>o;o+=3){var s=i[o],u=i[o+1];r.push([s,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=a,Ember._suspendListeners=s,Ember.sendEvent=l,Ember.hasListeners=c,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,a=this.observers,s=e(t),u=o[s];return u||(o[s]=u={}),i=u[r],void 0===i&&(i=a.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),a[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t){var n=e[h],i=n&&n.watching[t]>0||"length"===t,a=n&&n.proto,s=n&&n.descs[t];i&&a!==e&&(s&&s.willChange&&s.willChange(e,t),r(e,t,n),o(e,t,n),l(e,t))}function t(e,t){var r=e[h],i=r&&r.watching[t]>0||"length"===t,o=r&&r.proto,s=r&&r.descs[t];o!==e&&(s&&s.didChange&&s.didChange(e,t),(i||"length"===t)&&(n(e,t,r),a(e,t,r,!1),c(e,t)))}function r(t,r,n){if(!t.isDestroying){var o=w,a=!o;a&&(o=w={}),i(e,t,r,o,n),a&&(w=null)}}function n(e,r,n){if(!e.isDestroying){var o=_,a=!o;a&&(o=_={}),i(t,e,r,o,n),a&&(_=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 a=i.deps;if(a=a&&a[r])for(var s in a){var u=i.descs[s];u&&u._suspended===t||e(t,s)}}}function o(t,r,n){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var i,o,a=n.chainWatchers[r],s=[];for(i=0,o=a.length;o>i;i++)a[i].willChange(s);for(i=0,o=s.length;o>i;i+=2)e(s[i],s[i+1])}}function a(e,r,n,i){if(n&&n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var o,a,s=n.chainWatchers[r],u=i?null:[];for(o=0,a=s.length;a>o;o++)s[o].didChange(u);if(!i)for(o=0,a=u.length;a>o;o+=2)t(u[o],u[o+1])}}function s(){y++}function u(){y--,0>=y&&(E.clear(),g.flush())}function l(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 c(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_KEY,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){a(e,t,r,!0)},Ember.beginPropertyChanges=s,Ember.endPropertyChanges=u,Ember.changeProperties=function(e,t){s(),f(e,u,t)}}(),function(){function e(e,t,r,o){var a;if(a=t.slice(t.lastIndexOf(".")+1),t=t===a?a:t.slice(0,t.length-(a.length+1)),"this"!==t&&(e=n(e,t)),!a||0===a.length)throw new Ember.Error("Property set failed: You passed an empty path");if(!e){if(o)return;throw new Ember.Error('Property set failed: object in path "'+t+'" could not be found or was destroyed.')}return i(e,a,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function(n,i,o,a){if("string"==typeof n&&(o=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,o,a);var s,u,l=n[t],c=l&&l.descs[i];return c?c.set(n,i,o):(s="object"==typeof n&&!(i in n),s&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,o):l&&l.watching[i]>0?(u=r?l.values[i]:n[i],o!==u&&(Ember.propertyWillChange(n,i),r?(void 0!==u||i in n)&&n.propertyIsEnumerable(i)?l.values[i]=o:Ember.defineProperty(n,i,null,o):n[i]=o,Ember.propertyDidChange(n,i))):n[i]=o),o};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.trySet=function(e,t,r){return i(e,t,r,!0)}}(),function(){var e=Ember.set,t=Ember.guidFor,r=Ember.ArrayPolyfills.indexOf,n=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},i=function(e,t){var r=e.keys.copy(),i=n(e.values);return t.keys=r,t.values=i,t.length=e.length,t},o=Ember.OrderedSet=function(){this.clear()};o.create=function(){return new o},o.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(e){var r=t(e),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(e))},remove:function(e){var n=t(e),i=this.presenceSet,o=this.list;delete i[n];var a=r.call(o,e);a>-1&&o.splice(a,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 a=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};a.create=function(){return new a},a.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,a=t(r);i.add(r),o[a]=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 a)}};var s=Ember.MapWithDefault=function(e){a.call(this),this.defaultValue=e.defaultValue};s.create=function(e){return e?new s(e):new a},s.prototype=Ember.create(a.prototype),s.prototype.get=function(e){var t=this.has(e);if(t)return a.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},s.prototype.copy=function(){return i(this,new s({defaultValue:this.defaultValue}))}}(),function(){function e(e){var t,r;Ember.imports.console?t=Ember.imports.console:"undefined"!=typeof console&&(t=console);var n="object"==typeof t?t[e]:null;return n?n.apply?(r=function(){n.apply(t,arguments)},r.displayName="console."+e,r):function(){var e=Array.prototype.join.call(arguments,", ");n(e)}:void 0}function t(e,t){if(!e)try{throw new Ember.Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},0)}}Ember.Logger={log:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K,assert:e("assert")||t}}(),function(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};Ember.defineProperty=function(e,a,s,u,l){var c,h,m,f;return l||(l=t(e)),c=l.descs,h=l.descs[a],m=l.watching[a]>0,h instanceof Ember.Descriptor&&h.teardown(e,a),s instanceof Ember.Descriptor?(f=s,c[a]=s,n&&m?r(e,a,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[a]=void 0):(c[a]=void 0,null==s?(f=u,n&&m?(l.values[a]=u,r(e,a,{configurable:!0,enumerable:!0,set:i,get:o(a)})):e[a]=u):(f=s,r(e,a,s))),m&&Ember.overrideChains(e,a,l),e.didDefineProperty&&e.didDefineProperty(e,a,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,a){if("length"!==o||"array"!==t(i)){var s=a||e(i),u=s.watching;u[o]?u[o]=(u[o]||0)+1:(u[o]=1,"function"==typeof i.willWatchProperty&&i.willWatchProperty(o),r&&o in i&&(s.values[o]=i[o],n(i,o,{configurable:!0,enumerable:i.propertyIsEnumerable(o),set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(o)})))}},Ember.unwatchKey=function(t,i,o){var a=o||e(t),s=a.watching;1===s[i]?(s[i]=0,"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&n(t,i,{configurable:!0,enumerable:t.propertyIsEnumerable(i),set:function(e){n(t,i,{configurable:!0,writable:!0,enumerable:!0,value:e}),delete a.values[i]},get:Ember.DEFAULT_GETTER_FUNCTION(i)})):s[i]>1&&s[i]--}}(),function(){function e(e){return e.match(c)[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,i)}}function r(e,t){if(!e)return void 0;var r=e[h];if(r&&r.proto===e)return void 0;if("@each"===t)return i(e,t);var n=r&&r.descs[t];return n&&n._cacheable?t in r.cache?r.cache[t]:void 0:i(e,t)}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,a=Ember.ArrayPolyfills.forEach,s=Ember.warn,u=Ember.watchKey,l=Ember.unwatchKey,c=/^([^\.\*]+)/,h=Ember.META_KEY,m=[];Ember.flushPendingChains=function(){if(0!==m.length){var e=m;m=[],a.call(e,function(e){e[0].add(e[1])}),s("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===m.length)}};var f=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var n=e[h];if(!n||n.hasOwnProperty("chainWatchers")){var i=n&&n.chainWatchers;if(i&&i[t]){i=i[t];for(var o=0,a=i.length;a>o;o++)i[o]===r&&i.splice(o,1)}l(e,t,n)}}},p=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()},d=p.prototype;d.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=r(e,this._key)}return this._value},d.destroy=function(){if(this._watching){var e=this._object;e&&f(e,this._key,this),this._watching=!1}},d.copy=function(e){var t,r=new p(null,null,e),n=this._paths;for(t in n)n[t]<=0||r.add(t);return r},d.add=function(t){var r,n,i,a,s;if(s=this._paths,s[t]=(s[t]||0)+1,r=this.value(),n=o(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return m.push([this,t]),n.length=0,void 0;a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,a)},d.remove=function(t){var r,n,i,a,s;s=this._paths,s[t]>0&&s[t]--,r=this.value(),n=o(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},d.count=0,d.chain=function(t,r,n){var i,o=this._chains;o||(o=this._chains={}),i=o[t],i||(i=o[t]=new p(this,t,n)),i.count++,r&&r.length>0&&(t=e(r),r=r.slice(t.length+1),i.chain(t,r))},d.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())},d.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)},d.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))},d.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))},d.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(f(this._object,this._key,this),this._object=r,t(r,this._key,this)),this._value=void 0,this._parent&&"@each"===this._parent._key&&this.value()}var n=this._chains;if(n)for(var i in n)n.hasOwnProperty(i)&&n[i].didChange(e);null!==e&&this._parent&&this._parent.chainDidChange(this,this._key,1,e)},Ember.finishChains=function(e){var t=e[h],r=t&&t.chains;r&&(r.value()!==e?n(e).chains=r=r.copy(e):r.didChange(null))}}(),function(){var e=Ember.EnumerableUtils.forEach,t=/^((?:[^\.]*\.)*)\{(.*)\}$/;Ember.expandProperties=function(r,n){var i,o,a;(i=t.exec(r))?(o=i[1],a=i[2],e(a.split(","),function(e){n(o+e)})):n(r)}}(),function(){function e(e,r){var i=r||t(e),o=i.chains;return o?o.value()!==e&&(o=i.chains=o.copy(e)):o=i.chains=new n(null,null,e),o}var t=Ember.meta,r=Ember.typeOf,n=Ember._ChainNode;Ember.watchPath=function(n,i,o){if("length"!==i||"array"!==r(n)){var a=o||t(n),s=a.watching;s[i]?s[i]=(s[i]||0)+1:(s[i]=1,e(n,a).add(i))}},Ember.unwatchPath=function(r,n,i){var o=i||t(r),a=o.watching;1===a[n]?(a[n]=0,e(r,o).remove(n)):a[n]>1&&a[n]--}}(),function(){function e(e){return"*"===e||!c.test(e)}var t=(Ember.meta,Ember.GUID_KEY),r=Ember.META_KEY,n=Ember.removeChainWatcher,i=Ember.watchKey,o=Ember.unwatchKey,a=Ember.watchPath,s=Ember.unwatchPath,u=Ember.typeOf,l=Ember.generateGuid,c=/[\.\*]/;Ember.watch=function(t,r,n){("length"!==r||"array"!==u(t))&&(e(r)?i(t,r,n):a(t,r,n))},Ember.isWatching=function(e,t){var n=e[r];return(n&&n.watching[t])>0},Ember.watch.flushPending=Ember.flushPendingChains,Ember.unwatch=function(t,r,n){("length"!==r||"array"!==u(t))&&(e(r)?o(t,r,n):s(t,r,n))},Ember.rewatch=function(e){var n=e[r],i=n&&n.chains;t in e&&!e.hasOwnProperty(t)&&l(e),i&&i.value()!==e&&(n.chains=i.copy(e))};var h=[];Ember.destroy=function(e){var t,i,o,a,s=e[r];if(s&&(e[r]=null,t=s.chains))for(h.push(t);h.length>0;){if(t=h.pop(),i=t._chains)for(o in i)i.hasOwnProperty(o)&&h.push(i[o]);t._watching&&(a=t._object,a&&n(a,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=h(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var a,s,u,l,c,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)l=h[s],c=e(a,l),c[i]=(c[i]||0)+1,f(n,l,o)}function n(r,n,i,o){var a,s,u,l,c,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)l=h[s],c=e(a,l),c[i]=(c[i]||0)-1,p(n,l,o)}function i(e,t){this.func=e,this._dependentKeys=t&&t.dependentKeys,this._cacheable=t&&void 0!==t.cacheable?t.cacheable:!0,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 a(e,t){for(var r={},n=0;n<t.length;n++)r[t[n]]=s(e,t[n]);return r}var s=Ember.get,u=Ember.set,l=Ember.meta,c=[].slice,h=Ember.create,m=Ember.META_KEY,f=Ember.watch,p=Ember.unwatch,d=Ember.expandProperties;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(){var e,t=function(t){e.push(t)};e=[];for(var r=0,n=arguments.length;n>r;r++)d(arguments[r],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=l(e);t in r.cache&&(delete r.cache[t],n(this,e,t,r))}},b.get=function(e,t){var n,i,a,s;if(this._cacheable){if(a=l(e),i=a.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),s=a.chainWatchers&&a.chainWatchers[t],s&&o(s),r(this,e,t,a)}else n=this.func.call(e,t);return n},b.set=function(e,t,n){var i,o,a,s=this._cacheable,u=this.func,c=l(e,s),h=c.watching[t],m=this._suspended,f=!1,p=c.cache;if(this._readOnly)throw new Ember.Error("Cannot Set: "+t+" on: "+Ember.inspect(e));this._suspended=e;try{if(s&&p.hasOwnProperty(t)&&(o=p[t],f=!0),i=u.wrappedFunction?u.wrappedFunction.length:u.length,3===i)a=u.call(e,t,n,o);else{if(2!==i)return Ember.defineProperty(e,t,null,o),Ember.set(e,t,n),void 0;a=u.call(e,t,n)}if(f&&o===a)return;h&&Ember.propertyWillChange(e,t),f&&delete p[t],s&&(f||r(this,e,t,c),p[t]=a),h&&Ember.propertyDidChange(e,t)}finally{this._suspended=m}return a},b.teardown=function(e,t){var r=l(e);return t in r.cache&&n(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;if(arguments.length>1&&(t=c.call(arguments,0,-1),e=c.call(arguments,-1)[0]),"function"!=typeof e)throw new Ember.Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=e[m],n=r&&r.cache;return n&&t in n?n[t]:void 0};var v,E;v=function(e,t){Ember.computed[e]=function(e){var r=c.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}},E=function(e,t){Ember.computed[e]=function(){var e=c.call(arguments),r=Ember.computed(function(){return t.apply(this,[a(this,e)])});return r.property.apply(r,e)}},v("empty",function(e){return Ember.isEmpty(s(this,e))}),v("notEmpty",function(e){return!Ember.isEmpty(s(this,e))}),v("none",function(e){return Ember.isNone(s(this,e))}),v("not",function(e){return!s(this,e)}),v("bool",function(e){return!!s(this,e)}),v("match",function(e,t){var r=s(this,e);return"string"==typeof r?t.test(r):!1}),v("equal",function(e,t){return s(this,e)===t}),v("gt",function(e,t){return s(this,e)>t}),v("gte",function(e,t){return s(this,e)>=t}),v("lt",function(e,t){return s(this,e)<t}),v("lte",function(e,t){return s(this,e)<=t}),E("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),E("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),E("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),E("collect",function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&(Ember.isNone(e[r])?t.push(null):t.push(e[r]));
11
- return t}),Ember.computed.alias=function(e){return Ember.computed(e,function(t,r){return arguments.length>1?(u(this,e,r),r):s(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return s(this,e)})},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:s(this,e):null!=r?r:s(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,a){var s=i.call(r,t);return Ember._suspendListeners(e,s,n,o,a)},Ember._suspendObservers=function(t,r,n,o,a){var s=i.call(r,e);return Ember._suspendListeners(t,s,n,o,a)},Ember.beforeObserversFor=function(e,r){return Ember.listenersFor(e,t(r))},Ember.removeBeforeObserver=function(e,r,n,i){return Ember.unwatch(e,r),Ember.removeListener(e,t(r),n,i),this}}(),function(){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,a,s,u=this._queue;for(a=0,s=u.length;s>a;a+=4)if(i=u[a],o=u[a+1],i===e&&o===t)return u[a+2]=r,u[a+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,a=this.options,s=a&&a.before,u=a&&a.after,l=o.length;for(l&&s&&s(),i=0;l>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);l&&u&&u(),o.length>l?(this._queue=o.slice(l),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,a=e.length;a>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 a=this.queues,s=a[e];if(!s)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?s.pushUnique(t,r,n,o):s.push(t,r,n,o)},flush:function(){for(var e,t,r,i,o=this.queues,a=this.queueNames,s=0,u=a.length;u>s;){e=a[s],t=o[e],r=t._queueBeingFlushed=t._queue.slice(),t._queue=[];var l,c,h,m,f=t.options,p=f&&f.before,d=f&&f.after,b=0,v=r.length;for(v&&p&&p();v>b;)l=r[b],c=r[b+1],h=r[b+2],m=r[b+3],"string"==typeof c&&(c=l[c]),c&&(h&&h.length>0?c.apply(l,h):c.call(l)),b+=4;t._queueBeingFlushed=null,v&&d&&d(),-1===(i=n(this,s))?s++:s=i}}},t.DeferredActionQueues=r}),e("backburner",["backburner/deferred_action_queues","exports"],function(e,t){"use strict";function r(e){return"number"==typeof e||g.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(),l=E.setTimeout(function(){l=null,e.end()})}function o(e,t,r){(!c||h>t)&&(c&&clearTimeout(c),c=E.setTimeout(function(){c=null,h=null,a(e)},r),h=t)}function a(e){var t,r,n,i,a=+new Date;e.run(function(){for(n=0,i=v.length;i>n&&(t=v[n],!(t>a));n+=2);for(r=v.splice(0,n),n=1,i=r.length;i>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),v.length&&o(e,v[0],v[0]-a)}function s(e,t){for(var r,n=-1,i=0,o=b.length;o>i;i++)if(r=b[i],r[0]===e&&r[1]===t){n=i;break}return n}function u(e,t){for(var r,n=-1,i=0,o=d.length;o>i;i++)if(r=d[i],r[0]===e&&r[1]===t){n=i;break}return n}var l,c,h,m=e.DeferredActionQueues,f=[].slice,p=[].pop,d=[],b=[],v=[],E=this,g=/\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 m(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,f.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:void 0,o=arguments.length>3?f.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:void 0,o=arguments.length>3?f.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,l)}var t,n,i,a,s,u,l=f.call(arguments),c=l.length,h=this;if(0!==c){if(1===c)t=l.shift(),n=0;else if(2===c)a=l[0],s=l[1],"function"==typeof s||"function"==typeof a[s]?(i=l.shift(),t=l.shift(),n=0):r(s)?(t=l.shift(),n=l.shift()):(t=l.shift(),n=0);else{var m=l[l.length-1];r(m)&&(n=l.pop()),a=l[0],u=l[1],"function"==typeof u||"string"==typeof u&&null!==a&&u in a?(i=l.shift(),t=l.shift()):t=l.shift()}var p=+new Date+parseInt(n,10);"string"==typeof t&&(t=i[t]);var d,b;for(d=0,b=v.length;b>d&&!(p<v[d]);d+=2);return v.splice(d,0,p,e),o(h,p,n),e}},throttle:function(e,t){var r,n,i,o=this,a=arguments,s=parseInt(p.call(a),10);return n=u(e,t),n>-1?d[n]:(i=E.setTimeout(function(){o.run.apply(o,a);var r=u(e,t);r>-1&&d.splice(r,1)},s),r=[e,t,i],d.push(r),r)},debounce:function(e,t){var r,n,i,o,a=this,u=arguments,l=p.call(u);return"number"==typeof l||"string"==typeof l?(r=l,l=!1):r=p.call(u),r=parseInt(r,10),n=s(e,t),n>-1&&(i=b[n],b.splice(n,1),clearTimeout(i[2])),o=E.setTimeout(function(){l||a.run.apply(a,u);var r=s(e,t);r>-1&&b.splice(r,1)},r),l&&-1===n&&a.run.apply(a,u),i=[e,t,o],b.push(i),i},cancelTimers:function(){var e,t;for(e=0,t=d.length;t>e;e++)clearTimeout(d[e][2]);for(d=[],e=0,t=b.length;t>e;e++)clearTimeout(b[e][2]);b=[],c&&(clearTimeout(c),c=null),v=[],l&&(clearTimeout(l),l=null)},hasTimers:function(){return!!v.length||l},cancel:function(e){var t=typeof e;if(e&&"object"===t&&e.queue&&e.method)return e.queue.cancel(e);if("function"!==t)return"[object Array]"===Object.prototype.toString.call(e)?this._cancelItem(u,d,e)||this._cancelItem(s,b,e):void 0;for(var r=0,n=v.length;n>r;r+=2)if(v[r+1]===e)return v.splice(r,2),!0},_cancelItem:function(e,t,r){var n,i;return r.length<3?!1:(i=e(r[0],r[1]),i>-1&&(n=t[i],n[2]===r[2])?(t.splice(i,1),clearTimeout(r[2]),!0):!1)}},n.prototype.schedule=n.prototype.defer,n.prototype.scheduleOnce=n.prototype.deferOnce,n.prototype.later=n.prototype.setTimeout,t.Backburner=n})}(),function(){function e(){!Ember.run.currentRunLoop}{var r=function(e){Ember.run.currentRunLoop=e},n=function(e,t){Ember.run.currentRunLoop=t},i=t("backburner").Backburner,o=new i(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:r,onEnd:n}),a=[].slice;[].concat}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=a.call(arguments);e.unshift("actions"),Ember.run.schedule.apply(Ember.run,e)},Ember.run.bind=function(){var e=arguments;return function(){return Ember.run.join.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=a.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=a.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)},a=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};a.prototype={copy:function(){var e=new a(this._to,this._from);return this._oneWay&&(e._oneWay=!0),e},from:function(e){return this._from=e,this},to:function(e){return this._to=e,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var e=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+n(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(t){var r=this._from,n=this._to;return Ember.trySet(t,n,e(t,r)),Ember.addObserver(t,r,this,this.fromDidChange),this._oneWay||Ember.addObserver(t,n,this,this.toDidChange),this._readyToSync=!0,this},disconnect:function(e){var t=!this._oneWay;return Ember.removeObserver(e,this._from,this,this.fromDidChange),t&&Ember.removeObserver(e,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(e){this._scheduleSync(e,"fwd")},toDidChange:function(e){this._scheduleSync(e,"back")},_scheduleSync:function(e,t){var r=this._directionMap,n=r.get(e);n||(Ember.run.schedule("sync",this,this._sync,e),r.set(e,t)),"back"===n&&"fwd"===t&&r.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(!t.isDestroyed&&this._readyToSync){var i=this._directionMap,o=i.get(t),a=this._from,s=this._to;if(i.remove(t),"fwd"===o){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,s,u):Ember._suspendObserver(t,s,this,this.toDidChange,function(){Ember.trySet(t,s,u)})}else if("back"===o){var l=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",l,t),Ember._suspendObserver(t,a,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(a)?Ember.lookup:t,a,l)})}}}},t(a,{from:function(){var e=this,t=new e;return t.from.apply(t,arguments)},to:function(){var e=this,t=new e;return t.to.apply(t,arguments)},oneWay:function(e,t){var r=this,n=new r(null,e);return n.oneWay(t)}}),Ember.Binding=a,Ember.bind=function(e,t,r){return new Ember.Binding(t,r).connect(e)},Ember.oneWay=function(e,t,r){return new Ember.Binding(t,r).oneWay().connect(e)}}(),function(){function e(e){var t=S(e,!0),r=t.mixins;return r?t.hasOwnProperty("mixins")||(r=t.mixins=x(r)):r=t.mixins={},r}function t(e,t){return t&&t.length>0&&(e.mixins=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=V(t),e[r]?R:(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=x(r),r.func=Ember.wrap(r.func,o.func),r):r}function a(e,t,r,n,i){var o;return void 0===i[t]&&(o=n[t]),o=o||e[t],"function"!=typeof o?r:Ember.wrap(r,o)}function s(e,t,r,n){var i=n[t]||e[t];return i?"function"==typeof i.concat?i.concat(r):Ember.makeArray(i).concat(r):Ember.makeArray(r)}function u(e,t,n,i){var o=i[t]||e[t];if(!o)return n;var s=Ember.merge({},o);for(var u in n)if(n.hasOwnProperty(u)){var l=n[u];s[u]=r(l)?a(e,u,l,o,{}):l}return s}function l(e,t,n,i,l,c,h,m){if(n instanceof Ember.Descriptor){if(n===w&&l[t])return R;n.func&&(n=o(i,t,n,c,l)),l[t]=n,c[t]=void 0}else h&&O.call(h,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?n=s(e,t,n,c):m&&O.call(m,t)>=0?n=u(e,t,n,c):r(n)&&(n=a(e,t,n,c,l)),l[t]=void 0,c[t]=n}function c(e,t,r,o,a,s){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!==R)if(m){b=S(a),a.willMergeMixin&&a.willMergeMixin(m),p=i("concatenatedProperties",m,o,a),d=i("mergedProperties",m,o,a);for(f in m)m.hasOwnProperty(f)&&(s.push(f),l(a,f,m[f],b,r,o,p,d));m.hasOwnProperty("toString")&&(a.toString=m.toString)}else h.mixins&&(c(h.mixins,t,r,o,a,s),h._without&&A.call(h._without,u))}function h(e,t,r,n){if(D.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=x(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||S(e)),e}function p(e,t,r,n,i){var o,a=t.methodName;return n[a]||i[a]?(o=i[a],t=n[a]):r.descs[a]?(t=r.descs[a],o=void 0):(t=void 0,o=e[a]),{desc:t,value:o}}function d(e,t,r,n,i){var o=r[n];if(o)for(var a=0,s=o.length;s>a;a++)Ember[i](e,o[a],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,a,s={},u={},l=S(t),m=[];c(r,e(t),s,u,t,m);for(var d=0,v=m.length;v>d;d++)if(i=m[d],"constructor"!==i&&u.hasOwnProperty(i)&&(a=s[i],o=u[i],a!==w)){for(;a&&a instanceof _;){var E=p(t,a,l,s,u);a=E.desc,o=E.value}(void 0!==a||void 0!==o)&&(b(t,i,o),h(t,i,o,l),T(t,i,a,o,l))}return n||f(t,l),t}function E(e,t,r){var n=V(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[V(t)])if(r[V(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,x=Ember.create,T=Ember.defineProperty,V=Ember.guidFor,S=Ember.meta,N=Ember.META_KEY,I=Ember.expandProperties,R={},D=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 M=y.prototype;M.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},M.apply=function(e){return v(e,[this],!1)},M.applyPartial=function(e){return v(e,[this],!0)},M.detect=function(e){if(!e)return!1;if(e instanceof y)return E(e,this,{});var t=e[N],r=t&&t.mixins;return r?!!r[V(this)]:!1},M.without=function(){var e=new y(this);return e._without=P.call(arguments),e},M.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=e[N],r=t&&t.mixins,n=[];if(!r)return n;for(var i in r){var o=r[i];o.properties||n.push(o)}return n},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.aliasMethod=function(e){return new _(e)},Ember.observer=function(){var e,t=P.call(arguments,-1)[0],r=function(t){e.push(t)},n=P.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],n=P.call(arguments,1)),e=[];for(var i=0;i<n.length;++i)I(n[i],r);if("function"!=typeof t)throw new Ember.Error("Ember.observer called without a function");return t.__ember_observes__=e,t},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(){var e,t=P.call(arguments,-1)[0],r=function(t){e.push(t)},n=P.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],n=P.call(arguments,1)),e=[];for(var i=0;i<n.length;++i)I(n[i],r);if("function"!=typeof t)throw new Ember.Error("Ember.beforeObserver called without a function");return t.__ember_observesBefore__=e,t}}(),function(){var e=Ember.EnumerableUtils.forEach,t=Ember.EnumerableUtils.indexOf;Ember.libraries=function(){var r=[],n=0,i=function(e){for(var t=0;t<r.length;t++)if(r[t].name===e)return r[t]};return r.register=function(e,t){i(e)||r.push({name:e,version:t})},r.registerCoreLibrary=function(e,t){i(e)||r.splice(n++,0,{name:e,version:t})},r.deRegister=function(e){var n=i(e);n&&r.splice(t(r,n),1)},r.each=function(t){e(r,function(e){t(e.name,e.version)})},r}(),Ember.libraries.registerCoreLibrary("Ember",Ember.VERSION)}(),function(){e("rsvp/all",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e,t){return r.all(e,t)}}),e("rsvp/all_settled",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e){return{state:"fulfilled",value:e}}function i(e){return{state:"rejected",reason:e}}var o=e["default"],a=t.isArray,s=t.isNonThenable;r["default"]=function(e,t){return new o(function(t){function r(e){return function(t){l(e,n(t))}}function u(e){return function(t){l(e,i(t))}}function l(e,r){m[e]=r,0===--h&&t(m)}if(!a(e))throw new TypeError("You must pass an array to allSettled.");var c,h=e.length;if(0===h)return t([]),void 0;for(var m=new Array(h),f=0;f<e.length;f++)c=e[f],s(c)?l(f,n(c)):o.cast(c).then(r(f),u(f))},t)}}),e("rsvp/config",["./events","exports"],function(e,t){"use strict";function r(e,t){return"onerror"===e?(i.on("error",t),void 0):2!==arguments.length?i[e]:(i[e]=t,void 0)}var n=e["default"],i={instrument:!1};n.mixin(i),t.config=i,t.configure=r}),e("rsvp/defer",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e){var t={};return t.promise=new r(function(e,r){t.resolve=e,t.reject=r},e),t}}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1},r=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t};e["default"]={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,n){var i,o=r(this);i=o[e],i||(i=o[e]=[]),-1===t(i,n)&&i.push(n)},off:function(e,n){var i,o,a=r(this);return n?(i=a[e],o=t(i,n),-1!==o&&i.splice(o,1),void 0):(a[e]=[],void 0)},trigger:function(e,t){var n,i,o=r(this);if(n=o[e])for(var a=0;a<n.length;a++)(i=n[a])(t)}}}),e("rsvp/filter",["./all","./map","./utils","exports"],function(e,t,r,n){"use strict";function i(e,t,r){return o(e,r).then(function(n){if(!u(e))throw new TypeError("You must pass an array to filter.");if(!s(t))throw new TypeError("You must pass a function to filter's second argument.");return a(e,t,r).then(function(e){var t,r=n.length,i=[];for(t=0;r>t;t++)e[t]&&i.push(n[t]);return i})})}var o=e["default"],a=t["default"],s=r.isFunction,u=r.isArray;n["default"]=i}),e("rsvp/hash",["./promise","./utils","exports"],function(e,t,r){"use strict";var n=e["default"],i=t.isNonThenable,o=t.keysOf;r["default"]=function(e){return new n(function(t,r){function a(e){return function(r){c[e]=r,0===--m&&t(c)}}function s(e){m=0,r(e)}var u,l,c={},h=o(e),m=h.length;if(0===m)return t(c),void 0;for(var f=0;f<h.length;f++)l=h[f],u=e[l],i(u)?(c[l]=u,0===--m&&t(c)):n.cast(u).then(a(l),s)})}}),e("rsvp/instrument",["./config","./utils","exports"],function(e,t,r){"use strict";var n=e.config,i=t.now;r["default"]=function(e,t,r){try{n.trigger(e,{guid:t._guidKey+t._id,eventName:e,detail:t._detail,childGuid:r&&t._guidKey+r._id,label:t._label,timeStamp:i(),stack:new Error(t._label).stack})}catch(o){setTimeout(function(){throw o},0)}}}),e("rsvp/map",["./promise","./all","./utils","exports"],function(e,t,r,n){"use strict";var i=(e["default"],t["default"]),o=r.isArray,a=r.isFunction;n["default"]=function(e,t,r){return i(e,r).then(function(n){if(!o(e))throw new TypeError("You must pass an array to map.");if(!a(t))throw new TypeError("You must pass a function to map's second argument.");var s,u=n.length,l=[];for(s=0;u>s;s++)l.push(t(n[s]));return i(l,r)})}}),e("rsvp/node",["./promise","exports"],function(e,t){"use strict";function r(e,t){return function(r,n){r?t(r):arguments.length>2?e(i.call(arguments,1)):e(n)}}var n=e["default"],i=Array.prototype.slice;t["default"]=function(e,t){return function(){var o=i.call(arguments),a=this||t;return new n(function(t,i){n.all(o).then(function(n){try{n.push(r(t,i)),e.apply(a,n)}catch(o){i(o)}})})}}}),e("rsvp/promise",["./config","./events","./instrument","./utils","./promise/cast","./promise/all","./promise/race","./promise/resolve","./promise/reject","exports"],function(e,t,r,n,i,o,a,s,u,l){"use strict";function c(){}function h(e,t){if(!A(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof h))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._id=R++,this._label=t,this._subscribers=[],_.instrument&&C("created",this),c!==e&&m(e,this)}function m(e,t){function r(e){v(t,e)}function n(e){g(t,e)}try{e(r,n)}catch(i){n(i)}}function f(e,t,r,n){var i=e._subscribers,o=i.length;i[o]=t,i[o+k]=r,i[o+j]=n}function p(e,t){var r,n,i=e._subscribers,o=e._detail;_.instrument&&C(t===k?"fulfilled":"rejected",e);for(var a=0;a<i.length;a+=3)r=i[a],n=i[a+t],d(t,r,n,o);e._subscribers=null}function d(e,t,r,n){var i,o,a,s,u=A(r);if(u)try{i=r(n),a=!0}catch(l){s=!0,o=l}else i=n,a=!0;b(t,i)||(u&&a?v(t,i):s?g(t,o):e===k?v(t,i):e===j&&g(t,i))}function b(e,t){var r,n=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(O(t)&&(n=t.then,A(n)))return n.call(t,function(n){return r?!0:(r=!0,t!==n?v(e,n):E(e,n),void 0)},function(t){return r?!0:(r=!0,g(e,t),void 0)},"derived from: "+(e._label||" unknown promise")),!0}catch(i){return r?!0:(g(e,i),!0)}return!1}function v(e,t){e===t?E(e,t):b(e,t)||E(e,t)}function E(e,t){e._state===D&&(e._state=M,e._detail=t,_.async(y,e))}function g(e,t){e._state===D&&(e._state=M,e._detail=t,_.async(w,e))}function y(e){p(e,e._state=k)}function w(e){e._onerror&&e._onerror(e._detail),p(e,e._state=j)}var _=e.config,C=(t["default"],r["default"]),O=n.objectOrFunction,A=n.isFunction,P=n.now,x=i["default"],T=o["default"],V=a["default"],S=s["default"],N=u["default"],I="rsvp_"+P()+"-",R=0;l["default"]=h,h.cast=x,h.all=T,h.race=V,h.resolve=S,h.reject=N;var D=void 0,M=0,k=1,j=2;h.prototype={constructor:h,_id:void 0,_guidKey:I,_label:void 0,_state:void 0,_detail:void 0,_subscribers:void 0,_onerror:function(e){_.trigger("error",e)},then:function(e,t,r){var n=this;this._onerror=null;var i=new this.constructor(c,r);if(this._state){var o=arguments;_.async(function(){d(n._state,i,o[n._state-1],n._detail)})}else f(this,i,e,t);return _.instrument&&C("chained",n,i),i},"catch":function(e,t){return this.then(null,e,t)},"finally":function(e,t){var r=this.constructor;return this.then(function(t){return r.cast(e()).then(function(){return t})},function(t){return r.cast(e()).then(function(){throw t})},t)}}}),e("rsvp/promise/all",["../utils","exports"],function(e,t){"use strict";var r=e.isArray,n=e.isNonThenable;t["default"]=function(e,t){var i=this;return new i(function(t,o){function a(e){return function(r){c[e]=r,0===--l&&t(c)}}function s(e){l=0,o(e)}if(!r(e))throw new TypeError("You must pass an array to all.");var u,l=e.length,c=new Array(l);if(0===l)return t(c),void 0;for(var h=0;h<e.length;h++)u=e[h],n(u)?(c[h]=u,0===--l&&t(c)):i.cast(u).then(a(h),s)},t)}}),e("rsvp/promise/cast",["exports"],function(e){"use strict";e["default"]=function(e,t){var r=this;return e&&"object"==typeof e&&e.constructor===r?e:new r(function(t){t(e)},t)}}),e("rsvp/promise/race",["../utils","exports"],function(e,t){"use strict";var r=e.isArray,n=(e.isFunction,e.isNonThenable);t["default"]=function(e,t){var i,o=this;return new o(function(t,a){function s(e){l&&(l=!1,t(e))}function u(e){l&&(l=!1,a(e))}if(!r(e))throw new TypeError("You must pass an array to race.");for(var l=!0,c=0;c<e.length;c++){if(i=e[c],n(i))return l=!1,t(i),void 0;o.cast(i).then(s,u)}},t)}}),e("rsvp/promise/reject",["exports"],function(e){"use strict";e["default"]=function(e,t){var r=this;return new r(function(t,r){r(e)},t)}}),e("rsvp/promise/resolve",["exports"],function(e){"use strict";e["default"]=function(e,t){var r=this;return new r(function(t){t(e)},t)}}),e("rsvp/race",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e,t){return r.race(e,t)}}),e("rsvp/reject",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e,t){return r.reject(e,t)}}),e("rsvp/resolve",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e,t){return r.resolve(e,t)}}),e("rsvp/rethrow",["exports"],function(e){"use strict";e["default"]=function(e){throw setTimeout(function(){throw e}),e}}),e("rsvp/utils",["exports"],function(e){"use strict";function t(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function n(e){return!t(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}e.objectOrFunction=t,e.isFunction=r,e.isNonThenable=n,e.isArray=i;var o=Date.now||function(){return(new Date).getTime()};e.now=o;var a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.keysOf=a}),e("rsvp",["./rsvp/promise","./rsvp/events","./rsvp/node","./rsvp/all","./rsvp/all_settled","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/map","./rsvp/resolve","./rsvp/reject","./rsvp/filter","exports"],function(e,t,r,n,i,o,a,s,u,l,c,h,m,f,p){"use strict";function d(e,t){x.async(e,t)}function b(){x.on.apply(x,arguments)}function v(){x.off.apply(x,arguments)}var E=e["default"],g=t["default"],y=r["default"],w=n["default"],_=i["default"],C=o["default"],O=a["default"],A=s["default"],P=u["default"],x=l.config,T=l.configure,V=c["default"],S=h["default"],N=m["default"],I=f["default"];if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var R=window.__PROMISE_INSTRUMENTATION__;T("instrument",!0);for(var D in R)R.hasOwnProperty(D)&&b(D,R[D])}p.Promise=E,p.EventTarget=g,p.all=w,p.allSettled=_,p.race=C,p.hash=O,p.rethrow=A,p.defer=P,p.denodeify=y,p.configure=T,p.on=b,p.off=v,p.resolve=S,p.reject=N,p.async=d,p.map=V,p.filter=I})}(),function(){Ember.MODEL_FACTORY_INJECTIONS=!1||!!Ember.ENV.MODEL_FACTORY_INJECTIONS,e("container",[],function(){"use strict";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.factoryCache),this.resolveCache=new e(t&&t.resolveCache),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,t){return e.cache.has(t)?!0:!!e.resolve(t)}function n(e,t,r){if(r=r||{},e.cache.has(t)&&r.singleton!==!1)return e.cache.get(t);var n=h(e,t);return void 0!==n?(o(e,t)&&r.singleton!==!1&&e.cache.set(t,n),n):void 0}function i(e){throw new Error(e+" is not currently supported on child containers")}function o(e,t){var r=s(e,t,"singleton");return r!==!1}function a(e,t){var r={};if(!t)return r;for(var i,o,a=0,s=t.length;s>a;a++){if(i=t[a],o=n(e,i.fullName),void 0===o)throw new Error("Attempting to inject an unknown injection: `"+i.fullName+"`");r[i.property]=o}return r}function s(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 u(e,t){var r,n=t,i=e.resolve(n),o=e.factoryCache,a=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"===a)return i;var s=l(e,t),u=c(e,t);return u._toString=e.makeToString(i,t),r=i.extend(s),r.reopenClass(u),o.set(t,r),r}}function l(e,t){var r=t.split(":"),n=r[0],i=[];return i=i.concat(e.typeInjections.get(n)||[]),i=i.concat(e.injections[t]||[]),i=a(e,i),i._debugContainerKey=t,i.container=e,i}function c(e,t){var r=t.split(":"),n=r[0],i=[];return i=i.concat(e.factoryTypeInjections.get(n)||[]),i=i.concat(e.factoryInjections[t]||[]),i=a(e,i),i._debugContainerKey=t,i}function h(e,t){var r=u(e,t);return s(e,t,"instantiate")===!1?r:r?"function"==typeof r.extend?r.create():r.create(l(e,t)):void 0}function m(e,t){e.cache.eachLocal(function(r,n){s(e,r,"instantiate")!==!1&&t(n)})}function f(e){e.cache.eachLocal(function(t,r){s(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}function p(e,t,r,n){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:r,fullName:n})}function d(e){if(!v.test(e))throw new TypeError("Invalid Fullname, expected: `type:name` got: "+e)}function b(e,t,r,n){var i=e[t]=e[t]||[];i.push({property:r,fullName:n})}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(d(e),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){d(e);var t=this.normalize(e);this.registry.remove(t),this.cache.remove(t),this.factoryCache.remove(t),this.resolveCache.remove(t),this._options.remove(t)},resolve:function(e){d(e);var t=this.normalize(e),r=this.resolveCache.get(t);if(r)return r;var n=this.resolver(t)||this.registry.get(t);return this.resolveCache.set(t,n),n},describe:function(e){return e},normalize:function(e){return e},makeToString:function(e){return e.toString()},lookup:function(e,t){return d(e),n(this,this.normalize(e),t)},lookupFactory:function(e){return d(e),u(this,this.normalize(e))},has:function(e){return d(e),r(this,this.normalize(e))},optionsForType:function(e,t){this.parent&&i("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,r){d(r),this.parent&&i("typeInjection"),p(this.typeInjections,e,t,r)},injection:function(e,t,r){this.parent&&i("injection"),d(r);var n=this.normalize(r);if(-1===e.indexOf(":"))return this.typeInjection(e,t,n);d(e);var o=this.normalize(e);b(this.injections,o,t,n)},factoryTypeInjection:function(e,t,r){this.parent&&i("factoryTypeInjection"),p(this.factoryTypeInjections,e,t,this.normalize(r))
12
- },factoryInjection:function(e,t,r){this.parent&&i("injection");var n=this.normalize(e),o=this.normalize(r);return d(r),-1===e.indexOf(":")?this.factoryTypeInjection(n,t,o):(d(e),b(this.factoryInjections,n,t,o),void 0)},destroy:function(){for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],m(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++)f(this.children[e]);f(this)}};var v=/^[^:]+.+:[^:]+$/;return t})}(),function(){function e(r,n,i,o){var a,s,u;if("object"!=typeof r||null===r)return r;if(n&&(s=t(i,r))>=0)return o[s];if("array"===Ember.typeOf(r)){if(a=r.slice(),n)for(s=a.length;--s>=0;)a[s]=e(a[s],n,i,o)}else if(Ember.Copyable&&Ember.Copyable.detect(r))a=r.copy(n,i,o);else{a={};for(u in r)r.hasOwnProperty(u)&&"__"!==u.substring(0,2)&&(a[u]=n?e(r[u],n,i,o):r[u])}return n&&(i.push(r),o.push(a)),a}var t=Ember.EnumerableUtils.indexOf;if(Ember.compare=function i(e,t){if(e===t)return 0;var r=Ember.typeOf(e),n=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===r&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===n&&o.detect(t.constructor))return 1-t.constructor.compare(t,e)}var a=Ember.ORDER_DEFINITION_MAPPING;if(!a){var s=Ember.ORDER_DEFINITION;a=Ember.ORDER_DEFINITION_MAPPING={};var u,l;for(u=0,l=s.length;l>u;++u)a[s[u]]=u;delete Ember.ORDER_DEFINITION}var c=a[r],h=a[n];if(h>c)return-1;if(c>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=i(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.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,a=r.length;a>o;o++)t=r[o],n(e,i,t);return i}}}(),function(){var e=/[ _]/g,t={},r=/([a-z\d])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,o=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var r=0;return e.replace(/%@([0-9]+)?/g,function(e,n){return n=n?parseInt(n,10)-1:r++,e=t[n],null===e?"(null)":void 0===e?"":Ember.inspect(e)})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,o=i.hasOwnProperty(r);return o?i[r]:(n=Ember.String.decamelize(r).replace(e,"-"),i[r]=n,n)},camelize:function(e){return e.replace(n,function(e,t,r){return r?r.toUpperCase():""}).replace(/^([A-Z])/,function(e){return e.toLowerCase()})},classify:function(e){for(var t=e.split("."),r=[],n=0,i=t.length;i>n;n++){var o=Ember.String.camelize(t[n]);r.push(o.charAt(0).toUpperCase()+o.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(o,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,o=Ember.String.dasherize,a=Ember.String.underscore,s=Ember.String.capitalize,u=Ember.String.classify;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.fmt=function(){return e(this,arguments)},String.prototype.w=function(){return t(this)},String.prototype.loc=function(){return r(this,arguments)},String.prototype.camelize=function(){return n(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return o(this)},String.prototype.underscore=function(){return a(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return s(this)})}(),function(){var e=Ember.get,t=Ember.set,r=Array.prototype.slice,n=Ember.getProperties;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){return n.apply(null,[this].concat(r.call(arguments)))},set:function(e,r){return t(this,e,r),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,r){Ember.addBeforeObserver(this,e,t,r)},addObserver:function(e,t,r){Ember.addObserver(this,e,t,r)},removeObserver:function(e,t,r){Ember.removeObserver(this,e,t,r)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){function e(){var e,t,o=!1,a=function(){o||a.proto(),n(this,i,y),n(this,"_super",y);var u=s(this),l=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,d=0,v=f.length;v>d;d++){var w=f[d];if("object"!=typeof w&&void 0!==w)throw new Ember.Error("Ember.Object.create only accepts objects.");if(w)for(var _=Ember.keys(w),C=0,O=_.length;O>C;C++){var A=_[C];if(w.hasOwnProperty(A)){var P=w[A],x=Ember.IS_BINDING;if(x.test(A)){var T=u.bindings;T?u.hasOwnProperty("bindings")||(T=u.bindings=r(u.bindings)):T=u.bindings={},T[A]=P}var V=u.descs[A];if(p&&g(p,A)>=0){var S=this[A];P=S?"function"==typeof S.concat?S.concat(P):Ember.makeArray(S).concat(P):Ember.makeArray(P)}V?V.set(this,A,P):"function"!=typeof this.setUnknownProperty||A in this?E?Ember.defineProperty(this,A,null,P):this[A]=P:this.setUnknownProperty(A,P)}}}}b(this,u),this.init.apply(this,arguments),u.proto=l,c(this),h(this,"init")};return a.toString=p.prototype.toString,a.willReopen=function(){o&&(a.PrototypeMixin=p.create(a.PrototypeMixin)),o=!1},a._initMixins=function(t){e=t},a._initProperties=function(e){t=e},a.proto=function(){var e=a.superclass;return e&&e.proto(),o||(o=!0,a.PrototypeMixin.applyPartial(a.prototype),l(a.prototype)),this.prototype},a}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,a=Ember.generateGuid,s=Ember.meta,u=Ember.META_KEY,l=Ember.rewatch,c=Ember.finishChains,h=Ember.sendEvent,m=Ember.destroy,f=Ember.run.schedule,p=Ember.Mixin,d=p._apply,b=p.finishPartial,v=p.prototype.reopen,E=Ember.ENV.MANDATORY_SETTER,g=Ember.EnumerableUtils.indexOf,y={configurable:!0,writable:!0,enumerable:!1,value:void 0},w=e();w.toString=function(){return"Ember.CoreObject"},w.PrototypeMixin=p.create({reopen:function(){return d(this,arguments,!0),this},init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,f("actions",this,this.willDestroy),f("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(m(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}}),w.PrototypeMixin.ownerConstructor=w,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(w.PrototypeMixin),w.__super__=null;var _=p.create({ClassMixin:Ember.required(),PrototypeMixin:Ember.required(),isClass:!0,isMethod:!1,extend:function(){var t,n=e();return n.ClassMixin=p.create(this.ClassMixin),n.PrototypeMixin=p.create(this.PrototypeMixin),n.ClassMixin.ownerConstructor=n,n.PrototypeMixin.ownerConstructor=n,v.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,a(t),s(t).proto=t,n.ClassMixin.apply(n),n},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),v.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return v.apply(this.ClassMixin,arguments),d(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=this.proto()[u],r=t&&t.descs[e];return r._meta||{}},eachComputedProperty:function(e,t){var r,n=this.proto(),i=s(n).descs,o={};for(var a in i)r=i[a],r instanceof Ember.ComputedProperty&&e.call(t||this,a,r._meta||o)}});_.ownerConstructor=w,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(_),w.ClassMixin=_,_.apply(w),Ember.CoreObject=w}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var a=t.length;l[t.join(".")]=r;for(var s in r)if(c.call(r,s)){var u=r[s];if(t[a]=s,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=a}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else 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,a=0,s=o.length;s>a;a++)i=o[a],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function o(e){return function(){return e}}var a=Ember.get,s=Ember.ArrayPolyfills.indexOf,u=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var e=a(this,"name");return e?e:(t(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){e([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=void 0,e.splice(s.call(e,this),1),this._super()}});u.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:i,byName:function(e){return Ember.BOOTED||i(),l[e]}});var l=u.NAMESPACES_BY_ID,c={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){function e(e,t){var r=t.slice(8);r in this||u(this,r)}function t(e,t){var r=t.slice(8);r in this||l(this,r)}var r=Ember.get,n=Ember.set,i=(Ember.String.fmt,Ember.addBeforeObserver),o=Ember.addObserver,a=Ember.removeBeforeObserver,s=Ember.removeObserver,u=Ember.propertyWillChange,l=Ember.propertyDidChange,c=Ember.meta,h=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer("content",function(){}),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),o(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;a(this,n,null,e),s(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var i=c(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(){return 0===s.length?{}:s.pop()}function t(e){return s.push(e),null}function r(e,t){function r(r){var o=n(r,e);return i?t===o:!!o}var i=2===arguments.length;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,a=Ember.EnumerableUtils.indexOf,s=[];Ember.Enumerable=Ember.Mixin.create({nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(0===n(this,"length"))return void 0;var r,i=e();return r=this.nextObject(0,null,i),t(i),r}).property("[]"),lastObject:Ember.computed(function(){var r=n(this,"length");if(0===r)return void 0;var i,o=e(),a=0,s=null;do s=i,i=this.nextObject(a++,s,o);while(void 0!==i);return t(o),s}).property("[]"),contains:function(e){return void 0!==this.find(function(t){return t===e})},forEach:function(r,i){if("function"!=typeof r)throw new TypeError;var o=n(this,"length"),a=null,s=e();void 0===i&&(i=null);for(var u=0;o>u;u++){var l=this.nextObject(u,a,s);r.call(i,l,u,this),a=l}return a=null,s=t(s),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 a,s,u=null,l=!1,c=e(),h=0;o>h&&!l;h++)a=this.nextObject(h,u,c),(l=r.call(i,a,h,this))&&(s=a),u=a;return a=u=null,c=t(c),s},findBy:function(){return this.find(r.apply(this,arguments))},findProperty:Ember.aliasMethod("findBy"),every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyBy:Ember.aliasMethod("isEvery"),everyProperty:Ember.aliasMethod("isEvery"),isEvery:function(){return this.every(r.apply(this,arguments))},any:function(r,i){var o,a,s=n(this,"length"),u=e(),l=!1,c=null;for(void 0===i&&(i=null),a=0;s>a&&!l;a++)o=this.nextObject(a,c,u),l=r.call(i,o,a,this),c=o;return o=c=null,u=t(u),l},some:Ember.aliasMethod("any"),isAny:function(){return this.any(r.apply(this,arguments))},anyBy:Ember.aliasMethod("isAny"),someProperty:Ember.aliasMethod("isAny"),reduce:function(e,t,r){if("function"!=typeof e)throw new TypeError;var n=t;return this.forEach(function(t,i){n=e(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):n[e]())},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){a(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this},sortBy:function(){var e=arguments;return this.toArray().sort(function(t,r){for(var i=0;i<e.length;i++){var o=e[i],a=n(t,o),s=n(r,o),u=Ember.compare(a,s);if(u)return u}return 0})}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.isNone),r=Ember.EnumerableUtils.map,n=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{length:Ember.required(),objectAt:function(t){return 0>t||t>=e(this,"length")?void 0:e(this,t)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,r){return void 0!==r&&this.replace(0,e(this,"length"),r),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(e(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(r,n){var i=Ember.A(),o=e(this,"length");for(t(r)&&(r=0),(t(n)||n>o)&&(n=o),0>r&&(r=o+r),0>n&&(n=o+n);n>r;)i[i.length]=this.objectAt(r++);return i},indexOf:function(t,r){var n,i=e(this,"length");for(void 0===r&&(r=0),0>r&&(r+=i),n=r;i>n;n++)if(this.objectAt(n)===t)return n;return-1},lastIndexOf:function(t,r){var n,i=e(this,"length");for((void 0===r||r>=i)&&(r=i-1),0>r&&(r+=i),n=r;n>=0;n--)if(this.objectAt(n)===t)return n;return-1},addArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),o||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),o&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,r,n){void 0===t?(t=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,r,n]);var i,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],o=t+r;for(var a=t;o>a;a++)i.push(this.objectAt(a))}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,a;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){o=[],a=t+i;for(var s=t;a>s;s++)o.push(this.objectAt(s))}else o=i;this.enumerableContentDidChange(r,o),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),l=n(this,"firstObject"),c=n(this,"lastObject");return this.objectAt(0)!==l&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==c&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){function e(e,t){return"@this"===t?e:m(e,t)}function t(e,t,r){this.callbacks=e,this.cp=t,this.instanceMeta=r,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.suspended=!1,this.changedItems={}}function r(e,t,r){this.dependentArray=e,this.index=t,this.item=e.objectAt(t),this.trackedArray=r,this.beforeObserver=null,this.observer=null,this.destroyed=!1}function n(e,t,r){return 0>e?Math.max(0,t+e):t>e?e:Math.min(t-r,e)}function i(e,t,r){return Math.min(r,t-e)}function o(e,t,r,n,i,o){var a={arrayChanged:e,index:r,item:t,propertyName:n,property:i};return o&&(a.previousValues=o),a}function a(e,t,r,n,i){O(e,function(a,s){i.setValue(t.addedItem.call(this,i.getValue(),a,o(e,a,s,n,r),i.sugarMeta))},this)}function s(e,t){{var r;e._callbacks()}e._hasInstanceMeta(this,t)?(r=e._instanceMeta(this,t),r.setValue(e.resetValue(r.getValue()))):r=e._instanceMeta(this,t),e.options.initialize&&e.options.initialize.call(this,r.getValue(),{property:e,propertyName:t},r.sugarMeta)}function u(t,r){if(x.test(r))return!1;var n=e(t,r);return Ember.Array.detect(n)}function l(e,t,r){this.context=e,this.propertyName=t,this.cache=p(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=r}function c(t){var r=this;this.options=t,this._instanceMetas={},this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,n,e)};var n=function(t){var n=(r._dependentKeys,r._instanceMeta(this,t)),i=r._callbacks();s.call(this,r,t),n.dependentArraysObserver.suspendArrayObservers(function(){O(r._dependentKeys,function(t){if(u(this,t)){var i=e(this,t),o=n.dependentArrays[t];i===o?r._previousItemPropertyKeys[t]&&(delete r._previousItemPropertyKeys[t],n.dependentArraysObserver.setupPropertyObservers(t,r._itemPropertyKeys[t])):(n.dependentArrays[t]=i,o&&n.dependentArraysObserver.teardownObservers(o,t),i&&n.dependentArraysObserver.setupObservers(i,t))}},this)},this),O(r._dependentKeys,function(o){if(u(this,o)){var s=e(this,o);s&&a.call(this,s,i,r,t,n)}},this)};this.func=function(e){return n.call(this,e),r._instanceMeta(this,e).getValue()}}function h(e){return e}var m=Ember.get,f=(Ember.set,Ember.guidFor),p=Ember.meta,d=Ember.propertyWillChange,b=Ember.propertyDidChange,v=Ember.addBeforeObserver,E=Ember.removeBeforeObserver,g=Ember.addObserver,y=Ember.removeObserver,w=Ember.ComputedProperty,_=[].slice,C=Ember.create,O=Ember.EnumerableUtils.forEach,A=/^(.*)\.@each\.(.*)/,P=/(.*\.@each){2,}/,x=/\.\[\]$/,T=Ember.expandProperties;t.prototype={setValue:function(e){this.instanceMeta.setValue(e,!0)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[f(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[f(e)],this.teardownPropertyObservers(t,r),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},suspendArrayObservers:function(e,t){var r=this.suspended;this.suspended=!0,e.call(t),this.suspended=r},setupPropertyObservers:function(t,r){var n=e(this.instanceMeta.context,t),i=e(n,"length"),o=new Array(i);this.resetTransformations(t,o),O(n,function(e,i){var a=this.createPropertyObserverContext(n,i,this.trackedArraysByGuid[t]);o[i]=a,O(r,function(t){v(e,t,this,a.beforeObserver),g(e,t,this,a.observer)},this)},this)},teardownPropertyObservers:function(e,t){var r,n,i,o=this,a=this.trackedArraysByGuid[e];a&&a.apply(function(e,a,s){s!==Ember.TrackedArray.DELETE&&O(e,function(e){e.destroyed=!0,r=e.beforeObserver,n=e.observer,i=e.item,O(t,function(e){E(i,e,o,r),y(i,e,o,n)})})})},createPropertyObserverContext:function(e,t,n){var i=new r(e,t,n);return this.createPropertyObserver(i),i},createPropertyObserver:function(e){var t=this;e.beforeObserver=function(r,n){return t.itemPropertyWillChange(r,n,e.dependentArray,e)},e.observer=function(r,n){return t.itemPropertyDidChange(r,n,e.dependentArray,e)}},resetTransformations:function(e,t){this.trackedArraysByGuid[e]=new Ember.TrackedArray(t)},trackAdd:function(e,t,r){var n=this.trackedArraysByGuid[e];n&&n.addItems(t,r)},trackRemove:function(e,t,r){var n=this.trackedArraysByGuid[e];return n?n.removeItems(t,r):[]},updateIndexes:function(t,r){var n=e(r,"length");t.apply(function(e,t,r){r!==Ember.TrackedArray.DELETE&&(r!==Ember.TrackedArray.RETAIN||e.length!==n||0!==t)&&O(e,function(e,r){e.index=r+t})})},dependentArrayWillChange:function(t,r,a){function s(e){m[h].destroyed=!0,E(l,e,this,m[h].beforeObserver),y(l,e,this,m[h].observer)}if(!this.suspended){var u,l,c,h,m,p=this.callbacks.removedItem,d=f(t),b=this.dependentKeysByGuid[d],v=this.cp._itemPropertyKeys[b]||[],g=e(t,"length"),w=n(r,g,0),_=i(w,g,a);for(m=this.trackRemove(b,w,_),h=_-1;h>=0&&(c=w+h,!(c>=g));--h)l=t.objectAt(c),O(v,s,this),u=o(t,l,c,this.instanceMeta.propertyName,this.cp),this.setValue(p.call(this.instanceMeta.context,this.getValue(),l,u,this.instanceMeta.sugarMeta))}},dependentArrayDidChange:function(t,r,i,a){if(!this.suspended){var s,u,l=this.callbacks.addedItem,c=f(t),h=this.dependentKeysByGuid[c],m=new Array(a),p=this.cp._itemPropertyKeys[h],d=e(t,"length"),b=n(r,d,a);O(t.slice(b,b+a),function(e,r){p&&(u=m[r]=this.createPropertyObserverContext(t,b+r,this.trackedArraysByGuid[h]),O(p,function(t){v(e,t,this,u.beforeObserver),g(e,t,this,u.observer)},this)),s=o(t,e,b+r,this.instanceMeta.propertyName,this.cp),this.setValue(l.call(this.instanceMeta.context,this.getValue(),e,s,this.instanceMeta.sugarMeta))},this),this.trackAdd(h,b,m)}},itemPropertyWillChange:function(t,r,n,i){var o=f(t);this.changedItems[o]||(this.changedItems[o]={array:n,observerContext:i,obj:t,previousValues:{}}),this.changedItems[o].previousValues[r]=e(t,r)},itemPropertyDidChange:function(){this.flushChanges()},flushChanges:function(){var e,t,r,n=this.changedItems;for(e in n)t=n[e],t.observerContext.destroyed||(this.updateIndexes(t.observerContext.trackedArray,t.observerContext.dependentArray),r=o(t.array,t.obj,t.observerContext.index,this.instanceMeta.propertyName,this.cp,t.previousValues),this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)));this.changedItems={}}},l.prototype={getValue:function(){return this.propertyName in this.cache?this.cache[this.propertyName]:this.initialValue},setValue:function(e,t){e!==this.cache[this.propertyName]&&(t&&d(this.context,this.propertyName),void 0===e?delete this.cache[this.propertyName]:this.cache[this.propertyName]=e,t&&b(this.context,this.propertyName))}},Ember.ReduceComputedProperty=c,c.prototype=C(w.prototype),c.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||h,addedItem:e.addedItem||h}}return this.callbacks},c.prototype._hasInstanceMeta=function(e,t){var r=f(e),n=r+":"+t;return!!this._instanceMetas[n]},c.prototype._instanceMeta=function(e,r){var n=f(e),i=n+":"+r,o=this._instanceMetas[i];return o||(o=this._instanceMetas[i]=new l(e,r,this.initialValue()),o.dependentArraysObserver=new t(this._callbacks(),this,o,e,r,o.sugarMeta)),o},c.prototype.initialValue=function(){return"function"==typeof this.options.initialValue?this.options.initialValue():this.options.initialValue},c.prototype.resetValue=function(){return this.initialValue()},c.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},c.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},c.prototype.property=function(){var e,t,r=this,n=(_.call(arguments),new Ember.Set);return O(_.call(arguments),function(i){if(P.test(i))throw new Ember.Error("Nested @each properties not supported: "+i);if(e=A.exec(i)){t=e[1];var o=e[2],a=function(e){r.itemPropertyKey(t,e)};T(o,a),n.add(t)}else n.add(i)}),w.prototype.property.apply(this,n.toArray())},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=_.call(arguments,0,-1),e=_.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 c(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},e.prototype.didChange=function(){},Ember.arrayComputed=function(t){var n;if(arguments.length>1&&(n=r.call(arguments,0,-1),t=r.call(arguments,-1)[0]),"object"!=typeof t)throw new Ember.Error("Array Computed Property declared without an options hash");var i=new e(t);return n&&i.property.apply(i,n),i}}(),function(){function e(e,i,o,a){function s(e){return t.detectInstance(e)?n(r(e,"content")):n(e)}var u,l,c,h,m;return arguments.length<4&&(a=r(e,"length")),arguments.length<3&&(o=0),o===a?o:(u=o+Math.floor((a-o)/2),l=e.objectAt(u),h=s(l),m=s(i),h===m?u:(c=this.order(l,i),0===c&&(c=m>h?-1:1),0>c?this.binarySearch(e,i,u+1,a):c>0?this.binarySearch(e,i,o,u):u))}var t,r=Ember.get,n=(Ember.set,Ember.guidFor),i=Ember.merge,o=[].slice,a=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.map;Ember.computed.sum=function(e){return Ember.reduceComputed(e,{initialValue:0,addedItem:function(e,t){return e+t},removedItem:function(e,t){return e-t}})},Ember.computed.max=function(e){return Ember.reduceComputed(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(e,{initialValue:1/0,addedItem:function(e,t){return Math.min(e,t)},removedItem:function(e,t){return t>e?e:void 0}})},Ember.computed.map=function(e,t){var r={addedItem:function(e,r,n){var i=t.call(this,r);return e.insertAt(n.index,i),e},removedItem:function(e,t,r){return e.removeAt(r.index,1),e}};return Ember.arrayComputed(e,r)},Ember.computed.mapBy=function(e,t){var n=function(e){return r(e,t)};return Ember.computed.map(e+".@each."+t,n)},Ember.computed.mapProperty=Ember.computed.mapBy,Ember.computed.filter=function(e,t){var r={initialize:function(e,t,r){r.filteredArrayIndexes=new Ember.SubArray},addedItem:function(e,r,n,i){var o=!!t.call(this,r),a=i.filteredArrayIndexes.addItem(n.index,o);return o&&e.insertAt(a,r),e},removedItem:function(e,t,r,n){var i=n.filteredArrayIndexes.removeItem(r.index);return i>-1&&e.removeAt(i),e}};return Ember.arrayComputed(e,r)},Ember.computed.filterBy=function(e,t,n){var i;return i=2===arguments.length?function(e){return r(e,t)}:function(e){return r(e,t)===n},Ember.computed.filter(e+".@each."+t,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=o.call(arguments);return e.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(e,t,r,i){var o=n(t);
13
- return i.itemCounts[o]?++i.itemCounts[o]:i.itemCounts[o]=1,e.addObject(t),e},removedItem:function(e,t,r,i){var o=n(t),a=i.itemCounts;return 0===--a[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 n(e)})},t=o.call(arguments);return t.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(t,r,i,o){var a=n(r),s=(e(i),n(i.arrayChanged)),u=i.property._dependentKeys.length,l=o.itemCounts;return l[a]||(l[a]={}),void 0===l[a][s]&&(l[a][s]=0),1===++l[a][s]&&u===Ember.keys(l[a]).length&&t.addObject(r),t},removedItem:function(t,r,i,o){var a,s=n(r),u=(e(i),n(i.arrayChanged)),l=(i.property._dependentKeys.length,o.itemCounts);return void 0===l[s][u]&&(l[s][u]=0),0===--l[s][u]&&(delete l[s][u],a=Ember.keys(l[s]).length,0===a&&delete l[s],t.removeObject(r)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,t){if(2!==arguments.length)throw new Ember.Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed(e,t,{addedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===a?s.contains(i)||n.addObject(i):n.removeObject(i),n},removedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===s?a.contains(i)&&n.addObject(i):n.removeObject(i),n}})},t=Ember.ObjectProxy.extend(),Ember.computed.sort=function(n,o){var s,u;return"function"==typeof o?s=function(t,r,n){n.order=o,n.binarySearch=e}:(u=o,s=function(t,i,o){function s(){var e,t,s,c=r(this,u),h=o.sortProperties=[],m=o.sortPropertyAscending={};i.property.clearItemPropertyKeys(n),a(c,function(r){-1!==(t=r.indexOf(":"))?(e=r.substring(0,t),s="desc"!==r.substring(t+1).toLowerCase()):(e=r,s=!0),h.push(e),m[e]=s,i.property.itemPropertyKey(n,e)}),c.addObserver("@each",this,l)}function l(){Ember.run.once(this,c,i.propertyName)}function c(e){s.call(this),i.property.recomputeOnce.call(this,e)}Ember.addObserver(this,u,l),s.call(this),o.order=function(e,t){for(var n,i,o,a=0;a<this.sortProperties.length;++a)if(n=this.sortProperties[a],i=Ember.compare(r(e,n),r(t,n)),0!==i)return o=this.sortPropertyAscending[n],o?i:-1*i;return 0},o.binarySearch=e}),Ember.arrayComputed(n,{initialize:s,addedItem:function(e,t,r,n){var i=n.binarySearch(e,t);return e.insertAt(i,t),e},removedItem:function(e,r,n,o){var a,s,u;return n.previousValues?(a=i({content:r},n.previousValues),u=t.create(a)):u=r,s=o.binarySearch(e,u),e.removeAt(s),e}})}}(),function(){Ember.RSVP=t("rsvp"),Ember.RSVP.onerrorDefault=function(e){if(e instanceof Error)if(Ember.testing){if(!Ember.Test||!Ember.Test.adapter)throw e;Ember.Test.adapter.exception(e)}else Ember.Logger.error(e.stack)},Ember.RSVP.on("error",Ember.RSVP.onerrorDefault)}(),function(){var e=Array.prototype.slice,t=Ember.expandProperties;(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(){for(var e=function(e){r.push(e)},r=[],n=0;n<arguments.length;++n)t(arguments[n],e);return this.__ember_observes__=r,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(){for(var e=function(e){r.push(e)},r=[],n=0;n<arguments.length;++n)t(arguments[n],e);return this.__ember_observesBefore__=r,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;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 a;return a=i.send?i.send.apply(i,r(o,n)):i[n].apply(i,r(o)),a!==!1&&(a=!0),a}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)}),e.Promise.prototype.fail=function(e,t){return this["catch"](e,t)};var r=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t,n){function i(t){return t===a?e(s):e(t)}var o,a,s;return s=this,o=r(this,"_deferred"),a=o.promise,a.then(e&&i,t,n)},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("Ember: DeferredMixin - "+this)})})}(),function(){var e=Ember.get,t=Ember.typeOf;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){var r;e._actions||("object"===t(e.actions)?r="actions":"object"===t(e.events)&&(r="events"),r&&(e._actions=Ember.merge(e._actions||{},e[r])),delete e[r])},send:function(t){var r,n=[].slice.call(arguments,1);if(this._actions&&this._actions[t]){if(this._actions[t].apply(this,n)!==!0)return}else if(this.deprecatedSend&&this.deprecatedSendHandles&&this.deprecatedSendHandles(t)&&this.deprecatedSend.apply(this,[].slice.call(arguments))!==!0)return;(r=e(this,"target"))&&r.send.apply(r,arguments)}})}(),function(){function e(e,t){return t.then(function(t){return r(e,"isFulfilled",!0),r(e,"content",t),t},function(t){throw r(e,"isRejected",!0),r(e,"reason",t),t},"Ember: PromiseProxy")}function t(e){return function(){var t=n(this,"promise");return t[e].apply(t,arguments)}}var r=Ember.set,n=Ember.get,i=Ember.computed.not,o=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:i("isSettled").readOnly(),isSettled:o("isRejected","isFulfilled").readOnly(),isRejected:!1,isFulfilled:!1,promise:Ember.computed(function(t,r){if(2===arguments.length)return e(this,r);throw new Ember.Error("PromiseProxy's promise must be set")}),then:t("then"),"catch":t("catch"),"finally":t("finally")})}(),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",a="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=a,Ember.TrackedArray.prototype={addItems:function(t,n){var i=r(n,"length");if(!(1>i)){var a,s,u=this._findArrayOperation(t),l=u.operation,c=u.index,h=u.rangeStart;s=new e(o,i,n),l?u.split?(this._split(c,t-h,s),a=c+1):(this._operations.splice(c,0,s),a=c):(this._operations.push(s),a=c),this._composeInsert(a)}},removeItems:function(t,r){if(!(1>r)){var n,i,o=this._findArrayOperation(t),s=(o.operation,o.index),u=o.rangeStart;return n=new e(a,r),o.split?(this._split(s,t-u,n),i=s+1):(this._operations.splice(s,0,n),i=s),this._composeDelete(i)}},apply:function(t){var r=[],o=0;n(this._operations,function(e){t(e.items,o,e.type),e.type!==a&&(o+=e.count,r=r.concat(e.items))}),this._operations=[new e(i,r.length,r)]},_findArrayOperation:function(e){var r,n,i,o,s,u=!1;for(r=o=0,n=this._operations.length;n>r;++r)if(i=this._operations[r],i.type!==a){if(s=o+i.count-1,e===o)break;if(e>o&&s>=e){u=!0;break}o=s+1}return new t(i,r,u,o)},_split:function(t,r,n){var i=this._operations[t],o=i.items.slice(r),a=new e(i.type,o.length,o);i.count=r,i.items=i.items.slice(0,r),this._operations.splice(t+1,0,n,a)},_composeInsert:function(e){var t=this._operations[e],r=this._operations[e-1],n=this._operations[e+1],i=r&&r.type,a=n&&n.type;i===o?(r.count+=t.count,r.items=r.items.concat(t.items),a===o?(r.count+=n.count,r.items=r.items.concat(n.items),this._operations.splice(e,2)):this._operations.splice(e,1)):a===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],s=i.count,u=this._operations[e-1],l=u&&u.type,c=!1,h=[];l===a&&(i=u,e-=1);for(var m=e+1;s>0;++m)t=this._operations[m],r=t.type,n=t.count,r!==a?(n>s?(h=h.concat(t.items.splice(0,s)),t.count-=s,m-=1,n=s,s=0):(n===s&&(c=!0),h=h.concat(t.items),s-=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,c?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",n="f";Ember.SubArray=function(t){arguments.length<1&&(t=0),this._operations=t>0?[new e(r,t)]:[]},Ember.SubArray.prototype={addItem:function(t,i){var o=-1,a=i?r:n,s=this;return this._findOperation(t,function(n,u,l,c,h){var m,f;a===n.type?++n.count:t===l?s._operations.splice(u,0,new e(a,1)):(m=new e(a,1),f=new e(n.type,c-t+1),n.count=t-l,s._operations.splice(u+1,0,m,f)),i&&(o=n.type===r?h+(t-l):h),s._composeAt(u)},function(t){s._operations.push(new e(a,1)),i&&(o=t),s._composeAt(s._operations.length-1)}),o},removeItem:function(e){var t=-1,n=this;return this._findOperation(e,function(i,o,a,s,u){i.type===r&&(t=u+(e-a)),i.count>1?--i.count:(n._operations.splice(o,1),n._composeAt(o))},function(){throw new Ember.Error("Can't remove an item that has never been added.")}),t},_findOperation:function(e,t,n){var i,o,a,s,u,l=0;for(i=s=0,o=this._operations.length;o>i;s=u+1,++i){if(a=this._operations[i],u=s+a.count-1,e>=s&&u>=e)return t(a,i,s,u,l),void 0;a.type===r&&(l+=a.count)}n(l)},_composeAt:function(e){var t,r=this._operations[e];r&&(e>0&&(t=this._operations[e-1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e-1,1),--e)),e<this._operations.length-1&&(t=this._operations[e+1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e+1,1))))},toString:function(){var e="";return t(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){Ember.Container=t("container"),Ember.Container.set=Ember.set}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){{var e="Index out of range",t=[],r=Ember.get;Ember.set}Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return r(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,n){r(this,"content").replace(e,t,n)},_contentWillChange:Ember.beforeObserver("content",function(){this._teardownContent()}),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer("content",function(){r(this,"content");this._setupContent()}),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)}),_arrangedContentDidChange:Ember.observer("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)}),_setupArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return r(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=r(this,"arrangedContent");return e?r(e,"length"):0}),_replace:function(e,t,n){var i=r(this,"content");return i&&this.replaceContent(e,t,n),this},replace:function(){if(r(this,"arrangedContent")!==r(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,n){if(t>r(this,"content.length"))throw new Ember.Error(e);return this._replace(t,0,[n]),this},insertAt:function(e,t){if(r(this,"arrangedContent")===r(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(n,i){if("number"==typeof n){var o,a=r(this,"content"),s=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(a.indexOf(s.objectAt(o)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),o=0;o<u.length;o++)this._replace(u[o],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");return this._replace(r(this,"length"),0,e),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this._replace(0,t,e),this},unshiftObject:function(e){return this._insertAt(0,e),e},unshiftObjects:function(e){return this._replace(0,0,e),this},slice:function(){var e=this.toArray();return e.slice.apply(e,arguments)},arrangedContentArrayWillChange:function(e,t,r,n){this.arrayContentWillChange(t,r,n)},arrangedContentArrayDidChange:function(e,t,r,n){this.arrayContentDidChange(t,r,n)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function e(e,t,r,i,o){var a,s=r._objects;for(s||(s=r._objects={});--o>=i;){var u=e.objectAt(o);u&&(Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),a=n(u),s[a]||(s[a]=[]),s[a].push(o))}}function t(e,t,r,i,a){var s=r._objects;s||(s=r._objects={});for(var u,l;--a>=i;){var c=e.objectAt(a);c&&(Ember.removeBeforeObserver(c,t,r,"contentKeyWillChange"),Ember.removeObserver(c,t,r,"contentKeyDidChange"),l=n(c),u=s[l],u[o.call(u,a)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.ArrayPolyfills.indexOf,a=Ember.Object.extend(Ember.Array,{init:function(e,t,r){this._super(),this._keyName=t,this._owner=r,this._content=e},objectAt:function(e){var t=this._content.objectAt(e);return t&&r(t,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?r(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),i(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e){var t;return t=new a(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,o,a=this._keys;o=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in a)a.hasOwnProperty(i)&&(o>0&&t(e,i,this,r,o),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var o,a=this._keys;o=i>0?r+i:-1,Ember.changeProperties(function(){for(var n in a)a.hasOwnProperty(n)&&(o>0&&e(t,n,this,r,o),Ember.propertyDidChange(this,n));Ember.propertyDidChange(this._content,"@each")},this)},didAddListener:function(e){s.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){s.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(t){var n=this._keys;if(n||(n=this._keys={}),n[t])n[t]++;else{n[t]=1;var i=this._content,o=r(i,"length");e(i,t,this,0,o)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var i=this._content,o=r(i,"length");t(i,e,this,0,o)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils._replace),r=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return"length"===e?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(r,n,i){if(this.isFrozen)throw Ember.FROZEN_ERROR;var o=i?e(i,"length"):0;return this.arrayContentWillChange(r,n,o),0===o?this.splice(r,n):t(this,r,n,i),this.arrayContentDidChange(r,n,o),this},unknownProperty:function(e,t){var r;return void 0!==t&&void 0===r&&(r=this[e]=t),r},indexOf:function(e,t){var r,n=this.length;for(t=void 0===t?0:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var r,n=this.length;for(t=void 0===t?n-1:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;r>=0;r--)if(this[r]===e)return r;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),n=["length"];Ember.EnumerableUtils.forEach(r.keys(),function(e){Array.prototype[e]&&n.push(e)}),n.length>0&&(r=r.without.apply(r,n)),Ember.NativeArray=r,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){r.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.get,t=Ember.set,r=Ember.guidFor,n=Ember.isNone,i=Ember.String.fmt;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Ember.Error(Ember.FROZEN_ERROR);var n=e(this,"length");if(0===n)return this;var i;this.enumerableContentWillChange(n,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var o=0;n>o;o++)i=r(this[o]),delete this[i],delete this[o];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(n,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var r=e(this,"length");if(e(t,"length")!==r)return!1;for(;--r>=0;)if(!t.contains(this[r]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:void 0}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:void 0}),addObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a=r(i),s=this[a],u=e(this,"length");return s>=0&&u>s&&this[s]===i?this:(o=[i],this.enumerableContentWillChange(null,o),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[a]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,o),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a,s=r(i),u=this[s],l=e(this,"length"),c=0===u,h=u===l-1;return u>=0&&l>u&&this[u]===i&&(a=[i],this.enumerableContentWillChange(a,null),c&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),l-1>u&&(o=this[l-1],this[u]=o,this[r(o)]=u),delete this[s],delete this[l-1],t(this,"length",l-1),c&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(a,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin,t=(Ember.get,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"),a=e(this,"sortAscending"),s=e(this,"sortFunction");return t(o,function(t){0===i&&(i=s(e(r,t),e(n,t)),0===i||a||(i=-1*i))}),i},destroy:function(){var r=e(this,"content"),n=e(this,"sortProperties");return r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(){var r=e(this,"content"),n=e(this,"isSorted"),i=e(this,"sortProperties"),o=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return o.orderBy(e,t)}),t(r,function(e){t(i,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(r)):r}),_contentWillChange:Ember.beforeObserver("content",function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()}),sortAscendingWillChange:Ember.beforeObserver("sortAscending",function(){this._lastSortAscending=e(this,"sortAscending")}),sortAscendingDidChange:Ember.observer("sortAscending",function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}}),contentArrayWillChange:function(r,n,i,o){var a=e(this,"isSorted");if(a){var s=e(this,"arrangedContent"),u=r.slice(n,n+i),l=e(this,"sortProperties");t(u,function(e){s.removeObject(e),t(l,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var a=e(this,"isSorted"),s=e(this,"sortProperties");if(a){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(s,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),a=i&&this.orderBy(t,i),s=o&&this.orderBy(t,o);(0>a||s>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,a,s;return r===n?r:(s=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=s.objectAt(i),a=this.orderBy(o,t),0>a?this._binarySearch(t,i+1,n):a>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var a=e(this,"_subControllers"),s=a.slice(n,n+i);t(s,function(e){e&&e.destroy()}),r(a,n,i,new Array(o)),this._super(n,i,o)},init:function(){this._super(),this.set("_subControllers",Ember.A())},content:Ember.computed(function(){return Ember.A()}),_isVirtual:!1,controllerAt:function(t,r,n){var i,o=e(this,"container"),a=e(this,"_subControllers"),s=a[t];if(s)return s;if(i="controller:"+n,!o.has(i))throw new Ember.Error('Could not resolve itemController: "'+n+'"');var u;return this._isVirtual&&(u=e(this,"parentController")),u=u||this,s=o.lookupFactory(i).create({target:this,parentController:u,content:r}),a[t]=s,s},_subControllers:null,_resetSubControllers:function(){var r=e(this,"_subControllers");r&&t(r,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){var e=this&&this.jQuery||Ember.imports&&Ember.imports.jQuery;e||"function"!=typeof r||(e=r("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="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),r="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,a=e.childNodes.length;for(r=0;a>r;r++)if(i=e.childNodes[r],o=1===i.nodeType&&n(i,t))return o},i=function(e,i){t&&(i="&shy;"+i);var o=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return o.push([n,t]),r})),e.innerHTML=i,o.length>0){var a,s=o.length;for(a=0;s>a;a++){var u=n(e,o[a][0]),l=document.createTextNode(o[a][1]);u.parentNode.insertBefore(l,u)}}if(t){for(var c=e.firstChild;1===c.nodeType&&!c.nodeName;)c=c.firstChild;3===c.nodeType&&"­"===c.nodeValue.charAt(0)&&(c.nodeValue=c.nodeValue.slice(1))}},o={},a=function(e){if(void 0!==o[e])return o[e];var t=!0;if("select"===e.toLowerCase()){var r=document.createElement("select");i(r,'<option value="test">Test</option>'),t=1===r.options.length}return o[e]=t,t},s=function(e,t){var r=e.tagName;if(a(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),o=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],s="</"+r+">",u=document.createElement("div");for(i(u,o+t+s),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:s,isSimpleClick:e}}(),function(){function e(e){return e?n.test(e)?e.replace(i,""):e:e}function t(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=function(e){return t[e]||"&amp;"},n=e.toString();return a.test(n)?n.replace(o,r):n}var r=(Ember.get,Ember.set,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,a=/[&<>"'`]/,s=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.elementClasses=null;var t,r=e.length;for(t=0;r>t;t++)this.addClass(e[t])},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
14
- },begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var r=this.currentTagName();if(r){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var n,i,o=this.buffer,a=this.elementId,s=this.classes,u=this.elementAttributes,l=this.elementProperties,c=this.elementStyle;if(o+="<"+e(r),a&&(o+=' id="'+t(a)+'"',this.elementId=null),s&&(o+=' class="'+t(s.join(" "))+'"',this.classes=null,this.elementClasses=null),c){o+=' style="';for(i in c)c.hasOwnProperty(i)&&(o+=i+":"+t(c[i])+";");o+='"',this.elementStyle=null}if(u){for(n in u)u.hasOwnProperty(n)&&(o+=" "+n+'="'+t(u[n])+'"');this.elementAttributes=null}if(l){for(i in l)if(l.hasOwnProperty(i)){var h=l[i];(h||"number"==typeof h)&&(o+=h===!0?" "+i+'="'+i+'"':" "+i+'="'+t(l[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(),a=this.elementId,u=this.classes,l=this.elementAttributes,c=this.elementProperties,h=this.elementStyle,m="";i=l&&l.name&&!s?"<"+e(o)+' name="'+t(l.name)+'">':o;var f=document.createElement(i),p=Ember.$(f);if(a&&(p.attr("id",a),this.elementId=null),u&&(p.attr("class",u.join(" ")),this.classes=null,this.elementClasses=null),h){for(n in h)h.hasOwnProperty(n)&&(m+=n+":"+h[n]+";");p.attr("style",m),this.elementStyle=null}if(l){for(r in l)l.hasOwnProperty(r)&&p.attr(r,l[r]);this.elementAttributes=null}if(c){for(n in c)c.hasOwnProperty(n)&&p.prop(n,c[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,a=null;return a=n._findNearestEventManager(i,r),a&&a!==t?o=n._dispatchEvent(a,e,r,i):i?o=n._bubbleEvent(i,e,r):e.stopPropagation(),o},this)}),e.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("model",function(){var r=e(this,"_childContainers");for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();t(this,"_childContainers",{})})})}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var t={},r=Ember.get,n=Ember.set,i=Ember.guidFor,o=Ember.EnumerableUtils.forEach,a=Ember.EnumerableUtils.addObject,s=Ember.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 l=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};l.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,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("context",function(){this.rerender()}),isVisible:!0,childViews:u,_childViews:c,_childViewsWillChange:Ember.beforeObserver("childViews",function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}}),_childViewsDidChange:Ember.observer("childViews",function(){if(this.isVirtual){var e=r(this,"parentView");e&&Ember.propertyDidChange(e,"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("_parentView",function(){this.isDestroying||(this.trigger("parentViewDidChange"),r(this,"parentView.controller")&&!r(this,"controller")&&this.notifyPropertyChange("controller"))}),_controllerDidChange:Ember.observer("controller",function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))}),cloneKeywords:function(){var e=r(this,"templateData"),t=e?Ember.copy(e.keywords):{};return n(t,"view",r(this,"concreteView")),n(t,"_view",this),n(t,"controller",r(this,"controller")),t},render:function(e){var t=r(this,"layout")||r(this,"template");if(t){var n,i=r(this,"context"),o=this.cloneKeywords(),a={view:this,buffer:e,isRenderData:!0,keywords:o,insideGroup:r(this,"templateData.insideGroup")};n=t(i,{data:a}),void 0!==n&&e.push(n)}},rerender:function(){return this.currentState.rerender(this)},clearRenderedChildren:function(){for(var e=this.lengthBeforeRender,t=this.lengthAfterRender,r=this._childViews,n=t-1;n>=e;n--)r[n]&&r[n].destroy()},_applyClassNameBindings:function(e){var t,r,n,i=this.classNames;o(e,function(e){var o,s=Ember.View._parsePropertyPath(e),u=function(){r=this._classStringForProperty(e),t=this.$(),o&&(t.removeClass(o),i.removeObject(o)),r?(t.addClass(r),o=r):o=null};n=this._classStringForProperty(e),n&&(a(i,n),o=n),this.registerObserver(this,s.path,u),this.one("willClearRender",function(){o&&(i.removeObject(o),o=null)})},this)},_applyAttributeBindings:function(e,t){var n,i;o(t,function(t){var o=t.split(":"),a=o[0],s=o[1]||a,u=function(){i=this.$(),n=r(this,a),Ember.View.applyAttributeBindings(i,s,n)};this.registerObserver(this,a,u),n=r(this,a),Ember.View.applyAttributeBindings(e,s,n)},this)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),n=t.path,i=r(this,n);return void 0===i&&Ember.isGlobalPath(n)&&(i=r(Ember.lookup,n)),Ember.View._classStringForValue(n,i,t.className,t.falsyClassName)},element:Ember.computed(function(e,t){return void 0!==t?this.currentState.setElement(this,t):this.currentState.getElement(this)}).property("_parentView"),$:function(e){return this.currentState.$(this,e)},mutateChildViews:function(e){for(var t,r=this._childViews,n=r.length;--n>=0;)t=r[n],e(this,t,n);return this},forEachChildView:function(e){var t=this._childViews;if(!t)return this;var r,n,i=t.length;for(n=0;i>n;n++)r=t[n],e(r);return this},appendTo:function(e){return this._insertElementLater(function(){this.$().appendTo(e)}),this},replaceIn:function(e){return this._insertElementLater(function(){Ember.$(e).empty(),this.$().appendTo(e)}),this},_insertElementLater:function(e){this._scheduledInsert=Ember.run.scheduleOnce("render",this,"_insertElement",e)},_insertElement:function(e){this._scheduledInsert=null,this.currentState.insertElement(this,e)},append:function(){return this.appendTo(document.body)},remove:function(){this.removedFromDOM||this.destroyElement(),this.invokeRecursively(function(e){e.clearRenderedChildren&&e.clearRenderedChildren()})},elementId:null,findElementInParentElement:function(e){var t="#"+this.elementId;return Ember.$(t)[0]||Ember.$(t,e)[0]},createElement:function(){if(r(this,"element"))return this;var e=this.renderToBuffer();return n(this,"element",e.element()),this},willInsertElement:Ember.K,didInsertElement:Ember.K,willClearRender:Ember.K,invokeRecursively:function(e,t){for(var r,n,i,o=t===!1?this._childViews:[this];o.length;){r=o.slice(),o=[];for(var a=0,s=r.length;s>a;a++)n=r[a],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,a=t.length;a>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 l([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("element",function(){this.forEachChildView(function(e){delete s(e).cache.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("isVisible",function(){var e=this.$();if(e){var t=r(this,"isVisible");e.toggle(t),this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden())}}),_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)},a=function(){Ember.run.scheduleOnce("render",this,o)};Ember.addObserver(e,t,r,a),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,a)})}}});var 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===!1?(e.removeAttr(t),e.prop(t,"")):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(){var e=(Ember.get,Ember.set,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)}})}(),function(){var e=Ember.View.states.hasElement,t=Ember.View.states.inDOM=Ember.create(e);Ember.merge(t,{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("currentView",function(){var e=r(this,"currentView");e&&e.destroy()}),_currentViewDidChange:Ember.observer("currentView",function(){var e=r(this,"currentView");e&&this.pushObject(e)}),_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,a,s,u=t._childViews,l=new o;for(r=0,n=u.length;n>r;r++)i=u[r],s||(s=Ember.RenderBuffer(),s._hasElement=!1),i.renderToBufferIfNeeded(s)?l.push(i):l.length?(e(t,l,a,s),s=null,a=i,l.clear()):a=i;l.length&&e(t,l,a,s)}})}(),function(){{var e=Ember.get,t=Ember.set;Ember.String.fmt}Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver("content",function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)}),_contentDidChange:Ember.observer("content",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)}),_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,a,s,u=this._childViews;s=this._childViews.length;var l=n===s;for(l&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),a=r+n-1;a>=r;a--)o=u[a],o.destroy()},arrayDidChange:function(r,n,i,o){var a,s,u,l,c,h,m=[];if(l=r?e(r,"length"):0)for(c=e(this,"itemViewClass"),"string"==typeof c&&(c=e(c)||c),u=n;n+o>u;u++)s=r.objectAt(u),a=this.createChildView(c,{content:s,contentIndex:u}),m.push(a);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(){Ember.ComponentTemplateDeprecation=Ember.Mixin.create({willMergeMixin:function(e){this._super.apply(this,arguments);var t,r,n=e.layoutName||e.layout;e.templateName&&!n&&(t="templateName",r="layoutName",e.layoutName=e.templateName,delete e.templateName),e.template&&!n&&(t="template",r="layout",e.layout=e.template,delete e.template)}})}(),function(){var e=Ember.get,t=Ember.set,r=(Ember.isNone,Array.prototype.slice);Ember.Component=Ember.View.extend(Ember.TargetActionSupport,Ember.ComponentTemplateDeprecation,{init:function(){this._super(),t(this,"context",this),t(this,"controller",this)},defaultLayout:function(e,t){Ember.Handlebars.helpers.yield.call(e,t)},template:Ember.computed(function(t,r){if(void 0!==r)return r;var n=e(this,"templateName"),i=this.templateForName(n,"template");return i||e(this,"defaultTemplate")}).property("templateName"),templateName:null,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: ©2014 Tilde, Inc. All rights reserved.
15
- var e=function(){},t=0,r=function(){return"undefined"!=typeof MetamorphENV?MetamorphENV.DISABLE_RANGE_API:"undefined"!==ENV?ENV.DISABLE_RANGE_API:!1}(),n=!r&&"undefined"!=typeof document&&"createRange"in document&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,i="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),o=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}(),a=function(r){var n;n=this instanceof a?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=a.prototype;var s,u,l,c,h,m,f,p,d;if(c=function(){return this.startTag()+this.innerHTML+this.endTag()},p=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},d=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"},n)s=function(e,t){var r=document.createRange(),n=document.getElementById(e.start),i=document.getElementById(e.end);return t?(r.setStartBefore(n),r.setEndAfter(i)):(r.setStartAfter(n),r.setEndBefore(i)),r},u=function(e,t){var r=s(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},l=function(){var e=s(this,!0);e.deleteContents()},h=function(e){var t=document.createRange();t.setStart(e),t.collapse(!1);var r=t.createContextualFragment(this.outerHTML());e.appendChild(r)},m=function(e){var t=document.createRange(),r=document.getElementById(this.end);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)},f=function(e){var t=document.createRange(),r=document.getElementById(this.start);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)};else{var b={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},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},E=function(e,t){var r=[];if(o&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,n,i){return r.push([i,t]),n})),e.innerHTML=t,r.length>0){var n,i=r.length;for(n=0;i>n;n++){var a=v(e,r[n][0]),s=document.createTextNode(r[n][1]);a.parentNode.insertBefore(s,a)}}},g=function(e,t){var r=b[e.tagName.toLowerCase()]||b._default,n=r[0],o=r[1],a=r[2];i&&(t="&shy;"+t);var s=document.createElement("div");E(s,o+t+a);for(var u=0;n>=u;u++)s=s.firstChild;if(i){for(var l=s;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&"­"===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}return s},y=function(e){for(;""===e.parentNode.tagName;)e=e.parentNode;return e},w=function(e,t){e.parentNode!==t.parentNode&&t.parentNode.insertBefore(e,t.parentNode.firstChild)};u=function(e,t){var r,n,i,o=y(document.getElementById(this.start)),a=document.getElementById(this.end),s=a.parentNode;for(w(o,a),r=o.nextSibling;r;){if(n=r.nextSibling,i=r===a){if(!t)break;a=r.nextSibling}if(r.parentNode.removeChild(r),i)break;r=n}for(r=g(o.parentNode,e),t&&o.parentNode.removeChild(o);r;)n=r.nextSibling,s.insertBefore(r,a),r=n},l=function(){var e=y(document.getElementById(this.start)),t=document.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},h=function(e){for(var t,r=g(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},m=function(e){var t,r,n=document.getElementById(this.end),i=n.nextSibling,o=n.parentNode;for(r=g(o,e);r;)t=r.nextSibling,o.insertBefore(r,i),r=t},f=function(e){var t,r,n=document.getElementById(this.start),i=n.parentNode;r=g(i,e);for(var o=n.nextSibling;r;)t=r.nextSibling,i.insertBefore(r,o),r=t}}return a.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(u.call(this,e),this.innerHTML=e,void 0)},a.prototype.replaceWith=function(e){this.checkRemoved(),u.call(this,e,!0)},a.prototype.remove=l,a.prototype.outerHTML=c,a.prototype.appendTo=h,a.prototype.after=m,a.prototype.prepend=f,a.prototype.startTag=p,a.prototype.endTag=d,a.prototype.isRemoved=function(){var e=document.getElementById(this.start),t=document.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=Ember.imports&&Ember.imports.Handlebars||this&&this.Handlebars;t||"function"!=typeof r||(t=r("handlebars")),Ember.Handlebars=e(t),Ember.Handlebars.helper=function(e,t){Ember.View.detect(t)?Ember.Handlebars.registerHelper(e,Ember.Handlebars.makeViewHelper(t)):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.makeViewHelper=function(e){return function(t){return Ember.Handlebars.helpers.view.call(this,e,t)}},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 n=/helpers\.(.*?)\)/,i=/helpers\['(.*?)'/,o=/(.*blockHelperMissing\.call\(.*)(stack[0-9]+)(,.*)/;Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation=function(e){var t=e[e.length-1],r=(n.exec(t)||i.exec(t))[1],a=o.exec(t);e[e.length-1]=a[1]+"'"+r+"'"+a[3]};var a=Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation,s=Ember.Handlebars.JavaScriptCompiler.prototype.blockValue;Ember.Handlebars.JavaScriptCompiler.prototype.blockValue=function(){s.apply(this,arguments),a(this.source)};var u=Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue;Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue=function(){u.apply(this,arguments),a(this.source)};var l="ember"+ +new Date,c=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(l+c++)]);else if(e.params.length||e.hash);else{var r=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([r].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,"bind-attr":!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),a=Ember.Handlebars.template(o);return a.isMethod=!1,a})}(),function(){function e(e,r,n,i){var o,a,s,u,l,c=[],h=i.hash,m=h.boundOptions,f=t.call(i.types,1);for(l in m)m.hasOwnProperty(l)&&(h[l]=Ember.Handlebars.get(e,m[l],i));for(o=0,a=n.length;a>o;++o)s=n[o],u=f[o],"ID"===u?c.push(Ember.Handlebars.get(s.root,s.path,i)):c.push(s.path);return c.push(i),r.apply(e,c)}var t=Array.prototype.slice,r=Ember.Handlebars.template,n=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,o=r&&r.keywords||{};return n=t.split(".",1)[0],o.hasOwnProperty(n)&&(e=o[n],i=!0,t=t===n?"":t.substr(n.length+1)),{root:e,path:t,isKeyword:i}},i=Ember.Handlebars.get=function(e,t,r){var i,o=r&&r.data,a=n(e,t,o);return e=a.root,t=a.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.getEscaped=function(e,t,r){var n=i(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},Ember.Handlebars.resolveParams=function(e,t,r){for(var n,o,a=[],s=r.types,u=0,l=t.length;l>u;u++)n=t[u],o=s[u],"ID"===o?a.push(i(e,n,r)):a.push(n);return a},Ember.Handlebars.resolveHash=function(e,t,r){var n,o={},a=r.hashTypes;for(var s in t)t.hasOwnProperty(s)&&(n=a[s],o[s]="ID"===n?i(e,t[s],r):t[s]);return o},Ember.Handlebars.registerHelper("helperMissing",function(e){var r,n="",i=arguments[arguments.length-1],o=Ember.Handlebars.resolveHelper(i.data.view.container,e);if(o)return o.apply(this,t.call(arguments,1));throw r="%@ Handlebars error: Could not find property '%@' on object %@.",i.data&&(n=i.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerHelper("blockHelperMissing",function(e){var r=arguments[arguments.length-1],n=Ember.Handlebars.resolveHelper(r.data.view.container,e);return n?n.apply(this,t.call(arguments,1)):Handlebars.helpers.helperMissing.call(this,e)}),Ember.Handlebars.registerBoundHelper=function(e){var r=t.call(arguments,1),n=Ember.Handlebars.makeBoundHelper.apply(this,r);Ember.Handlebars.registerHelper(e,n)},Ember.Handlebars.makeBoundHelper=function(r){function i(){var i,a,s,u,l,c=t.call(arguments,0,-1),h=c.length,m=arguments[arguments.length-1],f=[],p=m.data,d=p.isUnbound?t.call(m.types,1):m.types,b=m.hash,v=p.view,E=m.contexts,g=E&&E.length?E[0]:this,y="",w=Ember._SimpleHandlebarsView.prototype.normalizedValue,_=b.boundOptions={};for(s in b)Ember.IS_BINDING.test(s)&&(_[s.slice(0,-7)]=b[s]);var C=[];for(p.properties=[],i=0;h>i;++i)if(p.properties.push(c[i]),"ID"===d[i]){var O=n(g,c[i],p);f.push(O),C.push(O)}else p.isUnbound?f.push({path:c[i]}):f.push(null);if(p.isUnbound)return e(this,r,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)&&(l=n(g,_[e],p),A.path=l.path,A.pathRoot=l.root,b[e]=w.call(A));for(i=0;h>i;++i)l=f[i],l?(A.path=l.path,A.pathRoot=l.root,t.push(w.call(A))):t.push(c[i]);return t.push(m),r.apply(g,t)},v.appendChild(A);for(u in _)_.hasOwnProperty(u)&&C.push(n(g,_[u],p));for(i=0,a=C.length;a>i;++i)l=C[i],v.registerObserver(l.root,l.path,A,A.rerender);if("ID"===d[0]&&0!==f.length){var P=f[0],x=P.root,T=P.path;Ember.isEmpty(T)||(y=T+".");for(var V=0,S=o.length;S>V;V++)v.registerObserver(x,y+o[V],A,A.rerender)}}var o=t.call(arguments,1);return i._rawFunction=r,i},Ember.Handlebars.template=function(e){var t=r(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.htmlSafe=function(){return e(this)})}(),function(){Ember.Handlebars.resolvePaths=function(e){for(var t=[],r=e.contexts,n=e.roots,i=e.data,o=0,a=r.length;a>o;o++)t.push(Ember.Handlebars.get(n[o],r[o],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var r=(Ember.set,Ember.get,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 a=Ember.View.cloneStates(Ember.View.states),s=Ember.merge;s(a._default,{rerenderIfNeeded:Ember.K}),s(a.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:a,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),o=r(this,"pathRoot"),a=r(this,"valueNormalizerFunc");return""===n?e=o:(t=r(this,"templateData"),e=i(o,n,{data:t})),a?a(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),o=r(this,"preserveContext"),a=r(this,"previousContext"),s=r(this,"_contextController"),u=r(this,"inverseTemplate"),l=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",l),o)n(this,"_context",a);else{if(!l)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;s&&(n(s,"content",c),c=s),n(this,"_context",c)}else u?(n(this,"template",u),o?n(this,"_context",a):n(this,"_context",c)):n(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r,n,i,u){var l,c,h,m=t.data,f=t.fn,p=t.inverse,d=m.view,b=this;if(l=a(b,e,m),"object"==typeof this){if(m.insideGroup){c=function(){Ember.run.once(d,"rerender")};var v,E,g=o(b,e,t);g=i?i(g):g,E=r?b:g,n(g)?v=f:p&&(v=p),v(E,{data:t.data})}else{var y=d.createChildView(Ember._HandlebarsBoundView,{preserveContext:r,shouldDisplayFunc:n,valueNormalizerFunc:i,displayTemplate:f,inverseTemplate:p,path:e,pathRoot:b,previousContext:b,isEscaped:!t.hash.unescaped,templateData:t.data});t.hash.controller&&y.set("_contextController",this.container.lookupFactory("controller:"+t.hash.controller).create({container:b.container,parentController:b,target:b})),d.appendChild(y),c=function(){Ember.run.scheduleOnce("render",y,"rerenderIfNeeded")}}if(""!==l.path&&(d.registerObserver(l.root,l.path,c),u))for(h=0;h<u.length;h++)d.registerObserver(l.root,l.path+"."+u[h],c)}else m.buffer.push(s(b,e,t))}function r(e,t,r){var n,i,o,u,l=r.data,c=l.view;if(n=a(e,t,l),o=n.root,o&&"object"==typeof o){if(l.insideGroup)i=function(){Ember.run.once(c,"rerender")},u=s(e,t,r),l.buffer.push(u);else{var h=new Ember._SimpleHandlebarsView(t,e,!r.hash.unescaped,r.data);h._parentView=c,c.appendChild(h),i=function(){Ember.run.scheduleOnce("render",h,"rerender")}}""!==n.path&&c.registerObserver(n.root,n.path,i)}else u=s(e,t,r),l.buffer.push(u)}function n(e){var t=e&&i(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?0!==i(e,"length"):!!e}var i=Ember.get,o=(Ember.set,Ember.String.fmt,Ember.Handlebars.get),a=Ember.Handlebars.normalizePath,s=Ember.Handlebars.getEscaped,u=Ember.ArrayPolyfills.forEach,l=Ember.create,c=Ember.Handlebars,h=c.helpers;c.bind=t,c.registerHelper("_triageMustache",function(e,t){if(h[e])return h[e].call(this,t);var r=Ember.Handlebars.resolveHelper(t.data.view.container,e);return r?r.call(this,t):h.bind.call(this,e,t)}),Ember.Handlebars.resolveHelper=function(e,t){if(e&&-1!==t.indexOf("-")){var r=e.lookup("helper:"+t);if(!r){var n=e.lookup("component-lookup:main"),i=n.lookupFactory(t,e);i&&(r=c.makeViewHelper(i),e.register("helper:"+t,r))}return r}},c.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)}),c.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts.length?r.contexts[0]:this;return t.call(i,e,r,!0,n,n,["isTruthy","length"])}),c.registerHelper("unboundIf",function(e,t){var r,i,s=t.contexts&&t.contexts.length?t.contexts[0]:this,u=t.data,l=t.fn,c=t.inverse;r=a(s,e,u),i=o(s,e,t),n(i)||(l=c),l(s,{data:u})}),c.registerHelper("with",function(r,n){if(4===arguments.length){var i,o,s,u,c;n=arguments[3],i=arguments[2],o=arguments[0];var m=l(n);if(m.data=l(n.data),m.data.keywords=l(n.data.keywords||{}),Ember.isGlobalPath(o))c=o;else{u=a(this,o,n.data),o=u.path,s=u.root;var f=Ember.$.expando+Ember.guidFor(s);m.data.keywords[f]=s,c=o?f+"."+o:f}return Ember.bind(m.data.keywords,i,c),t.call(this,o,m,!0,e)}return h.bind.call(n.contexts[0],r,n)}),c.registerHelper("if",function(e,t){return t.data.isUnbound?h.unboundIf.call(t.contexts[0],e,t):h.boundIf.call(t.contexts[0],e,t)}),c.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,t.data.isUnbound?h.unboundIf.call(t.contexts[0],e,t):h.boundIf.call(t.contexts[0],e,t)}),c.registerHelper("bind-attr",function(e){var t=e.hash,r=e.data.view,n=[],i=this,s=++Ember.uuid,l=t["class"];if(null!=l){var h=c.bindClasses(this,l,r,s,e);n.push('class="'+Handlebars.Utils.escapeExpression(h.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return u.call(m,function(u){var l,c=t[u];l=a(i,c,e.data);var h,m,f="this"===c?l.root:o(i,c,e),p=Ember.typeOf(f);h=function(){var t=o(i,c,e),n=r.$("[data-bindattr-"+s+"='"+s+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,u,t),void 0):(Ember.removeObserver(l.root,l.path,m),void 0)},"this"===c||l.isKeyword&&""===l.path||r.registerObserver(l.root,l.path,h),"string"===p||"number"===p&&!isNaN(f)?n.push(u+'="'+Handlebars.Utils.escapeExpression(f)+'"'):f&&"boolean"===p&&n.push(u+'="'+u+'"')},this),n.push("data-bindattr-"+s+'="'+s+'"'),new c.SafeString(n.join(" "))}),c.registerHelper("bindAttr",function(){return c.helpers["bind-attr"].apply(this,arguments)}),c.bindClasses=function(e,t,r,n,i){var s,l,c,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 u.call(t.split(" "),function(t){var o,u,f,p,d=Ember.View._parsePropertyPath(t),b=d.path,v=e;""!==b&&"this"!==b&&(p=a(e,b,i.data),v=p.root,b=p.path),u=function(){s=m(e,d,i),c=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),c&&0!==c.length?(o&&c.removeClass(o),s?(c.addClass(s),o=s):o=null):Ember.removeObserver(v,b,f)},""!==b&&"this"!==b&&r.registerObserver(v,b,u),l=m(e,d,i),l&&(h.push(l),o=l)}),h}}(),function(){function e(e,r){var n=r.hash,i=r.hashTypes;for(var o in n)if("ID"===i[o]){var a=n[o];Ember.IS_BINDING.test(o)||(n[o+"Binding"]=a,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)}var t=(Ember.get,Ember.set,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 a;for(var s in t)t.hasOwnProperty(s)&&Ember.IS_BINDING.test(s)&&"string"==typeof t[s]&&(a=this.contextualizeBindingPath(t[s],r),a&&(t[s]=a));if(n.classNameBindings)for(var u in n.classNameBindings){var l=n.classNameBindings[u];if("string"==typeof l){var c=Ember.View._parsePropertyPath(l);a=this.contextualizeBindingPath(c.path,r),a&&(n.classNameBindings[u]=a+c.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||""===e?"_parentView.context":"_parentView.context."+e},helper:function(i,o,a){var s,u=a.data,l=a.fn;e(i,a),s="string"==typeof o?"STRING"===a.types[0]&&r.test(o)&&!n.test(o)?u.view.container.lookupFactory("view:"+o):t.get(i,o,a):o;var c=this.propertiesFromHTMLOptions(a,i),h=u.view;c.templateData=u;var m=s.proto?s.proto():s;l&&(c.template=l),m.controller||m.controllerBinding||c.controller||c.controllerBinding||(c._context=i),h.appendChild(s,c)}}),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,o,a,s=n.fn,u=n.data,l=n.inverse;n.data.view}r?(i=u.keywords.controller,o=i&&i.container,a=t(this,r,n)||o.lookupFactory("view:"+r)):a=Ember.CollectionView;var c,h,m=n.hash,f={},p=a.proto();m.itemView?(i=u.keywords.controller,o=i.container,h=o.lookupFactory("view:"+m.itemView)):h=m.itemViewClass?t(p,m.itemViewClass,n):p.itemViewClass,delete m.itemViewClass,delete m.itemView;for(var d in m)m.hasOwnProperty(d)&&(c=d.match(/^item(.)(.*)$/),c&&"itemController"!==d&&(f[c[1].toLowerCase()+c[2]]=m[d],delete m[d]));s&&(f.template=s,delete n.fn);var b;l&&l!==Ember.Handlebars.VM.noop?(b=e(p,"emptyViewClass"),b=b.extend({template:l,tagName:f.tagName})):m.emptyViewClass&&(b=t(this,m.emptyViewClass,n)),b&&(m.emptyView=b),m.keyword||(f._context=Ember.computed.alias("content"));var v=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:u,hash:f},this);return m.itemViewClass=h.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,a=arguments[arguments.length-1];return arguments.length>2?(a.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helpers.helperMissing,o=n.apply(this,Array.prototype.slice.call(arguments,1)),delete a.data.isUnbound,o):(i=r.contexts&&r.contexts.length?r.contexts[0]:this,e(i,t,r))})}(),function(){var e=(Ember.get,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),a=o.root,s=o.path,u="this"===s?a:e(a,s,n);Ember.Logger.log(u)}),Ember.Handlebars.registerHelper("debugger",function(){{var e=this;Ember.inspect(e)}})}(),function(){{var e=Ember.get,t=Ember.set;Ember.String.fmt}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({_isVirtual:!0,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 a=e(r,"templateData");a=Ember.copy(a),a.keywords=r.cloneKeywords(),t(r,"templateData",a),a.keywords[i]=o}return o&&e(o,"isController")&&t(r,"controller",o),r},destroy:function(){if(this._super()){var t=e(this,"_arrayController");return t&&t.destroy(),this}}});var r=Ember.Handlebars.GroupedEach=function(e,t,r){var n=this,i=Ember.Handlebars.normalizePath(e,t,r.data);this.context=e,this.path=t,this.options=r,this.template=r.fn,this.containingView=r.data.view,this.normalizedRoot=i.root,this.normalizedPath=i.path,this.content=this.lookupContent(),this.addContentObservers(),this.addArrayObservers(),this.containingView.on("willClearRender",function(){n.destroy()})};r.prototype={contentWillChange:function(){this.removeArrayObservers()},contentDidChange:function(){this.content=this.lookupContent(),this.addArrayObservers(),this.rerenderContainingView()},contentArrayWillChange:Ember.K,contentArrayDidChange:function(){this.rerenderContainingView()},lookupContent:function(){return Ember.Handlebars.get(this.normalizedRoot,this.normalizedPath,this.options)},addArrayObservers:function(){this.content&&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(){function e(e){return!Ember.isNone(e)}function t(e,t,r){var n=t.split("/"),i=n[n.length-1];n[n.length-1]="_"+i;var o=r.data.view,a=n.join("/"),s=o.templateForName(a),u=!s&&o.templateForName(t);(s=s||u)(e,{data:r.data})}Ember.Handlebars.registerHelper("partial",function(r,n){var i=n.contexts&&n.contexts.length?n.contexts[0]:this;return"ID"===n.types[0]?(n.fn=function(e,n){var i=Ember.Handlebars.get(e,r,n);t(e,i,n)},Ember.Handlebars.bind.call(i,r,n,!0,e)):(t(i,r,n),void 0)})}(),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"),a=t(r,"value");(o===e||"keyPress"===o&&"key-press"===e)&&r.sendAction("action",a),r.sendAction(e,a),(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","readonly"],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","min","max"],value:"",type:"text",size:null,pattern:null,min:null,max:null})}(),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("value",function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)}),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,a=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("parentView.optionLabelPath",function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))}),valuePathDidChange:Ember.observer("parentView.optionValuePath",function(){var e=t(this,"parentView.optionValuePath");
16
- e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))})}),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="";return t.buffer.push('<option value="">'),n=r._triageMustache.call(e,"view.prompt",{hash:{},hashTypes:{},hashContexts:{},contexts:[e],types:["ID"],data:t}),(n||0===n)&&t.buffer.push(n),t.buffer.push("</option>"),i}function a(e,t){var n;n=r.each.call(e,"view.groupedContent",{hash:{},hashTypes:{},hashContexts:{},inverse:f.noop,fn:f.program(4,s,t),contexts:[e],types:["ID"],data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function s(e,t){t.buffer.push(m(r.view.call(e,"view.groupView",{hash:{content:"content",label:"label"},hashTypes:{content:"ID",label:"ID"},hashContexts:{content:e,label:e},contexts:[e],types:["ID"],data:t})))}function u(e,t){var n;n=r.each.call(e,"view.content",{hash:{},hashTypes:{},hashContexts:{},inverse:f.noop,fn:f.program(7,l,t),contexts:[e],types:["ID"],data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function l(e,t){t.buffer.push(m(r.view.call(e,"view.optionView",{hash:{content:""},hashTypes:{content:"ID"},hashContexts:{content:e},contexts:[e],types:["ID"],data:t})))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),i=i||{};var c,h="",m=this.escapeExpression,f=this;return c=r["if"].call(t,"view.prompt",{hash:{},hashTypes:{},hashContexts:{},inverse:f.noop,fn:f.program(1,o,i),contexts:[t],types:["ID"],data:i}),(c||0===c)&&i.buffer.push(c),c=r["if"].call(t,"view.optionGroupPath",{hash:{},hashTypes:{},hashContexts:{},inverse:f.program(6,u,i),fn:f.program(3,a,i),contexts:[t],types:["ID"],data:i}),(c||0===c)&&i.buffer.push(c),h}),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("selection.@each",function(){var r=t(this,"selection");if(t(this,"multiple")){if(!a(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()}),valueDidChange:Ember.observer("value",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))}),_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,s=t(this,"content"),u=t(this,"selection");if(s&&r){var l=r.map(function(){return this.index-i}).toArray(),c=s.objectsAt(l);a(u)?o(u,0,t(u,"length"),c):e(this,"selection",c)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),o=n?r(n,i):-1,a=t(this,"prompt");a&&(o+=1),e&&(e.selectedIndex=o)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),o=t(this,"selection"),a=i?n(i,o):[-1],s=t(this,"prompt"),u=s?1:0,l=this.$("option");l&&l.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(a,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){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){e.hash,e.hashTypes;return Ember.Handlebars.helpers.view.call(this,Ember.TextArea,e)})}(),function(){Ember.ComponentLookup=Ember.Object.extend({lookupFactory:function(e,t){t=t||this.container;var r="component:"+e,n="template:components/"+e,i=t&&t.has(n);i&&t.injection(r,"layout",n);var o=t.lookupFactory(r);return i||o?(o||(t.register(r,Ember.Component),o=t.lookupFactory(r)),o):void 0}})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}function t(e){e.register("component-lookup:main",Ember.ComponentLookup)}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:"registerComponentLookup",after:"domTemplates",initialize:t})})}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",["exports"],function(e){"use strict";function t(e){this.string=e}function r(e){this.name=e}function n(e){this.name=e}function i(){}function o(e,o,a){"/"===e.charAt(0)&&(e=e.substr(1));for(var s=e.split("/"),u=[],l=0,c=s.length;c>l;l++){var h,m=s[l];(h=m.match(/^:([^\/]+)$/))?(u.push(new r(h[1])),o.push(h[1]),a.dynamics++):(h=m.match(/^\*([^\/]+)$/))?(u.push(new n(h[1])),o.push(h[1]),a.stars++):""===m?u.push(new i):(u.push(new t(m)),a.statics++)}return u}function a(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?t.types.statics-e.types.statics:0})}function u(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 l(e){this.queryParams=e||{}}function c(e,t,r){for(var n=e.handlers,i=e.regex,o=t.match(i),a=1,s=new l(r),u=0,c=n.length;c>u;u++){for(var h=n[u],m=h.names,f={},p=0,d=m.length;d>p;p++)f[m[p]]=o[a++];s.push({handler:h.handler,params:f,isDynamic:!!m.length})}return s}function h(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function m(e,t,r){this.path=e,this.matcher=t,this.delegate=r}function f(e){this.routes={},this.children={},this.target=e}function p(e,t,r){return function(n,i){var o=e+n;return i?(i(p(o,t,r)),void 0):new m(e+n,t,r)}}function d(e,t,r){for(var n=0,i=0,o=e.length;o>i;i++)n+=e[i].path.length;t=t.substr(n);var a={path:t,handler:r};e.push(a)}function b(e,t,r,n){var i=t.routes;for(var o in i)if(i.hasOwnProperty(o)){var a=e.slice();d(a,o,i[o]),t.children[o]?b(a,t.children[o],r,n):r.call(n,a)}}var v=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],E=new RegExp("(\\"+v.join("|\\")+")","g");t.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(E,"\\$1")},generate:function(){return this.string}},r.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},n.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},i.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},a.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 a(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,r,n,i=this.nextStates,o=[],a=0,s=i.length;s>a;a++)t=i[a],r=t.charSpec,"undefined"!=typeof(n=r.validChars)?-1!==n.indexOf(e)&&o.push(t):"undefined"!=typeof(n=r.invalidChars)&&-1===n.indexOf(e)&&o.push(t);return o}};var g=Object.create||function(e){function t(){}return t.prototype=e,new t};l.prototype=g({splice:Array.prototype.splice,slice:Array.prototype.slice,push:Array.prototype.push,length:0,queryParams:null});var y=function(){this.rootState=new a,this.names={}};y.prototype={add:function(e,t){for(var r,n=this.rootState,a="^",s={statics:0,dynamics:0,stars:0},u=[],l=[],c=!0,m=0,f=e.length;f>m;m++){var p=e[m],d=[],b=o(p.path,d,s);l=l.concat(b);for(var v=0,E=b.length;E>v;v++){var g=b[v];g instanceof i||(c=!1,n=n.put({validChars:"/"}),a+="/",n=h(n,g),a+=g.regex())}var y={handler:p.handler,names:d};u.push(y)}c&&(n=n.put({validChars:"/"}),a+="/"),n.handlers=u,n.regex=new RegExp(a+"$"),n.types=s,(r=t&&t.as)&&(this.names[r]={segments:l,handlers:u})},handlersFor:function(e){var t=this.names[e],r=[];if(!t)throw new Error("There is no route named "+e);for(var n=0,i=t.handlers.length;i>n;n++)r.push(t.handlers[n]);return r},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var r=this.names[e],n="";if(!r)throw new Error("There is no route named "+e);for(var o=r.segments,a=0,s=o.length;s>a;a++){var u=o[a];u instanceof i||(n+="/",n+=u.generate(t))}return"/"!==n.charAt(0)&&(n="/"+n),t&&t.queryParams&&(n+=this.generateQueryString(t.queryParams,r.handlers)),n},generateQueryString:function(e){var t=[];for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(n===!1||null==n)continue;var i=r;if(Array.isArray(n))for(var o=0,a=n.length;a>o;o++){var s=r+"[]="+encodeURIComponent(n[o]);t.push(s)}else n!==!0?(i+="="+encodeURIComponent(n),t.push(i)):t.push(i)}return 0===t.length?"":"?"+t.join("&")},parseQueryString:function(e){for(var t=e.split("&"),r={},n=0;n<t.length;n++){var i,o=t[n].split("="),a=decodeURIComponent(o[0]),s=a.length,u=!1;1===o.length?i=!0:(s>2&&"[]"===a.slice(s-2)&&(u=!0,a=a.slice(0,s-2),r[a]||(r[a]=[])),i=o[1]?decodeURIComponent(o[1]):""),u?r[a].push(i):r[a]=i}return r},recognize:function(e){var t,r,n,i,o=[this.rootState],a={},l=!1;if(i=e.indexOf("?"),-1!==i){var h=e.substr(i+1,e.length);e=e.substr(0,i),a=this.parseQueryString(h)}for("/"!==e.charAt(0)&&(e="/"+e),t=e.length,t>1&&"/"===e.charAt(t-1)&&(e=e.substr(0,t-1),l=!0),r=0,n=e.length;n>r&&(o=u(o,e.charAt(r)),o.length);r++);var m=[];for(r=0,n=o.length;n>r;r++)o[r].handlers&&m.push(o[r]);o=s(m);var f=m[0];return f&&f.handlers?(l&&"(.+)$"===f.regex.source.slice(-5)&&(e+="/"),c(f,e,a)):void 0}},e["default"]=y,m.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)}return this}},f.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,r,n){var i=new f(t);this.children[e]=i;var o=p(e,i,n);n&&n.contextEntered&&n.contextEntered(t,o),r(o)}},y.prototype.map=function(e,t){var r=new f;e(p("",r,this.delegate)),b([],r,function(e){t?t(this,e):this.add(e)},this)}})}(),function(){e("router/handler-info",["./utils","rsvp","exports"],function(e,t,r){"use strict";function n(e){e&&l(this,e)}function i(e){n.call(this,e)}function o(e){n.call(this,e),this.params=this.params||{}}function a(e){n.call(this,e)}function s(e,t){if(!e^!t)return!1;if(!e)return!0;for(var r in e)if(e.hasOwnProperty(r)&&e[r]!==t[r])return!1;return!0}var u=e.bind,l=e.merge,c=e.oCreate,h=e.serialize,m=t.resolve;n.prototype={name:null,handler:null,params:null,context:null,log:function(e,t){e.log&&e.log(this.name+": "+t)},resolve:function(e,t,r){var n=u(this.checkForAbort,this,t),i=u(this.runBeforeModelHook,this,e,r),o=u(this.getModel,this,e,r),a=u(this.runAfterModelHook,this,e,r),s=u(this.becomeResolved,this,r);return m().then(n).then(i).then(n).then(o).then(n).then(a).then(n).then(s)},runBeforeModelHook:function(e,t){return t.trigger&&t.trigger(!0,"willResolveModel",t,this.handler),this.runSharedModelHook(e,t,"beforeModel",[])},runAfterModelHook:function(e,t,r){var n=this.name;return this.stashResolvedModel(t,r),this.runSharedModelHook(e,t,"afterModel",[r]).then(function(){return t.resolvedModels[n]})},runSharedModelHook:function(e,t,r,n){this.log(t,"calling "+r+" hook"),this.queryParams&&n.push(this.queryParams),n.push(t);var i=this.handler;return e(function(){return i[r]&&i[r].apply(i,n)})},getModel:function(){throw new Error("This should be overridden by a subclass of HandlerInfo")},checkForAbort:function(e,t){return m(e()).then(function(){return t})},stashResolvedModel:function(e,t){e.resolvedModels=e.resolvedModels||{},e.resolvedModels[this.name]=t},becomeResolved:function(e,t){var r=this.params||h(this.handler,t,this.names);return e&&(this.stashResolvedModel(e,t),e.params=e.params||{},e.params[this.name]=r),new i({context:t,name:this.name,handler:this.handler,params:r})},shouldSupercede:function(e){if(!e)return!0;var t=e.context===this.context;return e.name!==this.name||this.hasOwnProperty("context")&&!t||this.hasOwnProperty("params")&&!s(this.params,e.params)}},i.prototype=c(n.prototype),i.prototype.resolve=function(e,t,r){return r&&r.resolvedModels&&(r.resolvedModels[this.name]=this.context),m(this)},o.prototype=c(n.prototype),o.prototype.getModel=function(e,t){var r=this.params;t&&t.queryParams&&(r={},l(r,this.params),r.queryParams=t.queryParams);var n="function"==typeof this.handler.deserialize?"deserialize":"model";return this.runSharedModelHook(e,t,n,[r])},a.prototype=c(n.prototype),a.prototype.getModel=function(e,t){return this.log(t,this.name+": resolving provided model"),m(this.context)},r.HandlerInfo=n,r.ResolvedHandlerInfo=i,r.UnresolvedHandlerInfoByParam=o,r.UnresolvedHandlerInfoByObject=a}),e("router/router",["route-recognizer","rsvp","./utils","./transition-state","./transition","./transition-intent/named-transition-intent","./transition-intent/url-transition-intent","exports"],function(e,t,r,n,i,o,a,s){"use strict";function u(){this.recognizer=new v,this.reset()}function l(e,t,r){var n=h(e.state,t);C(n.exited,function(e){var t=e.handler;delete t.context,t.exit&&t.exit()});var i=e.oldState=e.state;e.state=t;var o=e.currentHandlerInfos=n.unchanged.slice();try{C(n.updatedContext,function(e){return c(o,e,!1,r)}),C(n.entered,function(e){return c(o,e,!0,r)})}catch(a){throw e.state=i,e.currentHandlerInfos=i.handlerInfos,a}e.state.queryParams=b(e,o,t.queryParams)}function c(e,t,r,n){var i=t.handler,o=t.context;if(r&&i.enter&&i.enter(n),n&&n.isAborted)throw new N;if(i.context=o,i.contextDidChange&&i.contextDidChange(),i.setup&&i.setup(o,n),n&&n.isAborted)throw new N;return e.push(t),!0}function h(e,t){var r,n,i,o,a,s=e.handlerInfos,u=t.handlerInfos,l={updatedContext:[],exited:[],entered:[],unchanged:[]};for(o=0,a=u.length;a>o;o++){var c=s[o],h=u[o];c&&c.handler===h.handler||(r=!0),r?(l.entered.push(h),c&&l.exited.unshift(c)):n||c.context!==h.context||i?(n=!0,l.updatedContext.push(h)):l.unchanged.push(c)}for(o=u.length,a=s.length;a>o;o++)l.exited.unshift(s[o]);return l}function m(e,t,r){var n=e.urlMethod;if(n){for(var i=e.router,o=t.handlerInfos,a=o[o.length-1].name,s={},u=o.length-1;u>=0;--u){var l=o[u];O(s,l.params),l.handler.inaccessibleByURL&&(n=null)}if(n){s.queryParams=t.queryParams;var c=i.recognizer.generate(a,s);"replaceQuery"===n?c!==r&&i.replaceURL(c):"replace"===n?i.replaceURL(c):i.updateURL(c)}}}function f(e,t){try{w(e.router,e.sequence,"Resolved all models on destination route; finalizing transition.");{var r=e.router,n=t.handlerInfos;e.sequence}return l(r,t,e),e.isAborted?(r.state.handlerInfos=r.currentHandlerInfos,E(V(e))):(m(e,t,e.intent.url),e.isActive=!1,r.activeTransition=null,y(r,r.currentHandlerInfos,!0,["didTransition"]),r.didTransition&&r.didTransition(r.currentHandlerInfos),w(r,e.sequence,"TRANSITION COMPLETE."),n[n.length-1].handler)}catch(i){if(!(i instanceof N)){var o=e.state.handlerInfos;e.trigger(!0,"error",i,e,o[o.length-1]),e.abort()}throw i}}function p(e,t,r){var n=t[0]||"/",i=t[t.length-1],o={};i&&i.hasOwnProperty("queryParams")&&(o=D.call(t).queryParams);var a;if(0===t.length){w(e,"Updating query params");var s=e.state.handlerInfos;a=new I({name:s[s.length-1].name,contexts:[],queryParams:o})}else"/"===n.charAt(0)?(w(e,"Attempting URL transition to "+n),a=new R({url:n})):(w(e,"Attempting transition to "+n),a=new I({name:t[0],contexts:_.call(t,1),queryParams:o}));return e.transitionByIntent(a,r)}function d(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;n>r;++r)if(e[r]!==t[r])return!1;return!0}function b(e,t,r){var n=[];y(e,t,!0,["finalizeQueryParamChange",r,n]);for(var i={},o=0,a=n.length;a>o;++o){var s=n[o];i[s.key]=s.value}return i}var v=e["default"],E=(t.resolve,t.reject),g=(t.async,t.Promise),y=r.trigger,w=r.log,_=r.slice,C=r.forEach,O=r.merge,A=r.serialize,P=r.extractQueryParams,x=r.getChangelist,T=n.TransitionState,V=i.logAbort,S=i.Transition,N=i.TransitionAborted,I=o.NamedTransitionIntent,R=a.URLTransitionIntent,D=Array.prototype.pop;u.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)},transitionByIntent:function(e,t){var r,n=!!this.activeTransition,i=n?this.activeTransition.state:this.state,o=this;try{var a=e.applyToState(i,this.recognizer,this.getHandler,t);if(d(a.handlerInfos,i.handlerInfos)){var s=x(i.queryParams,a.queryParams);return s?(this._changedQueryParams=s.changed,y(this,a.handlerInfos,!0,["queryParamsDidChange",s.changed,s.all,s.removed]),this._changedQueryParams=null,!n&&this.activeTransition?this.activeTransition:(i.queryParams=b(this,a.handlerInfos,a.queryParams),r=new S(this),r.urlMethod="replace",r.promise=r.promise.then(function(e){return m(r,i,!0),o.didTransition&&o.didTransition(o.currentHandlerInfos),e}),r)):new S(this)}return t?(l(this,a),void 0):(r=new S(this,e,a),this.activeTransition&&this.activeTransition.abort(),this.activeTransition=r,r.promise=r.promise.then(function(e){return o.async(function(){return f(r,e.state)})}),n||y(this,this.state.handlerInfos,!0,["willTransition",r]),r)}catch(u){return new S(this,e,null,u)}},reset:function(){this.state&&C(this.state.handlerInfos,function(e){var t=e.handler;t.exit&&t.exit()}),this.state=new T,this.currentHandlerInfos=null},activeTransition:null,handleURL:function(e){var t=_.call(arguments);return"/"!==e.charAt(0)&&(t[0]="/"+e),p(this,t).method("replaceQuery")},updateURL:function(){throw new Error("updateURL is not implemented")},replaceURL:function(e){this.updateURL(e)},transitionTo:function(){return p(this,arguments)},intermediateTransitionTo:function(){p(this,arguments,!0)},refresh:function(e){for(var t=this.activeTransition?this.activeTransition.state:this.state,r=t.handlerInfos,n={},i=0,o=r.length;o>i;++i){var a=r[i];n[a.name]=a.params||{}}w(this,"Starting a refresh transition");var s=new I({name:r[r.length-1].name,pivotHandler:e||r[0].handler,contexts:[],queryParams:this._changedQueryParams||t.queryParams||{}});return this.transitionByIntent(s,!1)},replaceWith:function(){return p(this,arguments).method("replace")},generate:function(e){for(var t=P(_.call(arguments,1)),r=t[0],n=t[1],i=new I({name:e,contexts:r}),o=i.applyToState(this.state,this.recognizer,this.getHandler),a={},s=0,u=o.handlerInfos.length;u>s;++s){var l=o.handlerInfos[s],c=l.params||A(l.handler,l.context,l.names);O(a,c)}return a.queryParams=n,this.recognizer.generate(e,a)},isActive:function(e){var t,r,n=P(_.call(arguments,1)),i=n[0],o=n[1],a=this.state.queryParams,s=this.state.handlerInfos;if(!s.length)return!1;var u=s[s.length-1].name,l=this.recognizer.handlersFor(u),c=0;for(r=l.length;r>c&&(t=s[c],t.name!==e);++c);if(c===l.length)return!1;var h=new T;h.handlerInfos=s.slice(0,c+1),l=l.slice(0,c+1);var m=new I({name:u,contexts:i}),f=m.applyToHandlers(h,l,this.getHandler,u,!0,!0);return d(f.handlerInfos,h.handlerInfos)&&!x(a,o)},trigger:function(){var e=_.call(arguments);y(this,this.currentHandlerInfos,!1,e)},async:function(e){return new g(function(t){t(e())})},log:null},s.Router=u}),e("router/transition-intent",["./utils","exports"],function(e,t){"use strict";function r(e){e&&n(this,e),this.data=this.data||{}}var n=e.merge;r.prototype.applyToState=function(e){return e},t.TransitionIntent=r}),e("router/transition-intent/named-transition-intent",["../transition-intent","../transition-state","../handler-info","../utils","exports"],function(e,t,r,n,i){"use strict";function o(e){a.call(this,e)}var a=e.TransitionIntent,s=t.TransitionState,u=r.UnresolvedHandlerInfoByParam,l=r.UnresolvedHandlerInfoByObject,c=n.isParam,h=n.forEach,m=n.extractQueryParams,f=n.oCreate,p=n.merge;o.prototype=f(a.prototype),o.prototype.applyToState=function(e,t,r,n){var i=m([this.name].concat(this.contexts)),o=i[0],a=(i[1],t.handlersFor(o[0])),s=a[a.length-1].handler;return this.applyToHandlers(e,a,r,s,n)},o.prototype.applyToHandlers=function(e,t,r,n,i,o){var a,u=new s,l=this.contexts.slice(0),c=t.length,h=[];if(this.pivotHandler)for(a=0;a<t.length;++a)if(r(t[a].handler)===this.pivotHandler){c=a;break}!this.pivotHandler;for(a=t.length-1;a>=0;--a){var m=t[a],f=m.handler,d=r(f),b=e.handlerInfos[a],v=null;if(m.names.length>0?v=a>=c?this.createParamHandlerInfo(f,d,m.names,l,b):this.getHandlerInfoForDynamicSegment(f,d,m.names,l,b,n):(v=this.createParamHandlerInfo(f,d,m.names,l,b),h.unshift(a)),o){v=v.becomeResolved(null,v.context);var E=b&&b.context;m.names.length>0&&v.context===E&&(v.params=b&&b.params),v.context=E}var g=b;(a>=c||v.shouldSupercede(b))&&(c=Math.min(a,c),g=v),i&&!o&&(g=g.becomeResolved(null,g.context)),u.handlerInfos.unshift(g)}if(l.length>0)throw new Error("More context objects were passed than there are dynamic segments for the route: "+n);return i||this.invalidateNonDynamicHandlers(u.handlerInfos,h,c),p(u.queryParams,e.queryParams),p(u.queryParams,this.queryParams||{}),u},o.prototype.invalidateNonDynamicHandlers=function(e,t,r){h(t,function(t){if(t>=r){var n=e[t];e[t]=new u({name:n.name,handler:n.handler,params:{}})}})},o.prototype.getHandlerInfoForDynamicSegment=function(e,t,r,n,i){{var o;r.length}return n.length>0?(o=n[n.length-1],c(o)?this.createParamHandlerInfo(e,t,r,n,i):(n.pop(),new l({name:e,handler:t,context:o,names:r}))):i&&i.name===e?i:i},o.prototype.createParamHandlerInfo=function(e,t,r,n,i){for(var o={},a=r.length;a--;){var s=i&&e===i.name&&i.params||{},l=n[n.length-1],h=r[a];if(c(l))o[h]=""+n.pop();else{if(!s.hasOwnProperty(h))throw new Error("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route "+e);o[h]=s[h]}}return new u({name:e,handler:t,params:o})},i.NamedTransitionIntent=o}),e("router/transition-intent/url-transition-intent",["../transition-intent","../transition-state","../handler-info","../utils","exports"],function(e,t,r,n,i){"use strict";function o(e){s.call(this,e)}function a(e){this.message=e||"UnrecognizedURLError",this.name="UnrecognizedURLError"}var s=e.TransitionIntent,u=t.TransitionState,l=r.UnresolvedHandlerInfoByParam,c=n.oCreate,h=n.merge;o.prototype=c(s.prototype),o.prototype.applyToState=function(e,t,r){var n,i,o=new u,s=t.recognize(this.url);if(!s)throw new a(this.url);var c=!1;for(n=0,i=s.length;i>n;++n){var m=s[n],f=m.handler,p=r(f);if(p.inaccessibleByURL)throw new a(this.url);var d=new l({name:f,handler:p,params:m.params}),b=e.handlerInfos[n];c||d.shouldSupercede(b)?(c=!0,o.handlerInfos[n]=d):o.handlerInfos[n]=b}return h(o.queryParams,s.queryParams),o},i.URLTransitionIntent=o}),e("router/transition-state",["./handler-info","./utils","rsvp","exports"],function(e,t,r,n){"use strict";function i(){this.handlerInfos=[],this.queryParams={},this.params={}}var o=(e.ResolvedHandlerInfo,t.forEach),a=r.resolve;i.prototype={handlerInfos:null,queryParams:null,params:null,resolve:function(e,t,r){function n(){return a(t())["catch"](function(e){throw h=!0,e})}function i(e){throw{error:e,handlerWithError:c.handlerInfos[r.resolveIndex].handler,wasAborted:h,state:c}}function s(e){c.handlerInfos[r.resolveIndex++]=e;var t=e.handler;return t&&t.redirect&&t.redirect(e.context,r),n().then(u)}function u(){if(r.resolveIndex===c.handlerInfos.length)return{error:null,state:c};var t=c.handlerInfos[r.resolveIndex];return t.resolve(e,n,r).then(s)}var l=this.params;o(this.handlerInfos,function(e){l[e.name]=e.params||{}}),r=r||{},r.resolveIndex=0;var c=this,h=!1;return a().then(u)["catch"](i)}},n.TransitionState=i}),e("router/transition",["rsvp","./handler-info","./utils","exports"],function(e,t,r,n){"use strict";function i(e,t,r,n){function a(){return c.isAborted?s():void 0}var c=this;if(this.state=r||e.state,this.intent=t,this.router=e,this.data=this.intent&&this.intent.data||{},this.resolvedModels={},this.queryParams={},n)return this.promise=s(n),void 0;if(r){this.params=r.params,this.queryParams=r.queryParams;var h=r.handlerInfos.length;h&&(this.targetName=r.handlerInfos[r.handlerInfos.length-1].name);for(var m=0;h>m;++m){var f=r.handlerInfos[m];if(!(f instanceof l))break;this.pivotHandler=f.handler}this.sequence=i.currentSequence++,this.promise=r.resolve(e.async,a,this)["catch"](function(e){throw e.wasAborted?o(c):(c.trigger("error",e.error,c,e.handlerWithError),c.abort(),e.error)})}else this.promise=u(this.state),this.params={}}function o(e){return m(e.router,e.sequence,"detected abort."),new a}function a(e){this.message=e||"TransitionAborted",this.name="TransitionAborted"}var s=e.reject,u=e.resolve,l=t.ResolvedHandlerInfo,c=r.trigger,h=r.slice,m=r.log;i.currentSequence=0,i.prototype={targetName:null,urlMethod:"update",intent:null,params:null,pivotHandler:null,resolveIndex:0,handlerInfos:null,resolvedModels:null,isActive:!0,state:null,promise:null,data:null,then:function(e,t){return this.promise.then(e,t)},abort:function(){return this.isAborted?this:(m(this.router,this.sequence,this.targetName+": transition was aborted"),this.isAborted=!0,this.isActive=!1,this.router.activeTransition=null,this)},retry:function(){return this.abort(),this.router.transitionByIntent(this.intent,!1)},method:function(e){return this.urlMethod=e,this},trigger:function(e){var t=h.call(arguments);"boolean"==typeof e?t.shift():e=!1,c(this.router,this.state.handlerInfos.slice(0,this.resolveIndex+1),e,t)},followRedirects:function(){var e=this.router;return this.promise["catch"](function(t){if(e.activeTransition)return e.activeTransition.followRedirects();throw t})},toString:function(){return"Transition (sequence "+this.sequence+")"},log:function(e){m(this.router,this.sequence,e)}},i.prototype.send=i.prototype.trigger,n.Transition=i,n.logAbort=o,n.TransitionAborted=a}),e("router/utils",["exports"],function(e){"use strict";function t(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function r(e){var t,r,n=e&&e.length;return n&&n>0&&e[n-1]&&e[n-1].hasOwnProperty("queryParams")?(r=e[n-1].queryParams,t=c.call(e,0,n-1),[t,r]):[e,null]}function n(e,t,r){e.log&&(3===arguments.length?e.log("Transition #"+t+": "+r):(r=t,e.log(r)))}function i(e,t){var r=arguments;return function(n){var i=c.call(r,2);return i.push(n),e.apply(t,i)}}function o(e){return"string"==typeof e||e instanceof String||"number"==typeof e||e instanceof Number}function a(e,t){for(var r=0,n=e.length;n>r&&!1!==t(e[r]);r++);}function s(e,t,r){var n={};if(o(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}}function u(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,a=t.length-1;a>=0;a--){var s=t[a],u=s.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 l(e,r){var n,i={all:{},changed:{},removed:{}};t(i.all,r);var o=!1;for(n in e)e.hasOwnProperty(n)&&(r.hasOwnProperty(n)||(o=!0,i.removed[n]=e[n]));for(n in r)r.hasOwnProperty(n)&&e[n]!==r[n]&&(i.changed[n]=r[n],o=!0);return o&&i}var c=Array.prototype.slice,h=Object.create||function(e){function t(){}return t.prototype=e,new t};e.trigger=u,e.log=n,e.oCreate=h,e.merge=t,e.extractQueryParams=r,e.bind=i,e.isParam=o,e.forEach=a,e.slice=c,e.serialize=s,e.getChangelist=l}),e("router",["./router/router","exports"],function(e,t){"use strict";var r=e.Router;t.Router=r})}(),function(){function e(e){this.parent=e,this.matches=[]}function t(e,t,r){r=r||{},"string"!=typeof r.path&&(r.path="/"+t),e.parent&&"application"!==e.parent&&(t=e.parent+"."+t),e.push(r.path,t,null,r.queryParams)}e.prototype={resource:function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n={}),1===arguments.length&&(n={}),"string"!=typeof n.path&&(n.path="/"+r),i){var o=new e(r);t(o,"loading"),t(o,"error",{path:"/_unused_dummy_error_path_route_"+r+"/:error"}),i.call(o),this.push(n.path,r,o.generate(),n.queryParams)}else this.push(n.path,r,null,n.queryParams)},push:function(e,t,r,n){var i=t.split(".");(""===e||"/"===e||"index"===i[i.length-1])&&(this.explicitIndex=!0),this.matches.push([e,t,r,n])},route:function(e,r){t(this,e,r)},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.generateControllerFactory=function(e,t,r){var n,i,o,a;return a=r&&Ember.isArray(r)?"array":r?"object":"basic",o="controller:"+a,n=e.lookupFactory(o).extend({isGenerated:!0,toString:function(){return"(generated "+t+" controller)"}}),i="controller:"+t,e.register(i,n),n},Ember.generateController=function(t,r,n){Ember.generateControllerFactory(t,r,n);var i="controller:"+r,o=t.lookup(i);return e(o,"namespace.LOG_ACTIVE_GENERATION"),o}}(),function(){function e(e,t){var r=e.controllerName||e.routeName,n=e.controllerFor(r,!0);n&&n.queryParams&&f(n.queryParams,function(e){var n,i=e.split(":");n=i.length>1?i[1]:"application"!==r?r+"["+e+"]":e;var o=r+":"+e;t.queryParams[o]=n,t.translations[i[0]]=o})}function r(e,t,r){for(var n=t.state.handlerInfos,i=!1,o=n.length-1;o>=0;--o){var a=n[o],s=a.handler;if(i){if(r(s,n[o+1].handler)!==!0)return!1}else e===s&&(i=!0)}return!0}function n(e,t,r){var n,o=e.router,a=(t.routeName.split(".").pop(),"application"===e.routeName?"":e.routeName+".");return n=a+r,i(o,n)?n:void 0}function i(e,t){var r=e.container;return e.hasRoute(t)&&(r.has("template:"+t)||r.has("route:"+t))}function o(e,t,r){var n=r.shift();if(!e){if(t)return;throw new Ember.Error("Can't trigger action '"+n+"' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call `.send()` on the `Transition` object passed to the `model/beforeModel/afterModel` hooks.")}for(var i=!1,o=e.length-1;o>=0;o--){var a=e[o],s=a.handler;if(s._actions&&s._actions[n]){if(s._actions[n].apply(s,r)!==!0)return;i=!0}}if(d[n])return d[n].apply(null,r),void 0;if(!i&&!t)throw new Ember.Error("Nothing handled the action '"+n+"'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.")}function a(e){var t=e.container.lookup("controller:application");if(t){var r=e.router.currentHandlerInfos,n=Ember.Router._routePath(r);"currentPath"in t||h(t,"currentPath"),c(t,"currentPath",n),"currentRouteName"in t||h(t,"currentRouteName"),c(t,"currentRouteName",r[r.length-1].name)
17
- }}var s=t("router"),u=s.Router,l=(s.Transition,Ember.get),c=Ember.set,h=(Ember.String.fmt,Ember.defineProperty),m=Array.prototype.slice,f=Ember.EnumerableUtils.forEach,p=Ember._MetamorphView;Ember.Router=Ember.Object.extend(Ember.Evented,{location:"hash",init:function(){this.router=this.constructor.router||this.constructor.map(Ember.K),this._activeViews={},this._setupLocation(),l(this,"namespace.LOG_TRANSITIONS_INTERNAL")&&(this.router.log=Ember.Logger.debug)},url:Ember.computed(function(){return l(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=l(this,"location"),r=this.container,n=this,i=l(this,"initialURL");this._setupRouter(e,t),r.register("view:default",p),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){n.handleURL(e)}),"undefined"==typeof i&&(i=t.getURL()),this.handleURL(i)},didTransition:function(e){a(this),this._cancelLoadingEvent(),this.notifyPropertyChange("url"),Ember.run.once(this,this.trigger,"didTransition"),l(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+Ember.Router._routePath(e)+"'")},handleURL:function(e){return this._doTransition("handleURL",[e])},transitionTo:function(){return this._doTransition("transitionTo",arguments)},intermediateTransitionTo:function(){this.router.intermediateTransitionTo.apply(this.router,arguments),a(this);var e=this.router.currentHandlerInfos;l(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Intermediate-transitioned into '"+Ember.Router._routePath(e)+"'")},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=l(this,"location"),t=l(this,"rootURL");if("string"==typeof e&&this.container){var r=this.container.lookup("location:"+e);if("undefined"!=typeof r)e=c(this,"location",r);else{var n={implementation:e};e=c(this,"location",Ember.Location.create(n))}}"string"==typeof t&&(e.rootURL=t),"function"==typeof e.initState&&e.initState()},_getHandlerFunction:function(){var e={},t=this.container,r=t.lookupFactory("route:basic"),n=this;return function(i){var o="route:"+i,a=t.lookup(o);return e[i]?a:(e[i]=!0,a||(t.register(o,r.extend()),a=t.lookup(o),l(n,"namespace.LOG_ACTIVE_GENERATION")),a.routeName=i,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=m.call(t),t[0]=t[0]||"/";var r,n,i=t[0],o=!1;if(o||"/"===i.charAt(0)||(r=this.router.hasRoute(i)?i:t[0]=i+".index"),n){if(!r){var a=this.router.activeTransition?this.router.activeTransition.state.handlerInfos:this.router.state.handlerInfos;r=a[a.length-1].name,t.unshift(r)}var s=this._queryParamNamesFor(r);Ember.Router._translateQueryParams(n,s.translations,r);for(var u in n)if(u in s.queryParams){var l=n[u];delete n[u],n[s.queryParams[u]]=l}}var c=this.router[e].apply(this.router,t);return c.then(null,function(e){"UnrecognizedURLError"===e.name},"Ember: Check for Router unrecognized URL error"),c},_scheduleLoadingEvent:function(e,t){this._cancelLoadingEvent(),this._loadingStateTimer=Ember.run.scheduleOnce("routerTransitions",this,"_fireLoadingEvent",e,t)},_fireLoadingEvent:function(e,t){this.router.activeTransition&&e.trigger(!0,"loading",e,t)},_cancelLoadingEvent:function(){this._loadingStateTimer&&Ember.run.cancel(this._loadingStateTimer),this._loadingStateTimer=null},_queryParamNamesFor:function(t){t=this.router.hasRoute(t)?t:t+".index";var r=this.router.recognizer.handlersFor(t),n={queryParams:Ember.create(null),translations:Ember.create(null)},i=this.router;return f(r,function(t){var r=i.getHandler(t.handler);e(r,n)}),n},_queryParamNamesForSingle:function(t){var r={queryParams:Ember.create(null),translations:Ember.create(null)},n=this.router.getHandler(t);return e(n,r),r},_queryParamOverrides:function(e,t,r){for(var n in t){var i=n.split(":"),o=this.container.lookup("controller:"+i[0]);e[t[n]]=l(o,i[1]),r&&r(n,t[n],n)}}});var d={willResolveModel:function(e,t){t.router._scheduleLoadingEvent(e,t)},error:function(e,t,o){var a=o.router,s=r(o,t,function(t,r){var i=n(t,r,"error");return i?(a.intermediateTransitionTo(i,e),void 0):!0});return s?i(o.router,"application_error")?(a.intermediateTransitionTo("application_error",e),void 0):(Ember.Logger.error("Error while loading route: "+e.stack),void 0):void 0},loading:function(e,t){var o=t.router,a=r(t,e,function(t,r){var i=n(t,r,"loading");return i?(o.intermediateTransitionTo(i),void 0):e.pivotHandler!==t?!0:void 0});return a&&i(t.router,"application_loading")?(o.intermediateTransitionTo("application_loading"),void 0):void 0}};Ember.Router.reopenClass({router:null,map:function(e){var t=this.router;t||(t=new u,t.callbacks=[],t.triggerEvent=o,this.reopenClass({router:t}));var r=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){for(var r=0;r<t.callbacks.length;r++)t.callbacks[r].call(this);e.call(this)})});return t.callbacks.push(e),t.map(r.generate()),t},_routePath:function(e){function t(e,t){for(var r=0,n=e.length;n>r;++r)if(e[r]!==t[r])return!1;return!0}for(var r=[],n=1,i=e.length;i>n;n++){for(var o=e[n].name,a=o.split("."),s=m.call(r);s.length&&!t(s,a);)s.shift();r.push.apply(r,a.slice(s.length))}return r.join(".")},_translateQueryParams:function(e,t){for(var r in e)e.hasOwnProperty(r)&&r in t&&(e[t[r]]=e[r],delete e[r])}})}(),function(){function e(e){var t=e.router.router.state.handlerInfos;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=s(e.router,"namespace.LOG_VIEW_LOOKUPS");var o,a=i.controller;if(a=i.controller?i.controller:(o=e.container.lookup("controller:"+r))?o:e.controllerName||e.routeName,"string"==typeof a){var u=a;if(a=e.container.lookup("controller:"+u),!a)throw new Ember.Error("You passed `controller: '"+u+"'` into the `render` method, but no such controller could be found.")}return i.controller=a,i}function n(e,t,r){if(e)r.LOG_VIEW_LOOKUPS;else{var n=r.into?"view:default":"view:toplevel";e=t.lookup(n),r.LOG_VIEW_LOOKUPS}return s(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=a(n,r.outlet);e.teardownOutletViews||(e.teardownOutletViews=[]),h(e.teardownOutletViews,0,0,[i]),n.connectOutlet(r.outlet,t)}else{var u=s(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 a(e,t){return function(){e.disconnectOutlet(t)}}var s=Ember.get,u=Ember.set,l=Ember.getProperties,c=(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()},viewName:null,templateName:null,controllerName:null,_actions:{finalizeQueryParamChange:function(){}},events:null,mergedProperties:["events"],deactivate:Ember.K,activate:Ember.K,transitionTo:function(){var e=this.router;return e.transitionTo.apply(e,arguments)},intermediateTransitionTo:function(){var e=this.router;e.intermediateTransitionTo.apply(e,arguments)},refresh:function(){return this.router.router.refresh(this).method("replace")},replaceWith:function(){var e=this.router;return e.replaceWith.apply(e,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)},beforeModel:Ember.K,afterModel:Ember.K,redirect:Ember.K,contextDidChange:function(){this.currentModel=this.context},model:function(e){var t,r,n,i;for(var o in e)"queryParams"!==o&&((t=o.match(/^(.*)_id$/))&&(r=t[1],i=e[o]),n=!0);if(!r&&n)return e;if(r)return this.findModel(r,i)},deserialize:function(e,t){return this.model(e,t)},findModel:function(){var e=s(this,"store");return e.find.apply(e,arguments)},store:Ember.computed(function(){{var e=this.container;this.routeName,s(this,"router.namespace")}return{find:function(t,r){var n=e.lookupFactory("model:"+t);if(n)return n.find(r)}}}),serialize:function(e,t){if(!(t.length<1)&&e){var r=t[0],n={};return/_id$/.test(r)&&1===t.length?n[r]=s(e,"id"):n=l(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||{};var o;e?(e=e.replace(/\//g,"."),o=e):(e=this.routeName,o=this.templateName||e);var a=t.view||this.viewName||e,u=this.container,l=u.lookup("view:"+a),c=l?l.get("template"):null;return c||(c=u.lookup("template:"+o)),l||c?(t=r(this,e,c,t),l=n(l,u,t),"main"===t.outlet&&(this.lastRenderedTemplate=e),i(this,l,t),void 0):(s(this.router,"namespace.LOG_VIEW_LOOKUPS"),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&&r.disconnectOutlet(e.outlet)},willDestroy:function(){this.teardownViews()},teardownViews:function(){this.teardownTopLevelView&&this.teardownTopLevelView();var e=this.teardownOutletViews||[];c(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 a(e,t){return"controller"===t?t:Ember.ControllerMixin.detect(e)?a(i(e,"model"),t?t+".model":"model"):t}var s=r(e,t,o),u=o.types;return n.call(s,function(e,r){return"ID"===u[r]?a(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,t=(Ember.set,Ember.String.fmt,Array.prototype.slice);Ember.onLoad("Ember.Handlebars",function(){function r(e,t){var r;return e.hasRoute(t)||(r=t+".index",t=r),t}function n(e){var t=e.options.types,r=e.options.data;return s(e.context,e.params,{types:t,data:r})}var i=Ember.Object.extend({values:null}),o=Ember.Router.resolveParams,a=Ember.Router._translateQueryParams,s=Ember.Router.resolvePaths,u=Ember.ViewUtils.isSimpleClick,l=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)},_paramsChanged:function(){this.notifyPropertyChange("resolvedParams")},_setupPathObservers:function(){var e,t,r,i=this.parameters,o=i.options.linkTextPath,a=n(i),s=a.length;for(o&&(r=Ember.Handlebars.normalizePath(i.context,o,i.options.data),this.registerObserver(r.root,r.path,this,this.rerender)),t=0;s>t;t++)e=a[t],null!==e&&(r=Ember.Handlebars.normalizePath(i.context,e,i.options.data),this.registerObserver(r.root,r.path,this,this._paramsChanged));var u=this.queryParamsObject;if(u){var l=u.values;for(var c in l)l.hasOwnProperty(c)&&"ID"===u.types[c]&&(r=Ember.Handlebars.normalizePath(i.context,l[c],i.options.data),this.registerObserver(r.root,r.path,this,this._paramsChanged))}},afterRender:function(){this._super.apply(this,arguments),this._setupPathObservers()},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],a=o+".index",s=t.isActive.apply(t,[o].concat(n))||t.isActive.apply(t,[a].concat(n));return s?e(this,"activeClass"):void 0}).property("resolvedParams","routeArgs"),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(!u(t))return!0;if(this.preventDefault!==!1&&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 t=this.parameters,r=t.options,n=r.types,i=r.data;if(0===t.params.length){var a=this.container.lookup("controller:application");return[e(a,"currentRouteName")]}return o(t.context,t.params,{types:n,data:i})}).property("router.url"),routeArgs:Ember.computed(function(){var t=e(this,"resolvedParams").slice(0),n=e(this,"router"),i=t[0];if(i){i=r(n,i),t[0]=i;for(var o=1,a=t.length;a>o;++o){var s=t[o];if(null===s||"undefined"==typeof s)return}return t}}).property("resolvedParams","queryParams"),queryParamsObject:null,queryParams:Ember.computed(function(){var t=e(this,"queryParamsObject"),r={};t&&Ember.merge(r,t.values);var n=e(this,"resolvedParams"),i=e(this,"router"),o=n[0],s=i._queryParamNamesFor(o),u=s.queryParams,l=s.translations,c={};a(r,l,o);var h=this.parameters;return i._queryParamOverrides(c,u,function(e,n){if(e in r){var i,o=e.split(":"),a=t.types[o[1]];if("ID"===a){var s=Ember.Handlebars.normalizePath(h.context,r[e],h.options.data);i=Ember.Handlebars.get(s.root,s.path,h.options)}else i=r[e];delete r[e],c[n]=i}}),c}).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:"#"});l.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("link-to",function(){var e=t.call(arguments,-1)[0],r=t.call(arguments,0,-1),n=e.hash;if(r[r.length-1]instanceof i&&(n.queryParamsObject=r.pop()),n.disabledBinding=n.disabledWhen,!e.fn){var o=r.shift(),a=e.types.shift(),s=this;"ID"===a?(e.linkTextPath=o,e.fn=function(){return Ember.Handlebars.getEscaped(s,o,e)}):e.fn=function(){return o}}return n.parameters={context:this,options:e,params:r},Ember.Handlebars.helpers.view.call(this,l,e)}),Ember.Handlebars.registerHelper("linkTo",function(){return Ember.Handlebars.helpers["link-to"].apply(this,arguments)})})}(),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,o,a,s;for(t&&t.data&&t.data.isRenderData&&(r=t,t="main"),i=r.data.view.container,n=r.data.view;!n.get("template.isTop");)n=n.get("_parentView");return o=r.hash.view,o&&(s="view:"+o),a=o?i.lookupFactory(s):r.hash.viewClass||e.OutletView,r.data.view.set("outletSource",n),r.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,a,r)})})}(),function(){Ember.get,Ember.set;Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,r){var n,i,o,a,s,u=arguments.length;if(n=(r||t).data.keywords.controller.container,i=n.lookup("router:main"),2===u)r=t,t=void 0;else{if(3!==u)throw Ember.Error("You must pass a templateName to render");s=Ember.Handlebars.get(r.contexts[1],t,r)}e=e.replace(/\//g,"."),a=n.lookup("view:"+e)||n.lookup("view:default");var l=r.hash.controller||e,c="controller:"+l;r.hash.controller;var h=r.data.keywords.controller;if(u>2){var m=n.lookupFactory(c)||Ember.generateControllerFactory(n,l,s);o=m.create({model:s,parentController:h,target:h})}else o=n.lookup(c)||Ember.generateController(n,l),o.setProperties({target:h,parentController:h});var f=r.contexts[1];f&&a.registerObserver(f,t,function(){o.set("model",Ember.Handlebars.get(f,t,r))}),r.hash.viewName=Ember.String.camelize(e);var p="template:"+e;r.hash.template=n.lookup(p),r.hash.controller=o,i&&!s&&i._connectActiveView(e,a),Ember.Handlebars.helpers.view.call(this,a,r)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r){var n=[];r&&n.push(r);var i=e.options.types.slice(1),o=e.options.data;return n.concat(t(e.context,e.params,{types:i,data:o}))}var t=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,n=Ember.Handlebars,i=n.get,o=n.SafeString,a=Ember.ArrayPolyfills.forEach,s=(Ember.get,Array.prototype.slice),u=n.ActionHelper={registeredActions:{}},l=["alt","shift","meta","ctrl"],c=/^click|mouse|touch/,h=function(e,t){if("undefined"==typeof t){if(c.test(e.type))return r(e);t=""}if(t.indexOf("any")>=0)return!0;var n=!0;return a.call(l,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(!h(o,n))return!0;r.preventDefault!==!1&&o.preventDefault(),r.bubbles===!1&&o.stopPropagation();var a=r.target;a=a.target?i(a.root,a.target,a.options):a.root,r.boundProperty,Ember.run(function(){a.send?a.send.apply(a,e(r.parameters,t)):a[t].apply(a,e(r.parameters))})}},r.view.on("willClearRender",function(){delete u.registeredActions[o]}),o},n.registerHelper("action",function(e){var t,r=arguments[arguments.length-1],n=s.call(arguments,1,-1),i=r.hash,a={eventName:i.on||"click"};a.parameters={context:this,options:r,params:n},a.view=r.data.view;var l,c;i.target?(l=this,c=i.target):(t=r.data.keywords.controller)&&(l=t),a.target={root:l,target:c,options:r},a.bubbles=i.bubbles,a.preventDefault=i.preventDefault,a.boundProperty="ID"===r.types[0];var h=u.registerAction(e,a,i.allowedKeys);return new o('data-ember-action="'+h+'"')})})}(),function(){{var e=Ember.get;Ember.set,Ember.EnumerableUtils.map}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"),a=o&&o.lookup("router:main"),s=e(n,"renderedName");t(i,r,n),a&&s&&a._connectActiveView(s,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(){if(!this.isDestroyed){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:{},getHash:function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substr(t)}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({implementation:"none",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}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.Location.getHash;Ember.HashLocation=Ember.Object.extend({implementation:"hash",init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return r().substr(1)},setURL:function(r){e(this,"location").hash=r,t(this,"lastSetURL",r)},replaceURL:function(r){e(this,"location").replace("#"+r),t(this,"lastSetURL",r)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=n.getURL();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)}})}(),function(){var e=Ember.get,t=Ember.set,r=!1,n=window.history&&"state"in window.history;Ember.HistoryLocation=Ember.Object.extend({implementation:"history",init:function(){t(this,"location",e(this,"location")||window.location),t(this,"baseURL",Ember.$("base").attr("href")||"")},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"),n=r.pathname,i=e(this,"baseURL");t=t.replace(/\/$/,""),i=i.replace(/\/$/,"");var o=n.replace(i,"").replace(t,"");return o},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"),n=e(this,"baseURL");return""!==t?(r=r.replace(/\/$/,""),n=n.replace(/\/$/,"")):n.match(/^\//)&&r.match(/^\//)&&(n=n.replace(/\/$/,"")),n+r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("popstate.ember-location-"+e)}})}(),function(){function e(t,r,n,i){var o,a=t.name,s=t.incoming,u=t.incomingNames,l=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(a)){for(i.push(a),n[a]=!0,o=0;l>o;o++)e(s[u[o]],r,n,i);r(t,i),i.pop()}}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(e){if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t}},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,r){function n(e,t){if(e.name===r)throw new 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,a=this.names,s=a.length;for(r=0;s>r;r++)n=o[a[r]],n.hasOutgoing||e(n,t,i)},t.prototype.addEdges=function(e,t,r,n){var i;if(this.map(e,t),r)if("string"==typeof r)this.addEdge(e,r);else for(i=0;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 be 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],a=i[1],s=a,u=e(this,"namespace"),l=u;if("template"!==o&&-1!==s.indexOf("/")){var c=s.split("/");s=c[c.length-1];var h=r(c.slice(0,-1).join("."));l=Ember.Namespace.byName(h)}return{fullName:n,type:o,fullNameWithoutType:a,name:s,root:l,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)},resolveHelper:function(e){return this.resolveOther(e)||Ember.Handlebars.helpers[e.fullNameWithoutType]},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.defaultRouter(),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(){if(this.Router!==!1){var e=this.__container__;return this.Router&&(e.unregister("router:main"),e.register("router:main",this.Router)),e.lookupFactory("router:main")}},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(){if(!this.isDestroyed){if(this.Router){var e=this.__container__;e.unregister("router:main"),e.register("router:main",this.Router)}return 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,a=this;for(e in n)t=n[e],o.addEdges(t.name,t.initialize,t.before,t.after);o.topsort(function(e){var t=e.value;t(i,a)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=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__.lookup("router:main").reset(),this.__container__.destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({initializers:{},initializer:function(e){void 0!==this.superclass.initializers&&this.superclass.initializers===this.initializers&&this.reopenClass({initializers:Ember.create(this.initializers)}),this.initializers[e.name]=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.optionsForType("helper",{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.register("router:main",Ember.Router),n.injection("router:main","namespace","application:main"),n.register("location:hash",Ember.HashLocation),n.register("location:history",Ember.HistoryLocation),n.register("location:none",Ember.NoneLocation),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,a=[];for(i=0,o=r.length;o>i;i++)n=r[i],-1===n.indexOf(":")&&(n="controller:"+n),t.has(n)||a.push(n);if(a.length)throw new Ember.Error(Ember.inspect(e)+" needs [ "+a.join(", ")+" ] but "+(a.length>1?"they":"it")+" could not be found")}var t=Ember.get,r=(Ember.set,Ember.computed(function(){var e=this;
18
- 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 a=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(a)},setUnknownProperty:function(t){throw new Error("You cannot overwrite the value of `controllers."+t+"` of "+Ember.inspect(e))}}}));Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){var r=t(this,"needs"),n=t(r,"length");n>0&&(this.container&&e(this,this.container,r),t(this,"controllers")),this._super.apply(this,arguments)},controllerFor:function(e){return Ember.controllerFor(t(this,"container"),e)},controllers:r})}(),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 a=function(){o.forEach(function(e){e()}),i.releaseMethods.removeObject(a)};return this.releaseMethods.pushObject(a),a},watchRecords:function(e,t,r,n){var i,o=this,a=Ember.A(),s=this.getRecords(e),u=function(e){r([e])},l=s.map(function(e){return a.push(o.observeRecord(e,u)),o.wrapRecord(e)}),c=function(e,r,i,s){for(var l=r;r+s>l;l++){var c=e.objectAt(l),h=o.wrapRecord(c);a.push(o.observeRecord(c,u)),t([h])}i&&n(r,i)},h={didChange:c,willChange:Ember.K};return s.addArrayObserver(o,h),i=function(){a.forEach(function(e){e()}),s.removeArrayObserver(o,h),o.releaseMethods.removeObject(i)},t(l),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 a=function(){n.removeArrayObserver(r,o)};return a},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.");
10
+ !function(){var e,t,r,n;!function(){var i={},o={};e=function(e,t,r){i[e]={deps:t,callback:r}},n=r=t=function(e){function r(t){if("."!==t.charAt(0))return t;for(var r=t.split("/"),n=e.split("/").slice(0,-1),i=0,o=r.length;o>i;i++){var a=r[i];if(".."===a)n.pop();else{if("."===a)continue;n.push(a)}}return n.join("/")}if(n._eak_seen=i,o[e])return o[e];if(o[e]={},!i[e])throw new Error("Could not find module "+e);for(var a,s=i[e],u=s.deps,l=s.callback,c=[],h=0,m=u.length;m>h;h++)"exports"===u[h]?c.push(a={}):c.push(t(r(u[h])));var p=l.apply(this,c);return o[e]=a||p}}(),function(){"undefined"==typeof Ember&&(Ember={});{var e=(Ember.imports=Ember.imports||this,Ember.exports=Ember.exports||this);Ember.lookup=Ember.lookup||this}e.Em=e.Ember=Em=Ember,Ember.isNamespace=!0,Ember.toString=function(){return"Ember"},Ember.VERSION="1.5.0-beta.1",Ember.ENV||(Ember.ENV="undefined"!=typeof EmberENV?EmberENV:"undefined"!=typeof ENV?ENV:{}),Ember.config=Ember.config||{},"undefined"==typeof Ember.ENV.DISABLE_RANGE_API&&(Ember.ENV.DISABLE_RANGE_API=!0),"undefined"==typeof MetamorphENV&&(e.MetamorphENV={}),MetamorphENV.DISABLE_RANGE_API=Ember.ENV.DISABLE_RANGE_API,Ember.FEATURES=Ember.ENV.FEATURES||{},Ember.FEATURES.isEnabled=function(e){var t=Ember.FEATURES[e];return Ember.ENV.ENABLE_ALL_FEATURES?!0:t===!0||t===!1||void 0===t?t:Ember.ENV.ENABLE_OPTIONAL_FEATURES?!0:!1},Ember.EXTEND_PROTOTYPES=Ember.ENV.EXTEND_PROTOTYPES,"undefined"==typeof Ember.EXTEND_PROTOTYPES&&(Ember.EXTEND_PROTOTYPES=!0),Ember.LOG_STACKTRACE_ON_DEPRECATION=Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION!==!1,Ember.SHIM_ES5=Ember.ENV.SHIM_ES5===!1?!1:Ember.EXTEND_PROTOTYPES,Ember.LOG_VERSION=Ember.ENV.LOG_VERSION===!1?!1:!0,Ember.K=function(){return this},"undefined"==typeof Ember.assert&&(Ember.assert=Ember.K),"undefined"==typeof Ember.warn&&(Ember.warn=Ember.K),"undefined"==typeof Ember.debug&&(Ember.debug=Ember.K),"undefined"==typeof Ember.deprecate&&(Ember.deprecate=Ember.K),"undefined"==typeof Ember.deprecateFunc&&(Ember.deprecateFunc=function(e,t){return t}),Ember.uuid=0,Ember.merge=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},Ember.isNone=function(e){return null===e||void 0===e},Ember.none=Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isNone instead.",Ember.isNone),Ember.isEmpty=function(e){return Ember.isNone(e)||0===e.length&&"function"!=typeof e||"object"==typeof e&&0===Ember.get(e,"length")},Ember.empty=Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.",Ember.isEmpty),Ember.isBlank=function(e){return Ember.isEmpty(e)||"string"==typeof e&&null===e.match(/\S/)}}(),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},i=e(Array.prototype.filter)?Array.prototype.filter:function(e,t){var r,n,i=[],o=this.length;for(r=0;o>r;r++)this.hasOwnProperty(r)&&(n=this[r],e.call(t,n,r,this)&&i.push(n));return i};Ember.ArrayPolyfills={map:t,forEach:r,filter:i,indexOf:n},Ember.SHIM_ES5&&(Array.prototype.map||(Array.prototype.map=t),Array.prototype.forEach||(Array.prototype.forEach=r),Array.prototype.filter||(Array.prototype.filter=i),Array.prototype.indexOf||(Array.prototype.indexOf=n))}(),function(){var e=["description","fileName","lineNumber","message","name","number","stack"];Ember.Error=function(){var t=Error.apply(this,arguments);Error.captureStackTrace&&Error.captureStackTrace(this,Ember.Error);for(var r=0;r<e.length;r++)this[e[r]]=t[e[r]]},Ember.Error.prototype=Ember.create(Error.prototype),Ember.onerror=null}(),function(){function e(e){this.descs={},this.watching={},this.cache={},this.source=e}function t(e,t){return!(!e||"function"!=typeof e[t])}Ember.GUID_PREFIX="ember";var r=Ember.platform.defineProperty,n=Ember.create,i="__ember"+ +new Date,o=[],a={},s=0,u=Ember.ENV.MANDATORY_SETTER;Ember.GUID_KEY=i;var l={writable:!1,configurable:!1,enumerable:!1,value:null};Ember.generateGuid=function(e,t){t||(t=Ember.GUID_PREFIX);var n=t+s++;return e&&(null===e[i]?e[i]=n:(l.value=n,r(e,i,l))),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=o[e],t||(t=o[e]="nu"+e),t;case"string":return t=a[e],t||(t=a[e]="st"+s++),t;case"boolean":return e?"(true)":"(false)";default:return e[i]?e[i]:e===Object?"(Object)":e===Array?"(Array)":(t="ember"+s++,null===e[i]?e[i]=t:(l.value=t,r(e,i,l)),t)}};var c=Ember.META_DESC={writable:!0,configurable:!1,enumerable:!1,value:null},h=Ember.GUID_KEY+"_meta";Ember.META_KEY=h;var m=Ember.platform.defineProperty.isSimulated;e.prototype={descs:null,deps:null,watching:null,listeners:null,cache:null,source:null,mixins:null,bindings:null,chains:null,chainWatchers:null,values:null,proto:null},m&&(e.prototype.__preventPlainObject__=!0,e.prototype.toJSON=function(){});var p=new e(null);u&&(p.values={}),Ember.EMPTY_META=p,Ember.meta=function(t,i){var o=t[h];return i===!1?o||p:(o?o.source!==t&&(m||r(t,h,c),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):(m||r(t,h,c),o=new e(t),u&&(o.values={}),t[h]=o,o.descs.constructor=null),o)},Ember.getMeta=function(e,t){var r=Ember.meta(e,!1);return r[t]},Ember.setMeta=function(e,t,r){var n=Ember.meta(e,!0);return n[t]=r,r},Ember.metaPath=function(e,t,r){for(var i,o,a=Ember.meta(e,r),s=0,u=t.length;u>s;s++){if(i=t[s],o=a[i]){if(o.__ember_source__!==e){if(!r)return void 0;o=a[i]=n(o),o.__ember_source__=e}}else{if(!r)return void 0;o=a[i]={__ember_source__:e}}a=o}return o},Ember.wrap=function(e,t){function r(){var r,n=this.__nextSuper;return this.__nextSuper=t,r=e.apply(this,arguments),this.__nextSuper=n,r}return r.wrappedFunction=e,r.__ember_observes__=e.__ember_observes__,r.__ember_observesBefore__=e.__ember_observesBefore__,r.__ember_listens__=e.__ember_listens__,r},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 f=function(){var e=0;try{try{}finally{throw e++,new Error("needsFinallyFixTest")}}catch(t){}return 1!==e}();Ember.tryFinally=f?function(e,t,r){var n,i,o;r=r||this;try{n=e.call(r)}finally{try{i=t.call(r)}catch(a){o=a}}if(o)throw o;return void 0===i?n:i}:function(e,t,r){var n,i;r=r||this;try{n=e.call(r)}finally{i=t.call(r)}return void 0===i?n:i},Ember.tryCatchFinally=f?function(e,t,r,n){var i,o,a;n=n||this;try{i=e.call(n)}catch(s){i=t.call(n,s)}finally{try{o=r.call(n)}catch(u){a=u}}if(a)throw a;return void 0===o?i:o}:function(e,t,r,n){var i,o;n=n||this;try{i=e.call(n)}catch(a){i=t.call(n,a)}finally{o=r.call(n)}return void 0===o?i:o};var d={},b="Boolean Number String Function Array Date RegExp Object".split(" ");Ember.ArrayPolyfills.forEach.call(b,function(e){d["[object "+e+"]"]=e.toLowerCase()});var 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&&(e instanceof Error?t="error":Ember.Object&&e instanceof Ember.Object?t="instance":e instanceof Date&&(t="date")),t},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(", ")+"}"}}(),function(){Ember.Instrumentation={};var e=[],t={},r=function(r){for(var n,i=[],o=0,a=e.length;a>o;o++)n=e[o],n.regex.test(r)&&i.push(n.object);return t[r]=i,i},n=function(){var e="undefined"!=typeof window?window.performance||{}:{},t=e.now||e.mozNow||e.webkitNow||e.msNow||e.oNow;return t?t.bind(e):function(){return+new Date}}();Ember.Instrumentation.instrument=function(e,i,o,a){function s(){for(f=0,d=m.length;d>f;f++)p=m[f],b[f]=p.before(e,n(),i);return o.call(a)}function u(e){i=i||{},i.exception=e}function l(){for(f=0,d=m.length;d>f;f++)p=m[f],p.after(e,n(),i,b[f]);Ember.STRUCTURED_PROFILE&&console.timeEnd(c)}var c,h,m=t[e];if(Ember.STRUCTURED_PROFILE&&(c=e+": "+i.object,console.time(c)),m||(m=r(e)),0===m.length)return h=o.call(a),Ember.STRUCTURED_PROFILE&&console.timeEnd(c),h;var p,f,d,b=[];return Ember.tryCatchFinally(s,u,l)},Ember.Instrumentation.subscribe=function(r,n){for(var i,o=r.split("."),a=[],s=0,u=o.length;u>s;s++)i=o[s],"*"===i?a.push("[^\\.]*"):a.push(i);a=a.join("\\."),a+="(\\..*)?";var l={pattern:r,regex:new RegExp("^"+a+"$"),object:n};return e.push(l),t={},l},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,i;e=Array.prototype.map||Ember.ArrayPolyfills.map,t=Array.prototype.forEach||Ember.ArrayPolyfills.forEach,r=Array.prototype.indexOf||Ember.ArrayPolyfills.indexOf,i=Array.prototype.filter||Ember.ArrayPolyfills.filter,n=Array.prototype.splice;var o=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)},filter:function(e,t,r){return e.filter?e.filter.call(e,t,r):i.call(e,t,r)},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?[]:o.map(t,function(t){return o.indexOf(e,t)})},addObject:function(e,t){var r=o.indexOf(e,t);-1===r&&e.push(t)},removeObject:function(e,t){var r=o.indexOf(e,t);-1!==r&&e.splice(r,1)},_replace:function(e,t,r,i){for(var o,a,s=[].concat(i),u=[],l=6e4,c=t,h=r;s.length;)a=h>l?l:h,0>=a&&(a=0),o=s.splice(0,l),o=[c,a].concat(o),c+=l,h-=a,u=u.concat(n.apply(e,o));return u},replace:function(e,t,r,n){return e.replace?e.replace(t,r,n):o._replace(e,t,r,n)},intersection:function(e,t){var r=[];return o.forEach(e,function(e){o.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 s(e,n);var i,o=e[t],a=o&&o.descs[n];return a?a.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 a=Ember.normalizeTuple=function(t,r){var a,s=i.test(r),u=!s&&n.test(r);if((!t||u)&&(t=Ember.lookup),s&&(r=r.slice(5)),t===Ember.lookup&&(a=r.match(o)[0],t=e(t,a),r=r.slice(a.length+1)),!r||0===r.length)throw new Ember.Error("Path cannot be empty");return[t,r]},s=Ember._getPath=function(t,r){var n,o,s,u,l;if(null===t&&-1===r.indexOf("."))return e(Ember.lookup,r);for(n=i.test(r),(!t||n)&&(s=a(t,r),t=s[0],r=s[1],s.length=0),o=r.split("."),l=o.length,u=0;null!=t&&l>u;u++)if(t=e(t,o[u],!0),t&&t.isDestroyed)return void 0;return t};Ember.getWithDefault=function(t,r,n){var i=e(t,r);return void 0===i?n:i},Ember.get=e}(),function(){function e(e,t,r){for(var n=-1,i=e.length-3;i>=0;i-=3)if(t===e[i]&&r===e[i+1]){n=i;break}return n}function t(e,t){var r,n=p(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[f],o=i&&i.listeners&&i.listeners[r];if(o)for(var a=o.length-3;a>=0;a-=3){var s=o[a],u=o[a+1],l=o[a+2],c=e(n,s,u);-1===c&&n.push(s,u,l)}}function n(t,r,n){var i=t[f],o=i&&i.listeners&&i.listeners[r],a=[];if(o){for(var s=o.length-3;s>=0;s-=3){var u=o[s],l=o[s+1],c=o[s+2],h=e(n,u,l);-1===h&&(n.push(u,l,c),a.push(u,l,c))}return a}}function i(r,n,i,o,a){o||"function"!=typeof i||(o=i,i=null);var s=t(r,n),u=e(s,i,o),l=0;a&&(l|=b),-1===u&&(s.push(i,o,l),"function"==typeof r.didAddListener&&r.didAddListener(n,i,o))}function o(r,n,i,o){function a(i,o){var a=t(r,n),s=e(a,i,o);-1!==s&&(a.splice(s,3),"function"==typeof r.didRemoveListener&&r.didRemoveListener(n,i,o))}if(o||"function"!=typeof i||(o=i,i=null),o)a(i,o);else{var s=r[f],u=s&&s.listeners&&s.listeners[n];if(!u)return;for(var l=u.length-3;l>=0;l-=3)a(u[l],u[l+1])}}function a(r,n,i,o,a){function s(){return a.call(i)}function u(){-1!==c&&(l[c+2]&=~v)}o||"function"!=typeof i||(o=i,i=null);var l=t(r,n),c=e(l,i,o);return-1!==c&&(l[c+2]|=v),Ember.tryFinally(s,u)}function s(r,n,i,o,a){function s(){return a.call(i)}function u(){for(var e=0,t=p.length;t>e;e++){var r=p[e];f[e][r+2]&=~v}}o||"function"!=typeof i||(o=i,i=null);var l,c,h,m,p=[],f=[];for(h=0,m=n.length;m>h;h++){l=n[h],c=t(r,l);var d=e(c,i,o);-1!==d&&(c[d+2]|=v,p.push(d),f.push(c))}return Ember.tryFinally(s,u)}function u(e){var t=e[f].listeners,r=[];if(t)for(var n in t)t[n]&&r.push(n);return r}function l(e,t,r,n){if(e!==Ember&&"function"==typeof e.sendEvent&&e.sendEvent(t,r),!n){var i=e[f];n=i&&i.listeners&&i.listeners[t]}if(n){for(var a=n.length-3;a>=0;a-=3){var s=n[a],u=n[a+1],l=n[a+2];u&&(l&v||(l&b&&o(e,t,s,u),s||(s=e),"string"==typeof u&&(u=s[u]),r?u.apply(s,r):u.call(s)))}return!0}}function c(e,t){var r=e[f],n=r&&r.listeners&&r.listeners[t];return!(!n||!n.length)}function h(e,t){var r=[],n=e[f],i=n&&n.listeners&&n.listeners[t];if(!i)return r;for(var o=0,a=i.length;a>o;o+=3){var s=i[o],u=i[o+1];r.push([s,u])}return r}var m=Ember.create,p=Ember.meta,f=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=a,Ember._suspendListeners=s,Ember.sendEvent=l,Ember.hasListeners=c,Ember.watchedEvents=u,Ember.listenersFor=h,Ember.listenersDiff=n,Ember.listenersUnion=r}(),function(){var e=Ember.guidFor,t=Ember.sendEvent,r=Ember._ObserverSet=function(){this.clear()};r.prototype.add=function(t,r,n){var i,o=this.observerSet,a=this.observers,s=e(t),u=o[s];return u||(o[s]=u={}),i=u[r],void 0===i&&(i=a.push({sender:t,keyName:r,eventName:n,listeners:[]})-1,u[r]=i),a[i].listeners},r.prototype.flush=function(){var e,r,n,i,o=this.observers;for(this.clear(),e=0,r=o.length;r>e;++e)n=o[e],i=n.sender,i.isDestroying||i.isDestroyed||t(i,n.eventName,[i,n.keyName],n.listeners)},r.prototype.clear=function(){this.observerSet={},this.observers=[]}}(),function(){function e(e,t){var n=e[h],i=n&&n.watching[t]>0||"length"===t,a=n&&n.proto,s=n&&n.descs[t];i&&a!==e&&(s&&s.willChange&&s.willChange(e,t),r(e,t,n),o(e,t,n),l(e,t))}function t(e,t){var r=e[h],i=r&&r.watching[t]>0||"length"===t,o=r&&r.proto,s=r&&r.descs[t];o!==e&&(s&&s.didChange&&s.didChange(e,t),(i||"length"===t)&&(n(e,t,r),a(e,t,r,!1),c(e,t)))}function r(t,r,n){if(!t.isDestroying){var o=_,a=!o;a&&(o=_={}),i(e,t,r,o,n),a&&(_=null)}}function n(e,r,n){if(!e.isDestroying){var o=w,a=!o;a&&(o=w={}),i(t,e,r,o,n),a&&(w=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 a=i.deps;if(a=a&&a[r])for(var s in a){var u=i.descs[s];u&&u._suspended===t||e(t,s)}}}function o(t,r,n){if(n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var i,o,a=n.chainWatchers[r],s=[];for(i=0,o=a.length;o>i;i++)a[i].willChange(s);for(i=0,o=s.length;o>i;i+=2)e(s[i],s[i+1])}}function a(e,r,n,i){if(n&&n.hasOwnProperty("chainWatchers")&&n.chainWatchers[r]){var o,a,s=n.chainWatchers[r],u=i?null:[];for(o=0,a=s.length;a>o;o++)s[o].didChange(u);if(!i)for(o=0,a=u.length;a>o;o+=2)t(u[o],u[o+1])}}function s(){y++}function u(){y--,0>=y&&(E.clear(),g.flush())}function l(e,t){if(!e.isDestroying){var r,n,i=t+":before";y?(r=E.add(e,t,i),n=b(e,i,r),f(e,i,[e,t],n)):f(e,i,[e,t])}}function c(e,t){if(!e.isDestroying){var r,n=t+":change";y?(r=g.add(e,t,n),d(e,n,r)):f(e,n,[e,t])}}var h=Ember.META_KEY,m=Ember.guidFor,p=Ember.tryFinally,f=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){a(e,t,r,!0)},Ember.beginPropertyChanges=s,Ember.endPropertyChanges=u,Ember.changeProperties=function(e,t){s(),p(e,u,t)}}(),function(){function e(e,t,r,o){var a;if(a=t.slice(t.lastIndexOf(".")+1),t=t===a?a:t.slice(0,t.length-(a.length+1)),"this"!==t&&(e=n(e,t)),!a||0===a.length)throw new Ember.Error("Property set failed: You passed an empty path");if(!e){if(o)return;throw new Ember.Error('Property set failed: object in path "'+t+'" could not be found or was destroyed.')}return i(e,a,r)}var t=Ember.META_KEY,r=Ember.ENV.MANDATORY_SETTER,n=Ember._getPath,i=function(n,i,o,a){if("string"==typeof n&&(o=i,i=n,n=null),!n||-1!==i.indexOf("."))return e(n,i,o,a);var s,u,l=n[t],c=l&&l.descs[i];return c?c.set(n,i,o):(s="object"==typeof n&&!(i in n),s&&"function"==typeof n.setUnknownProperty?n.setUnknownProperty(i,o):l&&l.watching[i]>0?(u=r?l.values[i]:n[i],o!==u&&(Ember.propertyWillChange(n,i),r?(void 0!==u||i in n)&&n.propertyIsEnumerable(i)?l.values[i]=o:Ember.defineProperty(n,i,null,o):n[i]=o,Ember.propertyDidChange(n,i))):n[i]=o),o};Ember.config.overrideAccessors&&(Ember.set=i,Ember.config.overrideAccessors(),i=Ember.set),Ember.set=i,Ember.trySet=function(e,t,r){return i(e,t,r,!0)}}(),function(){var e=Ember.set,t=Ember.guidFor,r=Ember.ArrayPolyfills.indexOf,n=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},i=function(e,t){var r=e.keys.copy(),i=n(e.values);return t.keys=r,t.values=i,t.length=e.length,t},o=Ember.OrderedSet=function(){this.clear()};o.create=function(){return new o},o.prototype={clear:function(){this.presenceSet={},this.list=[]},add:function(e){var r=t(e),n=this.presenceSet,i=this.list;r in n||(n[r]=!0,i.push(e))},remove:function(e){var n=t(e),i=this.presenceSet,o=this.list;delete i[n];var a=r.call(o,e);a>-1&&o.splice(a,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 a=Ember.Map=function(){this.keys=Ember.OrderedSet.create(),this.values={}};a.create=function(){return new a},a.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,a=t(r);i.add(r),o[a]=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 a)}};var s=Ember.MapWithDefault=function(e){a.call(this),this.defaultValue=e.defaultValue};s.create=function(e){return e?new s(e):new a},s.prototype=Ember.create(a.prototype),s.prototype.get=function(e){var t=this.has(e);if(t)return a.prototype.get.call(this,e);var r=this.defaultValue(e);return this.set(e,r),r},s.prototype.copy=function(){return i(this,new s({defaultValue:this.defaultValue}))}}(),function(){function e(e){var t,r;Ember.imports.console?t=Ember.imports.console:"undefined"!=typeof console&&(t=console);var n="object"==typeof t?t[e]:null;return n?"function"==typeof n.apply?(r=function(){n.apply(t,arguments)},r.displayName="console."+e,r):function(){var e=Array.prototype.join.call(arguments,", ");n(e)}:void 0}function t(e,t){if(!e)try{throw new Ember.Error("assertion failed: "+t)}catch(r){setTimeout(function(){throw r},0)}}Ember.Logger={log:e("log")||Ember.K,warn:e("warn")||Ember.K,error:e("error")||Ember.K,info:e("info")||Ember.K,debug:e("debug")||e("info")||Ember.K,assert:e("assert")||t}}(),function(){var e=Ember.META_KEY,t=Ember.meta,r=Ember.platform.defineProperty,n=Ember.ENV.MANDATORY_SETTER;Ember.Descriptor=function(){};var i=Ember.MANDATORY_SETTER_FUNCTION=function(){},o=Ember.DEFAULT_GETTER_FUNCTION=function(t){return function(){var r=this[e];return r&&r.values[t]}};if(Ember.defineProperty=function(e,s,u,l,c){var h,m,p,f;return c||(c=t(e)),h=c.descs,m=c.descs[s],p=c.watching[s]>0,m instanceof Ember.Descriptor&&m.teardown(e,s),u instanceof Ember.Descriptor?(f=u,h[s]=u,n&&p?r(e,s,{configurable:!0,enumerable:!0,writable:!0,value:void 0}):e[s]=void 0,Ember.FEATURES.isEnabled("composable-computed-properties")&&u.func&&u._dependentCPs&&a(e,u._dependentCPs,c)):(h[s]=void 0,null==u?(f=l,n&&p?(c.values[s]=l,r(e,s,{configurable:!0,enumerable:!0,set:i,get:o(s)})):e[s]=l):(f=u,r(e,s,u))),p&&Ember.overrideChains(e,s,c),e.didDefineProperty&&e.didDefineProperty(e,s,f),this},Ember.FEATURES.isEnabled("composable-computed-properties"))var a=function(e,t,r){for(var n,i,o=t.length,s=0;o>s;++s)n=t[s],i=n.implicitCPKey,Ember.defineProperty(e,i,n,void 0,r),n._dependentCPs&&a(e,n._dependentCPs,r)}}(),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,a){if("length"!==o||"array"!==t(i)){var s=a||e(i),u=s.watching;u[o]?u[o]=(u[o]||0)+1:(u[o]=1,"function"==typeof i.willWatchProperty&&i.willWatchProperty(o),r&&o in i&&(s.values[o]=i[o],n(i,o,{configurable:!0,enumerable:i.propertyIsEnumerable(o),set:Ember.MANDATORY_SETTER_FUNCTION,get:Ember.DEFAULT_GETTER_FUNCTION(o)})))}},Ember.unwatchKey=function(t,i,o){var a=o||e(t),s=a.watching;1===s[i]?(s[i]=0,"function"==typeof t.didUnwatchProperty&&t.didUnwatchProperty(i),r&&i in t&&n(t,i,{configurable:!0,enumerable:t.propertyIsEnumerable(i),set:function(e){n(t,i,{configurable:!0,writable:!0,enumerable:!0,value:e}),delete a.values[i]},get:Ember.DEFAULT_GETTER_FUNCTION(i)})):s[i]>1&&s[i]--}}(),function(){function e(e){return e.match(c)[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,i)}}function r(e,t){if(!e)return void 0;var r=e[h];if(r&&r.proto===e)return void 0;if("@each"===t)return i(e,t);var n=r&&r.descs[t];return n&&n._cacheable?t in r.cache?r.cache[t]:void 0:i(e,t)}var n=Ember.meta,i=Ember.get,o=Ember.normalizeTuple,a=Ember.ArrayPolyfills.forEach,s=Ember.warn,u=Ember.watchKey,l=Ember.unwatchKey,c=/^([^\.\*]+)/,h=Ember.META_KEY,m=[];Ember.flushPendingChains=function(){if(0!==m.length){var e=m;m=[],a.call(e,function(e){e[0].add(e[1])}),s("Watching an undefined global, Ember expects watched globals to be setup by the time the run loop is flushed, check for typos",0===m.length)}};var p=Ember.removeChainWatcher=function(e,t,r){if(e&&"object"==typeof e){var n=e[h];if(!n||n.hasOwnProperty("chainWatchers")){var i=n&&n.chainWatchers;if(i&&i[t]){i=i[t];for(var o=0,a=i.length;a>o;o++)i[o]===r&&i.splice(o,1)}l(e,t,n)}}},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()},d=f.prototype;d.value=function(){if(void 0===this._value&&this._watching){var e=this._parent.value();this._value=r(e,this._key)}return this._value},d.destroy=function(){if(this._watching){var e=this._object;e&&p(e,this._key,this),this._watching=!1}},d.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},d.add=function(t){var r,n,i,a,s;if(s=this._paths,s[t]=(s[t]||0)+1,r=this.value(),n=o(r,t),n[0]&&n[0]===r)t=n[1],i=e(t),t=t.slice(i.length+1);else{if(!n[0])return m.push([this,t]),n.length=0,void 0;a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]}n.length=0,this.chain(i,t,a)},d.remove=function(t){var r,n,i,a,s;s=this._paths,s[t]>0&&s[t]--,r=this.value(),n=o(r,t),n[0]===r?(t=n[1],i=e(t),t=t.slice(i.length+1)):(a=n[0],i=t.slice(0,0-(n[1].length+1)),t=n[1]),n.length=0,this.unchain(i,t)},d.count=0,d.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))},d.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())},d.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)},d.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))},d.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))},d.didChange=function(e){if(this._watching){var r=this._parent.value();r!==this._object&&(p(this._object,this._key,this),this._object=r,t(r,this._key,this)),this._value=void 0,this._parent&&"@each"===this._parent._key&&this.value()}var n=this._chains;if(n)for(var i in n)n.hasOwnProperty(i)&&n[i].didChange(e);null!==e&&this._parent&&this._parent.chainDidChange(this,this._key,1,e)},Ember.finishChains=function(e){var t=e[h],r=t&&t.chains;r&&(r.value()!==e?n(e).chains=r=r.copy(e):r.didChange(null))}}(),function(){var e=Ember.EnumerableUtils.forEach,t=/^((?:[^\.]*\.)*)\{(.*)\}$/;Ember.expandProperties=function(r,n){var i,o,a;(i=t.exec(r))?(o=i[1],a=i[2],e(a.split(","),function(e){n(o+e)})):n(r)}}(),function(){function e(e,r){var i=r||t(e),o=i.chains;return o?o.value()!==e&&(o=i.chains=o.copy(e)):o=i.chains=new n(null,null,e),o}var t=Ember.meta,r=Ember.typeOf,n=Ember._ChainNode;Ember.watchPath=function(n,i,o){if("length"!==i||"array"!==r(n)){var a=o||t(n),s=a.watching;s[i]?s[i]=(s[i]||0)+1:(s[i]=1,e(n,a).add(i))}},Ember.unwatchPath=function(r,n,i){var o=i||t(r),a=o.watching;1===a[n]?(a[n]=0,e(r,o).remove(n)):a[n]>1&&a[n]--}}(),function(){function e(e){return"*"===e||!c.test(e)}var t=(Ember.meta,Ember.GUID_KEY),r=Ember.META_KEY,n=Ember.removeChainWatcher,i=Ember.watchKey,o=Ember.unwatchKey,a=Ember.watchPath,s=Ember.unwatchPath,u=Ember.typeOf,l=Ember.generateGuid,c=/[\.\*]/;Ember.watch=function(t,r,n){("length"!==r||"array"!==u(t))&&(e(r)?i(t,r,n):a(t,r,n))},Ember.isWatching=function(e,t){var n=e[r];return(n&&n.watching[t])>0},Ember.watch.flushPending=Ember.flushPendingChains,Ember.unwatch=function(t,r,n){("length"!==r||"array"!==u(t))&&(e(r)?o(t,r,n):s(t,r,n))},Ember.rewatch=function(e){var n=e[r],i=n&&n.chains;t in e&&!e.hasOwnProperty(t)&&l(e),i&&i.value()!==e&&(n.chains=i.copy(e))};var h=[];Ember.destroy=function(e){var t,i,o,a,s=e[r];if(s&&(e[r]=null,t=s.chains))for(h.push(t);h.length>0;){if(t=h.pop(),i=t._chains)for(o in i)i.hasOwnProperty(o)&&h.push(i[o]);t._watching&&(a=t._object,a&&n(a,t._key,t))}}}(),function(){function e(e,t){var r=e[t];return r?e.hasOwnProperty(t)||(r=e[t]=h(r)):r=e[t]={},r}function t(t){return e(t,"deps")}function r(r,n,i,o){var a,s,u,l,c,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)l=h[s],c=e(a,l),c[i]=(c[i]||0)+1,p(n,l,o)}function n(r,n,i,o){var a,s,u,l,c,h=r._dependentKeys;if(h)for(a=t(o),s=0,u=h.length;u>s;s++)l=h[s],c=e(a,l),c[i]=(c[i]||0)-1,f(n,l,o)}function i(e,t){this.func=e,Ember.FEATURES.isEnabled("composable-computed-properties")?P(this,t&&t.dependentKeys):this._dependentKeys=t&&t.dependentKeys,this._cacheable=t&&void 0!==t.cacheable?t.cacheable:!0,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 a(e,t){for(var r={},n=0;n<t.length;n++)r[t[n]]=s(e,t[n]);return r}var s=Ember.get,u=Ember.set,l=Ember.meta,c=[].slice,h=Ember.create,m=Ember.META_KEY,p=Ember.watch,f=Ember.unwatch,d=Ember.expandProperties;Ember.ComputedProperty=i,i.prototype=new Ember.Descriptor;var b=i.prototype;b._dependentKeys=void 0,b._suspended=void 0,b._meta=void 0,Ember.FEATURES.isEnabled("composable-computed-properties")&&(b._dependentCPs=void 0,b.implicitCPKey=void 0,b.toString=function(){return this.implicitCPKey?this.implicitCPKey:Ember.Descriptor.prototype.toString.apply(this,arguments)}),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(){var e,t=function(t){e.push(t)};e=[];for(var r=0,n=arguments.length;n>r;r++)d(arguments[r],t);return Ember.FEATURES.isEnabled("composable-computed-properties")?P(this,e):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=l(e);t in r.cache&&(delete r.cache[t],n(this,e,t,r))}},b.get=function(e,t){var n,i,a,s;if(this._cacheable){if(a=l(e),i=a.cache,t in i)return i[t];n=i[t]=this.func.call(e,t),s=a.chainWatchers&&a.chainWatchers[t],s&&o(s),r(this,e,t,a)}else n=this.func.call(e,t);return n},b.set=function(e,t,n){var i,o,a,s=this._cacheable,u=this.func,c=l(e,s),h=c.watching[t],m=this._suspended,p=!1,f=c.cache;if(this._readOnly)throw new Ember.Error("Cannot Set: "+t+" on: "+Ember.inspect(e));this._suspended=e;try{if(s&&f.hasOwnProperty(t)&&(o=f[t],p=!0),i=u.wrappedFunction?u.wrappedFunction.length:u.length,3===i)a=u.call(e,t,n,o);else{if(2!==i)return Ember.defineProperty(e,t,null,o),Ember.set(e,t,n),void 0;a=u.call(e,t,n)}if(p&&o===a)return;h&&Ember.propertyWillChange(e,t),p&&delete f[t],s&&(p||r(this,e,t,c),f[t]=a),h&&Ember.propertyDidChange(e,t)}finally{this._suspended=m}return a},b.teardown=function(e,t){var r=l(e);return t in r.cache&&n(this,e,t,r),this._cacheable&&delete r.cache[t],null},Ember.computed=function(e){var t;if(arguments.length>1&&(t=c.call(arguments,0,-1),e=c.call(arguments,-1)[0]),"function"!=typeof e)throw new Ember.Error("Computed Property declared without a property function");var r=new i(e);return t&&r.property.apply(r,t),r},Ember.cacheFor=function(e,t){var r=e[m],n=r&&r.cache;return n&&t in n?n[t]:void 0};var v,E;if(Ember.FEATURES.isEnabled("composable-computed-properties")){var g=Ember.guidFor,y=Ember.EnumerableUtils.map,_=Ember.EnumerableUtils.filter,w=(Ember.typeOf,function(e){return[g(e)].concat(e._dependentKeys).join("_").replace(/\./g,"_DOT_")
11
+ }),C=function(e){return e instanceof Ember.ComputedProperty?w(e):e},O=function(e){return y(e,function(e){return C(e)})},A=function(e){return _(e,function(e){return e instanceof Ember.ComputedProperty})},P=function(e,t){t?(e._dependentKeys=O(t),e._dependentCPs=A(t)):e._dependentKeys=e._dependentCPs=[],e.implicitCPKey=w(e)};Ember.computed.normalizeDependentKey=C,Ember.computed.normalizeDependentKeys=O,v=function(e,t){Ember.computed[e]=function(e){var r=O(c.call(arguments));return Ember.computed(e,function(){return t.apply(this,r)})}}}Ember.FEATURES.isEnabled("composable-computed-properties")?E=function(e,t){Ember.computed[e]=function(){var e=c.call(arguments),r=O(e),n=Ember.computed(function(){return t.apply(this,[a(this,r)])});return n.property.apply(n,e)}}:(v=function(e,t){Ember.computed[e]=function(e){var r=c.call(arguments);return Ember.computed(e,function(){return t.apply(this,r)})}},E=function(e,t){Ember.computed[e]=function(){var e=c.call(arguments),r=Ember.computed(function(){return t.apply(this,[a(this,e)])});return r.property.apply(r,e)}}),Ember.FEATURES.isEnabled("composable-computed-properties")&&(Ember.computed.literal=function(e){return Ember.computed(function(){return e})}),v("empty",function(e){return Ember.isEmpty(s(this,e))}),v("notEmpty",function(e){return!Ember.isEmpty(s(this,e))}),v("none",function(e){return Ember.isNone(s(this,e))}),v("not",function(e){return!s(this,e)}),v("bool",function(e){return!!s(this,e)}),v("match",function(e,t){var r=s(this,e);return"string"==typeof r?t.test(r):!1}),v("equal",function(e,t){return s(this,e)===t}),v("gt",function(e,t){return s(this,e)>t}),v("gte",function(e,t){return s(this,e)>=t}),v("lt",function(e,t){return s(this,e)<t}),v("lte",function(e,t){return s(this,e)<=t}),E("and",function(e){for(var t in e)if(e.hasOwnProperty(t)&&!e[t])return!1;return!0}),E("or",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!0;return!1}),E("any",function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return e[t];return null}),E("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?(u(this,e,r),r):s(this,e)})},Ember.computed.oneWay=function(e){return Ember.computed(e,function(){return s(this,e)})},Ember.computed.readOnly=function(e){return Ember.computed(e,function(){return s(this,e)}).readOnly()},Ember.computed.defaultTo=function(e){return Ember.computed(function(t,r,n){return 1===arguments.length?null!=n?n:s(this,e):null!=r?r:s(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,a){var s=i.call(r,t);return Ember._suspendListeners(e,s,n,o,a)},Ember._suspendObservers=function(t,r,n,o,a){var s=i.call(r,e);return Ember._suspendListeners(t,s,n,o,a)},Ember.beforeObserversFor=function(e,r){return Ember.listenersFor(e,t(r))},Ember.removeBeforeObserver=function(e,r,n,i){return Ember.unwatch(e,r),Ember.removeListener(e,t(r),n,i),this}}(),function(){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,a,s,u=this._queue;for(a=0,s=u.length;s>a;a+=4)if(i=u[a],o=u[a+1],i===e&&o===t)return u[a+2]=r,u[a+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,a=this.options,s=a&&a.before,u=a&&a.after,l=o.length;for(l&&s&&s(),i=0;l>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);l&&u&&u(),o.length>l?(this._queue=o.slice(l),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,a=e.length;a>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 a=this.queues,s=a[e];if(!s)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist");return i?s.pushUnique(t,r,n,o):s.push(t,r,n,o)},flush:function(){for(var e,t,r,i,o=this.queues,a=this.queueNames,s=0,u=a.length;u>s;){e=a[s],t=o[e],r=t._queueBeingFlushed=t._queue.slice(),t._queue=[];var l,c,h,m,p=t.options,f=p&&p.before,d=p&&p.after,b=0,v=r.length;for(v&&f&&f();v>b;)l=r[b],c=r[b+1],h=r[b+2],m=r[b+3],"string"==typeof c&&(c=l[c]),c&&(h&&h.length>0?c.apply(l,h):c.call(l)),b+=4;t._queueBeingFlushed=null,v&&d&&d(),-1===(i=n(this,s))?s++:s=i}}},t.DeferredActionQueues=r}),e("backburner",["backburner/deferred_action_queues","exports"],function(e,t){"use strict";function r(e){return"number"==typeof e||g.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(),l=E.setTimeout(function(){l=null,e.end()})}function o(e,t,r){(!c||h>t)&&(c&&clearTimeout(c),c=E.setTimeout(function(){c=null,h=null,a(e)},r),h=t)}function a(e){var t,r,n,i,a=+new Date;e.run(function(){for(n=0,i=v.length;i>n&&(t=v[n],!(t>a));n+=2);for(r=v.splice(0,n),n=1,i=r.length;i>n;n+=2)e.schedule(e.options.defaultQueue,null,r[n])}),v.length&&o(e,v[0],v[0]-a)}function s(e,t){for(var r,n=-1,i=0,o=b.length;o>i;i++)if(r=b[i],r[0]===e&&r[1]===t){n=i;break}return n}function u(e,t){for(var r,n=-1,i=0,o=d.length;o>i;i++)if(r=d[i],r[0]===e&&r[1]===t){n=i;break}return n}var l,c,h,m=e.DeferredActionQueues,p=[].slice,f=[].pop,d=[],b=[],v=[],E=this,g=/\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 m(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,p.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:void 0,o=arguments.length>3?p.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:void 0,o=arguments.length>3?p.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,l)}var t,n,i,a,s,u,l=p.call(arguments),c=l.length,h=this;if(0!==c){if(1===c)t=l.shift(),n=0;else if(2===c)a=l[0],s=l[1],"function"==typeof s||"function"==typeof a[s]?(i=l.shift(),t=l.shift(),n=0):r(s)?(t=l.shift(),n=l.shift()):(t=l.shift(),n=0);else{var m=l[l.length-1];r(m)&&(n=l.pop()),a=l[0],u=l[1],"function"==typeof u||"string"==typeof u&&null!==a&&u in a?(i=l.shift(),t=l.shift()):t=l.shift()}var f=+new Date+parseInt(n,10);"string"==typeof t&&(t=i[t]);var d,b;for(d=0,b=v.length;b>d&&!(f<v[d]);d+=2);return v.splice(d,0,f,e),o(h,f,n),e}},throttle:function(e,t){var r,n,i,o,a=this,s=arguments,l=f.call(s);return"number"==typeof l||"string"==typeof l?(r=l,l=!0):r=f.call(s),r=parseInt(r,10),i=u(e,t),i>-1?d[i]:(o=E.setTimeout(function(){l||a.run.apply(a,s);var r=u(e,t);r>-1&&d.splice(r,1)},r),l&&a.run.apply(a,s),n=[e,t,o],d.push(n),n)},debounce:function(e,t){var r,n,i,o,a=this,u=arguments,l=f.call(u);return"number"==typeof l||"string"==typeof l?(r=l,l=!1):r=f.call(u),r=parseInt(r,10),n=s(e,t),n>-1&&(i=b[n],b.splice(n,1),clearTimeout(i[2])),o=E.setTimeout(function(){l||a.run.apply(a,u);var r=s(e,t);r>-1&&b.splice(r,1)},r),l&&-1===n&&a.run.apply(a,u),i=[e,t,o],b.push(i),i},cancelTimers:function(){var e,t;for(e=0,t=d.length;t>e;e++)clearTimeout(d[e][2]);for(d=[],e=0,t=b.length;t>e;e++)clearTimeout(b[e][2]);b=[],c&&(clearTimeout(c),c=null),v=[],l&&(clearTimeout(l),l=null)},hasTimers:function(){return!!v.length||l},cancel:function(e){var t=typeof e;if(e&&"object"===t&&e.queue&&e.method)return e.queue.cancel(e);if("function"!==t)return"[object Array]"===Object.prototype.toString.call(e)?this._cancelItem(u,d,e)||this._cancelItem(s,b,e):void 0;for(var r=0,n=v.length;n>r;r+=2)if(v[r+1]===e)return v.splice(r,2),!0},_cancelItem:function(e,t,r){var n,i;return r.length<3?!1:(i=e(r[0],r[1]),i>-1&&(n=t[i],n[2]===r[2])?(t.splice(i,1),clearTimeout(r[2]),!0):!1)}},n.prototype.schedule=n.prototype.defer,n.prototype.scheduleOnce=n.prototype.deferOnce,n.prototype.later=n.prototype.setTimeout,t.Backburner=n})}(),function(){function e(e){try{return a.run.apply(a,e)}catch(t){Ember.onerror(t)}}function r(){!Ember.run.currentRunLoop}{var n=function(e){Ember.run.currentRunLoop=e},i=function(e,t){Ember.run.currentRunLoop=t},o=t("backburner").Backburner,a=new o(["sync","actions","destroy"],{sync:{before:Ember.beginPropertyChanges,after:Ember.endPropertyChanges},defaultQueue:"actions",onBegin:n,onEnd:i}),s=[].slice;[].concat}Ember.run=function(){return Ember.onerror?e(arguments):a.run.apply(a,arguments)},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.bind=function(){var e=arguments;return function(){return Ember.run.join.apply(Ember.run,e)}},Ember.run.backburner=a;Ember.run;Ember.run.currentRunLoop=null,Ember.run.queues=a.queueNames,Ember.run.begin=function(){a.begin()},Ember.run.end=function(){a.end()},Ember.run.schedule=function(){r(),a.schedule.apply(a,arguments)},Ember.run.hasScheduledTimers=function(){return a.hasTimers()},Ember.run.cancelTimers=function(){a.cancelTimers()},Ember.run.sync=function(){a.currentInstance&&a.currentInstance.queues.sync.flush()},Ember.run.later=function(){return a.later.apply(a,arguments)},Ember.run.once=function(){r();var e=s.call(arguments);return e.unshift("actions"),a.scheduleOnce.apply(a,e)},Ember.run.scheduleOnce=function(){return r(),a.scheduleOnce.apply(a,arguments)},Ember.run.next=function(){var e=s.call(arguments);return e.push(1),a.later.apply(a,e)},Ember.run.cancel=function(e){return a.cancel(e)},Ember.run.debounce=function(){return a.debounce.apply(a,arguments)},Ember.run.throttle=function(){return a.throttle.apply(a,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)},a=function(e,t){this._direction="fwd",this._from=t,this._to=e,this._directionMap=Ember.Map.create()};a.prototype={copy:function(){var e=new a(this._to,this._from);return this._oneWay&&(e._oneWay=!0),e},from:function(e){return this._from=e,this},to:function(e){return this._to=e,this},oneWay:function(){return this._oneWay=!0,this},toString:function(){var e=this._oneWay?"[oneWay]":"";return"Ember.Binding<"+n(this)+">("+this._from+" -> "+this._to+")"+e},connect:function(t){var r=this._from,n=this._to;return Ember.trySet(t,n,e(t,r)),Ember.addObserver(t,r,this,this.fromDidChange),this._oneWay||Ember.addObserver(t,n,this,this.toDidChange),this._readyToSync=!0,this},disconnect:function(e){var t=!this._oneWay;return Ember.removeObserver(e,this._from,this,this.fromDidChange),t&&Ember.removeObserver(e,this._to,this,this.toDidChange),this._readyToSync=!1,this},fromDidChange:function(e){this._scheduleSync(e,"fwd")},toDidChange:function(e){this._scheduleSync(e,"back")},_scheduleSync:function(e,t){var r=this._directionMap,n=r.get(e);n||(Ember.run.schedule("sync",this,this._sync,e),r.set(e,t)),"back"===n&&"fwd"===t&&r.set(e,"fwd")},_sync:function(t){var n=Ember.LOG_BINDINGS;if(!t.isDestroyed&&this._readyToSync){var i=this._directionMap,o=i.get(t),a=this._from,s=this._to;if(i.remove(t),"fwd"===o){var u=e(t,this._from);n&&Ember.Logger.log(" ",this.toString(),"->",u,t),this._oneWay?Ember.trySet(t,s,u):Ember._suspendObserver(t,s,this,this.toDidChange,function(){Ember.trySet(t,s,u)})}else if("back"===o){var l=r(t,this._to);n&&Ember.Logger.log(" ",this.toString(),"<-",l,t),Ember._suspendObserver(t,a,this,this.fromDidChange,function(){Ember.trySet(Ember.isGlobalPath(a)?Ember.lookup:t,a,l)})}}}},t(a,{from:function(){var e=this,t=new e;return t.from.apply(t,arguments)},to:function(){var e=this,t=new e;return t.to.apply(t,arguments)},oneWay:function(e,t){var r=this,n=new r(null,e);return n.oneWay(t)}}),Ember.Binding=a,Ember.bind=function(e,t,r){return new Ember.Binding(t,r).connect(e)},Ember.oneWay=function(e,t,r){return new Ember.Binding(t,r).oneWay().connect(e)}}(),function(){function e(){var e,t=this.__nextSuper;return t&&(this.__nextSuper=null,e=t.apply(this,arguments),this.__nextSuper=t),e}function t(e){var t=N(e,!0),r=t.mixins;return r?t.hasOwnProperty("mixins")||(r=t.mixins=T(r)):r=t.mixins={},r}function r(e,t){return t&&t.length>0&&(e.mixins=O.call(t,function(e){if(e instanceof _)return e;var t=new _;return t.properties=e,t})),e}function n(e){return"function"==typeof e&&e.isMethod!==!1&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}function i(e,t){var r;return t instanceof _?(r=V(t),e[r]?D:(e[r]=t,t.properties)):t}function o(e,t,r,n){var i;return i=r[e]||n[e],t[e]&&(i=i?i.concat(t[e]):t[e]),i}function a(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=T(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 u(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 l(t,r,i,o){var a=o[r]||t[r];if(!a)return i;var u=Ember.merge({},a),l=!1;for(var c in i)if(i.hasOwnProperty(c)){var h=i[c];n(h)?(l=!0,u[c]=s(t,c,h,a,{})):u[c]=h}return l&&(u._super=e),u}function c(e,t,r,i,o,c,h,m){if(r instanceof Ember.Descriptor){if(r===w&&o[t])return D;r.func&&(r=a(i,t,r,c,o)),o[t]=r,c[t]=void 0}else h&&A.call(h,t)>=0||"concatenatedProperties"===t||"mergedProperties"===t?r=u(e,t,r,c):m&&A.call(m,t)>=0?r=l(e,t,r,c):n(r)&&(r=s(e,t,r,c,o)),o[t]=void 0,c[t]=r}function h(e,t,r,n,a,s){function u(e){delete r[e],delete n[e]}for(var l,m,p,f,d,b,v=0,E=e.length;E>v;v++)if(l=e[v],m=i(t,l),m!==D)if(m){b=N(a),a.willMergeMixin&&a.willMergeMixin(m),f=o("concatenatedProperties",m,n,a),d=o("mergedProperties",m,n,a);for(p in m)m.hasOwnProperty(p)&&(s.push(p),c(a,p,m[p],b,r,n,f,d));m.hasOwnProperty("toString")&&(a.toString=m.toString)}else l.mixins&&(h(l.mixins,t,r,n,a,s),l._without&&P.call(l._without,u))}function m(e,t,r,n){if(M.test(t)){var i=n.bindings;i?n.hasOwnProperty("bindings")||(i=n.bindings=T(n.bindings)):i=n.bindings={},i[t]=r}}function p(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 p(e,t||N(e)),e}function d(e,t,r,n,i){var o,a=t.methodName;return n[a]||i[a]?(o=i[a],t=n[a]):r.descs[a]?(t=r.descs[a],o=void 0):(t=void 0,o=e[a]),{desc:t,value:o}}function b(e,t,r,n,i){var o=r[n];if(o)for(var a=0,s=o.length;s>a;a++)Ember[i](e,o[a],null,t)}function v(e,t,r){var n=e[t];"function"==typeof n&&(b(e,t,n,"__ember_observesBefore__","removeBeforeObserver"),b(e,t,n,"__ember_observes__","removeObserver"),b(e,t,n,"__ember_listens__","removeListener")),"function"==typeof r&&(b(e,t,r,"__ember_observesBefore__","addBeforeObserver"),b(e,t,r,"__ember_observes__","addObserver"),b(e,t,r,"__ember_listens__","addListener"))}function E(r,n,i){var o,a,s,u={},l={},c=N(r),p=[];r._super=e,h(n,t(r),u,l,r,p);for(var b=0,E=p.length;E>b;b++)if(o=p[b],"constructor"!==o&&l.hasOwnProperty(o)&&(s=u[o],a=l[o],s!==w)){for(;s&&s instanceof C;){var g=d(r,s,c,u,l);s=g.desc,a=g.value}(void 0!==s||void 0!==a)&&(v(r,o,a),m(r,o,a,c),S(r,o,s,a,c))}return i||f(r,c),r}function g(e,t,r){var n=V(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(g(i[o],t,r))return!0;return!1}function y(e,t,r){if(!r[V(t)])if(r[V(t)]=!0,t.properties){var n=t.properties;for(var i in n)n.hasOwnProperty(i)&&(e[i]=!0)}else t.mixins&&P.call(t.mixins,function(t){y(e,t,r)})}var _,w,C,O=Ember.ArrayPolyfills.map,A=Ember.ArrayPolyfills.indexOf,P=Ember.ArrayPolyfills.forEach,x=[].slice,T=Ember.create,S=Ember.defineProperty,V=Ember.guidFor,N=Ember.meta,I=Ember.META_KEY,R=Ember.expandProperties,D={},M=Ember.IS_BINDING=/^.+Binding$/;Ember.mixin=function(e){var t=x.call(arguments,1);return E(e,t,!1),e},Ember.Mixin=function(){return r(this,arguments)},_=Ember.Mixin,_.prototype={properties:null,mixins:null,ownerConstructor:null},_._apply=E,_.applyPartial=function(e){var t=x.call(arguments,1);return E(e,t,!0)},_.finishPartial=f,Ember.anyUnprocessedMixins=!1,_.create=function(){Ember.anyUnprocessedMixins=!0;var e=this;return r(new e,arguments)};var k=_.prototype;k.reopen=function(){var e,t;this.properties?(e=_.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 _?i.push(e):(t=_.create(),t.properties=e,i.push(t));return this},k.apply=function(e){return E(e,[this],!1)},k.applyPartial=function(e){return E(e,[this],!0)},k.detect=function(e){if(!e)return!1;if(e instanceof _)return g(e,this,{});var t=e[I],r=t&&t.mixins;return r?!!r[V(this)]:!1},k.without=function(){var e=new _(this);return e._without=x.call(arguments),e},k.keys=function(){var e={},t={},r=[];y(e,this,t);for(var n in e)e.hasOwnProperty(n)&&r.push(n);return r},_.mixins=function(e){var t=e[I],r=t&&t.mixins,n=[];if(!r)return n;for(var i in r){var o=r[i];o.properties||n.push(o)}return n},w=new Ember.Descriptor,w.toString=function(){return"(Required Property)"},Ember.required=function(){return w},C=function(e){this.methodName=e},C.prototype=new Ember.Descriptor,Ember.aliasMethod=function(e){return new C(e)},Ember.observer=function(){var e,t=x.call(arguments,-1)[0],r=function(t){e.push(t)},n=x.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],n=x.call(arguments,1)),e=[];for(var i=0;i<n.length;++i)R(n[i],r);if("function"!=typeof t)throw new Ember.Error("Ember.observer called without a function");return t.__ember_observes__=e,t},Ember.immediateObserver=function(){for(var e=0,t=arguments.length;t>e;e++){arguments[e]}return Ember.observer.apply(this,arguments)},Ember.beforeObserver=function(){var e,t=x.call(arguments,-1)[0],r=function(t){e.push(t)},n=x.call(arguments,0,-1);"function"!=typeof t&&(t=arguments[0],n=x.call(arguments,1)),e=[];for(var i=0;i<n.length;++i)R(n[i],r);if("function"!=typeof t)throw new Ember.Error("Ember.beforeObserver called without a function");return t.__ember_observesBefore__=e,t}}(),function(){var e=Ember.EnumerableUtils.forEach,t=Ember.EnumerableUtils.indexOf;Ember.libraries=function(){var r=[],n=0,i=function(e){for(var t=0;t<r.length;t++)if(r[t].name===e)return r[t]};return r.register=function(e,t){i(e)||r.push({name:e,version:t})},r.registerCoreLibrary=function(e,t){i(e)||r.splice(n++,0,{name:e,version:t})},r.deRegister=function(e){var n=i(e);n&&r.splice(t(r,n),1)},r.each=function(t){e(r,function(e){t(e.name,e.version)})},r}(),Ember.libraries.registerCoreLibrary("Ember",Ember.VERSION)}(),function(){e("rsvp/all",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e,t){return r.all(e,t)}}),e("rsvp/all_settled",["./promise","./utils","exports"],function(e,t,r){"use strict";function n(e){return{state:"fulfilled",value:e}}function i(e){return{state:"rejected",reason:e}}var o=e["default"],a=t.isArray,s=t.isNonThenable;r["default"]=function(e,t){return new o(function(t){function r(e){return function(t){l(e,n(t))}}function u(e){return function(t){l(e,i(t))}}function l(e,r){m[e]=r,0===--h&&t(m)}if(!a(e))throw new TypeError("You must pass an array to allSettled.");var c,h=e.length;if(0===h)return t([]),void 0;for(var m=new Array(h),p=0;p<e.length;p++)c=e[p],s(c)?l(p,n(c)):o.cast(c).then(r(p),u(p))},t)}}),e("rsvp/config",["./events","exports"],function(e,t){"use strict";function r(e,t){return"onerror"===e?(i.on("error",t),void 0):2!==arguments.length?i[e]:(i[e]=t,void 0)}var n=e["default"],i={instrument:!1};n.mixin(i),t.config=i,t.configure=r}),e("rsvp/defer",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e){var t={};return t.promise=new r(function(e,r){t.resolve=e,t.reject=r},e),t}}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1},r=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t};e["default"]={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,n){var i,o=r(this);i=o[e],i||(i=o[e]=[]),-1===t(i,n)&&i.push(n)},off:function(e,n){var i,o,a=r(this);return n?(i=a[e],o=t(i,n),-1!==o&&i.splice(o,1),void 0):(a[e]=[],void 0)},trigger:function(e,t){var n,i,o=r(this);if(n=o[e])for(var a=0;a<n.length;a++)(i=n[a])(t)}}}),e("rsvp/filter",["./all","./map","./utils","exports"],function(e,t,r,n){"use strict";function i(e,t,r){return o(e,r).then(function(n){if(!u(e))throw new TypeError("You must pass an array to filter.");if(!s(t))throw new TypeError("You must pass a function to filter's second argument.");return a(e,t,r).then(function(e){var t,r=n.length,i=[];for(t=0;r>t;t++)e[t]&&i.push(n[t]);return i})})}var o=e["default"],a=t["default"],s=r.isFunction,u=r.isArray;n["default"]=i}),e("rsvp/hash",["./promise","./utils","exports"],function(e,t,r){"use strict";var n=e["default"],i=t.isNonThenable,o=t.keysOf;r["default"]=function(e){return new n(function(t,r){function a(e){return function(r){c[e]=r,0===--m&&t(c)}}function s(e){m=0,r(e)}var u,l,c={},h=o(e),m=h.length;if(0===m)return t(c),void 0;for(var p=0;p<h.length;p++)l=h[p],u=e[l],i(u)?(c[l]=u,0===--m&&t(c)):n.cast(u).then(a(l),s)})}}),e("rsvp/instrument",["./config","./utils","exports"],function(e,t,r){"use strict";var n=e.config,i=t.now;r["default"]=function(e,t,r){try{n.trigger(e,{guid:t._guidKey+t._id,eventName:e,detail:t._detail,childGuid:r&&t._guidKey+r._id,label:t._label,timeStamp:i(),stack:new Error(t._label).stack})}catch(o){setTimeout(function(){throw o},0)}}}),e("rsvp/map",["./promise","./all","./utils","exports"],function(e,t,r,n){"use strict";var i=(e["default"],t["default"]),o=r.isArray,a=r.isFunction;n["default"]=function(e,t,r){return i(e,r).then(function(n){if(!o(e))throw new TypeError("You must pass an array to map.");if(!a(t))throw new TypeError("You must pass a function to map's second argument.");var s,u=n.length,l=[];for(s=0;u>s;s++)l.push(t(n[s]));return i(l,r)})}}),e("rsvp/node",["./promise","exports"],function(e,t){"use strict";function r(e,t){return function(r,n){r?t(r):arguments.length>2?e(i.call(arguments,1)):e(n)}}var n=e["default"],i=Array.prototype.slice;t["default"]=function(e,t){return function(){var o=i.call(arguments),a=this||t;return new n(function(t,i){n.all(o).then(function(n){try{n.push(r(t,i)),e.apply(a,n)}catch(o){i(o)}})})}}}),e("rsvp/promise",["./config","./events","./instrument","./utils","./promise/cast","./promise/all","./promise/race","./promise/resolve","./promise/reject","exports"],function(e,t,r,n,i,o,a,s,u,l){"use strict";function c(){}function h(e,t){if(!A(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof h))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._id=R++,this._label=t,this._subscribers=[],w.instrument&&C("created",this),c!==e&&m(e,this)}function m(e,t){function r(e){v(t,e)}function n(e){g(t,e)}try{e(r,n)}catch(i){n(i)}}function p(e,t,r,n){var i=e._subscribers,o=i.length;i[o]=t,i[o+k]=r,i[o+j]=n}function f(e,t){var r,n,i=e._subscribers,o=e._detail;w.instrument&&C(t===k?"fulfilled":"rejected",e);for(var a=0;a<i.length;a+=3)r=i[a],n=i[a+t],d(t,r,n,o);e._subscribers=null}function d(e,t,r,n){var i,o,a,s,u=A(r);if(u)try{i=r(n),a=!0}catch(l){s=!0,o=l}else i=n,a=!0;b(t,i)||(u&&a?v(t,i):s?g(t,o):e===k?v(t,i):e===j&&g(t,i))}function b(e,t){var r,n=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(O(t)&&(n=t.then,A(n)))return n.call(t,function(n){return r?!0:(r=!0,t!==n?v(e,n):E(e,n),void 0)},function(t){return r?!0:(r=!0,g(e,t),void 0)},"derived from: "+(e._label||" unknown promise")),!0}catch(i){return r?!0:(g(e,i),!0)}return!1}function v(e,t){e===t?E(e,t):b(e,t)||E(e,t)}function E(e,t){e._state===D&&(e._state=M,e._detail=t,w.async(y,e))}function g(e,t){e._state===D&&(e._state=M,e._detail=t,w.async(_,e))}function y(e){f(e,e._state=k)}function _(e){e._onerror&&e._onerror(e._detail),f(e,e._state=j)}var w=e.config,C=(t["default"],r["default"]),O=n.objectOrFunction,A=n.isFunction,P=n.now,x=i["default"],T=o["default"],S=a["default"],V=s["default"],N=u["default"],I="rsvp_"+P()+"-",R=0;l["default"]=h,h.cast=x,h.all=T,h.race=S,h.resolve=V,h.reject=N;var D=void 0,M=0,k=1,j=2;h.prototype={constructor:h,_id:void 0,_guidKey:I,_label:void 0,_state:void 0,_detail:void 0,_subscribers:void 0,_onerror:function(e){w.trigger("error",e)},then:function(e,t,r){var n=this;this._onerror=null;var i=new this.constructor(c,r);if(this._state){var o=arguments;w.async(function(){d(n._state,i,o[n._state-1],n._detail)})}else p(this,i,e,t);return w.instrument&&C("chained",n,i),i},"catch":function(e,t){return this.then(null,e,t)},"finally":function(e,t){var r=this.constructor;return this.then(function(t){return r.cast(e()).then(function(){return t})},function(t){return r.cast(e()).then(function(){throw t})},t)}}}),e("rsvp/promise/all",["../utils","exports"],function(e,t){"use strict";var r=e.isArray,n=e.isNonThenable;t["default"]=function(e,t){var i=this;return new i(function(t,o){function a(e){return function(r){c[e]=r,0===--l&&t(c)}}function s(e){l=0,o(e)}if(!r(e))throw new TypeError("You must pass an array to all.");var u,l=e.length,c=new Array(l);if(0===l)return t(c),void 0;for(var h=0;h<e.length;h++)u=e[h],n(u)?(c[h]=u,0===--l&&t(c)):i.cast(u).then(a(h),s)},t)}}),e("rsvp/promise/cast",["exports"],function(e){"use strict";e["default"]=function(e,t){var r=this;return e&&"object"==typeof e&&e.constructor===r?e:new r(function(t){t(e)},t)}}),e("rsvp/promise/race",["../utils","exports"],function(e,t){"use strict";var r=e.isArray,n=(e.isFunction,e.isNonThenable);t["default"]=function(e,t){var i,o=this;return new o(function(t,a){function s(e){l&&(l=!1,t(e))}function u(e){l&&(l=!1,a(e))}if(!r(e))throw new TypeError("You must pass an array to race.");for(var l=!0,c=0;c<e.length;c++){if(i=e[c],n(i))return l=!1,t(i),void 0;o.cast(i).then(s,u)}},t)}}),e("rsvp/promise/reject",["exports"],function(e){"use strict";e["default"]=function(e,t){var r=this;return new r(function(t,r){r(e)},t)}}),e("rsvp/promise/resolve",["exports"],function(e){"use strict";e["default"]=function(e,t){var r=this;return new r(function(t){t(e)},t)}}),e("rsvp/race",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e,t){return r.race(e,t)}}),e("rsvp/reject",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e,t){return r.reject(e,t)}}),e("rsvp/resolve",["./promise","exports"],function(e,t){"use strict";var r=e["default"];t["default"]=function(e,t){return r.resolve(e,t)}}),e("rsvp/rethrow",["exports"],function(e){"use strict";e["default"]=function(e){throw setTimeout(function(){throw e}),e}}),e("rsvp/utils",["exports"],function(e){"use strict";function t(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function n(e){return!t(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}e.objectOrFunction=t,e.isFunction=r,e.isNonThenable=n,e.isArray=i;var o=Date.now||function(){return(new Date).getTime()};e.now=o;var a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.keysOf=a}),e("rsvp",["./rsvp/promise","./rsvp/events","./rsvp/node","./rsvp/all","./rsvp/all_settled","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/map","./rsvp/resolve","./rsvp/reject","./rsvp/filter","exports"],function(e,t,r,n,i,o,a,s,u,l,c,h,m,p,f){"use strict";function d(e,t){x.async(e,t)}function b(){x.on.apply(x,arguments)}function v(){x.off.apply(x,arguments)}var E=e["default"],g=t["default"],y=r["default"],_=n["default"],w=i["default"],C=o["default"],O=a["default"],A=s["default"],P=u["default"],x=l.config,T=l.configure,S=c["default"],V=h["default"],N=m["default"],I=p["default"];if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var R=window.__PROMISE_INSTRUMENTATION__;T("instrument",!0);for(var D in R)R.hasOwnProperty(D)&&b(D,R[D])}f.Promise=E,f.EventTarget=g,f.all=_,f.allSettled=w,f.race=C,f.hash=O,f.rethrow=A,f.defer=P,f.denodeify=y,f.configure=T,f.on=b,f.off=v,f.resolve=V,f.reject=N,f.async=d,f.map=S,f.filter=I})}(),function(){e("container/container",["container/inheriting_dict","exports"],function(e,t){"use strict";function r(e){this.parent=e,this.children=[],this.resolver=e&&e.resolver||function(){},this.registry=new E(e&&e.registry),this.cache=new E(e&&e.cache),this.factoryCache=new E(e&&e.factoryCache),this.resolveCache=new E(e&&e.resolveCache),this.typeInjections=new E(e&&e.typeInjections),this.injections={},this.factoryTypeInjections=new E(e&&e.factoryTypeInjections),this.factoryInjections={},this._options=new E(e&&e._options),this._typeOptions=new E(e&&e._typeOptions)}function n(e,t){return e.cache.has(t)?!0:!!e.resolve(t)}function i(e,t,r){if(r=r||{},e.cache.has(t)&&r.singleton!==!1)return e.cache.get(t);var n=m(e,t);return void 0!==n?(a(e,t)&&r.singleton!==!1&&e.cache.set(t,n),n):void 0}function o(e){throw new Error(e+" is not currently supported on child containers")}function a(e,t){var r=u(e,t,"singleton");return r!==!1}function s(e,t){var r={};if(!t)return r;for(var n,o,a=0,s=t.length;s>a;a++){if(n=t[a],o=i(e,n.fullName),void 0===o)throw new Error("Attempting to inject an unknown injection: `"+n.fullName+"`");r[n.property]=o}return r}function u(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 l(e,t){var r,n=t,i=e.resolve(n),o=e.factoryCache,a=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"===a)return i;var s=c(e,t),u=h(e,t);return u._toString=e.makeToString(i,t),r=i.extend(s),r.reopenClass(u),o.set(t,r),r}}function c(e,t){var r=t.split(":"),n=r[0],i=[];return i=i.concat(e.typeInjections.get(n)||[]),i=i.concat(e.injections[t]||[]),i=s(e,i),i._debugContainerKey=t,i.container=e,i}function h(e,t){var r=t.split(":"),n=r[0],i=[];return i=i.concat(e.factoryTypeInjections.get(n)||[]),i=i.concat(e.factoryInjections[t]||[]),i=s(e,i),i._debugContainerKey=t,i}function m(e,t){var r=l(e,t);return u(e,t,"instantiate")===!1?r:r?"function"==typeof r.extend?r.create():r.create(c(e,t)):void 0}function p(e,t){e.cache.eachLocal(function(r,n){u(e,r,"instantiate")!==!1&&t(n)
12
+ })}function f(e){e.cache.eachLocal(function(t,r){u(e,t,"instantiate")!==!1&&r.destroy()}),e.cache.dict={}}function d(e,t,r,n){var i=e.get(t);i||(i=[],e.set(t,i)),i.push({property:r,fullName:n})}function b(e){if(!g.test(e))throw new TypeError("Invalid Fullname, expected: `type:name` got: "+e)}function v(e,t,r,n){var i=e[t]=e[t]||[];i.push({property:r,fullName:n})}var E=e["default"];r.prototype={parent:null,children:null,resolver:null,registry:null,cache:null,typeInjections:null,injections:null,_options:null,_typeOptions:null,child:function(){var e=new r(this);return this.children.push(e),e},set:function(e,t,r){e[t]=r},register:function(e,t,r){if(b(e),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){b(e);var t=this.normalize(e);this.registry.remove(t),this.cache.remove(t),this.factoryCache.remove(t),this.resolveCache.remove(t),this._options.remove(t)},resolve:function(e){b(e);var t=this.normalize(e),r=this.resolveCache.get(t);if(r)return r;var n=this.resolver(t)||this.registry.get(t);return this.resolveCache.set(t,n),n},describe:function(e){return e},normalize:function(e){return e},makeToString:function(e){return e.toString()},lookup:function(e,t){return b(e),i(this,this.normalize(e),t)},lookupFactory:function(e){return b(e),l(this,this.normalize(e))},has:function(e){return b(e),n(this,this.normalize(e))},optionsForType:function(e,t){this.parent&&o("optionsForType"),this._typeOptions.set(e,t)},options:function(e,t){this.optionsForType(e,t)},typeInjection:function(e,t,r){b(r),this.parent&&o("typeInjection"),d(this.typeInjections,e,t,r)},injection:function(e,t,r){this.parent&&o("injection"),b(r);var n=this.normalize(r);if(-1===e.indexOf(":"))return this.typeInjection(e,t,n);b(e);var i=this.normalize(e);v(this.injections,i,t,n)},factoryTypeInjection:function(e,t,r){this.parent&&o("factoryTypeInjection"),d(this.factoryTypeInjections,e,t,this.normalize(r))},factoryInjection:function(e,t,r){this.parent&&o("injection");var n=this.normalize(e),i=this.normalize(r);return b(r),-1===e.indexOf(":")?this.factoryTypeInjection(n,t,i):(b(e),v(this.factoryInjections,n,t,i),void 0)},destroy:function(){for(var e=0,t=this.children.length;t>e;e++)this.children[e].destroy();this.children=[],p(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++)f(this.children[e]);f(this)}};var g=/^[^:]+.+:[^:]+$/;t["default"]=r}),e("container/inheriting_dict",["exports"],function(e){"use strict";function t(e){this.parent=e,this.dict={}}t.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])}},e["default"]=t}),e("container",["container/container","exports"],function(e,t){"use strict";Ember.MODEL_FACTORY_INJECTIONS=!1||!!Ember.ENV.MODEL_FACTORY_INJECTIONS;var r=e["default"];t["default"]=r})}(),function(){function e(r,n,i,o){var a,s,u;if("object"!=typeof r||null===r)return r;if(n&&(s=t(i,r))>=0)return o[s];if("array"===Ember.typeOf(r)){if(a=r.slice(),n)for(s=a.length;--s>=0;)a[s]=e(a[s],n,i,o)}else if(Ember.Copyable&&Ember.Copyable.detect(r))a=r.copy(n,i,o);else{a={};for(u in r)r.hasOwnProperty(u)&&"__"!==u.substring(0,2)&&(a[u]=n?e(r[u],n,i,o):r[u])}return n&&(i.push(r),o.push(a)),a}var t=Ember.EnumerableUtils.indexOf;if(Ember.compare=function i(e,t){if(e===t)return 0;var r=Ember.typeOf(e),n=Ember.typeOf(t),o=Ember.Comparable;if(o){if("instance"===r&&o.detect(e.constructor))return e.constructor.compare(e,t);if("instance"===n&&o.detect(t.constructor))return 1-t.constructor.compare(t,e)}var a=Ember.ORDER_DEFINITION_MAPPING;if(!a){var s=Ember.ORDER_DEFINITION;a=Ember.ORDER_DEFINITION_MAPPING={};var u,l;for(u=0,l=s.length;l>u;++u)a[s[u]]=u;delete Ember.ORDER_DEFINITION}var c=a[r],h=a[n];if(h>c)return-1;if(c>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 p=e.length,f=t.length,d=Math.min(p,f),b=0,v=0;0===b&&d>v;)b=i(e[v],t[v]),v++;return 0!==b?b:f>p?-1:p>f?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.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,a=r.length;a>o;o++)t=r[o],n(e,i,t);return i}}}(),function(){var e=/[ _]/g,t={},r=/([a-z\d])([A-Z])/g,n=/(\-|_|\.|\s)+(.)?/g,i=/([a-z\d])([A-Z]+)/g,o=/\-|\s+/g;Ember.STRINGS={},Ember.String={fmt:function(e,t){var r=0;return e.replace(/%@([0-9]+)?/g,function(e,n){return n=n?parseInt(n,10)-1:r++,e=t[n],null===e?"(null)":void 0===e?"":Ember.inspect(e)})},loc:function(e,t){return e=Ember.STRINGS[e]||e,Ember.String.fmt(e,t)},w:function(e){return e.split(/\s+/)},decamelize:function(e){return e.replace(r,"$1_$2").toLowerCase()},dasherize:function(r){var n,i=t,o=i.hasOwnProperty(r);return o?i[r]:(n=Ember.String.decamelize(r).replace(e,"-"),i[r]=n,n)},camelize:function(e){return e.replace(n,function(e,t,r){return r?r.toUpperCase():""}).replace(/^([A-Z])/,function(e){return e.toLowerCase()})},classify:function(e){for(var t=e.split("."),r=[],n=0,i=t.length;i>n;n++){var o=Ember.String.camelize(t[n]);r.push(o.charAt(0).toUpperCase()+o.substr(1))}return r.join(".")},underscore:function(e){return e.replace(i,"$1_$2").replace(o,"_").toLowerCase()},capitalize:function(e){return e.charAt(0).toUpperCase()+e.substr(1)}}}(),function(){var e=Ember.String.fmt,t=Ember.String.w,r=Ember.String.loc,n=Ember.String.camelize,i=Ember.String.decamelize,o=Ember.String.dasherize,a=Ember.String.underscore,s=Ember.String.capitalize,u=Ember.String.classify;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.fmt=function(){return e(this,arguments)},String.prototype.w=function(){return t(this)},String.prototype.loc=function(){return r(this,arguments)},String.prototype.camelize=function(){return n(this)},String.prototype.decamelize=function(){return i(this)},String.prototype.dasherize=function(){return o(this)},String.prototype.underscore=function(){return a(this)},String.prototype.classify=function(){return u(this)},String.prototype.capitalize=function(){return s(this)})}(),function(){var e=Ember.get,t=Ember.set,r=Array.prototype.slice,n=Ember.getProperties;Ember.Observable=Ember.Mixin.create({get:function(t){return e(this,t)},getProperties:function(){return n.apply(null,[this].concat(r.call(arguments)))},set:function(e,r){return t(this,e,r),this},setProperties:function(e){return Ember.setProperties(this,e)},beginPropertyChanges:function(){return Ember.beginPropertyChanges(),this},endPropertyChanges:function(){return Ember.endPropertyChanges(),this},propertyWillChange:function(e){return Ember.propertyWillChange(this,e),this},propertyDidChange:function(e){return Ember.propertyDidChange(this,e),this},notifyPropertyChange:function(e){return this.propertyWillChange(e),this.propertyDidChange(e),this},addBeforeObserver:function(e,t,r){Ember.addBeforeObserver(this,e,t,r)},addObserver:function(e,t,r){Ember.addObserver(this,e,t,r)},removeObserver:function(e,t,r){Ember.removeObserver(this,e,t,r)},hasObserverFor:function(e){return Ember.hasListeners(this,e+":change")},getWithDefault:function(e,t){return Ember.getWithDefault(this,e,t)},incrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)+n),e(this,r)},decrementProperty:function(r,n){return Ember.isNone(n)&&(n=1),t(this,r,(e(this,r)||0)-n),e(this,r)},toggleProperty:function(r){return t(this,r,!e(this,r)),e(this,r)},cacheFor:function(e){return Ember.cacheFor(this,e)},observersForKey:function(e){return Ember.observersFor(this,e)}})}(),function(){function e(){var e,t,o=!1,a=function(){o||a.proto(),n(this,i,_),n(this,"__nextSuper",y);var u=s(this),l=u.proto;if(u.proto=this,e){var m=e;e=null,this.reopen.apply(this,m)}if(t){var p=t;t=null;for(var f=this.concatenatedProperties,d=0,v=p.length;v>d;d++){var w=p[d];if("object"!=typeof w&&void 0!==w)throw new Ember.Error("Ember.Object.create only accepts objects.");if(w)for(var C=Ember.keys(w),O=0,A=C.length;A>O;O++){var P=C[O];if(w.hasOwnProperty(P)){var x=w[P],T=Ember.IS_BINDING;if(T.test(P)){var S=u.bindings;S?u.hasOwnProperty("bindings")||(S=u.bindings=r(u.bindings)):S=u.bindings={},S[P]=x}var V=u.descs[P];if(f&&g(f,P)>=0){var N=this[P];x=N?"function"==typeof N.concat?N.concat(x):Ember.makeArray(N).concat(x):Ember.makeArray(x)}V?V.set(this,P,x):"function"!=typeof this.setUnknownProperty||P in this?E?Ember.defineProperty(this,P,null,x):this[P]=x:this.setUnknownProperty(P,x)}}}}b(this,u),this.init.apply(this,arguments),u.proto=l,c(this),h(this,"init")};return a.toString=f.prototype.toString,a.willReopen=function(){o&&(a.PrototypeMixin=f.create(a.PrototypeMixin)),o=!1},a._initMixins=function(t){e=t},a._initProperties=function(e){t=e},a.proto=function(){var e=a.superclass;return e&&e.proto(),o||(o=!0,a.PrototypeMixin.applyPartial(a.prototype),l(a.prototype)),this.prototype},a}function t(e){return function(){return e}}var r=(Ember.set,Ember.get,Ember.create),n=Ember.platform.defineProperty,i=Ember.GUID_KEY,o=Ember.guidFor,a=Ember.generateGuid,s=Ember.meta,u=Ember.META_KEY,l=Ember.rewatch,c=Ember.finishChains,h=Ember.sendEvent,m=Ember.destroy,p=Ember.run.schedule,f=Ember.Mixin,d=f._apply,b=f.finishPartial,v=f.prototype.reopen,E=Ember.ENV.MANDATORY_SETTER,g=Ember.EnumerableUtils.indexOf,y={configurable:!0,writable:!0,enumerable:!1,value:void 0},_={configurable:!0,writable:!0,enumerable:!1,value:null},w=e();w.toString=function(){return"Ember.CoreObject"},w.PrototypeMixin=f.create({reopen:function(){return d(this,arguments,!0),this},init:function(){},concatenatedProperties:null,isDestroyed:!1,isDestroying:!1,destroy:function(){return this.isDestroying?void 0:(this.isDestroying=!0,p("actions",this,this.willDestroy),p("destroy",this,this._scheduledDestroy),this)},willDestroy:Ember.K,_scheduledDestroy:function(){this.isDestroyed||(m(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}}),w.PrototypeMixin.ownerConstructor=w,Ember.config.overridePrototypeMixin&&Ember.config.overridePrototypeMixin(w.PrototypeMixin),w.__super__=null;var C=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,v.apply(n.PrototypeMixin,arguments),n.superclass=this,n.__super__=this.prototype,t=n.prototype=r(this.prototype),t.constructor=n,a(t),s(t).proto=t,n.ClassMixin.apply(n),n},createWithMixins:function(){var e=this;return arguments.length>0&&this._initMixins(arguments),new e},create:function(){var e=this;return arguments.length>0&&this._initProperties(arguments),new e},reopen:function(){return this.willReopen(),v.apply(this.PrototypeMixin,arguments),this},reopenClass:function(){return v.apply(this.ClassMixin,arguments),d(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=this.proto()[u],r=t&&t.descs[e];return r._meta||{}},eachComputedProperty:function(e,t){var r,n=this.proto(),i=s(n).descs,o={};for(var a in i)r=i[a],r instanceof Ember.ComputedProperty&&e.call(t||this,a,r._meta||o)}});C.ownerConstructor=w,Ember.config.overrideClassMixin&&Ember.config.overrideClassMixin(C),w.ClassMixin=C,C.apply(w),Ember.CoreObject=w}(),function(){Ember.Object=Ember.CoreObject.extend(Ember.Observable),Ember.Object.toString=function(){return"Ember.Object"}}(),function(){function e(t,r,i){var a=t.length;l[t.join(".")]=r;for(var s in r)if(c.call(r,s)){var u=r[s];if(t[a]=s,u&&u.toString===n)u.toString=o(t.join(".")),u[m]=t.join(".");else if(u&&u.isNamespace){if(i[h(u)])continue;i[h(u)]=!0,e(t,u,i)}}t.length=a}function t(){var e,t,r=Ember.Namespace,n=Ember.lookup;if(!r.PROCESSED)for(var i in n)if("parent"!==i&&"top"!==i&&"frameElement"!==i&&"webkitStorageInfo"!==i&&!("globalStorage"===i&&n.StorageList&&n.globalStorage instanceof n.StorageList||n.hasOwnProperty&&!n.hasOwnProperty(i))){try{e=Ember.lookup[i],t=e&&e.isNamespace}catch(o){continue}t&&(e[m]=i)}}function r(e){var t=e.superclass;return t?t[m]?t[m]:r(t):void 0}function n(){Ember.BOOTED||this[m]||i();var e;if(this[m])e=this[m];else 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,a=0,s=o.length;s>a;a++)i=o[a],e([i.toString()],i,{});Ember.anyUnprocessedMixins=!1}}function o(e){return function(){return e}}var a=Ember.get,s=Ember.ArrayPolyfills.indexOf,u=Ember.Namespace=Ember.Object.extend({isNamespace:!0,init:function(){Ember.Namespace.NAMESPACES.push(this),Ember.Namespace.PROCESSED=!1},toString:function(){var e=a(this,"name");return e?e:(t(),this[Ember.GUID_KEY+"_name"])},nameClasses:function(){e([this.toString()],this,{})},destroy:function(){var e=Ember.Namespace.NAMESPACES;Ember.lookup[this.toString()]=void 0,e.splice(s.call(e,this),1),this._super()}});u.reopenClass({NAMESPACES:[Ember],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:i,byName:function(e){return Ember.BOOTED||i(),l[e]}});var l=u.NAMESPACES_BY_ID,c={}.hasOwnProperty,h=Ember.guidFor,m=Ember.NAME_KEY=Ember.GUID_KEY+"_name";Ember.Mixin.prototype.toString=n}(),function(){function e(e,t){var r=t.slice(8);r in this||u(this,r)}function t(e,t){var r=t.slice(8);r in this||l(this,r)}var r=Ember.get,n=Ember.set,i=(Ember.String.fmt,Ember.addBeforeObserver),o=Ember.addObserver,a=Ember.removeBeforeObserver,s=Ember.removeObserver,u=Ember.propertyWillChange,l=Ember.propertyDidChange,c=Ember.meta,h=Ember.defineProperty;Ember.ObjectProxy=Ember.Object.extend({content:null,_contentDidChange:Ember.observer("content",function(){}),isTruthy:Ember.computed.bool("content"),_debugContainerKey:null,willWatchProperty:function(r){var n="content."+r;i(this,n,null,e),o(this,n,null,t)},didUnwatchProperty:function(r){var n="content."+r;a(this,n,null,e),s(this,n,null,t)},unknownProperty:function(e){var t=r(this,"content");return t?r(t,e):void 0},setUnknownProperty:function(e,t){var i=c(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(){return 0===s.length?{}:s.pop()}function t(e){return s.push(e),null}function r(e,t){function r(r){var o=n(r,e);return i?t===o:!!o}var i=2===arguments.length;return r}var n=Ember.get,i=Ember.set,o=Array.prototype.slice,a=Ember.EnumerableUtils.indexOf,s=[];Ember.Enumerable=Ember.Mixin.create({nextObject:Ember.required(Function),firstObject:Ember.computed(function(){if(0===n(this,"length"))return void 0;var r,i=e();return r=this.nextObject(0,null,i),t(i),r}).property("[]"),lastObject:Ember.computed(function(){var r=n(this,"length");if(0===r)return void 0;var i,o=e(),a=0,s=null;do s=i,i=this.nextObject(a++,s,o);while(void 0!==i);return t(o),s}).property("[]"),contains:function(e){return void 0!==this.find(function(t){return t===e})},forEach:function(r,i){if("function"!=typeof r)throw new TypeError;var o=n(this,"length"),a=null,s=e();void 0===i&&(i=null);for(var u=0;o>u;u++){var l=this.nextObject(u,a,s);r.call(i,l,u,this),a=l}return a=null,s=t(s),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 a,s,u=null,l=!1,c=e(),h=0;o>h&&!l;h++)a=this.nextObject(h,u,c),(l=r.call(i,a,h,this))&&(s=a),u=a;return a=u=null,c=t(c),s},findBy:function(){return this.find(r.apply(this,arguments))},findProperty:Ember.aliasMethod("findBy"),every:function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},everyBy:Ember.aliasMethod("isEvery"),everyProperty:Ember.aliasMethod("isEvery"),isEvery:function(){return this.every(r.apply(this,arguments))},any:function(r,i){var o,a,s=n(this,"length"),u=e(),l=!1,c=null;for(void 0===i&&(i=null),a=0;s>a&&!l;a++)o=this.nextObject(a,c,u),l=r.call(i,o,a,this),c=o;return o=c=null,u=t(u),l},some:Ember.aliasMethod("any"),isAny:function(){return this.any(r.apply(this,arguments))},anyBy:Ember.aliasMethod("isAny"),someProperty:Ember.aliasMethod("isAny"),reduce:function(e,t,r){if("function"!=typeof e)throw new TypeError;var n=t;return this.forEach(function(t,i){n=e(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):n[e]())},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){a(e,t)<0&&e.push(t)}),e},"[]":Ember.computed(function(){return this}),addEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o||Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.addListener(this,"@enumerable:before",e,r),Ember.addListener(this,"@enumerable:change",e,i),o||Ember.propertyDidChange(this,"hasEnumerableObservers"),this},removeEnumerableObserver:function(e,t){var r=t&&t.willChange||"enumerableWillChange",i=t&&t.didChange||"enumerableDidChange",o=n(this,"hasEnumerableObservers");return o&&Ember.propertyWillChange(this,"hasEnumerableObservers"),Ember.removeListener(this,"@enumerable:before",e,r),Ember.removeListener(this,"@enumerable:change",e,i),o&&Ember.propertyDidChange(this,"hasEnumerableObservers"),this},hasEnumerableObservers:Ember.computed(function(){return Ember.hasListeners(this,"@enumerable:change")||Ember.hasListeners(this,"@enumerable:before")}),enumerableContentWillChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.propertyWillChange(this,"[]"),o&&Ember.propertyWillChange(this,"length"),Ember.sendEvent(this,"@enumerable:before",[this,e,t]),this},enumerableContentDidChange:function(e,t){var r,i,o;return r="number"==typeof e?e:e?n(e,"length"):e=-1,i="number"==typeof t?t:t?n(t,"length"):t=-1,o=0>i||0>r||i-r!==0,-1===e&&(e=null),-1===t&&(t=null),Ember.sendEvent(this,"@enumerable:change",[this,e,t]),o&&Ember.propertyDidChange(this,"length"),Ember.propertyDidChange(this,"[]"),this},sortBy:function(){var e=arguments;return this.toArray().sort(function(t,r){for(var i=0;i<e.length;i++){var o=e[i],a=n(t,o),s=n(r,o),u=Ember.compare(a,s);if(u)return u}return 0})}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.isNone),r=Ember.EnumerableUtils.map,n=Ember.cacheFor;Ember.Array=Ember.Mixin.create(Ember.Enumerable,{length:Ember.required(),objectAt:function(t){return 0>t||t>=e(this,"length")?void 0:e(this,t)},objectsAt:function(e){var t=this;return r(e,function(e){return t.objectAt(e)})},nextObject:function(e){return this.objectAt(e)},"[]":Ember.computed(function(t,r){return void 0!==r&&this.replace(0,e(this,"length"),r),this}),firstObject:Ember.computed(function(){return this.objectAt(0)}),lastObject:Ember.computed(function(){return this.objectAt(e(this,"length")-1)}),contains:function(e){return this.indexOf(e)>=0},slice:function(r,n){var i=Ember.A(),o=e(this,"length");for(t(r)&&(r=0),(t(n)||n>o)&&(n=o),0>r&&(r=o+r),0>n&&(n=o+n);n>r;)i[i.length]=this.objectAt(r++);return i},indexOf:function(t,r){var n,i=e(this,"length");for(void 0===r&&(r=0),0>r&&(r+=i),n=r;i>n;n++)if(this.objectAt(n)===t)return n;return-1},lastIndexOf:function(t,r){var n,i=e(this,"length");for((void 0===r||r>=i)&&(r=i-1),0>r&&(r+=i),n=r;n>=0;n--)if(this.objectAt(n)===t)return n;return-1},addArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o||Ember.propertyWillChange(this,"hasArrayObservers"),Ember.addListener(this,"@array:before",t,n),Ember.addListener(this,"@array:change",t,i),o||Ember.propertyDidChange(this,"hasArrayObservers"),this},removeArrayObserver:function(t,r){var n=r&&r.willChange||"arrayWillChange",i=r&&r.didChange||"arrayDidChange",o=e(this,"hasArrayObservers");return o&&Ember.propertyWillChange(this,"hasArrayObservers"),Ember.removeListener(this,"@array:before",t,n),Ember.removeListener(this,"@array:change",t,i),o&&Ember.propertyDidChange(this,"hasArrayObservers"),this},hasArrayObservers:Ember.computed(function(){return Ember.hasListeners(this,"@array:change")||Ember.hasListeners(this,"@array:before")}),arrayContentWillChange:function(t,r,n){void 0===t?(t=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),Ember.isWatching(this,"@each")&&e(this,"@each"),Ember.sendEvent(this,"@array:before",[this,t,r,n]);var i,o;if(t>=0&&r>=0&&e(this,"hasEnumerableObservers")){i=[],o=t+r;for(var a=t;o>a;a++)i.push(this.objectAt(a))}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,a;if(t>=0&&i>=0&&e(this,"hasEnumerableObservers")){o=[],a=t+i;for(var s=t;a>s;s++)o.push(this.objectAt(s))}else o=i;this.enumerableContentDidChange(r,o),Ember.sendEvent(this,"@array:change",[this,t,r,i]);var u=e(this,"length"),l=n(this,"firstObject"),c=n(this,"lastObject");return this.objectAt(0)!==l&&(Ember.propertyWillChange(this,"firstObject"),Ember.propertyDidChange(this,"firstObject")),this.objectAt(u-1)!==c&&(Ember.propertyWillChange(this,"lastObject"),Ember.propertyDidChange(this,"lastObject")),this},"@each":Ember.computed(function(){return this.__each||(this.__each=new Ember.EachProxy(this)),this.__each})})}(),function(){function e(e,t){return"@this"===t?e:m(e,t)}function t(e,t,r){this.callbacks=e,this.cp=t,this.instanceMeta=r,this.dependentKeysByGuid={},this.trackedArraysByGuid={},this.suspended=!1,this.changedItems={}}function r(e,t,r){this.dependentArray=e,this.index=t,this.item=e.objectAt(t),this.trackedArray=r,this.beforeObserver=null,this.observer=null,this.destroyed=!1}function n(e,t,r){return 0>e?Math.max(0,t+e):t>e?e:Math.min(t-r,e)}function i(e,t,r){return Math.min(r,t-e)}function o(e,t,r,n,i,o){var a={arrayChanged:e,index:r,item:t,propertyName:n,property:i};return o&&(a.previousValues=o),a}function a(e,t,r,n,i){O(e,function(a,s){i.setValue(t.addedItem.call(this,i.getValue(),a,o(e,a,s,n,r),i.sugarMeta))},this)}function s(e,t){{var r;e._callbacks()}e._hasInstanceMeta(this,t)?(r=e._instanceMeta(this,t),r.setValue(e.resetValue(r.getValue()))):r=e._instanceMeta(this,t),e.options.initialize&&e.options.initialize.call(this,r.getValue(),{property:e,propertyName:t},r.sugarMeta)}function u(t,r){if(x.test(r))return!1;var n=e(t,r);return Ember.Array.detect(n)}function l(e,t,r){this.context=e,this.propertyName=t,this.cache=f(e).cache,this.dependentArrays={},this.sugarMeta={},this.initialValue=r}function c(t){var r=this;this.options=t,this._instanceMetas={},this._dependentKeys=null,this._itemPropertyKeys={},this._previousItemPropertyKeys={},this.readOnly(),this.cacheable(),this.recomputeOnce=function(e){Ember.run.once(this,n,e)};var n=function(t){var n=(r._dependentKeys,r._instanceMeta(this,t)),i=r._callbacks();s.call(this,r,t),n.dependentArraysObserver.suspendArrayObservers(function(){O(r._dependentKeys,function(t){if(u(this,t)){var i=e(this,t),o=n.dependentArrays[t];i===o?r._previousItemPropertyKeys[t]&&(delete r._previousItemPropertyKeys[t],n.dependentArraysObserver.setupPropertyObservers(t,r._itemPropertyKeys[t])):(n.dependentArrays[t]=i,o&&n.dependentArraysObserver.teardownObservers(o,t),i&&n.dependentArraysObserver.setupObservers(i,t))}},this)},this),O(r._dependentKeys,function(o){if(u(this,o)){var s=e(this,o);s&&a.call(this,s,i,r,t,n)}},this)};this.func=function(e){return n.call(this,e),r._instanceMeta(this,e).getValue()}}function h(e){return e}var m=Ember.get,p=(Ember.set,Ember.guidFor),f=Ember.meta,d=Ember.propertyWillChange,b=Ember.propertyDidChange,v=Ember.addBeforeObserver,E=Ember.removeBeforeObserver,g=Ember.addObserver,y=Ember.removeObserver,_=Ember.ComputedProperty,w=[].slice,C=Ember.create,O=Ember.EnumerableUtils.forEach,A=/^(.*)\.@each\.(.*)/,P=/(.*\.@each){2,}/,x=/\.\[\]$/,T=Ember.expandProperties;t.prototype={setValue:function(e){this.instanceMeta.setValue(e,!0)},getValue:function(){return this.instanceMeta.getValue()},setupObservers:function(e,t){this.dependentKeysByGuid[p(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[p(e)],this.teardownPropertyObservers(t,r),e.removeArrayObserver(this,{willChange:"dependentArrayWillChange",didChange:"dependentArrayDidChange"})},suspendArrayObservers:function(e,t){var r=this.suspended;this.suspended=!0,e.call(t),this.suspended=r},setupPropertyObservers:function(t,r){var n=e(this.instanceMeta.context,t),i=e(n,"length"),o=new Array(i);this.resetTransformations(t,o),O(n,function(e,i){var a=this.createPropertyObserverContext(n,i,this.trackedArraysByGuid[t]);o[i]=a,O(r,function(t){v(e,t,this,a.beforeObserver),g(e,t,this,a.observer)},this)},this)},teardownPropertyObservers:function(e,t){var r,n,i,o=this,a=this.trackedArraysByGuid[e];a&&a.apply(function(e,a,s){s!==Ember.TrackedArray.DELETE&&O(e,function(e){e.destroyed=!0,r=e.beforeObserver,n=e.observer,i=e.item,O(t,function(e){E(i,e,o,r),y(i,e,o,n)})})})},createPropertyObserverContext:function(e,t,n){var i=new r(e,t,n);return this.createPropertyObserver(i),i},createPropertyObserver:function(e){var t=this;e.beforeObserver=function(r,n){return t.itemPropertyWillChange(r,n,e.dependentArray,e)},e.observer=function(r,n){return t.itemPropertyDidChange(r,n,e.dependentArray,e)}},resetTransformations:function(e,t){this.trackedArraysByGuid[e]=new Ember.TrackedArray(t)},trackAdd:function(e,t,r){var n=this.trackedArraysByGuid[e];n&&n.addItems(t,r)},trackRemove:function(e,t,r){var n=this.trackedArraysByGuid[e];return n?n.removeItems(t,r):[]},updateIndexes:function(t,r){var n=e(r,"length");t.apply(function(e,t,r){r!==Ember.TrackedArray.DELETE&&(r!==Ember.TrackedArray.RETAIN||e.length!==n||0!==t)&&O(e,function(e,r){e.index=r+t})})},dependentArrayWillChange:function(t,r,a){function s(e){m[h].destroyed=!0,E(l,e,this,m[h].beforeObserver),y(l,e,this,m[h].observer)}if(!this.suspended){var u,l,c,h,m,f=this.callbacks.removedItem,d=p(t),b=this.dependentKeysByGuid[d],v=this.cp._itemPropertyKeys[b]||[],g=e(t,"length"),_=n(r,g,0),w=i(_,g,a);for(m=this.trackRemove(b,_,w),h=w-1;h>=0&&(c=_+h,!(c>=g));--h)l=t.objectAt(c),O(v,s,this),u=o(t,l,c,this.instanceMeta.propertyName,this.cp),this.setValue(f.call(this.instanceMeta.context,this.getValue(),l,u,this.instanceMeta.sugarMeta))}},dependentArrayDidChange:function(t,r,i,a){if(!this.suspended){var s,u,l=this.callbacks.addedItem,c=p(t),h=this.dependentKeysByGuid[c],m=new Array(a),f=this.cp._itemPropertyKeys[h],d=e(t,"length"),b=n(r,d,a);O(t.slice(b,b+a),function(e,r){f&&(u=m[r]=this.createPropertyObserverContext(t,b+r,this.trackedArraysByGuid[h]),O(f,function(t){v(e,t,this,u.beforeObserver),g(e,t,this,u.observer)},this)),s=o(t,e,b+r,this.instanceMeta.propertyName,this.cp),this.setValue(l.call(this.instanceMeta.context,this.getValue(),e,s,this.instanceMeta.sugarMeta))},this),this.trackAdd(h,b,m)}},itemPropertyWillChange:function(t,r,n,i){var o=p(t);this.changedItems[o]||(this.changedItems[o]={array:n,observerContext:i,obj:t,previousValues:{}}),this.changedItems[o].previousValues[r]=e(t,r)},itemPropertyDidChange:function(){this.flushChanges()},flushChanges:function(){var e,t,r,n=this.changedItems;for(e in n)t=n[e],t.observerContext.destroyed||(this.updateIndexes(t.observerContext.trackedArray,t.observerContext.dependentArray),r=o(t.array,t.obj,t.observerContext.index,this.instanceMeta.propertyName,this.cp,t.previousValues),this.setValue(this.callbacks.removedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)),this.setValue(this.callbacks.addedItem.call(this.instanceMeta.context,this.getValue(),t.obj,r,this.instanceMeta.sugarMeta)));this.changedItems={}}},l.prototype={getValue:function(){return this.propertyName in this.cache?this.cache[this.propertyName]:this.initialValue},setValue:function(e,t){e!==this.cache[this.propertyName]&&(t&&d(this.context,this.propertyName),void 0===e?delete this.cache[this.propertyName]:this.cache[this.propertyName]=e,t&&b(this.context,this.propertyName))}},Ember.ReduceComputedProperty=c,c.prototype=C(_.prototype),c.prototype._callbacks=function(){if(!this.callbacks){var e=this.options;this.callbacks={removedItem:e.removedItem||h,addedItem:e.addedItem||h}}return this.callbacks},c.prototype._hasInstanceMeta=function(e,t){var r=p(e),n=r+":"+t;return!!this._instanceMetas[n]},c.prototype._instanceMeta=function(e,r){var n=p(e),i=n+":"+r,o=this._instanceMetas[i];return o||(o=this._instanceMetas[i]=new l(e,r,this.initialValue()),o.dependentArraysObserver=new t(this._callbacks(),this,o,e,r,o.sugarMeta)),o},c.prototype.initialValue=function(){return"function"==typeof this.options.initialValue?this.options.initialValue():this.options.initialValue},c.prototype.resetValue=function(){return this.initialValue()},c.prototype.itemPropertyKey=function(e,t){this._itemPropertyKeys[e]=this._itemPropertyKeys[e]||[],this._itemPropertyKeys[e].push(t)},c.prototype.clearItemPropertyKeys=function(e){this._itemPropertyKeys[e]&&(this._previousItemPropertyKeys[e]=this._itemPropertyKeys[e],this._itemPropertyKeys[e]=[])},c.prototype.property=function(){var e,t,r=this,n=w.call(arguments),i=new Ember.Set;return O(n,function(n){if(P.test(n))throw new Ember.Error("Nested @each properties not supported: "+n);if(e=A.exec(n)){t=e[1];var o=e[2],a=function(e){r.itemPropertyKey(t,e)};T(o,a),i.add(t)}else i.add(n)}),_.prototype.property.apply(this,i.toArray())},Ember.reduceComputed=function(e){var t;if(arguments.length>1&&(t=w.call(arguments,0,-1),e=w.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 c(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)
13
+ })},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},e.prototype.didChange=function(){},Ember.arrayComputed=function(t){var n;if(arguments.length>1&&(n=r.call(arguments,0,-1),t=r.call(arguments,-1)[0]),"object"!=typeof t)throw new Ember.Error("Array Computed Property declared without an options hash");var i=new e(t);return n&&i.property.apply(i,n),i}}(),function(){function e(e,i,o,a){function s(e){return t.detectInstance(e)?n(r(e,"content")):n(e)}var u,l,c,h,m;return arguments.length<4&&(a=r(e,"length")),arguments.length<3&&(o=0),o===a?o:(u=o+Math.floor((a-o)/2),l=e.objectAt(u),h=s(l),m=s(i),h===m?u:(c=this.order(l,i),0===c&&(c=m>h?-1:1),0>c?this.binarySearch(e,i,u+1,a):c>0?this.binarySearch(e,i,o,u):u))}var t,r=Ember.get,n=(Ember.set,Ember.guidFor),i=Ember.merge,o=[].slice,a=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.map;Ember.computed.sum=function(e){return Ember.reduceComputed(e,{initialValue:0,addedItem:function(e,t){return e+t},removedItem:function(e,t){return e-t}})},Ember.computed.max=function(e){return Ember.reduceComputed(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(e,{initialValue:1/0,addedItem:function(e,t){return Math.min(e,t)},removedItem:function(e,t){return t>e?e:void 0}})},Ember.computed.map=function(e,t){var r={addedItem:function(e,r,n){var i=t.call(this,r);return e.insertAt(n.index,i),e},removedItem:function(e,t,r){return e.removeAt(r.index,1),e}};return Ember.arrayComputed(e,r)},Ember.computed.mapBy=function(e,t){var n=function(e){return r(e,t)};return Ember.computed.map(e+".@each."+t,n)},Ember.computed.mapProperty=Ember.computed.mapBy,Ember.computed.filter=function(e,t){var r={initialize:function(e,t,r){r.filteredArrayIndexes=new Ember.SubArray},addedItem:function(e,r,n,i){var o=!!t.call(this,r),a=i.filteredArrayIndexes.addItem(n.index,o);return o&&e.insertAt(a,r),e},removedItem:function(e,t,r,n){var i=n.filteredArrayIndexes.removeItem(r.index);return i>-1&&e.removeAt(i),e}};return Ember.arrayComputed(e,r)},Ember.computed.filterBy=function(e,t,n){var i;return i=2===arguments.length?function(e){return r(e,t)}:function(e){return r(e,t)===n},Ember.computed.filter(e+".@each."+t,i)},Ember.computed.filterProperty=Ember.computed.filterBy,Ember.computed.uniq=function(){var e=o.call(arguments);return e.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(e,t,r,i){var o=n(t);return i.itemCounts[o]?++i.itemCounts[o]:i.itemCounts[o]=1,e.addObject(t),e},removedItem:function(e,t,r,i){var o=n(t),a=i.itemCounts;return 0===--a[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 n(e)})},t=o.call(arguments);return t.push({initialize:function(e,t,r){r.itemCounts={}},addedItem:function(t,r,i,o){var a=n(r),s=(e(i),n(i.arrayChanged)),u=i.property._dependentKeys.length,l=o.itemCounts;return l[a]||(l[a]={}),void 0===l[a][s]&&(l[a][s]=0),1===++l[a][s]&&u===Ember.keys(l[a]).length&&t.addObject(r),t},removedItem:function(t,r,i,o){var a,s=n(r),u=(e(i),n(i.arrayChanged)),l=(i.property._dependentKeys.length,o.itemCounts);return void 0===l[s][u]&&(l[s][u]=0),0===--l[s][u]&&(delete l[s][u],a=Ember.keys(l[s]).length,0===a&&delete l[s],t.removeObject(r)),t}}),Ember.arrayComputed.apply(null,t)},Ember.computed.setDiff=function(e,t){if(2!==arguments.length)throw new Ember.Error("setDiff requires exactly two dependent arrays.");return Ember.arrayComputed(e,t,{addedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===a?s.contains(i)||n.addObject(i):n.removeObject(i),n},removedItem:function(n,i,o){var a=r(this,e),s=r(this,t);return o.arrayChanged===s?a.contains(i)&&n.addObject(i):n.removeObject(i),n}})},t=Ember.ObjectProxy.extend(),Ember.computed.sort=function(n,o){var s,u;return"function"==typeof o?s=function(t,r,n){n.order=o,n.binarySearch=e}:(u=o,s=function(i,o,s){function l(){var e,t,i,l=r(this,u),h=s.sortProperties=[],m=s.sortPropertyAscending={};o.property.clearItemPropertyKeys(n),a(l,function(r){-1!==(t=r.indexOf(":"))?(e=r.substring(0,t),i="desc"!==r.substring(t+1).toLowerCase()):(e=r,i=!0),h.push(e),m[e]=i,o.property.itemPropertyKey(n,e)}),l.addObserver("@each",this,c)}function c(){Ember.run.once(this,h,o.propertyName)}function h(e){l.call(this),o.property.recomputeOnce.call(this,e)}Ember.addObserver(this,u,c),l.call(this),s.order=function(e,n){for(var i,o,a,s=n instanceof t,u=0;u<this.sortProperties.length;++u)if(i=this.sortProperties[u],o=Ember.compare(r(e,i),s?n[i]:r(n,i)),0!==o)return a=this.sortPropertyAscending[i],a?o:-1*o;return 0},s.binarySearch=e}),Ember.arrayComputed(n,{initialize:s,addedItem:function(e,t,r,n){var i=n.binarySearch(e,t);return e.insertAt(i,t),e},removedItem:function(e,r,n,o){var a,s,u;return n.previousValues?(a=i({content:r},n.previousValues),u=t.create(a)):u=r,s=o.binarySearch(e,u),e.removeAt(s),e}})}}(),function(){Ember.RSVP=t("rsvp"),Ember.RSVP.onerrorDefault=function(e){if(e instanceof Error)if(Ember.testing){if(!Ember.Test||!Ember.Test.adapter)throw e;Ember.Test.adapter.exception(e)}else Ember.Logger.error(e.stack)},Ember.RSVP.on("error",Ember.RSVP.onerrorDefault)}(),function(){var e=Array.prototype.slice,t=Ember.expandProperties;(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(){for(var e=function(e){r.push(e)},r=[],n=0;n<arguments.length;++n)t(arguments[n],e);return this.__ember_observes__=r,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(){for(var e=function(e){r.push(e)},r=[],n=0;n<arguments.length;++n)t(arguments[n],e);return this.__ember_observesBefore__=r,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;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 a;return a=i.send?i.send.apply(i,r(o,n)):i[n].apply(i,r(o)),a!==!1&&(a=!0),a}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");if(Ember.FEATURES["ember-runtime-test-friendly-promises"]){var r=function(){Ember.Test&&Ember.Test.adapter&&Ember.Test.adapter.asyncStart()},n=function(){Ember.Test&&Ember.Test.adapter&&Ember.Test.adapter.asyncEnd()};e.configure("async",function(e,t){var i=!Ember.run.currentRunLoop;Ember.testing&&i&&r(),Ember.run.backburner.schedule("actions",function(){Ember.testing&&i&&n(),e(t)})})}else e.configure("async",function(e,t){Ember.run.backburner.schedule("actions",function(){e(t)})});e.Promise.prototype.fail=function(e,t){return this["catch"](e,t)};var i=Ember.get;Ember.DeferredMixin=Ember.Mixin.create({then:function(e,t,r){function n(t){return t===a?e(s):e(t)}var o,a,s;return s=this,o=i(this,"_deferred"),a=o.promise,a.then(e&&n,t,r)},resolve:function(e){var t,r;t=i(this,"_deferred"),r=t.promise,e===this?t.resolve(r):t.resolve(e)},reject:function(e){i(this,"_deferred").reject(e)},_deferred:Ember.computed(function(){return e.defer("Ember: DeferredMixin - "+this)})})}(),function(){var e=Ember.get,t=Ember.typeOf;Ember.ActionHandler=Ember.Mixin.create({mergedProperties:["_actions"],willMergeMixin:function(e){var r;e._actions||("object"===t(e.actions)?r="actions":"object"===t(e.events)&&(r="events"),r&&(e._actions=Ember.merge(e._actions||{},e[r])),delete e[r])},send:function(t){var r,n=[].slice.call(arguments,1);if(this._actions&&this._actions[t]){if(this._actions[t].apply(this,n)!==!0)return}else if(!Ember.FEATURES.isEnabled("ember-routing-drop-deprecated-action-style")&&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,t){return t.then(function(t){return r(e,"isFulfilled",!0),r(e,"content",t),t},function(t){throw r(e,"isRejected",!0),r(e,"reason",t),t},"Ember: PromiseProxy")}function t(e){return function(){var t=n(this,"promise");return t[e].apply(t,arguments)}}var r=Ember.set,n=Ember.get,i=Ember.computed.not,o=Ember.computed.or;Ember.PromiseProxyMixin=Ember.Mixin.create({reason:null,isPending:i("isSettled").readOnly(),isSettled:o("isRejected","isFulfilled").readOnly(),isRejected:!1,isFulfilled:!1,promise:Ember.computed(function(t,r){if(2===arguments.length)return e(this,r);throw new Ember.Error("PromiseProxy's promise must be set")}),then:t("then"),"catch":t("catch"),"finally":t("finally")})}(),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",a="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=a,Ember.TrackedArray.prototype={addItems:function(t,n){var i=r(n,"length");if(!(1>i)){var a,s,u=this._findArrayOperation(t),l=u.operation,c=u.index,h=u.rangeStart;s=new e(o,i,n),l?u.split?(this._split(c,t-h,s),a=c+1):(this._operations.splice(c,0,s),a=c):(this._operations.push(s),a=c),this._composeInsert(a)}},removeItems:function(t,r){if(!(1>r)){var n,i,o=this._findArrayOperation(t),s=(o.operation,o.index),u=o.rangeStart;return n=new e(a,r),o.split?(this._split(s,t-u,n),i=s+1):(this._operations.splice(s,0,n),i=s),this._composeDelete(i)}},apply:function(t){var r=[],o=0;n(this._operations,function(e){t(e.items,o,e.type),e.type!==a&&(o+=e.count,r=r.concat(e.items))}),this._operations=[new e(i,r.length,r)]},_findArrayOperation:function(e){var r,n,i,o,s,u=!1;for(r=o=0,n=this._operations.length;n>r;++r)if(i=this._operations[r],i.type!==a){if(s=o+i.count-1,e===o)break;if(e>o&&s>=e){u=!0;break}o=s+1}return new t(i,r,u,o)},_split:function(t,r,n){var i=this._operations[t],o=i.items.slice(r),a=new e(i.type,o.length,o);i.count=r,i.items=i.items.slice(0,r),this._operations.splice(t+1,0,n,a)},_composeInsert:function(e){var t=this._operations[e],r=this._operations[e-1],n=this._operations[e+1],i=r&&r.type,a=n&&n.type;i===o?(r.count+=t.count,r.items=r.items.concat(t.items),a===o?(r.count+=n.count,r.items=r.items.concat(n.items),this._operations.splice(e,2)):this._operations.splice(e,1)):a===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],s=i.count,u=this._operations[e-1],l=u&&u.type,c=!1,h=[];l===a&&(i=u,e-=1);for(var m=e+1;s>0;++m)t=this._operations[m],r=t.type,n=t.count,r!==a?(n>s?(h=h.concat(t.items.splice(0,s)),t.count-=s,m-=1,n=s,s=0):(n===s&&(c=!0),h=h.concat(t.items),s-=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,c?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",n="f";Ember.SubArray=function(t){arguments.length<1&&(t=0),this._operations=t>0?[new e(r,t)]:[]},Ember.SubArray.prototype={addItem:function(t,i){var o=-1,a=i?r:n,s=this;return this._findOperation(t,function(n,u,l,c,h){var m,p;a===n.type?++n.count:t===l?s._operations.splice(u,0,new e(a,1)):(m=new e(a,1),p=new e(n.type,c-t+1),n.count=t-l,s._operations.splice(u+1,0,m,p)),i&&(o=n.type===r?h+(t-l):h),s._composeAt(u)},function(t){s._operations.push(new e(a,1)),i&&(o=t),s._composeAt(s._operations.length-1)}),o},removeItem:function(e){var t=-1,n=this;return this._findOperation(e,function(i,o,a,s,u){i.type===r&&(t=u+(e-a)),i.count>1?--i.count:(n._operations.splice(o,1),n._composeAt(o))},function(){throw new Ember.Error("Can't remove an item that has never been added.")}),t},_findOperation:function(e,t,n){var i,o,a,s,u,l=0;for(i=s=0,o=this._operations.length;o>i;s=u+1,++i){if(a=this._operations[i],u=s+a.count-1,e>=s&&u>=e)return t(a,i,s,u,l),void 0;a.type===r&&(l+=a.count)}n(l)},_composeAt:function(e){var t,r=this._operations[e];r&&(e>0&&(t=this._operations[e-1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e-1,1),--e)),e<this._operations.length-1&&(t=this._operations[e+1],t.type===r.type&&(r.count+=t.count,this._operations.splice(e+1,1))))},toString:function(){var e="";return t(this._operations,function(t){e+=" "+t.type+":"+t.count}),e.substring(1)}}}(),function(){Ember.Container=t("container")["default"],Ember.Container.set=Ember.set}(),function(){Ember.Application=Ember.Namespace.extend()}(),function(){{var e="Index out of range",t=[],r=Ember.get;Ember.set}Ember.ArrayProxy=Ember.Object.extend(Ember.MutableArray,{content:null,arrangedContent:Ember.computed.alias("content"),objectAtContent:function(e){return r(this,"arrangedContent").objectAt(e)},replaceContent:function(e,t,n){r(this,"content").replace(e,t,n)},_contentWillChange:Ember.beforeObserver("content",function(){this._teardownContent()}),_teardownContent:function(){var e=r(this,"content");e&&e.removeArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},contentArrayWillChange:Ember.K,contentArrayDidChange:Ember.K,_contentDidChange:Ember.observer("content",function(){r(this,"content");this._setupContent()}),_setupContent:function(){var e=r(this,"content");e&&e.addArrayObserver(this,{willChange:"contentArrayWillChange",didChange:"contentArrayDidChange"})},_arrangedContentWillChange:Ember.beforeObserver("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this.arrangedContentArrayWillChange(this,0,t,void 0),this.arrangedContentWillChange(this),this._teardownArrangedContent(e)}),_arrangedContentDidChange:Ember.observer("arrangedContent",function(){var e=r(this,"arrangedContent"),t=e?r(e,"length"):0;this._setupArrangedContent(),this.arrangedContentDidChange(this),this.arrangedContentArrayDidChange(this,0,void 0,t)}),_setupArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.addArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},_teardownArrangedContent:function(){var e=r(this,"arrangedContent");e&&e.removeArrayObserver(this,{willChange:"arrangedContentArrayWillChange",didChange:"arrangedContentArrayDidChange"})},arrangedContentWillChange:Ember.K,arrangedContentDidChange:Ember.K,objectAt:function(e){return r(this,"content")&&this.objectAtContent(e)},length:Ember.computed(function(){var e=r(this,"arrangedContent");return e?r(e,"length"):0}),_replace:function(e,t,n){var i=r(this,"content");return i&&this.replaceContent(e,t,n),this},replace:function(){if(r(this,"arrangedContent")!==r(this,"content"))throw new Ember.Error("Using replace on an arranged ArrayProxy is not allowed.");this._replace.apply(this,arguments)},_insertAt:function(t,n){if(t>r(this,"content.length"))throw new Ember.Error(e);return this._replace(t,0,[n]),this},insertAt:function(e,t){if(r(this,"arrangedContent")===r(this,"content"))return this._insertAt(e,t);throw new Ember.Error("Using insertAt on an arranged ArrayProxy is not allowed.")},removeAt:function(n,i){if("number"==typeof n){var o,a=r(this,"content"),s=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(a.indexOf(s.objectAt(o)));for(u.sort(function(e,t){return t-e}),Ember.beginPropertyChanges(),o=0;o<u.length;o++)this._replace(u[o],1,t);Ember.endPropertyChanges()}return this},pushObject:function(e){return this._insertAt(r(this,"content.length"),e),e},pushObjects:function(e){if(!Ember.Enumerable.detect(e)&&!Ember.isArray(e))throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects");return this._replace(r(this,"length"),0,e),this},setObjects:function(e){if(0===e.length)return this.clear();var t=r(this,"length");return this._replace(0,t,e),this},unshiftObject:function(e){return this._insertAt(0,e),e},unshiftObjects:function(e){return this._replace(0,0,e),this},slice:function(){var e=this.toArray();return e.slice.apply(e,arguments)},arrangedContentArrayWillChange:function(e,t,r,n){this.arrayContentWillChange(t,r,n)},arrangedContentArrayDidChange:function(e,t,r,n){this.arrayContentDidChange(t,r,n)},init:function(){this._super(),this._setupContent(),this._setupArrangedContent()},willDestroy:function(){this._teardownArrangedContent(),this._teardownContent()}})}(),function(){function e(e,t,r,i,o){var a,s=r._objects;for(s||(s=r._objects={});--o>=i;){var u=e.objectAt(o);u&&(Ember.addBeforeObserver(u,t,r,"contentKeyWillChange"),Ember.addObserver(u,t,r,"contentKeyDidChange"),a=n(u),s[a]||(s[a]=[]),s[a].push(o))}}function t(e,t,r,i,a){var s=r._objects;s||(s=r._objects={});for(var u,l;--a>=i;){var c=e.objectAt(a);c&&(Ember.removeBeforeObserver(c,t,r,"contentKeyWillChange"),Ember.removeObserver(c,t,r,"contentKeyDidChange"),l=n(c),u=s[l],u[o.call(u,a)]=null)}}var r=(Ember.set,Ember.get),n=Ember.guidFor,i=Ember.EnumerableUtils.forEach,o=Ember.ArrayPolyfills.indexOf,a=Ember.Object.extend(Ember.Array,{init:function(e,t,r){this._super(),this._keyName=t,this._owner=r,this._content=e},objectAt:function(e){var t=this._content.objectAt(e);return t&&r(t,this._keyName)},length:Ember.computed(function(){var e=this._content;return e?r(e,"length"):0})}),s=/^.+:(before|change)$/;Ember.EachProxy=Ember.Object.extend({init:function(e){this._super(),this._content=e,e.addArrayObserver(this),i(Ember.watchedEvents(this),function(e){this.didAddListener(e)},this)},unknownProperty:function(e){var t;return t=new a(this._content,e,this),Ember.defineProperty(this,e,null,t),this.beginObservingContentKey(e),t},arrayWillChange:function(e,r,n){var i,o,a=this._keys;o=n>0?r+n:-1,Ember.beginPropertyChanges(this);for(i in a)a.hasOwnProperty(i)&&(o>0&&t(e,i,this,r,o),Ember.propertyWillChange(this,i));Ember.propertyWillChange(this._content,"@each"),Ember.endPropertyChanges(this)},arrayDidChange:function(t,r,n,i){var o,a=this._keys;o=i>0?r+i:-1,Ember.changeProperties(function(){for(var n in a)a.hasOwnProperty(n)&&(o>0&&e(t,n,this,r,o),Ember.propertyDidChange(this,n));Ember.propertyDidChange(this._content,"@each")},this)},didAddListener:function(e){s.test(e)&&this.beginObservingContentKey(e.slice(0,-7))},didRemoveListener:function(e){s.test(e)&&this.stopObservingContentKey(e.slice(0,-7))},beginObservingContentKey:function(t){var n=this._keys;if(n||(n=this._keys={}),n[t])n[t]++;else{n[t]=1;var i=this._content,o=r(i,"length");e(i,t,this,0,o)}},stopObservingContentKey:function(e){var n=this._keys;if(n&&n[e]>0&&--n[e]<=0){var i=this._content,o=r(i,"length");t(i,e,this,0,o)}},contentKeyWillChange:function(e,t){Ember.propertyWillChange(this,t)},contentKeyDidChange:function(e,t){Ember.propertyDidChange(this,t)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils._replace),r=Ember.Mixin.create(Ember.MutableArray,Ember.Observable,Ember.Copyable,{get:function(e){return"length"===e?this.length:"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(r,n,i){if(this.isFrozen)throw Ember.FROZEN_ERROR;var o=i?e(i,"length"):0;return this.arrayContentWillChange(r,n,o),0===o?this.splice(r,n):t(this,r,n,i),this.arrayContentDidChange(r,n,o),this},unknownProperty:function(e,t){var r;return void 0!==t&&void 0===r&&(r=this[e]=t),r},indexOf:function(e,t){var r,n=this.length;for(t=void 0===t?0:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var r,n=this.length;for(t=void 0===t?n-1:0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n),r=t;r>=0;r--)if(this[r]===e)return r;return-1},copy:function(e){return e?this.map(function(e){return Ember.copy(e,!0)}):this.slice()}}),n=["length"];Ember.EnumerableUtils.forEach(r.keys(),function(e){Array.prototype[e]&&n.push(e)}),n.length>0&&(r=r.without.apply(r,n)),Ember.NativeArray=r,Ember.A=function(e){return void 0===e&&(e=[]),Ember.Array.detect(e)?e:Ember.NativeArray.apply(e)},Ember.NativeArray.activate=function(){r.apply(Array.prototype),Ember.A=function(e){return e||[]}},(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.Array)&&Ember.NativeArray.activate()}(),function(){var e=Ember.get,t=Ember.set,r=Ember.guidFor,n=Ember.isNone,i=Ember.String.fmt;Ember.Set=Ember.CoreObject.extend(Ember.MutableEnumerable,Ember.Copyable,Ember.Freezable,{length:0,clear:function(){if(this.isFrozen)throw new Ember.Error(Ember.FROZEN_ERROR);var n=e(this,"length");if(0===n)return this;var i;this.enumerableContentWillChange(n,0),Ember.propertyWillChange(this,"firstObject"),Ember.propertyWillChange(this,"lastObject");for(var o=0;n>o;o++)i=r(this[o]),delete this[i],delete this[o];return t(this,"length",0),Ember.propertyDidChange(this,"firstObject"),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(n,0),this},isEqual:function(t){if(!Ember.Enumerable.detect(t))return!1;var r=e(this,"length");if(e(t,"length")!==r)return!1;for(;--r>=0;)if(!t.contains(this[r]))return!1;return!0},add:Ember.aliasMethod("addObject"),remove:Ember.aliasMethod("removeObject"),pop:function(){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);var t=this.length>0?this[this.length-1]:null;return this.remove(t),t},push:Ember.aliasMethod("addObject"),shift:Ember.aliasMethod("pop"),unshift:Ember.aliasMethod("push"),addEach:Ember.aliasMethod("addObjects"),removeEach:Ember.aliasMethod("removeObjects"),init:function(e){this._super(),e&&this.addObjects(e)},nextObject:function(e){return this[e]},firstObject:Ember.computed(function(){return this.length>0?this[0]:void 0}),lastObject:Ember.computed(function(){return this.length>0?this[this.length-1]:void 0}),addObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a=r(i),s=this[a],u=e(this,"length");return s>=0&&u>s&&this[s]===i?this:(o=[i],this.enumerableContentWillChange(null,o),Ember.propertyWillChange(this,"lastObject"),u=e(this,"length"),this[a]=u,this[u]=i,t(this,"length",u+1),Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(null,o),this)},removeObject:function(i){if(e(this,"isFrozen"))throw new Ember.Error(Ember.FROZEN_ERROR);if(n(i))return this;var o,a,s=r(i),u=this[s],l=e(this,"length"),c=0===u,h=u===l-1;return u>=0&&l>u&&this[u]===i&&(a=[i],this.enumerableContentWillChange(a,null),c&&Ember.propertyWillChange(this,"firstObject"),h&&Ember.propertyWillChange(this,"lastObject"),l-1>u&&(o=this[l-1],this[u]=o,this[r(o)]=u),delete this[s],delete this[l-1],t(this,"length",l-1),c&&Ember.propertyDidChange(this,"firstObject"),h&&Ember.propertyDidChange(this,"lastObject"),this.enumerableContentDidChange(a,null)),this},contains:function(e){return this[r(e)]>=0},copy:function(){var n=this.constructor,i=new n,o=e(this,"length");for(t(i,"length",o);--o>=0;)i[o]=this[o],i[r(this[o])]=o;return i},toString:function(){var e,t=this.length,r=[];for(e=0;t>e;e++)r[e]=this[e];return i("Ember.Set<%@>",[r.join(",")])}})}(),function(){var e=Ember.DeferredMixin,t=(Ember.get,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"),a=e(this,"sortAscending"),s=e(this,"sortFunction");return t(o,function(t){0===i&&(i=s(e(r,t),e(n,t)),0===i||a||(i=-1*i))}),i},destroy:function(){var r=e(this,"content"),n=e(this,"sortProperties");return r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()},isSorted:Ember.computed.bool("sortProperties"),arrangedContent:Ember.computed("content","sortProperties.@each",function(){var r=e(this,"content"),n=e(this,"isSorted"),i=e(this,"sortProperties"),o=this;return r&&n?(r=r.slice(),r.sort(function(e,t){return o.orderBy(e,t)}),t(r,function(e){t(i,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),Ember.A(r)):r}),_contentWillChange:Ember.beforeObserver("content",function(){var r=e(this,"content"),n=e(this,"sortProperties");r&&n&&t(r,function(e){t(n,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this),this._super()}),sortAscendingWillChange:Ember.beforeObserver("sortAscending",function(){this._lastSortAscending=e(this,"sortAscending")}),sortAscendingDidChange:Ember.observer("sortAscending",function(){if(e(this,"sortAscending")!==this._lastSortAscending){var t=e(this,"arrangedContent");t.reverseObjects()}}),contentArrayWillChange:function(r,n,i,o){var a=e(this,"isSorted");if(a){var s=e(this,"arrangedContent"),u=r.slice(n,n+i),l=e(this,"sortProperties");t(u,function(e){s.removeObject(e),t(l,function(t){Ember.removeObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},contentArrayDidChange:function(r,n,i,o){var a=e(this,"isSorted"),s=e(this,"sortProperties");if(a){var u=r.slice(n,n+o);t(u,function(e){this.insertItemSorted(e),t(s,function(t){Ember.addObserver(e,t,this,"contentItemSortPropertyDidChange")},this)},this)}return this._super(r,n,i,o)},insertItemSorted:function(t){var r=e(this,"arrangedContent"),n=e(r,"length"),i=this._binarySearch(t,0,n);r.insertAt(i,t)},contentItemSortPropertyDidChange:function(t){var r=e(this,"arrangedContent"),n=r.indexOf(t),i=r.objectAt(n-1),o=r.objectAt(n+1),a=i&&this.orderBy(t,i),s=o&&this.orderBy(t,o);(0>a||s>0)&&(r.removeObject(t),this.insertItemSorted(t))},_binarySearch:function(t,r,n){var i,o,a,s;return r===n?r:(s=e(this,"arrangedContent"),i=r+Math.floor((n-r)/2),o=s.objectAt(i),a=this.orderBy(o,t),0>a?this._binarySearch(t,i+1,n):a>0?this._binarySearch(t,r,i):i)}})}(),function(){var e=Ember.get,t=(Ember.set,Ember.EnumerableUtils.forEach),r=Ember.EnumerableUtils.replace;Ember.ArrayController=Ember.ArrayProxy.extend(Ember.ControllerMixin,Ember.SortableMixin,{itemController:null,lookupItemController:function(){return e(this,"itemController")},objectAtContent:function(t){var r=e(this,"length"),n=e(this,"arrangedContent"),i=n&&n.objectAt(t);if(t>=0&&r>t){var o=this.lookupItemController(i);if(o)return this.controllerAt(t,i,o)}return i},arrangedContentDidChange:function(){this._super(),this._resetSubControllers()},arrayContentDidChange:function(n,i,o){var a=e(this,"_subControllers"),s=a.slice(n,n+i);t(s,function(e){e&&e.destroy()}),r(a,n,i,new Array(o)),this._super(n,i,o)},init:function(){this._super(),this.set("_subControllers",Ember.A())},content:Ember.computed(function(){return Ember.A()}),_isVirtual:!1,controllerAt:function(t,r,n){var i,o=e(this,"container"),a=e(this,"_subControllers"),s=a[t];if(s)return s;if(i="controller:"+n,!o.has(i))throw new Ember.Error('Could not resolve itemController: "'+n+'"');var u;return this._isVirtual&&(u=e(this,"parentController")),u=u||this,s=o.lookupFactory(i).create({target:this,parentController:u,content:r}),a[t]=s,s},_subControllers:null,_resetSubControllers:function(){var r=e(this,"_subControllers");r&&t(r,function(e){e&&e.destroy()}),this.set("_subControllers",Ember.A())}})}(),function(){Ember.ObjectController=Ember.ObjectProxy.extend(Ember.ControllerMixin)}(),function(){var e=this&&this.jQuery||Ember.imports&&Ember.imports.jQuery;e||"function"!=typeof r||(e=r("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="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML
14
+ }(),r="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="Test: <script type='text/x-placeholder'></script>Value","Test:"===e.childNodes[0].nodeValue&&" Value"===e.childNodes[2].nodeValue}(),n=function(e,t){if(e.getAttribute("id")===t)return e;var r,i,o,a=e.childNodes.length;for(r=0;a>r;r++)if(i=e.childNodes[r],o=1===i.nodeType&&n(i,t))return o},i=function(e,i){t&&(i="&shy;"+i);var o=[];if(r&&(i=i.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,r,n){return o.push([n,t]),r})),e.innerHTML=i,o.length>0){var a,s=o.length;for(a=0;s>a;a++){var u=n(e,o[a][0]),l=document.createTextNode(o[a][1]);u.parentNode.insertBefore(l,u)}}if(t){for(var c=e.firstChild;1===c.nodeType&&!c.nodeName;)c=c.firstChild;3===c.nodeType&&"­"===c.nodeValue.charAt(0)&&(c.nodeValue=c.nodeValue.slice(1))}},o={},a=function(e){if(void 0!==o[e])return o[e];var t=!0;if("select"===e.toLowerCase()){var r=document.createElement("select");i(r,'<option value="test">Test</option>'),t=1===r.options.length}return o[e]=t,t},s=function(e,t){var r=e.tagName;if(a(r))i(e,t);else{var n=e.outerHTML||(new XMLSerializer).serializeToString(e),o=n.match(new RegExp("<"+r+"([^>]*)>","i"))[0],s="</"+r+">",u=document.createElement("div");for(i(u,o+t+s),e=u.firstChild;e.tagName!==r;)e=e.nextSibling}return e};Ember.ViewUtils={setInnerHTML:s,isSimpleClick:e}}(),function(){function e(e){return e?n.test(e)?e.replace(i,""):e:e}function t(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r=function(e){return t[e]||"&amp;"},n=e.toString();return a.test(n)?n.replace(o,r):n}var r=(Ember.get,Ember.set,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,a=/[&<>"'`]/,s=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.elementClasses=null;var t,r=e.length;for(t=0;r>t;t++)this.addClass(e[t])},id:function(e){return this.elementId=e,this},attr:function(e,t){var r=this.elementAttributes=this.elementAttributes||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeAttr:function(e){var t=this.elementAttributes;return t&&delete t[e],this},prop:function(e,t){var r=this.elementProperties=this.elementProperties||{};return 1===arguments.length?r[e]:(r[e]=t,this)},removeProp:function(e){var t=this.elementProperties;return t&&delete t[e],this},style:function(e,t){return this.elementStyle=this.elementStyle||{},this.elementStyle[e]=t,this},begin:function(e){return this.tagNames.push(e||null),this},pushOpeningTag:function(){var r=this.currentTagName();if(r){if(this._hasElement&&!this._element&&0===this.buffer.length)return this._element=this.generateElement(),void 0;var n,i,o=this.buffer,a=this.elementId,s=this.classes,u=this.elementAttributes,l=this.elementProperties,c=this.elementStyle;if(o+="<"+e(r),a&&(o+=' id="'+t(a)+'"',this.elementId=null),s&&(o+=' class="'+t(s.join(" "))+'"',this.classes=null,this.elementClasses=null),c){o+=' style="';for(i in c)c.hasOwnProperty(i)&&(o+=i+":"+t(c[i])+";");o+='"',this.elementStyle=null}if(u){for(n in u)u.hasOwnProperty(n)&&(o+=" "+n+'="'+t(u[n])+'"');this.elementAttributes=null}if(l){for(i in l)if(l.hasOwnProperty(i)){var h=l[i];(h||"number"==typeof h)&&(o+=h===!0?" "+i+'="'+i+'"':" "+i+'="'+t(l[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(),a=this.elementId,u=this.classes,l=this.elementAttributes,c=this.elementProperties,h=this.elementStyle,m="";i=l&&l.name&&!s?"<"+e(o)+' name="'+t(l.name)+'">':o;var p=document.createElement(i),f=Ember.$(p);if(a&&(f.attr("id",a),this.elementId=null),u&&(f.attr("class",u.join(" ")),this.classes=null,this.elementClasses=null),h){for(n in h)h.hasOwnProperty(n)&&(m+=n+":"+h[n]+";");f.attr("style",m),this.elementStyle=null}if(l){for(r in l)l.hasOwnProperty(r)&&f.attr(r,l[r]);this.elementAttributes=null}if(c){for(n in c)c.hasOwnProperty(n)&&f.prop(n,c[n]);this.elementProperties=null}return p},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){var i=Ember.View.views[this.id],o=!0,a=null;return a=n._findNearestEventManager(i,r),a&&a!==t?o=n._dispatchEvent(a,e,r,i):i?o=n._bubbleEvent(i,e,r):e.stopPropagation(),o}),e.on(t+".ember","[data-ember-action]",function(e){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})},_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(e,o,t,n),t.stopPropagation()):i=this._bubbleEvent(n,t,r),i},_bubbleEvent:function(e,t,r){return Ember.run(e,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(){function e(e){e.buffer=null}function t(){Ember.run.once(Ember.View,"notifyMutationListeners")}var r={},n=Ember.get,i=Ember.set,o=Ember.guidFor,a=Ember.EnumerableUtils.forEach,s=Ember.EnumerableUtils.addObject,u=Ember.meta,l=Ember.defineProperty,c=Ember.computed(function(){var e=this._childViews,t=Ember.A(),r=this;return a(e,function(e){var r;e.isVirtual?(r=n(e,"childViews"))&&t.pushObjects(r):t.push(e)}),t.replace=function(e,t,n){if(r instanceof Ember.ContainerView)return r.replace(e,t,n);throw new Ember.Error("childViews is immutable")},t});Ember.TEMPLATES={},Ember.CoreView=Ember.Object.extend(Ember.Evented,Ember.ActionHandler,{isView:!0,states:r,init:function(){this._super(),this.transitionTo("preRender"),this._isVisible=n(this,"isVisible")},parentView:Ember.computed("_parentView",function(){var e=this._parentView;return e&&e.isVirtual?n(e,"parentView"):e}),state:null,_parentView:null,concreteView:Ember.computed("parentView",function(){return this.isVirtual?n(this,"parentView"):this}),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 h=Ember._ViewCollection=function(e){var t=this.views=e||[];this.length=t.length};h.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 a(t,e)},clear:function(){this.length=0,this.views.length=0}};var m=[];Ember.View=Ember.CoreView.extend({concatenatedProperties:["classNames","classNameBindings","attributeBindings"],isView:!0,templateName:null,layoutName:null,template:Ember.computed("templateName",function(e,t){if(void 0!==t)return t;var r=n(this,"templateName"),i=this.templateForName(r,"template");return i||n(this,"defaultTemplate")}),controller:Ember.computed("_parentView",function(){var e=n(this,"_parentView");return e?n(e,"controller"):null}),layout:Ember.computed(function(){var e=n(this,"layoutName"),t=this.templateForName(e,"layout");return t||n(this,"defaultLayout")}).property("layoutName"),_yield:function(e,t){var r=n(this,"template");r&&r(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?(i(this,"_context",t),t):n(this,"_context")}).volatile(),_context:Ember.computed(function(){var e,t;return(t=n(this,"controller"))?t:(e=this._parentView,e?n(e,"_context"):null)}),_contextDidChange:Ember.observer("context",function(){this.rerender()}),isVisible:!0,childViews:c,_childViews:m,_childViewsWillChange:Ember.beforeObserver("childViews",function(){if(this.isVirtual){var e=n(this,"parentView");e&&Ember.propertyWillChange(e,"childViews")}}),_childViewsDidChange:Ember.observer("childViews",function(){if(this.isVirtual){var e=n(this,"parentView");e&&Ember.propertyDidChange(e,"childViews")}}),nearestInstanceOf:function(e){for(var t=n(this,"parentView");t;){if(t instanceof e)return t;t=n(t,"parentView")}},nearestOfType:function(e){for(var t=n(this,"parentView"),r=e instanceof Ember.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(r(t))return t;t=n(t,"parentView")}},nearestWithProperty:function(e){for(var t=n(this,"parentView");t;){if(e in t)return t;t=n(t,"parentView")}},nearestChildOf:function(e){for(var t=n(this,"parentView");t;){if(n(t,"parentView")instanceof e)return t;t=n(t,"parentView")}},_parentViewDidChange:Ember.observer("_parentView",function(){this.isDestroying||(this.trigger("parentViewDidChange"),n(this,"parentView.controller")&&!n(this,"controller")&&this.notifyPropertyChange("controller"))}),_controllerDidChange:Ember.observer("controller",function(){this.isDestroying||(this.rerender(),this.forEachChildView(function(e){e.propertyDidChange("controller")}))}),cloneKeywords:function(){var e=n(this,"templateData"),t=e?Ember.copy(e.keywords):{};return i(t,"view",n(this,"concreteView")),i(t,"_view",this),i(t,"controller",n(this,"controller")),t},render:function(e){var t=n(this,"layout")||n(this,"template");if(t){var r,i=n(this,"context"),o=this.cloneKeywords(),a={view:this,buffer:e,isRenderData:!0,keywords:o,insideGroup:n(this,"templateData.insideGroup")};r=t(i,{data:a}),void 0!==r&&e.push(r)}},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;a(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)},_unspecifiedAttributeBindings:null,_applyAttributeBindings:function(e,t){var r,i=this._unspecifiedAttributeBindings=this._unspecifiedAttributeBindings||{};a(t,function(t){var o=t.split(":"),a=o[0],s=o[1]||a;a in this?(this._setupAttributeBindingObservation(a,s),r=n(this,a),Ember.View.applyAttributeBindings(e,s,r)):i[a]=s},this),this.setUnknownProperty=this._setUnknownProperty},_setupAttributeBindingObservation:function(e,t){var r,i,o=function(){i=this.$(),r=n(this,e),Ember.View.applyAttributeBindings(i,t,r)};this.registerObserver(this,e,o)},setUnknownProperty:null,_setUnknownProperty:function(e,t){var r=this._unspecifiedAttributeBindings&&this._unspecifiedAttributeBindings[e];return r&&this._setupAttributeBindingObservation(e,r),l(this,e),i(this,e,t)},_classStringForProperty:function(e){var t=Ember.View._parsePropertyPath(e),r=t.path,i=n(this,r);return void 0===i&&Ember.isGlobalPath(r)&&(i=n(Ember.lookup,r)),Ember.View._classStringForValue(r,i,t.className,t.falsyClassName)},element:Ember.computed("_parentView",function(e,t){return void 0!==t?this.currentState.setElement(this,t):this.currentState.getElement(this)}),$: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(n(this,"element"))return this;var e=this.renderToBuffer();return i(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 a=0,s=r.length;s>a;a++)n=r[a],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,a=t.length;a>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 h([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("element",function(){this.forEachChildView(function(e){delete u(e).cache.element})}),parentViewDidChange:Ember.K,instrumentName:"view",instrumentDetails:function(e){e.template=n(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=n(this,"classNameBindings");t.length&&this._applyClassNameBindings(t);var r=n(this,"attributeBindings");r.length&&this._applyAttributeBindings(e,r),e.setClasses(this.classNames),e.id(this.elementId);var i=n(this,"ariaRole");i&&e.attr("role",i),n(this,"isVisible")===!1&&e.style("display","none")},tagName:null,ariaRole:null,classNames:["ember-view"],classNameBindings:m,attributeBindings:m,init:function(){this.elementId=this.elementId||o(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){i(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,r=this._childViews,i=n(this,"parentView"),o=this.viewName;if(this._super()){for(e=r.length,t=e-1;t>=0;t--)r[t].removedFromDOM=!0;for(o&&i&&i.set(o,null),e=r.length,t=e-1;t>=0;t--)r[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||n(this,"templateData"),t.container=this.container,e=e.create(t),e.viewName&&i(n(this,"concreteView"),e.viewName,e);else if("string"==typeof e){var r="view:"+e,o=this.container.lookupFactory(r);t.templateData=n(this,"templateData"),e=o.create(t)}else t.container=this.container,n(e,"templateData")||(t.templateData=n(this,"templateData")),Ember.setProperties(e,t);return e},becameVisible:Ember.K,becameHidden:Ember.K,_isVisibleDidChange:Ember.observer("isVisible",function(){this._isVisible!==n(this,"isVisible")&&Ember.run.scheduleOnce("render",this,this._toggleVisibility)}),_toggleVisibility:function(){var e=this.$();if(e){var t=n(this,"isVisible");this._isVisible!==t&&(e.toggle(t),this._isVisible=t,this._isAncestorHidden()||(t?this._notifyBecameVisible():this._notifyBecameHidden()))}},_notifyBecameVisible:function(){this.trigger("becameVisible"),this.forEachChildView(function(e){var t=n(e,"isVisible");(t||null===t)&&e._notifyBecameVisible()})},_notifyBecameHidden:function(){this.trigger("becameHidden"),this.forEachChildView(function(e){var t=n(e,"isVisible");(t||null===t)&&e._notifyBecameHidden()})},_isAncestorHidden:function(){for(var e=n(this,"parentView");e;){if(n(e,"isVisible")===!1)return!0;e=n(e,"parentView")}return!1},clearBuffer:function(){this.invokeRecursively(e)},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)},a=function(){Ember.run.scheduleOnce("render",this,o)};Ember.addObserver(e,t,r,a),this.one("willClearRender",function(){Ember.removeObserver(e,t,r,a)})}}});var p={prepend:function(e,r){e.$().prepend(r),t()},after:function(e,r){e.$().after(r),t()},html:function(e,r){e.$().html(r),t()},replace:function(e){var r=n(e,"element");i(e,"element",null),e._insertElementLater(function(){Ember.$(r).replaceWith(n(e,"element")),t()})},remove:function(e){e.$().remove(),t()},empty:function(e){e.$().empty(),t()}};Ember.View.reopen({domManager:p}),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 f=Ember.Object.extend(Ember.Evented).create();Ember.View.addMutationListener=function(e){f.on("change",e)},Ember.View.removeMutationListener=function(e){f.off("change",e)},Ember.View.notifyMutationListeners=function(){f.trigger("change")},Ember.View.views={},Ember.View.childViewsProperty=c,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===!1?(e.removeAttr(t),e.prop(t,"")):r!==e.prop(t)&&e.prop(t,r):r||e.removeAttr(t):r!==e.attr(t)&&e.attr(t,r)},Ember.View.states=r}(),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);var n=e.get("element");document.body.contains(n)&&(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(){var e=(Ember.get,Ember.set,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)}})}(),function(){var e=Ember.View.states.hasElement,t=Ember.View.states.inDOM=Ember.create(e);Ember.merge(t,{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("currentView",function(){var e=r(this,"currentView");e&&e.destroy()}),_currentViewDidChange:Ember.observer("currentView",function(){var e=r(this,"currentView");e&&this.pushObject(e)}),_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,a,s,u=t._childViews,l=new o;for(r=0,n=u.length;n>r;r++)i=u[r],s||(s=Ember.RenderBuffer(),s._hasElement=!1),i.renderToBufferIfNeeded(s)?l.push(i):l.length?(e(t,l,a,s),s=null,a=i,l.clear()):a=i;l.length&&e(t,l,a,s)}})}(),function(){{var e=Ember.get,t=Ember.set;Ember.String.fmt}Ember.CollectionView=Ember.ContainerView.extend({content:null,emptyViewClass:Ember.View,emptyView:null,itemViewClass:Ember.View,init:function(){var e=this._super();return this._contentDidChange(),e},_contentWillChange:Ember.beforeObserver("content",function(){var t=this.get("content");t&&t.removeArrayObserver(this);var r=t?e(t,"length"):0;this.arrayWillChange(t,0,r)}),_contentDidChange:Ember.observer("content",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)}),_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,a,s,u=this._childViews;s=this._childViews.length;var l=n===s;for(l&&(this.currentState.empty(this),this.invokeRecursively(function(e){e.removedFromDOM=!0},!1)),a=r+n-1;a>=r;a--)o=u[a],o.destroy()},arrayDidChange:function(r,n,i,o){var a,s,u,l,c,h,m=[];if(l=r?e(r,"length"):0)for(c=e(this,"itemViewClass"),"string"==typeof c&&(c=e(c)||c),u=n;n+o>u;u++)s=r.objectAt(u),a=this.createChildView(c,{content:s,contentIndex:u}),m.push(a);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(){Ember.ComponentTemplateDeprecation=Ember.Mixin.create({willMergeMixin:function(e){this._super.apply(this,arguments);var t,r,n=e.layoutName||e.layout;e.templateName&&!n&&(t="templateName",r="layoutName",e.layoutName=e.templateName,delete e.templateName),e.template&&!n&&(t="template",r="layout",e.layout=e.template,delete e.template)}})}(),function(){var e=Ember.get,t=Ember.set,r=(Ember.isNone,Array.prototype.slice);Ember.Component=Ember.View.extend(Ember.TargetActionSupport,Ember.ComponentTemplateDeprecation,{init:function(){this._super(),t(this,"context",this),t(this,"controller",this)},defaultLayout:function(e,t){Ember.Handlebars.helpers.yield.call(e,t)},template:Ember.computed(function(t,r){if(void 0!==r)return r;var n=e(this,"templateName"),i=this.templateForName(n,"template");return i||e(this,"defaultTemplate")}).property("templateName"),templateName:null,cloneKeywords:function(){return{view:this,controller:this}},_yield:function(t,r){var n=r.data.view,i=this._parentView,o=e(this,"template");
15
+ 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: ©2014 Tilde, Inc. All rights reserved.
16
+ var e=function(){},t=0,r=function(){return"undefined"!=typeof MetamorphENV?MetamorphENV.DISABLE_RANGE_API:"undefined"!==ENV?ENV.DISABLE_RANGE_API:!1}(),n=!r&&"undefined"!=typeof document&&"createRange"in document&&"undefined"!=typeof Range&&Range.prototype.createContextualFragment,i="undefined"!=typeof document&&function(){var e=document.createElement("div");return e.innerHTML="<div></div>",e.firstChild.innerHTML="<script></script>",""===e.firstChild.innerHTML}(),o=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}(),a=function(r){var n;n=this instanceof a?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=a.prototype;var s,u,l,c,h,m,p,f,d;if(c=function(){return this.startTag()+this.innerHTML+this.endTag()},f=function(){return"<script id='"+this.start+"' type='text/x-placeholder'></script>"},d=function(){return"<script id='"+this.end+"' type='text/x-placeholder'></script>"},n)s=function(e,t){var r=document.createRange(),n=document.getElementById(e.start),i=document.getElementById(e.end);return t?(r.setStartBefore(n),r.setEndAfter(i)):(r.setStartAfter(n),r.setEndBefore(i)),r},u=function(e,t){var r=s(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},l=function(){var e=s(this,!0);e.deleteContents()},h=function(e){var t=document.createRange();t.setStart(e),t.collapse(!1);var r=t.createContextualFragment(this.outerHTML());e.appendChild(r)},m=function(e){var t=document.createRange(),r=document.getElementById(this.end);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)},p=function(e){var t=document.createRange(),r=document.getElementById(this.start);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)};else{var b={select:[1,"<select multiple='multiple'>","</select>"],fieldset:[1,"<fieldset>","</fieldset>"],table:[1,"<table>","</table>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"],colgroup:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],map:[1,"<map>","</map>"],_default:[0,"",""]},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},E=function(e,t){var r=[];if(o&&(t=t.replace(/(\s+)(<script id='([^']+)')/g,function(e,t,n,i){return r.push([i,t]),n})),e.innerHTML=t,r.length>0){var n,i=r.length;for(n=0;i>n;n++){var a=v(e,r[n][0]),s=document.createTextNode(r[n][1]);a.parentNode.insertBefore(s,a)}}},g=function(e,t){var r=b[e.tagName.toLowerCase()]||b._default,n=r[0],o=r[1],a=r[2];i&&(t="&shy;"+t);var s=document.createElement("div");E(s,o+t+a);for(var u=0;n>=u;u++)s=s.firstChild;if(i){for(var l=s;1===l.nodeType&&!l.nodeName;)l=l.firstChild;3===l.nodeType&&"­"===l.nodeValue.charAt(0)&&(l.nodeValue=l.nodeValue.slice(1))}return s},y=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)};u=function(e,t){var r,n,i,o=y(document.getElementById(this.start)),a=document.getElementById(this.end),s=a.parentNode;for(_(o,a),r=o.nextSibling;r;){if(n=r.nextSibling,i=r===a){if(!t)break;a=r.nextSibling}if(r.parentNode.removeChild(r),i)break;r=n}for(r=g(o.parentNode,e),t&&o.parentNode.removeChild(o);r;)n=r.nextSibling,s.insertBefore(r,a),r=n},l=function(){var e=y(document.getElementById(this.start)),t=document.getElementById(this.end);this.html(""),e.parentNode.removeChild(e),t.parentNode.removeChild(t)},h=function(e){for(var t,r=g(e,this.outerHTML());r;)t=r.nextSibling,e.appendChild(r),r=t},m=function(e){var t,r,n=document.getElementById(this.end),i=n.nextSibling,o=n.parentNode;for(r=g(o,e);r;)t=r.nextSibling,o.insertBefore(r,i),r=t},p=function(e){var t,r,n=document.getElementById(this.start),i=n.parentNode;r=g(i,e);for(var o=n.nextSibling;r;)t=r.nextSibling,i.insertBefore(r,o),r=t}}return a.prototype.html=function(e){return this.checkRemoved(),void 0===e?this.innerHTML:(u.call(this,e),this.innerHTML=e,void 0)},a.prototype.replaceWith=function(e){this.checkRemoved(),u.call(this,e,!0)},a.prototype.remove=l,a.prototype.outerHTML=c,a.prototype.appendTo=h,a.prototype.after=m,a.prototype.prepend=p,a.prototype.startTag=f,a.prototype.endTag=d,a.prototype.isRemoved=function(){var e=document.getElementById(this.start),t=document.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=Ember.imports&&Ember.imports.Handlebars||this&&this.Handlebars;t||"function"!=typeof r||(t=r("handlebars")),Ember.Handlebars=e(t),Ember.Handlebars.helper=function(e,t){Ember.View.detect(t)?Ember.Handlebars.registerHelper(e,Ember.Handlebars.makeViewHelper(t)):Ember.Handlebars.registerBoundHelper.apply(null,arguments)},Ember.Handlebars.makeViewHelper=function(e){return function(t){return Ember.Handlebars.helpers.view.call(this,e,t)}},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 n=/helpers\.(.*?)\)/,i=/helpers\['(.*?)'/,o=/(.*blockHelperMissing\.call\(.*)(stack[0-9]+)(,.*)/;Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation=function(e){var t=e[e.length-1],r=(n.exec(t)||i.exec(t))[1],a=o.exec(t);e[e.length-1]=a[1]+"'"+r+"'"+a[3]};var a=Ember.Handlebars.JavaScriptCompiler.stringifyLastBlockHelperMissingInvocation,s=Ember.Handlebars.JavaScriptCompiler.prototype.blockValue;Ember.Handlebars.JavaScriptCompiler.prototype.blockValue=function(){s.apply(this,arguments),a(this.source)};var u=Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue;Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue=function(){u.apply(this,arguments),a(this.source)},Ember.Handlebars.Compiler.prototype.mustache=function(e){if(!e.params.length&&!e.hash){var r=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([r].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,"bind-attr":!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),a=Ember.Handlebars.template(o);return a.isMethod=!1,a})}(),function(){function e(e,r,n,i){var o,a,s,u,l,c=[],h=i.hash,m=h.boundOptions,p=t.call(i.types,1);for(l in m)m.hasOwnProperty(l)&&(h[l]=Ember.Handlebars.get(e,m[l],i));for(o=0,a=n.length;a>o;++o)s=n[o],u=p[o],"ID"===u?c.push(Ember.Handlebars.get(s.root,s.path,i)):c.push(s.path);return c.push(i),r.apply(e,c)}var t=Array.prototype.slice,r=Ember.Handlebars.template,n=Ember.Handlebars.normalizePath=function(e,t,r){var n,i,o=r&&r.keywords||{};return n=t.split(".",1)[0],o.hasOwnProperty(n)&&(e=o[n],i=!0,t=t===n?"":t.substr(n.length+1)),{root:e,path:t,isKeyword:i}},i=Ember.Handlebars.get=function(e,t,r){var i,o=r&&r.data,a=n(e,t,o);return e=a.root,t=a.path,i=Ember.get(e,t),void 0===i&&e!==Ember.lookup&&Ember.isGlobalPath(t)&&(i=Ember.get(Ember.lookup,t)),i};Ember.Handlebars.getEscaped=function(e,t,r){var n=i(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},Ember.Handlebars.resolveParams=function(e,t,r){for(var n,o,a=[],s=r.types,u=0,l=t.length;l>u;u++)n=t[u],o=s[u],"ID"===o?a.push(i(e,n,r)):a.push(n);return a},Ember.Handlebars.resolveHash=function(e,t,r){var n,o={},a=r.hashTypes;for(var s in t)t.hasOwnProperty(s)&&(n=a[s],o[s]="ID"===n?i(e,t[s],r):t[s]);return o},Ember.Handlebars.registerHelper("helperMissing",function(e){var r,n="",i=arguments[arguments.length-1],o=Ember.Handlebars.resolveHelper(i.data.view.container,e);if(o)return o.apply(this,t.call(arguments,1));throw r="%@ Handlebars error: Could not find property '%@' on object %@.",i.data&&(n=i.data.view),new Ember.Error(Ember.String.fmt(r,[n,e,this]))}),Ember.Handlebars.registerHelper("blockHelperMissing",function(e){var r=arguments[arguments.length-1],n=Ember.Handlebars.resolveHelper(r.data.view.container,e);return n?n.apply(this,t.call(arguments,1)):Handlebars.helpers.helperMissing.call(this,e)}),Ember.Handlebars.registerBoundHelper=function(e){var r=t.call(arguments,1),n=Ember.Handlebars.makeBoundHelper.apply(this,r);Ember.Handlebars.registerHelper(e,n)},Ember.Handlebars.makeBoundHelper=function(r){function i(){var i,a,s,u,l,c=t.call(arguments,0,-1),h=c.length,m=arguments[arguments.length-1],p=[],f=m.data,d=f.isUnbound?t.call(m.types,1):m.types,b=m.hash,v=f.view,E=m.contexts,g=E&&E.length?E[0]:this,y="",_=Ember._SimpleHandlebarsView.prototype.normalizedValue,w=b.boundOptions={};for(s in b)Ember.IS_BINDING.test(s)&&(w[s.slice(0,-7)]=b[s]);var C=[];for(f.properties=[],i=0;h>i;++i)if(f.properties.push(c[i]),"ID"===d[i]){var O=n(g,c[i],f);p.push(O),C.push(O)}else f.isUnbound?p.push({path:c[i]}):p.push(null);if(f.isUnbound)return e(this,r,p,m);var A=new Ember._SimpleHandlebarsView(null,null,!m.hash.unescaped,m.data);A.normalizedValue=function(){var e,t=[];for(e in w)w.hasOwnProperty(e)&&(l=n(g,w[e],f),A.path=l.path,A.pathRoot=l.root,b[e]=_.call(A));for(i=0;h>i;++i)l=p[i],l?(A.path=l.path,A.pathRoot=l.root,t.push(_.call(A))):t.push(c[i]);return t.push(m),r.apply(g,t)},v.appendChild(A);for(u in w)w.hasOwnProperty(u)&&C.push(n(g,w[u],f));for(i=0,a=C.length;a>i;++i)l=C[i],v.registerObserver(l.root,l.path,A,A.rerender);if("ID"===d[0]&&0!==p.length){var P=p[0],x=P.root,T=P.path;Ember.isEmpty(T)||(y=T+".");for(var S=0,V=o.length;V>S;S++)v.registerObserver(x,y+o[S],A,A.rerender)}}var o=t.call(arguments,1);return i._rawFunction=r,i},Ember.Handlebars.template=function(e){var t=r(e);return t.isTop=!0,t}}(),function(){Ember.String.htmlSafe=function(e){return new Handlebars.SafeString(e)};var e=Ember.String.htmlSafe;(Ember.EXTEND_PROTOTYPES===!0||Ember.EXTEND_PROTOTYPES.String)&&(String.prototype.htmlSafe=function(){return e(this)})}(),function(){Ember.Handlebars.resolvePaths=function(e){for(var t=[],r=e.contexts,n=e.roots,i=e.data,o=0,a=r.length;a>o;o++)t.push(Ember.Handlebars.get(n[o],r[o],{data:i}));return t}}(),function(){function e(){Ember.run.once(Ember.View,"notifyMutationListeners")}var r=(Ember.set,Ember.get,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 a=Ember.View.cloneStates(Ember.View.states),s=Ember.merge;s(a._default,{rerenderIfNeeded:Ember.K}),s(a.inDOM,{rerenderIfNeeded:function(e){e.normalizedValue()!==e._lastNormalizedValue&&e.rerender()}}),Ember._HandlebarsBoundView=Ember._MetamorphView.extend({instrumentName:"boundHandlebars",states:a,shouldDisplayFunc:null,preserveContext:!1,previousContext:null,displayTemplate:null,inverseTemplate:null,path:null,pathRoot:null,normalizedValue:function(){var e,t,n=r(this,"path"),o=r(this,"pathRoot"),a=r(this,"valueNormalizerFunc");return""===n?e=o:(t=r(this,"templateData"),e=i(o,n,{data:t})),a?a(e):e},rerenderIfNeeded:function(){this.currentState.rerenderIfNeeded(this)},render:function(e){var t=r(this,"isEscaped"),i=r(this,"shouldDisplayFunc"),o=r(this,"preserveContext"),a=r(this,"previousContext"),s=r(this,"_contextController"),u=r(this,"inverseTemplate"),l=r(this,"displayTemplate"),c=this.normalizedValue();if(this._lastNormalizedValue=c,i(c))if(n(this,"template",l),o)n(this,"_context",a);else{if(!l)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;s&&(n(s,"content",c),c=s),n(this,"_context",c)}else u?(n(this,"template",u),o?n(this,"_context",a):n(this,"_context",c)):n(this,"template",function(){return""});return this._super(e)}})}(),function(){function e(e){return!Ember.isNone(e)}function t(e,t,r,n,i,u){var l,c,h,m=t.data,p=t.fn,f=t.inverse,d=m.view,b=this;if(l=a(b,e,m),"object"==typeof this){if(m.insideGroup){c=function(){Ember.run.once(d,"rerender")};var v,E,g=o(b,e,t);g=i?i(g):g,E=r?b:g,n(g)?v=p:f&&(v=f),v(E,{data:t.data})}else{var y=d.createChildView(Ember._HandlebarsBoundView,{preserveContext:r,shouldDisplayFunc:n,valueNormalizerFunc:i,displayTemplate:p,inverseTemplate:f,path:e,pathRoot:b,previousContext:b,isEscaped:!t.hash.unescaped,templateData:t.data});t.hash.controller&&y.set("_contextController",this.container.lookupFactory("controller:"+t.hash.controller).create({container:b.container,parentController:b,target:b})),d.appendChild(y),c=function(){Ember.run.scheduleOnce("render",y,"rerenderIfNeeded")}}if(""!==l.path&&(d.registerObserver(l.root,l.path,c),u))for(h=0;h<u.length;h++)d.registerObserver(l.root,l.path+"."+u[h],c)}else m.buffer.push(s(b,e,t))}function r(e,t,r){var n,i,o,u,l=r.data,c=l.view;if(n=a(e,t,l),o=n.root,o&&"object"==typeof o){if(l.insideGroup)i=function(){Ember.run.once(c,"rerender")},u=s(e,t,r),l.buffer.push(u);else{var h=new Ember._SimpleHandlebarsView(t,e,!r.hash.unescaped,r.data);h._parentView=c,c.appendChild(h),i=function(){Ember.run.scheduleOnce("render",h,"rerender")}}""!==n.path&&c.registerObserver(n.root,n.path,i)}else u=s(e,t,r),l.buffer.push(u)}function n(e){var t=e&&i(e,"isTruthy");return"boolean"==typeof t?t:Ember.isArray(e)?0!==i(e,"length"):!!e}var i=Ember.get,o=(Ember.set,Ember.String.fmt,Ember.Handlebars.get),a=Ember.Handlebars.normalizePath,s=Ember.Handlebars.getEscaped,u=Ember.ArrayPolyfills.forEach,l=Ember.create,c=Ember.Handlebars,h=c.helpers;c.bind=t,c.registerHelper("_triageMustache",function(e,t){if(h[e])return h[e].call(this,t);var r=Ember.Handlebars.resolveHelper(t.data.view.container,e);return r?r.call(this,t):h.bind.call(this,e,t)}),Ember.Handlebars.resolveHelper=function(e,t){if(e&&-1!==t.indexOf("-")){var r=e.lookup("helper:"+t);if(!r){var n=e.lookup("component-lookup:main"),i=n.lookupFactory(t,e);i&&(r=c.makeViewHelper(i),e.register("helper:"+t,r))}return r}},c.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)}),c.registerHelper("boundIf",function(e,r){var i=r.contexts&&r.contexts.length?r.contexts[0]:this;return t.call(i,e,r,!0,n,n,["isTruthy","length"])}),c.registerHelper("unboundIf",function(e,t){var r,i,s=t.contexts&&t.contexts.length?t.contexts[0]:this,u=t.data,l=t.fn,c=t.inverse;r=a(s,e,u),i=o(s,e,t),n(i)||(l=c),l(s,{data:u})}),c.registerHelper("with",function(r,n){if(4===arguments.length){var i,o,s,u,c;n=arguments[3],i=arguments[2],o=arguments[0];var m=l(n);if(m.data=l(n.data),m.data.keywords=l(n.data.keywords||{}),Ember.isGlobalPath(o))c=o;else{u=a(this,o,n.data),o=u.path,s=u.root;var p=Ember.$.expando+Ember.guidFor(s);m.data.keywords[p]=s,c=o?p+"."+o:p}return Ember.bind(m.data.keywords,i,c),t.call(this,o,m,!0,e)}return h.bind.call(n.contexts[0],r,n)}),c.registerHelper("if",function(e,t){return t.data.isUnbound?h.unboundIf.call(t.contexts[0],e,t):h.boundIf.call(t.contexts[0],e,t)}),c.registerHelper("unless",function(e,t){var r=t.fn,n=t.inverse;return t.fn=n,t.inverse=r,t.data.isUnbound?h.unboundIf.call(t.contexts[0],e,t):h.boundIf.call(t.contexts[0],e,t)}),c.registerHelper("bind-attr",function(e){var t=e.hash,r=e.data.view,n=[],i=this,s=++Ember.uuid,l=t["class"];if(null!=l){var h=c.bindClasses(this,l,r,s,e);n.push('class="'+Handlebars.Utils.escapeExpression(h.join(" "))+'"'),delete t["class"]}var m=Ember.keys(t);return u.call(m,function(u){var l,c=t[u];l=a(i,c,e.data);var h,m,p="this"===c?l.root:o(i,c,e),f=Ember.typeOf(p);h=function(){var t=o(i,c,e),n=r.$("[data-bindattr-"+s+"='"+s+"']");return n&&0!==n.length?(Ember.View.applyAttributeBindings(n,u,t),void 0):(Ember.removeObserver(l.root,l.path,m),void 0)},"this"===c||l.isKeyword&&""===l.path||r.registerObserver(l.root,l.path,h),"string"===f||"number"===f&&!isNaN(p)?n.push(u+'="'+Handlebars.Utils.escapeExpression(p)+'"'):p&&"boolean"===f&&n.push(u+'="'+u+'"')},this),n.push("data-bindattr-"+s+'="'+s+'"'),new c.SafeString(n.join(" "))}),c.registerHelper("bindAttr",function(){return c.helpers["bind-attr"].apply(this,arguments)}),c.bindClasses=function(e,t,r,n,i){var s,l,c,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 u.call(t.split(" "),function(t){var o,u,p,f,d=Ember.View._parsePropertyPath(t),b=d.path,v=e;""!==b&&"this"!==b&&(f=a(e,b,i.data),v=f.root,b=f.path),u=function(){s=m(e,d,i),c=n?r.$("[data-bindattr-"+n+"='"+n+"']"):r.$(),c&&0!==c.length?(o&&c.removeClass(o),s?(c.addClass(s),o=s):o=null):Ember.removeObserver(v,b,p)},""!==b&&"this"!==b&&r.registerObserver(v,b,u),l=m(e,d,i),l&&(h.push(l),o=l)}),h}}(),function(){function e(e,r){var n=r.hash,i=r.hashTypes;for(var o in n)if("ID"===i[o]){var a=n[o];Ember.IS_BINDING.test(o)||(n[o+"Binding"]=a,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)}var t=(Ember.get,Ember.set,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 a;for(var s in t)t.hasOwnProperty(s)&&Ember.IS_BINDING.test(s)&&"string"==typeof t[s]&&(a=this.contextualizeBindingPath(t[s],r),a&&(t[s]=a));if(n.classNameBindings)for(var u in n.classNameBindings){var l=n.classNameBindings[u];if("string"==typeof l){var c=Ember.View._parsePropertyPath(l);a=this.contextualizeBindingPath(c.path,r),a&&(n.classNameBindings[u]=a+c.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||""===e?"_parentView.context":"_parentView.context."+e},helper:function(i,o,a){var s,u=a.data,l=a.fn;e(i,a),s="string"==typeof o?"STRING"===a.types[0]&&r.test(o)&&!n.test(o)?u.view.container.lookupFactory("view:"+o):t.get(i,o,a):o;var c=this.propertiesFromHTMLOptions(a,i),h=u.view;c.templateData=u;var m=s.proto?s.proto():s;l&&(c.template=l),m.controller||m.controllerBinding||c.controller||c.controllerBinding||(c._context=i),h.appendChild(s,c)}}),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,o,a,s=n.fn,u=n.data,l=n.inverse;n.data.view}r?(i=u.keywords.controller,o=i&&i.container,a=t(this,r,n)||o.lookupFactory("view:"+r)):a=Ember.CollectionView;var c,h,m=n.hash,p={},f=a.proto();m.itemView?(i=u.keywords.controller,o=i.container,h=o.lookupFactory("view:"+m.itemView)):h=m.itemViewClass?t(f,m.itemViewClass,n):f.itemViewClass,delete m.itemViewClass,delete m.itemView;for(var d in m)m.hasOwnProperty(d)&&(c=d.match(/^item(.)(.*)$/),c&&"itemController"!==d&&(p[c[1].toLowerCase()+c[2]]=m[d],delete m[d]));s&&(p.template=s,delete n.fn);var b;l&&l!==Ember.Handlebars.VM.noop?(b=e(f,"emptyViewClass"),b=b.extend({template:l,tagName:p.tagName})):m.emptyViewClass&&(b=t(this,m.emptyViewClass,n)),b&&(m.emptyView=b),m.keyword||(p._context=Ember.computed.alias("content"));var v=Ember.Handlebars.ViewHelper.propertiesFromHTMLOptions({data:u,hash:p},this);return m.itemViewClass=h.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,a=arguments[arguments.length-1];return arguments.length>2?(a.data.isUnbound=!0,n=Ember.Handlebars.helpers[arguments[0]]||Ember.Handlebars.helpers.helperMissing,o=n.apply(this,Array.prototype.slice.call(arguments,1)),delete a.data.isUnbound,o):(i=r.contexts&&r.contexts.length?r.contexts[0]:this,e(i,t,r))})}(),function(){var e=(Ember.get,Ember.Handlebars.get),t=Ember.Handlebars.normalizePath,r=[].slice;Ember.Handlebars.registerHelper("log",function(){var n=r.call(arguments,0,-1),i=arguments[arguments.length-1],o=Ember.Logger.log,a=[],s=!1;s=!0;for(var u=0;u<n.length;u++){var l=i.types[u];if("ID"!==l&&s)a.push(n[u]);else{var c=i.contexts&&i.contexts[u]||this,h=t(c,n[u],i.data);"this"===h.path?a.push(h.root):a.push(e(h.root,h.path,i))}}o.apply(o,a)}),Ember.Handlebars.registerHelper("debugger",function(){{var e=this;Ember.inspect(e)}})}(),function(){{var e=Ember.get,t=Ember.set;Ember.String.fmt}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({_isVirtual:!0,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 a=e(r,"templateData");a=Ember.copy(a),a.keywords=r.cloneKeywords(),t(r,"templateData",a),a.keywords[i]=o}return o&&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(){function e(e){return!Ember.isNone(e)}function t(e,t,r){var n=t.split("/"),i=n[n.length-1];n[n.length-1]="_"+i;var o=r.data.view,a=n.join("/"),s=o.templateForName(a),u=!s&&o.templateForName(t);(s=s||u)(e,{data:r.data})}Ember.Handlebars.registerHelper("partial",function(r,n){var i=n.contexts&&n.contexts.length?n.contexts[0]:this;return"ID"===n.types[0]?(n.fn=function(e,n){var i=Ember.Handlebars.get(e,r,n);t(e,i,n)},Ember.Handlebars.bind.call(i,r,n,!0,e)):(t(i,r,n),void 0)})}(),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","autofocus","form"],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"),a=t(r,"value");(o===e||"keyPress"===o&&"key-press"===e)&&r.sendAction("action",a),r.sendAction(e,a),(i||o===e)&&(t(r,"bubbles")||n.stopPropagation())}var t=Ember.get,r=Ember.set;Ember.TextSupport=Ember.Mixin.create(Ember.TargetActionSupport,{value:"",attributeBindings:["placeholder","disabled","maxlength","tabindex","readonly","autofocus","form","selectionDirection","spellcheck","required"],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","min","max","accept","autocomplete","autosave","formaction","formenctype","formmethod","formnovalidate","formtarget","height","inputmode","list","multiple","pattern","step","width"],value:"",type:"text",size:null,pattern:null,min:null,max:null})}(),function(){{var e=Ember.get;Ember.set}Ember.TextArea=Ember.Component.extend(Ember.TextSupport,{classNames:["ember-text-area"],tagName:"textarea",attributeBindings:["rows","cols","name","selectionEnd","selectionStart","wrap"],rows:null,cols:null,_updateElementValue:Ember.observer("value",function(){var t=e(this,"value"),r=this.$();r&&t!==r.val()&&r.val(t)}),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,a=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
17
+ }).property("content","parentView.selection"),labelPathDidChange:Ember.observer("parentView.optionLabelPath",function(){var e=t(this,"parentView.optionLabelPath");e&&Ember.defineProperty(this,"label",Ember.computed(function(){return t(this,e)}).property(e))}),valuePathDidChange:Ember.observer("parentView.optionValuePath",function(){var e=t(this,"parentView.optionValuePath");e&&Ember.defineProperty(this,"value",Ember.computed(function(){return t(this,e)}).property(e))})}),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="";return t.buffer.push('<option value="">'),n=r._triageMustache.call(e,"view.prompt",{hash:{},hashTypes:{},hashContexts:{},contexts:[e],types:["ID"],data:t}),(n||0===n)&&t.buffer.push(n),t.buffer.push("</option>"),i}function a(e,t){var n;n=r.each.call(e,"view.groupedContent",{hash:{},hashTypes:{},hashContexts:{},inverse:p.noop,fn:p.program(4,s,t),contexts:[e],types:["ID"],data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function s(e,t){t.buffer.push(m(r.view.call(e,"view.groupView",{hash:{content:"content",label:"label"},hashTypes:{content:"ID",label:"ID"},hashContexts:{content:e,label:e},contexts:[e],types:["ID"],data:t})))}function u(e,t){var n;n=r.each.call(e,"view.content",{hash:{},hashTypes:{},hashContexts:{},inverse:p.noop,fn:p.program(7,l,t),contexts:[e],types:["ID"],data:t}),n||0===n?t.buffer.push(n):t.buffer.push("")}function l(e,t){t.buffer.push(m(r.view.call(e,"view.optionView",{hash:{content:""},hashTypes:{content:"ID"},hashContexts:{content:e},contexts:[e],types:["ID"],data:t})))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,Ember.Handlebars.helpers),i=i||{};var c,h="",m=this.escapeExpression,p=this;return c=r["if"].call(t,"view.prompt",{hash:{},hashTypes:{},hashContexts:{},inverse:p.noop,fn:p.program(1,o,i),contexts:[t],types:["ID"],data:i}),(c||0===c)&&i.buffer.push(c),c=r["if"].call(t,"view.optionGroupPath",{hash:{},hashTypes:{},hashContexts:{},inverse:p.program(6,u,i),fn:p.program(3,a,i),contexts:[t],types:["ID"],data:i}),(c||0===c)&&i.buffer.push(c),h}),attributeBindings:["multiple","disabled","tabindex","name","required","autofocus","form","size"],multiple:!1,disabled:!1,required:!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("selection.@each",function(){var r=t(this,"selection");if(t(this,"multiple")){if(!a(r))return e(this,"selection",Ember.A([r])),void 0;this._selectionDidChangeMultiple()}else this._selectionDidChangeSingle()}),valueDidChange:Ember.observer("value",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))}),_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,s=t(this,"content"),u=t(this,"selection");if(s&&r){var l=r.map(function(){return this.index-i}).toArray(),c=s.objectsAt(l);a(u)?o(u,0,t(u,"length"),c):e(this,"selection",c)}},_selectionDidChangeSingle:function(){var e=this.get("element");if(e){var n=t(this,"content"),i=t(this,"selection"),o=n?r(n,i):-1,a=t(this,"prompt");a&&(o+=1),e&&(e.selectedIndex=o)}},_selectionDidChangeMultiple:function(){var e,i=t(this,"content"),o=t(this,"selection"),a=i?n(i,o):[-1],s=t(this,"prompt"),u=s?1:0,l=this.$("option");l&&l.each(function(){e=this.index>-1?this.index-u:-1,this.selected=r(a,e)>-1})},init:function(){this._super(),this.on("didInsertElement",this,this._triggerChange),this.on("change",this,this._change)}})}(),function(){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){e.hash,e.hashTypes;return Ember.Handlebars.helpers.view.call(this,Ember.TextArea,e)})}(),function(){Ember.ComponentLookup=Ember.Object.extend({lookupFactory:function(e,t){t=t||this.container;var r="component:"+e,n="template:components/"+e,i=t&&t.has(n);i&&t.injection(r,"layout",n);var o=t.lookupFactory(r);return i||o?(o||(t.register(r,Ember.Component),o=t.lookupFactory(r)),o):void 0}})}(),function(){function e(){Ember.Handlebars.bootstrap(Ember.$(document))}function t(e){e.register("component-lookup:main",Ember.ComponentLookup)}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:"registerComponentLookup",after:"domTemplates",initialize:t})})}(),function(){Ember.runLoadHooks("Ember.Handlebars",Ember.Handlebars)}(),function(){e("route-recognizer",["exports"],function(e){"use strict";function t(e){return"[object Array]"===Object.prototype.toString.call(e)}function r(e){this.string=e}function n(e){this.name=e}function i(e){this.name=e}function o(){}function a(e,t,a){"/"===e.charAt(0)&&(e=e.substr(1));for(var s=e.split("/"),u=[],l=0,c=s.length;c>l;l++){var h,m=s[l];(h=m.match(/^:([^\/]+)$/))?(u.push(new n(h[1])),t.push(h[1]),a.dynamics++):(h=m.match(/^\*([^\/]+)$/))?(u.push(new i(h[1])),t.push(h[1]),a.stars++):""===m?u.push(new o):(u.push(new r(m)),a.statics++)}return u}function s(e){this.charSpec=e,this.nextStates=[]}function u(e){return e.sort(function(e,t){if(e.types.stars!==t.types.stars)return e.types.stars-t.types.stars;if(e.types.stars){if(e.types.statics!==t.types.statics)return t.types.statics-e.types.statics;if(e.types.dynamics!==t.types.dynamics)return t.types.dynamics-e.types.dynamics}return e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?t.types.statics-e.types.statics:0})}function l(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 c(e){this.queryParams=e||{}}function h(e,t,r){for(var n=e.handlers,i=e.regex,o=t.match(i),a=1,s=new c(r),u=0,l=n.length;l>u;u++){for(var h=n[u],m=h.names,p={},f=0,d=m.length;d>f;f++)p[m[f]]=o[a++];s.push({handler:h.handler,params:p,isDynamic:!!m.length})}return s}function m(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function p(e,t,r){this.path=e,this.matcher=t,this.delegate=r}function f(e){this.routes={},this.children={},this.target=e}function d(e,t,r){return function(n,i){var o=e+n;return i?(i(d(o,t,r)),void 0):new p(e+n,t,r)}}function b(e,t,r){for(var n=0,i=0,o=e.length;o>i;i++)n+=e[i].path.length;t=t.substr(n);var a={path:t,handler:r};e.push(a)}function v(e,t,r,n){var i=t.routes;for(var o in i)if(i.hasOwnProperty(o)){var a=e.slice();b(a,o,i[o]),t.children[o]?v(a,t.children[o],r,n):r.call(n,a)}}var E=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],g=new RegExp("(\\"+E.join("|\\")+")","g");r.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(g,"\\$1")},generate:function(){return this.string}},n.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},i.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},o.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},s.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 s(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,r,n,i=this.nextStates,o=[],a=0,s=i.length;s>a;a++)t=i[a],r=t.charSpec,"undefined"!=typeof(n=r.validChars)?-1!==n.indexOf(e)&&o.push(t):"undefined"!=typeof(n=r.invalidChars)&&-1===n.indexOf(e)&&o.push(t);return o}};var y=Object.create||function(e){function t(){}return t.prototype=e,new t};c.prototype=y({splice:Array.prototype.splice,slice:Array.prototype.slice,push:Array.prototype.push,length:0,queryParams:null});var _=function(){this.rootState=new s,this.names={}};_.prototype={add:function(e,t){for(var r,n=this.rootState,i="^",s={statics:0,dynamics:0,stars:0},u=[],l=[],c=!0,h=0,p=e.length;p>h;h++){var f=e[h],d=[],b=a(f.path,d,s);l=l.concat(b);for(var v=0,E=b.length;E>v;v++){var g=b[v];g instanceof o||(c=!1,n=n.put({validChars:"/"}),i+="/",n=m(n,g),i+=g.regex())}var y={handler:f.handler,names:d};u.push(y)}c&&(n=n.put({validChars:"/"}),i+="/"),n.handlers=u,n.regex=new RegExp(i+"$"),n.types=s,(r=t&&t.as)&&(this.names[r]={segments:l,handlers:u})},handlersFor:function(e){var t=this.names[e],r=[];if(!t)throw new Error("There is no route named "+e);for(var n=0,i=t.handlers.length;i>n;n++)r.push(t.handlers[n]);return r},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var r=this.names[e],n="";if(!r)throw new Error("There is no route named "+e);for(var i=r.segments,a=0,s=i.length;s>a;a++){var u=i[a];u instanceof o||(n+="/",n+=u.generate(t))}return"/"!==n.charAt(0)&&(n="/"+n),t&&t.queryParams&&(n+=this.generateQueryString(t.queryParams,r.handlers)),n},generateQueryString:function(e){var r=[],n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(i);n.sort();for(var o=0,a=n.length;a>o;o++){i=n[o];var s=e[i];if(s!==!1&&null!=s){var u=i;if(t(s))for(var l=0,c=s.length;c>l;l++){var h=i+"[]="+encodeURIComponent(s[l]);r.push(h)}else s!==!0?(u+="="+encodeURIComponent(s),r.push(u)):r.push(u)}}return 0===r.length?"":"?"+r.join("&")},parseQueryString:function(e){for(var t=e.split("&"),r={},n=0;n<t.length;n++){var i,o=t[n].split("="),a=decodeURIComponent(o[0]),s=a.length,u=!1;1===o.length?i=!0:(s>2&&"[]"===a.slice(s-2)&&(u=!0,a=a.slice(0,s-2),r[a]||(r[a]=[])),i=o[1]?decodeURIComponent(o[1]):""),u?r[a].push(i):r[a]=i}return r},recognize:function(e){var t,r,n,i,o=[this.rootState],a={},s=!1;if(e=decodeURI(e),i=e.indexOf("?"),-1!==i){var c=e.substr(i+1,e.length);e=e.substr(0,i),a=this.parseQueryString(c)}for("/"!==e.charAt(0)&&(e="/"+e),t=e.length,t>1&&"/"===e.charAt(t-1)&&(e=e.substr(0,t-1),s=!0),r=0,n=e.length;n>r&&(o=l(o,e.charAt(r)),o.length);r++);var m=[];for(r=0,n=o.length;n>r;r++)o[r].handlers&&m.push(o[r]);o=u(m);var p=m[0];return p&&p.handlers?(s&&"(.+)$"===p.regex.source.slice(-5)&&(e+="/"),h(p,e,a)):void 0}},e["default"]=_,p.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)}return this}},f.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,r,n){var i=new f(t);this.children[e]=i;var o=d(e,i,n);n&&n.contextEntered&&n.contextEntered(t,o),r(o)}},_.prototype.map=function(e,t){var r=new f;e(d("",r,this.delegate)),v([],r,function(e){t?t(this,e):this.add(e)},this)}})}(),function(){e("router/handler-info",["./utils","rsvp","exports"],function(e,t,r){"use strict";function n(e){e&&l(this,e)}function i(e){n.call(this,e)}function o(e){n.call(this,e),this.params=this.params||{}}function a(e){n.call(this,e)}function s(e,t){if(!e^!t)return!1;if(!e)return!0;for(var r in e)if(e.hasOwnProperty(r)&&e[r]!==t[r])return!1;return!0}var u=e.bind,l=e.merge,c=e.oCreate,h=e.serialize,m=e.promiseLabel,p=t.resolve;n.prototype={name:null,handler:null,params:null,context:null,log:function(e,t){e.log&&e.log(this.name+": "+t)},promiseLabel:function(e){return m("'"+this.name+"' "+e)},resolve:function(e,t,r){var n=u(this.checkForAbort,this,t),i=u(this.runBeforeModelHook,this,e,r),o=u(this.getModel,this,e,r),a=u(this.runAfterModelHook,this,e,r),s=u(this.becomeResolved,this,r);return p(void 0,this.promiseLabel("Start handler")).then(n,null,this.promiseLabel("Check for abort")).then(i,null,this.promiseLabel("Before model")).then(n,null,this.promiseLabel("Check if aborted during 'beforeModel' hook")).then(o,null,this.promiseLabel("Model")).then(n,null,this.promiseLabel("Check if aborted in 'model' hook")).then(a,null,this.promiseLabel("After model")).then(n,null,this.promiseLabel("Check if aborted in 'afterModel' hook")).then(s,null,this.promiseLabel("Become resolved"))},runBeforeModelHook:function(e,t){return t.trigger&&t.trigger(!0,"willResolveModel",t,this.handler),this.runSharedModelHook(e,t,"beforeModel",[])},runAfterModelHook:function(e,t,r){var n=this.name;return this.stashResolvedModel(t,r),this.runSharedModelHook(e,t,"afterModel",[r]).then(function(){return t.resolvedModels[n]},null,this.promiseLabel("Ignore fulfillment value and return model value"))},runSharedModelHook:function(e,t,r,n){this.log(t,"calling "+r+" hook"),this.queryParams&&n.push(this.queryParams),n.push(t);var i=this.handler;return e(function(){return i[r]&&i[r].apply(i,n)},this.promiseLabel("Handle "+r))},getModel:function(){throw new Error("This should be overridden by a subclass of HandlerInfo")},checkForAbort:function(e,t){return p(e(),this.promiseLabel("Check for abort")).then(function(){return t},null,this.promiseLabel("Ignore fulfillment value and continue"))},stashResolvedModel:function(e,t){e.resolvedModels=e.resolvedModels||{},e.resolvedModels[this.name]=t},becomeResolved:function(e,t){var r=this.params||h(this.handler,t,this.names);return e&&(this.stashResolvedModel(e,t),e.params=e.params||{},e.params[this.name]=r),new i({context:t,name:this.name,handler:this.handler,params:r})},shouldSupercede:function(e){if(!e)return!0;var t=e.context===this.context;return e.name!==this.name||this.hasOwnProperty("context")&&!t||this.hasOwnProperty("params")&&!s(this.params,e.params)}},i.prototype=c(n.prototype),i.prototype.resolve=function(e,t,r){return r&&r.resolvedModels&&(r.resolvedModels[this.name]=this.context),p(this,this.promiseLabel("Resolve"))},o.prototype=c(n.prototype),o.prototype.getModel=function(e,t){var r=this.params;t&&t.queryParams&&(r={},l(r,this.params),r.queryParams=t.queryParams);var n="function"==typeof this.handler.deserialize?"deserialize":"model";return this.runSharedModelHook(e,t,n,[r])},a.prototype=c(n.prototype),a.prototype.getModel=function(e,t){return this.log(t,this.name+": resolving provided model"),p(this.context)},r.HandlerInfo=n,r.ResolvedHandlerInfo=i,r.UnresolvedHandlerInfoByParam=o,r.UnresolvedHandlerInfoByObject=a}),e("router/router",["route-recognizer","rsvp","./utils","./transition-state","./transition","./transition-intent/named-transition-intent","./transition-intent/url-transition-intent","exports"],function(e,t,r,n,i,o,a,s){"use strict";function u(){this.recognizer=new v,this.reset()}function l(e,t,r){var n=h(e.state,t);C(n.exited,function(e){var t=e.handler;delete t.context,t.exit&&t.exit()});var i=e.oldState=e.state;e.state=t;var o=e.currentHandlerInfos=n.unchanged.slice();try{C(n.updatedContext,function(e){return c(o,e,!1,r)}),C(n.entered,function(e){return c(o,e,!0,r)})}catch(a){throw e.state=i,e.currentHandlerInfos=i.handlerInfos,a}e.state.queryParams=b(e,o,t.queryParams)}function c(e,t,r,n){var i=t.handler,o=t.context;if(r&&i.enter&&i.enter(n),n&&n.isAborted)throw new I;if(i.context=o,i.contextDidChange&&i.contextDidChange(),i.setup&&i.setup(o,n),n&&n.isAborted)throw new I;return e.push(t),!0}function h(e,t){var r,n,i,o,a,s=e.handlerInfos,u=t.handlerInfos,l={updatedContext:[],exited:[],entered:[],unchanged:[]};for(o=0,a=u.length;a>o;o++){var c=s[o],h=u[o];c&&c.handler===h.handler||(r=!0),r?(l.entered.push(h),c&&l.exited.unshift(c)):n||c.context!==h.context||i?(n=!0,l.updatedContext.push(h)):l.unchanged.push(c)}for(o=u.length,a=s.length;a>o;o++)l.exited.unshift(s[o]);return l}function m(e,t,r){var n=e.urlMethod;if(n){for(var i=e.router,o=t.handlerInfos,a=o[o.length-1].name,s={},u=o.length-1;u>=0;--u){var l=o[u];O(s,l.params),l.handler.inaccessibleByURL&&(n=null)}if(n){s.queryParams=t.queryParams;var c=i.recognizer.generate(a,s);"replaceQuery"===n?c!==r&&i.replaceURL(c):"replace"===n?i.replaceURL(c):i.updateURL(c)}}}function p(e,t){try{_(e.router,e.sequence,"Resolved all models on destination route; finalizing transition.");{var r=e.router,n=t.handlerInfos;e.sequence}return l(r,t,e),e.isAborted?(r.state.handlerInfos=r.currentHandlerInfos,E(V(e))):(m(e,t,e.intent.url),e.isActive=!1,r.activeTransition=null,y(r,r.currentHandlerInfos,!0,["didTransition"]),r.didTransition&&r.didTransition(r.currentHandlerInfos),_(r,e.sequence,"TRANSITION COMPLETE."),n[n.length-1].handler)}catch(i){if(!(i instanceof I)){var o=e.state.handlerInfos;e.trigger(!0,"error",i,e,o[o.length-1].handler),e.abort()}throw i}}function f(e,t,r){var n=t[0]||"/",i=t[t.length-1],o={};i&&i.hasOwnProperty("queryParams")&&(o=M.call(t).queryParams);var a;if(0===t.length){_(e,"Updating query params");var s=e.state.handlerInfos;a=new R({name:s[s.length-1].name,contexts:[],queryParams:o})}else"/"===n.charAt(0)?(_(e,"Attempting URL transition to "+n),a=new D({url:n})):(_(e,"Attempting transition to "+n),a=new R({name:t[0],contexts:w.call(t,1),queryParams:o}));return e.transitionByIntent(a,r)}function d(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;n>r;++r)if(e[r]!==t[r])return!1;return!0}function b(e,t,r){var n=[];y(e,t,!0,["finalizeQueryParamChange",r,n]);for(var i={},o=0,a=n.length;a>o;++o){var s=n[o];i[s.key]=s.value}return i}var v=e["default"],E=(t.resolve,t.reject),g=(t.async,t.Promise),y=r.trigger,_=r.log,w=r.slice,C=r.forEach,O=r.merge,A=r.serialize,P=r.extractQueryParams,x=r.getChangelist,T=r.promiseLabel,S=n.TransitionState,V=i.logAbort,N=i.Transition,I=i.TransitionAborted,R=o.NamedTransitionIntent,D=a.URLTransitionIntent,M=Array.prototype.pop;u.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){for(var r=t.length-1,n=!0;r>=0&&n;--r){var i=t[r];e.add(t,{as:i.handler}),n="/"===i.path||""===i.path||".index"===i.handler.slice(-6)}})},hasRoute:function(e){return this.recognizer.hasRoute(e)},transitionByIntent:function(e,t){var r,n=!!this.activeTransition,i=n?this.activeTransition.state:this.state,o=this;try{var a=e.applyToState(i,this.recognizer,this.getHandler,t);if(d(a.handlerInfos,i.handlerInfos)){var s=x(i.queryParams,a.queryParams);return s?(this._changedQueryParams=s.changed,y(this,a.handlerInfos,!0,["queryParamsDidChange",s.changed,s.all,s.removed]),this._changedQueryParams=null,!n&&this.activeTransition?this.activeTransition:(i.queryParams=b(this,a.handlerInfos,a.queryParams),r=new N(this),r.urlMethod="replace",r.promise=r.promise.then(function(e){return m(r,i,!0),o.didTransition&&o.didTransition(o.currentHandlerInfos),e},null,T("Transition complete")),r)):new N(this)}return t?(l(this,a),void 0):(r=new N(this,e,a),this.activeTransition&&this.activeTransition.abort(),this.activeTransition=r,r.promise=r.promise.then(function(e){return o.async(function(){return p(r,e.state)},"Finalize transition")},null,T("Settle transition promise when transition is finalized")),n||y(this,this.state.handlerInfos,!0,["willTransition",r]),r)}catch(u){return new N(this,e,null,u)}},reset:function(){this.state&&C(this.state.handlerInfos,function(e){var t=e.handler;t.exit&&t.exit()}),this.state=new S,this.currentHandlerInfos=null},activeTransition:null,handleURL:function(e){var t=w.call(arguments);return"/"!==e.charAt(0)&&(t[0]="/"+e),f(this,t).method("replaceQuery")},updateURL:function(){throw new Error("updateURL is not implemented")},replaceURL:function(e){this.updateURL(e)},transitionTo:function(){return f(this,arguments)},intermediateTransitionTo:function(){f(this,arguments,!0)},refresh:function(e){for(var t=this.activeTransition?this.activeTransition.state:this.state,r=t.handlerInfos,n={},i=0,o=r.length;o>i;++i){var a=r[i];n[a.name]=a.params||{}}_(this,"Starting a refresh transition");var s=new R({name:r[r.length-1].name,pivotHandler:e||r[0].handler,contexts:[],queryParams:this._changedQueryParams||t.queryParams||{}});return this.transitionByIntent(s,!1)},replaceWith:function(){return f(this,arguments).method("replace")},generate:function(e){for(var t=P(w.call(arguments,1)),r=t[0],n=t[1],i=new R({name:e,contexts:r}),o=i.applyToState(this.state,this.recognizer,this.getHandler),a={},s=0,u=o.handlerInfos.length;u>s;++s){var l=o.handlerInfos[s],c=l.params||A(l.handler,l.context,l.names);O(a,c)}return a.queryParams=n,this.recognizer.generate(e,a)},isActive:function(e){var t,r,n=P(w.call(arguments,1)),i=n[0],o=n[1],a=this.state.queryParams,s=this.state.handlerInfos;if(!s.length)return!1;var u=s[s.length-1].name,l=this.recognizer.handlersFor(u),c=0;for(r=l.length;r>c&&(t=s[c],t.name!==e);++c);if(c===l.length)return!1;var h=new S;h.handlerInfos=s.slice(0,c+1),l=l.slice(0,c+1);var m=new R({name:u,contexts:i}),p=m.applyToHandlers(h,l,this.getHandler,u,!0,!0),f={};O(f,o);for(var b in a)a.hasOwnProperty(b)&&f.hasOwnProperty(b)&&(f[b]=a[b]);return d(p.handlerInfos,h.handlerInfos)&&!x(f,o)},trigger:function(){var e=w.call(arguments);y(this,this.currentHandlerInfos,!1,e)},async:function(e,t){return new g(function(t){t(e())},t)},log:null},s.Router=u}),e("router/transition-intent",["./utils","exports"],function(e,t){"use strict";function r(e){e&&n(this,e),this.data=this.data||{}}var n=e.merge;r.prototype.applyToState=function(e){return e},t.TransitionIntent=r}),e("router/transition-intent/named-transition-intent",["../transition-intent","../transition-state","../handler-info","../utils","exports"],function(e,t,r,n,i){"use strict";function o(e){a.call(this,e)}var a=e.TransitionIntent,s=t.TransitionState,u=r.UnresolvedHandlerInfoByParam,l=r.UnresolvedHandlerInfoByObject,c=n.isParam,h=n.forEach,m=n.extractQueryParams,p=n.oCreate,f=n.merge;o.prototype=p(a.prototype),o.prototype.applyToState=function(e,t,r,n){var i=m([this.name].concat(this.contexts)),o=i[0],a=(i[1],t.handlersFor(o[0])),s=a[a.length-1].handler;return this.applyToHandlers(e,a,r,s,n)},o.prototype.applyToHandlers=function(e,t,r,n,i,o){var a,u=new s,l=this.contexts.slice(0),c=t.length,h=[];if(this.pivotHandler)for(a=0;a<t.length;++a)if(r(t[a].handler)===this.pivotHandler){c=a;break}!this.pivotHandler;for(a=t.length-1;a>=0;--a){var m=t[a],p=m.handler,d=r(p),b=e.handlerInfos[a],v=null;if(m.names.length>0?v=a>=c?this.createParamHandlerInfo(p,d,m.names,l,b):this.getHandlerInfoForDynamicSegment(p,d,m.names,l,b,n):(v=this.createParamHandlerInfo(p,d,m.names,l,b),h.unshift(a)),o){v=v.becomeResolved(null,v.context);var E=b&&b.context;m.names.length>0&&v.context===E&&(v.params=b&&b.params),v.context=E}var g=b;(a>=c||v.shouldSupercede(b))&&(c=Math.min(a,c),g=v),i&&!o&&(g=g.becomeResolved(null,g.context)),u.handlerInfos.unshift(g)}if(l.length>0)throw new Error("More context objects were passed than there are dynamic segments for the route: "+n);return i||this.invalidateNonDynamicHandlers(u.handlerInfos,h,c),f(u.queryParams,e.queryParams),f(u.queryParams,this.queryParams||{}),u},o.prototype.invalidateNonDynamicHandlers=function(e,t,r){h(t,function(t){if(t>=r){var n=e[t];e[t]=new u({name:n.name,handler:n.handler,params:{}})}})},o.prototype.getHandlerInfoForDynamicSegment=function(e,t,r,n,i){{var o;r.length}return n.length>0?(o=n[n.length-1],c(o)?this.createParamHandlerInfo(e,t,r,n,i):(n.pop(),new l({name:e,handler:t,context:o,names:r}))):i&&i.name===e?i:i},o.prototype.createParamHandlerInfo=function(e,t,r,n,i){for(var o={},a=r.length;a--;){var s=i&&e===i.name&&i.params||{},l=n[n.length-1],h=r[a];if(c(l))o[h]=""+n.pop();else{if(!s.hasOwnProperty(h))throw new Error("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route "+e);o[h]=s[h]}}return new u({name:e,handler:t,params:o})},i.NamedTransitionIntent=o}),e("router/transition-intent/url-transition-intent",["../transition-intent","../transition-state","../handler-info","../utils","exports"],function(e,t,r,n,i){"use strict";function o(e){s.call(this,e)}function a(e){this.message=e||"UnrecognizedURLError",this.name="UnrecognizedURLError"}var s=e.TransitionIntent,u=t.TransitionState,l=r.UnresolvedHandlerInfoByParam,c=n.oCreate,h=n.merge;o.prototype=c(s.prototype),o.prototype.applyToState=function(e,t,r){var n,i,o=new u,s=t.recognize(this.url);if(!s)throw new a(this.url);var c=!1;for(n=0,i=s.length;i>n;++n){var m=s[n],p=m.handler,f=r(p);if(f.inaccessibleByURL)throw new a(this.url);var d=new l({name:p,handler:f,params:m.params}),b=e.handlerInfos[n];c||d.shouldSupercede(b)?(c=!0,o.handlerInfos[n]=d):o.handlerInfos[n]=b}return h(o.queryParams,s.queryParams),o},i.URLTransitionIntent=o}),e("router/transition-state",["./handler-info","./utils","rsvp","exports"],function(e,t,r,n){"use strict";function i(){this.handlerInfos=[],this.queryParams={},this.params={}}var o=(e.ResolvedHandlerInfo,t.forEach),a=t.promiseLabel,s=r.resolve,u=r.reject;i.prototype={handlerInfos:null,queryParams:null,params:null,promiseLabel:function(e){var t="";return o(this.handlerInfos,function(e){""!==t&&(t+="."),t+=e.name}),a("'"+t+"': "+e)},resolve:function(e,t,r){function n(){return s(t(),a("Check if should continue"))["catch"](function(e){return p=!0,u(e)},a("Handle abort"))}function i(e){var t=m.handlerInfos,n=r.resolveIndex>=t.length?t.length-1:r.resolveIndex;return u({error:e,handlerWithError:m.handlerInfos[n].handler,wasAborted:p,state:m})}function l(e){m.handlerInfos[r.resolveIndex++]=e;var t=e.handler;return t&&t.redirect&&t.redirect(e.context,r),n().then(c,null,a("Resolve handler"))}function c(){if(r.resolveIndex===m.handlerInfos.length)return{error:null,state:m};var t=m.handlerInfos[r.resolveIndex];return t.resolve(e,n,r).then(l,null,a("Proceed"))}var h=this.params;o(this.handlerInfos,function(e){h[e.name]=e.params||{}}),r=r||{},r.resolveIndex=0;var m=this,p=!1;return s(null,this.promiseLabel("Start transition")).then(c,null,this.promiseLabel("Resolve handler"))["catch"](i,this.promiseLabel("Handle error"))}},n.TransitionState=i}),e("router/transition",["rsvp","./handler-info","./utils","exports"],function(e,t,r,n){"use strict";function i(e,t,r,n){function a(){return c.isAborted?s(void 0,p("Transition aborted - reject")):void 0}var c=this;if(this.state=r||e.state,this.intent=t,this.router=e,this.data=this.intent&&this.intent.data||{},this.resolvedModels={},this.queryParams={},n)return this.promise=s(n),void 0;if(r){this.params=r.params,this.queryParams=r.queryParams;var h=r.handlerInfos.length;h&&(this.targetName=r.handlerInfos[r.handlerInfos.length-1].name);for(var m=0;h>m;++m){var f=r.handlerInfos[m];if(!(f instanceof l))break;this.pivotHandler=f.handler}this.sequence=i.currentSequence++,this.promise=r.resolve(e.async,a,this)["catch"](function(e){return e.wasAborted?s(o(c)):(c.trigger("error",e.error,c,e.handlerWithError),c.abort(),s(e.error))},p("Handle Abort"))}else this.promise=u(this.state),this.params={}}function o(e){return m(e.router,e.sequence,"detected abort."),new a}function a(e){this.message=e||"TransitionAborted",this.name="TransitionAborted"}var s=e.reject,u=e.resolve,l=t.ResolvedHandlerInfo,c=r.trigger,h=r.slice,m=r.log,p=r.promiseLabel;i.currentSequence=0,i.prototype={targetName:null,urlMethod:"update",intent:null,params:null,pivotHandler:null,resolveIndex:0,handlerInfos:null,resolvedModels:null,isActive:!0,state:null,promise:null,data:null,then:function(e,t){return this.promise.then(e,t)},abort:function(){return this.isAborted?this:(m(this.router,this.sequence,this.targetName+": transition was aborted"),this.isAborted=!0,this.isActive=!1,this.router.activeTransition=null,this)},retry:function(){return this.abort(),this.router.transitionByIntent(this.intent,!1)},method:function(e){return this.urlMethod=e,this},trigger:function(e){var t=h.call(arguments);"boolean"==typeof e?t.shift():e=!1,c(this.router,this.state.handlerInfos.slice(0,this.resolveIndex+1),e,t)},followRedirects:function(){var e=this.router;return this.promise["catch"](function(t){return e.activeTransition?e.activeTransition.followRedirects():s(t)})},toString:function(){return"Transition (sequence "+this.sequence+")"},log:function(e){m(this.router,this.sequence,e)}},i.prototype.send=i.prototype.trigger,n.Transition=i,n.logAbort=o,n.TransitionAborted=a}),e("router/utils",["exports"],function(e){"use strict";function t(e){return"[object Array]"===Object.prototype.toString.call(e)}function r(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}function n(e){var t,r,n=e&&e.length;return n&&n>0&&e[n-1]&&e[n-1].hasOwnProperty("queryParams")?(r=e[n-1].queryParams,t=p.call(e,0,n-1),[t,r]):[e,null]}function i(e){for(var r in e)if("number"==typeof e[r])e[r]=""+e[r];else if(t(e[r]))for(var n=0,i=e[r].length;i>n;n++)e[r][n]=""+e[r][n]}function o(e,t,r){e.log&&(3===arguments.length?e.log("Transition #"+t+": "+r):(r=t,e.log(r)))}function a(e,t){var r=arguments;return function(n){var i=p.call(r,2);return i.push(n),e.apply(t,i)}}function s(e){return"string"==typeof e||e instanceof String||"number"==typeof e||e instanceof Number}function u(e,t){for(var r=0,n=e.length;n>r&&!1!==t(e[r]);r++);}function l(e,t,r){var n={};if(s(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}}function c(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,a=t.length-1;a>=0;a--){var s=t[a],u=s.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 h(e,n){var o,a={all:{},changed:{},removed:{}};r(a.all,n);var s=!1;i(e),i(n);for(o in e)e.hasOwnProperty(o)&&(n.hasOwnProperty(o)||(s=!0,a.removed[o]=e[o]));for(o in n)if(n.hasOwnProperty(o))if(t(e[o])&&t(n[o]))if(e[o].length!==n[o].length)a.changed[o]=n[o],s=!0;else for(var u=0,l=e[o].length;l>u;u++)e[o][u]!==n[o][u]&&(a.changed[o]=n[o],s=!0);else e[o]!==n[o]&&(a.changed[o]=n[o],s=!0);return s&&a}function m(e){return"Router: "+e}var p=Array.prototype.slice,f=Object.create||function(e){function t(){}return t.prototype=e,new t};e.trigger=c,e.log=o,e.oCreate=f,e.merge=r,e.extractQueryParams=n,e.bind=a,e.isParam=s,e.forEach=u,e.slice=p,e.serialize=l,e.getChangelist=h,e.coerceQueryParamsToString=i,e.promiseLabel=m}),e("router",["./router/router","exports"],function(e,t){"use strict";var r=e.Router;t.Router=r})}(),function(){function e(e){this.parent=e,this.matches=[]}function t(e,t,r){r=r||{},"string"!=typeof r.path&&(r.path="/"+t),e.parent&&"application"!==e.parent&&(t=e.parent+"."+t),e.push(r.path,t,null)}e.prototype={resource:function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n={}),1===arguments.length&&(n={}),"string"!=typeof n.path&&(n.path="/"+r),i){var o=new e(r);t(o,"loading"),t(o,"error",{path:"/_unused_dummy_error_path_route_"+r+"/:error"}),i.call(o),this.push(n.path,r,o.generate())
18
+ }else this.push(n.path,r,null)},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,r){t(this,e,r)},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.generateControllerFactory=function(e,t,r){var n,i,o,a;return a=r&&Ember.isArray(r)?"array":r?"object":"basic",o="controller:"+a,n=e.lookupFactory(o).extend({isGenerated:!0,toString:function(){return"(generated "+t+" controller)"}}),i="controller:"+t,e.register(i,n),n},Ember.generateController=function(t,r,n){Ember.generateControllerFactory(t,r,n);var i="controller:"+r,o=t.lookup(i);return e(o,"namespace.LOG_ACTIVE_GENERATION"),o}}(),function(){function e(e,t){var n=e.controllerName||e.routeName,i=r(n,e.container),o=h(i,"queryParams");o&&d(o,function(e){var r,i=e.split(":");r=i.length>1?i[1]:"application"!==n?n+"["+e+"]":e;var o=n+":"+e;t.queryParams[o]=r,t.translations[i[0]]=o})}function r(e,t){var r="controller:"+e;if(t.cache.has(r))return t.lookup(r);var n=t.lookupFactory(r);return n&&"function"==typeof n.proto?n.proto():{}}function n(e){var t,r,n={};for(r in e)t=Ember.Router._descopeQueryParam(e[r]),n[t]=n[t]?n[t]+1:1;for(r in e)t=Ember.Router._descopeQueryParam(e[r]),1===n[t]&&(e[r]=t)}function i(e,t,r){for(var n=t.state.handlerInfos,i=!1,o=n.length-1;o>=0;--o){var a=n[o],s=a.handler;if(i){if(r(s,n[o+1].handler)!==!0)return!1}else e===s&&(i=!0)}return!0}function o(e,t,r){var n,i=e.router,o=(t.routeName.split(".").pop(),"application"===e.routeName?"":e.routeName+".");return n=o+r,a(i,n)?n:void 0}function a(e,t){var r=e.container;return e.hasRoute(t)&&(r.has("template:"+t)||r.has("route:"+t))}function s(e,t,r){var n=r.shift();if(!e){if(t)return;throw new Ember.Error("Can't trigger action '"+n+"' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call `.send()` on the `Transition` object passed to the `model/beforeModel/afterModel` hooks.")}for(var i=!1,o=e.length-1;o>=0;o--){var a=e[o],s=a.handler;if(s._actions&&s._actions[n]){if(s._actions[n].apply(s,r)!==!0)return;i=!0}}if(v[n])return v[n].apply(null,r),void 0;if(!i&&!t)throw new Ember.Error("Nothing handled the action '"+n+"'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.")}function u(e){var t=e.container.lookup("controller:application");if(t){var r=e.router.currentHandlerInfos,n=Ember.Router._routePath(r);"currentPath"in t||p(t,"currentPath"),m(t,"currentPath",n),"currentRouteName"in t||p(t,"currentRouteName"),m(t,"currentRouteName",r[r.length-1].name)}}var l=t("router"),c=l.Router,h=(l.Transition,Ember.get),m=Ember.set,p=(Ember.String.fmt,Ember.defineProperty),f=Array.prototype.slice,d=Ember.EnumerableUtils.forEach,b=Ember._MetamorphView;Ember.Router=Ember.Object.extend(Ember.Evented,{location:"hash",init:function(){this.router=this.constructor.router||this.constructor.map(Ember.K),this._activeViews={},this._setupLocation(),h(this,"namespace.LOG_TRANSITIONS_INTERNAL")&&(this.router.log=Ember.Logger.debug)},url:Ember.computed(function(){return h(this,"location").getURL()}),startRouting:function(){this.router=this.router||this.constructor.map(Ember.K);var e=this.router,t=h(this,"location"),r=this.container,n=this,i=h(this,"initialURL");h(t,"cancelRouterSetup")||(this._setupRouter(e,t),r.register("view:default",b),r.register("view:toplevel",Ember.View.extend()),t.onUpdateURL(function(e){n.handleURL(e)}),"undefined"==typeof i&&(i=t.getURL()),this.handleURL(i))},didTransition:function(e){u(this),this._cancelLoadingEvent(),this.notifyPropertyChange("url"),Ember.run.once(this,this.trigger,"didTransition"),h(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Transitioned into '"+Ember.Router._routePath(e)+"'")},handleURL:function(e){return this._doTransition("handleURL",[e])},transitionTo:function(){return this._doTransition("transitionTo",arguments)},intermediateTransitionTo:function(){this.router.intermediateTransitionTo.apply(this.router,arguments),u(this);var e=this.router.currentHandlerInfos;h(this,"namespace").LOG_TRANSITIONS&&Ember.Logger.log("Intermediate-transitioned into '"+Ember.Router._routePath(e)+"'")},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=h(this,"location"),t=h(this,"rootURL");if("string"==typeof e&&this.container){var r=this.container.lookup("location:"+e);if("undefined"!=typeof r)e=m(this,"location",r);else{var n={implementation:e};e=m(this,"location",Ember.Location.create(n))}}"string"==typeof t&&(e.rootURL=t),"function"==typeof e.initState&&e.initState()},_getHandlerFunction:function(){var e={},t=this.container,r=t.lookupFactory("route:basic"),n=this;return function(i){var o="route:"+i,a=t.lookup(o);return e[i]?a:(e[i]=!0,a||(t.register(o,r.extend()),a=t.lookup(o),h(n,"namespace.LOG_ACTIVE_GENERATION")),a.routeName=i,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=f.call(t),t[0]=t[0]||"/";var r,n=t[0],i=!1;if(!i&&"/"!==n.charAt(0),r){if(!n){var o=this.router.activeTransition?this.router.activeTransition.state.handlerInfos:this.router.state.handlerInfos;n=o[o.length-1].name,t.unshift(n)}var a=this._queryParamNamesFor(n);Ember.Router._translateQueryParams(r,a.translations,n);var s;for(var u in r){var l=Ember.Router._descopeQueryParam(u);u in a.queryParams?(s=r[u],delete r[u],r[a.queryParams[u]]=s):l in a.validQueryParams&&(s=r[u],delete r[u],r[l]=s)}}var c=this.router[e].apply(this.router,t);return c.then(null,function(e){e&&"UnrecognizedURLError"===e.name},"Ember: Check for Router unrecognized URL error"),c},_scheduleLoadingEvent:function(e,t){this._cancelLoadingEvent(),this._loadingStateTimer=Ember.run.scheduleOnce("routerTransitions",this,"_fireLoadingEvent",e,t)},_fireLoadingEvent:function(e,t){this.router.activeTransition&&e.trigger(!0,"loading",e,t)},_cancelLoadingEvent:function(){this._loadingStateTimer&&Ember.run.cancel(this._loadingStateTimer),this._loadingStateTimer=null},_queryParamNamesFor:function(t){var r=this.router.recognizer.handlersFor(t),i={queryParams:Ember.create(null),translations:Ember.create(null),validQueryParams:Ember.create(null)},o=this.router;d(r,function(t){var r=o.getHandler(t.handler);e(r,i)}),n(i.queryParams);for(var a in i.queryParams)i.validQueryParams[i.queryParams[a]]=!0;return i},_queryParamNamesForSingle:function(t){var r={queryParams:Ember.create(null),translations:Ember.create(null)},n=this.router.getHandler(t);if(e(n,r),"application"!==t){var i=this._queryParamNamesFor(t);for(var o in r.queryParams)r.queryParams[o]=i.queryParams[o]}return r},_queryParamOverrides:function(e,t,n){for(var i in t){var o=i.split(":"),a=r(o[0],this.container);e[t[i]]=h(a,o[1]),n&&n(i,t[i],i)}}});var v={willResolveModel:function(e,t){t.router._scheduleLoadingEvent(e,t)},error:function(e,t,r){var n=r.router,s=i(r,t,function(t,r){var i=o(t,r,"error");return i?(n.intermediateTransitionTo(i,e),void 0):!0});return s?a(r.router,"application_error")?(n.intermediateTransitionTo("application_error",e),void 0):(Ember.Logger.error("Error while loading route: "+(e&&e.stack)),void 0):void 0},loading:function(e,t){var r=t.router,n=i(t,e,function(t,n){var i=o(t,n,"loading");return i?(r.intermediateTransitionTo(i),void 0):e.pivotHandler!==t?!0:void 0});return n&&a(t.router,"application_loading")?(r.intermediateTransitionTo("application_loading"),void 0):void 0}};Ember.Router.reopenClass({router:null,map:function(e){var t=this.router;t||(t=new c,t.callbacks=[],t.triggerEvent=s,this.reopenClass({router:t}));var r=Ember.RouterDSL.map(function(){this.resource("application",{path:"/"},function(){for(var r=0;r<t.callbacks.length;r++)t.callbacks[r].call(this);e.call(this)})});return t.callbacks.push(e),t.map(r.generate()),t},_routePath:function(e){function t(e,t){for(var r=0,n=e.length;n>r;++r)if(e[r]!==t[r])return!1;return!0}for(var r=[],n=1,i=e.length;i>n;n++){for(var o=e[n].name,a=o.split("."),s=f.call(r);s.length&&!t(s,a);)s.shift();r.push.apply(r,a.slice(s.length))}return r.join(".")},_translateQueryParams:function(e,t){for(var r in e)e.hasOwnProperty(r)&&r in t&&(e[t[r]]=e[r],delete e[r])},_descopeQueryParam:function(e){var t=/\[(.+)\]/,r=e.match(t);return r=r?r[1]:e}})}(),function(){function e(e){var t=e.router.router.state.handlerInfos;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=s(e.router,"namespace.LOG_VIEW_LOOKUPS");var o,a=i.controller;if(a=i.controller?i.controller:(o=e.container.lookup("controller:"+r))?o:e.controllerName||e.routeName,"string"==typeof a){var u=a;if(a=e.container.lookup("controller:"+u),!a)throw new Ember.Error("You passed `controller: '"+u+"'` into the `render` method, but no such controller could be found.")}return i.controller=a,i}function n(e,t,r){if(e)r.LOG_VIEW_LOOKUPS;else{var n=r.into?"view:default":"view:toplevel";e=t.lookup(n),r.LOG_VIEW_LOOKUPS}return s(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=a(n,r.outlet);e.teardownOutletViews||(e.teardownOutletViews=[]),h(e.teardownOutletViews,0,0,[i]),n.connectOutlet(r.outlet,t)}else{var u=s(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 a(e,t){return function(){e.disconnectOutlet(t)}}var s=Ember.get,u=Ember.set,l=Ember.getProperties,c=(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()},viewName:null,templateName:null,controllerName:null,_actions:{finalizeQueryParamChange:function(){}},events:null,mergedProperties:["events"],deactivate:Ember.K,activate:Ember.K,transitionTo:function(){var e=this.router;return e.transitionTo.apply(e,arguments)},intermediateTransitionTo:function(){var e=this.router;e.intermediateTransitionTo.apply(e,arguments)},refresh:function(){return this.router.router.refresh(this).method("replace")},replaceWith:function(){var e=this.router;return e.replaceWith.apply(e,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)},beforeModel:Ember.K,afterModel:Ember.K,redirect:Ember.K,contextDidChange:function(){this.currentModel=this.context},model:function(e,t){var r,n,i,o;for(var a in e)"queryParams"!==a&&((r=a.match(/^(.*)_id$/))&&(n=r[1],o=e[a]),i=!0);if(!n&&i)return Ember.copy(e);if(!n){if(t.resolveIndex!==t.state.handlerInfos.length-1)return;var s=t.state.handlerInfos[t.resolveIndex-1].context;return s}return this.findModel(n,o)},deserialize:function(e,t){return this.model(e,t)},findModel:function(){var e=s(this,"store");return e.find.apply(e,arguments)},store:Ember.computed(function(){{var e=this.container;this.routeName,s(this,"router.namespace")}return{find:function(t,r){var n=e.lookupFactory("model:"+t);if(n)return n.find(r)}}}),serialize:function(e,t){if(!(t.length<1)&&e){var r=t[0],n={};return/_id$/.test(r)&&1===t.length?n[r]=s(e,"id"):n=l(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||{};var o;e?(e=e.replace(/\//g,"."),o=e):(e=this.routeName,o=this.templateName||e);var a=t.view||this.viewName||e,u=this.container,l=u.lookup("view:"+a),c=l?l.get("template"):null;return c||(c=u.lookup("template:"+o)),l||c?(t=r(this,e,c,t),l=n(l,u,t),"main"===t.outlet&&(this.lastRenderedTemplate=e),i(this,l,t),void 0):(s(this.router,"namespace.LOG_VIEW_LOOKUPS"),void 0)},disconnectOutlet:function(e){if(!e||"string"==typeof e){var r=e;e={},e.outlet=r}e.parentView=e.parentView?e.parentView.replace(/\//g,"."):t(this),e.outlet=e.outlet||"main";var n=this.router._lookupActiveView(e.parentView);n&&n.disconnectOutlet(e.outlet)},willDestroy:function(){this.teardownViews()},teardownViews:function(){this.teardownTopLevelView&&this.teardownTopLevelView();var e=this.teardownOutletViews||[];c(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 a(e,t){return"controller"===t?t:Ember.ControllerMixin.detect(e)?a(i(e,"model"),t?t+".model":"model"):t}var s=r(e,t,o),u=o.types;return n.call(s,function(e,r){return"ID"===u[r]?a(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,t=(Ember.set,Ember.String.fmt,Array.prototype.slice);Ember.onLoad("Ember.Handlebars",function(){function r(e){var t=e.options.types,r=e.options.data;return a(e.context,e.params,{types:t,data:r})}var n=Ember.Object.extend({values:null}),i=Ember.Router.resolveParams,o=Ember.Router._translateQueryParams,a=Ember.Router.resolvePaths,s=Ember.ViewUtils.isSimpleClick,u=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)},_paramsChanged:function(){this.notifyPropertyChange("resolvedParams")},_setupPathObservers:function(){var e,t,n,i=this.parameters,o=i.options.linkTextPath,a=r(i),s=a.length;for(o&&(n=Ember.Handlebars.normalizePath(i.context,o,i.options.data),this.registerObserver(n.root,n.path,this,this.rerender)),t=0;s>t;t++)e=a[t],null!==e&&(n=Ember.Handlebars.normalizePath(i.context,e,i.options.data),this.registerObserver(n.root,n.path,this,this._paramsChanged));var u=this.queryParamsObject;if(u){var l=u.values;for(var c in l)l.hasOwnProperty(c)&&"ID"===u.types[c]&&(n=Ember.Handlebars.normalizePath(i.context,l[c],i.options.data),this.registerObserver(n.root,n.path,this,this._paramsChanged))}},afterRender:function(){this._super.apply(this,arguments),this._setupPathObservers()},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"),this.currentWhen||r[0]);this.currentWhen&&(n=[]);var o=t.isActive.apply(t,[i].concat(n));return o?e(this,"activeClass"):void 0}).property("resolvedParams","routeArgs"),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(!s(t))return!0;if(this.preventDefault!==!1&&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,n=e(this,"router"),i=e(this,"routeArgs");r=e(this,"replace")?n.replaceWith.apply(n,i):n.transitionTo.apply(n,i);var o=n.router.generate.apply(n.router,e(this,"routeArgs"));Ember.run.scheduleOnce("routerTransitions",this,this._eagerUpdateUrl,r,o)},_eagerUpdateUrl:function(t,r){if(t.isActive&&t.urlMethod){0===r.indexOf("#")&&(r=r.slice(1));var n=e(this,"router.router");"update"===t.urlMethod?n.updateURL(r):"replace"===t.urlMethod&&n.replaceURL(r),t.method(null)}},resolvedParams:Ember.computed(function(){var t=this.parameters,r=t.options,n=r.types,o=r.data;if(0===t.params.length){var a=this.container.lookup("controller:application");return[e(a,"currentRouteName")]}return i(t.context,t.params,{types:n,data:o})}).property("router.url"),routeArgs:Ember.computed(function(){var t=e(this,"resolvedParams").slice(0),r=e(this,"router"),n=t[0];if(n){var i=r.router.recognizer.handlersFor(n),o=i[i.length-1].handler;n!==o&&(this.set("currentWhen",n),n=i[i.length-1].handler,t[0]=n);for(var a=1,s=t.length;s>a;++a){var u=t[a];if(null===u||"undefined"==typeof u)return}return t}}).property("resolvedParams","queryParams"),queryParamsObject:null,queryParams:Ember.computed(function(){var t=e(this,"queryParamsObject"),r={};t&&Ember.merge(r,t.values);var n=e(this,"resolvedParams"),i=e(this,"router"),a=n[0],s=i._queryParamNamesFor(a),u=s.queryParams,l=s.translations,c={};o(r,l,a);var h=this.parameters;return i._queryParamOverrides(c,u,function(e,n){if(e in r){var i,o=e.split(":"),a=t.types[o[1]];if("ID"===a){var s=Ember.Handlebars.normalizePath(h.context,r[e],h.options.data);i=Ember.Handlebars.get(s.root,s.path,h.options)}else i=r[e];delete r[e],c[n]=i}}),c}).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:"#"});u.toString=function(){return"LinkView"},Ember.Handlebars.registerHelper("link-to",function(){var e=t.call(arguments,-1)[0],r=t.call(arguments,0,-1),i=e.hash;if(r[r.length-1]instanceof n&&(i.queryParamsObject=r.pop()),i.disabledBinding=i.disabledWhen,!e.fn){var o=r.shift(),a=e.types.shift(),s=this;"ID"===a?(e.linkTextPath=o,e.fn=function(){return Ember.Handlebars.getEscaped(s,o,e)}):e.fn=function(){return o}}return i.parameters={context:this,options:e,params:r},Ember.Handlebars.helpers.view.call(this,u,e)}),Ember.Handlebars.registerHelper("linkTo",function(){return Ember.Handlebars.helpers["link-to"].apply(this,arguments)})})}(),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,o,a,s;for(t&&t.data&&t.data.isRenderData&&(r=t,t="main"),i=r.data.view.container,n=r.data.view;!n.get("template.isTop");)n=n.get("_parentView");return o=r.hash.view,o&&(s="view:"+o),a=o?i.lookupFactory(s):r.hash.viewClass||e.OutletView,r.data.view.set("outletSource",n),r.hash.currentViewBinding="_view.outletSource._outlets."+t,e.helpers.view.call(this,a,r)})})}(),function(){Ember.get,Ember.set;Ember.onLoad("Ember.Handlebars",function(){Ember.Handlebars.registerHelper("render",function(e,t,r){var n,i,o,a,s,u=arguments.length;if(n=(r||t).data.keywords.controller.container,i=n.lookup("router:main"),2===u)r=t,t=void 0;else{if(3!==u)throw Ember.Error("You must pass a templateName to render");s=Ember.Handlebars.get(r.contexts[1],t,r)}e=e.replace(/\//g,"."),a=n.lookup("view:"+e)||n.lookup("view:default");var l=r.hash.controller||e,c="controller:"+l;r.hash.controller;var h=r.data.keywords.controller;if(u>2){var m=n.lookupFactory(c)||Ember.generateControllerFactory(n,l,s);o=m.create({model:s,parentController:h,target:h})}else o=n.lookup(c)||Ember.generateController(n,l),o.setProperties({target:h,parentController:h});var p=r.contexts[1];p&&a.registerObserver(p,t,function(){o.set("model",Ember.Handlebars.get(p,t,r))}),r.hash.viewName=Ember.String.camelize(e);var f="template:"+e;r.hash.template=n.lookup(f),r.hash.controller=o,i&&!s&&i._connectActiveView(e,a),Ember.Handlebars.helpers.view.call(this,a,r)})})}(),function(){Ember.onLoad("Ember.Handlebars",function(){function e(e,r){var n=[];r&&n.push(r);var i=e.options.types.slice(1),o=e.options.data;return n.concat(t(e.context,e.params,{types:i,data:o}))}var t=Ember.Router.resolveParams,r=Ember.ViewUtils.isSimpleClick,n=Ember.Handlebars,i=n.get,o=n.SafeString,a=Ember.ArrayPolyfills.forEach,s=(Ember.get,Array.prototype.slice),u=n.ActionHelper={registeredActions:{}},l=["alt","shift","meta","ctrl"],c=/^click|mouse|touch/,h=function(e,t){if("undefined"==typeof t){if(c.test(e.type))return r(e);t=""}if(t.indexOf("any")>=0)return!0;var n=!0;return a.call(l,function(r){e[r+"Key"]&&-1===t.indexOf(r)&&(n=!1)}),n};u.registerAction=function(t,r,n){var o=++Ember.uuid;return u.registeredActions[o]={eventName:r.eventName,handler:function(o){if(!h(o,n))return!0;r.preventDefault!==!1&&o.preventDefault(),r.bubbles===!1&&o.stopPropagation();var a,s=r.target;s=s.target?i(s.root,s.target,s.options):s.root,r.boundProperty&&(a=i(s,t,r.options),("undefined"==typeof a||"function"==typeof a)&&(a=t)),a||(a=t),Ember.run(function(){s.send?s.send.apply(s,e(r.parameters,a)):s[a].apply(s,e(r.parameters))})}},r.view.on("willClearRender",function(){delete u.registeredActions[o]}),o},n.registerHelper("action",function(e){var t=arguments[arguments.length-1],r=s.call(arguments,1,-1),n=t.hash,i=t.data.keywords.controller,a={eventName:n.on||"click",parameters:{context:this,options:t,params:r},view:t.data.view,bubbles:n.bubbles,preventDefault:n.preventDefault,target:{options:t},boundProperty:"ID"===t.types[0]};n.target?(a.target.root=this,a.target.target=n.target):i&&(a.target.root=i);var l=u.registerAction(e,a,n.allowedKeys);return new o('data-ember-action="'+l+'"')})})}(),function(){{var e=Ember.get;Ember.set,Ember.EnumerableUtils.map}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"),a=o&&o.lookup("router:main"),s=e(n,"renderedName");t(i,r,n),a&&s&&a._connectActiveView(s,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(){if(!this.isDestroyed){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:{},getHash:function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substr(t)}}}(),function(){var e=Ember.get,t=Ember.set;Ember.NoneLocation=Ember.Object.extend({implementation:"none",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}})}(),function(){var e=Ember.get,t=Ember.set,r=Ember.Location.getHash;Ember.HashLocation=Ember.Object.extend({implementation:"hash",init:function(){t(this,"location",e(this,"location")||window.location)},getURL:function(){return r().substr(1)},setURL:function(r){e(this,"location").hash=r,t(this,"lastSetURL",r)},replaceURL:function(r){e(this,"location").replace("#"+r),t(this,"lastSetURL",r)},onUpdateURL:function(r){var n=this,i=Ember.guidFor(this);Ember.$(window).on("hashchange.ember-location-"+i,function(){Ember.run(function(){var i=n.getURL();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)}})}(),function(){var e=Ember.get,t=Ember.set,r=!1,n=window.history&&"state"in window.history;Ember.HistoryLocation=Ember.Object.extend({implementation:"history",init:function(){t(this,"location",e(this,"location")||window.location),t(this,"baseURL",Ember.$("base").attr("href")||"")},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"),n=r.pathname,i=e(this,"baseURL");t=t.replace(/\/$/,""),i=i.replace(/\/$/,"");var o=n.replace(i,"").replace(t,"");return o},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"),n=e(this,"baseURL");return""!==t?(r=r.replace(/\/$/,""),n=n.replace(/\/$/,"")):n.match(/^\//)&&r.match(/^\//)&&(n=n.replace(/\/$/,"")),n+r+t},willDestroy:function(){var e=Ember.guidFor(this);Ember.$(window).off("popstate.ember-location-"+e)}})}(),function(){{var e=(Ember.get,Ember.set),t=document.documentMode,r=window.history,n=window.location,i=Ember.Location.getHash;Ember.AutoLocation={rootURL:"/",supportsHistory:function(){var e=window.navigator.userAgent;return-1!==e.indexOf("Android 2")&&-1!==e.indexOf("Mobile Safari")&&-1===e.indexOf("Chrome")?!1:!!(r&&"pushState"in r)}(),supportsHashChange:"onhashchange"in window&&(void 0===t||t>7),create:function(t){t&&t.rootURL&&(this.rootURL=t.rootURL);var r,i,o,a=!1,s=this.getFullPath();this.supportsHistory?(i=this.getHistoryPath(),s===i?r=Ember.HistoryLocation:(a=!0,n.replace(i))):this.supportsHashChange&&(o=this.getHashPath(),s===o?r=Ember.HashLocation:(a=!0,n.replace(o))),r||(r=Ember.NoneLocation);var u=r.create.apply(r,arguments);return a&&e(u,"cancelRouterSetup",!0),u},getPath:function(){var e=n.pathname;return"/"!==e.charAt(0)&&(e="/"+e),e},getFullPath:function(){return this.getPath()+i().substr(1)},getHistoryPath:function(){var e=this.getPath(),t=i().substr(1),r=e+t;return r.replace(/\/\//,"/")},getHashPath:function(){var e=this.getHistoryPath(),t=new RegExp("("+this.rootURL+")(.+)"),r=e.replace(t,"$1#/$2");return r=r.replace(/\/\//,"/")}}}}(),function(){function e(t,r,n,i){var o,a=t.name,s=t.incoming,u=t.incomingNames,l=u.length;if(n||(n={}),i||(i=[]),!n.hasOwnProperty(a)){for(i.push(a),n[a]=!0,o=0;l>o;o++)e(s[u[o]],r,n,i);r(t,i),i.pop()}}function t(){this.names=[],this.vertices={}}t.prototype.add=function(e){if(e){if(this.vertices.hasOwnProperty(e))return this.vertices[e];var t={name:e,incoming:{},incomingNames:[],hasOutgoing:!1,value:null};return this.vertices[e]=t,this.names.push(e),t}},t.prototype.map=function(e,t){this.add(e).value=t},t.prototype.addEdge=function(t,r){function n(e,t){if(e.name===r)throw new 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,a=this.names,s=a.length;for(r=0;s>r;r++)n=o[a[r]],n.hasOutgoing||e(n,t,i)},t.prototype.addEdges=function(e,t,r,n){var i;if(this.map(e,t),r)if("string"==typeof r)this.addEdge(e,r);else for(i=0;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=t.resolveMethodName;if(!t.name||!t.type)throw new TypeError("Invalid fullName: `"+e+"`, must be of the form `type:name` ");if(this[r]){var n=this[r](t);if(n)return n}return this.resolveOther(t)},parseName:function(n){var i=n.split(":"),o=i[0],a=i[1],s=a,u=e(this,"namespace"),l=u;if("template"!==o&&-1!==s.indexOf("/")){var c=s.split("/");s=c[c.length-1];var h=r(c.slice(0,-1).join("."));l=Ember.Namespace.byName(h)}return{fullName:n,type:o,fullNameWithoutType:a,name:s,root:l,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)},resolveHelper:function(e){return this.resolveOther(e)||Ember.Handlebars.helpers[e.fullNameWithoutType]},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)
19
+ },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.defaultRouter(),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(){if(this.Router!==!1){var e=this.__container__;return this.Router&&(e.unregister("router:main"),e.register("router:main",this.Router)),e.lookupFactory("router:main")}},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(){if(!this.isDestroyed){if(this.Router){var e=this.__container__;e.unregister("router:main"),e.register("router:main",this.Router)}return 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,a=this;for(e in n)t=n[e],o.addEdges(t.name,t.initialize,t.before,t.after);o.topsort(function(e){var t=e.value;t(i,a)})},didBecomeReady:function(){this.setupEventDispatcher(),this.ready(),this.startRouting(),Ember.testing||(Ember.Namespace.processAll(),Ember.BOOTED=!0),this.resolve(this)},setupEventDispatcher:function(){var e=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__.lookup("router:main").reset(),this.__container__.destroy()},initializer:function(e){this.constructor.initializer(e)}});Ember.Application.reopenClass({initializers:{},initializer:function(e){void 0!==this.superclass.initializers&&this.superclass.initializers===this.initializers&&this.reopenClass({initializers:Ember.create(this.initializers)}),this.initializers[e.name]=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.optionsForType("helper",{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.register("router:main",Ember.Router),n.injection("router:main","namespace","application:main"),n.register("location:auto",Ember.AutoLocation),n.register("location:hash",Ember.HashLocation),n.register("location:history",Ember.HistoryLocation),n.register("location:none",Ember.NoneLocation),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,a=[];for(i=0,o=r.length;o>i;i++)n=r[i],-1===n.indexOf(":")&&(n="controller:"+n),t.has(n)||a.push(n);if(a.length)throw new Ember.Error(Ember.inspect(e)+" needs [ "+a.join(", ")+" ] but "+(a.length>1?"they":"it")+" could not be found")}var t=Ember.get,r=(Ember.set,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 a=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(a)},setUnknownProperty:function(t){throw new Error("You cannot overwrite the value of `controllers."+t+"` of "+Ember.inspect(e))}}}));Ember.ControllerMixin.reopen({concatenatedProperties:["needs"],needs:[],init:function(){var r=t(this,"needs"),n=t(r,"length");n>0&&(this.container&&e(this,this.container,r),t(this,"controllers")),this._super.apply(this,arguments)},controllerFor:function(e){return Ember.controllerFor(t(this,"container"),e)},controllers:r})}(),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 a=function(){o.forEach(function(e){e()}),i.releaseMethods.removeObject(a)};return this.releaseMethods.pushObject(a),a},watchRecords:function(e,t,r,n){var i,o=this,a=Ember.A(),s=this.getRecords(e),u=function(e){r([e])},l=s.map(function(e){return a.push(o.observeRecord(e,u)),o.wrapRecord(e)}),c=function(e,r,i,s){for(var l=r;r+s>l;l++){var c=e.objectAt(l),h=o.wrapRecord(c);a.push(o.observeRecord(c,u)),t([h])}i&&n(r,i)},h={didChange:c,willChange:Ember.K};return s.addArrayObserver(o,h),i=function(){a.forEach(function(e){e()}),s.removeArrayObserver(o,h),o.releaseMethods.removeObject(i)},t(l),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 a=function(){n.removeArrayObserver(r,o)};return a},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.");
@@ -5,7 +5,7 @@
5
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
- * @version 1.4.0
8
+ * @version 1.5.0-beta.1.1
9
9
  */
10
10
 
11
11
 
@@ -88,7 +88,7 @@ var define, requireModule, require, requirejs;
88
88
 
89
89
  @class Ember
90
90
  @static
91
- @version 1.4.0
91
+ @version 1.5.0-beta.1
92
92
  */
93
93
 
94
94
  if ('undefined' === typeof Ember) {
@@ -115,10 +115,10 @@ Ember.toString = function() { return "Ember"; };
115
115
  /**
116
116
  @property VERSION
117
117
  @type String
118
- @default '1.4.0'
118
+ @default '1.5.0-beta.1'
119
119
  @static
120
120
  */
121
- Ember.VERSION = '1.4.0';
121
+ Ember.VERSION = '1.5.0-beta.1';
122
122
 
123
123
  /**
124
124
  Standard environmental variables. You can define these in a global `EmberENV`
@@ -348,7 +348,34 @@ Ember.none = Ember.deprecateFunc("Ember.none is deprecated. Please use Ember.isN
348
348
  Ember.isEmpty = function(obj) {
349
349
  return Ember.isNone(obj) || (obj.length === 0 && typeof obj !== 'function') || (typeof obj === 'object' && Ember.get(obj, 'length') === 0);
350
350
  };
351
- Ember.empty = Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.", Ember.isEmpty) ;
351
+ Ember.empty = Ember.deprecateFunc("Ember.empty is deprecated. Please use Ember.isEmpty instead.", Ember.isEmpty);
352
+
353
+
354
+ /**
355
+ A value is blank if it is empty or a whitespace string.
356
+
357
+ ```javascript
358
+ Ember.isBlank(); // true
359
+ Ember.isBlank(null); // true
360
+ Ember.isBlank(undefined); // true
361
+ Ember.isBlank(''); // true
362
+ Ember.isBlank([]); // true
363
+ Ember.isBlank('\n\t'); // true
364
+ Ember.isBlank(' '); // true
365
+ Ember.isBlank({}); // false
366
+ Ember.isBlank('\n\t Hello'); // false
367
+ Ember.isBlank('Hello world'); // false
368
+ Ember.isBlank([1,2,3]); // false
369
+ ```
370
+
371
+ @method isBlank
372
+ @for Ember
373
+ @param {Object} obj Value to test
374
+ @return {Boolean}
375
+ */
376
+ Ember.isBlank = function(obj) {
377
+ return Ember.isEmpty(obj) || (typeof obj === 'string' && obj.match(/\S/) === null);
378
+ };
352
379
 
353
380
 
354
381
  })();
@@ -593,19 +620,35 @@ var arrayIndexOf = isNativeFunc(Array.prototype.indexOf) ? Array.prototype.index
593
620
  return -1;
594
621
  };
595
622
 
623
+ var arrayFilter = isNativeFunc(Array.prototype.filter) ? Array.prototype.filter : function (fn, context) {
624
+ var i,
625
+ value,
626
+ result = [],
627
+ length = this.length;
596
628
 
597
- /**
598
- Array polyfills to support ES5 features in older browsers.
629
+ for (i = 0; i < length; i++) {
630
+ if (this.hasOwnProperty(i)) {
631
+ value = this[i];
632
+ if (fn.call(context, value, i, this)) {
633
+ result.push(value);
634
+ }
635
+ }
636
+ }
637
+ return result;
638
+ };
599
639
 
600
- @namespace Ember
601
- @property ArrayPolyfills
602
- */
603
- Ember.ArrayPolyfills = {
604
- map: arrayMap,
605
- forEach: arrayForEach,
606
- indexOf: arrayIndexOf
607
- };
640
+ /**
641
+ Array polyfills to support ES5 features in older browsers.
608
642
 
643
+ @namespace Ember
644
+ @property ArrayPolyfills
645
+ */
646
+ Ember.ArrayPolyfills = {
647
+ map: arrayMap,
648
+ forEach: arrayForEach,
649
+ filter: arrayFilter,
650
+ indexOf: arrayIndexOf
651
+ };
609
652
 
610
653
  if (Ember.SHIM_ES5) {
611
654
  if (!Array.prototype.map) {
@@ -616,6 +659,10 @@ if (Ember.SHIM_ES5) {
616
659
  Array.prototype.forEach = arrayForEach;
617
660
  }
618
661
 
662
+ if (!Array.prototype.filter) {
663
+ Array.prototype.filter = arrayFilter;
664
+ }
665
+
619
666
  if (!Array.prototype.indexOf) {
620
667
  Array.prototype.indexOf = arrayIndexOf;
621
668
  }
@@ -681,29 +728,6 @@ Ember.Error.prototype = Ember.create(Error.prototype);
681
728
  */
682
729
  Ember.onerror = null;
683
730
 
684
- /**
685
- Wrap code block in a try/catch if `Ember.onerror` is set.
686
-
687
- @private
688
- @method handleErrors
689
- @for Ember
690
- @param {Function} func
691
- @param [context]
692
- */
693
- Ember.handleErrors = function(func, context) {
694
- // Unfortunately in some browsers we lose the backtrace if we rethrow the existing error,
695
- // so in the event that we don't have an `onerror` handler we don't wrap in a try/catch
696
- if ('function' === typeof Ember.onerror) {
697
- try {
698
- return func.call(context || this);
699
- } catch (error) {
700
- Ember.onerror(error);
701
- }
702
- } else {
703
- return func.call(context || this);
704
- }
705
- };
706
-
707
731
  })();
708
732
 
709
733
 
@@ -724,9 +748,9 @@ var o_defineProperty = Ember.platform.defineProperty,
724
748
  o_create = Ember.create,
725
749
  // Used for guid generation...
726
750
  GUID_KEY = '__ember'+ (+ new Date()),
727
- uuid = 0,
728
751
  numberCache = [],
729
- stringCache = {};
752
+ stringCache = {},
753
+ uuid = 0;
730
754
 
731
755
  var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
732
756
 
@@ -774,8 +798,12 @@ Ember.generateGuid = function generateGuid(obj, prefix) {
774
798
  if (!prefix) prefix = Ember.GUID_PREFIX;
775
799
  var ret = (prefix + (uuid++));
776
800
  if (obj) {
777
- GUID_DESC.value = ret;
778
- o_defineProperty(obj, GUID_KEY, GUID_DESC);
801
+ if (obj[GUID_KEY] === null) {
802
+ obj[GUID_KEY] = ret;
803
+ } else {
804
+ GUID_DESC.value = ret;
805
+ o_defineProperty(obj, GUID_KEY, GUID_DESC);
806
+ }
779
807
  }
780
808
  return ret;
781
809
  };
@@ -822,9 +850,14 @@ Ember.guidFor = function guidFor(obj) {
822
850
  if (obj[GUID_KEY]) return obj[GUID_KEY];
823
851
  if (obj === Object) return '(Object)';
824
852
  if (obj === Array) return '(Array)';
825
- ret = 'ember'+(uuid++);
826
- GUID_DESC.value = ret;
827
- o_defineProperty(obj, GUID_KEY, GUID_DESC);
853
+ ret = 'ember' + (uuid++);
854
+
855
+ if (obj[GUID_KEY] === null) {
856
+ obj[GUID_KEY] = ret;
857
+ } else {
858
+ GUID_DESC.value = ret;
859
+ o_defineProperty(obj, GUID_KEY, GUID_DESC);
860
+ }
828
861
  return ret;
829
862
  }
830
863
  };
@@ -1026,13 +1059,11 @@ Ember.metaPath = function metaPath(obj, path, writable) {
1026
1059
  @return {Function} wrapped function.
1027
1060
  */
1028
1061
  Ember.wrap = function(func, superFunc) {
1029
- function K() {}
1030
-
1031
1062
  function superWrapper() {
1032
- var ret, sup = this._super;
1033
- this._super = superFunc || K;
1063
+ var ret, sup = this.__nextSuper;
1064
+ this.__nextSuper = superFunc;
1034
1065
  ret = func.apply(this, arguments);
1035
- this._super = sup;
1066
+ this.__nextSuper = sup;
1036
1067
  return ret;
1037
1068
  }
1038
1069
 
@@ -2043,8 +2074,13 @@ var o_create = Ember.create,
2043
2074
 
2044
2075
  function indexOf(array, target, method) {
2045
2076
  var index = -1;
2046
- for (var i = 0, l = array.length; i < l; i += 3) {
2047
- if (target === array[i] && method === array[i+1]) { index = i; break; }
2077
+ // hashes are added to the end of the event array
2078
+ // so it makes sense to start searching at the end
2079
+ // of the array and search in reverse
2080
+ for (var i = array.length - 3 ; i >=0; i -= 3) {
2081
+ if (target === array[i] && method === array[i + 1]) {
2082
+ index = i; break;
2083
+ }
2048
2084
  }
2049
2085
  return index;
2050
2086
  }
@@ -2197,9 +2233,10 @@ function removeListener(obj, eventName, target, method) {
2197
2233
  an object might suspend its property change listener while it is
2198
2234
  setting that property.
2199
2235
 
2200
- @private
2201
2236
  @method suspendListener
2202
2237
  @for Ember
2238
+
2239
+ @private
2203
2240
  @param obj
2204
2241
  @param {String} eventName
2205
2242
  @param {Object|Function} targetOrMethod A target object or a function
@@ -2228,9 +2265,10 @@ function suspendListener(obj, eventName, target, method, callback) {
2228
2265
  /**
2229
2266
  Suspends multiple listeners during a callback.
2230
2267
 
2231
- @private
2232
2268
  @method suspendListeners
2233
2269
  @for Ember
2270
+
2271
+ @private
2234
2272
  @param obj
2235
2273
  @param {Array} eventName Array of event names
2236
2274
  @param {Object|Function} targetOrMethod A target object or a function
@@ -3243,7 +3281,7 @@ function consoleMethod(name) {
3243
3281
 
3244
3282
  if (method) {
3245
3283
  // Older IE doesn't support apply, but Chrome needs it
3246
- if (method.apply) {
3284
+ if (typeof method.apply === 'function') {
3247
3285
  logToConsole = function() {
3248
3286
  method.apply(consoleObj, arguments);
3249
3287
  };
@@ -3486,7 +3524,12 @@ Ember.defineProperty = function(obj, keyName, desc, data, meta) {
3486
3524
  obj[keyName] = undefined; // make enumerable
3487
3525
  }
3488
3526
 
3489
- } else {
3527
+ if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
3528
+ if (desc.func && desc._dependentCPs) {
3529
+ addImplicitCPs(obj, desc._dependentCPs, meta);
3530
+ }
3531
+ }
3532
+ } else {
3490
3533
  descs[keyName] = undefined; // shadow descriptor in proto
3491
3534
  if (desc == null) {
3492
3535
  value = data;
@@ -3521,6 +3564,22 @@ Ember.defineProperty = function(obj, keyName, desc, data, meta) {
3521
3564
  return this;
3522
3565
  };
3523
3566
 
3567
+ if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
3568
+ var addImplicitCPs = function defineImplicitCPs(obj, implicitCPs, meta) {
3569
+ var cp, key, length = implicitCPs.length;
3570
+
3571
+ for (var i=0; i<length; ++i) {
3572
+ cp = implicitCPs[i];
3573
+ key = cp.implicitCPKey;
3574
+
3575
+ Ember.defineProperty(obj, key, cp, undefined, meta);
3576
+
3577
+ if (cp._dependentCPs) {
3578
+ addImplicitCPs(obj, cp._dependentCPs, meta);
3579
+ }
3580
+ }
3581
+ };
3582
+ }
3524
3583
 
3525
3584
  })();
3526
3585
 
@@ -4256,6 +4315,7 @@ var get = Ember.get,
4256
4315
 
4257
4316
  var expandProperties = Ember.expandProperties;
4258
4317
 
4318
+
4259
4319
  // ..........................................................
4260
4320
  // DEPENDENT KEYS
4261
4321
  //
@@ -4414,19 +4474,36 @@ function removeDependentKeys(desc, obj, keyName, meta) {
4414
4474
  */
4415
4475
  function ComputedProperty(func, opts) {
4416
4476
  this.func = func;
4417
-
4477
+ if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
4478
+ setDependentKeys(this, opts && opts.dependentKeys);
4479
+ } else {
4418
4480
  this._dependentKeys = opts && opts.dependentKeys;
4419
-
4481
+ }
4420
4482
 
4421
4483
  this._cacheable = (opts && opts.cacheable !== undefined) ? opts.cacheable : true;
4422
4484
  this._readOnly = opts && (opts.readOnly !== undefined || !!opts.readOnly);
4423
4485
  }
4424
4486
 
4425
4487
  Ember.ComputedProperty = ComputedProperty;
4488
+
4426
4489
  ComputedProperty.prototype = new Ember.Descriptor();
4427
4490
 
4428
4491
  var ComputedPropertyPrototype = ComputedProperty.prototype;
4492
+ ComputedPropertyPrototype._dependentKeys = undefined;
4493
+ ComputedPropertyPrototype._suspended = undefined;
4494
+ ComputedPropertyPrototype._meta = undefined;
4495
+
4496
+ if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
4497
+ ComputedPropertyPrototype._dependentCPs = undefined;
4498
+ ComputedPropertyPrototype.implicitCPKey = undefined;
4429
4499
 
4500
+ ComputedPropertyPrototype.toString = function() {
4501
+ if (this.implicitCPKey) {
4502
+ return this.implicitCPKey;
4503
+ }
4504
+ return Ember.Descriptor.prototype.toString.apply(this, arguments);
4505
+ };
4506
+ }
4430
4507
 
4431
4508
  /**
4432
4509
  Properties are cacheable by default. Computed property will automatically
@@ -4531,9 +4608,11 @@ ComputedPropertyPrototype.property = function() {
4531
4608
  expandProperties(arguments[i], addArg);
4532
4609
  }
4533
4610
 
4534
-
4611
+ if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
4612
+ setDependentKeys(this, args);
4613
+ } else {
4535
4614
  this._dependentKeys = args;
4536
-
4615
+ }
4537
4616
 
4538
4617
  return this;
4539
4618
  };
@@ -4795,8 +4874,74 @@ function getProperties(self, propertyNames) {
4795
4874
 
4796
4875
  var registerComputed, registerComputedWithProperties;
4797
4876
 
4877
+ if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
4878
+ var guidFor = Ember.guidFor,
4879
+ map = Ember.EnumerableUtils.map,
4880
+ filter = Ember.EnumerableUtils.filter,
4881
+ typeOf = Ember.typeOf;
4882
+
4883
+ var implicitKey = function (cp) {
4884
+ return [guidFor(cp)].concat(cp._dependentKeys).join('_').replace(/\./g, '_DOT_');
4885
+ };
4886
+
4887
+ var normalizeDependentKey = function (key) {
4888
+ if (key instanceof Ember.ComputedProperty) {
4889
+ return implicitKey(key);
4890
+ } else {
4891
+ return key;
4892
+ }
4893
+ };
4894
+
4895
+ var normalizeDependentKeys = function (keys) {
4896
+ return map(keys, function (key) {
4897
+ return normalizeDependentKey(key);
4898
+ });
4899
+ };
4798
4900
 
4901
+ var selectDependentCPs = function (keys) {
4902
+ return filter(keys, function (key) {
4903
+ return key instanceof Ember.ComputedProperty;
4904
+ });
4905
+ };
4906
+
4907
+ var setDependentKeys = function(cp, dependentKeys) {
4908
+ if (dependentKeys) {
4909
+ cp._dependentKeys = normalizeDependentKeys(dependentKeys);
4910
+ cp._dependentCPs = selectDependentCPs(dependentKeys);
4911
+ } else {
4912
+ cp._dependentKeys = cp._dependentCPs = [];
4913
+ }
4914
+ cp.implicitCPKey = implicitKey(cp);
4915
+ };
4916
+ // expose `normalizeDependentKey[s]` so user CP macros can easily support
4917
+ // composition
4918
+ Ember.computed.normalizeDependentKey = normalizeDependentKey;
4919
+ Ember.computed.normalizeDependentKeys = normalizeDependentKeys;
4799
4920
 
4921
+ registerComputed = function (name, macro) {
4922
+ Ember.computed[name] = function(dependentKey) {
4923
+ var args = normalizeDependentKeys(a_slice.call(arguments));
4924
+ return Ember.computed(dependentKey, function() {
4925
+ return macro.apply(this, args);
4926
+ });
4927
+ };
4928
+ };
4929
+ }
4930
+
4931
+ if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
4932
+ registerComputedWithProperties = function(name, macro) {
4933
+ Ember.computed[name] = function() {
4934
+ var args = a_slice.call(arguments);
4935
+ var properties = normalizeDependentKeys(args);
4936
+
4937
+ var computed = Ember.computed(function() {
4938
+ return macro.apply(this, [getProperties(this, properties)]);
4939
+ });
4940
+
4941
+ return computed.property.apply(computed, args);
4942
+ };
4943
+ };
4944
+ } else {
4800
4945
  registerComputed = function (name, macro) {
4801
4946
  Ember.computed[name] = function(dependentKey) {
4802
4947
  var args = a_slice.call(arguments);
@@ -4817,39 +4962,48 @@ var registerComputed, registerComputedWithProperties;
4817
4962
  return computed.property.apply(computed, properties);
4818
4963
  };
4819
4964
  };
4965
+ }
4820
4966
 
4821
4967
 
4968
+ if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
4969
+ Ember.computed.literal = function (value) {
4970
+ return Ember.computed(function () {
4971
+ return value;
4972
+ });
4973
+ };
4974
+ }
4822
4975
 
4823
4976
 
4824
- /**
4825
- A computed property that returns true if the value of the dependent
4826
- property is null, an empty string, empty array, or empty function.
4977
+ /**
4978
+ A computed property that returns true if the value of the dependent
4979
+ property is null, an empty string, empty array, or empty function.
4827
4980
 
4828
- Note: When using `Ember.computed.empty` to watch an array make sure to
4829
- use the `array.[]` syntax so the computed can subscribe to transitions
4830
- from empty to non-empty states.
4981
+ Note: When using `Ember.computed.empty` to watch an array make sure to
4982
+ use the `array.[]` syntax so the computed can subscribe to transitions
4983
+ from empty to non-empty states.
4831
4984
 
4832
- Example
4985
+ Example
4833
4986
 
4834
- ```javascript
4835
- var ToDoList = Ember.Object.extend({
4836
- done: Ember.computed.empty('todos.[]') // detect array changes
4987
+ ```javascript
4988
+ var ToDoList = Ember.Object.extend({
4989
+ done: Ember.computed.empty('todos.[]') // detect array changes
4990
+ });
4991
+ var todoList = ToDoList.create({todos: ['Unit Test', 'Documentation', 'Release']});
4992
+ todoList.get('done'); // false
4993
+ todoList.get('todos').clear(); // []
4994
+ todoList.get('done'); // true
4995
+ ```
4996
+
4997
+ @method computed.empty
4998
+ @for Ember
4999
+ @param {String} dependentKey
5000
+ @return {Ember.ComputedProperty} computed property which negate
5001
+ the original value for property
5002
+ */
5003
+ registerComputed('empty', function(dependentKey) {
5004
+ return Ember.isEmpty(get(this, dependentKey));
4837
5005
  });
4838
- var todoList = ToDoList.create({todos: ['Unit Test', 'Documentation', 'Release']});
4839
- todoList.get('done'); // false
4840
- todoList.get('todos').clear(); // []
4841
- todoList.get('done'); // true
4842
- ```
4843
5006
 
4844
- @method computed.empty
4845
- @for Ember
4846
- @param {String} dependentKey
4847
- @return {Ember.ComputedProperty} computed property which negate
4848
- the original value for property
4849
- */
4850
- registerComputed('empty', function(dependentKey) {
4851
- return Ember.isEmpty(get(this, dependentKey));
4852
- });
4853
5007
 
4854
5008
  /**
4855
5009
  A computed property that returns true if the value of the dependent
@@ -5350,6 +5504,52 @@ Ember.computed.oneWay = function(dependentKey) {
5350
5504
  });
5351
5505
  };
5352
5506
 
5507
+
5508
+
5509
+ /**
5510
+ Where `computed.oneWay` provides oneWay bindings, `computed.readOnly` provides
5511
+ a readOnly one way binding. Very often when using `computed.oneWay` one does
5512
+ not also want changes to propogate back up, as they will replace the value.
5513
+
5514
+ This prevents the reverse flow, and also throws an exception when it occurs.
5515
+
5516
+ Example
5517
+
5518
+ ```javascript
5519
+ User = Ember.Object.extend({
5520
+ firstName: null,
5521
+ lastName: null,
5522
+ nickName: Ember.computed.readOnly('firstName')
5523
+ });
5524
+
5525
+ user = User.create({
5526
+ firstName: 'Teddy',
5527
+ lastName: 'Zeenny'
5528
+ });
5529
+
5530
+ user.get('nickName');
5531
+ # 'Teddy'
5532
+
5533
+ user.set('nickName', 'TeddyBear');
5534
+ # throws Exception
5535
+ # throw new Ember.Error('Cannot Set: nickName on: <User:ember27288>' );`
5536
+
5537
+ user.get('firstName');
5538
+ # 'Teddy'
5539
+ ```
5540
+
5541
+ @method computed.readOnly
5542
+ @for Ember
5543
+ @param {String} dependentKey
5544
+ @return {Ember.ComputedProperty} computed property which creates a
5545
+ one way computed property to the original value for property.
5546
+ */
5547
+ Ember.computed.readOnly = function(dependentKey) {
5548
+ return Ember.computed(dependentKey, function() {
5549
+ return get(this, dependentKey);
5550
+ }).readOnly();
5551
+ };
5552
+
5353
5553
  /**
5354
5554
  A computed property that acts like a standard getter and setter,
5355
5555
  but returns the value at the provided `defaultPath` if the
@@ -5498,7 +5698,7 @@ Ember.removeBeforeObserver = function(obj, _path, target, method) {
5498
5698
 
5499
5699
 
5500
5700
  (function() {
5501
- define("backburner/queue",
5701
+ define("backburner/queue",
5502
5702
  ["exports"],
5503
5703
  function(__exports__) {
5504
5704
  "use strict";
@@ -5605,11 +5805,10 @@ define("backburner/queue",
5605
5805
  }
5606
5806
  };
5607
5807
 
5608
-
5609
5808
  __exports__.Queue = Queue;
5610
5809
  });
5611
5810
 
5612
- define("backburner/deferred_action_queues",
5811
+ define("backburner/deferred_action_queues",
5613
5812
  ["backburner/queue","exports"],
5614
5813
  function(__dependency1__, __exports__) {
5615
5814
  "use strict";
@@ -5708,11 +5907,10 @@ define("backburner/deferred_action_queues",
5708
5907
  return -1;
5709
5908
  }
5710
5909
 
5711
-
5712
5910
  __exports__.DeferredActionQueues = DeferredActionQueues;
5713
5911
  });
5714
5912
 
5715
- define("backburner",
5913
+ define("backburner",
5716
5914
  ["backburner/deferred_action_queues","exports"],
5717
5915
  function(__dependency1__, __exports__) {
5718
5916
  "use strict";
@@ -5913,24 +6111,39 @@ define("backburner",
5913
6111
  return fn;
5914
6112
  },
5915
6113
 
5916
- throttle: function(target, method /* , args, wait */) {
6114
+ throttle: function(target, method /* , args, wait, [immediate] */) {
5917
6115
  var self = this,
5918
6116
  args = arguments,
5919
- wait = parseInt(pop.call(args), 10),
6117
+ immediate = pop.call(args),
6118
+ wait,
5920
6119
  throttler,
5921
6120
  index,
5922
6121
  timer;
5923
6122
 
6123
+ if (typeof immediate === "number" || typeof immediate === "string") {
6124
+ wait = immediate;
6125
+ immediate = true;
6126
+ } else {
6127
+ wait = pop.call(args);
6128
+ }
6129
+
6130
+ wait = parseInt(wait, 10);
6131
+
5924
6132
  index = findThrottler(target, method);
5925
6133
  if (index > -1) { return throttlers[index]; } // throttled
5926
6134
 
5927
6135
  timer = global.setTimeout(function() {
5928
- self.run.apply(self, args);
5929
-
6136
+ if (!immediate) {
6137
+ self.run.apply(self, args);
6138
+ }
5930
6139
  var index = findThrottler(target, method);
5931
6140
  if (index > -1) { throttlers.splice(index, 1); }
5932
6141
  }, wait);
5933
6142
 
6143
+ if (immediate) {
6144
+ self.run.apply(self, args);
6145
+ }
6146
+
5934
6147
  throttler = [target, method, timer];
5935
6148
 
5936
6149
  throttlers.push(throttler);
@@ -6027,7 +6240,7 @@ define("backburner",
6027
6240
  }
6028
6241
  }
6029
6242
  } else if (Object.prototype.toString.call(timer) === "[object Array]"){ // we're cancelling a throttle or debounce
6030
- return this._cancelItem(findThrottler, throttlers, timer) ||
6243
+ return this._cancelItem(findThrottler, throttlers, timer) ||
6031
6244
  this._cancelItem(findDebouncee, debouncees, timer);
6032
6245
  } else {
6033
6246
  return; // timer was null or not a timer
@@ -6137,10 +6350,8 @@ define("backburner",
6137
6350
  return index;
6138
6351
  }
6139
6352
 
6140
-
6141
6353
  __exports__.Backburner = Backburner;
6142
6354
  });
6143
-
6144
6355
  })();
6145
6356
 
6146
6357
 
@@ -6198,22 +6409,21 @@ var Backburner = requireModule('backburner').Backburner,
6198
6409
  @param {Object} [args*] Any additional arguments you wish to pass to the method.
6199
6410
  @return {Object} return value from invoking the passed function.
6200
6411
  */
6201
- Ember.run = function(target, method) {
6202
- var ret;
6203
-
6412
+ Ember.run = function() {
6204
6413
  if (Ember.onerror) {
6205
- try {
6206
- ret = backburner.run.apply(backburner, arguments);
6207
- } catch (e) {
6208
- Ember.onerror(e);
6209
- }
6414
+ return onerror(arguments);
6210
6415
  } else {
6211
- ret = backburner.run.apply(backburner, arguments);
6416
+ return backburner.run.apply(backburner, arguments);
6212
6417
  }
6213
-
6214
- return ret;
6215
6418
  };
6216
6419
 
6420
+ function onerror(args) {
6421
+ try {
6422
+ return backburner.run.apply(backburner, args);
6423
+ } catch(error) {
6424
+ Ember.onerror(error);
6425
+ }
6426
+ }
6217
6427
  /**
6218
6428
  If no run-loop is present, it creates a new one. If a run loop is
6219
6429
  present it will queue itself to run on the existing run-loops action
@@ -6288,7 +6498,7 @@ Ember.run.join = function(target, method /* args */) {
6288
6498
  run-loop-wrapped callback handler.
6289
6499
 
6290
6500
  ```javascript
6291
- jQuery(window).on('resize', Ember.run.bind(this, this.triggerResize));
6501
+ jQuery(window).on('resize', Ember.run.bind(this, this.handleResize));
6292
6502
  ```
6293
6503
 
6294
6504
  @method bind
@@ -6622,7 +6832,7 @@ Ember.run.next = function() {
6622
6832
 
6623
6833
  var throttle = Ember.run.throttle(myContext, function() {
6624
6834
  // will not be executed
6625
- }, 1);
6835
+ }, 1, false);
6626
6836
  Ember.run.cancel(throttle);
6627
6837
 
6628
6838
  var debounce = Ember.run.debounce(myContext, function() {
@@ -6708,7 +6918,8 @@ Ember.run.cancel = function(timer) {
6708
6918
  then it will be looked up on the passed target.
6709
6919
  @param {Object} [args*] Optional arguments to pass to the timeout.
6710
6920
  @param {Number} wait Number of milliseconds to wait.
6711
- @param {Boolean} immediate Trigger the function on the leading instead of the trailing edge of the wait interval.
6921
+ @param {Boolean} immediate Trigger the function on the leading instead
6922
+ of the trailing edge of the wait interval. Defaults to false.
6712
6923
  @return {Array} Timer information for use in cancelling, see `Ember.run.cancel`.
6713
6924
  */
6714
6925
  Ember.run.debounce = function() {
@@ -6724,9 +6935,7 @@ Ember.run.debounce = function() {
6724
6935
  var myContext = {name: 'throttle'};
6725
6936
 
6726
6937
  Ember.run.throttle(myContext, myFunc, 150);
6727
-
6728
- // 50ms passes
6729
- Ember.run.throttle(myContext, myFunc, 150);
6938
+ // myFunc is invoked with context myContext
6730
6939
 
6731
6940
  // 50ms passes
6732
6941
  Ember.run.throttle(myContext, myFunc, 150);
@@ -6735,8 +6944,9 @@ Ember.run.debounce = function() {
6735
6944
  Ember.run.throttle(myContext, myFunc, 150);
6736
6945
 
6737
6946
  // 150ms passes
6947
+ Ember.run.throttle(myContext, myFunc, 150);
6738
6948
  // myFunc is invoked with context myContext
6739
- // console logs 'throttle ran.' twice, 150ms apart.
6949
+ // console logs 'throttle ran.' twice, 250ms apart.
6740
6950
  ```
6741
6951
 
6742
6952
  @method throttle
@@ -7257,6 +7467,16 @@ var Mixin, REQUIRED, Alias,
7257
7467
 
7258
7468
  var expandProperties = Ember.expandProperties;
7259
7469
 
7470
+ function superFunction(){
7471
+ var ret, func = this.__nextSuper;
7472
+ if (func) {
7473
+ this.__nextSuper = null;
7474
+ ret = func.apply(this, arguments);
7475
+ this.__nextSuper = func;
7476
+ }
7477
+ return ret;
7478
+ }
7479
+
7260
7480
  function mixinsMeta(obj) {
7261
7481
  var m = metaFor(obj, true), ret = m.mixins;
7262
7482
  if (!ret) {
@@ -7382,19 +7602,26 @@ function applyMergedProperties(obj, key, value, values) {
7382
7602
 
7383
7603
  if (!baseValue) { return value; }
7384
7604
 
7385
- var newBase = Ember.merge({}, baseValue);
7605
+ var newBase = Ember.merge({}, baseValue),
7606
+ hasFunction = false;
7607
+
7386
7608
  for (var prop in value) {
7387
7609
  if (!value.hasOwnProperty(prop)) { continue; }
7388
7610
 
7389
7611
  var propValue = value[prop];
7390
7612
  if (isMethod(propValue)) {
7391
7613
  // TODO: support for Computed Properties, etc?
7614
+ hasFunction = true;
7392
7615
  newBase[prop] = giveMethodSuper(obj, prop, propValue, baseValue, {});
7393
7616
  } else {
7394
7617
  newBase[prop] = propValue;
7395
7618
  }
7396
7619
  }
7397
7620
 
7621
+ if (hasFunction) {
7622
+ newBase._super = superFunction;
7623
+ }
7624
+
7398
7625
  return newBase;
7399
7626
  }
7400
7627
 
@@ -7403,7 +7630,7 @@ function addNormalizedProperty(base, key, value, meta, descs, values, concats, m
7403
7630
  if (value === REQUIRED && descs[key]) { return CONTINUE; }
7404
7631
 
7405
7632
  // Wrap descriptor function to implement
7406
- // _super() if needed
7633
+ // __nextSuper() if needed
7407
7634
  if (value.func) {
7408
7635
  value = giveDescriptorSuper(meta, key, value, values, descs);
7409
7636
  }
@@ -7549,6 +7776,8 @@ function applyMixin(obj, mixins, partial) {
7549
7776
  var descs = {}, values = {}, m = metaFor(obj),
7550
7777
  key, value, desc, keys = [];
7551
7778
 
7779
+ obj._super = superFunction;
7780
+
7552
7781
  // Go through all mixins and hashes passed in, and:
7553
7782
  //
7554
7783
  // * Handle concatenated properties
@@ -10221,133 +10450,11 @@ define("rsvp",
10221
10450
  })();
10222
10451
 
10223
10452
  (function() {
10224
- /**
10225
- Public api for the container is still in flux.
10226
- The public api, specified on the application namespace should be considered the stable api.
10227
- // @module container
10228
- @private
10229
- */
10230
-
10231
- /*
10232
- Flag to enable/disable model factory injections (disabled by default)
10233
- If model factory injections are enabled, models should not be
10234
- accessed globally (only through `container.lookupFactory('model:modelName'))`);
10235
- */
10236
- Ember.MODEL_FACTORY_INJECTIONS = false || !!Ember.ENV.MODEL_FACTORY_INJECTIONS;
10237
-
10238
- define("container",
10239
- [],
10240
- function() {
10453
+ define("container/container",
10454
+ ["container/inheriting_dict","exports"],
10455
+ function(__dependency1__, __exports__) {
10241
10456
  "use strict";
10242
-
10243
- // A safe and simple inheriting object.
10244
- function InheritingDict(parent) {
10245
- this.parent = parent;
10246
- this.dict = {};
10247
- }
10248
-
10249
- InheritingDict.prototype = {
10250
-
10251
- /**
10252
- @property parent
10253
- @type InheritingDict
10254
- @default null
10255
- */
10256
-
10257
- parent: null,
10258
-
10259
- /**
10260
- Object used to store the current nodes data.
10261
-
10262
- @property dict
10263
- @type Object
10264
- @default Object
10265
- */
10266
- dict: null,
10267
-
10268
- /**
10269
- Retrieve the value given a key, if the value is present at the current
10270
- level use it, otherwise walk up the parent hierarchy and try again. If
10271
- no matching key is found, return undefined.
10272
-
10273
- @method get
10274
- @param {String} key
10275
- @return {any}
10276
- */
10277
- get: function(key) {
10278
- var dict = this.dict;
10279
-
10280
- if (dict.hasOwnProperty(key)) {
10281
- return dict[key];
10282
- }
10283
-
10284
- if (this.parent) {
10285
- return this.parent.get(key);
10286
- }
10287
- },
10288
-
10289
- /**
10290
- Set the given value for the given key, at the current level.
10291
-
10292
- @method set
10293
- @param {String} key
10294
- @param {Any} value
10295
- */
10296
- set: function(key, value) {
10297
- this.dict[key] = value;
10298
- },
10299
-
10300
- /**
10301
- Delete the given key
10302
-
10303
- @method remove
10304
- @param {String} key
10305
- */
10306
- remove: function(key) {
10307
- delete this.dict[key];
10308
- },
10309
-
10310
- /**
10311
- Check for the existence of given a key, if the key is present at the current
10312
- level return true, otherwise walk up the parent hierarchy and try again. If
10313
- no matching key is found, return false.
10314
-
10315
- @method has
10316
- @param {String} key
10317
- @return {Boolean}
10318
- */
10319
- has: function(key) {
10320
- var dict = this.dict;
10321
-
10322
- if (dict.hasOwnProperty(key)) {
10323
- return true;
10324
- }
10325
-
10326
- if (this.parent) {
10327
- return this.parent.has(key);
10328
- }
10329
-
10330
- return false;
10331
- },
10332
-
10333
- /**
10334
- Iterate and invoke a callback for each local key-value pair.
10335
-
10336
- @method eachLocal
10337
- @param {Function} callback
10338
- @param {Object} binding
10339
- */
10340
- eachLocal: function(callback, binding) {
10341
- var dict = this.dict;
10342
-
10343
- for (var prop in dict) {
10344
- if (dict.hasOwnProperty(prop)) {
10345
- callback.call(binding, prop, dict[prop]);
10346
- }
10347
- }
10348
- }
10349
- };
10350
-
10457
+ var InheritingDict = __dependency1__["default"];
10351
10458
 
10352
10459
  // A lightweight container that helps to assemble and decouple components.
10353
10460
  // Public api for the container is still in flux.
@@ -11063,7 +11170,7 @@ define("container",
11063
11170
  }
11064
11171
  }
11065
11172
 
11066
- function injectionsFor(container ,fullName) {
11173
+ function injectionsFor(container, fullName) {
11067
11174
  var splitName = fullName.split(":"),
11068
11175
  type = splitName[0],
11069
11176
  injections = [];
@@ -11153,9 +11260,144 @@ define("container",
11153
11260
  injections.push({ property: property, fullName: injectionName });
11154
11261
  }
11155
11262
 
11156
- return Container;
11157
- });
11263
+ __exports__["default"] = Container;
11264
+ });
11265
+ define("container/inheriting_dict",
11266
+ ["exports"],
11267
+ function(__exports__) {
11268
+ "use strict";
11269
+ // A safe and simple inheriting object.
11270
+ function InheritingDict(parent) {
11271
+ this.parent = parent;
11272
+ this.dict = {};
11273
+ }
11274
+
11275
+ InheritingDict.prototype = {
11276
+
11277
+ /**
11278
+ @property parent
11279
+ @type InheritingDict
11280
+ @default null
11281
+ */
11282
+
11283
+ parent: null,
11284
+
11285
+ /**
11286
+ Object used to store the current nodes data.
11287
+
11288
+ @property dict
11289
+ @type Object
11290
+ @default Object
11291
+ */
11292
+ dict: null,
11293
+
11294
+ /**
11295
+ Retrieve the value given a key, if the value is present at the current
11296
+ level use it, otherwise walk up the parent hierarchy and try again. If
11297
+ no matching key is found, return undefined.
11298
+
11299
+ @method get
11300
+ @param {String} key
11301
+ @return {any}
11302
+ */
11303
+ get: function(key) {
11304
+ var dict = this.dict;
11305
+
11306
+ if (dict.hasOwnProperty(key)) {
11307
+ return dict[key];
11308
+ }
11158
11309
 
11310
+ if (this.parent) {
11311
+ return this.parent.get(key);
11312
+ }
11313
+ },
11314
+
11315
+ /**
11316
+ Set the given value for the given key, at the current level.
11317
+
11318
+ @method set
11319
+ @param {String} key
11320
+ @param {Any} value
11321
+ */
11322
+ set: function(key, value) {
11323
+ this.dict[key] = value;
11324
+ },
11325
+
11326
+ /**
11327
+ Delete the given key
11328
+
11329
+ @method remove
11330
+ @param {String} key
11331
+ */
11332
+ remove: function(key) {
11333
+ delete this.dict[key];
11334
+ },
11335
+
11336
+ /**
11337
+ Check for the existence of given a key, if the key is present at the current
11338
+ level return true, otherwise walk up the parent hierarchy and try again. If
11339
+ no matching key is found, return false.
11340
+
11341
+ @method has
11342
+ @param {String} key
11343
+ @return {Boolean}
11344
+ */
11345
+ has: function(key) {
11346
+ var dict = this.dict;
11347
+
11348
+ if (dict.hasOwnProperty(key)) {
11349
+ return true;
11350
+ }
11351
+
11352
+ if (this.parent) {
11353
+ return this.parent.has(key);
11354
+ }
11355
+
11356
+ return false;
11357
+ },
11358
+
11359
+ /**
11360
+ Iterate and invoke a callback for each local key-value pair.
11361
+
11362
+ @method eachLocal
11363
+ @param {Function} callback
11364
+ @param {Object} binding
11365
+ */
11366
+ eachLocal: function(callback, binding) {
11367
+ var dict = this.dict;
11368
+
11369
+ for (var prop in dict) {
11370
+ if (dict.hasOwnProperty(prop)) {
11371
+ callback.call(binding, prop, dict[prop]);
11372
+ }
11373
+ }
11374
+ }
11375
+ };
11376
+
11377
+ __exports__["default"] = InheritingDict;
11378
+ });
11379
+ define("container",
11380
+ ["container/container","exports"],
11381
+ function(__dependency1__, __exports__) {
11382
+ "use strict";
11383
+ /**
11384
+ Public api for the container is still in flux.
11385
+ The public api, specified on the application namespace should be considered the stable api.
11386
+ // @module container
11387
+ @private
11388
+ */
11389
+
11390
+ /*
11391
+ Flag to enable/disable model factory injections (disabled by default)
11392
+ If model factory injections are enabled, models should not be
11393
+ accessed globally (only through `container.lookupFactory('model:modelName'))`);
11394
+ */
11395
+ Ember.MODEL_FACTORY_INJECTIONS = false || !!Ember.ENV.MODEL_FACTORY_INJECTIONS;
11396
+
11397
+ var Container = __dependency1__["default"];
11398
+
11399
+ __exports__["default"] = Container;
11400
+ });
11159
11401
  })();
11160
11402
 
11161
11403
  (function() {
@@ -12341,6 +12583,13 @@ var undefinedDescriptor = {
12341
12583
  value: undefined
12342
12584
  };
12343
12585
 
12586
+ var nullDescriptor = {
12587
+ configurable: true,
12588
+ writable: true,
12589
+ enumerable: false,
12590
+ value: null
12591
+ };
12592
+
12344
12593
  function makeCtor() {
12345
12594
 
12346
12595
  // Note: avoid accessing any properties on the object since it makes the
@@ -12353,8 +12602,8 @@ function makeCtor() {
12353
12602
  if (!wasApplied) {
12354
12603
  Class.proto(); // prepare prototype...
12355
12604
  }
12356
- o_defineProperty(this, GUID_KEY, undefinedDescriptor);
12357
- o_defineProperty(this, '_super', undefinedDescriptor);
12605
+ o_defineProperty(this, GUID_KEY, nullDescriptor);
12606
+ o_defineProperty(this, '__nextSuper', undefinedDescriptor);
12358
12607
  var m = meta(this), proto = m.proto;
12359
12608
  m.proto = this;
12360
12609
  if (initMixins) {
@@ -14975,7 +15224,6 @@ DependentArraysObserver.prototype = {
14975
15224
  },
14976
15225
 
14977
15226
  setupObservers: function (dependentArray, dependentKey) {
14978
-
14979
15227
  this.dependentKeysByGuid[guidFor(dependentArray)] = dependentKey;
14980
15228
 
14981
15229
  dependentArray.addArrayObserver(this, {
@@ -15365,6 +15613,7 @@ function ReduceComputedProperty(options) {
15365
15613
 
15366
15614
  meta.dependentArraysObserver.suspendArrayObservers(function () {
15367
15615
  forEach(cp._dependentKeys, function (dependentKey) {
15616
+
15368
15617
  if (!partiallyRecomputeFor(this, dependentKey)) { return; }
15369
15618
 
15370
15619
  var dependentArray = get(this, dependentKey),
@@ -15483,7 +15732,7 @@ ReduceComputedProperty.prototype.property = function () {
15483
15732
  dependentArrayKey,
15484
15733
  itemPropertyKey;
15485
15734
 
15486
- forEach(a_slice.call(arguments), function (dependentKey) {
15735
+ forEach(args, function (dependentKey) {
15487
15736
  if (doubleEachPropertyPattern.test(dependentKey)) {
15488
15737
  throw new Ember.Error("Nested @each properties not supported: " + dependentKey);
15489
15738
  } else if (match = eachPropertyPattern.exec(dependentKey)) {
@@ -16592,10 +16841,12 @@ Ember.computed.sort = function (itemsKey, sortDefinition) {
16592
16841
 
16593
16842
 
16594
16843
  instanceMeta.order = function (itemA, itemB) {
16595
- var sortProperty, result, asc;
16844
+ var isProxy = itemB instanceof SearchProxy,
16845
+ sortProperty, result, asc;
16846
+
16596
16847
  for (var i = 0; i < this.sortProperties.length; ++i) {
16597
16848
  sortProperty = this.sortProperties[i];
16598
- result = Ember.compare(get(itemA, sortProperty), get(itemB, sortProperty));
16849
+ result = Ember.compare(get(itemA, sortProperty), isProxy ? itemB[sortProperty] : get(itemB, sortProperty));
16599
16850
 
16600
16851
  if (result !== 0) {
16601
16852
  asc = this.sortPropertyAscending[sortProperty];
@@ -17811,9 +18062,37 @@ Ember.Evented = Ember.Mixin.create({
17811
18062
  (function() {
17812
18063
  var RSVP = requireModule("rsvp");
17813
18064
 
17814
- RSVP.configure('async', function(callback, promise) {
17815
- Ember.run.schedule('actions', promise, callback, promise);
17816
- });
18065
+ if (Ember.FEATURES['ember-runtime-test-friendly-promises']) {
18066
+
18067
+ var asyncStart = function() {
18068
+ if (Ember.Test && Ember.Test.adapter) {
18069
+ Ember.Test.adapter.asyncStart();
18070
+ }
18071
+ };
18072
+
18073
+ var asyncEnd = function() {
18074
+ if (Ember.Test && Ember.Test.adapter) {
18075
+ Ember.Test.adapter.asyncEnd();
18076
+ }
18077
+ };
18078
+
18079
+ RSVP.configure('async', function(callback, promise) {
18080
+ var async = !Ember.run.currentRunLoop;
18081
+
18082
+ if (Ember.testing && async) { asyncStart(); }
18083
+
18084
+ Ember.run.backburner.schedule('actions', function(){
18085
+ if (Ember.testing && async) { asyncEnd(); }
18086
+ callback(promise);
18087
+ });
18088
+ });
18089
+ } else {
18090
+ RSVP.configure('async', function(callback, promise) {
18091
+ Ember.run.backburner.schedule('actions', function(){
18092
+ callback(promise);
18093
+ });
18094
+ });
18095
+ }
17817
18096
 
17818
18097
  RSVP.Promise.prototype.fail = function(callback, label){
17819
18098
  return this['catch'](callback, label);
@@ -18100,8 +18379,8 @@ Ember.ActionHandler = Ember.Mixin.create({
18100
18379
  } else {
18101
18380
  return;
18102
18381
  }
18103
- } else if (this.deprecatedSend && this.deprecatedSendHandles && this.deprecatedSendHandles(actionName)) {
18104
- if (this.deprecatedSend.apply(this, [].slice.call(arguments)) === true) {
18382
+ } else if (!Ember.FEATURES.isEnabled('ember-routing-drop-deprecated-action-style') && this.deprecatedSend && this.deprecatedSendHandles && this.deprecatedSendHandles(actionName)) {
18383
+ if (this.deprecatedSend.apply(this, [].slice.call(arguments)) === true) {
18105
18384
  // handler return true, so this action will bubble
18106
18385
  } else {
18107
18386
  return;
@@ -18844,7 +19123,7 @@ Ember.SubArray.prototype = {
18844
19123
 
18845
19124
 
18846
19125
  (function() {
18847
- Ember.Container = requireModule('container');
19126
+ Ember.Container = requireModule('container')['default'];
18848
19127
  Ember.Container.set = Ember.set;
18849
19128
 
18850
19129
  })();
@@ -20672,7 +20951,7 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
20672
20951
  var container = get(this, 'container'),
20673
20952
  subControllers = get(this, '_subControllers'),
20674
20953
  subController = subControllers[idx],
20675
- factory, fullName;
20954
+ fullName;
20676
20955
 
20677
20956
  if (subController) { return subController; }
20678
20957
 
@@ -21625,36 +21904,32 @@ Ember.EventDispatcher = Ember.Object.extend({
21625
21904
  var self = this;
21626
21905
 
21627
21906
  rootElement.on(event + '.ember', '.ember-view', function(evt, triggeringManager) {
21628
- return Ember.handleErrors(function handleViewEvent() {
21629
- var view = Ember.View.views[this.id],
21630
- result = true, manager = null;
21907
+ var view = Ember.View.views[this.id],
21908
+ result = true, manager = null;
21631
21909
 
21632
- manager = self._findNearestEventManager(view,eventName);
21910
+ manager = self._findNearestEventManager(view, eventName);
21633
21911
 
21634
- if (manager && manager !== triggeringManager) {
21635
- result = self._dispatchEvent(manager, evt, eventName, view);
21636
- } else if (view) {
21637
- result = self._bubbleEvent(view,evt,eventName);
21638
- } else {
21639
- evt.stopPropagation();
21640
- }
21912
+ if (manager && manager !== triggeringManager) {
21913
+ result = self._dispatchEvent(manager, evt, eventName, view);
21914
+ } else if (view) {
21915
+ result = self._bubbleEvent(view, evt, eventName);
21916
+ } else {
21917
+ evt.stopPropagation();
21918
+ }
21641
21919
 
21642
- return result;
21643
- }, this);
21920
+ return result;
21644
21921
  });
21645
21922
 
21646
21923
  rootElement.on(event + '.ember', '[data-ember-action]', function(evt) {
21647
- return Ember.handleErrors(function handleActionEvent() {
21648
- var actionId = Ember.$(evt.currentTarget).attr('data-ember-action'),
21649
- action = Ember.Handlebars.ActionHelper.registeredActions[actionId];
21924
+ var actionId = Ember.$(evt.currentTarget).attr('data-ember-action'),
21925
+ action = Ember.Handlebars.ActionHelper.registeredActions[actionId];
21650
21926
 
21651
- // We have to check for action here since in some cases, jQuery will trigger
21652
- // an event on `removeChild` (i.e. focusout) after we've already torn down the
21653
- // action handlers for the view.
21654
- if (action && action.eventName === eventName) {
21655
- return action.handler(evt);
21656
- }
21657
- }, this);
21927
+ // We have to check for action here since in some cases, jQuery will trigger
21928
+ // an event on `removeChild` (i.e. focusout) after we've already torn down the
21929
+ // action handlers for the view.
21930
+ if (action && action.eventName === eventName) {
21931
+ return action.handler(evt);
21932
+ }
21658
21933
  });
21659
21934
  },
21660
21935
 
@@ -21676,9 +21951,7 @@ Ember.EventDispatcher = Ember.Object.extend({
21676
21951
 
21677
21952
  var handler = object[eventName];
21678
21953
  if (Ember.typeOf(handler) === 'function') {
21679
- result = Ember.run(function() {
21680
- return handler.call(object, evt, view);
21681
- });
21954
+ result = Ember.run(object, handler, evt, view);
21682
21955
  // Do not preventDefault in eventManagers.
21683
21956
  evt.stopPropagation();
21684
21957
  }
@@ -21690,9 +21963,7 @@ Ember.EventDispatcher = Ember.Object.extend({
21690
21963
  },
21691
21964
 
21692
21965
  _bubbleEvent: function(view, evt, eventName) {
21693
- return Ember.run(function bubbleEvent() {
21694
- return view.handleEvent(eventName, evt);
21695
- });
21966
+ return Ember.run(view, view.handleEvent, eventName, evt);
21696
21967
  },
21697
21968
 
21698
21969
  destroy: function() {
@@ -21723,51 +21994,6 @@ queues.splice(indexOf.call(queues, 'actions')+1, 0, 'render', 'afterRender');
21723
21994
 
21724
21995
 
21725
21996
 
21726
- (function() {
21727
- /**
21728
- @module ember
21729
- @submodule ember-views
21730
- */
21731
-
21732
- var get = Ember.get, set = Ember.set;
21733
-
21734
- // Original class declaration and documentation in runtime/lib/controllers/controller.js
21735
- // NOTE: It may be possible with YUIDoc to combine docs in two locations
21736
-
21737
- /**
21738
- Additional methods for the ControllerMixin
21739
-
21740
- @class ControllerMixin
21741
- @namespace Ember
21742
- */
21743
- Ember.ControllerMixin.reopen({
21744
- target: null,
21745
- namespace: null,
21746
- view: null,
21747
- container: null,
21748
- _childContainers: null,
21749
-
21750
- init: function() {
21751
- this._super();
21752
- set(this, '_childContainers', {});
21753
- },
21754
-
21755
- _modelDidChange: Ember.observer('model', function() {
21756
- var containers = get(this, '_childContainers');
21757
-
21758
- for (var prop in containers) {
21759
- if (!containers.hasOwnProperty(prop)) { continue; }
21760
- containers[prop].destroy();
21761
- }
21762
-
21763
- set(this, '_childContainers', {});
21764
- })
21765
- });
21766
-
21767
- })();
21768
-
21769
-
21770
-
21771
21997
  (function() {
21772
21998
 
21773
21999
  })();
@@ -21782,11 +22008,16 @@ var states = {};
21782
22008
  @submodule ember-views
21783
22009
  */
21784
22010
 
21785
- var get = Ember.get, set = Ember.set;
21786
- var guidFor = Ember.guidFor;
21787
- var a_forEach = Ember.EnumerableUtils.forEach;
21788
- var a_addObject = Ember.EnumerableUtils.addObject;
21789
- var meta = Ember.meta;
22011
+ var get = Ember.get, set = Ember.set,
22012
+ guidFor = Ember.guidFor,
22013
+ a_forEach = Ember.EnumerableUtils.forEach,
22014
+ a_addObject = Ember.EnumerableUtils.addObject,
22015
+ meta = Ember.meta,
22016
+ defineProperty = Ember.defineProperty;
22017
+
22018
+ function nullViewsBuffer(view) {
22019
+ view.buffer = null;
22020
+ }
21790
22021
 
21791
22022
  var childViewsProperty = Ember.computed(function() {
21792
22023
  var childViews = this._childViews, ret = Ember.A(), view = this;
@@ -21848,6 +22079,7 @@ Ember.CoreView = Ember.Object.extend(Ember.Evented, Ember.ActionHandler, {
21848
22079
  init: function() {
21849
22080
  this._super();
21850
22081
  this.transitionTo('preRender');
22082
+ this._isVisible = get(this, 'isVisible');
21851
22083
  },
21852
22084
 
21853
22085
  /**
@@ -21858,7 +22090,7 @@ Ember.CoreView = Ember.Object.extend(Ember.Evented, Ember.ActionHandler, {
21858
22090
  @type Ember.View
21859
22091
  @default null
21860
22092
  */
21861
- parentView: Ember.computed(function() {
22093
+ parentView: Ember.computed('_parentView', function() {
21862
22094
  var parent = this._parentView;
21863
22095
 
21864
22096
  if (parent && parent.isVirtual) {
@@ -21866,17 +22098,17 @@ Ember.CoreView = Ember.Object.extend(Ember.Evented, Ember.ActionHandler, {
21866
22098
  } else {
21867
22099
  return parent;
21868
22100
  }
21869
- }).property('_parentView'),
22101
+ }),
21870
22102
 
21871
22103
  state: null,
21872
22104
 
21873
22105
  _parentView: null,
21874
22106
 
21875
22107
  // return the current view, not including virtual views
21876
- concreteView: Ember.computed(function() {
22108
+ concreteView: Ember.computed('parentView', function() {
21877
22109
  if (!this.isVirtual) { return this; }
21878
22110
  else { return get(this, 'parentView'); }
21879
- }).property('parentView'),
22111
+ }),
21880
22112
 
21881
22113
  instrumentName: 'core_view',
21882
22114
 
@@ -22674,7 +22906,7 @@ Ember.View = Ember.CoreView.extend({
22674
22906
  @property template
22675
22907
  @type Function
22676
22908
  */
22677
- template: Ember.computed(function(key, value) {
22909
+ template: Ember.computed('templateName', function(key, value) {
22678
22910
  if (value !== undefined) { return value; }
22679
22911
 
22680
22912
  var templateName = get(this, 'templateName'),
@@ -22682,7 +22914,7 @@ Ember.View = Ember.CoreView.extend({
22682
22914
 
22683
22915
 
22684
22916
  return template || get(this, 'defaultTemplate');
22685
- }).property('templateName'),
22917
+ }),
22686
22918
 
22687
22919
  /**
22688
22920
  The controller managing this view. If this property is set, it will be
@@ -22691,10 +22923,10 @@ Ember.View = Ember.CoreView.extend({
22691
22923
  @property controller
22692
22924
  @type Object
22693
22925
  */
22694
- controller: Ember.computed(function(key) {
22926
+ controller: Ember.computed('_parentView', function(key) {
22695
22927
  var parentView = get(this, '_parentView');
22696
22928
  return parentView ? get(parentView, 'controller') : null;
22697
- }).property('_parentView'),
22929
+ }),
22698
22930
 
22699
22931
  /**
22700
22932
  A view may contain a layout. A layout is a regular template but
@@ -23103,6 +23335,8 @@ Ember.View = Ember.CoreView.extend({
23103
23335
  }, this);
23104
23336
  },
23105
23337
 
23338
+ _unspecifiedAttributeBindings: null,
23339
+
23106
23340
  /**
23107
23341
  Iterates through the view's attribute bindings, sets up observers for each,
23108
23342
  then applies the current value of the attributes to the passed render buffer.
@@ -23112,30 +23346,67 @@ Ember.View = Ember.CoreView.extend({
23112
23346
  @private
23113
23347
  */
23114
23348
  _applyAttributeBindings: function(buffer, attributeBindings) {
23115
- var attributeValue, elem;
23349
+ var attributeValue,
23350
+ unspecifiedAttributeBindings = this._unspecifiedAttributeBindings = this._unspecifiedAttributeBindings || {};
23116
23351
 
23117
23352
  a_forEach(attributeBindings, function(binding) {
23118
23353
  var split = binding.split(':'),
23119
23354
  property = split[0],
23120
23355
  attributeName = split[1] || property;
23121
23356
 
23122
- // Create an observer to add/remove/change the attribute if the
23123
- // JavaScript property changes.
23124
- var observer = function() {
23125
- elem = this.$();
23357
+ if (property in this) {
23358
+ this._setupAttributeBindingObservation(property, attributeName);
23126
23359
 
23360
+ // Determine the current value and add it to the render buffer
23361
+ // if necessary.
23127
23362
  attributeValue = get(this, property);
23363
+ Ember.View.applyAttributeBindings(buffer, attributeName, attributeValue);
23364
+ } else {
23365
+ unspecifiedAttributeBindings[property] = attributeName;
23366
+ }
23367
+ }, this);
23128
23368
 
23129
- Ember.View.applyAttributeBindings(elem, attributeName, attributeValue);
23130
- };
23369
+ // Lazily setup setUnknownProperty after attributeBindings are initially applied
23370
+ this.setUnknownProperty = this._setUnknownProperty;
23371
+ },
23131
23372
 
23132
- this.registerObserver(this, property, observer);
23373
+ _setupAttributeBindingObservation: function(property, attributeName) {
23374
+ var attributeValue, elem;
23375
+
23376
+ // Create an observer to add/remove/change the attribute if the
23377
+ // JavaScript property changes.
23378
+ var observer = function() {
23379
+ elem = this.$();
23133
23380
 
23134
- // Determine the current value and add it to the render buffer
23135
- // if necessary.
23136
23381
  attributeValue = get(this, property);
23137
- Ember.View.applyAttributeBindings(buffer, attributeName, attributeValue);
23138
- }, this);
23382
+
23383
+ Ember.View.applyAttributeBindings(elem, attributeName, attributeValue);
23384
+ };
23385
+
23386
+ this.registerObserver(this, property, observer);
23387
+ },
23388
+
23389
+ /**
23390
+ We're using setUnknownProperty as a hook to setup attributeBinding observers for
23391
+ properties that aren't defined on a view at initialization time.
23392
+
23393
+ Note: setUnknownProperty will only be called once for each property.
23394
+
23395
+ @method setUnknownProperty
23396
+ @param key
23397
+ @param value
23398
+ @private
23399
+ */
23400
+ setUnknownProperty: null, // Gets defined after initialization by _applyAttributeBindings
23401
+
23402
+ _setUnknownProperty: function(key, value) {
23403
+ var attributeName = this._unspecifiedAttributeBindings && this._unspecifiedAttributeBindings[key];
23404
+ if (attributeName) {
23405
+ this._setupAttributeBindingObservation(key, attributeName);
23406
+ }
23407
+
23408
+ defineProperty(this, key);
23409
+ return set(this, key, value);
23139
23410
  },
23140
23411
 
23141
23412
  /**
@@ -23171,13 +23442,13 @@ Ember.View = Ember.CoreView.extend({
23171
23442
  @property element
23172
23443
  @type DOMElement
23173
23444
  */
23174
- element: Ember.computed(function(key, value) {
23445
+ element: Ember.computed('_parentView', function(key, value) {
23175
23446
  if (value !== undefined) {
23176
23447
  return this.currentState.setElement(this, value);
23177
23448
  } else {
23178
23449
  return this.currentState.getElement(this);
23179
23450
  }
23180
- }).property('_parentView'),
23451
+ }),
23181
23452
 
23182
23453
  /**
23183
23454
  Returns a jQuery object for this view's element. If you pass in a selector
@@ -23905,13 +24176,22 @@ Ember.View = Ember.CoreView.extend({
23905
24176
  @private
23906
24177
  */
23907
24178
  _isVisibleDidChange: Ember.observer('isVisible', function() {
24179
+ if (this._isVisible === get(this, 'isVisible')) { return ; }
24180
+ Ember.run.scheduleOnce('render', this, this._toggleVisibility);
24181
+ }),
24182
+
24183
+ _toggleVisibility: function() {
23908
24184
  var $el = this.$();
23909
24185
  if (!$el) { return; }
23910
24186
 
23911
24187
  var isVisible = get(this, 'isVisible');
23912
24188
 
24189
+ if (this._isVisible === isVisible) { return ; }
24190
+
23913
24191
  $el.toggle(isVisible);
23914
24192
 
24193
+ this._isVisible = isVisible;
24194
+
23915
24195
  if (this._isAncestorHidden()) { return; }
23916
24196
 
23917
24197
  if (isVisible) {
@@ -23919,7 +24199,7 @@ Ember.View = Ember.CoreView.extend({
23919
24199
  } else {
23920
24200
  this._notifyBecameHidden();
23921
24201
  }
23922
- }),
24202
+ },
23923
24203
 
23924
24204
  _notifyBecameVisible: function() {
23925
24205
  this.trigger('becameVisible');
@@ -23957,9 +24237,7 @@ Ember.View = Ember.CoreView.extend({
23957
24237
  },
23958
24238
 
23959
24239
  clearBuffer: function() {
23960
- this.invokeRecursively(function(view) {
23961
- view.buffer = null;
23962
- });
24240
+ this.invokeRecursively(nullViewsBuffer);
23963
24241
  },
23964
24242
 
23965
24243
  transitionTo: function(state, children) {
@@ -24326,13 +24604,10 @@ Ember.merge(preRender, {
24326
24604
 
24327
24605
  // We transition to `inDOM` if the element exists in the DOM
24328
24606
  var element = view.get('element');
24329
- while (element = element.parentNode) {
24330
- if (element === document) {
24331
- viewCollection.transitionTo('inDOM', false);
24332
- viewCollection.trigger('didInsertElement');
24333
- }
24607
+ if (document.body.contains(element)) {
24608
+ viewCollection.transitionTo('inDOM', false);
24609
+ viewCollection.trigger('didInsertElement');
24334
24610
  }
24335
-
24336
24611
  },
24337
24612
 
24338
24613
  renderToBufferIfNeeded: function(view, buffer) {
@@ -26578,8 +26853,6 @@ Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue = function() {
26578
26853
  stringifyBlockHelperMissing(this.source);
26579
26854
  };
26580
26855
 
26581
- var prefix = "ember" + (+new Date()), incr = 1;
26582
-
26583
26856
  /**
26584
26857
  Rewrite simple mustaches from `{{foo}}` to `{{bind "foo"}}`. This means that
26585
26858
  all simple mustaches in Ember's Handlebars will also set up an observer to
@@ -26591,12 +26864,7 @@ var prefix = "ember" + (+new Date()), incr = 1;
26591
26864
  @param mustache
26592
26865
  */
26593
26866
  Ember.Handlebars.Compiler.prototype.mustache = function(mustache) {
26594
- if (mustache.isHelper && mustache.id.string === 'control') {
26595
- mustache.hash = mustache.hash || new Handlebars.AST.HashNode([]);
26596
- mustache.hash.pairs.push(["controlID", new Handlebars.AST.StringNode(prefix + incr++)]);
26597
- } else if (mustache.params.length || mustache.hash) {
26598
- // no changes required
26599
- } else {
26867
+ if (!(mustache.params.length || mustache.hash)) {
26600
26868
  var id = new Handlebars.AST.IdNode([{ part: '_triageMustache' }]);
26601
26869
 
26602
26870
  // Update the mustache node to include a hash value indicating whether the original node
@@ -29161,27 +29429,51 @@ Ember.Handlebars.registerHelper('unbound', function unboundHelper(property, fn)
29161
29429
  @submodule ember-handlebars
29162
29430
  */
29163
29431
 
29164
- var get = Ember.get, handlebarsGet = Ember.Handlebars.get, normalizePath = Ember.Handlebars.normalizePath;
29432
+ var get = Ember.get;
29433
+ var handlebarsGet = Ember.Handlebars.get, normalizePath = Ember.Handlebars.normalizePath;
29434
+ var a_slice = [].slice;
29165
29435
 
29166
29436
  /**
29167
- `log` allows you to output the value of a variable in the current rendering
29168
- context.
29437
+ `log` allows you to output the value of variables in the current rendering
29438
+ context. `log` also accepts primitive types such as strings or numbers.
29169
29439
 
29170
29440
  ```handlebars
29171
- {{log myVariable}}
29441
+ {{log "myVariable:" myVariable }}
29172
29442
  ```
29173
29443
 
29174
29444
  @method log
29175
29445
  @for Ember.Handlebars.helpers
29176
29446
  @param {String} property
29177
29447
  */
29178
- Ember.Handlebars.registerHelper('log', function logHelper(property, options) {
29179
- var context = (options.contexts && options.contexts.length) ? options.contexts[0] : this,
29180
- normalized = normalizePath(context, property, options.data),
29181
- pathRoot = normalized.root,
29182
- path = normalized.path,
29183
- value = (path === 'this') ? pathRoot : handlebarsGet(pathRoot, path, options);
29184
- Ember.Logger.log(value);
29448
+ Ember.Handlebars.registerHelper('log', function logHelper() {
29449
+ var params = a_slice.call(arguments, 0, -1),
29450
+ options = arguments[arguments.length - 1],
29451
+ logger = Ember.Logger.log,
29452
+ values = [],
29453
+ allowPrimitives = false;
29454
+
29455
+
29456
+ allowPrimitives = true;
29457
+
29458
+
29459
+ for (var i = 0; i < params.length; i++) {
29460
+ var type = options.types[i];
29461
+
29462
+ if (type === 'ID' || !allowPrimitives) {
29463
+ var context = (options.contexts && options.contexts[i]) || this,
29464
+ normalized = normalizePath(context, params[i], options.data);
29465
+
29466
+ if (normalized.path === 'this') {
29467
+ values.push(normalized.root);
29468
+ } else {
29469
+ values.push(handlebarsGet(normalized.root, normalized.path, options));
29470
+ }
29471
+ } else {
29472
+ values.push(params[i]);
29473
+ }
29474
+ }
29475
+
29476
+ logger.apply(logger, values);
29185
29477
  });
29186
29478
 
29187
29479
  /**
@@ -29312,7 +29604,7 @@ Ember.Handlebars.EachView = Ember.CollectionView.extend(Ember._Metamorph, {
29312
29604
 
29313
29605
  // If {{#each}} is looping over an array of controllers,
29314
29606
  // point each child view at their respective controller.
29315
- if (content && get(content, 'isController')) {
29607
+ if (content && content.isController) {
29316
29608
  set(view, 'controller', content);
29317
29609
  }
29318
29610
 
@@ -29988,7 +30280,8 @@ Ember.Checkbox = Ember.View.extend({
29988
30280
 
29989
30281
  tagName: 'input',
29990
30282
 
29991
- attributeBindings: ['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name'],
30283
+ attributeBindings: ['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name',
30284
+ 'autofocus', 'form'],
29992
30285
 
29993
30286
  type: "checkbox",
29994
30287
  checked: false,
@@ -30027,12 +30320,15 @@ var get = Ember.get, set = Ember.set;
30027
30320
 
30028
30321
  @class TextSupport
30029
30322
  @namespace Ember
30323
+ @uses Ember.TargetActionSupport
30324
+ @extends Ember.Mixin
30030
30325
  @private
30031
30326
  */
30032
- Ember.TextSupport = Ember.Mixin.create({
30327
+ Ember.TextSupport = Ember.Mixin.create(Ember.TargetActionSupport, {
30033
30328
  value: "",
30034
30329
 
30035
- attributeBindings: ['placeholder', 'disabled', 'maxlength', 'tabindex', 'readonly'],
30330
+ attributeBindings: ['placeholder', 'disabled', 'maxlength', 'tabindex', 'readonly',
30331
+ 'autofocus', 'form', 'selectionDirection', 'spellcheck', 'required'],
30036
30332
  placeholder: null,
30037
30333
  disabled: false,
30038
30334
  maxlength: null,
@@ -30228,7 +30524,11 @@ Ember.TextField = Ember.Component.extend(Ember.TextSupport, {
30228
30524
 
30229
30525
  classNames: ['ember-text-field'],
30230
30526
  tagName: "input",
30231
- attributeBindings: ['type', 'value', 'size', 'pattern', 'name', 'min', 'max'],
30527
+ attributeBindings: ['type', 'value', 'size', 'pattern', 'name', 'min', 'max',
30528
+ 'accept', 'autocomplete', 'autosave', 'formaction',
30529
+ 'formenctype', 'formmethod', 'formnovalidate', 'formtarget',
30530
+ 'height', 'inputmode', 'list', 'multiple', 'pattern', 'step',
30531
+ 'width'],
30232
30532
 
30233
30533
  /**
30234
30534
  The `value` attribute of the input element. As the user inputs text, this
@@ -30319,7 +30619,7 @@ Ember.TextArea = Ember.Component.extend(Ember.TextSupport, {
30319
30619
  classNames: ['ember-text-area'],
30320
30620
 
30321
30621
  tagName: "textarea",
30322
- attributeBindings: ['rows', 'cols', 'name'],
30622
+ attributeBindings: ['rows', 'cols', 'name', 'selectionEnd', 'selectionStart', 'wrap'],
30323
30623
  rows: null,
30324
30624
  cols: null,
30325
30625
 
@@ -30725,7 +31025,8 @@ function program7(depth0,data) {
30725
31025
  return buffer;
30726
31026
 
30727
31027
  }),
30728
- attributeBindings: ['multiple', 'disabled', 'tabindex', 'name'],
31028
+ attributeBindings: ['multiple', 'disabled', 'tabindex', 'name', 'required', 'autofocus',
31029
+ 'form', 'size'],
30729
31030
 
30730
31031
  /**
30731
31032
  The `multiple` attribute of the select element. Indicates whether multiple
@@ -30747,6 +31048,16 @@ function program7(depth0,data) {
30747
31048
  */
30748
31049
  disabled: false,
30749
31050
 
31051
+ /**
31052
+ The `required` attribute of the select element. Indicates whether
31053
+ a selected option is required for form validation.
31054
+
31055
+ @property required
31056
+ @type Boolean
31057
+ @default false
31058
+ */
31059
+ required: false,
31060
+
30750
31061
  /**
30751
31062
  The list of options.
30752
31063
 
@@ -31018,14 +31329,18 @@ function program7(depth0,data) {
31018
31329
  An `{{input}}` with no `type` or a `type` of `text` will render an HTML text input.
31019
31330
  The following HTML attributes can be set via the helper:
31020
31331
 
31021
- * `value`
31022
- * `size`
31023
- * `name`
31024
- * `pattern`
31025
- * `placeholder`
31026
- * `disabled`
31027
- * `maxlength`
31028
- * `tabindex`
31332
+ <table>
31333
+ <tr><td>`readonly`</td><td>`required`</td><td>`autofocus`</td></tr>
31334
+ <tr><td>`value`</td><td>`placeholder`</td><td>`disabled`</td></tr>
31335
+ <tr><td>`size`</td><td>`tabindex`</td><td>`maxlength`</td></tr>
31336
+ <tr><td>`name`</td><td>`min`</td><td>`max`</td></tr>
31337
+ <tr><td>`pattern`</td><td>`accept`</td><td>`autocomplete`</td></tr>
31338
+ <tr><td>`autosave`</td><td>`formaction`</td><td>`formenctype`</td></tr>
31339
+ <tr><td>`formmethod`</td><td>`formnovalidate`</td><td>`formtarget`</td></tr>
31340
+ <tr><td>`height`</td><td>`inputmode`</td><td>`multiple`</td></tr>
31341
+ <tr><td>`step`</td><td>`width`</td><td>`form`</td></tr>
31342
+ <tr><td>`selectionDirection`</td><td>`spellcheck`</td><td>&nbsp;</td></tr>
31343
+ </table>
31029
31344
 
31030
31345
 
31031
31346
  When set to a quoted string, these values will be directly applied to the HTML
@@ -31094,6 +31409,8 @@ function program7(depth0,data) {
31094
31409
  * `tabindex`
31095
31410
  * `indeterminate`
31096
31411
  * `name`
31412
+ * `autofocus`
31413
+ * `form`
31097
31414
 
31098
31415
 
31099
31416
  When set to a quoted string, these values will be directly applied to the HTML
@@ -31181,6 +31498,15 @@ Ember.Handlebars.registerHelper('input', function(options) {
31181
31498
  * `disabled`
31182
31499
  * `maxlength`
31183
31500
  * `tabindex`
31501
+ * `selectionEnd`
31502
+ * `selectionStart`
31503
+ * `selectionDirection`
31504
+ * `wrap`
31505
+ * `readonly`
31506
+ * `autofocus`
31507
+ * `form`
31508
+ * `spellcheck`
31509
+ * `required`
31184
31510
 
31185
31511
  When set to a quoted string, these value will be directly applied to the HTML
31186
31512
  element. When left unquoted, these values will be bound to a property on the
@@ -31460,7 +31786,7 @@ Ember.runLoadHooks('Ember.Handlebars', Ember.Handlebars);
31460
31786
  })();
31461
31787
 
31462
31788
  (function() {
31463
- define("route-recognizer",
31789
+ define("route-recognizer",
31464
31790
  ["exports"],
31465
31791
  function(__exports__) {
31466
31792
  "use strict";
@@ -31471,6 +31797,10 @@ define("route-recognizer",
31471
31797
 
31472
31798
  var escapeRegex = new RegExp('(\\' + specials.join('|\\') + ')', 'g');
31473
31799
 
31800
+ function isArray(test) {
31801
+ return Object.prototype.toString.call(test) === "[object Array]";
31802
+ }
31803
+
31474
31804
  // A Segment represents a segment in the original route description.
31475
31805
  // Each Segment type provides an `eachChar` and `regex` method.
31476
31806
  //
@@ -31689,10 +32019,24 @@ define("route-recognizer",
31689
32019
  END IF **/
31690
32020
 
31691
32021
  // This is a somewhat naive strategy, but should work in a lot of cases
31692
- // A better strategy would properly resolve /posts/:id/new and /posts/edit/:id
32022
+ // A better strategy would properly resolve /posts/:id/new and /posts/edit/:id.
32023
+ //
32024
+ // This strategy generally prefers more static and less dynamic matching.
32025
+ // Specifically, it
32026
+ //
32027
+ // * prefers fewer stars to more, then
32028
+ // * prefers using stars for less of the match to more, then
32029
+ // * prefers fewer dynamic segments to more, then
32030
+ // * prefers more static segments to more
31693
32031
  function sortSolutions(states) {
31694
32032
  return states.sort(function(a, b) {
31695
32033
  if (a.types.stars !== b.types.stars) { return a.types.stars - b.types.stars; }
32034
+
32035
+ if (a.types.stars) {
32036
+ if (a.types.statics !== b.types.statics) { return b.types.statics - a.types.statics; }
32037
+ if (a.types.dynamics !== b.types.dynamics) { return b.types.dynamics - a.types.dynamics; }
32038
+ }
32039
+
31696
32040
  if (a.types.dynamics !== b.types.dynamics) { return a.types.dynamics - b.types.dynamics; }
31697
32041
  if (a.types.statics !== b.types.statics) { return b.types.statics - a.types.statics; }
31698
32042
 
@@ -31858,26 +32202,32 @@ define("route-recognizer",
31858
32202
 
31859
32203
  generateQueryString: function(params, handlers) {
31860
32204
  var pairs = [];
32205
+ var keys = [];
31861
32206
  for(var key in params) {
31862
32207
  if (params.hasOwnProperty(key)) {
31863
- var value = params[key];
31864
- if (value === false || value == null) {
31865
- continue;
31866
- }
31867
- var pair = key;
31868
- if (Array.isArray(value)) {
31869
- for (var i = 0, l = value.length; i < l; i++) {
31870
- var arrayPair = key + '[]' + '=' + encodeURIComponent(value[i]);
31871
- pairs.push(arrayPair);
31872
- }
31873
- }
31874
- else if (value !== true) {
31875
- pair += "=" + encodeURIComponent(value);
31876
- pairs.push(pair);
31877
- } else {
31878
- pairs.push(pair);
32208
+ keys.push(key);
32209
+ }
32210
+ }
32211
+ keys.sort();
32212
+ for (var i = 0, len = keys.length; i < len; i++) {
32213
+ key = keys[i];
32214
+ var value = params[key];
32215
+ if (value === false || value == null) {
32216
+ continue;
32217
+ }
32218
+ var pair = key;
32219
+ if (isArray(value)) {
32220
+ for (var j = 0, l = value.length; j < l; j++) {
32221
+ var arrayPair = key + '[]' + '=' + encodeURIComponent(value[j]);
32222
+ pairs.push(arrayPair);
31879
32223
  }
31880
32224
  }
32225
+ else if (value !== true) {
32226
+ pair += "=" + encodeURIComponent(value);
32227
+ pairs.push(pair);
32228
+ } else {
32229
+ pairs.push(pair);
32230
+ }
31881
32231
  }
31882
32232
 
31883
32233
  if (pairs.length === 0) { return ''; }
@@ -31911,16 +32261,18 @@ define("route-recognizer",
31911
32261
  } else {
31912
32262
  queryParams[key] = value;
31913
32263
  }
31914
-
32264
+
31915
32265
  }
31916
32266
  return queryParams;
31917
32267
  },
31918
32268
 
31919
32269
  recognize: function(path) {
31920
32270
  var states = [ this.rootState ],
31921
- pathLen, i, l, queryStart, queryParams = {},
32271
+ pathLen, i, l, queryStart, queryParams = {},
31922
32272
  isSlashDropped = false;
31923
32273
 
32274
+ path = decodeURI(path);
32275
+
31924
32276
  queryStart = path.indexOf('?');
31925
32277
  if (queryStart !== -1) {
31926
32278
  var queryString = path.substr(queryStart + 1, path.length);
@@ -31955,7 +32307,7 @@ define("route-recognizer",
31955
32307
  var state = solutions[0];
31956
32308
 
31957
32309
  if (state && state.handlers) {
31958
- // if a trailing slash was dropped and a star segment is the last segment
32310
+ // if a trailing slash was dropped and a star segment is the last segment
31959
32311
  // specified, put the trailing slash back
31960
32312
  if (isSlashDropped && state.regex.source.slice(-5) === "(.+)$") {
31961
32313
  path = path + "/";
@@ -32081,6 +32433,7 @@ define("router/handler-info",
32081
32433
  var merge = __dependency1__.merge;
32082
32434
  var oCreate = __dependency1__.oCreate;
32083
32435
  var serialize = __dependency1__.serialize;
32436
+ var promiseLabel = __dependency1__.promiseLabel;
32084
32437
  var resolve = __dependency2__.resolve;
32085
32438
 
32086
32439
  function HandlerInfo(props) {
@@ -32101,6 +32454,10 @@ define("router/handler-info",
32101
32454
  }
32102
32455
  },
32103
32456
 
32457
+ promiseLabel: function(label) {
32458
+ return promiseLabel("'" + this.name + "' " + label);
32459
+ },
32460
+
32104
32461
  resolve: function(async, shouldContinue, payload) {
32105
32462
  var checkForAbort = bind(this.checkForAbort, this, shouldContinue),
32106
32463
  beforeModel = bind(this.runBeforeModelHook, this, async, payload),
@@ -32108,14 +32465,15 @@ define("router/handler-info",
32108
32465
  afterModel = bind(this.runAfterModelHook, this, async, payload),
32109
32466
  becomeResolved = bind(this.becomeResolved, this, payload);
32110
32467
 
32111
- return resolve().then(checkForAbort)
32112
- .then(beforeModel)
32113
- .then(checkForAbort)
32114
- .then(model)
32115
- .then(checkForAbort)
32116
- .then(afterModel)
32117
- .then(checkForAbort)
32118
- .then(becomeResolved);
32468
+ return resolve(undefined, this.promiseLabel("Start handler"))
32469
+ .then(checkForAbort, null, this.promiseLabel("Check for abort"))
32470
+ .then(beforeModel, null, this.promiseLabel("Before model"))
32471
+ .then(checkForAbort, null, this.promiseLabel("Check if aborted during 'beforeModel' hook"))
32472
+ .then(model, null, this.promiseLabel("Model"))
32473
+ .then(checkForAbort, null, this.promiseLabel("Check if aborted in 'model' hook"))
32474
+ .then(afterModel, null, this.promiseLabel("After model"))
32475
+ .then(checkForAbort, null, this.promiseLabel("Check if aborted in 'afterModel' hook"))
32476
+ .then(becomeResolved, null, this.promiseLabel("Become resolved"));
32119
32477
  },
32120
32478
 
32121
32479
  runBeforeModelHook: function(async, payload) {
@@ -32138,7 +32496,7 @@ define("router/handler-info",
32138
32496
  // Return the value stashed in resolvedModels, which
32139
32497
  // might have been swapped out in afterModel.
32140
32498
  return payload.resolvedModels[name];
32141
- });
32499
+ }, null, this.promiseLabel("Ignore fulfillment value and return model value"));
32142
32500
  },
32143
32501
 
32144
32502
  runSharedModelHook: function(async, payload, hookName, args) {
@@ -32152,7 +32510,7 @@ define("router/handler-info",
32152
32510
  var handler = this.handler;
32153
32511
  return async(function() {
32154
32512
  return handler[hookName] && handler[hookName].apply(handler, args);
32155
- });
32513
+ }, this.promiseLabel("Handle " + hookName));
32156
32514
  },
32157
32515
 
32158
32516
  getModel: function(payload) {
@@ -32160,11 +32518,11 @@ define("router/handler-info",
32160
32518
  },
32161
32519
 
32162
32520
  checkForAbort: function(shouldContinue, promiseValue) {
32163
- return resolve(shouldContinue()).then(function() {
32521
+ return resolve(shouldContinue(), this.promiseLabel("Check for abort")).then(function() {
32164
32522
  // We don't care about shouldContinue's resolve value;
32165
32523
  // pass along the original value passed to this fn.
32166
32524
  return promiseValue;
32167
- });
32525
+ }, null, this.promiseLabel("Ignore fulfillment value and continue"));
32168
32526
  },
32169
32527
 
32170
32528
  stashResolvedModel: function(payload, resolvedModel) {
@@ -32215,7 +32573,7 @@ define("router/handler-info",
32215
32573
  if (payload && payload.resolvedModels) {
32216
32574
  payload.resolvedModels[this.name] = this.context;
32217
32575
  }
32218
- return resolve(this);
32576
+ return resolve(this, this.promiseLabel("Resolve"));
32219
32577
  };
32220
32578
 
32221
32579
  // These are generated by URL transitions and
@@ -32297,6 +32655,7 @@ define("router/router",
32297
32655
  var serialize = __dependency3__.serialize;
32298
32656
  var extractQueryParams = __dependency3__.extractQueryParams;
32299
32657
  var getChangelist = __dependency3__.getChangelist;
32658
+ var promiseLabel = __dependency3__.promiseLabel;
32300
32659
  var TransitionState = __dependency4__.TransitionState;
32301
32660
  var logAbort = __dependency5__.logAbort;
32302
32661
  var Transition = __dependency5__.Transition;
@@ -32325,10 +32684,12 @@ define("router/router",
32325
32684
  map: function(callback) {
32326
32685
  this.recognizer.delegate = this.delegate;
32327
32686
 
32328
- this.recognizer.map(callback, function(recognizer, route) {
32329
- var lastHandler = route[route.length - 1].handler;
32330
- var args = [route, { as: lastHandler }];
32331
- recognizer.add.apply(recognizer, args);
32687
+ this.recognizer.map(callback, function(recognizer, routes) {
32688
+ for (var i = routes.length - 1, proceed = true; i >= 0 && proceed; --i) {
32689
+ var route = routes[i];
32690
+ recognizer.add(routes, { as: route.handler });
32691
+ proceed = route.path === '/' || route.path === '' || route.handler.slice(-6) === '.index';
32692
+ }
32332
32693
  });
32333
32694
  },
32334
32695
 
@@ -32383,7 +32744,7 @@ define("router/router",
32383
32744
  router.didTransition(router.currentHandlerInfos);
32384
32745
  }
32385
32746
  return result;
32386
- });
32747
+ }, null, promiseLabel("Transition complete"));
32387
32748
  return newTransition;
32388
32749
  }
32389
32750
  }
@@ -32412,8 +32773,8 @@ define("router/router",
32412
32773
  newTransition.promise = newTransition.promise.then(function(result) {
32413
32774
  return router.async(function() {
32414
32775
  return finalizeTransition(newTransition, result.state);
32415
- });
32416
- });
32776
+ }, "Finalize transition");
32777
+ }, null, promiseLabel("Settle transition promise when transition is finalized"));
32417
32778
 
32418
32779
  if (!wasTransitioning) {
32419
32780
  trigger(this, this.state.handlerInfos, true, ['willTransition', newTransition]);
@@ -32607,8 +32968,18 @@ define("router/router",
32607
32968
 
32608
32969
  var newState = intent.applyToHandlers(state, recogHandlers, this.getHandler, targetHandler, true, true);
32609
32970
 
32610
- return handlerInfosEqual(newState.handlerInfos, state.handlerInfos) &&
32611
- !getChangelist(activeQueryParams, queryParams);
32971
+ // Get a hash of QPs that will still be active on new route
32972
+ var activeQPsOnNewHandler = {};
32973
+ merge(activeQPsOnNewHandler, queryParams);
32974
+ for (var key in activeQueryParams) {
32975
+ if (activeQueryParams.hasOwnProperty(key) &&
32976
+ activeQPsOnNewHandler.hasOwnProperty(key)) {
32977
+ activeQPsOnNewHandler[key] = activeQueryParams[key];
32978
+ }
32979
+ }
32980
+
32981
+ return handlerInfosEqual(newState.handlerInfos, state.handlerInfos) &&
32982
+ !getChangelist(activeQPsOnNewHandler, queryParams);
32612
32983
  },
32613
32984
 
32614
32985
  trigger: function(name) {
@@ -32628,10 +32999,10 @@ define("router/router",
32628
32999
  @return {Promise} a promise that fulfills with the
32629
33000
  value returned from the callback
32630
33001
  */
32631
- async: function(callback) {
33002
+ async: function(callback, label) {
32632
33003
  return new Promise(function(resolve) {
32633
33004
  resolve(callback());
32634
- });
33005
+ }, label);
32635
33006
  },
32636
33007
 
32637
33008
  /**
@@ -32903,7 +33274,7 @@ define("router/router",
32903
33274
  if (!(e instanceof TransitionAborted)) {
32904
33275
  //var erroneousHandler = handlerInfos.pop();
32905
33276
  var infos = transition.state.handlerInfos;
32906
- transition.trigger(true, 'error', e, transition, infos[infos.length-1]);
33277
+ transition.trigger(true, 'error', e, transition, infos[infos.length-1].handler);
32907
33278
  transition.abort();
32908
33279
  }
32909
33280
 
@@ -33292,7 +33663,9 @@ define("router/transition-state",
33292
33663
  "use strict";
33293
33664
  var ResolvedHandlerInfo = __dependency1__.ResolvedHandlerInfo;
33294
33665
  var forEach = __dependency2__.forEach;
33666
+ var promiseLabel = __dependency2__.promiseLabel;
33295
33667
  var resolve = __dependency3__.resolve;
33668
+ var reject = __dependency3__.reject;
33296
33669
 
33297
33670
  function TransitionState(other) {
33298
33671
  this.handlerInfos = [];
@@ -33305,8 +33678,19 @@ define("router/transition-state",
33305
33678
  queryParams: null,
33306
33679
  params: null,
33307
33680
 
33308
- resolve: function(async, shouldContinue, payload) {
33681
+ promiseLabel: function(label) {
33682
+ var targetName = '';
33683
+ forEach(this.handlerInfos, function(handlerInfo) {
33684
+ if (targetName !== '') {
33685
+ targetName += '.';
33686
+ }
33687
+ targetName += handlerInfo.name;
33688
+ });
33689
+ return promiseLabel("'" + targetName + "': " + label);
33690
+ },
33309
33691
 
33692
+ resolve: function(async, shouldContinue, payload) {
33693
+ var self = this;
33310
33694
  // First, calculate params for this state. This is useful
33311
33695
  // information to provide to the various route hooks.
33312
33696
  var params = this.params;
@@ -33321,27 +33705,31 @@ define("router/transition-state",
33321
33705
  var wasAborted = false;
33322
33706
 
33323
33707
  // The prelude RSVP.resolve() asyncs us into the promise land.
33324
- return resolve().then(resolveOneHandlerInfo)['catch'](handleError);
33708
+ return resolve(null, this.promiseLabel("Start transition"))
33709
+ .then(resolveOneHandlerInfo, null, this.promiseLabel('Resolve handler'))['catch'](handleError, this.promiseLabel('Handle error'));
33325
33710
 
33326
33711
  function innerShouldContinue() {
33327
- return resolve(shouldContinue())['catch'](function(reason) {
33712
+ return resolve(shouldContinue(), promiseLabel("Check if should continue"))['catch'](function(reason) {
33328
33713
  // We distinguish between errors that occurred
33329
33714
  // during resolution (e.g. beforeModel/model/afterModel),
33330
33715
  // and aborts due to a rejecting promise from shouldContinue().
33331
33716
  wasAborted = true;
33332
- throw reason;
33333
- });
33717
+ return reject(reason);
33718
+ }, promiseLabel("Handle abort"));
33334
33719
  }
33335
33720
 
33336
33721
  function handleError(error) {
33337
33722
  // This is the only possible
33338
33723
  // reject value of TransitionState#resolve
33339
- throw {
33724
+ var handlerInfos = currentState.handlerInfos;
33725
+ var errorHandlerIndex = payload.resolveIndex >= handlerInfos.length ?
33726
+ handlerInfos.length - 1 : payload.resolveIndex;
33727
+ return reject({
33340
33728
  error: error,
33341
- handlerWithError: currentState.handlerInfos[payload.resolveIndex].handler,
33729
+ handlerWithError: currentState.handlerInfos[errorHandlerIndex].handler,
33342
33730
  wasAborted: wasAborted,
33343
33731
  state: currentState
33344
- };
33732
+ });
33345
33733
  }
33346
33734
 
33347
33735
  function proceed(resolvedHandlerInfo) {
@@ -33360,7 +33748,7 @@ define("router/transition-state",
33360
33748
 
33361
33749
  // Proceed after ensuring that the redirect hook
33362
33750
  // didn't abort this transition by transitioning elsewhere.
33363
- return innerShouldContinue().then(resolveOneHandlerInfo);
33751
+ return innerShouldContinue().then(resolveOneHandlerInfo, null, promiseLabel('Resolve handler'));
33364
33752
  }
33365
33753
 
33366
33754
  function resolveOneHandlerInfo() {
@@ -33376,7 +33764,7 @@ define("router/transition-state",
33376
33764
  var handlerInfo = currentState.handlerInfos[payload.resolveIndex];
33377
33765
 
33378
33766
  return handlerInfo.resolve(async, innerShouldContinue, payload)
33379
- .then(proceed);
33767
+ .then(proceed, null, promiseLabel('Proceed'));
33380
33768
  }
33381
33769
  }
33382
33770
  };
@@ -33393,6 +33781,7 @@ define("router/transition",
33393
33781
  var trigger = __dependency3__.trigger;
33394
33782
  var slice = __dependency3__.slice;
33395
33783
  var log = __dependency3__.log;
33784
+ var promiseLabel = __dependency3__.promiseLabel;
33396
33785
 
33397
33786
  /**
33398
33787
  @private
@@ -33437,13 +33826,13 @@ define("router/transition",
33437
33826
  this.sequence = Transition.currentSequence++;
33438
33827
  this.promise = state.resolve(router.async, checkForAbort, this)['catch'](function(result) {
33439
33828
  if (result.wasAborted) {
33440
- throw logAbort(transition);
33829
+ return reject(logAbort(transition));
33441
33830
  } else {
33442
33831
  transition.trigger('error', result.error, transition, result.handlerWithError);
33443
33832
  transition.abort();
33444
- throw result.error;
33833
+ return reject(result.error);
33445
33834
  }
33446
- });
33835
+ }, promiseLabel('Handle Abort'));
33447
33836
  } else {
33448
33837
  this.promise = resolve(this.state);
33449
33838
  this.params = {};
@@ -33451,7 +33840,7 @@ define("router/transition",
33451
33840
 
33452
33841
  function checkForAbort() {
33453
33842
  if (transition.isAborted) {
33454
- return reject();
33843
+ return reject(undefined, promiseLabel("Transition aborted - reject"));
33455
33844
  }
33456
33845
  }
33457
33846
  }
@@ -33571,7 +33960,7 @@ define("router/transition",
33571
33960
 
33572
33961
  Note: This method is also aliased as `send`
33573
33962
 
33574
- @param {Boolean} ignoreFailure the name of the event to fire
33963
+ @param {Boolean} [ignoreFailure=false] a boolean specifying whether unhandled events throw an error
33575
33964
  @param {String} name the name of the event to fire
33576
33965
  */
33577
33966
  trigger: function (ignoreFailure) {
@@ -33603,7 +33992,7 @@ define("router/transition",
33603
33992
  if (router.activeTransition) {
33604
33993
  return router.activeTransition.followRedirects();
33605
33994
  }
33606
- throw reason;
33995
+ return reject(reason);
33607
33996
  });
33608
33997
  },
33609
33998
 
@@ -33647,6 +34036,10 @@ define("router/utils",
33647
34036
  "use strict";
33648
34037
  var slice = Array.prototype.slice;
33649
34038
 
34039
+ function isArray(test) {
34040
+ return Object.prototype.toString.call(test) === "[object Array]";
34041
+ }
34042
+
33650
34043
  function merge(hash, other) {
33651
34044
  for (var prop in other) {
33652
34045
  if (other.hasOwnProperty(prop)) { hash[prop] = other[prop]; }
@@ -33676,6 +34069,22 @@ define("router/utils",
33676
34069
  }
33677
34070
  }
33678
34071
 
34072
+ /**
34073
+ @private
34074
+
34075
+ Coerces query param properties and array elements into strings.
34076
+ **/
34077
+ function coerceQueryParamsToString(queryParams) {
34078
+ for (var key in queryParams) {
34079
+ if (typeof queryParams[key] === 'number') {
34080
+ queryParams[key] = '' + queryParams[key];
34081
+ } else if (isArray(queryParams[key])) {
34082
+ for (var i = 0, l = queryParams[key].length; i < l; i++) {
34083
+ queryParams[key][i] = '' + queryParams[key][i];
34084
+ }
34085
+ }
34086
+ }
34087
+ }
33679
34088
  /**
33680
34089
  @private
33681
34090
  */
@@ -33777,7 +34186,6 @@ define("router/utils",
33777
34186
  }
33778
34187
  }
33779
34188
 
33780
-
33781
34189
  function getChangelist(oldObject, newObject) {
33782
34190
  var key;
33783
34191
  var results = {
@@ -33789,6 +34197,8 @@ define("router/utils",
33789
34197
  merge(results.all, newObject);
33790
34198
 
33791
34199
  var didChange = false;
34200
+ coerceQueryParamsToString(oldObject);
34201
+ coerceQueryParamsToString(newObject);
33792
34202
 
33793
34203
  // Calculate removals
33794
34204
  for (key in oldObject) {
@@ -33803,9 +34213,24 @@ define("router/utils",
33803
34213
  // Calculate changes
33804
34214
  for (key in newObject) {
33805
34215
  if (newObject.hasOwnProperty(key)) {
33806
- if (oldObject[key] !== newObject[key]) {
33807
- results.changed[key] = newObject[key];
33808
- didChange = true;
34216
+ if (isArray(oldObject[key]) && isArray(newObject[key])) {
34217
+ if (oldObject[key].length !== newObject[key].length) {
34218
+ results.changed[key] = newObject[key];
34219
+ didChange = true;
34220
+ } else {
34221
+ for (var i = 0, l = oldObject[key].length; i < l; i++) {
34222
+ if (oldObject[key][i] !== newObject[key][i]) {
34223
+ results.changed[key] = newObject[key];
34224
+ didChange = true;
34225
+ }
34226
+ }
34227
+ }
34228
+ }
34229
+ else {
34230
+ if (oldObject[key] !== newObject[key]) {
34231
+ results.changed[key] = newObject[key];
34232
+ didChange = true;
34233
+ }
33809
34234
  }
33810
34235
  }
33811
34236
  }
@@ -33813,6 +34238,10 @@ define("router/utils",
33813
34238
  return didChange && results;
33814
34239
  }
33815
34240
 
34241
+ function promiseLabel(label) {
34242
+ return 'Router: ' + label;
34243
+ }
34244
+
33816
34245
  __exports__.trigger = trigger;
33817
34246
  __exports__.log = log;
33818
34247
  __exports__.oCreate = oCreate;
@@ -33824,6 +34253,8 @@ define("router/utils",
33824
34253
  __exports__.slice = slice;
33825
34254
  __exports__.serialize = serialize;
33826
34255
  __exports__.getChangelist = getChangelist;
34256
+ __exports__.coerceQueryParamsToString = coerceQueryParamsToString;
34257
+ __exports__.promiseLabel = promiseLabel;
33827
34258
  });
33828
34259
  define("router",
33829
34260
  ["./router/router","exports"],
@@ -33868,19 +34299,19 @@ DSL.prototype = {
33868
34299
  route(dsl, 'loading');
33869
34300
  route(dsl, 'error', { path: "/_unused_dummy_error_path_route_" + name + "/:error" });
33870
34301
  callback.call(dsl);
33871
- this.push(options.path, name, dsl.generate(), options.queryParams);
34302
+ this.push(options.path, name, dsl.generate());
33872
34303
  } else {
33873
- this.push(options.path, name, null, options.queryParams);
34304
+ this.push(options.path, name, null);
33874
34305
  }
33875
34306
 
33876
34307
 
33877
34308
  },
33878
34309
 
33879
- push: function(url, name, callback, queryParams) {
34310
+ push: function(url, name, callback) {
33880
34311
  var parts = name.split('.');
33881
34312
  if (url === "" || url === "/" || parts[parts.length-1] === "index") { this.explicitIndex = true; }
33882
34313
 
33883
- this.matches.push([url, name, callback, queryParams]);
34314
+ this.matches.push([url, name, callback]);
33884
34315
  },
33885
34316
 
33886
34317
  route: function(name, options) {
@@ -33915,7 +34346,7 @@ function route(dsl, name, options) {
33915
34346
  name = dsl.parent + "." + name;
33916
34347
  }
33917
34348
 
33918
- dsl.push(options.path, name, null, options.queryParams);
34349
+ dsl.push(options.path, name, null);
33919
34350
  }
33920
34351
 
33921
34352
  DSL.map = function(callback) {
@@ -34098,6 +34529,14 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
34098
34529
  self = this,
34099
34530
  initialURL = get(this, 'initialURL');
34100
34531
 
34532
+
34533
+ // Allow the Location class to cancel the router setup while it refreshes
34534
+ // the page
34535
+ if (get(location, 'cancelRouterSetup')) {
34536
+ return;
34537
+ }
34538
+
34539
+
34101
34540
  this._setupRouter(router, location);
34102
34541
 
34103
34542
  container.register('view:default', DefaultView);
@@ -34313,17 +34752,11 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
34313
34752
  args = slice.call(args);
34314
34753
  args[0] = args[0] || '/';
34315
34754
 
34316
- var passedName = args[0], name, self = this,
34755
+ var name = args[0], self = this,
34317
34756
  isQueryParamsOnly = false, queryParams;
34318
34757
 
34319
34758
 
34320
- if (!isQueryParamsOnly && passedName.charAt(0) !== '/') {
34321
- if (!this.router.hasRoute(passedName)) {
34322
- name = args[0] = passedName + '.index';
34323
- } else {
34324
- name = passedName;
34325
- }
34326
-
34759
+ if (!isQueryParamsOnly && name.charAt(0) !== '/') {
34327
34760
  }
34328
34761
 
34329
34762
  if (queryParams) {
@@ -34340,12 +34773,20 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
34340
34773
  }
34341
34774
 
34342
34775
  var qpMappings = this._queryParamNamesFor(name);
34776
+
34777
+
34343
34778
  Ember.Router._translateQueryParams(queryParams, qpMappings.translations, name);
34779
+ var value;
34344
34780
  for (var key in queryParams) {
34781
+ var descopedParam = Ember.Router._descopeQueryParam(key);
34345
34782
  if (key in qpMappings.queryParams) {
34346
- var value = queryParams[key];
34783
+ value = queryParams[key];
34347
34784
  delete queryParams[key];
34348
34785
  queryParams[qpMappings.queryParams[key]] = value;
34786
+ } else if (descopedParam in qpMappings.validQueryParams) {
34787
+ value = queryParams[key];
34788
+ delete queryParams[key];
34789
+ queryParams[descopedParam] = value;
34349
34790
  }
34350
34791
  }
34351
34792
  }
@@ -34353,7 +34794,7 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
34353
34794
  var transitionPromise = this.router[method].apply(this.router, args);
34354
34795
 
34355
34796
  transitionPromise.then(null, function(error) {
34356
- if (error.name === "UnrecognizedURLError") {
34797
+ if (error && error.name === "UnrecognizedURLError") {
34357
34798
  }
34358
34799
  }, 'Ember: Check for Router unrecognized URL error');
34359
34800
 
@@ -34389,16 +34830,19 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
34389
34830
 
34390
34831
  // TODO: add caching
34391
34832
 
34392
- routeName = this.router.hasRoute(routeName) ? routeName : routeName + '.index';
34393
-
34394
34833
  var handlerInfos = this.router.recognizer.handlersFor(routeName);
34395
- var result = { queryParams: Ember.create(null), translations: Ember.create(null) };
34834
+ var result = { queryParams: Ember.create(null), translations: Ember.create(null), validQueryParams: Ember.create(null) };
34396
34835
  var routerjs = this.router;
34397
34836
  forEach(handlerInfos, function(recogHandler) {
34398
34837
  var route = routerjs.getHandler(recogHandler.handler);
34399
34838
  getQueryParamsForRoute(route, result);
34400
34839
  });
34401
34840
 
34841
+ descopeQueryParams(result.queryParams);
34842
+
34843
+ for (var k in result.queryParams) {
34844
+ result.validQueryParams[result.queryParams[k]] = true;
34845
+ }
34402
34846
  return result;
34403
34847
  },
34404
34848
 
@@ -34411,6 +34855,14 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
34411
34855
 
34412
34856
  getQueryParamsForRoute(route, result);
34413
34857
 
34858
+ // Descope non duplicate params.
34859
+ if (routeName !== 'application') {
34860
+ var allParams = this._queryParamNamesFor(routeName);
34861
+ for (var k in result.queryParams) {
34862
+ result.queryParams[k] = allParams.queryParams[k];
34863
+ }
34864
+ }
34865
+
34414
34866
  return result;
34415
34867
  },
34416
34868
 
@@ -34423,7 +34875,8 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
34423
34875
  _queryParamOverrides: function(results, queryParams, callback) {
34424
34876
  for (var name in queryParams) {
34425
34877
  var parts = name.split(':');
34426
- var controller = this.container.lookup('controller:' + parts[0]);
34878
+
34879
+ var controller = controllerOrProtoFor(parts[0], this.container);
34427
34880
 
34428
34881
  // Now assign the final URL-serialized key-value pair,
34429
34882
  // e.g. "foo[propName]": "value"
@@ -34442,10 +34895,11 @@ Ember.Router = Ember.Object.extend(Ember.Evented, {
34442
34895
  */
34443
34896
  function getQueryParamsForRoute(route, result) {
34444
34897
  var controllerName = route.controllerName || route.routeName,
34445
- controller = route.controllerFor(controllerName, true);
34898
+ controller = controllerOrProtoFor(controllerName, route.container),
34899
+ queryParams = get(controller, 'queryParams');
34446
34900
 
34447
- if (controller && controller.queryParams) {
34448
- forEach(controller.queryParams, function(propName) {
34901
+ if (queryParams) {
34902
+ forEach(queryParams, function(propName) {
34449
34903
 
34450
34904
  var parts = propName.split(':');
34451
34905
 
@@ -34469,6 +34923,47 @@ function getQueryParamsForRoute(route, result) {
34469
34923
  }
34470
34924
  }
34471
34925
 
34926
+ function controllerOrProtoFor(controllerName, container) {
34927
+ var fullName = 'controller:' + controllerName;
34928
+ if (container.cache.has(fullName)) {
34929
+ return container.lookup(fullName);
34930
+ } else {
34931
+ // Controller hasn't been instantiated yet; just return its proto.
34932
+ var controllerClass = container.lookupFactory(fullName);
34933
+ if (controllerClass && typeof controllerClass.proto === 'function') {
34934
+ return controllerClass.proto();
34935
+ } else {
34936
+ return {};
34937
+ }
34938
+ }
34939
+ }
34940
+
34941
+ function descopeQueryParams(params) {
34942
+ var paramCounts = {},
34943
+ descopedParam,
34944
+ k;
34945
+
34946
+ // Loop through params and count the occurance of descoped param
34947
+ for (k in params) {
34948
+ descopedParam = Ember.Router._descopeQueryParam(params[k]);
34949
+
34950
+ if (!paramCounts[descopedParam]) {
34951
+ paramCounts[descopedParam] = 1;
34952
+ } else {
34953
+ paramCounts[descopedParam] = paramCounts[descopedParam] + 1;
34954
+ }
34955
+ }
34956
+
34957
+ // Loop through again descoping params if the descoped key only occurs once
34958
+ for (k in params) {
34959
+ descopedParam = Ember.Router._descopeQueryParam(params[k]);
34960
+
34961
+ if (paramCounts[descopedParam] === 1) {
34962
+ params[k] = descopedParam;
34963
+ }
34964
+ }
34965
+ }
34966
+
34472
34967
  /**
34473
34968
  Helper function for iterating root-ward, starting
34474
34969
  from (but not including) the provided `originRoute`.
@@ -34532,7 +35027,7 @@ var defaultActionHandlers = {
34532
35027
  return;
34533
35028
  }
34534
35029
 
34535
- Ember.Logger.error('Error while loading route: ' + error.stack);
35030
+ Ember.Logger.error('Error while loading route: ' + (error && error.stack));
34536
35031
  },
34537
35032
 
34538
35033
  loading: function(transition, originRoute) {
@@ -34711,6 +35206,19 @@ Ember.Router.reopenClass({
34711
35206
  } else {
34712
35207
  }
34713
35208
  }
35209
+ },
35210
+
35211
+ _descopeQueryParam: function(param) {
35212
+ var regex = /\[(.+)\]/,
35213
+ result = param.match(regex);
35214
+
35215
+ if (!result) {
35216
+ result = param;
35217
+ } else {
35218
+ result = result[1];
35219
+ }
35220
+
35221
+ return result;
34714
35222
  }
34715
35223
  });
34716
35224
 
@@ -35509,8 +36017,15 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
35509
36017
  sawParams = true;
35510
36018
  }
35511
36019
 
35512
- if (!name && sawParams) { return params; }
35513
- else if (!name) { return; }
36020
+ if (!name && sawParams) { return Ember.copy(params); }
36021
+ else if (!name) {
36022
+
36023
+ if (transition.resolveIndex !== transition.state.handlerInfos.length-1) { return; }
36024
+
36025
+ var parentModel = transition.state.handlerInfos[transition.resolveIndex-1].context;
36026
+
36027
+ return parentModel;
36028
+ }
35514
36029
 
35515
36030
  return this.findModel(name, value);
35516
36031
  },
@@ -35944,11 +36459,25 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
35944
36459
  });
35945
36460
  ```
35946
36461
 
36462
+ Alternatively, you can pass the `outlet` name directly as a string.
36463
+
36464
+ Example:
36465
+
36466
+ ```js
36467
+ hideModal: function(evt) {
36468
+ this.disconnectOutlet('modal');
36469
+ }
36470
+ ```
36471
+
35947
36472
  @method disconnectOutlet
35948
- @param {Object} options the options
36473
+ @param {Object|String} options the options hash or outlet name
35949
36474
  */
35950
36475
  disconnectOutlet: function(options) {
35951
- options = options || {};
36476
+ if (!options || typeof options === "string") {
36477
+ var outletName = options;
36478
+ options = {};
36479
+ options.outlet = outletName;
36480
+ }
35952
36481
  options.parentView = options.parentView ? options.parentView.replace(/\//g, '.') : parentTemplate(this);
35953
36482
  options.outlet = options.outlet || 'main';
35954
36483
 
@@ -36170,16 +36699,6 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
36170
36699
  resolvePaths = Ember.Router.resolvePaths,
36171
36700
  isSimpleClick = Ember.ViewUtils.isSimpleClick;
36172
36701
 
36173
- function fullRouteName(router, name) {
36174
- var nameWithIndex;
36175
- if (!router.hasRoute(name)) {
36176
- nameWithIndex = name + '.index';
36177
- name = nameWithIndex;
36178
- }
36179
-
36180
- return name;
36181
- }
36182
-
36183
36702
  function getResolvedPaths(options) {
36184
36703
 
36185
36704
  var types = options.options.types,
@@ -36444,10 +36963,14 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
36444
36963
  routeArgs = get(this, 'routeArgs'),
36445
36964
  contexts = routeArgs.slice(1),
36446
36965
  resolvedParams = get(this, 'resolvedParams'),
36447
- currentWhen = this.currentWhen || resolvedParams[0],
36448
- currentWithIndex = currentWhen + '.index',
36449
- isActive = router.isActive.apply(router, [currentWhen].concat(contexts)) ||
36450
- router.isActive.apply(router, [currentWithIndex].concat(contexts));
36966
+ currentWhen = this.currentWhen || routeArgs[0];
36967
+
36968
+ // if overriding active w/ currentWhen then don't apply contexts since they won't match
36969
+ if (this.currentWhen) {
36970
+ contexts = [];
36971
+ }
36972
+
36973
+ var isActive = router.isActive.apply(router, [currentWhen].concat(contexts));
36451
36974
 
36452
36975
  if (isActive) { return get(this, 'activeClass'); }
36453
36976
  }).property('resolvedParams', 'routeArgs'),
@@ -36500,11 +37023,49 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
36500
37023
  var router = get(this, 'router'),
36501
37024
  routeArgs = get(this, 'routeArgs');
36502
37025
 
37026
+ var transition;
36503
37027
  if (get(this, 'replace')) {
36504
- router.replaceWith.apply(router, routeArgs);
37028
+ transition = router.replaceWith.apply(router, routeArgs);
36505
37029
  } else {
36506
- router.transitionTo.apply(router, routeArgs);
37030
+ transition = router.transitionTo.apply(router, routeArgs);
37031
+ }
37032
+
37033
+ // Schedule eager URL update, but after we've given the transition
37034
+ // a chance to synchronously redirect.
37035
+
37036
+ // We need to always generate the URL instead of using the href because
37037
+ // the href will include any rootURL set, but the router expects a URL
37038
+ // without it! Note that we don't use the first level router because it
37039
+ // calls location.formatURL(), which also would add the rootURL!
37040
+ var url = router.router.generate.apply(router.router, get(this, 'routeArgs'));
37041
+ Ember.run.scheduleOnce('routerTransitions', this, this._eagerUpdateUrl, transition, url);
37042
+
37043
+ },
37044
+
37045
+ /**
37046
+ @private
37047
+ */
37048
+ _eagerUpdateUrl: function(transition, href) {
37049
+ if (!transition.isActive || !transition.urlMethod) {
37050
+ // transition was aborted, already ran to completion,
37051
+ // or it has a null url-updated method.
37052
+ return;
37053
+ }
37054
+
37055
+ if (href.indexOf('#') === 0) {
37056
+ href = href.slice(1);
37057
+ }
37058
+
37059
+ // Re-use the routerjs hooks set up by the Ember router.
37060
+ var routerjs = get(this, 'router.router');
37061
+ if (transition.urlMethod === 'update') {
37062
+ routerjs.updateURL(href);
37063
+ } else if (transition.urlMethod === 'replace') {
37064
+ routerjs.replaceURL(href);
36507
37065
  }
37066
+
37067
+ // Prevent later update url refire.
37068
+ transition.method(null);
36508
37069
  },
36509
37070
 
36510
37071
  /**
@@ -36558,8 +37119,15 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
36558
37119
 
36559
37120
  if (!namedRoute) { return; }
36560
37121
 
36561
- namedRoute = fullRouteName(router, namedRoute);
36562
- resolvedParams[0] = namedRoute;
37122
+
37123
+ //normalize route name
37124
+ var handlers = router.router.recognizer.handlersFor(namedRoute);
37125
+ var normalizedPath = handlers[handlers.length - 1].handler;
37126
+ if (namedRoute !== normalizedPath) {
37127
+ this.set('currentWhen', namedRoute);
37128
+ namedRoute = handlers[handlers.length - 1].handler;
37129
+ resolvedParams[0] = namedRoute;
37130
+ }
36563
37131
 
36564
37132
  for (var i = 1, len = resolvedParams.length; i < len; ++i) {
36565
37133
  var param = resolvedParams[i];
@@ -37312,8 +37880,8 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
37312
37880
  return allowed;
37313
37881
  };
37314
37882
 
37315
- ActionHelper.registerAction = function(actionName, options, allowedKeys) {
37316
- var actionId = (++Ember.uuid).toString();
37883
+ ActionHelper.registerAction = function(actionNameOrPath, options, allowedKeys) {
37884
+ var actionId = ++Ember.uuid;
37317
37885
 
37318
37886
  ActionHelper.registeredActions[actionId] = {
37319
37887
  eventName: options.eventName,
@@ -37328,7 +37896,8 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
37328
37896
  event.stopPropagation();
37329
37897
  }
37330
37898
 
37331
- var target = options.target;
37899
+ var target = options.target,
37900
+ actionName;
37332
37901
 
37333
37902
  if (target.target) {
37334
37903
  target = handlebarsGet(target.root, target.target, target.options);
@@ -37336,8 +37905,18 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
37336
37905
  target = target.root;
37337
37906
  }
37338
37907
 
37339
- if (options.boundProperty) {
37340
- }
37908
+
37909
+ if (options.boundProperty) {
37910
+ actionName = handlebarsGet(target, actionNameOrPath, options.options);
37911
+
37912
+ if(typeof actionName === 'undefined' || typeof actionName === 'function') {
37913
+ actionName = actionNameOrPath;
37914
+ }
37915
+ }
37916
+
37917
+ if (!actionName) {
37918
+ actionName = actionNameOrPath;
37919
+ }
37341
37920
 
37342
37921
  Ember.run(function runRegisteredAction() {
37343
37922
  if (target.send) {
@@ -37365,7 +37944,8 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
37365
37944
  to the current route, and it bubbles up the route hierarchy from there.
37366
37945
 
37367
37946
  User interaction with that element will invoke the supplied action name on
37368
- the appropriate target.
37947
+ the appropriate target. Specifying a non-quoted action name will result in
37948
+ a bound property lookup at the time the event will be triggered.
37369
37949
 
37370
37950
  Given the following application Handlebars template on the page
37371
37951
 
@@ -37529,39 +38109,33 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
37529
38109
  contexts = a_slice.call(arguments, 1, -1);
37530
38110
 
37531
38111
  var hash = options.hash,
37532
- controller;
38112
+ controller = options.data.keywords.controller;
37533
38113
 
37534
38114
  // create a hash to pass along to registerAction
37535
38115
  var action = {
37536
- eventName: hash.on || "click"
37537
- };
37538
-
37539
- action.parameters = {
37540
- context: this,
37541
- options: options,
37542
- params: contexts
38116
+ eventName: hash.on || "click",
38117
+ parameters: {
38118
+ context: this,
38119
+ options: options,
38120
+ params: contexts
38121
+ },
38122
+ view: options.data.view,
38123
+ bubbles: hash.bubbles,
38124
+ preventDefault: hash.preventDefault,
38125
+ target: { options: options },
38126
+ boundProperty: options.types[0] === "ID"
37543
38127
  };
37544
38128
 
37545
- action.view = options.data.view;
37546
-
37547
- var root, target;
37548
-
37549
38129
  if (hash.target) {
37550
- root = this;
37551
- target = hash.target;
37552
- } else if (controller = options.data.keywords.controller) {
37553
- root = controller;
38130
+ action.target.root = this;
38131
+ action.target.target = hash.target;
38132
+ } else if (controller) {
38133
+ action.target.root = controller;
37554
38134
  }
37555
38135
 
37556
- action.target = { root: root, target: target, options: options };
37557
- action.bubbles = hash.bubbles;
37558
- action.preventDefault = hash.preventDefault;
37559
- action.boundProperty = options.types[0] === "ID";
37560
-
37561
38136
  var actionId = ActionHelper.registerAction(actionName, action, hash.allowedKeys);
37562
38137
  return new SafeString('data-ember-action="' + actionId + '"');
37563
38138
  });
37564
-
37565
38139
  });
37566
38140
 
37567
38141
  })();
@@ -37927,6 +38501,43 @@ var get = Ember.get, set = Ember.set;
37927
38501
 
37928
38502
  This will result in a posts.new url of `/posts/new`.
37929
38503
 
38504
+ Keep in mind that your server must serve the Ember app at all the routes you
38505
+ define.
38506
+
38507
+ ### AutoLocation
38508
+
38509
+ Using `AutoLocation`, the router will use the best Location class supported by
38510
+ the browser it is running in.
38511
+
38512
+ Browsers that support the `history` API will use `HistoryLocation`, those that
38513
+ do not, but still support the `hashchange` event will use `HashLocation`, and
38514
+ in the rare case neither is supported will use `NoneLocation`.
38515
+
38516
+ Example:
38517
+
38518
+ ```javascript
38519
+ App.Router.map(function() {
38520
+ this.resource('posts', function() {
38521
+ this.route('new');
38522
+ });
38523
+ });
38524
+
38525
+ App.Router.reopen({
38526
+ location: 'auto'
38527
+ });
38528
+ ```
38529
+
38530
+ This will result in a posts.new url of `/posts/new` for modern browsers that
38531
+ support the `history` api or `/#/posts/new` for older ones, like Internet
38532
+ Explorer 9 and below.
38533
+
38534
+ When a user visits a link to your application, they will be automatically
38535
+ upgraded or downgraded to the appropriate `Location` class, with the URL
38536
+ transformed accordingly, if needed.
38537
+
38538
+ Keep in mind that since some of your users will use `HistoryLocation`, your
38539
+ server must serve the Ember app at all the routes you define.
38540
+
37930
38541
  ### NoneLocation
37931
38542
 
37932
38543
  Using `NoneLocation` causes Ember to not store the applications URL state
@@ -38461,6 +39072,198 @@ Ember.HistoryLocation = Ember.Object.extend({
38461
39072
 
38462
39073
 
38463
39074
 
39075
+ (function() {
39076
+
39077
+ /**
39078
+ @module ember
39079
+ @submodule ember-routing
39080
+ */
39081
+
39082
+ var get = Ember.get, set = Ember.set;
39083
+ var documentMode = document.documentMode,
39084
+ history = window.history,
39085
+ location = window.location,
39086
+ getHash = Ember.Location.getHash;
39087
+
39088
+ /**
39089
+ Ember.AutoLocation will select the best location option based off browser
39090
+ support with the priority order: history, hash, none.
39091
+
39092
+ Clean pushState paths accessed by hashchange-only browsers will be redirected
39093
+ to the hash-equivalent and vice versa so future transitions are consistent.
39094
+
39095
+ Keep in mind that since some of your users will use `HistoryLocation`, your
39096
+ server must serve the Ember app at all the routes you define.
39097
+
39098
+ @class AutoLocation
39099
+ @namespace Ember
39100
+ @static
39101
+ */
39102
+ var AutoLocation = Ember.AutoLocation = {
39103
+
39104
+ /**
39105
+ Will be pre-pended to path upon state change.
39106
+
39107
+ @property rootURL
39108
+ @default '/'
39109
+ */
39110
+ rootURL: '/',
39111
+
39112
+ /**
39113
+ @private
39114
+
39115
+ We assume that if the history object has a pushState method, the host should
39116
+ support HistoryLocation.
39117
+
39118
+ @property supportsHistory
39119
+ */
39120
+ supportsHistory: (function () {
39121
+ // Boosted from Modernizr: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
39122
+ // The stock browser on Android 2.2 & 2.3 returns positive on history support
39123
+ // Unfortunately support is really buggy and there is no clean way to detect
39124
+ // these bugs, so we fall back to a user agent sniff :(
39125
+ var userAgent = window.navigator.userAgent;
39126
+
39127
+ // We only want Android 2, stock browser, and not Chrome which identifies
39128
+ // itself as 'Mobile Safari' as well
39129
+ if (userAgent.indexOf('Android 2') !== -1 &&
39130
+ userAgent.indexOf('Mobile Safari') !== -1 &&
39131
+ userAgent.indexOf('Chrome') === -1) {
39132
+ return false;
39133
+ }
39134
+
39135
+ return !!(history && 'pushState' in history);
39136
+ })(),
39137
+
39138
+ /**
39139
+ @private
39140
+
39141
+ IE8 running in IE7 compatibility mode gives false positive, so we must also
39142
+ check documentMode.
39143
+
39144
+ @property supportsHashChange
39145
+ */
39146
+ supportsHashChange: ('onhashchange' in window && (documentMode === undefined || documentMode > 7 )),
39147
+
39148
+ create: function (options) {
39149
+ if (options && options.rootURL) {
39150
+ this.rootURL = options.rootURL;
39151
+ }
39152
+
39153
+ var implementationClass, historyPath, hashPath,
39154
+ cancelRouterSetup = false,
39155
+ currentPath = this.getFullPath();
39156
+
39157
+ if (this.supportsHistory) {
39158
+ historyPath = this.getHistoryPath();
39159
+
39160
+ // Since we support history paths, let's be sure we're using them else
39161
+ // switch the location over to it.
39162
+ if (currentPath === historyPath) {
39163
+ implementationClass = Ember.HistoryLocation;
39164
+ } else {
39165
+ cancelRouterSetup = true;
39166
+ location.replace(historyPath);
39167
+ }
39168
+
39169
+ } else if (this.supportsHashChange) {
39170
+ hashPath = this.getHashPath();
39171
+
39172
+ // Be sure we're using a hashed path, otherwise let's switch over it to so
39173
+ // we start off clean and consistent.
39174
+ if (currentPath === hashPath) {
39175
+ implementationClass = Ember.HashLocation;
39176
+ } else {
39177
+ cancelRouterSetup = true;
39178
+ location.replace(hashPath);
39179
+ }
39180
+ }
39181
+
39182
+ // If none has been set
39183
+ if (!implementationClass) {
39184
+ implementationClass = Ember.NoneLocation;
39185
+ }
39186
+
39187
+ var implementation = implementationClass.create.apply(implementationClass, arguments);
39188
+
39189
+ if (cancelRouterSetup) {
39190
+ set(implementation, 'cancelRouterSetup', true);
39191
+ }
39192
+
39193
+ return implementation;
39194
+ },
39195
+
39196
+ /**
39197
+ @private
39198
+
39199
+ Returns the current `location.pathname`, normalized for IE inconsistencies.
39200
+
39201
+ @method getPath
39202
+ */
39203
+ getPath: function () {
39204
+ var pathname = location.pathname;
39205
+ // Various versions of IE/Opera don't always return a leading slash
39206
+ if (pathname.charAt(0) !== '/') {
39207
+ pathname = '/' + pathname;
39208
+ }
39209
+
39210
+ return pathname;
39211
+ },
39212
+
39213
+ /**
39214
+ @private
39215
+
39216
+ Returns the full pathname including the hash string.
39217
+
39218
+ @method getFullPath
39219
+ */
39220
+ getFullPath: function () {
39221
+ return this.getPath() + getHash().substr(1);
39222
+ },
39223
+
39224
+ /**
39225
+ @private
39226
+
39227
+ Returns the current path as it should appear for HistoryLocation supported
39228
+ browsers. This may very well differ from the real current path (e.g. if it
39229
+ starts off as a hashed URL)
39230
+
39231
+ @method getHistoryPath
39232
+ */
39233
+ getHistoryPath: function () {
39234
+ var path = this.getPath(),
39235
+ hashPath = getHash().substr(1),
39236
+ url = path + hashPath;
39237
+
39238
+ // Removes any stacked double stashes
39239
+ return url.replace(/\/\//, '/');
39240
+ },
39241
+
39242
+ /**
39243
+ @private
39244
+
39245
+ Returns the current path as it should appear for HashLocation supported
39246
+ browsers. This may very well differ from the real current path.
39247
+
39248
+ @method getHashPath
39249
+ */
39250
+ getHashPath: function () {
39251
+ var historyPath = this.getHistoryPath(),
39252
+ exp = new RegExp('(' + this.rootURL + ')(.+)'),
39253
+ url = historyPath.replace(exp, '$1#/$2');
39254
+
39255
+ // Remove any stacked double stashes
39256
+ url = url.replace(/\/\//, '/');
39257
+
39258
+ return url;
39259
+ }
39260
+
39261
+ };
39262
+
39263
+ })();
39264
+
39265
+
39266
+
38464
39267
  (function() {
38465
39268
 
38466
39269
  })();
@@ -38712,14 +39515,14 @@ Ember.DefaultResolver = Ember.Object.extend({
38712
39515
  */
38713
39516
  resolve: function(fullName) {
38714
39517
  var parsedName = this.parseName(fullName),
38715
- typeSpecificResolveMethod = this[parsedName.resolveMethodName];
39518
+ resolveMethodName = parsedName.resolveMethodName;
38716
39519
 
38717
- if (!parsedName.name || !parsedName.type) {
39520
+ if (!(parsedName.name && parsedName.type)) {
38718
39521
  throw new TypeError("Invalid fullName: `" + fullName + "`, must be of the form `type:name` ");
38719
39522
  }
38720
39523
 
38721
- if (typeSpecificResolveMethod) {
38722
- var resolved = typeSpecificResolveMethod.call(this, parsedName);
39524
+ if (this[resolveMethodName]) {
39525
+ var resolved = this[resolveMethodName](parsedName);
38723
39526
  if (resolved) { return resolved; }
38724
39527
  }
38725
39528
  return this.resolveOther(parsedName);
@@ -39634,6 +40437,10 @@ Ember.Application.reopenClass({
39634
40437
  container.register('router:main', Ember.Router);
39635
40438
  container.injection('router:main', 'namespace', 'application:main');
39636
40439
 
40440
+
40441
+ container.register('location:auto', Ember.AutoLocation);
40442
+
40443
+
39637
40444
  container.register('location:hash', Ember.HashLocation);
39638
40445
  container.register('location:history', Ember.HistoryLocation);
39639
40446
  container.register('location:none', Ember.NoneLocation);