dist/ember.js in ember-source-1.13.5 vs dist/ember.js in ember-source-1.13.6

- old
+ new

@@ -3,11 +3,11 @@ * @copyright Copyright 2011-2015 Tilde Inc. and contributors * Portions Copyright 2006-2011 Strobe Inc. * Portions Copyright 2008-2011 Apple Inc. All rights reserved. * @license Licensed under MIT license * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 1.13.5 + * @version 1.13.6 */ (function() { var enifed, requireModule, eriuqer, requirejs, Ember; var mainContext = this; @@ -113,10 +113,12 @@ requirejs = eriuqer = requireModule = Ember.__loader.require; } })(); enifed('backburner', ['exports', './backburner/utils', './backburner/platform', './backburner/binary-search', './backburner/deferred-action-queues'], function (exports, _backburnerUtils, _backburnerPlatform, _backburnerBinarySearch, _backburnerDeferredActionQueues) { + 'use strict'; + exports["default"] = Backburner; function Backburner(queueNames, options) { this.queueNames = queueNames; this.options = options || {}; @@ -172,11 +174,11 @@ } } } }, - run: function () { + run: function () /* target, method, args */{ var length = arguments.length; var method, target, args; if (length === 1) { method = arguments[0]; @@ -227,11 +229,11 @@ } } } }, - join: function () { + join: function () /* target, method, args */{ if (this.currentInstance) { var length = arguments.length; var method, target; if (length === 1) { @@ -681,12 +683,13 @@ } return index; } }); -/* target, method, args */ /* target, method, args */ enifed("backburner/binary-search", ["exports"], function (exports) { + "use strict"; + exports["default"] = binarySearch; function binarySearch(time, timers) { var start = 0; var end = timers.length - 2; @@ -710,10 +713,12 @@ return time >= timers[start] ? start + 2 : start; } }); enifed('backburner/deferred-action-queues', ['exports', './utils', './queue'], function (exports, _utils, _queue) { + 'use strict'; + exports["default"] = DeferredActionQueues; function DeferredActionQueues(queueNames, options) { var queues = this.queues = {}; this.queueNames = queueNames = queueNames || []; @@ -771,10 +776,12 @@ }); enifed('backburner/platform', ['exports'], function (exports) { // In IE 6-8, try/finally doesn't work without a catch. // Unfortunately, this is impossible to test for since wrapping it in a parent try/catch doesn't trigger the bug. // This tests for another broken try/catch behavior that only exhibits in the same versions of IE. + 'use strict'; + var needsIETryCatchFix = (function (e, x) { try { x(); } catch (e) {} // jshint ignore:line return !!e; @@ -787,18 +794,20 @@ if (typeof self === 'object') { platform = self; /* global global */ } else if (typeof global === 'object') { - platform = global; - } else { - throw new Error('no global: `self` or `global` found'); - } + platform = global; + } else { + throw new Error('no global: `self` or `global` found'); + } exports["default"] = platform; }); enifed('backburner/queue', ['exports', './utils'], function (exports, _utils) { + 'use strict'; + exports["default"] = Queue; function Queue(name, options, globalOptions) { this.name = name; this.globalOptions = globalOptions || {}; @@ -1031,10 +1040,12 @@ } } }; }); enifed('backburner/utils', ['exports'], function (exports) { + 'use strict'; + exports.each = each; exports.isString = isString; exports.isFunction = isFunction; exports.isNumber = isNumber; exports.isCoercableNumber = isCoercableNumber; @@ -1130,20 +1141,23 @@ /* Flag to enable/disable model factory injections (disabled by default) If model factory injections are enabled, models should not be accessed globally (only through `container.lookupFactory('model:modelName'))`); */ + 'use strict'; + Ember.MODEL_FACTORY_INJECTIONS = false; if (Ember.ENV && typeof Ember.ENV.MODEL_FACTORY_INJECTIONS !== 'undefined') { Ember.MODEL_FACTORY_INJECTIONS = !!Ember.ENV.MODEL_FACTORY_INJECTIONS; } exports.Registry = _containerRegistry["default"]; exports.Container = _containerContainer["default"]; }); enifed('container/container', ['exports', 'ember-metal/core', 'ember-metal/keys', 'ember-metal/dictionary'], function (exports, _emberMetalCore, _emberMetalKeys, _emberMetalDictionary) { + 'use strict'; // TODO - Temporary workaround for v0.4.0 of the ES6 transpiler, which lacks support for circular dependencies. // See the below usage of requireModule. Instead, it should be possible to simply `import Registry from './registry';` var Registry; @@ -1160,11 +1174,11 @@ @private @class Container */ function Container(registry, options) { this._registry = registry || (function () { - _emberMetalCore["default"].deprecate('A container should only be created for an already instantiated registry. For backward compatibility, an isolated registry will be instantiated just for this container.'); + _emberMetalCore["default"].deprecate("A container should only be created for an already instantiated registry. For backward compatibility, an isolated registry will be instantiated just for this container."); // TODO - See note above about transpiler import workaround. if (!Registry) { Registry = requireModule('container/registry')['default']; } @@ -1487,10 +1501,11 @@ exports["default"] = Container; }); // Ember.assert enifed('container/registry', ['exports', 'ember-metal/core', 'ember-metal/dictionary', 'ember-metal/keys', 'ember-metal/merge', './container'], function (exports, _emberMetalCore, _emberMetalDictionary, _emberMetalKeys, _emberMetalMerge, _container) { + 'use strict'; var VALID_FULL_NAME_REGEXP = /^[^:]+.+:[^:]+$/; var instanceInitializersFeatureEnabled; @@ -1656,21 +1671,21 @@ lookup: function (fullName, options) { _emberMetalCore["default"].assert('Create a container on the registry (with `registry.container()`) before calling `lookup`.', this._defaultContainer); if (instanceInitializersFeatureEnabled) { - _emberMetalCore["default"].deprecate('`lookup` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: 'http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers' }); + _emberMetalCore["default"].deprecate('`lookup` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" }); } return this._defaultContainer.lookup(fullName, options); }, lookupFactory: function (fullName) { _emberMetalCore["default"].assert('Create a container on the registry (with `registry.container()`) before calling `lookupFactory`.', this._defaultContainer); if (instanceInitializersFeatureEnabled) { - _emberMetalCore["default"].deprecate('`lookupFactory` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: 'http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers' }); + _emberMetalCore["default"].deprecate('`lookupFactory` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.', false, { url: "http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers" }); } return this._defaultContainer.lookupFactory(fullName); }, @@ -2140,11 +2155,11 @@ normalizeInjectionsHash: function (hash) { var injections = []; for (var key in hash) { if (hash.hasOwnProperty(key)) { - _emberMetalCore["default"].assert('Expected a proper full name, given \'' + hash[key] + '\'', this.validateFullName(hash[key])); + _emberMetalCore["default"].assert("Expected a proper full name, given '" + hash[key] + "'", this.validateFullName(hash[key])); injections.push({ property: key, fullName: hash[key] }); @@ -2213,10 +2228,12 @@ exports["default"] = Registry; }); // Ember.assert enifed("dag-map", ["exports"], function (exports) { + "use strict"; + function visit(vertex, fn, visited, path) { var name = vertex.name; var vertices = vertex.incoming; var names = vertex.incomingNames; var len = names.length; @@ -2371,20 +2388,20 @@ */ DAG.prototype.addEdges = function (name, value, before, after) { var i; this.map(name, value); if (before) { - if (typeof before === "string") { + if (typeof before === 'string') { this.addEdge(name, before); } else { for (i = 0; i < before.length; i++) { this.addEdge(name, before[i]); } } } if (after) { - if (typeof after === "string") { + if (typeof after === 'string') { this.addEdge(after, name); } else { for (i = 0; i < after.length; i++) { this.addEdge(after[i], name); } @@ -2393,53 +2410,55 @@ }; exports["default"] = DAG; }); enifed('dag-map.umd', ['exports', './dag-map'], function (exports, _dagMap) { + 'use strict'; /* global define:true module:true window: true */ if (typeof enifed === 'function' && enifed.amd) { enifed(function () { return _dagMap["default"]; }); } else if (typeof module !== 'undefined' && module.exports) { module.exports = _dagMap["default"]; - } else if (typeof this !== 'undefined') { - this['DAG'] = _dagMap["default"]; + } else if (typeof undefined !== 'undefined') { + undefined['DAG'] = _dagMap["default"]; } }); enifed("dom-helper", ["exports", "./htmlbars-runtime/morph", "./morph-attr", "./dom-helper/build-html-dom", "./dom-helper/classes", "./dom-helper/prop"], function (exports, _htmlbarsRuntimeMorph, _morphAttr, _domHelperBuildHtmlDom, _domHelperClasses, _domHelperProp) { + "use strict"; - var doc = typeof document === "undefined" ? false : document; + var doc = typeof document === 'undefined' ? false : document; var deletesBlankTextNodes = doc && (function (document) { - var element = document.createElement("div"); - element.appendChild(document.createTextNode("")); + var element = document.createElement('div'); + element.appendChild(document.createTextNode('')); var clonedElement = element.cloneNode(true); return clonedElement.childNodes.length === 0; })(doc); var ignoresCheckedAttribute = doc && (function (document) { - var element = document.createElement("input"); - element.setAttribute("checked", "checked"); + var element = document.createElement('input'); + element.setAttribute('checked', 'checked'); var clonedElement = element.cloneNode(false); return !clonedElement.checked; })(doc); var canRemoveSvgViewBoxAttribute = doc && (doc.createElementNS ? (function (document) { - var element = document.createElementNS(_domHelperBuildHtmlDom.svgNamespace, "svg"); - element.setAttribute("viewBox", "0 0 100 100"); - element.removeAttribute("viewBox"); - return !element.getAttribute("viewBox"); + var element = document.createElementNS(_domHelperBuildHtmlDom.svgNamespace, 'svg'); + element.setAttribute('viewBox', '0 0 100 100'); + element.removeAttribute('viewBox'); + return !element.getAttribute('viewBox'); })(doc) : true); var canClone = doc && (function (document) { - var element = document.createElement("div"); - element.appendChild(document.createTextNode(" ")); - element.appendChild(document.createTextNode(" ")); + var element = document.createElement('div'); + element.appendChild(document.createTextNode(' ')); + element.appendChild(document.createTextNode(' ')); var clonedElement = element.cloneNode(true); - return clonedElement.childNodes[0].nodeValue === " "; + return clonedElement.childNodes[0].nodeValue === ' '; })(doc); // This is not the namespace of the element, but of // the elements inside that elements. function interiorNamespace(element) { @@ -2476,24 +2495,24 @@ // var omittedStartTagChildTest = /<([\w:]+)/; function detectOmittedStartTag(string, contextualElement) { // Omitted start tags are only inside table tags. - if (contextualElement.tagName === "TABLE") { + if (contextualElement.tagName === 'TABLE') { var omittedStartTagChildMatch = omittedStartTagChildTest.exec(string); if (omittedStartTagChildMatch) { var omittedStartTagChild = omittedStartTagChildMatch[1]; // It is already asserted that the contextual element is a table // and not the proper start tag. Just see if a tag was omitted. - return omittedStartTagChild === "tr" || omittedStartTagChild === "col"; + return omittedStartTagChild === 'tr' || omittedStartTagChild === 'col'; } } } function buildSVGDOM(html, dom) { - var div = dom.document.createElement("div"); - div.innerHTML = "<svg>" + html + "</svg>"; + var div = dom.document.createElement('div'); + div.innerHTML = '<svg>' + html + '</svg>'; return div.firstChild.childNodes; } var guid = 1; @@ -2644,11 +2663,11 @@ prototype.removeAttribute = function (element, name) { element.removeAttribute(name); }; } else { prototype.removeAttribute = function (element, name) { - if (element.tagName === "svg" && name === "viewBox") { + if (element.tagName === 'svg' && name === 'viewBox') { element.setAttribute(name, null); } else { element.removeAttribute(name); } }; @@ -2657,12 +2676,12 @@ prototype.setPropertyStrict = function (element, name, value) { if (value === undefined) { value = null; } - if (value === null && (name === "value" || name === "type" || name === "src")) { - value = ""; + if (value === null && (name === 'value' || name === 'type' || name === 'src')) { + value = ''; } element[name] = value; }; @@ -2670,11 +2689,11 @@ return element[name]; }; prototype.setProperty = function (element, name, value, namespace) { var lowercaseName = name.toLowerCase(); - if (element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace || lowercaseName === "style") { + if (element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace || lowercaseName === 'style') { if (_domHelperProp.isAttrRemovalValue(value)) { element.removeAttribute(name); } else { if (namespace) { element.setAttributeNS(namespace, name, value); @@ -2686,11 +2705,11 @@ var _normalizeProperty = _domHelperProp.normalizeProperty(element, name); var normalized = _normalizeProperty.normalized; var type = _normalizeProperty.type; - if (type === "prop") { + if (type === 'prop') { element[normalized] = value; } else { if (_domHelperProp.isAttrRemovalValue(value)) { element.removeAttribute(name); } else { @@ -2708,11 +2727,11 @@ // Only opt into namespace detection if a contextualElement // is passed. prototype.createElement = function (tagName, contextualElement) { var namespace = this.namespace; if (contextualElement) { - if (tagName === "svg") { + if (tagName === 'svg') { namespace = _domHelperBuildHtmlDom.svgNamespace; } else { namespace = interiorNamespace(contextualElement); } } @@ -2758,22 +2777,22 @@ }; prototype.repairClonedNode = function (element, blankChildTextNodes, isChecked) { if (deletesBlankTextNodes && blankChildTextNodes.length > 0) { for (var i = 0, len = blankChildTextNodes.length; i < len; i++) { - var textNode = this.document.createTextNode(""), + var textNode = this.document.createTextNode(''), offset = blankChildTextNodes[i], before = this.childAtIndex(element, offset); if (before) { element.insertBefore(textNode, before); } else { element.appendChild(textNode); } } } if (ignoresCheckedAttribute && isChecked) { - element.setAttribute("checked", "checked"); + element.setAttribute('checked', 'checked'); } }; prototype.cloneNode = function (element, deep) { var clone = element.cloneNode(!!deep); @@ -2825,11 +2844,11 @@ prototype.replaceContentWithMorph = function (element) { var firstChild = element.firstChild; if (!firstChild) { - var comment = this.createComment(""); + var comment = this.createComment(''); this.appendChild(element, comment); return _htmlbarsRuntimeMorph["default"].create(this, element, comment); } else { var morph = _htmlbarsRuntimeMorph["default"].attach(this, element, firstChild, element.lastChild); morph.clear(); @@ -2857,25 +2876,25 @@ morph.parseTextAsHTML = true; return morph; }; prototype.insertMorphBefore = function (element, referenceChild, contextualElement) { - var insertion = this.document.createComment(""); + var insertion = this.document.createComment(''); element.insertBefore(insertion, referenceChild); return this.createMorph(element, insertion, insertion, contextualElement); }; prototype.appendMorph = function (element, contextualElement) { - var insertion = this.document.createComment(""); + var insertion = this.document.createComment(''); element.appendChild(insertion); return this.createMorph(element, insertion, insertion, contextualElement); }; prototype.insertBoundary = function (fragment, index) { // this will always be null or firstChild var child = index === null ? null : this.childAtIndex(fragment, index); - this.insertBefore(fragment, this.createTextNode(""), child); + this.insertBefore(fragment, this.createTextNode(''), child); }; prototype.setMorphHTML = function (morph, html) { morph.setHTML(html); }; @@ -2904,11 +2923,11 @@ if (childNodes && childNodes.length > 0) { var currentNode = childNodes[0]; // We prepend an <option> to <select> boxes to absorb any browser bugs // related to auto-select behavior. Skip past it. - if (contextualElement.tagName === "SELECT") { + if (contextualElement.tagName === 'SELECT') { currentNode = currentNode.nextSibling; } while (currentNode) { var tempNode = currentNode; @@ -2924,21 +2943,23 @@ var parsingNode; // Used to determine whether a URL needs to be sanitized. prototype.protocolForURL = function (url) { if (!parsingNode) { - parsingNode = this.document.createElement("a"); + parsingNode = this.document.createElement('a'); } parsingNode.href = url; return parsingNode.protocol; }; exports["default"] = DOMHelper; }); enifed('dom-helper/build-html-dom', ['exports'], function (exports) { /* global XMLSerializer:false */ + 'use strict'; + var svgHTMLIntegrationPoints = { foreignObject: 1, desc: 1, title: 1 }; exports.svgHTMLIntegrationPoints = svgHTMLIntegrationPoints; var svgNamespace = 'http://www.w3.org/2000/svg'; exports.svgNamespace = svgNamespace; @@ -2950,30 +2971,30 @@ if (document.createElementNS === undefined) { return; } // In FF title will not accept innerHTML. var testEl = document.createElementNS(svgNamespace, 'title'); - testEl.innerHTML = '<div></div>'; + testEl.innerHTML = "<div></div>"; return testEl.childNodes.length === 0 || testEl.childNodes[0].nodeType !== 1; })(doc); // Internet Explorer prior to 9 does not allow setting innerHTML if the first element // is a "zero-scope" element. This problem can be worked around by making // the first node an invisible text node. We, like Modernizr, use &shy; var needsShy = doc && (function (document) { var testEl = document.createElement('div'); - testEl.innerHTML = '<div></div>'; - testEl.firstChild.innerHTML = '<script></script>'; + testEl.innerHTML = "<div></div>"; + testEl.firstChild.innerHTML = "<script><\/script>"; return testEl.firstChild.innerHTML === ''; })(doc); // IE 8 (and likely earlier) likes to move whitespace preceeding // a script tag to appear after it. This means that we can // accidentally remove whitespace when updating a morph. var movesWhitespace = doc && (function (document) { var testEl = document.createElement('div'); - testEl.innerHTML = 'Test: <script type=\'text/x-placeholder\'></script>Value'; + testEl.innerHTML = "Test: <script type='text/x-placeholder'><\/script>Value"; return testEl.childNodes[0].nodeValue === 'Test:' && testEl.childNodes[2].nodeValue === ' Value'; })(doc); var tagNamesRequiringInnerHTMLFix = doc && (function (document) { var tagNamesRequiringInnerHTMLFix; @@ -3025,11 +3046,11 @@ var shyElement = nodes[0]; while (shyElement.nodeType === 1 && !shyElement.nodeName) { shyElement = shyElement.firstChild; } // At this point it's the actual unicode character. - if (shyElement.nodeType === 3 && shyElement.nodeValue.charAt(0) === '­') { + if (shyElement.nodeType === 3 && shyElement.nodeValue.charAt(0) === "\u00AD") { var newValue = shyElement.nodeValue.slice(1); if (newValue.length) { shyElement.nodeValue = shyElement.nodeValue.slice(1); } else { shyElement.parentNode.removeChild(shyElement); @@ -3043,18 +3064,18 @@ var tagName = contextualElement.tagName; // Firefox versions < 11 do not have support for element.outerHTML. var outerHTML = contextualElement.outerHTML || new XMLSerializer().serializeToString(contextualElement); if (!outerHTML) { - throw 'Can\'t set innerHTML on ' + tagName + ' in this browser'; + throw "Can't set innerHTML on " + tagName + " in this browser"; } html = fixSelect(html, contextualElement); var wrappingTags = tagNamesRequiringInnerHTMLFix[tagName.toLowerCase()]; - var startTag = outerHTML.match(new RegExp('<' + tagName + '([^>]*)>', 'i'))[0]; + var startTag = outerHTML.match(new RegExp("<" + tagName + "([^>]*)>", 'i'))[0]; var endTag = '</' + tagName + '>'; var wrappedHTML = [startTag, html, endTag]; var i = wrappingTags.length; @@ -3098,11 +3119,11 @@ }; } function fixSelect(html, contextualElement) { if (contextualElement.tagName === 'SELECT') { - html = '<option></option>' + html; + html = "<option></option>" + html; } return html; } @@ -3190,10 +3211,12 @@ } exports.buildHTMLDOM = buildHTMLDOM; }); enifed('dom-helper/classes', ['exports'], function (exports) { + 'use strict'; + var doc = typeof document === 'undefined' ? false : document; // PhantomJS has a broken classList. See https://github.com/ariya/phantomjs/issues/12782 var canClassList = doc && (function () { var d = document.createElement('div'); @@ -3305,10 +3328,12 @@ exports.addClasses = addClasses; exports.removeClasses = removeClasses; }); enifed('dom-helper/prop', ['exports'], function (exports) { + 'use strict'; + exports.isAttrRemovalValue = isAttrRemovalValue; exports.normalizeProperty = normalizeProperty; function isAttrRemovalValue(value) { return value === null || value === undefined; @@ -3383,10 +3408,12 @@ var tag = ATTR_OVERRIDES[tagName.toUpperCase()]; return tag && tag[propName.toLowerCase()] || false; } }); enifed('ember-application', ['exports', 'ember-metal/core', 'ember-runtime/system/lazy_load', 'ember-application/system/resolver', 'ember-application/system/application', 'ember-application/ext/controller'], function (exports, _emberMetalCore, _emberRuntimeSystemLazy_load, _emberApplicationSystemResolver, _emberApplicationSystemApplication, _emberApplicationExtController) { + 'use strict'; + // side effect of extending ControllerMixin _emberMetalCore["default"].Application = _emberApplicationSystemApplication["default"]; _emberMetalCore["default"].Resolver = _emberApplicationSystemResolver.Resolver; _emberMetalCore["default"].DefaultResolver = _emberApplicationSystemResolver["default"]; @@ -3397,54 +3424,61 @@ /** @module ember @submodule ember-application */ enifed("ember-application/ext/controller", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/error", "ember-metal/utils", "ember-metal/computed", "ember-runtime/mixins/controller", "ember-routing/system/controller_for"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalError, _emberMetalUtils, _emberMetalComputed, _emberRuntimeMixinsController, _emberRoutingSystemController_for) { + /** + @module ember + @submodule ember-application + @public + */ + "use strict"; + function verifyNeedsDependencies(controller, container, needs) { var dependency, i, l; var missing = []; for (i = 0, l = needs.length; i < l; i++) { dependency = needs[i]; - _emberMetalCore["default"].assert(_emberMetalUtils.inspect(controller) + "#needs must not specify dependencies with periods in their names (" + dependency + ")", dependency.indexOf(".") === -1); + _emberMetalCore["default"].assert(_emberMetalUtils.inspect(controller) + "#needs must not specify dependencies with periods in their names (" + dependency + ")", dependency.indexOf('.') === -1); - if (dependency.indexOf(":") === -1) { + if (dependency.indexOf(':') === -1) { dependency = "controller:" + dependency; } // Structure assert to still do verification but not string concat in production if (!container._registry.has(dependency)) { missing.push(dependency); } } if (missing.length) { - throw new _emberMetalError["default"](_emberMetalUtils.inspect(controller) + " needs [ " + missing.join(", ") + " ] but " + (missing.length > 1 ? "they" : "it") + " could not be found"); + throw new _emberMetalError["default"](_emberMetalUtils.inspect(controller) + " needs [ " + missing.join(', ') + " ] but " + (missing.length > 1 ? 'they' : 'it') + " could not be found"); } } var defaultControllersComputedProperty = _emberMetalComputed.computed(function () { var controller = this; - _emberMetalCore["default"].deprecate("Controller#needs is deprecated, please use Ember.inject.controller() instead"); + _emberMetalCore["default"].deprecate('Controller#needs is deprecated, please use Ember.inject.controller() instead'); return { - needs: _emberMetalProperty_get.get(controller, "needs"), - container: _emberMetalProperty_get.get(controller, "container"), + needs: _emberMetalProperty_get.get(controller, 'needs'), + container: _emberMetalProperty_get.get(controller, 'container'), unknownProperty: function (controllerName) { var needs = this.needs; var dependency, i, l; for (i = 0, l = needs.length; i < l; i++) { dependency = needs[i]; if (dependency === controllerName) { - return this.container.lookup("controller:" + controllerName); + return this.container.lookup('controller:' + controllerName); } } - var errorMessage = _emberMetalUtils.inspect(controller) + "#needs does not include `" + controllerName + "`. To access the " + controllerName + " controller from " + _emberMetalUtils.inspect(controller) + ", " + _emberMetalUtils.inspect(controller) + " should have a `needs` property that is an array of the controllers it has access to."; + var errorMessage = _emberMetalUtils.inspect(controller) + '#needs does not include `' + controllerName + '`. To access the ' + controllerName + ' controller from ' + _emberMetalUtils.inspect(controller) + ', ' + _emberMetalUtils.inspect(controller) + ' should have a `needs` property that is an array of the controllers it has access to.'; throw new ReferenceError(errorMessage); }, setUnknownProperty: function (key, value) { throw new Error("You cannot overwrite the value of `controllers." + key + "` of " + _emberMetalUtils.inspect(controller)); } @@ -3455,11 +3489,11 @@ @class ControllerMixin @namespace Ember @public */ _emberRuntimeMixinsController["default"].reopen({ - concatenatedProperties: ["needs"], + concatenatedProperties: ['needs'], /** An array of other controller objects available inside instances of this controller via the `controllers` property: @@ -3497,22 +3531,22 @@ @public */ needs: [], init: function () { - var needs = _emberMetalProperty_get.get(this, "needs"); - var length = _emberMetalProperty_get.get(needs, "length"); + var needs = _emberMetalProperty_get.get(this, 'needs'); + var length = _emberMetalProperty_get.get(needs, 'length'); if (length > 0) { - _emberMetalCore["default"].assert(" `" + _emberMetalUtils.inspect(this) + " specifies `needs`, but does " + "not have a container. Please ensure this controller was " + "instantiated with a container.", this.container || this.controllers !== defaultControllersComputedProperty); + _emberMetalCore["default"].assert(' `' + _emberMetalUtils.inspect(this) + ' specifies `needs`, but does ' + "not have a container. Please ensure this controller was " + "instantiated with a container.", this.container || this.controllers !== defaultControllersComputedProperty); if (this.container) { verifyNeedsDependencies(this, this.container, needs); } // if needs then initialize controllers proxy - _emberMetalProperty_get.get(this, "controllers"); + _emberMetalProperty_get.get(this, 'controllers'); } this._super.apply(this, arguments); }, @@ -3521,12 +3555,12 @@ @see {Ember.Route#controllerFor} @deprecated Use `Ember.inject.controller()` instead. @public */ controllerFor: function (controllerName) { - _emberMetalCore["default"].deprecate("Controller#controllerFor is deprecated, please use Ember.inject.controller() instead"); - return _emberRoutingSystemController_for["default"](_emberMetalProperty_get.get(this, "container"), controllerName); + _emberMetalCore["default"].deprecate('Controller#controllerFor is deprecated, please use Ember.inject.controller() instead'); + return _emberRoutingSystemController_for["default"](_emberMetalProperty_get.get(this, 'container'), controllerName); }, /** Stores the instances of other controllers available from within this controller. Any controller listed by name in the `needs` @@ -3549,19 +3583,20 @@ controllers: defaultControllersComputedProperty }); exports["default"] = _emberRuntimeMixinsController["default"]; }); -/** -@module ember -@submodule ember-application -@public -*/ - // Ember.assert enifed("ember-application/system/application-instance", ["exports", "ember-metal/property_get", "ember-metal/property_set", "ember-runtime/system/object", "ember-metal/run_loop", "ember-metal/computed", "container/registry"], function (exports, _emberMetalProperty_get, _emberMetalProperty_set, _emberRuntimeSystemObject, _emberMetalRun_loop, _emberMetalComputed, _containerRegistry) { + /** + @module ember + @submodule ember-application + @private + */ + "use strict"; + /** The `ApplicationInstance` encapsulates all of the stateful aspects of a running `Application`. At a high-level, we break application boot into two distinct phases: @@ -3648,15 +3683,15 @@ // Why do we need to register the instance in the first place? // Because we need a good way for the root route (a.k.a ApplicationRoute) // to notify us when it has created the root-most view. That view is then // appended to the rootElement, in the case of apps, to the fixture harness // in tests, or rendered to a string in the case of FastBoot. - this.registry.register("-application-instance:main", this, { instantiate: false }); + this.registry.register('-application-instance:main', this, { instantiate: false }); }, router: _emberMetalComputed.computed(function () { - return this.container.lookup("router:main"); + return this.container.lookup('router:main'); }).readOnly(), /** Instantiates and sets up the router, specifically overriding the default location. This is useful for manually starting the app in FastBoot or @@ -3665,14 +3700,14 @@ @param options @private */ overrideRouterLocation: function (options) { var location = options && options.location; - var router = _emberMetalProperty_get.get(this, "router"); + var router = _emberMetalProperty_get.get(this, 'router'); if (location) { - _emberMetalProperty_set.set(router, "location", location); + _emberMetalProperty_set.set(router, 'location', location); } }, /** This hook is called by the root-most Route (a.k.a. the ApplicationRoute) @@ -3693,11 +3728,11 @@ current URL of the page to determine the initial URL to start routing to. To start the app at a specific URL, call `handleURL` instead. @private */ startRouting: function () { - var router = _emberMetalProperty_get.get(this, "router"); + var router = _emberMetalProperty_get.get(this, 'router'); var isModuleBasedResolver = !!this.registry.resolver.moduleBasedResolver; router.startRouting(isModuleBasedResolver); this._didSetupRouter = true; }, @@ -3713,11 +3748,11 @@ if (this._didSetupRouter) { return; } this._didSetupRouter = true; - var router = _emberMetalProperty_get.get(this, "router"); + var router = _emberMetalProperty_get.get(this, 'router'); var isModuleBasedResolver = !!this.registry.resolver.moduleBasedResolver; router.setupRouter(isModuleBasedResolver); }, /** @@ -3726,41 +3761,41 @@ have called `setupRouter()` before calling this method. @param url {String} the URL the router should route to @private */ handleURL: function (url) { - var router = _emberMetalProperty_get.get(this, "router"); + var router = _emberMetalProperty_get.get(this, 'router'); this.setupRouter(); return router.handleURL(url); }, /** @private */ setupEventDispatcher: function () { - var dispatcher = this.container.lookup("event_dispatcher:main"); + var dispatcher = this.container.lookup('event_dispatcher:main'); dispatcher.setup(this.customEvents, this.rootElement); return dispatcher; }, /** @private */ willDestroy: function () { this._super.apply(this, arguments); - _emberMetalRun_loop["default"](this.container, "destroy"); + _emberMetalRun_loop["default"](this.container, 'destroy'); } }); }); -/** -@module ember -@submodule ember-application -@private -*/ enifed('ember-application/system/application', ['exports', 'dag-map', 'container/registry', 'ember-metal', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-runtime/system/lazy_load', 'ember-runtime/system/namespace', 'ember-runtime/mixins/deferred', 'ember-application/system/resolver', 'ember-metal/platform/create', 'ember-metal/run_loop', 'ember-metal/utils', 'ember-runtime/controllers/controller', 'ember-metal/enumerable_utils', 'ember-runtime/controllers/object_controller', 'ember-runtime/controllers/array_controller', 'ember-metal-views/renderer', 'ember-htmlbars/system/dom-helper', 'ember-views/views/select', 'ember-routing-views/views/outlet', 'ember-views/views/view', 'ember-views/system/event_dispatcher', 'ember-views/system/jquery', 'ember-routing/system/route', 'ember-routing/system/router', 'ember-routing/location/hash_location', 'ember-routing/location/history_location', 'ember-routing/location/auto_location', 'ember-routing/location/none_location', 'ember-routing/system/cache', 'ember-application/system/application-instance', 'ember-views/views/text_field', 'ember-views/views/text_area', 'ember-views/views/checkbox', 'ember-views/views/legacy_each_view', 'ember-routing-views/views/link', 'ember-routing/services/routing', 'ember-extension-support/container_debug_adapter', 'ember-metal/environment'], function (exports, _dagMap, _containerRegistry, _emberMetal, _emberMetalProperty_get, _emberMetalProperty_set, _emberRuntimeSystemLazy_load, _emberRuntimeSystemNamespace, _emberRuntimeMixinsDeferred, _emberApplicationSystemResolver, _emberMetalPlatformCreate, _emberMetalRun_loop, _emberMetalUtils, _emberRuntimeControllersController, _emberMetalEnumerable_utils, _emberRuntimeControllersObject_controller, _emberRuntimeControllersArray_controller, _emberMetalViewsRenderer, _emberHtmlbarsSystemDomHelper, _emberViewsViewsSelect, _emberRoutingViewsViewsOutlet, _emberViewsViewsView, _emberViewsSystemEvent_dispatcher, _emberViewsSystemJquery, _emberRoutingSystemRoute, _emberRoutingSystemRouter, _emberRoutingLocationHash_location, _emberRoutingLocationHistory_location, _emberRoutingLocationAuto_location, _emberRoutingLocationNone_location, _emberRoutingSystemCache, _emberApplicationSystemApplicationInstance, _emberViewsViewsText_field, _emberViewsViewsText_area, _emberViewsViewsCheckbox, _emberViewsViewsLegacy_each_view, _emberRoutingViewsViewsLink, _emberRoutingServicesRouting, _emberExtensionSupportContainer_debug_adapter, _emberMetalEnvironment) { + /** + @module ember + @submodule ember-application + */ + 'use strict'; function props(obj) { var properties = []; for (var key in obj) { @@ -4087,12 +4122,12 @@ to use the router for this purpose. @method deferReadiness @public */ deferReadiness: function () { - _emberMetal["default"].assert('You must call deferReadiness on an instance of Ember.Application', this instanceof Application); - _emberMetal["default"].assert('You cannot defer readiness since the `ready()` hook has already been called.', this._readinessDeferrals > 0); + _emberMetal["default"].assert("You must call deferReadiness on an instance of Ember.Application", this instanceof Application); + _emberMetal["default"].assert("You cannot defer readiness since the `ready()` hook has already been called.", this._readinessDeferrals > 0); this._readinessDeferrals++; }, /** Call `advanceReadiness` after any asynchronous setup logic has completed. @@ -4101,11 +4136,11 @@ @method advanceReadiness @see {Ember.Application#deferReadiness} @public */ advanceReadiness: function () { - _emberMetal["default"].assert('You must call advanceReadiness on an instance of Ember.Application', this instanceof Application); + _emberMetal["default"].assert("You must call advanceReadiness on an instance of Ember.Application", this instanceof Application); this._readinessDeferrals--; if (this._readinessDeferrals === 0) { _emberMetalRun_loop["default"].once(this, this.didBecomeReady); } @@ -4328,20 +4363,20 @@ @method runInitializers */ runInitializers: function (registry) { var App = this; this._runInitializer('initializers', function (name, initializer) { - _emberMetal["default"].assert('No application initializer named \'' + name + '\'', !!initializer); + _emberMetal["default"].assert("No application initializer named '" + name + "'", !!initializer); initializer.initialize(registry, App); }); }, runInstanceInitializers: function (instance) { this._runInitializer('instanceInitializers', function (name, initializer) { - _emberMetal["default"].assert('No instance initializer named \'' + name + '\'', !!initializer); + _emberMetal["default"].assert("No instance initializer named '" + name + "'", !!initializer); initializer.initialize(instance); }); }, _runInitializer: function (bucketName, cb) { @@ -4415,11 +4450,18 @@ willDestroy: function () { this._super.apply(this, arguments); _emberMetal["default"].BOOTED = false; this._bootPromise = null; this._bootResolver = null; - this.__deprecatedInstance__.destroy(); + + if (_emberRuntimeSystemLazy_load._loaded.application === this) { + _emberRuntimeSystemLazy_load._loaded.application = undefined; + } + + if (this.__deprecatedInstance__) { + this.__deprecatedInstance__.destroy(); + } }, initializer: function (options) { this.constructor.initializer(options); }, @@ -4752,26 +4794,29 @@ var attrs = {}; attrs[bucketName] = _emberMetalPlatformCreate["default"](this[bucketName]); this.reopenClass(attrs); } - _emberMetal["default"].assert('The ' + humanName + ' \'' + initializer.name + '\' has already been registered', !this[bucketName][initializer.name]); - _emberMetal["default"].assert('An ' + humanName + ' cannot be registered without an initialize function', _emberMetalUtils.canInvoke(initializer, 'initialize')); - _emberMetal["default"].assert('An ' + humanName + ' cannot be registered without a name property', initializer.name !== undefined); + _emberMetal["default"].assert("The " + humanName + " '" + initializer.name + "' has already been registered", !this[bucketName][initializer.name]); + _emberMetal["default"].assert("An " + humanName + " cannot be registered without an initialize function", _emberMetalUtils.canInvoke(initializer, 'initialize')); + _emberMetal["default"].assert("An " + humanName + " cannot be registered without a name property", initializer.name !== undefined); this[bucketName][initializer.name] = initializer; }; } exports["default"] = Application; }); -/** -@module ember -@submodule ember-application -*/ // Ember.FEATURES, Ember.deprecate, Ember.assert, Ember.libraries, LOG_VERSION, Namespace, BOOTED enifed('ember-application/system/resolver', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/logger', 'ember-metal/keys', 'ember-runtime/system/string', 'ember-runtime/system/object', 'ember-runtime/system/namespace', 'ember-htmlbars/helpers', 'ember-application/utils/validate-type', 'ember-metal/dictionary'], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalLogger, _emberMetalKeys, _emberRuntimeSystemString, _emberRuntimeSystemObject, _emberRuntimeSystemNamespace, _emberHtmlbarsHelpers, _emberApplicationUtilsValidateType, _emberMetalDictionary) { + /** + @module ember + @submodule ember-application + */ + + 'use strict'; + var Resolver = _emberRuntimeSystemObject["default"].extend({ /* This will be set to the Application instance when it is created. @property namespace @@ -4784,11 +4829,10 @@ makeToString: null, // required resolveOther: null, // required _logLookup: null // required }); - exports.Resolver = Resolver; /** The DefaultResolver defines the default lookup rules to resolve container lookups before consulting the container for registered items: @@ -4857,10 +4901,11 @@ @namespace Ember @extends Ember.Object @public */ + exports.Resolver = Resolver; exports["default"] = _emberRuntimeSystemObject["default"].extend({ /** This will be set to the Application instance when it is created. @property namespace @@ -4875,11 +4920,11 @@ var _fullName$split = fullName.split(':', 2); var type = _fullName$split[0]; var name = _fullName$split[1]; - _emberMetalCore["default"].assert('Tried to normalize a container name without a colon (:) in it.' + ' You probably tried to lookup a name that did not contain a type,' + ' a colon, and a name. A proper lookup name would be `view:post`.', fullName.split(':').length === 2); + _emberMetalCore["default"].assert("Tried to normalize a container name without a colon (:) in it." + " You probably tried to lookup a name that did not contain a type," + " a colon, and a name. A proper lookup name would be `view:post`.", fullName.split(':').length === 2); if (type !== 'template') { var result = name; if (result.indexOf('.') > -1) { @@ -5203,23 +5248,20 @@ return type + ':' + dasherizedName; } }); }); -/** -@module ember -@submodule ember-application -*/ - // Ember.TEMPLATES, Ember.assert enifed('ember-application/utils/validate-type', ['exports'], function (exports) { - exports["default"] = validateType; /** @module ember @submodule ember-application */ + 'use strict'; + + exports["default"] = validateType; var VALIDATED_TYPES = { route: ['assert', 'isRouteFactory', 'Ember.Route'], component: ['deprecate', 'isComponentFactory', 'Ember.Component'], view: ['deprecate', 'isViewFactory', 'Ember.View'], service: ['deprecate', 'isServiceFactory', 'Ember.Service'] @@ -5244,10 +5286,14 @@ }); } } }); enifed("ember-debug", ["exports", "ember-metal/core", "ember-metal/error", "ember-metal/logger", "ember-debug/deprecation-manager", "ember-metal/environment"], function (exports, _emberMetalCore, _emberMetalError, _emberMetalLogger, _emberDebugDeprecationManager, _emberMetalEnvironment) { + /*global __fail__*/ + + "use strict"; + exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags; /** @module ember @submodule ember-debug @@ -5257,11 +5303,11 @@ @class Ember @public */ function isPlainFunction(test) { - return typeof test === "function" && test.PrototypeMixin === undefined; + return typeof test === 'function' && test.PrototypeMixin === undefined; } /** Define an assertion that will throw an exception if the condition is not met. Ember build tools will remove any calls to `Ember.assert()` when @@ -5308,11 +5354,11 @@ @public */ _emberMetalCore["default"].warn = function (message, test) { if (!test) { _emberMetalLogger["default"].warn("WARNING: " + message); - if ("trace" in _emberMetalLogger["default"]) { + if ('trace' in _emberMetalLogger["default"]) { _emberMetalLogger["default"].trace(); } } }; @@ -5385,27 +5431,27 @@ } catch (e) { error = e; } if (arguments.length === 3) { - _emberMetalCore["default"].assert("options argument to Ember.deprecate should be an object", options && typeof options === "object"); + _emberMetalCore["default"].assert('options argument to Ember.deprecate should be an object', options && typeof options === 'object'); if (options.url) { - message += " See " + options.url + " for more details."; + message += ' See ' + options.url + ' for more details.'; } } if (_emberMetalCore["default"].LOG_STACKTRACE_ON_DEPRECATION && error.stack) { var stack; - var stackStr = ""; + var stackStr = ''; - if (error["arguments"]) { + if (error['arguments']) { // Chrome - stack = error.stack.replace(/^\s+at\s+/gm, "").replace(/^([^\(]+?)([\n$])/gm, "{anonymous}($1)$2").replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, "{anonymous}($1)").split("\n"); + stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n'); stack.shift(); } else { // Firefox - stack = error.stack.replace(/(?:\n@:0)?\s+$/m, "").replace(/^\(/gm, "{anonymous}(").split("\n"); + stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n'); } stackStr = "\n " + stack.slice(2).join("\n "); message = message + stackStr; } @@ -5504,46 +5550,46 @@ @return {void} */ function _warnIfUsingStrippedFeatureFlags(FEATURES, featuresWereStripped) { if (featuresWereStripped) { - _emberMetalCore["default"].warn("Ember.ENV.ENABLE_ALL_FEATURES is only available in canary builds.", !_emberMetalCore["default"].ENV.ENABLE_ALL_FEATURES); - _emberMetalCore["default"].warn("Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.", !_emberMetalCore["default"].ENV.ENABLE_OPTIONAL_FEATURES); + _emberMetalCore["default"].warn('Ember.ENV.ENABLE_ALL_FEATURES is only available in canary builds.', !_emberMetalCore["default"].ENV.ENABLE_ALL_FEATURES); + _emberMetalCore["default"].warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberMetalCore["default"].ENV.ENABLE_OPTIONAL_FEATURES); for (var key in FEATURES) { - if (FEATURES.hasOwnProperty(key) && key !== "isEnabled") { - _emberMetalCore["default"].warn("FEATURE[\"" + key + "\"] is set as enabled, but FEATURE flags are only available in canary builds.", !FEATURES[key]); + if (FEATURES.hasOwnProperty(key) && key !== 'isEnabled') { + _emberMetalCore["default"].warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key]); } } } } if (!_emberMetalCore["default"].testing) { // Complain if they're using FEATURE flags in builds other than canary - _emberMetalCore["default"].FEATURES["features-stripped-test"] = true; + _emberMetalCore["default"].FEATURES['features-stripped-test'] = true; var featuresWereStripped = true; - delete _emberMetalCore["default"].FEATURES["features-stripped-test"]; + delete _emberMetalCore["default"].FEATURES['features-stripped-test']; _warnIfUsingStrippedFeatureFlags(_emberMetalCore["default"].ENV.FEATURES, featuresWereStripped); // Inform the developer about the Ember Inspector if not installed. var isFirefox = _emberMetalEnvironment["default"].isFirefox; var isChrome = _emberMetalEnvironment["default"].isChrome; - if (typeof window !== "undefined" && (isFirefox || isChrome) && window.addEventListener) { + if (typeof window !== 'undefined' && (isFirefox || isChrome) && window.addEventListener) { window.addEventListener("load", function () { if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) { var downloadURL; if (isChrome) { - downloadURL = "https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi"; + downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi'; } else if (isFirefox) { - downloadURL = "https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/"; + downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/'; } - _emberMetalCore["default"].debug("For more advanced debugging, install the Ember Inspector from " + downloadURL); + _emberMetalCore["default"].debug('For more advanced debugging, install the Ember Inspector from ' + downloadURL); } }, false); } } @@ -5563,15 +5609,16 @@ used a nice helpful warning message will be printed out. */ var runningNonEmberDebugJS = true; exports.runningNonEmberDebugJS = runningNonEmberDebugJS; if (runningNonEmberDebugJS) { - _emberMetalCore["default"].warn("Please use `ember.debug.js` instead of `ember.js` for development and debugging."); + _emberMetalCore["default"].warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.'); } }); -/*global __fail__*/ enifed('ember-debug/deprecation-manager', ['exports', 'ember-metal/dictionary', 'ember-metal/utils'], function (exports, _emberMetalDictionary, _emberMetalUtils) { + 'use strict'; + var deprecationLevels = { RAISE: _emberMetalUtils.symbol('RAISE'), LOG: _emberMetalUtils.symbol('LOG'), SILENCE: _emberMetalUtils.symbol('SILENCE') }; @@ -5594,19 +5641,22 @@ return level; } }; }); enifed("ember-extension-support", ["exports", "ember-metal/core", "ember-extension-support/data_adapter", "ember-extension-support/container_debug_adapter"], function (exports, _emberMetalCore, _emberExtensionSupportData_adapter, _emberExtensionSupportContainer_debug_adapter) { + /** + @module ember + @submodule ember-extension-support + */ + "use strict"; + _emberMetalCore["default"].DataAdapter = _emberExtensionSupportData_adapter["default"]; _emberMetalCore["default"].ContainerDebugAdapter = _emberExtensionSupportContainer_debug_adapter["default"]; }); -/** -@module ember -@submodule ember-extension-support -*/ enifed("ember-extension-support/container_debug_adapter", ["exports", "ember-metal/core", "ember-runtime/system/native_array", "ember-runtime/utils", "ember-runtime/system/string", "ember-runtime/system/namespace", "ember-runtime/system/object"], function (exports, _emberMetalCore, _emberRuntimeSystemNative_array, _emberRuntimeUtils, _emberRuntimeSystemString, _emberRuntimeSystemNamespace, _emberRuntimeSystemObject) { + "use strict"; /** @module ember @submodule ember-extension-support */ @@ -5674,11 +5724,11 @@ @param {String} type The type. e.g. "model", "controller", "route" @return {boolean} whether a list is available for this type. @public */ canCatalogEntriesByType: function (type) { - if (type === "model" || type === "template") { + if (type === 'model' || type === 'template') { return false; } return true; }, @@ -5701,22 +5751,23 @@ if (!namespace.hasOwnProperty(key)) { continue; } if (typeSuffixRegex.test(key)) { var klass = namespace[key]; - if (_emberRuntimeUtils.typeOf(klass) === "class") { - types.push(_emberRuntimeSystemString.dasherize(key.replace(typeSuffixRegex, ""))); + if (_emberRuntimeUtils.typeOf(klass) === 'class') { + types.push(_emberRuntimeSystemString.dasherize(key.replace(typeSuffixRegex, ''))); } } } } }); return types; } }); }); enifed("ember-extension-support/data_adapter", ["exports", "ember-metal/property_get", "ember-metal/run_loop", "ember-runtime/system/string", "ember-runtime/system/namespace", "ember-runtime/system/object", "ember-runtime/system/native_array", "ember-application/system/application"], function (exports, _emberMetalProperty_get, _emberMetalRun_loop, _emberRuntimeSystemString, _emberRuntimeSystemNamespace, _emberRuntimeSystemObject, _emberRuntimeSystemNative_array, _emberApplicationSystemApplication) { + "use strict"; /** @module ember @submodule ember-extension-support */ @@ -5870,11 +5921,11 @@ this.releaseMethods.pushObject(release); return release; }, _nameToClass: function (type) { - if (typeof type === "string") { + if (typeof type === 'string') { type = this.container.lookupFactory("model:" + type); } return type; }, @@ -6001,11 +6052,11 @@ var onChange = function () { typesUpdated([_this3.wrapModelType(klass, modelName)]); }; var observer = { didChange: function () { - _emberMetalRun_loop["default"].scheduleOnce("actions", this, onChange); + _emberMetalRun_loop["default"].scheduleOnce('actions', this, onChange); }, willChange: function () { return this; } }; @@ -6039,11 +6090,11 @@ var records = this.getRecords(klass, name); var typeToSend; typeToSend = { name: name, - count: _emberMetalProperty_get.get(records, "length"), + count: _emberMetalProperty_get.get(records, 'length'), columns: this.columnsForType(klass), object: klass }; return typeToSend; @@ -6056,15 +6107,15 @@ @return {Array} Array of model types */ getModelTypes: function () { var _this4 = this; - var containerDebugAdapter = this.get("containerDebugAdapter"); + var containerDebugAdapter = this.get('containerDebugAdapter'); var types; - if (containerDebugAdapter.canCatalogEntriesByType("model")) { - types = containerDebugAdapter.catalogEntriesByType("model"); + if (containerDebugAdapter.canCatalogEntriesByType('model')) { + types = containerDebugAdapter.catalogEntriesByType('model'); } else { types = this._getObjectsOnNamespaces(); } // New adapters return strings instead of classes @@ -6204,27 +6255,52 @@ return function () {}; } }); }); enifed("ember-htmlbars", ["exports", "ember-metal/core", "ember-template-compiler", "ember-htmlbars/system/make-view-helper", "ember-htmlbars/system/make_bound_helper", "ember-htmlbars/helpers", "ember-htmlbars/helpers/if_unless", "ember-htmlbars/helpers/with", "ember-htmlbars/helpers/loc", "ember-htmlbars/helpers/log", "ember-htmlbars/helpers/each", "ember-htmlbars/helpers/-bind-attr-class", "ember-htmlbars/helpers/-normalize-class", "ember-htmlbars/helpers/-concat", "ember-htmlbars/helpers/-join-classes", "ember-htmlbars/helpers/-legacy-each-with-controller", "ember-htmlbars/helpers/-legacy-each-with-keyword", "ember-htmlbars/helpers/-html-safe", "ember-htmlbars/system/dom-helper", "ember-htmlbars/helper", "ember-htmlbars/system/bootstrap", "ember-htmlbars/compat"], function (exports, _emberMetalCore, _emberTemplateCompiler, _emberHtmlbarsSystemMakeViewHelper, _emberHtmlbarsSystemMake_bound_helper, _emberHtmlbarsHelpers, _emberHtmlbarsHelpersIf_unless, _emberHtmlbarsHelpersWith, _emberHtmlbarsHelpersLoc, _emberHtmlbarsHelpersLog, _emberHtmlbarsHelpersEach, _emberHtmlbarsHelpersBindAttrClass, _emberHtmlbarsHelpersNormalizeClass, _emberHtmlbarsHelpersConcat, _emberHtmlbarsHelpersJoinClasses, _emberHtmlbarsHelpersLegacyEachWithController, _emberHtmlbarsHelpersLegacyEachWithKeyword, _emberHtmlbarsHelpersHtmlSafe, _emberHtmlbarsSystemDomHelper, _emberHtmlbarsHelper, _emberHtmlbarsSystemBootstrap, _emberHtmlbarsCompat) { + /** + + &nbsp; + + @module ember + @submodule ember-templates + @main ember-templates + @public + */ - _emberHtmlbarsHelpers.registerHelper("if", _emberHtmlbarsHelpersIf_unless.ifHelper); - _emberHtmlbarsHelpers.registerHelper("unless", _emberHtmlbarsHelpersIf_unless.unlessHelper); - _emberHtmlbarsHelpers.registerHelper("with", _emberHtmlbarsHelpersWith["default"]); - _emberHtmlbarsHelpers.registerHelper("loc", _emberHtmlbarsHelpersLoc["default"]); - _emberHtmlbarsHelpers.registerHelper("log", _emberHtmlbarsHelpersLog["default"]); - _emberHtmlbarsHelpers.registerHelper("each", _emberHtmlbarsHelpersEach["default"]); - _emberHtmlbarsHelpers.registerHelper("-bind-attr-class", _emberHtmlbarsHelpersBindAttrClass["default"]); - _emberHtmlbarsHelpers.registerHelper("-normalize-class", _emberHtmlbarsHelpersNormalizeClass["default"]); - _emberHtmlbarsHelpers.registerHelper("concat", _emberHtmlbarsHelpersConcat["default"]); - _emberHtmlbarsHelpers.registerHelper("-join-classes", _emberHtmlbarsHelpersJoinClasses["default"]); - _emberHtmlbarsHelpers.registerHelper("-legacy-each-with-controller", _emberHtmlbarsHelpersLegacyEachWithController["default"]); - _emberHtmlbarsHelpers.registerHelper("-legacy-each-with-keyword", _emberHtmlbarsHelpersLegacyEachWithKeyword["default"]); - _emberHtmlbarsHelpers.registerHelper("-html-safe", _emberHtmlbarsHelpersHtmlSafe["default"]); + /** + + [HTMLBars](https://github.com/tildeio/htmlbars) is a [Handlebars](http://handlebarsjs.com/) + compatible templating engine used by Ember.js. The classes and namespaces + covered by this documentation attempt to focus on APIs for interacting + with HTMLBars itself. For more general guidance on Ember.js templates and + helpers, please see the [ember-templates](/api/modules/ember-templates.html) + package. + + @module ember + @submodule ember-htmlbars + @main ember-htmlbars + @public + */ + "use strict"; + _emberHtmlbarsHelpers.registerHelper('if', _emberHtmlbarsHelpersIf_unless.ifHelper); + _emberHtmlbarsHelpers.registerHelper('unless', _emberHtmlbarsHelpersIf_unless.unlessHelper); + _emberHtmlbarsHelpers.registerHelper('with', _emberHtmlbarsHelpersWith["default"]); + _emberHtmlbarsHelpers.registerHelper('loc', _emberHtmlbarsHelpersLoc["default"]); + _emberHtmlbarsHelpers.registerHelper('log', _emberHtmlbarsHelpersLog["default"]); + _emberHtmlbarsHelpers.registerHelper('each', _emberHtmlbarsHelpersEach["default"]); + _emberHtmlbarsHelpers.registerHelper('-bind-attr-class', _emberHtmlbarsHelpersBindAttrClass["default"]); + _emberHtmlbarsHelpers.registerHelper('-normalize-class', _emberHtmlbarsHelpersNormalizeClass["default"]); + _emberHtmlbarsHelpers.registerHelper('concat', _emberHtmlbarsHelpersConcat["default"]); + _emberHtmlbarsHelpers.registerHelper('-join-classes', _emberHtmlbarsHelpersJoinClasses["default"]); + _emberHtmlbarsHelpers.registerHelper('-legacy-each-with-controller', _emberHtmlbarsHelpersLegacyEachWithController["default"]); + _emberHtmlbarsHelpers.registerHelper('-legacy-each-with-keyword', _emberHtmlbarsHelpersLegacyEachWithKeyword["default"]); + _emberHtmlbarsHelpers.registerHelper('-html-safe', _emberHtmlbarsHelpersHtmlSafe["default"]); + _emberMetalCore["default"].HTMLBars = { - _registerHelper: _emberHtmlbarsHelpers.registerHelper, + _registerHelper: _emberHtmlbarsHelpers.deprecatedRegisterHelper, template: _emberTemplateCompiler.template, compile: _emberTemplateCompiler.compile, precompile: _emberTemplateCompiler.precompile, makeViewHelper: _emberHtmlbarsSystemMakeViewHelper["default"], makeBoundHelper: _emberHtmlbarsSystemMake_bound_helper["default"], @@ -6235,41 +6311,18 @@ _emberHtmlbarsHelper["default"].helper = _emberHtmlbarsHelper.helper; _emberMetalCore["default"].Helper = _emberHtmlbarsHelper["default"]; }); -/** - &nbsp; - - @module ember - @submodule ember-templates - @main ember-templates - @public -*/ - -/** - - [HTMLBars](https://github.com/tildeio/htmlbars) is a [Handlebars](http://handlebarsjs.com/) - compatible templating engine used by Ember.js. The classes and namespaces - covered by this documentation attempt to focus on APIs for interacting - with HTMLBars itself. For more general guidance on Ember.js templates and - helpers, please see the [ember-templates](/api/modules/ember-templates.html) - package. - - @module ember - @submodule ember-htmlbars - @main ember-htmlbars - @public -*/ - // importing adds template bootstrapping // initializer to enable embedded templates // importing ember-htmlbars/compat updates the // Ember.Handlebars global if htmlbars is enabled enifed("ember-htmlbars/compat", ["exports", "ember-metal/core", "ember-htmlbars/helpers", "ember-htmlbars/compat/helper", "ember-htmlbars/compat/handlebars-get", "ember-htmlbars/compat/make-bound-helper", "ember-htmlbars/compat/register-bound-helper", "ember-htmlbars/system/make-view-helper", "ember-htmlbars/utils/string"], function (exports, _emberMetalCore, _emberHtmlbarsHelpers, _emberHtmlbarsCompatHelper, _emberHtmlbarsCompatHandlebarsGet, _emberHtmlbarsCompatMakeBoundHelper, _emberHtmlbarsCompatRegisterBoundHelper, _emberHtmlbarsSystemMakeViewHelper, _emberHtmlbarsUtilsString) { + "use strict"; var EmberHandlebars = _emberMetalCore["default"].Handlebars = _emberMetalCore["default"].Handlebars || {}; EmberHandlebars.helpers = _emberHtmlbarsHelpers["default"]; EmberHandlebars.helper = _emberHtmlbarsCompatHelper.handlebarsHelper; EmberHandlebars.registerHelper = _emberHtmlbarsCompatHelper.registerHandlebarsCompatibleHelper; @@ -6284,11 +6337,10 @@ }; exports["default"] = EmberHandlebars; }); enifed('ember-htmlbars/compat/handlebars-get', ['exports'], function (exports) { - exports["default"] = handlebarsGet; /** @module ember @submodule ember-htmlbars */ @@ -6303,26 +6355,36 @@ @param {String} path The path to be lookedup @param {Object} options The template's option hash @deprecated @public */ + 'use strict'; + exports["default"] = handlebarsGet; + function handlebarsGet(root, path, options) { Ember.deprecate('Usage of Ember.Handlebars.get is deprecated, use a Component or Ember.Handlebars.makeBoundHelper instead.'); return options.legacyGetPath(path); } }); enifed("ember-htmlbars/compat/helper", ["exports", "ember-htmlbars/helpers", "ember-views/views/view", "ember-views/views/component", "ember-htmlbars/system/make-view-helper", "ember-htmlbars/compat/make-bound-helper", "ember-metal/streams/utils", "ember-htmlbars/keywords"], function (exports, _emberHtmlbarsHelpers, _emberViewsViewsView, _emberViewsViewsComponent, _emberHtmlbarsSystemMakeViewHelper, _emberHtmlbarsCompatMakeBoundHelper, _emberMetalStreamsUtils, _emberHtmlbarsKeywords) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports.registerHandlebarsCompatibleHelper = registerHandlebarsCompatibleHelper; exports.handlebarsHelper = handlebarsHelper; var slice = [].slice; function calculateCompatType(item) { if (_emberMetalStreamsUtils.isStream(item)) { - return "ID"; + return 'ID'; } else { var itemType = typeof item; return itemType.toUpperCase(); } @@ -6331,11 +6393,11 @@ function pathFor(param) { if (_emberMetalStreamsUtils.isStream(param)) { // param arguments to helpers may have their path prefixes with self. For // example {{box-thing foo}} may have a param path of `self.foo` depending // on scope. - if (param.source && param.source.dependee && param.source.dependee.label === "self") { + if (param.source && param.source.dependee && param.source.dependee.label === 'self') { return param.path.slice(5); } else { return param.path; } } else { @@ -6414,15 +6476,17 @@ HandlebarsCompatibleHelper.prototype = { preprocessArguments: function () {} }; function registerHandlebarsCompatibleHelper(name, value) { + Ember.deprecate('Ember.Handlebars.registerHelper is deprecated, please refactor to Ember.Helper.helper.', false, { id: 'ember-htmlbars.handlebars-register-helper', until: '2.0.0' }); + if (value && value.isLegacyViewHelper) { _emberHtmlbarsKeywords.registerKeyword(name, function (morph, env, scope, params, hash, template, inverse, visitor) { Ember.assert("You can only pass attributes (such as name=value) not bare " + "values to a helper for a View found in '" + value.viewClass + "'", params.length === 0); - env.hooks.keyword("view", morph, env, scope, [value.viewClass], hash, template, inverse, visitor); + env.hooks.keyword('view', morph, env, scope, [value.viewClass], hash, template, inverse, visitor); return true; }); return; } @@ -6436,10 +6500,12 @@ _emberHtmlbarsHelpers["default"][name] = helper; } function handlebarsHelper(name, value) { + Ember.deprecate('Ember.Handlebars.helper is deprecated, please refactor to Ember.Helper.helper', false, { id: 'ember-htmlbars.handlebars-helper', until: '2.0.0' }); + Ember.assert("You tried to register a component named '" + name + "', but component names must include a '-'", !_emberViewsViewsComponent["default"].detect(value) || name.match(/-/)); if (_emberViewsViewsView["default"].detect(value)) { _emberHtmlbarsHelpers["default"][name] = _emberHtmlbarsSystemMakeViewHelper["default"](value); } else { @@ -6461,17 +6527,16 @@ } } exports["default"] = HandlebarsCompatibleHelper; }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/compat/make-bound-helper", ["exports", "ember-metal/streams/utils"], function (exports, _emberMetalStreamsUtils) { - exports["default"] = makeBoundHelper; + "use strict"; + exports.makeBoundHelper = makeBoundHelper; + exports["default"] = deprecatedMakeBoundHelper; + /** @module ember @submodule ember-htmlbars */ @@ -6533,14 +6598,32 @@ args.push({ hash: _emberMetalStreamsUtils.readHash(hash), templates: templates, data: { properties: properties } }); return fn.apply(undefined, args); } }; } + + function deprecatedMakeBoundHelper(fn) { + for (var _len2 = arguments.length, dependentKeys = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + dependentKeys[_key2 - 1] = arguments[_key2]; + } + + Ember.deprecate('Using Ember.Handlebars.makeBoundHelper is deprecated. Please refactor to using `Ember.Helper.helper`.', false, { id: 'ember-htmlbars.handlebars-make-bound-helper', until: '2.0.0' }); + + return makeBoundHelper.apply(undefined, arguments); + } }); -enifed("ember-htmlbars/compat/register-bound-helper", ["exports", "ember-htmlbars/helpers", "ember-htmlbars/compat/make-bound-helper"], function (exports, _emberHtmlbarsHelpers, _emberHtmlbarsCompatMakeBoundHelper) { - exports["default"] = registerBoundHelper; +enifed('ember-htmlbars/compat/register-bound-helper', ['exports', 'ember-metal/core', 'ember-htmlbars/helpers', 'ember-htmlbars/compat/make-bound-helper'], function (exports, _emberMetalCore, _emberHtmlbarsHelpers, _emberHtmlbarsCompatMakeBoundHelper) { + /** + @module ember + @submodule ember-htmlbars + */ + 'use strict'; + + exports.registerBoundHelper = registerBoundHelper; + exports["default"] = deprecatedRegisterBoundHelper; + var slice = [].slice; /** Register a bound handlebars helper. Bound helpers behave similarly to regular handlebars helpers, with the added ability to re-render when the underlying data @@ -6652,20 +6735,23 @@ @private */ function registerBoundHelper(name, fn) { var boundHelperArgs = slice.call(arguments, 1); - var boundFn = _emberHtmlbarsCompatMakeBoundHelper["default"].apply(this, boundHelperArgs); + var boundFn = _emberHtmlbarsCompatMakeBoundHelper.makeBoundHelper.apply(this, boundHelperArgs); _emberHtmlbarsHelpers["default"][name] = boundFn; } + + function deprecatedRegisterBoundHelper() { + _emberMetalCore["default"].deprecate('`Ember.Handlebars.registerBoundHelper` is deprecated. Please refactor to use `Ember.Helpers.helper`.', false, { id: 'ember-htmlbars.register-bound-helper', until: '2.0.0' }); + + return registerBoundHelper.apply(undefined, arguments); + } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/env", ["exports", "ember-metal/environment", "htmlbars-runtime", "ember-metal/merge", "ember-htmlbars/hooks/subexpr", "ember-htmlbars/hooks/concat", "ember-htmlbars/hooks/link-render-node", "ember-htmlbars/hooks/create-fresh-scope", "ember-htmlbars/hooks/bind-shadow-scope", "ember-htmlbars/hooks/bind-self", "ember-htmlbars/hooks/bind-scope", "ember-htmlbars/hooks/bind-local", "ember-htmlbars/hooks/update-self", "ember-htmlbars/hooks/get-root", "ember-htmlbars/hooks/get-child", "ember-htmlbars/hooks/get-value", "ember-htmlbars/hooks/get-cell-or-value", "ember-htmlbars/hooks/cleanup-render-node", "ember-htmlbars/hooks/destroy-render-node", "ember-htmlbars/hooks/did-render-node", "ember-htmlbars/hooks/will-cleanup-tree", "ember-htmlbars/hooks/did-cleanup-tree", "ember-htmlbars/hooks/classify", "ember-htmlbars/hooks/component", "ember-htmlbars/hooks/lookup-helper", "ember-htmlbars/hooks/has-helper", "ember-htmlbars/hooks/invoke-helper", "ember-htmlbars/hooks/element", "ember-htmlbars/helpers", "ember-htmlbars/keywords", "ember-htmlbars/system/dom-helper", "ember-htmlbars/keywords/debugger", "ember-htmlbars/keywords/with", "ember-htmlbars/keywords/outlet", "ember-htmlbars/keywords/real_outlet", "ember-htmlbars/keywords/customized_outlet", "ember-htmlbars/keywords/unbound", "ember-htmlbars/keywords/view", "ember-htmlbars/keywords/component", "ember-htmlbars/keywords/partial", "ember-htmlbars/keywords/input", "ember-htmlbars/keywords/textarea", "ember-htmlbars/keywords/collection", "ember-htmlbars/keywords/template", "ember-htmlbars/keywords/legacy-yield", "ember-htmlbars/keywords/mut", "ember-htmlbars/keywords/each", "ember-htmlbars/keywords/readonly"], function (exports, _emberMetalEnvironment, _htmlbarsRuntime, _emberMetalMerge, _emberHtmlbarsHooksSubexpr, _emberHtmlbarsHooksConcat, _emberHtmlbarsHooksLinkRenderNode, _emberHtmlbarsHooksCreateFreshScope, _emberHtmlbarsHooksBindShadowScope, _emberHtmlbarsHooksBindSelf, _emberHtmlbarsHooksBindScope, _emberHtmlbarsHooksBindLocal, _emberHtmlbarsHooksUpdateSelf, _emberHtmlbarsHooksGetRoot, _emberHtmlbarsHooksGetChild, _emberHtmlbarsHooksGetValue, _emberHtmlbarsHooksGetCellOrValue, _emberHtmlbarsHooksCleanupRenderNode, _emberHtmlbarsHooksDestroyRenderNode, _emberHtmlbarsHooksDidRenderNode, _emberHtmlbarsHooksWillCleanupTree, _emberHtmlbarsHooksDidCleanupTree, _emberHtmlbarsHooksClassify, _emberHtmlbarsHooksComponent, _emberHtmlbarsHooksLookupHelper, _emberHtmlbarsHooksHasHelper, _emberHtmlbarsHooksInvokeHelper, _emberHtmlbarsHooksElement, _emberHtmlbarsHelpers, _emberHtmlbarsKeywords, _emberHtmlbarsSystemDomHelper, _emberHtmlbarsKeywordsDebugger, _emberHtmlbarsKeywordsWith, _emberHtmlbarsKeywordsOutlet, _emberHtmlbarsKeywordsReal_outlet, _emberHtmlbarsKeywordsCustomized_outlet, _emberHtmlbarsKeywordsUnbound, _emberHtmlbarsKeywordsView, _emberHtmlbarsKeywordsComponent, _emberHtmlbarsKeywordsPartial, _emberHtmlbarsKeywordsInput, _emberHtmlbarsKeywordsTextarea, _emberHtmlbarsKeywordsCollection, _emberHtmlbarsKeywordsTemplate, _emberHtmlbarsKeywordsLegacyYield, _emberHtmlbarsKeywordsMut, _emberHtmlbarsKeywordsEach, _emberHtmlbarsKeywordsReadonly) { + "use strict"; var emberHooks = _emberMetalMerge["default"]({}, _htmlbarsRuntime.hooks); emberHooks.keywords = _emberHtmlbarsKeywords["default"]; _emberMetalMerge["default"](emberHooks, { @@ -6693,28 +6779,28 @@ hasHelper: _emberHtmlbarsHooksHasHelper["default"], invokeHelper: _emberHtmlbarsHooksInvokeHelper["default"], element: _emberHtmlbarsHooksElement["default"] }); - _emberHtmlbarsKeywords.registerKeyword("debugger", _emberHtmlbarsKeywordsDebugger["default"]); - _emberHtmlbarsKeywords.registerKeyword("with", _emberHtmlbarsKeywordsWith["default"]); - _emberHtmlbarsKeywords.registerKeyword("outlet", _emberHtmlbarsKeywordsOutlet["default"]); - _emberHtmlbarsKeywords.registerKeyword("@real_outlet", _emberHtmlbarsKeywordsReal_outlet["default"]); - _emberHtmlbarsKeywords.registerKeyword("@customized_outlet", _emberHtmlbarsKeywordsCustomized_outlet["default"]); - _emberHtmlbarsKeywords.registerKeyword("unbound", _emberHtmlbarsKeywordsUnbound["default"]); - _emberHtmlbarsKeywords.registerKeyword("view", _emberHtmlbarsKeywordsView["default"]); - _emberHtmlbarsKeywords.registerKeyword("component", _emberHtmlbarsKeywordsComponent["default"]); - _emberHtmlbarsKeywords.registerKeyword("partial", _emberHtmlbarsKeywordsPartial["default"]); - _emberHtmlbarsKeywords.registerKeyword("template", _emberHtmlbarsKeywordsTemplate["default"]); - _emberHtmlbarsKeywords.registerKeyword("input", _emberHtmlbarsKeywordsInput["default"]); - _emberHtmlbarsKeywords.registerKeyword("textarea", _emberHtmlbarsKeywordsTextarea["default"]); - _emberHtmlbarsKeywords.registerKeyword("collection", _emberHtmlbarsKeywordsCollection["default"]); - _emberHtmlbarsKeywords.registerKeyword("legacy-yield", _emberHtmlbarsKeywordsLegacyYield["default"]); - _emberHtmlbarsKeywords.registerKeyword("mut", _emberHtmlbarsKeywordsMut["default"]); - _emberHtmlbarsKeywords.registerKeyword("@mut", _emberHtmlbarsKeywordsMut.privateMut); - _emberHtmlbarsKeywords.registerKeyword("each", _emberHtmlbarsKeywordsEach["default"]); - _emberHtmlbarsKeywords.registerKeyword("readonly", _emberHtmlbarsKeywordsReadonly["default"]); + _emberHtmlbarsKeywords.registerKeyword('debugger', _emberHtmlbarsKeywordsDebugger["default"]); + _emberHtmlbarsKeywords.registerKeyword('with', _emberHtmlbarsKeywordsWith["default"]); + _emberHtmlbarsKeywords.registerKeyword('outlet', _emberHtmlbarsKeywordsOutlet["default"]); + _emberHtmlbarsKeywords.registerKeyword('@real_outlet', _emberHtmlbarsKeywordsReal_outlet["default"]); + _emberHtmlbarsKeywords.registerKeyword('@customized_outlet', _emberHtmlbarsKeywordsCustomized_outlet["default"]); + _emberHtmlbarsKeywords.registerKeyword('unbound', _emberHtmlbarsKeywordsUnbound["default"]); + _emberHtmlbarsKeywords.registerKeyword('view', _emberHtmlbarsKeywordsView["default"]); + _emberHtmlbarsKeywords.registerKeyword('component', _emberHtmlbarsKeywordsComponent["default"]); + _emberHtmlbarsKeywords.registerKeyword('partial', _emberHtmlbarsKeywordsPartial["default"]); + _emberHtmlbarsKeywords.registerKeyword('template', _emberHtmlbarsKeywordsTemplate["default"]); + _emberHtmlbarsKeywords.registerKeyword('input', _emberHtmlbarsKeywordsInput["default"]); + _emberHtmlbarsKeywords.registerKeyword('textarea', _emberHtmlbarsKeywordsTextarea["default"]); + _emberHtmlbarsKeywords.registerKeyword('collection', _emberHtmlbarsKeywordsCollection["default"]); + _emberHtmlbarsKeywords.registerKeyword('legacy-yield', _emberHtmlbarsKeywordsLegacyYield["default"]); + _emberHtmlbarsKeywords.registerKeyword('mut', _emberHtmlbarsKeywordsMut["default"]); + _emberHtmlbarsKeywords.registerKeyword('@mut', _emberHtmlbarsKeywordsMut.privateMut); + _emberHtmlbarsKeywords.registerKeyword('each', _emberHtmlbarsKeywordsEach["default"]); + _emberHtmlbarsKeywords.registerKeyword('readonly', _emberHtmlbarsKeywordsReadonly["default"]); exports["default"] = { hooks: emberHooks, helpers: _emberHtmlbarsHelpers["default"], useFragmentCache: true @@ -6723,10 +6809,17 @@ var domHelper = _emberMetalEnvironment["default"].hasDOM ? new _emberHtmlbarsSystemDomHelper["default"]() : null; exports.domHelper = domHelper; }); enifed('ember-htmlbars/helper', ['exports', 'ember-runtime/system/object'], function (exports, _emberRuntimeSystemObject) { + /** + @module ember + @submodule ember-templates + */ + + 'use strict'; + exports.helper = helper; /** Ember Helpers are functions that can compute values, and are used in templates. For example, this code calls a helper named `format-currency`: @@ -6833,15 +6926,18 @@ }; } exports["default"] = Helper; }); -/** -@module ember -@submodule ember-templates -*/ -enifed("ember-htmlbars/helpers", ["exports", "ember-metal/platform/create"], function (exports, _emberMetalPlatformCreate) { +enifed('ember-htmlbars/helpers', ['exports', 'ember-metal/platform/create', 'ember-metal/core'], function (exports, _emberMetalPlatformCreate, _emberMetalCore) { + /** + @module ember + @submodule ember-htmlbars + */ + + 'use strict'; + exports.registerHelper = registerHelper; /** @private @property helpers @@ -6863,17 +6959,23 @@ function registerHelper(name, helperFunc) { helpers[name] = helperFunc; } + var deprecatedRegisterHelper = _emberMetalCore["default"].deprecateFunc('Using Ember.HTMLBars._registerHelper is deprecated. Helpers (even dashless ones) are automatically resolved.', { id: 'ember-htmlbars.register-helper', until: '2.0.0' }, registerHelper); + + exports.deprecatedRegisterHelper = deprecatedRegisterHelper; exports["default"] = helpers; }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed('ember-htmlbars/helpers/-bind-attr-class', ['exports', 'ember-metal/property_get', 'ember-metal/utils'], function (exports, _emberMetalProperty_get, _emberMetalUtils) { + /** + @module ember + @submodule ember-htmlbars + */ + + 'use strict'; + exports["default"] = bindAttrClassHelper; function bindAttrClassHelper(params) { var value = params[0]; @@ -6882,22 +6984,17 @@ } if (value === true) { return params[1]; }if (value === false || value === undefined || value === null) { - return ''; + return ""; } else { return value; } } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed('ember-htmlbars/helpers/-concat', ['exports'], function (exports) { - exports["default"] = concat; /** Concatenates input params together. Example: @@ -6909,16 +7006,21 @@ @public @method concat @for Ember.HTMLBars */ + 'use strict'; + exports["default"] = concat; + function concat(params) { return params.join(''); } }); enifed("ember-htmlbars/helpers/-html-safe", ["exports", "htmlbars-util/safe-string"], function (exports, _htmlbarsUtilSafeString) { + "use strict"; + exports["default"] = htmlSafeHelper; /** This private helper is used internally to handle `isVisible: false` for Ember.View and Ember.Component. @@ -6931,17 +7033,20 @@ return new _htmlbarsUtilSafeString["default"](value); } }); enifed('ember-htmlbars/helpers/-join-classes', ['exports'], function (exports) { - exports["default"] = joinClasses; /* this private helper is used to join and compact a list of class names @private */ + 'use strict'; + + exports["default"] = joinClasses; + function joinClasses(classNames) { var result = []; for (var i = 0, l = classNames.length; i < l; i++) { var className = classNames[i]; @@ -6952,18 +7057,20 @@ return result.join(' '); } }); enifed("ember-htmlbars/helpers/-legacy-each-with-controller", ["exports", "ember-metal/property_get", "ember-metal/enumerable_utils", "ember-htmlbars/utils/normalize-self", "ember-htmlbars/utils/decode-each-key"], function (exports, _emberMetalProperty_get, _emberMetalEnumerable_utils, _emberHtmlbarsUtilsNormalizeSelf, _emberHtmlbarsUtilsDecodeEachKey) { + "use strict"; + exports["default"] = legacyEachWithControllerHelper; function legacyEachWithControllerHelper(params, hash, blocks) { var list = params[0]; var keyPath = hash.key; // TODO: Correct falsy semantics - if (!list || _emberMetalProperty_get.get(list, "length") === 0) { + if (!list || _emberMetalProperty_get.get(list, 'length') === 0) { if (blocks.inverse.yield) { blocks.inverse.yield(); } return; } @@ -6992,16 +7099,18 @@ var deprecation = "Using the context switching form of {{each}} is deprecated. Please use the keyword form (`{{#each items as |item|}}`) instead."; exports.deprecation = deprecation; }); enifed("ember-htmlbars/helpers/-legacy-each-with-keyword", ["exports", "ember-metal/enumerable_utils", "ember-views/streams/should_display", "ember-htmlbars/utils/decode-each-key"], function (exports, _emberMetalEnumerable_utils, _emberViewsStreamsShould_display, _emberHtmlbarsUtilsDecodeEachKey) { + "use strict"; + exports["default"] = legacyEachWithKeywordHelper; function legacyEachWithKeywordHelper(params, hash, blocks) { var list = params[0]; var keyPath = hash.key; - var legacyKeyword = hash["-legacy-keyword"]; + var legacyKeyword = hash['-legacy-keyword']; if (_emberViewsStreamsShould_display["default"](list)) { _emberMetalEnumerable_utils.forEach(list, function (item, i) { var self; if (legacyKeyword) { @@ -7026,10 +7135,12 @@ var deprecation = "Using the context switching form of {{each}} is deprecated. Please use the keyword form (`{{#each items as |item|}}`) instead."; exports.deprecation = deprecation; }); enifed("ember-htmlbars/helpers/-normalize-class", ["exports", "ember-runtime/system/string", "ember-metal/path_cache"], function (exports, _emberRuntimeSystemString, _emberMetalPath_cache) { + "use strict"; + exports["default"] = normalizeClass; /* This private helper is used by ComponentNode to convert the classNameBindings microsyntax into a class name. @@ -7042,45 +7153,47 @@ function normalizeClass(params, hash) { var propName = params[0]; var value = params[1]; var activeClass = hash.activeClass; - var inactiveClass = hash.inactiveClass; // When using the colon syntax, evaluate the truthiness or falsiness // of the value to determine which className to return + var inactiveClass = hash.inactiveClass; if (activeClass || inactiveClass) { if (!!value) { return activeClass; } else { return inactiveClass; } // If value is a Boolean and true, return the dasherized property // name. } else if (value === true) { - // Only apply to last segment in the path - if (propName && _emberMetalPath_cache.isPath(propName)) { - var segments = propName.split("."); - propName = segments[segments.length - 1]; - } + // Only apply to last segment in the path + if (propName && _emberMetalPath_cache.isPath(propName)) { + var segments = propName.split('.'); + propName = segments[segments.length - 1]; + } - return _emberRuntimeSystemString.dasherize(propName); + return _emberRuntimeSystemString.dasherize(propName); - // If the value is not false, undefined, or null, return the current - // value of the property. - } else if (value !== false && value != null) { - return value; + // If the value is not false, undefined, or null, return the current + // value of the property. + } else if (value !== false && value != null) { + return value; - // Nothing to display. Return null so that the old class is removed - // but no new class is added. - } else { - return null; - } + // Nothing to display. Return null so that the old class is removed + // but no new class is added. + } else { + return null; + } } }); -enifed("ember-htmlbars/helpers/bind-attr", ["exports"], function (exports) {}); +enifed("ember-htmlbars/helpers/bind-attr", ["exports"], function (exports) { + "use strict"; +}); /** @module ember @submodule ember-htmlbars */ @@ -7219,11 +7332,13 @@ @param {Function} context @param {Object} options @return {String} HTML string @public */ -enifed('ember-htmlbars/helpers/each', ['exports', 'ember-metal/core', 'ember-metal/error', 'ember-metal/enumerable_utils', 'ember-htmlbars/utils/normalize-self', 'ember-views/streams/should_display', 'ember-htmlbars/utils/decode-each-key'], function (exports, _emberMetalCore, _emberMetalError, _emberMetalEnumerable_utils, _emberHtmlbarsUtilsNormalizeSelf, _emberViewsStreamsShould_display, _emberHtmlbarsUtilsDecodeEachKey) { +enifed("ember-htmlbars/helpers/each", ["exports", "ember-metal/enumerable_utils", "ember-htmlbars/utils/normalize-self", "ember-views/streams/should_display", "ember-htmlbars/utils/decode-each-key"], function (exports, _emberMetalEnumerable_utils, _emberHtmlbarsUtilsNormalizeSelf, _emberViewsStreamsShould_display, _emberHtmlbarsUtilsDecodeEachKey) { + "use strict"; + exports["default"] = eachHelper; /** The `{{#each}}` helper loops over elements in a collection. It is an extension of the base Handlebars `{{#each}}` helper. @@ -7295,41 +7410,40 @@ function eachHelper(params, hash, blocks) { var list = params[0]; var keyPath = hash.key; if (blocks.template.arity === 0) { - _emberMetalCore["default"].deprecate(deprecation); + Ember.deprecate(deprecation); } if (_emberViewsStreamsShould_display["default"](list)) { - (function () { - var seenKeys = {}; - _emberMetalEnumerable_utils.forEach(list, function (item, i) { - var self; - if (blocks.template.arity === 0) { - self = _emberHtmlbarsUtilsNormalizeSelf["default"](item); - } + _emberMetalEnumerable_utils.forEach(list, function (item, i) { + var self; + if (blocks.template.arity === 0) { + self = _emberHtmlbarsUtilsNormalizeSelf["default"](item); + } - var key = _emberHtmlbarsUtilsDecodeEachKey["default"](item, keyPath, i); - if (seenKeys[key] === true) { - throw new _emberMetalError["default"]('Duplicate key found (\'' + key + '\') for \'{{each}}\' helper, please use a unique key or switch to \'{{#each model key="@index"}}{{/each}}\'.'); - } else { - seenKeys[key] = true; - } - blocks.template.yieldItem(key, [item, i], self); - }); - })(); + var key = _emberHtmlbarsUtilsDecodeEachKey["default"](item, keyPath, i); + + blocks.template.yieldItem(key, [item, i], self); + }); } else if (blocks.inverse.yield) { blocks.inverse.yield(); } } - var deprecation = 'Using the context switching form of {{each}} is deprecated. Please use the keyword form (`{{#each items as |item|}}`) instead.'; + var deprecation = "Using the context switching form of {{each}} is deprecated. Please use the keyword form (`{{#each items as |item|}}`) instead."; exports.deprecation = deprecation; }); enifed("ember-htmlbars/helpers/if_unless", ["exports", "ember-metal/core", "ember-views/streams/should_display"], function (exports, _emberMetalCore, _emberViewsStreamsShould_display) { + /** + @module ember + @submodule ember-templates + */ + "use strict"; + /** Use the `if` block helper to conditionally render a block depending on a property. If the property is "falsey", for example: `false`, `undefined `null`, `""`, `0` or an empty array, the block will not be rendered. @@ -7422,17 +7536,14 @@ } exports.ifHelper = ifHelper; exports.unlessHelper = unlessHelper; }); -/** -@module ember -@submodule ember-templates -*/ - // Ember.assert enifed('ember-htmlbars/helpers/loc', ['exports', 'ember-runtime/system/string'], function (exports, _emberRuntimeSystemString) { + 'use strict'; + exports["default"] = locHelper; /** @module ember @submodule ember-templates @@ -7474,10 +7585,17 @@ function locHelper(params) { return _emberRuntimeSystemString.loc.apply(null, params); } }); enifed("ember-htmlbars/helpers/log", ["exports", "ember-metal/logger"], function (exports, _emberMetalLogger) { + /** + @module ember + @submodule ember-templates + */ + + "use strict"; + exports["default"] = logHelper; /** `log` allows you to output the value of variables in the current rendering context. `log` also accepts primitive types such as strings or numbers. @@ -7494,15 +7612,18 @@ function logHelper(values) { _emberMetalLogger["default"].log.apply(null, values); } }); -/** -@module ember -@submodule ember-templates -*/ enifed("ember-htmlbars/helpers/with", ["exports", "ember-htmlbars/utils/normalize-self", "ember-views/streams/should_display"], function (exports, _emberHtmlbarsUtilsNormalizeSelf, _emberViewsStreamsShould_display) { + /** + @module ember + @submodule ember-templates + */ + + "use strict"; + exports["default"] = withHelper; /** Use the `{{with}}` helper when you want to alias a property to a new name. This is helpful for semantic clarity as it allows you to retain default scope or to reference a property from another @@ -7561,15 +7682,18 @@ } else if (options.inverse && options.inverse.yield) { options.inverse.yield([]); } } }); -/** -@module ember -@submodule ember-templates -*/ enifed("ember-htmlbars/hooks/bind-local", ["exports", "ember-metal/streams/stream", "ember-metal/streams/proxy-stream"], function (exports, _emberMetalStreamsStream, _emberMetalStreamsProxyStream) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = bindLocal; function bindLocal(env, scope, key, value) { var isExisting = scope.locals.hasOwnProperty(key); if (isExisting) { @@ -7582,60 +7706,69 @@ var newValue = _emberMetalStreamsStream["default"].wrap(value, _emberMetalStreamsProxyStream["default"], key); scope.locals[key] = newValue; } } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/bind-scope", ["exports"], function (exports) { + "use strict"; + exports["default"] = bindScope; function bindScope(env, scope) {} }); enifed("ember-htmlbars/hooks/bind-self", ["exports", "ember-metal/streams/proxy-stream", "ember-htmlbars/utils/subscribe"], function (exports, _emberMetalStreamsProxyStream, _emberHtmlbarsUtilsSubscribe) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = bindSelf; function bindSelf(env, scope, _self) { var self = _self; if (self && self.hasBoundController) { - var controller = self.controller; + var _self2 = self; + var controller = _self2.controller; self = self.self; - newStream(scope.locals, "controller", controller || self); + newStream(scope.locals, 'controller', controller || self); } if (self && self.isView) { - newStream(scope.locals, "view", self, null); - newStream(scope.locals, "controller", scope.locals.view.getKey("controller")); - newStream(scope, "self", scope.locals.view.getKey("context"), null, true); + newStream(scope.locals, 'view', self, null); + newStream(scope.locals, 'controller', scope.locals.view.getKey('controller')); + newStream(scope, 'self', scope.locals.view.getKey('context'), null, true); return; } - newStream(scope, "self", self, null, true); + newStream(scope, 'self', self, null, true); if (!scope.locals.controller) { scope.locals.controller = scope.self; } } function newStream(scope, key, newValue, renderNode, isSelf) { - var stream = new _emberMetalStreamsProxyStream["default"](newValue, isSelf ? "" : key); + var stream = new _emberMetalStreamsProxyStream["default"](newValue, isSelf ? '' : key); if (renderNode) { _emberHtmlbarsUtilsSubscribe["default"](renderNode, scope, stream); } scope[key] = stream; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed('ember-htmlbars/hooks/bind-shadow-scope', ['exports', 'ember-views/views/component', 'ember-metal/streams/proxy-stream', 'ember-htmlbars/utils/subscribe'], function (exports, _emberViewsViewsComponent, _emberMetalStreamsProxyStream, _emberHtmlbarsUtilsSubscribe) { + /** + @module ember + @submodule ember-htmlbars + */ + + 'use strict'; + exports["default"] = bindShadowScope; function bindShadowScope(env, parentScope, shadowScope, options) { if (!options) { return; @@ -7680,43 +7813,47 @@ _emberHtmlbarsUtilsSubscribe["default"](renderNode, scope, stream); } scope[key] = stream; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/classify", ["exports", "ember-htmlbars/utils/is-component"], function (exports, _emberHtmlbarsUtilsIsComponent) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = classify; function classify(env, scope, path) { if (_emberHtmlbarsUtilsIsComponent["default"](env, scope, path)) { - return "component"; + return 'component'; } return null; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/cleanup-render-node", ["exports"], function (exports) { - exports["default"] = cleanupRenderNode; /** @module ember @submodule ember-htmlbars */ + "use strict"; + + exports["default"] = cleanupRenderNode; + function cleanupRenderNode(renderNode) { if (renderNode.cleanup) { renderNode.cleanup(); } } }); enifed("ember-htmlbars/hooks/component", ["exports", "ember-htmlbars/node-managers/component-node-manager"], function (exports, _emberHtmlbarsNodeManagersComponentNodeManager) { + "use strict"; + exports["default"] = componentHook; function componentHook(renderNode, env, scope, _tagName, params, attrs, templates, visitor) { var state = renderNode.state; @@ -7727,11 +7864,11 @@ } var tagName = _tagName; var isAngleBracket = false; - if (tagName.charAt(0) === "<") { + if (tagName.charAt(0) === '<') { tagName = tagName.slice(1, -1); isAngleBracket = true; } var parentView = env.view; @@ -7750,22 +7887,24 @@ manager.render(env, visitor); } }); enifed("ember-htmlbars/hooks/concat", ["exports", "ember-metal/streams/utils"], function (exports, _emberMetalStreamsUtils) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = concat; function concat(env, parts) { - return _emberMetalStreamsUtils.concat(parts, ""); + return _emberMetalStreamsUtils.concat(parts, ''); } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/create-fresh-scope", ["exports"], function (exports) { - exports["default"] = createFreshScope; /* Ember's implementation of HTMLBars creates an enriched scope. * self: same as HTMLBars, this field represents the dynamic lookup of root keys that are not special keywords or block arguments. @@ -7810,10 +7949,14 @@ view-less templates and the legacy `controller=foo` semantics, the controller hierarchy is managed dynamically by looking at the current view's `controller`. */ + "use strict"; + + exports["default"] = createFreshScope; + function createFreshScope() { return { self: null, blocks: {}, component: null, @@ -7822,16 +7965,19 @@ localPresent: {} }; } }); enifed("ember-htmlbars/hooks/destroy-render-node", ["exports"], function (exports) { - exports["default"] = destroyRenderNode; /** @module ember @submodule ember-htmlbars */ + "use strict"; + + exports["default"] = destroyRenderNode; + function destroyRenderNode(renderNode) { if (renderNode.emberView) { renderNode.emberView.destroy(); } @@ -7842,36 +7988,47 @@ } } } }); enifed("ember-htmlbars/hooks/did-cleanup-tree", ["exports"], function (exports) { + "use strict"; + exports["default"] = didCleanupTree; function didCleanupTree(env) { // Once we have finsihed cleaning up the render node and sub-nodes, reset // state tracking which view those render nodes belonged to. env.view.ownerView._destroyingSubtreeForView = null; } }); enifed("ember-htmlbars/hooks/did-render-node", ["exports"], function (exports) { + "use strict"; + exports["default"] = didRenderNode; function didRenderNode(morph, env) { env.renderedNodes[morph.guid] = true; } }); enifed("ember-htmlbars/hooks/element", ["exports", "ember-htmlbars/system/lookup-helper", "htmlbars-runtime/hooks", "ember-htmlbars/system/invoke-helper"], function (exports, _emberHtmlbarsSystemLookupHelper, _htmlbarsRuntimeHooks, _emberHtmlbarsSystemInvokeHelper) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = emberElement; var fakeElement; function updateElementAttributesFromString(element, string) { if (!fakeElement) { - fakeElement = document.createElement("div"); + fakeElement = document.createElement('div'); } - fakeElement.innerHTML = "<" + element.tagName + " " + string + "><" + "/" + element.tagName + ">"; + fakeElement.innerHTML = '<' + element.tagName + ' ' + string + '><' + '/' + element.tagName + '>'; var attrs = fakeElement.firstChild.attributes; for (var i = 0, l = attrs.length; i < l; i++) { var attr = attrs[i]; if (attr.specified) { @@ -7894,20 +8051,18 @@ result = env.hooks.get(env, scope, path); } var value = env.hooks.getValue(result); if (value) { - Ember.deprecate("Returning a string of attributes from a helper inside an element is deprecated."); + Ember.deprecate('Returning a string of attributes from a helper inside an element is deprecated.'); updateElementAttributesFromString(morph.element, value); } } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/get-cell-or-value", ["exports", "ember-metal/streams/utils", "ember-htmlbars/keywords/mut"], function (exports, _emberMetalStreamsUtils, _emberHtmlbarsKeywordsMut) { + "use strict"; + exports["default"] = getCellOrValue; function getCellOrValue(ref) { if (ref && ref[_emberHtmlbarsKeywordsMut.MUTABLE_REFERENCE]) { // reify the mutable reference into a mutable cell @@ -7917,10 +8072,17 @@ // get the value out of the reference return _emberMetalStreamsUtils.read(ref); } }); enifed("ember-htmlbars/hooks/get-child", ["exports", "ember-metal/streams/utils"], function (exports, _emberMetalStreamsUtils) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = getChild; function getChild(parent, key) { if (_emberMetalStreamsUtils.isStream(parent)) { return parent.getKey(key); @@ -7930,23 +8092,26 @@ // That might change if it is possible to pass object literals // through the templating system. return parent[key]; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/get-root", ["exports", "ember-metal/core", "ember-metal/path_cache", "ember-metal/streams/proxy-stream"], function (exports, _emberMetalCore, _emberMetalPath_cache, _emberMetalStreamsProxyStream) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = getRoot; function getRoot(scope, key) { - if (key === "this") { + if (key === 'this') { return [scope.self]; - } else if (key === "hasBlock") { + } else if (key === 'hasBlock') { return [!!scope.blocks["default"]]; - } else if (key === "hasBlockParams") { + } else if (key === 'hasBlockParams') { return [!!(scope.blocks["default"] && scope.blocks["default"].arity)]; } else if (_emberMetalPath_cache.isGlobal(key) && _emberMetalCore["default"].lookup[key]) { return [getGlobal(key)]; } else if (key in scope.locals) { return [scope.locals[key]]; @@ -7954,11 +8119,11 @@ return [getKey(scope, key)]; } } function getKey(scope, key) { - if (key === "attrs" && scope.attrs) { + if (key === 'attrs' && scope.attrs) { return scope.attrs; } var self = scope.self || scope.locals.view; @@ -7977,15 +8142,18 @@ // This stream should be memoized, but this path is deprecated and // will be removed soon so it's not worth the trouble. return new _emberMetalStreamsProxyStream["default"](_emberMetalCore["default"].lookup[name], name); } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/get-value", ["exports", "ember-metal/streams/utils", "ember-views/compat/attrs-proxy"], function (exports, _emberMetalStreamsUtils, _emberViewsCompatAttrsProxy) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = getValue; function getValue(ref) { var value = _emberMetalStreamsUtils.read(ref); @@ -7994,42 +8162,42 @@ } return value; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/has-helper", ["exports", "ember-htmlbars/system/lookup-helper"], function (exports, _emberHtmlbarsSystemLookupHelper) { + "use strict"; + exports["default"] = hasHelperHook; function hasHelperHook(env, scope, helperName) { if (env.helpers[helperName]) { return true; } var container = env.container; if (_emberHtmlbarsSystemLookupHelper.validateLazyHelperName(helperName, container, env.hooks.keywords, env.knownHelpers)) { - var containerName = "helper:" + helperName; + var containerName = 'helper:' + helperName; if (container._registry.has(containerName)) { return true; } } return false; } }); enifed("ember-htmlbars/hooks/invoke-helper", ["exports", "ember-metal/core", "ember-htmlbars/system/invoke-helper", "ember-htmlbars/utils/subscribe"], function (exports, _emberMetalCore, _emberHtmlbarsSystemInvokeHelper, _emberHtmlbarsUtilsSubscribe) { + "use strict"; + exports["default"] = invokeHelper; function invokeHelper(morph, env, scope, visitor, params, hash, helper, templates, context) { if (helper.isLegacyViewHelper) { _emberMetalCore["default"].assert("You can only pass attributes (such as name=value) not bare " + "values to a helper for a View found in '" + helper.viewClass + "'", params.length === 0); - env.hooks.keyword("view", morph, env, scope, [helper.viewClass], hash, templates.template.raw, null, visitor); + env.hooks.keyword('view', morph, env, scope, [helper.viewClass], hash, templates.template.raw, null, visitor); // Opts into a special mode for view helpers return { handled: true }; } var helperStream = _emberHtmlbarsSystemInvokeHelper.buildHelperStream(helper, params, hash, templates, env, scope, context); @@ -8063,10 +8231,17 @@ return { value: helperStream.value() }; } }); // Ember.assert enifed("ember-htmlbars/hooks/link-render-node", ["exports", "ember-htmlbars/utils/subscribe", "ember-runtime/utils", "ember-metal/streams/utils", "ember-htmlbars/system/lookup-helper"], function (exports, _emberHtmlbarsUtilsSubscribe, _emberRuntimeUtils, _emberMetalStreamsUtils, _emberHtmlbarsSystemLookupHelper) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = linkRenderNode; function linkRenderNode(renderNode, env, scope, path, params, hash) { if (renderNode.streamUnsubscribers) { return true; @@ -8076,16 +8251,16 @@ var helper; if (keyword && keyword.link) { keyword.link(renderNode.state, params, hash); } else { switch (path) { - case "unbound": + case 'unbound': return true; - case "unless": - case "if": + case 'unless': + case 'if': params[0] = shouldDisplay(params[0]);break; - case "each": + case 'each': params[0] = eachParam(params[0]);break; default: helper = _emberHtmlbarsSystemLookupHelper.findHelper(path, env.view, env); if (helper && helper.isHandlebarsCompat && params[0]) { @@ -8111,40 +8286,40 @@ // streams. return true; } function eachParam(list) { - var listChange = getKey(list, "[]"); + var listChange = getKey(list, '[]'); var stream = _emberMetalStreamsUtils.chain(list, function () { _emberMetalStreamsUtils.read(listChange); return _emberMetalStreamsUtils.read(list); - }, "each"); + }, 'each'); stream.addDependency(listChange); return stream; } function shouldDisplay(predicate) { - var length = getKey(predicate, "length"); - var isTruthy = getKey(predicate, "isTruthy"); + var length = getKey(predicate, 'length'); + var isTruthy = getKey(predicate, 'isTruthy'); var stream = _emberMetalStreamsUtils.chain(predicate, function () { var predicateVal = _emberMetalStreamsUtils.read(predicate); var lengthVal = _emberMetalStreamsUtils.read(length); var isTruthyVal = _emberMetalStreamsUtils.read(isTruthy); if (_emberRuntimeUtils.isArray(predicateVal)) { return lengthVal > 0; } - if (typeof isTruthyVal === "boolean") { + if (typeof isTruthyVal === 'boolean') { return isTruthyVal; } return !!predicateVal; - }, "ShouldDisplay"); + }, 'ShouldDisplay'); _emberMetalStreamsUtils.addDependency(stream, length); _emberMetalStreamsUtils.addDependency(stream, isTruthy); return stream; @@ -8167,11 +8342,11 @@ var stream = _emberMetalStreamsUtils.chain(base, function () { _emberMetalStreamsUtils.readArray(depKeyStreams); return _emberMetalStreamsUtils.read(base); - }, "HandlebarsCompatHelper"); + }, 'HandlebarsCompatHelper'); for (var i = 0, l = additionalKeys.length; i < l; i++) { var depKeyStream = base.get(additionalKeys[i]); depKeyStreams.push(depKeyStream); @@ -8179,22 +8354,27 @@ } return stream; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/lookup-helper", ["exports", "ember-htmlbars/system/lookup-helper"], function (exports, _emberHtmlbarsSystemLookupHelper) { + "use strict"; + exports["default"] = lookupHelperHook; function lookupHelperHook(env, scope, helperName) { return _emberHtmlbarsSystemLookupHelper["default"](helperName, scope.self, env); } }); enifed("ember-htmlbars/hooks/subexpr", ["exports", "ember-htmlbars/system/lookup-helper", "ember-htmlbars/system/invoke-helper", "ember-metal/streams/utils"], function (exports, _emberHtmlbarsSystemLookupHelper, _emberHtmlbarsSystemInvokeHelper, _emberMetalStreamsUtils) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = subexpr; function subexpr(env, scope, helperName, params, hash) { // TODO: Keywords and helper invocation should be integrated into // the subexpr hook upstream in HTMLBars. @@ -8246,44 +8426,46 @@ } return out.join(" "); } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/update-self", ["exports", "ember-metal/property_get", "ember-htmlbars/utils/update-scope"], function (exports, _emberMetalProperty_get, _emberHtmlbarsUtilsUpdateScope) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = updateSelf; function updateSelf(env, scope, _self) { var self = _self; if (self && self.hasBoundController) { - var controller = self.controller; + var _self2 = self; + var controller = _self2.controller; self = self.self; - _emberHtmlbarsUtilsUpdateScope["default"](scope.locals, "controller", controller || self); + _emberHtmlbarsUtilsUpdateScope["default"](scope.locals, 'controller', controller || self); } Ember.assert("BUG: scope.attrs and self.isView should not both be true", !(scope.attrs && self.isView)); if (self && self.isView) { - _emberHtmlbarsUtilsUpdateScope["default"](scope.locals, "view", self, null); - _emberHtmlbarsUtilsUpdateScope["default"](scope, "self", _emberMetalProperty_get.get(self, "context"), null, true); + _emberHtmlbarsUtilsUpdateScope["default"](scope.locals, 'view', self, null); + _emberHtmlbarsUtilsUpdateScope["default"](scope, 'self', _emberMetalProperty_get.get(self, 'context'), null, true); return; } - _emberHtmlbarsUtilsUpdateScope["default"](scope, "self", self, null); + _emberHtmlbarsUtilsUpdateScope["default"](scope, 'self', self, null); } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/hooks/will-cleanup-tree", ["exports"], function (exports) { + "use strict"; + exports["default"] = willCleanupTree; function willCleanupTree(env) { var view = env.view; @@ -8316,10 +8498,17 @@ // `didCleanupTree`. view.ownerView._destroyingSubtreeForView = view; } }); enifed("ember-htmlbars/keywords", ["exports", "htmlbars-runtime", "ember-metal/platform/create"], function (exports, _htmlbarsRuntime, _emberMetalPlatformCreate) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports.registerKeyword = registerKeyword; /** @private @property helpers @@ -8343,15 +8532,18 @@ keywords[name] = keyword; } exports["default"] = keywords; }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/keywords/collection", ["exports", "ember-views/streams/utils", "ember-views/views/collection_view", "ember-htmlbars/node-managers/view-node-manager", "ember-metal/keys", "ember-metal/merge"], function (exports, _emberViewsStreamsUtils, _emberViewsViewsCollection_view, _emberHtmlbarsNodeManagersViewNodeManager, _emberMetalKeys, _emberMetalMerge) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = { setupState: function (state, env, scope, params, hash) { var read = env.hooks.getValue; return _emberMetalMerge.assign({}, state, { @@ -8406,16 +8598,19 @@ } return viewClassOrInstance; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed('ember-htmlbars/keywords/component', ['exports', 'ember-metal/merge'], function (exports, _emberMetalMerge) { + /** + @module ember + @submodule ember-templates + @public + */ + 'use strict'; + /** The `{{component}}` helper lets you add instances of `Ember.Component` to a template. See [Ember.Component](/api/classes/Ember.Component.html) for additional information on how a `Component` functions. `{{component}}`'s primary use is for cases where you want to dynamically @@ -8497,19 +8692,21 @@ } env.hooks.component(morph, env, scope, componentPath, params, hash, { "default": template, inverse: inverse }, visitor); } }); -/** - @module ember - @submodule ember-templates - @public -*/ enifed("ember-htmlbars/keywords/customized_outlet", ["exports", "ember-htmlbars/node-managers/view-node-manager", "ember-views/streams/utils", "ember-metal/streams/utils"], function (exports, _emberHtmlbarsNodeManagersViewNodeManager, _emberViewsStreamsUtils, _emberMetalStreamsUtils) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = { setupState: function (state, env, scope, params, hash) { - Ember.assert("Using a quoteless view parameter with {{outlet}} is not supported", !hash.view || !_emberMetalStreamsUtils.isStream(hash.view)); + Ember.assert('Using a quoteless view parameter with {{outlet}} is not supported', !hash.view || !_emberMetalStreamsUtils.isStream(hash.view)); var read = env.hooks.getValue; var viewClass = read(hash.viewClass) || _emberViewsStreamsUtils.readViewFactory(read(hash.view), env.container); return { viewClass: viewClass }; }, render: function (renderNode, env, scope, params, hash, template, inverse, visitor) { @@ -8523,15 +8720,19 @@ state.manager = nodeManager; nodeManager.render(env, hash, visitor); } }; }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/keywords/debugger", ["exports", "ember-metal/logger"], function (exports, _emberMetalLogger) { + /*jshint debug:true*/ + + /** + @module ember + @submodule ember-htmlbars + */ + "use strict"; + exports["default"] = debuggerKeyword; /** Execute the `debugger` statement in the current template's context. @@ -8583,24 +8784,25 @@ function get(path) { return env.hooks.getValue(env.hooks.get(env, scope, path)); } - _emberMetalLogger["default"].info("Use `view`, `context`, and `get(<path>)` to debug this template."); + _emberMetalLogger["default"].info('Use `view`, `context`, and `get(<path>)` to debug this template.'); debugger; return true; } }); -/*jshint debug:true*/ - -/** -@module ember -@submodule ember-htmlbars -*/ enifed('ember-htmlbars/keywords/each', ['exports', 'ember-runtime/controllers/array_controller'], function (exports, _emberRuntimeControllersArray_controller) { + /** + @module ember + @submodule ember-htmlbars + */ + + 'use strict'; + exports["default"] = each; function each(morph, env, scope, params, hash, template, inverse, visitor) { var getValue = env.hooks.getValue; var firstParam = params[0] && getValue(params[0]); @@ -8617,21 +8819,19 @@ } return false; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/keywords/input", ["exports", "ember-metal/core", "ember-metal/merge"], function (exports, _emberMetalCore, _emberMetalMerge) { + "use strict"; + exports["default"] = { setupState: function (lastState, env, scope, params, hash) { var type = env.hooks.getValue(hash.type); var componentName = componentNameMap[type] || defaultComponentName; - _emberMetalCore["default"].assert("{{input type='checkbox'}} does not support setting `value=someBooleanValue`;" + " you must use `checked=someBooleanValue` instead.", !(type === "checkbox" && hash.hasOwnProperty("value"))); + _emberMetalCore["default"].assert("{{input type='checkbox'}} does not support setting `value=someBooleanValue`;" + " you must use `checked=someBooleanValue` instead.", !(type === 'checkbox' && hash.hasOwnProperty('value'))); return _emberMetalMerge.assign({}, lastState, { componentName: componentName }); }, render: function (morph, env, scope, params, hash, template, inverse, visitor) { @@ -8644,14 +8844,16 @@ }; var defaultComponentName = "-text-field"; var componentNameMap = { - "checkbox": "-checkbox" + 'checkbox': '-checkbox' }; }); enifed("ember-htmlbars/keywords/legacy-yield", ["exports", "ember-metal/streams/proxy-stream"], function (exports, _emberMetalStreamsProxyStream) { + "use strict"; + exports["default"] = legacyYield; function legacyYield(morph, env, _scope, params, hash, template, inverse, visitor) { var scope = _scope; @@ -8673,10 +8875,12 @@ return true; } }); enifed("ember-htmlbars/keywords/mut", ["exports", "ember-metal/platform/create", "ember-metal/merge", "ember-metal/utils", "ember-metal/streams/proxy-stream", "ember-metal/streams/utils", "ember-metal/streams/stream", "ember-views/compat/attrs-proxy", "ember-routing-htmlbars/keywords/closure-action"], function (exports, _emberMetalPlatformCreate, _emberMetalMerge, _emberMetalUtils, _emberMetalStreamsProxyStream, _emberMetalStreamsUtils, _emberMetalStreamsStream, _emberViewsCompatAttrsProxy, _emberRoutingHtmlbarsKeywordsClosureAction) { + "use strict"; + var _merge; exports["default"] = mut; exports.privateMut = privateMut; var MUTABLE_REFERENCE = _emberMetalUtils.symbol("MUTABLE_REFERENCE"); @@ -8759,33 +8963,42 @@ }, _merge[_emberRoutingHtmlbarsKeywordsClosureAction.INVOKE] = function (val) { this.setValue(val); }, _merge)); }); enifed('ember-htmlbars/keywords/outlet', ['exports', 'htmlbars-runtime/hooks'], function (exports, _htmlbarsRuntimeHooks) { + /** + @module ember + @submodule ember-htmlbars + */ + 'use strict'; + /* This level of delegation handles backward-compatibility with the `view` parameter to {{outlet}}. When we drop support for the `view` parameter in 2.0, this keyword should just get replaced directly with @real_outlet. */ exports["default"] = function (morph, env, scope, params, hash, template, inverse, visitor) { if (hash.hasOwnProperty('view') || hash.hasOwnProperty('viewClass')) { - Ember.deprecate('Passing `view` or `viewClass` to {{outlet}} is deprecated.'); + Ember.deprecate("Passing `view` or `viewClass` to {{outlet}} is deprecated."); _htmlbarsRuntimeHooks.keyword('@customized_outlet', morph, env, scope, params, hash, template, inverse, visitor); } else { _htmlbarsRuntimeHooks.keyword('@real_outlet', morph, env, scope, params, hash, template, inverse, visitor); } return true; }; }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/keywords/partial", ["exports", "ember-views/system/lookup_partial", "htmlbars-runtime"], function (exports, _emberViewsSystemLookup_partial, _htmlbarsRuntime) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = { setupState: function (state, env, scope, params, hash) { return { partialName: env.hooks.getValue(params[0]) }; }, @@ -8803,15 +9016,13 @@ options.templates.template.yield(); }); } }; }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/keywords/readonly", ["exports", "ember-htmlbars/keywords/mut"], function (exports, _emberHtmlbarsKeywordsMut) { + "use strict"; + exports["default"] = readonly; function readonly(morph, env, scope, originalParams, hash, template, inverse) { // If `morph` is `null` the keyword is being invoked as a subexpression. if (morph === null) { @@ -8824,21 +9035,28 @@ return true; } }); enifed("ember-htmlbars/keywords/real_outlet", ["exports", "ember-metal/property_get", "ember-htmlbars/node-managers/view-node-manager", "ember-htmlbars/templates/top-level-view"], function (exports, _emberMetalProperty_get, _emberHtmlbarsNodeManagersViewNodeManager, _emberHtmlbarsTemplatesTopLevelView) { - _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.5"; + /** + @module ember + @submodule ember-htmlbars + */ + "use strict"; + + _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.6'; + exports["default"] = { willRender: function (renderNode, env) { env.view.ownerView._outlets.push(renderNode); }, setupState: function (state, env, scope, params, hash) { var outletState = env.outletState; var read = env.hooks.getValue; - var outletName = read(params[0]) || "main"; + var outletName = read(params[0]) || 'main'; var selectedOutletState = outletState[outletName]; var toRender = selectedOutletState && selectedOutletState.render; if (toRender && !toRender.template && !toRender.ViewClass) { toRender.template = _emberHtmlbarsTemplatesTopLevelView["default"]; @@ -8866,17 +9084,17 @@ render: function (renderNode, env, scope, params, hash, template, inverse, visitor) { var state = renderNode.state; var parentView = env.view; var outletState = state.outletState; var toRender = outletState.render; - var namespace = env.container.lookup("application:main"); - var LOG_VIEW_LOOKUPS = _emberMetalProperty_get.get(namespace, "LOG_VIEW_LOOKUPS"); + var namespace = env.container.lookup('application:main'); + var LOG_VIEW_LOOKUPS = _emberMetalProperty_get.get(namespace, 'LOG_VIEW_LOOKUPS'); var ViewClass = outletState.render.ViewClass; if (!state.hasParentOutlet && !ViewClass) { - ViewClass = env.container.lookupFactory("view:toplevel"); + ViewClass = env.container.lookupFactory('view:toplevel'); } var options = { component: ViewClass, self: toRender.controller, @@ -8886,11 +9104,11 @@ }; template = template || toRender.template && toRender.template.raw; if (LOG_VIEW_LOOKUPS && ViewClass) { - Ember.Logger.info("Rendering " + toRender.name + " with " + ViewClass, { fullName: "view:" + toRender.name }); + Ember.Logger.info("Rendering " + toRender.name + " with " + ViewClass, { fullName: 'view:' + toRender.name }); } if (state.manager) { state.manager.destroy(); state.manager = null; @@ -8924,53 +9142,57 @@ for (var key in a) { if (a.hasOwnProperty(key)) { // name is only here for logging & debugging. If two different // names result in otherwise identical states, they're still // identical. - if (a[key] !== b[key] && key !== "name") { + if (a[key] !== b[key] && key !== 'name') { return false; } } } return true; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/keywords/template", ["exports", "ember-metal/core"], function (exports, _emberMetalCore) { + "use strict"; + exports["default"] = templateKeyword; var deprecation = "The `template` helper has been deprecated in favor of the `partial` helper."; exports.deprecation = deprecation; function templateKeyword(morph, env, scope, params, hash, template, inverse, visitor) { _emberMetalCore["default"].deprecate(deprecation); - env.hooks.keyword("partial", morph, env, scope, params, hash, template, inverse, visitor); + env.hooks.keyword('partial', morph, env, scope, params, hash, template, inverse, visitor); return true; } }); enifed('ember-htmlbars/keywords/textarea', ['exports'], function (exports) { - exports["default"] = textarea; /** @module ember @submodule ember-htmlbars */ + 'use strict'; + + exports["default"] = textarea; + function textarea(morph, env, scope, originalParams, hash, template, inverse, visitor) { env.hooks.component(morph, env, scope, '-text-area', originalParams, hash, { "default": template, inverse: inverse }, visitor); return true; } }); enifed("ember-htmlbars/keywords/unbound", ["exports", "ember-metal/merge", "ember-metal/platform/create", "ember-metal/streams/stream", "ember-metal/streams/utils"], function (exports, _emberMetalMerge, _emberMetalPlatformCreate, _emberMetalStreamsStream, _emberMetalStreamsUtils) { - exports["default"] = unbound; /** @module ember @submodule ember-htmlbars */ + "use strict"; + + exports["default"] = unbound; + function unbound(morph, env, scope, originalParams, hash, template, inverse) { // Since we already got the params as a set of streams, we need to extract the key from // the first param instead of (incorrectly) trying to read from it. If this was a call // to `{{unbound foo.bar}}`, then we pass along the original stream to `hooks.range`. var params = originalParams.slice(); @@ -9012,10 +9234,17 @@ notify: function () {} }); }); enifed("ember-htmlbars/keywords/view", ["exports", "ember-views/streams/utils", "ember-views/views/view", "ember-htmlbars/node-managers/view-node-manager", "ember-metal/keys"], function (exports, _emberViewsStreamsUtils, _emberViewsViewsView, _emberHtmlbarsNodeManagersViewNodeManager, _emberMetalKeys) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = { setupState: function (state, env, scope, params, hash) { var read = env.hooks.getValue; var targetObject = read(scope.self); var viewClassOrInstance = state.viewClassOrInstance; @@ -9045,15 +9274,15 @@ } }, render: function (node, env, scope, params, hash, template, inverse, visitor) { if (hash.tag) { - hash = swapKey(hash, "tag", "tagName"); + hash = swapKey(hash, 'tag', 'tagName'); } if (hash.classNameBindings) { - hash.classNameBindings = hash.classNameBindings.split(" "); + hash.classNameBindings = hash.classNameBindings.split(' '); } var state = node.state; var parentView = state.parentView; @@ -9090,11 +9319,11 @@ function getView(viewPath, container) { var viewClassOrInstance; if (!viewPath) { if (container) { - viewClassOrInstance = container.lookupFactory("view:toplevel"); + viewClassOrInstance = container.lookupFactory('view:toplevel'); } else { viewClassOrInstance = _emberViewsViewsView["default"]; } } else { viewClassOrInstance = _emberViewsStreamsUtils.readViewFactory(viewPath, container); @@ -9115,15 +9344,13 @@ } return newHash; } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed('ember-htmlbars/keywords/with', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'htmlbars-runtime', 'ember-metal/streams/utils'], function (exports, _emberMetalCore, _emberMetalProperty_get, _htmlbarsRuntime, _emberMetalStreamsUtils) { + 'use strict'; + exports["default"] = { setupState: function (state, env, scope, params, hash) { var controller = hash.controller; if (controller) { @@ -9166,16 +9393,16 @@ if (morph.state.controller) { morph.addDestruction(morph.state.controller); hash.controller = morph.state.controller; } - _emberMetalCore["default"].assert('{{#with foo}} must be called with a single argument or the use the ' + '{{#with foo as bar}} syntax', params.length === 1); + _emberMetalCore["default"].assert("{{#with foo}} must be called with a single argument or the use the " + "{{#with foo as bar}} syntax", params.length === 1); - _emberMetalCore["default"].assert('The {{#with}} helper must be called with a block', !!template); + _emberMetalCore["default"].assert("The {{#with}} helper must be called with a block", !!template); if (template && template.arity === 0) { - _emberMetalCore["default"].deprecate('Using the context switching form of `{{with}}` is deprecated. ' + 'Please use the block param form (`{{#with bar as |foo|}}`) instead.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope' }); + _emberMetalCore["default"].deprecate("Using the context switching form of `{{with}}` is deprecated. " + "Please use the block param form (`{{#with bar as |foo|}}`) instead.", false, { url: 'http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope' }); } _htmlbarsRuntime.internal.continueBlock(morph, env, scope, 'with', params, hash, template, inverse, visitor); }, @@ -9183,14 +9410,15 @@ _htmlbarsRuntime.internal.continueBlock(morph, env, scope, 'with', params, hash, template, inverse, visitor); } }; }); enifed("ember-htmlbars/morphs/attr-morph", ["exports", "ember-metal/core", "dom-helper", "ember-metal/platform/create"], function (exports, _emberMetalCore, _domHelper, _emberMetalPlatformCreate) { + "use strict"; var HTMLBarsAttrMorph = _domHelper["default"].prototype.AttrMorphClass; - var styleWarning = "" + "Binding style attributes may introduce cross-site scripting vulnerabilities; " + "please ensure that values being bound are properly escaped. For more information, " + "including how to disable this warning, see " + "http://emberjs.com/deprecations/v1.x/#toc_binding-style-attributes."; + var styleWarning = '' + 'Binding style attributes may introduce cross-site scripting vulnerabilities; ' + 'please ensure that values being bound are properly escaped. For more information, ' + 'including how to disable this warning, see ' + 'http://emberjs.com/deprecations/v1.x/#toc_binding-style-attributes.'; exports.styleWarning = styleWarning; function EmberAttrMorph(element, attrName, domHelper, namespace) { HTMLBarsAttrMorph.call(this, element, attrName, domHelper, namespace); @@ -9205,11 +9433,11 @@ // SafeString if (value && value.toHTML) { return true; } - if (name !== "style") { + if (name !== 'style') { return true; } return !escaped; })(this.attrName, value, this.escaped)); @@ -9221,10 +9449,11 @@ }; exports["default"] = EmberAttrMorph; }); enifed("ember-htmlbars/morphs/morph", ["exports", "dom-helper", "ember-metal/platform/create"], function (exports, _domHelper, _emberMetalPlatformCreate) { + "use strict"; var HTMLBarsMorph = _domHelper["default"].prototype.MorphClass; var guid = 1; function EmberMorph(DOMHelper, contextualElement) { @@ -9280,10 +9509,12 @@ }; exports["default"] = EmberMorph; }); enifed("ember-htmlbars/node-managers/component-node-manager", ["exports", "ember-metal/core", "ember-metal/merge", "ember-views/system/build-component-template", "ember-htmlbars/utils/lookup-component", "ember-htmlbars/hooks/get-cell-or-value", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/set_properties", "ember-views/compat/attrs-proxy", "htmlbars-util/safe-string", "ember-htmlbars/system/instrumentation-support", "ember-views/views/component", "ember-metal/streams/stream", "ember-metal/streams/utils", "ember-htmlbars/hooks/get-value"], function (exports, _emberMetalCore, _emberMetalMerge, _emberViewsSystemBuildComponentTemplate, _emberHtmlbarsUtilsLookupComponent, _emberHtmlbarsHooksGetCellOrValue, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalSet_properties, _emberViewsCompatAttrsProxy, _htmlbarsUtilSafeString, _emberHtmlbarsSystemInstrumentationSupport, _emberViewsViewsComponent, _emberMetalStreamsStream, _emberMetalStreamsUtils, _emberHtmlbarsHooksGetValue) { + "use strict"; + exports.handleLegacyRender = handleLegacyRender; exports.createComponent = createComponent; function ComponentNodeManager(component, isAngleBracket, scope, renderNode, attrs, block, expectElement) { this.component = component; @@ -9314,11 +9545,11 @@ var _lookupComponent = _emberHtmlbarsUtilsLookupComponent["default"](env.container, tagName); var component = _lookupComponent.component; var layout = _lookupComponent.layout; - _emberMetalCore["default"].assert("HTMLBars error: Could not find component named \"" + tagName + "\" (no component or template with that name was found)", function () { + _emberMetalCore["default"].assert('HTMLBars error: Could not find component named "' + tagName + '" (no component or template with that name was found)', function () { return component || layout; }); component = component || _emberViewsViewsComponent["default"]; @@ -9343,74 +9574,92 @@ // 2.0TODO: remove if (templates["default"]) { createOptions._deprecatedFlagForBlockProvided = true; } + var proto = extractPositionalParams(renderNode, component, params, attrs); + // Instantiate the component - component = createComponent(component, isAngleBracket, createOptions, renderNode, env, attrs); + component = createComponent(component, isAngleBracket, createOptions, renderNode, env, attrs, proto); // If the component specifies its template via the `layout` or `template` // properties instead of using the template looked up in the container, get // them now that we have the component instance. var result = extractComponentTemplates(component, templates); layout = result.layout || layout; templates = result.templates || templates; - extractPositionalParams(renderNode, component, params, attrs); - var results = _emberViewsSystemBuildComponentTemplate["default"]({ layout: layout, component: component, isAngleBracket: isAngleBracket }, attrs, { templates: templates, scope: parentScope }); return new ComponentNodeManager(component, isAngleBracket, parentScope, renderNode, attrs, results.block, results.createdElement); }; function extractPositionalParams(renderNode, component, params, attrs) { - if (component.positionalParams) { - (function () { - // if the component is rendered via {{component}} helper, the first - // element of `params` is the name of the component, so we need to - // skip that when the positional parameters are constructed - var paramsStartIndex = renderNode.state.isComponentHelper ? 1 : 0; - var positionalParams = component.positionalParams; - var isNamed = typeof positionalParams === "string"; - var paramsStream = undefined; + var positionalParams = component.positionalParams; + var proto = undefined; - if (isNamed) { - paramsStream = new _emberMetalStreamsStream["default"](function () { - return _emberMetalStreamsUtils.readArray(params.slice(paramsStartIndex)); - }, "params"); + if (!positionalParams) { + proto = component.proto(); + positionalParams = proto.positionalParams; - attrs[positionalParams] = paramsStream; - } + _emberMetalCore["default"].deprecate('Calling `var Thing = Ember.Component.extend({ positionalParams: [\'a\', \'b\' ]});` ' + 'is deprecated in favor of `Thing.reopenClass({ positionalParams: [\'a\', \'b\'] });', !positionalParams, { id: 'ember-htmlbars.component-positional-params', until: '2.0.0' }); + } - for (var i = 0; i < positionalParams.length; i++) { - var param = params[paramsStartIndex + i]; - if (isNamed) { - paramsStream.addDependency(param); - } else { - attrs[positionalParams[i]] = param; - } - } - })(); + if (positionalParams) { + processPositionalParams(renderNode, positionalParams, params, attrs); } + + // returns `proto` here so that we can avoid doing this + // twice for each initial render per component (it is also needed in `createComponent`) + return proto; } + function processPositionalParams(renderNode, positionalParams, params, attrs) { + // if the component is rendered via {{component}} helper, the first + // element of `params` is the name of the component, so we need to + // skip that when the positional parameters are constructed + var paramsStartIndex = renderNode.state.isComponentHelper ? 1 : 0; + var isNamed = typeof positionalParams === 'string'; + var paramsStream = undefined; + + if (isNamed) { + paramsStream = new _emberMetalStreamsStream["default"](function () { + return _emberMetalStreamsUtils.readArray(params.slice(paramsStartIndex)); + }, 'params'); + + attrs[positionalParams] = paramsStream; + } + + if (isNamed) { + for (var i = paramsStartIndex; i < params.length; i++) { + var param = params[i]; + paramsStream.addDependency(param); + } + } else { + for (var i = 0; i < positionalParams.length; i++) { + var param = params[paramsStartIndex + i]; + attrs[positionalParams[i]] = param; + } + } + } + function extractComponentTemplates(component, _templates) { // Even though we looked up a layout from the container earlier, the // component may specify a `layout` property that overrides that. // The component may also provide a `template` property we should // respect (though this behavior is deprecated). - var componentLayout = _emberMetalProperty_get.get(component, "layout"); + var componentLayout = _emberMetalProperty_get.get(component, 'layout'); var hasBlock = _templates && _templates["default"]; var layout = undefined, templates = undefined, componentTemplate = undefined; if (hasBlock) { componentTemplate = null; } else if (component.isComponent) { - componentTemplate = _emberMetalProperty_get.get(component, "_template"); + componentTemplate = _emberMetalProperty_get.get(component, '_template'); } else { - componentTemplate = _emberMetalProperty_get.get(component, "template"); + componentTemplate = _emberMetalProperty_get.get(component, 'template'); } if (componentLayout) { layout = componentLayout; templates = extractLegacyTemplate(_templates, componentTemplate); @@ -9464,17 +9713,14 @@ } } ComponentNodeManager.prototype.render = function (_env, visitor) { var component = this.component; - var attrs = this.attrs; return _emberHtmlbarsSystemInstrumentationSupport.instrument(component, function () { var env = _env.childWithView(component); - var snapshot = takeSnapshot(attrs); - env.renderer.componentInitAttrs(this.component, snapshot); env.renderer.componentWillRender(component); env.renderedViews.push(component.elementId); if (this.block) { this.block(env, [], undefined, this.renderNode, this.scope, visitor); @@ -9484,11 +9730,11 @@ handleLegacyRender(component, element); env.renderer.didCreateElement(component, element); env.renderer.willInsertElement(component, element); // 2.0TODO remove legacy hook - env.lifecycleHooks.push({ type: "didInsertElement", view: component }); + env.lifecycleHooks.push({ type: 'didInsertElement', view: component }); }, this); }; function handleLegacyRender(component, element) { if (!component.render) { @@ -9499,11 +9745,11 @@ var content, node, lastChildIndex; var buffer = []; var renderNode = component._renderNode; component.render(buffer); - content = buffer.join(""); + content = buffer.join(''); if (element) { lastChildIndex = renderNode.childNodes.length - 1; node = renderNode.childNodes[lastChildIndex]; } else { node = renderNode; @@ -9537,11 +9783,11 @@ if (this.block) { this.block(env, [], undefined, this.renderNode, this.scope, visitor); } - env.lifecycleHooks.push({ type: "didUpdate", view: component }); + env.lifecycleHooks.push({ type: 'didUpdate', view: component }); return env; }, this); }; @@ -9555,46 +9801,50 @@ component.destroy(); }; function createComponent(_component, isAngleBracket, _props, renderNode, env) { var attrs = arguments.length <= 5 || arguments[5] === undefined ? {} : arguments[5]; + var proto = arguments.length <= 6 || arguments[6] === undefined ? _component.proto() : arguments[6]; + return (function () { + var props = _emberMetalMerge.assign({}, _props); + var attrsSnapshot = undefined; - var props = _emberMetalMerge.assign({}, _props); + if (!isAngleBracket) { + var hasSuppliedController = ('controller' in attrs); // 2.0TODO remove + _emberMetalCore["default"].deprecate("controller= is deprecated", !hasSuppliedController); - if (!isAngleBracket) { - var hasSuppliedController = ("controller" in attrs); // 2.0TODO remove - _emberMetalCore["default"].deprecate("controller= is deprecated", !hasSuppliedController); + attrsSnapshot = takeSnapshot(attrs); + props.attrs = attrsSnapshot; - var snapshot = takeSnapshot(attrs); - props.attrs = snapshot; + mergeBindings(props, shadowedAttrs(proto, attrsSnapshot)); + } else { + props._isAngleBracket = true; + } - var proto = _component.proto(); - mergeBindings(props, shadowedAttrs(proto, snapshot)); - } else { - props._isAngleBracket = true; - } + props.renderer = props.parentView ? props.parentView.renderer : env.container.lookup('renderer:-dom'); + props._viewRegistry = props.parentView ? props.parentView._viewRegistry : env.container.lookup('-view-registry:main'); - props.renderer = props.parentView ? props.parentView.renderer : env.container.lookup("renderer:-dom"); - props._viewRegistry = props.parentView ? props.parentView._viewRegistry : env.container.lookup("-view-registry:main"); + var component = _component.create(props); - var component = _component.create(props); + env.renderer.componentInitAttrs(component, attrsSnapshot); - // for the fallback case - component.container = component.container || env.container; + // for the fallback case + component.container = component.container || env.container; - if (props.parentView) { - props.parentView.appendChild(component); + if (props.parentView) { + props.parentView.appendChild(component); - if (props.viewName) { - _emberMetalProperty_set.set(props.parentView, props.viewName, component); + if (props.viewName) { + _emberMetalProperty_set.set(props.parentView, props.viewName, component); + } } - } - component._renderNode = renderNode; - renderNode.emberView = component; - renderNode.buildChildEnv = buildChildEnv; - return component; + component._renderNode = renderNode; + renderNode.emberView = component; + renderNode.buildChildEnv = buildChildEnv; + return component; + })(); } function shadowedAttrs(target, attrs) { var shadowed = {}; @@ -9629,11 +9879,11 @@ } // when `attrs` is an actual value being set in the // attrs hash (`{{foo-bar attrs="blah"}}`) we cannot // set `"blah"` to the root of the target because // that would replace all attrs with `attrs.attrs` - if (prop === "attrs") { + if (prop === 'attrs') { _emberMetalCore["default"].warn("Invoking a component with a hash attribute named `attrs` is not supported. Please refactor usage of " + target + " to avoid passing `attrs` as a hash parameter."); continue; } var value = attrs[prop]; @@ -9655,10 +9905,12 @@ // In theory this should come through the env, but it should // be safe to import this until we make the hook system public // and it gets actively used in addons or other downstream // libraries. enifed("ember-htmlbars/node-managers/view-node-manager", ["exports", "ember-metal/merge", "ember-metal/core", "ember-views/system/build-component-template", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/set_properties", "ember-views/views/view", "ember-views/compat/attrs-proxy", "ember-htmlbars/hooks/get-cell-or-value", "ember-htmlbars/system/instrumentation-support", "ember-htmlbars/node-managers/component-node-manager", "ember-htmlbars/hooks/get-value"], function (exports, _emberMetalMerge, _emberMetalCore, _emberViewsSystemBuildComponentTemplate, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalSet_properties, _emberViewsViewsView, _emberViewsCompatAttrsProxy, _emberHtmlbarsHooksGetCellOrValue, _emberHtmlbarsSystemInstrumentationSupport, _emberHtmlbarsNodeManagersComponentNodeManager, _emberHtmlbarsHooksGetValue) { + "use strict"; + exports.createOrUpdateComponent = createOrUpdateComponent; function ViewNodeManager(component, scope, renderNode, block, expectElement) { this.component = component; this.scope = scope; @@ -9668,11 +9920,11 @@ } exports["default"] = ViewNodeManager; ViewNodeManager.create = function (renderNode, env, attrs, found, parentView, path, contentScope, contentTemplate) { - _emberMetalCore["default"].assert("HTMLBars error: Could not find component named \"" + path + "\" (no component or template with that name was found)", function () { + _emberMetalCore["default"].assert('HTMLBars error: Could not find component named "' + path + '" (no component or template with that name was found)', function () { if (path) { return found.component || found.layout; } else { return found.component || found.layout || contentTemplate; } @@ -9705,18 +9957,18 @@ options._context = _emberHtmlbarsHooksGetValue["default"](found.self); } component = componentInfo.component = createOrUpdateComponent(found.component, options, found.createOptions, renderNode, env, attrs); - var layout = _emberMetalProperty_get.get(component, "layout"); + var layout = _emberMetalProperty_get.get(component, 'layout'); if (layout) { componentInfo.layout = layout; if (!contentTemplate) { var template = getTemplate(component); if (template) { - _emberMetalCore["default"].deprecate("Using deprecated `template` property on a " + (component.isView ? "View" : "Component") + "."); + _emberMetalCore["default"].deprecate("Using deprecated `template` property on a " + (component.isView ? 'View' : 'Component') + "."); contentTemplate = template.raw; } } } else { componentInfo.layout = getTemplate(component) || componentInfo.layout; @@ -9761,11 +10013,11 @@ var element = this.expectElement && this.renderNode.firstNode; _emberHtmlbarsNodeManagersComponentNodeManager.handleLegacyRender(component, element); env.renderer.didCreateElement(component, element); // 2.0TODO: Remove legacy hooks. env.renderer.willInsertElement(component, element); - env.lifecycleHooks.push({ type: "didInsertElement", view: component }); + env.lifecycleHooks.push({ type: 'didInsertElement', view: component }); } }, this); }; ViewNodeManager.prototype.rerender = function (env, attrs, visitor) { @@ -9805,20 +10057,20 @@ this.component = null; } }; function getTemplate(componentOrView) { - return componentOrView.isComponent ? _emberMetalProperty_get.get(componentOrView, "_template") : _emberMetalProperty_get.get(componentOrView, "template"); + return componentOrView.isComponent ? _emberMetalProperty_get.get(componentOrView, '_template') : _emberMetalProperty_get.get(componentOrView, 'template'); } function createOrUpdateComponent(component, options, createOptions, renderNode, env) { var attrs = arguments.length <= 5 || arguments[5] === undefined ? {} : arguments[5]; var snapshot = takeSnapshot(attrs); var props = _emberMetalMerge["default"]({}, options); var defaultController = _emberViewsViewsView["default"].proto().controller; - var hasSuppliedController = "controller" in attrs || "controller" in props; + var hasSuppliedController = 'controller' in attrs || 'controller' in props; if (!props.ownerView && options.parentView) { props.ownerView = options.parentView.ownerView; } @@ -9830,12 +10082,12 @@ _emberMetalMerge["default"](props, createOptions); } mergeBindings(props, shadowedAttrs(proto, snapshot)); props.container = options.parentView ? options.parentView.container : env.container; - props.renderer = options.parentView ? options.parentView.renderer : props.container && props.container.lookup("renderer:-dom"); - props._viewRegistry = options.parentView ? options.parentView._viewRegistry : props.container && props.container.lookup("-view-registry:main"); + props.renderer = options.parentView ? options.parentView.renderer : props.container && props.container.lookup('renderer:-dom'); + props._viewRegistry = options.parentView ? options.parentView._viewRegistry : props.container && props.container.lookup('-view-registry:main'); if (proto.controller !== defaultController || hasSuppliedController) { delete props._context; } @@ -9892,11 +10144,11 @@ } // when `attrs` is an actual value being set in the // attrs hash (`{{foo-bar attrs="blah"}}`) we cannot // set `"blah"` to the root of the target because // that would replace all attrs with `attrs.attrs` - if (prop === "attrs") { + if (prop === 'attrs') { _emberMetalCore["default"].warn("Invoking a component with a hash attribute named `attrs` is not supported. Please refactor usage of " + target + " to avoid passing `attrs` as a hash parameter."); continue; } var value = attrs[prop]; @@ -9914,10 +10166,12 @@ // In theory this should come through the env, but it should // be safe to import this until we make the hook system public // and it gets actively used in addons or other downstream // libraries. enifed("ember-htmlbars/streams/built-in-helper", ["exports", "ember-metal/streams/stream", "ember-metal/platform/create", "ember-metal/merge", "ember-htmlbars/streams/utils"], function (exports, _emberMetalStreamsStream, _emberMetalPlatformCreate, _emberMetalMerge, _emberHtmlbarsStreamsUtils) { + "use strict"; + exports["default"] = BuiltInHelperStream; function BuiltInHelperStream(helper, params, hash, templates, env, scope, context, label) { this.init(label); this.helper = helper; @@ -9937,10 +10191,12 @@ return this.helper.call(this.context, _emberHtmlbarsStreamsUtils.getArrayValues(this.params), _emberHtmlbarsStreamsUtils.getHashValues(this.hash), this.templates, this.env, this.scope); } }); }); enifed("ember-htmlbars/streams/compat-helper", ["exports", "ember-metal/streams/stream", "ember-metal/platform/create", "ember-metal/merge"], function (exports, _emberMetalStreamsStream, _emberMetalPlatformCreate, _emberMetalMerge) { + "use strict"; + exports["default"] = CompatHelperStream; function CompatHelperStream(helper, params, hash, templates, env, scope, label) { this.init(label); this.helper = helper.helperFunction; @@ -9959,10 +10215,12 @@ return this.helper.call(undefined, this.params, this.hash, this.templates, this.env, this.scope); } }); }); enifed("ember-htmlbars/streams/helper-factory", ["exports", "ember-metal/streams/stream", "ember-metal/platform/create", "ember-metal/merge", "ember-htmlbars/streams/utils"], function (exports, _emberMetalStreamsStream, _emberMetalPlatformCreate, _emberMetalMerge, _emberHtmlbarsStreamsUtils) { + "use strict"; + exports["default"] = HelperFactoryStream; function HelperFactoryStream(helperFactory, params, hash, label) { this.init(label); this.helperFactory = helperFactory; @@ -9990,10 +10248,12 @@ }, super$deactivate: HelperFactoryStream.prototype.deactivate }); }); enifed("ember-htmlbars/streams/helper-instance", ["exports", "ember-metal/streams/stream", "ember-metal/platform/create", "ember-metal/merge", "ember-htmlbars/streams/utils"], function (exports, _emberMetalStreamsStream, _emberMetalPlatformCreate, _emberMetalMerge, _emberHtmlbarsStreamsUtils) { + "use strict"; + exports["default"] = HelperInstanceStream; function HelperInstanceStream(helper, params, hash, label) { this.init(label); this.helper = helper; @@ -10009,10 +10269,12 @@ return this.helper.compute(_emberHtmlbarsStreamsUtils.getArrayValues(this.params), _emberHtmlbarsStreamsUtils.getHashValues(this.hash)); } }); }); enifed("ember-htmlbars/streams/utils", ["exports", "ember-htmlbars/hooks/get-value"], function (exports, _emberHtmlbarsHooksGetValue) { + "use strict"; + exports.getArrayValues = getArrayValues; exports.getHashValues = getHashValues; // We don't want to leak mutable cells into helpers, which // are pure functions that can only work with values. @@ -10034,52 +10296,62 @@ return out; } }); enifed("ember-htmlbars/system/append-templated-view", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-views/views/view"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberViewsViewsView) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports["default"] = appendTemplatedView; function appendTemplatedView(parentView, morph, viewClassOrInstance, props) { var viewProto; if (_emberViewsViewsView["default"].detectInstance(viewClassOrInstance)) { viewProto = viewClassOrInstance; } else { viewProto = viewClassOrInstance.proto(); } - _emberMetalCore["default"].assert("You cannot provide a template block if you also specified a templateName", !props.template || !_emberMetalProperty_get.get(props, "templateName") && !_emberMetalProperty_get.get(viewProto, "templateName")); + _emberMetalCore["default"].assert("You cannot provide a template block if you also specified a templateName", !props.template || !_emberMetalProperty_get.get(props, 'templateName') && !_emberMetalProperty_get.get(viewProto, 'templateName')); // We only want to override the `_context` computed property if there is // no specified controller. See View#_context for more information. var noControllerInProto = !viewProto.controller; if (viewProto.controller && viewProto.controller.isDescriptor) { noControllerInProto = true; } if (noControllerInProto && !viewProto.controllerBinding && !props.controller && !props.controllerBinding) { - props._context = _emberMetalProperty_get.get(parentView, "context"); // TODO: is this right?! + props._context = _emberMetalProperty_get.get(parentView, 'context'); // TODO: is this right?! } props._morph = morph; return parentView.appendChild(viewClassOrInstance, props); } }); -/** -@module ember -@submodule ember-htmlbars -*/ - // Ember.assert enifed("ember-htmlbars/system/bootstrap", ["exports", "ember-metal/core", "ember-views/component_lookup", "ember-views/system/jquery", "ember-metal/error", "ember-runtime/system/lazy_load", "ember-template-compiler/system/compile", "ember-metal/environment"], function (exports, _emberMetalCore, _emberViewsComponent_lookup, _emberViewsSystemJquery, _emberMetalError, _emberRuntimeSystemLazy_load, _emberTemplateCompilerSystemCompile, _emberMetalEnvironment) { + /*globals Handlebars */ /** @module ember @submodule ember-htmlbars */ + "use strict"; + /** + @module ember + @submodule ember-htmlbars + */ + + /** Find templates stored in the head tag as script tags and make them available to `Ember.CoreView` in the global `Ember.TEMPLATES` object. This will be run as as jQuery DOM-ready callback. Script tags with `text/x-handlebars` will be compiled @@ -10092,34 +10364,34 @@ @for Ember.HTMLBars @static @param ctx */ function bootstrap(ctx) { - var selectors = "script[type=\"text/x-handlebars\"], script[type=\"text/x-raw-handlebars\"]"; + var selectors = 'script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]'; _emberViewsSystemJquery["default"](selectors, ctx).each(function () { // Get a reference to the script tag var script = _emberViewsSystemJquery["default"](this); // Get the name of the script, used by Ember.View's templateName property. // First look for data-template-name attribute, then fall back to its // id if no name is found. - var templateName = script.attr("data-template-name") || script.attr("id") || "application"; + var templateName = script.attr('data-template-name') || script.attr('id') || 'application'; var template, compile; - if (script.attr("type") === "text/x-raw-handlebars") { + if (script.attr('type') === 'text/x-raw-handlebars') { compile = _emberViewsSystemJquery["default"].proxy(Handlebars.compile, Handlebars); template = compile(script.html()); } else { template = _emberTemplateCompilerSystemCompile["default"](script.html(), { moduleName: templateName }); } // Check if template of same name already exists if (_emberMetalCore["default"].TEMPLATES[templateName] !== undefined) { - throw new _emberMetalError["default"]("Template named \"" + templateName + "\" already exists."); + throw new _emberMetalError["default"]('Template named "' + templateName + '" already exists.'); } // For templates which have a name, we save them and then remove them from the DOM _emberMetalCore["default"].TEMPLATES[templateName] = template; @@ -10131,11 +10403,11 @@ function _bootstrap() { bootstrap(_emberViewsSystemJquery["default"](document)); } function registerComponentLookup(app) { - app.registry.register("component-lookup:main", _emberViewsComponent_lookup["default"]); + app.registry.register('component-lookup:main', _emberViewsComponent_lookup["default"]); } /* We tie this to application.load to ensure that we've at least attempted to bootstrap at the point that the application is loaded. @@ -10145,31 +10417,27 @@ There's no harm to running this twice, since we remove the templates from the DOM after processing. */ - _emberRuntimeSystemLazy_load.onLoad("Ember.Application", function (Application) { + _emberRuntimeSystemLazy_load.onLoad('Ember.Application', function (Application) { Application.initializer({ - name: "domTemplates", + name: 'domTemplates', initialize: _emberMetalEnvironment["default"].hasDOM ? _bootstrap : function () {} }); Application.instanceInitializer({ - name: "registerComponentLookup", + name: 'registerComponentLookup', initialize: registerComponentLookup }); }); exports["default"] = bootstrap; }); -/*globals Handlebars */ - -/** -@module ember -@submodule ember-htmlbars -*/ enifed('ember-htmlbars/system/discover-known-helpers', ['exports', 'ember-metal/core', 'ember-metal/dictionary', 'ember-metal/keys'], function (exports, _emberMetalCore, _emberMetalDictionary, _emberMetalKeys) { + 'use strict'; + exports["default"] = discoverKnownHelpers; function discoverKnownHelpers(container) { var registry = container && container._registry; var helpers = _emberMetalDictionary["default"](null); @@ -10192,10 +10460,11 @@ return helpers; } }); enifed("ember-htmlbars/system/dom-helper", ["exports", "dom-helper", "ember-htmlbars/morphs/morph", "ember-htmlbars/morphs/attr-morph", "ember-metal/platform/create"], function (exports, _domHelper, _emberHtmlbarsMorphsMorph, _emberHtmlbarsMorphsAttrMorph, _emberMetalPlatformCreate) { + "use strict"; function EmberDOMHelper(_document) { _domHelper["default"].call(this, _document); } @@ -10209,20 +10478,24 @@ /** @module ember @submodule ember-templates */ + "use strict"; + function Helper(helper) { this.helperFunction = helper; this.isHelper = true; this.isHTMLBars = true; } exports["default"] = Helper; }); enifed('ember-htmlbars/system/instrumentation-support', ['exports', 'ember-metal/instrumentation'], function (exports, _emberMetalInstrumentation) { + 'use strict'; + exports.instrument = instrument; /** Provides instrumentation for node managers. @@ -10261,10 +10534,12 @@ return callback.call(context); } } }); enifed("ember-htmlbars/system/invoke-helper", ["exports", "ember-htmlbars/streams/helper-instance", "ember-htmlbars/streams/helper-factory", "ember-htmlbars/streams/built-in-helper", "ember-htmlbars/streams/compat-helper"], function (exports, _emberHtmlbarsStreamsHelperInstance, _emberHtmlbarsStreamsHelperFactory, _emberHtmlbarsStreamsBuiltInHelper, _emberHtmlbarsStreamsCompatHelper) { + "use strict"; + exports.buildHelperStream = buildHelperStream; function buildHelperStream(helper, params, hash, templates, env, scope, context, label) { Ember.assert("Helpers may not be used in the block form, for example {{#my-helper}}{{/my-helper}}. Please use a component, or alternatively use the helper in combination with a built-in Ember helper, for example {{#if (my-helper)}}{{/if}}.", !helper.isHelperInstance || !helper.isHelperFactory && !templates.template.meta); if (helper.isHelperFactory) { @@ -10277,15 +10552,22 @@ return new _emberHtmlbarsStreamsBuiltInHelper["default"](helper, params, hash, templates, env, scope, context, label); } } }); enifed("ember-htmlbars/system/lookup-helper", ["exports", "ember-metal/core", "ember-metal/cache", "ember-htmlbars/compat/helper"], function (exports, _emberMetalCore, _emberMetalCache, _emberHtmlbarsCompatHelper) { + /** + @module ember + @submodule ember-htmlbars + */ + + "use strict"; + exports.validateLazyHelperName = validateLazyHelperName; exports.findHelper = findHelper; exports["default"] = lookupHelper; var CONTAINS_DASH_CACHE = new _emberMetalCache["default"](1000, function (key) { - return key.indexOf("-") !== -1; + return key.indexOf('-') !== -1; }); exports.CONTAINS_DASH_CACHE = CONTAINS_DASH_CACHE; function validateLazyHelperName(helperName, container, keywords, knownHelpers) { @@ -10321,11 +10603,11 @@ var helper = env.helpers[name]; if (!helper) { var container = env.container; if (validateLazyHelperName(name, container, env.hooks.keywords, env.knownHelpers)) { - var helperName = "helper:" + name; + var helperName = 'helper:' + name; if (container._registry.has(helperName)) { helper = container.lookupFactory(helperName); if (isLegacyBareHelper(helper)) { _emberMetalCore["default"].deprecate("The helper \"" + name + "\" is a deprecated bare function helper. Please use Ember.Helper.build to wrap helper functions."); helper = new _emberHtmlbarsCompatHelper["default"](helper); @@ -10343,16 +10625,15 @@ _emberMetalCore["default"].assert("A helper named '" + name + "' could not be found", !!helper); return helper; } }); -/** -@module ember -@submodule ember-htmlbars -*/ -enifed("ember-htmlbars/system/make-view-helper", ["exports"], function (exports) { +enifed('ember-htmlbars/system/make-view-helper', ['exports', 'ember-metal/core'], function (exports, _emberMetalCore) { + 'use strict'; + exports["default"] = makeViewHelper; + /** @module ember @submodule ember-htmlbars */ @@ -10367,18 +10648,26 @@ @param {Function} ViewClass view class constructor @since 1.2.0 */ function makeViewHelper(ViewClass) { + _emberMetalCore["default"].deprecate('`Ember.Handlebars.makeViewHelper` and `Ember.HTMLBars.makeViewHelper` are deprecated. Please refactor to normal component usage.', false, { id: 'ember-htmlbars.make-view-helper', until: '2.0.0' }); + return { isLegacyViewHelper: true, isHTMLBars: true, viewClass: ViewClass }; } }); -enifed("ember-htmlbars/system/make_bound_helper", ["exports", "ember-htmlbars/helper"], function (exports, _emberHtmlbarsHelper) { +enifed('ember-htmlbars/system/make_bound_helper', ['exports', 'ember-metal/core', 'ember-htmlbars/helper'], function (exports, _emberMetalCore, _emberHtmlbarsHelper) { + /** + @module ember + @submodule ember-htmlbars + */ + 'use strict'; + exports["default"] = makeBoundHelper; /** Create a bound helper. Accepts a function that receives the ordered and hash parameters from the template. If a bound property was provided in the template it will be resolved to its @@ -10422,18 +10711,17 @@ @param {Function} fn @since 1.10.0 */ function makeBoundHelper(fn) { + _emberMetalCore["default"].deprecate('Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to using `Ember.Helper` or `Ember.Helper.helper`.', false, { id: 'ember-htmlbars.make-bound-helper', until: '3.0.0' }); return _emberHtmlbarsHelper.helper(fn); } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed("ember-htmlbars/system/render-env", ["exports", "ember-htmlbars/env", "ember-htmlbars/system/discover-known-helpers"], function (exports, _emberHtmlbarsEnv, _emberHtmlbarsSystemDiscoverKnownHelpers) { + "use strict"; + exports["default"] = RenderEnv; function RenderEnv(options) { this.lifecycleHooks = options.lifecycleHooks || []; this.renderedViews = options.renderedViews || []; @@ -10493,26 +10781,30 @@ knownHelpers: this.knownHelpers }); }; }); enifed("ember-htmlbars/system/render-view", ["exports", "ember-htmlbars/node-managers/view-node-manager", "ember-htmlbars/system/render-env"], function (exports, _emberHtmlbarsNodeManagersViewNodeManager, _emberHtmlbarsSystemRenderEnv) { + "use strict"; + exports.renderHTMLBarsBlock = renderHTMLBarsBlock; // This function only gets called once per render of a "root view" (`appendTo`). Otherwise, // HTMLBars propagates the existing env and renders templates for a given render node. function renderHTMLBarsBlock(view, block, renderNode) { var env = _emberHtmlbarsSystemRenderEnv["default"].build(view); view.env = env; _emberHtmlbarsNodeManagersViewNodeManager.createOrUpdateComponent(view, {}, null, renderNode, env); - var nodeManager = new _emberHtmlbarsNodeManagersViewNodeManager["default"](view, null, renderNode, block, view.tagName !== ""); + var nodeManager = new _emberHtmlbarsNodeManagersViewNodeManager["default"](view, null, renderNode, block, view.tagName !== ''); nodeManager.render(env, {}); } }); enifed("ember-htmlbars/templates/component", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { return { meta: {}, arity: 0, cachedFragment: null, @@ -10535,10 +10827,12 @@ templates: [] }; })()); }); enifed("ember-htmlbars/templates/container-view", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { var child0 = (function () { return { meta: {}, arity: 1, @@ -10633,10 +10927,12 @@ templates: [child0, child1] }; })()); }); enifed("ember-htmlbars/templates/empty", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { return { meta: {}, arity: 0, cachedFragment: null, @@ -10653,10 +10949,12 @@ templates: [] }; })()); }); enifed("ember-htmlbars/templates/legacy-each", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { var child0 = (function () { var child0 = (function () { var child0 = (function () { var child0 = (function () { @@ -10943,10 +11241,12 @@ templates: [child0, child1] }; })()); }); enifed("ember-htmlbars/templates/link-to-escaped", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { return { meta: {}, arity: 0, cachedFragment: null, @@ -10969,10 +11269,12 @@ templates: [] }; })()); }); enifed("ember-htmlbars/templates/link-to-unescaped", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { return { meta: {}, arity: 0, cachedFragment: null, @@ -10995,10 +11297,12 @@ templates: [] }; })()); }); enifed("ember-htmlbars/templates/link-to", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { var child0 = (function () { var child0 = (function () { return { meta: {}, @@ -11117,10 +11421,12 @@ templates: [child0, child1] }; })()); }); enifed("ember-htmlbars/templates/select-optgroup", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { var child0 = (function () { return { meta: {}, arity: 1, @@ -11167,10 +11473,12 @@ templates: [child0] }; })()); }); enifed("ember-htmlbars/templates/select-option", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { return { meta: {}, arity: 0, cachedFragment: null, @@ -11193,10 +11501,12 @@ templates: [] }; })()); }); enifed("ember-htmlbars/templates/select", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { var child0 = (function () { return { meta: {}, arity: 0, @@ -11344,10 +11654,12 @@ templates: [child0, child1, child2] }; })()); }); enifed("ember-htmlbars/templates/top-level-view", ["exports", "ember-template-compiler/system/template"], function (exports, _emberTemplateCompilerSystemTemplate) { + "use strict"; + exports["default"] = _emberTemplateCompilerSystemTemplate["default"]((function () { return { meta: {}, arity: 0, cachedFragment: null, @@ -11370,17 +11682,19 @@ templates: [] }; })()); }); enifed("ember-htmlbars/utils/decode-each-key", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/utils"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalUtils) { + "use strict"; + exports["default"] = decodeEachKey; function identity(item) { var key = undefined; var type = typeof item; - if (type === "string" || type === "number") { + if (type === 'string' || type === 'number') { key = item; } else { key = _emberMetalUtils.guidFor(item); } @@ -11389,42 +11703,49 @@ function decodeEachKey(item, keyPath, index) { var key, deprecatedSpecialKey; switch (keyPath) { - case "@index": + case '@index': key = index; break; - case "@guid": - deprecatedSpecialKey = "@guid"; + case '@guid': + deprecatedSpecialKey = '@guid'; key = _emberMetalUtils.guidFor(item); break; - case "@item": - deprecatedSpecialKey = "@item"; + case '@item': + deprecatedSpecialKey = '@item'; key = item; break; - case "@identity": + case '@identity': key = identity(item); break; default: if (keyPath) { key = _emberMetalProperty_get.get(item, keyPath); } else { key = identity(item); } } - if (typeof key === "number") { + if (typeof key === 'number') { key = String(key); } _emberMetalCore["default"].deprecate("Using '" + deprecatedSpecialKey + "' with the {{each}} helper, is deprecated. Switch to '@identity' or remove 'key=' from your template.", !deprecatedSpecialKey); return key; } }); enifed('ember-htmlbars/utils/is-component', ['exports', 'ember-htmlbars/system/lookup-helper'], function (exports, _emberHtmlbarsSystemLookupHelper) { + /** + @module ember + @submodule ember-htmlbars + */ + + 'use strict'; + exports["default"] = isComponent; /* Given a path name, returns whether or not a component with that name was found in the container. @@ -11439,15 +11760,13 @@ return false; } return container._registry.has('component:' + path) || container._registry.has('template:components/' + path); } }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed('ember-htmlbars/utils/lookup-component', ['exports'], function (exports) { + 'use strict'; + exports["default"] = lookupComponent; function lookupComponent(container, tagName) { var componentLookup = container.lookup('component-lookup:main'); @@ -11456,10 +11775,12 @@ layout: componentLookup.layoutFor(tagName, container) }; } }); enifed("ember-htmlbars/utils/normalize-self", ["exports"], function (exports) { + "use strict"; + exports["default"] = normalizeSelf; function normalizeSelf(self) { if (self === undefined) { return null; @@ -11467,11 +11788,18 @@ return self; } } }); enifed("ember-htmlbars/utils/string", ["exports", "htmlbars-util", "ember-runtime/system/string"], function (exports, _htmlbarsUtil, _emberRuntimeSystemString) { + /** + @module ember + @submodule ember-htmlbars + */ + // required so we can extend this object. + "use strict"; + /** Mark a string as safe for unescaped output with Ember templates. If you return HTML from a helper, use this function to ensure Ember's rendering layer does not escape the HTML. @@ -11488,12 +11816,12 @@ function htmlSafe(str) { if (str === null || str === undefined) { return ""; } - if (typeof str !== "string") { - str = "" + str; + if (typeof str !== 'string') { + str = '' + str; } return new _htmlbarsUtil.SafeString(str); } _emberRuntimeSystemString["default"].htmlSafe = htmlSafe; @@ -11505,17 +11833,13 @@ exports.SafeString = _htmlbarsUtil.SafeString; exports.htmlSafe = htmlSafe; exports.escapeExpression = _htmlbarsUtil.escapeExpression; }); -/** -@module ember -@submodule ember-htmlbars -*/ - -// required so we can extend this object. enifed("ember-htmlbars/utils/subscribe", ["exports", "ember-metal/streams/utils"], function (exports, _emberMetalStreamsUtils) { + "use strict"; + exports["default"] = subscribe; function subscribe(node, env, scope, stream) { if (!_emberMetalStreamsUtils.isStream(stream)) { return; @@ -11542,10 +11866,12 @@ node.ownerNode.emberView.scheduleRevalidate(node, _emberMetalStreamsUtils.labelFor(stream)); })); } }); enifed("ember-htmlbars/utils/update-scope", ["exports", "ember-metal/streams/proxy-stream", "ember-htmlbars/utils/subscribe"], function (exports, _emberMetalStreamsProxyStream, _emberHtmlbarsUtilsSubscribe) { + "use strict"; + exports["default"] = updateScope; function updateScope(scope, key, newValue, renderNode, isSelf) { var existing = scope[key]; @@ -11559,28 +11885,32 @@ scope[key] = stream; } } }); enifed('ember-metal-views', ['exports', 'ember-metal-views/renderer'], function (exports, _emberMetalViewsRenderer) { + 'use strict'; + exports.Renderer = _emberMetalViewsRenderer["default"]; }); enifed("ember-metal-views/renderer", ["exports", "ember-metal/run_loop", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/merge", "ember-metal/set_properties", "ember-views/system/build-component-template", "ember-metal/enumerable_utils"], function (exports, _emberMetalRun_loop, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalMerge, _emberMetalSet_properties, _emberViewsSystemBuildComponentTemplate, _emberMetalEnumerable_utils) { + "use strict"; + //import { deprecation } from "ember-views/compat/attrs-proxy"; function Renderer(_helper) { this._dom = _helper; } Renderer.prototype.prerenderTopLevelView = function Renderer_prerenderTopLevelView(view, renderNode) { - if (view._state === "inDOM") { + if (view._state === 'inDOM') { throw new Error("You cannot insert a View that has already been rendered"); } view.ownerView = renderNode.emberView = view; view._renderNode = renderNode; - var layout = _emberMetalProperty_get.get(view, "layout"); - var template = view.isComponent ? _emberMetalProperty_get.get(view, "_template") : _emberMetalProperty_get.get(view, "template"); + var layout = _emberMetalProperty_get.get(view, 'layout'); + var template = view.isComponent ? _emberMetalProperty_get.get(view, '_template') : _emberMetalProperty_get.get(view, 'template'); var componentInfo = { component: view, layout: layout }; var block = _emberViewsSystemBuildComponentTemplate["default"](componentInfo, {}, { self: view, @@ -11605,11 +11935,11 @@ // This guard prevents revalidation on an already-destroyed view. if (view._renderNode.lastResult) { view._renderNode.lastResult.revalidate(view.env); // supports createElement, which operates without moving the view into // the inDOM state. - if (view._state === "inDOM") { + if (view._state === 'inDOM') { this.dispatchLifecycleHooks(view.env); } this.clearRenderedViews(view.env); } }; @@ -11623,13 +11953,13 @@ for (i = 0; i < lifecycleHooks.length; i++) { hook = lifecycleHooks[i]; ownerView._dispatching = hook.type; switch (hook.type) { - case "didInsertElement": + case 'didInsertElement': this.didInsertElement(hook.view);break; - case "didUpdate": + case 'didUpdate': this.didUpdate(hook.view);break; } this.didRender(hook.view); } @@ -11639,11 +11969,11 @@ }; Renderer.prototype.ensureViewNotRendering = function Renderer_ensureViewNotRendering(view) { var env = view.ownerView.env; if (env && _emberMetalEnumerable_utils.indexOf(env.renderedViews, view.elementId) !== -1) { - throw new Error("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM."); + throw new Error('Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.'); } }; Renderer.prototype.clearRenderedViews = function Renderer_clearRenderedViews(env) { env.renderedNodes = {}; @@ -11653,18 +11983,18 @@ // This entry point is called from top-level `view.appendTo` Renderer.prototype.appendTo = function Renderer_appendTo(view, target) { var morph = this._dom.appendMorph(target); morph.ownerNode = morph; view._willInsert = true; - _emberMetalRun_loop["default"].schedule("render", this, this.renderTopLevelView, view, morph); + _emberMetalRun_loop["default"].schedule('render', this, this.renderTopLevelView, view, morph); }; Renderer.prototype.replaceIn = function Renderer_replaceIn(view, target) { var morph = this._dom.replaceContentWithMorph(target); morph.ownerNode = morph; view._willInsert = true; - _emberMetalRun_loop["default"].scheduleOnce("render", this, this.renderTopLevelView, view, morph); + _emberMetalRun_loop["default"].scheduleOnce('render', this, this.renderTopLevelView, view, morph); }; Renderer.prototype.createElement = function Renderer_createElement(view) { var morph = this._dom.createFragmentMorph(); morph.ownerNode = morph; @@ -11675,49 +12005,48 @@ if (element) { view.element = element; } if (view._transitionTo) { - view._transitionTo("hasElement"); + view._transitionTo('hasElement'); } }; // hasElement Renderer.prototype.willInsertElement = function (view) { if (view.trigger) { - view.trigger("willInsertElement"); + view.trigger('willInsertElement'); } }; // will place into DOM Renderer.prototype.setAttrs = function (view, attrs) { - _emberMetalProperty_set.set(view, "attrs", attrs); + _emberMetalProperty_set.set(view, 'attrs', attrs); }; // set attrs the first time Renderer.prototype.componentInitAttrs = function (component, attrs) { - _emberMetalProperty_set.set(component, "attrs", attrs); - component.trigger("didInitAttrs", { attrs: attrs }); - component.trigger("didReceiveAttrs", { newAttrs: attrs }); + component.trigger('didInitAttrs', { attrs: attrs }); + component.trigger('didReceiveAttrs', { newAttrs: attrs }); }; // set attrs the first time Renderer.prototype.didInsertElement = function (view) { if (view._transitionTo) { - view._transitionTo("inDOM"); + view._transitionTo('inDOM'); } if (view.trigger) { - view.trigger("didInsertElement"); + view.trigger('didInsertElement'); } }; // inDOM // placed into DOM Renderer.prototype.didUpdate = function (view) { if (view.trigger) { - view.trigger("didUpdate"); + view.trigger('didUpdate'); } }; Renderer.prototype.didRender = function (view) { if (view.trigger) { - view.trigger("didRender"); + view.trigger('didRender'); } }; Renderer.prototype.updateAttrs = function (view, attrs) { this.setAttrs(view, attrs); @@ -11728,42 +12057,42 @@ if (component.attrs) { oldAttrs = _emberMetalMerge.assign({}, component.attrs); _emberMetalSet_properties["default"](component.attrs, newAttrs); } else { - _emberMetalProperty_set.set(component, "attrs", newAttrs); + _emberMetalProperty_set.set(component, 'attrs', newAttrs); } - component.trigger("didUpdateAttrs", { oldAttrs: oldAttrs, newAttrs: newAttrs }); - component.trigger("didReceiveAttrs", { oldAttrs: oldAttrs, newAttrs: newAttrs }); + component.trigger('didUpdateAttrs', { oldAttrs: oldAttrs, newAttrs: newAttrs }); + component.trigger('didReceiveAttrs', { oldAttrs: oldAttrs, newAttrs: newAttrs }); }; Renderer.prototype.willUpdate = function (view, attrs) { if (view._willUpdate) { view._willUpdate(attrs); } }; Renderer.prototype.componentWillUpdate = function (component) { - component.trigger("willUpdate"); + component.trigger('willUpdate'); }; Renderer.prototype.willRender = function (view) { if (view._willRender) { view._willRender(); } }; Renderer.prototype.componentWillRender = function (component) { - component.trigger("willRender"); + component.trigger('willRender'); }; Renderer.prototype.remove = function (view, shouldDestroy) { this.willDestroyElement(view); view._willRemoveElement = true; - _emberMetalRun_loop["default"].schedule("render", this, this.renderElementRemoval, view); + _emberMetalRun_loop["default"].schedule('render', this, this.renderElementRemoval, view); }; Renderer.prototype.renderElementRemoval = function Renderer_renderElementRemoval(view) { // Use the _willRemoveElement flag to avoid mulitple removal attempts in // case many have been scheduled. This should be more performant than using @@ -11776,47 +12105,53 @@ } this.didDestroyElement(view); } }; - Renderer.prototype.willRemoveElement = function () {}; + Renderer.prototype.willRemoveElement = function () /*view*/{}; Renderer.prototype.willDestroyElement = function (view) { if (view._willDestroyElement) { view._willDestroyElement(); } if (view.trigger) { - view.trigger("willDestroyElement"); - view.trigger("willClearRender"); + view.trigger('willDestroyElement'); + view.trigger('willClearRender'); } if (view._transitionTo) { - view._transitionTo("destroying"); + view._transitionTo('destroying'); } }; Renderer.prototype.didDestroyElement = function (view) { view.element = null; // Views that are being destroyed should never go back to the preRender state. // However if we're just destroying an element on a view (as is the case when // using View#remove) then the view should go to a preRender state so that // it can be rendered again later. - if (view._state !== "destroying") { - view._transitionTo("preRender"); + if (view._state !== 'destroying') { + view._transitionTo('preRender'); } if (view.trigger) { - view.trigger("didDestroyElement"); + view.trigger('didDestroyElement'); } }; // element destroyed so view.destroy shouldn't try to remove it removedFromDOM exports["default"] = Renderer; }); -/*view*/ enifed("ember-metal", ["exports", "ember-metal/core", "ember-metal/merge", "ember-metal/instrumentation", "ember-metal/utils", "ember-metal/error", "ember-metal/enumerable_utils", "ember-metal/cache", "ember-metal/platform/define_property", "ember-metal/platform/create", "ember-metal/array", "ember-metal/logger", "ember-metal/property_get", "ember-metal/events", "ember-metal/observer_set", "ember-metal/property_events", "ember-metal/properties", "ember-metal/property_set", "ember-metal/map", "ember-metal/get_properties", "ember-metal/set_properties", "ember-metal/watch_key", "ember-metal/chains", "ember-metal/watch_path", "ember-metal/watching", "ember-metal/expand_properties", "ember-metal/computed", "ember-metal/alias", "ember-metal/computed_macros", "ember-metal/observer", "ember-metal/mixin", "ember-metal/binding", "ember-metal/run_loop", "ember-metal/libraries", "ember-metal/is_none", "ember-metal/is_empty", "ember-metal/is_blank", "ember-metal/is_present", "ember-metal/keys", "backburner", "ember-metal/streams/utils", "ember-metal/streams/stream"], function (exports, _emberMetalCore, _emberMetalMerge, _emberMetalInstrumentation, _emberMetalUtils, _emberMetalError, _emberMetalEnumerable_utils, _emberMetalCache, _emberMetalPlatformDefine_property, _emberMetalPlatformCreate, _emberMetalArray, _emberMetalLogger, _emberMetalProperty_get, _emberMetalEvents, _emberMetalObserver_set, _emberMetalProperty_events, _emberMetalProperties, _emberMetalProperty_set, _emberMetalMap, _emberMetalGet_properties, _emberMetalSet_properties, _emberMetalWatch_key, _emberMetalChains, _emberMetalWatch_path, _emberMetalWatching, _emberMetalExpand_properties, _emberMetalComputed, _emberMetalAlias, _emberMetalComputed_macros, _emberMetalObserver, _emberMetalMixin, _emberMetalBinding, _emberMetalRun_loop, _emberMetalLibraries, _emberMetalIs_none, _emberMetalIs_empty, _emberMetalIs_blank, _emberMetalIs_present, _emberMetalKeys, _backburner, _emberMetalStreamsUtils, _emberMetalStreamsStream) { + /** + @module ember + @submodule ember-metal + */ + // BEGIN IMPORTS + "use strict"; + _emberMetalComputed.computed.empty = _emberMetalComputed_macros.empty; _emberMetalComputed.computed.notEmpty = _emberMetalComputed_macros.notEmpty; _emberMetalComputed.computed.none = _emberMetalComputed_macros.none; _emberMetalComputed.computed.not = _emberMetalComputed_macros.not; _emberMetalComputed.computed.bool = _emberMetalComputed_macros.bool; @@ -11980,11 +12315,11 @@ // this is the new go forward, once Ember Data updates to using `_Backburner` we // can remove the non-underscored version. _emberMetalCore["default"]._Backburner = _backburner["default"]; _emberMetalCore["default"].libraries = new _emberMetalLibraries["default"](); - _emberMetalCore["default"].libraries.registerCoreLibrary("Ember", _emberMetalCore["default"].VERSION); + _emberMetalCore["default"].libraries.registerCoreLibrary('Ember', _emberMetalCore["default"].VERSION); _emberMetalCore["default"].isNone = _emberMetalIs_none["default"]; _emberMetalCore["default"].isEmpty = _emberMetalIs_empty["default"]; _emberMetalCore["default"].isBlank = _emberMetalIs_blank["default"]; _emberMetalCore["default"].isPresent = _emberMetalIs_present["default"]; @@ -12017,31 +12352,27 @@ // END EXPORTS // do this for side-effects of updating Ember.assert, warn, etc when // ember-debug is present // This needs to be called before any deprecateFunc - if (_emberMetalCore["default"].__loader.registry["ember-debug"]) { - requireModule("ember-debug"); + if (_emberMetalCore["default"].__loader.registry['ember-debug']) { + requireModule('ember-debug'); } - _emberMetalCore["default"].create = _emberMetalCore["default"].deprecateFunc("Ember.create is deprecated in favor of Object.create", _emberMetalPlatformCreate["default"]); - _emberMetalCore["default"].keys = _emberMetalCore["default"].deprecateFunc("Ember.keys is deprecated in favor of Object.keys", _emberMetalKeys["default"]); + _emberMetalCore["default"].create = _emberMetalCore["default"].deprecateFunc('Ember.create is deprecated in favor of Object.create', _emberMetalPlatformCreate["default"]); + _emberMetalCore["default"].keys = _emberMetalCore["default"].deprecateFunc('Ember.keys is deprecated in favor of Object.keys', _emberMetalKeys["default"]); - _emberMetalCore["default"].addBeforeObserver = _emberMetalCore["default"].deprecateFunc("Ember.addBeforeObserver is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalObserver._addBeforeObserver); - _emberMetalCore["default"].removeBeforeObserver = _emberMetalCore["default"].deprecateFunc("Ember.removeBeforeObserver is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalObserver._removeBeforeObserver); - _emberMetalCore["default"].beforeObserversFor = _emberMetalCore["default"].deprecateFunc("Ember.beforeObserversFor is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalObserver._beforeObserversFor); - _emberMetalCore["default"].beforeObserver = _emberMetalCore["default"].deprecateFunc("Ember.beforeObserver is deprecated and will be removed in the near future.", { url: "http://emberjs.com/deprecations/v1.x/#toc_beforeobserver" }, _emberMetalMixin._beforeObserver); + _emberMetalCore["default"].addBeforeObserver = _emberMetalCore["default"].deprecateFunc('Ember.addBeforeObserver is deprecated and will be removed in the near future.', { url: 'http://emberjs.com/deprecations/v1.x/#toc_beforeobserver' }, _emberMetalObserver._addBeforeObserver); + _emberMetalCore["default"].removeBeforeObserver = _emberMetalCore["default"].deprecateFunc('Ember.removeBeforeObserver is deprecated and will be removed in the near future.', { url: 'http://emberjs.com/deprecations/v1.x/#toc_beforeobserver' }, _emberMetalObserver._removeBeforeObserver); + _emberMetalCore["default"].beforeObserversFor = _emberMetalCore["default"].deprecateFunc('Ember.beforeObserversFor is deprecated and will be removed in the near future.', { url: 'http://emberjs.com/deprecations/v1.x/#toc_beforeobserver' }, _emberMetalObserver._beforeObserversFor); + _emberMetalCore["default"].beforeObserver = _emberMetalCore["default"].deprecateFunc('Ember.beforeObserver is deprecated and will be removed in the near future.', { url: 'http://emberjs.com/deprecations/v1.x/#toc_beforeobserver' }, _emberMetalMixin._beforeObserver); exports["default"] = _emberMetalCore["default"]; }); -/** -@module ember -@submodule ember-metal -*/ - -// BEGIN IMPORTS enifed("ember-metal/alias", ["exports", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/core", "ember-metal/error", "ember-metal/properties", "ember-metal/computed", "ember-metal/platform/create", "ember-metal/utils", "ember-metal/dependent_keys"], function (exports, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalCore, _emberMetalError, _emberMetalProperties, _emberMetalComputed, _emberMetalPlatformCreate, _emberMetalUtils, _emberMetalDependent_keys) { + "use strict"; + exports["default"] = alias; exports.AliasedProperty = AliasedProperty; function alias(altKey) { return new AliasedProperty(altKey); @@ -12114,17 +12445,19 @@ /** @module ember @submodule ember-metal */ + "use strict"; + var ArrayPrototype = Array.prototype; // Testing this is not ideal, but we want to use native functions // if available, but not to use versions created by libraries like Prototype var isNativeFunc = function (func) { // This should probably work in all browsers likely to have ES5 array methods - return func && Function.prototype.toString.call(func).indexOf("[native code]") > -1; + return func && Function.prototype.toString.call(func).indexOf('[native code]') > -1; }; var defineNativeShim = function (nativeFunc, shim) { if (isNativeFunc(nativeFunc)) { return nativeFunc; @@ -12244,10 +12577,12 @@ exports.filter = filter; exports.indexOf = indexOf; exports.lastIndexOf = lastIndexOf; }); enifed("ember-metal/binding", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/utils", "ember-metal/observer", "ember-metal/run_loop", "ember-metal/path_cache"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalUtils, _emberMetalObserver, _emberMetalRun_loop, _emberMetalPath_cache) { + "use strict"; + exports.bind = bind; exports.oneWay = oneWay; // ES6TODO: where is Ember.lookup defined? /** @@ -12376,11 +12711,11 @@ @method toString @return {String} string representation of binding @public */ toString: function () { - var oneWay = this._oneWay ? "[oneWay]" : ""; + var oneWay = this._oneWay ? '[oneWay]' : ''; return "Ember.Binding<" + _emberMetalUtils.guidFor(this) + ">(" + this._from + " -> " + this._to + ")" + oneWay; }, // .......................................................... // CONNECT AND SYNC @@ -12394,11 +12729,11 @@ @param {Object} obj The root object for this binding. @return {Ember.Binding} `this` @public */ connect: function (obj) { - _emberMetalCore["default"].assert("Must pass a valid object to Ember.Binding.connect()", !!obj); + _emberMetalCore["default"].assert('Must pass a valid object to Ember.Binding.connect()', !!obj); var fromPath = this._from; var toPath = this._to; _emberMetalProperty_set.trySet(obj, toPath, getWithGlobals(obj, fromPath)); @@ -12422,11 +12757,11 @@ @param {Object} obj The root object you passed when connecting the binding. @return {Ember.Binding} `this` @public */ disconnect: function (obj) { - _emberMetalCore["default"].assert("Must pass a valid object to Ember.Binding.disconnect()", !!obj); + _emberMetalCore["default"].assert('Must pass a valid object to Ember.Binding.disconnect()', !!obj); var twoWay = !this._oneWay; // remove an observer on the object so we're no longer notified of // changes that should update bindings. @@ -12445,31 +12780,31 @@ // PRIVATE // /* called when the from side changes */ fromDidChange: function (target) { - this._scheduleSync(target, "fwd"); + this._scheduleSync(target, 'fwd'); }, /* called when the to side changes */ toDidChange: function (target) { - this._scheduleSync(target, "back"); + this._scheduleSync(target, 'back'); }, _scheduleSync: function (obj, dir) { var existingDir = this._direction; // if we haven't scheduled the binding yet, schedule it if (existingDir === undefined) { - _emberMetalRun_loop["default"].schedule("sync", this, this._sync, obj); + _emberMetalRun_loop["default"].schedule('sync', this, this._sync, obj); this._direction = dir; } // If both a 'back' and 'fwd' sync have been scheduled on the same object, // default to a 'fwd' sync so that it remains deterministic. - if (existingDir === "back" && dir === "fwd") { - this._direction = "fwd"; + if (existingDir === 'back' && dir === 'fwd') { + this._direction = 'fwd'; } }, _sync: function (obj) { var log = _emberMetalCore["default"].LOG_BINDINGS; @@ -12487,32 +12822,32 @@ var toPath = this._to; this._direction = undefined; // if we're synchronizing from the remote object... - if (direction === "fwd") { + if (direction === 'fwd') { var fromValue = getWithGlobals(obj, this._from); if (log) { - _emberMetalCore["default"].Logger.log(" ", this.toString(), "->", fromValue, obj); + _emberMetalCore["default"].Logger.log(' ', this.toString(), '->', fromValue, obj); } if (this._oneWay) { _emberMetalProperty_set.trySet(obj, toPath, fromValue); } else { _emberMetalObserver._suspendObserver(obj, toPath, this, this.toDidChange, function () { _emberMetalProperty_set.trySet(obj, toPath, fromValue); }); } // if we're synchronizing *to* the remote object - } else if (direction === "back") { - var toValue = _emberMetalProperty_get.get(obj, this._to); - if (log) { - _emberMetalCore["default"].Logger.log(" ", this.toString(), "<-", toValue, obj); + } else if (direction === 'back') { + var toValue = _emberMetalProperty_get.get(obj, this._to); + if (log) { + _emberMetalCore["default"].Logger.log(' ', this.toString(), '<-', toValue, obj); + } + _emberMetalObserver._suspendObserver(obj, fromPath, this, this.fromDidChange, function () { + _emberMetalProperty_set.trySet(_emberMetalPath_cache.isGlobal(fromPath) ? _emberMetalCore["default"].lookup : obj, fromPath, toValue); + }); } - _emberMetalObserver._suspendObserver(obj, fromPath, this, this.fromDidChange, function () { - _emberMetalProperty_set.trySet(_emberMetalPath_cache.isGlobal(fromPath) ? _emberMetalCore["default"].lookup : obj, fromPath, toValue); - }); - } } }; function mixinProperties(to, from) { @@ -12560,11 +12895,11 @@ @return {Ember.Binding} `this` @deprecated @public */ oneWay: function (from, flag) { - _emberMetalCore["default"].deprecate("Ember.oneWay has been deprecated. Please use Ember.computed.oneWay instead.", false); + _emberMetalCore["default"].deprecate('Ember.oneWay has been deprecated. Please use Ember.computed.oneWay instead.', false); var C = this; return new C(undefined, from).oneWay(flag); } }); @@ -12738,10 +13073,12 @@ exports.Binding = Binding; exports.isGlobalPath = _emberMetalPath_cache.isGlobal; }); // Ember.Logger, Ember.LOG_BINDINGS, assert enifed('ember-metal/cache', ['exports', 'ember-metal/dictionary'], function (exports, _emberMetalDictionary) { + 'use strict'; + exports["default"] = Cache; function Cache(limit, func) { this.store = _emberMetalDictionary["default"](null); this.size = 0; @@ -12791,10 +13128,12 @@ this.misses = 0; } }; }); enifed("ember-metal/chains", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/utils", "ember-metal/array", "ember-metal/watch_key"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalUtils, _emberMetalArray, _emberMetalWatch_key) { + "use strict"; + exports.flushPendingChains = flushPendingChains; exports.finishChains = finishChains; var warn = _emberMetalCore["default"].warn; var FIRST_KEY = /^([^\.]+)/; @@ -12802,11 +13141,11 @@ function firstKey(path) { return path.match(FIRST_KEY)[0]; } function isObject(obj) { - return obj && typeof obj === "object"; + return obj && typeof obj === 'object'; } var pendingQueue = []; // attempts to add the pendingQueue chains again. If some of them end up @@ -12823,22 +13162,22 @@ _emberMetalArray.forEach.call(queue, function (q) { q[0].add(q[1]); }); - warn("Watching an undefined global, Ember expects watched globals to be" + " setup by the time the run loop is flushed, check for typos", pendingQueue.length === 0); + warn('Watching an undefined global, Ember expects watched globals to be' + ' setup by the time the run loop is flushed, check for typos', pendingQueue.length === 0); } function addChainWatcher(obj, keyName, node) { if (!isObject(obj)) { return; } var m = _emberMetalUtils.meta(obj); var nodes = m.chainWatchers; - if (!m.hasOwnProperty("chainWatchers")) { + if (!m.hasOwnProperty('chainWatchers')) { // FIXME?! nodes = m.chainWatchers = {}; } if (!nodes[keyName]) { @@ -12851,12 +13190,12 @@ function removeChainWatcher(obj, keyName, node) { if (!isObject(obj)) { return; } - var m = obj["__ember_meta__"]; - if (m && !m.hasOwnProperty("chainWatchers")) { + var m = obj['__ember_meta__']; + if (m && !m.hasOwnProperty('chainWatchers')) { return; } // nothing to do var nodes = m && m.chainWatchers; @@ -12899,21 +13238,21 @@ // Special-case: the EachProxy relies on immediate evaluation to // establish its observers. // // TODO: Replace this with an efficient callback that the EachProxy // can implement. - if (this._parent && this._parent._key === "@each") { + if (this._parent && this._parent._key === '@each') { this.value(); } } function lazyGet(obj, key) { if (!obj) { return; } - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; // check if object meant only to be a prototype if (meta && meta.proto === obj) { return; } @@ -12921,11 +13260,11 @@ return _emberMetalProperty_get.get(obj, key); } // if a CP only return cached value var possibleDesc = obj[key]; - var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; if (desc && desc._cacheable) { if (meta.cache && key in meta.cache) { return meta.cache[key]; } else { return; @@ -12988,20 +13327,20 @@ path = path.slice(key.length + 1); // global path, but object does not exist yet. // put into a queue and try to connect later. } else if (!tuple[0]) { - pendingQueue.push([this, path]); - tuple.length = 0; - return; + pendingQueue.push([this, path]); + tuple.length = 0; + return; - // global path, and object already exists - } else { - src = tuple[0]; - key = path.slice(0, 0 - (tuple[1].length + 1)); - path = tuple[1]; - } + // global path, and object already exists + } else { + src = tuple[0]; + key = path.slice(0, 0 - (tuple[1].length + 1)); + path = tuple[1]; + } tuple.length = 0; this.chain(key, path, src); }, @@ -13090,38 +13429,38 @@ } }, chainWillChange: function (chain, path, depth, events) { if (this._key) { - path = this._key + "." + path; + path = this._key + '.' + path; } if (this._parent) { this._parent.chainWillChange(this, path, depth + 1, events); } else { if (depth > 1) { events.push(this.value(), path); } - path = "this." + path; + path = 'this.' + path; if (this._paths[path] > 0) { events.push(this.value(), path); } } }, chainDidChange: function (chain, path, depth, events) { if (this._key) { - path = this._key + "." + path; + path = this._key + '.' + path; } if (this._parent) { this._parent.chainDidChange(this, path, depth + 1, events); } else { if (depth > 1) { events.push(this.value(), path); } - path = "this." + path; + path = 'this.' + path; if (this._paths[path] > 0) { events.push(this.value(), path); } } }, @@ -13137,11 +13476,11 @@ } this._value = undefined; // Special-case: the EachProxy relies on immediate evaluation to // establish its observers. - if (this._parent && this._parent._key === "@each") { + if (this._parent && this._parent._key === '@each') { this.value(); } } // then notify chains... @@ -13167,11 +13506,11 @@ } }; function finishChains(obj) { // We only create meta if we really have to - var m = obj["__ember_meta__"]; + var m = obj['__ember_meta__']; var chains, chainWatchers, chainNodes; if (m) { // finish any current chains node watchers that reference obj chainWatchers = m.chainWatchers; @@ -13203,10 +13542,11 @@ exports.removeChainWatcher = removeChainWatcher; exports.ChainNode = ChainNode; }); // warn, assert, etc; enifed("ember-metal/computed", ["exports", "ember-metal/property_set", "ember-metal/utils", "ember-metal/expand_properties", "ember-metal/error", "ember-metal/properties", "ember-metal/property_events", "ember-metal/dependent_keys"], function (exports, _emberMetalProperty_set, _emberMetalUtils, _emberMetalExpand_properties, _emberMetalError, _emberMetalProperties, _emberMetalProperty_events, _emberMetalDependent_keys) { + "use strict"; /** @module ember @submodule ember-metal */ @@ -13321,14 +13661,14 @@ this._dependentKeys = undefined; this._suspended = undefined; this._meta = undefined; - Ember.deprecate("Passing opts.cacheable to the CP constructor is deprecated. Invoke `volatile()` on the CP instead.", !opts || !opts.hasOwnProperty("cacheable")); + Ember.deprecate("Passing opts.cacheable to the CP constructor is deprecated. Invoke `volatile()` on the CP instead.", !opts || !opts.hasOwnProperty('cacheable')); this._cacheable = opts && opts.cacheable !== undefined ? opts.cacheable : true; // TODO: Set always to `true` once this deprecation is gone. this._dependentKeys = opts && opts.dependentKeys; - Ember.deprecate("Passing opts.readOnly to the CP constructor is deprecated. All CPs are writable by default. You can invoke `readOnly()` on the CP to change this.", !opts || !opts.hasOwnProperty("readOnly")); + Ember.deprecate("Passing opts.readOnly to the CP constructor is deprecated. All CPs are writable by default. You can invoke `readOnly()` on the CP to change this.", !opts || !opts.hasOwnProperty('readOnly')); this._readOnly = opts && (opts.readOnly !== undefined || !!opts.readOnly) || false; // TODO: Set always to `false` once this deprecation is gone. } ComputedProperty.prototype = new _emberMetalProperties.Descriptor(); @@ -13350,11 +13690,11 @@ @chainable @deprecated All computed properties are cacheble by default. Use `volatile()` instead to opt-out to caching. @public */ ComputedPropertyPrototype.cacheable = function (aFlag) { - Ember.deprecate("ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default."); + Ember.deprecate('ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default.'); this._cacheable = aFlag !== false; return this; }; /** @@ -13399,11 +13739,11 @@ @return {Ember.ComputedProperty} this @chainable @public */ ComputedPropertyPrototype.readOnly = function (readOnly) { - Ember.deprecate("Passing arguments to ComputedProperty.readOnly() is deprecated.", arguments.length === 0); + Ember.deprecate('Passing arguments to ComputedProperty.readOnly() is deprecated.', arguments.length === 0); this._readOnly = readOnly === undefined || !!readOnly; // Force to true once this deprecation is gone Ember.assert("Computed properties that define a setter using the new syntax cannot be read-only", !(this._readOnly && this._setter && this._setter !== this._getter)); return this; }; @@ -13797,11 +14137,11 @@ to return @return {Object} the cached value @public */ function cacheFor(obj, key) { - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; var cache = meta && meta.cache; var ret = cache && cache[key]; if (ret === UNDEFINED) { return undefined; @@ -13832,10 +14172,12 @@ exports.ComputedProperty = ComputedProperty; exports.computed = computed; exports.cacheFor = cacheFor; }); enifed("ember-metal/computed_macros", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/computed", "ember-metal/is_empty", "ember-metal/is_none", "ember-metal/alias"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberMetalIs_empty, _emberMetalIs_none, _emberMetalAlias) { + "use strict"; + exports.empty = empty; exports.notEmpty = notEmpty; exports.none = none; exports.not = not; exports.bool = bool; @@ -13905,11 +14247,11 @@ the original value for property @public */ function empty(dependentKey) { - return _emberMetalComputed.computed(dependentKey + ".length", function () { + return _emberMetalComputed.computed(dependentKey + '.length', function () { return _emberMetalIs_empty["default"](_emberMetalProperty_get.get(this, dependentKey)); }); } /** @@ -13937,11 +14279,11 @@ original value for property is not empty. @public */ function notEmpty(dependentKey) { - return _emberMetalComputed.computed(dependentKey + ".length", function () { + return _emberMetalComputed.computed(dependentKey + '.length', function () { return !_emberMetalIs_empty["default"](_emberMetalProperty_get.get(this, dependentKey)); }); } /** @@ -14077,11 +14419,11 @@ function match(dependentKey, regexp) { return _emberMetalComputed.computed(dependentKey, function () { var value = _emberMetalProperty_get.get(this, dependentKey); - return typeof value === "string" ? regexp.test(value) : false; + return typeof value === 'string' ? regexp.test(value) : false; }); } /** A computed property that returns true if the provided dependent property @@ -14296,11 +14638,10 @@ } } return value; }); - exports.and = and; /** A computed property which performs a logical `or` on the original values for the provided dependent properties. Example @@ -14324,20 +14665,20 @@ @param {String} dependentKey* @return {Ember.ComputedProperty} computed property which performs a logical `or` on the values of all the original values for properties. @public */ + exports.and = and; var or = generateComputedWithProperties(function (properties) { for (var key in properties) { if (properties.hasOwnProperty(key) && properties[key]) { return properties[key]; } } return false; }); - exports.or = or; /** A computed property that returns the first truthy value from a list of dependent properties. Example @@ -14360,21 +14701,21 @@ @return {Ember.ComputedProperty} computed property which returns the first truthy value of given list of properties. @deprecated Use `Ember.computed.or` instead. @public */ + exports.or = or; var any = generateComputedWithProperties(function (properties) { - _emberMetalCore["default"].deprecate("Usage of Ember.computed.any is deprecated, use `Ember.computed.or` instead."); + _emberMetalCore["default"].deprecate('Usage of Ember.computed.any is deprecated, use `Ember.computed.or` instead.'); for (var key in properties) { if (properties.hasOwnProperty(key) && properties[key]) { return properties[key]; } } return null; }); - exports.any = any; /** A computed property that returns the array of values for the provided dependent properties. Example @@ -14397,10 +14738,11 @@ @param {String} dependentKey* @return {Ember.ComputedProperty} computed property which maps values of all passed in properties to an array. @public */ + exports.any = any; var collect = generateComputedWithProperties(function (properties) { var res = _emberMetalCore["default"].A(); for (var key in properties) { if (properties.hasOwnProperty(key)) { if (_emberMetalIs_none["default"](properties[key])) { @@ -14411,11 +14753,10 @@ } } return res; }); - exports.collect = collect; /** Creates a new property that is an alias for another property on an object. Calls to `get` or `set` this property behave as though they were called on the original property. @@ -14473,10 +14814,11 @@ @param {String} dependentKey @return {Ember.ComputedProperty} computed property which creates a one way computed property to the original value for property. @public */ + exports.collect = collect; function oneWay(dependentKey) { return _emberMetalAlias["default"](dependentKey).oneWay(); } @@ -14562,16 +14904,16 @@ */ function defaultTo(defaultPath) { return _emberMetalComputed.computed({ get: function (key) { - _emberMetalCore["default"].deprecate("Usage of Ember.computed.defaultTo is deprecated, use `Ember.computed.oneWay` instead."); + _emberMetalCore["default"].deprecate('Usage of Ember.computed.defaultTo is deprecated, use `Ember.computed.oneWay` instead.'); return _emberMetalProperty_get.get(this, defaultPath); }, set: function (key, newValue, cachedValue) { - _emberMetalCore["default"].deprecate("Usage of Ember.computed.defaultTo is deprecated, use `Ember.computed.oneWay` instead."); + _emberMetalCore["default"].deprecate('Usage of Ember.computed.defaultTo is deprecated, use `Ember.computed.oneWay` instead.'); return newValue != null ? newValue : _emberMetalProperty_get.get(this, defaultPath); } }); } @@ -14625,14 +14967,16 @@ cross-platform libraries such as jQuery. For more details, see [Ember-Runtime](http://emberjs.com/api/modules/ember-runtime.html). @class Ember @static - @version 1.13.5 + @version 1.13.6 @public */ + 'use strict'; + if ('undefined' === typeof Ember) { // Create core object. Make it act like an instance of Ember.Namespace so that // objects assigned to it are given a sane string representation. Ember = {}; } @@ -14657,15 +15001,15 @@ /** The semantic version. @property VERSION @type String - @default '1.13.5' + @default '1.13.6' @static @public */ - Ember.VERSION = '1.13.5'; + Ember.VERSION = '1.13.6'; /** The hash of environment variables used to control various configuration settings. To specify your own or override default settings, add the desired properties to a global hash named `EmberENV` (or `ENV` for @@ -14856,15 +15200,16 @@ } exports["default"] = Ember; }); enifed("ember-metal/dependent_keys", ["exports", "ember-metal/platform/create", "ember-metal/watching"], function (exports, _emberMetalPlatformCreate, _emberMetalWatching) { - exports.addDependentKeys = addDependentKeys; - exports.removeDependentKeys = removeDependentKeys; // Remove "use strict"; from transpiled module until // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed // + + exports.addDependentKeys = addDependentKeys; + exports.removeDependentKeys = removeDependentKeys; "REMOVE_USE_STRICT: true"; /** @module ember @submodule ember-metal @@ -14898,11 +15243,11 @@ } return keys; } function metaForDeps(meta) { - return keysForDep(meta, "deps"); + return keysForDep(meta, 'deps'); } function addDependentKeys(desc, obj, keyName, meta) { // the descriptor has a list of dependent keys, so // add all of its dependent keys. @@ -14946,10 +15291,17 @@ _emberMetalWatching.unwatch(obj, depKey, meta); } } }); enifed("ember-metal/deprecate_property", ["exports", "ember-metal/core", "ember-metal/platform/define_property", "ember-metal/properties", "ember-metal/property_get", "ember-metal/property_set"], function (exports, _emberMetalCore, _emberMetalPlatformDefine_property, _emberMetalProperties, _emberMetalProperty_get, _emberMetalProperty_set) { + /** + @module ember + @submodule ember-metal + */ + + "use strict"; + exports.deprecateProperty = deprecateProperty; /** Used internally to allow changing properties in a backwards compatible way, and print a helpful deprecation warning. @@ -14981,15 +15333,13 @@ } }); } } }); -/** -@module ember -@submodule ember-metal -*/ enifed('ember-metal/dictionary', ['exports', 'ember-metal/platform/create'], function (exports, _emberMetalPlatformCreate) { + 'use strict'; + exports["default"] = makeDictionary; // the delete is meant to hint at runtimes that this object should remain in // dictionary mode. This is clearly a runtime specific hack, but currently it // appears worthwhile in some usecases. Please note, these deletes do increase @@ -15002,10 +15352,12 @@ delete dict['_dict']; return dict; } }); enifed('ember-metal/enumerable_utils', ['exports', 'ember-metal/core', 'ember-metal/array'], function (exports, _emberMetalCore, _emberMetalArray) { + 'use strict'; + exports.map = map; exports.forEach = forEach; exports.filter = filter; exports.indexOf = indexOf; exports.indexesOf = indexesOf; @@ -15296,10 +15648,11 @@ replace: deprecatedReplace }; }); // Ember.deprecateFunc enifed('ember-metal/environment', ['exports', 'ember-metal/core'], function (exports, _emberMetalCore) { + 'use strict'; /* Ember can run in many different environments, including environments like Node.js where the DOM is unavailable. This object serves as an abstraction over the browser features that Ember relies on, so that code does not @@ -15332,18 +15685,19 @@ hasDOM: false, isChrome: false, isFirefox: false, location: null, history: null, - userAgent: 'Lynx (textmode)', + userAgent: "Lynx (textmode)", global: null }; } exports["default"] = environment; }); enifed('ember-metal/error', ['exports', 'ember-metal/platform/create'], function (exports, _emberMetalPlatformCreate) { + 'use strict'; var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; /** A subclass of the JavaScript Error object for use in Ember. @@ -15376,24 +15730,30 @@ EmberError.prototype = _emberMetalPlatformCreate["default"](Error.prototype); exports["default"] = EmberError; }); enifed("ember-metal/events", ["exports", "ember-metal/core", "ember-metal/utils", "ember-metal/platform/create"], function (exports, _emberMetalCore, _emberMetalUtils, _emberMetalPlatformCreate) { + // Remove "use strict"; from transpiled module until + // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed + // + exports.accumulateListeners = accumulateListeners; exports.addListener = addListener; exports.suspendListener = suspendListener; exports.suspendListeners = suspendListeners; exports.watchedEvents = watchedEvents; exports.sendEvent = sendEvent; exports.hasListeners = hasListeners; exports.listenersFor = listenersFor; exports.on = on; - // Remove "use strict"; from transpiled module until - // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed - // "REMOVE_USE_STRICT: true"; + /** + @module ember + @submodule ember-metal + */ + /* listener flags */ var ONCE = 1; var SUSPENDED = 2; /* @@ -15455,11 +15815,11 @@ return actions; } function accumulateListeners(obj, eventName, otherActions) { - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; var actions = meta && meta.listeners && meta.listeners[eventName]; if (!actions) { return; } @@ -15495,11 +15855,11 @@ */ function addListener(obj, eventName, target, method, once) { _emberMetalCore["default"].assert("You must pass at least an object and event name to Ember.addListener", !!obj && !!eventName); - if (!method && "function" === typeof target) { + if (!method && 'function' === typeof target) { method = target; target = null; } var actions = actionsFor(obj, eventName); @@ -15514,11 +15874,11 @@ return; } actions.push(target, method, flags); - if ("function" === typeof obj.didAddListener) { + if ('function' === typeof obj.didAddListener) { obj.didAddListener(eventName, target, method); } } /** @@ -15535,11 +15895,11 @@ @public */ function removeListener(obj, eventName, target, method) { _emberMetalCore["default"].assert("You must pass at least an object and event name to Ember.removeListener", !!obj && !!eventName); - if (!method && "function" === typeof target) { + if (!method && 'function' === typeof target) { method = target; target = null; } function _removeListener(target, method) { @@ -15551,19 +15911,19 @@ return; } actions.splice(actionIndex, 3); - if ("function" === typeof obj.didRemoveListener) { + if ('function' === typeof obj.didRemoveListener) { obj.didRemoveListener(eventName, target, method); } } if (method) { _removeListener(target, method); } else { - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; var actions = meta && meta.listeners && meta.listeners[eventName]; if (!actions) { return; } @@ -15591,11 +15951,11 @@ @param {Function|String} method A function or the name of a function to be called on `target` @param {Function} callback */ function suspendListener(obj, eventName, target, method, callback) { - if (!method && "function" === typeof target) { + if (!method && 'function' === typeof target) { method = target; target = null; } var actions = actionsFor(obj, eventName); @@ -15630,11 +15990,11 @@ @param {Function|String} method A function or the name of a function to be called on `target` @param {Function} callback */ function suspendListeners(obj, eventNames, target, method, callback) { - if (!method && "function" === typeof target) { + if (!method && 'function' === typeof target) { method = target; target = null; } var suspendedActions = []; @@ -15675,16 +16035,16 @@ @for Ember @param obj */ function watchedEvents(obj) { - var listeners = obj["__ember_meta__"].listeners; + var listeners = obj['__ember_meta__'].listeners; var ret = []; if (listeners) { for (var eventName in listeners) { - if (eventName !== "__source__" && listeners[eventName]) { + if (eventName !== '__source__' && listeners[eventName]) { ret.push(eventName); } } } return ret; @@ -15706,16 +16066,16 @@ @public */ function sendEvent(obj, eventName, params, actions) { // first give object a chance to handle it - if (obj !== _emberMetalCore["default"] && "function" === typeof obj.sendEvent) { + if (obj !== _emberMetalCore["default"] && 'function' === typeof obj.sendEvent) { obj.sendEvent(eventName, params); } if (!actions) { - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; actions = meta && meta.listeners && meta.listeners[eventName]; } if (!actions) { return; @@ -15737,11 +16097,11 @@ removeListener(obj, eventName, target, method); } if (!target) { target = obj; } - if ("string" === typeof method) { + if ('string' === typeof method) { if (params) { _emberMetalUtils.applyStr(target, method, params); } else { target[method](); } @@ -15763,11 +16123,11 @@ @param obj @param {String} eventName */ function hasListeners(obj, eventName) { - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; var actions = meta && meta.listeners && meta.listeners[eventName]; return !!(actions && actions.length); } @@ -15779,11 +16139,11 @@ @param {String} eventName */ function listenersFor(obj, eventName) { var ret = []; - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; var actions = meta && meta.listeners && meta.listeners[eventName]; if (!actions) { return ret; } @@ -15833,15 +16193,13 @@ return func; } exports.removeListener = removeListener; }); -/** -@module ember -@submodule ember-metal -*/ enifed('ember-metal/expand_properties', ['exports', 'ember-metal/error', 'ember-metal/array'], function (exports, _emberMetalError, _emberMetalArray) { + 'use strict'; + exports["default"] = expandProperties; /** @module ember @submodule ember-metal @@ -15912,10 +16270,12 @@ return all; } }); enifed("ember-metal/get_properties", ["exports", "ember-metal/property_get", "ember-metal/utils"], function (exports, _emberMetalProperty_get, _emberMetalUtils) { + "use strict"; + exports["default"] = getProperties; /** To get multiple properties at once, call `Ember.getProperties` with an object followed by a list of strings or an array: @@ -15954,10 +16314,11 @@ } return ret; } }); enifed("ember-metal/injected_property", ["exports", "ember-metal/core", "ember-metal/computed", "ember-metal/alias", "ember-metal/properties", "ember-metal/platform/create"], function (exports, _emberMetalCore, _emberMetalComputed, _emberMetalAlias, _emberMetalProperties, _emberMetalPlatformCreate) { + "use strict"; /** Read-only property that returns the result of a container lookup. @class InjectedProperty @@ -15976,15 +16337,15 @@ AliasedPropertyPrototype.oneWay.call(this); } function injectedPropertyGet(keyName) { var possibleDesc = this[keyName]; - var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; _emberMetalCore["default"].assert("Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.", this.container); - return this.container.lookup(desc.type + ":" + (desc.name || keyName)); + return this.container.lookup(desc.type + ':' + (desc.name || keyName)); } InjectedProperty.prototype = _emberMetalPlatformCreate["default"](_emberMetalProperties.Descriptor.prototype); var InjectedPropertyPrototype = InjectedProperty.prototype; @@ -16000,10 +16361,12 @@ exports["default"] = InjectedProperty; }); // Ember.assert enifed("ember-metal/instrumentation", ["exports", "ember-metal/core", "ember-metal/utils"], function (exports, _emberMetalCore, _emberMetalUtils) { + "use strict"; + exports.instrument = instrument; exports._instrumentStart = _instrumentStart; exports.subscribe = subscribe; exports.unsubscribe = unsubscribe; exports.reset = reset; @@ -16073,11 +16436,11 @@ cache[name] = listeners; return listeners; }; var time = (function () { - var perf = "undefined" !== typeof window ? window.performance || {} : {}; + var perf = 'undefined' !== typeof window ? window.performance || {} : {}; var fn = perf.now || perf.mozNow || perf.webkitNow || perf.msNow || perf.oNow; // fn.bind will be available in all the browsers that support the advanced window.performance... ;-) return fn ? fn.bind(perf) : function () { return +new Date(); }; @@ -16095,11 +16458,11 @@ @param {Object} binding Context that instrument function is called with. @private */ function instrument(name, _payload, callback, binding) { - if (arguments.length <= 3 && typeof _payload === "function") { + if (arguments.length <= 3 && typeof _payload === 'function') { binding = callback; callback = _payload; _payload = undefined; } if (subscribers.length === 0) { @@ -16244,10 +16607,12 @@ subscribers.length = 0; cache = {}; } }); enifed('ember-metal/is_blank', ['exports', 'ember-metal/is_empty'], function (exports, _emberMetalIs_empty) { + 'use strict'; + exports["default"] = isBlank; /** A value is blank if it is empty or a whitespace string. @@ -16276,10 +16641,11 @@ function isBlank(obj) { return _emberMetalIs_empty["default"](obj) || typeof obj === 'string' && obj.match(/\S/) === null; } }); enifed('ember-metal/is_empty', ['exports', 'ember-metal/property_get', 'ember-metal/is_none'], function (exports, _emberMetalProperty_get, _emberMetalIs_none) { + 'use strict'; /** Verifies that a value is `null` or an empty string, empty array, or empty function. @@ -16357,17 +16723,21 @@ @for Ember @param {Object} obj Value to test @return {Boolean} @public */ + "use strict"; + function isNone(obj) { return obj === null || obj === undefined; } exports["default"] = isNone; }); enifed('ember-metal/is_present', ['exports', 'ember-metal/is_blank'], function (exports, _emberMetalIs_blank) { + 'use strict'; + exports["default"] = isPresent; /** A value is present if it not `isBlank`. @@ -16397,10 +16767,11 @@ function isPresent(obj) { return !_emberMetalIs_blank["default"](obj); } }); enifed('ember-metal/keys', ['exports', 'ember-metal/platform/define_property'], function (exports, _emberMetalPlatformDefine_property) { + 'use strict'; /** Returns all of the keys defined on an object or hash. This is useful when inspecting objects for debugging. On browsers that support it, this uses the native `Object.keys` implementation. @@ -16449,10 +16820,11 @@ } exports["default"] = keys; }); enifed("ember-metal/libraries", ["exports", "ember-metal/core", "ember-metal/enumerable_utils"], function (exports, _emberMetalCore, _emberMetalEnumerable_utils) { + "use strict"; /** Helper class that allows you to register your library with Ember. Singleton created at `Ember.libraries`. @@ -16506,51 +16878,52 @@ this._registry.splice(index, 1); } }, each: function (callback) { - _emberMetalCore["default"].deprecate("Using Ember.libraries.each() is deprecated. Access to a list of registered libraries is currently a private API. If you are not knowingly accessing this method, your out-of-date Ember Inspector may be doing so."); + _emberMetalCore["default"].deprecate('Using Ember.libraries.each() is deprecated. Access to a list of registered libraries is currently a private API. If you are not knowingly accessing this method, your out-of-date Ember Inspector may be doing so.'); _emberMetalEnumerable_utils.forEach(this._registry, function (lib) { callback(lib.name, lib.version); }); } }; exports["default"] = Libraries; }); enifed("ember-metal/logger", ["exports", "ember-metal/core", "ember-metal/error"], function (exports, _emberMetalCore, _emberMetalError) { + "use strict"; function K() { return this; } function consoleMethod(name) { var consoleObj, logToConsole; if (_emberMetalCore["default"].imports.console) { consoleObj = _emberMetalCore["default"].imports.console; - } else if (typeof console !== "undefined") { + } else if (typeof console !== 'undefined') { consoleObj = console; } - var method = typeof consoleObj === "object" ? consoleObj[name] : null; + var method = typeof consoleObj === 'object' ? consoleObj[name] : null; if (method) { // Older IE doesn't support bind, but Chrome needs it - if (typeof method.bind === "function") { + if (typeof method.bind === 'function') { logToConsole = method.bind(consoleObj); - logToConsole.displayName = "console." + name; + logToConsole.displayName = 'console.' + name; return logToConsole; - } else if (typeof method.apply === "function") { + } else if (typeof method.apply === 'function') { logToConsole = function () { method.apply(consoleObj, arguments); }; - logToConsole.displayName = "console." + name; + logToConsole.displayName = 'console.' + name; return logToConsole; } else { return function () { - var message = Array.prototype.join.call(arguments, ", "); + var message = Array.prototype.join.call(arguments, ', '); method(message); }; } } } @@ -16572,11 +16945,11 @@ Inside Ember-Metal, simply uses the methods from `imports.console`. Override this to provide more robust logging functionality. @class Logger @namespace Ember - @private + @public */ exports["default"] = { /** Logs the arguments to the console. You can pass as many arguments as you want and they will be joined together with a space. @@ -16586,13 +16959,13 @@ // "log value of foo: 1" will be printed to the console ``` @method log @for Ember.Logger @param {*} arguments - @private + @public */ - log: consoleMethod("log") || K, + log: consoleMethod('log') || K, /** Prints the arguments to the console with a warning icon. You can pass as many arguments as you want and they will be joined together with a space. ```javascript @@ -16600,13 +16973,13 @@ // "Something happened!" will be printed to the console with a warning icon. ``` @method warn @for Ember.Logger @param {*} arguments - @private + @public */ - warn: consoleMethod("warn") || K, + warn: consoleMethod('warn') || K, /** Prints the arguments to the console with an error icon, red text and a stack trace. You can pass as many arguments as you want and they will be joined together with a space. ```javascript @@ -16614,13 +16987,13 @@ // "Danger! Danger!" will be printed to the console in red text. ``` @method error @for Ember.Logger @param {*} arguments - @private + @public */ - error: consoleMethod("error") || K, + error: consoleMethod('error') || K, /** Logs the arguments to the console. You can pass as many arguments as you want and they will be joined together with a space. ```javascript @@ -16629,13 +17002,13 @@ // "log value of foo: 1" will be printed to the console ``` @method info @for Ember.Logger @param {*} arguments - @private + @public */ - info: consoleMethod("info") || K, + info: consoleMethod('info') || K, /** Logs the arguments to the console in blue text. You can pass as many arguments as you want and they will be joined together with a space. ```javascript @@ -16644,31 +17017,55 @@ // "log value of foo: 1" will be printed to the console ``` @method debug @for Ember.Logger @param {*} arguments - @private + @public */ - debug: consoleMethod("debug") || consoleMethod("info") || K, + debug: consoleMethod('debug') || consoleMethod('info') || K, /** If the value passed into `Ember.Logger.assert` is not truthy it will throw an error with a stack trace. ```javascript Ember.Logger.assert(true); // undefined Ember.Logger.assert(true === false); // Throws an Assertion failed error. ``` @method assert @for Ember.Logger @param {Boolean} bool Value to test - @private + @public */ - assert: consoleMethod("assert") || assertPolyfill + assert: consoleMethod('assert') || assertPolyfill }; }); // Ember.imports enifed("ember-metal/map", ["exports", "ember-metal/utils", "ember-metal/array", "ember-metal/platform/create", "ember-metal/deprecate_property"], function (exports, _emberMetalUtils, _emberMetalArray, _emberMetalPlatformCreate, _emberMetalDeprecate_property) { + /** + @module ember + @submodule ember-metal + */ + /* + JavaScript (before ES6) does not have a Map implementation. Objects, + which are often used as dictionaries, may only have Strings as keys. + + Because Ember has a way to get a unique identifier for every object + via `Ember.guidFor`, we can implement a performant Map with arbitrary + keys. Because it is commonly used in low-level bookkeeping, Map is + implemented as a pure JavaScript object for performance. + + This implementation follows the current iteration of the ES6 proposal for + maps (http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets), + with one exception: as we do not have the luxury of in-VM iteration, we implement a + forEach method for iteration. + + Map is mocked out to look like an Ember object, so you can do + `Ember.Map.create()` for symmetry with other Ember classes. + */ + + "use strict"; + function missingFunction(fn) { throw new TypeError(Object.prototype.toString.call(fn) + " is not a function"); } function missingNew(name) { @@ -16768,11 +17165,11 @@ @param _guid (optional and for internal use only) @return {Boolean} @private */ remove: function (obj, _guid) { - Ember.deprecate("Calling `OrderedSet.prototype.remove` has been deprecated, please use `OrderedSet.prototype.delete` instead.", this._silenceRemoveDeprecation); + Ember.deprecate('Calling `OrderedSet.prototype.remove` has been deprecated, please use `OrderedSet.prototype.delete` instead.', this._silenceRemoveDeprecation); return this["delete"](obj, _guid); }, /** @@ -16832,11 +17229,11 @@ @param {Function} fn @param self @private */ forEach: function (fn /*, ...thisArg*/) { - if (typeof fn !== "function") { + if (typeof fn !== 'function') { missingFunction(fn); } if (this.size === 0) { return; @@ -16882,11 +17279,11 @@ return set; } }; - _emberMetalDeprecate_property.deprecateProperty(OrderedSet.prototype, "length", "size"); + _emberMetalDeprecate_property.deprecateProperty(OrderedSet.prototype, 'length', 'size'); /** A Map stores values indexed by keys. Unlike JavaScript's default Objects, the keys of a Map can be any JavaScript object. @@ -16993,11 +17390,11 @@ @param {*} key @return {Boolean} true if an item was removed, false otherwise @private */ remove: function (key) { - Ember.deprecate("Calling `Map.prototype.remove` has been deprecated, please use `Map.prototype.delete` instead."); + Ember.deprecate('Calling `Map.prototype.remove` has been deprecated, please use `Map.prototype.delete` instead.'); return this["delete"](key); }, /** @@ -17048,11 +17445,11 @@ @param {*} self if passed, the `this` value inside the callback. By default, `this` is the map. @private */ forEach: function (callback /*, ...thisArg*/) { - if (typeof callback !== "function") { + if (typeof callback !== 'function') { missingFunction(callback); } if (this.size === 0) { return; @@ -17094,11 +17491,11 @@ copy: function () { return copyMap(this, new Map()); } }; - _emberMetalDeprecate_property.deprecateProperty(Map.prototype, "length", "size"); + _emberMetalDeprecate_property.deprecateProperty(Map.prototype, 'length', 'size'); /** @class MapWithDefault @namespace Ember @extends Ember.Map @@ -17169,33 +17566,13 @@ exports["default"] = Map; exports.OrderedSet = OrderedSet; exports.Map = Map; exports.MapWithDefault = MapWithDefault; }); -/** -@module ember -@submodule ember-metal -*/ - -/* - JavaScript (before ES6) does not have a Map implementation. Objects, - which are often used as dictionaries, may only have Strings as keys. - - Because Ember has a way to get a unique identifier for every object - via `Ember.guidFor`, we can implement a performant Map with arbitrary - keys. Because it is commonly used in low-level bookkeeping, Map is - implemented as a pure JavaScript object for performance. - - This implementation follows the current iteration of the ES6 proposal for - maps (http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets), - with one exception: as we do not have the luxury of in-VM iteration, we implement a - forEach method for iteration. - - Map is mocked out to look like an Ember object, so you can do - `Ember.Map.create()` for symmetry with other Ember classes. -*/ enifed('ember-metal/merge', ['exports', 'ember-metal/keys'], function (exports, _emberMetalKeys) { + 'use strict'; + exports["default"] = merge; exports.assign = assign; /** Merge the contents of two objects together into the first object. @@ -17253,21 +17630,27 @@ return original; } }); enifed("ember-metal/mixin", ["exports", "ember-metal/core", "ember-metal/merge", "ember-metal/array", "ember-metal/platform/create", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/utils", "ember-metal/expand_properties", "ember-metal/properties", "ember-metal/computed", "ember-metal/binding", "ember-metal/observer", "ember-metal/events", "ember-metal/streams/utils"], function (exports, _emberMetalCore, _emberMetalMerge, _emberMetalArray, _emberMetalPlatformCreate, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalUtils, _emberMetalExpand_properties, _emberMetalProperties, _emberMetalComputed, _emberMetalBinding, _emberMetalObserver, _emberMetalEvents, _emberMetalStreamsUtils) { + // Remove "use strict"; from transpiled module until + // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed + // + exports.mixin = mixin; exports.required = required; exports.aliasMethod = aliasMethod; exports.observer = observer; exports._immediateObserver = _immediateObserver; exports._beforeObserver = _beforeObserver; - // Remove "use strict"; from transpiled module until - // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed - // "REMOVE_USE_STRICT: true"; + /** + @module ember + @submodule ember-metal + */ + var REQUIRED; var a_slice = [].slice; function superFunction() { var func = this.__nextSuper; @@ -17304,18 +17687,18 @@ function mixinsMeta(obj) { var m = _emberMetalUtils.meta(obj, true); var ret = m.mixins; if (!ret) { ret = m.mixins = {}; - } else if (!m.hasOwnProperty("mixins")) { + } else if (!m.hasOwnProperty('mixins')) { ret = m.mixins = _emberMetalPlatformCreate["default"](ret); } return ret; } function isMethod(obj) { - return "function" === typeof obj && obj.isMethod !== false && obj !== Boolean && obj !== Object && obj !== Number && obj !== Array && obj !== Date && obj !== String; + return 'function' === typeof obj && obj.isMethod !== false && obj !== Boolean && obj !== Object && obj !== Number && obj !== Array && obj !== Date && obj !== String; } var CONTINUE = {}; function mixinProperties(mixinsMeta, mixin) { @@ -17356,11 +17739,11 @@ // If we didn't find the original descriptor in a parent mixin, find // it on the original object. if (!superProperty) { var possibleDesc = base[key]; - var superDesc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var superDesc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; superProperty = superDesc; } if (superProperty === undefined || !(superProperty instanceof _emberMetalComputed.ComputedProperty)) { @@ -17383,11 +17766,11 @@ return property; } var sourceAvailable = (function () { return this; - }).toString().indexOf("return this;") > -1; + }).toString().indexOf('return this;') > -1; function giveMethodSuper(obj, key, method, values, descs) { var superMethod; // Methods overwrite computed properties, and do not call super to them. @@ -17399,20 +17782,20 @@ // If we didn't find the original value in a parent mixin, find it in // the original object superMethod = superMethod || obj[key]; // Only wrap the new method if the original method was a function - if (superMethod === undefined || "function" !== typeof superMethod) { + if (superMethod === undefined || 'function' !== typeof superMethod) { return method; } var hasSuper; if (sourceAvailable) { hasSuper = method.__hasSuper; if (hasSuper === undefined) { - hasSuper = method.toString().indexOf("_super") > -1; + hasSuper = method.toString().indexOf('_super') > -1; method.__hasSuper = hasSuper; } } if (sourceAvailable === false || hasSuper) { @@ -17424,11 +17807,11 @@ function applyConcatenatedProperties(obj, key, value, values) { var baseValue = values[key] || obj[key]; if (baseValue) { - if ("function" === typeof baseValue.concat) { + if ('function' === typeof baseValue.concat) { if (value === null || value === undefined) { return baseValue; } else { return baseValue.concat(value); } @@ -17487,11 +17870,11 @@ } descs[key] = value; values[key] = undefined; } else { - if (concats && _emberMetalArray.indexOf.call(concats, key) >= 0 || key === "concatenatedProperties" || key === "mergedProperties") { + if (concats && _emberMetalArray.indexOf.call(concats, key) >= 0 || key === 'concatenatedProperties' || key === 'mergedProperties') { value = applyConcatenatedProperties(base, key, value, values); } else if (mergings && _emberMetalArray.indexOf.call(mergings, key) >= 0) { value = applyMergedProperties(base, key, value, values); } else if (isMethod(value)) { value = giveMethodSuper(base, key, value, values, descs); @@ -17510,11 +17893,11 @@ delete values[keyName]; } for (var i = 0, l = mixins.length; i < l; i++) { currentMixin = mixins[i]; - _emberMetalCore["default"].assert("Expected hash or Mixin instance, got " + Object.prototype.toString.call(currentMixin), typeof currentMixin === "object" && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== "[object Array]"); + _emberMetalCore["default"].assert("Expected hash or Mixin instance, got " + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]'); props = mixinProperties(m, currentMixin); if (props === CONTINUE) { continue; } @@ -17522,23 +17905,23 @@ if (props) { meta = _emberMetalUtils.meta(base); if (base.willMergeMixin) { base.willMergeMixin(props); } - concats = concatenatedMixinProperties("concatenatedProperties", props, values, base); - mergings = concatenatedMixinProperties("mergedProperties", props, values, base); + concats = concatenatedMixinProperties('concatenatedProperties', props, values, base); + mergings = concatenatedMixinProperties('mergedProperties', props, values, base); for (key in props) { if (!props.hasOwnProperty(key)) { continue; } keys.push(key); addNormalizedProperty(base, key, props[key], meta, descs, values, concats, mergings); } // manually copy toString() because some JS engines do not enumerate it - if (props.hasOwnProperty("toString")) { + if (props.hasOwnProperty('toString')) { base.toString = props.toString; } } else if (currentMixin.mixins) { mergeMixins(currentMixin.mixins, m, descs, values, base, keys); if (currentMixin._without) { @@ -17553,11 +17936,11 @@ function detectBinding(obj, key, value, m) { if (IS_BINDING.test(key)) { var bindings = m.bindings; if (!bindings) { bindings = m.bindings = {}; - } else if (!m.hasOwnProperty("bindings")) { + } else if (!m.hasOwnProperty('bindings')) { bindings = m.bindings = _emberMetalPlatformCreate["default"](m.bindings); } bindings[key] = value; } } @@ -17625,11 +18008,11 @@ var value; var possibleDesc; if (descs[altKey] || values[altKey]) { value = values[altKey]; desc = descs[altKey]; - } else if ((possibleDesc = obj[altKey]) && possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor) { + } else if ((possibleDesc = obj[altKey]) && possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor) { desc = possibleDesc; value = undefined; } else { desc = undefined; value = obj[altKey]; @@ -17649,20 +18032,20 @@ } function replaceObserversAndListeners(obj, key, observerOrListener) { var prev = obj[key]; - if ("function" === typeof prev) { - updateObserversAndListeners(obj, key, prev, "__ember_observesBefore__", _emberMetalObserver._removeBeforeObserver); - updateObserversAndListeners(obj, key, prev, "__ember_observes__", _emberMetalObserver.removeObserver); - updateObserversAndListeners(obj, key, prev, "__ember_listens__", _emberMetalEvents.removeListener); + if ('function' === typeof prev) { + updateObserversAndListeners(obj, key, prev, '__ember_observesBefore__', _emberMetalObserver._removeBeforeObserver); + updateObserversAndListeners(obj, key, prev, '__ember_observes__', _emberMetalObserver.removeObserver); + updateObserversAndListeners(obj, key, prev, '__ember_listens__', _emberMetalEvents.removeListener); } - if ("function" === typeof observerOrListener) { - updateObserversAndListeners(obj, key, observerOrListener, "__ember_observesBefore__", _emberMetalObserver._addBeforeObserver); - updateObserversAndListeners(obj, key, observerOrListener, "__ember_observes__", _emberMetalObserver.addObserver); - updateObserversAndListeners(obj, key, observerOrListener, "__ember_listens__", _emberMetalEvents.addListener); + if ('function' === typeof observerOrListener) { + updateObserversAndListeners(obj, key, observerOrListener, '__ember_observesBefore__', _emberMetalObserver._addBeforeObserver); + updateObserversAndListeners(obj, key, observerOrListener, '__ember_observes__', _emberMetalObserver.addObserver); + updateObserversAndListeners(obj, key, observerOrListener, '__ember_listens__', _emberMetalEvents.addListener); } } function applyMixin(obj, mixins, partial) { var descs = {}; @@ -17682,11 +18065,11 @@ // * Copying `toString` in broken browsers mergeMixins(mixins, mixinsMeta(obj), descs, values, obj, keys); for (var i = 0, l = keys.length; i < l; i++) { key = keys[i]; - if (key === "constructor" || !values.hasOwnProperty(key)) { + if (key === 'constructor' || !values.hasOwnProperty(key)) { continue; } desc = descs[key]; value = values[key]; @@ -17869,11 +18252,11 @@ var mixins = this.mixins; var idx; for (idx = 0; idx < len; idx++) { currentMixin = arguments[idx]; - _emberMetalCore["default"].assert("Expected hash or Mixin instance, got " + Object.prototype.toString.call(currentMixin), typeof currentMixin === "object" && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== "[object Array]"); + _emberMetalCore["default"].assert("Expected hash or Mixin instance, got " + Object.prototype.toString.call(currentMixin), typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]'); if (currentMixin instanceof Mixin) { mixins.push(currentMixin); } else { mixins.push(new Mixin(undefined, currentMixin)); @@ -17929,11 +18312,11 @@ return false; } if (obj instanceof Mixin) { return _detect(obj, this, {}); } - var m = obj["__ember_meta__"]; + var m = obj['__ember_meta__']; var mixins = m && m.mixins; if (mixins) { return !!mixins[_emberMetalUtils.guidFor(this)]; } return false; @@ -17984,11 +18367,11 @@ }; // returns the mixins currently applied to the specified object // TODO: Make Ember.mixin Mixin.mixins = function (obj) { - var m = obj["__ember_meta__"]; + var m = obj['__ember_meta__']; var mixins = m && m.mixins; var ret = []; if (!mixins) { return ret; @@ -18006,11 +18389,11 @@ return ret; }; exports.REQUIRED = REQUIRED = new _emberMetalProperties.Descriptor(); REQUIRED.toString = function () { - return "(Required Property)"; + return '(Required Property)'; }; /** Denotes a required property for a mixin @@ -18018,11 +18401,11 @@ @for Ember @private */ function required() { - _emberMetalCore["default"].deprecate("Ember.required is deprecated as its behavior is inconsistent and unreliable.", false); + _emberMetalCore["default"].deprecate('Ember.required is deprecated as its behavior is inconsistent and unreliable.', false); return REQUIRED; } function Alias(methodName) { this.isDescriptor = true; @@ -18097,11 +18480,11 @@ }; var _paths = args.slice(0, -1); if (typeof func !== "function") { // revert to old, soft-deprecated argument ordering - _emberMetalCore["default"].deprecate("Passing the dependentKeys after the callback function in Ember.observer is deprecated. Ensure the callback function is the last argument."); + _emberMetalCore["default"].deprecate('Passing the dependentKeys after the callback function in Ember.observer is deprecated. Ensure the callback function is the last argument.'); func = args[0]; _paths = args.slice(1); } @@ -18144,15 +18527,15 @@ @return func @private */ function _immediateObserver() { - _emberMetalCore["default"].deprecate("Usage of `Ember.immediateObserver` is deprecated, use `Ember.observer` instead."); + _emberMetalCore["default"].deprecate('Usage of `Ember.immediateObserver` is deprecated, use `Ember.observer` instead.'); for (var i = 0, l = arguments.length; i < l; i++) { var arg = arguments[i]; - _emberMetalCore["default"].assert("Immediate observers must observe internal properties only, not properties on other objects.", typeof arg !== "string" || arg.indexOf(".") === -1); + _emberMetalCore["default"].assert("Immediate observers must observe internal properties only, not properties on other objects.", typeof arg !== "string" || arg.indexOf('.') === -1); } return observer.apply(this, arguments); } @@ -18239,17 +18622,14 @@ exports.IS_BINDING = IS_BINDING; exports.Mixin = Mixin; exports.required = required; exports.REQUIRED = REQUIRED; }); -/** -@module ember -@submodule ember-metal -*/ - // warn, assert, wrap, et; enifed("ember-metal/observer", ["exports", "ember-metal/watching", "ember-metal/array", "ember-metal/events"], function (exports, _emberMetalWatching, _emberMetalArray, _emberMetalEvents) { + "use strict"; + exports.addObserver = addObserver; exports.observersFor = observersFor; exports.removeObserver = removeObserver; exports._addBeforeObserver = _addBeforeObserver; exports._suspendBeforeObserver = _suspendBeforeObserver; @@ -18261,12 +18641,12 @@ /** @module ember-metal */ - var AFTER_OBSERVERS = ":change"; - var BEFORE_OBSERVERS = ":before"; + var AFTER_OBSERVERS = ':change'; + var BEFORE_OBSERVERS = ':before'; function changeEvent(keyName) { return keyName + AFTER_OBSERVERS; } @@ -18374,10 +18754,11 @@ return this; } }); enifed("ember-metal/observer_set", ["exports", "ember-metal/utils", "ember-metal/events"], function (exports, _emberMetalUtils, _emberMetalEvents) { + "use strict"; /* this.observerSet = { [senderGuid]: { // variable name: `keySet` [keyName]: listIndex @@ -18442,10 +18823,12 @@ this.observerSet = {}; this.observers = []; }; }); enifed('ember-metal/path_cache', ['exports', 'ember-metal/cache'], function (exports, _emberMetalCache) { + 'use strict'; + exports.isGlobal = isGlobal; exports.isGlobalPath = isGlobalPath; exports.hasThis = hasThis; exports.isPath = isPath; exports.getFirstKey = getFirstKey; @@ -18524,11 +18907,12 @@ }); enifed('ember-metal/platform/create', ['exports', 'ember-metal/platform/define_properties'], function (exports, _emberMetalPlatformDefine_properties) { // Remove "use strict"; from transpiled module until // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed // - 'REMOVE_USE_STRICT: true'; + + "REMOVE_USE_STRICT: true"; /** @class platform @namespace Ember @static @@ -18554,11 +18938,11 @@ // the following produces false positives // in Opera Mini => not a reliable check // Object.prototype.__proto__ === null if (supportsProto || typeof document === 'undefined') { createEmpty = function () { - return { '__proto__': null }; + return { "__proto__": null }; }; } else { // In old IE __proto__ can't be used to manually set `null`, nor does // any other method exist to make an object that inherits from nothing, // aside from Object.prototype itself. Instead, create a new global @@ -18597,17 +18981,17 @@ function Type() {} // An empty constructor. if (prototype === null) { object = createEmpty(); } else { - if (typeof prototype !== 'object' && typeof prototype !== 'function') { + if (typeof prototype !== "object" && typeof prototype !== "function") { // In the native implementation `parent` can be `null` // OR *any* `instanceof Object` (Object|Function|Array|RegExp|etc) // Use `typeof` tho, b/c in old IE, DOM elements are not `instanceof Object` // like they are in modern browsers. Using `Object.create` on DOM elements // is...err...probably inappropriate, but the native version allows for it. - throw new TypeError('Object prototype may only be an Object or null'); // same msg as Chrome + throw new TypeError("Object prototype may only be an Object or null"); // same msg as Chrome } Type.prototype = prototype; object = new Type(); @@ -18624,10 +19008,11 @@ } exports["default"] = create; }); enifed("ember-metal/platform/define_properties", ["exports", "ember-metal/platform/define_property"], function (exports, _emberMetalPlatformDefine_property) { + "use strict"; var defineProperties = Object.defineProperties; // ES5 15.2.3.7 // http://es5.github.com/#x15.2.3.7 @@ -18673,10 +19058,12 @@ @param {String} keyName property name to modify @param {Object} desc descriptor hash @return {void} @public */ + 'use strict'; + var defineProperty = (function checkCompliance(defineProperty) { if (!defineProperty) { return; } @@ -18754,14 +19141,14 @@ if (!canDefinePropertyOnDOM) { exports.defineProperty = defineProperty = function (obj, keyName, desc) { var isNode; - if (typeof Node === 'object') { + if (typeof Node === "object") { isNode = obj instanceof Node; } else { - isNode = typeof obj === 'object' && typeof obj.nodeType === 'number' && typeof obj.nodeName === 'string'; + isNode = typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string"; } if (isNode) { // TODO: Should we have a warning here? return obj[keyName] = desc.value; @@ -18787,10 +19174,16 @@ exports.defineProperty = defineProperty; exports.hasPropertyAccessors = hasPropertyAccessors; exports.canDefineNonEnumerableProperties = canDefineNonEnumerableProperties; }); enifed("ember-metal/properties", ["exports", "ember-metal/core", "ember-metal/utils", "ember-metal/platform/define_property", "ember-metal/property_events"], function (exports, _emberMetalCore, _emberMetalUtils, _emberMetalPlatformDefine_property, _emberMetalProperty_events) { + /** + @module ember-metal + */ + + "use strict"; + exports.Descriptor = Descriptor; exports.MANDATORY_SETTER_FUNCTION = MANDATORY_SETTER_FUNCTION; exports.DEFAULT_GETTER_FUNCTION = DEFAULT_GETTER_FUNCTION; exports.defineProperty = defineProperty; @@ -18820,11 +19213,11 @@ }; } function DEFAULT_GETTER_FUNCTION(name) { return function GETTER_FUNCTION() { - var meta = this["__ember_meta__"]; + var meta = this['__ember_meta__']; return meta && meta.values[name]; }; } /** @@ -18879,11 +19272,11 @@ if (!meta) { meta = _emberMetalUtils.meta(obj); } var watchEntry = meta.watching[keyName]; possibleDesc = obj[keyName]; - existingDesc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + existingDesc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; watching = watchEntry !== undefined && watchEntry > 0; if (existingDesc) { existingDesc.teardown(obj, keyName); @@ -18943,14 +19336,13 @@ } return this; } }); -/** -@module ember-metal -*/ enifed("ember-metal/property_events", ["exports", "ember-metal/utils", "ember-metal/events", "ember-metal/observer_set"], function (exports, _emberMetalUtils, _emberMetalEvents, _emberMetalObserver_set) { + "use strict"; + var PROPERTY_DID_CHANGE = _emberMetalUtils.symbol("PROPERTY_DID_CHANGE"); exports.PROPERTY_DID_CHANGE = PROPERTY_DID_CHANGE; var beforeObserverSet = new _emberMetalObserver_set["default"](); var observerSet = new _emberMetalObserver_set["default"](); @@ -18975,15 +19367,15 @@ @param {String} keyName The property key (or path) that will change. @return {void} @private */ function propertyWillChange(obj, keyName) { - var m = obj["__ember_meta__"]; - var watching = m && m.watching[keyName] > 0 || keyName === "length"; + var m = obj['__ember_meta__']; + var watching = m && m.watching[keyName] > 0 || keyName === 'length'; var proto = m && m.proto; var possibleDesc = obj[keyName]; - var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; if (!watching) { return; } @@ -19015,15 +19407,15 @@ @param {String} keyName The property key (or path) that will change. @return {void} @private */ function propertyDidChange(obj, keyName) { - var m = obj["__ember_meta__"]; - var watching = m && m.watching[keyName] > 0 || keyName === "length"; + var m = obj['__ember_meta__']; + var watching = m && m.watching[keyName] > 0 || keyName === 'length'; var proto = m && m.proto; var possibleDesc = obj[keyName]; - var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; if (proto === obj) { return; } @@ -19034,11 +19426,11 @@ if (obj[PROPERTY_DID_CHANGE]) { obj[PROPERTY_DID_CHANGE](keyName); } - if (!watching && keyName !== "length") { + if (!watching && keyName !== 'length') { return; } if (m && m.deps && m.deps[keyName]) { dependentKeysDidChange(obj, keyName, m); @@ -19123,11 +19515,11 @@ if (deps) { keys = keysOf(deps); for (i = 0; i < keys.length; i++) { key = keys[i]; possibleDesc = obj[key]; - desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; if (desc && desc._suspended === obj) { continue; } @@ -19135,11 +19527,11 @@ } } } function chainsWillChange(obj, keyName, m) { - if (!(m.hasOwnProperty("chainWatchers") && m.chainWatchers[keyName])) { + if (!(m.hasOwnProperty('chainWatchers') && m.chainWatchers[keyName])) { return; } var nodes = m.chainWatchers[keyName]; var events = []; @@ -19153,11 +19545,11 @@ propertyWillChange(events[i], events[i + 1]); } } function chainsDidChange(obj, keyName, m, suppressEvents) { - if (!(m && m.hasOwnProperty("chainWatchers") && m.chainWatchers[keyName])) { + if (!(m && m.hasOwnProperty('chainWatchers') && m.chainWatchers[keyName])) { return; } var nodes = m.chainWatchers[keyName]; var events = suppressEvents ? null : []; @@ -19225,11 +19617,11 @@ function notifyBeforeObservers(obj, keyName) { if (obj.isDestroying) { return; } - var eventName = keyName + ":before"; + var eventName = keyName + ':before'; var listeners, added; if (deferred) { listeners = beforeObserverSet.add(obj, keyName, eventName); added = _emberMetalEvents.accumulateListeners(obj, eventName, listeners); _emberMetalEvents.sendEvent(obj, eventName, [obj, keyName], added); @@ -19241,11 +19633,11 @@ function notifyObservers(obj, keyName) { if (obj.isDestroying) { return; } - var eventName = keyName + ":change"; + var eventName = keyName + ':change'; var listeners; if (deferred) { listeners = observerSet.add(obj, keyName, eventName); _emberMetalEvents.accumulateListeners(obj, eventName, listeners); } else { @@ -19259,10 +19651,16 @@ exports.beginPropertyChanges = beginPropertyChanges; exports.endPropertyChanges = endPropertyChanges; exports.changeProperties = changeProperties; }); enifed("ember-metal/property_get", ["exports", "ember-metal/core", "ember-metal/error", "ember-metal/path_cache", "ember-metal/platform/define_property", "ember-metal/utils", "ember-metal/is_none"], function (exports, _emberMetalCore, _emberMetalError, _emberMetalPath_cache, _emberMetalPlatformDefine_property, _emberMetalUtils, _emberMetalIs_none) { + /** + @module ember-metal + */ + + "use strict"; + exports.get = get; exports.normalizeTuple = normalizeTuple; exports._getPath = _getPath; exports.getWithDefault = getWithDefault; @@ -19270,11 +19668,10 @@ var INTERCEPT_GET = _emberMetalUtils.symbol("INTERCEPT_GET"); exports.INTERCEPT_GET = INTERCEPT_GET; var UNHANDLED_GET = _emberMetalUtils.symbol("UNHANDLED_GET"); - exports.UNHANDLED_GET = UNHANDLED_GET; // .......................................................... // GET AND SET // // If we are on a platform that supports accessors we can use those. // Otherwise simulate accessors by looking up the property directly on the @@ -19303,42 +19700,43 @@ @param {Object} obj The object to retrieve from. @param {String} keyName The property key to retrieve @return {Object} the property value or `null`. @public */ + exports.UNHANDLED_GET = UNHANDLED_GET; function get(obj, keyName) { _emberMetalCore["default"].deprecate("Get must be called with two arguments; an object and a property key", arguments.length === 2); // Helpers that operate with 'this' within an #each - if (keyName === "") { + if (keyName === '') { return obj; } - if (!keyName && "string" === typeof obj) { - _emberMetalCore["default"].deprecate("Calling Ember.get with only a property key has been deprecated, please also specify a target object."); + if (!keyName && 'string' === typeof obj) { + _emberMetalCore["default"].deprecate('Calling Ember.get with only a property key has been deprecated, please also specify a target object.'); keyName = obj; obj = _emberMetalCore["default"].lookup; } _emberMetalCore["default"].assert("Cannot call get with " + keyName + " key.", !!keyName); _emberMetalCore["default"].assert("Cannot call get with '" + keyName + "' on an undefined object.", obj !== undefined); if (_emberMetalIs_none["default"](obj)) { - _emberMetalCore["default"].deprecate("Calling Ember.get without a target object has been deprecated, please specify a target object."); + _emberMetalCore["default"].deprecate('Calling Ember.get without a target object has been deprecated, please specify a target object.'); return _getPath(obj, keyName); } - if (obj && typeof obj[INTERCEPT_GET] === "function") { + if (obj && typeof obj[INTERCEPT_GET] === 'function') { var result = obj[INTERCEPT_GET](obj, keyName); if (result !== UNHANDLED_GET) { return result; } } - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; var possibleDesc = obj[keyName]; - var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; var ret; if (desc === undefined && _emberMetalPath_cache.isPath(keyName)) { return _getPath(obj, keyName); } @@ -19351,11 +19749,11 @@ ret = meta.values[keyName]; } else { ret = obj[keyName]; } - if (ret === undefined && "object" === typeof obj && !(keyName in obj) && "function" === typeof obj.unknownProperty) { + if (ret === undefined && 'object' === typeof obj && !(keyName in obj) && 'function' === typeof obj.unknownProperty) { return obj.unknownProperty(keyName); } return ret; } @@ -19379,11 +19777,11 @@ var hasThis = _emberMetalPath_cache.hasThis(path); var isGlobal = !hasThis && _emberMetalPath_cache.isGlobal(path); var key; if (!target && !isGlobal) { - return [undefined, ""]; + return [undefined, '']; } if (hasThis) { path = path.slice(5); } @@ -19445,21 +19843,19 @@ return value; } exports["default"] = get; }); -/** -@module ember-metal -*/ enifed("ember-metal/property_set", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_events", "ember-metal/properties", "ember-metal/error", "ember-metal/path_cache", "ember-metal/platform/define_property", "ember-metal/utils"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_events, _emberMetalProperties, _emberMetalError, _emberMetalPath_cache, _emberMetalPlatformDefine_property, _emberMetalUtils) { + "use strict"; + exports.set = set; exports.trySet = trySet; var INTERCEPT_SET = _emberMetalUtils.symbol("INTERCEPT_SET"); exports.INTERCEPT_SET = INTERCEPT_SET; var UNHANDLED_SET = _emberMetalUtils.symbol("UNHANDLED_SET"); - exports.UNHANDLED_SET = UNHANDLED_SET; /** Sets the value of a property on an object, respecting computed properties and notifying observers and other listeners of the change. If the property is not defined but the object implements the `setUnknownProperty` method then that will be invoked as well. @@ -19470,15 +19866,16 @@ @param {String} keyName The property key to set @param {Object} value The value to set @return {Object} the passed value. @public */ + exports.UNHANDLED_SET = UNHANDLED_SET; function set(obj, keyName, value, tolerant) { - if (typeof obj === "string") { + if (typeof obj === 'string') { _emberMetalCore["default"].assert("Path '" + obj + "' must be global if no obj is given.", _emberMetalPath_cache.isGlobalPath(obj)); - _emberMetalCore["default"].deprecate("Calling Ember.set with only a property key and a value has been deprecated, please also specify a target object."); + _emberMetalCore["default"].deprecate('Calling Ember.set with only a property key and a value has been deprecated, please also specify a target object.'); value = keyName; keyName = obj; obj = _emberMetalCore["default"].lookup; } @@ -19490,47 +19887,47 @@ } // This path exists purely to implement backwards-compatible // effects (specifically, setting a property on a view may // invoke a mutator on `attrs`). - if (obj && typeof obj[INTERCEPT_SET] === "function") { + if (obj && typeof obj[INTERCEPT_SET] === 'function') { var result = obj[INTERCEPT_SET](obj, keyName, value, tolerant); if (result !== UNHANDLED_SET) { return result; } } var meta, possibleDesc, desc; if (obj) { - meta = obj["__ember_meta__"]; + meta = obj['__ember_meta__']; possibleDesc = obj[keyName]; - desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; } var isUnknown, currentValue; if ((!obj || desc === undefined) && _emberMetalPath_cache.isPath(keyName)) { - _emberMetalCore["default"].deprecate("Calling Ember.set without a target object has been deprecated, please specify a target object.", !!obj); + _emberMetalCore["default"].deprecate('Calling Ember.set without a target object has been deprecated, please specify a target object.', !!obj); return setPath(obj, keyName, value, tolerant); } _emberMetalCore["default"].assert("You need to provide an object and key to `set`.", !!obj && keyName !== undefined); - _emberMetalCore["default"].assert("calling set on destroyed object", !obj.isDestroyed); + _emberMetalCore["default"].assert('calling set on destroyed object', !obj.isDestroyed); if (desc) { desc.set(obj, keyName, value); } else { - if (obj !== null && value !== undefined && typeof obj === "object" && obj[keyName] === value) { + if (obj !== null && value !== undefined && typeof obj === 'object' && obj[keyName] === value) { return value; } - isUnknown = "object" === typeof obj && !(keyName in obj); + isUnknown = 'object' === typeof obj && !(keyName in obj); // setUnknownProperty is called if `obj` is an object, // the property does not already exist, and the // `setUnknownProperty` method exists on the object - if (isUnknown && "function" === typeof obj.setUnknownProperty) { + if (isUnknown && 'function' === typeof obj.setUnknownProperty) { obj.setUnknownProperty(keyName, value); } else if (meta && meta.watching[keyName] > 0) { if (meta.proto !== obj) { if (_emberMetalPlatformDefine_property.hasPropertyAccessors) { @@ -19545,12 +19942,12 @@ if (_emberMetalPlatformDefine_property.hasPropertyAccessors) { if (currentValue === undefined && !(keyName in obj) || !Object.prototype.propertyIsEnumerable.call(obj, keyName)) { _emberMetalProperties.defineProperty(obj, keyName, null, value); // setup mandatory setter } else { - meta.values[keyName] = value; - } + meta.values[keyName] = value; + } } else { obj[keyName] = value; } _emberMetalProperty_events.propertyDidChange(obj, keyName); } @@ -19566,32 +19963,32 @@ function setPath(root, path, value, tolerant) { var keyName; // get the last part of the path - keyName = path.slice(path.lastIndexOf(".") + 1); + keyName = path.slice(path.lastIndexOf('.') + 1); // get the first part of the part path = path === keyName ? keyName : path.slice(0, path.length - (keyName.length + 1)); // unless the path is this, look up the first part to // get the root - if (path !== "this") { + if (path !== 'this') { root = _emberMetalProperty_get._getPath(root, path); } else { _emberMetalCore["default"].deprecate("Ember.set with 'this' in the path has been deprecated. Please use the same path without 'this'."); } if (!keyName || keyName.length === 0) { - throw new _emberMetalError["default"]("Property set failed: You passed an empty path"); + throw new _emberMetalError["default"]('Property set failed: You passed an empty path'); } if (!root) { if (tolerant) { return; } else { - throw new _emberMetalError["default"]("Property set failed: object in path \"" + path + "\" could not be found or was destroyed."); + throw new _emberMetalError["default"]('Property set failed: object in path "' + path + '" could not be found or was destroyed.'); } } return set(root, keyName, value); } @@ -19614,10 +20011,11 @@ function trySet(root, path, value) { return set(root, path, value, true); } }); enifed('ember-metal/run_loop', ['exports', 'ember-metal/core', 'ember-metal/utils', 'ember-metal/array', 'ember-metal/property_events', 'backburner'], function (exports, _emberMetalCore, _emberMetalUtils, _emberMetalArray, _emberMetalProperty_events, _backburner) { + 'use strict'; function onBegin(current) { run.currentRunLoop = current; } @@ -19873,11 +20271,11 @@ invoked allowing you to change the target function. @param {Object} [arguments*] Optional arguments to be passed to the queued method. @return {void} @public */ - run.schedule = function () { + run.schedule = function () /* queue, target, method */{ checkAutoRun(); backburner.schedule.apply(backburner, arguments); }; // Used by global test teardown @@ -19937,11 +20335,11 @@ @param {Object} [args*] Optional arguments to pass to the timeout. @param {Number} wait Number of milliseconds to wait. @return {*} Timer information for use in cancelling, see `run.cancel`. @public */ - run.later = function () { + run.later = function () /*target, method*/{ return backburner.later.apply(backburner, arguments); }; /** Schedule a function to run one time during the current RunLoop. This is equivalent @@ -20017,11 +20415,11 @@ target at the time the method is invoked. @param {Object} [args*] Optional arguments to pass to the timeout. @return {Object} Timer information for use in cancelling, see `run.cancel`. @public */ - run.scheduleOnce = function () { + run.scheduleOnce = function () /*queue, target, method*/{ checkAutoRun(); return backburner.scheduleOnce.apply(backburner, arguments); }; /** @@ -20282,12 +20680,13 @@ if (_emberMetalArray.indexOf.call(run.queues, name) === -1) { run.queues.splice(_emberMetalArray.indexOf.call(run.queues, after) + 1, 0, name); } }; }); -/* queue, target, method */ /*target, method*/ /*queue, target, method*/ enifed("ember-metal/set_properties", ["exports", "ember-metal/property_events", "ember-metal/property_set", "ember-metal/keys"], function (exports, _emberMetalProperty_events, _emberMetalProperty_set, _emberMetalKeys) { + "use strict"; + exports["default"] = setProperties; /** Set a list of properties on an object. These properties are set inside a single `beginPropertyChanges` and `endPropertyChanges` batch, so @@ -20326,10 +20725,12 @@ }); return obj; } }); enifed("ember-metal/streams/conditional", ["exports", "ember-metal/streams/stream", "ember-metal/streams/utils", "ember-metal/platform/create"], function (exports, _emberMetalStreamsStream, _emberMetalStreamsUtils, _emberMetalPlatformCreate) { + "use strict"; + exports["default"] = conditional; function conditional(test, consequent, alternate) { if (_emberMetalStreamsUtils.isStream(test)) { return new ConditionalStream(test, consequent, alternate); @@ -20379,10 +20780,11 @@ return newTestResult ? _emberMetalStreamsUtils.read(this.consequent) : _emberMetalStreamsUtils.read(this.alternate); }; }); enifed("ember-metal/streams/dependency", ["exports", "ember-metal/core", "ember-metal/merge", "ember-metal/streams/utils"], function (exports, _emberMetalCore, _emberMetalMerge, _emberMetalStreamsUtils) { + "use strict"; /** @module ember-metal */ @@ -20456,15 +20858,16 @@ }); exports["default"] = Dependency; }); enifed('ember-metal/streams/key-stream', ['exports', 'ember-metal/core', 'ember-metal/merge', 'ember-metal/platform/create', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/observer', 'ember-metal/streams/stream', 'ember-metal/streams/utils'], function (exports, _emberMetalCore, _emberMetalMerge, _emberMetalPlatformCreate, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalObserver, _emberMetalStreamsStream, _emberMetalStreamsUtils) { + 'use strict'; function KeyStream(source, key) { - _emberMetalCore["default"].assert('KeyStream error: source must be a stream', _emberMetalStreamsUtils.isStream(source)); // TODO: This isn't necessary. - _emberMetalCore["default"].assert('KeyStream error: key must be a non-empty string', typeof key === 'string' && key.length > 0); - _emberMetalCore["default"].assert('KeyStream error: key must not have a \'.\'', key.indexOf('.') === -1); + _emberMetalCore["default"].assert("KeyStream error: source must be a stream", _emberMetalStreamsUtils.isStream(source)); // TODO: This isn't necessary. + _emberMetalCore["default"].assert("KeyStream error: key must be a non-empty string", typeof key === 'string' && key.length > 0); + _emberMetalCore["default"].assert("KeyStream error: key must not have a '.'", key.indexOf('.') === -1); // used to get the original path for debugging and legacy purposes var label = labelFor(source, key); this.init(label); @@ -20532,10 +20935,11 @@ }); exports["default"] = KeyStream; }); enifed("ember-metal/streams/proxy-stream", ["exports", "ember-metal/merge", "ember-metal/streams/stream", "ember-metal/platform/create"], function (exports, _emberMetalMerge, _emberMetalStreamsStream, _emberMetalPlatformCreate) { + "use strict"; function ProxyStream(source, label) { this.init(label); this.sourceDep = this.addMutableDependency(source); } @@ -20558,10 +20962,11 @@ }); exports["default"] = ProxyStream; }); enifed("ember-metal/streams/stream", ["exports", "ember-metal/core", "ember-metal/platform/create", "ember-metal/path_cache", "ember-metal/observer", "ember-metal/streams/utils", "ember-metal/streams/subscriber", "ember-metal/streams/dependency"], function (exports, _emberMetalCore, _emberMetalPlatformCreate, _emberMetalPath_cache, _emberMetalObserver, _emberMetalStreamsUtils, _emberMetalStreamsSubscriber, _emberMetalStreamsDependency) { + "use strict"; /** @module ember-metal */ @@ -20595,11 +21000,11 @@ this.dependencyTail = null; this.observedProxy = null; }, _makeChildStream: function (key) { - KeyStream = KeyStream || _emberMetalCore["default"].__loader.require("ember-metal/streams/key-stream")["default"]; + KeyStream = KeyStream || _emberMetalCore["default"].__loader.require('ember-metal/streams/key-stream')["default"]; return new KeyStream(this, key); }, removeChild: function (key) { delete this.children[key]; @@ -20735,22 +21140,22 @@ revalidate: function (value) { if (value !== this.observedProxy) { this._clearObservedProxy(); - ProxyMixin = ProxyMixin || _emberMetalCore["default"].__loader.require("ember-runtime/mixins/-proxy")["default"]; + ProxyMixin = ProxyMixin || _emberMetalCore["default"].__loader.require('ember-runtime/mixins/-proxy')["default"]; if (ProxyMixin.detect(value)) { - _emberMetalObserver.addObserver(value, "content", this, this.notify); + _emberMetalObserver.addObserver(value, 'content', this, this.notify); this.observedProxy = value; } } }, _clearObservedProxy: function () { if (this.observedProxy) { - _emberMetalObserver.removeObserver(this.observedProxy, "content", this, this.notify); + _emberMetalObserver.removeObserver(this.observedProxy, 'content', this, this.notify); this.observedProxy = null; } }, deactivate: function () { @@ -20775,11 +21180,11 @@ this.notifySubscribers(callbackToSkip, contextToSkip); } }, subscribe: function (callback, context) { - _emberMetalCore["default"].assert("You tried to subscribe to a stream but the callback provided was not a function.", typeof callback === "function"); + _emberMetalCore["default"].assert("You tried to subscribe to a stream but the callback provided was not a function.", typeof callback === 'function'); var subscriber = new _emberMetalStreamsSubscriber["default"](callback, context, this); if (this.subscriberHead === null) { this.subscriberHead = this.subscriberTail = subscriber; } else { @@ -20877,10 +21282,11 @@ } exports["default"] = Stream; }); enifed("ember-metal/streams/subscriber", ["exports", "ember-metal/merge"], function (exports, _emberMetalMerge) { + "use strict"; /** @module ember-metal */ @@ -20919,10 +21325,12 @@ }); exports["default"] = Subscriber; }); enifed('ember-metal/streams/utils', ['exports', './stream'], function (exports, _stream) { + 'use strict'; + exports.isStream = isStream; exports.subscribe = subscribe; exports.unsubscribe = unsubscribe; exports.read = read; exports.readArray = readArray; @@ -21159,11 +21567,11 @@ for (var prop in streams) { labels.push(prop + ': ' + inspect(streams[prop])); } - return labels.length ? '{ ' + labels.join(', ') + ' }' : '{}'; + return labels.length ? '{ ' + labels.join(', ') + ' }' : "{}"; } function labelFor(maybeStream) { if (isStream(maybeStream)) { var stream = maybeStream; @@ -21176,13 +21584,13 @@ function inspect(value) { switch (typeof value) { case 'string': return '"' + value + '"'; case 'object': - return '{ ... }'; + return "{ ... }"; case 'function': - return 'function() { ... }'; + return "function() { ... }"; default: return String(value); } } @@ -21198,18 +21606,18 @@ return stream; } function addDependency(stream, dependency) { - Ember.assert('Cannot add a stream as a dependency to a non-stream', isStream(stream) || !isStream(dependency)); + Ember.assert("Cannot add a stream as a dependency to a non-stream", isStream(stream) || !isStream(dependency)); if (isStream(stream)) { stream.addDependency(dependency); } } function zip(streams, callback, label) { - Ember.assert('Must call zip with a label', !!label); + Ember.assert("Must call zip with a label", !!label); var stream = new _stream["default"](function () { var array = readArray(streams); return callback ? callback(array) : array; }, function () { @@ -21222,11 +21630,11 @@ return stream; } function zipHash(object, callback, label) { - Ember.assert('Must call zipHash with a label', !!label); + Ember.assert("Must call zipHash with a label", !!label); var stream = new _stream["default"](function () { var hash = readHash(object); return callback ? callback(hash) : hash; }, function () { @@ -21272,11 +21680,11 @@ non-stream object, the return value of the provided function `fn`. */ function chain(value, fn, label) { - Ember.assert('Must call chain with a label', !!label); + Ember.assert("Must call chain with a label", !!label); if (isStream(value)) { var stream = new _stream["default"](fn, function () { return label + '(' + labelFor(value) + ')'; }); stream.addDependency(value); @@ -21290,12 +21698,18 @@ if (object && object.isStream) { object.setValue(value); } } }); -enifed("ember-metal/symbol", ["exports"], function (exports) {}); +enifed("ember-metal/symbol", ["exports"], function (exports) { + "use strict"; +}); enifed("ember-metal/utils", ["exports", "ember-metal/core", "ember-metal/platform/create", "ember-metal/platform/define_property"], function (exports, _emberMetalCore, _emberMetalPlatformCreate, _emberMetalPlatformDefine_property) { + // Remove "use strict"; from transpiled module until + // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed + // + exports.uuid = uuid; exports.symbol = symbol; exports.generateGuid = generateGuid; exports.guidFor = guidFor; exports.getMeta = getMeta; @@ -21305,13 +21719,10 @@ exports.tryInvoke = tryInvoke; exports.makeArray = makeArray; exports.inspect = inspect; exports.apply = apply; exports.applyStr = applyStr; - // Remove "use strict"; from transpiled module until - // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed - // "REMOVE_USE_STRICT: true"; /** @module ember-metal */ @@ -21345,11 +21756,11 @@ @property GUID_PREFIX @for Ember @type String @final */ - var GUID_PREFIX = "ember"; + var GUID_PREFIX = 'ember'; // Used for guid generation... var numberCache = []; var stringCache = {}; @@ -21406,11 +21817,11 @@ function symbol(debugName) { // TODO: Investigate using platform symbols, but we do not // want to require non-enumerability for this API, which // would introduce a large cost. - return intern(debugName + " [id=" + GUID_KEY + Math.floor(Math.random() * new Date()) + "]"); + return intern(debugName + ' [id=' + GUID_KEY + Math.floor(Math.random() * new Date()) + ']'); } /** A unique key used to assign guids and other private metadata to objects. If you inspect an object in your browser debugger you will often see these. @@ -21423,11 +21834,11 @@ @property GUID_KEY @for Ember @type String @final */ - var GUID_KEY = intern("__ember" + +new Date()); + var GUID_KEY = intern('__ember' + +new Date()); var GUID_DESC = { writable: true, configurable: true, enumerable: false, @@ -21455,11 +21866,11 @@ enumerable: false, value: null }; var EMBER_META_PROPERTY = { - name: "__ember_meta__", + name: '__ember_meta__', descriptor: META_DESC }; exports.EMBER_META_PROPERTY = EMBER_META_PROPERTY; var GUID_KEY_PROPERTY = { @@ -21467,15 +21878,14 @@ descriptor: nullDescriptor }; exports.GUID_KEY_PROPERTY = GUID_KEY_PROPERTY; var NEXT_SUPER_PROPERTY = { - name: "__nextSuper", + name: '__nextSuper', descriptor: undefinedDescriptor }; - exports.NEXT_SUPER_PROPERTY = NEXT_SUPER_PROPERTY; /** Generates a new guid, optionally saving the guid to the object that you pass in. You will rarely need to use this method. Instead you should call `Ember.guidFor(obj)`, which return an existing guid if available. @@ -21489,10 +21899,11 @@ If no object is passed, just generate a new guid. @param {String} [prefix] Prefix to place in front of the guid. Useful when you want to separate the guid into separate namespaces. @return {String} the guid */ + exports.NEXT_SUPER_PROPERTY = NEXT_SUPER_PROPERTY; function generateGuid(obj, prefix) { if (!prefix) { prefix = GUID_PREFIX; } @@ -21542,42 +21953,42 @@ var ret; var type = typeof obj; // Don't allow prototype changes to String etc. to change the guidFor switch (type) { - case "number": + case 'number': ret = numberCache[obj]; if (!ret) { - ret = numberCache[obj] = "nu" + obj; + ret = numberCache[obj] = 'nu' + obj; } return ret; - case "string": + case 'string': ret = stringCache[obj]; if (!ret) { - ret = stringCache[obj] = "st" + uuid(); + ret = stringCache[obj] = 'st' + uuid(); } return ret; - case "boolean": - return obj ? "(true)" : "(false)"; + case 'boolean': + return obj ? '(true)' : '(false)'; default: if (obj[GUID_KEY]) { return obj[GUID_KEY]; } if (obj === Object) { - return "(Object)"; + return '(Object)'; } if (obj === Array) { - return "(Array)"; + return '(Array)'; } ret = GUID_PREFIX + uuid(); if (obj[GUID_KEY] === null) { @@ -21664,11 +22075,11 @@ if (!ret) { if (_emberMetalPlatformDefine_property.canDefineNonEnumerableProperties) { if (obj.__defineNonEnumerable) { obj.__defineNonEnumerable(EMBER_META_PROPERTY); } else { - _emberMetalPlatformDefine_property.defineProperty(obj, "__ember_meta__", META_DESC); + _emberMetalPlatformDefine_property.defineProperty(obj, '__ember_meta__', META_DESC); } } ret = new Meta(obj); @@ -21681,11 +22092,11 @@ obj.__ember_meta__ = ret; } else if (ret.source !== obj) { if (obj.__defineNonEnumerable) { obj.__defineNonEnumerable(EMBER_META_PROPERTY); } else { - _emberMetalPlatformDefine_property.defineProperty(obj, "__ember_meta__", META_DESC); + _emberMetalPlatformDefine_property.defineProperty(obj, '__ember_meta__', META_DESC); } ret = _emberMetalPlatformCreate["default"](ret); ret.watching = _emberMetalPlatformCreate["default"](ret.watching); ret.cache = undefined; @@ -21696,11 +22107,11 @@ if (_emberMetalPlatformDefine_property.hasPropertyAccessors) { ret.values = _emberMetalPlatformCreate["default"](ret.values); } - obj["__ember_meta__"] = ret; + obj['__ember_meta__'] = ret; } return ret; } function getMeta(obj, property) { @@ -21845,11 +22256,11 @@ @param {String} methodName The method name to check for @return {Boolean} @private */ function canInvoke(obj, methodName) { - return !!(obj && typeof obj[methodName] === "function"); + return !!(obj && typeof obj[methodName] === 'function'); } /** Checks to see if the `methodName` exists on the `obj`, and if it does, invokes it with the arguments passed. @@ -21882,11 +22293,11 @@ var count = 0; try { // jscs:disable try {} finally { count++; - throw new Error("needsFinallyFixTest"); + throw new Error('needsFinallyFixTest'); } // jscs:enable } catch (e) {} return count !== 1; @@ -22059,11 +22470,11 @@ // var toString = Object.prototype.toString; var isArray = Array.isArray || function (value) { - return value !== null && value !== undefined && typeof value === "object" && typeof value.length === "number" && toString.call(value) === "[object Array]"; + return value !== null && value !== undefined && typeof value === 'object' && typeof value.length === 'number' && toString.call(value) === '[object Array]'; }; /** Forces the passed object to be part of an array. If the object is already an array, it will return the object. Otherwise, it will add the object to @@ -22110,41 +22521,41 @@ @private */ function inspect(obj) { if (obj === null) { - return "null"; + return 'null'; } if (obj === undefined) { - return "undefined"; + return 'undefined'; } if (isArray(obj)) { - return "[" + obj + "]"; + return '[' + obj + ']'; } // for non objects - if (typeof obj !== "object") { - return "" + obj; + if (typeof obj !== 'object') { + return '' + obj; } // overridden toString - if (typeof obj.toString === "function" && obj.toString !== toString) { + if (typeof obj.toString === 'function' && obj.toString !== toString) { return obj.toString(); } // Object.prototype.toString === {}.toString var v; var ret = []; for (var key in obj) { if (obj.hasOwnProperty(key)) { v = obj[key]; - if (v === "toString") { + if (v === 'toString') { continue; } // ignore useless items - if (typeof v === "function") { + if (typeof v === 'function') { v = "function() { ... }"; } - if (v && typeof v.toString !== "function") { + if (v && typeof v.toString !== 'function') { ret.push(key + ": " + toString.call(v)); } else { ret.push(key + ": " + v); } } @@ -22221,16 +22632,18 @@ exports.canInvoke = canInvoke; exports.tryFinally = tryFinally; exports.deprecatedTryFinally = deprecatedTryFinally; }); enifed("ember-metal/watch_key", ["exports", "ember-metal/core", "ember-metal/utils", "ember-metal/platform/define_property", "ember-metal/properties"], function (exports, _emberMetalCore, _emberMetalUtils, _emberMetalPlatformDefine_property, _emberMetalProperties) { + "use strict"; + exports.watchKey = watchKey; exports.unwatchKey = unwatchKey; function watchKey(obj, keyName, meta) { // can't watch length on Array - it is special... - if (keyName === "length" && _emberMetalUtils.isArray(obj)) { + if (keyName === 'length' && _emberMetalUtils.isArray(obj)) { return; } var m = meta || _emberMetalUtils.meta(obj); var watching = m.watching; @@ -22238,16 +22651,16 @@ // activate watching first time if (!watching[keyName]) { watching[keyName] = 1; var possibleDesc = obj[keyName]; - var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; if (desc && desc.willWatch) { desc.willWatch(obj, keyName); } - if ("function" === typeof obj.willWatchProperty) { + if ('function' === typeof obj.willWatchProperty) { obj.willWatchProperty(keyName); } if (_emberMetalPlatformDefine_property.hasPropertyAccessors) { @@ -22262,13 +22675,13 @@ var handleMandatorySetter = function handleMandatorySetter(m, obj, keyName) { var descriptor = Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(obj, keyName); var configurable = descriptor ? descriptor.configurable : true; var isWritable = descriptor ? descriptor.writable : true; - var hasValue = descriptor ? "value" in descriptor : true; + var hasValue = descriptor ? 'value' in descriptor : true; var possibleDesc = descriptor && descriptor.value; - var isDescriptor = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor; + var isDescriptor = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor; if (isDescriptor) { return; } @@ -22295,16 +22708,16 @@ if (watching[keyName] === 1) { watching[keyName] = 0; var possibleDesc = obj[keyName]; - var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; if (desc && desc.didUnwatch) { desc.didUnwatch(obj, keyName); } - if ("function" === typeof obj.didUnwatchProperty) { + if ('function' === typeof obj.didUnwatchProperty) { obj.didUnwatchProperty(keyName); } if (!desc && _emberMetalPlatformDefine_property.hasPropertyAccessors && keyName in obj) { @@ -22329,10 +22742,12 @@ watching[keyName]--; } } }); enifed("ember-metal/watch_path", ["exports", "ember-metal/utils", "ember-metal/chains"], function (exports, _emberMetalUtils, _emberMetalChains) { + "use strict"; + exports.watchPath = watchPath; exports.unwatchPath = unwatchPath; // get the chains for the current object. If the current object has // chains inherited from the proto they will be cloned and reconfigured for @@ -22348,11 +22763,11 @@ return ret; } function watchPath(obj, keyPath, meta) { // can't watch length on Array - it is special... - if (keyPath === "length" && _emberMetalUtils.isArray(obj)) { + if (keyPath === 'length' && _emberMetalUtils.isArray(obj)) { return; } var m = meta || _emberMetalUtils.meta(obj); var watching = m.watching; @@ -22377,10 +22792,16 @@ watching[keyPath]--; } } }); enifed("ember-metal/watching", ["exports", "ember-metal/utils", "ember-metal/chains", "ember-metal/watch_key", "ember-metal/watch_path", "ember-metal/path_cache"], function (exports, _emberMetalUtils, _emberMetalChains, _emberMetalWatch_key, _emberMetalWatch_path, _emberMetalPath_cache) { + /** + @module ember-metal + */ + + "use strict"; + exports.isWatching = isWatching; exports.unwatch = unwatch; exports.destroy = destroy; /** @@ -22396,11 +22817,11 @@ @param obj @param {String} _keyPath */ function watch(obj, _keyPath, m) { // can't watch length on Array - it is special... - if (_keyPath === "length" && _emberMetalUtils.isArray(obj)) { + if (_keyPath === 'length' && _emberMetalUtils.isArray(obj)) { return; } if (!_emberMetalPath_cache.isPath(_keyPath)) { _emberMetalWatch_key.watchKey(obj, _keyPath, m); @@ -22410,19 +22831,19 @@ } exports.watch = watch; function isWatching(obj, key) { - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; return (meta && meta.watching[key]) > 0; } watch.flushPending = _emberMetalChains.flushPendingChains; function unwatch(obj, _keyPath, m) { // can't watch length on Array - it is special... - if (_keyPath === "length" && _emberMetalUtils.isArray(obj)) { + if (_keyPath === 'length' && _emberMetalUtils.isArray(obj)) { return; } if (!_emberMetalPath_cache.isPath(_keyPath)) { _emberMetalWatch_key.unwatchKey(obj, _keyPath, m); @@ -22443,15 +22864,15 @@ @return {void} @private */ function destroy(obj) { - var meta = obj["__ember_meta__"]; + var meta = obj['__ember_meta__']; var node, nodes, key, nodeObject; if (meta) { - obj["__ember_meta__"] = null; + obj['__ember_meta__'] = null; // remove chainWatchers to remove circular references that would prevent GC node = meta.chains; if (node) { NODE_STACK.push(node); // process tree @@ -22476,39 +22897,45 @@ } } } } }); -/** -@module ember-metal -*/ enifed("ember-routing-htmlbars", ["exports", "ember-metal/core", "ember-metal/merge", "ember-htmlbars/helpers", "ember-htmlbars/keywords", "ember-routing-htmlbars/helpers/query-params", "ember-routing-htmlbars/keywords/action", "ember-routing-htmlbars/keywords/element-action", "ember-routing-htmlbars/keywords/link-to", "ember-routing-htmlbars/keywords/render"], function (exports, _emberMetalCore, _emberMetalMerge, _emberHtmlbarsHelpers, _emberHtmlbarsKeywords, _emberRoutingHtmlbarsHelpersQueryParams, _emberRoutingHtmlbarsKeywordsAction, _emberRoutingHtmlbarsKeywordsElementAction, _emberRoutingHtmlbarsKeywordsLinkTo, _emberRoutingHtmlbarsKeywordsRender) { + /** + @module ember + @submodule ember-routing-htmlbars + */ - _emberHtmlbarsHelpers.registerHelper("query-params", _emberRoutingHtmlbarsHelpersQueryParams.queryParamsHelper); + "use strict"; - _emberHtmlbarsKeywords.registerKeyword("action", _emberRoutingHtmlbarsKeywordsAction["default"]); - _emberHtmlbarsKeywords.registerKeyword("@element_action", _emberRoutingHtmlbarsKeywordsElementAction["default"]); - _emberHtmlbarsKeywords.registerKeyword("link-to", _emberRoutingHtmlbarsKeywordsLinkTo["default"]); - _emberHtmlbarsKeywords.registerKeyword("render", _emberRoutingHtmlbarsKeywordsRender["default"]); + _emberHtmlbarsHelpers.registerHelper('query-params', _emberRoutingHtmlbarsHelpersQueryParams.queryParamsHelper); + _emberHtmlbarsKeywords.registerKeyword('action', _emberRoutingHtmlbarsKeywordsAction["default"]); + _emberHtmlbarsKeywords.registerKeyword('@element_action', _emberRoutingHtmlbarsKeywordsElementAction["default"]); + _emberHtmlbarsKeywords.registerKeyword('link-to', _emberRoutingHtmlbarsKeywordsLinkTo["default"]); + _emberHtmlbarsKeywords.registerKeyword('render', _emberRoutingHtmlbarsKeywordsRender["default"]); + var deprecatedLinkTo = _emberMetalMerge["default"]({}, _emberRoutingHtmlbarsKeywordsLinkTo["default"]); _emberMetalMerge["default"](deprecatedLinkTo, { link: function (state, params, hash) { _emberRoutingHtmlbarsKeywordsLinkTo["default"].link.call(this, state, params, hash); _emberMetalCore["default"].deprecate("The 'linkTo' view helper is deprecated in favor of 'link-to'"); } }); - _emberHtmlbarsKeywords.registerKeyword("linkTo", deprecatedLinkTo); + _emberHtmlbarsKeywords.registerKeyword('linkTo', deprecatedLinkTo); exports["default"] = _emberMetalCore["default"]; }); -/** -@module ember -@submodule ember-routing-htmlbars -*/ enifed("ember-routing-htmlbars/helpers/query-params", ["exports", "ember-metal/core", "ember-routing/system/query_params"], function (exports, _emberMetalCore, _emberRoutingSystemQuery_params) { + /** + @module ember + @submodule ember-routing-htmlbars + */ + + "use strict"; + exports.queryParamsHelper = queryParamsHelper; /** This is a helper to be used in conjunction with the link-to helper. It will supply url query parameters to the target route. @@ -22532,18 +22959,19 @@ return _emberRoutingSystemQuery_params["default"].create({ values: hash }); } }); -/** -@module ember -@submodule ember-routing-htmlbars -*/ - // assert enifed("ember-routing-htmlbars/keywords/action", ["exports", "htmlbars-runtime/hooks", "ember-routing-htmlbars/keywords/closure-action"], function (exports, _htmlbarsRuntimeHooks, _emberRoutingHtmlbarsKeywordsClosureAction) { + /** + @module ember + @submodule ember-templates + */ + "use strict"; + /** The `{{action}}` helper provides a way to pass triggers for behavior (usually just a function) between components, and into components from controllers. ### Passing functions with the action helper @@ -22775,26 +23203,24 @@ */ exports["default"] = function (morph, env, scope, params, hash, template, inverse, visitor) { if (morph) { - _htmlbarsRuntimeHooks.keyword("@element_action", morph, env, scope, params, hash, template, inverse, visitor); + _htmlbarsRuntimeHooks.keyword('@element_action', morph, env, scope, params, hash, template, inverse, visitor); return true; } return _emberRoutingHtmlbarsKeywordsClosureAction["default"](morph, env, scope, params, hash, template, inverse, visitor); }; }); -/** -@module ember -@submodule ember-templates -*/ enifed("ember-routing-htmlbars/keywords/closure-action", ["exports", "ember-metal/streams/stream", "ember-metal/array", "ember-metal/streams/utils", "ember-metal/keys", "ember-metal/utils", "ember-metal/property_get", "ember-metal/error"], function (exports, _emberMetalStreamsStream, _emberMetalArray, _emberMetalStreamsUtils, _emberMetalKeys, _emberMetalUtils, _emberMetalProperty_get, _emberMetalError) { + "use strict"; + exports["default"] = closureAction; var INVOKE = _emberMetalUtils.symbol("INVOKE"); exports.INVOKE = INVOKE; - var ACTION = _emberMetalUtils.symbol("ACTION"); + var ACTION = _emberMetalUtils.symbol('ACTION'); exports.ACTION = ACTION; function closureAction(morph, env, scope, params, hash, template, inverse, visitor) { return new _emberMetalStreamsStream["default"](function () { @@ -22817,11 +23243,11 @@ // on-change={{action setName}} // element-space actions look to "controller" then target. Here we only // look to "target". target = _emberMetalStreamsUtils.read(scope.self); action = _emberMetalStreamsUtils.read(rawAction); - if (typeof action === "string") { + if (typeof action === 'string') { var actionName = action; action = null; // on-change={{action 'setName'}} if (hash.target) { // on-change={{action 'setName' target=alternativeComponent}} @@ -22879,10 +23305,11 @@ return closureAction; } }); enifed("ember-routing-htmlbars/keywords/element-action", ["exports", "ember-metal/core", "ember-metal/utils", "ember-metal/run_loop", "ember-views/streams/utils", "ember-views/system/utils", "ember-views/system/action_manager"], function (exports, _emberMetalCore, _emberMetalUtils, _emberMetalRun_loop, _emberViewsStreamsUtils, _emberViewsSystemUtils, _emberViewsSystemAction_manager) { + "use strict"; function assert(message, test) { // This only exists to prevent defeatureify from error when attempting // to transform the same source twice (tldr; you can't nest stripped statements) _emberMetalCore["default"].assert(message, test); @@ -22894,20 +23321,20 @@ var read = env.hooks.getValue; var actionName = read(params[0]); - assert("You specified a quoteless path to the {{action}} helper " + "which did not resolve to an action name (a string). " + "Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}}).", typeof actionName === "string" || typeof actionName === "function"); + assert("You specified a quoteless path to the {{action}} helper " + "which did not resolve to an action name (a string). " + "Perhaps you meant to use a quoted actionName? (e.g. {{action 'save'}}).", typeof actionName === 'string' || typeof actionName === 'function'); var actionArgs = []; for (var i = 1, l = params.length; i < l; i++) { actionArgs.push(_emberViewsStreamsUtils.readUnwrappedModel(params[i])); } var target; if (hash.target) { - if (typeof hash.target === "string") { + if (typeof hash.target === 'string') { target = read(getStream(env, scope, hash.target)); } else { target = read(hash.target); } } else { @@ -22920,11 +23347,11 @@ isStable: function (state, env, scope, params, hash) { return true; }, render: function (node, env, scope, params, hash, template, inverse, visitor) { - var actionId = env.dom.getAttribute(node.element, "data-ember-action") || _emberMetalUtils.uuid(); + var actionId = env.dom.getAttribute(node.element, 'data-ember-action') || _emberMetalUtils.uuid(); ActionHelper.registerAction({ actionId: actionId, node: node, eventName: hash.on || "click", @@ -22936,18 +23363,18 @@ node.cleanup = function () { ActionHelper.unregisterAction(actionId); }; - env.dom.setAttribute(node.element, "data-ember-action", actionId); + env.dom.setAttribute(node.element, 'data-ember-action', actionId); } }; var ActionHelper = {}; - exports.ActionHelper = ActionHelper; // registeredActions is re-exported for compatibility with older plugins // that were using this undocumented API. + exports.ActionHelper = ActionHelper; ActionHelper.registeredActions = _emberViewsSystemAction_manager["default"].registeredActions; ActionHelper.registerAction = function (_ref) { var actionId = _ref.actionId; var node = _ref.node; @@ -22982,19 +23409,19 @@ var actionName = _node$state.actionName; var actionArgs = _node$state.actionArgs; _emberMetalRun_loop["default"](function runRegisteredAction() { - if (typeof actionName === "function") { + if (typeof actionName === 'function') { actionName.apply(target, actionArgs); return; } if (target.send) { target.send.apply(target, [actionName].concat(actionArgs)); } else { - _emberMetalCore["default"].assert("The action '" + actionName + "' did not exist on " + target, typeof target[actionName] === "function"); + _emberMetalCore["default"].assert("The action '" + actionName + "' did not exist on " + target, typeof target[actionName] === 'function'); target[actionName].apply(target, actionArgs); } }); } @@ -23013,11 +23440,11 @@ function isAllowedEvent(event, allowedKeys) { if (typeof allowedKeys === "undefined") { if (POINTER_EVENT_TYPE_REGEX.test(event.type)) { return _emberViewsSystemUtils.isSimpleClick(event); } else { - allowedKeys = ""; + allowedKeys = ''; } } if (allowedKeys.indexOf("any") >= 0) { return true; @@ -23032,11 +23459,17 @@ return true; } }); // assert enifed("ember-routing-htmlbars/keywords/link-to", ["exports", "ember-metal/streams/utils", "ember-metal/core", "ember-metal/merge"], function (exports, _emberMetalStreamsUtils, _emberMetalCore, _emberMetalMerge) { + /** + @module ember + @submodule ember-routing-htmlbars + */ + "use strict"; + /** The `{{link-to}}` helper renders a link to the supplied `routeName` passing an optionally supplied model to the route as its `model` context of the route. The block for `{{link-to}}` becomes the innerHTML of the rendered @@ -23324,11 +23757,11 @@ // TODO: Remove once `hasBlock` is working again attrs.hasBlock = !!template; attrs.escaped = !morph.parseTextAsHTML; - env.hooks.component(morph, env, scope, "-link-to", params, attrs, { "default": template }, visitor); + env.hooks.component(morph, env, scope, '-link-to', params, attrs, { "default": template }, visitor); }, rerender: function (morph, env, scope, params, hash, template, inverse, visitor) { this.render(morph, env, scope, params, hash, template, inverse, visitor); } @@ -23344,17 +23777,14 @@ @param {Object} [context]* @return {String} HTML string @private */ }); -/** -@module ember -@submodule ember-routing-htmlbars -*/ - // assert enifed("ember-routing-htmlbars/keywords/render", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/error", "ember-metal/platform/create", "ember-metal/streams/utils", "ember-runtime/system/string", "ember-routing/system/generate_controller", "ember-htmlbars/node-managers/view-node-manager"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalError, _emberMetalPlatformCreate, _emberMetalStreamsUtils, _emberRuntimeSystemString, _emberRoutingSystemGenerate_controller, _emberHtmlbarsNodeManagersViewNodeManager) { + "use strict"; + exports["default"] = { willRender: function (renderNode, env) { if (env.view.ownerView._outlets) { // We make sure we will get dirtied when outlet state changes. env.view.ownerView._outlets.push(renderNode); @@ -23362,11 +23792,11 @@ }, setupState: function (prevState, env, scope, params, hash) { var name = params[0]; - _emberMetalCore["default"].assert("The first argument of {{render}} must be quoted, e.g. {{render \"sidebar\"}}.", typeof name === "string"); + _emberMetalCore["default"].assert("The first argument of {{render}} must be quoted, e.g. {{render \"sidebar\"}}.", typeof name === 'string'); return { parentView: env.view, manager: prevState.manager, controller: prevState.controller, @@ -23396,11 +23826,11 @@ // The render keyword presumes it can work without a router. This is really // only to satisfy the test: // // {{view}} should not override class bindings defined on a child view" // - var router = container.lookup("router:main"); + var router = container.lookup('router:main'); _emberMetalCore["default"].assert("The second argument of {{render}} must be a path, e.g. {{render \"post\" post}}.", params.length < 2 || _emberMetalStreamsUtils.isStream(params[1])); if (params.length === 1) { // use the singleton controller @@ -23409,22 +23839,22 @@ throw new _emberMetalError["default"]("You must pass a templateName to render"); } // # legacy namespace var originalName = name; - name = name.replace(/\//g, "."); + name = name.replace(/\//g, '.'); _emberMetalCore["default"].deprecate("Using a slash for namespacing with the {{render}} render helper has been deprecated.\n Please replace \"" + originalName + "\" with \"" + name + "\" in your call to the {{render}} helper.", !originalName.match(/\//g)); // \ legacy slash as namespace support - var templateName = "template:" + name; + var templateName = 'template:' + name; _emberMetalCore["default"].assert("You used `{{render '" + name + "'}}`, but '" + name + "' can not be " + "found as either a template or a view.", container._registry.has("view:" + name) || container._registry.has(templateName) || !!template); - var view = container.lookup("view:" + name); + var view = container.lookup('view:' + name); if (!view) { - view = container.lookup("view:default"); + view = container.lookup('view:default'); } - var viewHasTemplateSpecified = view && !!_emberMetalProperty_get.get(view, "template"); + var viewHasTemplateSpecified = view && !!_emberMetalProperty_get.get(view, 'template'); if (!template && !viewHasTemplateSpecified) { template = container.lookup(templateName); } if (view) { @@ -23435,17 +23865,17 @@ var controllerName; var controllerFullName; if (hash.controller) { controllerName = hash.controller; - controllerFullName = "controller:" + controllerName; + controllerFullName = 'controller:' + controllerName; delete hash.controller; _emberMetalCore["default"].assert("The controller name you supplied '" + controllerName + "' " + "did not resolve to a controller.", container._registry.has(controllerFullName)); } else { controllerName = name; - controllerFullName = "controller:" + controllerName; + controllerFullName = 'controller:' + controllerName; } var parentController = _emberMetalStreamsUtils.read(scope.locals.controller); var controller; @@ -23468,11 +23898,11 @@ parentController: parentController }); } if (view) { - view.set("controller", controller); + view.set('controller', controller); } state.controller = controller; hash.viewName = _emberRuntimeSystemString.camelize(name); @@ -23501,11 +23931,11 @@ nodeManager.render(env, hash, visitor); }, rerender: function (node, env, scope, params, hash, template, inverse, visitor) { var model = _emberMetalStreamsUtils.read(params[1]); - node.state.controller.set("model", model); + node.state.controller.set('model', model); } }; function childOutletState(name, env) { var topLevel = env.view.ownerView; @@ -23516,11 +23946,11 @@ var outletState = topLevel.outletState; if (!outletState.main) { return; } - var selectedOutletState = outletState.main.outlets["__ember_orphans__"]; + var selectedOutletState = outletState.main.outlets['__ember_orphans__']; if (!selectedOutletState) { return; } var matched = selectedOutletState.outlets[name]; if (matched) { @@ -23558,37 +23988,46 @@ for (var key in a) { if (a.hasOwnProperty(key)) { // name is only here for logging & debugging. If two different // names result in otherwise identical states, they're still // identical. - if (a[key] !== b[key] && key !== "name") { + if (a[key] !== b[key] && key !== 'name') { return false; } } } return true; } }); // assert enifed("ember-routing-views", ["exports", "ember-metal/core", "ember-routing-views/views/link", "ember-routing-views/views/outlet"], function (exports, _emberMetalCore, _emberRoutingViewsViewsLink, _emberRoutingViewsViewsOutlet) { + /** + @module ember + @submodule ember-routing-views + */ + "use strict"; + _emberMetalCore["default"].LinkView = _emberRoutingViewsViewsLink.DeprecatedLinkView; _emberMetalCore["default"].LinkComponent = _emberRoutingViewsViewsLink["default"]; _emberMetalCore["default"].OutletView = _emberRoutingViewsViewsOutlet.OutletView; exports["default"] = _emberMetalCore["default"]; }); -/** -@module ember -@submodule ember-routing-views -*/ enifed("ember-routing-views/views/link", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/computed", "ember-views/system/utils", "ember-views/views/component", "ember-runtime/inject", "ember-runtime/mixins/controller", "ember-htmlbars/templates/link-to"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberViewsSystemUtils, _emberViewsViewsComponent, _emberRuntimeInject, _emberRuntimeMixinsController, _emberHtmlbarsTemplatesLinkTo) { - _emberHtmlbarsTemplatesLinkTo["default"].meta.revision = "Ember@1.13.5"; + /** + @module ember + @submodule ember-routing-views + */ - var linkComponentClassNameBindings = ["active", "loading", "disabled"]; + "use strict"; + + _emberHtmlbarsTemplatesLinkTo["default"].meta.revision = 'Ember@1.13.6'; + + var linkComponentClassNameBindings = ['active', 'loading', 'disabled']; - linkComponentClassNameBindings = ["active", "loading", "disabled", "transitioningIn", "transitioningOut"]; + linkComponentClassNameBindings = ['active', 'loading', 'disabled', 'transitioningIn', 'transitioningOut']; /** `Ember.LinkComponent` renders an element whose `click` event triggers a transition of the application's instance of `Ember.Router` to @@ -23605,11 +24044,11 @@ @private **/ var LinkComponent = _emberViewsViewsComponent["default"].extend({ defaultLayout: _emberHtmlbarsTemplatesLinkTo["default"], - tagName: "a", + tagName: 'a', /** @deprecated Use current-when instead. @property currentWhen @private @@ -23619,11 +24058,11 @@ /** Used to determine when this LinkComponent is active. @property currentWhen @private */ - "current-when": null, + 'current-when': null, /** Sets the `title` attribute of the `LinkComponent`'s HTML element. @property title @default null @@ -23662,31 +24101,31 @@ @property activeClass @type String @default active @private **/ - activeClass: "active", + activeClass: 'active', /** The CSS class to apply to `LinkComponent`'s element when its `loading` property is `true`. @property loadingClass @type String @default loading @private **/ - loadingClass: "loading", + loadingClass: 'loading', /** The CSS class to apply to a `LinkComponent`'s element when its `disabled` property is `true`. @property disabledClass @type String @default disabled @private **/ - disabledClass: "disabled", + disabledClass: 'disabled', _isDisabled: false, /** Determines whether the `LinkComponent` will trigger routing via the `replaceWith` routing strategy. @@ -23704,11 +24143,11 @@ @property attributeBindings @type Array | String @default ['title', 'rel', 'tabindex', 'target'] @private */ - attributeBindings: ["href", "title", "rel", "tabindex", "target"], + attributeBindings: ['href', 'title', 'rel', 'tabindex', 'target'], /** By default the `{{link-to}}` helper will bind to the `active`, `loading`, and `disabled` classes. It is discouraged to override these directly. @property classNameBindings @@ -23727,11 +24166,11 @@ @property eventName @type String @default click @private */ - eventName: "click", + eventName: 'click', // this is doc'ed here so it shows up in the events // section of the API documentation, which is where // people will likely go looking for it. /** @@ -23763,18 +24202,18 @@ @private */ init: function () { this._super.apply(this, arguments); - _emberMetalCore["default"].deprecate("Using currentWhen with {{link-to}} is deprecated in favor of `current-when`.", !this.currentWhen); + _emberMetalCore["default"].deprecate('Using currentWhen with {{link-to}} is deprecated in favor of `current-when`.', !this.currentWhen); // Map desired event name to invoke function - var eventName = _emberMetalProperty_get.get(this, "eventName"); + var eventName = _emberMetalProperty_get.get(this, 'eventName'); this.on(eventName, this, this._invoke); }, - _routing: _emberRuntimeInject["default"].service("-routing"), + _routing: _emberRuntimeInject["default"].service('-routing'), /** Accessed as a classname binding to apply the `LinkComponent`'s `disabledClass` CSS `class` to the element when the link is disabled. When `true` interactions with the element will not trigger route changes. @@ -23785,14 +24224,14 @@ get: function (key, value) { return false; }, set: function (key, value) { if (value !== undefined) { - this.set("_isDisabled", value); + this.set('_isDisabled', value); } - return value ? _emberMetalProperty_get.get(this, "disabledClass") : false; + return value ? _emberMetalProperty_get.get(this, 'disabledClass') : false; } }), /** Accessed as a classname binding to apply the `LinkComponent`'s `activeClass` @@ -23803,45 +24242,45 @@ The `currentWhen` property can match against multiple routes by separating route names using the ` ` (space) character. @property active @private */ - active: _emberMetalComputed.computed("attrs.params", "_routing.currentState", function computeLinkComponentActive() { - var currentState = _emberMetalProperty_get.get(this, "_routing.currentState"); + active: _emberMetalComputed.computed('attrs.params', '_routing.currentState', function computeLinkComponentActive() { + var currentState = _emberMetalProperty_get.get(this, '_routing.currentState'); if (!currentState) { return false; } return computeActive(this, currentState); }), - willBeActive: _emberMetalComputed.computed("_routing.targetState", function () { - var routing = _emberMetalProperty_get.get(this, "_routing"); - var targetState = _emberMetalProperty_get.get(routing, "targetState"); - if (_emberMetalProperty_get.get(routing, "currentState") === targetState) { + willBeActive: _emberMetalComputed.computed('_routing.targetState', function () { + var routing = _emberMetalProperty_get.get(this, '_routing'); + var targetState = _emberMetalProperty_get.get(routing, 'targetState'); + if (_emberMetalProperty_get.get(routing, 'currentState') === targetState) { return; } return !!computeActive(this, targetState); }), - transitioningIn: _emberMetalComputed.computed("active", "willBeActive", function () { - var willBeActive = _emberMetalProperty_get.get(this, "willBeActive"); - if (typeof willBeActive === "undefined") { + transitioningIn: _emberMetalComputed.computed('active', 'willBeActive', function () { + var willBeActive = _emberMetalProperty_get.get(this, 'willBeActive'); + if (typeof willBeActive === 'undefined') { return false; } - return !_emberMetalProperty_get.get(this, "active") && willBeActive && "ember-transitioning-in"; + return !_emberMetalProperty_get.get(this, 'active') && willBeActive && 'ember-transitioning-in'; }), - transitioningOut: _emberMetalComputed.computed("active", "willBeActive", function () { - var willBeActive = _emberMetalProperty_get.get(this, "willBeActive"); - if (typeof willBeActive === "undefined") { + transitioningOut: _emberMetalComputed.computed('active', 'willBeActive', function () { + var willBeActive = _emberMetalProperty_get.get(this, 'willBeActive'); + if (typeof willBeActive === 'undefined') { return false; } - return _emberMetalProperty_get.get(this, "active") && !willBeActive && "ember-transitioning-out"; + return _emberMetalProperty_get.get(this, 'active') && !willBeActive && 'ember-transitioning-out'; }), /** Event handler that invokes the link, activating the associated route. @private @@ -23854,34 +24293,34 @@ return true; } if (this.attrs.preventDefault !== false) { var targetAttribute = this.attrs.target; - if (!targetAttribute || targetAttribute === "_self") { + if (!targetAttribute || targetAttribute === '_self') { event.preventDefault(); } } if (this.attrs.bubbles === false) { event.stopPropagation(); } - if (_emberMetalProperty_get.get(this, "_isDisabled")) { + if (_emberMetalProperty_get.get(this, '_isDisabled')) { return false; } - if (_emberMetalProperty_get.get(this, "loading")) { + if (_emberMetalProperty_get.get(this, 'loading')) { _emberMetalCore["default"].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."); return false; } var targetAttribute2 = this.attrs.target; - if (targetAttribute2 && targetAttribute2 !== "_self") { + if (targetAttribute2 && targetAttribute2 !== '_self') { return false; } - _emberMetalProperty_get.get(this, "_routing").transitionTo(_emberMetalProperty_get.get(this, "targetRouteName"), _emberMetalProperty_get.get(this, "models"), _emberMetalProperty_get.get(this, "queryParams.values"), _emberMetalProperty_get.get(this, "attrs.replace")); + _emberMetalProperty_get.get(this, '_routing').transitionTo(_emberMetalProperty_get.get(this, 'targetRouteName'), _emberMetalProperty_get.get(this, 'models'), _emberMetalProperty_get.get(this, 'queryParams.values'), _emberMetalProperty_get.get(this, 'attrs.replace')); }, queryParams: null, /** @@ -23890,35 +24329,35 @@ If the `LinkComponent`'s `tagName` is changed to a value other than `a`, this property will be ignored. @property href @private */ - href: _emberMetalComputed.computed("models", "targetRouteName", "_routing.currentState", function computeLinkComponentHref() { + href: _emberMetalComputed.computed('models', 'targetRouteName', '_routing.currentState', function computeLinkComponentHref() { - if (_emberMetalProperty_get.get(this, "tagName") !== "a") { + if (_emberMetalProperty_get.get(this, 'tagName') !== 'a') { return; } - var targetRouteName = _emberMetalProperty_get.get(this, "targetRouteName"); - var models = _emberMetalProperty_get.get(this, "models"); + var targetRouteName = _emberMetalProperty_get.get(this, 'targetRouteName'); + var models = _emberMetalProperty_get.get(this, 'models'); - if (_emberMetalProperty_get.get(this, "loading")) { - return _emberMetalProperty_get.get(this, "loadingHref"); + if (_emberMetalProperty_get.get(this, 'loading')) { + return _emberMetalProperty_get.get(this, 'loadingHref'); } targetRouteName = this._handleOnlyQueryParamsSupplied(targetRouteName); - var routing = _emberMetalProperty_get.get(this, "_routing"); - return routing.generateURL(targetRouteName, models, _emberMetalProperty_get.get(this, "queryParams.values")); + var routing = _emberMetalProperty_get.get(this, '_routing'); + return routing.generateURL(targetRouteName, models, _emberMetalProperty_get.get(this, 'queryParams.values')); }), - loading: _emberMetalComputed.computed("models", "targetRouteName", function () { - var targetRouteName = _emberMetalProperty_get.get(this, "targetRouteName"); - var models = _emberMetalProperty_get.get(this, "models"); + loading: _emberMetalComputed.computed('models', 'targetRouteName', function () { + var targetRouteName = _emberMetalProperty_get.get(this, 'targetRouteName'); + var models = _emberMetalProperty_get.get(this, 'models'); if (!modelsAreLoaded(models) || targetRouteName == null) { - return _emberMetalProperty_get.get(this, "loadingClass"); + return _emberMetalProperty_get.get(this, 'loadingClass'); } }), _handleOnlyQueryParamsSupplied: function (route) { var params = this.attrs.params.slice(); @@ -23926,13 +24365,13 @@ if (lastParam && lastParam.isQueryParams) { params.pop(); } var onlyQueryParamsSupplied = this.attrs.hasBlock ? params.length === 0 : params.length === 1; if (onlyQueryParamsSupplied) { - var appController = this.container.lookup("controller:application"); + var appController = this.container.lookup('controller:application'); if (appController) { - return _emberMetalProperty_get.get(appController, "currentRouteName"); + return _emberMetalProperty_get.get(appController, 'currentRouteName'); } } return route; }, @@ -23942,11 +24381,11 @@ @property loadingHref @type String @default # @private */ - loadingHref: "#", + loadingHref: '#', willRender: function () { var queryParams; var attrs = this.attrs; @@ -23963,47 +24402,47 @@ } else { queryParams = {}; } if (attrs.disabledClass) { - this.set("disabledClass", attrs.disabledClass); + this.set('disabledClass', attrs.disabledClass); } if (attrs.activeClass) { - this.set("activeClass", attrs.activeClass); + this.set('activeClass', attrs.activeClass); } if (attrs.disabledWhen) { - this.set("disabled", attrs.disabledWhen); + this.set('disabled', attrs.disabledWhen); } - var currentWhen = attrs["current-when"]; + var currentWhen = attrs['current-when']; if (attrs.currentWhen) { - _emberMetalCore["default"].deprecate("Using currentWhen with {{link-to}} is deprecated in favor of `current-when`.", !attrs.currentWhen); + _emberMetalCore["default"].deprecate('Using currentWhen with {{link-to}} is deprecated in favor of `current-when`.', !attrs.currentWhen); currentWhen = attrs.currentWhen; } if (currentWhen) { - this.set("currentWhen", currentWhen); + this.set('currentWhen', currentWhen); } // TODO: Change to built-in hasBlock once it's available if (!attrs.hasBlock) { - this.set("linkTitle", params.shift()); + this.set('linkTitle', params.shift()); } if (attrs.loadingClass) { - _emberMetalProperty_set.set(this, "loadingClass", attrs.loadingClass); + _emberMetalProperty_set.set(this, 'loadingClass', attrs.loadingClass); } for (var i = 0; i < params.length; i++) { var value = params[i]; while (_emberRuntimeMixinsController["default"].detect(value)) { - _emberMetalCore["default"].deprecate("Providing `{{link-to}}` with a param that is wrapped in a controller is deprecated. Please update `" + attrs.view + "` to use `{{link-to \"post\" someController.model}}` instead."); - value = value.get("model"); + _emberMetalCore["default"].deprecate('Providing `{{link-to}}` with a param that is wrapped in a controller is deprecated. Please update `' + attrs.view + '` to use `{{link-to "post" someController.model}}` instead.'); + value = value.get('model'); } params[i] = value; } @@ -24015,33 +24454,33 @@ models.push(params[i]); } var resolvedQueryParams = getResolvedQueryParams(queryParams, targetRouteName); - this.set("targetRouteName", targetRouteName); - this.set("models", models); - this.set("queryParams", queryParams); - this.set("resolvedQueryParams", resolvedQueryParams); + this.set('targetRouteName', targetRouteName); + this.set('models', models); + this.set('queryParams', queryParams); + this.set('resolvedQueryParams', resolvedQueryParams); } }); LinkComponent.toString = function () { return "LinkComponent"; }; function computeActive(view, routerState) { - if (_emberMetalProperty_get.get(view, "loading")) { + if (_emberMetalProperty_get.get(view, 'loading')) { return false; } - var currentWhen = _emberMetalProperty_get.get(view, "currentWhen"); + var currentWhen = _emberMetalProperty_get.get(view, 'currentWhen'); var isCurrentWhenSpecified = !!currentWhen; - currentWhen = currentWhen || _emberMetalProperty_get.get(view, "targetRouteName"); - currentWhen = currentWhen.split(" "); + currentWhen = currentWhen || _emberMetalProperty_get.get(view, 'targetRouteName'); + currentWhen = currentWhen.split(' '); for (var i = 0, len = currentWhen.length; i < len; i++) { if (isActiveForRoute(view, currentWhen[i], isCurrentWhenSpecified, routerState)) { - return _emberMetalProperty_get.get(view, "activeClass"); + return _emberMetalProperty_get.get(view, 'activeClass'); } } return false; } @@ -24055,12 +24494,12 @@ return true; } function isActiveForRoute(view, routeName, isCurrentWhenSpecified, routerState) { - var service = _emberMetalProperty_get.get(view, "_routing"); - return service.isActiveForRoute(_emberMetalProperty_get.get(view, "models"), _emberMetalProperty_get.get(view, "resolvedQueryParams"), routeName, routerState, isCurrentWhenSpecified); + var service = _emberMetalProperty_get.get(view, '_routing'); + return service.isActiveForRoute(_emberMetalProperty_get.get(view, 'models'), _emberMetalProperty_get.get(view, 'resolvedQueryParams'), routeName, routerState, isCurrentWhenSpecified); } function getResolvedQueryParams(queryParamsObject, targetRouteName) { var resolvedQueryParams = {}; @@ -24080,43 +24519,45 @@ } /* DeprecatedLinkView - Start: TODO: Delete in Ember 2.0 */ var DeprecatedLinkView = LinkComponent.extend({ init: function () { - _emberMetalCore["default"].deprecate("Ember.LinkView is deprecated. Please use Ember.LinkComponent.", false); + _emberMetalCore["default"].deprecate('Ember.LinkView is deprecated. Please use Ember.LinkComponent.', false); this._super.apply(this, arguments); } }); DeprecatedLinkView.reopen = function reopenWithDeprecation() { - _emberMetalCore["default"].deprecate("Ember.LinkView is deprecated. Please use Ember.LinkComponent.", false); + _emberMetalCore["default"].deprecate('Ember.LinkView is deprecated. Please use Ember.LinkComponent.', false); return LinkComponent.reopen.apply(LinkComponent, arguments); }; DeprecatedLinkView.reopenClass({ extend: function () { - _emberMetalCore["default"].deprecate("Ember.LinkView is deprecated. Please extend from Ember.LinkComponent.", false); + _emberMetalCore["default"].deprecate('Ember.LinkView is deprecated. Please extend from Ember.LinkComponent.', false); return this._super.apply(this, arguments); } }); exports.DeprecatedLinkView = DeprecatedLinkView; /* DeprecatedLinkView - End*/ exports["default"] = LinkComponent; }); -/** -@module ember -@submodule ember-routing-views -*/ - // FEATURES, Logger, assert enifed("ember-routing-views/views/outlet", ["exports", "ember-views/views/view", "ember-htmlbars/templates/top-level-view"], function (exports, _emberViewsViewsView, _emberHtmlbarsTemplatesTopLevelView) { - _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = "Ember@1.13.5"; + /** + @module ember + @submodule ember-routing-views + */ + "use strict"; + + _emberHtmlbarsTemplatesTopLevelView["default"].meta.revision = 'Ember@1.13.6'; + var CoreOutletView = _emberViewsViewsView["default"].extend({ defaultTemplate: _emberHtmlbarsTemplatesTopLevelView["default"], init: function () { this._super(); @@ -24145,19 +24586,21 @@ } } }); exports.CoreOutletView = CoreOutletView; - var OutletView = CoreOutletView.extend({ tagName: "" }); + var OutletView = CoreOutletView.extend({ tagName: '' }); exports.OutletView = OutletView; }); -/** -@module ember -@submodule ember-routing-views -*/ enifed("ember-routing", ["exports", "ember-metal/core", "ember-routing/ext/run_loop", "ember-routing/ext/controller", "ember-routing/location/api", "ember-routing/location/none_location", "ember-routing/location/hash_location", "ember-routing/location/history_location", "ember-routing/location/auto_location", "ember-routing/system/generate_controller", "ember-routing/system/controller_for", "ember-routing/system/dsl", "ember-routing/system/router", "ember-routing/system/route", "ember-routing/initializers/routing-service"], function (exports, _emberMetalCore, _emberRoutingExtRun_loop, _emberRoutingExtController, _emberRoutingLocationApi, _emberRoutingLocationNone_location, _emberRoutingLocationHash_location, _emberRoutingLocationHistory_location, _emberRoutingLocationAuto_location, _emberRoutingSystemGenerate_controller, _emberRoutingSystemController_for, _emberRoutingSystemDsl, _emberRoutingSystemRouter, _emberRoutingSystemRoute, _emberRoutingInitializersRoutingService) { + /** + @module ember + @submodule ember-routing + */ + "use strict"; + _emberMetalCore["default"].Location = _emberRoutingLocationApi["default"]; _emberMetalCore["default"].AutoLocation = _emberRoutingLocationAuto_location["default"]; _emberMetalCore["default"].HashLocation = _emberRoutingLocationHash_location["default"]; _emberMetalCore["default"].HistoryLocation = _emberRoutingLocationHistory_location["default"]; _emberMetalCore["default"].NoneLocation = _emberRoutingLocationNone_location["default"]; @@ -24169,25 +24612,22 @@ _emberMetalCore["default"].Router = _emberRoutingSystemRouter["default"]; _emberMetalCore["default"].Route = _emberRoutingSystemRoute["default"]; exports["default"] = _emberMetalCore["default"]; }); -/** -@module ember -@submodule ember-routing -*/ // ES6TODO: Cleanup modules with side-effects below enifed("ember-routing/ext/controller", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/computed", "ember-metal/utils", "ember-metal/merge", "ember-runtime/mixins/controller"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberMetalUtils, _emberMetalMerge, _emberRuntimeMixinsController) { + "use strict"; /** @module ember @submodule ember-routing */ _emberRuntimeMixinsController["default"].reopen({ - concatenatedProperties: ["queryParams"], + concatenatedProperties: ['queryParams'], init: function () { this._super.apply(this, arguments); listenForQueryParamChanges(this); }, @@ -24213,14 +24653,14 @@ @private */ _normalizedQueryParams: _emberMetalComputed.computed(function () { var m = _emberMetalUtils.meta(this); if (m.proto !== this) { - return _emberMetalProperty_get.get(m.proto, "_normalizedQueryParams"); + return _emberMetalProperty_get.get(m.proto, '_normalizedQueryParams'); } - var queryParams = _emberMetalProperty_get.get(this, "queryParams"); + var queryParams = _emberMetalProperty_get.get(this, 'queryParams'); if (queryParams._qpMap) { return queryParams._qpMap; } var qpMap = queryParams._qpMap = {}; @@ -24237,25 +24677,25 @@ @private */ _cacheMeta: _emberMetalComputed.computed(function () { var m = _emberMetalUtils.meta(this); if (m.proto !== this) { - return _emberMetalProperty_get.get(m.proto, "_cacheMeta"); + return _emberMetalProperty_get.get(m.proto, '_cacheMeta'); } var cacheMeta = {}; - var qpMap = _emberMetalProperty_get.get(this, "_normalizedQueryParams"); + var qpMap = _emberMetalProperty_get.get(this, '_normalizedQueryParams'); for (var prop in qpMap) { if (!qpMap.hasOwnProperty(prop)) { continue; } var qp = qpMap[prop]; var scope = qp.scope; var parts; - if (scope === "controller") { + if (scope === 'controller') { parts = []; } cacheMeta[prop] = { parts: parts, // provided by route if 'model' scope @@ -24272,11 +24712,11 @@ /** @method _updateCacheParams @private */ _updateCacheParams: function (params) { - var cacheMeta = _emberMetalProperty_get.get(this, "_cacheMeta"); + var cacheMeta = _emberMetalProperty_get.get(this, '_cacheMeta'); for (var prop in cacheMeta) { if (!cacheMeta.hasOwnProperty(prop)) { continue; } var propMeta = cacheMeta[prop]; @@ -24296,11 +24736,11 @@ @method _qpChanged @private */ _qpChanged: function (controller, _prop) { var prop = _prop.substr(0, _prop.length - 3); - var cacheMeta = _emberMetalProperty_get.get(controller, "_cacheMeta"); + var cacheMeta = _emberMetalProperty_get.get(controller, '_cacheMeta'); var propCache = cacheMeta[prop]; var cacheKey = controller._calculateCacheKey(propCache.prefix || "", propCache.parts, propCache.values); var value = _emberMetalProperty_get.get(controller, prop); // 1. Update model-dep cache @@ -24320,24 +24760,24 @@ @method _calculateCacheKey @private */ _calculateCacheKey: function (prefix, _parts, values) { var parts = _parts || []; - var suffixes = ""; + var suffixes = ''; for (var i = 0, len = parts.length; i < len; ++i) { var part = parts[i]; var cacheValuePrefix = _calculateCacheValuePrefix(prefix, part); var value; if (cacheValuePrefix && cacheValuePrefix in values) { var partRemovedPrefix = part.indexOf(cacheValuePrefix) === 0 ? part.substr(cacheValuePrefix.length + 1) : part; value = _emberMetalProperty_get.get(values[cacheValuePrefix], partRemovedPrefix); } else { value = _emberMetalProperty_get.get(values, part); } - suffixes += "::" + part + ":" + value; + suffixes += '::' + part + ':' + value; } - return prefix + suffixes.replace(ALL_PERIODS_REGEX, "-"); + return prefix + suffixes.replace(ALL_PERIODS_REGEX, '-'); }, /** Transition the application into another route. The route may be either a single route or route path: @@ -24395,11 +24835,11 @@ @method transitionToRoute @public */ transitionToRoute: function () { // target may be either another controller or a router - var target = _emberMetalProperty_get.get(this, "target"); + var target = _emberMetalProperty_get.get(this, 'target'); var method = target.transitionToRoute || target.transitionTo; return method.apply(target, arguments); }, /** @@ -24458,11 +24898,11 @@ @method replaceRoute @private */ replaceRoute: function () { // target may be either another controller or a router - var target = _emberMetalProperty_get.get(this, "target"); + var target = _emberMetalProperty_get.get(this, 'target'); var method = target.replaceRoute || target.replaceWith; return method.apply(target, arguments); }, /** @@ -24480,11 +24920,11 @@ var ALL_PERIODS_REGEX = /\./g; function accumulateQueryParamDescriptors(_desc, accum) { var desc = _desc; var tmp; - if (typeof desc === "string") { + if (typeof desc === 'string') { tmp = {}; tmp[desc] = { as: null }; desc = tmp; } @@ -24492,28 +24932,28 @@ if (!desc.hasOwnProperty(key)) { return; } var singleDesc = desc[key]; - if (typeof singleDesc === "string") { + if (typeof singleDesc === 'string') { singleDesc = { as: singleDesc }; } - tmp = accum[key] || { as: null, scope: "model" }; + tmp = accum[key] || { as: null, scope: 'model' }; _emberMetalMerge["default"](tmp, singleDesc); accum[key] = tmp; } } function listenForQueryParamChanges(controller) { - var qpMap = _emberMetalProperty_get.get(controller, "_normalizedQueryParams"); + var qpMap = _emberMetalProperty_get.get(controller, '_normalizedQueryParams'); for (var prop in qpMap) { if (!qpMap.hasOwnProperty(prop)) { continue; } - controller.addObserver(prop + ".[]", controller, controller._qpChanged); + controller.addObserver(prop + '.[]', controller, controller._qpChanged); } } function _calculateCacheValuePrefix(prefix, part) { // calculates the dot seperated sections from prefix that are also @@ -24523,14 +24963,14 @@ // - returns: site.article (use get(values[site.article], 'id') to get the dynamic part - used below) // given : prefix = site.article, part = site.article.id // - returns: site.article. (use get(values[site.article], 'id') to get the dynamic part - used below) - var prefixParts = prefix.split("."); - var currPrefix = ""; + var prefixParts = prefix.split('.'); + var currPrefix = ''; for (var i = 0, len = prefixParts.length; i < len; i++) { - var currPart = prefixParts.slice(0, i + 1).join("."); + var currPart = prefixParts.slice(0, i + 1).join('.'); if (part.indexOf(currPart) !== 0) { break; } currPrefix = currPart; } @@ -24539,10 +24979,11 @@ exports["default"] = _emberRuntimeMixinsController["default"]; }); // FEATURES, deprecate enifed('ember-routing/ext/run_loop', ['exports', 'ember-metal/run_loop'], function (exports, _emberMetalRun_loop) { + 'use strict'; /** @module ember @submodule ember-views */ @@ -24552,24 +24993,26 @@ // loading state entry if all context promises resolve on the // 'actions' queue first. _emberMetalRun_loop["default"]._addQueue('routerTransitions', 'actions'); }); enifed("ember-routing/initializers/routing-service", ["exports", "ember-runtime/system/lazy_load", "ember-routing/services/routing"], function (exports, _emberRuntimeSystemLazy_load, _emberRoutingServicesRouting) { + "use strict"; - _emberRuntimeSystemLazy_load.onLoad("Ember.Application", function (Application) { + _emberRuntimeSystemLazy_load.onLoad('Ember.Application', function (Application) { Application.initializer({ - name: "routing-service", + name: 'routing-service', initialize: function (registry) { // Register the routing service... - registry.register("service:-routing", _emberRoutingServicesRouting["default"]); + registry.register('service:-routing', _emberRoutingServicesRouting["default"]); // Then inject the app router into it - registry.injection("service:-routing", "router", "router:main"); + registry.injection('service:-routing', 'router', 'router:main'); } }); }); }); enifed("ember-routing/location/api", ["exports", "ember-metal/core", "ember-metal/environment", "ember-routing/location/util"], function (exports, _emberMetalCore, _emberMetalEnvironment, _emberRoutingLocationUtil) { + "use strict"; /** @module ember @submodule ember-routing */ @@ -24760,10 +25203,12 @@ } }; }); // deprecate, assert enifed("ember-routing/location/auto_location", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/utils", "ember-runtime/system/object", "ember-metal/environment", "ember-routing/location/util"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalUtils, _emberRuntimeSystemObject, _emberMetalEnvironment, _emberRoutingLocationUtil) { + "use strict"; + exports.getHistoryPath = getHistoryPath; exports.getHashPath = getHashPath; /** @module ember @@ -24839,22 +25284,22 @@ Will be pre-pended to path upon state change. @since 1.5.1 @property rootURL @default '/' */ - rootURL: "/", + rootURL: '/', /** Called by the router to instruct the location to do any feature detection necessary. In the case of AutoLocation, we detect whether to use history or hash concrete implementations. @private */ detect: function () { var rootURL = this.rootURL; - _emberMetalCore["default"].assert("rootURL must end with a trailing forward slash e.g. \"/app/\"", rootURL.charAt(rootURL.length - 1) === "/"); + _emberMetalCore["default"].assert('rootURL must end with a trailing forward slash e.g. "/app/"', rootURL.charAt(rootURL.length - 1) === '/'); var implementation = detectImplementation({ location: this.location, history: this.history, userAgent: this.userAgent, @@ -24862,41 +25307,41 @@ documentMode: this.documentMode, global: this.global }); if (implementation === false) { - _emberMetalProperty_set.set(this, "cancelRouterSetup", true); - implementation = "none"; + _emberMetalProperty_set.set(this, 'cancelRouterSetup', true); + implementation = 'none'; } var concrete = this.container.lookup("location:" + implementation); - _emberMetalProperty_set.set(concrete, "rootURL", rootURL); + _emberMetalProperty_set.set(concrete, 'rootURL', rootURL); _emberMetalCore["default"].assert("Could not find location '" + implementation + "'.", !!concrete); - _emberMetalProperty_set.set(this, "concreteImplementation", concrete); + _emberMetalProperty_set.set(this, 'concreteImplementation', concrete); }, - initState: delegateToConcreteImplementation("initState"), - getURL: delegateToConcreteImplementation("getURL"), - setURL: delegateToConcreteImplementation("setURL"), - replaceURL: delegateToConcreteImplementation("replaceURL"), - onUpdateURL: delegateToConcreteImplementation("onUpdateURL"), - formatURL: delegateToConcreteImplementation("formatURL"), + initState: delegateToConcreteImplementation('initState'), + getURL: delegateToConcreteImplementation('getURL'), + setURL: delegateToConcreteImplementation('setURL'), + replaceURL: delegateToConcreteImplementation('replaceURL'), + onUpdateURL: delegateToConcreteImplementation('onUpdateURL'), + formatURL: delegateToConcreteImplementation('formatURL'), willDestroy: function () { - var concreteImplementation = _emberMetalProperty_get.get(this, "concreteImplementation"); + var concreteImplementation = _emberMetalProperty_get.get(this, 'concreteImplementation'); if (concreteImplementation) { concreteImplementation.destroy(); } } }); function delegateToConcreteImplementation(methodName) { return function () { - var concreteImplementation = _emberMetalProperty_get.get(this, "concreteImplementation"); + var concreteImplementation = _emberMetalProperty_get.get(this, 'concreteImplementation'); _emberMetalCore["default"].assert("AutoLocation's detect() method should be called before calling any other hooks.", !!concreteImplementation); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } @@ -24925,25 +25370,25 @@ var history = options.history; var documentMode = options.documentMode; var global = options.global; var rootURL = options.rootURL; - var implementation = "none"; + var implementation = 'none'; var cancelRouterSetup = false; var currentPath = _emberRoutingLocationUtil.getFullPath(location); if (_emberRoutingLocationUtil.supportsHistory(userAgent, history)) { var historyPath = getHistoryPath(rootURL, location); // If the browser supports history and we have a history path, we can use // the history location with no redirects. if (currentPath === historyPath) { - return "history"; + return 'history'; } else { - if (currentPath.substr(0, 2) === "/#") { + if (currentPath.substr(0, 2) === '/#') { history.replaceState({ path: historyPath }, null, historyPath); - implementation = "history"; + implementation = 'history'; } else { cancelRouterSetup = true; _emberRoutingLocationUtil.replacePath(location, historyPath); } } @@ -24951,12 +25396,12 @@ var hashPath = getHashPath(rootURL, location); // Be sure we're using a hashed path, otherwise let's switch over it to so // we start off clean and consistent. We'll count an index path with no // hash as "good enough" as well. - if (currentPath === hashPath || currentPath === "/" && hashPath === "/#/") { - implementation = "hash"; + if (currentPath === hashPath || currentPath === '/' && hashPath === '/#/') { + implementation = 'hash'; } else { // Our URL isn't in the expected hash-supported format, so we want to // cancel the router setup and replace the URL to start off clean cancelRouterSetup = true; _emberRoutingLocationUtil.replacePath(location, hashPath); @@ -24988,27 +25433,27 @@ _emberMetalCore["default"].assert("Path " + path + " does not start with the provided rootURL " + rootURL, rootURLIndex === 0); // By convention, Ember.js routes using HashLocation are required to start // with `#/`. Anything else should NOT be considered a route and should // be passed straight through, without transformation. - if (hash.substr(0, 2) === "#/") { + if (hash.substr(0, 2) === '#/') { // There could be extra hash segments after the route - hashParts = hash.substr(1).split("#"); + hashParts = hash.substr(1).split('#'); // The first one is always the route url routeHash = hashParts.shift(); // If the path already has a trailing slash, remove the one // from the hashed route so we don't double up. - if (path.slice(-1) === "/") { + if (path.slice(-1) === '/') { routeHash = routeHash.substr(1); } // This is the "expected" final order path = path + routeHash + query; if (hashParts.length) { - path += "#" + hashParts.join("#"); + path += "#" + hashParts.join('#'); } } else { path = path + query + hash; } @@ -25027,23 +25472,24 @@ function getHashPath(rootURL, location) { var path = rootURL; var historyPath = getHistoryPath(rootURL, location); var routePath = historyPath.substr(rootURL.length); - if (routePath !== "") { - if (routePath.charAt(0) !== "/") { - routePath = "/" + routePath; + if (routePath !== '') { + if (routePath.charAt(0) !== '/') { + routePath = '/' + routePath; } - path += "#" + routePath; + path += '#' + routePath; } return path; } }); // FEATURES enifed("ember-routing/location/hash_location", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/run_loop", "ember-metal/utils", "ember-runtime/system/object", "ember-routing/location/api"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalRun_loop, _emberMetalUtils, _emberRuntimeSystemObject, _emberRoutingLocationApi) { + "use strict"; /** @module ember @submodule ember-routing */ @@ -25057,14 +25503,14 @@ @namespace Ember @extends Ember.Object @private */ exports["default"] = _emberRuntimeSystemObject["default"].extend({ - implementation: "hash", + implementation: 'hash', init: function () { - _emberMetalProperty_set.set(this, "location", _emberMetalProperty_get.get(this, "_location") || window.location); + _emberMetalProperty_set.set(this, 'location', _emberMetalProperty_get.get(this, '_location') || window.location); }, /** @private Returns normalized location.hash @@ -25083,12 +25529,12 @@ */ getURL: function () { var originalPath = this.getHash().substr(1); var outPath = originalPath; - if (outPath.charAt(0) !== "/") { - outPath = "/"; + if (outPath.charAt(0) !== '/') { + outPath = '/'; // Only add the # if the path isn't empty. // We do NOT want `/#` since the ampersand // is only included (conventionally) when // the location.hash has a value @@ -25107,24 +25553,24 @@ @private @method setURL @param path {String} */ setURL: function (path) { - _emberMetalProperty_get.get(this, "location").hash = path; - _emberMetalProperty_set.set(this, "lastSetURL", path); + _emberMetalProperty_get.get(this, 'location').hash = path; + _emberMetalProperty_set.set(this, 'lastSetURL', path); }, /** Uses location.replace to update the url without a page reload or history modification. @private @method replaceURL @param path {String} */ replaceURL: function (path) { - _emberMetalProperty_get.get(this, "location").replace("#" + path); - _emberMetalProperty_set.set(this, "lastSetURL", path); + _emberMetalProperty_get.get(this, 'location').replace("#" + path); + _emberMetalProperty_set.set(this, 'lastSetURL', path); }, /** Register a callback to be invoked when the hash changes. These callbacks will execute when the user presses the back or forward @@ -25139,15 +25585,15 @@ var guid = _emberMetalUtils.guidFor(this); _emberMetalCore["default"].$(window).on("hashchange.ember-location-" + guid, function () { _emberMetalRun_loop["default"](function () { var path = _this.getURL(); - if (_emberMetalProperty_get.get(_this, "lastSetURL") === path) { + if (_emberMetalProperty_get.get(_this, 'lastSetURL') === path) { return; } - _emberMetalProperty_set.set(_this, "lastSetURL", null); + _emberMetalProperty_set.set(_this, 'lastSetURL', null); callback(path); }); }); }, @@ -25176,10 +25622,11 @@ _emberMetalCore["default"].$(window).off("hashchange.ember-location-" + guid); } }); }); enifed("ember-routing/location/history_location", ["exports", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/utils", "ember-runtime/system/object", "ember-routing/location/api", "ember-views/system/jquery"], function (exports, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalUtils, _emberRuntimeSystemObject, _emberRoutingLocationApi, _emberViewsSystemJquery) { + "use strict"; /** @module ember @submodule ember-routing */ @@ -25194,27 +25641,27 @@ @namespace Ember @extends Ember.Object @private */ exports["default"] = _emberRuntimeSystemObject["default"].extend({ - implementation: "history", + implementation: 'history', init: function () { - _emberMetalProperty_set.set(this, "location", _emberMetalProperty_get.get(this, "location") || window.location); - _emberMetalProperty_set.set(this, "baseURL", _emberViewsSystemJquery["default"]("base").attr("href") || ""); + _emberMetalProperty_set.set(this, 'location', _emberMetalProperty_get.get(this, 'location') || window.location); + _emberMetalProperty_set.set(this, 'baseURL', _emberViewsSystemJquery["default"]('base').attr('href') || ''); }, /** Used to set state on first call to setURL @private @method initState */ initState: function () { - var history = _emberMetalProperty_get.get(this, "history") || window.history; - _emberMetalProperty_set.set(this, "history", history); + var history = _emberMetalProperty_get.get(this, 'history') || window.history; + _emberMetalProperty_set.set(this, 'history', history); - if (history && "state" in history) { + if (history && 'state' in history) { this.supportsHistory = true; } this.replaceState(this.formatURL(this.getURL())); }, @@ -25223,29 +25670,29 @@ Will be pre-pended to path upon state change @property rootURL @default '/' @private */ - rootURL: "/", + rootURL: '/', /** Returns the current `location.pathname` without `rootURL` or `baseURL` @private @method getURL @return url {String} */ getURL: function () { - var rootURL = _emberMetalProperty_get.get(this, "rootURL"); - var location = _emberMetalProperty_get.get(this, "location"); + var rootURL = _emberMetalProperty_get.get(this, 'rootURL'); + var location = _emberMetalProperty_get.get(this, 'location'); var path = location.pathname; - var baseURL = _emberMetalProperty_get.get(this, "baseURL"); + var baseURL = _emberMetalProperty_get.get(this, 'baseURL'); - rootURL = rootURL.replace(/\/$/, ""); - baseURL = baseURL.replace(/\/$/, ""); + rootURL = rootURL.replace(/\/$/, ''); + baseURL = baseURL.replace(/\/$/, ''); - var url = path.replace(baseURL, "").replace(rootURL, ""); - var search = location.search || ""; + var url = path.replace(baseURL, '').replace(rootURL, ''); + var search = location.search || ''; url += search; url += this.getHash(); return url; @@ -25291,11 +25738,11 @@ @method getState @return state {Object} */ getState: function () { if (this.supportsHistory) { - return _emberMetalProperty_get.get(this, "history").state; + return _emberMetalProperty_get.get(this, 'history').state; } return this._historyState; }, @@ -25306,11 +25753,11 @@ @param path {String} */ pushState: function (path) { var state = { path: path }; - _emberMetalProperty_get.get(this, "history").pushState(state, null, path); + _emberMetalProperty_get.get(this, 'history').pushState(state, null, path); this._historyState = state; // used for webkit workaround this._previousURL = this.getURL(); @@ -25322,11 +25769,11 @@ @method replaceState @param path {String} */ replaceState: function (path) { var state = { path: path }; - _emberMetalProperty_get.get(this, "history").replaceState(state, null, path); + _emberMetalProperty_get.get(this, 'history').replaceState(state, null, path); this._historyState = state; // used for webkit workaround this._previousURL = this.getURL(); @@ -25362,18 +25809,18 @@ @method formatURL @param url {String} @return formatted url {String} */ formatURL: function (url) { - var rootURL = _emberMetalProperty_get.get(this, "rootURL"); - var baseURL = _emberMetalProperty_get.get(this, "baseURL"); + var rootURL = _emberMetalProperty_get.get(this, 'rootURL'); + var baseURL = _emberMetalProperty_get.get(this, 'baseURL'); - if (url !== "") { - rootURL = rootURL.replace(/\/$/, ""); - baseURL = baseURL.replace(/\/$/, ""); + if (url !== '') { + rootURL = rootURL.replace(/\/$/, ''); + baseURL = baseURL.replace(/\/$/, ''); } else if (baseURL.match(/^\//) && rootURL.match(/^\//)) { - baseURL = baseURL.replace(/\/$/, ""); + baseURL = baseURL.replace(/\/$/, ''); } return baseURL + rootURL + url; }, @@ -25395,10 +25842,11 @@ */ getHash: _emberRoutingLocationApi["default"]._getHash }); }); enifed("ember-routing/location/none_location", ["exports", "ember-metal/property_get", "ember-metal/property_set", "ember-runtime/system/object"], function (exports, _emberMetalProperty_get, _emberMetalProperty_set, _emberRuntimeSystemObject) { + "use strict"; /** @module ember @submodule ember-routing */ @@ -25413,32 +25861,32 @@ @namespace Ember @extends Ember.Object @private */ exports["default"] = _emberRuntimeSystemObject["default"].extend({ - implementation: "none", - path: "", + implementation: 'none', + path: '', /** Returns the current path. @private @method getURL @return {String} path */ getURL: function () { - return _emberMetalProperty_get.get(this, "path"); + return _emberMetalProperty_get.get(this, 'path'); }, /** Set the path and remembers what was set. Using this method to change the path will not invoke the `updateURL` callback. @private @method setURL @param path {String} */ setURL: function (path) { - _emberMetalProperty_set.set(this, "path", path); + _emberMetalProperty_set.set(this, 'path', path); }, /** Register a callback to be invoked when the path changes. These callbacks will execute when the user presses the back or forward @@ -25456,11 +25904,11 @@ @private @method handleURL @param callback {Function} */ handleURL: function (url) { - _emberMetalProperty_set.set(this, "path", url); + _emberMetalProperty_set.set(this, 'path', url); this.updateCallback(url); }, /** Given a URL, formats it to be placed into the page as part @@ -25479,23 +25927,25 @@ return url; } }); }); enifed('ember-routing/location/util', ['exports'], function (exports) { + /** + @private + + Returns the current `location.pathname`, normalized for IE inconsistencies. + */ + 'use strict'; + exports.getPath = getPath; exports.getQuery = getQuery; exports.getHash = getHash; exports.getFullPath = getFullPath; exports.getOrigin = getOrigin; exports.supportsHashChange = supportsHashChange; exports.supportsHistory = supportsHistory; exports.replacePath = replacePath; - /** - @private - - Returns the current `location.pathname`, normalized for IE inconsistencies. - */ function getPath(location) { var pathname = location.pathname; // Various versions of IE/Opera don't always return a leading slash if (pathname.charAt(0) !== '/') { @@ -25604,11 +26054,17 @@ function replacePath(location, path) { location.replace(getOrigin(location) + path); } }); enifed("ember-routing/services/routing", ["exports", "ember-runtime/system/service", "ember-metal/property_get", "ember-metal/computed_macros", "ember-routing/utils", "ember-metal/keys", "ember-metal/merge"], function (exports, _emberRuntimeSystemService, _emberMetalProperty_get, _emberMetalComputed_macros, _emberRoutingUtils, _emberMetalKeys, _emberMetalMerge) { + /** + @module ember + @submodule ember-routing + */ + "use strict"; + /** The Routing service is used by LinkComponent, and provides facilities for the component/view layer to interact with the router. While still private, this service can eventually be opened up, and provides @@ -25619,38 +26075,38 @@ @class RoutingService */ var RoutingService = _emberRuntimeSystemService["default"].extend({ router: null, - targetState: _emberMetalComputed_macros.readOnly("router.targetState"), - currentState: _emberMetalComputed_macros.readOnly("router.currentState"), - currentRouteName: _emberMetalComputed_macros.readOnly("router.currentRouteName"), + targetState: _emberMetalComputed_macros.readOnly('router.targetState'), + currentState: _emberMetalComputed_macros.readOnly('router.currentState'), + currentRouteName: _emberMetalComputed_macros.readOnly('router.currentRouteName'), availableRoutes: function () { - return _emberMetalKeys["default"](_emberMetalProperty_get.get(this, "router").router.recognizer.names); + return _emberMetalKeys["default"](_emberMetalProperty_get.get(this, 'router').router.recognizer.names); }, hasRoute: function (routeName) { - return _emberMetalProperty_get.get(this, "router").hasRoute(routeName); + return _emberMetalProperty_get.get(this, 'router').hasRoute(routeName); }, transitionTo: function (routeName, models, queryParams, shouldReplace) { - var router = _emberMetalProperty_get.get(this, "router"); + var router = _emberMetalProperty_get.get(this, 'router'); var transition = router._doTransition(routeName, models, queryParams); if (shouldReplace) { - transition.method("replace"); + transition.method('replace'); } }, normalizeQueryParams: function (routeName, models, queryParams) { - _emberMetalProperty_get.get(this, "router")._prepareQueryParams(routeName, models, queryParams); + _emberMetalProperty_get.get(this, 'router')._prepareQueryParams(routeName, models, queryParams); }, generateURL: function (routeName, models, queryParams) { - var router = _emberMetalProperty_get.get(this, "router"); + var router = _emberMetalProperty_get.get(this, 'router'); if (!router.router) { return; } var visibleQueryParams = {}; @@ -25661,11 +26117,11 @@ var args = _emberRoutingUtils.routeArgs(routeName, models, visibleQueryParams); return router.generate.apply(router, args); }, isActiveForRoute: function (contexts, queryParams, routeName, routerState, isCurrentWhenSpecified) { - var router = _emberMetalProperty_get.get(this, "router"); + var router = _emberMetalProperty_get.get(this, 'router'); var handlers = router.router.recognizer.handlersFor(routeName); var leafName = handlers[handlers.length - 1].handler; var maximumContexts = numberOfContextsAcceptedByHandler(routeName, handlers); @@ -25699,15 +26155,13 @@ return req; }; exports["default"] = RoutingService; }); -/** -@module ember -@submodule ember-routing -*/ enifed("ember-routing/system/cache", ["exports", "ember-runtime/system/object"], function (exports, _emberRuntimeSystemObject) { + "use strict"; + exports["default"] = _emberRuntimeSystemObject["default"].extend({ init: function () { this.cache = {}; }, has: function (bucketKey) { @@ -25734,11 +26188,10 @@ }, cache: null }); }); enifed("ember-routing/system/controller_for", ["exports"], function (exports) { - exports["default"] = controllerFor; /** @module ember @submodule ember-routing */ @@ -25748,16 +26201,20 @@ @for Ember @method controllerFor @private */ + "use strict"; + exports["default"] = controllerFor; + function controllerFor(container, controllerName, lookupOptions) { return container.lookup("controller:" + controllerName, lookupOptions); } }); enifed("ember-routing/system/dsl", ["exports", "ember-metal/core", "ember-metal/array"], function (exports, _emberMetalCore, _emberMetalArray) { + "use strict"; /** @module ember @submodule ember-routing */ @@ -25770,26 +26227,26 @@ exports["default"] = DSL; DSL.prototype = { route: function (name, options, callback) { var dummyErrorRoute = "/_unused_dummy_error_path_route_" + name + "/:error"; - if (arguments.length === 2 && typeof options === "function") { + if (arguments.length === 2 && typeof options === 'function') { callback = options; options = {}; } if (arguments.length === 1) { options = {}; } - var type = options.resetNamespace === true ? "resource" : "route"; + var type = options.resetNamespace === true ? 'resource' : 'route'; _emberMetalCore["default"].assert("'" + name + "' cannot be used as a " + type + " name.", (function () { if (options.overrideNameAssertion === true) { return true; } - return _emberMetalArray.indexOf.call(["array", "basic", "object", "application"], name) === -1; + return _emberMetalArray.indexOf.call(['array', 'basic', 'object', 'application'], name) === -1; })()); if (this.enableLoadingSubstates) { createRoute(this, name + "_loading", { resetNamespace: options.resetNamespace }); @@ -25801,32 +26258,32 @@ var fullName = getFullName(this, name, options.resetNamespace); var dsl = new DSL(fullName, { enableLoadingSubstates: this.enableLoadingSubstates }); - createRoute(dsl, "loading"); - createRoute(dsl, "error", { path: dummyErrorRoute }); + createRoute(dsl, 'loading'); + createRoute(dsl, 'error', { path: dummyErrorRoute }); callback.call(dsl); createRoute(this, name, options, dsl.generate()); } else { createRoute(this, name, options); } }, push: function (url, name, callback) { - var parts = name.split("."); + var parts = name.split('.'); if (url === "" || url === "/" || parts[parts.length - 1] === "index") { this.explicitIndex = true; } this.matches.push([url, name, callback]); }, resource: function (name, options, callback) { - if (arguments.length === 2 && typeof options === "function") { + if (arguments.length === 2 && typeof options === 'function') { callback = options; options = {}; } if (arguments.length === 1) { @@ -25852,11 +26309,11 @@ }; } }; function canNest(dsl) { - return dsl.parent && dsl.parent !== "application"; + return dsl.parent && dsl.parent !== 'application'; } function getFullName(dsl, name, resetNamespace) { if (canNest(dsl) && resetNamespace !== true) { return dsl.parent + "." + name; @@ -25868,11 +26325,11 @@ function createRoute(dsl, name, options, callback) { options = options || {}; var fullName = getFullName(dsl, name, options.resetNamespace); - if (typeof options.path !== "string") { + if (typeof options.path !== 'string') { options.path = "/" + name; } dsl.push(options.path, fullName, callback); } @@ -25883,10 +26340,12 @@ return dsl; }; }); // FEATURES, assert enifed("ember-routing/system/generate_controller", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-runtime/utils"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberRuntimeUtils) { + "use strict"; + exports.generateControllerFactory = generateControllerFactory; exports["default"] = generateController; /** @module ember @@ -25911,15 +26370,15 @@ function generateControllerFactory(container, controllerName, context) { var Factory, fullName, factoryName, controllerType; if (context && _emberRuntimeUtils.isArray(context)) { - controllerType = "array"; + controllerType = 'array'; } else if (context) { - controllerType = "object"; + controllerType = 'object'; } else { - controllerType = "basic"; + controllerType = 'basic'; } factoryName = "controller:" + controllerType; Factory = container.lookupFactory(factoryName).extend({ @@ -25953,25 +26412,28 @@ function generateController(container, controllerName, context) { generateControllerFactory(container, controllerName, context); var fullName = "controller:" + controllerName; var instance = container.lookup(fullName); - if (_emberMetalProperty_get.get(instance, "namespace.LOG_ACTIVE_GENERATION")) { + if (_emberMetalProperty_get.get(instance, 'namespace.LOG_ACTIVE_GENERATION')) { _emberMetalCore["default"].Logger.info("generated -> " + fullName, { fullName: fullName }); } return instance; } }); // Logger enifed('ember-routing/system/query_params', ['exports', 'ember-runtime/system/object'], function (exports, _emberRuntimeSystemObject) { + 'use strict'; + exports["default"] = _emberRuntimeSystemObject["default"].extend({ isQueryParams: true, values: null }); }); enifed("ember-routing/system/route", ["exports", "ember-metal/core", "ember-metal/error", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/get_properties", "ember-metal/enumerable_utils", "ember-metal/is_none", "ember-metal/computed", "ember-metal/merge", "ember-runtime/utils", "ember-metal/run_loop", "ember-metal/keys", "ember-runtime/copy", "ember-runtime/system/string", "ember-runtime/system/object", "ember-runtime/mixins/evented", "ember-runtime/mixins/action_handler", "ember-routing/system/generate_controller", "ember-routing/utils"], function (exports, _emberMetalCore, _emberMetalError, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalGet_properties, _emberMetalEnumerable_utils, _emberMetalIs_none, _emberMetalComputed, _emberMetalMerge, _emberRuntimeUtils, _emberMetalRun_loop, _emberMetalKeys, _emberRuntimeCopy, _emberRuntimeSystemString, _emberRuntimeSystemObject, _emberRuntimeMixinsEvented, _emberRuntimeMixinsAction_handler, _emberRoutingSystemGenerate_controller, _emberRoutingUtils) { + "use strict"; var slice = Array.prototype.slice; function K() { return this; @@ -26047,12 +26509,12 @@ if (!controllerClass) { return defaultQPMeta; } var controllerProto = controllerClass.proto(); - var qpProps = _emberMetalProperty_get.get(controllerProto, "_normalizedQueryParams"); - var cacheMeta = _emberMetalProperty_get.get(controllerProto, "_cacheMeta"); + var qpProps = _emberMetalProperty_get.get(controllerProto, '_normalizedQueryParams'); + var cacheMeta = _emberMetalProperty_get.get(controllerProto, '_cacheMeta'); var qps = []; var map = {}; for (var propName in qpProps) { if (!qpProps.hasOwnProperty(propName)) { @@ -26123,22 +26585,22 @@ if (!names.length) { handlerInfo = dynamicParent; names = handlerInfo && handlerInfo._names || []; } - var qps = _emberMetalProperty_get.get(this, "_qp.qps"); + var qps = _emberMetalProperty_get.get(this, '_qp.qps'); var len = qps.length; var namePaths = new Array(names.length); for (var a = 0, nlen = names.length; a < nlen; ++a) { namePaths[a] = handlerInfo.name + "." + names[a]; } for (var i = 0; i < len; ++i) { var qp = qps[i]; var cacheMeta = qp.cacheMeta; - if (cacheMeta.scope === "model") { + if (cacheMeta.scope === 'model') { cacheMeta.parts = namePaths; } cacheMeta.prefix = qp.ctrl; } }, @@ -26172,11 +26634,11 @@ router._qpUpdates = {}; } router._qpUpdates[qp.urlKey] = true; }, - mergedProperties: ["events", "queryParams"], + mergedProperties: ['events', 'queryParams'], /** Retrieves parameters, for current route using the state.params variable and getQueryParamsFor, using the supplied routeName. @method paramsFor @@ -26220,11 +26682,11 @@ */ serializeQueryParam: function (value, urlKey, defaultValueType) { // urlKey isn't used here, but anyone overriding // can use it to provide serialization specific // to a certain query param. - if (defaultValueType === "array") { + if (defaultValueType === 'array') { return JSON.stringify(value); } return "" + value; }, @@ -26241,15 +26703,15 @@ // can use it to provide deserialization specific // to a certain query param. // Use the defaultValueType of the default value (the initial value assigned to a // controller query param property), to intelligently deserialize and cast. - if (defaultValueType === "boolean") { - return value === "true" ? true : false; - } else if (defaultValueType === "number") { + if (defaultValueType === 'boolean') { + return value === 'true' ? true : false; + } else if (defaultValueType === 'number') { return Number(value).valueOf(); - } else if (defaultValueType === "array") { + } else if (defaultValueType === 'array') { return _emberMetalCore["default"].A(JSON.parse(value)); } return value; }, @@ -26296,11 +26758,11 @@ @private @method exit */ exit: function () { this.deactivate(); - this.trigger("deactivate"); + this.trigger('deactivate'); this.teardownViews(); }, /** @private @@ -26320,11 +26782,11 @@ @method enter */ enter: function () { this.connections = []; this.activate(); - this.trigger("activate"); + this.trigger('activate'); }, /** The name of the view to use by default when rendering this routes template. When rendering a template, the route will, by default, determine the @@ -26572,25 +27034,25 @@ */ _actions: { queryParamsDidChange: function (changed, totalPresent, removed) { - var qpMap = _emberMetalProperty_get.get(this, "_qp").map; + var qpMap = _emberMetalProperty_get.get(this, '_qp').map; var totalChanged = _emberMetalKeys["default"](changed).concat(_emberMetalKeys["default"](removed)); for (var i = 0, len = totalChanged.length; i < len; ++i) { var qp = qpMap[totalChanged[i]]; - if (qp && _emberMetalProperty_get.get(this._optionsForQueryParam(qp), "refreshModel")) { + if (qp && _emberMetalProperty_get.get(this._optionsForQueryParam(qp), 'refreshModel')) { this.refresh(); } } return true; }, finalizeQueryParamChange: function (params, finalParams, transition) { - if (this.routeName !== "application") { + if (this.routeName !== 'application') { return true; } // Transition object is absent for intermediate transitions. if (!transition) { @@ -26634,11 +27096,11 @@ var thisQueryParamChanged = svalue !== qp.svalue; if (thisQueryParamChanged) { if (transition.queryParamsOnly && replaceUrl !== false) { var options = route._optionsForQueryParam(qp); - var replaceConfigValue = _emberMetalProperty_get.get(options, "replace"); + var replaceConfigValue = _emberMetalProperty_get.get(options, 'replace'); if (replaceConfigValue) { replaceUrl = true; } else if (replaceConfigValue === false) { // Explicit pushState wins over any other replaceStates. replaceUrl = false; @@ -26660,17 +27122,17 @@ }); } } if (replaceUrl) { - transition.method("replace"); + transition.method('replace'); } _emberMetalEnumerable_utils.forEach(qpMeta.qps, function (qp) { - var routeQpMeta = _emberMetalProperty_get.get(qp.route, "_qp"); + var routeQpMeta = _emberMetalProperty_get.get(qp.route, '_qp'); var finalizedController = qp.route.controller; - finalizedController._qpDelegate = _emberMetalProperty_get.get(routeQpMeta, "states.active"); + finalizedController._qpDelegate = _emberMetalProperty_get.get(routeQpMeta, 'states.active'); }); router._qpUpdates = null; } }, @@ -26972,11 +27434,11 @@ if (this.setupControllers) { _emberMetalCore["default"].deprecate("Ember.Route.setupControllers is deprecated. Please use Ember.Route.setupController(controller, model) instead."); this.setupControllers(controller, context); } else { - var states = _emberMetalProperty_get.get(this, "_qp.states"); + var states = _emberMetalProperty_get.get(this, '_qp.states'); if (transition) { // Update the model dep values used to calculate cache keys. _emberRoutingUtils.stashParamNames(this.router, transition.state.handlerInfos); controller._updateCacheParams(transition.params); } @@ -27188,14 +27650,14 @@ @public */ model: function (params, transition) { var match, name, sawParams, value; - var queryParams = _emberMetalProperty_get.get(this, "_qp.map"); + var queryParams = _emberMetalProperty_get.get(this, '_qp.map'); for (var prop in params) { - if (prop === "queryParams" || queryParams && prop in queryParams) { + if (prop === 'queryParams' || queryParams && prop in queryParams) { continue; } if (match = prop.match(/^(.*)_id$/)) { name = match[1]; @@ -27236,11 +27698,11 @@ @param {String} type the model type @param {Object} value the value passed to find @private */ findModel: function () { - var store = _emberMetalProperty_get.get(this, "store"); + var store = _emberMetalProperty_get.get(this, 'store'); return store.find.apply(store, arguments); }, /** Store property provides a hook for data persistence libraries to inject themselves. @@ -27253,11 +27715,11 @@ @private */ store: _emberMetalComputed.computed(function () { var container = this.container; var routeName = this.routeName; - var namespace = _emberMetalProperty_get.get(this, "router.namespace"); + var namespace = _emberMetalProperty_get.get(this, 'router.namespace'); return { find: function (name, value) { var modelClass = container.lookupFactory("model:" + name); @@ -27265,11 +27727,11 @@ if (!modelClass) { return; } - _emberMetalCore["default"].assert(_emberRuntimeSystemString.classify(name) + " has no method `find`.", typeof modelClass.find === "function"); + _emberMetalCore["default"].assert(_emberRuntimeSystemString.classify(name) + " has no method `find`.", typeof modelClass.find === 'function'); return modelClass.find(value); } }; }), @@ -27383,11 +27845,11 @@ @param {Object} model @public */ setupController: function (controller, context, transition) { if (controller && context !== undefined) { - _emberMetalProperty_set.set(controller, "model", context); + _emberMetalProperty_set.set(controller, 'model', context); } }, /** Returns the controller for a particular route or name. @@ -27515,11 +27977,11 @@ }); ``` @method renderTemplate @param {Object} controller the route's controller @param {Object} model the route's model - @private + @public */ renderTemplate: function (controller, model) { this.render(); }, @@ -27624,24 +28086,24 @@ @public */ render: function (_name, options) { _emberMetalCore["default"].assert("The name in the given arguments is undefined", arguments.length > 0 ? !_emberMetalIs_none["default"](arguments[0]) : true); - var namePassed = typeof _name === "string" && !!_name; + var namePassed = typeof _name === 'string' && !!_name; var isDefaultRender = arguments.length === 0 || _emberMetalCore["default"].isEmpty(arguments[0]); var name; - if (typeof _name === "object" && !options) { + if (typeof _name === 'object' && !options) { name = this.routeName; options = _name; } else { name = _name; } var renderOptions = buildRenderOptions(this, namePassed, isDefaultRender, name, options); this.connections.push(renderOptions); - _emberMetalRun_loop["default"].once(this.router, "_setOutlets"); + _emberMetalRun_loop["default"].once(this.router, '_setOutlets'); }, /** Disconnects a view that has been rendered into an outlet. You may pass any or all of the following options to `disconnectOutlet`: @@ -27685,12 +28147,12 @@ outletName = options; } else { outletName = options.outlet; parentView = options.parentView; } - parentView = parentView && parentView.replace(/\//g, "."); - outletName = outletName || "main"; + parentView = parentView && parentView.replace(/\//g, '.'); + outletName = outletName || 'main'; this._disconnectOutlet(outletName, parentView); for (var i = 0; i < this.router.router.currentHandlerInfos.length; i++) { // This non-local state munging is sadly necessary to maintain // backward compatibility with our existing semantics, which allow // any route to disconnectOutlet things originally rendered by any @@ -27716,11 +28178,11 @@ this.connections[i] = { into: connection.into, outlet: connection.outlet, name: connection.name }; - _emberMetalRun_loop["default"].once(this.router, "_setOutlets"); + _emberMetalRun_loop["default"].once(this.router, '_setOutlets'); } } }, willDestroy: function () { @@ -27732,11 +28194,11 @@ @method teardownViews */ teardownViews: function () { if (this.connections && this.connections.length > 0) { this.connections = []; - _emberMetalRun_loop["default"].once(this.router, "_setOutlets"); + _emberMetalRun_loop["default"].once(this.router, '_setOutlets'); } } }); Route.reopenClass({ @@ -27773,16 +28235,16 @@ var controller = options && options.controller; var templateName; var viewName; var ViewClass; var template; - var LOG_VIEW_LOOKUPS = _emberMetalProperty_get.get(route.router, "namespace.LOG_VIEW_LOOKUPS"); - var into = options && options.into && options.into.replace(/\//g, "."); - var outlet = options && options.outlet || "main"; + var LOG_VIEW_LOOKUPS = _emberMetalProperty_get.get(route.router, 'namespace.LOG_VIEW_LOOKUPS'); + var into = options && options.into && options.into.replace(/\//g, '.'); + var outlet = options && options.outlet || 'main'; if (name) { - name = name.replace(/\//g, "."); + name = name.replace(/\//g, '.'); templateName = name; } else { name = route.routeName; templateName = route.templateName || name; } @@ -27793,20 +28255,20 @@ } else { controller = route.controllerName || route.container.lookup("controller:" + name); } } - if (typeof controller === "string") { + if (typeof controller === 'string') { var controllerName = controller; controller = route.container.lookup("controller:" + controllerName); if (!controller) { throw new _emberMetalError["default"]("You passed `controller: '" + controllerName + "'` into the `render` method, but no such controller could be found."); } } if (options && options.model) { - controller.set("model", options.model); + controller.set('model', options.model); } viewName = options && options.view || namePassed && name || route.viewName || name; ViewClass = route.container.lookupFactory("view:" + viewName); template = route.container.lookup("template:" + templateName); @@ -27859,11 +28321,11 @@ var fullQueryParams = getFullQueryParams(route.router, state); var params = state.queryParamsFor[name] = {}; // Copy over all the query params for this route/controller into params hash. - var qpMeta = _emberMetalProperty_get.get(route, "_qp"); + var qpMeta = _emberMetalProperty_get.get(route, '_qp'); var qps = qpMeta.qps; for (var i = 0, len = qps.length; i < len; ++i) { // Put deserialized qp on params hash. var qp = qps[i]; @@ -27883,10 +28345,11 @@ exports["default"] = Route; }); // FEATURES, A, deprecate, assert, Logger enifed("ember-routing/system/router", ["exports", "ember-metal/core", "ember-metal/error", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/properties", "ember-metal/computed", "ember-metal/merge", "ember-metal/run_loop", "ember-runtime/system/string", "ember-runtime/system/object", "ember-runtime/mixins/evented", "ember-routing/system/dsl", "ember-routing/location/api", "ember-routing/utils", "ember-metal/platform/create", "./router_state", "router", "router/transition"], function (exports, _emberMetalCore, _emberMetalError, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalProperties, _emberMetalComputed, _emberMetalMerge, _emberMetalRun_loop, _emberRuntimeSystemString, _emberRuntimeSystemObject, _emberRuntimeMixinsEvented, _emberRoutingSystemDsl, _emberRoutingLocationApi, _emberRoutingUtils, _emberMetalPlatformCreate, _router_state, _router4, _routerTransition) { + "use strict"; function K() { return this; } @@ -27914,20 +28377,20 @@ @property location @default 'hash' @see {Ember.Location} @public */ - location: "hash", + location: 'hash', /** Represents the URL of the root of the application, often '/'. This prefix is assumed on all routes defined on this router. @property rootURL @default '/' @public */ - rootURL: "/", + rootURL: '/', _initRouterJs: function (moduleBasedResolver) { var router = this.router = new _router4["default"](); router.triggerEvent = triggerEvent; @@ -27938,20 +28401,20 @@ var dsl = new _emberRoutingSystemDsl["default"](null, { enableLoadingSubstates: !!moduleBasedResolver }); function generateDSL() { - this.resource("application", { path: "/", overrideNameAssertion: true }, function () { + this.resource('application', { path: "/", overrideNameAssertion: true }, function () { for (var i = 0; i < dslCallbacks.length; i++) { dslCallbacks[i].call(this); } }); } generateDSL.call(dsl); - if (_emberMetalProperty_get.get(this, "namespace.LOG_TRANSITIONS_INTERNAL")) { + if (_emberMetalProperty_get.get(this, 'namespace.LOG_TRANSITIONS_INTERNAL')) { router.log = _emberMetalCore["default"].Logger.debug; } router.map(dsl.generate()); }, @@ -27967,11 +28430,11 @@ @method url @return {String} The current URL. @private */ url: _emberMetalComputed.computed(function () { - return _emberMetalProperty_get.get(this, "location").getURL(); + return _emberMetalProperty_get.get(this, 'location').getURL(); }), /** Initializes the current router instance and sets up the change handling event listeners used by the instances `location` implementation. @@ -27979,15 +28442,15 @@ If no value is found `/` will be used. @method startRouting @private */ startRouting: function (moduleBasedResolver) { - var initialURL = _emberMetalProperty_get.get(this, "initialURL"); + var initialURL = _emberMetalProperty_get.get(this, 'initialURL'); if (this.setupRouter(moduleBasedResolver)) { if (typeof initialURL === "undefined") { - initialURL = _emberMetalProperty_get.get(this, "location").getURL(); + initialURL = _emberMetalProperty_get.get(this, 'location').getURL(); } var initialTransition = this.handleURL(initialURL); if (initialTransition && initialTransition.error) { throw initialTransition.error; } @@ -27999,15 +28462,15 @@ this._initRouterJs(moduleBasedResolver); this._setupLocation(); var router = this.router; - var location = _emberMetalProperty_get.get(this, "location"); + var location = _emberMetalProperty_get.get(this, 'location'); // Allow the Location class to cancel the router setup while it refreshes // the page - if (_emberMetalProperty_get.get(location, "cancelRouterSetup")) { + if (_emberMetalProperty_get.get(location, 'cancelRouterSetup')) { return false; } this._setupRouter(router, location); @@ -28029,18 +28492,18 @@ didTransition: function (infos) { updatePaths(this); this._cancelSlowTransitionTimer(); - this.notifyPropertyChange("url"); - this.set("currentState", this.targetState); + this.notifyPropertyChange('url'); + this.set('currentState', this.targetState); // Put this in the runloop so url will be accurate. Seems // less surprising than didTransition being out of sync. - _emberMetalRun_loop["default"].once(this, this.trigger, "didTransition"); + _emberMetalRun_loop["default"].once(this, this.trigger, 'didTransition'); - if (_emberMetalProperty_get.get(this, "namespace").LOG_TRANSITIONS) { + if (_emberMetalProperty_get.get(this, 'namespace').LOG_TRANSITIONS) { _emberMetalCore["default"].Logger.log("Transitioned into '" + EmberRouter._routePath(infos) + "'"); } }, _setOutlets: function () { @@ -28058,23 +28521,23 @@ var connections = route.connections; var ownState; for (var j = 0; j < connections.length; j++) { var appended = appendLiveRoute(liveRoutes, defaultParentState, connections[j]); liveRoutes = appended.liveRoutes; - if (appended.ownState.render.name === route.routeName || appended.ownState.render.outlet === "main") { + if (appended.ownState.render.name === route.routeName || appended.ownState.render.outlet === 'main') { ownState = appended.ownState; } } if (connections.length === 0) { ownState = representEmptyRoute(liveRoutes, defaultParentState, route); } defaultParentState = ownState; } if (!this._toplevelView) { - var OutletView = this.container.lookupFactory("view:-outlet"); + var OutletView = this.container.lookupFactory('view:-outlet'); this._toplevelView = OutletView.create(); - var instance = this.container.lookup("-application-instance:main"); + var instance = this.container.lookup('-application-instance:main'); instance.didCreateRootView(this._toplevelView); } this._toplevelView.setOutletState(liveRoutes); }, @@ -28085,26 +28548,26 @@ @method willTransition @private @since 1.11.0 */ willTransition: function (oldInfos, newInfos, transition) { - _emberMetalRun_loop["default"].once(this, this.trigger, "willTransition", transition); + _emberMetalRun_loop["default"].once(this, this.trigger, 'willTransition', transition); - if (_emberMetalProperty_get.get(this, "namespace").LOG_TRANSITIONS) { + if (_emberMetalProperty_get.get(this, 'namespace').LOG_TRANSITIONS) { _emberMetalCore["default"].Logger.log("Preparing to transition from '" + EmberRouter._routePath(oldInfos) + "' to ' " + EmberRouter._routePath(newInfos) + "'"); } }, handleURL: function (url) { // Until we have an ember-idiomatic way of accessing #hashes, we need to // remove it because router.js doesn't know how to handle it. url = url.split(/#(.+)?/)[0]; - return this._doURLTransition("handleURL", url); + return this._doURLTransition('handleURL', url); }, _doURLTransition: function (routerJsMethod, url) { - var transition = this.router[routerJsMethod](url || "/"); + var transition = this.router[routerJsMethod](url || '/'); didBeginTransition(transition, this); return transition; }, transitionTo: function () { @@ -28113,15 +28576,15 @@ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (resemblesURL(args[0])) { - return this._doURLTransition("transitionTo", args[0]); + return this._doURLTransition('transitionTo', args[0]); } var possibleQueryParams = args[args.length - 1]; - if (possibleQueryParams && possibleQueryParams.hasOwnProperty("queryParams")) { + if (possibleQueryParams && possibleQueryParams.hasOwnProperty('queryParams')) { queryParams = args.pop().queryParams; } else { queryParams = {}; } @@ -28135,17 +28598,17 @@ (_router = this.router).intermediateTransitionTo.apply(_router, arguments); updatePaths(this); var infos = this.router.currentHandlerInfos; - if (_emberMetalProperty_get.get(this, "namespace").LOG_TRANSITIONS) { + if (_emberMetalProperty_get.get(this, 'namespace').LOG_TRANSITIONS) { _emberMetalCore["default"].Logger.log("Intermediate-transitioned into '" + EmberRouter._routePath(infos) + "'"); } }, replaceWith: function () { - return this.transitionTo.apply(this, arguments).method("replace"); + return this.transitionTo.apply(this, arguments).method('replace'); }, generate: function () { var _router2; @@ -28221,11 +28684,11 @@ _lookupActiveComponentNode: function (templateName) { return this._activeViews[templateName]; }, _connectActiveComponentNode: function (templateName, componentNode) { - _emberMetalCore["default"].assert("cannot connect an activeView that already exists", !this._activeViews[templateName]); + _emberMetalCore["default"].assert('cannot connect an activeView that already exists', !this._activeViews[templateName]); var _activeViews = this._activeViews; function disconnectActiveView() { delete _activeViews[templateName]; } @@ -28233,57 +28696,57 @@ this._activeViews[templateName] = componentNode; componentNode.renderNode.addDestruction({ destroy: disconnectActiveView }); }, _setupLocation: function () { - var location = _emberMetalProperty_get.get(this, "location"); - var rootURL = _emberMetalProperty_get.get(this, "rootURL"); + var location = _emberMetalProperty_get.get(this, 'location'); + var rootURL = _emberMetalProperty_get.get(this, 'rootURL'); - if ("string" === typeof location && this.container) { + if ('string' === typeof location && this.container) { var resolvedLocation = this.container.lookup("location:" + location); - if ("undefined" !== typeof resolvedLocation) { - location = _emberMetalProperty_set.set(this, "location", resolvedLocation); + if ('undefined' !== typeof resolvedLocation) { + location = _emberMetalProperty_set.set(this, 'location', resolvedLocation); } else { // Allow for deprecated registration of custom location API's var options = { implementation: location }; - location = _emberMetalProperty_set.set(this, "location", _emberRoutingLocationApi["default"].create(options)); + location = _emberMetalProperty_set.set(this, 'location', _emberRoutingLocationApi["default"].create(options)); } } - if (location !== null && typeof location === "object") { + if (location !== null && typeof location === 'object') { if (rootURL) { - _emberMetalProperty_set.set(location, "rootURL", rootURL); + _emberMetalProperty_set.set(location, 'rootURL', rootURL); } // Allow the location to do any feature detection, such as AutoLocation // detecting history support. This gives it a chance to set its // `cancelRouterSetup` property which aborts routing. - if (typeof location.detect === "function") { + if (typeof location.detect === 'function') { location.detect(); } // ensure that initState is called AFTER the rootURL is set on // the location instance - if (typeof location.initState === "function") { + if (typeof location.initState === 'function') { location.initState(); } } }, _getHandlerFunction: function () { var _this2 = this; var seen = _emberMetalPlatformCreate["default"](null); var container = this.container; - var DefaultRoute = container.lookupFactory("route:basic"); + var DefaultRoute = container.lookupFactory('route:basic'); return function (name) { - var routeName = "route:" + name; + var routeName = 'route:' + name; var handler = container.lookup(routeName); if (seen[name]) { return handler; } @@ -28292,11 +28755,11 @@ if (!handler) { container._registry.register(routeName, DefaultRoute.extend()); handler = container.lookup(routeName); - if (_emberMetalProperty_get.get(_this2, "namespace.LOG_ACTIVE_GENERATION")) { + if (_emberMetalProperty_get.get(_this2, 'namespace.LOG_ACTIVE_GENERATION')) { _emberMetalCore["default"].Logger.info("generated -> " + routeName, { fullName: routeName }); } } handler.routeName = name; @@ -28424,11 +28887,11 @@ var recogHandlerInfos = routerjs.recognizer.handlersFor(leafRouteName); for (var i = 0, len = recogHandlerInfos.length; i < len; ++i) { var recogHandler = recogHandlerInfos[i]; var route = routerjs.getHandler(recogHandler.handler); - var qpMeta = _emberMetalProperty_get.get(route, "_qp"); + var qpMeta = _emberMetalProperty_get.get(route, '_qp'); if (!qpMeta) { continue; } @@ -28466,11 +28929,11 @@ _emberRoutingUtils.stashParamNames(this, handlerInfos); for (var i = 0, len = handlerInfos.length; i < len; ++i) { var route = handlerInfos[i].handler; - var qpMeta = _emberMetalProperty_get.get(route, "_qp"); + var qpMeta = _emberMetalProperty_get.get(route, '_qp'); for (var j = 0, qpLen = qpMeta.qps.length; j < qpLen; ++j) { var qp = qpMeta.qps[j]; var presentProp = qp.prop in queryParams && qp.prop || qp.fprop in queryParams && qp.fprop; @@ -28479,22 +28942,22 @@ queryParams[qp.fprop] = queryParams[presentProp]; delete queryParams[presentProp]; } } else { var controllerProto = qp.cProto; - var cacheMeta = _emberMetalProperty_get.get(controllerProto, "_cacheMeta"); + var cacheMeta = _emberMetalProperty_get.get(controllerProto, '_cacheMeta'); var cacheKey = controllerProto._calculateCacheKey(qp.ctrl, cacheMeta[qp.prop].parts, state.params); queryParams[qp.fprop] = appCache.lookup(cacheKey, qp.prop, qp.def); } } } }, _scheduleLoadingEvent: function (transition, originRoute) { this._cancelSlowTransitionTimer(); - this._slowTransitionTimer = _emberMetalRun_loop["default"].scheduleOnce("routerTransitions", this, "_handleSlowTransition", transition, originRoute); + this._slowTransitionTimer = _emberMetalRun_loop["default"].scheduleOnce('routerTransitions', this, '_handleSlowTransition', transition, originRoute); }, currentState: null, targetState: null, @@ -28503,17 +28966,17 @@ // Don't fire an event if we've since moved on from // the transition that put us in a loading state. return; } - this.set("targetState", _router_state["default"].create({ + this.set('targetState', _router_state["default"].create({ emberRouter: this, routerJs: this.router, routerJsState: this.router.activeTransition.state })); - transition.trigger(true, "loading", transition, originRoute); + transition.trigger(true, 'loading', transition, originRoute); }, _cancelSlowTransitionTimer: function () { if (this._slowTransitionTimer) { _emberMetalRun_loop["default"].cancel(this._slowTransitionTimer); @@ -28565,35 +29028,35 @@ error: function (error, transition, originRoute) { // Attempt to find an appropriate error substate to enter. var router = originRoute.router; var tryTopLevel = forEachRouteAbove(originRoute, transition, function (route, childRoute) { - var childErrorRouteName = findChildRouteName(route, childRoute, "error"); + var childErrorRouteName = findChildRouteName(route, childRoute, 'error'); if (childErrorRouteName) { router.intermediateTransitionTo(childErrorRouteName, error); return; } return true; }); if (tryTopLevel) { // Check for top-level error state to enter. - if (routeHasBeenDefined(originRoute.router, "application_error")) { - router.intermediateTransitionTo("application_error", error); + if (routeHasBeenDefined(originRoute.router, 'application_error')) { + router.intermediateTransitionTo('application_error', error); return; } } - logError(error, "Error while processing route: " + transition.targetName); + logError(error, 'Error while processing route: ' + transition.targetName); }, loading: function (transition, originRoute) { // Attempt to find an appropriate loading substate to enter. var router = originRoute.router; var tryTopLevel = forEachRouteAbove(originRoute, transition, function (route, childRoute) { - var childLoadingRouteName = findChildRouteName(route, childRoute, "loading"); + var childLoadingRouteName = findChildRouteName(route, childRoute, 'loading'); if (childLoadingRouteName) { router.intermediateTransitionTo(childLoadingRouteName); return; } @@ -28604,22 +29067,22 @@ } }); if (tryTopLevel) { // Check for top-level loading state to enter. - if (routeHasBeenDefined(originRoute.router, "application_loading")) { - router.intermediateTransitionTo("application_loading"); + if (routeHasBeenDefined(originRoute.router, 'application_loading')) { + router.intermediateTransitionTo('application_loading'); return; } } } }; function logError(_error, initialMessage) { var errorArgs = []; var error; - if (_error && typeof _error === "object" && typeof _error.errorThrown === "object") { + if (_error && typeof _error === 'object' && typeof _error.errorThrown === 'object') { error = _error.errorThrown; } else { error = _error; } @@ -28644,16 +29107,16 @@ } function findChildRouteName(parentRoute, originatingChildRoute, name) { var router = parentRoute.router; var childName; - var targetChildRouteName = originatingChildRoute.routeName.split(".").pop(); - var namespace = parentRoute.routeName === "application" ? "" : parentRoute.routeName + "."; + var targetChildRouteName = originatingChildRoute.routeName.split('.').pop(); + var namespace = parentRoute.routeName === 'application' ? '' : parentRoute.routeName + '.'; // First, try a named loading state, e.g. 'foo_loading' - childName = namespace + targetChildRouteName + "_" + name; + childName = namespace + targetChildRouteName + '_' + name; if (routeHasBeenDefined(router, childName)) { return childName; } @@ -28720,11 +29183,11 @@ } return state; } function updatePaths(router) { - var appController = router.container.lookup("controller:application"); + var appController = router.container.lookup('controller:application'); if (!appController) { // appController might not exist when top-level loading/error // substates have been entered since ApplicationRoute hasn't // actually been entered at that point. @@ -28732,23 +29195,23 @@ } var infos = router.router.currentHandlerInfos; var path = EmberRouter._routePath(infos); - if (!("currentPath" in appController)) { - _emberMetalProperties.defineProperty(appController, "currentPath"); + if (!('currentPath' in appController)) { + _emberMetalProperties.defineProperty(appController, 'currentPath'); } - _emberMetalProperty_set.set(appController, "currentPath", path); - _emberMetalProperty_set.set(router, "currentPath", path); + _emberMetalProperty_set.set(appController, 'currentPath', path); + _emberMetalProperty_set.set(router, 'currentPath', path); - if (!("currentRouteName" in appController)) { - _emberMetalProperties.defineProperty(appController, "currentRouteName"); + if (!('currentRouteName' in appController)) { + _emberMetalProperties.defineProperty(appController, 'currentRouteName'); } - _emberMetalProperty_set.set(appController, "currentRouteName", infos[infos.length - 1].name); - _emberMetalProperty_set.set(router, "currentRouteName", infos[infos.length - 1].name); + _emberMetalProperty_set.set(appController, 'currentRouteName', infos[infos.length - 1].name); + _emberMetalProperty_set.set(router, 'currentRouteName', infos[infos.length - 1].name); } EmberRouter.reopenClass({ router: null, @@ -28822,27 +29285,27 @@ routerJs: router.router, routerJsState: transition.state }); if (!router.currentState) { - router.set("currentState", routerState); + router.set('currentState', routerState); } - router.set("targetState", routerState); + router.set('targetState', routerState); transition.then(null, function (error) { if (!error || !error.name) { return; } _emberMetalCore["default"].assert("The URL '" + error.message + "' did not match any routes in your application", error.name !== "UnrecognizedURLError"); return error; - }, "Ember: Process errors from Router"); + }, 'Ember: Process errors from Router'); } function resemblesURL(str) { - return typeof str === "string" && (str === "" || str.charAt(0) === "/"); + return typeof str === 'string' && (str === '' || str.charAt(0) === '/'); } function forEachQueryParam(router, targetRouteName, queryParams, callback) { var qpCache = router._queryParamsFor(targetRouteName); @@ -28910,17 +29373,17 @@ function appendOrphan(liveRoutes, into, myState) { if (!liveRoutes.outlets.__ember_orphans__) { liveRoutes.outlets.__ember_orphans__ = { render: { - name: "__ember_orphans__" + name: '__ember_orphans__' }, outlets: _emberMetalPlatformCreate["default"](null) }; } liveRoutes.outlets.__ember_orphans__.outlets[into] = myState; - _emberMetalCore["default"].run.schedule("afterRender", function () { + _emberMetalCore["default"].run.schedule('afterRender', function () { // `wasUsed` gets set by the render helper. See the function // `impersonateAnOutlet`. _emberMetalCore["default"].assert("You attempted to render into '" + into + "' but it was not found", liveRoutes.outlets.__ember_orphans__.outlets[into].wasUsed); }); } @@ -28938,11 +29401,11 @@ // just so other routes can target it and inherit its place // in the outlet hierarchy. defaultParentState.outlets.main = { render: { name: route.routeName, - outlet: "main" + outlet: 'main' }, outlets: {} }; return defaultParentState; } @@ -28955,10 +29418,11 @@ /** @module ember @submodule ember-routing */ enifed('ember-routing/system/router_state', ['exports', 'ember-metal/is_empty', 'ember-metal/keys', 'ember-runtime/system/object', 'ember-metal/merge'], function (exports, _emberMetalIs_empty, _emberMetalKeys, _emberRuntimeSystemObject, _emberMetalMerge) { + 'use strict'; var RouterState = _emberRuntimeSystemObject["default"].extend({ emberRouter: null, routerJs: null, routerJsState: null, @@ -28999,10 +29463,12 @@ } exports["default"] = RouterState; }); enifed('ember-routing/utils', ['exports'], function (exports) { + 'use strict'; + exports.routeArgs = routeArgs; exports.getActiveTargetName = getActiveTargetName; exports.stashParamNames = stashParamNames; function routeArgs(targetRouteName, models, queryParams) { @@ -29049,10 +29515,18 @@ handlerInfos._namesStashed = true; } }); enifed('ember-runtime', ['exports', 'ember-metal', 'ember-runtime/core', 'ember-runtime/compare', 'ember-runtime/copy', 'ember-runtime/inject', 'ember-runtime/system/namespace', 'ember-runtime/system/object', 'ember-runtime/system/tracked_array', 'ember-runtime/system/subarray', 'ember-runtime/system/container', 'ember-runtime/system/array_proxy', 'ember-runtime/system/object_proxy', 'ember-runtime/system/core_object', 'ember-runtime/system/native_array', 'ember-runtime/system/set', 'ember-runtime/system/string', 'ember-runtime/system/deferred', 'ember-runtime/system/lazy_load', 'ember-runtime/mixins/array', 'ember-runtime/mixins/comparable', 'ember-runtime/mixins/copyable', 'ember-runtime/mixins/enumerable', 'ember-runtime/mixins/freezable', 'ember-runtime/mixins/-proxy', 'ember-runtime/mixins/observable', 'ember-runtime/mixins/action_handler', 'ember-runtime/mixins/deferred', 'ember-runtime/mixins/mutable_enumerable', 'ember-runtime/mixins/mutable_array', 'ember-runtime/mixins/target_action_support', 'ember-runtime/mixins/evented', 'ember-runtime/mixins/promise_proxy', 'ember-runtime/mixins/sortable', 'ember-runtime/computed/array_computed', 'ember-runtime/computed/reduce_computed', 'ember-runtime/computed/reduce_computed_macros', 'ember-runtime/controllers/array_controller', 'ember-runtime/controllers/object_controller', 'ember-runtime/controllers/controller', 'ember-runtime/mixins/controller', 'ember-runtime/system/service', 'ember-runtime/ext/rsvp', 'ember-runtime/ext/string', 'ember-runtime/ext/function', 'ember-runtime/utils'], function (exports, _emberMetal, _emberRuntimeCore, _emberRuntimeCompare, _emberRuntimeCopy, _emberRuntimeInject, _emberRuntimeSystemNamespace, _emberRuntimeSystemObject, _emberRuntimeSystemTracked_array, _emberRuntimeSystemSubarray, _emberRuntimeSystemContainer, _emberRuntimeSystemArray_proxy, _emberRuntimeSystemObject_proxy, _emberRuntimeSystemCore_object, _emberRuntimeSystemNative_array, _emberRuntimeSystemSet, _emberRuntimeSystemString, _emberRuntimeSystemDeferred, _emberRuntimeSystemLazy_load, _emberRuntimeMixinsArray, _emberRuntimeMixinsComparable, _emberRuntimeMixinsCopyable, _emberRuntimeMixinsEnumerable, _emberRuntimeMixinsFreezable, _emberRuntimeMixinsProxy, _emberRuntimeMixinsObservable, _emberRuntimeMixinsAction_handler, _emberRuntimeMixinsDeferred, _emberRuntimeMixinsMutable_enumerable, _emberRuntimeMixinsMutable_array, _emberRuntimeMixinsTarget_action_support, _emberRuntimeMixinsEvented, _emberRuntimeMixinsPromise_proxy, _emberRuntimeMixinsSortable, _emberRuntimeComputedArray_computed, _emberRuntimeComputedReduce_computed, _emberRuntimeComputedReduce_computed_macros, _emberRuntimeControllersArray_controller, _emberRuntimeControllersObject_controller, _emberRuntimeControllersController, _emberRuntimeMixinsController, _emberRuntimeSystemService, _emberRuntimeExtRsvp, _emberRuntimeExtString, _emberRuntimeExtFunction, _emberRuntimeUtils) { + /** + @module ember + @submodule ember-runtime + */ + + // BEGIN IMPORTS + 'use strict'; + // END IMPORTS // BEGIN EXPORTS _emberMetal["default"].compare = _emberRuntimeCompare["default"]; _emberMetal["default"].copy = _emberRuntimeCopy["default"]; @@ -29140,20 +29614,16 @@ _emberMetal["default"].RSVP = _emberRuntimeExtRsvp["default"]; // END EXPORTS exports["default"] = _emberMetal["default"]; }); -/** -@module ember -@submodule ember-runtime -*/ - -// BEGIN IMPORTS // just for side effect of extending Ember.RSVP // just for side effect of extending String.prototype // just for side effect of extending Function.prototype enifed('ember-runtime/compare', ['exports', 'ember-runtime/utils', 'ember-runtime/mixins/comparable'], function (exports, _emberRuntimeUtils, _emberRuntimeMixinsComparable) { + 'use strict'; + exports["default"] = compare; var TYPE_ORDER = { 'undefined': 0, 'null': 1, @@ -29263,10 +29733,11 @@ return 0; } } }); enifed('ember-runtime/computed/array_computed', ['exports', 'ember-metal/core', 'ember-runtime/computed/reduce_computed', 'ember-metal/enumerable_utils', 'ember-metal/platform/create', 'ember-metal/observer', 'ember-metal/error'], function (exports, _emberMetalCore, _emberRuntimeComputedReduce_computed, _emberMetalEnumerable_utils, _emberMetalPlatformCreate, _emberMetalObserver, _emberMetalError) { + 'use strict'; var a_slice = [].slice; function ArrayComputedProperty() { var cp = this; @@ -29449,10 +29920,12 @@ exports.arrayComputed = arrayComputed; exports.ArrayComputedProperty = ArrayComputedProperty; }); enifed('ember-runtime/computed/reduce_computed', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/utils', 'ember-metal/error', 'ember-metal/property_events', 'ember-metal/expand_properties', 'ember-metal/observer', 'ember-metal/computed', 'ember-metal/platform/create', 'ember-metal/enumerable_utils', 'ember-runtime/system/tracked_array', 'ember-runtime/mixins/array', 'ember-metal/run_loop'], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalUtils, _emberMetalError, _emberMetalProperty_events, _emberMetalExpand_properties, _emberMetalObserver, _emberMetalComputed, _emberMetalPlatformCreate, _emberMetalEnumerable_utils, _emberRuntimeSystemTracked_array, _emberRuntimeMixinsArray, _emberMetalRun_loop) { + 'use strict'; + exports.reduceComputed = reduceComputed; var cacheSet = _emberMetalComputed.cacheFor.set; var cacheGet = _emberMetalComputed.cacheFor.get; var cacheRemove = _emberMetalComputed.cacheFor.remove; @@ -30320,10 +30793,17 @@ return cp; } }); // Ember.assert enifed('ember-runtime/computed/reduce_computed_macros', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/utils', 'ember-metal/error', 'ember-metal/enumerable_utils', 'ember-metal/run_loop', 'ember-metal/observer', 'ember-runtime/computed/array_computed', 'ember-runtime/computed/reduce_computed', 'ember-runtime/system/subarray', 'ember-metal/keys', 'ember-runtime/compare'], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalUtils, _emberMetalError, _emberMetalEnumerable_utils, _emberMetalRun_loop, _emberMetalObserver, _emberRuntimeComputedArray_computed, _emberRuntimeComputedReduce_computed, _emberRuntimeSystemSubarray, _emberMetalKeys, _emberRuntimeCompare) { + /** + @module ember + @submodule ember-runtime + */ + + 'use strict'; + exports.sum = sum; exports.max = max; exports.min = min; exports.map = map; exports.mapBy = mapBy; @@ -30567,11 +31047,10 @@ @param propertyKey @public */ var mapProperty = mapBy; - exports.mapProperty = mapProperty; /** Filters the array by the callback. The callback method you provide should have the following signature. `item` is the current item in the iteration. @@ -30605,10 +31084,11 @@ @param {String} dependentKey @param {Function} callback @return {Ember.ComputedProperty} the filtered array @public */ + exports.mapProperty = mapProperty; function filter(dependentKey, callback) { var options = { _suppressDeprecation: true, @@ -30694,11 +31174,10 @@ @deprecated Use `Ember.computed.filterBy` instead @public */ var filterProperty = filterBy; - exports.filterProperty = filterProperty; /** A computed property which returns a new array with all the unique elements from one or more dependent arrays. Example @@ -30725,10 +31204,11 @@ @param {String} propertyKey* @return {Ember.ComputedProperty} computes a new array with all the unique elements from the dependent array @public */ + exports.filterProperty = filterProperty; function uniq() { var args = a_slice.call(arguments); args.push({ @@ -30775,11 +31255,10 @@ unique elements from the dependent array @public */ var union = uniq; - exports.union = union; /** A computed property which returns a new array with all the duplicated elements from two or more dependent arrays. Example @@ -30800,10 +31279,11 @@ @param {String} propertyKey* @return {Ember.ComputedProperty} computes a new array with all the duplicated elements from the dependent arrays @public */ + exports.union = union; function intersect() { var args = a_slice.call(arguments); args.push({ @@ -31193,23 +31673,24 @@ }; instanceMeta.keyCache = {}; } }); -/** -@module ember -@submodule ember-runtime -*/ - // Ember.assert enifed('ember-runtime/controllers/array_controller', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/enumerable_utils', 'ember-runtime/system/array_proxy', 'ember-runtime/mixins/sortable', 'ember-runtime/mixins/controller', 'ember-metal/computed', 'ember-metal/error', 'ember-runtime/mixins/array'], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalEnumerable_utils, _emberRuntimeSystemArray_proxy, _emberRuntimeMixinsSortable, _emberRuntimeMixinsController, _emberMetalComputed, _emberMetalError, _emberRuntimeMixinsArray) { + /** + @module ember + @submodule ember-runtime + */ + + 'use strict'; + var arrayControllerDeprecation = '`Ember.ArrayController` is deprecated.'; exports.arrayControllerDeprecation = arrayControllerDeprecation; var arrayControllerDeprecation = '`Ember.ArrayController` is deprecated.'; - exports.arrayControllerDeprecation = arrayControllerDeprecation; /** `Ember.ArrayController` provides a way for you to publish a collection of objects so that you can easily bind to the collection from a Handlebars `#each` helper, an `Ember.CollectionView`, or other controllers. @@ -31294,10 +31775,11 @@ @uses Ember.ControllerMixin @deprecated @public */ + exports.arrayControllerDeprecation = arrayControllerDeprecation; exports["default"] = _emberRuntimeSystemArray_proxy["default"].extend(_emberRuntimeMixinsController["default"], _emberRuntimeMixinsSortable["default"], { /** A string containing the controller name used to wrap items. For example: @@ -31387,11 +31869,11 @@ // calling `objectAt` this._super(idx, removedCnt, addedCnt); }, init: function () { - _emberMetalCore["default"].deprecate(arrayControllerDeprecation, this.isGenerated); + _emberMetalCore["default"].deprecate(arrayControllerDeprecation, this.isGenerated, { url: 'http://emberjs.com/guides/deprecations#toc_arraycontroller' }); this._super.apply(this, arguments); this._subControllers = []; }, @@ -31474,15 +31956,12 @@ this._resetSubControllers(); this._super.apply(this, arguments); } }); }); -/** -@module ember -@submodule ember-runtime -*/ enifed('ember-runtime/controllers/controller', ['exports', 'ember-metal/core', 'ember-runtime/system/object', 'ember-runtime/mixins/controller', 'ember-runtime/inject'], function (exports, _emberMetalCore, _emberRuntimeSystemObject, _emberRuntimeMixinsController, _emberRuntimeInject) { + 'use strict'; /** @module ember @submodule ember-runtime */ @@ -31495,11 +31974,11 @@ @public */ var Controller = _emberRuntimeSystemObject["default"].extend(_emberRuntimeMixinsController["default"]); function controllerInjectionHelper(factory) { - _emberMetalCore["default"].assert('Defining an injected controller property on a ' + 'non-controller is not allowed.', _emberRuntimeMixinsController["default"].detect(factory.PrototypeMixin)); + _emberMetalCore["default"].assert("Defining an injected controller property on a " + "non-controller is not allowed.", _emberRuntimeMixinsController["default"].detect(factory.PrototypeMixin)); } /** Creates a property that lazily looks up another controller in the container. Can only be used when defining another controller. @@ -31527,21 +32006,22 @@ @since 1.10.0 @for Ember.inject @param {String} name (optional) name of the controller to inject, defaults to the property's name @return {Ember.InjectedProperty} injection descriptor instance - @private + @public */ _emberRuntimeInject.createInjectionHelper('controller', controllerInjectionHelper); exports["default"] = Controller; }); // Ember.assert enifed('ember-runtime/controllers/object_controller', ['exports', 'ember-metal/core', 'ember-runtime/mixins/controller', 'ember-runtime/system/object_proxy'], function (exports, _emberMetalCore, _emberRuntimeMixinsController, _emberRuntimeSystemObject_proxy) { + 'use strict'; + var objectControllerDeprecation = 'Ember.ObjectController is deprecated, ' + 'please use Ember.Controller and use `model.propertyName`.'; - exports.objectControllerDeprecation = objectControllerDeprecation; /** @module ember @submodule ember-runtime */ @@ -31558,18 +32038,21 @@ @extends Ember.ObjectProxy @uses Ember.ControllerMixin @deprecated @public **/ + exports.objectControllerDeprecation = objectControllerDeprecation; exports["default"] = _emberRuntimeSystemObject_proxy["default"].extend(_emberRuntimeMixinsController["default"], { init: function () { this._super(); _emberMetalCore["default"].deprecate(objectControllerDeprecation, this.isGenerated); } }); }); enifed('ember-runtime/copy', ['exports', 'ember-metal/enumerable_utils', 'ember-metal/utils', 'ember-runtime/system/object', 'ember-runtime/mixins/copyable'], function (exports, _emberMetalEnumerable_utils, _emberMetalUtils, _emberRuntimeSystemObject, _emberRuntimeMixinsCopyable) { + 'use strict'; + exports["default"] = copy; function _copy(obj, deep, seen, copies) { var ret, loc, key; @@ -31657,11 +32140,10 @@ return _copy(obj, deep, deep ? [] : null, deep ? [] : null); } }); enifed('ember-runtime/core', ['exports'], function (exports) { - exports.isEqual = isEqual; /** @module ember @submodule ember-runtime */ @@ -31682,11 +32164,14 @@ @param {Object} a first object to compare @param {Object} b second object to compare @return {Boolean} @public */ + 'use strict'; + exports.isEqual = isEqual; + function isEqual(a, b) { if (a && typeof a.isEqual === 'function') { return a.isEqual(b); } @@ -31696,11 +32181,17 @@ return a === b; } }); enifed('ember-runtime/ext/function', ['exports', 'ember-metal/core', 'ember-metal/expand_properties', 'ember-metal/computed', 'ember-metal/mixin'], function (exports, _emberMetalCore, _emberMetalExpand_properties, _emberMetalComputed, _emberMetalMixin) { + /** + @module ember + @submodule ember-runtime + */ + 'use strict'; + var a_slice = Array.prototype.slice; var FunctionPrototype = Function.prototype; if (_emberMetalCore["default"].EXTEND_PROTOTYPES === true || _emberMetalCore["default"].EXTEND_PROTOTYPES.Function) { @@ -31882,17 +32373,16 @@ return this; }; } }); -/** -@module ember -@submodule ember-runtime -*/ - // Ember.EXTEND_PROTOTYPES, Ember.assert enifed('ember-runtime/ext/rsvp', ['exports', 'ember-metal/core', 'ember-metal/logger', 'ember-metal/run_loop', 'rsvp'], function (exports, _emberMetalCore, _emberMetalLogger, _emberMetalRun_loop, _rsvp) { + /* globals RSVP:true */ + + 'use strict'; + exports.onerrorDefault = onerrorDefault; var testModuleName = 'ember-testing/test'; var Test; @@ -31965,13 +32455,18 @@ _rsvp.on('error', onerrorDefault); exports["default"] = _rsvp; }); -/* globals RSVP:true */ enifed('ember-runtime/ext/string', ['exports', 'ember-metal/core', 'ember-runtime/system/string'], function (exports, _emberMetalCore, _emberRuntimeSystemString) { + /** + @module ember + @submodule ember-runtime + */ + 'use strict'; + var StringPrototype = String.prototype; if (_emberMetalCore["default"].EXTEND_PROTOTYPES === true || _emberMetalCore["default"].EXTEND_PROTOTYPES.String) { /** @@ -32063,17 +32558,14 @@ StringPrototype.capitalize = function () { return _emberRuntimeSystemString.capitalize(this); }; } }); -/** -@module ember -@submodule ember-runtime -*/ - // Ember.EXTEND_PROTOTYPES, Ember.assert, Ember.FEATURES enifed("ember-runtime/inject", ["exports", "ember-metal/core", "ember-metal/enumerable_utils", "ember-metal/injected_property", "ember-metal/keys"], function (exports, _emberMetalCore, _emberMetalEnumerable_utils, _emberMetalInjected_property, _emberMetalKeys) { + "use strict"; + exports.createInjectionHelper = createInjectionHelper; exports.validatePropertyInjections = validatePropertyInjections; /** Namespace for injection helper methods. @@ -32136,11 +32628,11 @@ if (types.length) { for (i = 0, l = types.length; i < l; i++) { validator = typeValidators[types[i]]; - if (typeof validator === "function") { + if (typeof validator === 'function') { validator(factory); } } } @@ -32149,11 +32641,17 @@ exports["default"] = inject; }); // Ember.assert enifed("ember-runtime/mixins/-proxy", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/utils", "ember-metal/observer", "ember-metal/property_events", "ember-metal/computed", "ember-metal/properties", "ember-metal/mixin", "ember-runtime/system/string"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalUtils, _emberMetalObserver, _emberMetalProperty_events, _emberMetalComputed, _emberMetalProperties, _emberMetalMixin, _emberRuntimeSystemString) { + /** + @module ember + @submodule ember-runtime + */ + "use strict"; + function contentPropertyWillChange(content, contentKey) { var key = contentKey.slice(8); // remove "content." if (key in this) { return; } // if shadowed in proxy @@ -32183,34 +32681,34 @@ @type Ember.Object @default null @private */ content: null, - _contentDidChange: _emberMetalMixin.observer("content", function () { - _emberMetalCore["default"].assert("Can't set Proxy's content to itself", _emberMetalProperty_get.get(this, "content") !== this); + _contentDidChange: _emberMetalMixin.observer('content', function () { + _emberMetalCore["default"].assert("Can't set Proxy's content to itself", _emberMetalProperty_get.get(this, 'content') !== this); }), - isTruthy: _emberMetalComputed.computed.bool("content"), + isTruthy: _emberMetalComputed.computed.bool('content'), _debugContainerKey: null, willWatchProperty: function (key) { - var contentKey = "content." + key; + var contentKey = 'content.' + key; _emberMetalObserver._addBeforeObserver(this, contentKey, null, contentPropertyWillChange); _emberMetalObserver.addObserver(this, contentKey, null, contentPropertyDidChange); }, didUnwatchProperty: function (key) { - var contentKey = "content." + key; + var contentKey = 'content.' + key; _emberMetalObserver._removeBeforeObserver(this, contentKey, null, contentPropertyWillChange); _emberMetalObserver.removeObserver(this, contentKey, null, contentPropertyDidChange); }, unknownProperty: function (key) { - var content = _emberMetalProperty_get.get(this, "content"); + var content = _emberMetalProperty_get.get(this, 'content'); if (content) { - _emberMetalCore["default"].deprecate(_emberRuntimeSystemString.fmt("You attempted to access `%@` from `%@`, but object proxying is deprecated. " + "Please use `model.%@` instead.", [key, this, key]), !this.isController); + _emberMetalCore["default"].deprecate(_emberRuntimeSystemString.fmt('You attempted to access `%@` from `%@`, but object proxying is deprecated. ' + 'Please use `model.%@` instead.', [key, this, key]), !this.isController); return _emberMetalProperty_get.get(content, key); } }, setUnknownProperty: function (key, value) { @@ -32220,26 +32718,26 @@ // rather than delegate _emberMetalProperties.defineProperty(this, key, null, value); return value; } - var content = _emberMetalProperty_get.get(this, "content"); + var content = _emberMetalProperty_get.get(this, 'content'); _emberMetalCore["default"].assert(_emberRuntimeSystemString.fmt("Cannot delegate set('%@', %@) to the 'content' property of" + " object proxy %@: its 'content' is undefined.", [key, value, this]), content); - _emberMetalCore["default"].deprecate(_emberRuntimeSystemString.fmt("You attempted to set `%@` from `%@`, but object proxying is deprecated. " + "Please use `model.%@` instead.", [key, this, key]), !this.isController); + _emberMetalCore["default"].deprecate(_emberRuntimeSystemString.fmt('You attempted to set `%@` from `%@`, but object proxying is deprecated. ' + 'Please use `model.%@` instead.', [key, this, key]), !this.isController); return _emberMetalProperty_set.set(content, key, value); } }); }); -/** -@module ember -@submodule ember-runtime -*/ - // Ember.assert enifed("ember-runtime/mixins/action_handler", ["exports", "ember-metal/merge", "ember-metal/mixin", "ember-metal/property_get"], function (exports, _emberMetalMerge, _emberMetalMixin, _emberMetalProperty_get) { + /** + @module ember + @submodule ember-runtime + */ + "use strict"; /** The `Ember.ActionHandler` mixin implements support for moving an `actions` property to an `_actions` property at extend time, and adding `_actions` to the object's mergedProperties list. @@ -32254,11 +32752,11 @@ @class ActionHandler @namespace Ember @private */ var ActionHandler = _emberMetalMixin.Mixin.create({ - mergedProperties: ["_actions"], + mergedProperties: ['_actions'], /** The collection of functions, keyed by name, available on this `ActionHandler` as action targets. These functions will be invoked when a matching `{{action}}` is triggered @@ -32368,17 +32866,17 @@ */ willMergeMixin: function (props) { var hashName; if (!props._actions) { - Ember.assert("'actions' should not be a function", typeof props.actions !== "function"); + Ember.assert("'actions' should not be a function", typeof props.actions !== 'function'); - if (!!props.actions && typeof props.actions === "object") { - hashName = "actions"; - } else if (!!props.events && typeof props.events === "object") { - Ember.deprecate("Action handlers contained in an `events` object are deprecated in favor" + " of putting them in an `actions` object", false); - hashName = "events"; + if (!!props.actions && typeof props.actions === 'object') { + hashName = 'actions'; + } else if (!!props.events && typeof props.events === 'object') { + Ember.deprecate('Action handlers contained in an `events` object are deprecated in favor' + ' of putting them in an `actions` object', false); + hashName = 'events'; } if (hashName) { props._actions = _emberMetalMerge["default"](props._actions || {}, props[hashName]); } @@ -32425,25 +32923,32 @@ if (!shouldBubble) { return; } } - if (target = _emberMetalProperty_get.get(this, "target")) { - Ember.assert("The `target` for " + this + " (" + target + ") does not have a `send` method", typeof target.send === "function"); - target.send.apply(target, arguments); + if (target = _emberMetalProperty_get.get(this, 'target')) { + var _target; + + Ember.assert("The `target` for " + this + " (" + target + ") does not have a `send` method", typeof target.send === 'function'); + (_target = target).send.apply(_target, arguments); } } }); exports["default"] = ActionHandler; }); -/** -@module ember -@submodule ember-runtime -*/ enifed('ember-runtime/mixins/array', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/computed', 'ember-metal/is_none', 'ember-runtime/mixins/enumerable', 'ember-metal/enumerable_utils', 'ember-metal/mixin', 'ember-metal/property_events', 'ember-metal/events', 'ember-metal/watching'], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalComputed, _emberMetalIs_none, _emberRuntimeMixinsEnumerable, _emberMetalEnumerable_utils, _emberMetalMixin, _emberMetalProperty_events, _emberMetalEvents, _emberMetalWatching) { + /** + @module ember + @submodule ember-runtime + */ + // .......................................................... + // HELPERS + // + 'use strict'; + function arrayObserversHelper(obj, target, opts, operation, notify) { var willChange = opts && opts.willChange || 'arrayWillChange'; var didChange = opts && opts.didChange || 'arrayDidChange'; var hasObservers = _emberMetalProperty_get.get(obj, 'hasArrayObservers'); @@ -32918,20 +33423,13 @@ return this.__each; }) }); }); -/** -@module ember -@submodule ember-runtime -*/ - -// .......................................................... -// HELPERS -// // ES6TODO: Ember.A enifed("ember-runtime/mixins/comparable", ["exports", "ember-metal/mixin"], function (exports, _emberMetalMixin) { + "use strict"; /** @module ember @submodule ember-runtime */ @@ -32965,10 +33463,11 @@ */ compare: null }); }); enifed("ember-runtime/mixins/controller", ["exports", "ember-metal/mixin", "ember-metal/alias", "ember-runtime/mixins/action_handler", "ember-runtime/mixins/controller_content_model_alias_deprecation"], function (exports, _emberMetalMixin, _emberMetalAlias, _emberRuntimeMixinsAction_handler, _emberRuntimeMixinsController_content_model_alias_deprecation) { + "use strict"; /** `Ember.ControllerMixin` provides a standard interface for all classes that compose Ember's controller layer: `Ember.Controller`, `Ember.ArrayController`, and `Ember.ObjectController`. @@ -33015,15 +33514,16 @@ model: null, /** @private */ - content: _emberMetalAlias["default"]("model") + content: _emberMetalAlias["default"]('model') }); }); enifed('ember-runtime/mixins/controller_content_model_alias_deprecation', ['exports', 'ember-metal/core', 'ember-metal/mixin'], function (exports, _emberMetalCore, _emberMetalMixin) { + 'use strict'; /* The ControllerContentModelAliasDeprecation mixin is used to provide a useful deprecation warning when specifying `content` directly on a `Ember.Controller` (without also specifying `model`). @@ -33063,11 +33563,17 @@ } }); }); // Ember.deprecate enifed('ember-runtime/mixins/copyable', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/mixin', 'ember-runtime/mixins/freezable', 'ember-runtime/system/string', 'ember-metal/error'], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalMixin, _emberRuntimeMixinsFreezable, _emberRuntimeSystemString, _emberMetalError) { + /** + @module ember + @submodule ember-runtime + */ + 'use strict'; + /** Implements some standard methods for copying an object. Add this mixin to any object you create that can create a copy of itself. This mixin is added automatically to the built-in array. @@ -33110,20 +33616,17 @@ frozenCopy: function () { _emberMetalCore["default"].deprecate('`frozenCopy` is deprecated, use Object.freeze instead.'); if (_emberRuntimeMixinsFreezable.Freezable && _emberRuntimeMixinsFreezable.Freezable.detect(this)) { return _emberMetalProperty_get.get(this, 'isFrozen') ? this : this.copy().freeze(); } else { - throw new _emberMetalError["default"](_emberRuntimeSystemString.fmt('%@ does not support freezing', [this])); + throw new _emberMetalError["default"](_emberRuntimeSystemString.fmt("%@ does not support freezing", [this])); } } }); }); -/** -@module ember -@submodule ember-runtime -*/ enifed("ember-runtime/mixins/deferred", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/mixin", "ember-metal/computed", "ember-runtime/ext/rsvp"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalMixin, _emberMetalComputed, _emberRuntimeExtRsvp) { + "use strict"; /** @module ember @submodule ember-runtime */ @@ -33143,11 +33646,11 @@ */ then: function (resolve, reject, label) { var deferred, promise, entity; entity = this; - deferred = _emberMetalProperty_get.get(this, "_deferred"); + deferred = _emberMetalProperty_get.get(this, '_deferred'); promise = deferred.promise; function fulfillmentHandler(fulfillment) { if (fulfillment === promise) { return resolve(entity); @@ -33165,11 +33668,11 @@ @private */ resolve: function (value) { var deferred, promise; - deferred = _emberMetalProperty_get.get(this, "_deferred"); + deferred = _emberMetalProperty_get.get(this, '_deferred'); promise = deferred.promise; if (value === this) { deferred.resolve(promise); } else { @@ -33181,23 +33684,33 @@ Reject a Deferred object and call any `failCallbacks` with the given args. @method reject @private */ reject: function (value) { - _emberMetalProperty_get.get(this, "_deferred").reject(value); + _emberMetalProperty_get.get(this, '_deferred').reject(value); }, _deferred: _emberMetalComputed.computed(function () { - _emberMetalCore["default"].deprecate("Usage of Ember.DeferredMixin or Ember.Deferred is deprecated.", this._suppressDeferredDeprecation, { url: "http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred" }); + _emberMetalCore["default"].deprecate('Usage of Ember.DeferredMixin or Ember.Deferred is deprecated.', this._suppressDeferredDeprecation, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred' }); - return _emberRuntimeExtRsvp["default"].defer("Ember: DeferredMixin - " + this); + return _emberRuntimeExtRsvp["default"].defer('Ember: DeferredMixin - ' + this); }) }); }); // Ember.FEATURES, Ember.Test enifed('ember-runtime/mixins/enumerable', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/mixin', 'ember-metal/enumerable_utils', 'ember-metal/computed', 'ember-metal/property_events', 'ember-metal/events', 'ember-runtime/compare'], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalMixin, _emberMetalEnumerable_utils, _emberMetalComputed, _emberMetalProperty_events, _emberMetalEvents, _emberRuntimeCompare) { + /** + @module ember + @submodule ember-runtime + */ + // .......................................................... + // HELPERS + // + + 'use strict'; + var contexts = []; function popCtx() { return contexts.length === 0 ? {} : contexts.pop(); } @@ -34280,19 +34793,12 @@ return 0; }); } }); }); -/** -@module ember -@submodule ember-runtime -*/ - -// .......................................................... -// HELPERS -// enifed("ember-runtime/mixins/evented", ["exports", "ember-metal/mixin", "ember-metal/events"], function (exports, _emberMetalMixin, _emberMetalEvents) { + "use strict"; /** @module ember @submodule ember-runtime */ @@ -34431,11 +34937,17 @@ return _emberMetalEvents.hasListeners(this, name); } }); }); enifed('ember-runtime/mixins/freezable', ['exports', 'ember-metal/core', 'ember-metal/mixin', 'ember-metal/property_get', 'ember-metal/property_set'], function (exports, _emberMetalCore, _emberMetalMixin, _emberMetalProperty_get, _emberMetalProperty_set) { + /** + @module ember + @submodule ember-runtime + */ + 'use strict'; + /** The `Ember.Freezable` mixin implements some basic methods for marking an object as frozen. Once an object is frozen it should be read only. No changes may be made the internal state of the object. @@ -34525,17 +35037,13 @@ } }); exports.Freezable = Freezable; - var FROZEN_ERROR = 'Frozen object cannot be modified.'; + var FROZEN_ERROR = "Frozen object cannot be modified."; exports.FROZEN_ERROR = FROZEN_ERROR; }); -/** -@module ember -@submodule ember-runtime -*/ enifed("ember-runtime/mixins/mutable_array", ["exports", "ember-metal/property_get", "ember-metal/utils", "ember-metal/error", "ember-metal/mixin", "ember-runtime/mixins/array", "ember-runtime/mixins/mutable_enumerable", "ember-runtime/mixins/enumerable"], function (exports, _emberMetalProperty_get, _emberMetalUtils, _emberMetalError, _emberMetalMixin, _emberRuntimeMixinsArray, _emberRuntimeMixinsMutable_enumerable, _emberRuntimeMixinsEnumerable) { /** @module ember @submodule ember-runtime */ @@ -34545,13 +35053,19 @@ // .......................................................... // CONSTANTS // + "use strict"; + var OUT_OF_RANGE_EXCEPTION = "Index out of range"; var EMPTY = []; + // .......................................................... + // HELPERS + // + /** This mixin defines the API for modifying array-like objects. These methods can be applied only to a collection that keeps its items in an ordered set. It builds upon the Array mixin and adds methods to modify the array. Concrete implementations of this class include ArrayProxy and ArrayController. @@ -34601,11 +35115,11 @@ @method clear @return {Ember.Array} An empty Array. @public */ clear: function () { - var len = _emberMetalProperty_get.get(this, "length"); + var len = _emberMetalProperty_get.get(this, 'length'); if (len === 0) { return this; } this.replace(0, len, EMPTY); @@ -34625,11 +35139,11 @@ @param {Object} object object to insert @return {Ember.Array} receiver @public */ insertAt: function (idx, object) { - if (idx > _emberMetalProperty_get.get(this, "length")) { + if (idx > _emberMetalProperty_get.get(this, 'length')) { throw new _emberMetalError["default"](OUT_OF_RANGE_EXCEPTION); } this.replace(idx, 0, [object]); return this; @@ -34651,13 +35165,13 @@ @param {Number} len length of passing range @return {Ember.Array} receiver @public */ removeAt: function (start, len) { - if ("number" === typeof start) { + if ('number' === typeof start) { - if (start < 0 || start >= _emberMetalProperty_get.get(this, "length")) { + if (start < 0 || start >= _emberMetalProperty_get.get(this, 'length')) { throw new _emberMetalError["default"](OUT_OF_RANGE_EXCEPTION); } // fast case if (len === undefined) { @@ -34682,11 +35196,11 @@ @param {*} obj object to push @return object same object passed as a param @public */ pushObject: function (obj) { - this.insertAt(_emberMetalProperty_get.get(this, "length"), obj); + this.insertAt(_emberMetalProperty_get.get(this, 'length'), obj); return obj; }, /** Add the objects in the passed numerable to the end of the array. Defers @@ -34702,11 +35216,11 @@ */ pushObjects: function (objects) { if (!(_emberRuntimeMixinsEnumerable["default"].detect(objects) || _emberMetalUtils.isArray(objects))) { throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects"); } - this.replace(_emberMetalProperty_get.get(this, "length"), 0, objects); + this.replace(_emberMetalProperty_get.get(this, 'length'), 0, objects); return this; }, /** Pop object from array or nil if none are left. Works just like `pop()` but @@ -34719,11 +35233,11 @@ @method popObject @return object @public */ popObject: function () { - var len = _emberMetalProperty_get.get(this, "length"); + var len = _emberMetalProperty_get.get(this, 'length'); if (len === 0) { return null; } var ret = this.objectAt(len - 1); @@ -34742,11 +35256,11 @@ @method shiftObject @return object @public */ shiftObject: function () { - if (_emberMetalProperty_get.get(this, "length") === 0) { + if (_emberMetalProperty_get.get(this, 'length') === 0) { return null; } var ret = this.objectAt(0); this.removeAt(0); @@ -34795,11 +35309,11 @@ @method reverseObjects @return {Ember.Array} receiver @public */ reverseObjects: function () { - var len = _emberMetalProperty_get.get(this, "length"); + var len = _emberMetalProperty_get.get(this, 'length'); if (len === 0) { return this; } var objects = this.toArray().reverse(); @@ -34824,11 +35338,11 @@ setObjects: function (objects) { if (objects.length === 0) { return this.clear(); } - var len = _emberMetalProperty_get.get(this, "length"); + var len = _emberMetalProperty_get.get(this, 'length'); this.replace(0, len, objects); return this; }, // .......................................................... @@ -34847,11 +35361,11 @@ @param {*} obj object to remove @return {Ember.Array} receiver @public */ removeObject: function (obj) { - var loc = _emberMetalProperty_get.get(this, "length") || 0; + var loc = _emberMetalProperty_get.get(this, 'length') || 0; while (--loc >= 0) { var curObject = this.objectAt(loc); if (curObject === obj) { this.removeAt(loc); @@ -34880,14 +35394,12 @@ return this; } }); }); -// .......................................................... -// HELPERS -// enifed("ember-runtime/mixins/mutable_enumerable", ["exports", "ember-metal/enumerable_utils", "ember-runtime/mixins/enumerable", "ember-metal/mixin", "ember-metal/property_events"], function (exports, _emberMetalEnumerable_utils, _emberRuntimeMixinsEnumerable, _emberMetalMixin, _emberMetalProperty_events) { + "use strict"; /** @module ember @submodule ember-runtime */ @@ -34994,10 +35506,15 @@ return this; } }); }); enifed("ember-runtime/mixins/observable", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/get_properties", "ember-metal/set_properties", "ember-metal/mixin", "ember-metal/events", "ember-metal/property_events", "ember-metal/observer", "ember-metal/computed", "ember-metal/is_none"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalGet_properties, _emberMetalSet_properties, _emberMetalMixin, _emberMetalEvents, _emberMetalProperty_events, _emberMetalObserver, _emberMetalComputed, _emberMetalIs_none) { + /** + @module ember + @submodule ember-runtime + */ + "use strict"; /** ## Overview This mixin provides properties and property observing functionality, core @@ -35264,20 +35781,20 @@ Convenience method to call `propertyWillChange` and `propertyDidChange` in succession. @method notifyPropertyChange @param {String} keyName The property key to be notified about. @return {Ember.Observable} - @private + @public */ notifyPropertyChange: function (keyName) { this.propertyWillChange(keyName); this.propertyDidChange(keyName); return this; }, _addBeforeObserver: function (key, target, method) { - _emberMetalCore["default"].deprecate("Before observers are deprecated and will be removed in a future release. If you want to keep track of previous values you have to implement it yourself.", false, { url: "http://emberjs.com/guides/deprecations/#toc_deprecate-beforeobservers" }); + _emberMetalCore["default"].deprecate('Before observers are deprecated and will be removed in a future release. If you want to keep track of previous values you have to implement it yourself.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-beforeobservers' }); _emberMetalObserver._addBeforeObserver(this, key, target, method); }, /** Adds an observer on a property. @@ -35343,11 +35860,11 @@ @param {String} key Key to check @return {Boolean} @private */ hasObserverFor: function (key) { - return _emberMetalEvents.hasListeners(this, key + ":change"); + return _emberMetalEvents.hasListeners(this, key + ':change'); }, /** Retrieves the value of a property, or a default value in the case that the property returns `undefined`. @@ -35440,16 +35957,13 @@ observersForKey: function (keyName) { return _emberMetalObserver.observersFor(this, keyName); } }); }); -/** -@module ember -@submodule ember-runtime -*/ // Ember.assert enifed("ember-runtime/mixins/promise_proxy", ["exports", "ember-metal/property_get", "ember-metal/set_properties", "ember-metal/computed", "ember-metal/mixin", "ember-metal/error"], function (exports, _emberMetalProperty_get, _emberMetalSet_properties, _emberMetalComputed, _emberMetalMixin, _emberMetalError) { + "use strict"; var not = _emberMetalComputed.computed.not; var or = _emberMetalComputed.computed.or; /** @@ -35558,19 +36072,19 @@ Once the proxied promise has settled this will become `false`. @property isPending @default true @public */ - isPending: not("isSettled").readOnly(), + isPending: not('isSettled').readOnly(), /** Once the proxied promise has settled this will become `true`. @property isSettled @default false @public */ - isSettled: or("isRejected", "isFulfilled").readOnly(), + isSettled: or('isRejected', 'isFulfilled').readOnly(), /** Will become `true` if the proxied promise is rejected. @property isRejected @default false @@ -35614,44 +36128,51 @@ @method then @param {Function} callback @return {RSVP.Promise} @public */ - then: promiseAlias("then"), + then: promiseAlias('then'), /** An alias to the proxied promise's `catch`. See RSVP.Promise.catch. @method catch @param {Function} callback @return {RSVP.Promise} @since 1.3.0 @public */ - "catch": promiseAlias("catch"), + 'catch': promiseAlias('catch'), /** An alias to the proxied promise's `finally`. See RSVP.Promise.finally. @method finally @param {Function} callback @return {RSVP.Promise} @since 1.3.0 @public */ - "finally": promiseAlias("finally") + 'finally': promiseAlias('finally') }); function promiseAlias(name) { return function () { - var promise = _emberMetalProperty_get.get(this, "promise"); + var promise = _emberMetalProperty_get.get(this, 'promise'); return promise[name].apply(promise, arguments); }; } }); enifed("ember-runtime/mixins/sortable", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/enumerable_utils", "ember-runtime/mixins/mutable_enumerable", "ember-runtime/compare", "ember-metal/observer", "ember-metal/computed", "ember-metal/computed_macros", "ember-metal/mixin"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalEnumerable_utils, _emberRuntimeMixinsMutable_enumerable, _emberRuntimeCompare, _emberMetalObserver, _emberMetalComputed, _emberMetalComputed_macros, _emberMetalMixin) { + /** + @module ember + @submodule ember-runtime + */ + + "use strict"; + //ES6TODO: should we access these directly from their package or from how their exposed in ember-metal? /** `Ember.SortableMixin` provides a standard interface for array proxies to specify a sort order and maintain this sorting when objects are added, @@ -35747,13 +36268,13 @@ */ sortFunction: _emberRuntimeCompare["default"], orderBy: function (item1, item2) { var result = 0; - var sortProperties = _emberMetalProperty_get.get(this, "sortProperties"); - var sortAscending = _emberMetalProperty_get.get(this, "sortAscending"); - var sortFunction = _emberMetalProperty_get.get(this, "sortFunction"); + var sortProperties = _emberMetalProperty_get.get(this, 'sortProperties'); + var sortAscending = _emberMetalProperty_get.get(this, 'sortAscending'); + var sortFunction = _emberMetalProperty_get.get(this, 'sortFunction'); _emberMetalCore["default"].assert("you need to define `sortProperties`", !!sortProperties); _emberMetalEnumerable_utils.forEach(sortProperties, function (propertyName) { if (result === 0) { @@ -35766,139 +36287,139 @@ return result; }, destroy: function () { - var content = _emberMetalProperty_get.get(this, "content"); - var sortProperties = _emberMetalProperty_get.get(this, "sortProperties"); + var content = _emberMetalProperty_get.get(this, 'content'); + var sortProperties = _emberMetalProperty_get.get(this, 'sortProperties'); if (content && sortProperties) { _emberMetalEnumerable_utils.forEach(content, function (item) { _emberMetalEnumerable_utils.forEach(sortProperties, function (sortProperty) { - _emberMetalObserver.removeObserver(item, sortProperty, this, "contentItemSortPropertyDidChange"); + _emberMetalObserver.removeObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange'); }, this); }, this); } return this._super.apply(this, arguments); }, - isSorted: _emberMetalComputed_macros.notEmpty("sortProperties"), + isSorted: _emberMetalComputed_macros.notEmpty('sortProperties'), /** Overrides the default `arrangedContent` from `ArrayProxy` in order to sort by `sortFunction`. Also sets up observers for each `sortProperty` on each item in the content Array. @property arrangedContent @private */ - arrangedContent: _emberMetalComputed.computed("content", "sortProperties.@each", { + arrangedContent: _emberMetalComputed.computed('content', 'sortProperties.@each', { get: function (key) { - var content = _emberMetalProperty_get.get(this, "content"); - var isSorted = _emberMetalProperty_get.get(this, "isSorted"); - var sortProperties = _emberMetalProperty_get.get(this, "sortProperties"); + var content = _emberMetalProperty_get.get(this, 'content'); + var isSorted = _emberMetalProperty_get.get(this, 'isSorted'); + var sortProperties = _emberMetalProperty_get.get(this, 'sortProperties'); var self = this; if (content && isSorted) { content = content.slice(); content.sort(function (item1, item2) { return self.orderBy(item1, item2); }); _emberMetalEnumerable_utils.forEach(content, function (item) { _emberMetalEnumerable_utils.forEach(sortProperties, function (sortProperty) { - _emberMetalObserver.addObserver(item, sortProperty, this, "contentItemSortPropertyDidChange"); + _emberMetalObserver.addObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange'); }, this); }, this); return _emberMetalCore["default"].A(content); } return content; } }), - _contentWillChange: _emberMetalMixin._beforeObserver("content", function () { - var content = _emberMetalProperty_get.get(this, "content"); - var sortProperties = _emberMetalProperty_get.get(this, "sortProperties"); + _contentWillChange: _emberMetalMixin._beforeObserver('content', function () { + var content = _emberMetalProperty_get.get(this, 'content'); + var sortProperties = _emberMetalProperty_get.get(this, 'sortProperties'); if (content && sortProperties) { _emberMetalEnumerable_utils.forEach(content, function (item) { _emberMetalEnumerable_utils.forEach(sortProperties, function (sortProperty) { - _emberMetalObserver.removeObserver(item, sortProperty, this, "contentItemSortPropertyDidChange"); + _emberMetalObserver.removeObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange'); }, this); }, this); } this._super.apply(this, arguments); }), - sortPropertiesWillChange: _emberMetalMixin._beforeObserver("sortProperties", function () { + sortPropertiesWillChange: _emberMetalMixin._beforeObserver('sortProperties', function () { this._lastSortAscending = undefined; }), - sortPropertiesDidChange: _emberMetalMixin.observer("sortProperties", function () { + sortPropertiesDidChange: _emberMetalMixin.observer('sortProperties', function () { this._lastSortAscending = undefined; }), - sortAscendingWillChange: _emberMetalMixin._beforeObserver("sortAscending", function () { - this._lastSortAscending = _emberMetalProperty_get.get(this, "sortAscending"); + sortAscendingWillChange: _emberMetalMixin._beforeObserver('sortAscending', function () { + this._lastSortAscending = _emberMetalProperty_get.get(this, 'sortAscending'); }), - sortAscendingDidChange: _emberMetalMixin.observer("sortAscending", function () { - if (this._lastSortAscending !== undefined && _emberMetalProperty_get.get(this, "sortAscending") !== this._lastSortAscending) { - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); + sortAscendingDidChange: _emberMetalMixin.observer('sortAscending', function () { + if (this._lastSortAscending !== undefined && _emberMetalProperty_get.get(this, 'sortAscending') !== this._lastSortAscending) { + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); arrangedContent.reverseObjects(); } }), contentArrayWillChange: function (array, idx, removedCount, addedCount) { - var isSorted = _emberMetalProperty_get.get(this, "isSorted"); + var isSorted = _emberMetalProperty_get.get(this, 'isSorted'); if (isSorted) { - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); var removedObjects = array.slice(idx, idx + removedCount); - var sortProperties = _emberMetalProperty_get.get(this, "sortProperties"); + var sortProperties = _emberMetalProperty_get.get(this, 'sortProperties'); _emberMetalEnumerable_utils.forEach(removedObjects, function (item) { arrangedContent.removeObject(item); _emberMetalEnumerable_utils.forEach(sortProperties, function (sortProperty) { - _emberMetalObserver.removeObserver(item, sortProperty, this, "contentItemSortPropertyDidChange"); + _emberMetalObserver.removeObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange'); }, this); }, this); } return this._super(array, idx, removedCount, addedCount); }, contentArrayDidChange: function (array, idx, removedCount, addedCount) { - var isSorted = _emberMetalProperty_get.get(this, "isSorted"); - var sortProperties = _emberMetalProperty_get.get(this, "sortProperties"); + var isSorted = _emberMetalProperty_get.get(this, 'isSorted'); + var sortProperties = _emberMetalProperty_get.get(this, 'sortProperties'); if (isSorted) { var addedObjects = array.slice(idx, idx + addedCount); _emberMetalEnumerable_utils.forEach(addedObjects, function (item) { this.insertItemSorted(item); _emberMetalEnumerable_utils.forEach(sortProperties, function (sortProperty) { - _emberMetalObserver.addObserver(item, sortProperty, this, "contentItemSortPropertyDidChange"); + _emberMetalObserver.addObserver(item, sortProperty, this, 'contentItemSortPropertyDidChange'); }, this); }, this); } return this._super(array, idx, removedCount, addedCount); }, insertItemSorted: function (item) { - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); - var length = _emberMetalProperty_get.get(arrangedContent, "length"); + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); + var length = _emberMetalProperty_get.get(arrangedContent, 'length'); var idx = this._binarySearch(item, 0, length); arrangedContent.insertAt(idx, item); }, contentItemSortPropertyDidChange: function (item) { - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); var oldIndex = arrangedContent.indexOf(item); var leftItem = arrangedContent.objectAt(oldIndex - 1); var rightItem = arrangedContent.objectAt(oldIndex + 1); var leftResult = leftItem && this.orderBy(item, leftItem); var rightResult = rightItem && this.orderBy(item, rightItem); @@ -35914,11 +36435,11 @@ if (low === high) { return low; } - arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); + arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); mid = low + Math.floor((high - low) / 2); midItem = arrangedContent.objectAt(mid); res = this.orderBy(midItem, item); @@ -35931,17 +36452,17 @@ return mid; } }); }); -/** -@module ember -@submodule ember-runtime -*/ - // Ember.assert, Ember.A enifed("ember-runtime/mixins/target_action_support", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/mixin", "ember-metal/computed"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalMixin, _emberMetalComputed) { + /** + @module ember + @submodule ember-runtime + */ + "use strict"; /** `Ember.TargetActionSupport` is a mixin that can be included in a class to add a `triggerAction` method with semantics similar to the Handlebars `{{action}}` helper. In normal Ember usage, the `{{action}}` helper is @@ -35959,18 +36480,18 @@ var TargetActionSupport = _emberMetalMixin.Mixin.create({ target: null, action: null, actionContext: null, - targetObject: _emberMetalComputed.computed("target", function () { + targetObject: _emberMetalComputed.computed('target', function () { if (this._targetObject) { return this._targetObject; } - var target = _emberMetalProperty_get.get(this, "target"); + var target = _emberMetalProperty_get.get(this, 'target'); - if (typeof target === "string") { + if (typeof target === 'string') { var value = _emberMetalProperty_get.get(this, target); if (value === undefined) { value = _emberMetalProperty_get.get(_emberMetalCore["default"].lookup, target); } @@ -35979,22 +36500,22 @@ return target; } }), actionContextObject: _emberMetalComputed.computed(function () { - var actionContext = _emberMetalProperty_get.get(this, "actionContext"); + var actionContext = _emberMetalProperty_get.get(this, 'actionContext'); if (typeof actionContext === "string") { var value = _emberMetalProperty_get.get(this, actionContext); if (value === undefined) { value = _emberMetalProperty_get.get(_emberMetalCore["default"].lookup, actionContext); } return value; } else { return actionContext; } - }).property("actionContext"), + }).property('actionContext'), /** Send an `action` with an `actionContext` to a `target`. The action, actionContext and target will be retrieved from properties of the object. For example: ```javascript @@ -36041,12 +36562,12 @@ @return {Boolean} true if the action was sent successfully and did not return false @private */ triggerAction: function (opts) { opts = opts || {}; - var action = opts.action || _emberMetalProperty_get.get(this, "action"); - var target = opts.target || _emberMetalProperty_get.get(this, "targetObject"); + var action = opts.action || _emberMetalProperty_get.get(this, 'action'); + var target = opts.target || _emberMetalProperty_get.get(this, 'targetObject'); var actionContext = opts.actionContext; function args(options, actionName) { var ret = []; if (actionName) { @@ -36054,21 +36575,21 @@ } return ret.concat(options); } - if (typeof actionContext === "undefined") { - actionContext = _emberMetalProperty_get.get(this, "actionContextObject") || this; + if (typeof actionContext === 'undefined') { + actionContext = _emberMetalProperty_get.get(this, 'actionContextObject') || this; } if (target && action) { var ret; if (target.send) { ret = target.send.apply(target, args(actionContext, action)); } else { - _emberMetalCore["default"].assert("The action '" + action + "' did not exist on " + target, typeof target[action] === "function"); + _emberMetalCore["default"].assert("The action '" + action + "' did not exist on " + target, typeof target[action] === 'function'); ret = target[action].apply(target, args(actionContext)); } if (ret !== false) { ret = true; @@ -36081,19 +36602,18 @@ } }); exports["default"] = TargetActionSupport; }); -/** -@module ember -@submodule ember-runtime -*/ // Ember.lookup, Ember.assert enifed("ember-runtime/system/application", ["exports", "ember-runtime/system/namespace"], function (exports, _emberRuntimeSystemNamespace) { + "use strict"; + exports["default"] = _emberRuntimeSystemNamespace["default"].extend(); }); enifed("ember-runtime/system/array_proxy", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-runtime/utils", "ember-metal/computed", "ember-metal/mixin", "ember-metal/property_events", "ember-metal/error", "ember-runtime/system/object", "ember-runtime/mixins/mutable_array", "ember-runtime/mixins/enumerable", "ember-runtime/system/string", "ember-metal/alias"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberRuntimeUtils, _emberMetalComputed, _emberMetalMixin, _emberMetalProperty_events, _emberMetalError, _emberRuntimeSystemObject, _emberRuntimeMixinsMutable_array, _emberRuntimeMixinsEnumerable, _emberRuntimeSystemString, _emberMetalAlias) { + "use strict"; /** @module ember @submodule ember-runtime */ @@ -36160,11 +36680,11 @@ implementation, this and `content` are the same. Subclasses of `ArrayProxy` can override this property to provide things like sorting and filtering. @property arrangedContent @private */ - arrangedContent: _emberMetalAlias["default"]("content"), + arrangedContent: _emberMetalAlias["default"]('content'), /** Should actually retrieve the object at the specified index from the content. You can override this method in subclasses to transform the content item to something new. @@ -36173,11 +36693,11 @@ @param {Number} idx The index to retrieve. @return {Object} the value or undefined if none found @private */ objectAtContent: function (idx) { - return _emberMetalProperty_get.get(this, "arrangedContent").objectAt(idx); + return _emberMetalProperty_get.get(this, 'arrangedContent').objectAt(idx); }, /** Should actually replace the specified objects on the content array. You can override this method in subclasses to transform the content item @@ -36190,30 +36710,30 @@ objects. @return {void} @private */ replaceContent: function (idx, amt, objects) { - _emberMetalProperty_get.get(this, "content").replace(idx, amt, objects); + _emberMetalProperty_get.get(this, 'content').replace(idx, amt, objects); }, /** Invoked when the content property is about to change. Notifies observers that the entire array content will change. @private @method _contentWillChange */ - _contentWillChange: _emberMetalMixin._beforeObserver("content", function () { + _contentWillChange: _emberMetalMixin._beforeObserver('content', function () { this._teardownContent(); }), _teardownContent: function () { - var content = _emberMetalProperty_get.get(this, "content"); + var content = _emberMetalProperty_get.get(this, 'content'); if (content) { content.removeArrayObserver(this, { - willChange: "contentArrayWillChange", - didChange: "contentArrayDidChange" + willChange: 'contentArrayWillChange', + didChange: 'contentArrayDidChange' }); } }, /** @@ -36241,133 +36761,133 @@ Invoked when the content property changes. Notifies observers that the entire array content has changed. @private @method _contentDidChange */ - _contentDidChange: _emberMetalMixin.observer("content", function () { - var content = _emberMetalProperty_get.get(this, "content"); + _contentDidChange: _emberMetalMixin.observer('content', function () { + var content = _emberMetalProperty_get.get(this, 'content'); _emberMetalCore["default"].assert("Can't set ArrayProxy's content to itself", content !== this); this._setupContent(); }), _setupContent: function () { - var content = _emberMetalProperty_get.get(this, "content"); + var content = _emberMetalProperty_get.get(this, 'content'); if (content) { - _emberMetalCore["default"].assert(_emberRuntimeSystemString.fmt("ArrayProxy expects an Array or " + "Ember.ArrayProxy, but you passed %@", [typeof content]), _emberRuntimeUtils.isArray(content) || content.isDestroyed); + _emberMetalCore["default"].assert(_emberRuntimeSystemString.fmt('ArrayProxy expects an Array or ' + 'Ember.ArrayProxy, but you passed %@', [typeof content]), _emberRuntimeUtils.isArray(content) || content.isDestroyed); content.addArrayObserver(this, { - willChange: "contentArrayWillChange", - didChange: "contentArrayDidChange" + willChange: 'contentArrayWillChange', + didChange: 'contentArrayDidChange' }); } }, - _arrangedContentWillChange: _emberMetalMixin._beforeObserver("arrangedContent", function () { - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); - var len = arrangedContent ? _emberMetalProperty_get.get(arrangedContent, "length") : 0; + _arrangedContentWillChange: _emberMetalMixin._beforeObserver('arrangedContent', function () { + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); + var len = arrangedContent ? _emberMetalProperty_get.get(arrangedContent, 'length') : 0; this.arrangedContentArrayWillChange(this, 0, len, undefined); this.arrangedContentWillChange(this); this._teardownArrangedContent(arrangedContent); }), - _arrangedContentDidChange: _emberMetalMixin.observer("arrangedContent", function () { - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); - var len = arrangedContent ? _emberMetalProperty_get.get(arrangedContent, "length") : 0; + _arrangedContentDidChange: _emberMetalMixin.observer('arrangedContent', function () { + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); + var len = arrangedContent ? _emberMetalProperty_get.get(arrangedContent, 'length') : 0; _emberMetalCore["default"].assert("Can't set ArrayProxy's content to itself", arrangedContent !== this); this._setupArrangedContent(); this.arrangedContentDidChange(this); this.arrangedContentArrayDidChange(this, 0, undefined, len); }), _setupArrangedContent: function () { - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); if (arrangedContent) { - _emberMetalCore["default"].assert(_emberRuntimeSystemString.fmt("ArrayProxy expects an Array or " + "Ember.ArrayProxy, but you passed %@", [typeof arrangedContent]), _emberRuntimeUtils.isArray(arrangedContent) || arrangedContent.isDestroyed); + _emberMetalCore["default"].assert(_emberRuntimeSystemString.fmt('ArrayProxy expects an Array or ' + 'Ember.ArrayProxy, but you passed %@', [typeof arrangedContent]), _emberRuntimeUtils.isArray(arrangedContent) || arrangedContent.isDestroyed); arrangedContent.addArrayObserver(this, { - willChange: "arrangedContentArrayWillChange", - didChange: "arrangedContentArrayDidChange" + willChange: 'arrangedContentArrayWillChange', + didChange: 'arrangedContentArrayDidChange' }); } }, _teardownArrangedContent: function () { - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); if (arrangedContent) { arrangedContent.removeArrayObserver(this, { - willChange: "arrangedContentArrayWillChange", - didChange: "arrangedContentArrayDidChange" + willChange: 'arrangedContentArrayWillChange', + didChange: 'arrangedContentArrayDidChange' }); } }, arrangedContentWillChange: K, arrangedContentDidChange: K, objectAt: function (idx) { - return _emberMetalProperty_get.get(this, "content") && this.objectAtContent(idx); + return _emberMetalProperty_get.get(this, 'content') && this.objectAtContent(idx); }, length: _emberMetalComputed.computed(function () { - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); - return arrangedContent ? _emberMetalProperty_get.get(arrangedContent, "length") : 0; + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); + return arrangedContent ? _emberMetalProperty_get.get(arrangedContent, 'length') : 0; // No dependencies since Enumerable notifies length of change }), _replace: function (idx, amt, objects) { - var content = _emberMetalProperty_get.get(this, "content"); - _emberMetalCore["default"].assert("The content property of " + this.constructor + " should be set before modifying it", content); + var content = _emberMetalProperty_get.get(this, 'content'); + _emberMetalCore["default"].assert('The content property of ' + this.constructor + ' should be set before modifying it', content); if (content) { this.replaceContent(idx, amt, objects); } return this; }, replace: function () { - if (_emberMetalProperty_get.get(this, "arrangedContent") === _emberMetalProperty_get.get(this, "content")) { + if (_emberMetalProperty_get.get(this, 'arrangedContent') === _emberMetalProperty_get.get(this, 'content')) { this._replace.apply(this, arguments); } else { throw new _emberMetalError["default"]("Using replace on an arranged ArrayProxy is not allowed."); } }, _insertAt: function (idx, object) { - if (idx > _emberMetalProperty_get.get(this, "content.length")) { + if (idx > _emberMetalProperty_get.get(this, 'content.length')) { throw new _emberMetalError["default"](OUT_OF_RANGE_EXCEPTION); } this._replace(idx, 0, [object]); return this; }, insertAt: function (idx, object) { - if (_emberMetalProperty_get.get(this, "arrangedContent") === _emberMetalProperty_get.get(this, "content")) { + if (_emberMetalProperty_get.get(this, 'arrangedContent') === _emberMetalProperty_get.get(this, 'content')) { return this._insertAt(idx, object); } else { throw new _emberMetalError["default"]("Using insertAt on an arranged ArrayProxy is not allowed."); } }, removeAt: function (start, len) { - if ("number" === typeof start) { - var content = _emberMetalProperty_get.get(this, "content"); - var arrangedContent = _emberMetalProperty_get.get(this, "arrangedContent"); + if ('number' === typeof start) { + var content = _emberMetalProperty_get.get(this, 'content'); + var arrangedContent = _emberMetalProperty_get.get(this, 'arrangedContent'); var indices = []; var i; - if (start < 0 || start >= _emberMetalProperty_get.get(this, "length")) { + if (start < 0 || start >= _emberMetalProperty_get.get(this, 'length')) { throw new _emberMetalError["default"](OUT_OF_RANGE_EXCEPTION); } if (len === undefined) { len = 1; @@ -36393,28 +36913,28 @@ return this; }, pushObject: function (obj) { - this._insertAt(_emberMetalProperty_get.get(this, "content.length"), obj); + this._insertAt(_emberMetalProperty_get.get(this, 'content.length'), obj); return obj; }, pushObjects: function (objects) { if (!(_emberRuntimeMixinsEnumerable["default"].detect(objects) || _emberRuntimeUtils.isArray(objects))) { throw new TypeError("Must pass Ember.Enumerable to Ember.MutableArray#pushObjects"); } - this._replace(_emberMetalProperty_get.get(this, "length"), 0, objects); + this._replace(_emberMetalProperty_get.get(this, 'length'), 0, objects); return this; }, setObjects: function (objects) { if (objects.length === 0) { return this.clear(); } - var len = _emberMetalProperty_get.get(this, "length"); + var len = _emberMetalProperty_get.get(this, 'length'); this._replace(0, len, objects); return this; }, unshiftObject: function (obj) { @@ -36454,10 +36974,11 @@ exports["default"] = ArrayProxy; }); // Ember.assert enifed("ember-runtime/system/container", ["exports", "ember-metal/property_set", "container/registry", "container/container"], function (exports, _emberMetalProperty_set, _containerRegistry, _containerContainer) { + "use strict"; _containerRegistry["default"].set = _emberMetalProperty_set.set; _containerContainer["default"].set = _emberMetalProperty_set.set; exports.Registry = _containerRegistry["default"]; @@ -36465,12 +36986,21 @@ }); enifed("ember-runtime/system/core_object", ["exports", "ember-metal", "ember-metal/merge", "ember-metal/property_get", "ember-metal/utils", "ember-metal/platform/create", "ember-metal/chains", "ember-metal/events", "ember-metal/mixin", "ember-metal/enumerable_utils", "ember-metal/error", "ember-metal/platform/define_property", "ember-metal/keys", "ember-runtime/mixins/action_handler", "ember-metal/properties", "ember-metal/binding", "ember-metal/computed", "ember-metal/injected_property", "ember-metal/run_loop", "ember-metal/watching", "ember-metal/core", "ember-runtime/inject"], function (exports, _emberMetal, _emberMetalMerge, _emberMetalProperty_get, _emberMetalUtils, _emberMetalPlatformCreate, _emberMetalChains, _emberMetalEvents, _emberMetalMixin, _emberMetalEnumerable_utils, _emberMetalError, _emberMetalPlatformDefine_property, _emberMetalKeys, _emberRuntimeMixinsAction_handler, _emberMetalProperties, _emberMetalBinding, _emberMetalComputed, _emberMetalInjected_property, _emberMetalRun_loop, _emberMetalWatching, _emberMetalCore, _emberRuntimeInject) { // Remove "use strict"; from transpiled module until // https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed // + "REMOVE_USE_STRICT: true"; + /** + @module ember + @submodule ember-runtime + */ + + // using ember-metal/lib/main here to ensure that ember-debug is setup + // if present + var schedule = _emberMetalRun_loop["default"].schedule; var applyMixin = _emberMetalMixin.Mixin._apply; var finishPartial = _emberMetalMixin.Mixin.finishPartial; var reopen = _emberMetalMixin.Mixin.prototype.reopen; var hasCachedComputedProperties = false; @@ -36508,13 +37038,13 @@ var mergedProperties = this.mergedProperties; for (var i = 0, l = props.length; i < l; i++) { var properties = props[i]; - _emberMetal["default"].assert("Ember.Object.create no longer supports mixing in other definitions, use .extend & .create seperately instead.", !(properties instanceof _emberMetalMixin.Mixin)); + _emberMetal["default"].assert('Ember.Object.create no longer supports mixing in other definitions, use .extend & .create seperately instead.', !(properties instanceof _emberMetalMixin.Mixin)); - if (typeof properties !== "object" && properties !== undefined) { + if (typeof properties !== 'object' && properties !== undefined) { throw new _emberMetalError["default"]("Ember.Object.create only accepts objects."); } if (!properties) { continue; @@ -36528,28 +37058,28 @@ if (_emberMetalMixin.IS_BINDING.test(keyName)) { var bindings = m.bindings; if (!bindings) { bindings = m.bindings = {}; - } else if (!m.hasOwnProperty("bindings")) { + } else if (!m.hasOwnProperty('bindings')) { bindings = m.bindings = _emberMetalPlatformCreate["default"](m.bindings); } bindings[keyName] = value; } var possibleDesc = this[keyName]; - var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; _emberMetal["default"].assert("Ember.Object.create no longer supports defining computed properties. Define computed properties using extend() or reopen() before calling create().", !(value instanceof _emberMetalComputed.ComputedProperty)); - _emberMetal["default"].assert("Ember.Object.create no longer supports defining methods that call _super.", !(typeof value === "function" && value.toString().indexOf("._super") !== -1)); - _emberMetal["default"].assert("`actions` must be provided at extend time, not at create " + "time, when Ember.ActionHandler is used (i.e. views, " + "controllers & routes).", !(keyName === "actions" && _emberRuntimeMixinsAction_handler["default"].detect(this))); + _emberMetal["default"].assert("Ember.Object.create no longer supports defining methods that call _super.", !(typeof value === 'function' && value.toString().indexOf('._super') !== -1)); + _emberMetal["default"].assert("`actions` must be provided at extend time, not at create " + "time, when Ember.ActionHandler is used (i.e. views, " + "controllers & routes).", !(keyName === 'actions' && _emberRuntimeMixinsAction_handler["default"].detect(this))); if (concatenatedProperties && concatenatedProperties.length > 0 && _emberMetalEnumerable_utils.indexOf(concatenatedProperties, keyName) >= 0) { var baseValue = this[keyName]; if (baseValue) { - if ("function" === typeof baseValue.concat) { + if ('function' === typeof baseValue.concat) { value = baseValue.concat(value); } else { value = _emberMetalUtils.makeArray(baseValue).concat(value); } } else { @@ -36564,19 +37094,19 @@ } if (desc) { desc.set(this, keyName, value); } else { - if (typeof this.setUnknownProperty === "function" && !(keyName in this)) { + if (typeof this.setUnknownProperty === 'function' && !(keyName in this)) { this.setUnknownProperty(keyName, value); } else { if (_emberMetalPlatformDefine_property.hasPropertyAccessors) { _emberMetalProperties.defineProperty(this, keyName, null, value); // setup mandatory setter } else { - this[keyName] = value; - } + this[keyName] = value; + } } } } } } @@ -36599,11 +37129,11 @@ this.init.apply(this, args); } m.proto = proto; _emberMetalChains.finishChains(this); - _emberMetalEvents.sendEvent(this, "init"); + _emberMetalEvents.sendEvent(this, 'init'); }; Class.toString = _emberMetalMixin.Mixin.prototype.toString; Class.willReopen = function () { if (wasApplied) { @@ -36776,12 +37306,12 @@ if (this.isDestroying) { return; } this.isDestroying = true; - schedule("actions", this, this.willDestroy); - schedule("destroy", this, this._scheduledDestroy); + schedule('actions', this, this.willDestroy); + schedule('destroy', this, this._scheduledDestroy); return this; }, /** Override to implement teardown. @@ -36842,13 +37372,13 @@ @method toString @return {String} string representation @public */ toString: function () { - var hasToStringExtension = typeof this.toStringExtension === "function"; - var extension = hasToStringExtension ? ":" + this.toStringExtension() : ""; - var ret = "<" + this.constructor.toString() + ":" + _emberMetalUtils.guidFor(this) + extension + ">"; + var hasToStringExtension = typeof this.toStringExtension === 'function'; + var extension = hasToStringExtension ? ":" + this.toStringExtension() : ''; + var ret = '<' + this.constructor.toString() + ':' + _emberMetalUtils.guidFor(this) + extension + '>'; this.toString = makeToString(ret); return ret; } }); @@ -36967,11 +37497,11 @@ @static @param [arguments]* @private @deprecated */ - createWithMixins: _emberMetal["default"].deprecateFunc(".createWithMixins is deprecated, please use .create or .extend accordingly", function () { + createWithMixins: _emberMetal["default"].deprecateFunc('.createWithMixins is deprecated, please use .create or .extend accordingly', function () { var C = this; for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } @@ -37104,11 +37634,11 @@ applyMixin(this, arguments, false); return this; }, detect: function (obj) { - if ("function" !== typeof obj) { + if ('function' !== typeof obj) { return false; } while (obj) { if (obj === this) { return true; @@ -37146,11 +37676,11 @@ @private */ metaForProperty: function (key) { var proto = this.proto(); var possibleDesc = proto[key]; - var desc = possibleDesc !== null && typeof possibleDesc === "object" && possibleDesc.isDescriptor ? possibleDesc : undefined; + var desc = possibleDesc !== null && typeof possibleDesc === 'object' && possibleDesc.isDescriptor ? possibleDesc : undefined; _emberMetal["default"].assert("metaForProperty() could not find a computed property with key '" + key + "'.", !!desc && desc instanceof _emberMetalComputed.ComputedProperty); return desc._meta || {}; }, @@ -37184,11 +37714,11 @@ */ eachComputedProperty: function (callback, binding) { var property, name; var empty = {}; - var properties = _emberMetalProperty_get.get(this, "_computedProperties"); + var properties = _emberMetalProperty_get.get(this, '_computedProperties'); for (var i = 0, length = properties.length; i < length; i++) { property = properties[i]; name = property.name; callback.call(binding || this, property.name, property.meta || empty); @@ -37223,11 +37753,11 @@ var key, desc; for (key in proto) { desc = proto[key]; if (desc instanceof _emberMetalInjected_property["default"]) { - injections[key] = desc.type + ":" + (desc.name || key); + injections[key] = desc.type + ':' + (desc.name || key); } } return injections; }; @@ -37255,27 +37785,21 @@ } }); exports["default"] = CoreObject; }); -/** - @module ember - @submodule ember-runtime -*/ -// using ember-metal/lib/main here to ensure that ember-debug is setup -// if present - // Ember.assert, Ember.config // NOTE: this object should never be included directly. Instead use `Ember.Object`. // We only define this separately so that `Ember.Set` can depend on it. enifed("ember-runtime/system/deferred", ["exports", "ember-metal/core", "ember-runtime/mixins/deferred", "ember-runtime/system/object"], function (exports, _emberMetalCore, _emberRuntimeMixinsDeferred, _emberRuntimeSystemObject) { + "use strict"; var Deferred = _emberRuntimeSystemObject["default"].extend(_emberRuntimeMixinsDeferred["default"], { init: function () { - _emberMetalCore["default"].deprecate("Usage of Ember.Deferred is deprecated.", false, { url: "http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred" }); + _emberMetalCore["default"].deprecate('Usage of Ember.Deferred is deprecated.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-ember-deferredmixin-and-ember-deferred' }); this._super.apply(this, arguments); } }); Deferred.reopenClass({ @@ -37287,11 +37811,17 @@ }); exports["default"] = Deferred; }); enifed("ember-runtime/system/each_proxy", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/utils", "ember-runtime/utils", "ember-metal/enumerable_utils", "ember-metal/array", "ember-runtime/mixins/array", "ember-runtime/system/object", "ember-metal/computed", "ember-metal/observer", "ember-metal/events", "ember-metal/properties", "ember-metal/property_events"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalUtils, _emberRuntimeUtils, _emberMetalEnumerable_utils, _emberMetalArray, _emberRuntimeMixinsArray, _emberRuntimeSystemObject, _emberMetalComputed, _emberMetalObserver, _emberMetalEvents, _emberMetalProperties, _emberMetalProperty_events) { + /** + @module ember + @submodule ember-runtime + */ + "use strict"; + var EachArray = _emberRuntimeSystemObject["default"].extend(_emberRuntimeMixinsArray["default"], { init: function (content, keyName, owner) { this._super.apply(this, arguments); this._keyName = keyName; @@ -37304,11 +37834,11 @@ return item && _emberMetalProperty_get.get(item, this._keyName); }, length: _emberMetalComputed.computed(function () { var content = this._content; - return content ? _emberMetalProperty_get.get(content, "length") : 0; + return content ? _emberMetalProperty_get.get(content, 'length') : 0; }) }); var IS_OBSERVER = /^.+:(before|change)$/; @@ -37321,13 +37851,13 @@ } while (--loc >= idx) { var item = content.objectAt(loc); if (item) { - _emberMetalCore["default"].assert("When using @each to observe the array " + content + ", the array must return an object", _emberRuntimeUtils.typeOf(item) === "instance" || _emberRuntimeUtils.typeOf(item) === "object"); - _emberMetalObserver._addBeforeObserver(item, keyName, proxy, "contentKeyWillChange"); - _emberMetalObserver.addObserver(item, keyName, proxy, "contentKeyDidChange"); + _emberMetalCore["default"].assert('When using @each to observe the array ' + content + ', the array must return an object', _emberRuntimeUtils.typeOf(item) === 'instance' || _emberRuntimeUtils.typeOf(item) === 'object'); + _emberMetalObserver._addBeforeObserver(item, keyName, proxy, 'contentKeyWillChange'); + _emberMetalObserver.addObserver(item, keyName, proxy, 'contentKeyDidChange'); // keep track of the index each item was found at so we can map // it back when the obj changes. guid = _emberMetalUtils.guidFor(item); if (!objects[guid]) { @@ -37348,12 +37878,12 @@ var indices, guid; while (--loc >= idx) { var item = content.objectAt(loc); if (item) { - _emberMetalObserver._removeBeforeObserver(item, keyName, proxy, "contentKeyWillChange"); - _emberMetalObserver.removeObserver(item, keyName, proxy, "contentKeyDidChange"); + _emberMetalObserver._removeBeforeObserver(item, keyName, proxy, 'contentKeyWillChange'); + _emberMetalObserver.removeObserver(item, keyName, proxy, 'contentKeyDidChange'); guid = _emberMetalUtils.guidFor(item); indices = objects[guid]; indices[_emberMetalArray.indexOf.call(indices, loc)] = null; } @@ -37417,11 +37947,11 @@ } _emberMetalProperty_events.propertyWillChange(this, key); } - _emberMetalProperty_events.propertyWillChange(this._content, "@each"); + _emberMetalProperty_events.propertyWillChange(this._content, '@each'); _emberMetalProperty_events.endPropertyChanges(this); }, arrayDidChange: function (content, idx, removedCnt, addedCnt) { var keys = this._keys; @@ -37439,11 +37969,11 @@ } _emberMetalProperty_events.propertyDidChange(this, key); } - _emberMetalProperty_events.propertyDidChange(this._content, "@each"); + _emberMetalProperty_events.propertyDidChange(this._content, '@each'); }, this); }, // .......................................................... // LISTEN FOR NEW OBSERVERS AND OTHER EVENT LISTENERS @@ -37472,11 +38002,11 @@ } if (!keys[keyName]) { keys[keyName] = 1; var content = this._content; - var len = _emberMetalProperty_get.get(content, "length"); + var len = _emberMetalProperty_get.get(content, 'length'); addObserverForContentKey(content, keyName, this, 0, len); } else { keys[keyName]++; } @@ -37484,11 +38014,11 @@ stopObservingContentKey: function (keyName) { var keys = this._keys; if (keys && keys[keyName] > 0 && --keys[keyName] <= 0) { var content = this._content; - var len = _emberMetalProperty_get.get(content, "length"); + var len = _emberMetalProperty_get.get(content, 'length'); removeObserverForContentKey(content, keyName, this, 0, len); } }, @@ -37502,19 +38032,18 @@ }); exports.EachArray = EachArray; exports.EachProxy = EachProxy; }); -/** -@module ember -@submodule ember-runtime -*/ - // Ember.assert // ES6TODO: WAT? Circular dep? enifed("ember-runtime/system/lazy_load", ["exports", "ember-metal/core", "ember-metal/array", "ember-runtime/system/native_array"], function (exports, _emberMetalCore, _emberMetalArray, _emberRuntimeSystemNative_array) { + /*globals CustomEvent */ + + "use strict"; + exports.onLoad = onLoad; exports.runLoadHooks = runLoadHooks; // make sure Ember.A is setup. /** @@ -37522,10 +38051,11 @@ @submodule ember-runtime */ var loadHooks = _emberMetalCore["default"].ENV.EMBER_LOAD_HOOKS || {}; var loaded = {}; + var _loaded = loaded; /** Detects when a specific package of Ember (e.g. 'Ember.Application') has fully loaded and is available for extension. @@ -37542,18 +38072,19 @@ @for Ember @param name {String} name of hook @param callback {Function} callback to be called @private */ + exports._loaded = _loaded; function onLoad(name, callback) { - var object; + var object = loaded[name]; loadHooks[name] = loadHooks[name] || _emberMetalCore["default"].A(); loadHooks[name].pushObject(callback); - if (object = loaded[name]) { + if (object) { callback(object); } } /** @@ -37568,11 +38099,11 @@ */ function runLoadHooks(name, object) { loaded[name] = object; - if (typeof window === "object" && typeof window.dispatchEvent === "function" && typeof CustomEvent === "function") { + if (typeof window === 'object' && typeof window.dispatchEvent === 'function' && typeof CustomEvent === "function") { var event = new CustomEvent(name, { detail: object, name: name }); window.dispatchEvent(event); } if (loadHooks[name]) { @@ -37580,15 +38111,20 @@ callback(object); }); } } }); -/*globals CustomEvent */ - // Ember.ENV.EMBER_LOAD_HOOKS enifed("ember-runtime/system/namespace", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/array", "ember-metal/utils", "ember-metal/mixin", "ember-runtime/system/object"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalArray, _emberMetalUtils, _emberMetalMixin, _emberRuntimeSystemObject) { + /** + @module ember + @submodule ember-runtime + */ + // Ember.lookup, Ember.BOOTED, Ember.deprecate, Ember.NAME_KEY, Ember.anyUnprocessedMixins + "use strict"; + /** A Namespace is an object usually used to contain other objects or methods such as an application or framework. Create a namespace anytime you want to define one of these new containers. @@ -37612,11 +38148,11 @@ Namespace.NAMESPACES.push(this); Namespace.PROCESSED = false; }, toString: function () { - var name = _emberMetalProperty_get.get(this, "name") || _emberMetalProperty_get.get(this, "modulePrefix"); + var name = _emberMetalProperty_get.get(this, 'name') || _emberMetalProperty_get.get(this, 'modulePrefix'); if (name) { return name; } findNamespaces(); @@ -37659,11 +38195,11 @@ var hasOwnProp = ({}).hasOwnProperty; function processNamespace(paths, root, seen) { var idx = paths.length; - NAMESPACES_BY_ID[paths.join(".")] = root; + NAMESPACES_BY_ID[paths.join('.')] = root; // Loop over all of the keys in the namespace, looking for classes for (var key in root) { if (!hasOwnProp.call(root, key)) { continue; @@ -37679,24 +38215,24 @@ // If we have found an unprocessed class if (obj && obj.toString === classToString) { // Replace the class' `toString` with the dot-separated path // and set its `NAME_KEY` - obj.toString = makeToString(paths.join(".")); - obj[NAME_KEY] = paths.join("."); + obj.toString = makeToString(paths.join('.')); + obj[NAME_KEY] = paths.join('.'); // Support nested namespaces } else if (obj && obj.isNamespace) { - // Skip aliased namespaces - if (seen[_emberMetalUtils.guidFor(obj)]) { - continue; - } - seen[_emberMetalUtils.guidFor(obj)] = true; + // Skip aliased namespaces + if (seen[_emberMetalUtils.guidFor(obj)]) { + continue; + } + seen[_emberMetalUtils.guidFor(obj)] = true; - // Process the child namespace - processNamespace(paths, obj, seen); - } + // Process the child namespace + processNamespace(paths, obj, seen); + } } paths.length = idx; // cut out last item } @@ -37704,11 +38240,13 @@ function tryIsNamespace(lookup, prop) { try { var obj = lookup[prop]; return obj && obj.isNamespace && obj; - } catch (e) {} + } catch (e) { + // continue + } } function findNamespaces() { var lookup = _emberMetalCore["default"].lookup; var obj; @@ -37735,11 +38273,11 @@ obj[NAME_KEY] = prop; } } } - var NAME_KEY = _emberMetalCore["default"].NAME_KEY = _emberMetalUtils.GUID_KEY + "_name"; + var NAME_KEY = _emberMetalCore["default"].NAME_KEY = _emberMetalUtils.GUID_KEY + '_name'; function superClassString(mixin) { var superclass = mixin.superclass; if (superclass) { if (superclass[NAME_KEY]) { @@ -37806,20 +38344,18 @@ _emberMetalMixin.Mixin.prototype.toString = classToString; // ES6TODO: altering imported objects. SBB. exports["default"] = Namespace; }); -/** -@module ember -@submodule ember-runtime -*/ - -// Ember.lookup, Ember.BOOTED, Ember.deprecate, Ember.NAME_KEY, Ember.anyUnprocessedMixins - -// continue enifed("ember-runtime/system/native_array", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/enumerable_utils", "ember-metal/mixin", "ember-metal/array", "ember-runtime/mixins/array", "ember-runtime/mixins/mutable_array", "ember-runtime/mixins/observable", "ember-runtime/mixins/copyable", "ember-runtime/mixins/freezable", "ember-runtime/copy"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalEnumerable_utils, _emberMetalMixin, _emberMetalArray, _emberRuntimeMixinsArray, _emberRuntimeMixinsMutable_array, _emberRuntimeMixinsObservable, _emberRuntimeMixinsCopyable, _emberRuntimeMixinsFreezable, _emberRuntimeCopy) { + /** + @module ember + @submodule ember-runtime + */ + "use strict"; + // Add Ember.Array to Array.prototype. Remove methods with native // implementations and supply some more optimized versions of generic methods // because they are so common. /** @@ -37839,13 +38375,13 @@ var NativeArray = _emberMetalMixin.Mixin.create(_emberRuntimeMixinsMutable_array["default"], _emberRuntimeMixinsObservable["default"], _emberRuntimeMixinsCopyable["default"], { // because length is a built-in property we need to know to just get the // original property. get: function (key) { - if (key === "length") { + if (key === 'length') { return this.length; - } else if ("number" === typeof key) { + } else if ('number' === typeof key) { return this[key]; } else { return this._super(key); } }, @@ -37862,11 +38398,11 @@ } // if we replaced exactly the same number of items, then pass only the // replaced range. Otherwise, pass the full remaining array length // since everything has shifted - var len = objects ? _emberMetalProperty_get.get(objects, "length") : 0; + var len = objects ? _emberMetalProperty_get.get(objects, 'length') : 0; this.arrayContentWillChange(idx, amt, len); if (len === 0) { this.splice(idx, amt); } else { @@ -37901,18 +38437,19 @@ return this.slice(); } }); // Remove any methods implemented natively so we don't override them - var ignore = ["length"]; + var ignore = ['length']; _emberMetalEnumerable_utils.forEach(NativeArray.keys(), function (methodName) { if (Array.prototype[methodName]) { ignore.push(methodName); } }); - exports.NativeArray = NativeArray = NativeArray.without.apply(NativeArray, ignore); + exports.NativeArray // TODO: only use default export + = NativeArray = NativeArray.without.apply(NativeArray, ignore); /** Creates an `Ember.NativeArray` from an Array like object. Does not modify the original object. Ember.A is not needed if `Ember.EXTEND_PROTOTYPES` is `true` (the default value). However, @@ -37969,33 +38506,33 @@ @private */ NativeArray.activate = function () { NativeArray.apply(Array.prototype); - exports.A = A = function (arr) { + exports. // ES6TODO: Setting A onto the object returned by ember-metal/core to avoid circles + A = A = function (arr) { return arr || []; }; }; if (_emberMetalCore["default"].EXTEND_PROTOTYPES === true || _emberMetalCore["default"].EXTEND_PROTOTYPES.Array) { NativeArray.activate(); } - _emberMetalCore["default"].A = A; // ES6TODO: Setting A onto the object returned by ember-metal/core to avoid circles - exports.A = A; - exports.NativeArray = NativeArray // TODO: only use default export - ; + _emberMetalCore["default"].A = A;exports.A = A; + exports.NativeArray = NativeArray; exports["default"] = NativeArray; }); -/** -@module ember -@submodule ember-runtime -*/ - // Ember.EXTEND_PROTOTYPES enifed("ember-runtime/system/object", ["exports", "ember-runtime/system/core_object", "ember-runtime/mixins/observable"], function (exports, _emberRuntimeSystemCore_object, _emberRuntimeMixinsObservable) { + /** + @module ember + @submodule ember-runtime + */ + "use strict"; + /** `Ember.Object` is the main base class for all Ember objects. It is a subclass of `Ember.CoreObject` with the `Ember.Observable` mixin applied. For details, see the documentation for each of these. @@ -38010,15 +38547,12 @@ return "Ember.Object"; }; exports["default"] = EmberObject; }); -/** -@module ember -@submodule ember-runtime -*/ enifed("ember-runtime/system/object_proxy", ["exports", "ember-runtime/system/object", "ember-runtime/mixins/-proxy"], function (exports, _emberRuntimeSystemObject, _emberRuntimeMixinsProxy) { + "use strict"; /** `Ember.ObjectProxy` forwards all properties not defined by the proxy itself to a proxied `content` object. @@ -38089,10 +38623,11 @@ */ exports["default"] = _emberRuntimeSystemObject["default"].extend(_emberRuntimeMixinsProxy["default"]); }); enifed('ember-runtime/system/service', ['exports', 'ember-runtime/system/object', 'ember-runtime/inject'], function (exports, _emberRuntimeSystemObject, _emberRuntimeInject) { + 'use strict'; /** Creates a property that lazily looks up a service in the container. There are no restrictions as to what objects a service can be injected into. @@ -38136,10 +38671,15 @@ }); exports["default"] = Service; }); enifed("ember-runtime/system/set", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/utils", "ember-metal/is_none", "ember-runtime/system/string", "ember-runtime/system/core_object", "ember-runtime/mixins/mutable_enumerable", "ember-runtime/mixins/enumerable", "ember-runtime/mixins/copyable", "ember-runtime/mixins/freezable", "ember-metal/error", "ember-metal/property_events", "ember-metal/mixin", "ember-metal/computed"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalUtils, _emberMetalIs_none, _emberRuntimeSystemString, _emberRuntimeSystemCore_object, _emberRuntimeMixinsMutable_enumerable, _emberRuntimeMixinsEnumerable, _emberRuntimeMixinsCopyable, _emberRuntimeMixinsFreezable, _emberMetalError, _emberMetalProperty_events, _emberMetalMixin, _emberMetalComputed) { + /** + @module ember + @submodule ember-runtime + */ + "use strict"; /** An unordered collection of objects. A Set works a bit like an array except that its items are not ordered. You @@ -38269,31 +38809,31 @@ clear: function () { if (this.isFrozen) { throw new _emberMetalError["default"](_emberRuntimeMixinsFreezable.FROZEN_ERROR); } - var len = _emberMetalProperty_get.get(this, "length"); + var len = _emberMetalProperty_get.get(this, 'length'); if (len === 0) { return this; } var guid; this.enumerableContentWillChange(len, 0); - _emberMetalProperty_events.propertyWillChange(this, "firstObject"); - _emberMetalProperty_events.propertyWillChange(this, "lastObject"); + _emberMetalProperty_events.propertyWillChange(this, 'firstObject'); + _emberMetalProperty_events.propertyWillChange(this, 'lastObject'); for (var i = 0; i < len; i++) { guid = _emberMetalUtils.guidFor(this[i]); delete this[guid]; delete this[i]; } - _emberMetalProperty_set.set(this, "length", 0); + _emberMetalProperty_set.set(this, 'length', 0); - _emberMetalProperty_events.propertyDidChange(this, "firstObject"); - _emberMetalProperty_events.propertyDidChange(this, "lastObject"); + _emberMetalProperty_events.propertyDidChange(this, 'firstObject'); + _emberMetalProperty_events.propertyDidChange(this, 'lastObject'); this.enumerableContentDidChange(len, 0); return this; }, @@ -38315,12 +38855,12 @@ // fail fast if (!_emberRuntimeMixinsEnumerable["default"].detect(obj)) { return false; } - var loc = _emberMetalProperty_get.get(this, "length"); - if (_emberMetalProperty_get.get(obj, "length") !== loc) { + var loc = _emberMetalProperty_get.get(this, 'length'); + if (_emberMetalProperty_get.get(obj, 'length') !== loc) { return false; } while (--loc >= 0) { if (!obj.contains(this[loc])) { @@ -38347,11 +38887,11 @@ @method add @param {Object} obj The object to add. @return {Ember.Set} The set itself. @private */ - add: _emberMetalMixin.aliasMethod("addObject"), + add: _emberMetalMixin.aliasMethod('addObject'), /** Removes the object from the set if it is found. If you pass a `null` value or an object that is already not in the set, this method will have no effect. This is an alias for `Ember.MutableEnumerable.removeObject()`. @@ -38364,11 +38904,11 @@ @method remove @param {Object} obj The object to remove @return {Ember.Set} The set itself. @private */ - remove: _emberMetalMixin.aliasMethod("removeObject"), + remove: _emberMetalMixin.aliasMethod('removeObject'), /** Removes the last element from the set and returns it, or `null` if it's empty. ```javascript var colors = new Ember.Set(["green", "blue"]); @@ -38379,11 +38919,11 @@ @method pop @return {Object} The removed object from the set or null. @private */ pop: function () { - if (_emberMetalProperty_get.get(this, "isFrozen")) { + if (_emberMetalProperty_get.get(this, 'isFrozen')) { throw new _emberMetalError["default"](_emberRuntimeMixinsFreezable.FROZEN_ERROR); } var obj = this.length > 0 ? this[this.length - 1] : null; this.remove(obj); @@ -38402,11 +38942,11 @@ ``` @method push @return {Ember.Set} The set itself. @private */ - push: _emberMetalMixin.aliasMethod("addObject"), + push: _emberMetalMixin.aliasMethod('addObject'), /** Removes the last element from the set and returns it, or `null` if it's empty. This is an alias for `Ember.Set.pop()`. ```javascript @@ -38417,11 +38957,11 @@ ``` @method shift @return {Object} The removed object from the set or null. @private */ - shift: _emberMetalMixin.aliasMethod("pop"), + shift: _emberMetalMixin.aliasMethod('pop'), /** Inserts the given object on to the end of the set. It returns the set itself. This is an alias of `Ember.Set.push()` @@ -38433,11 +38973,11 @@ ``` @method unshift @return {Ember.Set} The set itself. @private */ - unshift: _emberMetalMixin.aliasMethod("push"), + unshift: _emberMetalMixin.aliasMethod('push'), /** Adds each object in the passed enumerable to the set. This is an alias of `Ember.MutableEnumerable.addObjects()` ```javascript @@ -38447,11 +38987,11 @@ @method addEach @param {Ember.Enumerable} objects the objects to add. @return {Ember.Set} The set itself. @private */ - addEach: _emberMetalMixin.aliasMethod("addObjects"), + addEach: _emberMetalMixin.aliasMethod('addObjects'), /** Removes each object in the passed enumerable to the set. This is an alias of `Ember.MutableEnumerable.removeObjects()` ```javascript @@ -38461,18 +39001,18 @@ @method removeEach @param {Ember.Enumerable} objects the objects to remove. @return {Ember.Set} The set itself. @private */ - removeEach: _emberMetalMixin.aliasMethod("removeObjects"), + removeEach: _emberMetalMixin.aliasMethod('removeObjects'), // .......................................................... // PRIVATE ENUMERABLE SUPPORT // init: function (items) { - _emberMetalCore["default"].deprecate("Ember.Set is deprecated and will be removed in a future release."); + _emberMetalCore["default"].deprecate('Ember.Set is deprecated and will be removed in a future release.'); this._super.apply(this, arguments); if (items) { this.addObjects(items); } @@ -38493,69 +39033,69 @@ return this.length > 0 ? this[this.length - 1] : undefined; }), // implements Ember.MutableEnumerable addObject: function (obj) { - if (_emberMetalProperty_get.get(this, "isFrozen")) { + if (_emberMetalProperty_get.get(this, 'isFrozen')) { throw new _emberMetalError["default"](_emberRuntimeMixinsFreezable.FROZEN_ERROR); } if (_emberMetalIs_none["default"](obj)) { return this; // nothing to do } var guid = _emberMetalUtils.guidFor(obj); var idx = this[guid]; - var len = _emberMetalProperty_get.get(this, "length"); + var len = _emberMetalProperty_get.get(this, 'length'); var added; if (idx >= 0 && idx < len && this[idx] === obj) { return this; // added } added = [obj]; this.enumerableContentWillChange(null, added); - _emberMetalProperty_events.propertyWillChange(this, "lastObject"); + _emberMetalProperty_events.propertyWillChange(this, 'lastObject'); - len = _emberMetalProperty_get.get(this, "length"); + len = _emberMetalProperty_get.get(this, 'length'); this[guid] = len; this[len] = obj; - _emberMetalProperty_set.set(this, "length", len + 1); + _emberMetalProperty_set.set(this, 'length', len + 1); - _emberMetalProperty_events.propertyDidChange(this, "lastObject"); + _emberMetalProperty_events.propertyDidChange(this, 'lastObject'); this.enumerableContentDidChange(null, added); return this; }, // implements Ember.MutableEnumerable removeObject: function (obj) { - if (_emberMetalProperty_get.get(this, "isFrozen")) { + if (_emberMetalProperty_get.get(this, 'isFrozen')) { throw new _emberMetalError["default"](_emberRuntimeMixinsFreezable.FROZEN_ERROR); } if (_emberMetalIs_none["default"](obj)) { return this; // nothing to do } var guid = _emberMetalUtils.guidFor(obj); var idx = this[guid]; - var len = _emberMetalProperty_get.get(this, "length"); + var len = _emberMetalProperty_get.get(this, 'length'); var isFirst = idx === 0; var isLast = idx === len - 1; var last, removed; if (idx >= 0 && idx < len && this[idx] === obj) { removed = [obj]; this.enumerableContentWillChange(removed, null); if (isFirst) { - _emberMetalProperty_events.propertyWillChange(this, "firstObject"); + _emberMetalProperty_events.propertyWillChange(this, 'firstObject'); } if (isLast) { - _emberMetalProperty_events.propertyWillChange(this, "lastObject"); + _emberMetalProperty_events.propertyWillChange(this, 'lastObject'); } // swap items - basically move the item to the end so it can be removed if (idx < len - 1) { last = this[len - 1]; @@ -38563,17 +39103,17 @@ this[_emberMetalUtils.guidFor(last)] = idx; } delete this[guid]; delete this[len - 1]; - _emberMetalProperty_set.set(this, "length", len - 1); + _emberMetalProperty_set.set(this, 'length', len - 1); if (isFirst) { - _emberMetalProperty_events.propertyDidChange(this, "firstObject"); + _emberMetalProperty_events.propertyDidChange(this, 'firstObject'); } if (isLast) { - _emberMetalProperty_events.propertyDidChange(this, "lastObject"); + _emberMetalProperty_events.propertyDidChange(this, 'lastObject'); } this.enumerableContentDidChange(removed, null); } return this; @@ -38585,13 +39125,13 @@ }, copy: function () { var C = this.constructor; var ret = new C(); - var loc = _emberMetalProperty_get.get(this, "length"); + var loc = _emberMetalProperty_get.get(this, 'length'); - _emberMetalProperty_set.set(ret, "length", loc); + _emberMetalProperty_set.set(ret, 'length', loc); while (--loc >= 0) { ret[loc] = this[loc]; ret[_emberMetalUtils.guidFor(this[loc])] = loc; } return ret; @@ -38603,54 +39143,55 @@ var idx; for (idx = 0; idx < len; idx++) { array[idx] = this[idx]; } - return _emberRuntimeSystemString.fmt("Ember.Set<%@>", [array.join(",")]); + return _emberRuntimeSystemString.fmt("Ember.Set<%@>", [array.join(',')]); } }); }); -/** -@module ember -@submodule ember-runtime -*/ // Ember.isNone, Ember.A enifed("ember-runtime/system/string", ["exports", "ember-metal/core", "ember-metal/utils", "ember-runtime/utils", "ember-metal/cache"], function (exports, _emberMetalCore, _emberMetalUtils, _emberRuntimeUtils, _emberMetalCache) { + /** + @module ember + @submodule ember-runtime + */ + "use strict"; var STRING_DASHERIZE_REGEXP = /[ _]/g; var STRING_DASHERIZE_CACHE = new _emberMetalCache["default"](1000, function (key) { - return decamelize(key).replace(STRING_DASHERIZE_REGEXP, "-"); + return decamelize(key).replace(STRING_DASHERIZE_REGEXP, '-'); }); var STRING_CAMELIZE_REGEXP_1 = /(\-|\_|\.|\s)+(.)?/g; var STRING_CAMELIZE_REGEXP_2 = /(^|\/)([A-Z])/g; var CAMELIZE_CACHE = new _emberMetalCache["default"](1000, function (key) { return key.replace(STRING_CAMELIZE_REGEXP_1, function (match, separator, chr) { - return chr ? chr.toUpperCase() : ""; + return chr ? chr.toUpperCase() : ''; }).replace(STRING_CAMELIZE_REGEXP_2, function (match, separator, chr) { return match.toLowerCase(); }); }); var STRING_CLASSIFY_REGEXP_1 = /(\-|\_|\.|\s)+(.)?/g; var STRING_CLASSIFY_REGEXP_2 = /(^|\/|\.)([a-z])/g; var CLASSIFY_CACHE = new _emberMetalCache["default"](1000, function (str) { return str.replace(STRING_CLASSIFY_REGEXP_1, function (match, separator, chr) { - return chr ? chr.toUpperCase() : ""; + return chr ? chr.toUpperCase() : ''; }).replace(STRING_CLASSIFY_REGEXP_2, function (match, separator, chr) { return match.toUpperCase(); }); }); var STRING_UNDERSCORE_REGEXP_1 = /([a-z\d])([A-Z]+)/g; var STRING_UNDERSCORE_REGEXP_2 = /\-|\s+/g; var UNDERSCORE_CACHE = new _emberMetalCache["default"](1000, function (str) { - return str.replace(STRING_UNDERSCORE_REGEXP_1, "$1_$2").replace(STRING_UNDERSCORE_REGEXP_2, "_").toLowerCase(); + return str.replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2').replace(STRING_UNDERSCORE_REGEXP_2, '_').toLowerCase(); }); var STRING_CAPITALIZE_REGEXP = /(^|\/)([a-z])/g; var CAPITALIZE_CACHE = new _emberMetalCache["default"](1000, function (str) { @@ -38660,11 +39201,11 @@ }); var STRING_DECAMELIZE_REGEXP = /([a-z\d])([A-Z])/g; var DECAMELIZE_CACHE = new _emberMetalCache["default"](1000, function (str) { - return str.replace(STRING_DECAMELIZE_REGEXP, "$1_$2").toLowerCase(); + return str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase(); }); function fmt(str, formats) { var cachedFormats = formats; @@ -38679,11 +39220,11 @@ // first, replace any ORDERED replacements. var idx = 0; // the current index for non-numerical replacements return str.replace(/%@([0-9]+)?/g, function (s, argIndex) { argIndex = argIndex ? parseInt(argIndex, 10) - 1 : idx++; s = cachedFormats[argIndex]; - return s === null ? "(null)" : s === undefined ? "" : _emberMetalUtils.inspect(s); + return s === null ? '(null)' : s === undefined ? '' : _emberMetalUtils.inspect(s); }); } function loc(str, formats) { if (!_emberRuntimeUtils.isArray(formats) || arguments.length > 2) { @@ -38912,19 +39453,16 @@ exports.camelize = camelize; exports.classify = classify; exports.underscore = underscore; exports.capitalize = capitalize; }); -/** -@module ember -@submodule ember-runtime -*/ // Ember.STRINGS, Ember.FEATURES enifed("ember-runtime/system/subarray", ["exports", "ember-metal/error", "ember-metal/enumerable_utils"], function (exports, _emberMetalError, _emberMetalEnumerable_utils) { + "use strict"; - var RETAIN = "r"; - var FILTER = "f"; + var RETAIN = 'r'; + var FILTER = 'f'; function Operation(type, count) { this.type = type; this.count = count; } @@ -39091,14 +39629,15 @@ return str.substring(1); } }; }); enifed("ember-runtime/system/tracked_array", ["exports", "ember-metal/property_get", "ember-metal/enumerable_utils"], function (exports, _emberMetalProperty_get, _emberMetalEnumerable_utils) { + "use strict"; - var RETAIN = "r"; - var INSERT = "i"; - var DELETE = "d"; + var RETAIN = 'r'; + var INSERT = 'i'; + var DELETE = 'd'; exports["default"] = TrackedArray; /** An `Ember.TrackedArray` tracks array operations. It's useful when you want to @@ -39114,11 +39653,11 @@ function TrackedArray(items) { if (arguments.length < 1) { items = []; } - var length = _emberMetalProperty_get.get(items, "length"); + var length = _emberMetalProperty_get.get(items, 'length'); if (length) { this._operations = [new ArrayOperation(RETAIN, length, items)]; } else { this._operations = []; @@ -39137,11 +39676,11 @@ @param index @param newItems @private */ addItems: function (index, newItems) { - var count = _emberMetalProperty_get.get(newItems, "length"); + var count = _emberMetalProperty_get.get(newItems, 'length'); if (count < 1) { return; } var match = this._findArrayOperation(index); @@ -39422,10 +39961,12 @@ this.split = split; this.rangeStart = rangeStart; } }); enifed('ember-runtime/utils', ['exports', 'ember-runtime/mixins/array', 'ember-runtime/system/object', 'ember-metal/utils'], function (exports, _emberRuntimeMixinsArray, _emberRuntimeSystemObject, _emberMetalUtils) { + 'use strict'; + exports.isArray = isArray; exports.typeOf = typeOf; // ........................................ // TYPING & ARRAY MESSAGING @@ -39568,43 +40109,50 @@ return ret; } }); enifed("ember-template-compiler", ["exports", "ember-metal/core", "ember-template-compiler/system/precompile", "ember-template-compiler/system/compile", "ember-template-compiler/system/template", "ember-template-compiler/plugins", "ember-template-compiler/plugins/transform-each-in-to-block-params", "ember-template-compiler/plugins/transform-with-as-to-hash", "ember-template-compiler/plugins/transform-bind-attr-to-attributes", "ember-template-compiler/plugins/transform-each-into-collection", "ember-template-compiler/plugins/transform-single-arg-each", "ember-template-compiler/plugins/transform-old-binding-syntax", "ember-template-compiler/plugins/transform-old-class-binding-syntax", "ember-template-compiler/plugins/transform-item-class", "ember-template-compiler/plugins/transform-component-attrs-into-mut", "ember-template-compiler/plugins/transform-component-curly-to-readonly", "ember-template-compiler/plugins/transform-angle-bracket-components", "ember-template-compiler/plugins/transform-input-on-to-onEvent", "ember-template-compiler/plugins/deprecate-view-and-controller-paths", "ember-template-compiler/plugins/deprecate-view-helper", "ember-template-compiler/compat"], function (exports, _emberMetalCore, _emberTemplateCompilerSystemPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate, _emberTemplateCompilerPlugins, _emberTemplateCompilerPluginsTransformEachInToBlockParams, _emberTemplateCompilerPluginsTransformWithAsToHash, _emberTemplateCompilerPluginsTransformBindAttrToAttributes, _emberTemplateCompilerPluginsTransformEachIntoCollection, _emberTemplateCompilerPluginsTransformSingleArgEach, _emberTemplateCompilerPluginsTransformOldBindingSyntax, _emberTemplateCompilerPluginsTransformOldClassBindingSyntax, _emberTemplateCompilerPluginsTransformItemClass, _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut, _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly, _emberTemplateCompilerPluginsTransformAngleBracketComponents, _emberTemplateCompilerPluginsTransformInputOnToOnEvent, _emberTemplateCompilerPluginsDeprecateViewAndControllerPaths, _emberTemplateCompilerPluginsDeprecateViewHelper, _emberTemplateCompilerCompat) { + "use strict"; - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformWithAsToHash["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformEachInToBlockParams["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformBindAttrToAttributes["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformSingleArgEach["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformEachIntoCollection["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformOldBindingSyntax["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformOldClassBindingSyntax["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformItemClass["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformAngleBracketComponents["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsTransformInputOnToOnEvent["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsDeprecateViewAndControllerPaths["default"]); - _emberTemplateCompilerPlugins.registerPlugin("ast", _emberTemplateCompilerPluginsDeprecateViewHelper["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformWithAsToHash["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformEachInToBlockParams["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformBindAttrToAttributes["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformSingleArgEach["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformEachIntoCollection["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldBindingSyntax["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformOldClassBindingSyntax["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformItemClass["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformComponentAttrsIntoMut["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformComponentCurlyToReadonly["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformAngleBracketComponents["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsTransformInputOnToOnEvent["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsDeprecateViewAndControllerPaths["default"]); + _emberTemplateCompilerPlugins.registerPlugin('ast', _emberTemplateCompilerPluginsDeprecateViewHelper["default"]); exports._Ember = _emberMetalCore["default"]; exports.precompile = _emberTemplateCompilerSystemPrecompile["default"]; exports.compile = _emberTemplateCompilerSystemCompile["default"]; exports.template = _emberTemplateCompilerSystemTemplate["default"]; exports.registerPlugin = _emberTemplateCompilerPlugins.registerPlugin; }); // used for adding Ember.Handlebars.compile for backwards compat enifed("ember-template-compiler/compat", ["exports", "ember-metal/core", "ember-template-compiler/compat/precompile", "ember-template-compiler/system/compile", "ember-template-compiler/system/template"], function (exports, _emberMetalCore, _emberTemplateCompilerCompatPrecompile, _emberTemplateCompilerSystemCompile, _emberTemplateCompilerSystemTemplate) { + "use strict"; var EmberHandlebars = _emberMetalCore["default"].Handlebars = _emberMetalCore["default"].Handlebars || {}; EmberHandlebars.precompile = _emberTemplateCompilerCompatPrecompile["default"]; EmberHandlebars.compile = _emberTemplateCompilerSystemCompile["default"]; EmberHandlebars.template = _emberTemplateCompilerSystemTemplate["default"]; }); enifed('ember-template-compiler/compat/precompile', ['exports', 'ember-template-compiler/system/compile_options'], function (exports, _emberTemplateCompilerSystemCompile_options) { + /** + @module ember + @submodule ember-template-compiler + */ + 'use strict'; var compile, compileSpec; exports["default"] = function (string) { if ((!compile || !compileSpec) && Ember.__loader.registry['htmlbars-compiler/compiler']) { @@ -39622,25 +40170,23 @@ var compileFunc = asObject ? compile : compileSpec; return compileFunc(string, _emberTemplateCompilerSystemCompile_options["default"]()); }; }); -/** -@module ember -@submodule ember-template-compiler -*/ enifed('ember-template-compiler/plugins', ['exports'], function (exports) { - exports.registerPlugin = registerPlugin; /** @module ember @submodule ember-template-compiler */ /** @private @property helpers */ + 'use strict'; + + exports.registerPlugin = registerPlugin; var plugins = { ast: [] }; /** @@ -39659,10 +40205,11 @@ } exports["default"] = plugins; }); enifed("ember-template-compiler/plugins/deprecate-view-and-controller-paths", ["exports", "ember-metal/core", "ember-template-compiler/system/calculate-location-display"], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) { + "use strict"; function DeprecateViewAndControllerPaths(options) { // set later within HTMLBars to the syntax package this.syntax = null; this.options = options || {}; @@ -39712,31 +40259,32 @@ deprecatePath(moduleName, node, path); } } function deprecatePath(moduleName, node, path) { - _emberMetalCore["default"].deprecate("Using `{{" + (path && path.type === "PathExpression" && path.parts[0]) + "}}` or any path based on it " + _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc) + "has been deprecated.", function deprecatePath_test() { + _emberMetalCore["default"].deprecate("Using `{{" + (path && path.type === 'PathExpression' && path.parts[0]) + "}}` or any path based on it " + _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc) + "has been deprecated.", function deprecatePath_test() { var noDeprecate = true; - var viewKeyword = path && path.type === "PathExpression" && path.parts && path.parts[0]; - if (viewKeyword === "view") { + var viewKeyword = path && path.type === 'PathExpression' && path.parts && path.parts[0]; + if (viewKeyword === 'view') { noDeprecate = _emberMetalCore["default"].ENV._ENABLE_LEGACY_VIEW_SUPPORT; - } else if (viewKeyword === "controller") { + } else if (viewKeyword === 'controller') { noDeprecate = false; } return noDeprecate; - }, { url: "http://emberjs.com/deprecations/v1.x#toc_view-and-controller-template-keywords", id: path.parts && path.parts[0] === "view" ? "view.keyword.view" : "view.keyword.controller" }); + }, { url: 'http://emberjs.com/deprecations/v1.x#toc_view-and-controller-template-keywords', id: path.parts && path.parts[0] === 'view' ? 'view.keyword.view' : 'view.keyword.controller' }); } function validate(node) { - return node.type === "MustacheStatement" || node.type === "BlockStatement"; + return node.type === 'MustacheStatement' || node.type === 'BlockStatement'; } exports["default"] = DeprecateViewAndControllerPaths; }); enifed("ember-template-compiler/plugins/deprecate-view-helper", ["exports", "ember-metal/core", "ember-template-compiler/system/calculate-location-display"], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) { + "use strict"; function DeprecateViewHelper(options) { // set later within HTMLBars to the syntax package this.syntax = null; this.options = options || {}; @@ -39768,28 +40316,30 @@ function deprecateHelper(moduleName, node) { var paramValue = node.params.length && node.params[0].value; if (!paramValue) { return; - } else if (paramValue === "select") { + } else if (paramValue === 'select') { deprecateSelect(moduleName, node); } else { - _emberMetalCore["default"].deprecate("Using the `{{view \"string\"}}` helper is deprecated. " + _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc), false, { url: "http://emberjs.com/deprecations/v1.x#toc_ember-view", id: "view.helper" }); + _emberMetalCore["default"].deprecate("Using the `{{view \"string\"}}` helper is deprecated. " + _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc), false, { url: 'http://emberjs.com/deprecations/v1.x#toc_ember-view', id: 'view.helper' }); } } function deprecateSelect(moduleName, node) { - _emberMetalCore["default"].deprecate("Using `{{view \"select\"}}` is deprecated. " + _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc), false, { url: "http://emberjs.com/deprecations/v1.x#toc_ember-select", id: "view.helper.select" }); + _emberMetalCore["default"].deprecate("Using `{{view \"select\"}}` is deprecated. " + _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc), false, { url: 'http://emberjs.com/deprecations/v1.x#toc_ember-select', id: 'view.helper.select' }); } function validate(node) { - return (node.type === "MustacheStatement" || node.type === "BlockStatement") && node.path.parts[0] === "view"; + return (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && node.path.parts[0] === 'view'; } exports["default"] = DeprecateViewHelper; }); enifed('ember-template-compiler/plugins/transform-angle-bracket-components', ['exports'], function (exports) { + 'use strict'; + function TransformAngleBracketComponents() { // set later within HTMLBars to the syntax package this.syntax = null; } @@ -39817,11 +40367,17 @@ } exports["default"] = TransformAngleBracketComponents; }); enifed("ember-template-compiler/plugins/transform-bind-attr-to-attributes", ["exports", "ember-metal/core", "ember-template-compiler/system/string", "ember-template-compiler/system/calculate-location-display"], function (exports, _emberMetalCore, _emberTemplateCompilerSystemString, _emberTemplateCompilerSystemCalculateLocationDisplay) { + /** + @module ember + @submodule ember-htmlbars + */ + "use strict"; + /** An HTMLBars AST transformation that replaces all instances of {{bind-attr}} helpers with the equivalent HTMLBars-style bound attributes. For example @@ -39853,11 +40409,11 @@ var plugin = this; var moduleName = this.options.moduleName; var walker = new this.syntax.Walker(); walker.visit(ast, function (node) { - if (node.type === "ElementNode") { + if (node.type === 'ElementNode') { for (var i = 0; i < node.modifiers.length; i++) { var modifier = node.modifiers[i]; if (isBindAttrModifier(modifier, moduleName)) { node.modifiers.splice(i--, 1); @@ -39885,28 +40441,28 @@ }; TransformBindAttrToAttributes.prototype.transformValue = function transformValue(name, value) { var b = this.syntax.builders; - if (name === "class") { + if (name === 'class') { switch (value.type) { - case "StringLiteral": + case 'StringLiteral': return this.parseClasses(value.value); - case "PathExpression": + case 'PathExpression': return this.parseClasses(value.original); - case "SubExpression": + case 'SubExpression': return b.mustache(value.path, value.params, value.hash); default: _emberMetalCore["default"].assert("Unsupported attribute value type: " + value.type); } } else { switch (value.type) { - case "StringLiteral": + case 'StringLiteral': return b.mustache(b.path(value.value)); - case "PathExpression": + case 'PathExpression': return b.mustache(value); - case "SubExpression": + case 'SubExpression': return b.mustache(value.path, value.params, value.hash); default: _emberMetalCore["default"].assert("Unsupported attribute value type: " + value.type); } } @@ -39914,15 +40470,15 @@ TransformBindAttrToAttributes.prototype.parseClasses = function parseClasses(value) { var b = this.syntax.builders; var concat = b.concat(); - var classes = value.split(" "); + var classes = value.split(' '); for (var i = 0; i < classes.length; i++) { if (i > 0) { - concat.parts.push(b.string(" ")); + concat.parts.push(b.string(' ')); } var concatPart = this.parseClass(classes[i]); concat.parts.push(concatPart); } @@ -39931,44 +40487,44 @@ }; TransformBindAttrToAttributes.prototype.parseClass = function parseClass(value) { var b = this.syntax.builders; - var parts = value.split(":"); + var parts = value.split(':'); switch (parts.length) { case 1: // Before: {{bind-attr class="view.fooBar ..."}} // After: class="{{-bind-attr-class view.fooBar "foo-bar"}} ..." - return b.sexpr(b.path("-bind-attr-class"), [b.path(parts[0]), b.string(dasherizeLastKey(parts[0]))]); + return b.sexpr(b.path('-bind-attr-class'), [b.path(parts[0]), b.string(dasherizeLastKey(parts[0]))]); case 2: - if (parts[0] === "") { + if (parts[0] === '') { // Before: {{bind-attr class=":foo ..."}} // After: class="foo ..." return b.string(parts[1]); } else { // Before: {{bind-attr class="some.path:foo ..."}} // After: class="{{if some.path "foo" ""}} ..." - return b.sexpr(b.path("if"), [b.path(parts[0]), b.string(parts[1]), b.string("")]); + return b.sexpr(b.path('if'), [b.path(parts[0]), b.string(parts[1]), b.string('')]); } break; case 3: // Before: {{bind-attr class="some.path:foo:bar ..."}} // After: class="{{if some.path "foo" "bar"}} ..." - return b.sexpr(b.path("if"), [b.path(parts[0]), b.string(parts[1]), b.string(parts[2])]); + return b.sexpr(b.path('if'), [b.path(parts[0]), b.string(parts[1]), b.string(parts[2])]); default: _emberMetalCore["default"].assert("Unsupported bind-attr class syntax: `" + value + "`"); } }; function isBindAttrModifier(modifier, moduleName) { var name = modifier.path.original; var moduleInfo = _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, modifier.path.loc); - if (name === "bind-attr" || name === "bindAttr") { - _emberMetalCore["default"].deprecate("The `" + name + "` helper " + moduleInfo + "is deprecated in favor of " + "HTMLBars-style bound attributes."); + if (name === 'bind-attr' || name === 'bindAttr') { + _emberMetalCore["default"].deprecate('The `' + name + '` helper ' + moduleInfo + 'is deprecated in favor of ' + 'HTMLBars-style bound attributes.'); return true; } else { return false; } } @@ -39976,33 +40532,30 @@ function assertAttrNameIsUnused(element, name) { for (var i = 0; i < element.attributes.length; i++) { var attr = element.attributes[i]; if (attr.name === name) { - if (name === "class") { - _emberMetalCore["default"].assert("You cannot set `class` manually and via `{{bind-attr}}` helper " + "on the same element. Please use `{{bind-attr}}`'s `:static-class` " + "syntax instead."); + if (name === 'class') { + _emberMetalCore["default"].assert('You cannot set `class` manually and via `{{bind-attr}}` helper ' + 'on the same element. Please use `{{bind-attr}}`\'s `:static-class` ' + 'syntax instead.'); } else { - _emberMetalCore["default"].assert("You cannot set `" + name + "` manually and via `{{bind-attr}}` " + "helper on the same element."); + _emberMetalCore["default"].assert('You cannot set `' + name + '` manually and via `{{bind-attr}}` ' + 'helper on the same element.'); } } } } function dasherizeLastKey(path) { - var parts = path.split("."); + var parts = path.split('.'); return _emberTemplateCompilerSystemString.dasherize(parts[parts.length - 1]); } exports["default"] = TransformBindAttrToAttributes; }); -/** -@module ember -@submodule ember-htmlbars -*/ - // Ember.assert enifed('ember-template-compiler/plugins/transform-component-attrs-into-mut', ['exports'], function (exports) { + 'use strict'; + function TransformComponentAttrsIntoMut() { // set later within HTMLBars to the syntax package this.syntax = null; } @@ -40043,10 +40596,12 @@ } exports["default"] = TransformComponentAttrsIntoMut; }); enifed('ember-template-compiler/plugins/transform-component-curly-to-readonly', ['exports'], function (exports) { + 'use strict'; + function TransformComponentCurlyToReadonly() { // set later within HTMLBars to the syntax package this.syntax = null; } @@ -40090,10 +40645,12 @@ } exports["default"] = TransformComponentCurlyToReadonly; }); enifed("ember-template-compiler/plugins/transform-each-in-to-block-params", ["exports", "ember-metal/core", "ember-template-compiler/system/calculate-location-display"], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) { + "use strict"; + /** @module ember @submodule ember-htmlbars */ @@ -40136,33 +40693,33 @@ var removedParams = node.params.splice(0, 2); var keyword = removedParams[0].original; var moduleInfo = undefined; - if (node.type === "BlockStatement") { + if (node.type === 'BlockStatement') { moduleInfo = _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.program.loc); if (node.program.blockParams.length) { - throw new Error("You cannot use keyword (`{{#each foo in bar}}`) and block params (`{{#each bar as |foo|}}`) at the same time " + moduleInfo + "."); + throw new Error('You cannot use keyword (`{{#each foo in bar}}`) and block params (`{{#each bar as |foo|}}`) at the same time ' + moduleInfo + '.'); } node.program.blockParams = [keyword]; } else { moduleInfo = _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc); - node.hash.pairs.push(b.pair("keyword", b.string(keyword))); + node.hash.pairs.push(b.pair('keyword', b.string(keyword))); } - _emberMetalCore["default"].deprecate("Using the '{{#each item in model}}' form of the {{#each}} helper " + moduleInfo + "is deprecated. " + "Please use the block param form instead ('{{#each model as |item|}}').", false, { url: "http://emberjs.com/guides/deprecations/#toc_code-in-code-syntax-for-code-each-code" }); + _emberMetalCore["default"].deprecate("Using the '{{#each item in model}}' form of the {{#each}} helper " + moduleInfo + "is deprecated. " + "Please use the block param form instead ('{{#each model as |item|}}').", false, { url: 'http://emberjs.com/guides/deprecations/#toc_code-in-code-syntax-for-code-each-code' }); } }); return ast; }; function validate(node) { - return (node.type === "BlockStatement" || node.type === "MustacheStatement") && node.path.original === "each" && node.params.length === 3 && node.params[1].type === "PathExpression" && node.params[1].original === "in"; + return (node.type === 'BlockStatement' || node.type === 'MustacheStatement') && node.path.original === 'each' && node.params.length === 3 && node.params[1].type === 'PathExpression' && node.params[1].original === 'in'; } exports["default"] = TransformEachInToBlockParams; }); enifed('ember-template-compiler/plugins/transform-each-in-to-hash', ['exports'], function (exports) { @@ -40187,10 +40744,12 @@ ``` @class TransformEachInToHash @private */ + 'use strict'; + function TransformEachInToHash(options) { // set later within HTMLBars to the syntax package this.syntax = null; this.options = options || {}; } @@ -40232,10 +40791,12 @@ }; exports["default"] = TransformEachInToHash; }); enifed('ember-template-compiler/plugins/transform-each-into-collection', ['exports', 'ember-metal/core', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) { + 'use strict'; + exports["default"] = TransformEachIntoCollection; function TransformEachIntoCollection(options) { this.options = options; this.syntax = null; @@ -40294,10 +40855,11 @@ return false; } }); enifed("ember-template-compiler/plugins/transform-input-on-to-onEvent", ["exports", "ember-metal/core", "ember-template-compiler/system/calculate-location-display"], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) { + "use strict"; /** @module ember @submodule ember-htmlbars */ @@ -40337,20 +40899,20 @@ var walker = new pluginContext.syntax.Walker(); var moduleName = pluginContext.options.moduleName; walker.visit(ast, function (node) { if (pluginContext.validate(node)) { - var action = hashPairForKey(node.hash, "action"); - var on = hashPairForKey(node.hash, "on"); - var onEvent = hashPairForKey(node.hash, "onEvent"); + var action = hashPairForKey(node.hash, 'action'); + var on = hashPairForKey(node.hash, 'on'); + var onEvent = hashPairForKey(node.hash, 'onEvent'); var normalizedOn = on || onEvent; var moduleInfo = _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.loc); - if (normalizedOn && normalizedOn.value.type !== "StringLiteral") { + if (normalizedOn && normalizedOn.value.type !== 'StringLiteral') { _emberMetalCore["default"].deprecate("Using a dynamic value for '#{normalizedOn.key}=' with the '{{input}}' helper " + moduleInfo + "is deprecated."); - normalizedOn.key = "onEvent"; + normalizedOn.key = 'onEvent'; return; // exit early, as we cannot transform further } removeFromHash(node.hash, normalizedOn); removeFromHash(node.hash, action); @@ -40359,33 +40921,33 @@ _emberMetalCore["default"].deprecate("Using '{{input " + normalizedOn.key + "=\"" + normalizedOn.value.value + "\" ...}}' without specifying an action " + moduleInfo + "will do nothing."); return; // exit early, if no action was available there is nothing to do } - var specifiedOn = normalizedOn ? normalizedOn.key + "=\"" + normalizedOn.value.value + "\" " : ""; - if (normalizedOn && normalizedOn.value.value === "keyPress") { + var specifiedOn = normalizedOn ? normalizedOn.key + "=\"" + normalizedOn.value.value + "\" " : ''; + if (normalizedOn && normalizedOn.value.value === 'keyPress') { // using `keyPress` in the root of the component will // clobber the keyPress event handler - normalizedOn.value.value = "key-press"; + normalizedOn.value.value = 'key-press'; } - var expected = (normalizedOn ? normalizedOn.value.value : "enter") + "=\"" + action.value.original + "\""; + var expected = (normalizedOn ? normalizedOn.value.value : 'enter') + "=\"" + action.value.original + "\""; _emberMetalCore["default"].deprecate("Using '{{input " + specifiedOn + "action=\"" + action.value.original + "\"}}' " + moduleInfo + "is deprecated. Please use '{{input " + expected + "}}' instead."); if (!normalizedOn) { - normalizedOn = b.pair("onEvent", b.string("enter")); + normalizedOn = b.pair('onEvent', b.string('enter')); } node.hash.pairs.push(b.pair(normalizedOn.value.value, action.value)); } }); return ast; }; TransformInputOnToOnEvent.prototype.validate = function TransformWithAsToHash_validate(node) { - return node.type === "MustacheStatement" && node.path.original === "input" && (hashPairForKey(node.hash, "action") || hashPairForKey(node.hash, "on") || hashPairForKey(node.hash, "onEvent")); + return node.type === 'MustacheStatement' && node.path.original === 'input' && (hashPairForKey(node.hash, 'action') || hashPairForKey(node.hash, 'on') || hashPairForKey(node.hash, 'onEvent')); }; function hashPairForKey(hash, key) { for (var i = 0, l = hash.pairs.length; i < l; i++) { var pair = hash.pairs[i]; @@ -40411,10 +40973,12 @@ } exports["default"] = TransformInputOnToOnEvent; }); enifed('ember-template-compiler/plugins/transform-item-class', ['exports'], function (exports) { + 'use strict'; + exports["default"] = TransformItemClass; function TransformItemClass() { this.syntax = null; } @@ -40462,10 +41026,12 @@ callback(list[i]); } } }); enifed('ember-template-compiler/plugins/transform-old-binding-syntax', ['exports', 'ember-metal/core', 'ember-template-compiler/system/calculate-location-display'], function (exports, _emberMetalCore, _emberTemplateCompilerSystemCalculateLocationDisplay) { + 'use strict'; + exports["default"] = TransformOldBindingSyntax; function TransformOldBindingSyntax(options) { this.syntax = null; this.options = options; @@ -40527,10 +41093,12 @@ return expr.original; } } }); enifed('ember-template-compiler/plugins/transform-old-class-binding-syntax', ['exports'], function (exports) { + 'use strict'; + exports["default"] = TransformOldClassBindingSyntax; function TransformOldClassBindingSyntax(options) { this.syntax = null; this.options = options; @@ -40665,10 +41233,12 @@ return segments; } }); enifed('ember-template-compiler/plugins/transform-single-arg-each', ['exports'], function (exports) { + 'use strict'; + exports["default"] = TransformSingleArgEach; function TransformSingleArgEach() { this.syntax = null; } @@ -40691,11 +41261,17 @@ function validate(node) { return (node.type === 'BlockStatement' || node.type === 'MustacheStatement') && node.path.original === 'each' && node.params.length === 0; } }); enifed("ember-template-compiler/plugins/transform-with-as-to-hash", ["exports", "ember-template-compiler/system/calculate-location-display"], function (exports, _emberTemplateCompilerSystemCalculateLocationDisplay) { + /** + @module ember + @submodule ember-htmlbars + */ + "use strict"; + /** An HTMLBars AST transformation that replaces all instances of ```handlebars {{#with foo.bar as bar}} @@ -40730,11 +41306,11 @@ walker.visit(ast, function (node) { if (pluginContext.validate(node)) { if (node.program && node.program.blockParams.length) { - throw new Error("You cannot use keyword (`{{with foo as bar}}`) and block params (`{{with foo as |bar|}}`) at the same time."); + throw new Error('You cannot use keyword (`{{with foo as bar}}`) and block params (`{{with foo as |bar|}}`) at the same time.'); } var moduleInfo = _emberTemplateCompilerSystemCalculateLocationDisplay["default"](moduleName, node.program.loc); Ember.deprecate("Using {{with}} without block syntax " + moduleInfo + "is deprecated. " + "Please use standard block form (`{{#with foo as |bar|}}`) " + "instead.", false, { url: "http://emberjs.com/deprecations/v1.x/#toc_code-as-code-sytnax-for-code-with-code" }); @@ -40747,20 +41323,18 @@ return ast; }; TransformWithAsToHash.prototype.validate = function TransformWithAsToHash_validate(node) { - return node.type === "BlockStatement" && node.path.original === "with" && node.params.length === 3 && node.params[1].type === "PathExpression" && node.params[1].original === "as"; + return node.type === 'BlockStatement' && node.path.original === 'with' && node.params.length === 3 && node.params[1].type === 'PathExpression' && node.params[1].original === 'as'; }; exports["default"] = TransformWithAsToHash; }); -/** -@module ember -@submodule ember-htmlbars -*/ enifed('ember-template-compiler/system/calculate-location-display', ['exports'], function (exports) { + 'use strict'; + exports["default"] = calculateLocationDisplay; function calculateLocationDisplay(moduleName, _loc) { var loc = _loc || {}; @@ -40793,10 +41367,12 @@ /** @module ember @submodule ember-template-compiler */ + "use strict"; + var compile; /** Uses HTMLBars `compile` function to process a string into a compiled template. @@ -40807,25 +41383,31 @@ @param {String} templateString This is the string to be compiled by HTMLBars. @param {Object} options This is an options hash to augment the compiler options. */ exports["default"] = function (templateString, options) { - if (!compile && Ember.__loader.registry["htmlbars-compiler/compiler"]) { - compile = requireModule("htmlbars-compiler/compiler").compile; + if (!compile && Ember.__loader.registry['htmlbars-compiler/compiler']) { + compile = requireModule('htmlbars-compiler/compiler').compile; } if (!compile) { - throw new Error("Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`."); + throw new Error('Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`.'); } var templateSpec = compile(templateString, _emberTemplateCompilerSystemCompile_options["default"](options)); return _emberTemplateCompilerSystemTemplate["default"](templateSpec); }; }); enifed("ember-template-compiler/system/compile_options", ["exports", "ember-metal/core", "ember-metal/merge", "ember-template-compiler/plugins"], function (exports, _emberMetalCore, _emberMetalMerge, _emberTemplateCompilerPlugins) { + /** + @module ember + @submodule ember-template-compiler + */ + "use strict"; + /** @private @property compileOptions */ @@ -40853,24 +41435,27 @@ } options.plugins = plugins; options.buildMeta = function buildMeta(program) { return { - revision: "Ember@1.13.5", + revision: 'Ember@1.13.6', loc: program.loc, moduleName: options.moduleName }; }; return options; }; }); -/** -@module ember -@submodule ember-template-compiler -*/ enifed('ember-template-compiler/system/precompile', ['exports', 'ember-template-compiler/system/compile_options'], function (exports, _emberTemplateCompilerSystemCompile_options) { + /** + @module ember + @submodule ember-template-compiler + */ + + 'use strict'; + var compileSpec; /** Uses HTMLBars `compile` function to process a string into a compiled template string. The returned string must be passed through `Ember.HTMLBars.template`. @@ -40892,24 +41477,22 @@ } return compileSpec(templateString, _emberTemplateCompilerSystemCompile_options["default"](options)); }; }); -/** -@module ember -@submodule ember-template-compiler -*/ enifed('ember-template-compiler/system/string', ['exports'], function (exports) { - exports.decamelize = decamelize; - exports.dasherize = dasherize; /** @module ember @submodule ember-template-compiler */ // This module is duplicated from ember-runtime to support bind-attr. + 'use strict'; + + exports.decamelize = decamelize; + exports.dasherize = dasherize; var STRING_DECAMELIZE_REGEXP = /([a-z\d])([A-Z])/g; var STRING_DASHERIZE_REGEXP = /[ _]/g; function decamelize(str) { return str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase(); @@ -40918,10 +41501,11 @@ function dasherize(str) { return decamelize(str).replace(STRING_DASHERIZE_REGEXP, '-'); } }); enifed("ember-template-compiler/system/template", ["exports", "htmlbars-runtime/hooks"], function (exports, _htmlbarsRuntimeHooks) { + "use strict"; /** @module ember @submodule ember-template-compiler */ @@ -40945,10 +41529,12 @@ return templateSpec; }; }); enifed("ember-testing", ["exports", "ember-metal/core", "ember-testing/initializers", "ember-testing/support", "ember-testing/setup_for_testing", "ember-testing/test", "ember-testing/adapters/adapter", "ember-testing/adapters/qunit", "ember-testing/helpers"], function (exports, _emberMetalCore, _emberTestingInitializers, _emberTestingSupport, _emberTestingSetup_for_testing, _emberTestingTest, _emberTestingAdaptersAdapter, _emberTestingAdaptersQunit, _emberTestingHelpers) { + "use strict"; + // adds helpers to helpers object in Test /** @module ember @submodule ember-testing @@ -40960,10 +41546,11 @@ _emberMetalCore["default"].setupForTesting = _emberTestingSetup_for_testing["default"]; }); // to setup initializer // to handle various edge cases enifed("ember-testing/adapters/adapter", ["exports", "ember-runtime/system/object"], function (exports, _emberRuntimeSystemObject) { + "use strict"; function K() { return this; } @@ -41017,10 +41604,11 @@ }); exports["default"] = Adapter; }); enifed("ember-testing/adapters/qunit", ["exports", "ember-testing/adapters/adapter", "ember-metal/utils"], function (exports, _emberTestingAdaptersAdapter, _emberMetalUtils) { + "use strict"; /** This class implements the methods defined by Ember.Test.Adapter for the QUnit testing framework. @@ -41040,115 +41628,116 @@ ok(false, _emberMetalUtils.inspect(error)); } }); }); enifed("ember-testing/helpers", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/error", "ember-metal/run_loop", "ember-views/system/jquery", "ember-testing/test", "ember-runtime/ext/rsvp"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalError, _emberMetalRun_loop, _emberViewsSystemJquery, _emberTestingTest, _emberRuntimeExtRsvp) { + "use strict"; /** @module ember @submodule ember-testing */ var helper = _emberTestingTest["default"].registerHelper; var asyncHelper = _emberTestingTest["default"].registerAsyncHelper; function currentRouteName(app) { - var appController = app.__container__.lookup("controller:application"); + var appController = app.__container__.lookup('controller:application'); - return _emberMetalProperty_get.get(appController, "currentRouteName"); + return _emberMetalProperty_get.get(appController, 'currentRouteName'); } function currentPath(app) { - var appController = app.__container__.lookup("controller:application"); + var appController = app.__container__.lookup('controller:application'); - return _emberMetalProperty_get.get(appController, "currentPath"); + return _emberMetalProperty_get.get(appController, 'currentPath'); } function currentURL(app) { - var router = app.__container__.lookup("router:main"); + var router = app.__container__.lookup('router:main'); - return _emberMetalProperty_get.get(router, "location").getURL(); + return _emberMetalProperty_get.get(router, 'location').getURL(); } function pauseTest() { _emberTestingTest["default"].adapter.asyncStart(); - return new _emberMetalCore["default"].RSVP.Promise(function () {}, "TestAdapter paused promise"); + return new _emberMetalCore["default"].RSVP.Promise(function () {}, 'TestAdapter paused promise'); } function focus(el) { - if (el && el.is(":input, [contenteditable=true]")) { - var type = el.prop("type"); - if (type !== "checkbox" && type !== "radio" && type !== "hidden") { + if (el && el.is(':input, [contenteditable=true]')) { + var type = el.prop('type'); + if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') { _emberMetalRun_loop["default"](el, function () { // Firefox does not trigger the `focusin` event if the window // does not have focus. If the document doesn't have focus just // use trigger('focusin') instead. if (!document.hasFocus || document.hasFocus()) { this.focus(); } else { - this.trigger("focusin"); + this.trigger('focusin'); } }); } } } function visit(app, url) { - var router = app.__container__.lookup("router:main"); + var router = app.__container__.lookup('router:main'); var shouldHandleURL = false; app.boot().then(function () { router.location.setURL(url); if (shouldHandleURL) { - _emberMetalRun_loop["default"](app.__deprecatedInstance__, "handleURL", url); + _emberMetalRun_loop["default"](app.__deprecatedInstance__, 'handleURL', url); } }); if (app._readinessDeferrals > 0) { - router["initialURL"] = url; - _emberMetalRun_loop["default"](app, "advanceReadiness"); - delete router["initialURL"]; + router['initialURL'] = url; + _emberMetalRun_loop["default"](app, 'advanceReadiness'); + delete router['initialURL']; } else { shouldHandleURL = true; } return app.testHelpers.wait(); } function click(app, selector, context) { var $el = app.testHelpers.findWithAssert(selector, context); - _emberMetalRun_loop["default"]($el, "mousedown"); + _emberMetalRun_loop["default"]($el, 'mousedown'); focus($el); - _emberMetalRun_loop["default"]($el, "mouseup"); - _emberMetalRun_loop["default"]($el, "click"); + _emberMetalRun_loop["default"]($el, 'mouseup'); + _emberMetalRun_loop["default"]($el, 'click'); return app.testHelpers.wait(); } function check(app, selector, context) { var $el = app.testHelpers.findWithAssert(selector, context); - var type = $el.prop("type"); + var type = $el.prop('type'); - _emberMetalCore["default"].assert("To check '" + selector + "', the input must be a checkbox", type === "checkbox"); + _emberMetalCore["default"].assert('To check \'' + selector + '\', the input must be a checkbox', type === 'checkbox'); - if (!$el.prop("checked")) { + if (!$el.prop('checked')) { app.testHelpers.click(selector, context); } return app.testHelpers.wait(); } function uncheck(app, selector, context) { var $el = app.testHelpers.findWithAssert(selector, context); - var type = $el.prop("type"); + var type = $el.prop('type'); - _emberMetalCore["default"].assert("To uncheck '" + selector + "', the input must be a checkbox", type === "checkbox"); + _emberMetalCore["default"].assert('To uncheck \'' + selector + '\', the input must be a checkbox', type === 'checkbox'); - if ($el.prop("checked")) { + if ($el.prop('checked')) { app.testHelpers.click(selector, context); } return app.testHelpers.wait(); } @@ -41186,19 +41775,19 @@ var $el = app.testHelpers.findWithAssert(selector, context); var event = _emberViewsSystemJquery["default"].Event(type, options); - _emberMetalRun_loop["default"]($el, "trigger", event); + _emberMetalRun_loop["default"]($el, 'trigger', event); return app.testHelpers.wait(); } function keyEvent(app, selector, contextOrType, typeOrKeyCode, keyCode) { var context, type; - if (typeof keyCode === "undefined") { + if (typeof keyCode === 'undefined') { context = null; keyCode = typeOrKeyCode; type = contextOrType; } else { context = contextOrType; @@ -41208,11 +41797,11 @@ return app.testHelpers.triggerEvent(selector, context, type, { keyCode: keyCode, which: keyCode }); } function fillIn(app, selector, contextOrText, text) { var $el, context; - if (typeof text === "undefined") { + if (typeof text === 'undefined') { text = contextOrText; } else { context = contextOrText; } $el = app.testHelpers.findWithAssert(selector, context); @@ -41231,11 +41820,11 @@ return $el; } function find(app, selector, context) { var $el; - context = context || _emberMetalProperty_get.get(app, "rootElement"); + context = context || _emberMetalProperty_get.get(app, 'rootElement'); $el = app.$(selector, context); return $el; } @@ -41245,11 +41834,11 @@ function wait(app, value) { return new _emberRuntimeExtRsvp["default"].Promise(function (resolve) { // Every 10ms, poll for the async thing to have finished var watcher = setInterval(function () { - var router = app.__container__.lookup("router:main"); + var router = app.__container__.lookup('router:main'); // 1. If the router is loading, keep polling var routerIsLoading = router.router && !!router.router.activeTransition; if (routerIsLoading) { return; @@ -41296,11 +41885,11 @@ @method visit @param {String} url the name of the route @return {RSVP.Promise} @public */ - asyncHelper("visit", visit); + asyncHelper('visit', visit); /** Clicks an element and triggers any actions triggered by the element's `click` event. @@ -41315,11 +41904,11 @@ @method click @param {String} selector jQuery selector for finding element on the DOM @return {RSVP.Promise} @public */ - asyncHelper("click", click); + asyncHelper('click', click); /** Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode Example: @@ -41336,11 +41925,11 @@ @param {Number} keyCode the keyCode of the simulated key event @return {RSVP.Promise} @since 1.5.0 @public */ - asyncHelper("keyEvent", keyEvent); + asyncHelper('keyEvent', keyEvent); /** Fills in an input element with some text. Example: @@ -41356,11 +41945,11 @@ to fill text with @param {String} text text to place inside the input element @return {RSVP.Promise} @public */ - asyncHelper("fillIn", fillIn); + asyncHelper('fillIn', fillIn); /** Finds an element in the context of the app's container element. A simple alias for `app.$(selector)`. @@ -41373,11 +41962,11 @@ @method find @param {String} selector jQuery string selector for element lookup @return {Object} jQuery object representing the results of the query @public */ - helper("find", find); + helper('find', find); /** Like `find`, but throws an error if the element selector returns no results. Example: @@ -41391,11 +41980,11 @@ the DOM @return {Object} jQuery object representing the results of the query @throws {Error} throws error if jQuery object returned has a length of 0 @public */ - helper("findWithAssert", findWithAssert); + helper('findWithAssert', findWithAssert); /** Causes the run loop to process any pending events. This is used to ensure that any async operations from other helpers (or your assertions) have been processed. @@ -41417,12 +42006,12 @@ @method wait @param {Object} value The value to be returned. @return {RSVP.Promise} @public */ - asyncHelper("wait", wait); - asyncHelper("andThen", andThen); + asyncHelper('wait', wait); + asyncHelper('andThen', andThen); /** Returns the currently active route name. Example: @@ -41438,11 +42027,11 @@ @method currentRouteName @return {Object} The name of the currently active route. @since 1.5.0 @public */ - helper("currentRouteName", currentRouteName); + helper('currentRouteName', currentRouteName); /** Returns the current path. Example: @@ -41458,11 +42047,11 @@ @method currentPath @return {Object} The currently active path. @since 1.5.0 @public */ - helper("currentPath", currentPath); + helper('currentPath', currentPath); /** Returns the current URL. Example: @@ -41478,11 +42067,11 @@ @method currentURL @return {Object} The currently active URL. @since 1.5.0 @public */ - helper("currentURL", currentURL); + helper('currentURL', currentURL); /** Pauses the current test - this is useful for debugging while testing or for test-driving. It allows you to inspect the state of your application at any point. @@ -41498,11 +42087,11 @@ @since 1.9.0 @method pauseTest @return {Object} A promise that will never resolve @public */ - helper("pauseTest", pauseTest); + helper('pauseTest', pauseTest); /** Triggers the given DOM event on the element identified by the provided selector. Example: @@ -41525,13 +42114,14 @@ @param {Object} [options] The options to be passed to jQuery.Event. @return {RSVP.Promise} @since 1.5.0 @public */ - asyncHelper("triggerEvent", triggerEvent); + asyncHelper('triggerEvent', triggerEvent); }); enifed('ember-testing/initializers', ['exports', 'ember-runtime/system/lazy_load'], function (exports, _emberRuntimeSystemLazy_load) { + 'use strict'; var name = 'deferReadiness in `testing` mode'; _emberRuntimeSystemLazy_load.onLoad('Ember.Application', function (Application) { if (!Application.initializers[name]) { @@ -41546,10 +42136,12 @@ }); } }); }); enifed("ember-testing/setup_for_testing", ["exports", "ember-metal/core", "ember-testing/adapters/qunit", "ember-views/system/jquery"], function (exports, _emberMetalCore, _emberTestingAdaptersQunit, _emberViewsSystemJquery) { + "use strict"; + exports["default"] = setupForTesting; var Test, requests; function incrementAjaxPendingRequests(_, xhr) { @@ -41579,11 +42171,11 @@ @private */ function setupForTesting() { if (!Test) { - Test = requireModule("ember-testing/test")["default"]; + Test = requireModule('ember-testing/test')['default']; } _emberMetalCore["default"].testing = true; // if adapter is not manually set default to QUnit @@ -41592,19 +42184,20 @@ } requests = []; Test.pendingAjaxRequests = requests.length; - _emberViewsSystemJquery["default"](document).off("ajaxSend", incrementAjaxPendingRequests); - _emberViewsSystemJquery["default"](document).off("ajaxComplete", decrementAjaxPendingRequests); - _emberViewsSystemJquery["default"](document).on("ajaxSend", incrementAjaxPendingRequests); - _emberViewsSystemJquery["default"](document).on("ajaxComplete", decrementAjaxPendingRequests); + _emberViewsSystemJquery["default"](document).off('ajaxSend', incrementAjaxPendingRequests); + _emberViewsSystemJquery["default"](document).off('ajaxComplete', decrementAjaxPendingRequests); + _emberViewsSystemJquery["default"](document).on('ajaxSend', incrementAjaxPendingRequests); + _emberViewsSystemJquery["default"](document).on('ajaxComplete', decrementAjaxPendingRequests); } }); // import Test from "ember-testing/test"; // ES6TODO: fix when cycles are supported enifed("ember-testing/support", ["exports", "ember-metal/core", "ember-views/system/jquery", "ember-metal/environment"], function (exports, _emberMetalCore, _emberViewsSystemJquery, _emberMetalEnvironment) { + "use strict"; /** @module ember @submodule ember-testing */ @@ -41618,11 +42211,11 @@ @private @method testCheckboxClick */ function testCheckboxClick(handler) { - $("<input type=\"checkbox\">").css({ position: "absolute", left: "-1000px", top: "-1000px" }).appendTo("body").on("click", handler).trigger("click").remove(); + $('<input type="checkbox">').css({ position: 'absolute', left: '-1000px', top: '-1000px' }).appendTo('body').on('click', handler).trigger('click').remove(); } if (_emberMetalEnvironment["default"].hasDOM) { $(function () { /* @@ -41652,10 +42245,11 @@ }); }); } }); enifed("ember-testing/test", ["exports", "ember-metal/core", "ember-metal/run_loop", "ember-metal/platform/create", "ember-runtime/ext/rsvp", "ember-testing/setup_for_testing", "ember-application/system/application"], function (exports, _emberMetalCore, _emberMetalRun_loop, _emberMetalPlatformCreate, _emberRuntimeExtRsvp, _emberTestingSetup_for_testing, _emberApplicationSystemApplication) { + "use strict"; /** @module ember @submodule ember-testing */ @@ -41991,11 +42585,11 @@ _emberTestingSetup_for_testing["default"](); this.testing = true; this.Router.reopen({ - location: "none" + location: 'none' }); }, /** This will be used as the container to inject the test helpers into. By @@ -42028,10 +42622,17 @@ this.helperContainer = helperContainer; } else { this.helperContainer = window; } + this.reopen({ + willDestroy: function () { + this._super.apply(this, arguments); + this.removeTestHelpers(); + } + }); + this.testHelpers = {}; for (var name in helpers) { this.originalMethods[name] = this.helperContainer[name]; this.testHelpers[name] = this.helperContainer[name] = helper(this, name); protoWrap(Test.Promise.prototype, name, helper(this, name), helpers[name].meta.wait); @@ -42057,10 +42658,11 @@ return; } for (var name in helpers) { this.helperContainer[name] = this.originalMethods[name]; + delete Test.Promise.prototype[name]; delete this.testHelpers[name]; delete this.originalMethods[name]; } } }); @@ -42134,11 +42736,18 @@ } exports["default"] = Test; }); enifed("ember-views", ["exports", "ember-runtime", "ember-views/system/jquery", "ember-views/system/utils", "ember-views/compat/render_buffer", "ember-views/system/ext", "ember-views/views/states", "ember-metal-views/renderer", "ember-views/views/core_view", "ember-views/views/view", "ember-views/views/container_view", "ember-views/views/collection_view", "ember-views/views/component", "ember-views/system/event_dispatcher", "ember-views/mixins/view_target_action_support", "ember-views/component_lookup", "ember-views/views/checkbox", "ember-views/mixins/text_support", "ember-views/views/text_field", "ember-views/views/text_area", "ember-views/views/select", "ember-views/compat/metamorph_view", "ember-views/views/legacy_each_view"], function (exports, _emberRuntime, _emberViewsSystemJquery, _emberViewsSystemUtils, _emberViewsCompatRender_buffer, _emberViewsSystemExt, _emberViewsViewsStates, _emberMetalViewsRenderer, _emberViewsViewsCore_view, _emberViewsViewsView, _emberViewsViewsContainer_view, _emberViewsViewsCollection_view, _emberViewsViewsComponent, _emberViewsSystemEvent_dispatcher, _emberViewsMixinsView_target_action_support, _emberViewsComponent_lookup, _emberViewsViewsCheckbox, _emberViewsMixinsText_support, _emberViewsViewsText_field, _emberViewsViewsText_area, _emberViewsViewsSelect, _emberViewsCompatMetamorph_view, _emberViewsViewsLegacy_each_view) { + /** + @module ember + @submodule ember-views + */ + // BEGIN IMPORTS + "use strict"; + // END IMPORTS /** Alias for jQuery @@ -42156,47 +42765,43 @@ var ViewUtils = _emberRuntime["default"].ViewUtils = {}; ViewUtils.isSimpleClick = _emberViewsSystemUtils.isSimpleClick; ViewUtils.getViewClientRects = _emberViewsSystemUtils.getViewClientRects; ViewUtils.getViewBoundingClientRect = _emberViewsSystemUtils.getViewBoundingClientRect; - _emberRuntime["default"].CoreView = _emberViewsViewsCore_view.DeprecatedCoreView; _emberRuntime["default"].View = _emberViewsViewsView.DeprecatedView; _emberRuntime["default"].View.states = _emberViewsViewsStates.states; _emberRuntime["default"].View.cloneStates = _emberViewsViewsStates.cloneStates; _emberRuntime["default"].View._Renderer = _emberMetalViewsRenderer["default"]; _emberRuntime["default"].Checkbox = _emberViewsViewsCheckbox["default"]; _emberRuntime["default"].TextField = _emberViewsViewsText_field["default"]; _emberRuntime["default"].TextArea = _emberViewsViewsText_area["default"]; - _emberRuntime["default"].Select = _emberViewsViewsSelect.DeprecatedSelect; _emberRuntime["default"].SelectOption = _emberViewsViewsSelect.SelectOption; _emberRuntime["default"].SelectOptgroup = _emberViewsViewsSelect.SelectOptgroup; _emberRuntime["default"].TextSupport = _emberViewsMixinsText_support["default"]; _emberRuntime["default"].ComponentLookup = _emberViewsComponent_lookup["default"]; - _emberRuntime["default"].ContainerView = _emberViewsViewsContainer_view["default"]; - _emberRuntime["default"].CollectionView = _emberViewsViewsCollection_view["default"]; _emberRuntime["default"].Component = _emberViewsViewsComponent["default"]; _emberRuntime["default"].EventDispatcher = _emberViewsSystemEvent_dispatcher["default"]; // Deprecated: + _emberRuntime["default"].Select = _emberViewsViewsSelect.DeprecatedSelect; + _emberRuntime["default"].CoreView = _emberViewsViewsCore_view.DeprecatedCoreView; + _emberRuntime["default"].ContainerView = _emberViewsViewsContainer_view.DeprecatedContainerView; + _emberRuntime["default"].CollectionView = _emberViewsViewsCollection_view.DeprecatedCollectionView; _emberRuntime["default"]._Metamorph = _emberViewsCompatMetamorph_view._Metamorph; _emberRuntime["default"]._MetamorphView = _emberViewsCompatMetamorph_view["default"]; _emberRuntime["default"]._LegacyEachView = _emberViewsViewsLegacy_each_view["default"]; // END EXPORTS exports["default"] = _emberRuntime["default"]; }); -/** -@module ember -@submodule ember-views -*/ - -// BEGIN IMPORTS // for the side effect of extending Ember.run.queues enifed("ember-views/compat/attrs-proxy", ["exports", "ember-metal/property_get", "ember-metal/mixin", "ember-metal/events", "ember-metal/utils", "ember-metal/keys", "ember-metal/property_events", "ember-metal/observer"], function (exports, _emberMetalProperty_get, _emberMetalMixin, _emberMetalEvents, _emberMetalUtils, _emberMetalKeys, _emberMetalProperty_events, _emberMetalObserver) { + "use strict"; + exports.deprecation = deprecation; function deprecation(key) { return "You tried to look up an attribute directly on the component. This is deprecated. Use attrs." + key + " instead."; } @@ -42244,30 +42849,30 @@ val.update(value); }, willWatchProperty: function (key) { - if (this._isAngleBracket || key === "attrs") { + if (this._isAngleBracket || key === 'attrs') { return; } var attrsKey = "attrs." + key; _emberMetalObserver._addBeforeObserver(this, attrsKey, null, attrsWillChange); _emberMetalObserver.addObserver(this, attrsKey, null, attrsDidChange); }, didUnwatchProperty: function (key) { - if (this._isAngleBracket || key === "attrs") { + if (this._isAngleBracket || key === 'attrs') { return; } var attrsKey = "attrs." + key; _emberMetalObserver._removeBeforeObserver(this, attrsKey, null, attrsWillChange); _emberMetalObserver.removeObserver(this, attrsKey, null, attrsDidChange); }, - legacyDidReceiveAttrs: _emberMetalEvents.on("didReceiveAttrs", function () { + legacyDidReceiveAttrs: _emberMetalEvents.on('didReceiveAttrs', function () { if (this._isAngleBracket) { return; } var keys = _emberMetalKeys["default"](this.attrs); @@ -42284,11 +42889,11 @@ unknownProperty: function (key) { if (this._isAngleBracket) { return; } - var attrs = _emberMetalProperty_get.get(this, "attrs"); + var attrs = _emberMetalProperty_get.get(this, 'attrs'); if (attrs && key in attrs) { // do not deprecate accessing `this[key]` at this time. // add this back when we have a proper migration path // Ember.deprecate(deprecation(key)); @@ -42322,10 +42927,12 @@ //import { set } from "ember-metal/property_set"; //import run from "ember-metal/run_loop"; enifed("ember-views/compat/metamorph_view", ["exports", "ember-metal/core", "ember-views/views/view", "ember-metal/mixin"], function (exports, _emberMetalCore, _emberViewsViewsView, _emberMetalMixin) { + /*jshint newcap:false*/ + "use strict"; /** @module ember @submodule ember-views */ @@ -42337,38 +42944,44 @@ @class _Metamorph @namespace Ember @private */ var _Metamorph = _emberMetalMixin.Mixin.create({ - tagName: "", - __metamorphType: "Ember._Metamorph", + tagName: '', + __metamorphType: 'Ember._Metamorph', - instrumentName: "metamorph", + instrumentName: 'metamorph', init: function () { this._super.apply(this, arguments); - _emberMetalCore["default"].deprecate("Supplying a tagName to Metamorph views is unreliable and is deprecated." + " You may be setting the tagName on a Handlebars helper that creates a Metamorph.", !this.tagName); + _emberMetalCore["default"].deprecate('Supplying a tagName to Metamorph views is unreliable and is deprecated.' + ' You may be setting the tagName on a Handlebars helper that creates a Metamorph.', !this.tagName); _emberMetalCore["default"].deprecate("Using " + this.__metamorphType + " is deprecated."); } }); - exports._Metamorph = _Metamorph; /** @class _MetamorphView @namespace Ember @extends Ember.View @uses Ember._Metamorph @private */ + exports._Metamorph = _Metamorph; exports["default"] = _emberViewsViewsView["default"].extend(_Metamorph, { - __metamorphType: "Ember._MetamorphView" + __metamorphType: 'Ember._MetamorphView' }); }); -/*jshint newcap:false*/ // Ember.deprecate enifed("ember-views/compat/render_buffer", ["exports", "ember-views/system/jquery", "ember-metal/core", "ember-metal/platform/create", "dom-helper/prop", "ember-views/system/platform"], function (exports, _emberViewsSystemJquery, _emberMetalCore, _emberMetalPlatformCreate, _domHelperProp, _emberViewsSystemPlatform) { + /** + @module ember + @submodule ember-views + */ + + "use strict"; + exports.renderComponentWithBuffer = renderComponentWithBuffer; exports["default"] = RenderBuffer; // The HTML spec allows for "omitted start tags". These tags are optional // when their intended child is the first thing in the parent tag. For @@ -42400,16 +43013,16 @@ var omittedStartTagChildren; var omittedStartTagChildTest = /(?:<script)*.*?<([\w:]+)/i; function detectOmittedStartTag(dom, string, contextualElement) { omittedStartTagChildren = omittedStartTagChildren || { - tr: dom.createElement("tbody"), - col: dom.createElement("colgroup") + tr: dom.createElement('tbody'), + col: dom.createElement('colgroup') }; // Omitted start tags are only inside table tags. - if (contextualElement.tagName === "TABLE") { + if (contextualElement.tagName === 'TABLE') { var omittedStartTagChildMatch = omittedStartTagChildTest.exec(string); if (omittedStartTagChildMatch) { // It is already asserted that the contextual element is a table // and not the proper start tag. Just look up the start tag. return omittedStartTagChildren[omittedStartTagChildMatch[1].toLowerCase()]; @@ -42443,11 +43056,11 @@ if (!BAD_TAG_NAME_TEST_REGEXP.test(tagName)) { return tagName; } - return tagName.replace(BAD_TAG_NAME_REPLACE_REGEXP, ""); + return tagName.replace(BAD_TAG_NAME_REPLACE_REGEXP, ''); } var BAD_CHARS_REGEXP = /&(?!\w+;)|[<>"'`]/g; var POSSIBLE_CHARS_REGEXP = /[&<>"'`]/; @@ -42455,11 +43068,11 @@ // Stolen shamelessly from Handlebars var escape = { "<": "&lt;", ">": "&gt;", - "\"": "&quot;", + '"': "&quot;", "'": "&#x27;", "`": "&#x60;" }; var escapeChar = function (chr) { @@ -42475,11 +43088,11 @@ } function renderComponentWithBuffer(component, contextualElement, dom) { var buffer = []; component.render(buffer); - var element = dom.parseHTML(buffer.join(""), contextualElement); + var element = dom.parseHTML(buffer.join(''), contextualElement); return element; } /** `Ember.RenderBuffer` gathers information regarding the view and generates the @@ -42495,11 +43108,11 @@ @deprecated @private */ function RenderBuffer(domHelper) { - _emberMetalCore["default"].deprecate("`Ember.RenderBuffer` is deprecated."); + _emberMetalCore["default"].deprecate('`Ember.RenderBuffer` is deprecated.'); this.buffer = null; this.childViews = []; this.attrNodes = []; _emberMetalCore["default"].assert("RenderBuffer requires a DOM helper to be passed to its constructor.", !!domHelper); @@ -42631,11 +43244,11 @@ elementStyle: null, pushChildView: function (view) { var index = this.childViews.length; this.childViews[index] = view; - this.push("<script id='morph-" + index + "' type='text/x-placeholder'></script>"); + this.push("<script id='morph-" + index + "' type='text/x-placeholder'>\x3C/script>"); }, pushAttrNode: function (node) { var index = this.attrNodes.length; this.attrNodes[index] = node; @@ -42644,13 +43257,13 @@ hydrateMorphs: function (contextualElement) { var childViews = this.childViews; var el = this._element; for (var i = 0, l = childViews.length; i < l; i++) { var childView = childViews[i]; - var ref = el.querySelector("#morph-" + i); + var ref = el.querySelector('#morph-' + i); - _emberMetalCore["default"].assert("An error occurred while setting up template bindings. Please check " + (childView && childView.parentView && childView._parentView._debugTemplateName ? "\"" + childView._parentView._debugTemplateName + "\" template " : "") + "for invalid markup or bindings within HTML comments.", ref); + _emberMetalCore["default"].assert('An error occurred while setting up template bindings. Please check ' + (childView && childView.parentView && childView._parentView._debugTemplateName ? '"' + childView._parentView._debugTemplateName + '" template ' : '') + 'for invalid markup or bindings within HTML comments.', ref); var parent = ref.parentNode; childView._morph = this.dom.insertMorphBefore(parent, ref, parent.nodeType === 1 ? parent : contextualElement); parent.removeChild(ref); @@ -42663,13 +43276,13 @@ @param {String} string HTML to push into the buffer @chainable @private */ push: function (content) { - if (typeof content === "string") { + if (typeof content === 'string') { if (this.buffer === null) { - this.buffer = ""; + this.buffer = ''; } _emberMetalCore["default"].assert("A string cannot be pushed into the buffer after a fragment", !this.buffer.nodeType); this.buffer += content; } else { _emberMetalCore["default"].assert("A fragment cannot be pushed into a buffer that contains content", !this.buffer); @@ -42812,11 +43425,11 @@ var id = this.elementId; var classes = this.classes; var attrs = this.elementAttributes; var props = this.elementProperties; var style = this.elementStyle; - var styleBuffer = ""; + var styleBuffer = ''; var attr, prop, tagString; if (!_emberViewsSystemPlatform.canSetNameOnInputs && attrs && attrs.name) { // IE allows passing a tag to createElement. See note on `canSetNameOnInputs` above as well. tagString = "<" + stripTagName(tagName) + " name=\"" + escapeAttribute(attrs.name) + "\">"; @@ -42825,25 +43438,25 @@ } var element = this.dom.createElement(tagString, this.outerContextualElement()); if (id) { - this.dom.setAttribute(element, "id", id); + this.dom.setAttribute(element, 'id', id); this.elementId = null; } if (classes) { - this.dom.setAttribute(element, "class", classes.join(" ")); + this.dom.setAttribute(element, 'class', classes.join(' ')); this.classes = null; this.elementClasses = null; } if (style) { for (prop in style) { - styleBuffer += prop + ":" + style[prop] + ";"; + styleBuffer += prop + ':' + style[prop] + ';'; } - this.dom.setAttribute(element, "style", styleBuffer); + this.dom.setAttribute(element, 'style', styleBuffer); this.elementStyle = null; } if (attrs) { @@ -42924,12 +43537,12 @@ string: function () { if (this._element) { // Firefox versions < 11 do not have support for element.outerHTML. var thisElement = this.element(); var outerHTML = thisElement.outerHTML; - if (typeof outerHTML === "undefined") { - return _emberViewsSystemJquery["default"]("<div/>").append(thisElement).html(); + if (typeof outerHTML === 'undefined') { + return _emberViewsSystemJquery["default"]('<div/>').append(thisElement).html(); } return outerHTML; } else { return this.innerString(); } @@ -42968,15 +43581,13 @@ innerContent: function () { return this.buffer; } }; }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/component_lookup", ["exports", "ember-metal/core", "ember-runtime/system/object", "ember-htmlbars/system/lookup-helper"], function (exports, _emberMetalCore, _emberRuntimeSystemObject, _emberHtmlbarsSystemLookupHelper) { + "use strict"; + exports["default"] = _emberRuntimeSystemObject["default"].extend({ invalidName: function (name) { if (!_emberHtmlbarsSystemLookupHelper.CONTAINS_DASH_CACHE.get(name)) { _emberMetalCore["default"].assert("You cannot use '" + name + "' as a component name. Component names must contain a hyphen."); return true; @@ -42985,16 +43596,16 @@ lookupFactory: function (name, container) { container = container || this.container; - var fullName = "component:" + name; - var templateFullName = "template:components/" + name; + var fullName = 'component:' + name; + var templateFullName = 'template:components/' + name; var templateRegistered = container && container._registry.has(templateFullName); if (templateRegistered) { - container._registry.injection(fullName, "layout", templateFullName); + container._registry.injection(fullName, 'layout', templateFullName); } var Component = container.lookupFactory(fullName); // Only treat as a component if either the component @@ -43011,33 +43622,39 @@ componentFor: function (name, container) { if (this.invalidName(name)) { return; } - var fullName = "component:" + name; + var fullName = 'component:' + name; return container.lookupFactory(fullName); }, layoutFor: function (name, container) { if (this.invalidName(name)) { return; } - var templateFullName = "template:components/" + name; + var templateFullName = 'template:components/' + name; return container.lookup(templateFullName); } }); }); enifed("ember-views/mixins/aria_role_support", ["exports", "ember-metal/mixin"], function (exports, _emberMetalMixin) { + /** + @module ember + @submodule ember-views + */ + "use strict"; + /** @class AriaRoleSupport @namespace Ember @private */ exports["default"] = _emberMetalMixin.Mixin.create({ - attributeBindings: ["ariaRole:role"], + attributeBindings: ['ariaRole:role'], /** The WAI-ARIA role of the control represented by this view. For example, a button may have a role of type 'button', or a pane may have a role of type 'alertdialog'. This property is used by assistive software to help @@ -43050,25 +43667,26 @@ @public */ ariaRole: null }); }); -/** - @module ember - @submodule ember-views -*/ enifed("ember-views/mixins/class_names_support", ["exports", "ember-metal/core", "ember-metal/mixin", "ember-runtime/system/native_array", "ember-metal/utils"], function (exports, _emberMetalCore, _emberMetalMixin, _emberRuntimeSystemNative_array, _emberMetalUtils) { + /** + @module ember + @submodule ember-views + */ + "use strict"; var EMPTY_ARRAY = []; /** @class ClassNamesSupport @namespace Ember @private */ var ClassNamesSupport = _emberMetalMixin.Mixin.create({ - concatenatedProperties: ["classNames", "classNameBindings"], + concatenatedProperties: ['classNames', 'classNameBindings'], init: function () { this._super.apply(this, arguments); _emberMetalCore["default"].assert("Only arrays are allowed for 'classNameBindings'", _emberMetalUtils.isArray(this.classNameBindings)); @@ -43085,11 +43703,11 @@ @property classNames @type Array @default ['ember-view'] @public */ - classNames: ["ember-view"], + classNames: ['ember-view'], /** A list of properties of the view to apply as class names. If the property is a string value, the value of that string will be applied as a class name. @@ -43127,15 +43745,12 @@ classNameBindings: EMPTY_ARRAY }); exports["default"] = ClassNamesSupport; }); -/** -@module ember -@submodule ember-views -*/ enifed('ember-views/mixins/component_template_deprecation', ['exports', 'ember-metal/core', 'ember-metal/property_get', 'ember-metal/mixin'], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalMixin) { + 'use strict'; /* The ComponentTemplateDeprecation mixin is used to provide a useful deprecation warning when using either `template` or `templateName` with a component. The `template` and `templateName` properties specified at @@ -43185,11 +43800,17 @@ } }); }); // Ember.deprecate enifed("ember-views/mixins/empty_view_support", ["exports", "ember-metal/mixin", "ember-views/views/view", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/computed"], function (exports, _emberMetalMixin, _emberViewsViewsView, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed) { + /** + @module ember + @submodule ember-views + */ + "use strict"; + /** @class EmptyViewSupport @namespace Ember @private */ @@ -43210,15 +43831,15 @@ @default null @private */ emptyView: null, - _emptyView: _emberMetalComputed.computed("emptyView", "attrs.emptyViewClass", "emptyViewClass", function () { - var emptyView = _emberMetalProperty_get.get(this, "emptyView"); - var attrsEmptyViewClass = this.getAttr("emptyViewClass"); - var emptyViewClass = _emberMetalProperty_get.get(this, "emptyViewClass"); - var inverse = _emberMetalProperty_get.get(this, "_itemViewInverse"); + _emptyView: _emberMetalComputed.computed('emptyView', 'attrs.emptyViewClass', 'emptyViewClass', function () { + var emptyView = _emberMetalProperty_get.get(this, 'emptyView'); + var attrsEmptyViewClass = this.getAttr('emptyViewClass'); + var emptyViewClass = _emberMetalProperty_get.get(this, 'emptyViewClass'); + var inverse = _emberMetalProperty_get.get(this, '_itemViewInverse'); var actualEmpty = emptyView || attrsEmptyViewClass; // Somehow, our previous semantics differed depending on whether the // `emptyViewClass` was provided on the JavaScript class or via the // Handlebars template. @@ -43228,25 +43849,26 @@ // if an inverse has been provided via an `{{else}}`. if (inverse && actualEmpty) { if (actualEmpty.extend) { return actualEmpty.extend({ template: inverse }); } else { - _emberMetalProperty_set.set(actualEmpty, "template", inverse); + _emberMetalProperty_set.set(actualEmpty, 'template', inverse); } } else if (inverse && emptyViewClass) { return emptyViewClass.extend({ template: inverse }); } return actualEmpty; }) }); }); -/** - @module ember - @submodule ember-views -*/ enifed("ember-views/mixins/instrumentation_support", ["exports", "ember-metal/mixin", "ember-metal/computed", "ember-metal/property_get"], function (exports, _emberMetalMixin, _emberMetalComputed, _emberMetalProperty_get) { + /** + @module ember + @submodule ember-views + */ + "use strict"; /** @class InstrumentationSupport @namespace Ember @public @@ -43258,29 +43880,30 @@ @type String @public */ instrumentDisplay: _emberMetalComputed.computed(function () { if (this.helperName) { - return "{{" + this.helperName + "}}"; + return '{{' + this.helperName + '}}'; } }), - instrumentName: "view", + instrumentName: 'view', instrumentDetails: function (hash) { - hash.template = _emberMetalProperty_get.get(this, "templateName"); + hash.template = _emberMetalProperty_get.get(this, 'templateName'); this._super(hash); } }); exports["default"] = InstrumentationSupport; }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/mixins/legacy_view_support", ["exports", "ember-metal/core", "ember-metal/mixin", "ember-metal/property_get"], function (exports, _emberMetalCore, _emberMetalMixin, _emberMetalProperty_get) { + /** + @module ember + @submodule ember-views + */ + "use strict"; /** @class LegacyViewSupport @namespace Ember @private @@ -43299,11 +43922,11 @@ childViews.push.apply(childViews, view.childViews); } }, mutateChildViews: function (callback) { - var childViews = _emberMetalProperty_get.get(this, "childViews"); + var childViews = _emberMetalProperty_get.get(this, 'childViews'); var idx = childViews.length; var view; while (--idx >= 0) { view = childViews[idx]; @@ -43341,17 +43964,17 @@ @private */ nearestChildOf: function (klass) { _emberMetalCore["default"].deprecate("nearestChildOf has been deprecated."); - var view = _emberMetalProperty_get.get(this, "parentView"); + var view = _emberMetalProperty_get.get(this, 'parentView'); while (view) { - if (_emberMetalProperty_get.get(view, "parentView") instanceof klass) { + if (_emberMetalProperty_get.get(view, 'parentView') instanceof klass) { return view; } - view = _emberMetalProperty_get.get(view, "parentView"); + view = _emberMetalProperty_get.get(view, 'parentView'); } }, /** Return the nearest ancestor that is an instance of the provided @@ -43362,29 +43985,31 @@ @deprecated @private */ nearestInstanceOf: function (klass) { _emberMetalCore["default"].deprecate("nearestInstanceOf is deprecated and will be removed from future releases. Use nearestOfType."); - var view = _emberMetalProperty_get.get(this, "parentView"); + var view = _emberMetalProperty_get.get(this, 'parentView'); while (view) { if (view instanceof klass) { return view; } - view = _emberMetalProperty_get.get(view, "parentView"); + view = _emberMetalProperty_get.get(view, 'parentView'); } } }); exports["default"] = LegacyViewSupport; }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/mixins/normalized_rerender_if_needed", ["exports", "ember-metal/property_get", "ember-metal/mixin", "ember-metal/merge", "ember-views/views/states"], function (exports, _emberMetalProperty_get, _emberMetalMixin, _emberMetalMerge, _emberViewsViewsStates) { + /** + @module ember + @submodule ember-views + */ + "use strict"; + var states = _emberViewsViewsStates.cloneStates(_emberViewsViewsStates.states); _emberMetalMerge["default"](states._default, { rerenderIfNeeded: function () { return this; @@ -43402,24 +44027,25 @@ exports["default"] = _emberMetalMixin.Mixin.create({ _states: states, normalizedValue: function () { var value = this.lazyValue.value(); - var valueNormalizer = _emberMetalProperty_get.get(this, "valueNormalizerFunc"); + var valueNormalizer = _emberMetalProperty_get.get(this, 'valueNormalizerFunc'); return valueNormalizer ? valueNormalizer(value) : value; }, rerenderIfNeeded: function () { this.currentState.rerenderIfNeeded(this); } }); }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/mixins/template_rendering_support", ["exports", "ember-metal/mixin"], function (exports, _emberMetalMixin) { + /** + @module ember + @submodule ember-views + */ + "use strict"; // Circular dep var _renderView; /** @@ -43440,25 +44066,27 @@ @private */ renderBlock: function (block, renderNode) { if (_renderView === undefined) { - _renderView = eriuqer("ember-htmlbars/system/render-view"); + _renderView = eriuqer('ember-htmlbars/system/render-view'); } return _renderView.renderHTMLBarsBlock(this, block, renderNode); } }); exports["default"] = TemplateRenderingSupport; }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/mixins/text_support", ["exports", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/mixin", "ember-runtime/mixins/target_action_support"], function (exports, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalMixin, _emberRuntimeMixinsTarget_action_support) { + /** + @module ember + @submodule ember-views + */ + "use strict"; + /** `TextSupport` is a shared mixin used by both `Ember.TextField` and `Ember.TextArea`. `TextSupport` adds a number of methods that allow you to specify a controller action to invoke when a certain event is fired on your text field or textarea. The specifed controller action would get the current @@ -43556,11 +44184,11 @@ @private */ var TextSupport = _emberMetalMixin.Mixin.create(_emberRuntimeMixinsTarget_action_support["default"], { value: "", - attributeBindings: ["autocapitalize", "autocorrect", "autofocus", "disabled", "form", "maxlength", "placeholder", "readonly", "required", "selectionDirection", "spellcheck", "tabindex", "title"], + attributeBindings: ['autocapitalize', 'autocorrect', 'autofocus', 'disabled', 'form', 'maxlength', 'placeholder', 'readonly', 'required', 'selectionDirection', 'spellcheck', 'tabindex', 'title'], placeholder: null, disabled: false, maxlength: null, init: function () { @@ -43590,11 +44218,11 @@ @property onEvent @type String @default enter @private */ - onEvent: "enter", + onEvent: 'enter', /** Whether the `keyUp` event that triggers an `action` to be sent continues propagating to other views. By default, when the user presses the return key on their keyboard and @@ -43620,11 +44248,11 @@ }, _elementValueDidChange: function () { // Using readDOMAttr will ensure that HTMLBars knows the last // value. - _emberMetalProperty_set.set(this, "value", this.readDOMAttr("value")); + _emberMetalProperty_set.set(this, 'value', this.readDOMAttr('value')); }, change: function (event) { this._elementValueDidChange(event); }, @@ -43640,12 +44268,12 @@ @method insertNewline @param {Event} event @private */ insertNewline: function (event) { - sendAction("enter", this, event); - sendAction("insert-newline", this, event); + sendAction('enter', this, event); + sendAction('insert-newline', this, event); }, /** Allows you to specify a controller action to invoke when the escape button is pressed. To use this method, give your field an `escape-press` @@ -43656,11 +44284,11 @@ @method cancel @param {Event} event @private */ cancel: function (event) { - sendAction("escape-press", this, event); + sendAction('escape-press', this, event); }, /** Allows you to specify a controller action to invoke when a field receives focus. To use this method, give your field a `focus-in` attribute. The value @@ -43671,11 +44299,11 @@ @method focusIn @param {Event} event @private */ focusIn: function (event) { - sendAction("focus-in", this, event); + sendAction('focus-in', this, event); }, /** Allows you to specify a controller action to invoke when a field loses focus. To use this method, give your field a `focus-out` attribute. The value @@ -43687,11 +44315,11 @@ @param {Event} event @private */ focusOut: function (event) { this._elementValueDidChange(event); - sendAction("focus-out", this, event); + sendAction('focus-out', this, event); }, /** Allows you to specify a controller action to invoke when a key is pressed. To use this method, give your field a `key-press` attribute. The value of @@ -43702,11 +44330,11 @@ @method keyPress @param {Event} event @private */ keyPress: function (event) { - sendAction("key-press", this, event); + sendAction('key-press', this, event); }, /** Allows you to specify a controller action to invoke when a key-up event is fired. To use this method, give your field a `key-up` attribute. The value @@ -43719,11 +44347,11 @@ @private */ keyUp: function (event) { this.interpretKeyEvents(event); - this.sendAction("key-up", _emberMetalProperty_get.get(this, "value"), event); + this.sendAction('key-up', _emberMetalProperty_get.get(this, 'value'), event); }, /** Allows you to specify a controller action to invoke when a key-down event is fired. To use this method, give your field a `key-down` attribute. The value @@ -43734,50 +44362,51 @@ @method keyDown @param {Event} event @private */ keyDown: function (event) { - this.sendAction("key-down", _emberMetalProperty_get.get(this, "value"), event); + this.sendAction('key-down', _emberMetalProperty_get.get(this, 'value'), event); } }); TextSupport.KEY_EVENTS = { - 13: "insertNewline", - 27: "cancel" + 13: 'insertNewline', + 27: 'cancel' }; // In principle, this shouldn't be necessary, but the legacy // sendAction semantics for TextField are different from // the component semantics so this method normalizes them. function sendAction(eventName, view, event) { - var action = _emberMetalProperty_get.get(view, "attrs." + eventName) || _emberMetalProperty_get.get(view, eventName); - var on = _emberMetalProperty_get.get(view, "onEvent"); - var value = _emberMetalProperty_get.get(view, "value"); + var action = _emberMetalProperty_get.get(view, 'attrs.' + eventName) || _emberMetalProperty_get.get(view, eventName); + var on = _emberMetalProperty_get.get(view, 'onEvent'); + var value = _emberMetalProperty_get.get(view, 'value'); // back-compat support for keyPress as an event name even though // it's also a method name that consumes the event (and therefore // incompatible with sendAction semantics). - if (on === eventName || on === "keyPress" && eventName === "key-press") { - view.sendAction("action", value); + if (on === eventName || on === 'keyPress' && eventName === 'key-press') { + view.sendAction('action', value); } view.sendAction(eventName, value); if (action || on === eventName) { - if (!_emberMetalProperty_get.get(view, "bubbles")) { + if (!_emberMetalProperty_get.get(view, 'bubbles')) { event.stopPropagation(); } } } exports["default"] = TextSupport; }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/mixins/view_child_views_support", ["exports", "ember-metal/core", "ember-metal/mixin", "ember-metal/enumerable_utils", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/set_properties"], function (exports, _emberMetalCore, _emberMetalMixin, _emberMetalEnumerable_utils, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalSet_properties) { + /** + @module ember + @submodule ember-views + */ + "use strict"; var EMPTY_ARRAY = []; exports["default"] = _emberMetalMixin.Mixin.create({ /** @@ -43825,11 +44454,11 @@ // update parent node this.unlinkChild(view); // remove view from childViews array. - var childViews = _emberMetalProperty_get.get(this, "childViews"); + var childViews = _emberMetalProperty_get.get(this, 'childViews'); _emberMetalEnumerable_utils.removeObject(childViews, view); return this; }, @@ -43868,20 +44497,20 @@ view = maybeViewClass.create(attrs); if (view.viewName) { _emberMetalProperty_set.set(this, view.viewName, view); } - } else if ("string" === typeof maybeViewClass) { - var fullName = "view:" + maybeViewClass; + } else if ('string' === typeof maybeViewClass) { + var fullName = 'view:' + maybeViewClass; var ViewKlass = this.container.lookupFactory(fullName); _emberMetalCore["default"].assert("Could not find view: '" + fullName + "'", !!ViewKlass); view = ViewKlass.create(attrs); } else { view = maybeViewClass; - _emberMetalCore["default"].assert("You must pass instance or subclass of View", view.isView); + _emberMetalCore["default"].assert('You must pass instance or subclass of View', view.isView); attrs.container = this.container; _emberMetalSet_properties["default"](view, attrs); } @@ -43890,29 +44519,30 @@ return view; }, linkChild: function (instance) { instance.container = this.container; - if (_emberMetalProperty_get.get(instance, "parentView") !== this) { + if (_emberMetalProperty_get.get(instance, 'parentView') !== this) { // linkChild should be idempotentj - _emberMetalProperty_set.set(instance, "parentView", this); - instance.trigger("parentViewDidChange"); + _emberMetalProperty_set.set(instance, 'parentView', this); + instance.trigger('parentViewDidChange'); } instance.ownerView = this.ownerView; }, unlinkChild: function (instance) { - _emberMetalProperty_set.set(instance, "parentView", null); - instance.trigger("parentViewDidChange"); + _emberMetalProperty_set.set(instance, 'parentView', null); + instance.trigger('parentViewDidChange'); } }); }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/mixins/view_context_support", ["exports", "ember-metal/mixin", "ember-metal/computed", "ember-metal/property_get", "ember-metal/property_set", "ember-views/mixins/legacy_view_support", "ember-metal/events"], function (exports, _emberMetalMixin, _emberMetalComputed, _emberMetalProperty_get, _emberMetalProperty_set, _emberViewsMixinsLegacy_view_support, _emberMetalEvents) { + /** + @module ember + @submodule ember-views + */ + "use strict"; var ViewContextSupport = _emberMetalMixin.Mixin.create(_emberViewsMixinsLegacy_view_support["default"], { /** The object from which templates should access properties. This object will be passed to the template function each time the render @@ -43923,14 +44553,14 @@ @type Object @private */ context: _emberMetalComputed.computed({ get: function () { - return _emberMetalProperty_get.get(this, "_context"); + return _emberMetalProperty_get.get(this, '_context'); }, set: function (key, value) { - _emberMetalProperty_set.set(this, "_context", value); + _emberMetalProperty_set.set(this, '_context', value); return value; } })["volatile"](), /** @@ -43949,17 +44579,17 @@ */ _context: _emberMetalComputed.computed({ get: function () { var parentView, controller; - if (controller = _emberMetalProperty_get.get(this, "controller")) { + if (controller = _emberMetalProperty_get.get(this, 'controller')) { return controller; } parentView = this.parentView; if (parentView) { - return _emberMetalProperty_get.get(parentView, "_context"); + return _emberMetalProperty_get.get(parentView, '_context'); } return null; }, set: function (key, value) { return value; @@ -43979,36 +44609,33 @@ get: function () { if (this._controller) { return this._controller; } - return this.parentView ? _emberMetalProperty_get.get(this.parentView, "controller") : null; + return this.parentView ? _emberMetalProperty_get.get(this.parentView, 'controller') : null; }, set: function (_, value) { this._controller = value; return value; } }), - _legacyControllerDidChange: _emberMetalMixin.observer("controller", function () { + _legacyControllerDidChange: _emberMetalMixin.observer('controller', function () { this.walkChildViews(function (view) { - return view.notifyPropertyChange("controller"); + return view.notifyPropertyChange('controller'); }); }), - _notifyControllerChange: _emberMetalEvents.on("parentViewDidChange", function () { - this.notifyPropertyChange("controller"); + _notifyControllerChange: _emberMetalEvents.on('parentViewDidChange', function () { + this.notifyPropertyChange('controller'); }) }); exports["default"] = ViewContextSupport; }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/mixins/view_state_support", ["exports", "ember-metal/core", "ember-metal/mixin"], function (exports, _emberMetalCore, _emberMetalMixin) { + "use strict"; var ViewStateSupport = _emberMetalMixin.Mixin.create({ transitionTo: function (state) { _emberMetalCore["default"].deprecate("Ember.View#transitionTo has been deprecated, it is for internal use only"); this._transitionTo(state); @@ -44029,10 +44656,11 @@ }); exports["default"] = ViewStateSupport; }); enifed("ember-views/mixins/view_target_action_support", ["exports", "ember-metal/mixin", "ember-runtime/mixins/target_action_support", "ember-metal/alias"], function (exports, _emberMetalMixin, _emberRuntimeMixinsTarget_action_support, _emberMetalAlias) { + "use strict"; /** `Ember.ViewTargetActionSupport` is a mixin that can be included in a view class to add a `triggerAction` method with semantics similar to the Handlebars `{{action}}` helper. It provides intelligent defaults @@ -44077,19 +44705,24 @@ exports["default"] = _emberMetalMixin.Mixin.create(_emberRuntimeMixinsTarget_action_support["default"], { /** @property target @private */ - target: _emberMetalAlias["default"]("controller"), + target: _emberMetalAlias["default"]('controller'), /** @property actionContext @private */ - actionContext: _emberMetalAlias["default"]("context") + actionContext: _emberMetalAlias["default"]('context') }); }); enifed("ember-views/mixins/visibility_support", ["exports", "ember-metal/mixin", "ember-metal/property_get", "ember-metal/run_loop"], function (exports, _emberMetalMixin, _emberMetalProperty_get, _emberMetalRun_loop) { + /** + @module ember + @submodule ember-views + */ + "use strict"; function K() { return this; } @@ -44115,20 +44748,20 @@ When the view's `isVisible` property changes, toggle the visibility element of the actual DOM element. @method _isVisibleDidChange @private */ - _isVisibleDidChange: _emberMetalMixin.observer("isVisible", function () { - if (this._isVisible === _emberMetalProperty_get.get(this, "isVisible")) { + _isVisibleDidChange: _emberMetalMixin.observer('isVisible', function () { + if (this._isVisible === _emberMetalProperty_get.get(this, 'isVisible')) { return; } - _emberMetalRun_loop["default"].scheduleOnce("render", this, this._toggleVisibility); + _emberMetalRun_loop["default"].scheduleOnce('render', this, this._toggleVisibility); }), _toggleVisibility: function () { var $el = this.$(); - var isVisible = _emberMetalProperty_get.get(this, "isVisible"); + var isVisible = _emberMetalProperty_get.get(this, 'isVisible'); if (this._isVisible === isVisible) { return; } @@ -44152,54 +44785,52 @@ this._notifyBecameHidden(); } }, _notifyBecameVisible: function () { - this.trigger("becameVisible"); + this.trigger('becameVisible'); this.forEachChildView(function (view) { - var isVisible = _emberMetalProperty_get.get(view, "isVisible"); + var isVisible = _emberMetalProperty_get.get(view, 'isVisible'); if (isVisible || isVisible === null) { view._notifyBecameVisible(); } }); }, _notifyBecameHidden: function () { - this.trigger("becameHidden"); + this.trigger('becameHidden'); this.forEachChildView(function (view) { - var isVisible = _emberMetalProperty_get.get(view, "isVisible"); + var isVisible = _emberMetalProperty_get.get(view, 'isVisible'); if (isVisible || isVisible === null) { view._notifyBecameHidden(); } }); }, _isAncestorHidden: function () { - var parent = _emberMetalProperty_get.get(this, "parentView"); + var parent = _emberMetalProperty_get.get(this, 'parentView'); while (parent) { - if (_emberMetalProperty_get.get(parent, "isVisible") === false) { + if (_emberMetalProperty_get.get(parent, 'isVisible') === false) { return true; } - parent = _emberMetalProperty_get.get(parent, "parentView"); + parent = _emberMetalProperty_get.get(parent, 'parentView'); } return false; } }); exports["default"] = VisibilitySupport; }); -/** - @module ember - @submodule ember-views -*/ enifed("ember-views/streams/class_name_binding", ["exports", "ember-metal/streams/utils", "ember-metal/property_get", "ember-runtime/system/string", "ember-metal/utils"], function (exports, _emberMetalStreamsUtils, _emberMetalProperty_get, _emberRuntimeSystemString, _emberMetalUtils) { + "use strict"; + exports.parsePropertyPath = parsePropertyPath; exports.classStringForValue = classStringForValue; exports.streamifyClassNameBinding = streamifyClassNameBinding; /** @@ -44221,11 +44852,11 @@ @static @private */ function parsePropertyPath(path) { - var split = path.split(":"); + var split = path.split(':'); var propertyPath = split[0]; var classNames = ""; var className, falsyClassName; // check if the property is defined as prop:class or prop:trueClass:falseClass @@ -44233,20 +44864,20 @@ className = split[1]; if (split.length === 3) { falsyClassName = split[2]; } - classNames = ":" + className; + classNames = ':' + className; if (falsyClassName) { classNames += ":" + falsyClassName; } } return { path: propertyPath, classNames: classNames, - className: className === "" ? undefined : className, + className: className === '' ? undefined : className, falsyClassName: falsyClassName }; } /** @@ -44274,11 +44905,11 @@ @private */ function classStringForValue(path, val, className, falsyClassName) { if (_emberMetalUtils.isArray(val)) { - val = _emberMetalProperty_get.get(val, "length") !== 0; + val = _emberMetalProperty_get.get(val, 'length') !== 0; } // When using the colon syntax, evaluate the truthiness or falsiness // of the value to determine which className to return if (className || falsyClassName) { @@ -44291,66 +44922,68 @@ } // If value is a Boolean and true, return the dasherized property // name. } else if (val === true) { - // Normalize property path to be suitable for use - // as a class name. For exaple, content.foo.barBaz - // becomes bar-baz. - var parts = path.split("."); - return _emberRuntimeSystemString.dasherize(parts[parts.length - 1]); + // Normalize property path to be suitable for use + // as a class name. For exaple, content.foo.barBaz + // becomes bar-baz. + var parts = path.split('.'); + return _emberRuntimeSystemString.dasherize(parts[parts.length - 1]); - // If the value is not false, undefined, or null, return the current - // value of the property. - } else if (val !== false && val != null) { - return val; + // If the value is not false, undefined, or null, return the current + // value of the property. + } else if (val !== false && val != null) { + return val; - // Nothing to display. Return null so that the old class is removed - // but no new class is added. - } else { - return null; - } + // Nothing to display. Return null so that the old class is removed + // but no new class is added. + } else { + return null; + } } function streamifyClassNameBinding(view, classNameBinding, prefix) { - prefix = prefix || ""; - Ember.assert("classNameBindings must not have spaces in them. Multiple class name bindings can be provided as elements of an array, e.g. ['foo', ':bar']", classNameBinding.indexOf(" ") === -1); + prefix = prefix || ''; + Ember.assert("classNameBindings must not have spaces in them. Multiple class name bindings can be provided as elements of an array, e.g. ['foo', ':bar']", classNameBinding.indexOf(' ') === -1); var parsedPath = parsePropertyPath(classNameBinding); - if (parsedPath.path === "") { + if (parsedPath.path === '') { return classStringForValue(parsedPath.path, true, parsedPath.className, parsedPath.falsyClassName); } else { var pathValue = view.getStream(prefix + parsedPath.path); return _emberMetalStreamsUtils.chain(pathValue, function () { return classStringForValue(parsedPath.path, _emberMetalStreamsUtils.read(pathValue), parsedPath.className, parsedPath.falsyClassName); }); } } }); enifed("ember-views/streams/should_display", ["exports", "ember-metal/platform/create", "ember-metal/merge", "ember-metal/property_get", "ember-runtime/utils", "ember-metal/streams/stream", "ember-metal/streams/utils"], function (exports, _emberMetalPlatformCreate, _emberMetalMerge, _emberMetalProperty_get, _emberRuntimeUtils, _emberMetalStreamsStream, _emberMetalStreamsUtils) { + "use strict"; + exports["default"] = shouldDisplay; function shouldDisplay(predicate) { if (_emberMetalStreamsUtils.isStream(predicate)) { return new ShouldDisplayStream(predicate); } - var truthy = predicate && _emberMetalProperty_get.get(predicate, "isTruthy"); - if (typeof truthy === "boolean") { + var truthy = predicate && _emberMetalProperty_get.get(predicate, 'isTruthy'); + if (typeof truthy === 'boolean') { return truthy; } if (_emberRuntimeUtils.isArray(predicate)) { - return _emberMetalProperty_get.get(predicate, "length") !== 0; + return _emberMetalProperty_get.get(predicate, 'length') !== 0; } else { return !!predicate; } } function ShouldDisplayStream(predicate) { Ember.assert("ShouldDisplayStream error: predicate must be a stream", _emberMetalStreamsUtils.isStream(predicate)); - var isTruthy = predicate.get("isTruthy"); + var isTruthy = predicate.get('isTruthy'); this.init(); this.predicate = predicate; this.isTruthy = isTruthy; this.lengthDep = null; @@ -44363,11 +44996,11 @@ _emberMetalMerge["default"](ShouldDisplayStream.prototype, { compute: function () { var truthy = _emberMetalStreamsUtils.read(this.isTruthy); - if (typeof truthy === "boolean") { + if (typeof truthy === 'boolean') { return truthy; } if (this.lengthDep) { return this.lengthDep.getValue() !== 0; @@ -44377,11 +45010,11 @@ }, revalidate: function () { if (_emberRuntimeUtils.isArray(_emberMetalStreamsUtils.read(this.predicate))) { if (!this.lengthDep) { - this.lengthDep = this.addMutableDependency(this.predicate.get("length")); + this.lengthDep = this.addMutableDependency(this.predicate.get('length')); } } else { if (this.lengthDep) { this.lengthDep.destroy(); this.lengthDep = null; @@ -44389,25 +45022,27 @@ } } }); }); enifed("ember-views/streams/utils", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/path_cache", "ember-runtime/system/string", "ember-metal/streams/utils", "ember-runtime/mixins/controller"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalPath_cache, _emberRuntimeSystemString, _emberMetalStreamsUtils, _emberRuntimeMixinsController) { + "use strict"; + exports.readViewFactory = readViewFactory; exports.readComponentFactory = readComponentFactory; exports.readUnwrappedModel = readUnwrappedModel; function readViewFactory(object, container) { var value = _emberMetalStreamsUtils.read(object); var viewClass; - if (typeof value === "string") { + if (typeof value === 'string') { if (_emberMetalPath_cache.isGlobal(value)) { viewClass = _emberMetalProperty_get.get(null, value); - _emberMetalCore["default"].deprecate("Resolved the view \"" + value + "\" on the global context. Pass a view name to be looked up on the container instead, such as {{view \"select\"}}.", !viewClass, { url: "http://emberjs.com/guides/deprecations/#toc_global-lookup-of-views" }); + _emberMetalCore["default"].deprecate('Resolved the view "' + value + '" on the global context. Pass a view name to be looked up on the container instead, such as {{view "select"}}.', !viewClass, { url: 'http://emberjs.com/guides/deprecations/#toc_global-lookup-of-views' }); } else { _emberMetalCore["default"].assert("View requires a container to resolve views not passed in through the context", !!container); - viewClass = container.lookupFactory("view:" + value); + viewClass = container.lookupFactory('view:' + value); } } else { viewClass = value; } @@ -44418,24 +45053,24 @@ return viewClass; } function readComponentFactory(nameOrStream, container) { var name = _emberMetalStreamsUtils.read(nameOrStream); - var componentLookup = container.lookup("component-lookup:main"); + var componentLookup = container.lookup('component-lookup:main'); _emberMetalCore["default"].assert("Could not find 'component-lookup:main' on the provided container," + " which is necessary for performing component lookups", componentLookup); return componentLookup.lookupFactory(name, container); } function readUnwrappedModel(object) { if (_emberMetalStreamsUtils.isStream(object)) { var result = object.value(); // If the path is exactly `controller` then we don't unwrap it. - if (object.label !== "controller") { + if (object.label !== 'controller') { while (_emberRuntimeMixinsController["default"].detect(result)) { - result = _emberMetalProperty_get.get(result, "model"); + result = _emberMetalProperty_get.get(result, 'model'); } } return result; } else { @@ -44447,10 +45082,12 @@ /** @module ember @submodule ember-views */ + "use strict"; + function ActionManager() {} /** Global action id hash. @@ -44461,10 +45098,12 @@ ActionManager.registeredActions = {}; exports["default"] = ActionManager; }); enifed("ember-views/system/build-component-template", ["exports", "htmlbars-runtime", "ember-htmlbars/hooks/get-value", "ember-metal/property_get", "ember-metal/path_cache"], function (exports, _htmlbarsRuntime, _emberHtmlbarsHooksGetValue, _emberMetalProperty_get, _emberMetalPath_cache) { + "use strict"; + exports["default"] = buildComponentTemplate; function buildComponentTemplate(_ref, attrs, content) { var component = _ref.component; var layout = _ref.layout; @@ -44489,11 +45128,11 @@ tagName = tagNameFor(component); // If this is not a tagless component, we need to create the wrapping // element. We use `manualElement` to create a template that represents // the wrapping element and yields to the previous block. - if (tagName !== "") { + if (tagName !== '') { var attributes = normalizeComponentAttributes(component, isAngleBracket, attrs); var elementTemplate = _htmlbarsRuntime.internal.manualElement(tagName, attributes); elementTemplate.meta = meta; blockToRender = createElementBlock(elementTemplate, blockToRender, component); @@ -44563,17 +45202,17 @@ } function tagNameFor(view) { var tagName = view.tagName; - if (tagName !== null && typeof tagName === "object" && tagName.isDescriptor) { - tagName = _emberMetalProperty_get.get(view, "tagName"); - Ember.deprecate("In the future using a computed property to define tagName will not be permitted. That value will be respected, but changing it will not update the element.", !tagName); + if (tagName !== null && typeof tagName === 'object' && tagName.isDescriptor) { + tagName = _emberMetalProperty_get.get(view, 'tagName'); + Ember.deprecate('In the future using a computed property to define tagName will not be permitted. That value will be respected, but changing it will not update the element.', !tagName); } if (tagName === null || tagName === undefined) { - tagName = view._defaultTagName || "div"; + tagName = view._defaultTagName || 'div'; } return tagName; } @@ -44582,33 +45221,41 @@ function normalizeComponentAttributes(component, isAngleBracket, attrs) { var normalized = {}; var attributeBindings = component.attributeBindings; var i, l; + if (attrs.id && _emberHtmlbarsHooksGetValue["default"](attrs.id)) { + // Do not allow binding to the `id` + normalized.id = _emberHtmlbarsHooksGetValue["default"](attrs.id); + component.elementId = normalized.id; + } else { + normalized.id = component.elementId; + } + if (attributeBindings) { for (i = 0, l = attributeBindings.length; i < l; i++) { var attr = attributeBindings[i]; - var colonIndex = attr.indexOf(":"); + var colonIndex = attr.indexOf(':'); var attrName, expression; if (colonIndex !== -1) { var attrProperty = attr.substring(0, colonIndex); attrName = attr.substring(colonIndex + 1); - expression = ["get", "view." + attrProperty]; + expression = ['get', 'view.' + attrProperty]; } else if (attrs[attr]) { // TODO: For compatibility with 1.x, we probably need to `set` // the component's attribute here if it is a CP, but we also // probably want to suspend observers and allow the // willUpdateAttrs logic to trigger observers at the correct time. attrName = attr; - expression = ["value", attrs[attr]]; + expression = ['value', attrs[attr]]; } else { attrName = attr; - expression = ["get", "view." + attr]; + expression = ['get', 'view.' + attr]; } - Ember.assert("You cannot use class as an attributeBinding, use classNameBindings instead.", attrName !== "class"); + Ember.assert('You cannot use class as an attributeBinding, use classNameBindings instead.', attrName !== 'class'); normalized[attrName] = expression; } } @@ -44617,40 +45264,32 @@ var val = attrs[prop]; if (!val) { continue; } - if (typeof val === "string" || val.isConcat) { - normalized[prop] = ["value", val]; + if (typeof val === 'string' || val.isConcat) { + normalized[prop] = ['value', val]; } } } - if (attrs.id && _emberHtmlbarsHooksGetValue["default"](attrs.id)) { - // Do not allow binding to the `id` - normalized.id = _emberHtmlbarsHooksGetValue["default"](attrs.id); - component.elementId = normalized.id; - } else { - normalized.id = component.elementId; - } - if (attrs.tagName) { component.tagName = attrs.tagName; } var normalizedClass = normalizeClass(component, attrs); if (normalizedClass) { normalized["class"] = normalizedClass; } - if (_emberMetalProperty_get.get(component, "isVisible") === false) { - var hiddenStyle = ["subexpr", "-html-safe", ["display: none;"], []]; + if (_emberMetalProperty_get.get(component, 'isVisible') === false) { + var hiddenStyle = ['subexpr', '-html-safe', ['display: none;'], []]; var existingStyle = normalized.style; if (existingStyle) { - normalized.style = ["subexpr", "concat", [existingStyle, " ", hiddenStyle], []]; + normalized.style = ['subexpr', 'concat', [existingStyle, ' ', hiddenStyle], []]; } else { normalized.style = hiddenStyle; } } @@ -44658,27 +45297,27 @@ } function normalizeClass(component, attrs) { var i, l; var normalizedClass = []; - var classNames = _emberMetalProperty_get.get(component, "classNames"); - var classNameBindings = _emberMetalProperty_get.get(component, "classNameBindings"); + var classNames = _emberMetalProperty_get.get(component, 'classNames'); + var classNameBindings = _emberMetalProperty_get.get(component, 'classNameBindings'); if (attrs["class"]) { - if (typeof attrs["class"] === "string") { + if (typeof attrs["class"] === 'string') { normalizedClass.push(attrs["class"]); } else { - normalizedClass.push(["subexpr", "-normalize-class", [["value", attrs["class"].path], ["value", attrs["class"]]], []]); + normalizedClass.push(['subexpr', '-normalize-class', [['value', attrs["class"].path], ['value', attrs["class"]]], []]); } } if (attrs.classBinding) { - normalizeClasses(attrs.classBinding.split(" "), normalizedClass); + normalizeClasses(attrs.classBinding.split(' '), normalizedClass); } if (attrs.classNames) { - normalizedClass.push(["value", attrs.classNames]); + normalizedClass.push(['value', attrs.classNames]); } if (classNames) { for (i = 0, l = classNames.length; i < l; i++) { normalizedClass.push(classNames[i]); @@ -44688,52 +45327,56 @@ if (classNameBindings) { normalizeClasses(classNameBindings, normalizedClass); } if (normalizeClass.length) { - return ["subexpr", "-join-classes", normalizedClass, []]; + return ['subexpr', '-join-classes', normalizedClass, []]; } } function normalizeClasses(classes, output) { var i, l; for (i = 0, l = classes.length; i < l; i++) { var className = classes[i]; - Ember.assert("classNameBindings must not have spaces in them. Multiple class name bindings can be provided as elements of an array, e.g. ['foo', ':bar']", className.indexOf(" ") === -1); + Ember.assert("classNameBindings must not have spaces in them. Multiple class name bindings can be provided as elements of an array, e.g. ['foo', ':bar']", className.indexOf(' ') === -1); - var _className$split = className.split(":"); + var _className$split = className.split(':'); + // Legacy :class microsyntax for static class names var propName = _className$split[0]; var activeClass = _className$split[1]; var inactiveClass = _className$split[2]; - - // Legacy :class microsyntax for static class names - if (propName === "") { + if (propName === '') { output.push(activeClass); continue; } // 2.0TODO: Remove deprecated global path - var prop = _emberMetalPath_cache.isGlobal(propName) ? propName : "view." + propName; + var prop = _emberMetalPath_cache.isGlobal(propName) ? propName : 'view.' + propName; - output.push(["subexpr", "-normalize-class", [ + output.push(['subexpr', '-normalize-class', [ // params - ["value", propName], ["get", prop]], [ + ['value', propName], ['get', prop]], [ // hash - "activeClass", activeClass, "inactiveClass", inactiveClass]]); + 'activeClass', activeClass, 'inactiveClass', inactiveClass]]); } } function validateTaglessComponent(component) { - Ember.assert("You cannot use `classNameBindings` on a tag-less component: " + component.toString(), function () { + Ember.assert('You cannot use `classNameBindings` on a tag-less component: ' + component.toString(), function () { var classNameBindings = component.classNameBindings; return !classNameBindings || classNameBindings.length === 0; }); } }); enifed("ember-views/system/event_dispatcher", ["exports", "ember-metal/core", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/is_none", "ember-metal/run_loop", "ember-runtime/system/string", "ember-runtime/system/object", "ember-views/system/jquery", "ember-views/system/action_manager", "ember-views/views/view", "ember-metal/merge"], function (exports, _emberMetalCore, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalIs_none, _emberMetalRun_loop, _emberRuntimeSystemString, _emberRuntimeSystemObject, _emberViewsSystemJquery, _emberViewsSystemAction_manager, _emberViewsViewsView, _emberMetalMerge) { + /** + @module ember + @submodule ember-views + */ + "use strict"; /** `Ember.EventDispatcher` handles delegating browser events to their corresponding `Ember.Views.` For example, when you click on a view, `Ember.EventDispatcher` ensures that that view's `mouseDown` method gets @@ -44755,37 +45398,37 @@ @property events @type Object @private */ 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" + 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' }, /** The root DOM element to which event listeners should be attached. Event listeners will be attached to the document unless this is overridden. @@ -44795,11 +45438,11 @@ @private @property rootElement @type DOMElement @default 'body' */ - rootElement: "body", + rootElement: 'body', /** It enables events to be dispatched to the view's `eventManager.` When present, this object takes precedence over handling of events on the view itself. Note that most Ember applications do not use this feature. If your app also @@ -44836,27 +45479,27 @@ @method setup @param addedEvents {Object} */ setup: function (addedEvents, rootElement) { var event; - var events = _emberMetalProperty_get.get(this, "events"); + var events = _emberMetalProperty_get.get(this, 'events'); _emberMetalMerge["default"](events, addedEvents || {}); if (!_emberMetalIs_none["default"](rootElement)) { - _emberMetalProperty_set.set(this, "rootElement", rootElement); + _emberMetalProperty_set.set(this, 'rootElement', rootElement); } - rootElement = _emberViewsSystemJquery["default"](_emberMetalProperty_get.get(this, "rootElement")); + rootElement = _emberViewsSystemJquery["default"](_emberMetalProperty_get.get(this, 'rootElement')); - _emberMetalCore["default"].assert(_emberRuntimeSystemString.fmt("You cannot use the same root element (%@) multiple times in an Ember.Application", [rootElement.selector || rootElement[0].tagName]), !rootElement.is(".ember-application")); - _emberMetalCore["default"].assert("You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application", !rootElement.closest(".ember-application").length); - _emberMetalCore["default"].assert("You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application", !rootElement.find(".ember-application").length); + _emberMetalCore["default"].assert(_emberRuntimeSystemString.fmt('You cannot use the same root element (%@) multiple times in an Ember.Application', [rootElement.selector || rootElement[0].tagName]), !rootElement.is('.ember-application')); + _emberMetalCore["default"].assert('You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application', !rootElement.closest('.ember-application').length); + _emberMetalCore["default"].assert('You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application', !rootElement.find('.ember-application').length); - rootElement.addClass("ember-application"); + rootElement.addClass('ember-application'); - _emberMetalCore["default"].assert("Unable to add \"ember-application\" class to rootElement. Make sure you set rootElement to the body or an element in the body.", rootElement.is(".ember-application")); + _emberMetalCore["default"].assert('Unable to add "ember-application" class to rootElement. Make sure you set rootElement to the body or an element in the body.', rootElement.is('.ember-application')); for (event in events) { if (events.hasOwnProperty(event)) { this.setupHandler(rootElement, event, events[event]); } @@ -44875,13 +45518,13 @@ @param {String} event the browser-originated event to listen to @param {String} eventName the name of the method to call on the view */ setupHandler: function (rootElement, event, eventName) { var self = this; - var viewRegistry = this.container && this.container.lookup("-view-registry:main") || _emberViewsViewsView["default"].views; + var viewRegistry = this.container && this.container.lookup('-view-registry:main') || _emberViewsViewsView["default"].views; - rootElement.on(event + ".ember", ".ember-view", function (evt, triggeringManager) { + rootElement.on(event + '.ember', '.ember-view', function (evt, triggeringManager) { var view = viewRegistry[this.id]; var result = true; var manager = self.canDispatchToEventManager ? self._findNearestEventManager(view, eventName) : null; @@ -44892,12 +45535,12 @@ } return result; }); - rootElement.on(event + ".ember", "[data-ember-action]", function (evt) { - var actionId = _emberViewsSystemJquery["default"](evt.currentTarget).attr("data-ember-action"); + rootElement.on(event + '.ember', '[data-ember-action]', function (evt) { + var actionId = _emberViewsSystemJquery["default"](evt.currentTarget).attr('data-ember-action'); var actions = _emberViewsSystemAction_manager["default"].registeredActions[actionId]; // We have to check for actions here since in some cases, jQuery will trigger // an event on `removeChild` (i.e. focusout) after we've already torn down the // action handlers for the view. @@ -44917,26 +45560,26 @@ _findNearestEventManager: function (view, eventName) { var manager = null; while (view) { - manager = _emberMetalProperty_get.get(view, "eventManager"); + manager = _emberMetalProperty_get.get(view, 'eventManager'); if (manager && manager[eventName]) { break; } - view = _emberMetalProperty_get.get(view, "parentView"); + view = _emberMetalProperty_get.get(view, 'parentView'); } return manager; }, _dispatchEvent: function (object, evt, eventName, view) { var result = true; var handler = object[eventName]; - if (typeof handler === "function") { + if (typeof handler === 'function') { result = _emberMetalRun_loop["default"](object, handler, evt, view); // Do not preventDefault in eventManagers. evt.stopPropagation(); } else { result = this._bubbleEvent(view, evt, eventName); @@ -44948,49 +45591,48 @@ _bubbleEvent: function (view, evt, eventName) { return _emberMetalRun_loop["default"].join(view, view.handleEvent, eventName, evt); }, destroy: function () { - var rootElement = _emberMetalProperty_get.get(this, "rootElement"); - _emberViewsSystemJquery["default"](rootElement).off(".ember", "**").removeClass("ember-application"); + var rootElement = _emberMetalProperty_get.get(this, 'rootElement'); + _emberViewsSystemJquery["default"](rootElement).off('.ember', '**').removeClass('ember-application'); return this._super.apply(this, arguments); }, toString: function () { - return "(EventDispatcher)"; + return '(EventDispatcher)'; } }); }); -/** -@module ember -@submodule ember-views -*/ // Ember.assert enifed('ember-views/system/ext', ['exports', 'ember-metal/run_loop'], function (exports, _emberMetalRun_loop) { + /** + @module ember + @submodule ember-views + */ + 'use strict'; + // Add a new named queue for rendering views that happens // after bindings have synced, and a queue for scheduling actions // that that should occur after view rendering. _emberMetalRun_loop["default"]._addQueue('render', 'actions'); _emberMetalRun_loop["default"]._addQueue('afterRender', 'render'); }); -/** -@module ember -@submodule ember-views -*/ enifed('ember-views/system/jquery', ['exports', 'ember-metal/core', 'ember-metal/enumerable_utils', 'ember-metal/environment'], function (exports, _emberMetalCore, _emberMetalEnumerable_utils, _emberMetalEnvironment) { + 'use strict'; var jQuery; if (_emberMetalEnvironment["default"].hasDOM) { // mainContext is set in `package/loader/lib/main.js` to the `this` context before entering strict mode jQuery = _emberMetalCore["default"].imports && _emberMetalCore["default"].imports.jQuery || mainContext && mainContext.jQuery; //jshint ignore:line if (!jQuery && typeof eriuqer === 'function') { jQuery = eriuqer('jquery'); } - _emberMetalCore["default"].assert('Ember Views require jQuery between 1.7 and 2.1', jQuery && (jQuery().jquery.match(/^((1\.(7|8|9|10|11))|(2\.(0|1)))(\.\d+)?(pre|rc\d?)?/) || _emberMetalCore["default"].ENV.FORCE_JQUERY)); + _emberMetalCore["default"].assert("Ember Views require jQuery between 1.7 and 2.1", jQuery && (jQuery().jquery.match(/^((1\.(7|8|9|10|11))|(2\.(0|1)))(\.\d+)?(pre|rc\d?)?/) || _emberMetalCore["default"].ENV.FORCE_JQUERY)); if (jQuery) { // http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dndevents var dragEvents = ['dragstart', 'drag', 'dragenter', 'dragleave', 'dragover', 'drop', 'dragend']; @@ -45008,10 +45650,12 @@ }); // Ember.assert // ES6TODO: the functions on EnumerableUtils need their own exports enifed("ember-views/system/lookup_partial", ["exports", "ember-metal/core", "ember-metal/error"], function (exports, _emberMetalCore, _emberMetalError) { + "use strict"; + exports["default"] = lookupPartial; function lookupPartial(env, templateName) { if (templateName == null) { return; @@ -45020,33 +45664,34 @@ var nameParts = templateName.split("/"); var lastPart = nameParts[nameParts.length - 1]; nameParts[nameParts.length - 1] = "_" + lastPart; - var underscoredName = nameParts.join("/"); + var underscoredName = nameParts.join('/'); var template = templateFor(env, underscoredName, templateName); - _emberMetalCore["default"].assert("Unable to find partial with name \"" + templateName + "\"", !!template); + _emberMetalCore["default"].assert('Unable to find partial with name "' + templateName + '"', !!template); return template; } function templateFor(env, underscored, name) { if (!name) { return; } - _emberMetalCore["default"].assert("templateNames are not allowed to contain periods: " + name, name.indexOf(".") === -1); + _emberMetalCore["default"].assert("templateNames are not allowed to contain periods: " + name, name.indexOf('.') === -1); if (!env.container) { - throw new _emberMetalError["default"]("Container was not found when looking up a views template. " + "This is most likely due to manually instantiating an Ember.View. " + "See: http://git.io/EKPpnA"); + throw new _emberMetalError["default"]('Container was not found when looking up a views template. ' + 'This is most likely due to manually instantiating an Ember.View. ' + 'See: http://git.io/EKPpnA'); } - return env.container.lookup("template:" + underscored) || env.container.lookup("template:" + name); + return env.container.lookup('template:' + underscored) || env.container.lookup('template:' + name); } }); // Ember.assert enifed('ember-views/system/platform', ['exports', 'ember-metal/environment'], function (exports, _emberMetalEnvironment) { + 'use strict'; // IE 6/7 have bugs around setting names on inputs during creation. // From http://msdn.microsoft.com/en-us/library/ie/ms536389(v=vs.85).aspx: // "To include the NAME attribute at run time on objects created with the createElement method, use the eTag." var canSetNameOnInputs = _emberMetalEnvironment["default"].hasDOM && (function () { @@ -45059,18 +45704,21 @@ return !!div.innerHTML.match('foo'); })(); exports.canSetNameOnInputs = canSetNameOnInputs; }); enifed("ember-views/system/utils", ["exports"], function (exports) { - exports.isSimpleClick = isSimpleClick; - exports.getViewClientRects = getViewClientRects; - exports.getViewBoundingClientRect = getViewBoundingClientRect; /** @module ember @submodule ember-views */ + "use strict"; + + exports.isSimpleClick = isSimpleClick; + exports.getViewClientRects = getViewClientRects; + exports.getViewBoundingClientRect = getViewBoundingClientRect; + function isSimpleClick(event) { var modifier = event.shiftKey || event.metaKey || event.altKey || event.ctrlKey; var secondaryClick = event.which > 1; // IE9 may return undefined return !modifier && !secondaryClick; @@ -45121,10 +45769,11 @@ var range = getViewRange(view); return range.getBoundingClientRect(); } }); enifed("ember-views/views/checkbox", ["exports", "ember-metal/property_get", "ember-metal/property_set", "ember-views/views/view"], function (exports, _emberMetalProperty_get, _emberMetalProperty_set, _emberViewsViewsView) { + "use strict"; /** @module ember @submodule ember-views */ @@ -45154,40 +45803,46 @@ @extends Ember.View @public */ // 2.0TODO: Subclass Component rather than View exports["default"] = _emberViewsViewsView["default"].extend({ - instrumentDisplay: "{{input type=\"checkbox\"}}", + instrumentDisplay: '{{input type="checkbox"}}', - classNames: ["ember-checkbox"], + classNames: ['ember-checkbox'], - tagName: "input", + tagName: 'input', - attributeBindings: ["type", "checked", "indeterminate", "disabled", "tabindex", "name", "autofocus", "required", "form"], + attributeBindings: ['type', 'checked', 'indeterminate', 'disabled', 'tabindex', 'name', 'autofocus', 'required', 'form'], - type: "checkbox", + type: 'checkbox', checked: false, disabled: false, indeterminate: false, init: function () { this._super.apply(this, arguments); - this.on("change", this, this._updateElementValue); + this.on('change', this, this._updateElementValue); }, didInsertElement: function () { this._super.apply(this, arguments); - _emberMetalProperty_get.get(this, "element").indeterminate = !!_emberMetalProperty_get.get(this, "indeterminate"); + _emberMetalProperty_get.get(this, 'element').indeterminate = !!_emberMetalProperty_get.get(this, 'indeterminate'); }, _updateElementValue: function () { - _emberMetalProperty_set.set(this, "checked", this.$().prop("checked")); + _emberMetalProperty_set.set(this, 'checked', this.$().prop('checked')); } }); }); enifed("ember-views/views/collection_view", ["exports", "ember-metal/core", "ember-views/views/container_view", "ember-views/views/view", "ember-runtime/mixins/array", "ember-metal/property_get", "ember-metal/property_set", "ember-runtime/system/string", "ember-metal/computed", "ember-metal/mixin", "ember-views/streams/utils", "ember-views/mixins/empty_view_support"], function (exports, _emberMetalCore, _emberViewsViewsContainer_view, _emberViewsViewsView, _emberRuntimeMixinsArray, _emberMetalProperty_get, _emberMetalProperty_set, _emberRuntimeSystemString, _emberMetalComputed, _emberMetalMixin, _emberViewsStreamsUtils, _emberViewsMixinsEmpty_view_support) { + /** + @module ember + @submodule ember-views + */ + "use strict"; + /** `Ember.CollectionView` is an `Ember.View` descendent responsible for managing a collection (an array or array-like object) by maintaining a child view object and associated DOM representation for each item in the array and ensuring that child views and their associated rendered HTML are updated when items in @@ -45385,17 +46040,17 @@ Invoked when the content property is about to change. Notifies observers that the entire array content will change. @private @method _contentWillChange */ - _contentWillChange: _emberMetalMixin._beforeObserver("content", function () { - var content = this.get("content"); + _contentWillChange: _emberMetalMixin._beforeObserver('content', function () { + var content = this.get('content'); if (content) { content.removeArrayObserver(this); } - var len = content ? _emberMetalProperty_get.get(content, "length") : 0; + var len = content ? _emberMetalProperty_get.get(content, 'length') : 0; this.arrayWillChange(content, 0, len); }), /** Check to make sure that the content has changed, and if so, @@ -45403,19 +46058,19 @@ asynchronously, to allow the element to be created before bindings have synchronized and vice versa. @private @method _contentDidChange */ - _contentDidChange: _emberMetalMixin.observer("content", function () { - var content = _emberMetalProperty_get.get(this, "content"); + _contentDidChange: _emberMetalMixin.observer('content', function () { + var content = _emberMetalProperty_get.get(this, 'content'); if (content) { this._assertArrayLike(content); content.addArrayObserver(this); } - var len = content ? _emberMetalProperty_get.get(content, "length") : 0; + var len = content ? _emberMetalProperty_get.get(content, 'length') : 0; this.arrayDidChange(content, 0, null, len); }), /** Ensure that the content implements Ember.Array @@ -45434,11 +46089,11 @@ destroy: function () { if (!this._super.apply(this, arguments)) { return; } - var content = _emberMetalProperty_get.get(this, "content"); + var content = _emberMetalProperty_get.get(this, 'content'); if (content) { content.removeArrayObserver(this); } if (this._createdEmptyView) { @@ -45477,21 +46132,21 @@ */ arrayDidChange: function (content, start, removed, added) { var addedViews = []; var view, item, idx, len, itemViewClass, itemViewProps; - len = content ? _emberMetalProperty_get.get(content, "length") : 0; + len = content ? _emberMetalProperty_get.get(content, 'length') : 0; if (len) { itemViewProps = this._itemViewProps || {}; - itemViewClass = this.getAttr("itemViewClass") || _emberMetalProperty_get.get(this, "itemViewClass"); + itemViewClass = this.getAttr('itemViewClass') || _emberMetalProperty_get.get(this, 'itemViewClass'); itemViewClass = _emberViewsStreamsUtils.readViewFactory(itemViewClass, this.container); for (idx = start; idx < start + added; idx++) { item = content.objectAt(idx); - itemViewProps._context = this.keyword ? this.get("context") : item; + itemViewProps._context = this.keyword ? this.get('context') : item; itemViewProps.content = item; itemViewProps.contentIndex = idx; view = this.createChildView(itemViewClass, itemViewProps); @@ -45517,42 +46172,42 @@ @private */ createChildView: function (_view, attrs) { var view = this._super(_view, attrs); - var itemTagName = _emberMetalProperty_get.get(view, "tagName"); + var itemTagName = _emberMetalProperty_get.get(view, 'tagName'); if (itemTagName === null || itemTagName === undefined) { - itemTagName = CollectionView.CONTAINER_MAP[_emberMetalProperty_get.get(this, "tagName")]; - _emberMetalProperty_set.set(view, "tagName", itemTagName); + itemTagName = CollectionView.CONTAINER_MAP[_emberMetalProperty_get.get(this, 'tagName')]; + _emberMetalProperty_set.set(view, 'tagName', itemTagName); } return view; }, _willRender: function () { var attrs = this.attrs; var itemProps = buildItemViewProps(this._itemViewTemplate, attrs); this._itemViewProps = itemProps; - var childViews = _emberMetalProperty_get.get(this, "childViews"); + var childViews = _emberMetalProperty_get.get(this, 'childViews'); for (var i = 0, l = childViews.length; i < l; i++) { childViews[i].setProperties(itemProps); } - if ("content" in attrs) { - _emberMetalProperty_set.set(this, "content", this.getAttr("content")); + if ('content' in attrs) { + _emberMetalProperty_set.set(this, 'content', this.getAttr('content')); } - if ("emptyView" in attrs) { - _emberMetalProperty_set.set(this, "emptyView", this.getAttr("emptyView")); + if ('emptyView' in attrs) { + _emberMetalProperty_set.set(this, 'emptyView', this.getAttr('emptyView')); } }, - _emptyViewTagName: _emberMetalComputed.computed("tagName", function () { - var tagName = _emberMetalProperty_get.get(this, "tagName"); - return CollectionView.CONTAINER_MAP[tagName] || "div"; + _emptyViewTagName: _emberMetalComputed.computed('tagName', function () { + var tagName = _emberMetalProperty_get.get(this, 'tagName'); + return CollectionView.CONTAINER_MAP[tagName] || 'div'; }) }); /** A map of parent tags to their default child tags. You can add @@ -45564,18 +46219,18 @@ @static @final @private */ CollectionView.CONTAINER_MAP = { - ul: "li", - ol: "li", - table: "tr", - thead: "tr", - tbody: "tr", - tfoot: "tr", - tr: "td", - select: "option" + ul: 'li', + ol: 'li', + table: 'tr', + thead: 'tr', + tbody: 'tr', + tfoot: 'tr', + tr: 'td', + select: 'option' }; var CONTAINER_MAP = CollectionView.CONTAINER_MAP; exports.CONTAINER_MAP = CONTAINER_MAP; @@ -45583,19 +46238,19 @@ var props = {}; // Go through options passed to the {{collection}} helper and extract options // that configure item views instead of the collection itself. for (var prop in attrs) { - if (prop === "itemViewClass" || prop === "itemController" || prop === "itemClassBinding") { + if (prop === 'itemViewClass' || prop === 'itemController' || prop === 'itemClassBinding') { continue; } if (attrs.hasOwnProperty(prop)) { var match = prop.match(/^item(.)(.*)$/); if (match) { var childProp = match[1].toLowerCase() + match[2]; - if (childProp === "class" || childProp === "classNames") { + if (childProp === 'class' || childProp === 'classNames') { props.classNames = [attrs[prop]]; } else { props[childProp] = attrs[prop]; } @@ -45609,25 +46264,45 @@ } return props; } + function viewDeprecationMessage() { + _emberMetalCore["default"].deprecate("Ember.CollectionView is deprecated. Consult the Deprecations Guide for a migration strategy.", !!_emberMetalCore["default"].ENV._ENABLE_LEGACY_VIEW_SUPPORT, { + url: 'http://emberjs.com/deprecations/v1.x/#toc_ember-collectionview', + id: 'ember-views.collection-view-deprecated', + until: '2.4.0' + }); + } + + var DeprecatedCollectionView = CollectionView.extend({ + init: function () { + viewDeprecationMessage(); + this._super.apply(this, arguments); + } + }); + + DeprecatedCollectionView.reopen = function () { + viewDeprecationMessage(); + CollectionView.reopen.apply(CollectionView, arguments); + return this; + }; + + DeprecatedCollectionView.CONTAINER_MAP = CONTAINER_MAP; + exports["default"] = CollectionView; + exports.DeprecatedCollectionView = DeprecatedCollectionView; }); -/** -@module ember -@submodule ember-views -*/ - // Ember.assert enifed("ember-views/views/component", ["exports", "ember-metal/core", "ember-views/mixins/component_template_deprecation", "ember-runtime/mixins/target_action_support", "ember-views/views/view", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/is_none", "ember-metal/computed", "ember-views/compat/attrs-proxy"], function (exports, _emberMetalCore, _emberViewsMixinsComponent_template_deprecation, _emberRuntimeMixinsTarget_action_support, _emberViewsViewsView, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalIs_none, _emberMetalComputed, _emberViewsCompatAttrsProxy) { + "use strict"; function validateAction(component, actionName) { if (actionName && actionName[_emberViewsCompatAttrsProxy.MUTABLE_CELL]) { actionName = actionName.value; } - _emberMetalCore["default"].assert("The default action was triggered on the component " + component.toString() + ", but the action name (" + actionName + ") was not a string.", _emberMetalIs_none["default"](actionName) || typeof actionName === "string" || typeof actionName === "function"); + _emberMetalCore["default"].assert("The default action was triggered on the component " + component.toString() + ", but the action name (" + actionName + ") was not a string.", _emberMetalIs_none["default"](actionName) || typeof actionName === 'string' || typeof actionName === 'function'); return actionName; } /** @module ember @@ -45727,21 +46402,21 @@ think that it should set the components `context` to that of the parent view. */ controller: null, context: null, - instrumentName: "component", + instrumentName: 'component', instrumentDisplay: _emberMetalComputed.computed(function () { if (this._debugContainerKey) { - return "{{" + this._debugContainerKey.split(":")[1] + "}}"; + return '{{' + this._debugContainerKey.split(':')[1] + '}}'; } }), init: function () { this._super.apply(this, arguments); - _emberMetalProperty_set.set(this, "controller", this); - _emberMetalProperty_set.set(this, "context", this); + _emberMetalProperty_set.set(this, 'controller', this); + _emberMetalProperty_set.set(this, 'context', this); }, /** A components template property is set by passing a block during its invocation. It is executed within the parent context. @@ -45756,32 +46431,32 @@ also specifying the layout property. @deprecated @property template @public */ - template: _emberMetalComputed.computed("_template", { + template: _emberMetalComputed.computed('_template', { get: function () { _emberMetalCore["default"].deprecate("Accessing 'template' in " + this + " is deprecated. To determine if a block was specified to " + this + " please use '{{#if hasBlock}}' in the components layout."); - return _emberMetalProperty_get.get(this, "_template"); + return _emberMetalProperty_get.get(this, '_template'); }, set: function (key, value) { - return _emberMetalProperty_set.set(this, "_template", value); + return _emberMetalProperty_set.set(this, '_template', value); } }), - _template: _emberMetalComputed.computed("templateName", { + _template: _emberMetalComputed.computed('templateName', { get: function () { - if (_emberMetalProperty_get.get(this, "_deprecatedFlagForBlockProvided")) { + if (_emberMetalProperty_get.get(this, '_deprecatedFlagForBlockProvided')) { return true; } - var templateName = _emberMetalProperty_get.get(this, "templateName"); - var template = this.templateForName(templateName, "template"); + var templateName = _emberMetalProperty_get.get(this, 'templateName'); + var template = this.templateForName(templateName, 'template'); _emberMetalCore["default"].assert("You specified the templateName " + templateName + " for " + this + ", but it did not exist.", !templateName || !!template); - return template || _emberMetalProperty_get.get(this, "defaultTemplate"); + return template || _emberMetalProperty_get.get(this, 'defaultTemplate'); }, set: function (key, value) { return value; } }), @@ -45801,19 +46476,19 @@ @property targetObject @type Ember.Controller @default null @private */ - targetObject: _emberMetalComputed.computed("controller", function (key) { + targetObject: _emberMetalComputed.computed('controller', function (key) { if (this._targetObject) { return this._targetObject; } if (this._controller) { return this._controller; } - var parentView = _emberMetalProperty_get.get(this, "parentView"); - return parentView ? _emberMetalProperty_get.get(parentView, "controller") : null; + var parentView = _emberMetalProperty_get.get(this, 'parentView'); + return parentView ? _emberMetalProperty_get.get(parentView, 'controller') : null; }), /** Calls a action passed to a component. For example a component for playing or pausing music may translate click events @@ -45882,29 +46557,29 @@ @param [action] {String} the action to call @param [params] {*} arguments for the action @public */ sendAction: function (action) { + for (var _len = arguments.length, contexts = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + contexts[_key - 1] = arguments[_key]; + } + var actionName; // Send the default action if (action === undefined) { - action = "action"; + action = 'action'; } - actionName = _emberMetalProperty_get.get(this, "attrs." + action) || _emberMetalProperty_get.get(this, action); + actionName = _emberMetalProperty_get.get(this, 'attrs.' + action) || _emberMetalProperty_get.get(this, action); actionName = validateAction(this, actionName); // If no action name for that action could be found, just abort. if (actionName === undefined) { return; } - for (var _len = arguments.length, contexts = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - contexts[_key - 1] = arguments[_key]; - } - - if (typeof actionName === "function") { + if (typeof actionName === 'function') { actionName.apply(null, contexts); } else { this.triggerAction({ action: actionName, actionContext: contexts @@ -45925,16 +46600,18 @@ if (!shouldBubble) { return; } } - if (target = _emberMetalProperty_get.get(this, "target")) { - _emberMetalCore["default"].assert("The `target` for " + this + " (" + target + ") does not have a `send` method", typeof target.send === "function"); - target.send.apply(target, arguments); + if (target = _emberMetalProperty_get.get(this, 'target')) { + var _target; + + _emberMetalCore["default"].assert("The `target` for " + this + " (" + target + ") does not have a `send` method", typeof target.send === 'function'); + (_target = target).send.apply(_target, arguments); } else { if (!hasAction) { - throw new Error(_emberMetalCore["default"].inspect(this) + " had no action handler for: " + actionName); + throw new Error(_emberMetalCore["default"].inspect(this) + ' had no action handler for: ' + actionName); } } } /** @@ -46004,12 +46681,14 @@ exports["default"] = Component; }); // Ember.assert, Ember.Handlebars enifed("ember-views/views/container_view", ["exports", "ember-metal/core", "ember-runtime/mixins/mutable_array", "ember-views/views/view", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/enumerable_utils", "ember-metal/mixin", "ember-metal/events", "ember-htmlbars/templates/container-view"], function (exports, _emberMetalCore, _emberRuntimeMixinsMutable_array, _emberViewsViewsView, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalEnumerable_utils, _emberMetalMixin, _emberMetalEvents, _emberHtmlbarsTemplatesContainerView) { - _emberHtmlbarsTemplatesContainerView["default"].meta.revision = "Ember@1.13.5"; + "use strict"; + _emberHtmlbarsTemplatesContainerView["default"].meta.revision = 'Ember@1.13.6'; + /** @module ember @submodule ember-views */ @@ -46160,51 +46839,52 @@ representation will only be the rendered HTML of its child views. @class ContainerView @namespace Ember @extends Ember.View + @deprecated See http://emberjs.com/deprecations/v1.x/#toc_ember-containerview @private */ var ContainerView = _emberViewsViewsView["default"].extend(_emberRuntimeMixinsMutable_array["default"], { willWatchProperty: function (prop) { - _emberMetalCore["default"].deprecate("ContainerViews should not be observed as arrays. This behavior will change in future implementations of ContainerView.", !prop.match(/\[]/) && prop.indexOf("@") !== 0); + _emberMetalCore["default"].deprecate("ContainerViews should not be observed as arrays. This behavior will change in future implementations of ContainerView.", !prop.match(/\[]/) && prop.indexOf('@') !== 0); }, init: function () { this._super.apply(this, arguments); - var userChildViews = _emberMetalProperty_get.get(this, "childViews"); - _emberMetalCore["default"].deprecate("Setting `childViews` on a Container is deprecated.", _emberMetalCore["default"].isEmpty(userChildViews)); + var userChildViews = _emberMetalProperty_get.get(this, 'childViews'); + _emberMetalCore["default"].deprecate('Setting `childViews` on a Container is deprecated.', _emberMetalCore["default"].isEmpty(userChildViews)); // redefine view's childViews property that was obliterated // 2.0TODO: Don't Ember.A() this so users disabling prototype extensions // don't pay a penalty. var childViews = this.childViews = _emberMetalCore["default"].A([]); _emberMetalEnumerable_utils.forEach(userChildViews, function (viewName, idx) { var view; - if ("string" === typeof viewName) { + if ('string' === typeof viewName) { view = _emberMetalProperty_get.get(this, viewName); view = this.createChildView(view); _emberMetalProperty_set.set(this, viewName, view); } else { view = this.createChildView(viewName); } childViews[idx] = view; }, this); - var currentView = _emberMetalProperty_get.get(this, "currentView"); + var currentView = _emberMetalProperty_get.get(this, 'currentView'); if (currentView) { if (!childViews.length) { childViews = this.childViews = _emberMetalCore["default"].A(this.childViews.slice()); } childViews.push(this.createChildView(currentView)); } - _emberMetalProperty_set.set(this, "length", childViews.length); + _emberMetalProperty_set.set(this, 'length', childViews.length); }, // Normally parentView and childViews are managed at render time. However, // the ContainerView is an unusual legacy case. People expect to be able to // push a child view into the ContainerView and have its parentView set @@ -46216,19 +46896,19 @@ if (view.parentView !== this) { this.linkChild(view); } }, - _currentViewWillChange: _emberMetalMixin._beforeObserver("currentView", function () { - var currentView = _emberMetalProperty_get.get(this, "currentView"); + _currentViewWillChange: _emberMetalMixin._beforeObserver('currentView', function () { + var currentView = _emberMetalProperty_get.get(this, 'currentView'); if (currentView) { currentView.destroy(); } }), - _currentViewDidChange: _emberMetalMixin.observer("currentView", function () { - var currentView = _emberMetalProperty_get.get(this, "currentView"); + _currentViewDidChange: _emberMetalMixin.observer('currentView', function () { + var currentView = _emberMetalProperty_get.get(this, 'currentView'); if (currentView) { _emberMetalCore["default"].assert("You tried to set a current view that already has a parent. Make sure you don't have multiple outlets in the same view.", !currentView.parentView); this.pushObject(currentView); } }), @@ -46238,12 +46918,12 @@ replace: function (idx, removedCount) { var _this = this; var addedViews = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2]; - var addedCount = _emberMetalProperty_get.get(addedViews, "length"); - var childViews = _emberMetalProperty_get.get(this, "childViews"); + var addedCount = _emberMetalProperty_get.get(addedViews, 'length'); + var childViews = _emberMetalProperty_get.get(this, 'childViews'); _emberMetalCore["default"].assert("You can't add a child to a container - the child is already a child of another view", function () { for (var i = 0, l = addedViews.length; i < l; i++) { var item = addedViews[i]; if (item.parentView && item.parentView !== _this) { @@ -46271,46 +46951,69 @@ return _this.linkChild(view); }); childViews.splice.apply(childViews, [idx, removedCount].concat(addedViews)); - this.notifyPropertyChange("childViews"); + this.notifyPropertyChange('childViews'); this.arrayContentDidChange(idx, removedCount, addedCount); //Ember.assert("You can't add a child to a container - the child is already a child of another view", emberA(addedViews).every(function(item) { return !item.parentView || item.parentView === self; })); - _emberMetalProperty_set.set(this, "length", childViews.length); + _emberMetalProperty_set.set(this, 'length', childViews.length); return this; }, objectAt: function (idx) { return this.childViews[idx]; }, - _triggerChildWillDestroyElement: _emberMetalEvents.on("willDestroyElement", function () { + _triggerChildWillDestroyElement: _emberMetalEvents.on('willDestroyElement', function () { var childViews = this.childViews; if (childViews) { for (var i = 0; i < childViews.length; i++) { this.renderer.willDestroyElement(childViews[i]); } } }), - _triggerChildDidDestroyElement: _emberMetalEvents.on("didDestroyElement", function () { + _triggerChildDidDestroyElement: _emberMetalEvents.on('didDestroyElement', function () { var childViews = this.childViews; if (childViews) { for (var i = 0; i < childViews.length; i++) { this.renderer.didDestroyElement(childViews[i]); } } }) }); + function containerViewDeprecationMessage() { + _emberMetalCore["default"].deprecate('Ember.ContainerView is deprecated.', !!_emberMetalCore["default"].ENV._ENABLE_LEGACY_VIEW_SUPPORT, { + url: 'http://emberjs.com/deprecations/v1.x/#toc_ember-containerview', + id: 'ember-views.container-view', + until: '2.4.0' + }); + } + + var DeprecatedContainerView = ContainerView.extend({ + init: function () { + containerViewDeprecationMessage(); + this._super.apply(this, arguments); + } + }); + + exports.DeprecatedContainerView = DeprecatedContainerView; + DeprecatedContainerView.reopen = function () { + containerViewDeprecationMessage(); + ContainerView.reopen.apply(ContainerView, arguments); + return this; + }; + exports["default"] = ContainerView; }); enifed("ember-views/views/core_view", ["exports", "ember-metal-views/renderer", "ember-views/views/states", "ember-runtime/system/object", "ember-runtime/mixins/evented", "ember-runtime/mixins/action_handler", "ember-metal/property_get", "ember-runtime/utils", "htmlbars-runtime"], function (exports, _emberMetalViewsRenderer, _emberViewsViewsStates, _emberRuntimeSystemObject, _emberRuntimeMixinsEvented, _emberRuntimeMixinsAction_handler, _emberMetalProperty_get, _emberRuntimeUtils, _htmlbarsRuntime) { + "use strict"; function K() { return this; } @@ -46342,13 +47045,13 @@ _states: _emberViewsViewsStates.cloneStates(_emberViewsViewsStates.states), init: function () { this._super.apply(this, arguments); - this._state = "preRender"; + this._state = 'preRender'; this.currentState = this._states.preRender; - this._isVisible = _emberMetalProperty_get.get(this, "isVisible"); + this._isVisible = _emberMetalProperty_get.get(this, 'isVisible'); // Fallback for legacy cases where the view was created directly // via `create()` instead of going through the container. if (!this.renderer) { var DOMHelper = domHelper(); @@ -46370,11 +47073,11 @@ */ parentView: null, _state: null, - instrumentName: "core_view", + instrumentName: 'core_view', instrumentDetails: function (hash) { hash.object = this.toString(); hash.containerKey = this._debugContainerKey; hash.view = this; @@ -46400,11 +47103,11 @@ return method.apply(this, args); } }, has: function (name) { - return _emberRuntimeUtils.typeOf(this[name]) === "function" || this._super(name); + return _emberRuntimeUtils.typeOf(this[name]) === 'function' || this._super(name); }, destroy: function () { if (!this._super.apply(this, arguments)) { return; @@ -46417,11 +47120,11 @@ // code and not via a change in the templating layer (like an {{if}} // becoming falsy, for example). In this case, it is our responsibility to // make sure that any render nodes created as part of the rendering process // are cleaned up. if (!this.ownerView._destroyingSubtreeForView && this._renderNode) { - Ember.assert("BUG: Render node exists without concomitant env.", this.ownerView.env); + Ember.assert('BUG: Render node exists without concomitant env.', this.ownerView.env); _htmlbarsRuntime.internal.clearMorph(this._renderNode, this.ownerView.env, true); } return this; }, @@ -46435,77 +47138,86 @@ isViewFactory: true }); var DeprecatedCoreView = CoreView.extend({ init: function () { - Ember.deprecate("Ember.CoreView is deprecated. Please use Ember.View.", false); + Ember.deprecate('Ember.CoreView is deprecated. Please use Ember.View.', false); this._super.apply(this, arguments); } }); exports.DeprecatedCoreView = DeprecatedCoreView; var _domHelper; function domHelper() { - return _domHelper = _domHelper || Ember.__loader.require("ember-htmlbars/system/dom-helper")["default"]; + return _domHelper = _domHelper || Ember.__loader.require("ember-htmlbars/system/dom-helper")['default']; } exports["default"] = CoreView; }); enifed("ember-views/views/legacy_each_view", ["exports", "ember-htmlbars/templates/legacy-each", "ember-metal/property_get", "ember-metal/property_set", "ember-metal/computed", "ember-views/views/view", "ember-views/views/collection_view", "ember-views/mixins/empty_view_support"], function (exports, _emberHtmlbarsTemplatesLegacyEach, _emberMetalProperty_get, _emberMetalProperty_set, _emberMetalComputed, _emberViewsViewsView, _emberViewsViewsCollection_view, _emberViewsMixinsEmpty_view_support) { + //2.0TODO: Remove this in 2.0 + //This is a fallback path for the `{{#each}}` helper that supports deprecated + //behavior such as itemController. + + "use strict"; + exports["default"] = _emberViewsViewsView["default"].extend(_emberViewsMixinsEmpty_view_support["default"], { template: _emberHtmlbarsTemplatesLegacyEach["default"], - tagName: "", + tagName: '', _arrayController: _emberMetalComputed.computed(function () { - var itemController = this.getAttr("itemController"); - var controller = _emberMetalProperty_get.get(this, "container").lookupFactory("controller:array").create({ + var itemController = this.getAttr('itemController'); + var controller = _emberMetalProperty_get.get(this, 'container').lookupFactory('controller:array').create({ _isVirtual: true, - parentController: _emberMetalProperty_get.get(this, "controller"), + parentController: _emberMetalProperty_get.get(this, 'controller'), itemController: itemController, - target: _emberMetalProperty_get.get(this, "controller"), + target: _emberMetalProperty_get.get(this, 'controller'), _eachView: this, - content: this.getAttr("content") + content: this.getAttr('content') }); return controller; }), _willUpdate: function (attrs) { - var itemController = this.getAttrFor(attrs, "itemController"); + var itemController = this.getAttrFor(attrs, 'itemController'); if (itemController) { - var arrayController = _emberMetalProperty_get.get(this, "_arrayController"); - _emberMetalProperty_set.set(arrayController, "content", this.getAttrFor(attrs, "content")); + var arrayController = _emberMetalProperty_get.get(this, '_arrayController'); + _emberMetalProperty_set.set(arrayController, 'content', this.getAttrFor(attrs, 'content')); } }, - _arrangedContent: _emberMetalComputed.computed("attrs.content", function () { - if (this.getAttr("itemController")) { - return _emberMetalProperty_get.get(this, "_arrayController"); + _arrangedContent: _emberMetalComputed.computed('attrs.content', function () { + if (this.getAttr('itemController')) { + return _emberMetalProperty_get.get(this, '_arrayController'); } - return this.getAttr("content"); + return this.getAttr('content'); }), _itemTagName: _emberMetalComputed.computed(function () { - var tagName = _emberMetalProperty_get.get(this, "tagName"); + var tagName = _emberMetalProperty_get.get(this, 'tagName'); return _emberViewsViewsCollection_view.CONTAINER_MAP[tagName]; }) }); }); -//2.0TODO: Remove this in 2.0 -//This is a fallback path for the `{{#each}}` helper that supports deprecated -//behavior such as itemController. enifed("ember-views/views/select", ["exports", "ember-metal/enumerable_utils", "ember-metal/property_get", "ember-metal/property_set", "ember-views/views/view", "ember-runtime/utils", "ember-metal/is_none", "ember-metal/computed", "ember-runtime/system/native_array", "ember-metal/mixin", "ember-metal/properties", "ember-htmlbars/templates/select", "ember-htmlbars/templates/select-option", "ember-htmlbars/templates/select-optgroup"], function (exports, _emberMetalEnumerable_utils, _emberMetalProperty_get, _emberMetalProperty_set, _emberViewsViewsView, _emberRuntimeUtils, _emberMetalIs_none, _emberMetalComputed, _emberRuntimeSystemNative_array, _emberMetalMixin, _emberMetalProperties, _emberHtmlbarsTemplatesSelect, _emberHtmlbarsTemplatesSelectOption, _emberHtmlbarsTemplatesSelectOptgroup) { + /** + @module ember + @submodule ember-views + */ + "use strict"; + var defaultTemplate = _emberHtmlbarsTemplatesSelect["default"]; var SelectOption = _emberViewsViewsView["default"].extend({ - instrumentDisplay: "Ember.SelectOption", + instrumentDisplay: 'Ember.SelectOption', - tagName: "option", - attributeBindings: ["value", "selected"], + tagName: 'option', + attributeBindings: ['value', 'selected'], defaultTemplate: _emberHtmlbarsTemplatesSelectOption["default"], content: null, @@ -46513,38 +47225,38 @@ this.labelPathDidChange(); this.valuePathDidChange(); }, selected: _emberMetalComputed.computed(function () { - var value = _emberMetalProperty_get.get(this, "value"); - var selection = _emberMetalProperty_get.get(this, "attrs.selection"); - if (_emberMetalProperty_get.get(this, "attrs.multiple")) { + var value = _emberMetalProperty_get.get(this, 'value'); + var selection = _emberMetalProperty_get.get(this, 'attrs.selection'); + if (_emberMetalProperty_get.get(this, 'attrs.multiple')) { return selection && _emberMetalEnumerable_utils.indexOf(selection, value) > -1; } else { // Primitives get passed through bindings as objects... since // `new Number(4) !== 4`, we use `==` below - return value == _emberMetalProperty_get.get(this, "attrs.parentValue"); // jshint ignore:line + return value == _emberMetalProperty_get.get(this, 'attrs.parentValue'); // jshint ignore:line } - }).property("attrs.content", "attrs.selection"), + }).property('attrs.content', 'attrs.selection'), - labelPathDidChange: _emberMetalMixin.observer("attrs.optionLabelPath", function () { - var labelPath = _emberMetalProperty_get.get(this, "attrs.optionLabelPath"); - _emberMetalProperties.defineProperty(this, "label", _emberMetalComputed.computed.alias(labelPath)); + labelPathDidChange: _emberMetalMixin.observer('attrs.optionLabelPath', function () { + var labelPath = _emberMetalProperty_get.get(this, 'attrs.optionLabelPath'); + _emberMetalProperties.defineProperty(this, 'label', _emberMetalComputed.computed.alias(labelPath)); }), - valuePathDidChange: _emberMetalMixin.observer("attrs.optionValuePath", function () { - var valuePath = _emberMetalProperty_get.get(this, "attrs.optionValuePath"); - _emberMetalProperties.defineProperty(this, "value", _emberMetalComputed.computed.alias(valuePath)); + valuePathDidChange: _emberMetalMixin.observer('attrs.optionValuePath', function () { + var valuePath = _emberMetalProperty_get.get(this, 'attrs.optionValuePath'); + _emberMetalProperties.defineProperty(this, 'value', _emberMetalComputed.computed.alias(valuePath)); }) }); var SelectOptgroup = _emberViewsViewsView["default"].extend({ - instrumentDisplay: "Ember.SelectOptgroup", + instrumentDisplay: 'Ember.SelectOptgroup', - tagName: "optgroup", + tagName: 'optgroup', defaultTemplate: _emberHtmlbarsTemplatesSelectOptgroup["default"], - attributeBindings: ["label"] + attributeBindings: ['label'] }); /** The `Ember.Select` view class renders a [select](https://developer.mozilla.org/en/HTML/Element/select) HTML element, @@ -46786,16 +47498,16 @@ @extends Ember.View @public @deprecated See http://emberjs.com/deprecations/v1.x/#toc_ember-select */ var Select = _emberViewsViewsView["default"].extend({ - instrumentDisplay: "Ember.Select", + instrumentDisplay: 'Ember.Select', - tagName: "select", - classNames: ["ember-select"], + tagName: 'select', + classNames: ['ember-select'], defaultTemplate: defaultTemplate, - attributeBindings: ["autofocus", "autocomplete", "disabled", "form", "multiple", "name", "required", "size", "tabindex"], + attributeBindings: ['autofocus', 'autocomplete', 'disabled', 'form', 'multiple', 'name', 'required', 'size', 'tabindex'], /** The `multiple` attribute of the select element. Indicates whether multiple options can be selected. @property multiple @@ -46869,17 +47581,17 @@ @default null @public */ value: _emberMetalComputed.computed({ get: function (key) { - var valuePath = _emberMetalProperty_get.get(this, "_valuePath"); - return valuePath ? _emberMetalProperty_get.get(this, "selection." + valuePath) : _emberMetalProperty_get.get(this, "selection"); + var valuePath = _emberMetalProperty_get.get(this, '_valuePath'); + return valuePath ? _emberMetalProperty_get.get(this, 'selection.' + valuePath) : _emberMetalProperty_get.get(this, 'selection'); }, set: function (key, value) { return value; } - }).property("_valuePath", "selection"), + }).property('_valuePath', 'selection'), /** If given, a top-most dummy option will be rendered to serve as a user prompt. @property prompt @@ -46894,20 +47606,20 @@ @property optionLabelPath @type String @default 'content' @public */ - optionLabelPath: "content", + optionLabelPath: 'content', /** The path of the option values. See [content](/api/classes/Ember.Select.html#property_content). @property optionValuePath @type String @default 'content' @public */ - optionValuePath: "content", + optionValuePath: 'content', /** The path of the option group. When this property is used, `content` should be sorted by `optionGroupPath`. @property optionGroupPath @@ -46925,29 +47637,29 @@ @public */ groupView: SelectOptgroup, groupedContent: _emberMetalComputed.computed(function () { - var groupPath = _emberMetalProperty_get.get(this, "optionGroupPath"); + var groupPath = _emberMetalProperty_get.get(this, 'optionGroupPath'); var groupedContent = _emberRuntimeSystemNative_array.A(); - var content = _emberMetalProperty_get.get(this, "content") || []; + var content = _emberMetalProperty_get.get(this, 'content') || []; _emberMetalEnumerable_utils.forEach(content, function (item) { var label = _emberMetalProperty_get.get(item, groupPath); - if (_emberMetalProperty_get.get(groupedContent, "lastObject.label") !== label) { + if (_emberMetalProperty_get.get(groupedContent, 'lastObject.label') !== label) { groupedContent.pushObject({ label: label, content: _emberRuntimeSystemNative_array.A() }); } - _emberMetalProperty_get.get(groupedContent, "lastObject.content").push(item); + _emberMetalProperty_get.get(groupedContent, 'lastObject.content').push(item); }); return groupedContent; - }).property("optionGroupPath", "content.@each"), + }).property('optionGroupPath', 'content.@each'), /** The view class for option. @property optionView @type Ember.View @@ -46955,49 +47667,49 @@ @private */ optionView: SelectOption, _change: function (hasDOM) { - if (_emberMetalProperty_get.get(this, "multiple")) { + if (_emberMetalProperty_get.get(this, 'multiple')) { this._changeMultiple(hasDOM); } else { this._changeSingle(hasDOM); } }, - selectionDidChange: _emberMetalMixin.observer("selection.@each", function () { - var selection = _emberMetalProperty_get.get(this, "selection"); - if (_emberMetalProperty_get.get(this, "multiple")) { + selectionDidChange: _emberMetalMixin.observer('selection.@each', function () { + var selection = _emberMetalProperty_get.get(this, 'selection'); + if (_emberMetalProperty_get.get(this, 'multiple')) { if (!_emberRuntimeUtils.isArray(selection)) { - _emberMetalProperty_set.set(this, "selection", _emberRuntimeSystemNative_array.A([selection])); + _emberMetalProperty_set.set(this, 'selection', _emberRuntimeSystemNative_array.A([selection])); return; } this._selectionDidChangeMultiple(); } else { this._selectionDidChangeSingle(); } }), - valueDidChange: _emberMetalMixin.observer("value", function () { - var content = _emberMetalProperty_get.get(this, "content"); - var value = _emberMetalProperty_get.get(this, "value"); - var valuePath = _emberMetalProperty_get.get(this, "optionValuePath").replace(/^content\.?/, ""); - var selectedValue = valuePath ? _emberMetalProperty_get.get(this, "selection." + valuePath) : _emberMetalProperty_get.get(this, "selection"); + valueDidChange: _emberMetalMixin.observer('value', function () { + var content = _emberMetalProperty_get.get(this, 'content'); + var value = _emberMetalProperty_get.get(this, 'value'); + var valuePath = _emberMetalProperty_get.get(this, 'optionValuePath').replace(/^content\.?/, ''); + var selectedValue = valuePath ? _emberMetalProperty_get.get(this, 'selection.' + valuePath) : _emberMetalProperty_get.get(this, 'selection'); var selection; if (value !== selectedValue) { selection = content ? content.find(function (obj) { return value === (valuePath ? _emberMetalProperty_get.get(obj, valuePath) : obj); }) : null; - this.set("selection", selection); + this.set('selection', selection); } }), _setDefaults: function () { - var selection = _emberMetalProperty_get.get(this, "selection"); - var value = _emberMetalProperty_get.get(this, "value"); + var selection = _emberMetalProperty_get.get(this, 'selection'); + var value = _emberMetalProperty_get.get(this, 'value'); if (!_emberMetalIs_none["default"](selection)) { this.selectionDidChange(); } if (!_emberMetalIs_none["default"](value)) { @@ -47007,37 +47719,37 @@ this._change(false); } }, _changeSingle: function (hasDOM) { - var value = this.get("value"); + var value = this.get('value'); var selectedIndex = hasDOM !== false ? this.$()[0].selectedIndex : this._selectedIndex(value); - var content = _emberMetalProperty_get.get(this, "content"); - var prompt = _emberMetalProperty_get.get(this, "prompt"); + var content = _emberMetalProperty_get.get(this, 'content'); + var prompt = _emberMetalProperty_get.get(this, 'prompt'); - if (!content || !_emberMetalProperty_get.get(content, "length")) { + if (!content || !_emberMetalProperty_get.get(content, 'length')) { return; } if (prompt && selectedIndex === 0) { - _emberMetalProperty_set.set(this, "selection", null); + _emberMetalProperty_set.set(this, 'selection', null); return; } if (prompt) { selectedIndex -= 1; } - _emberMetalProperty_set.set(this, "selection", content.objectAt(selectedIndex)); + _emberMetalProperty_set.set(this, 'selection', content.objectAt(selectedIndex)); }, _selectedIndex: function (value) { var defaultIndex = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1]; - var content = _emberMetalProperty_get.get(this, "contentValues"); + var content = _emberMetalProperty_get.get(this, 'contentValues'); var selectionIndex = _emberMetalEnumerable_utils.indexOf(content, value); - var prompt = _emberMetalProperty_get.get(this, "prompt"); + var prompt = _emberMetalProperty_get.get(this, 'prompt'); if (prompt) { selectionIndex += 1; } if (selectionIndex < 0) { @@ -47046,15 +47758,15 @@ return selectionIndex; }, _changeMultiple: function (hasDOM) { - var options = hasDOM !== false ? this.$("option:selected") : []; - var prompt = _emberMetalProperty_get.get(this, "prompt"); + var options = hasDOM !== false ? this.$('option:selected') : []; + var prompt = _emberMetalProperty_get.get(this, 'prompt'); var offset = prompt ? 1 : 0; - var content = _emberMetalProperty_get.get(this, "content"); - var selection = _emberMetalProperty_get.get(this, "selection"); + var content = _emberMetalProperty_get.get(this, 'content'); + var selection = _emberMetalProperty_get.get(this, 'selection'); if (!content) { return; } if (options) { @@ -47062,49 +47774,49 @@ return this.index - offset; }); var newSelection = content.objectsAt([].slice.call(selectedIndexes)); if (_emberRuntimeUtils.isArray(selection)) { - _emberMetalEnumerable_utils.replace(selection, 0, _emberMetalProperty_get.get(selection, "length"), newSelection); + _emberMetalEnumerable_utils.replace(selection, 0, _emberMetalProperty_get.get(selection, 'length'), newSelection); } else { - _emberMetalProperty_set.set(this, "selection", newSelection); + _emberMetalProperty_set.set(this, 'selection', newSelection); } } }, _selectionDidChangeSingle: function () { - var value = _emberMetalProperty_get.get(this, "value"); + var value = _emberMetalProperty_get.get(this, 'value'); var self = this; if (value && value.then) { value.then(function (resolved) { // Ensure that we don't overwrite new value - if (_emberMetalProperty_get.get(self, "value") === value) { + if (_emberMetalProperty_get.get(self, 'value') === value) { self._setSelectedIndex(resolved); } }); } else { this._setSelectedIndex(value); } }, _setSelectedIndex: function (selectionValue) { - var el = _emberMetalProperty_get.get(this, "element"); + var el = _emberMetalProperty_get.get(this, 'element'); if (!el) { return; } el.selectedIndex = this._selectedIndex(selectionValue, -1); }, - _valuePath: _emberMetalComputed.computed("optionValuePath", function () { - var optionValuePath = _emberMetalProperty_get.get(this, "optionValuePath"); - return optionValuePath.replace(/^content\.?/, ""); + _valuePath: _emberMetalComputed.computed('optionValuePath', function () { + var optionValuePath = _emberMetalProperty_get.get(this, 'optionValuePath'); + return optionValuePath.replace(/^content\.?/, ''); }), - contentValues: _emberMetalComputed.computed("content.[]", "_valuePath", function () { - var valuePath = _emberMetalProperty_get.get(this, "_valuePath"); - var content = _emberMetalProperty_get.get(this, "content") || []; + contentValues: _emberMetalComputed.computed('content.[]', '_valuePath', function () { + var valuePath = _emberMetalProperty_get.get(this, '_valuePath'); + var content = _emberMetalProperty_get.get(this, 'content') || []; if (valuePath) { return _emberMetalEnumerable_utils.map(content, function (el) { return _emberMetalProperty_get.get(el, valuePath); }); @@ -47114,16 +47826,16 @@ }); } }), _selectionDidChangeMultiple: function () { - var content = _emberMetalProperty_get.get(this, "content"); - var selection = _emberMetalProperty_get.get(this, "selection"); + var content = _emberMetalProperty_get.get(this, 'content'); + var selection = _emberMetalProperty_get.get(this, 'selection'); var selectedIndexes = content ? _emberMetalEnumerable_utils.indexesOf(content, selection) : [-1]; - var prompt = _emberMetalProperty_get.get(this, "prompt"); + var prompt = _emberMetalProperty_get.get(this, 'prompt'); var offset = prompt ? 1 : 0; - var options = this.$("option"); + var options = this.$('option'); var adjusted; if (options) { options.each(function () { adjusted = this.index > -1 ? this.index - offset : -1; @@ -47140,28 +47852,40 @@ this._super.apply(this, arguments); this.on("change", this, this._change); } }); + function selectViewDeprecationMessage() { + Ember.deprecate("Ember.Select is deprecated. Consult the Deprecations Guide for a migration strategy.", !!Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT, { + url: 'http://emberjs.com/deprecations/v1.x/#toc_ember-select', + id: 'ember-views.select-deprecated', + until: '2.4.0' + }); + } + var DeprecatedSelect = Select.extend({ init: function () { + selectViewDeprecationMessage(); this._super.apply(this, arguments); - Ember.deprecate("Ember.Select is deprecated. Consult the Deprecations Guide for a migration strategy.", !!Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT, { url: "http://emberjs.com/deprecations/v1.x/#toc_ember-select" }); } }); + DeprecatedSelect.reopen = function () { + selectViewDeprecationMessage(); + Select.reopen.apply(Select, arguments); + return this; + }; + exports["default"] = Select; exports.Select = Select; exports.DeprecatedSelect = DeprecatedSelect; exports.SelectOption = SelectOption; exports.SelectOptgroup = SelectOptgroup; }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/views/states", ["exports", "ember-metal/platform/create", "ember-metal/merge", "ember-views/views/states/default", "ember-views/views/states/pre_render", "ember-views/views/states/has_element", "ember-views/views/states/in_dom", "ember-views/views/states/destroying"], function (exports, _emberMetalPlatformCreate, _emberMetalMerge, _emberViewsViewsStatesDefault, _emberViewsViewsStatesPre_render, _emberViewsViewsStatesHas_element, _emberViewsViewsStatesIn_dom, _emberViewsViewsStatesDestroying) { + "use strict"; + exports.cloneStates = cloneStates; function cloneStates(from) { var into = {}; @@ -47189,10 +47913,11 @@ destroying: _emberViewsViewsStatesDestroying["default"] }; exports.states = states; }); enifed("ember-views/views/states/default", ["exports", "ember-metal/error", "ember-metal/property_get", "ember-metal/property_events", "ember-views/compat/attrs-proxy"], function (exports, _emberMetalError, _emberMetalProperty_get, _emberMetalProperty_events, _emberViewsCompatAttrsProxy) { + "use strict"; /** @module ember @submodule ember-views */ @@ -47251,10 +47976,12 @@ }, invokeObserver: function () {} }; }); enifed("ember-views/views/states/destroying", ["exports", "ember-metal/merge", "ember-metal/platform/create", "ember-runtime/system/string", "ember-views/views/states/default", "ember-metal/error"], function (exports, _emberMetalMerge, _emberMetalPlatformCreate, _emberRuntimeSystemString, _emberViewsViewsStatesDefault, _emberMetalError) { + "use strict"; + /** @module ember @submodule ember-views */ @@ -47262,41 +47989,42 @@ var destroying = _emberMetalPlatformCreate["default"](_emberViewsViewsStatesDefault["default"]); _emberMetalMerge["default"](destroying, { appendChild: function () { - throw new _emberMetalError["default"](_emberRuntimeSystemString.fmt(destroyingError, ["appendChild"])); + throw new _emberMetalError["default"](_emberRuntimeSystemString.fmt(destroyingError, ['appendChild'])); }, rerender: function () { - throw new _emberMetalError["default"](_emberRuntimeSystemString.fmt(destroyingError, ["rerender"])); + throw new _emberMetalError["default"](_emberRuntimeSystemString.fmt(destroyingError, ['rerender'])); }, destroyElement: function () { - throw new _emberMetalError["default"](_emberRuntimeSystemString.fmt(destroyingError, ["destroyElement"])); + throw new _emberMetalError["default"](_emberRuntimeSystemString.fmt(destroyingError, ['destroyElement'])); } }); exports["default"] = destroying; }); enifed("ember-views/views/states/has_element", ["exports", "ember-views/views/states/default", "ember-metal/merge", "ember-metal/platform/create", "ember-views/system/jquery", "ember-metal/property_get", "htmlbars-runtime"], function (exports, _emberViewsViewsStatesDefault, _emberMetalMerge, _emberMetalPlatformCreate, _emberViewsSystemJquery, _emberMetalProperty_get, _htmlbarsRuntime) { + "use strict"; var hasElement = _emberMetalPlatformCreate["default"](_emberViewsViewsStatesDefault["default"]); _emberMetalMerge["default"](hasElement, { $: function (view, sel) { var elem = view.element; return sel ? _emberViewsSystemJquery["default"](sel, elem) : _emberViewsSystemJquery["default"](elem); }, getElement: function (view) { - var parent = _emberMetalProperty_get.get(view, "parentView"); + var parent = _emberMetalProperty_get.get(view, 'parentView'); if (parent) { - parent = _emberMetalProperty_get.get(parent, "element"); + parent = _emberMetalProperty_get.get(parent, 'element'); } if (parent) { return view.findElementInParentElement(parent); } - return _emberViewsSystemJquery["default"]("#" + _emberMetalProperty_get.get(view, "elementId"))[0]; + return _emberViewsSystemJquery["default"]("#" + _emberMetalProperty_get.get(view, 'elementId'))[0]; }, // once the view has been inserted into the DOM, rerendering is // deferred to allow bindings to synchronize. rerender: function (view) { @@ -47350,10 +48078,12 @@ /** @module ember @submodule ember-views */ enifed('ember-views/views/states/in_dom', ['exports', 'ember-metal/core', 'ember-metal/platform/create', 'ember-metal/merge', 'ember-metal/error', 'ember-metal/observer', 'ember-views/views/states/has_element'], function (exports, _emberMetalCore, _emberMetalPlatformCreate, _emberMetalMerge, _emberMetalError, _emberMetalObserver, _emberViewsViewsStatesHas_element) { + 'use strict'; + /** @module ember @submodule ember-views */ @@ -47397,10 +48127,11 @@ }); exports["default"] = inDOM; }); enifed("ember-views/views/states/pre_render", ["exports", "ember-views/views/states/default", "ember-metal/platform/create", "ember-metal/merge"], function (exports, _emberViewsViewsStatesDefault, _emberMetalPlatformCreate, _emberMetalMerge) { + "use strict"; /** @module ember @submodule ember-views */ @@ -47414,10 +48145,15 @@ }); exports["default"] = preRender; }); enifed("ember-views/views/text_area", ["exports", "ember-views/views/component", "ember-views/mixins/text_support"], function (exports, _emberViewsViewsComponent, _emberViewsMixinsText_support) { + /** + @module ember + @submodule ember-views + */ + "use strict"; /** The internal class used to create textarea element when the `{{textarea}}` helper is used. @@ -47434,25 +48170,26 @@ @extends Ember.Component @uses Ember.TextSupport @public */ exports["default"] = _emberViewsViewsComponent["default"].extend(_emberViewsMixinsText_support["default"], { - instrumentDisplay: "{{textarea}}", + instrumentDisplay: '{{textarea}}', - classNames: ["ember-text-area"], + classNames: ['ember-text-area'], tagName: "textarea", - attributeBindings: ["rows", "cols", "name", "selectionEnd", "selectionStart", "wrap", "lang", "dir", "value"], + attributeBindings: ['rows', 'cols', 'name', 'selectionEnd', 'selectionStart', 'wrap', 'lang', 'dir', 'value'], rows: null, cols: null }); }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/views/text_field", ["exports", "ember-metal/computed", "ember-metal/environment", "ember-metal/platform/create", "ember-views/views/component", "ember-views/mixins/text_support"], function (exports, _emberMetalComputed, _emberMetalEnvironment, _emberMetalPlatformCreate, _emberViewsViewsComponent, _emberViewsMixinsText_support) { + /** + @module ember + @submodule ember-views + */ + "use strict"; var inputTypeTestElement; var inputTypes = _emberMetalPlatformCreate["default"](null); function canSetTypeOfInput(type) { if (type in inputTypes) { @@ -47466,11 +48203,11 @@ return type; } if (!inputTypeTestElement) { - inputTypeTestElement = document.createElement("input"); + inputTypeTestElement = document.createElement('input'); } try { inputTypeTestElement.type = type; } catch (e) {} @@ -47496,15 +48233,15 @@ @extends Ember.Component @uses Ember.TextSupport @public */ exports["default"] = _emberViewsViewsComponent["default"].extend(_emberViewsMixinsText_support["default"], { - instrumentDisplay: "{{input type=\"text\"}}", + instrumentDisplay: '{{input type="text"}}', - classNames: ["ember-text-field"], + classNames: ['ember-text-field'], tagName: "input", - attributeBindings: ["accept", "autocomplete", "autosave", "dir", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "inputmode", "lang", "list", "max", "min", "multiple", "name", "pattern", "size", "step", "type", "value", "width"], + attributeBindings: ['accept', 'autocomplete', 'autosave', 'dir', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', 'height', 'inputmode', 'lang', 'list', 'max', 'min', 'multiple', 'name', 'pattern', 'size', 'step', 'type', 'value', 'width'], defaultLayout: null, /** The `value` attribute of the input element. As the user inputs text, this @@ -47523,15 +48260,15 @@ @default "text" @public */ type: _emberMetalComputed.computed({ get: function () { - return "text"; + return 'text'; }, set: function (key, value) { - var type = "text"; + var type = 'text'; if (canSetTypeOfInput(value)) { type = value; } @@ -47576,15 +48313,16 @@ @public */ max: null }); }); -/** -@module ember -@submodule ember-views -*/ enifed("ember-views/views/view", ["exports", "ember-metal/core", "ember-runtime/mixins/evented", "ember-runtime/system/object", "ember-metal/error", "ember-metal/property_get", "ember-metal/run_loop", "ember-metal/observer", "ember-metal/utils", "ember-metal/computed", "ember-metal/mixin", "ember-metal/deprecate_property", "ember-views/system/jquery", "ember-views/system/ext", "ember-views/views/core_view", "ember-views/mixins/view_context_support", "ember-views/mixins/view_child_views_support", "ember-views/mixins/view_state_support", "ember-views/mixins/template_rendering_support", "ember-views/mixins/class_names_support", "ember-views/mixins/legacy_view_support", "ember-views/mixins/instrumentation_support", "ember-views/mixins/aria_role_support", "ember-views/mixins/visibility_support", "ember-views/compat/attrs-proxy"], function (exports, _emberMetalCore, _emberRuntimeMixinsEvented, _emberRuntimeSystemObject, _emberMetalError, _emberMetalProperty_get, _emberMetalRun_loop, _emberMetalObserver, _emberMetalUtils, _emberMetalComputed, _emberMetalMixin, _emberMetalDeprecate_property, _emberViewsSystemJquery, _emberViewsSystemExt, _emberViewsViewsCore_view, _emberViewsMixinsView_context_support, _emberViewsMixinsView_child_views_support, _emberViewsMixinsView_state_support, _emberViewsMixinsTemplate_rendering_support, _emberViewsMixinsClass_names_support, _emberViewsMixinsLegacy_view_support, _emberViewsMixinsInstrumentation_support, _emberViewsMixinsAria_role_support, _emberViewsMixinsVisibility_support, _emberViewsCompatAttrsProxy) { + // Ember.assert, Ember.deprecate, Ember.warn, Ember.TEMPLATES, + // jQuery, Ember.lookup, + // Ember.ContainerView circular dependency + // Ember.ENV + "use strict"; function K() { return this; } @@ -48220,11 +48958,11 @@ @uses Ember.AriaRoleSupport @public */ // jscs:disable validateIndentation var View = _emberViewsViewsCore_view["default"].extend(_emberViewsMixinsView_context_support["default"], _emberViewsMixinsView_child_views_support["default"], _emberViewsMixinsView_state_support["default"], _emberViewsMixinsTemplate_rendering_support["default"], _emberViewsMixinsClass_names_support["default"], _emberViewsMixinsLegacy_view_support["default"], _emberViewsMixinsInstrumentation_support["default"], _emberViewsMixinsVisibility_support["default"], _emberViewsCompatAttrsProxy["default"], _emberViewsMixinsAria_role_support["default"], { - concatenatedProperties: ["attributeBindings"], + concatenatedProperties: ['attributeBindings'], /** @property isView @type Boolean @default true @@ -48253,11 +48991,11 @@ By default `Ember.View` will lookup a template with this name in `Ember.TEMPLATES` (a shared global object). @property layoutName @type String @default null - @private + @public */ layoutName: null, /** The template used to render the view. This should be a function that @@ -48268,16 +49006,16 @@ @property template @type Function @private */ - template: _emberMetalComputed.computed("templateName", { + template: _emberMetalComputed.computed('templateName', { get: function () { - var templateName = _emberMetalProperty_get.get(this, "templateName"); - var template = this.templateForName(templateName, "template"); + var templateName = _emberMetalProperty_get.get(this, 'templateName'); + var template = this.templateForName(templateName, 'template'); _emberMetalCore["default"].assert("You specified the templateName " + templateName + " for " + this + ", but it did not exist.", !templateName || !!template); - return template || _emberMetalProperty_get.get(this, "defaultTemplate"); + return template || _emberMetalProperty_get.get(this, 'defaultTemplate'); }, set: function (key, value) { if (value !== undefined) { return value; } @@ -48294,20 +49032,20 @@ This is useful for a view that has a shared wrapper, but which delegates the rendering of the contents of the wrapper to the `template` property on a subclass. @property layout @type Function - @private + @public */ - layout: _emberMetalComputed.computed("layoutName", { + layout: _emberMetalComputed.computed('layoutName', { get: function (key) { - var layoutName = _emberMetalProperty_get.get(this, "layoutName"); - var layout = this.templateForName(layoutName, "layout"); + var layoutName = _emberMetalProperty_get.get(this, 'layoutName'); + var layout = this.templateForName(layoutName, 'layout'); _emberMetalCore["default"].assert("You specified the layoutName " + layoutName + " for " + this + ", but it did not exist.", !layoutName || !!layout); - return layout || _emberMetalProperty_get.get(this, "defaultLayout"); + return layout || _emberMetalProperty_get.get(this, 'defaultLayout'); }, set: function (key, value) { return value; } @@ -48315,27 +49053,27 @@ templateForName: function (name, type) { if (!name) { return; } - _emberMetalCore["default"].assert("templateNames are not allowed to contain periods: " + name, name.indexOf(".") === -1); + _emberMetalCore["default"].assert("templateNames are not allowed to contain periods: " + name, name.indexOf('.') === -1); if (!this.container) { - throw new _emberMetalError["default"]("Container was not found when looking up a views template. " + "This is most likely due to manually instantiating an Ember.View. " + "See: http://git.io/EKPpnA"); + throw new _emberMetalError["default"]('Container was not found when looking up a views template. ' + 'This is most likely due to manually instantiating an Ember.View. ' + 'See: http://git.io/EKPpnA'); } - return this.container.lookup("template:" + name); + return this.container.lookup('template:' + name); }, /** If a value that affects template rendering changes, the view should be re-rendered to reflect the new value. @method _contextDidChange @private @private */ - _contextDidChange: _emberMetalMixin.observer("context", function () { + _contextDidChange: _emberMetalMixin.observer('context', function () { this.rerender(); }), /** Return the nearest ancestor that is an instance of the provided @@ -48345,22 +49083,22 @@ or an instance of Ember.Mixin. @return Ember.View @private */ nearestOfType: function (klass) { - var view = _emberMetalProperty_get.get(this, "parentView"); + var view = _emberMetalProperty_get.get(this, 'parentView'); var isOfType = klass instanceof _emberMetalMixin.Mixin ? function (view) { return klass.detect(view); } : function (view) { return klass.detect(view.constructor); }; while (view) { if (isOfType(view)) { return view; } - view = _emberMetalProperty_get.get(view, "parentView"); + view = _emberMetalProperty_get.get(view, 'parentView'); } }, /** Return the nearest ancestor that has a given property. @@ -48368,17 +49106,17 @@ @param {String} property A property name @return Ember.View @private */ nearestWithProperty: function (property) { - var view = _emberMetalProperty_get.get(this, "parentView"); + var view = _emberMetalProperty_get.get(this, 'parentView'); while (view) { if (property in view) { return view; } - view = _emberMetalProperty_get.get(view, "parentView"); + view = _emberMetalProperty_get.get(view, 'parentView'); } }, /** Renders the view again. This will work regardless of whether the @@ -48446,11 +49184,11 @@ @param {String} [selector] a jQuery-compatible selector string @return {jQuery} the jQuery object for the DOM node @public */ $: function (sel) { - _emberMetalCore["default"].assert("You cannot access this.$() on a component with `tagName: ''` specified.", this.tagName !== ""); + _emberMetalCore["default"].assert('You cannot access this.$() on a component with `tagName: \'\'` specified.', this.tagName !== ''); return this.currentState.$(this, sel); }, forEachChildView: function (callback) { var childViews = this.childViews; @@ -48489,11 +49227,11 @@ */ appendTo: function (selector) { var target = _emberViewsSystemJquery["default"](selector); _emberMetalCore["default"].assert("You tried to append to (" + selector + ") but that isn't in the DOM", target.length > 0); - _emberMetalCore["default"].assert("You cannot append to an existing Ember.View. Consider using Ember.ContainerView instead.", !target.is(".ember-view") && !target.parents().is(".ember-view")); + _emberMetalCore["default"].assert("You cannot append to an existing Ember.View. Consider using Ember.ContainerView instead.", !target.is('.ember-view') && !target.parents().is('.ember-view')); this.renderer.appendTo(this, target[0]); return this; }, @@ -48532,11 +49270,11 @@ @param {String} tagName The tag of the element to create and render into. Defaults to "body". @return {HTMLBodyElement} element @private */ renderToElement: function (tagName) { - tagName = tagName || "body"; + tagName = tagName || 'body'; var element = this.renderer._dom.createElement(tagName); this.renderer.appendTo(this, element); return element; @@ -48556,11 +49294,11 @@ */ replaceIn: function (selector) { var target = _emberViewsSystemJquery["default"](selector); _emberMetalCore["default"].assert("You tried to replace in (" + selector + ") but that isn't in the DOM", target.length > 0); - _emberMetalCore["default"].assert("You cannot replace an existing Ember.View. Consider using Ember.ContainerView instead.", !target.is(".ember-view") && !target.parents().is(".ember-view")); + _emberMetalCore["default"].assert("You cannot replace an existing Ember.View. Consider using Ember.ContainerView instead.", !target.is('.ember-view') && !target.parents().is('.ember-view')); this.renderer.replaceIn(this, target[0]); return this; }, @@ -48830,19 +49568,19 @@ if (manualRerender) { _emberMetalCore["default"].deprecate("You manually rerendered " + label + " (a parent component) from a child component during the rendering process. This rarely worked in Ember 1.x and will be removed in Ember 2.0"); } else { _emberMetalCore["default"].deprecate("You modified " + label + " twice in a single render. This was unreliable in Ember 1.x and will be removed in Ember 2.0"); } - _emberMetalRun_loop["default"].scheduleOnce("render", this, this.revalidate); + _emberMetalRun_loop["default"].scheduleOnce('render', this, this.revalidate); return; } _emberMetalCore["default"].deprecate("A property of " + this + " was modified inside the " + this._dispatching + " hook. You should never change properties on components, services or models during " + this._dispatching + " because it causes significant performance degradation.", !this._dispatching); if (!this.scheduledRevalidation || this._dispatching) { this.scheduledRevalidation = true; - _emberMetalRun_loop["default"].scheduleOnce("render", this, this.revalidate); + _emberMetalRun_loop["default"].scheduleOnce('render', this, this.revalidate); } }, appendAttr: function (node, buffer) { return this.currentState.appendAttr(this, node, buffer); @@ -48937,43 +49675,43 @@ _unregister: function () { delete this._viewRegistry[this.elementId]; }, registerObserver: function (root, path, target, observer) { - if (!observer && "function" === typeof target) { + if (!observer && 'function' === typeof target) { observer = target; target = null; } - if (!root || typeof root !== "object") { + if (!root || typeof root !== 'object') { return; } var scheduledObserver = this._wrapAsScheduled(observer); _emberMetalObserver.addObserver(root, path, target, scheduledObserver); - this.one("willClearRender", function () { + this.one('willClearRender', function () { _emberMetalObserver.removeObserver(root, path, target, scheduledObserver); }); }, _wrapAsScheduled: function (fn) { var view = this; var stateCheckedFn = function () { view.currentState.invokeObserver(this, fn); }; var scheduledFn = function () { - _emberMetalRun_loop["default"].scheduleOnce("render", this, stateCheckedFn); + _emberMetalRun_loop["default"].scheduleOnce('render', this, stateCheckedFn); }; return scheduledFn; } }); // jscs:enable validateIndentation - _emberMetalDeprecate_property.deprecateProperty(View.prototype, "state", "_state"); - _emberMetalDeprecate_property.deprecateProperty(View.prototype, "states", "_states"); + _emberMetalDeprecate_property.deprecateProperty(View.prototype, 'state', '_state'); + _emberMetalDeprecate_property.deprecateProperty(View.prototype, 'states', '_states'); /* Describe how the specified actions should behave in the various states that a view can exist in. Possible states: @@ -49001,19 +49739,19 @@ // are done on the DOM element. var mutation = _emberRuntimeSystemObject["default"].extend(_emberRuntimeMixinsEvented["default"]).create(); // TODO MOVE TO RENDERER HOOKS View.addMutationListener = function (callback) { - mutation.on("change", callback); + mutation.on('change', callback); }; View.removeMutationListener = function (callback) { - mutation.off("change", callback); + mutation.off('change', callback); }; View.notifyMutationListeners = function () { - mutation.trigger("change"); + mutation.trigger('change'); }; /** Global views hash @@ -49029,53 +49767,65 @@ // supplied childViews and then restore the original computed property // at view initialization time. This happens in Ember.ContainerView's init // method. View.childViewsProperty = _emberViewsMixinsView_child_views_support.childViewsProperty; + function viewDeprecationMessage() { + _emberMetalCore["default"].deprecate("Ember.View is deprecated. Consult the Deprecations Guide for a migration strategy.", !!_emberMetalCore["default"].ENV._ENABLE_LEGACY_VIEW_SUPPORT, { + url: 'http://emberjs.com/deprecations/v1.x/#toc_ember-view', + id: 'ember-views.view-deprecated', + until: '2.4.0' + }); + } + var DeprecatedView = View.extend({ init: function () { + viewDeprecationMessage(); this._super.apply(this, arguments); - _emberMetalCore["default"].deprecate("Ember.View is deprecated. Consult the Deprecations Guide for a migration strategy.", !!_emberMetalCore["default"].ENV._ENABLE_LEGACY_VIEW_SUPPORT, { url: "http://emberjs.com/deprecations/v1.x/#toc_ember-view" }); } }); + DeprecatedView.reopen = function () { + viewDeprecationMessage(); + View.reopen.apply(View, arguments); + return this; + }; + exports["default"] = View; exports.ViewContextSupport = _emberViewsMixinsView_context_support["default"]; exports.ViewChildViewsSupport = _emberViewsMixinsView_child_views_support["default"]; exports.ViewStateSupport = _emberViewsMixinsView_state_support["default"]; exports.TemplateRenderingSupport = _emberViewsMixinsTemplate_rendering_support["default"]; exports.ClassNamesSupport = _emberViewsMixinsClass_names_support["default"]; exports.DeprecatedView = DeprecatedView; }); -// Ember.assert, Ember.deprecate, Ember.warn, Ember.TEMPLATES, -// jQuery, Ember.lookup, -// Ember.ContainerView circular dependency -// Ember.ENV // for the side effect of extending Ember.run.queues enifed("ember", ["exports", "ember-metal", "ember-runtime", "ember-views", "ember-routing", "ember-application", "ember-extension-support", "ember-htmlbars", "ember-routing-htmlbars", "ember-routing-views", "ember-metal/environment", "ember-runtime/system/lazy_load"], function (exports, _emberMetal, _emberRuntime, _emberViews, _emberRouting, _emberApplication, _emberExtensionSupport, _emberHtmlbars, _emberRoutingHtmlbars, _emberRoutingViews, _emberMetalEnvironment, _emberRuntimeSystemLazy_load) { + // require the main entry points for each of these packages + // this is so that the global exports occur properly + "use strict"; - if (Ember.__loader.registry["ember-template-compiler"]) { - requireModule("ember-template-compiler"); + if (Ember.__loader.registry['ember-template-compiler']) { + requireModule('ember-template-compiler'); } // do this to ensure that Ember.Test is defined properly on the global // if it is present. - if (Ember.__loader.registry["ember-testing"]) { - requireModule("ember-testing"); + if (Ember.__loader.registry['ember-testing']) { + requireModule('ember-testing'); } - _emberRuntimeSystemLazy_load.runLoadHooks("Ember"); + _emberRuntimeSystemLazy_load.runLoadHooks('Ember'); /** @module ember */ - Ember.deprecate("Usage of Ember is deprecated for Internet Explorer 6 and 7, support will be removed in the next major version.", !_emberMetalEnvironment["default"].userAgent.match(/MSIE [67]/)); + Ember.deprecate('Usage of Ember is deprecated for Internet Explorer 6 and 7, support will be removed in the next major version.', !_emberMetalEnvironment["default"].userAgent.match(/MSIE [67]/)); }); -// require the main entry points for each of these packages -// this is so that the global exports occur properly enifed('htmlbars-runtime', ['exports', './htmlbars-runtime/hooks', './htmlbars-runtime/render', '../htmlbars-util/morph-utils', '../htmlbars-util/template-utils', './htmlbars-runtime/expression-visitor', 'htmlbars-runtime/hooks'], function (exports, _htmlbarsRuntimeHooks, _htmlbarsRuntimeRender, _htmlbarsUtilMorphUtils, _htmlbarsUtilTemplateUtils, _htmlbarsRuntimeExpressionVisitor, _htmlbarsRuntimeHooks2) { + 'use strict'; var internal = { blockFor: _htmlbarsUtilTemplateUtils.blockFor, manualElement: _htmlbarsRuntimeRender.manualElement, hostBlock: _htmlbarsRuntimeHooks2.hostBlock, @@ -49089,10 +49839,11 @@ exports.hooks = _htmlbarsRuntimeHooks["default"]; exports.render = _htmlbarsRuntimeRender["default"]; exports.internal = internal; }); enifed("htmlbars-runtime/expression-visitor", ["exports", "../htmlbars-util/object-utils", "../htmlbars-util/morph-utils"], function (exports, _htmlbarsUtilObjectUtils, _htmlbarsUtilMorphUtils) { + "use strict"; /** Node classification: # Primary Statement Nodes: @@ -49125,24 +49876,24 @@ acceptExpression: function (node, env, scope) { var ret = { value: null }; // Primitive literals are unambiguously non-array representations of // themselves. - if (typeof node !== "object" || node === null) { + if (typeof node !== 'object' || node === null) { ret.value = node; return ret; } switch (node[0]) { // can be used by manualElement - case "value": + case 'value': ret.value = node[1];break; - case "get": + case 'get': ret.value = this.get(node, env, scope);break; - case "subexpr": + case 'subexpr': ret.value = this.subexpr(node, env, scope);break; - case "concat": + case 'concat': ret.value = this.concat(node, env, scope);break; } return ret; }, @@ -49231,11 +49982,11 @@ morph.isDirty = morph.isSubtreeDirty = false; if (isHelper(env, scope, path)) { env.hooks.inline(morph, env, scope, path, [], {}, visitor); if (morph.linkedResult) { - _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, "@content-helper", [morph.linkedResult], null); + _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, '@content-helper', [morph.linkedResult], null); } return; } var params; @@ -49243,11 +49994,11 @@ params = morph.linkedParams.params; } else { params = [env.hooks.get(env, scope, path)]; } - _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, "@range", params, null); + _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, '@range', params, null); env.hooks.range(morph, env, scope, path, params[0], visitor); }, // [ 'element', path, params, hash ] element: function (node, morph, env, scope, visitor) { @@ -49262,11 +50013,11 @@ // [ 'attribute', name, value ] attribute: function (node, morph, env, scope) { var name = node[1], value = node[2]; - var paramsAndHash = this.linkParamsAndHash(env, scope, morph, "@attribute", [value], null); + var paramsAndHash = this.linkParamsAndHash(env, scope, morph, '@attribute', [value], null); morph.isDirty = morph.isSubtreeDirty = false; env.hooks.attribute(morph, env, scope, name, paramsAndHash[0][0]); }, @@ -49365,10 +50116,12 @@ function isHelper(env, scope, path) { return env.hooks.keywords[path] !== undefined || env.hooks.hasHelper(env, scope, path); } }); enifed("htmlbars-runtime/hooks", ["exports", "./render", "../morph-range/morph-list", "../htmlbars-util/object-utils", "../htmlbars-util/morph-utils", "../htmlbars-util/template-utils"], function (exports, _render, _morphRangeMorphList, _htmlbarsUtilObjectUtils, _htmlbarsUtilMorphUtils, _htmlbarsUtilTemplateUtils) { + "use strict"; + exports.wrap = wrap; exports.wrapForHelper = wrapForHelper; exports.hostYieldWithShadowTemplate = hostYieldWithShadowTemplate; exports.createScope = createScope; exports.createFreshScope = createFreshScope; @@ -49599,13 +50352,13 @@ currentMorph = seek.nextMorph; return seek; } - return function (key, blockArguments, self) { - if (typeof key !== "string") { - throw new Error("You must provide a string key when calling `yieldItem`; you provided " + key); + return function (_key, blockArguments, self) { + if (typeof _key !== 'string') { + throw new Error("You must provide a string key when calling `yieldItem`; you provided " + _key); } // At least one item has been yielded, so we do not wholesale // clear the last MorphList but instead apply a prune operation. renderState.morphListToClear = null; @@ -49625,11 +50378,30 @@ // A map of morphs that have been yielded in on this // rendering pass. Any morphs that do not make it into // this list will be pruned from the MorphList during the cleanup // process. var handledMorphs = renderState.handledMorphs; + var key = undefined; + if (handledMorphs[_key]) { + // In this branch we are dealing with a duplicate key. The strategy + // is to take the original key and append a counter to it that is + // incremented every time the key is reused. In order to greatly + // reduce the chance of colliding with another valid key we also add + // an extra string "--z8mS2hvDW0A--" to the new key. + var collisions = renderState.collisions; + if (collisions === undefined) { + collisions = renderState.collisions = {}; + } + var count = collisions[_key] | 0; + collisions[_key] = ++count; + + key = _key + '--z8mS2hvDW0A--' + count; + } else { + key = _key; + } + if (currentMorph && currentMorph.key === key) { yieldTemplate(template, env, parentScope, currentMorph, renderState, visitor)(blockArguments, self); currentMorph = currentMorph.nextMorph; handledMorphs[key] = currentMorph; } else if (morphMap[key] !== undefined) { @@ -49901,11 +50673,11 @@ `{{yield}}` is used. Optionally provide a non-default block name that can be targeted by `{{yield to=blockName}}`. */ function bindBlock(env, scope, block) { - var name = arguments.length <= 3 || arguments[3] === undefined ? "default" : arguments[3]; + var name = arguments.length <= 3 || arguments[3] === undefined ? 'default' : arguments[3]; scope.blocks[name] = block; } /** @@ -49983,15 +50755,15 @@ } var redirect = env.hooks.classify(env, scope, path); if (redirect) { switch (redirect) { - case "component": + case 'component': env.hooks.component(morph, env, scope, path, params, hash, { "default": template, inverse: inverse }, visitor);break; - case "inline": + case 'inline': env.hooks.inline(morph, env, scope, path, params, hash, visitor);break; - case "block": + case 'block': env.hooks.block(morph, env, scope, path, params, hash, template, inverse, visitor);break; default: throw new Error("Internal HTMLBars redirection to " + redirect + " not supported"); } return true; @@ -50008,11 +50780,11 @@ var keyword = env.hooks.keywords[path]; if (!keyword) { return false; } - if (typeof keyword === "function") { + if (typeof keyword === 'function') { return keyword(morph, env, scope, params, hash, template, inverse, visitor); } if (keyword.willRender) { keyword.willRender(morph, env); @@ -50094,11 +50866,11 @@ } return true; } - function linkRenderNode() { + function linkRenderNode() /* morph, env, scope, params, hash */{ return; } /** Host Hook: inline @@ -50155,14 +50927,14 @@ var helper = env.hooks.lookupHelper(env, scope, path); var result = env.hooks.invokeHelper(morph, env, scope, visitor, params, hash, helper, options.templates, thisFor(options.templates)); if (result && result.link) { morph.linkedResult = result.value; - _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, "@content-helper", [morph.linkedResult], null); + _htmlbarsUtilMorphUtils.linkParams(env, scope, morph, '@content-helper', [morph.linkedResult], null); } - if (result && "value" in result) { + if (result && 'value' in result) { value = env.hooks.getValue(result.value); hasValue = true; } } @@ -50202,11 +50974,11 @@ } return out; } - function classify() { + function classify() /* env, scope, path */{ return null; } var keywords = { partial: function (morph, env, scope, params) { @@ -50217,30 +50989,29 @@ yield: function (morph, env, scope, params, hash, template, inverse, visitor) { // the current scope is provided purely for the creation of shadow // scopes; it should not be provided to user code. - var to = env.hooks.getValue(hash.to) || "default"; + var to = env.hooks.getValue(hash.to) || 'default'; if (scope.blocks[to]) { scope.blocks[to](env, params, hash.self, morph, scope, visitor); } return true; }, hasBlock: function (morph, env, scope, params) { - var name = env.hooks.getValue(params[0]) || "default"; + var name = env.hooks.getValue(params[0]) || 'default'; return !!scope.blocks[name]; }, hasBlockParams: function (morph, env, scope, params) { - var name = env.hooks.getValue(params[0]) || "default"; + var name = env.hooks.getValue(params[0]) || 'default'; return !!(scope.blocks[name] && scope.blocks[name].arity); } }; - exports.keywords = keywords; /** Host Hook: partial @param {RenderNode} renderNode @param {Environment} env @@ -50263,10 +51034,11 @@ and not to the ambient lexical environment. The host hook should invoke the referenced partial with the ambient `self`. */ + exports.keywords = keywords; function partial(renderNode, env, scope, path) { var template = env.partials[path]; return template.render(scope.self, env, {}).fragment; } @@ -50376,11 +51148,11 @@ } function subexpr(env, scope, helperName, params, hash) { var helper = env.hooks.lookupHelper(env, scope, helperName); var result = env.hooks.invokeHelper(null, env, scope, null, params, hash, helper, {}); - if (result && "value" in result) { + if (result && 'value' in result) { return env.hooks.getValue(result.value); } } /** @@ -50403,15 +51175,15 @@ This hook is the "leaf" hook of the system. It is used to resolve a path relative to the current scope. */ function get(env, scope, path) { - if (path === "") { + if (path === '') { return scope.self; } - var keys = path.split("."); + var keys = path.split('.'); var value = env.hooks.getRoot(scope, keys[0])[0]; for (var i = 1; i < keys.length; i++) { if (value) { value = env.hooks.getChild(value, keys[i]); @@ -50477,11 +51249,14 @@ function lookupHelper(env, scope, helperName) { return env.helpers[helperName]; } - function bindScope() {} + function bindScope() /* env, scope */{ + // this function is used to handle host-specified extensions to scope + // other than `self`, `locals` and `block`. + } function updateScope(env, scope) { env.hooks.bindScope(env, scope); } @@ -50529,14 +51304,12 @@ inline: inline, range: range, keyword: keyword }; }); -/* morph, env, scope, params, hash */ /* env, scope, path */ /* env, scope */ -// this function is used to handle host-specified extensions to scope -// other than `self`, `locals` and `block`. enifed("htmlbars-runtime/morph", ["exports", "../morph-range"], function (exports, _morphRange) { + "use strict"; var guid = 1; function HTMLBarsMorph(domHelper, contextualElement) { this.super$constructor(domHelper, contextualElement); @@ -50582,10 +51355,12 @@ prototype.super$constructor = _morphRange["default"]; exports["default"] = HTMLBarsMorph; }); enifed("htmlbars-runtime/render", ["exports", "../htmlbars-util/array-utils", "../htmlbars-util/morph-utils", "./expression-visitor", "./morph", "../htmlbars-util/template-utils", "../htmlbars-util/void-tag-names"], function (exports, _htmlbarsUtilArrayUtils, _htmlbarsUtilMorphUtils, _expressionVisitor, _morph, _htmlbarsUtilTemplateUtils, _htmlbarsUtilVoidTagNames) { + "use strict"; + exports["default"] = render; exports.manualElement = manualElement; exports.attachAttributes = attachAttributes; exports.createChildMorph = createChildMorph; exports.getCachedFragment = getCachedFragment; @@ -50625,11 +51400,11 @@ this.bindScope(); if (options.attributes !== undefined) { nodes.push({ state: {} }); - this.statements.push(["attributes", attachAttributes(options.attributes)]); + this.statements.push(['attributes', attachAttributes(options.attributes)]); } if (options.self !== undefined) { this.bindSelf(options.self); } @@ -50670,31 +51445,31 @@ function manualElement(tagName, attributes) { var statements = []; for (var key in attributes) { - if (typeof attributes[key] === "string") { + if (typeof attributes[key] === 'string') { continue; } statements.push(["attribute", key, attributes[key]]); } - statements.push(["content", "yield"]); + statements.push(['content', 'yield']); var template = { arity: 0, cachedFragment: null, hasRendered: false, buildFragment: function buildFragment(dom) { var el0 = dom.createDocumentFragment(); - if (tagName === "svg") { + if (tagName === 'svg') { dom.setNamespace(svgNamespace); } var el1 = dom.createElement(tagName); for (var key in attributes) { - if (typeof attributes[key] !== "string") { + if (typeof attributes[key] !== 'string') { continue; } dom.setAttribute(el1, key, attributes[key]); } @@ -50710,11 +51485,11 @@ buildRenderNodes: function buildRenderNodes(dom, fragment) { var element = dom.childAt(fragment, [0]); var morphs = []; for (var key in attributes) { - if (typeof attributes[key] === "string") { + if (typeof attributes[key] === 'string') { continue; } morphs.push(dom.createAttrMorph(element, key)); } @@ -50731,11 +51506,11 @@ function attachAttributes(attributes) { var statements = []; for (var key in attributes) { - if (typeof attributes[key] === "string") { + if (typeof attributes[key] === 'string') { continue; } statements.push(["attribute", key, attributes[key]]); } @@ -50747,11 +51522,11 @@ var el0 = this.element; if (el0.namespaceURI === "http://www.w3.org/2000/svg") { dom.setNamespace(svgNamespace); } for (var key in attributes) { - if (typeof attributes[key] !== "string") { + if (typeof attributes[key] !== 'string') { continue; } dom.setAttribute(el0, key, attributes[key]); } @@ -50760,11 +51535,11 @@ buildRenderNodes: function buildRenderNodes(dom) { var element = this.element; var morphs = []; for (var key in attributes) { - if (typeof attributes[key] === "string") { + if (typeof attributes[key] === 'string') { continue; } morphs.push(dom.createAttrMorph(element, key)); } @@ -50848,23 +51623,23 @@ if (env.hooks.willRenderNode) { env.hooks.willRenderNode(morph, env, scope); } switch (statement[0]) { - case "block": + case 'block': visitor.block(statement, morph, env, scope, template, visitor);break; - case "inline": + case 'inline': visitor.inline(statement, morph, env, scope, visitor);break; - case "content": + case 'content': visitor.content(statement, morph, env, scope, visitor);break; - case "element": + case 'element': visitor.element(statement, morph, env, scope, template, visitor);break; - case "attribute": + case 'attribute': visitor.attribute(statement, morph, env, scope);break; - case "component": + case 'component': visitor.component(statement, morph, env, scope, template, visitor);break; - case "attributes": + case 'attributes': visitor.attributes(statement, morph, env, scope, this.fragment, visitor);break; } if (env.hooks.didRenderNode) { env.hooks.didRenderNode(morph, env, scope); @@ -50935,18 +51710,22 @@ return fragment; } }); enifed('htmlbars-util', ['exports', './htmlbars-util/safe-string', './htmlbars-util/handlebars/utils', './htmlbars-util/namespaces', './htmlbars-util/morph-utils'], function (exports, _htmlbarsUtilSafeString, _htmlbarsUtilHandlebarsUtils, _htmlbarsUtilNamespaces, _htmlbarsUtilMorphUtils) { + 'use strict'; + exports.SafeString = _htmlbarsUtilSafeString["default"]; exports.escapeExpression = _htmlbarsUtilHandlebarsUtils.escapeExpression; exports.getAttrNamespace = _htmlbarsUtilNamespaces.getAttrNamespace; exports.validateChildMorphs = _htmlbarsUtilMorphUtils.validateChildMorphs; exports.linkParams = _htmlbarsUtilMorphUtils.linkParams; exports.dump = _htmlbarsUtilMorphUtils.dump; }); enifed('htmlbars-util/array-utils', ['exports'], function (exports) { + 'use strict'; + exports.forEach = forEach; exports.map = map; function forEach(array, callback, binding) { var i, l; @@ -51001,10 +51780,12 @@ var indexOfArray = getIdx; exports.indexOfArray = indexOfArray; }); enifed('htmlbars-util/handlebars/safe-string', ['exports'], function (exports) { // Build out our basic SafeString type + 'use strict'; + function SafeString(string) { this.string = string; } SafeString.prototype.toString = SafeString.prototype.toHTML = function () { @@ -51012,10 +51793,12 @@ }; exports["default"] = SafeString; }); enifed('htmlbars-util/handlebars/utils', ['exports'], function (exports) { + 'use strict'; + exports.extend = extend; exports.indexOf = indexOf; exports.escapeExpression = escapeExpression; exports.isEmpty = isEmpty; exports.blockParams = blockParams; @@ -51023,11 +51806,11 @@ var escape = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', - '\'': '&#x27;', + "'": '&#x27;', '`': '&#x60;' }; var badChars = /[&<>"'`]/g, possible = /[&<>"'`]/; @@ -51048,14 +51831,14 @@ return obj; } var toString = Object.prototype.toString; - exports.toString = toString; // Sourced from lodash // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt /*eslint-disable func-style, no-var */ + exports.toString = toString; var isFunction = function (value) { return typeof value === 'function'; }; // fallback for older versions of Chrome and Safari /* istanbul ignore next */ @@ -51063,20 +51846,20 @@ exports.isFunction = isFunction = function (value) { return typeof value === 'function' && toString.call(value) === '[object Function]'; }; } var isFunction; - exports.isFunction = isFunction; /*eslint-enable func-style, no-var */ /* istanbul ignore next */ + exports.isFunction = isFunction; var isArray = Array.isArray || function (value) { return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; }; - exports.isArray = isArray; // Older IE versions do not directly support indexOf so we must implement our own, sadly. + exports.isArray = isArray; function indexOf(array, value) { for (var i = 0, len = array.length; i < len; i++) { if (array[i] === value) { return i; @@ -51126,15 +51909,18 @@ function appendContextPath(contextPath, id) { return (contextPath ? contextPath + '.' : '') + id; } }); enifed("htmlbars-util/morph-utils", ["exports"], function (exports) { + /*globals console*/ + + "use strict"; + exports.visitChildren = visitChildren; exports.validateChildMorphs = validateChildMorphs; exports.linkParams = linkParams; exports.dump = dump; - /*globals console*/ function visitChildren(nodes, callback) { if (!nodes || nodes.length === 0) { return; } @@ -51214,12 +52000,14 @@ cb(nodes[i]); } } }); enifed('htmlbars-util/namespaces', ['exports'], function (exports) { - exports.getAttrNamespace = getAttrNamespace; // ref http://dev.w3.org/html5/spec-LC/namespaces.html + 'use strict'; + + exports.getAttrNamespace = getAttrNamespace; var defaultNamespaces = { html: 'http://www.w3.org/1999/xhtml', mathml: 'http://www.w3.org/1998/Math/MathML', svg: 'http://www.w3.org/2000/svg', xlink: 'http://www.w3.org/1999/xlink', @@ -51237,10 +52025,12 @@ return namespace || null; } }); enifed("htmlbars-util/object-utils", ["exports"], function (exports) { + "use strict"; + exports.merge = merge; exports.shallowCopy = shallowCopy; exports.keySet = keySet; exports.keyLength = keyLength; @@ -51281,23 +52071,25 @@ return count; } }); enifed("htmlbars-util/quoting", ["exports"], function (exports) { + "use strict"; + exports.hash = hash; exports.repeat = repeat; function escapeString(str) { str = str.replace(/\\/g, "\\\\"); - str = str.replace(/"/g, "\\\""); + str = str.replace(/"/g, '\\"'); str = str.replace(/\n/g, "\\n"); return str; } exports.escapeString = escapeString; function string(str) { - return "\"" + escapeString(str) + "\""; + return '"' + escapeString(str) + '"'; } exports.string = string; function array(a) { @@ -51317,13 +52109,17 @@ } return str; } }); enifed('htmlbars-util/safe-string', ['exports', './handlebars/safe-string'], function (exports, _handlebarsSafeString) { + 'use strict'; + exports["default"] = _handlebarsSafeString["default"]; }); enifed("htmlbars-util/template-utils", ["exports", "../htmlbars-util/morph-utils"], function (exports, _htmlbarsUtilMorphUtils) { + "use strict"; + exports.RenderState = RenderState; exports.blockFor = blockFor; exports.renderAndCleanup = renderAndCleanup; exports.clearMorph = clearMorph; exports.clearMorphList = clearMorphList; @@ -51339,10 +52135,11 @@ // A map of morphs for each item yielded in during this // rendering pass. Any morphs in the DOM but not in this map // will be pruned during cleanup. this.handledMorphs = {}; + this.collisions = undefined; // The morph to clear once rendering is complete. By // default, we set this to the previous morph (to catch // the case where nothing is yielded; in that case, we // should just clear the morph). Otherwise this gets set @@ -51387,11 +52184,11 @@ function bindBlocks(env, shadowScope, blocks) { if (!blocks) { return; } - if (typeof blocks === "function") { + if (typeof blocks === 'function') { env.hooks.bindBlock(env, shadowScope, blocks); } else { for (var name in blocks) { if (blocks.hasOwnProperty(name)) { env.hooks.bindBlock(env, shadowScope, blocks[name], name); @@ -51405,10 +52202,11 @@ // helper or hook being invoked has yielded. Once it has finished either // yielding multiple items (via yieldItem) or a single template (via // yieldTemplate), we detect what was rendered and how it differs from // the previous render, cleaning up old state in DOM as appropriate. var renderState = options.renderState; + renderState.collisions = undefined; renderState.shadowOptions = shadowOptions; // Invoke the callback, instructing it to save information about what it // renders into RenderState. var result = callback(options); @@ -51507,10 +52305,11 @@ morphList.clear(); morph.morphList = null; } }); enifed("htmlbars-util/void-tag-names", ["exports", "./array-utils"], function (exports, _arrayUtils) { + "use strict"; // The HTML elements in this list are speced by // http://www.w3.org/TR/html-markup/syntax.html#syntax-elements, // and will be forced to close regardless of if they have a // self-closing /> at the end. @@ -51522,10 +52321,11 @@ }); exports["default"] = voidMap; }); enifed("morph-attr", ["exports", "./morph-attr/sanitize-attribute-value", "./dom-helper/prop", "./dom-helper/build-html-dom", "./htmlbars-util"], function (exports, _morphAttrSanitizeAttributeValue, _domHelperProp, _domHelperBuildHtmlDom, _htmlbarsUtil) { + "use strict"; function getProperty() { return this.domHelper.getPropertyStrict(this.element, this.attrName); } @@ -51593,11 +52393,11 @@ var _normalizeProperty = _domHelperProp.normalizeProperty(this.element, attrName); var normalized = _normalizeProperty.normalized; var type = _normalizeProperty.type; - if (element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace || attrName === "style" || type === "attr") { + if (element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace || attrName === 'style' || type === 'attr') { this._update = updateAttribute; this._get = getAttribute; this.attrName = normalized; } else { this._update = updateProperty; @@ -51640,13 +52440,15 @@ exports["default"] = AttrMorph; exports.sanitizeAttributeValue = _morphAttrSanitizeAttributeValue.sanitizeAttributeValue; }); enifed('morph-attr/sanitize-attribute-value', ['exports'], function (exports) { - exports.sanitizeAttributeValue = sanitizeAttributeValue; /* jshint scripturl:true */ + 'use strict'; + + exports.sanitizeAttributeValue = sanitizeAttributeValue; var badProtocols = { 'javascript:': true, 'vbscript:': true }; @@ -51702,10 +52504,11 @@ return value; } }); enifed('morph-range', ['exports', './morph-range/utils'], function (exports, _morphRangeUtils) { + 'use strict'; // constructor just initializes the fields // use one of the static initializers to create a valid morph. function Morph(domHelper, contextualElement) { this.domHelper = domHelper; @@ -51965,10 +52768,11 @@ }; exports["default"] = Morph; }); enifed('morph-range/morph-list', ['exports', './utils'], function (exports, _utils) { + 'use strict'; function MorphList() { // morph graph this.firstChildMorph = null; this.lastChildMorph = null; @@ -52042,36 +52846,39 @@ this.lastChildMorph._syncLastNode(); }; prototype.removeChildMorph = function MorphList$removeChildMorph(morph) { if (morph.parentMorphList !== this) { - throw new Error('Cannot remove a morph from a parent it is not inside of'); + throw new Error("Cannot remove a morph from a parent it is not inside of"); } morph.destroy(); }; exports["default"] = MorphList; }); enifed('morph-range/morph-list.umd', ['exports', './morph-list'], function (exports, _morphList) { + 'use strict'; (function (root, factory) { if (typeof enifed === 'function' && enifed.amd) { enifed([], factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.MorphList = factory(); } - })(this, function () { + })(undefined, function () { return _morphList["default"]; }); }); enifed("morph-range/utils", ["exports"], function (exports) { + // inclusive of both nodes + "use strict"; + exports.clear = clear; exports.insertBefore = insertBefore; - // inclusive of both nodes function clear(parentNode, firstNode, lastNode) { if (!parentNode) { return; } @@ -52100,17 +52907,18 @@ node = nextNode; } while (node); } }); enifed('route-recognizer', ['exports', './route-recognizer/dsl'], function (exports, _routeRecognizerDsl) { + 'use strict'; var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\']; var escapeRegex = new RegExp('(\\' + specials.join('|\\') + ')', 'g'); function isArray(test) { - return Object.prototype.toString.call(test) === '[object Array]'; + return Object.prototype.toString.call(test) === "[object Array]"; } // A Segment represents a segment in the original route description. // Each Segment type provides an `eachChar` and `regex` method. // @@ -52154,15 +52962,15 @@ function DynamicSegment(name) { this.name = name; } DynamicSegment.prototype = { eachChar: function (callback) { - callback({ invalidChars: '/', repeat: true }); + callback({ invalidChars: "/", repeat: true }); }, regex: function () { - return '([^/]+)'; + return "([^/]+)"; }, generate: function (params) { return params[this.name]; } @@ -52171,15 +52979,15 @@ function StarSegment(name) { this.name = name; } StarSegment.prototype = { eachChar: function (callback) { - callback({ invalidChars: '', repeat: true }); + callback({ invalidChars: "", repeat: true }); }, regex: function () { - return '(.+)'; + return "(.+)"; }, generate: function (params) { return params[this.name]; } @@ -52187,25 +52995,25 @@ function EpsilonSegment() {} EpsilonSegment.prototype = { eachChar: function () {}, regex: function () { - return ''; + return ""; }, generate: function () { - return ''; + return ""; } }; function parse(route, names, types) { // normalize route as not starting with a "/". Recognition will // also normalize. - if (route.charAt(0) === '/') { + if (route.charAt(0) === "/") { route = route.substr(1); } - var segments = route.split('/'), + var segments = route.split("/"), results = []; for (var i = 0, l = segments.length; i < l; i++) { var segment = segments[i], match; @@ -52216,11 +53024,11 @@ types.dynamics++; } else if (match = segment.match(/^\*([^\/]+)$/)) { results.push(new StarSegment(match[1])); names.push(match[1]); types.stars++; - } else if (segment === '') { + } else if (segment === "") { results.push(new EpsilonSegment()); } else { results.push(new StaticSegment(segment)); types.statics++; } @@ -52461,11 +53269,11 @@ }; RouteRecognizer.prototype = { add: function (routes, options) { var currentState = this.rootState, - regex = '^', + regex = "^", types = { statics: 0, dynamics: 0, stars: 0 }, handlers = [], allSegments = [], name; @@ -52487,12 +53295,12 @@ } isEmpty = false; // Add a "/" for the new segment - currentState = currentState.put({ validChars: '/' }); - regex += '/'; + currentState = currentState.put({ validChars: "/" }); + regex += "/"; // Add a representation of the segment to the NFA and regex currentState = addSegment(currentState, segment); regex += segment.regex(); } @@ -52500,16 +53308,16 @@ var handler = { handler: route.handler, names: names }; handlers.push(handler); } if (isEmpty) { - currentState = currentState.put({ validChars: '/' }); - regex += '/'; + currentState = currentState.put({ validChars: "/" }); + regex += "/"; } currentState.handlers = handlers; - currentState.regex = new RegExp(regex + '$'); + currentState.regex = new RegExp(regex + "$"); currentState.types = types; if (name = options && options.as) { this.names[name] = { segments: allSegments, @@ -52520,11 +53328,11 @@ handlersFor: function (name) { var route = this.names[name], result = []; if (!route) { - throw new Error('There is no route named ' + name); + throw new Error("There is no route named " + name); } for (var i = 0, l = route.handlers.length; i < l; i++) { result.push(route.handlers[i]); } @@ -52536,13 +53344,13 @@ return !!this.names[name]; }, generate: function (name, params) { var route = this.names[name], - output = ''; + output = ""; if (!route) { - throw new Error('There is no route named ' + name); + throw new Error("There is no route named " + name); } var segments = route.segments; for (var i = 0, l = segments.length; i < l; i++) { @@ -52550,11 +53358,11 @@ if (segment instanceof EpsilonSegment) { continue; } - output += '/'; + output += "/"; output += segment.generate(params); } if (output.charAt(0) !== '/') { output = '/' + output; @@ -52587,24 +53395,24 @@ for (var j = 0, l = value.length; j < l; j++) { var arrayPair = key + '[]' + '=' + encodeURIComponent(value[j]); pairs.push(arrayPair); } } else { - pair += '=' + encodeURIComponent(value); + pair += "=" + encodeURIComponent(value); pairs.push(pair); } } if (pairs.length === 0) { return ''; } - return '?' + pairs.join('&'); + return "?" + pairs.join("&"); }, parseQueryString: function (queryString) { - var pairs = queryString.split('&'), + var pairs = queryString.split("&"), queryParams = {}; for (var i = 0; i < pairs.length; i++) { var pair = pairs[i].split('='), key = decodeQueryParamPart(pair[0]), keyLength = key.length, @@ -52650,16 +53458,16 @@ path = decodeURI(path); // DEBUG GROUP path - if (path.charAt(0) !== '/') { - path = '/' + path; + if (path.charAt(0) !== "/") { + path = "/" + path; } pathLen = path.length; - if (pathLen > 1 && path.charAt(pathLen - 1) === '/') { + if (pathLen > 1 && path.charAt(pathLen - 1) === "/") { path = path.substr(0, pathLen - 1); isSlashDropped = true; } for (i = 0, l = path.length; i < l; i++) { @@ -52683,12 +53491,12 @@ var state = solutions[0]; if (state && state.handlers) { // if a trailing slash was dropped and a star segment is the last segment // specified, put the trailing slash back - if (isSlashDropped && state.regex.source.slice(-5) === '(.+)$') { - path = path + '/'; + if (isSlashDropped && state.regex.source.slice(-5) === "(.+)$") { + path = path + "/"; } return findHandler(state, path, queryParams); } } }; @@ -52698,10 +53506,12 @@ RouteRecognizer.VERSION = '0.1.5'; exports["default"] = RouteRecognizer; }); enifed("route-recognizer/dsl", ["exports"], function (exports) { + "use strict"; + function Target(path, matcher, delegate) { this.path = path; this.matcher = matcher; this.delegate = delegate; } @@ -52804,13 +53614,16 @@ } }, this); }; }); enifed('router', ['exports', './router/router'], function (exports, _routerRouter) { + 'use strict'; + exports["default"] = _routerRouter["default"]; }); enifed('router/handler-info', ['exports', './utils', 'rsvp/promise'], function (exports, _utils, _rsvpPromise) { + 'use strict'; function HandlerInfo(_props) { var props = _props || {}; _utils.merge(this, props); this.initialize(props); @@ -52832,11 +53645,11 @@ payload.log(this.name + ': ' + message); } }, promiseLabel: function (label) { - return _utils.promiseLabel('\'' + this.name + '\' ' + label); + return _utils.promiseLabel("'" + this.name + "' " + label); }, getUnresolved: function () { return this; }, @@ -52850,11 +53663,11 @@ beforeModel = _utils.bind(this, this.runBeforeModelHook, payload), model = _utils.bind(this, this.getModel, payload), afterModel = _utils.bind(this, this.runAfterModelHook, payload), becomeResolved = _utils.bind(this, this.becomeResolved, payload); - return _rsvpPromise["default"].resolve(undefined, this.promiseLabel('Start handler')).then(checkForAbort, null, this.promiseLabel('Check for abort')).then(beforeModel, null, this.promiseLabel('Before model')).then(checkForAbort, null, this.promiseLabel('Check if aborted during \'beforeModel\' hook')).then(model, null, this.promiseLabel('Model')).then(checkForAbort, null, this.promiseLabel('Check if aborted in \'model\' hook')).then(afterModel, null, this.promiseLabel('After model')).then(checkForAbort, null, this.promiseLabel('Check if aborted in \'afterModel\' hook')).then(becomeResolved, null, this.promiseLabel('Become resolved')); + return _rsvpPromise["default"].resolve(undefined, this.promiseLabel("Start handler")).then(checkForAbort, null, this.promiseLabel("Check for abort")).then(beforeModel, null, this.promiseLabel("Before model")).then(checkForAbort, null, this.promiseLabel("Check if aborted during 'beforeModel' hook")).then(model, null, this.promiseLabel("Model")).then(checkForAbort, null, this.promiseLabel("Check if aborted in 'model' hook")).then(afterModel, null, this.promiseLabel("After model")).then(checkForAbort, null, this.promiseLabel("Check if aborted in 'afterModel' hook")).then(becomeResolved, null, this.promiseLabel("Become resolved")); }, runBeforeModelHook: function (payload) { if (payload.trigger) { payload.trigger(true, 'willResolveModel', payload, this.handler); @@ -52872,15 +53685,15 @@ return this.runSharedModelHook(payload, 'afterModel', [resolvedModel]).then(function () { // Ignore the fulfilled value returned from afterModel. // Return the value stashed in resolvedModels, which // might have been swapped out in afterModel. return payload.resolvedModels[name]; - }, null, this.promiseLabel('Ignore fulfillment value and return model value')); + }, null, this.promiseLabel("Ignore fulfillment value and return model value")); }, runSharedModelHook: function (payload, hookName, args) { - this.log(payload, 'calling ' + hookName + ' hook'); + this.log(payload, "calling " + hookName + " hook"); if (this.queryParams) { args.push(this.queryParams); } args.push(payload); @@ -52889,22 +53702,22 @@ if (result && result.isTransition) { result = null; } - return _rsvpPromise["default"].resolve(result, this.promiseLabel('Resolve value returned from one of the model hooks')); + return _rsvpPromise["default"].resolve(result, this.promiseLabel("Resolve value returned from one of the model hooks")); }, // overridden by subclasses getModel: null, checkForAbort: function (shouldContinue, promiseValue) { - return _rsvpPromise["default"].resolve(shouldContinue(), this.promiseLabel('Check for abort')).then(function () { + return _rsvpPromise["default"].resolve(shouldContinue(), this.promiseLabel("Check for abort")).then(function () { // We don't care about shouldContinue's resolve value; // pass along the original value passed to this fn. return promiseValue; - }, null, this.promiseLabel('Ignore fulfillment value and continue')); + }, null, this.promiseLabel("Ignore fulfillment value and continue")); }, stashResolvedModel: function (payload, resolvedModel) { payload.resolvedModels = payload.resolvedModels || {}; payload.resolvedModels[this.name] = resolvedModel; @@ -52966,10 +53779,11 @@ } exports["default"] = HandlerInfo; }); enifed('router/handler-info/factory', ['exports', 'router/handler-info/resolved-handler-info', 'router/handler-info/unresolved-handler-info-by-object', 'router/handler-info/unresolved-handler-info-by-param'], function (exports, _routerHandlerInfoResolvedHandlerInfo, _routerHandlerInfoUnresolvedHandlerInfoByObject, _routerHandlerInfoUnresolvedHandlerInfoByParam) { + 'use strict'; handlerInfoFactory.klasses = { resolved: _routerHandlerInfoResolvedHandlerInfo["default"], param: _routerHandlerInfoUnresolvedHandlerInfoByParam["default"], object: _routerHandlerInfoUnresolvedHandlerInfoByObject["default"] @@ -52983,18 +53797,19 @@ } exports["default"] = handlerInfoFactory; }); enifed('router/handler-info/resolved-handler-info', ['exports', '../handler-info', 'router/utils', 'rsvp/promise'], function (exports, _handlerInfo, _routerUtils, _rsvpPromise) { + 'use strict'; var ResolvedHandlerInfo = _routerUtils.subclass(_handlerInfo["default"], { resolve: function (shouldContinue, payload) { // A ResolvedHandlerInfo just resolved with itself. if (payload && payload.resolvedModels) { payload.resolvedModels[this.name] = this.context; } - return _rsvpPromise["default"].resolve(this, this.promiseLabel('Resolve')); + return _rsvpPromise["default"].resolve(this, this.promiseLabel("Resolve")); }, getUnresolved: function () { return this.factory('param', { name: this.name, @@ -53007,14 +53822,15 @@ }); exports["default"] = ResolvedHandlerInfo; }); enifed('router/handler-info/unresolved-handler-info-by-object', ['exports', '../handler-info', 'router/utils', 'rsvp/promise'], function (exports, _handlerInfo, _routerUtils, _rsvpPromise) { + 'use strict'; var UnresolvedHandlerInfoByObject = _routerUtils.subclass(_handlerInfo["default"], { getModel: function (payload) { - this.log(payload, this.name + ': resolving provided model'); + this.log(payload, this.name + ": resolving provided model"); return _rsvpPromise["default"].resolve(this.context); }, initialize: function (props) { this.names = props.names || []; @@ -53060,10 +53876,11 @@ }); exports["default"] = UnresolvedHandlerInfoByObject; }); enifed('router/handler-info/unresolved-handler-info-by-param', ['exports', '../handler-info', 'router/utils'], function (exports, _handlerInfo, _routerUtils) { + 'use strict'; // Generated by URL transitions and non-dynamic route segments in named Transitions. var UnresolvedHandlerInfoByParam = _routerUtils.subclass(_handlerInfo["default"], { initialize: function (props) { this.params = props.params || {}; @@ -53085,10 +53902,11 @@ }); exports["default"] = UnresolvedHandlerInfoByParam; }); enifed('router/router', ['exports', 'route-recognizer', 'rsvp/promise', './utils', './transition-state', './transition', './transition-intent/named-transition-intent', './transition-intent/url-transition-intent', './handler-info'], function (exports, _routeRecognizer, _rsvpPromise, _utils, _transitionState, _transition, _transitionIntentNamedTransitionIntent, _transitionIntentUrlTransitionIntent, _handlerInfo) { + 'use strict'; var pop = Array.prototype.pop; function Router(_options) { var options = _options || {}; @@ -53144,11 +53962,11 @@ // Transition promises by default resolve with resolved state. // For our purposes, swap out the promise to resolve // after the transition has been finalized. newTransition.promise = newTransition.promise.then(function (result) { return finalizeTransition(newTransition, result.state); - }, null, _utils.promiseLabel('Settle transition promise when transition is finalized')); + }, null, _utils.promiseLabel("Settle transition promise when transition is finalized")); if (!wasTransitioning) { notifyExistingHandlers(this, newState, newTransition); } @@ -53210,11 +54028,11 @@ updateURL(newTransition, oldState, true); if (router.didTransition) { router.didTransition(router.currentHandlerInfos); } return result; - }, null, _utils.promiseLabel('Transition complete')); + }, null, _utils.promiseLabel("Transition complete")); return newTransition; } }, // NOTE: this doesn't really belong here, but here @@ -53270,11 +54088,11 @@ /** Hook point for updating the URL. @param {String} url a URL to update to */ updateURL: function () { - throw new Error('updateURL is not implemented'); + throw new Error("updateURL is not implemented"); }, /** Hook point for replacing the current URL, i.e. with replaceState By default this behaves the same as `updateURL` @@ -53305,11 +54123,11 @@ for (var i = 0, len = handlerInfos.length; i < len; ++i) { var handlerInfo = handlerInfos[i]; params[handlerInfo.name] = handlerInfo.params || {}; } - _utils.log(this, 'Starting a refresh transition'); + _utils.log(this, "Starting a refresh transition"); var intent = new _transitionIntentNamedTransitionIntent["default"]({ name: handlerInfos[handlerInfos.length - 1].name, pivotHandler: pivotHandler || handlerInfos[0].handler, contexts: [], // TODO collect contexts...? queryParams: this._changedQueryParams || state.queryParams || {} @@ -53701,11 +54519,11 @@ to update the router's array of `currentHandlerInfos`. */ function finalizeTransition(transition, newState) { try { - _utils.log(transition.router, transition.sequence, 'Resolved all models on destination route; finalizing transition.'); + _utils.log(transition.router, transition.sequence, "Resolved all models on destination route; finalizing transition."); var router = transition.router, handlerInfos = newState.handlerInfos, seq = transition.sequence; @@ -53728,11 +54546,11 @@ if (router.didTransition) { router.didTransition(router.currentHandlerInfos); } - _utils.log(router, transition.sequence, 'TRANSITION COMPLETE.'); + _utils.log(router, transition.sequence, "TRANSITION COMPLETE."); // Resolve with the final handler. return handlerInfos[handlerInfos.length - 1].handler; } catch (e) { if (!(e instanceof _transition.TransitionAborted)) { @@ -53768,11 +54586,11 @@ } var intent; if (args.length === 0) { - _utils.log(router, 'Updating query params'); + _utils.log(router, "Updating query params"); // A query param update is really just a transition // into the route you're already on. var handlerInfos = router.state.handlerInfos; intent = new _transitionIntentNamedTransitionIntent["default"]({ @@ -53780,15 +54598,15 @@ contexts: [], queryParams: queryParams }); } else if (name.charAt(0) === '/') { - _utils.log(router, 'Attempting URL transition to ' + name); + _utils.log(router, "Attempting URL transition to " + name); intent = new _transitionIntentUrlTransitionIntent["default"]({ url: name }); } else { - _utils.log(router, 'Attempting transition to ' + name); + _utils.log(router, "Attempting transition to " + name); intent = new _transitionIntentNamedTransitionIntent["default"]({ name: args[0], contexts: _utils.slice.call(args, 1), queryParams: queryParams }); @@ -53889,10 +54707,11 @@ } exports["default"] = Router; }); enifed('router/transition-intent', ['exports', './utils'], function (exports, _utils) { + 'use strict'; function TransitionIntent(props) { this.initialize(props); // TODO: wat @@ -53905,10 +54724,12 @@ }; exports["default"] = TransitionIntent; }); enifed('router/transition-intent/named-transition-intent', ['exports', '../transition-intent', '../transition-state', '../handler-info/factory', '../utils'], function (exports, _transitionIntent, _transitionState, _handlerInfoFactory, _utils) { + 'use strict'; + exports["default"] = _utils.subclass(_transitionIntent["default"], { name: null, pivotHandler: null, contexts: null, queryParams: null, @@ -54001,11 +54822,11 @@ newState.handlerInfos.unshift(handlerToUse); } if (objects.length > 0) { - throw new Error('More context objects were passed than there are dynamic segments for the route: ' + targetRouteName); + throw new Error("More context objects were passed than there are dynamic segments for the route: " + targetRouteName); } if (!isIntermediate) { this.invalidateChildren(newState.handlerInfos, invalidateIndex); } @@ -54073,19 +54894,19 @@ var oldParams = oldHandlerInfo && name === oldHandlerInfo.name && oldHandlerInfo.params || {}; var peek = objects[objects.length - 1]; var paramName = names[numNames]; if (_utils.isParam(peek)) { - params[paramName] = '' + objects.pop(); + params[paramName] = "" + objects.pop(); } else { // If we're here, this means only some of the params // were string/number params, so try and use a param // value from a previous handler. if (oldParams.hasOwnProperty(paramName)) { params[paramName] = oldParams[paramName]; } else { - throw new Error('You didn\'t provide enough string/numeric parameters to satisfy all of the dynamic segments for route ' + name); + throw new Error("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route " + name); } } } return _handlerInfoFactory["default"]('param', { @@ -54095,10 +54916,12 @@ }); } }); }); enifed('router/transition-intent/url-transition-intent', ['exports', '../transition-intent', '../transition-state', '../handler-info/factory', '../utils', './../unrecognized-url-error'], function (exports, _transitionIntent, _transitionState, _handlerInfoFactory, _utils, _unrecognizedUrlError) { + 'use strict'; + exports["default"] = _utils.subclass(_transitionIntent["default"], { url: null, initialize: function (props) { this.url = props.url; @@ -54147,10 +54970,11 @@ return newState; } }); }); enifed('router/transition-state', ['exports', './handler-info', './utils', 'rsvp/promise'], function (exports, _handlerInfo, _utils, _rsvpPromise) { + 'use strict'; function TransitionState(other) { this.handlerInfos = []; this.queryParams = {}; this.params = {}; @@ -54167,11 +54991,11 @@ if (targetName !== '') { targetName += '.'; } targetName += handlerInfo.name; }); - return _utils.promiseLabel('\'' + targetName + '\': ' + label); + return _utils.promiseLabel("'" + targetName + "': " + label); }, resolve: function (shouldContinue, payload) { var self = this; // First, calculate params for this state. This is useful @@ -54186,20 +55010,20 @@ var currentState = this; var wasAborted = false; // The prelude RSVP.resolve() asyncs us into the promise land. - return _rsvpPromise["default"].resolve(null, this.promiseLabel('Start transition')).then(resolveOneHandlerInfo, null, this.promiseLabel('Resolve handler'))['catch'](handleError, this.promiseLabel('Handle error')); + return _rsvpPromise["default"].resolve(null, this.promiseLabel("Start transition")).then(resolveOneHandlerInfo, null, this.promiseLabel('Resolve handler'))['catch'](handleError, this.promiseLabel('Handle error')); function innerShouldContinue() { - return _rsvpPromise["default"].resolve(shouldContinue(), currentState.promiseLabel('Check if should continue'))['catch'](function (reason) { + return _rsvpPromise["default"].resolve(shouldContinue(), currentState.promiseLabel("Check if should continue"))['catch'](function (reason) { // We distinguish between errors that occurred // during resolution (e.g. beforeModel/model/afterModel), // and aborts due to a rejecting promise from shouldContinue(). wasAborted = true; return _rsvpPromise["default"].reject(reason); - }, currentState.promiseLabel('Handle abort')); + }, currentState.promiseLabel("Handle abort")); } function handleError(error) { // This is the only possible // reject value of TransitionState#resolve @@ -54252,10 +55076,11 @@ }; exports["default"] = TransitionState; }); enifed('router/transition', ['exports', 'rsvp/promise', './handler-info', './utils'], function (exports, _rsvpPromise, _handlerInfo, _utils) { + 'use strict'; /** @private A Transition is a thennable (a promise-like object) that represents @@ -54314,11 +55139,11 @@ this.params = {}; } function checkForAbort() { if (transition.isAborted) { - return _rsvpPromise["default"].reject(undefined, _utils.promiseLabel('Transition aborted - reject')); + return _rsvpPromise["default"].reject(undefined, _utils.promiseLabel("Transition aborted - reject")); } } } Transition.currentSequence = 0; @@ -54424,11 +55249,11 @@ */ abort: function () { if (this.isAborted) { return this; } - _utils.log(this.router, this.sequence, this.targetName + ': transition was aborted'); + _utils.log(this.router, this.sequence, this.targetName + ": transition was aborted"); this.intent.preTransitionState = this.router.state; this.isAborted = true; this.isActive = false; this.router.activeTransition = null; return this; @@ -54506,11 +55331,11 @@ return _rsvpPromise["default"].reject(reason); }); }, toString: function () { - return 'Transition (sequence ' + this.sequence + ')'; + return "Transition (sequence " + this.sequence + ")"; }, /** @private */ @@ -54526,24 +55351,25 @@ @private Logs and returns a TransitionAborted error. */ function logAbort(transition) { - _utils.log(transition.router, transition.sequence, 'detected abort.'); + _utils.log(transition.router, transition.sequence, "detected abort."); return new TransitionAborted(); } function TransitionAborted(message) { - this.message = message || 'TransitionAborted'; - this.name = 'TransitionAborted'; + this.message = message || "TransitionAborted"; + this.name = "TransitionAborted"; } exports.Transition = Transition; exports.logAbort = logAbort; exports.TransitionAborted = TransitionAborted; }); enifed("router/unrecognized-url-error", ["exports", "./utils"], function (exports, _utils) { + "use strict"; /** Promise reject reasons passed to promise rejection handlers for failed transitions. */ @@ -54556,10 +55382,12 @@ UnrecognizedURLError.prototype = _utils.oCreate(Error.prototype); exports["default"] = UnrecognizedURLError; }); enifed('router/utils', ['exports'], function (exports) { + 'use strict'; + exports.extractQueryParams = extractQueryParams; exports.log = log; exports.bind = bind; exports.forEach = forEach; exports.trigger = trigger; @@ -54569,11 +55397,11 @@ var slice = Array.prototype.slice; var _isArray; if (!Array.isArray) { _isArray = function (x) { - return Object.prototype.toString.call(x) === '[object Array]'; + return Object.prototype.toString.call(x) === "[object Array]"; }; } else { _isArray = Array.isArray; } @@ -54592,16 +55420,16 @@ function F() {} F.prototype = proto; return new F(); }; - exports.oCreate = oCreate; /** @private Extracts query params from the end of an array **/ + exports.oCreate = oCreate; function extractQueryParams(array) { var len = array && array.length, head, queryParams; @@ -54639,11 +55467,11 @@ if (!router.log) { return; } if (arguments.length === 3) { - router.log('Transition #' + sequence + ': ' + msg); + router.log("Transition #" + sequence + ": " + msg); } else { msg = sequence; router.log(msg); } } @@ -54656,11 +55484,11 @@ return fn.apply(context, args); }; } function isParam(object) { - return typeof object === 'string' || object instanceof String || typeof object === 'number' || object instanceof Number; + return typeof object === "string" || object instanceof String || typeof object === "number" || object instanceof Number; } function forEach(array, callback) { for (var i = 0, l = array.length; i < l && false !== callback(array[i]); i++) {} } @@ -54675,11 +55503,11 @@ if (!handlerInfos) { if (ignoreFailure) { return; } - throw new Error('Could not trigger event \'' + name + '\'. There are no active handlers'); + throw new Error("Could not trigger event '" + name + "'. There are no active handlers"); } var eventWasHandled = false; for (var i = handlerInfos.length - 1; i >= 0; i--) { @@ -54694,11 +55522,11 @@ } } } if (!eventWasHandled && !ignoreFailure) { - throw new Error('Nothing handled the event \'' + name + '\'.'); + throw new Error("Nothing handled the event '" + name + "'."); } } function getChangelist(oldObject, newObject) { var key; @@ -54766,11 +55594,11 @@ function resolveHook(obj, hookName) { if (!obj) { return; } - var underscored = '_' + hookName; + var underscored = "_" + hookName; return obj[underscored] && underscored || obj[hookName] && hookName; } function callHook(obj, _hookName, arg1, arg2) { var hookName = resolveHook(obj, _hookName); @@ -54799,10 +55627,11 @@ exports.callHook = callHook; exports.resolveHook = resolveHook; exports.applyHook = applyHook; }); enifed('rsvp', ['exports', './rsvp/promise', './rsvp/events', './rsvp/node', './rsvp/all', './rsvp/all-settled', './rsvp/race', './rsvp/hash', './rsvp/hash-settled', './rsvp/rethrow', './rsvp/defer', './rsvp/config', './rsvp/map', './rsvp/resolve', './rsvp/reject', './rsvp/filter', './rsvp/asap'], function (exports, _rsvpPromise, _rsvpEvents, _rsvpNode, _rsvpAll, _rsvpAllSettled, _rsvpRace, _rsvpHash, _rsvpHashSettled, _rsvpRethrow, _rsvpDefer, _rsvpConfig, _rsvpMap, _rsvpResolve, _rsvpReject, _rsvpFilter, _rsvpAsap) { + 'use strict'; _rsvpConfig.config.async = _rsvpAsap["default"]; // default async is asap; var cast = _rsvpResolve["default"]; function async(callback, arg) { _rsvpConfig.config.async(callback, arg); @@ -54846,10 +55675,11 @@ exports.async = async; exports.map = _rsvpMap["default"]; exports.filter = _rsvpFilter["default"]; }); enifed('rsvp.umd', ['exports', './rsvp'], function (exports, _rsvp) { + 'use strict'; var RSVP = { 'race': _rsvp.race, 'Promise': _rsvp.Promise, 'allSettled': _rsvp.allSettled, @@ -54875,15 +55705,16 @@ enifed(function () { return RSVP; }); } else if (typeof module !== 'undefined' && module['exports']) { module['exports'] = RSVP; - } else if (typeof this !== 'undefined') { - this['RSVP'] = RSVP; + } else if (typeof undefined !== 'undefined') { + undefined['RSVP'] = RSVP; } }); enifed('rsvp/-internal', ['exports', './utils', './instrument', './config'], function (exports, _utils, _instrument, _config) { + 'use strict'; function withOwnPromise() { return new TypeError('A promises callback cannot return that same promise.'); } @@ -55107,19 +55938,21 @@ } else { value = detail; succeeded = true; } - if (promise._state !== PENDING) {} else if (hasCallback && succeeded) { - resolve(promise, value); - } else if (failed) { - reject(promise, error); - } else if (settled === FULFILLED) { - fulfill(promise, value); - } else if (settled === REJECTED) { - reject(promise, value); - } + if (promise._state !== PENDING) { + // noop + } else if (hasCallback && succeeded) { + resolve(promise, value); + } else if (failed) { + reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + reject(promise, value); + } } function initializePromise(promise, resolver) { try { resolver(function resolvePromise(value) { @@ -55143,13 +55976,13 @@ exports.invokeCallback = invokeCallback; exports.FULFILLED = FULFILLED; exports.REJECTED = REJECTED; exports.PENDING = PENDING; }); - -// noop enifed('rsvp/all-settled', ['exports', './enumerator', './promise', './utils'], function (exports, _enumerator, _promise, _utils) { + 'use strict'; + exports["default"] = allSettled; function AllSettled(Constructor, entries, label) { this._superConstructor(Constructor, entries, false, /* don't abort on reject */label); } @@ -55216,10 +56049,12 @@ function allSettled(entries, label) { return new AllSettled(_promise["default"], entries, label).promise; } }); enifed("rsvp/all", ["exports", "./promise"], function (exports, _promise) { + "use strict"; + exports["default"] = all; /** This is a convenient alias for `RSVP.Promise.all`. @@ -55234,10 +56069,12 @@ function all(array, label) { return _promise["default"].all(array, label); } }); enifed('rsvp/asap', ['exports'], function (exports) { + 'use strict'; + exports["default"] = asap; var len = 0; function asap(callback, arg) { queue[len] = callback; @@ -55336,10 +56173,11 @@ } else { scheduleFlush = useSetTimeout(); } }); enifed('rsvp/config', ['exports', './events'], function (exports, _events) { + 'use strict'; var config = { instrument: false }; @@ -55363,10 +56201,12 @@ exports.config = config; exports.configure = configure; }); enifed('rsvp/defer', ['exports', './promise'], function (exports, _promise) { + 'use strict'; + exports["default"] = defer; /** `RSVP.defer` returns an object similar to jQuery's `$.Deferred`. `RSVP.defer` should be used when porting over code reliant on `$.Deferred`'s @@ -55410,10 +56250,12 @@ return deferred; } }); enifed('rsvp/enumerator', ['exports', './utils', './-internal'], function (exports, _utils, _internal) { + 'use strict'; + exports.makeSettledResult = makeSettledResult; function makeSettledResult(state, position, value) { if (state === _internal.FULFILLED) { return { @@ -55524,10 +56366,12 @@ enumerator._settledAt(_internal.REJECTED, i, reason); }); }; }); enifed("rsvp/events", ["exports"], function (exports) { + "use strict"; + function indexOf(callbacks, callback) { for (var i = 0, l = callbacks.length; i < l; i++) { if (callbacks[i] === callback) { return i; } @@ -55708,10 +56552,12 @@ } } }; }); enifed('rsvp/filter', ['exports', './promise', './utils'], function (exports, _promise, _utils) { + 'use strict'; + exports["default"] = filter; /** `RSVP.filter` is similar to JavaScript's native `filter` method, except that it waits for all promises to become fulfilled before running the `filterFn` on @@ -55799,11 +56645,11 @@ */ function filter(promises, filterFn, label) { return _promise["default"].all(promises, label).then(function (values) { if (!_utils.isFunction(filterFn)) { - throw new TypeError('You must pass a function as filter\'s second argument.'); + throw new TypeError("You must pass a function as filter's second argument."); } var length = values.length; var filtered = new Array(length); @@ -55828,10 +56674,12 @@ }); }); } }); enifed('rsvp/hash-settled', ['exports', './promise', './enumerator', './promise-hash', './utils'], function (exports, _promise, _enumerator, _promiseHash, _utils) { + 'use strict'; + exports["default"] = hashSettled; function HashSettled(Constructor, object, label) { this._superConstructor(Constructor, object, false, label); } @@ -55949,10 +56797,12 @@ function hashSettled(object, label) { return new HashSettled(_promise["default"], object, label).promise; } }); enifed('rsvp/hash', ['exports', './promise', './promise-hash'], function (exports, _promise, _promiseHash) { + 'use strict'; + exports["default"] = hash; /** `RSVP.hash` is similar to `RSVP.all`, but takes an object instead of an array for its `promises` argument. @@ -56045,10 +56895,12 @@ function hash(object, label) { return new _promiseHash["default"](_promise["default"], object, label).promise; } }); enifed('rsvp/instrument', ['exports', './config', './utils'], function (exports, _config, _utils) { + 'use strict'; + exports["default"] = instrument; var queue = []; function scheduleFlush() { @@ -56080,17 +56932,19 @@ eventName: eventName, detail: promise._result, childId: child && child._id, label: promise._label, timeStamp: _utils.now(), - error: _config.config['instrument-with-stack'] ? new Error(promise._label) : null + error: _config.config["instrument-with-stack"] ? new Error(promise._label) : null } })) { scheduleFlush(); } } }); enifed('rsvp/map', ['exports', './promise', './utils'], function (exports, _promise, _utils) { + 'use strict'; + exports["default"] = map; /** `RSVP.map` is similar to JavaScript's native `map` method, except that it waits for all promises to become fulfilled before running the `mapFn` on @@ -56171,11 +57025,11 @@ */ function map(promises, mapFn, label) { return _promise["default"].all(promises, label).then(function (values) { if (!_utils.isFunction(mapFn)) { - throw new TypeError('You must pass a function as map\'s second argument.'); + throw new TypeError("You must pass a function as map's second argument."); } var length = values.length; var results = new Array(length); @@ -56186,10 +57040,12 @@ return _promise["default"].all(results, label); }); } }); enifed('rsvp/node', ['exports', './promise', './-internal', './utils'], function (exports, _promise, _internal, _utils) { + 'use strict'; + exports["default"] = denodeify; function Result() { this.value = undefined; } @@ -56454,10 +57310,11 @@ return false; } } }); enifed('rsvp/promise-hash', ['exports', './enumerator', './-internal', './utils'], function (exports, _enumerator, _internal, _utils) { + 'use strict'; function PromiseHash(Constructor, object, label) { this._superConstructor(Constructor, object, true, label); } @@ -56500,20 +57357,21 @@ this._eachEntry(result.entry, result.position); } }; }); enifed('rsvp/promise', ['exports', './config', './instrument', './utils', './-internal', './promise/all', './promise/race', './promise/resolve', './promise/reject'], function (exports, _config, _instrument, _utils, _internal, _promiseAll, _promiseRace, _promiseResolve, _promiseReject) { + 'use strict'; var guidKey = 'rsvp_' + _utils.now() + '-'; var counter = 0; function needsResolver() { throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); } function needsNew() { - throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); } exports["default"] = Promise; /** Promise objects represent the eventual result of an asynchronous operation. The @@ -56970,10 +57828,12 @@ }, label); } }; }); enifed('rsvp/promise/all', ['exports', '../enumerator'], function (exports, _enumerator) { + 'use strict'; + exports["default"] = all; /** `RSVP.Promise.all` accepts an array of promises, and returns a new promise which is fulfilled with an array of fulfillment values for the passed promises, or @@ -57025,10 +57885,12 @@ function all(entries, label) { return new _enumerator["default"](this, entries, true, /* abort on reject */label).promise; } }); enifed('rsvp/promise/race', ['exports', '../utils', '../-internal'], function (exports, _utils, _internal) { + 'use strict'; + exports["default"] = race; /** `RSVP.Promise.race` returns a new promise which is settled in the same way as the first passed promise to settle. @@ -57123,10 +57985,12 @@ return promise; } }); enifed('rsvp/promise/reject', ['exports', '../-internal'], function (exports, _internal) { + 'use strict'; + exports["default"] = reject; /** `RSVP.Promise.reject` returns a promise rejected with the passed `reason`. It is shorthand for the following: @@ -57170,10 +58034,12 @@ _internal.reject(promise, reason); return promise; } }); enifed('rsvp/promise/resolve', ['exports', '../-internal'], function (exports, _internal) { + 'use strict'; + exports["default"] = resolve; /** `RSVP.Promise.resolve` returns a promise that will become resolved with the passed `value`. It is shorthand for the following: @@ -57219,10 +58085,12 @@ _internal.resolve(promise, object); return promise; } }); enifed('rsvp/race', ['exports', './promise'], function (exports, _promise) { + 'use strict'; + exports["default"] = race; /** This is a convenient alias for `RSVP.Promise.race`. @@ -57237,10 +58105,12 @@ function race(array, label) { return _promise["default"].race(array, label); } }); enifed('rsvp/reject', ['exports', './promise'], function (exports, _promise) { + 'use strict'; + exports["default"] = reject; /** This is a convenient alias for `RSVP.Promise.reject`. @@ -57256,10 +58126,12 @@ function reject(reason, label) { return _promise["default"].reject(reason, label); } }); enifed('rsvp/resolve', ['exports', './promise'], function (exports, _promise) { + 'use strict'; + exports["default"] = resolve; /** This is a convenient alias for `RSVP.Promise.resolve`. @@ -57276,11 +58148,10 @@ function resolve(value, label) { return _promise["default"].resolve(value, label); } }); enifed("rsvp/rethrow", ["exports"], function (exports) { - exports["default"] = rethrow; /** `RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event loop in order to aid debugging. Promises A+ specifies that any exceptions that occur with a promise must be @@ -57317,19 +58188,24 @@ @for RSVP @param {Error} reason reason the promise became rejected. @throws Error @static */ + "use strict"; + exports["default"] = rethrow; + function rethrow(reason) { setTimeout(function () { throw reason; }); throw reason; } }); enifed('rsvp/utils', ['exports'], function (exports) { + 'use strict'; + exports.objectOrFunction = objectOrFunction; exports.isFunction = isFunction; exports.isMaybeThenable = isMaybeThenable; function objectOrFunction(x) { @@ -57353,12 +58229,12 @@ _isArray = Array.isArray; } var isArray = _isArray; - exports.isArray = isArray; // Date.now is not available in browsers < IE9 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility + exports.isArray = isArray; var now = Date.now || function () { return new Date().getTime(); }; exports.now = now; \ No newline at end of file