+ ```
+
+ ### Non-block version of collection
+
+ If you provide an `itemViewClass` option that has its own `template` you may
+ omit the block.
+
+ The following template:
+
+ ```handlebars
+ {{! application.hbs }}
+ {{collection content=model itemViewClass="an-item"}}
+ ```
+
+ And application code
+
+ ```javascript
+ App = Ember.Application.create();
+ App.ApplicationRoute = Ember.Route.extend({
+ model: function(){
+ return [{name: 'Yehuda'},{name: 'Tom'},{name: 'Peter'}];
+ }
+ });
+
+ App.AnItemView = Ember.View.extend({
+ template: Ember.Handlebars.compile("Greetings {{view.content.name}}")
+ });
+ ```
+
+ Will result in the HTML structure below
+
+ ```html
+
+
Greetings Yehuda
+
Greetings Tom
+
Greetings Peter
+
+ ```
+
+ ### Specifying a CollectionView subclass
+
+ By default the `{{collection}}` helper will create an instance of
+ `Ember.CollectionView`. You can supply a `Ember.CollectionView` subclass to
+ the helper by passing it as the first argument:
+
+ ```handlebars
+ {{#collection "my-custom-collection" content=model}}
+ Hi {{view.content.name}}
+ {{/collection}}
+ ```
+
+ This example would look for the class `App.MyCustomCollection`.
+
+ ### Forwarded `item.*`-named Options
+
+ As with the `{{view}}`, helper options passed to the `{{collection}}` will be
+ set on the resulting `Ember.CollectionView` as properties. Additionally,
+ options prefixed with `item` will be applied to the views rendered for each
+ item (note the camelcasing):
+
+ ```handlebars
+ {{#collection content=model
+ itemTagName="p"
+ itemClassNames="greeting"}}
+ Howdy {{view.content.name}}
+ {{/collection}}
+ ```
+
+ Will result in the following HTML structure:
+
+ ```html
+
+
Howdy Yehuda
+
Howdy Tom
+
Howdy Peter
+
+ ```
+
+ @method collection
+ @for Ember.Handlebars.helpers
+ @param {String} path
+ @param {Hash} options
+ @return {String} HTML string
+ @deprecated Use `{{each}}` helper instead.
+ */
+ function collectionHelper(params, hash, options, env) {
+ var path = params[0];
+
+ Ember.deprecate("Using the {{collection}} helper without specifying a class has been" +
+ " deprecated as the {{each}} helper now supports the same functionality.", path !== 'collection');
+
+ Ember.assert("You cannot pass more than one argument to the collection helper", params.length <= 1);
+
+ var data = env.data;
+ var template = options.template;
+ var inverse = options.inverse;
+ var view = data.view;
+
+ // This should be deterministic, and should probably come from a
+ // parent view and not the controller.
+ var controller = get(view, 'controller');
+ var container = (controller && controller.container ? controller.container : view.container);
+
+ // If passed a path string, convert that into an object.
+ // Otherwise, just default to the standard class.
+ var collectionClass;
+ if (path) {
+ collectionClass = readViewFactory(path, container);
+ Ember.assert(fmt("%@ #collection: Could not find collection class %@", [data.view, path]), !!collectionClass);
+ }
+ else {
+ collectionClass = CollectionView;
+ }
+
+ var itemHash = {};
+ var match;
+
+ // Extract item view class if provided else default to the standard class
+ var collectionPrototype = collectionClass.proto();
+ var itemViewClass;
+
+ if (hash.itemView) {
+ itemViewClass = readViewFactory(hash.itemView, container);
+ } else if (hash.itemViewClass) {
+ itemViewClass = readViewFactory(hash.itemViewClass, container);
+ } else {
+ itemViewClass = collectionPrototype.itemViewClass;
+ }
+
+ if (typeof itemViewClass === 'string') {
+ itemViewClass = container.lookupFactory('view:'+itemViewClass);
+ }
+
+ Ember.assert(fmt("%@ #collection: Could not find itemViewClass %@", [data.view, itemViewClass]), !!itemViewClass);
+
+ delete hash.itemViewClass;
+ delete hash.itemView;
+
+ // Go through options passed to the {{collection}} helper and extract options
+ // that configure item views instead of the collection itself.
+ for (var prop in hash) {
+ if (prop === 'itemController' || prop === 'itemClassBinding') {
+ continue;
+ }
+ if (hash.hasOwnProperty(prop)) {
+ match = prop.match(/^item(.)(.*)$/);
+ if (match) {
+ var childProp = match[1].toLowerCase() + match[2];
+
+ if (IS_BINDING.test(prop)) {
+ itemHash[childProp] = view._getBindingForStream(hash[prop]);
+ } else {
+ itemHash[childProp] = hash[prop];
+ }
+ delete hash[prop];
+ }
+ }
+ }
+
+ if (template) {
+ itemHash.template = template;
+ delete options.template;
+ }
+
+ var emptyViewClass;
+ if (inverse) {
+ emptyViewClass = get(collectionPrototype, 'emptyViewClass');
+ emptyViewClass = emptyViewClass.extend({
+ template: inverse,
+ tagName: itemHash.tagName
+ });
+ } else if (hash.emptyViewClass) {
+ emptyViewClass = readViewFactory(hash.emptyViewClass, container);
+ }
+ if (emptyViewClass) { hash.emptyView = emptyViewClass; }
+
+ if (hash.keyword) {
+ itemHash._contextBinding = Binding.oneWay('_parentView.context');
+ } else {
+ itemHash._contextBinding = Binding.oneWay('content');
+ }
+
+ var viewOptions = ViewHelper.propertiesFromHTMLOptions(itemHash, {}, { data: data });
+
+ if (hash.itemClassBinding) {
+ var itemClassBindings = hash.itemClassBinding.split(' ');
+ viewOptions.classNameBindings = map(itemClassBindings, function(classBinding){
+ return streamifyClassNameBinding(view, classBinding);
+ });
+ }
+
+ hash.itemViewClass = itemViewClass;
+ hash._itemViewProps = viewOptions;
+
+ options.helperName = options.helperName || 'collection';
+
+ return env.helpers.view.helperFunction.call(this, [collectionClass], hash, options, env);
+ }
+
+ __exports__.collectionHelper = collectionHelper;
+ });
+enifed("ember-htmlbars/helpers/debugger",
+ ["ember-metal/logger","exports"],
+ function(__dependency1__, __exports__) {
+ "use strict";
+ /*jshint debug:true*/
+
+ /**
+ @module ember
+ @submodule ember-htmlbars
+ */
+ var Logger = __dependency1__["default"];
+
+ /**
+ Execute the `debugger` statement in the current context.
+
+ ```handlebars
+ {{debugger}}
+ ```
+
+ Before invoking the `debugger` statement, there
+ are a few helpful variables defined in the
+ body of this helper that you can inspect while
+ debugging that describe how and where this
+ helper was invoked:
+
+ - templateContext: this is most likely a controller
+ from which this template looks up / displays properties
+ - typeOfTemplateContext: a string description of
+ what the templateContext is
+
+ For example, if you're wondering why a value `{{foo}}`
+ isn't rendering as expected within a template, you
+ could place a `{{debugger}}` statement, and when
+ the `debugger;` breakpoint is hit, you can inspect
+ `templateContext`, determine if it's the object you
+ expect, and/or evaluate expressions in the console
+ to perform property lookups on the `templateContext`:
+
+ ```
+ > templateContext.get('foo') // -> ""
+ ```
+
+ @method debugger
+ @for Ember.Handlebars.helpers
+ @param {String} property
+ */
+ function debuggerHelper() {
+
+ // These are helpful values you can inspect while debugging.
+ /* jshint unused: false */
+ var view = this;
+ Logger.info('Use `this` to access the view context.');
+
+ debugger;
+ }
+
+ __exports__.debuggerHelper = debuggerHelper;
+ });
+enifed("ember-htmlbars/helpers/each",
+ ["ember-metal/core","ember-views/views/each","exports"],
+ function(__dependency1__, __dependency2__, __exports__) {
+ "use strict";
+
+ /**
+ @module ember
+ @submodule ember-htmlbars
+ */
+ var Ember = __dependency1__["default"];
+ // Ember.assert;
+ var EachView = __dependency2__["default"];
+
+ /**
+ The `{{#each}}` helper loops over elements in a collection. It is an extension
+ of the base Handlebars `{{#each}}` helper.
+
+ The default behavior of `{{#each}}` is to yield its inner block once for every
+ item in an array.
+
+ ```javascript
+ var developers = [{name: 'Yehuda'},{name: 'Tom'}, {name: 'Paul'}];
+ ```
+
+ ```handlebars
+ {{#each person in developers}}
+ {{person.name}}
+ {{! `this` is whatever it was outside the #each }}
+ {{/each}}
+ ```
+
+ The same rules apply to arrays of primitives, but the items may need to be
+ references with `{{this}}`.
+
+ ```javascript
+ var developerNames = ['Yehuda', 'Tom', 'Paul']
+ ```
+
+ ```handlebars
+ {{#each name in developerNames}}
+ {{name}}
+ {{/each}}
+ ```
+
+ ### {{else}} condition
+
+ `{{#each}}` can have a matching `{{else}}`. The contents of this block will render
+ if the collection is empty.
+
+ ```
+ {{#each person in developers}}
+ {{person.name}}
+ {{else}}
+
Sorry, nobody is available for this task.
+ {{/each}}
+ ```
+
+ ### Specifying an alternative view for each item
+
+ `itemViewClass` can control which view will be used during the render of each
+ item's template.
+
+ The following template:
+
+ ```handlebars
+
+ ```
+
+ Will use the following view for each item
+
+ ```javascript
+ App.PersonView = Ember.View.extend({
+ tagName: 'li'
+ });
+ ```
+
+ Resulting in HTML output that looks like the following:
+
+ ```html
+
+
Yehuda
+
Tom
+
Paul
+
+ ```
+
+ `itemViewClass` also enables a non-block form of `{{each}}`. The view
+ must {{#crossLink "Ember.View/toc_templates"}}provide its own template{{/crossLink}},
+ and then the block should be dropped. An example that outputs the same HTML
+ as the previous one:
+
+ ```javascript
+ App.PersonView = Ember.View.extend({
+ tagName: 'li',
+ template: '{{developer.name}}'
+ });
+ ```
+
+ ```handlebars
+
+ {{each developer in developers itemViewClass="person"}}
+
+ ```
+
+ ### Specifying an alternative view for no items (else)
+
+ The `emptyViewClass` option provides the same flexibility to the `{{else}}`
+ case of the each helper.
+
+ ```javascript
+ App.NoPeopleView = Ember.View.extend({
+ tagName: 'li',
+ template: 'No person is available, sorry'
+ });
+ ```
+
+ ```handlebars
+
+ {{#each developer in developers emptyViewClass="no-people"}}
+
{{developer.name}}
+ {{/each}}
+
+ ```
+
+ ### Wrapping each item in a controller
+
+ Controllers in Ember manage state and decorate data. In many cases,
+ providing a controller for each item in a list can be useful.
+ Specifically, an {{#crossLink "Ember.ObjectController"}}Ember.ObjectController{{/crossLink}}
+ should probably be used. Item controllers are passed the item they
+ will present as a `model` property, and an object controller will
+ proxy property lookups to `model` for us.
+
+ This allows state and decoration to be added to the controller
+ while any other property lookups are delegated to the model. An example:
+
+ ```javascript
+ App.RecruitController = Ember.ObjectController.extend({
+ isAvailableForHire: function() {
+ return !this.get('isEmployed') && this.get('isSeekingWork');
+ }.property('isEmployed', 'isSeekingWork')
+ })
+ ```
+
+ ```handlebars
+ {{#each person in developers itemController="recruit"}}
+ {{person.name}} {{#if person.isAvailableForHire}}Hire me!{{/if}}
+ {{/each}}
+ ```
+
+ @method each
+ @for Ember.Handlebars.helpers
+ @param [name] {String} name for item (used with `in`)
+ @param [path] {String} path
+ @param [options] {Object} Handlebars key/value pairs of options
+ @param [options.itemViewClass] {String} a path to a view class used for each item
+ @param [options.emptyViewClass] {String} a path to a view class used for each item
+ @param [options.itemController] {String} name of a controller to be created for each item
+ */
+ function eachHelper(params, hash, options, env) {
+ var helperName = 'each';
+ var path = params[0] || this.getStream('');
+
+ Ember.assert(
+ "If you pass more than one argument to the each helper, " +
+ "it must be in the form #each foo in bar",
+ params.length <= 1
+ );
+
+ if (options.template && options.template.blockParams) {
+ hash.keyword = true;
+ }
+
+ Ember.deprecate(
+ "Using the context switching form of {{each}} is deprecated. " +
+ "Please use the keyword form (`{{#each foo in bar}}`) instead.",
+ hash.keyword === true || typeof hash.keyword === 'string',
+ { url: 'http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope' }
+ );
+
+ hash.dataSource = path;
+ options.helperName = options.helperName || helperName;
+
+ return env.helpers.collection.helperFunction.call(this, [EachView], hash, options, env);
+ }
+
+ __exports__.EachView = EachView;
+ __exports__.eachHelper = eachHelper;
+ });
+enifed("ember-htmlbars/helpers/if_unless",
+ ["ember-metal/core","ember-htmlbars/helpers/binding","ember-metal/property_get","ember-metal/utils","ember-views/streams/conditional_stream","ember-metal/streams/utils","exports"],
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __exports__) {
+ "use strict";
+ /**
+ @module ember
+ @submodule ember-htmlbars
+ */
+
+ var Ember = __dependency1__["default"];
+ // Ember.assert
+ var bind = __dependency2__.bind;
+
+ var get = __dependency3__.get;
+ var isArray = __dependency4__.isArray;
+ var ConditionalStream = __dependency5__["default"];
+ var isStream = __dependency6__.isStream;
+
+ function shouldDisplayIfHelperContent(result) {
+ var truthy = result && get(result, 'isTruthy');
+ if (typeof truthy === 'boolean') { return truthy; }
+
+ if (isArray(result)) {
+ return get(result, 'length') !== 0;
+ } else {
+ return !!result;
+ }
+ }
+
+ var EMPTY_TEMPLATE = {
+ isHTMLBars: true,
+ render: function() {
+ return '';
+ }
+ };
+ /**
+ Use the `boundIf` helper to create a conditional that re-evaluates
+ whenever the truthiness of the bound value changes.
+
+ ```handlebars
+ {{#boundIf "content.shouldDisplayTitle"}}
+ {{content.title}}
+ {{/boundIf}}
+ ```
+
+ @private
+ @method boundIf
+ @for Ember.Handlebars.helpers
+ @param {String} property Property to bind
+ @param {Function} fn Context to provide for rendering
+ @return {String} HTML string
+ */
+ function boundIfHelper(params, hash, options, env) {
+ options.helperName = options.helperName || 'boundIf';
+ return bind.call(this, params[0], hash, options, env, true, shouldDisplayIfHelperContent, shouldDisplayIfHelperContent, [
+ 'isTruthy',
+ 'length'
+ ]);
+ }
+
+ /**
+ @private
+
+ Use the `unboundIf` helper to create a conditional that evaluates once.
+
+ ```handlebars
+ {{#unboundIf "content.shouldDisplayTitle"}}
+ {{content.title}}
+ {{/unboundIf}}
+ ```
+
+ @method unboundIf
+ @for Ember.Handlebars.helpers
+ @param {String} property Property to bind
+ @param {Function} fn Context to provide for rendering
+ @return {String} HTML string
+ @since 1.4.0
+ */
+ function unboundIfHelper(params, hash, options, env) {
+ var template = options.template;
+ var value = params[0];
+
+ if (isStream(params[0])) {
+ value = params[0].value();
+ }
+
+ if (!shouldDisplayIfHelperContent(value)) {
+ template = options.inverse || EMPTY_TEMPLATE;
+ }
+
+ return template.render(this, env, options.morph.contextualElement);
+ }
+
+ function _inlineIfAssertion(params) {
+ Ember.assert("If helper in inline form expects between two and three arguments", params.length === 2 || params.length === 3);
+ }
+
+ /**
+ See [boundIf](/api/classes/Ember.Handlebars.helpers.html#method_boundIf)
+ and [unboundIf](/api/classes/Ember.Handlebars.helpers.html#method_unboundIf)
+
+ @method if
+ @for Ember.Handlebars.helpers
+ @param {Function} context
+ @param {Hash} options
+ @return {String} HTML string
+ */
+ function ifHelper(params, hash, options, env) {
+ Ember.assert("If helper in block form expect exactly one argument", !options.template || params.length === 1);
+
+ options.inverse = options.inverse || EMPTY_TEMPLATE;
+
+ options.helperName = options.helperName || ('if ');
+
+ if (env.data.isUnbound) {
+ env.data.isUnbound = false;
+ return env.helpers.unboundIf.helperFunction.call(this, params, hash, options, env);
+ } else {
+ return env.helpers.boundIf.helperFunction.call(this, params, hash, options, env);
+ }
+ }
+
+ /**
+ @method unless
+ @for Ember.Handlebars.helpers
+ @param {Function} context
+ @param {Hash} options
+ @return {String} HTML string
+ */
+ function unlessHelper(params, hash, options, env) {
+ Ember.assert("You must pass exactly one argument to the unless helper", params.length === 1);
+ Ember.assert("You must pass a block to the unless helper", !!options.template);
+
+ var template = options.template;
+ var inverse = options.inverse || EMPTY_TEMPLATE;
+ var helperName = 'unless';
+
+ options.template = inverse;
+ options.inverse = template;
+
+ options.helperName = options.helperName || helperName;
+
+ if (env.data.isUnbound) {
+ env.data.isUnbound = false;
+ return env.helpers.unboundIf.helperFunction.call(this, params, hash, options, env);
+ } else {
+ return env.helpers.boundIf.helperFunction.call(this, params, hash, options, env);
+ }
+ }
+
+ __exports__.ifHelper = ifHelper;
+ __exports__.boundIfHelper = boundIfHelper;
+ __exports__.unboundIfHelper = unboundIfHelper;
+ __exports__.unlessHelper = unlessHelper;
+ });
+enifed("ember-htmlbars/helpers/input",
+ ["ember-views/views/checkbox","ember-views/views/text_field","ember-metal/streams/utils","ember-metal/core","exports"],
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
+ "use strict";
+ var Checkbox = __dependency1__["default"];
+ var TextField = __dependency2__["default"];
+ var read = __dependency3__.read;
+
+ var Ember = __dependency4__["default"];
+ // Ember.assert
+
+ /**
+ @module ember
+ @submodule ember-htmlbars
+ */
+
+ /**
+
+ The `{{input}}` helper inserts an HTML `` tag into the template,
+ with a `type` value of either `text` or `checkbox`. If no `type` is provided,
+ `text` will be the default value applied. The attributes of `{{input}}`
+ match those of the native HTML tag as closely as possible for these two types.
+
+ ## Use as text field
+ An `{{input}}` with no `type` or a `type` of `text` will render an HTML text input.
+ The following HTML attributes can be set via the helper:
+
+
+
`readonly`
`required`
`autofocus`
+
`value`
`placeholder`
`disabled`
+
`size`
`tabindex`
`maxlength`
+
`name`
`min`
`max`
+
`pattern`
`accept`
`autocomplete`
+
`autosave`
`formaction`
`formenctype`
+
`formmethod`
`formnovalidate`
`formtarget`
+
`height`
`inputmode`
`multiple`
+
`step`
`width`
`form`
+
`selectionDirection`
`spellcheck`
+
+
+
+ When set to a quoted string, these values will be directly applied to the HTML
+ element. When left unquoted, these values will be bound to a property on the
+ template's current rendering context (most typically a controller instance).
+
+ ## Unbound:
+
+ ```handlebars
+ {{input value="http://www.facebook.com"}}
+ ```
+
+
+ ```html
+
+ ```
+
+ ## Bound:
+
+ ```javascript
+ App.ApplicationController = Ember.Controller.extend({
+ firstName: "Stanley",
+ entryNotAllowed: true
+ });
+ ```
+
+
+ ```handlebars
+ {{input type="text" value=firstName disabled=entryNotAllowed size="50"}}
+ ```
+
+
+ ```html
+
+ ```
+
+ ## Actions
+
+ The helper can send multiple actions based on user events.
+
+ The action property defines the action which is sent when
+ the user presses the return key.
+
+ ```handlebars
+ {{input action="submit"}}
+ ```
+
+ The helper allows some user events to send actions.
+
+ * `enter`
+ * `insert-newline`
+ * `escape-press`
+ * `focus-in`
+ * `focus-out`
+ * `key-press`
+
+
+ For example, if you desire an action to be sent when the input is blurred,
+ you only need to setup the action name to the event name property.
+
+ ```handlebars
+ {{input focus-in="alertMessage"}}
+ ```
+
+ See more about [Text Support Actions](/api/classes/Ember.TextField.html)
+
+ ## Extension
+
+ Internally, `{{input type="text"}}` creates an instance of `Ember.TextField`, passing
+ arguments from the helper to `Ember.TextField`'s `create` method. You can extend the
+ capabilities of text inputs in your applications by reopening this class. For example,
+ if you are building a Bootstrap project where `data-*` attributes are used, you
+ can add one to the `TextField`'s `attributeBindings` property:
+
+
+ ```javascript
+ Ember.TextField.reopen({
+ attributeBindings: ['data-error']
+ });
+ ```
+
+ Keep in mind when writing `Ember.TextField` subclasses that `Ember.TextField`
+ itself extends `Ember.Component`, meaning that it does NOT inherit
+ the `controller` of the parent view.
+
+ See more about [Ember components](/api/classes/Ember.Component.html)
+
+
+ ## Use as checkbox
+
+ An `{{input}}` with a `type` of `checkbox` will render an HTML checkbox input.
+ The following HTML attributes can be set via the helper:
+
+ * `checked`
+ * `disabled`
+ * `tabindex`
+ * `indeterminate`
+ * `name`
+ * `autofocus`
+ * `form`
+
+
+ When set to a quoted string, these values will be directly applied to the HTML
+ element. When left unquoted, these values will be bound to a property on the
+ template's current rendering context (most typically a controller instance).
+
+ ## Unbound:
+
+ ```handlebars
+ {{input type="checkbox" name="isAdmin"}}
+ ```
+
+ ```html
+
+ ```
+
+ ## Bound:
+
+ ```javascript
+ App.ApplicationController = Ember.Controller.extend({
+ isAdmin: true
+ });
+ ```
+
+
+ ```handlebars
+ {{input type="checkbox" checked=isAdmin }}
+ ```
+
+
+ ```html
+
+ ```
+
+ ## Extension
+
+ Internally, `{{input type="checkbox"}}` creates an instance of `Ember.Checkbox`, passing
+ arguments from the helper to `Ember.Checkbox`'s `create` method. You can extend the
+ capablilties of checkbox inputs in your applications by reopening this class. For example,
+ if you wanted to add a css class to all checkboxes in your application:
+
+
+ ```javascript
+ Ember.Checkbox.reopen({
+ classNames: ['my-app-checkbox']
+ });
+ ```
+
+
+ @method input
+ @for Ember.Handlebars.helpers
+ @param {Hash} options
+ */
+ function inputHelper(params, hash, options, env) {
+ Ember.assert('You can only pass attributes to the `input` helper, not arguments', params.length === 0);
+
+ var onEvent = hash.on;
+ var inputType;
+
+ inputType = read(hash.type);
+
+ if (inputType === 'checkbox') {
+ delete hash.type;
+
+ Ember.assert("{{input type='checkbox'}} does not support setting `value=someBooleanValue`;" +
+ " you must use `checked=someBooleanValue` instead.", !hash.hasOwnProperty('value'));
+
+ env.helpers.view.helperFunction.call(this, [Checkbox], hash, options, env);
+ } else {
+ delete hash.on;
+
+ hash.onEvent = onEvent || 'enter';
+ env.helpers.view.helperFunction.call(this, [TextField], hash, options, env);
+ }
+ }
+
+ __exports__.inputHelper = inputHelper;
+ });
+enifed("ember-htmlbars/helpers/loc",
+ ["ember-metal/core","ember-runtime/system/string","ember-metal/streams/utils","exports"],
+ function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
+ "use strict";
+ var Ember = __dependency1__["default"];
+ var loc = __dependency2__.loc;
+ var isStream = __dependency3__.isStream;
+
+ /**
+ @module ember
+ @submodule ember-htmlbars
+ */
+
+ /**
+ Calls [Ember.String.loc](/api/classes/Ember.String.html#method_loc) with the
+ provided string.
+
+ This is a convenient way to localize text within a template:
+
+ ```javascript
+ Ember.STRINGS = {
+ '_welcome_': 'Bonjour'
+ };
+ ```
+
+ ```handlebars
+
+ {{loc '_welcome_'}}
+
+ ```
+
+ ```html
+
+ Bonjour
+
+ ```
+
+ See [Ember.String.loc](/api/classes/Ember.String.html#method_loc) for how to
+ set up localized string references.
+
+ @method loc
+ @for Ember.Handlebars.helpers
+ @param {String} str The string to format
+ @see {Ember.String#loc}
+ */
+ function locHelper(params, hash, options, env) {
+ Ember.assert('You cannot pass bindings to `loc` helper', (function ifParamsContainBindings() {
+ for (var i = 0, l = params.length; i < l; i++) {
+ if (isStream(params[i])) {
+ return false;
+ }
+ }
+ return true;
+ })());
+
+ return loc.apply(this, params);
+ }
+
+ __exports__.locHelper = locHelper;
+ });
+enifed("ember-htmlbars/helpers/log",
+ ["ember-metal/logger","ember-metal/streams/utils","exports"],
+ function(__dependency1__, __dependency2__, __exports__) {
+ "use strict";
+ /**
+ @module ember
+ @submodule ember-htmlbars
+ */
+ var Logger = __dependency1__["default"];
+ var read = __dependency2__.read;
+
+ /**
+ `log` allows you to output the value of variables in the current rendering
+ context. `log` also accepts primitive types such as strings or numbers.
+
+ ```handlebars
+ {{log "myVariable:" myVariable }}
+ ```
+
+ @method log
+ @for Ember.Handlebars.helpers
+ @param {String} property
+ */
+ function logHelper(params, hash, options, env) {
+ var logger = Logger.log;
+ var values = [];
+
+ for (var i = 0; i < params.length; i++) {
+ values.push(read(params[i]));
+ }
+
+ logger.apply(logger, values);
+ }
+
+ __exports__.logHelper = logHelper;
+ });
+enifed("ember-htmlbars/helpers/partial",
+ ["ember-metal/core","ember-metal/is_none","./binding","ember-metal/streams/utils","exports"],
+ function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __exports__) {
+ "use strict";
+ var Ember = __dependency1__["default"];
+ // Ember.assert
+
+ var isNone = __dependency2__["default"];
+ var bind = __dependency3__.bind;
+ var isStream = __dependency4__.isStream;
+
+ /**
+ @module ember
+ @submodule ember-htmlbars
+ */
+
+ /**
+ The `partial` helper renders another template without
+ changing the template context:
+
+ ```handlebars
+ {{foo}}
+ {{partial "nav"}}
+ ```
+
+ The above example template will render a template named
+ "_nav", which has the same context as the parent template
+ it's rendered into, so if the "_nav" template also referenced
+ `{{foo}}`, it would print the same thing as the `{{foo}}`
+ in the above example.
+
+ If a "_nav" template isn't found, the `partial` helper will
+ fall back to a template named "nav".
+
+ ## Bound template names
+
+ The parameter supplied to `partial` can also be a path
+ to a property containing a template name, e.g.:
+
+ ```handlebars
+ {{partial someTemplateName}}
+ ```
+
+ The above example will look up the value of `someTemplateName`
+ on the template context (e.g. a controller) and use that
+ value as the name of the template to render. If the resolved
+ value is falsy, nothing will be rendered. If `someTemplateName`
+ changes, the partial will be re-rendered using the new template
+ name.
+
+
+ @method partial
+ @for Ember.Handlebars.helpers
+ @param {String} partialName the name of the template to render minus the leading underscore
+ */
+
+ function partialHelper(params, hash, options, env) {
+ options.helperName = options.helperName || 'partial';
+
+ var name = params[0];
+
+ if (isStream(name)) {
+ options.template = createPartialTemplate(name);
+ bind.call(this, name, hash, options, env, true, exists);
+ } else {
+ return renderPartial(name, this, env, options.morph.contextualElement);
+ }
+ }
+
+ __exports__.partialHelper = partialHelper;function exists(value) {
+ return !isNone(value);
+ }
+
+ function lookupPartial(view, templateName) {
+ var nameParts = templateName.split("/");
+ var lastPart = nameParts[nameParts.length - 1];
+
+ nameParts[nameParts.length - 1] = "_" + lastPart;
+
+ var underscoredName = nameParts.join('/');
+ var template = view.templateForName(underscoredName);
+ if (!template) {
+ template = view.templateForName(templateName);
+ }
+
+ Ember.assert('Unable to find partial with name "'+templateName+'"', !!template);
+
+ return template;
+ }
+
+ function renderPartial(name, view, env, contextualElement) {
+ var template = lookupPartial(view, name);
+ return template.render(view, env, contextualElement);
+ }
+
+ function createPartialTemplate(nameStream) {
+ return {
+ isHTMLBars: true,
+ render: function(view, env, contextualElement) {
+ return renderPartial(nameStream.value(), view, env, contextualElement);
+ }
+ };
+ }
+ });
+enifed("ember-htmlbars/helpers/template",
+ ["ember-metal/core","exports"],
+ function(__dependency1__, __exports__) {
+ "use strict";
+ var Ember = __dependency1__["default"];
+ // Ember.deprecate;
+
+ /**
+ @module ember
+ @submodule ember-htmlbars
+ */
+
+ /**
+ @deprecated
+ @method template
+ @for Ember.Handlebars.helpers
+ @param {String} templateName the template to render
+ */
+ function templateHelper(params, hash, options, env) {
+ Ember.deprecate("The `template` helper has been deprecated in favor of the `partial` helper." +
+ " Please use `partial` instead, which will work the same way.");
+
+ options.helperName = options.helperName || 'template';
+
+ return env.helpers.partial.helperFunction.call(this, params, hash, options, env);
+ }
+
+ __exports__.templateHelper = templateHelper;
+ });
+enifed("ember-htmlbars/helpers/text_area",
+ ["ember-metal/core","ember-views/views/text_area","exports"],
+ function(__dependency1__, __dependency2__, __exports__) {
+ "use strict";
+ /**
+ @module ember
+ @submodule ember-htmlbars
+ */
+
+ var Ember = __dependency1__["default"];
+ // Ember.assert
+ var TextArea = __dependency2__["default"];
+
+ /**
+ `{{textarea}}` inserts a new instance of `