diff options
author | Scott Miles <scott.miles@palm.com> | 2012-05-24 12:39:35 -0700 |
---|---|---|
committer | Scott Miles <scott.miles@palm.com> | 2012-05-24 12:39:35 -0700 |
commit | 5b0e50a73170921fbeb9373c7a724bd536e10247 (patch) | |
tree | 074fa5e92350c8c6a617bcbf9a79bd1ebd00408c /api/build | |
parent | b9e84ef937bee3f84358650b31e121f8e1534cbd (diff) | |
download | biblez-ng-5b0e50a73170921fbeb9373c7a724bd536e10247.tar.gz |
install configured api documentation app into bootplate
Diffstat (limited to 'api/build')
-rw-r--r-- | api/build/app.css | 734 | ||||
-rw-r--r-- | api/build/app.js | 2926 | ||||
-rw-r--r-- | api/build/enyo.css | 167 | ||||
-rw-r--r-- | api/build/enyo.js | 3506 |
4 files changed, 7333 insertions, 0 deletions
diff --git a/api/build/app.css b/api/build/app.css new file mode 100644 index 0000000..a65c8a8 --- /dev/null +++ b/api/build/app.css @@ -0,0 +1,734 @@ + +/* E://www/api-tool/enyo/tools/../../lib/layout/fittable/source/FittableLayout.css */ + +.enyo-fittable-rows-layout { + position: relative; +} + +.enyo-fittable-rows-layout > * { + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + /* float when not stretched */ + float: left; + clear: both; +} + +/* non-floating when stretched */ +.enyo-fittable-rows-layout.enyo-stretch > * { + float: none; + clear: none; +} + +/* setting to enforce margin collapsing */ +/* NOTE: rows cannot have margin left/right */ +.enyo-fittable-rows-layout.enyo-stretch.enyo-margin-expand > * { + float: left; + clear: both; + width: 100%; + /* note: harsh resets */ + margin-left: 0 !important; + margin-right: 0 !important; +} + +.enyo-fittable-columns-layout { + position: relative; + text-align: left; + white-space: nowrap; +} + +.enyo-fittable-columns-layout.enyo-center { + text-align: center; +} + +.enyo-fittable-columns-layout > * { + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + vertical-align: top; + display: inline-block; + white-space: normal; +} + +.enyo-fittable-columns-layout.enyo-tool-decorator > * { + vertical-align: middle; +} + +/* repair clobbered white-space setting for pre, code */ +.enyo-fittable-columns-layout > pre, .enyo-fittable-columns-layout > code { + white-space: pre; +} + +.enyo-fittable-columns-layout > .enyo-fittable-columns-layout, .enyo-fittable-columns-layout > .onyx-toolbar-inline { + white-space: nowrap; +} + +/* NOTE: columns cannot have margin top/bottom */ +.enyo-fittable-columns-layout.enyo-stretch > * { + height: 100%; + /* note: harsh resets */ + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +/* E://www/api-tool/enyo/tools/../../lib/layout/list/source/List.css */ + +.enyo-list { + position: relative; +} + +.enyo-list-port { + overflow: hidden; + position: relative; + height: 10000000px; +} + +.enyo-list-page { + position: absolute; + left: 0; + right: 0; +} + +/* E://www/api-tool/enyo/tools/../../lib/layout/panels/source/arrangers/Arranger.css */ + +.enyo-arranger { + position: relative; + overflow: hidden; +} + +.enyo-arranger.enyo-fit { + position: absolute; +} + +.enyo-arranger > * { + position: absolute; + left: 0; + top: 0; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; +} + +.enyo-arranger-fit > * { + /* + override any width/height set on panels + */ + width: 100% !important; + height: 100% !important; + min-width: 0 !important; + max-width: auto !important; + min-height: 0 !important; + max-height: auto !important; +} + + +/* E://www/api-tool/enyo/tools/../../lib/layout/panels/source/Panels.css */ + +.enyo-panels { +} + +.enyo-panels-fit-narrow { +} + +@media all and (max-width: 800px) { + .enyo-panels-fit-narrow > * { + min-width: 100%; + } +} + +/* ../source/foss/syntaxhighlighter_3.0.83_fork/sh-min.css */ + + +/* styles/shCoreEclipse.css */ + +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +.syntaxhighlighter a, +.syntaxhighlighter div, +.syntaxhighlighter code, +.syntaxhighlighter table, +.syntaxhighlighter table td, +.syntaxhighlighter table tr, +.syntaxhighlighter table tbody, +.syntaxhighlighter table thead, +.syntaxhighlighter table caption, +.syntaxhighlighter textarea { + -moz-border-radius: 0 0 0 0 !important; + -webkit-border-radius: 0 0 0 0 !important; + background: none !important; + border: 0 !important; + bottom: auto !important; + float: none !important; + height: auto !important; + left: auto !important; + line-height: 1.1em !important; + margin: 0 !important; + outline: 0 !important; + overflow: visible !important; + padding: 0 !important; + position: static !important; + right: auto !important; + text-align: left !important; + top: auto !important; + vertical-align: baseline !important; + width: auto !important; + box-sizing: content-box !important; + font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; + font-weight: normal !important; + font-style: normal !important; + font-size: 1em !important; + min-height: inherit !important; + min-height: auto !important; +} + +.syntaxhighlighter { + width: 100% !important; + margin: 1em 0 1em 0 !important; + position: relative !important; + overflow: auto !important; + font-size: 1em !important; +} +.syntaxhighlighter.source { + overflow: hidden !important; +} +.syntaxhighlighter .bold { + font-weight: bold !important; +} +.syntaxhighlighter .italic { + font-style: italic !important; +} +.syntaxhighlighter .line { + white-space: pre !important; +} +.syntaxhighlighter table { + width: 100% !important; +} +.syntaxhighlighter table caption { + text-align: left !important; + padding: .5em 0 0.5em 1em !important; +} +.syntaxhighlighter table td.code { + width: 100% !important; +} +.syntaxhighlighter table td.code .container { + position: relative !important; +} +.syntaxhighlighter table td.code .container textarea { + box-sizing: border-box !important; + position: absolute !important; + left: 0 !important; + top: 0 !important; + width: 100% !important; + height: 100% !important; + border: none !important; + background: white !important; + padding-left: 1em !important; + overflow: hidden !important; + white-space: pre !important; +} +.syntaxhighlighter table td.gutter .line { + text-align: right !important; + padding: 0 0.5em 0 1em !important; +} +.syntaxhighlighter table td.code .line { + padding: 0 1em !important; +} +.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line { + padding-left: 0em !important; +} +.syntaxhighlighter.show { + display: block !important; +} +.syntaxhighlighter.collapsed table { + display: none !important; +} +.syntaxhighlighter.collapsed .toolbar { + padding: 0.1em 0.8em 0em 0.8em !important; + font-size: 1em !important; + position: static !important; + width: auto !important; + height: auto !important; +} +.syntaxhighlighter.collapsed .toolbar span { + display: inline !important; + margin-right: 1em !important; +} +.syntaxhighlighter.collapsed .toolbar span a { + padding: 0 !important; + display: none !important; +} +.syntaxhighlighter.collapsed .toolbar span a.expandSource { + display: inline !important; +} +.syntaxhighlighter .toolbar { + position: absolute !important; + right: 1px !important; + top: 1px !important; + width: 11px !important; + height: 11px !important; + font-size: 10px !important; + z-index: 10 !important; +} +.syntaxhighlighter .toolbar span.title { + display: inline !important; +} +.syntaxhighlighter .toolbar a { + display: block !important; + text-align: center !important; + text-decoration: none !important; + padding-top: 1px !important; +} +.syntaxhighlighter .toolbar a.expandSource { + display: none !important; +} +.syntaxhighlighter.ie { + font-size: .9em !important; + padding: 1px 0 1px 0 !important; +} +.syntaxhighlighter.ie .toolbar { + line-height: 8px !important; +} +.syntaxhighlighter.ie .toolbar a { + padding-top: 0px !important; +} +.syntaxhighlighter.printing .line.alt1 .content, +.syntaxhighlighter.printing .line.alt2 .content, +.syntaxhighlighter.printing .line.highlighted .number, +.syntaxhighlighter.printing .line.highlighted.alt1 .content, +.syntaxhighlighter.printing .line.highlighted.alt2 .content { + background: none !important; +} +.syntaxhighlighter.printing .line .number { + color: #bbbbbb !important; +} +.syntaxhighlighter.printing .line .content { + color: black !important; +} +.syntaxhighlighter.printing .toolbar { + display: none !important; +} +.syntaxhighlighter.printing a { + text-decoration: none !important; +} +.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a { + color: black !important; +} +.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a { + color: #008200 !important; +} +.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a { + color: blue !important; +} +.syntaxhighlighter.printing .keyword { + color: #006699 !important; + font-weight: bold !important; +} +.syntaxhighlighter.printing .preprocessor { + color: gray !important; +} +.syntaxhighlighter.printing .variable { + color: #aa7700 !important; +} +.syntaxhighlighter.printing .value { + color: #009900 !important; +} +.syntaxhighlighter.printing .functions { + color: #ff1493 !important; +} +.syntaxhighlighter.printing .constants { + color: #0066cc !important; +} +.syntaxhighlighter.printing .script { + font-weight: bold !important; +} +.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a { + color: gray !important; +} +.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a { + color: red !important; +} +.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a { + color: black !important; +} + +.syntaxhighlighter { + background-color: white !important; +} +.syntaxhighlighter .line.alt1 { + background-color: white !important; +} +.syntaxhighlighter .line.alt2 { + background-color: white !important; +} +.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { + background-color: #c3defe !important; +} +.syntaxhighlighter .line.highlighted.number { + color: white !important; +} +.syntaxhighlighter table caption { + color: black !important; +} +.syntaxhighlighter .gutter { + color: #787878 !important; +} +.syntaxhighlighter .gutter .line { + border-right: 3px solid #d4d0c8 !important; +} +.syntaxhighlighter .gutter .line.highlighted { + background-color: #d4d0c8 !important; + color: white !important; +} +.syntaxhighlighter.printing .line .content { + border: none !important; +} +.syntaxhighlighter.collapsed { + overflow: visible !important; +} +.syntaxhighlighter.collapsed .toolbar { + color: #3f5fbf !important; + background: white !important; + border: 1px solid #d4d0c8 !important; +} +.syntaxhighlighter.collapsed .toolbar a { + color: #3f5fbf !important; +} +.syntaxhighlighter.collapsed .toolbar a:hover { + color: #aa7700 !important; +} +.syntaxhighlighter .toolbar { + color: #a0a0a0 !important; + background: #d4d0c8 !important; + border: none !important; +} +.syntaxhighlighter .toolbar a { + color: #a0a0a0 !important; +} +.syntaxhighlighter .toolbar a:hover { + color: red !important; +} +.syntaxhighlighter .plain, .syntaxhighlighter .plain a { + color: black !important; +} +.syntaxhighlighter .comments, .syntaxhighlighter .comments a { + color: #3f5fbf !important; +} +.syntaxhighlighter .string, .syntaxhighlighter .string a { + color: #2a00ff !important; +} +.syntaxhighlighter .keyword { + color: #7f0055 !important; +} +.syntaxhighlighter .preprocessor { + color: #646464 !important; +} +.syntaxhighlighter .variable { + color: #aa7700 !important; +} +.syntaxhighlighter .value { + color: #009900 !important; +} +.syntaxhighlighter .functions { + color: #ff1493 !important; +} +.syntaxhighlighter .constants { + color: #0066cc !important; +} +.syntaxhighlighter .script { + font-weight: bold !important; + color: #7f0055 !important; + background-color: none !important; +} +.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { + color: gray !important; +} +.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { + color: red !important; +} + +.syntaxhighlighter .keyword { + font-weight: bold !important; +} +.syntaxhighlighter .xml .keyword { + color: #3f7f7f !important; + font-weight: normal !important; +} +.syntaxhighlighter .xml .color1, .syntaxhighlighter .xml .color1 a { + color: #7f007f !important; +} +.syntaxhighlighter .xml .string { + font-style: italic !important; + color: #2a00ff !important; +} + + +/* patch.css */ + +.syntaxhighlighter { + overflow: visible !important; +} + + + +/* ../source/App.css */ + +.tab { + background: whitesmoke; + border: 1px dotted silver; + padding: 8px; + margin: 0; +} + +.tab.active { + background: lightblue; +} + +.input-decorator { + padding: 6px 8px 10px 8px; + border-radius: 3px; + border: 1px solid; + border-color: rgba(0,0,0,0.1); + margin: 0; +} + +.input-decorator > input { + /* reset */ + margin: 0; + padding: 0; + border: none; + outline: none; + cursor: pointer; + background-color: transparent; + font-size: 16px; + box-shadow: none; + /* FIXME: hack for styling reset on Android */ + /* -webkit-appearance: caret;*/ +} + +.packages-editor { + background: lightgrey; + padding: 20px; + border-radius: 8px; + box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2); +} + +#app_left { + width: 300px; + border: 1px solid orange; +} + +#app_left_tabs { + background: #eee; +} + +#app_kinds { + padding: 8px; +} + +#app_index { + padding: 8px; + font-size: smaller; +} + +#app_modules { + padding: 8px; +} + +#app_packages { + padding: 8px; +} + +#app_doc { + padding: 8px 8px; +} + +#app_scope { + padding: 8px; + border-bottom: 1px dotted silver; +} + +#app_header { + padding: 8px; +} + +#app_tocFrame { + white-space: nowrap; +} + +#app_toc { +} + +#app_bodyFrame { +} + +#app_body { + padding: 8px; + padding-bottom: 1024px; +} + +/* ../source/presentation.css */ + +blockquote { + margin-top: 0; + margin-bottom: 0; +} + +blockquote hr { + border: 0; + Xmargin: 0; +} + +hr { + border-style: dotted; + border-bottom-style: none; + border-color: #ccc; +} + +a { + text-decoration: none; + border-bottom: 1px dotted lightblue; + color: #3B5982; + line-height: 1.3em; +} + +a:hover { + text-decoration: none; + text-shadow: 0 0 2px orange; + -webkit-transition: text-shadow 0.5s; +} + +/* +a { + text-decoration: none; + background-color: #ddd; + padding: 3px 8px; + border-radius: 12px; + line-height: 2em; + color: #333; +} + +a:hover { + background-color: lightblue; + -webkit-transition: background-color 0.5s; +} +*/ + +comment { + /*border-left: 2px dotted silver;*/ + background: whitesmoke; + display: block; + padding: 4px 0 4px 12px; + margin: 16px 0 4px; + /* + font-size: small; + padding: 8px; + font-style: italic; + color: green; + padding: 16px 0 8px; + */ +} + +label { + font-weight: bold; + color: #D38628; +} + +public { + color: Orange; + padding-right: 6px; + display: none; +} + +protected { + color: Red; + padding-right: 6px; +} + +published { + color: green; + padding-right: 6px; +} + +kind { + font-size: x-large; + font-weight: bold; + display: block; +} + +superkind { + color: #555; + display: block; +} + +prototype { + font-style: italic; + /* + font-size: small; + color: blue; + */ + color: #888; +} + +module { + text-decoration: underline; + color: #C39; + cursor: pointer; +} + +topic { + /* + font-weight: bold; + text-decoration: underline; + color: #46E; + cursor: pointer; + */ +} + +column { + display: inline-block; + font-size: small; + padding: 16px; + /*border-right: 1px dotted silver;*/ + vertical-align: top; +} + +divider { + display: block; + color: #0D0D0D; + font-size: 18px; + font-weight: bold; + margin-left: -1px; + margin-top: 1em; + margin-bottom: 5px; + /*border-bottom: 1px dotted silver;*/ +} + +code { + background-color: white; + padding: 2px; +} + +arguments { + color: purple; +} + diff --git a/api/build/app.js b/api/build/app.js new file mode 100644 index 0000000..422c94b --- /dev/null +++ b/api/build/app.js @@ -0,0 +1,2926 @@ + +// minifier: path aliases + +enyo.path.addPaths({layout: "E://www/api-tool/enyo/tools/../../lib/layout/"}); + +// FittableLayout.js + +enyo.kind({ +name: "enyo.FittableLayout", +kind: "Layout", +calcFitIndex: function() { +for (var a = 0, b = this.container.children, c; c = b[a]; a++) if (c.fit && c.showing) return a; +}, +getFitControl: function() { +var a = this.container.children, b = a[this.fitIndex]; +return b && b.fit && b.showing || (this.fitIndex = this.calcFitIndex(), b = a[this.fitIndex]), b; +}, +getLastControl: function() { +var a = this.container.children, b = a.length - 1, c = a[b]; +while ((c = a[b]) && !c.showing) b--; +return c; +}, +_reflow: function(a, b, c, d) { +this.container.addRemoveClass("enyo-stretch", !this.container.noStretch); +var e = this.getFitControl(); +if (!e) return; +var f = 0, g = 0, h = 0, i, j = this.container.hasNode(); +j && (i = enyo.FittableLayout.calcPaddingExtents(j), f = j[b] - (i[c] + i[d])); +var k = e.getBounds(); +g = k[c] - (i && i[c] || 0); +var l = this.getLastControl(); +if (l) { +var m = enyo.FittableLayout.getComputedStyleValue(l.hasNode(), "margin-" + d) || 0; +if (l != e) { +var n = l.getBounds(), o = k[c] + k[a], p = n[c] + n[a] + m; +h = p - o; +} else h = m; +} +var q = f - (g + h); +e.applyStyle(a, q + "px"); +}, +reflow: function() { +this.orient == "h" ? this._reflow("width", "clientWidth", "left", "right") : this._reflow("height", "clientHeight", "top", "bottom"); +}, +statics: { +_ieCssToPixelValue: function(a, b) { +var c = b, d = a.style, e = d.left, f = a.runtimeStyle && a.runtimeStyle.left; +return f && (a.runtimeStyle.left = a.currentStyle.left), d.left = c, c = d.pixelLeft, d.left = e, f && (d.runtimeStyle.left = f), c; +}, +_pxMatch: /px/i, +getComputedStyleValue: function(a, b, c) { +var d = c || enyo.dom.getComputedStyle(a); +if (d) return parseInt(d.getPropertyValue(b)); +if (a && a.currentStyle) { +var e = a.currentStyle[b]; +return e.match(this._pxMatch) || (e = this._ieCssToPixelValue(a, e)), parseInt(e); +} +return 0; +}, +calcBoxExtents: function(a, b) { +var c = enyo.dom.getComputedStyle(a); +return { +top: this.getComputedStyleValue(a, b + "-top", c), +right: this.getComputedStyleValue(a, b + "-right", c), +bottom: this.getComputedStyleValue(a, b + "-bottom", c), +left: this.getComputedStyleValue(a, b + "-left", c) +}; +}, +calcPaddingExtents: function(a) { +return this.calcBoxExtents(a, "padding"); +}, +calcMarginExtents: function(a) { +return this.calcBoxExtents(a, "margin"); +} +} +}), enyo.kind({ +name: "enyo.FittableColumnsLayout", +kind: "FittableLayout", +orient: "h", +layoutClass: "enyo-fittable-columns-layout" +}), enyo.kind({ +name: "enyo.FittableRowsLayout", +kind: "FittableLayout", +layoutClass: "enyo-fittable-rows-layout", +orient: "v" +}); + +// FittableRows.js + +enyo.kind({ +name: "enyo.FittableRows", +layoutKind: "FittableRowsLayout", +noStretch: !1 +}); + +// FittableColumns.js + +enyo.kind({ +name: "enyo.FittableColumns", +layoutKind: "FittableColumnsLayout", +noStretch: !1 +}); + +// Selection.js + +enyo.kind({ +name: "enyo.Selection", +kind: enyo.Component, +published: { +multi: !1 +}, +events: { +onSelect: "", +onDeselect: "", +onChange: "" +}, +create: function() { +this.clear(), this.inherited(arguments); +}, +multiChanged: function() { +this.multi || this.clear(), this.doChange(); +}, +highlander: function(a) { +this.multi || this.deselect(this.lastSelected); +}, +clear: function() { +this.selected = []; +}, +isSelected: function(a) { +return this.selected[a]; +}, +setByKey: function(a, b, c) { +if (b) this.selected[a] = c || !0, this.lastSelected = a, this.doSelect({ +key: a, +data: this.selected[a] +}); else { +var d = this.isSelected(a); +delete this.selected[a], this.doDeselect({ +key: a, +data: d +}); +} +this.doChange(); +}, +deselect: function(a) { +this.isSelected(a) && this.setByKey(a, !1); +}, +select: function(a, b) { +this.multi ? this.setByKey(a, !this.isSelected(a), b) : this.isSelected(a) || (this.highlander(), this.setByKey(a, !0, b)); +}, +toggle: function(a, b) { +!this.multi && this.lastSelected != a && this.deselect(this.lastSelected), this.setByKey(a, !this.isSelected(a), b); +}, +getSelected: function() { +return this.selected; +} +}); + +// FlyweightRepeater.js + +enyo.kind({ +name: "enyo.FlyweightRepeater", +published: { +count: 0, +multiSelect: !1, +toggleSelected: !1 +}, +events: { +onSetupItem: "" +}, +components: [ { +kind: "Selection", +onSelect: "selectDeselect", +onDeselect: "selectDeselect" +}, { +name: "client" +} ], +rowOffset: 0, +bottomUp: !1, +create: function() { +this.inherited(arguments), this.multiSelectChanged(); +}, +multiSelectChanged: function() { +this.$.selection.setMulti(this.multiSelect); +}, +setupItem: function(a) { +this.doSetupItem({ +index: a, +selected: this.isSelected(a) +}); +}, +generateChildHtml: function() { +var a = ""; +this.index = null; +for (var b = 0, c = 0; b < this.count; b++) c = this.rowOffset + (this.bottomUp ? this.count - b - 1 : b), this.setupItem(c), this.$.client.setAttribute("index", c), a += this.inherited(arguments), this.$.client.teardownRender(); +return a; +}, +previewDomEvent: function(a) { +var b = this.index = this.rowForEvent(a); +a.rowIndex = a.index = b, a.flyweight = this; +}, +decorateEvent: function(a, b, c) { +var d = b && b.index != null ? b.index : this.index; +b && d != null && (b.index = d, b.flyweight = this), this.inherited(arguments); +}, +tap: function(a, b) { +this.toggleSelected ? this.$.selection.toggle(b.index) : this.$.selection.select(b.index); +}, +selectDeselect: function(a, b) { +this.renderRow(b.key); +}, +getSelection: function() { +return this.$.selection; +}, +isSelected: function(a) { +return this.getSelection().isSelected(a); +}, +renderRow: function(a) { +var b = this.fetchRowNode(a); +b && (this.setupItem(a), b.innerHTML = this.$.client.generateChildHtml(), this.$.client.teardownChildren()); +}, +fetchRowNode: function(a) { +if (this.hasNode()) { +var b = this.node.querySelectorAll('[index="' + a + '"]'); +return b && b[0]; +} +}, +rowForEvent: function(a) { +var b = a.target, c = this.hasNode().id; +while (b && b.parentNode && b.id != c) { +var d = b.getAttribute && b.getAttribute("index"); +if (d !== null) return Number(d); +b = b.parentNode; +} +return -1; +}, +prepareRow: function(a) { +var b = this.fetchRowNode(a); +enyo.FlyweightRepeater.claimNode(this.$.client, b); +}, +lockRow: function() { +this.$.client.teardownChildren(); +}, +performOnRow: function(a, b, c) { +b && (this.prepareRow(a), enyo.call(c || null, b), this.lockRow()); +}, +statics: { +claimNode: function(a, b) { +var c = b && b.querySelectorAll("#" + a.id); +c = c && c[0], a.generated = Boolean(c || !a.tag), a.node = c, a.node && a.rendered(); +for (var d = 0, e = a.children, f; f = e[d]; d++) this.claimNode(f, b); +} +} +}); + +// List.js + +enyo.kind({ +name: "enyo.List", +kind: "Scroller", +classes: "enyo-list", +published: { +count: 0, +rowsPerPage: 50, +bottomUp: !1, +multiSelect: !1, +toggleSelected: !1, +fixedHeight: !1 +}, +events: { +onSetupItem: "" +}, +handlers: { +onAnimateFinish: "animateFinish" +}, +rowHeight: 0, +listTools: [ { +name: "port", +classes: "enyo-list-port enyo-border-box", +components: [ { +name: "generator", +kind: "FlyweightRepeater", +canGenerate: !1, +components: [ { +tag: null, +name: "client" +} ] +}, { +name: "page0", +allowHtml: !0, +classes: "enyo-list-page" +}, { +name: "page1", +allowHtml: !0, +classes: "enyo-list-page" +} ] +} ], +create: function() { +this.pageHeights = [], this.inherited(arguments), this.getStrategy().translateOptimized = !0, this.bottomUpChanged(), this.multiSelectChanged(), this.toggleSelectedChanged(); +}, +createStrategy: function() { +this.controlParentName = "strategy", this.inherited(arguments), this.createChrome(this.listTools), this.controlParentName = "client", this.discoverControlParent(); +}, +rendered: function() { +this.inherited(arguments), this.$.generator.node = this.$.port.hasNode(), this.$.generator.generated = !0, this.reset(); +}, +resizeHandler: function() { +this.inherited(arguments), this.adjustPortSize(); +}, +bottomUpChanged: function() { +this.$.generator.bottomUp = this.bottomUp, this.$.page0.applyStyle(this.pageBound, null), this.$.page1.applyStyle(this.pageBound, null), this.pageBound = this.bottomUp ? "bottom" : "top", this.hasNode() && this.reset(); +}, +multiSelectChanged: function() { +this.$.generator.setMultiSelect(this.multiSelect); +}, +toggleSelectedChanged: function() { +this.$.generator.setToggleSelected(this.toggleSelected); +}, +countChanged: function() { +this.hasNode() && this.updateMetrics(); +}, +updateMetrics: function() { +this.defaultPageHeight = this.rowsPerPage * (this.rowHeight || 100), this.pageCount = Math.ceil(this.count / this.rowsPerPage), this.portSize = 0; +for (var a = 0; a < this.pageCount; a++) this.portSize += this.getPageHeight(a); +this.adjustPortSize(); +}, +generatePage: function(a, b) { +this.page = a; +var c = this.$.generator.rowOffset = this.rowsPerPage * this.page, d = this.$.generator.count = Math.min(this.count - c, this.rowsPerPage), e = this.$.generator.generateChildHtml(); +b.setContent(e), this.rowHeight || (this.rowHeight = Math.floor(b.getBounds().height / d), this.updateMetrics()); +if (!this.fixedHeight) { +var f = this.getPageHeight(a), g = this.pageHeights[a] = b.getBounds().height; +f != g && (this.portSize += g - f); +} +}, +update: function(a) { +var b = !1, c = this.positionToPageInfo(a), d = c.pos + this.scrollerHeight / 2, e = Math.floor(d / Math.max(c.height, this.scrollerHeight) + .5) + c.no, f = e % 2 == 0 ? e : e - 1; +this.p0 != f && this.isPageInRange(f) && (this.generatePage(f, this.$.page0), this.positionPage(f, this.$.page0), this.p0 = f, b = !0), f = e % 2 == 0 ? Math.max(1, e - 1) : e, this.p1 != f && this.isPageInRange(f) && (this.generatePage(f, this.$.page1), this.positionPage(f, this.$.page1), this.p1 = f, b = !0), b && !this.fixedHeight && (this.adjustBottomPage(), this.adjustPortSize()); +}, +updateForPosition: function(a) { +this.update(this.calcPos(a)); +}, +calcPos: function(a) { +return this.bottomUp ? this.portSize - this.scrollerHeight - a : a; +}, +adjustBottomPage: function() { +var a = this.p0 >= this.p1 ? this.$.page0 : this.$.page1; +this.positionPage(a.pageNo, a); +}, +adjustPortSize: function() { +this.scrollerHeight = this.getBounds().height; +var a = Math.max(this.scrollerHeight, this.portSize); +this.$.port.applyStyle("height", a + "px"); +}, +positionPage: function(a, b) { +b.pageNo = a; +var c = this.pageToPosition(a); +b.applyStyle(this.pageBound, c + "px"); +}, +pageToPosition: function(a) { +var b = 0, c = a; +while (c > 0) c--, b += this.getPageHeight(c); +return b; +}, +positionToPageInfo: function(a) { +var b = -1, c = this.calcPos(a), d = this.defaultPageHeight; +while (c >= 0) b++, d = this.getPageHeight(b), c -= d; +return { +no: b, +height: d, +pos: c + d +}; +}, +isPageInRange: function(a) { +return a == Math.max(0, Math.min(this.pageCount - 1, a)); +}, +getPageHeight: function(a) { +return this.pageHeights[a] || this.defaultPageHeight; +}, +invalidatePages: function() { +this.p0 = this.p1 = null, this.$.page0.setContent(""), this.$.page1.setContent(""); +}, +invalidateMetrics: function() { +this.pageHeights = [], this.rowHeight = 0, this.updateMetrics(); +}, +scroll: function(a, b) { +var c = this.inherited(arguments); +return this.update(this.getScrollTop()), c; +}, +scrollToBottom: function() { +this.update(this.getScrollBounds().maxTop), this.inherited(arguments); +}, +setScrollTop: function(a) { +this.update(a), this.inherited(arguments), this.twiddle(); +}, +getScrollPosition: function() { +return this.calcPos(this.getScrollTop()); +}, +setScrollPosition: function(a) { +this.setScrollTop(this.calcPos(a)); +}, +scrollToRow: function(a) { +var b = Math.floor(a / this.rowsPerPage), c = a % this.rowsPerPage, d = this.pageToPosition(b); +this.updateForPosition(d), d = this.pageToPosition(b), this.setScrollPosition(d); +if (b == this.p0 || b == this.p1) { +var e = this.$.generator.fetchRowNode(a); +if (e) { +var f = e.offsetTop; +this.bottomUp && (f = this.getPageHeight(b) - e.offsetHeight - f); +var g = this.getScrollPosition() + f; +this.setScrollPosition(g); +} +} +}, +scrollToStart: function() { +this[this.bottomUp ? "scrollToBottom" : "scrollToTop"](); +}, +scrollToEnd: function() { +this[this.bottomUp ? "scrollToTop" : "scrollToBottom"](); +}, +refresh: function() { +this.invalidatePages(), this.update(this.getScrollTop()), this.stabilize(); +}, +reset: function() { +this.getSelection().clear(), this.invalidateMetrics(), this.invalidatePages(), this.stabilize(), this.scrollToStart(); +}, +getSelection: function() { +return this.$.generator.getSelection(); +}, +select: function(a, b) { +return this.getSelection().select(a, b); +}, +isSelected: function(a) { +return this.$.generator.isSelected(a); +}, +renderRow: function(a) { +this.$.generator.renderRow(a); +}, +prepareRow: function(a) { +this.$.generator.prepareRow(a); +}, +lockRow: function() { +this.$.generator.lockRow(); +}, +performOnRow: function(a, b, c) { +this.$.generator.performOnRow(a, b, c); +}, +animateFinish: function(a) { +return this.twiddle(), !0; +}, +twiddle: function() { +var a = this.getStrategy(); +enyo.call(a, "twiddle"); +} +}); + +// Slideable.js + +enyo.kind({ +name: "enyo.Slideable", +kind: "Control", +published: { +axis: "h", +value: 0, +unit: "px", +min: 0, +max: 0, +accelerated: "auto", +overMoving: !0, +draggable: !0 +}, +events: { +onAnimateFinish: "", +onChange: "" +}, +preventDragPropagation: !1, +tools: [ { +kind: "Animator", +onStep: "animatorStep", +onEnd: "animatorComplete" +} ], +handlers: { +ondragstart: "dragstart", +ondrag: "drag", +ondragfinish: "dragfinish" +}, +kDragScalar: 1, +dragEventProp: "dx", +create: function() { +this.inherited(arguments), this.acceleratedChanged(), this.axisChanged(), this.valueChanged(), this.addClass("enyo-slideable"); +}, +initComponents: function() { +this.createComponents(this.tools), this.inherited(arguments); +}, +rendered: function() { +this.inherited(arguments), this.updateDragScalar(); +}, +resizeHandler: function() { +this.inherited(arguments), this.updateDragScalar(); +}, +updateDragScalar: function() { +if (this.unit == "%") { +var a = this.getBounds()[this.dimension]; +this.kDragScalar = a ? 100 / a : 1; +} +}, +acceleratedChanged: function() { +enyo.platform.android > 2 || enyo.dom.accelerate(this, this.accelerated); +}, +axisChanged: function() { +var a = this.axis == "h"; +this.dragMoveProp = a ? "dx" : "dy", this.shouldDragProp = a ? "horizontal" : "vertical", this.transform = a ? "translateX" : "translateY", this.dimension = a ? "width" : "height"; +}, +valueChanged: function(a) { +var b = this.value; +this.isOob(b) && !this.isAnimating() && (this.value = this.overMoving ? this.dampValue(b) : this.clampValue(b)), enyo.platform.android > 2 && (this.value ? (a == 0 || a == undefined) && enyo.dom.accelerate(this, this.accelerated) : enyo.dom.accelerate(this, !1)), enyo.dom.transformValue(this, this.transform, this.value + this.unit), this.doChange(); +}, +getAnimator: function() { +return this.$.animator; +}, +isAtMin: function() { +return this.value <= this.calcMin(); +}, +isAtMax: function() { +return this.value >= this.calcMax(); +}, +calcMin: function() { +return this.min; +}, +calcMax: function() { +return this.max; +}, +clampValue: function(a) { +var b = this.calcMin(), c = this.calcMax(); +return Math.max(b, Math.min(a, c)); +}, +dampValue: function(a) { +return this.dampBound(this.dampBound(a, this.min, 1), this.max, -1); +}, +dampBound: function(a, b, c) { +var d = a; +return d * c < b * c && (d = b + (d - b) / 4), d; +}, +shouldDrag: function(a) { +return this.draggable && a[this.shouldDragProp]; +}, +isOob: function(a) { +return a > this.calcMax() || a < this.calcMin(); +}, +dragstart: function(a, b) { +if (this.shouldDrag(b)) return b.preventDefault(), this.$.animator.stop(), b.dragInfo = {}, this.dragging = !0, this.drag0 = this.value, this.dragd0 = 0, this.preventDragPropagation; +}, +drag: function(a, b) { +if (this.dragging) { +b.preventDefault(); +var c = b[this.dragMoveProp] * this.kDragScalar, d = this.drag0 + c, e = c - this.dragd0; +return this.dragd0 = c, e && (b.dragInfo.minimizing = e < 0), this.setValue(d), this.preventDragPropagation; +} +}, +dragfinish: function(a, b) { +if (this.dragging) return this.dragging = !1, this.completeDrag(b), b.preventTap(), this.preventDragPropagation; +}, +completeDrag: function(a) { +this.value !== this.calcMax() && this.value != this.calcMin() && this.animateToMinMax(a.dragInfo.minimizing); +}, +isAnimating: function() { +return this.$.animator.isAnimating(); +}, +play: function(a, b) { +this.$.animator.play({ +startValue: a, +endValue: b, +node: this.hasNode() +}); +}, +animateTo: function(a) { +this.play(this.value, a); +}, +animateToMin: function() { +this.animateTo(this.calcMin()); +}, +animateToMax: function() { +this.animateTo(this.calcMax()); +}, +animateToMinMax: function(a) { +a ? this.animateToMin() : this.animateToMax(); +}, +animatorStep: function(a) { +return this.setValue(a.value), !0; +}, +animatorComplete: function(a) { +return this.doAnimateFinish(a), !0; +}, +toggleMinMax: function() { +this.animateToMinMax(!this.isAtMin()); +} +}); + +// Arranger.js + +enyo.kind({ +name: "enyo.Arranger", +kind: "Layout", +layoutClass: "enyo-arranger", +accelerated: "auto", +dragProp: "ddx", +dragDirectionProp: "xDirection", +canDragProp: "horizontal", +destroy: function() { +var a = this.container.children; +for (var b = 0, c; c = a[b]; b++) c._arranger = null; +this.inherited(arguments); +}, +arrange: function(a, b) {}, +size: function() {}, +start: function() { +var a = this.container.fromIndex, b = this.container.toIndex, c = this.container.transitionPoints = [ a ]; +if (this.incrementalPoints) { +var d = Math.abs(b - a) - 2, e = a; +while (d >= 0) e += b < a ? -1 : 1, c.push(e), d--; +} +c.push(this.container.toIndex); +}, +finish: function() {}, +canDragEvent: function(a) { +return a[this.canDragProp]; +}, +calcDragDirection: function(a) { +return a[this.dragDirectionProp]; +}, +calcDrag: function(a) { +return a[this.dragProp]; +}, +drag: function(a, b, c, d, e) { +var f = this.measureArrangementDelta(-a, b, c, d, e); +return f; +}, +measureArrangementDelta: function(a, b, c, d, e) { +var f = this.calcArrangementDifference(b, c, d, e), g = f ? a / Math.abs(f) : 0; +return g *= this.container.fromIndex > this.container.toIndex ? -1 : 1, g; +}, +calcArrangementDifference: function(a, b, c, d) {}, +_arrange: function(a) { +var b = this.getOrderedControls(a); +this.arrange(b, a); +}, +arrangeControl: function(a, b) { +a._arranger = enyo.mixin(a._arranger || {}, b); +}, +flow: function() { +this.c$ = [].concat(this.container.children), this.controlsIndex = 0; +for (var a = 0, b = this.container.children, c; c = b[a]; a++) enyo.dom.accelerate(c, this.accelerated); +}, +reflow: function() { +var a = this.container.hasNode(); +this.containerBounds = a ? { +width: a.clientWidth, +height: a.clientHeight +} : {}, this.size(); +}, +flowArrangement: function() { +var a = this.container.arrangement; +if (a) for (var b = 0, c = this.container.children, d; d = c[b]; b++) this.flowControl(d, a[b]); +}, +flowControl: function(a, b) { +enyo.Arranger.positionControl(a, b); +var c = b.opacity; +c != null && enyo.Arranger.opacifyControl(a, c); +}, +getOrderedControls: function(a) { +var b = Math.floor(a), c = b - this.controlsIndex, d = c > 0, e = this.c$ || []; +for (var f = 0; f < Math.abs(c); f++) d ? e.push(e.shift()) : e.unshift(e.pop()); +return this.controlsIndex = b, e; +}, +statics: { +positionControl: function(a, b, c) { +var d = c || "px"; +if (!this.updating) if (enyo.dom.canTransform()) { +var e = b.left, f = b.top, e = enyo.isString(e) ? e : e && e + d, f = enyo.isString(f) ? f : f && f + d; +enyo.dom.transform(a, { +translateX: e || null, +translateY: f || null +}); +} else a.setBounds(b, c); +}, +opacifyControl: function(a, b) { +var c = b; +c = c > .99 ? 1 : c < .01 ? 0 : c, enyo.platform.ie < 9 ? a.applyStyle("filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + c * 100 + ")") : a.applyStyle("opacity", c); +} +} +}); + +// CardArranger.js + +enyo.kind({ +name: "enyo.CardArranger", +kind: "Arranger", +layoutClass: "enyo-arranger enyo-arranger-fit", +calcArrangementDifference: function(a, b, c, d) { +return this.containerBounds.width; +}, +destroy: function() { +var a = this.container.children; +for (var b = 0, c; c = a[b]; b++) enyo.Arranger.opacifyControl(c, 1), c.setShowing(!0), c.resized(); +this.inherited(arguments); +}, +arrange: function(a, b) { +for (var c = 0, d, e, f; d = a[c]; c++) f = c == 0 ? 1 : 0, this.arrangeControl(d, { +opacity: f +}); +}, +start: function() { +this.inherited(arguments); +var a = this.container.children; +for (var b = 0, c; c = a[b]; b++) c.setShowing(b == this.container.fromIndex || b == this.container.toIndex), c.showing && c.resized(); +}, +finish: function() { +this.inherited(arguments); +var a = this.container.children; +for (var b = 0, c; c = a[b]; b++) c.setShowing(b == this.container.toIndex); +} +}); + +// CardSlideInArranger.js + +enyo.kind({ +name: "enyo.CardSlideInArranger", +kind: "CardArranger", +start: function() { +var a = this.container.children; +for (var b = 0, c; c = a[b]; b++) c.setShowing(b == this.container.fromIndex || b == this.container.toIndex), c.showing && c.resized(); +var d = this.container.fromIndex, b = this.container.toIndex; +this.container.transitionPoints = [ b + "." + d + ".s", b + "." + d + ".f" ]; +}, +finish: function() { +this.inherited(arguments); +var a = this.container.children; +for (var b = 0, c; c = a[b]; b++) c.setShowing(b == this.container.toIndex); +}, +arrange: function(a, b) { +var c = b.split("."), d = c[0], e = c[1], f = c[2] == "s", g = this.containerBounds.width; +for (var h = 0, i = this.container.children, j, g, k; j = i[h]; h++) k = g, e == h && (k = f ? 0 : -g), d == h && (k = f ? g : 0), e == h && e == d && (k = 0), this.arrangeControl(j, { +left: k +}); +} +}); + +// CarouselArranger.js + +enyo.kind({ +name: "enyo.CarouselArranger", +kind: "Arranger", +size: function() { +var a = this.container.children, b = this.containerPadding = this.container.hasNode() ? enyo.FittableLayout.calcPaddingExtents(this.container.node) : {}, c = this.containerBounds; +c.height -= b.top + b.bottom, c.width -= b.left + b.right; +var d; +for (var e = 0, f = 0, g, h; h = a[e]; e++) g = enyo.FittableLayout.calcMarginExtents(h.hasNode()), h.width = h.getBounds().width, h.marginWidth = g.right + g.left, f += (h.fit ? 0 : h.width) + h.marginWidth, h.fit && (d = h); +if (d) { +var i = c.width - f; +d.width = i >= 0 ? i : d.width; +} +for (var e = 0, j = b.left, g, h; h = a[e]; e++) h.setBounds({ +top: b.top, +bottom: b.bottom, +width: h.fit ? h.width : null +}); +}, +arrange: function(a, b) { +this.container.wrap ? this.arrangeWrap(a, b) : this.arrangeNoWrap(a, b); +}, +arrangeNoWrap: function(a, b) { +var c = this.container.children, d = this.container.clamp(b), e = this.containerBounds.width; +for (var f = d, g = 0, h; h = c[f]; f++) { +g += h.width + h.marginWidth; +if (g > e) break; +} +var i = e - g, j = 0; +if (i > 0) { +var k = d; +for (var f = d - 1, l = 0, h; h = c[f]; f--) { +l += h.width + h.marginWidth; +if (i - l <= 0) { +j = i - l, d = f; +break; +} +} +} +for (var f = 0, m = this.containerPadding.left + j, n, h; h = c[f]; f++) n = h.width + h.marginWidth, f < d ? this.arrangeControl(h, { +left: -n +}) : (this.arrangeControl(h, { +left: Math.floor(m) +}), m += n); +}, +arrangeWrap: function(a, b) { +for (var c = 0, d = this.containerPadding.left, e, f; f = a[c]; c++) this.arrangeControl(f, { +left: d +}), d += f.width + f.marginWidth; +}, +calcArrangementDifference: function(a, b, c, d) { +var e = Math.abs(a % this.c$.length); +return b[e].left - d[e].left; +} +}); + +// CollapsingArranger.js + +enyo.kind({ +name: "enyo.CollapsingArranger", +kind: "CarouselArranger", +size: function() { +this.clearLastSize(), this.inherited(arguments); +}, +clearLastSize: function() { +for (var a = 0, b = this.container.children, c; c = b[a]; a++) c._fit && a != b.length - 1 && (c.applyStyle("width", null), c._fit = null); +}, +arrange: function(a, b) { +var c = this.container.children; +for (var d = 0, e = this.containerPadding.left, f, g; g = c[d]; d++) this.arrangeControl(g, { +left: e +}), d >= b && (e += g.width + g.marginWidth), d == c.length - 1 && b < 0 && this.arrangeControl(g, { +left: e - b +}); +}, +calcArrangementDifference: function(a, b, c, d) { +var e = this.container.children.length - 1; +return Math.abs(d[e].left - b[e].left); +}, +flowControl: function(a, b) { +this.inherited(arguments); +if (this.container.realtimeFit) { +var c = this.container.children, d = c.length - 1, e = c[d]; +a == e && this.fitControl(a, b.left); +} +}, +finish: function() { +this.inherited(arguments); +if (!this.container.realtimeFit && this.containerBounds) { +var a = this.container.children, b = this.container.arrangement, c = a.length - 1, d = a[c]; +this.fitControl(d, b[c].left); +} +}, +fitControl: function(a, b) { +a._fit = !0, a.applyStyle("width", this.containerBounds.width - b + "px"), a.resized(); +} +}); + +// OtherArrangers.js + +enyo.kind({ +name: "enyo.LeftRightArranger", +kind: "Arranger", +margin: 40, +axisSize: "width", +offAxisSize: "height", +axisPosition: "left", +constructor: function() { +this.inherited(arguments), this.margin = this.container.margin != null ? this.container.margin : this.margin; +}, +size: function() { +var a = this.container.children, b = this.containerBounds[this.axisSize], c = b - this.margin - this.margin; +for (var d = 0, e, f; f = a[d]; d++) e = {}, e[this.axisSize] = c, e[this.offAxisSize] = "100%", f.setBounds(e); +}, +arrange: function(a, b) { +var c = Math.floor(this.container.children.length / 2), d = this.getOrderedControls(Math.floor(b) - c), e = this.containerBounds[this.axisSize] - this.margin - this.margin, f = this.margin - e * c, g = (d.length - 1) / 2; +for (var h = 0, i, j, k; i = d[h]; h++) j = {}, j[this.axisPosition] = f, j.opacity = h == 0 || h == d.length - 1 ? 0 : 1, this.arrangeControl(i, j), f += e; +}, +calcArrangementDifference: function(a, b, c, d) { +var e = Math.abs(a % this.c$.length); +return b[e][this.axisPosition] - d[e][this.axisPosition]; +} +}), enyo.kind({ +name: "enyo.TopBottomArranger", +kind: "LeftRightArranger", +dragProp: "ddy", +dragDirectionProp: "yDirection", +canDragProp: "vertical", +axisSize: "height", +offAxisSize: "width", +axisPosition: "top" +}), enyo.kind({ +name: "enyo.SpiralArranger", +kind: "Arranger", +incrementalPoints: !0, +inc: 20, +size: function() { +var a = this.container.children, b = this.containerBounds, c = this.controlWidth = b.width / 3, d = this.controlHeight = b.height / 3; +for (var e = 0, f; f = a[e]; e++) f.setBounds({ +width: c, +height: d +}); +}, +arrange: function(a, b) { +var c = this.inc; +for (var d = 0, e = a.length, f; f = a[d]; d++) { +var g = Math.cos(d / e * 2 * Math.PI) * d * c + this.controlWidth, h = Math.sin(d / e * 2 * Math.PI) * d * c + this.controlHeight; +this.arrangeControl(f, { +left: g, +top: h +}); +} +}, +start: function() { +this.inherited(arguments); +var a = this.getOrderedControls(this.container.toIndex); +for (var b = 0, c; c = a[b]; b++) c.applyStyle("z-index", a.length - b); +}, +calcArrangementDifference: function(a, b, c, d) { +return this.controlWidth; +} +}), enyo.kind({ +name: "enyo.GridArranger", +kind: "Arranger", +incrementalPoints: !0, +colWidth: 100, +colHeight: 100, +size: function() { +var a = this.container.children, b = this.colWidth, c = this.colHeight; +for (var d = 0, e; e = a[d]; d++) e.setBounds({ +width: b, +height: c +}); +}, +arrange: function(a, b) { +var d = this.colWidth, e = this.colHeight, f = Math.floor(this.containerBounds.width / d); +for (var g = 0, h = 0; h < a.length; g++) for (var i = 0; i < f && (c = a[h]); i++, h++) this.arrangeControl(c, { +left: d * i, +top: e * g +}); +}, +flowControl: function(a, b) { +this.inherited(arguments), enyo.Arranger.opacifyControl(a, b.top % this.colHeight != 0 ? .25 : 1); +}, +calcArrangementDifference: function(a, b, c, d) { +return this.colWidth; +} +}); + +// Panels.js + +enyo.kind({ +name: "enyo.Panels", +classes: "enyo-panels", +published: { +index: 0, +draggable: !0, +animate: !0, +wrap: !1, +arrangerKind: "CardArranger", +narrowFit: !0 +}, +events: { +onTransitionStart: "", +onTransitionFinish: "" +}, +handlers: { +ondragstart: "dragstart", +ondrag: "drag", +ondragfinish: "dragfinish" +}, +tools: [ { +kind: "Animator", +onStep: "step", +onEnd: "completed" +} ], +fraction: 0, +create: function() { +this.transitionPoints = [], this.inherited(arguments), this.arrangerKindChanged(), this.avoidFitChanged(), this.indexChanged(); +}, +initComponents: function() { +this.createChrome(this.tools), this.inherited(arguments); +}, +arrangerKindChanged: function() { +this.setLayoutKind(this.arrangerKind); +}, +avoidFitChanged: function() { +this.addRemoveClass("enyo-panels-fit-narrow", this.narrowFit); +}, +removeControl: function(a) { +this.inherited(arguments), this.isPanel(a) && (this.flow(), this.reflow(), this.setIndex(0)); +}, +isPanel: function() { +return !0; +}, +flow: function() { +this.arrangements = [], this.inherited(arguments); +}, +reflow: function() { +this.arrangements = [], this.inherited(arguments), this.refresh(); +}, +getPanels: function() { +var a = this.controlParent || this; +return a.children; +}, +getActive: function() { +var a = this.getPanels(); +return a[this.index]; +}, +getAnimator: function() { +return this.$.animator; +}, +setIndex: function(a) { +this.setPropertyValue("index", a, "indexChanged"); +}, +setIndexDirect: function(a) { +this.setIndex(a), this.completed(); +}, +previous: function() { +this.setIndex(this.index - 1); +}, +next: function() { +this.setIndex(this.index + 1); +}, +clamp: function(a) { +var b = this.getPanels().length - 1; +return this.wrap ? a : Math.max(0, Math.min(a, b)); +}, +indexChanged: function(a) { +this.lastIndex = a, this.index = this.clamp(this.index), this.dragging || (this.$.animator.isAnimating() && this.completed(), this.$.animator.stop(), this.hasNode() && (this.animate ? (this.startTransition(), this.$.animator.play({ +startValue: this.fraction +})) : this.refresh())); +}, +step: function(a) { +this.fraction = a.value, this.stepTransition(); +}, +completed: function() { +this.$.animator.isAnimating() && this.$.animator.stop(), this.fraction = 1, this.stepTransition(), this.finishTransition(); +}, +dragstart: function(a, b) { +if (this.draggable && this.layout && this.layout.canDragEvent(b)) return b.preventDefault(), this.dragstartTransition(b), this.dragging = !0, this.$.animator.stop(), !0; +}, +drag: function(a, b) { +this.dragging && (b.preventDefault(), this.dragTransition(b)); +}, +dragfinish: function(a, b) { +this.dragging && (this.dragging = !1, b.preventTap(), this.dragfinishTransition(b)); +}, +dragstartTransition: function(a) { +if (!this.$.animator.isAnimating()) { +var b = this.fromIndex = this.index; +this.toIndex = b - (this.layout ? this.layout.calcDragDirection(a) : 0); +} else this.verifyDragTransition(a); +this.fromIndex = this.clamp(this.fromIndex), this.toIndex = this.clamp(this.toIndex), this.fireTransitionStart(), this.layout && this.layout.start(); +}, +dragTransition: function(a) { +var b = this.layout ? this.layout.calcDrag(a) : 0, c = this.transitionPoints, d = c[0], e = c[c.length - 1], f = this.fetchArrangement(d), g = this.fetchArrangement(e), h = this.layout ? this.layout.drag(b, d, f, e, g) : 0, i = b && !h; +!i, this.fraction += h; +var e = this.fraction; +if (e > 1 || e < 0 || i) (e > 0 || i) && this.dragfinishTransition(a), this.dragstartTransition(a), this.fraction = 0; +this.stepTransition(); +}, +dragfinishTransition: function(a) { +this.verifyDragTransition(a), this.setIndex(this.toIndex); +}, +verifyDragTransition: function(a) { +var b = this.layout ? this.layout.calcDragDirection(a) : 0, c = Math.min(this.fromIndex, this.toIndex), d = Math.max(this.fromIndex, this.toIndex); +if (b > 0) { +var e = c; +c = d, d = e; +} +c != this.fromIndex && (this.fraction = 1 - this.fraction), this.fromIndex = c, this.toIndex = d; +}, +refresh: function() { +this.startTransition(), this.fraction = 1, this.stepTransition(), this.finishTransition(); +}, +startTransition: function() { +this.fromIndex = this.fromIndex != null ? this.fromIndex : this.lastIndex || 0, this.toIndex = this.toIndex != null ? this.toIndex : this.index, this.layout && this.layout.start(), this.fireTransitionStart(); +}, +finishTransition: function() { +this.layout && this.layout.finish(), this.transitionPoints = [], this.fraction = 0, this.fromIndex = this.toIndex = null, this.fireTransitionFinish(); +}, +fireTransitionStart: function() { +this.hasNode() && this.doTransitionStart({ +fromIndex: this.fromIndex, +toIndex: this.toIndex +}); +}, +fireTransitionFinish: function() { +this.hasNode() && this.doTransitionFinish({ +fromIndex: this.lastIndex, +toIndex: this.index +}); +}, +stepTransition: function() { +if (this.hasNode()) { +var a = this.transitionPoints, b = (this.fraction || 0) * (a.length - 1), c = Math.floor(b); +b -= c; +var d = a[c], e = a[c + 1], f = this.fetchArrangement(d), g = this.fetchArrangement(e); +this.arrangement = f && g ? enyo.Panels.lerp(f, g, b) : f || g, this.arrangement && this.layout && this.layout.flowArrangement(); +} +}, +fetchArrangement: function(a) { +return a != null && !this.arrangements[a] && this.layout && (this.layout._arrange(a), this.arrangements[a] = this.readArrangement(this.children)), this.arrangements[a]; +}, +readArrangement: function(a) { +var b = []; +for (var c = 0, d = a, e; e = d[c]; c++) b.push(enyo.clone(e._arranger)); +return b; +}, +statics: { +isScreenNarrow: function() { +return window.matchMedia && window.matchMedia("all and (max-width: 800px)").matches; +}, +lerp: function(a, b, c) { +var d = []; +for (var e = 0, f = enyo.keys(a), g; g = f[e]; e++) d.push(this.lerpObject(a[g], b[g], c)); +return d; +}, +lerpObject: function(a, b, c) { +var d = enyo.clone(a), e, f; +for (var g in a) e = a[g], f = b[g], e != f && (d[g] = e - (e - f) * c); +return d; +} +} +}); + +// runtime-machine.js + +runtimeMachine = { +_head: function(a, b, c) { +this._inflight = !0; +var d = document.createElement(a); +for (var e in b) d.setAttribute(e, b[e]); +return c && (d.innerText = c), this._headElt || (this._headElt = document.getElementsByTagName("head")[0]), this._headElt.appendChild(d), d; +}, +sheet: function(a) { +this._head("link", { +type: "text/css", +media: "screen", +rel: "stylesheet", +href: a +}); +}, +inject: function(a) { +this._head("script", { +type: "text/javascript" +}, a); +}, +_scripts: [], +script: function(a) { +this._inflight ? this._scripts.push(a) : this._script(a); +}, +_require: function(a) {}, +_script: function(a) { +this._inflight = !0; +var b = this._head("script", { +type: "text/javascript", +src: a +}), c = this; +b.onload = function() { +c._loaded(a); +}, b.onerror = function() { +c._error(a); +}; +}, +_continue: function() { +this._inflight = !1; +var a = this._scripts.pop(); +a && this._script(a); +}, +_loaded: function(a) { +this._continue(); +}, +_error: function(a) { +this._continue(); +} +}; + +// Walker.js + +enyo.kind({ +name: "Walker", +kind: enyo.Component, +published: { +verbose: !1 +}, +events: { +onProgress: "", +onFinish: "" +}, +walk: function(a) { +this.loader = new enyo.loaderFactory(runtimeMachine), this.loader.loadScript = function() {}, this.loader.loadSheet = function() {}, this.loader.verbose = this.verbose, this.loader.report = enyo.bind(this, "walkReport"), this.loader.finish = enyo.bind(this, "walkFinish"), enyo.loader = this.loader; +var b = enyo.path.rewrite(a); +return enyo.asyncMethod(enyo.loader, "load", b), this.async = new enyo.Async; +}, +walkReport: function(a, b) { +this.doProgress({ +action: a, +name: b +}); +}, +walkFinish: function() { +this.modules = this.loader.modules, this.async.respond({ +modules: this.modules +}), this.doFinish({ +modules: this.modules +}); +} +}); + +// Reader.js + +enyo.kind({ +name: "Reader", +kind: enyo.Async, +go: function(a) { +return this.modules = a.modules, this.moduleIndex = 0, enyo.asyncMethod(this, "nextModule"), this; +}, +nextModule: function() { +var a = this.modules[this.moduleIndex++]; +a ? this.loadModule(a) : this.modulesFinished(); +}, +loadModule: function(a) { +enyo.xhr.request({ +url: a.path, +callback: enyo.bind(this, "moduleLoaded", a) +}); +}, +moduleLoaded: function(a, b) { +this.addModule(a, b), this.nextModule(); +}, +addModule: function(a, b) { +b && b.length && (a.code = b); +}, +modulesFinished: function() { +this.respond({ +modules: this.modules +}); +} +}); + +// Iterator.js + +enyo.kind({ +name: "Iterator", +kind: null, +i: -1, +nodes: null, +constructor: function(a) { +this.stream = a; +}, +next: function() { +return this.i++, this._read(); +}, +prev: function() { +return this.i--, this._read(); +}, +_read: function(a) { +return this.past = this.stream[this.i - 1], this.value = this.stream[this.i], this.future = this.stream[this.i + 1], this.value; +} +}); + +// Lexer.js + +enyo.kind({ +name: "AbstractLexer", +kind: null, +constructor: function(a) { +if (a) return this.start(a), this.finish(), this.r; +}, +p0: 0, +p: 0, +start: function(a) { +this.s = a, this.l = this.s.length, this.r = [], this.d = "", this.p0 = 0, this.p = 0, this.n = 0, this.analyze(); +}, +search: function(a) { +var b = a.global ? a : new RegExp(a.source, "g"); +return b.lastIndex = this.p, this.m = b.exec(this.s), this.p = this.m ? this.m.index : -1, b.lastIndex != this.p0 && (this.d = this.s.charAt(this.p)); +}, +lookahead: function(a) { +return this.s.charAt(this.p + a); +}, +getToken: function() { +return this.s.slice(this.p0, this.p); +}, +tokenize: function(a) { +this.p += a || 0; +}, +pushToken: function(a, b, c) { +this.tokenize(b); +var d = this.getToken(); +if (!d && !c) return {}; +var e = (d.match(/\n/g) || []).length, f = { +kind: a, +token: d, +start: this.p0, +end: this.p, +line: this.n, +height: e +}; +return this.r.push(f), this.n += e, this.p0 = this.p, f; +}, +tossToken: function(a) { +this.tokenize(a), this.p0 = this.p; +}, +finish: function() { +this.pushToken("gah"); +} +}), enyo.kind({ +name: "Lexer", +kind: AbstractLexer, +symbols: "(){}[];,:<>+-=*/&", +operators: [ "++", "--", "+=", "-=", "==", "!=", "<=", ">=", "===", "&&", "||", '"', "'" ], +keywords: [ "function", "new", "return", "if", "else", "while", "do", "break", "continue", "switch", "case", "var" ], +constructor: function(a) { +return this.buildPattern(), this.inherited(arguments); +}, +buildPattern: function() { +var a = '"(?:\\\\"|[^"])*?"', b = "'(?:\\\\'|[^'])*?'", c = a + "|" + b, d = "\\b(?:" + this.keywords.join("|") + ")\\b", e = "[\\" + this.symbols.split("").join("\\") + "]", f = []; +for (var g = 0, h; h = this.operators[g]; g++) f.push("\\" + h.split("").join("\\")); +f = f.join("|"), e = f + "|" + e; +var i = [ '\\\\"|\\\\/', c, d, "\\/\\/", "\\/\\*", e, "\\s" ]; +this.matchers = [ "doSymbol", "doString", "doKeyword", "doLineComment", "doCComment", "doSymbol", "doWhitespace" ], this.pattern = "(" + i.join(")|(") + ")"; +}, +analyze: function() { +var a = new RegExp(this.pattern, "gi"); +while (this.search(a)) this.pushToken("identifier"), this.process(this.matchers), this.pushToken("identifier"); +}, +process: function(a) { +for (var b = 0, c; c = a[b]; b++) if (this.m[b + 1] && this[c]) { +this[c].apply(this); +return; +} +this.doSymbol(); +}, +doWhitespace: function() { +this.tokenize(1), this.search(/\S/g), this.pushToken("ws"), this.r.pop(); +}, +doEscape: function() { +this.tokenize(2); +}, +doLiteral: function() { +this.tossToken(1); +var a = this.d, b = new RegExp("\\" + a + "|\\\\", "g"); +while (this.search(b)) switch (this.d) { +case "\\": +this.doEscape(); +break; +default: +this.pushToken("literal", 0, !0).delimiter = a, this.tossToken(1); +return; +} +}, +doSymbol: function() { +this.pushToken(this.d == ";" || this.d == "," ? "terminal" : "symbol", this.m[0].length); +}, +doKeyword: function() { +this.pushToken("keyword", this.m[0].length); +}, +doLineComment: function() { +this.tokenize(2), this.search(/[\r\n]/g) && this.tokenize(0), this.pushToken("comment"); +}, +doCComment: function() { +this.tokenize(2); +var a = 1; +while (a && this.search(/\/\*|\*\//g)) a += this.d == "/" ? 1 : this.d == "*" ? -1 : 0, this.tokenize(2); +this.pushToken("comment"); +}, +doString: function() { +this.pushToken("string", this.m[0].length); +} +}); + +// Parser.js + +enyo.kind({ +name: "Parser", +kind: null, +constructor: function(a) { +return this.parse(a); +}, +parse: function(a) { +var b = [], c = new Iterator(a); +while (c.next()) c.value.kind !== "ws" && b.push(c.value); +var c = new Iterator(b); +return this.walk(c); +}, +combine: function(a) { +var b = ""; +for (var c = 0, d; d = a[c]; c++) b += d.token; +return b; +}, +walk: function(a, b) { +var c = [], d; +try { +while (a.next()) { +d = a.value; +if (d.kind == "ws") continue; +if (d.kind == "comment") d.kind = "comment"; else if (b == "array") { +if (d.kind == "terminal") continue; +a.prev(), d = { +kind: "element", +token: "expr", +children: this.walk(a, "expression") +}; +if (a.value && a.value.token == "]") return c.push(d), c; +} else if (d.token == "[") d.kind = "array", d.children = this.walk(a, d.kind); else { +if (b == "expression" && d.token == "]") return c; +if (d.token == "var") d.kind = "var", d.children = this.walk(a, "expression"); else { +if (d.kind == "terminal" && (b == "expression" || b == "var")) return c; +if (d.kind == "terminal") continue; +if (d.token == "{") { +d.kind = "block", d.children = this.walk(a, d.kind); +if (b == "expression" || b == "function") return c.push(d), c; +} else { +if (b == "expression" && (d.token == "}" || d.token == ")")) return a.prev(), c; +if (b == "block" && d.token == "}") return c; +if (d.token == "=" || d.token == ":" && b != "expression") { +var e = c.pop(); +e.kind == "identifier" ? (e.op = d.token, e.kind = "assignment", e.children = this.walk(a, "expression"), a.value && a.value.kind == "terminal" && a.prev(), d = e) : c.push(e); +} else if (d.token == "(") d.kind = "association", d.children = this.walk(a, d.kind); else { +if (b == "association" && d.token == ")") return c; +if (d.token == "function") { +d.kind = "function", d.children = this.walk(a, d.kind); +if (b !== "expression" && d.children && d.children.length && d.children[0].kind == "identifier") { +d.name = d.children[0].token, d.children.shift(); +var f = { +kind: "assignment", +token: d.name, +children: [ d ] +}; +d = f; +} +if (b == "expression" || b == "function") return c.push(d), c; +} +} +} +} +} +c.push(d); +} +} catch (g) { +console.error(g); +} +return c; +} +}); + +// Documentor.js + +enyo.kind({ +name: "Documentor", +kind: null, +group: "public", +constructor: function(a) { +return this.comment = [], this.parse(a); +}, +parse: function(a) { +var b = new Iterator(a); +return this.walk(b); +}, +walk: function(a, b) { +var c = [], d, e; +while (a.next()) { +var d = a.value; +if (d.kind == "comment") this.cook_comment(d.token); else if (d.token == "enyo.kind" && a.future.kind == "association") e = this.cook_kind(a); else if (d.kind == "assignment") e = this.cook_assignment(a); else if (d.kind == "association" && d.children && d.children.length == 1 && d.children[0].kind == "function") { +var f = d.children[0]; +if (f.children && f.children.length == 2) { +var g = f.children[1], h = this.walk(new Iterator(g.children)); +c = c.concat(h); +} +a.next(); +} +e && (c.push(e), e = null); +} +return c; +}, +cook_kind: function(a) { +var b = function(a, b) { +var c = Documentor.indexByName(a, b); +if (c >= 0) { +var d = a[c]; +a.splice(d, 1); +} +return d && d.value && d.value.length && d.value[0].token; +}, c = this.make("kind", a.value); +a.next(); +var d = a.value.children; +return d && d[0] && d[0].kind == "block" && (c.properties = this.cook_block(d[0].children), c.name = Documentor.stripQuotes(b(c.properties, "name") || ""), c.superkind = Documentor.stripQuotes(b(c.properties, "kind") || "enyo.Control"), c.superkind == "null" && (c.superkind = null)), c; +}, +cook_block: function(a) { +var b = []; +for (var c = 0, d; d = a[c]; c++) if (d.kind == "comment") this.cook_comment(d.token); else if (d.kind == "assignment") { +var e = this.make("property", d); +d.children && (e.value = [ this.walkValue(new Iterator(d.children)) ]), b.push(e); +} +return b; +}, +walkValue: function(a, b) { +while (a.next()) { +var c = a.value; +if (c.kind != "comment") { +if (c.kind == "block") { +var d = this.make("block", c); +return d.properties = this.cook_block(c.children), d; +} +if (c.kind == "array") return this.cook_array(a); +if (c.kind == "function") return this.cook_function(a); +var d = this.make("expression", c), e = c.token; +while (a.next()) e += a.value.token; +return d.token = e, d; +} +this.cook_comment(c.token); +} +}, +cook_function: function(a) { +var b = a.value, c = this.make("expression", b); +return c.arguments = enyo.map(b.children[0].children, function(a) { +return a.token; +}), c; +}, +cook_array: function(a) { +var b = a.value, c = this.make("array", b), d = b.children; +if (d) { +var e = []; +for (var f = 0, g, h; g = d[f]; f++) h = this.walkValue(new Iterator(g.children)), h && e.push(h); +c.properties = e; +} +return c; +}, +cook_assignment: function(a) { +var b = a.value, c = this.make("global", b); +return b.children && (b.children[0] && b.children[0].token == "function" && (c.type = "function"), c.value = [ this.walkValue(new Iterator(b.children)) ]), c; +}, +make: function(a, b) { +return { +line: b.line, +start: b.start, +end: b.end, +height: b.height, +token: b.token, +name: b.token, +type: a, +group: this.group, +comment: this.consumeComment() +}; +}, +commentRx: /\/\*\*([\s\S]*)\*\/|\/\/\*(.*)/m, +cook_comment: function(a) { +var b = a.match(this.commentRx); +if (b) { +b = b[1] ? b[1] : b[2]; +var c = this.extractPragmas(b); +this.honorPragmas(c); +} +}, +extractPragmas: function(a) { +var b = /^[*\s]*@[\S\s]*/g, c = [], d = a; +return d.length && (d = a.replace(b, function(a) { +var b = a.slice(2); +return c.push(b), ""; +}), d.length && this.comment.push(d)), c; +}, +honorPragmas: function(a) { +var b = { +"protected": 1, +"public": 1 +}; +for (var c = 0, d; d = a[c]; c++) b[d] && (this.group = d); +}, +consumeComment: function() { +var a = this.comment.join(" "); +this.comment = []; +var b = Documentor.removeIndent(a); +return b; +}, +statics: { +indexByProperty: function(a, b, c) { +for (var d = 0, e; e = a[d]; d++) if (e[b] == c) return d; +return -1; +}, +findByProperty: function(a, b, c) { +return a[this.indexByProperty(a, b, c)]; +}, +indexByName: function(a, b) { +return this.indexByProperty(a, "name", b); +}, +findByName: function(a, b) { +return a[this.indexByName(a, b)]; +}, +stripQuotes: function(a) { +var b = a.charAt(0), c = b == '"' || b == "'" ? 1 : 0, d = a.charAt(a.length - 1), e = d == '"' || d == "'" ? -1 : 0; +return c || e ? a.slice(c, e) : a; +}, +removeIndent: function(a) { +var b = 0, c = a.split(/\r?\n/); +for (var d = 0, e; (e = c[d]) != null; d++) if (e.length > 0) { +b = e.search(/\S/), b < 0 && (b = e.length); +break; +} +if (b) for (var d = 0, e; (e = c[d]) != null; d++) c[d] = e.slice(b); +return c.join("\n"); +} +} +}); + +// Indexer.js + +enyo.kind({ +name: "Indexer", +kind: null, +group: "public", +constructor: function() { +this.objects = []; +}, +findByName: function(a) { +return Documentor.findByProperty(this.objects, "name", a); +}, +findByTopic: function(a) { +return Documentor.findByProperty(this.objects, "topic", a); +}, +addModules: function(a) { +enyo.forEach(a, this.addModule, this), this.objects.sort(Indexer.nameCompare); +}, +addModule: function(a) { +this.indexModule(a), this.mergeModule(a); +}, +mergeModule: function(a) { +this.objects.push(a), this.objects = this.objects.concat(a.objects), enyo.forEach(a.objects, this.mergeProperties, this); +}, +mergeProperties: function(a) { +a.properties ? this.objects = this.objects.concat(a.properties) : a.value && a.value[0] && a.value[0].properties && (this.objects = this.objects.concat(a.value[0].properties)); +}, +indexModule: function(a) { +a.type = "module", a.name = a.name || a.rawPath, a.objects = new Documentor(new Parser(new Lexer(a.code))), this.indexObjects(a); +}, +indexObjects: function(a) { +enyo.forEach(a.objects, function(b) { +b.module = a, this.indexObject(b); +}, this); +}, +indexObject: function(a) { +switch (a.type) { +case "kind": +this.indexKind(a); +} +this.indexProperties(a); +}, +indexProperties: function(a) { +var b = a.properties || a.value && a.value[0] && a.value[0].properties; +enyo.forEach(b, function(b) { +b.object = a, b.topic = b.object.name ? b.object.name + "::" + b.name : b.name; +}, this); +}, +indexKind: function(a) { +this.listComponents(a), this.indexInheritance(a); +}, +indexInheritance: function(a) { +a.superkinds = this.listSuperkinds(a), a.allProperties = this.listInheritedProperties(a); +}, +listSuperkinds: function(a) { +var b = [], c; +while (a && a.superkind) c = a.superkind, a = this.findByName(c), a || (a = this.findByName("enyo." + c), a && (c = "enyo." + c)), b.push(c); +return b; +}, +listInheritedProperties: function(a) { +var b = [], c = {}; +for (var d = a.superkinds.length - 1, e; e = a.superkinds[d]; d--) { +var f = this.findByName(e); +f && this.mergeInheritedProperties(f.properties, c, b); +} +return this.mergeInheritedProperties(a.properties, c, b), b.sort(Indexer.nameCompare), b; +}, +mergeInheritedProperties: function(a, b, c) { +for (var d = 0, e; e = a[d]; d++) { +var f = b.hasOwnProperty(e.name) && b[e.name]; +f ? (e.overrides = f, c[enyo.indexOf(f, c)] = e) : c.push(e), b[e.name] = e; +} +}, +listComponents: function(a) { +a.components = this._listComponents(a, [], {}); +}, +_listComponents: function(a, b, c) { +var d = Documentor.findByName(a.properties, "components"); +if (d && d.value && d.value.length) { +var e = d.value[0].properties; +for (var f = 0, g; g = e[f]; f++) { +var h = Documentor.findByName(g.properties, "name"); +h && (h = Documentor.stripQuotes(h.value[0].token || "")); +var i = Documentor.findByName(g.properties, "kind"); +i = Documentor.stripQuotes(i && i.value[0].token || "Control"); +if (!h) { +var j = i.split(".").pop(); +h = enyo.uncap(j), c[h] ? h += ++c[h] : c[h] = 1; +} +g.kind = i, g.name = h, b.push(g), this._listComponents(g, b, c); +} +} +return b; +}, +statics: { +nameCompare: function(a, b) { +var c = a.name.toLowerCase(), d = b.name.toLowerCase(); +return c < d ? -1 : c > d ? 1 : 0; +} +} +}); + +// Analyzer.js + +enyo.kind({ +name: "Analyzer", +kind: "Component", +events: { +onIndexReady: "" +}, +create: function() { +this.index = new Indexer, this.inherited(arguments); +}, +analyze: function(a) { +this.walk(a); +}, +walk: function(a) { +var b = [], c = function(d, e) { +e && (b = b.concat(e.modules)); +var f = a.shift(); +f ? (new Walker).walk(f).response(this, c) : this.walkFinished(b); +}; +c.call(this); +}, +walkFinished: function(a) { +this.read(a); +}, +read: function(a) { +(new Reader).go({ +modules: a +}).response(this, function(a, b) { +this.indexModules(b.modules); +}); +}, +indexModules: function(a) { +this.index.addModules(a), this.doIndexReady(); +} +}); + +// foss/showdown-v0.9/compressed/showdown.js + +var Showdown = {}; + +Showdown.converter = function() { +var a, b, c, d = 0; +this.makeHtml = function(d) { +return a = new Array, b = new Array, c = new Array, d = d.replace(/~/g, "~T"), d = d.replace(/\$/g, "~D"), d = d.replace(/\r\n/g, "\n"), d = d.replace(/\r/g, "\n"), d = "\n\n" + d + "\n\n", d = E(d), d = d.replace(/^[ \t]+$/mg, ""), d = f(d), d = e(d), d = h(d), d = C(d), d = d.replace(/~D/g, "$$"), d = d.replace(/~T/g, "~"), d; +}; +var e = function(c) { +var c = c.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm, function(c, d, e, f, g) { +return d = d.toLowerCase(), a[d] = y(e), f ? f + g : (g && (b[d] = g.replace(/"/g, """)), ""); +}); +return c; +}, f = function(a) { +a = a.replace(/\n/g, "\n\n"); +var b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del", c = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math"; +return a = a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, g), a = a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm, g), a = a.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, g), a = a.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g, g), a = a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, g), a = a.replace(/\n\n/g, "\n"), a; +}, g = function(a, b) { +var d = b; +return d = d.replace(/\n\n/g, "\n"), d = d.replace(/^\n/, ""), d = d.replace(/\n+$/g, ""), d = "\n\n~K" + (c.push(d) - 1) + "K\n\n", d; +}, h = function(a) { +a = o(a); +var b = s("<hr />"); +return a = a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, b), a = a.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm, b), a = a.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm, b), a = q(a), a = r(a), a = w(a), a = f(a), a = x(a), a; +}, i = function(a) { +return a = t(a), a = j(a), a = z(a), a = m(a), a = k(a), a = A(a), a = y(a), a = v(a), a = a.replace(/ +\n/g, " <br />\n"), a; +}, j = function(a) { +var b = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi; +return a = a.replace(b, function(a) { +var b = a.replace(/(.)<\/?code>(?=.)/g, "$1`"); +return b = F(b, "\\`*_"), b; +}), a; +}, k = function(a) { +return a = a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, l), a = a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, l), a = a.replace(/(\[([^\[\]]+)\])()()()()()/g, l), a; +}, l = function(c, d, e, f, g, h, i, j) { +j == undefined && (j = ""); +var k = d, l = e, m = f.toLowerCase(), n = g, o = j; +if (n == "") { +m == "" && (m = l.toLowerCase().replace(/ ?\n/g, " ")), n = "#" + m; +if (a[m] != undefined) n = a[m], b[m] != undefined && (o = b[m]); else { +if (!(k.search(/\(\s*\)$/m) > -1)) return k; +n = ""; +} +} +n = F(n, "*_"); +var p = '<a href="' + n + '"'; +return o != "" && (o = o.replace(/"/g, """), o = F(o, "*_"), p += ' title="' + o + '"'), p += ">" + l + "</a>", p; +}, m = function(a) { +return a = a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, n), a = a.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, n), a; +}, n = function(c, d, e, f, g, h, i, j) { +var k = d, l = e, m = f.toLowerCase(), n = g, o = j; +o || (o = ""); +if (n == "") { +m == "" && (m = l.toLowerCase().replace(/ ?\n/g, " ")), n = "#" + m; +if (a[m] == undefined) return k; +n = a[m], b[m] != undefined && (o = b[m]); +} +l = l.replace(/"/g, """), n = F(n, "*_"); +var p = '<img src="' + n + '" alt="' + l + '"'; +return o = o.replace(/"/g, """), o = F(o, "*_"), p += ' title="' + o + '"', p += " />", p; +}, o = function(a) { +return a = a.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm, function(a, b) { +return s("<h1>" + i(b) + "</h1>"); +}), a = a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm, function(a, b) { +return s("<h2>" + i(b) + "</h2>"); +}), a = a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm, function(a, b, c) { +var d = b.length; +return s("<h" + d + ">" + i(c) + "</h" + d + ">"); +}), a; +}, p, q = function(a) { +a += "~0"; +var b = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm; +return d ? a = a.replace(b, function(a, b, c) { +var d = b, e = c.search(/[*+-]/g) > -1 ? "ul" : "ol"; +d = d.replace(/\n{2,}/g, "\n\n\n"); +var f = p(d); +return f = f.replace(/\s+$/, ""), f = "<" + e + ">" + f + "</" + e + ">\n", f; +}) : (b = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g, a = a.replace(b, function(a, b, c, d) { +var e = b, f = c, g = d.search(/[*+-]/g) > -1 ? "ul" : "ol", f = f.replace(/\n{2,}/g, "\n\n\n"), h = p(f); +return h = e + "<" + g + ">\n" + h + "</" + g + ">\n", h; +})), a = a.replace(/~0/, ""), a; +}; +p = function(a) { +return d++, a = a.replace(/\n{2,}$/, "\n"), a += "~0", a = a.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm, function(a, b, c, d, e) { +var f = e, g = b, j = c; +return g || f.search(/\n{2,}/) > -1 ? f = h(D(f)) : (f = q(D(f)), f = f.replace(/\n$/, ""), f = i(f)), "<li>" + f + "</li>\n"; +}), a = a.replace(/~0/g, ""), d--, a; +}; +var r = function(a) { +return a += "~0", a = a.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g, function(a, b, c) { +var d = b, e = c; +return d = u(D(d)), d = E(d), d = d.replace(/^\n+/g, ""), d = d.replace(/\n+$/g, ""), d = "<pre><code>" + d + "\n</code></pre>", s(d) + e; +}), a = a.replace(/~0/, ""), a; +}, s = function(a) { +return a = a.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (c.push(a) - 1) + "K\n\n"; +}, t = function(a) { +return a = a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(a, b, c, d, e) { +var f = d; +return f = f.replace(/^([ \t]*)/g, ""), f = f.replace(/[ \t]*$/g, ""), f = u(f), b + "<code>" + f + "</code>"; +}), a; +}, u = function(a) { +return a = a.replace(/&/g, "&"), a = a.replace(/</g, "<"), a = a.replace(/>/g, ">"), a = F(a, "*_{}[]\\", !1), a; +}, v = function(a) { +return a = a.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, "<strong>$2</strong>"), a = a.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, "<em>$2</em>"), a; +}, w = function(a) { +return a = a.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, function(a, b) { +var c = b; +return c = c.replace(/^[ \t]*>[ \t]?/gm, "~0"), c = c.replace(/~0/g, ""), c = c.replace(/^[ \t]+$/gm, ""), c = h(c), c = c.replace(/(^|\n)/g, "$1 "), c = c.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function(a, b) { +var c = b; +return c = c.replace(/^ /mg, "~0"), c = c.replace(/~0/g, ""), c; +}), s("<blockquote>\n" + c + "\n</blockquote>"); +}), a; +}, x = function(a) { +a = a.replace(/^\n+/g, ""), a = a.replace(/\n+$/g, ""); +var b = a.split(/\n{2,}/g), d = new Array, e = b.length; +for (var f = 0; f < e; f++) { +var g = b[f]; +g.search(/~K(\d+)K/g) >= 0 ? d.push(g) : g.search(/\S/) >= 0 && (g = i(g), g = g.replace(/^([ \t]*)/g, "<p>"), g += "</p>", d.push(g)); +} +e = d.length; +for (var f = 0; f < e; f++) while (d[f].search(/~K(\d+)K/) >= 0) { +var h = c[RegExp.$1]; +h = h.replace(/\$/g, "$$$$"), d[f] = d[f].replace(/~K\d+K/, h); +} +return d.join("\n\n"); +}, y = function(a) { +return a = a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&"), a = a.replace(/<(?![a-z\/?\$!])/gi, "<"), a; +}, z = function(a) { +return a = a.replace(/\\(\\)/g, G), a = a.replace(/\\([`*_{}\[\]()>#+-.!])/g, G), a; +}, A = function(a) { +return a = a.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi, '<a href="$1">$1</a>'), a = a.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, function(a, b) { +return B(C(b)); +}), a; +}, B = function(a) { +function b(a) { +var b = "0123456789ABCDEF", c = a.charCodeAt(0); +return b.charAt(c >> 4) + b.charAt(c & 15); +} +var c = [ function(a) { +return "&#" + a.charCodeAt(0) + ";"; +}, function(a) { +return "&#x" + b(a) + ";"; +}, function(a) { +return a; +} ]; +return a = "mailto:" + a, a = a.replace(/./g, function(a) { +if (a == "@") a = c[Math.floor(Math.random() * 2)](a); else if (a != ":") { +var b = Math.random(); +a = b > .9 ? c[2](a) : b > .45 ? c[1](a) : c[0](a); +} +return a; +}), a = '<a href="' + a + '">' + a + "</a>", a = a.replace(/">.+:/g, '">'), a; +}, C = function(a) { +return a = a.replace(/~E(\d+)E/g, function(a, b) { +var c = parseInt(b); +return String.fromCharCode(c); +}), a; +}, D = function(a) { +return a = a.replace(/^(\t|[ ]{1,4})/gm, "~0"), a = a.replace(/~0/g, ""), a; +}, E = function(a) { +return a = a.replace(/\t(?=\t)/g, " "), a = a.replace(/\t/g, "~A~B"), a = a.replace(/~B(.+?)~A/g, function(a, b, c) { +var d = b, e = 4 - d.length % 4; +for (var f = 0; f < e; f++) d += " "; +return d; +}), a = a.replace(/~A/g, " "), a = a.replace(/~B/g, ""), a; +}, F = function(a, b, c) { +var d = "([" + b.replace(/([\[\]\\])/g, "\\$1") + "])"; +c && (d = "\\\\" + d); +var e = new RegExp(d, "g"); +return a = a.replace(e, G), a; +}, G = function(a, b) { +var c = b.charCodeAt(0); +return "~E" + c + "E"; +}; +}; + +// foss/syntaxhighlighter_3.0.83_fork/sh-min.js + +var XRegExp; + +if (XRegExp) throw Error("can't load XRegExp twice in the same frame"); + +(function() { +function a(a, c) { +if (!XRegExp.isRegExp(a)) throw TypeError("type RegExp expected"); +var d = a._xregexp; +return a = XRegExp(a.source, b(a) + (c || "")), d && (a._xregexp = { +source: d.source, +captureNames: d.captureNames ? d.captureNames.slice(0) : null +}), a; +} +function b(a) { +return (a.global ? "g" : "") + (a.ignoreCase ? "i" : "") + (a.multiline ? "m" : "") + (a.extended ? "x" : "") + (a.sticky ? "y" : ""); +} +function c(a, b, c, d) { +var e = i.length, f, g, j; +h = !0; +try { +while (e--) { +j = i[e]; +if (c & j.scope && (!j.trigger || j.trigger.call(d))) { +j.pattern.lastIndex = b, g = j.pattern.exec(a); +if (g && g.index === b) { +f = { +output: j.handler.call(d, g, c), +match: g +}; +break; +} +} +} +} catch (k) { +throw k; +} finally { +h = !1; +} +return f; +} +function d(a, b, c) { +if (Array.prototype.indexOf) return a.indexOf(b, c); +for (var d = c || 0; d < a.length; d++) if (a[d] === b) return d; +return -1; +} +XRegExp = function(b, d) { +var e = [], g = XRegExp.OUTSIDE_CLASS, i = 0, k, l, m, n, p; +if (XRegExp.isRegExp(b)) { +if (d !== undefined) throw TypeError("can't supply flags when constructing one RegExp from another"); +return a(b); +} +if (h) throw Error("can't call the XRegExp constructor within token definition functions"); +d = d || "", k = { +hasNamedCapture: !1, +captureNames: [], +hasFlag: function(a) { +return d.indexOf(a) > -1; +}, +setFlag: function(a) { +d += a; +} +}; +while (i < b.length) l = c(b, i, g, k), l ? (e.push(l.output), i += l.match[0].length || 1) : (m = j.exec.call(o[g], b.slice(i))) ? (e.push(m[0]), i += m[0].length) : (n = b.charAt(i), n === "[" ? g = XRegExp.INSIDE_CLASS : n === "]" && (g = XRegExp.OUTSIDE_CLASS), e.push(n), i++); +return p = RegExp(e.join(""), j.replace.call(d, f, "")), p._xregexp = { +source: b, +captureNames: k.hasNamedCapture ? k.captureNames : null +}, p; +}, XRegExp.version = "1.5.0", XRegExp.INSIDE_CLASS = 1, XRegExp.OUTSIDE_CLASS = 2; +var e = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g, f = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, g = /^(?:[?*+]|{\d+(?:,\d*)?})\??/, h = !1, i = [], j = { +exec: RegExp.prototype.exec, +test: RegExp.prototype.test, +match: String.prototype.match, +replace: String.prototype.replace, +split: String.prototype.split +}, k = j.exec.call(/()??/, "")[1] === undefined, l = function() { +var a = /^/g; +return j.test.call(a, ""), !a.lastIndex; +}(), m = function() { +var a = /x/g; +return j.replace.call("x", a, ""), !a.lastIndex; +}(), n = RegExp.prototype.sticky !== undefined, o = {}; +o[XRegExp.INSIDE_CLASS] = /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/, o[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/, XRegExp.addToken = function(b, c, d, e) { +i.push({ +pattern: a(b, "g" + (n ? "y" : "")), +handler: c, +scope: d || XRegExp.OUTSIDE_CLASS, +trigger: e || null +}); +}, XRegExp.cache = function(a, b) { +var c = a + "/" + (b || ""); +return XRegExp.cache[c] || (XRegExp.cache[c] = XRegExp(a, b)); +}, XRegExp.copyAsGlobal = function(b) { +return a(b, "g"); +}, XRegExp.escape = function(a) { +return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); +}, XRegExp.execAt = function(b, c, d, e) { +c = a(c, "g" + (e && n ? "y" : "")), c.lastIndex = d = d || 0; +var f = c.exec(b); +return e ? f && f.index === d ? f : null : f; +}, XRegExp.freezeTokens = function() { +XRegExp.addToken = function() { +throw Error("can't run addToken after freezeTokens"); +}; +}, XRegExp.isRegExp = function(a) { +return Object.prototype.toString.call(a) === "[object RegExp]"; +}, XRegExp.iterate = function(b, c, d, e) { +var f = a(c, "g"), g = -1, h; +while (h = f.exec(b)) d.call(e, h, ++g, b, f), f.lastIndex === h.index && f.lastIndex++; +c.global && (c.lastIndex = 0); +}, XRegExp.matchChain = function(b, c) { +return function d(b, e) { +var f = c[e].regex ? c[e] : { +regex: c[e] +}, g = a(f.regex, "g"), h = [], i; +for (i = 0; i < b.length; i++) XRegExp.iterate(b[i], g, function(a) { +h.push(f.backref ? a[f.backref] || "" : a[0]); +}); +return e === c.length - 1 || !h.length ? h : d(h, e + 1); +}([ b ], 0); +}, RegExp.prototype.apply = function(a, b) { +return this.exec(b[0]); +}, RegExp.prototype.call = function(a, b) { +return this.exec(b); +}, RegExp.prototype.exec = function(a) { +var c = j.exec.apply(this, arguments), e, f; +if (c) { +!k && c.length > 1 && d(c, "") > -1 && (f = RegExp(this.source, j.replace.call(b(this), "g", "")), j.replace.call(a.slice(c.index), f, function() { +for (var a = 1; a < arguments.length - 2; a++) arguments[a] === undefined && (c[a] = undefined); +})); +if (this._xregexp && this._xregexp.captureNames) for (var g = 1; g < c.length; g++) e = this._xregexp.captureNames[g - 1], e && (c[e] = c[g]); +!l && this.global && !c[0].length && this.lastIndex > c.index && this.lastIndex--; +} +return c; +}, l || (RegExp.prototype.test = function(a) { +var b = j.exec.call(this, a); +return b && this.global && !b[0].length && this.lastIndex > b.index && this.lastIndex--, !!b; +}), String.prototype.match = function(a) { +XRegExp.isRegExp(a) || (a = RegExp(a)); +if (a.global) { +var b = j.match.apply(this, arguments); +return a.lastIndex = 0, b; +} +return a.exec(this); +}, String.prototype.replace = function(a, b) { +var c = XRegExp.isRegExp(a), f, g, h; +return c && typeof b.valueOf() == "string" && b.indexOf("${") === -1 && m ? j.replace.apply(this, arguments) : (c ? a._xregexp && (f = a._xregexp.captureNames) : a += "", typeof b == "function" ? g = j.replace.call(this, a, function() { +if (f) { +arguments[0] = new String(arguments[0]); +for (var d = 0; d < f.length; d++) f[d] && (arguments[0][f[d]] = arguments[d + 1]); +} +return c && a.global && (a.lastIndex = arguments[arguments.length - 2] + arguments[0].length), b.apply(null, arguments); +}) : (h = this + "", g = j.replace.call(h, a, function() { +var a = arguments; +return j.replace.call(b, e, function(b, c, e) { +if (!c) { +var g = +e; +return g <= a.length - 3 ? a[g] : (g = f ? d(f, e) : -1, g > -1 ? a[g + 1] : b); +} +switch (c) { +case "$": +return "$"; +case "&": +return a[0]; +case "`": +return a[a.length - 1].slice(0, a[a.length - 2]); +case "'": +return a[a.length - 1].slice(a[a.length - 2] + a[0].length); +default: +var h = ""; +c = +c; +if (!c) return b; +while (c > a.length - 3) h = String.prototype.slice.call(c, -1) + h, c = Math.floor(c / 10); +return (c ? a[c] || "" : "$") + h; +} +}); +})), c && a.global && (a.lastIndex = 0), g); +}, String.prototype.split = function(a, b) { +if (!XRegExp.isRegExp(a)) return j.split.apply(this, arguments); +var c = this + "", d = [], e = 0, f, g; +if (b === undefined || +b < 0) b = Infinity; else { +b = Math.floor(+b); +if (!b) return []; +} +a = XRegExp.copyAsGlobal(a); +while (f = a.exec(c)) { +if (a.lastIndex > e) { +d.push(c.slice(e, f.index)), f.length > 1 && f.index < c.length && Array.prototype.push.apply(d, f.slice(1)), g = f[0].length, e = a.lastIndex; +if (d.length >= b) break; +} +a.lastIndex === f.index && a.lastIndex++; +} +return e === c.length ? (!j.test.call(a, "") || g) && d.push("") : d.push(c.slice(e)), d.length > b ? d.slice(0, b) : d; +}, XRegExp.addToken(/\(\?#[^)]*\)/, function(a) { +return j.test.call(g, a.input.slice(a.index + a[0].length)) ? "" : "(?:)"; +}), XRegExp.addToken(/\((?!\?)/, function() { +return this.captureNames.push(null), "("; +}), XRegExp.addToken(/\(\?<([$\w]+)>/, function(a) { +return this.captureNames.push(a[1]), this.hasNamedCapture = !0, "("; +}), XRegExp.addToken(/\\k<([\w$]+)>/, function(a) { +var b = d(this.captureNames, a[1]); +return b > -1 ? "\\" + (b + 1) + (isNaN(a.input.charAt(a.index + a[0].length)) ? "" : "(?:)") : a[0]; +}), XRegExp.addToken(/\[\^?]/, function(a) { +return a[0] === "[]" ? "\\b\\B" : "[\\s\\S]"; +}), XRegExp.addToken(/^\(\?([imsx]+)\)/, function(a) { +return this.setFlag(a[1]), ""; +}), XRegExp.addToken(/(?:\s+|#.*)+/, function(a) { +return j.test.call(g, a.input.slice(a.index + a[0].length)) ? "" : "(?:)"; +}, XRegExp.OUTSIDE_CLASS, function() { +return this.hasFlag("x"); +}), XRegExp.addToken(/\./, function() { +return "[\\s\\S]"; +}, XRegExp.OUTSIDE_CLASS, function() { +return this.hasFlag("s"); +}); +})(); + +var SyntaxHighlighter = function() { +function a(a) { +return a.split("\n"); +} +function b(a, b, c) { +c = Math.max(c || 0, 0); +for (var d = c; d < a.length; d++) if (a[d] == b) return d; +return -1; +} +function c(a, b) { +var c = {}, d; +for (d in a) c[d] = a[d]; +for (d in b) c[d] = b[d]; +return c; +} +function d(a) { +var b = { +"true": !0, +"false": !1 +}[a]; +return b == null ? a : b; +} +function e(b, c) { +var d = a(b); +for (var e = 0; e < d.length; e++) d[e] = c(d[e], e); +return d.join("\n"); +} +function f(a) { +return a.replace(/^[ ]*[\n]+|[\n]*[ ]*$/g, ""); +} +function g(a, b) { +return a == null || a.length == 0 || a == "\n" ? a : (a = a.replace(/</g, "<"), a = a.replace(/ {2,}/g, function(a) { +var b = ""; +for (var c = 0; c < a.length - 1; c++) b += q.config.space; +return b + " "; +}), b != null && (a = e(a, function(a) { +if (a.length == 0) return ""; +var c = ""; +return a = a.replace(/^( | )+/, function(a) { +return c = a, ""; +}), a.length == 0 ? c : c + '<code class="' + b + '">' + a + "</code>"; +})), a); +} +function h(a, b) { +var c = a.toString(); +while (c.length < b) c = "0" + c; +return c; +} +function i(a, b) { +var c = ""; +for (var d = 0; d < b; d++) c += " "; +return a.replace(/\t/g, c); +} +function j(b, c) { +function d(a, b, c) { +return a.substr(0, b) + h.substr(0, c) + a.substr(b + 1, a.length); +} +var f = a(b), g = " ", h = ""; +for (var i = 0; i < 50; i++) h += " "; +return b = e(b, function(a) { +if (a.indexOf(g) == -1) return a; +var b = 0; +while ((b = a.indexOf(g)) != -1) { +var e = c - b % c; +a = d(a, b, e); +} +return a; +}), b; +} +function k(a) { +var b = /<br\s*\/?>|<br\s*\/?>/gi; +return a = a.replace(b, "\n"), q.config.stripBrs == 1 && (a = a.replace(b, "")), a; +} +function l(a) { +return a.replace(/^\s+|\s+$/g, ""); +} +function m(b) { +var c = a(k(b)), d = new Array, e = /^\s*/, f = 1e3; +for (var g = 0; g < c.length && f > 0; g++) { +var h = c[g]; +if (l(h).length == 0) continue; +var i = e.exec(h); +if (i == null) return b; +f = Math.min(i[0].length, f); +} +if (f > 0) for (var g = 0; g < c.length; g++) c[g] = c[g].substr(f); +return c.join("\n"); +} +function n(a, b) { +return a.index < b.index ? -1 : a.index > b.index ? 1 : a.length < b.length ? -1 : a.length > b.length ? 1 : 0; +} +function o(a, b) { +function c(a, b) { +return a[0]; +} +var d = 0, e = null, f = [], g = b.func ? b.func : c; +while ((e = b.regex.exec(a)) != null) { +var h = g(e, b); +typeof h == "string" && (h = [ new q.Match(h, e.index, b.css) ]), f = f.concat(h); +} +return f; +} +function p(a) { +var b = /(.*)((>|<).*)/; +return a.replace(q.regexLib.url, function(a) { +var c = "", d = null; +if (d = b.exec(a)) a = d[1], c = d[2]; +return '<a href="' + a + '">' + a + "</a>" + c; +}); +} +var q = { +defaults: { +"class-name": "", +"first-line": 1, +"pad-line-numbers": !1, +highlight: null, +"smart-tabs": !0, +"tab-size": 4, +gutter: !0, +"auto-links": !0 +}, +config: { +space: " ", +stripBrs: !1, +strings: { +alert: "SyntaxHighlighter\n\n", +noBrush: "Can't find brush for: ", +brushNotHtmlScript: "Brush wasn't configured for html-script option: " +} +}, +brushes: {}, +regexLib: { +multiLineCComments: /\/\*[\s\S]*?\*\//gm, +singleLineCComments: /\/\/.*$/gm, +singleLinePerlComments: /#.*$/gm, +doubleQuotedString: /"([^\\"\n]|\\.)*"/g, +singleQuotedString: /'([^\\'\n]|\\.)*'/g, +multiLineDoubleQuotedString: new XRegExp('"([^\\\\"]|\\\\.)*"', "gs"), +multiLineSingleQuotedString: new XRegExp("'([^\\\\']|\\\\.)*'", "gs"), +xmlComments: /(<|<)!--[\s\S]*?--(>|>)/gm, +url: /\w+:\/\/[\w-.\/?%&=:@;]*/g, +phpScriptTags: { +left: /(<|<)\?=?/g, +right: /\?(>|>)/g +}, +aspScriptTags: { +left: /(<|<)%=?/g, +right: /%(>|>)/g +}, +scriptScriptTags: { +left: /(<|<)\s*script.*?(>|>)/gi, +right: /(<|<)\/\s*script\s*(>|>)/gi +} +} +}; +return q.Match = function(a, b, c) { +this.value = a, this.index = b, this.length = a.length, this.css = c, this.brushName = null; +}, q.Match.prototype.toString = function() { +return this.value; +}, q.Highlighter = function() {}, q.Highlighter.prototype = { +getParam: function(a, b) { +var c = this.params[a]; +return d(c == null ? b : c); +}, +create: function(a) { +return document.createElement(a); +}, +findMatches: function(a, b) { +var c = []; +if (a != null) for (var d = 0; d < a.length; d++) typeof a[d] == "object" && (c = c.concat(o(b, a[d]))); +return this.removeNestedMatches(c.sort(n)); +}, +removeNestedMatches: function(a) { +for (var b = 0; b < a.length; b++) { +if (a[b] === null) continue; +var c = a[b], d = c.index + c.length; +for (var e = b + 1; e < a.length && a[b] !== null; e++) { +var f = a[e]; +if (f === null) continue; +if (f.index > d) break; +f.index == c.index && f.length > c.length ? a[b] = null : f.index >= c.index && f.index < d && (a[e] = null); +} +} +return a; +}, +figureOutLineNumbers: function(a) { +var b = [], c = parseInt(this.getParam("first-line")); +return e(a, function(a, d) { +b.push(d + c); +}), b; +}, +isLineHighlighted: function(a) { +var c = this.getParam("highlight", []); +return typeof c != "object" && c.push == null && (c = [ c ]), b(c, a.toString()) != -1; +}, +getLineHtml: function(a, b, c) { +var d = [ "line", "number" + b, "index" + a, "alt" + (b % 2 == 0 ? 1 : 2).toString() ]; +return this.isLineHighlighted(b) && d.push("highlighted"), b == 0 && d.push("break"), '<div class="' + d.join(" ") + '">' + c + "</div>"; +}, +getLineNumbersHtml: function(b, c) { +var d = "", e = a(b).length, f = parseInt(this.getParam("first-line")), g = this.getParam("pad-line-numbers"); +g == 1 ? g = (f + e - 1).toString().length : isNaN(g) == 1 && (g = 0); +for (var i = 0; i < e; i++) { +var j = c ? c[i] : f + i, b = j == 0 ? q.config.space : h(j, g); +d += this.getLineHtml(i, j, b); +} +return d; +}, +getCodeLinesHtml: function(b, c) { +b = l(b); +var d = a(b), e = this.getParam("pad-line-numbers"), f = parseInt(this.getParam("first-line")), b = "", g = this.getParam("brush"); +for (var h = 0; h < d.length; h++) { +var i = d[h], j = /^( |\s)+/.exec(i), k = null, m = c ? c[h] : f + h; +j != null && (k = j[0].toString(), i = i.substr(k.length), k = k.replace(" ", q.config.space)), i = l(i), i.length == 0 && (i = q.config.space), b += this.getLineHtml(h, m, (k != null ? '<code class="' + g + ' spaces">' + k + "</code>" : "") + i); +} +return b; +}, +getMatchesHtml: function(a, b) { +function c(a) { +var b = a ? a.brushName || f : f; +return b ? b + " " : ""; +} +var d = 0, e = "", f = this.getParam("brush", ""); +for (var h = 0; h < b.length; h++) { +var i = b[h], j; +if (i === null || i.length === 0) continue; +j = c(i), e += g(a.substr(d, i.index - d), j + "plain") + g(i.value, j + i.css), d = i.index + i.length + (i.offset || 0); +} +return e += g(a.substr(d), c() + "plain"), e; +}, +getHtml: function(a) { +var b = "", c = [ "syntaxhighlighter" ], d, e, g; +return className = "syntaxhighlighter", (gutter = this.getParam("gutter")) == 0 && c.push("nogutter"), c.push(this.getParam("class-name")), c.push(this.getParam("brush")), a = f(a).replace(/\r/g, " "), d = this.getParam("tab-size"), a = this.getParam("smart-tabs") == 1 ? j(a, d) : i(a, d), a = m(a), gutter && (g = this.figureOutLineNumbers(a)), e = this.findMatches(this.regexList, a), b = this.getMatchesHtml(a, e), b = this.getCodeLinesHtml(b, g), this.getParam("auto-links") && (b = p(b)), typeof navigator != "undefined" && navigator.userAgent && navigator.userAgent.match(/MSIE/) && c.push("ie"), b = '<div class="' + c.join(" ") + '">' + '<table border="0" cellpadding="0" cellspacing="0">' + "<tbody>" + "<tr>" + (gutter ? '<td class="gutter">' + this.getLineNumbersHtml(a) + "</td>" : "") + '<td class="code">' + '<div class="container">' + b + "</div>" + "</td>" + "</tr>" + "</tbody>" + "</table>" + "</div>", b; +}, +init: function(a) { +this.params = c(q.defaults, a || {}); +}, +getKeywords: function(a) { +return a = a.replace(/^\s+|\s+$/g, "").replace(/\s+/g, "|"), "\\b(?:" + a + ")\\b"; +} +}, q; +}(); + +(function() { +function a() { +var a = "break case catch continue default delete do else false for function if in instanceof new null return super switch this throw true try typeof var while with", b = SyntaxHighlighter.regexLib; +this.regexList = [ { +regex: b.multiLineDoubleQuotedString, +css: "string" +}, { +regex: b.multiLineSingleQuotedString, +css: "string" +}, { +regex: b.singleLineCComments, +css: "comments" +}, { +regex: b.multiLineCComments, +css: "comments" +}, { +regex: /\s*#.*/gm, +css: "preprocessor" +}, { +regex: new RegExp(this.getKeywords(a), "gm"), +css: "keyword" +} ]; +} +a.prototype = new SyntaxHighlighter.Highlighter, a.aliases = [ "js", "jscript", "javascript" ], SyntaxHighlighter.brushes.JScript = a; +})(), function() { +var a = new SyntaxHighlighter.brushes.JScript; +a.init({}), syntaxHighlight = function(b) { +return a.getHtml(b); +}; +}(); + +// Presentor.js + +enyo.kind({ +name: "Presentor", +kind: null, +showInherited: !1, +showProtected: !1, +getByType: function(a, b) { +var c = []; +for (var d = 0, e; e = a[d]; d++) e.type == b && c.push(e); +return c; +}, +presentObject: function(a) { +switch (a.type) { +case "module": +return this.presentObjects(a.objects); +case "kind": +return this.presentKind(a); +case "function": +case "global": +return this.presentProperty(a); +} +}, +presentObjects: function(a) { +var b = this.groupFilter(a), c = "", d = this.getByType(b, "kind"); +if (d.length) { +c += "<h3>Kinds</h3>"; +for (var e = 0, f; f = d[e]; e++) c += "<kind>" + f.name + "</kind><br/>", c += this.presentComment(f.comment); +} +var d = this.getByType(b, "function"); +c += "<h3>Functions</h3>"; +for (var e = 0, f; f = d[e]; e++) c += this.presentComment(f.comment), f.group && (c += "<" + f.group + ">" + f.group + "</" + f.group + ">"), c += "<i>name:</i> <label>" + f.name + "(<arguments>" + f.value[0].arguments.join(", ") + "</arguments>)</label><br/>"; +c += "<h3>Variables</h3>"; +var d = this.getByType(b, "global"); +for (var e = 0, f; f = d[e]; e++) c += this.presentComment(f.comment), f.group && (c += "<" + f.group + ">" + f.group + "</" + f.group + ">"), c += "<label>" + f.name + "</label> = ", c += this.presentExpression(f.value[0]), c += "<br/>"; +return c; +}, +presentComment: function(a) { +return a ? "<comment>" + this.markupToHtml(a) + "</comment>" : ""; +}, +presentKind: function(a) { +return this.presentKindHeader(a) + this.presentKindSummary(a) + this.presentKindProperties(a); +}, +presentKindHeader: function(a) { +var b = "<kind>" + a.name + "</kind>"; +return a.superkinds.length && (b += '<div style="padding: 4px 0px;">', b += a.name, enyo.forEach(a.superkinds, function(a) { +b += " :: <a href=#" + a + ">" + a + "</a>"; +}), b += "</div>"), b; +}, +presentKindSummary: function(a) { +var b = ""; +return a.comment && (b += "<h3>Summary</h3>" + this.presentComment(a.comment)), b; +}, +presentKindProperties: function(a) { +return this.presentProperties(this.showInherited ? a.allProperties : a.properties, a); +}, +groupFilter: function(a) { +return enyo.filter(a, function(a) { +return a.name[0] !== "_" && (a.group == "public" || this.showProtected && a.group == "protected"); +}, this); +}, +presentProperties: function(a, b) { +var c = this.groupFilter(a), d = ""; +for (var e = 0, f; f = c[e]; e++) d += this.presentProperty(f, b); +return d; +}, +presentProperty: function(a, b) { +var c = "", d = a; +c += '<a name="' + d.name + '"></a>', d.group && (c += "<" + d.group + ">" + d.group + "</" + d.group + ">"); +var e = d.name; +return d.object && b && b != d.object && (e = "<prototype>" + d.object.name + "::</prototype>" + e), c += "<label>" + e + "</label>: ", d.value && d.value[0] && d.value[0].token == "function" ? c += "function(<arguments>" + d.value[0].arguments.join(", ") + "</arguments>)<br/>" : c += this.presentValue(d), c += this.presentComment(d.comment), c += "<hr/>", c; +}, +presentValue: function(a) { +var b, c = a.value; +return !c || !c[0] ? b = a.token : b = this.presentExpression(c[0]), b += "</br>", b; +}, +presentExpression: function(a) { +var b = a; +return b.comment ? this.presentComment(b.comment) : b.type == "block" ? "{<blockquote><br/>" + this.presentBlock(b) + "</blockquote>}" : b.type == "array" ? "[<blockquote>" + this.presentArray(b) + "</blockquote>]" : b.token; +}, +presentBlock: function(a) { +return this.presentProperties(a.properties); +}, +presentArray: function(a) { +var b = "", c = a.properties; +for (var d = 0, e; e = c[d]; d++) b += "<i>" + d + "</i>: " + this.presentExpression(e); +return b; +}, +presentColumns: function(a, b, c) { +var d = this.groupFilter(a), e = ""; +b && (e = b.name + "::"); +var f = c || 4, g = [], h = ""; +for (var i = 0, j = 0, k = 0; p = d[i]; i++) h += '<a href="#' + e + p.name + '">' + p.name + "</a><br/>", ++k == f && (g.push(h), h = "", k = 0); +return h && g.push(h), h = g.length ? "<column>" + g.join("</column><column>") + "</column>" : "", h; +}, +markupToHtml: function(a) { +var b = Presentor.showdown.makeHtml(a || ""); +return b = b.replace(/<pre><code>([\s\S]*?)<\/code><\/pre>/gm, function(a, b) { +return "<pre>" + syntaxHighlight(b) + "</pre>"; +}), b; +}, +statics: { +showdown: new Showdown.converter +} +}); + +// PackagesEditor.js + +enyo.kind({ +name: "PackagesEditor", +kind: "Popup", +classes: "packages-editor", +events: { +onSave: "" +}, +components: [ { +kind: "Repeater", +onSetupItem: "setupItem", +components: [ { +components: [ { +name: "name", +kind: "Input" +}, { +name: "path", +kind: "Input" +}, { +kind: "Button", +content: "Delete", +ontap: "deletePkg" +} ] +} ] +}, { +kind: "Button", +content: "New...", +ontap: "newPkg" +}, { +tag: "hr" +}, { +kind: "Button", +content: "Cancel", +ontap: "hide" +}, { +kind: "Button", +content: "Save", +ontap: "save" +} ], +openWithPackages: function(a) { +this.show(), this.pkgs = a, this.load(); +}, +load: function() { +this.$.repeater.setCount(this.pkgs.length); +}, +setupItem: function(a, b) { +var c = this.pkgs[b.index]; +return b.item.$.name.setValue(c.name), b.item.$.path.setValue(c.path), !0; +}, +newPkg: function() { +this.pkgs.push({ +name: "", +path: "" +}), this.load(); +}, +deletePkg: function(a, b) { +this.pkgs.splice(b.index, 1), this.load(); +}, +save: function() { +var a = []; +for (var b = 0, c; c = this.$.repeater.getClientControls()[b]; b++) { +var d = c.$.name.getValue(), e = c.$.path.getValue(); +d && e && a.push({ +name: d, +path: e +}); +} +this.doSave({ +pkgs: a +}), this.hide(); +} +}); + +// PackageList.js + +enyo.kind({ +name: "PackageList", +components: [ { +kind: "Repeater", +components: [ { +components: [ { +kind: "Checkbox", +onchange: "cbChange" +} ] +} ] +}, { +kind: "PackagesEditor", +modal: !0, +centered: !0, +floating: !0, +onSave: "savePackages" +} ], +events: { +onPackagesChange: "", +onLoaded: "" +}, +handlers: { +onSetupItem: "setupItem" +}, +fetchPackageData: function() { +(new enyo.Ajax({ +url: "manifest.json" +})).response(this, function(a, b) { +this.gotPackageData(b); +}).go(); +}, +gotPackageData: function(a) { +this.pkgs = a, this.$.repeater.setCount(this.pkgs.length), this.doLoaded({ +packages: this.pkgs +}); +}, +loadPackageData: function() { +this.pkgs ? this.gotPackageData(this.pkgs) : this.fetchPackageData(); +}, +savePackageData: function() {}, +setupItem: function(a, b) { +var c = this.pkgs[b.index], d = b.item.$.checkbox; +d.setContent(c.name), d.setChecked(!c.disabled); +}, +cbChange: function(a, b) { +var c = b.index, d = this.pkgs[c]; +d && (d.disabled = !a.getChecked(), this.savePackageData()), this.doPackagesChange({ +pkg: d +}); +} +}); + +// TabPanels.js + +enyo.kind({ +name: "TabPanels", +kind: "FittableRows", +components: [ { +name: "tabs", +kind: "Group", +defaultKind: "Button", +controlClasses: "tab" +}, { +name: "client", +style: "position: relative;", +fit: !0 +} ], +create: function() { +this.inherited(arguments), this.selectTab(0); +}, +addControl: function(a) { +a.isChrome || (a.addClass("enyo-fit"), a.showing = !1, this.$.tabs.createComponent({ +content: a.tabName || a.name, +ontap: "tabTap", +owner: this +})), this.inherited(arguments); +}, +selectTab: function(a) { +this.$.tabs.getControls()[a].setActive(!0); +for (var b = 0, c = this.getClientControls(), d; d = c[b]; b++) d.setShowing(b == a); +}, +tabTap: function(a) { +this.selectTab(a.indexInContainer()); +} +}); + +// SearchBar.js + +enyo.kind({ +name: "SearchBar", +events: { +onSearch: "" +}, +handlers: { +onkeyup: "search", +onchange: "search" +}, +components: [ { +xkind: "InputDecorator", +classes: "enyo-tool-decorator input-decorator", +style: "display: block;", +components: [ { +kind: "Input", +style: "width: 90%;" +}, { +kind: "Image", +src: "assets/search-input-search.png" +} ] +} ], +getValue: function() { +if (this.$.input.hasNode()) return this.$.input.node.value; +}, +search: function() { +this.doSearch({ +searchString: this.getValue() +}); +} +}); + +// App.js + +enyo.kind({ +name: "App", +fit: !0, +kind: "FittableColumns", +components: [ { +kind: "Analyzer", +onIndexReady: "indexReady" +}, { +name: "left", +kind: "TabPanels", +components: [ { +kind: "Scroller", +tabName: "Kinds", +components: [ { +name: "kinds", +allowHtml: !0 +} ] +}, { +kind: "Scroller", +tabName: "Modules", +components: [ { +name: "modules", +allowHtml: !0 +} ] +}, { +kind: "Scroller", +tabName: "Index", +components: [ { +kind: "SearchBar", +onSearch: "search" +}, { +name: "index", +allowHtml: !0 +} ] +}, { +name: "packages", +tabName: "Packages", +kind: "PackageList", +onPackagesChange: "loadPackages", +onLoaded: "packagesLoaded" +} ] +}, { +name: "doc", +kind: "FittableRows", +fit: !0, +components: [ { +name: "scope", +components: [ { +name: "inheritedCb", +kind: "Checkbox", +content: "show inherited", +onchange: "scopeChange" +}, { +name: "accessCb", +kind: "Checkbox", +content: "show protected", +style: "margin-left: 20px;", +onchange: "accessChange" +} ] +}, { +name: "header", +allowHtml: !0 +}, { +name: "tocFrame", +kind: "Scroller", +components: [ { +name: "toc", +allowHtml: !0 +} ] +}, { +name: "bodyFrame", +kind: "Scroller", +fit: !0, +components: [ { +name: "indexBusy", +kind: "Image", +src: "assets/busy.gif", +style: "padding-left: 8px;", +showing: !1 +}, { +name: "body", +allowHtml: !0 +} ] +} ] +} ], +create: function() { +this.inherited(arguments), window.onhashchange = enyo.bind(this, "hashChange"), this.presentor = new Presentor, this.loadPackages(); +}, +loadPackages: function() { +this.index = this.$.analyzer.index = new Indexer, this.$.packages.loadPackageData(); +}, +packagesLoaded: function(a, b) { +var c = []; +return enyo.forEach(b.packages, function(a) { +a.disabled || c.push(a.path); +}), this.walk(c), !0; +}, +walk: function(a) { +this.walking = !0, this.$.indexBusy.show(), this.$.analyzer.walk(a); +}, +indexReady: function() { +this.presentKinds(), this.presentModules(), this.presentIndex(), this.$.indexBusy.hide(), this.walking = !1, this.hashChange(); +}, +indexalize: function(a, b, c) { +var d = a ? enyo.filter(this.index.objects, a, this) : this.index.objects; +d = this.nameFilter(d); +var e = "", f; +for (var g = 0, h; h = d[g]; g++) { +var i = c(h).divider; +i && f != i && (f = i, e += "<divider>" + i + "</divider>"), e += enyo.macroize(b, c(h)); +} +return e; +}, +nameFilter: function(a) { +return enyo.filter(a, function(a) { +return a.name && a.name[0] !== "_"; +}); +}, +presentFilteredIndex: function(a) { +var b = '<a href="#{$link}"><prototype>{$object}</prototype><topic>{$topic}</topic>{$module}</a><br/>', c = function(a) { +return { +link: a.topic || a.name, +topic: a.name, +divider: a.name[0].toUpperCase(), +object: a.object && a.object.name ? a.object.name + "::" : "", +module: !a.object && a.module && a.module.name ? " [" + a.module.name + "]" : "" +}; +}; +this.$.index.setContent(this.indexalize(a, b, c)); +}, +presentIndex: function() { +var a = function(a) { +return a.name !== "published" && (a.group == "public" || a.group == "published"); +}; +this.presentFilteredIndex(a); +}, +presentModules: function() { +var a = function(a) { +return a.type == "module"; +}, b = '<a href="#{$link}"><topic>{$topic}</topic></a><br/>', c = function(a) { +return { +link: a.topic || a.name, +topic: a.name, +divider: a.name[0].toUpperCase() +}; +}; +this.$.modules.setContent(this.indexalize(a, b, c)); +}, +presentKinds: function() { +var a = function(a) { +return a.type == "kind" && a.group == "public"; +}, b = '<a href="#{$link}"><topic>{$topic}</topic></a><br/>', c = function(a) { +return { +link: a.topic || a.name, +topic: a.name, +divider: a.name.split(".")[0] +}; +}; +this.$.kinds.setContent(this.indexalize(a, b, c)); +}, +presentObject: function(a) { +switch (a && a.type) { +case "kind": +this.presentKind(a); +break; +default: +this.$.header.setContent(""), this.$.toc.setContent(""), this.$.doc.reflow(); +var b = ""; +a && (b = this.presentor.presentObject(a)), this.$.body.setContent(b); +} +}, +presentKind: function(a) { +this.$.header.setContent(this.presentor.presentKindHeader(a)); +var b = this.presentor.showInherited ? a.allProperties : a.properties; +b.sort(Indexer.nameCompare); +var c = this.presentor.presentColumns(b, a); +this.$.toc.setContent(c); +var d = this.presentor.presentKindSummary(a), b = this.presentor.presentKindProperties(a); +b && (d += "<h3>Properties</h3>" + b), this.$.body.setContent(d), this.$.doc.reflow(); +}, +presentModule: function(a) { +this.presentObject(a); +}, +moduleTap: function(a) { +this.presentModule(a.object); +}, +objectTap: function(a) { +this.presentObject(a.object); +}, +hashChange: function(a) { +this.selectTopic(this.getHashTopic()); +}, +getHashTopic: function() { +return window.location.hash.slice(1); +}, +selectTopic: function(a) { +this.topic = a; +var b = a.split("::"), c = b.shift(), d = b.shift(), e = this.index.findByName(c) || this.index.findByName("enyo." + c); +this.topicObject != e && (this.presentObject(e), this.topicObject = e, this.$.body.container.setScrollTop(0)); +if (d) { +var f = document.getElementsByName(d)[0]; +f && f.scrollIntoView(!0); +} +}, +scopeChange: function() { +this.presentor.showInherited = this.$.inheritedCb.getValue(), this.topicObject = null, this.selectTopic(this.topic); +}, +accessChange: function() { +this.presentor.showProtected = this.$.accessCb.getValue(), this.topicObject = null, this.selectTopic(this.topic); +}, +search: function(a, b) { +this.setSearchString(b.searchString.toLowerCase()); +}, +setSearchString: function(a) { +var b = function(b) { +return b.name !== "published" && (b.group == "public" || b.group == "published") && b.name.toLowerCase().indexOf(a) >= 0; +}; +this.presentFilteredIndex(b); +} +}); diff --git a/api/build/enyo.css b/api/build/enyo.css new file mode 100644 index 0000000..09985fb --- /dev/null +++ b/api/build/enyo.css @@ -0,0 +1,167 @@ + +/* ../source/dom/dom.css */ + +/* things we always want */ +body { + -webkit-overflow-scrolling: touch; + font-family: 'Helvetica Neue', 'Nimbus Sans L', Arial, sans-serif; +} + +/* for apps */ +.enyo-document-fit { + margin: 0; + height: 100%; + /* note: giving html overflow: auto is odd and was only ever done to avoid duplication + however, android 4.04 sometimes does not hide nodes when their display is set to none + if document is overflow auto. + */ + position: relative; +} + +.enyo-body-fit { + margin: 0; + height: 100%; + /* helps prevent ios page scroll */ + overflow: auto; + position: relative; +} + +/* reset */ + +button { + font-size: inherit; + font-family: inherit; +} + +/* user selection */ + +.enyo-unselectable { + cursor: default; + -webkit-user-select: none; + -moz-user-select: -moz-none; + user-select: none; +} + +.enyo-unselectable::selection, .enyo-unselectable ::selection { + color: transparent; +} + +.enyo-selectable { + cursor: auto; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; +} + +.enyo-selectable::selection, .enyo-selectable ::selection { + background: #3297FD; + color: #FFF; +} + +/* layout */ + +body .enyo-fit { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; +} + +.enyo-clip { + overflow: hidden; +} + +.enyo-border-box { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* compositing */ + +.enyo-composite { + -webkit-transform: translateZ(0); + -moz-transform: translateZ(0); + -ms-transform: translateZ(0); + -o-transform: translateZ(0); + transform: translateZ(0); +} + + +/* ../source/touch/Thumb.css */ + +.enyo-thumb { + position: absolute; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-radius: 4px; + background: #333; + border: 1px solid #666; + opacity: 0.75; + z-index: 1; +} + +.enyo-vthumb { + top: 0; + right: 2px; + width: 4px; +} + +.enyo-hthumb { + left: 0; + bottom: 2px; + height: 4px; +} + + +/* ../source/touch/Scroller.css */ + +.enyo-scroller { + position: relative; +} + +.enyo-fit.enyo-scroller { + position: absolute; +} + +.enyo-touch-scroller { + overflow: hidden; +} + +.enyo-touch-strategy-container { + overflow: hidden; +} + +.enyo-scrollee-fit { + height: 100%; +} + +/* ../source/ui/ui.css */ + +.enyo-inline, .enyo-tool-decorator { + display: inline-block; +} + +.enyo-children-inline > *, .enyo-tool-decorator > * { + display: inline-block; +} + +.enyo-children-middle > *, .enyo-tool-decorator > * { + vertical-align: middle; +} + +.enyo-positioned { + position: relative; +} + +.enyo-fill { + position: relative; + width: 100%; + height: 100%; +} + +.enyo-popup { + position: absolute; + z-index: 10; +} diff --git a/api/build/enyo.js b/api/build/enyo.js new file mode 100644 index 0000000..1a97ce5 --- /dev/null +++ b/api/build/enyo.js @@ -0,0 +1,3506 @@ + +// enyo.js + +(function() { +var a = "enyo.js"; +enyo = window.enyo || {}, enyo.locateScript = function(a) { +var b = document.getElementsByTagName("script"); +for (var c = b.length - 1, d, e, f = a.length; c >= 0 && (d = b[c]); c--) if (!d.located) { +e = d.getAttribute("src") || ""; +if (e.slice(-f) == a) return d.located = !0, { +path: e.slice(0, Math.max(0, e.lastIndexOf("/"))), +node: d +}; +} +}, enyo.args = enyo.args || {}; +var b = enyo.locateScript(a); +if (b) { +enyo.args.root = (enyo.args.root || b.path).replace("/source", ""); +for (var c = 0, d; d = b.node.attributes.item(c); c++) enyo.args[d.nodeName] = d.value; +} +})(); + +// ../../loader.js + +(function() { +enyo = window.enyo || {}, enyo.path = { +paths: {}, +addPath: function(a, b) { +return this.paths[a] = b; +}, +addPaths: function(a) { +if (a) for (var b in a) this.addPath(b, a[b]); +}, +includeTrailingSlash: function(a) { +return a && a.slice(-1) !== "/" ? a + "/" : a; +}, +rewritePattern: /\$([^\/\\]*)(\/)?/g, +rewrite: function(a) { +var b, c = this.includeTrailingSlash, d = this.paths, e = function(a, e) { +return b = !0, c(d[e]) || ""; +}, f = a; +do b = !1, f = f.replace(this.rewritePattern, e); while (b); +return f; +} +}, enyo.loaderFactory = function(a) { +this.machine = a, this.packages = [], this.modules = [], this.sheets = [], this.stack = []; +}, enyo.loaderFactory.prototype = { +packageName: "", +packageFolder: "", +verbose: !1, +loadScript: function(a) { +this.machine.script(a); +}, +loadSheet: function(a) { +this.machine.sheet(a); +}, +loadPackage: function(a) { +this.machine.script(a); +}, +report: function() {}, +load: function() { +this.more({ +index: 0, +depends: arguments || [] +}); +}, +more: function(a) { +if (a && this.continueBlock(a)) return; +var b = this.stack.pop(); +b ? (this.verbose && console.groupEnd("* finish package (" + (b.packageName || "anon") + ")"), this.packageFolder = b.folder, this.packageName = "", this.more(b)) : this.finish(); +}, +finish: function() { +this.packageFolder = "", this.verbose && console.log("-------------- fini"); +}, +continueBlock: function(a) { +while (a.index < a.depends.length) { +var b = a.depends[a.index++]; +if (b) if (typeof b == "string") { +if (this.require(b, a)) return !0; +} else enyo.path.addPaths(b); +} +}, +require: function(a, b) { +var c = enyo.path.rewrite(a), d = this.getPathPrefix(a); +c = d + c; +if (c.slice(-3) == "css") this.verbose && console.log("+ stylesheet: [" + d + "][" + a + "]"), this.requireStylesheet(c); else { +if (c.slice(-2) != "js" || c.slice(-10) == "package.js") return this.requirePackage(c, b), !0; +this.verbose && console.log("+ module: [" + d + "][" + a + "]"), this.requireScript(a, c); +} +}, +getPathPrefix: function(a) { +var b = a.slice(0, 1); +return b != "/" && b != "\\" && b != "$" && a.slice(0, 5) != "http:" ? this.packageFolder : ""; +}, +requireStylesheet: function(a) { +this.sheets.push(a), this.loadSheet(a); +}, +requireScript: function(a, b) { +this.modules.push({ +packageName: this.packageName, +rawPath: a, +path: b +}), this.loadScript(b); +}, +decodePackagePath: function(a) { +var b = "", c = "", d = "", e = "package.js", f = a.replace(/\\/g, "/").replace(/\/\//g, "/").replace(/:\//, "://").split("/"); +if (f.length) { +var g = f.pop() || f.pop() || ""; +g.slice(-e.length) !== e ? f.push(g) : e = g, d = f.join("/"), d = d ? d + "/" : "", e = d + e; +for (var h = f.length - 1; h >= 0; h--) if (f[h] == "source") { +f.splice(h, 1); +break; +} +c = f.join("/"); +for (var h = f.length - 1, i; i = f[h]; h--) if (i == "lib" || i == "enyo") { +f = f.slice(h + 1); +break; +} +for (var h = f.length - 1, i; i = f[h]; h--) (i == ".." || i == ".") && f.splice(h, 1); +b = f.join("-"); +} +return { +alias: b, +target: c, +folder: d, +manifest: e +}; +}, +aliasPackage: function(a) { +var b = this.decodePackagePath(a); +this.manifest = b.manifest, b.alias && (enyo.path.addPath(b.alias, b.target), this.packageName = b.alias, this.packages.push({ +name: b.alias, +folder: b.folder +})), this.packageFolder = b.folder; +}, +requirePackage: function(a, b) { +b.folder = this.packageFolder, this.aliasPackage(a), b.packageName = this.packageName, this.stack.push(b), this.report("loading package", this.packageName), this.verbose && console.group("* start package [" + this.packageName + "]"), this.loadPackage(this.manifest); +} +}; +})(); + +// boot.js + +enyo.machine = { +sheet: function(a) { +document.write('<link href="' + a + '" media="screen" rel="stylesheet" type="text/css" />'); +}, +script: function(a, b, c) { +document.write('<script src="' + a + '"' + (b ? ' onload="' + b + '"' : "") + (c ? ' onerror="' + c + '"' : "") + "></scri" + "pt>"); +}, +inject: function(a) { +document.write('<script type="text/javascript">' + a + "</script>"); +} +}, enyo.loader = new enyo.loaderFactory(enyo.machine), enyo.depends = function() { +var a = enyo.loader; +if (!a.packageFolder) { +var b = enyo.locateScript("package.js"); +b && b.path && (a.aliasPackage(b.path), a.packageFolder = b.path + "/"); +} +a.load.apply(a, arguments); +}, enyo.path.addPaths({ +enyo: enyo.args.root, +lib: "$enyo/../lib" +}); + +// log.js + +enyo.logging = { +level: 99, +levels: { +log: 20, +warn: 10, +error: 0 +}, +shouldLog: function(a) { +var b = parseInt(this.levels[a], 0); +return b <= this.level; +}, +_log: function(a, b) { +var c = enyo.isArray(b) ? b : enyo.cloneArray(b); +enyo.dumbConsole && (c = [ c.join(" ") ]); +var d = console[a]; +d && d.apply ? d.apply(console, c) : console.log.apply ? console.log.apply(console, c) : console.log(c.join(" ")); +}, +log: function(a, b) { +window.console && this.shouldLog(a) && this._log(a, b); +} +}, enyo.setLogLevel = function(a) { +var b = parseInt(a, 0); +isFinite(b) && (enyo.logging.level = b); +}, enyo.log = function() { +enyo.logging.log("log", arguments); +}, enyo.warn = function() { +enyo.logging.log("warn", arguments); +}, enyo.error = function() { +enyo.logging.log("error", arguments); +}; + +// lang.js + +(function() { +enyo.global = this, enyo._getProp = function(a, b, c) { +var d = c || enyo.global; +for (var e = 0, f; d && (f = a[e]); e++) d = f in d ? d[f] : b ? d[f] = {} : undefined; +return d; +}, enyo.setObject = function(a, b, c) { +var d = a.split("."), e = d.pop(), f = enyo._getProp(d, !0, c); +return f && e ? f[e] = b : undefined; +}, enyo.getObject = function(a, b, c) { +return enyo._getProp(a.split("."), b, c); +}, enyo.irand = function(a) { +return Math.floor(Math.random() * a); +}, enyo.cap = function(a) { +return a.slice(0, 1).toUpperCase() + a.slice(1); +}, enyo.uncap = function(a) { +return a.slice(0, 1).toLowerCase() + a.slice(1); +}, enyo.format = function(a) { +var b = /\%./g, c = 0, d = a, e = arguments, f = function(a) { +return e[++c]; +}; +return d.replace(b, f); +}; +var a = Object.prototype.toString; +enyo.isString = function(b) { +return a.call(b) === "[object String]"; +}, enyo.isFunction = function(b) { +return a.call(b) === "[object Function]"; +}, enyo.isArray = Array.isArray || function(b) { +return a.call(b) === "[object Array]"; +}, enyo.indexOf = function(a, b, c) { +if (b.indexOf) return b.indexOf(a, c); +if (c) { +c < 0 && (c = 0); +if (c > b.length) return -1; +} +for (var d = c || 0, e = b.length, f; (f = b[d]) || d < e; d++) if (f == a) return d; +return -1; +}, enyo.remove = function(a, b) { +var c = enyo.indexOf(a, b); +c >= 0 && b.splice(c, 1); +}, enyo.forEach = function(a, b, c) { +if (a) { +var d = c || this; +if (enyo.isArray(a) && a.forEach) a.forEach(b, d); else { +var e = Object(a), f = e.length >>> 0; +for (var g = 0; g < f; g++) g in e && b.call(d, e[g], g, e); +} +} +}, enyo.map = function(a, b, c) { +var d = c || this; +if (enyo.isArray(a) && a.map) return a.map(b, d); +var e = [], f = function(a, c, f) { +e.push(b.call(d, a, c, f)); +}; +return enyo.forEach(a, f, d), e; +}, enyo.filter = function(a, b, c) { +var d = c || this; +if (enyo.isArray(a) && a.filter) return a.filter(b, d); +var e = [], f = function(a, c, f) { +var g = a; +b.call(d, a, c, f) && e.push(g); +}; +return enyo.forEach(a, f, d), e; +}, enyo.keys = Object.keys || function(a) { +var b = [], c = Object.prototype.hasOwnProperty; +for (var d in a) c.call(a, d) && b.push(d); +if (!{ +toString: null +}.propertyIsEnumerable("toString")) { +var e = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ]; +for (var f = 0, g; g = donEnums[f]; f++) c.call(a, g) && b.push(g); +} +return b; +}, enyo.cloneArray = function(a, b, c) { +var d = c || []; +for (var e = b || 0, f = a.length; e < f; e++) d.push(a[e]); +return d; +}, enyo.toArray = enyo.cloneArray, enyo.clone = function(a) { +return enyo.isArray(a) ? enyo.cloneArray(a) : enyo.mixin({}, a); +}; +var b = {}; +enyo.mixin = function(a, c) { +a = a || {}; +if (c) { +var d, e, f; +for (d in c) e = c[d], b[d] !== e && (a[d] = e); +} +return a; +}, enyo.bind = function(a, b) { +b || (b = a, a = null), a = a || enyo.global; +if (enyo.isString(b)) { +if (!a[b]) throw [ 'enyo.bind: scope["', b, '"] is null (scope="', a, '")' ].join(""); +b = a[b]; +} +if (enyo.isFunction(b)) { +var c = enyo.cloneArray(arguments, 2); +return b.bind ? b.bind.apply(b, [ a ].concat(c)) : function() { +var d = enyo.cloneArray(arguments); +return b.apply(a, c.concat(d)); +}; +} +throw [ 'enyo.bind: scope["', b, '"] is not a function (scope="', a, '")' ].join(""); +}, enyo.asyncMethod = function(a, b) { +return setTimeout(enyo.bind.apply(enyo, arguments), 1); +}, enyo.call = function(a, b, c) { +var d = a || this; +if (b) { +var e = d[b] || b; +if (e && e.apply) return e.apply(d, c || []); +} +}, enyo.now = Date.now || function() { +return (new Date).getTime(); +}, enyo.nop = function() {}, enyo.nob = {}, enyo.nar = [], enyo.instance = function() {}, enyo.setPrototype || (enyo.setPrototype = function(a, b) { +a.prototype = b; +}), enyo.delegate = function(a) { +return enyo.setPrototype(enyo.instance, a), new enyo.instance; +}; +})(); + +// job.js + +enyo.job = function(a, b, c) { +enyo.job.stop(a), enyo.job._jobs[a] = setTimeout(function() { +enyo.job.stop(a), b(); +}, c); +}, enyo.job.stop = function(a) { +enyo.job._jobs[a] && (clearTimeout(enyo.job._jobs[a]), delete enyo.job._jobs[a]); +}, enyo.job._jobs = {}; + +// macroize.js + +enyo.macroize = function(a, b, c) { +var d, e, f = a, g = c || enyo.macroize.pattern, h = function(a, c) { +return d = enyo.getObject(c, !1, b), d === undefined || d === null ? "{$" + c + "}" : (e = !0, d); +}, i = 0; +do { +e = !1, f = f.replace(g, h); +if (++i >= 20) throw "enyo.macroize: recursion too deep"; +} while (e); +return f; +}, enyo.quickMacroize = function(a, b, c) { +var d, e, f = a, g = c || enyo.macroize.pattern, h = function(a, c) { +return c in b ? d = b[c] : d = enyo.getObject(c, !1, b), d === undefined || d === null ? "{$" + c + "}" : d; +}; +return f = f.replace(g, h), f; +}, enyo.macroize.pattern = /\{\$([^{}]*)\}/g; + +// animation.js + +(function() { +var a = Math.round(1e3 / 60), b = [ "webkit", "moz", "ms", "o", "" ], c = "requestAnimationFrame", d = "cancel" + enyo.cap(c), e = function(b) { +return window.setTimeout(b, a); +}, f = function(a) { +return window.clearTimeout(a); +}; +for (var g = 0, h = b.length, i, j, k; (i = b[g]) || g < h; g++) { +j = i ? i + enyo.cap(d) : d, k = i ? i + enyo.cap(c) : c; +if (window[j]) { +f = window[j], e = window[k], i == "webkit" && f(e(enyo.nop)); +break; +} +} +enyo.requestAnimationFrame = function(a, b) { +return e(a, b); +}, enyo.cancelRequestAnimationFrame = function(a) { +return f(a); +}; +})(), enyo.easing = { +cubicIn: function(a) { +return Math.pow(a, 3); +}, +cubicOut: function(a) { +return Math.pow(a - 1, 3) + 1; +}, +expoOut: function(a) { +return a == 1 ? 1 : -1 * Math.pow(2, -10 * a) + 1; +}, +quadInOut: function(a) { +return a *= 2, a < 1 ? Math.pow(a, 2) / 2 : -1 * (--a * (a - 2) - 1) / 2; +}, +linear: function(a) { +return a; +} +}, enyo.easedLerp = function(a, b, c) { +var d = (enyo.now() - a) / b; +return d >= 1 ? 1 : c(d); +}; + +// Oop.js + +enyo.kind = function(a) { +enyo._kindCtors = {}; +var b = a.name || ""; +delete a.name; +var c = "kind" in a, d = a.kind; +delete a.kind; +var e = enyo.constructorForKind(d), f = e && e.prototype || null; +if (c && d !== null && e == null) throw "enyo.kind: Attempt to subclass an undefined kind. Check dependencies for [" + b + "]."; +var g = enyo.kind.makeCtor(); +return a.hasOwnProperty("constructor") && (a._constructor = a.constructor, delete a.constructor), enyo.setPrototype(g, f ? enyo.delegate(f) : {}), enyo.mixin(g.prototype, a), g.prototype.kindName = b, g.prototype.base = e, g.prototype.ctor = g, enyo.forEach(enyo.kind.features, function(b) { +b(g, a); +}), enyo.setObject(b, g), g; +}, enyo.kind.makeCtor = function() { +return function() { +var a; +this._constructor && (a = this._constructor.apply(this, arguments)), this.constructed && this.constructed.apply(this, arguments); +if (a) return a; +}; +}, enyo.kind.defaultNamespace = "enyo", enyo.kind.features = [], enyo.kind.features.push(function(a, b) { +var c = a.prototype; +c.inherited || (c.inherited = enyo.kind.inherited); +if (c.base) for (var d in b) { +var e = b[d]; +enyo.isFunction(e) && (e._inherited = c.base.prototype[d] || enyo.nop, e.nom = c.kindName + "." + d + "()"); +} +}), enyo.kind.inherited = function(a, b) { +return a.callee._inherited.apply(this, b || a); +}, enyo.kind.features.push(function(a, b) { +enyo.mixin(a, enyo.kind.statics), b.statics && (enyo.mixin(a, b.statics), delete a.prototype.statics); +var c = a.prototype.base; +while (c) c.subclass(a, b), c = c.prototype.base; +}), enyo.kind.statics = { +subclass: function(a, b) {}, +extend: function(a) { +enyo.mixin(this.prototype, a); +var b = this; +enyo.forEach(enyo.kind.features, function(c) { +c(b, a); +}); +} +}, enyo._kindCtors = {}, enyo.constructorForKind = function(a) { +if (a === null || enyo.isFunction(a)) return a; +if (a) { +var b = enyo._kindCtors[a]; +return b ? b : enyo._kindCtors[a] = enyo.Theme[a] || enyo[a] || enyo.getObject(a, !1, enyo) || window[a] || enyo.getObject(a); +} +return enyo.defaultCtor; +}, enyo.Theme = {}, enyo.registerTheme = function(a) { +enyo.mixin(enyo.Theme, a); +}; + +// Object.js + +enyo.kind({ +name: "enyo.Object", +kind: null, +constructor: function() { +enyo._objectCount++; +}, +setPropertyValue: function(a, b, c) { +if (this[c]) { +var d = this[a]; +this[a] = b, this[c](d); +} else this[a] = b; +}, +_setProperty: function(a, b, c) { +this.setPropertyValue(a, b, this.getProperty(a) !== b && c); +}, +destroyObject: function(a) { +this[a] && this[a].destroy && this[a].destroy(), this[a] = null; +}, +getProperty: function(a) { +var b = "get" + enyo.cap(a); +return this[b] ? this[b]() : this[a]; +}, +setProperty: function(a, b) { +var c = "set" + enyo.cap(a); +this[c] ? this[c](b) : this._setProperty(a, b, a + "Changed"); +}, +log: function() { +var a = arguments.callee.caller, b = ((a ? a.nom : "") || "(instance method)") + ":"; +enyo.logging.log("log", [ b ].concat(enyo.cloneArray(arguments))); +}, +warn: function() { +this._log("warn", arguments); +}, +error: function() { +this._log("error", arguments); +}, +_log: function(a, b) { +if (enyo.logging.shouldLog(a)) try { +throw new Error; +} catch (c) { +enyo.logging._log(a, [ b.callee.caller.nom + ": " ].concat(enyo.cloneArray(b))), console.log(c.stack); +} +} +}), enyo._objectCount = 0, enyo.Object.subclass = function(a, b) { +this.publish(a, b); +}, enyo.Object.publish = function(a, b) { +var c = b.published; +if (c) { +var d = a.prototype; +for (var e in c) enyo.Object.addGetterSetter(e, c[e], d); +} +}, enyo.Object.addGetterSetter = function(a, b, c) { +var d = a; +c[d] = b; +var e = enyo.cap(d), f = "get" + e; +c[f] || (c[f] = function() { +return this[d]; +}); +var g = "set" + e, h = d + "Changed"; +c[g] || (c[g] = function(a) { +this._setProperty(d, a, h); +}); +}; + +// Component.js + +enyo.kind({ +name: "enyo.Component", +kind: enyo.Object, +published: { +name: "", +id: "", +owner: null +}, +statics: { +_kindPrefixi: {} +}, +defaultKind: "Component", +handlers: {}, +toString: function() { +return this.kindName; +}, +constructor: function() { +this._componentNameMap = {}, this.$ = {}, this.inherited(arguments); +}, +constructed: function(a) { +this.importProps(a), this.create(); +}, +importProps: function(a) { +if (a) for (var b in a) this[b] = a[b]; +this.handlers = enyo.mixin(enyo.clone(this.kindHandlers), this.handlers); +}, +create: function() { +this.ownerChanged(), this.initComponents(); +}, +initComponents: function() { +this.createChrome(this.kindComponents), this.createClientComponents(this.components); +}, +createChrome: function(a) { +this.createComponents(a, { +isChrome: !0 +}); +}, +createClientComponents: function(a) { +this.createComponents(a, { +owner: this.getInstanceOwner() +}); +}, +getInstanceOwner: function() { +return !this.owner || this.owner.notInstanceOwner ? this : this.owner; +}, +destroy: function() { +this.destroyComponents(), this.setOwner(null), this.destroyed = !0; +}, +destroyComponents: function() { +enyo.forEach(this.getComponents(), function(a) { +a.destroyed || a.destroy(); +}); +}, +makeId: function() { +var a = "_", b = this.owner && this.owner.getId(); +return this.name ? (b ? b + a : "") + this.name : ""; +}, +ownerChanged: function(a) { +a && a.removeComponent(this), this.owner && this.owner.addComponent(this), this.id || (this.id = this.makeId()); +}, +nameComponent: function(a) { +var b = enyo.Component.prefixFromKindName(a.kindName), c, d = this._componentNameMap[b] || 0; +do c = b + (++d > 1 ? String(d) : ""); while (this.$[c]); +return this._componentNameMap[b] = Number(d), a.name = c; +}, +addComponent: function(a) { +var b = a.getName(); +b || (b = this.nameComponent(a)), this.$[b] && this.warn('Duplicate component name "' + b + '" in owner "' + this.id + '" violates unique-name-under-owner rule, replacing existing component in the hash and continuing, but this is an error condition and should be fixed.'), this.$[b] = a; +}, +removeComponent: function(a) { +delete this.$[a.getName()]; +}, +getComponents: function() { +var a = []; +for (var b in this.$) a.push(this.$[b]); +return a; +}, +adjustComponentProps: function(a) { +this.defaultProps && enyo.mixin(a, this.defaultProps), a.kind = a.kind || a.isa || this.defaultKind, a.owner = a.owner || this; +}, +_createComponent: function(a, b) { +var c = enyo.mixin(enyo.clone(b), a); +return this.adjustComponentProps(c), enyo.Component.create(c); +}, +createComponent: function(a, b) { +return this._createComponent(a, b); +}, +createComponents: function(a, b) { +if (a) { +var c = []; +for (var d = 0, e; e = a[d]; d++) c.push(this._createComponent(e, b)); +return c; +} +}, +getBubbleTarget: function() { +return this.owner; +}, +bubble: function(a, b, c) { +var d = b || {}; +return "originator" in d || (d.originator = c || this), this.dispatchBubble(a, d, c); +}, +dispatchBubble: function(a, b, c) { +return this.dispatchEvent(a, b, c) ? !0 : this.bubbleUp(a, b, c); +}, +bubbleUp: function(a, b, c) { +var d = this.getBubbleTarget(); +return d ? d.dispatchBubble(a, b, this) : !1; +}, +dispatchEvent: function(a, b, c) { +this.decorateEvent(a, b, c); +if (this.handlers[a] && this.dispatch(this.handlers[a], b, c)) return !0; +if (this[a]) return this.bubbleDelegation(this.owner, this[a], a, b, this); +}, +decorateEvent: function(a, b, c) {}, +bubbleDelegation: function(a, b, c, d, e) { +var f = this.getBubbleTarget(); +if (f) return f.delegateEvent(a, b, c, d, e); +}, +delegateEvent: function(a, b, c, d, e) { +return this.decorateEvent(c, d, e), a == this ? this.dispatch(b, d, e) : this.bubbleDelegation(a, b, c, d, e); +}, +dispatch: function(a, b, c) { +var d = a && this[a]; +if (d) return d.call(this, c || this, b); +}, +waterfall: function(a, b, c) { +if (this.dispatchEvent(a, b, c)) return !0; +this.waterfallDown(a, b, c || this); +}, +waterfallDown: function(a, b, c) { +for (var d in this.$) this.$[d].waterfall(a, b, c); +} +}), enyo.defaultCtor = enyo.Component, enyo.create = enyo.Component.create = function(a) { +if (!a.kind && "kind" in a) throw "enyo.create: Attempt to create a null kind. Check dependencies."; +var b = a.kind || a.isa || enyo.defaultCtor, c = enyo.constructorForKind(b); +return c || (console.error('no constructor found for kind "' + b + '"'), c = enyo.Component), new c(a); +}, enyo.Component.subclass = function(a, b) { +var c = a.prototype; +b.components && (c.kindComponents = b.components, delete c.components); +if (b.handlers) { +var d = c.kindHandlers; +c.kindHandlers = enyo.mixin(enyo.clone(d), c.handlers), c.handlers = null; +} +b.events && this.publishEvents(a, b); +}, enyo.Component.publishEvents = function(a, b) { +var c = b.events; +if (c) { +var d = a.prototype; +for (var e in c) this.addEvent(e, c[e], d); +} +}, enyo.Component.addEvent = function(a, b, c) { +var d, e; +enyo.isString(b) ? (a.slice(0, 2) != "on" && (console.warn("enyo.Component.addEvent: event names must start with 'on'. " + c.kindName + " event '" + a + "' was auto-corrected to 'on" + a + "'."), a = "on" + a), d = b, e = "do" + enyo.cap(a.slice(2))) : (d = b.value, e = b.caller), c[a] = d, c[e] || (c[e] = function(b) { +return this.bubble(a, b); +}); +}, enyo.Component.prefixFromKindName = function(a) { +var b = enyo.Component._kindPrefixi[a]; +if (!b) { +var c = a.lastIndexOf("."); +b = c >= 0 ? a.slice(c + 1) : a, b = b.charAt(0).toLowerCase() + b.slice(1), enyo.Component._kindPrefixi[a] = b; +} +return b; +}; + +// UiComponent.js + +enyo.kind({ +name: "enyo.UiComponent", +kind: enyo.Component, +published: { +container: null, +parent: null, +controlParentName: "client", +layoutKind: "" +}, +handlers: { +onresize: "resizeHandler" +}, +create: function() { +this.controls = [], this.children = [], this.containerChanged(), this.inherited(arguments), this.layoutKindChanged(); +}, +destroy: function() { +this.destroyClientControls(), this.setContainer(null), this.inherited(arguments); +}, +importProps: function(a) { +this.inherited(arguments), this.owner || (this.owner = enyo.master); +}, +createComponents: function() { +var a = this.inherited(arguments); +return this.discoverControlParent(), a; +}, +discoverControlParent: function() { +this.controlParent = this.$[this.controlParentName] || this.controlParent; +}, +adjustComponentProps: function(a) { +a.container = a.container || this, this.inherited(arguments); +}, +containerChanged: function(a) { +a && a.removeControl(this), this.container && this.container.addControl(this); +}, +parentChanged: function(a) { +a && a != this.parent && a.removeChild(this); +}, +isDescendantOf: function(a) { +var b = this; +while (b && b != a) b = b.parent; +return a && b == a; +}, +getControls: function() { +return this.controls; +}, +getClientControls: function() { +var a = []; +for (var b = 0, c = this.controls, d; d = c[b]; b++) d.isChrome || a.push(d); +return a; +}, +destroyClientControls: function() { +var a = this.getClientControls(); +for (var b = 0, c; c = a[b]; b++) c.destroy(); +}, +addControl: function(a) { +this.controls.push(a), this.addChild(a); +}, +removeControl: function(a) { +return a.setParent(null), enyo.remove(a, this.controls); +}, +indexOfControl: function(a) { +return enyo.indexOf(a, this.controls); +}, +indexOfClientControl: function(a) { +return enyo.indexOf(a, this.getClientControls()); +}, +indexInContainer: function() { +return this.container.indexOfControl(this); +}, +clientIndexInContainer: function() { +return this.container.indexOfClientControl(this); +}, +controlAtIndex: function(a) { +return this.controls[a]; +}, +addChild: function(a) { +this.controlParent ? this.controlParent.addChild(a) : (a.setParent(this), this.children[this.prepend ? "unshift" : "push"](a)); +}, +removeChild: function(a) { +return enyo.remove(a, this.children); +}, +indexOfChild: function(a) { +return enyo.indexOf(a, this.children); +}, +layoutKindChanged: function() { +this.layout && this.layout.destroy(), this.layout = enyo.createFromKind(this.layoutKind, this), this.generated && this.render(); +}, +flow: function() { +this.layout && this.layout.flow(); +}, +reflow: function() { +this.layout && this.layout.reflow(); +}, +resized: function() { +this.waterfall("onresize"), this.waterfall("onpostresize"); +}, +resizeHandler: function() { +this.reflow(); +}, +waterfallDown: function(a, b, c) { +for (var d in this.$) this.$[d] instanceof enyo.UiComponent || this.$[d].waterfall(a, b, c); +for (var e = 0, f = this.children, g; g = f[e]; e++) g.waterfall(a, b, c); +}, +getBubbleTarget: function() { +return this.parent; +} +}), enyo.createFromKind = function(a, b) { +var c = a && enyo.constructorForKind(a); +if (c) return new c(b); +}, enyo.master = new enyo.Component({ +name: "master", +notInstanceOwner: !0, +getId: function() { +return ""; +}, +isDescendantOf: enyo.nop, +bubble: function(a, b, c) { +a == "onresize" ? (enyo.master.waterfallDown("onresize"), enyo.master.waterfallDown("onpostresize")) : enyo.Signals.send(a, b); +} +}); + +// Layout.js + +enyo.kind({ +name: "enyo.Layout", +kind: null, +layoutClass: "", +constructor: function(a) { +this.container = a, a && a.addClass(this.layoutClass); +}, +destroy: function() { +this.container && this.container.removeClass(this.layoutClass); +}, +flow: function() {}, +reflow: function() {} +}); + +// Signals.js + +enyo.kind({ +name: "enyo.Signals", +kind: enyo.Component, +create: function() { +this.inherited(arguments), enyo.Signals.addListener(this); +}, +destroy: function() { +enyo.Signals.removeListener(this), this.inherited(arguments); +}, +notify: function(a, b) { +this.dispatchEvent(a, b); +}, +statics: { +listeners: [], +addListener: function(a) { +this.listeners.push(a); +}, +removeListener: function(a) { +enyo.remove(a, this.listeners); +}, +send: function(a, b) { +enyo.forEach(this.listeners, function(c) { +c.notify(a, b); +}); +} +} +}); + +// Async.js + +enyo.kind({ +name: "enyo.Async", +kind: enyo.Object, +failed: !1, +context: null, +constructor: function() { +this.responders = [], this.errorHandlers = []; +}, +accumulate: function(a, b) { +var c = b.length < 2 ? b[0] : enyo.bind(b[0], b[1]); +a.push(c); +}, +response: function() { +return this.accumulate(this.responders, arguments), this; +}, +error: function() { +return this.accumulate(this.errorHandlers, arguments), this; +}, +route: function(a, b) { +var c = enyo.bind(this, "respond"); +a.response(function(a, b) { +c(b); +}); +var d = enyo.bind(this, "fail"); +a.error(function(a, b) { +d(b); +}), a.go(b); +}, +handle: function(a, b) { +var c = b.shift(); +if (c) if (c instanceof enyo.Async) this.route(c, a); else { +var d = enyo.call(this.context || this, c, [ this, a ]); +d = d !== undefined ? d : a, (this.failed ? this.fail : this.respond).call(this, d); +} +}, +startTimer: function() { +this.startTime = enyo.now(), this.timeout && (this.timeoutJob = setTimeout(enyo.bind(this, "timeoutComplete"), this.timeout)); +}, +endTimer: function() { +this.timeoutJob && (this.endTime = enyo.now(), clearTimeout(this.timeoutJob), this.timeoutJob = null, this.latency = this.endTime - this.startTime); +}, +timeoutComplete: function() { +this.timedout = !0, this.fail("timeout"); +}, +respond: function(a) { +this.failed = !1, this.endTimer(), this.handle(a, this.responders); +}, +fail: function(a) { +this.failed = !0, this.endTimer(), this.handle(a, this.errorHandlers); +}, +recover: function() { +this.failed = !1; +}, +go: function(a) { +return enyo.asyncMethod(this, function() { +this.respond(a); +}), this; +} +}); + +// json.js + +enyo.json = { +stringify: function(a, b, c) { +return JSON.stringify(a, b, c); +}, +parse: function(a, b) { +return a ? JSON.parse(a, b) : null; +} +}; + +// cookie.js + +enyo.getCookie = function(a) { +var b = document.cookie.match(new RegExp("(?:^|; )" + a + "=([^;]*)")); +return b ? decodeURIComponent(b[1]) : undefined; +}, enyo.setCookie = function(a, b, c) { +var d = a + "=" + encodeURIComponent(b), e = c || {}, f = e.expires; +if (typeof f == "number") { +var g = new Date; +g.setTime(g.getTime() + f * 24 * 60 * 60 * 1e3), f = g; +} +f && f.toUTCString && (e.expires = f.toUTCString()); +var h, i; +for (h in e) d += "; " + h, i = e[h], i !== !0 && (d += "=" + i); +document.cookie = d; +}; + +// xhr.js + +enyo.xhr = { +request: function(a) { +var b = this.getXMLHttpRequest(), c = a.method || "GET", d = "sync" in a ? !a.sync : !0; +a.username ? b.open(c, enyo.path.rewrite(a.url), d, a.username, a.password) : b.open(c, enyo.path.rewrite(a.url), d), enyo.mixin(b, a.xhrFields), this.makeReadyStateHandler(b, a.callback); +if (a.headers) for (var e in a.headers) b.setRequestHeader(e, a.headers[e]); +return b.send(a.body || null), d || b.onreadystatechange(b), b; +}, +makeReadyStateHandler: function(a, b) { +a.onreadystatechange = function() { +a.readyState == 4 && b && b.apply(null, [ a.responseText, a ]); +}; +}, +getXMLHttpRequest: function() { +try { +return new XMLHttpRequest; +} catch (a) {} +try { +return new ActiveXObject("Msxml2.XMLHTTP"); +} catch (a) {} +try { +return new ActiveXObject("Microsoft.XMLHTTP"); +} catch (a) {} +return null; +} +}; + +// AjaxProperties.js + +enyo.AjaxProperties = { +cacheBust: !0, +url: "", +method: "GET", +handleAs: "json", +contentType: "application/x-www-form-urlencoded", +sync: !1, +headers: null, +postBody: "", +username: "", +password: "", +xhrFields: null +}; + +// Ajax.js + +enyo.kind({ +name: "enyo.Ajax", +kind: enyo.Async, +published: enyo.AjaxProperties, +constructor: function(a) { +enyo.mixin(this, a), this.inherited(arguments); +}, +go: function(a) { +return this.startTimer(), this.request(a), this; +}, +request: function(a) { +var b = this.url.split("?"), c = b.shift() || "", d = b.join("?").split("&"), e = enyo.isString(a) ? a : enyo.Ajax.objectToQuery(a); +this.method == "GET" && (e && (d.push(e), e = null), this.cacheBust && d.push(Math.random())); +var f = [ c, d.join("&") ].join("?"), g = { +"Content-Type": this.contentType +}; +enyo.mixin(g, this.headers), this.xhr = enyo.xhr.request({ +url: f, +method: this.method, +callback: enyo.bind(this, "receive"), +body: this.postBody || e, +headers: g, +sync: window.PalmSystem ? !1 : this.sync, +username: this.username, +password: this.password, +xhrFields: this.xhrFields +}); +}, +receive: function(a, b) { +this.destroyed || (this.isFailure(b) ? this.fail(b.status) : this.respond(this.xhrToResponse(b))); +}, +xhrToResponse: function(a) { +if (a) return this[(this.handleAs || "text") + "Handler"](a); +}, +isFailure: function(a) { +return a.status !== 0 && (a.status < 200 || a.status >= 300); +}, +xmlHandler: function(a) { +return a.responseXML; +}, +textHandler: function(a) { +return a.responseText; +}, +jsonHandler: function(a) { +var b = a.responseText; +try { +return b && enyo.json.parse(b); +} catch (c) { +return console.warn("Ajax request set to handleAs JSON but data was not in JSON format"), b; +} +}, +statics: { +objectToQuery: function(a) { +var b = encodeURIComponent, c = [], d = {}; +for (var e in a) { +var f = a[e]; +if (f != d[e]) { +var g = b(e) + "="; +if (enyo.isArray(f)) for (var h = 0; h < f.length; h++) c.push(g + b(f[h])); else c.push(g + b(f)); +} +} +return c.join("&"); +} +} +}); + +// Jsonp.js + +enyo.kind({ +name: "enyo.JsonpRequest", +kind: enyo.Async, +published: { +url: "", +charset: null, +callbackName: "callback", +cacheBust: !0 +}, +statics: { +nextCallbackID: 0 +}, +addScriptElement: function() { +var a = document.createElement("script"); +a.src = this.src, a.async = "async", this.charset && (a.charset = this.charset), a.onerror = enyo.bind(this, function() { +this.fail(400), this.removeScriptElement(); +}); +var b = document.getElementsByTagName("script")[0]; +b.parentNode.insertBefore(a, b), this.scriptTag = a; +}, +removeScriptElement: function() { +var a = this.scriptTag; +this.scriptTag = null, a.onerror = null, a.parentNode && a.parentNode.removeChild(a); +}, +constructor: function(a) { +enyo.mixin(this, a), this.inherited(arguments); +}, +go: function(a) { +return this.startTimer(), this.jsonp(a), this; +}, +jsonp: function(a) { +var b = "enyo_jsonp_callback_" + enyo.JsonpRequest.nextCallbackID++; +this.src = this.buildUrl(a, b), this.addScriptElement(), window[b] = enyo.bind(this, this.respond); +var c = enyo.bind(this, function() { +this.removeScriptElement(), window[b] = null; +}); +this.response(c), this.error(c); +}, +buildUrl: function(a, b) { +var c = this.url.split("?"), d = c.shift() || "", e = c.join("?").split("&"), f = this.bodyArgsFromParams(a, b); +return e.push(f), this.cacheBust && e.push(Math.random()), [ d, e.join("&") ].join("?"); +}, +bodyArgsFromParams: function(a, b) { +if (enyo.isString(a)) return a.replace("=?", "=" + b); +var c = enyo.mixin({}, a); +return c[this.callbackName] = b, enyo.Ajax.objectToQuery(c); +} +}); + +// WebService.js + +enyo.kind({ +name: "enyo._AjaxComponent", +kind: enyo.Component, +published: enyo.AjaxProperties +}), enyo.kind({ +name: "enyo.WebService", +kind: enyo._AjaxComponent, +published: { +jsonp: !1, +callback: "callback", +charset: null +}, +events: { +onResponse: "", +onError: "" +}, +constructor: function(a) { +this.inherited(arguments); +}, +send: function(a) { +return this.jsonp ? this.sendJsonp(a) : this.sendAjax(a); +}, +sendJsonp: function(a) { +var b = new enyo.JsonpRequest; +for (var c in { +url: 1, +callback: 1, +charset: 1 +}) b[c] = this[c]; +return this.sendAsync(b, a); +}, +sendAjax: function(a) { +var b = new enyo.Ajax; +for (var c in enyo.AjaxProperties) b[c] = this[c]; +return this.sendAsync(b, a); +}, +sendAsync: function(a, b) { +return a.go(b).response(this, "response").error(this, "error"); +}, +response: function(a, b) { +this.doResponse({ +ajax: a, +data: b +}); +}, +error: function(a, b) { +this.doError({ +ajax: a, +data: b +}); +} +}); + +// dom.js + +enyo.requiresWindow = function(a) { +a(); +}, enyo.dom = { +byId: function(a, b) { +return typeof a == "string" ? (b || document).getElementById(a) : a; +}, +escape: function(a) { +return a !== null ? String(a).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") : ""; +}, +getComputedStyle: function(a) { +return window.getComputedStyle && a && window.getComputedStyle(a, null); +}, +getComputedStyleValue: function(a, b, c) { +var d = c || this.getComputedStyle(a); +return d ? d.getPropertyValue(b) : null; +}, +getFirstElementByTagName: function(a) { +var b = document.getElementsByTagName(a); +return b && b[0]; +}, +applyBodyFit: function() { +var a = this.getFirstElementByTagName("html"); +a && (a.className += " enyo-document-fit"); +var b = this.getFirstElementByTagName("body"); +b && (b.className += " enyo-body-fit"), enyo.bodyIsFitting = !0; +} +}; + +// transform.js + +(function() { +enyo.dom.calcCanAccelerate = function() { +if (enyo.platform.android <= 2) return !1; +var a = [ "perspective", "WebkitPerspective", "MozPerspective", "msPerspective", "OPerspective" ]; +for (var b = 0, c; c = a[b]; b++) if (typeof document.body.style[c] != "undefined") return !0; +return !1; +}; +var a = [ "transform", "-webkit-transform", "-moz-transform", "-ms-transform", "-o-transform" ], b = [ "transform", "webkitTransform", "MozTransform", "msTransform", "OTransform" ]; +enyo.dom.getCssTransformProp = function() { +if (this._cssTransformProp) return this._cssTransformProp; +var c = enyo.indexOf(this.getStyleTransformProp(), b); +return this._cssTransformProp = a[c]; +}, enyo.dom.getStyleTransformProp = function() { +if (this._styleTransformProp || !document.body) return this._styleTransformProp; +for (var a = 0, c; c = b[a]; a++) if (typeof document.body.style[c] != "undefined") return this._styleTransformProp = c; +}, enyo.dom.domTransformsToCss = function(a) { +var b, c, d = ""; +for (b in a) c = a[b], c !== null && c !== undefined && c !== "" && (d += b + "(" + c + ") "); +return d; +}, enyo.dom.transformsToDom = function(a) { +var b = this.domTransformsToCss(a.domTransforms), c = a.hasNode() ? a.node.style : null, d = a.domStyles, e = this.getStyleTransformProp(), f = this.getCssTransformProp(); +e && f && (d[f] = b, c ? c[e] = b : a.domStylesChanged()); +}, enyo.dom.canTransform = function() { +return Boolean(this.getStyleTransformProp()); +}, enyo.dom.canAccelerate = function() { +return this.accelerando !== undefined ? this.accelerando : document.body && (this.accelerando = this.calcCanAccelerate()); +}, enyo.dom.transform = function(a, b) { +var c = a.domTransforms = a.domTransforms || {}; +enyo.mixin(c, b), this.transformsToDom(a); +}, enyo.dom.transformValue = function(a, b, c) { +var d = a.domTransforms = a.domTransforms || {}; +d[b] = c, this.transformsToDom(a); +}, enyo.dom.accelerate = function(a, b) { +var c = b == "auto" ? this.canAccelerate() : b; +this.transformValue(a, "translateZ", c ? 0 : null); +}; +})(); + +// Control.js + +enyo.kind({ +name: "enyo.Control", +kind: enyo.UiComponent, +published: { +tag: "div", +attributes: null, +classes: "", +style: "", +content: "", +showing: !0, +allowHtml: !1, +src: "", +canGenerate: !0, +fit: !1, +isContainer: !1 +}, +handlers: { +ontap: "tap" +}, +defaultKind: "Control", +controlClasses: "", +node: null, +generated: !1, +create: function() { +this.initStyles(), this.inherited(arguments), this.showingChanged(), this.addClass(this.kindClasses), this.addClass(this.classes), this.initProps([ "id", "content", "src" ]); +}, +destroy: function() { +this.removeNodeFromDom(), this.inherited(arguments); +}, +importProps: function(a) { +this.inherited(arguments), this.attributes = enyo.mixin(enyo.clone(this.kindAttributes), this.attributes); +}, +initProps: function(a) { +for (var b = 0, c, d; c = a[b]; b++) this[c] && (d = c + "Changed", this[d] && this[d]()); +}, +classesChanged: function(a) { +this.removeClass(a), this.addClass(this.classes); +}, +addChild: function(a) { +a.addClass(this.controlClasses), this.inherited(arguments); +}, +removeChild: function(a) { +this.inherited(arguments), a.removeClass(this.controlClasses); +}, +strictlyInternalEvents: { +onenter: 1, +onleave: 1 +}, +dispatchEvent: function(a, b, c) { +return this.strictlyInternalEvents[a] && this.isInternalEvent(b) ? !0 : this.inherited(arguments); +}, +isInternalEvent: function(a) { +var b = enyo.dispatcher.findDispatchTarget(a.relatedTarget); +return b && b.isDescendantOf(this); +}, +hasNode: function() { +return this.generated && (this.node || this.findNodeById()); +}, +addContent: function(a) { +this.setContent(this.content + a); +}, +getAttribute: function(a) { +return this.hasNode() ? this.node.getAttribute(a) : this.attributes[a]; +}, +setAttribute: function(a, b) { +this.attributes[a] = b, this.hasNode() && this.attributeToNode(a, b), this.invalidateTags(); +}, +getNodeProperty: function(a, b) { +return this.hasNode() ? this.node[a] : b; +}, +setNodeProperty: function(a, b) { +this.hasNode() && (this.node[a] = b); +}, +setClassAttribute: function(a) { +this.setAttribute("class", a); +}, +getClassAttribute: function() { +return this.attributes["class"] || ""; +}, +hasClass: function(a) { +return a && (" " + this.getClassAttribute() + " ").indexOf(" " + a + " ") >= 0; +}, +addClass: function(a) { +if (a && !this.hasClass(a)) { +var b = this.getClassAttribute(); +this.setClassAttribute(b + (b ? " " : "") + a); +} +}, +removeClass: function(a) { +if (a && this.hasClass(a)) { +var b = this.getClassAttribute(); +b = (" " + b + " ").replace(" " + a + " ", " ").slice(1, -1), this.setClassAttribute(b); +} +}, +addRemoveClass: function(a, b) { +this[b ? "addClass" : "removeClass"](a); +}, +initStyles: function() { +this.domStyles = this.domStyles || {}, enyo.Control.cssTextToDomStyles(this.kindStyle, this.domStyles), this.domCssText = enyo.Control.domStylesToCssText(this.domStyles); +}, +styleChanged: function() { +this.invalidateTags(), this.renderStyles(); +}, +applyStyle: function(a, b) { +this.domStyles[a] = b, this.domStylesChanged(); +}, +addStyles: function(a) { +enyo.Control.cssTextToDomStyles(a, this.domStyles), this.domStylesChanged(); +}, +getComputedStyleValue: function(a, b) { +return this.hasNode() ? enyo.dom.getComputedStyleValue(this.node, a) : b; +}, +domStylesChanged: function() { +this.domCssText = enyo.Control.domStylesToCssText(this.domStyles), this.invalidateTags(), this.renderStyles(); +}, +stylesToNode: function() { +this.node.style.cssText = this.style + (this.style[this.style.length - 1] == ";" ? " " : "; ") + this.domCssText; +}, +render: function() { +if (this.parent) { +this.parent.beforeChildRender(this); +if (!this.parent.generated) return this; +} +return this.hasNode() || this.renderNode(), this.hasNode() && (this.renderDom(), this.rendered()), this; +}, +renderInto: function(a) { +this.teardownRender(); +var b = enyo.dom.byId(a); +return b == document.body ? this.setupBodyFitting() : this.fit && this.addClass("enyo-fit enyo-clip"), b.innerHTML = this.generateHtml(), this.rendered(), this; +}, +write: function() { +return this.fit && this.setupBodyFitting(), document.write(this.generateHtml()), this.rendered(), this; +}, +setupBodyFitting: function() { +enyo.dom.applyBodyFit(), this.addClass("enyo-fit enyo-clip"); +}, +rendered: function() { +this.reflow(); +for (var a = 0, b; b = this.children[a]; a++) b.rendered(); +}, +show: function() { +this.setShowing(!0); +}, +hide: function() { +this.setShowing(!1); +}, +getBounds: function() { +var a = this.node || this.hasNode() || 0; +return { +left: a.offsetLeft, +top: a.offsetTop, +width: a.offsetWidth, +height: a.offsetHeight +}; +}, +setBounds: function(a, b) { +var c = this.domStyles, d = b || "px", e = [ "width", "height", "left", "top", "right", "bottom" ]; +for (var f = 0, g, h; h = e[f]; f++) { +g = a[h]; +if (g || g === 0) c[h] = g + (enyo.isString(g) ? "" : d); +} +this.domStylesChanged(); +}, +findNodeById: function() { +return this.id && (this.node = enyo.dom.byId(this.id)); +}, +idChanged: function(a) { +a && enyo.Control.unregisterDomEvents(a), this.setAttribute("id", this.id), this.id && enyo.Control.registerDomEvents(this.id, this); +}, +contentChanged: function() { +this.hasNode() && this.renderContent(); +}, +getSrc: function() { +return this.getAttribute("src"); +}, +srcChanged: function() { +this.setAttribute("src", enyo.path.rewrite(this.src)); +}, +attributesChanged: function() { +this.invalidateTags(), this.renderAttributes(); +}, +generateHtml: function() { +if (this.canGenerate === !1) return ""; +var a = this.generateInnerHtml(), b = this.generateOuterHtml(a); +return this.generated = !0, b; +}, +generateInnerHtml: function() { +return this.flow(), this.children.length ? this.generateChildHtml() : this.allowHtml ? this.content : enyo.Control.escapeHtml(this.content); +}, +generateChildHtml: function() { +var a = ""; +for (var b = 0, c; c = this.children[b]; b++) { +var d = c.generateHtml(); +c.prepend ? a = d + a : a += d; +} +return a; +}, +generateOuterHtml: function(a) { +return this.tag ? (this.tagsValid || this.prepareTags(), this._openTag + a + this._closeTag) : a; +}, +invalidateTags: function() { +this.tagsValid = !1; +}, +prepareTags: function() { +var a = this.domCssText + this.style; +this._openTag = "<" + this.tag + (a ? ' style="' + a + '"' : "") + enyo.Control.attributesToHtml(this.attributes), enyo.Control.selfClosing[this.tag] ? (this._openTag += "/>", this._closeTag = "") : (this._openTag += ">", this._closeTag = "</" + this.tag + ">"), this.tagsValid = !0; +}, +attributeToNode: function(a, b) { +b === null || b === !1 || b === "" ? this.node.removeAttribute(a) : this.node.setAttribute(a, b); +}, +attributesToNode: function() { +for (var a in this.attributes) this.attributeToNode(a, this.attributes[a]); +}, +getParentNode: function() { +return this.parentNode || this.parent && this.parent.hasNode(); +}, +addNodeToParent: function() { +if (this.node) { +var a = this.getParentNode(); +a && this[this.prepend ? "insertNodeInParent" : "appendNodeToParent"](a); +} +}, +appendNodeToParent: function(a) { +a.appendChild(this.node); +}, +insertNodeInParent: function(a, b) { +a.insertBefore(this.node, b || a.firstChild); +}, +removeNodeFromDom: function() { +this.hasNode() && this.node.parentNode && this.node.parentNode.removeChild(this.node); +}, +teardownRender: function() { +this.generated && this.teardownChildren(), this.node = null, this.generated = !1; +}, +teardownChildren: function() { +for (var a = 0, b; b = this.children[a]; a++) b.teardownRender(); +}, +renderNode: function() { +this.teardownRender(), this.node = document.createElement(this.tag), this.addNodeToParent(), this.generated = !0; +}, +renderDom: function() { +this.renderAttributes(), this.renderStyles(), this.renderContent(); +}, +renderContent: function() { +this.generated && this.teardownChildren(), this.node.innerHTML = this.generateInnerHtml(); +}, +renderStyles: function() { +this.hasNode() && this.stylesToNode(); +}, +renderAttributes: function() { +this.hasNode() && this.attributesToNode(); +}, +beforeChildRender: function() { +this.generated && this.flow(); +}, +syncDisplayToShowing: function() { +var a = this.domStyles; +this.showing ? a.display == "none" && this.applyStyle("display", this._displayStyle || "") : (this._displayStyle = a.display == "none" ? "" : a.display, this.applyStyle("display", "none")); +}, +showingChanged: function() { +this.syncDisplayToShowing(); +}, +getShowing: function() { +return this.showing = this.domStyles.display != "none"; +}, +fitChanged: function(a) { +this.parent.reflow(); +}, +statics: { +escapeHtml: function(a) { +return a != null ? String(a).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") : ""; +}, +registerDomEvents: function(a, b) { +enyo.$[a] = b; +}, +unregisterDomEvents: function(a) { +enyo.$[a] = null; +}, +selfClosing: { +img: 1, +hr: 1, +br: 1, +area: 1, +base: 1, +basefont: 1, +input: 1, +link: 1, +meta: 1, +command: 1, +embed: 1, +keygen: 1, +wbr: 1, +param: 1, +source: 1, +track: 1, +col: 1 +}, +cssTextToDomStyles: function(a, b) { +if (a) { +var c = a.replace(/; /g, ";").split(";"); +for (var d = 0, e, f, g, h; h = c[d]; d++) e = h.split(":"), f = e.shift(), g = e.join(":"), b[f] = g; +} +}, +domStylesToCssText: function(a) { +var b, c, d = ""; +for (b in a) c = a[b], c !== null && c !== undefined && c !== "" && (d += b + ":" + c + ";"); +return d; +}, +stylesToHtml: function(a) { +var b = enyo.Control.domStylesToCssText(a); +return b ? ' style="' + b + '"' : ""; +}, +escapeAttribute: function(a) { +return enyo.isString(a) ? String(a).replace(/&/g, "&").replace(/\"/g, """) : a; +}, +attributesToHtml: function(a) { +var b, c, d = ""; +for (b in a) c = a[b], c !== null && c !== !1 && c !== "" && (d += " " + b + '="' + enyo.Control.escapeAttribute(c) + '"'); +return d; +} +} +}), enyo.defaultCtor = enyo.Control, enyo.Control.subclass = function(a, b) { +var c = a.prototype; +if (c.classes) { +var d = c.kindClasses; +c.kindClasses = (d ? d + " " : "") + c.classes, c.classes = ""; +} +if (c.style) { +var e = c.kindStyle; +c.kindStyle = (e ? e + ";" : "") + c.style, c.style = ""; +} +if (b.attributes) { +var f = c.kindAttributes; +c.kindAttributes = enyo.mixin(enyo.clone(f), c.attributes), c.attributes = null; +} +}; + +// platform.js + +enyo.platform = { +touch: Boolean("ontouchstart" in window || window.navigator.msPointerEnabled), +gesture: Boolean("ongesturestart" in window || window.navigator.msPointerEnabled) +}, function() { +var a = navigator.userAgent, b = enyo.platform, c = [ { +platform: "android", +regex: /Android (\d+)/ +}, { +platform: "android", +regex: /Silk\//, +forceVersion: 2 +}, { +platform: "ie", +regex: /MSIE (\d+)/ +}, { +platform: "ios", +regex: /iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/ +}, { +platform: "webos", +regex: /(?:web|hpw)OS\/(\d+)/ +} ]; +for (var d = 0, e, f, g; e = c[d]; d++) { +f = e.regex.exec(a); +if (f) { +e.forceVersion ? g = e.forceVersion : g = Number(f[1]), b[e.platform] = g; +break; +} +} +enyo.dumbConsole = Boolean(b.android || b.ios || b.webos); +}(); + +// phonegap.js + +(function() { +if (window.cordova || window.PhoneGap) { +var a = [ "deviceready", "pause", "resume", "online", "offline", "backbutton", "batterycritical", "batterylow", "batterystatus", "menubutton", "searchbutton", "startcallbutton", "endcallbutton", "volumedownbutton", "volumeupbutton" ]; +for (var b = 0, c; c = a[b]; b++) document.addEventListener(c, enyo.bind(enyo.Signals, "send", "on" + c), !1); +} +})(); + +// dispatcher.js + +enyo.$ = {}, enyo.dispatcher = { +events: [ "mousedown", "mouseup", "mouseover", "mouseout", "mousemove", "mousewheel", "click", "dblclick", "change", "keydown", "keyup", "keypress", "input" ], +windowEvents: [ "resize", "load", "unload", "message" ], +features: [], +connect: function() { +var a = enyo.dispatcher; +for (var b = 0, c; c = a.events[b]; b++) a.listen(document, c); +for (b = 0, c; c = a.windowEvents[b]; b++) a.listen(window, c); +}, +listen: function(a, b) { +var c = enyo.dispatch; +a.addEventListener ? this.listen = function(a, b) { +a.addEventListener(b, c, !1); +} : this.listen = function(a, b, e) { +a.attachEvent("on" + b, function(a) { +return a.target = a.srcElement, a.preventDefault || (a.preventDefault = enyo.iePreventDefault), c(a); +}); +}, this.listen(a, b); +}, +dispatch: function(a) { +var b = this.findDispatchTarget(a.target) || this.findDefaultTarget(a); +a.dispatchTarget = b; +for (var c = 0, d; d = this.features[c]; c++) if (d.call(this, a) === !0) return; +b && !a.preventDispatch && this.dispatchBubble(a, b); +}, +findDispatchTarget: function(a) { +var b, c = a; +try { +while (c) { +if (b = enyo.$[c.id]) { +b.eventNode = c; +break; +} +c = c.parentNode; +} +} catch (d) { +console.log(d, c); +} +return b; +}, +findDefaultTarget: function(a) { +return enyo.master; +}, +dispatchBubble: function(a, b) { +return b.bubble("on" + a.type, a, b); +} +}, enyo.iePreventDefault = function() { +this.returnValue = !1; +}, enyo.dispatch = function(a) { +return enyo.dispatcher.dispatch(a); +}, enyo.bubble = function(a) { +var b = a || window.event; +b && (b.target || (b.target = b.srcElement), enyo.dispatch(b)); +}, enyo.bubbler = "enyo.bubble(arguments[0])", enyo.requiresWindow(enyo.dispatcher.connect); + +// preview.js + +(function() { +var a = "previewDomEvent", b = { +feature: function(a) { +b.dispatch(a, a.dispatchTarget); +}, +dispatch: function(b, c) { +var d = this.buildLineage(c); +for (var e = 0, f; f = d[e]; e++) if (f[a] && f[a](b) === !0) { +b.preventDispatch = !0; +return; +} +}, +buildLineage: function(a) { +var b = [], c = a; +while (c) b.unshift(c), c = c.parent; +return b; +} +}; +enyo.dispatcher.features.push(b.feature); +})(); + +// modal.js + +enyo.dispatcher.features.push(function(a) { +var b = a.dispatchTarget, c = this.captureTarget && !this.noCaptureEvents[a.type], d = c && !(b && b.isDescendantOf && b.isDescendantOf(this.captureTarget)); +if (d) { +var e = a.captureTarget = this.captureTarget, f = this.autoForwardEvents[a.type] || this.forwardEvents; +this.dispatchBubble(a, e), f || (a.preventDispatch = !0); +} +}), enyo.mixin(enyo.dispatcher, { +noCaptureEvents: { +load: 1, +unload: 1, +error: 1 +}, +autoForwardEvents: { +leave: 1, +resize: 1 +}, +captures: [], +capture: function(a, b) { +var c = { +target: a, +forward: b +}; +this.captures.push(c), this.setCaptureInfo(c); +}, +release: function() { +this.captures.pop(), this.setCaptureInfo(this.captures[this.captures.length - 1]); +}, +setCaptureInfo: function(a) { +this.captureTarget = a && a.target, this.forwardEvents = a && a.forward; +} +}); + +// gesture.js + +enyo.gesture = { +eventProps: [ "target", "relatedTarget", "clientX", "clientY", "pageX", "pageY", "screenX", "screenY", "altKey", "ctrlKey", "metaKey", "shiftKey", "detail", "identifier", "dispatchTarget", "which", "srcEvent" ], +makeEvent: function(a, b) { +var c = { +type: a +}; +for (var d = 0, e; e = this.eventProps[d]; d++) c[e] = b[e]; +c.srcEvent = c.srcEvent || b, c.preventDefault = this.preventDefault, c.disablePrevention = this.disablePrevention; +if (enyo.platform.ie) { +var f = window.event && window.event.button; +c.which = f & 1 ? 1 : f & 2 ? 2 : f & 4 ? 3 : 0; +} +return c; +}, +down: function(a) { +var b = this.makeEvent("down", a); +enyo.dispatch(b), this.downEvent = b; +}, +move: function(a) { +var b = this.makeEvent("move", a); +b.dx = b.dy = b.horizontal = b.vertical = 0, b.which && this.downEvent && (b.dx = a.clientX - this.downEvent.clientX, b.dy = a.clientY - this.downEvent.clientY, b.horizontal = Math.abs(b.dx) > Math.abs(b.dy), b.vertical = !b.horizontal), enyo.dispatch(b); +}, +up: function(a) { +var b = this.makeEvent("up", a), c = !1; +b.preventTap = function() { +c = !0; +}, enyo.dispatch(b), !c && this.downEvent && this.downEvent.which == 1 && this.sendTap(b), this.downEvent = null; +}, +over: function(a) { +enyo.dispatch(this.makeEvent("enter", a)); +}, +out: function(a) { +enyo.dispatch(this.makeEvent("leave", a)); +}, +sendTap: function(a) { +var b = this.findCommonAncestor(this.downEvent.target, a.target); +if (b) { +var c = this.makeEvent("tap", a); +c.target = b, enyo.dispatch(c); +} +}, +findCommonAncestor: function(a, b) { +var c = b; +while (c) { +if (this.isTargetDescendantOf(a, c)) return c; +c = c.parentNode; +} +}, +isTargetDescendantOf: function(a, b) { +var c = a; +while (c) { +if (c == b) return !0; +c = c.parentNode; +} +} +}, enyo.gesture.preventDefault = function() { +this.srcEvent && this.srcEvent.preventDefault(); +}, enyo.gesture.disablePrevention = function() { +this.preventDefault = enyo.nop, this.srcEvent && (this.srcEvent.preventDefault = enyo.nop); +}, enyo.dispatcher.features.push(function(a) { +if (enyo.gesture.events[a.type]) return enyo.gesture.events[a.type](a); +}), enyo.gesture.events = { +mousedown: function(a) { +enyo.gesture.down(a); +}, +mouseup: function(a) { +enyo.gesture.up(a); +}, +mousemove: function(a) { +enyo.gesture.move(a); +}, +mouseover: function(a) { +enyo.gesture.over(a); +}, +mouseout: function(a) { +enyo.gesture.out(a); +} +}, enyo.requiresWindow(function() { +document.addEventListener && document.addEventListener("DOMMouseScroll", function(a) { +var b = enyo.clone(a); +b.preventDefault = function() { +a.preventDefault(); +}, b.type = "mousewheel"; +var c = b.VERTICAL_AXIS == b.axis ? "wheelDeltaY" : "wheelDeltaX"; +b[c] = b.detail * -12, enyo.dispatch(b); +}, !1); +}); + +// drag.js + +enyo.dispatcher.features.push(function(a) { +if (enyo.gesture.drag[a.type]) return enyo.gesture.drag[a.type](a); +}), enyo.gesture.drag = { +hysteresisSquared: 16, +holdPulseDelay: 200, +trackCount: 5, +minFlick: .1, +minTrack: 8, +down: function(a) { +this.stopDragging(a), this.cancelHold(), this.target = a.target, this.startTracking(a), this.beginHold(a); +}, +move: function(a) { +if (this.tracking) { +this.track(a); +if (!a.which) { +this.stopDragging(a), this.tracking = !1; +return; +} +this.dragEvent ? this.sendDrag(a) : this.dy * this.dy + this.dx * this.dx >= this.hysteresisSquared && (this.sendDragStart(a), this.cancelHold()); +} +}, +up: function(a) { +this.endTracking(a), this.stopDragging(a), this.cancelHold(); +}, +leave: function(a) { +this.dragEvent && this.sendDragOut(a); +}, +stopDragging: function(a) { +if (this.dragEvent) { +this.sendDrop(a); +var b = this.sendDragFinish(a); +return this.dragEvent = null, b; +} +}, +makeDragEvent: function(a, b, c, d) { +var e = Math.abs(this.dx), f = Math.abs(this.dy), g = e > f, h = (g ? f / e : e / f) < .414, i = { +type: a, +dx: this.dx, +dy: this.dy, +ddx: this.dx - this.lastDx, +ddy: this.dy - this.lastDy, +xDirection: this.xDirection, +yDirection: this.yDirection, +pageX: c.pageX, +pageY: c.pageY, +clientX: c.clientX, +clientY: c.clientY, +horizontal: g, +vertical: !g, +lockable: h, +target: b, +dragInfo: d, +ctrlKey: c.ctrlKey, +altKey: c.altKey, +metaKey: c.metaKey, +shiftKey: c.shiftKey, +srcEvent: c.srcEvent +}; +return i.preventDefault = enyo.gesture.preventDefault, i.disablePrevention = enyo.gesture.disablePrevention, i; +}, +sendDragStart: function(a) { +this.dragEvent = this.makeDragEvent("dragstart", this.target, a), enyo.dispatch(this.dragEvent); +}, +sendDrag: function(a) { +var b = this.makeDragEvent("dragover", a.target, a, this.dragEvent.dragInfo); +enyo.dispatch(b), b.type = "drag", b.target = this.dragEvent.target, enyo.dispatch(b); +}, +sendDragFinish: function(a) { +var b = this.makeDragEvent("dragfinish", this.dragEvent.target, a, this.dragEvent.dragInfo); +b.preventTap = function() { +a.preventTap && a.preventTap(); +}, enyo.dispatch(b); +}, +sendDragOut: function(a) { +var b = this.makeDragEvent("dragout", a.target, a, this.dragEvent.dragInfo); +enyo.dispatch(b); +}, +sendDrop: function(a) { +var b = this.makeDragEvent("drop", a.target, a, this.dragEvent.dragInfo); +b.preventTap = function() { +a.preventTap && a.preventTap(); +}, enyo.dispatch(b); +}, +startTracking: function(a) { +this.tracking = !0, this.px0 = a.clientX, this.py0 = a.clientY, this.flickInfo = { +startEvent: a, +moves: [] +}, this.track(a); +}, +track: function(a) { +this.lastDx = this.dx, this.lastDy = this.dy, this.dx = a.clientX - this.px0, this.dy = a.clientY - this.py0, this.xDirection = this.calcDirection(this.dx - this.lastDx, 0), this.yDirection = this.calcDirection(this.dy - this.lastDy, 0); +var b = this.flickInfo; +b.moves.push({ +x: a.clientX, +y: a.clientY, +t: enyo.now() +}), b.moves.length > this.trackCount && b.moves.shift(); +}, +endTracking: function(a) { +this.tracking = !1; +var b = this.flickInfo, c = b && b.moves; +if (c && c.length > 1) { +var d = c[c.length - 1], e = enyo.now(); +for (var f = c.length - 2, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, m = 0, n; n = c[f]; f--) { +g = e - n.t, h = (d.x - n.x) / g, i = (d.y - n.y) / g, l = l || (h < 0 ? -1 : h > 0 ? 1 : 0), m = m || (i < 0 ? -1 : i > 0 ? 1 : 0); +if (h * l > j * l || i * m > k * m) j = h, k = i; +} +var o = Math.sqrt(j * j + k * k); +o > this.minFlick && this.sendFlick(b.startEvent, j, k, o); +} +this.flickInfo = null; +}, +calcDirection: function(a, b) { +return a > 0 ? 1 : a < 0 ? -1 : b; +}, +beginHold: function(a) { +this.holdStart = enyo.now(), this.holdJob = setInterval(enyo.bind(this, "sendHoldPulse", a), this.holdPulseDelay); +}, +cancelHold: function() { +clearInterval(this.holdJob), this.holdJob = null, this.sentHold && (this.sentHold = !1, this.sendRelease(this.holdEvent)); +}, +sendHoldPulse: function(a) { +this.sentHold || (this.sentHold = !0, this.sendHold(a)); +var b = enyo.gesture.makeEvent("holdpulse", a); +b.holdTime = enyo.now() - this.holdStart, enyo.dispatch(b); +}, +sendHold: function(a) { +this.holdEvent = a; +var b = enyo.gesture.makeEvent("hold", a); +enyo.dispatch(b); +}, +sendRelease: function(a) { +var b = enyo.gesture.makeEvent("release", a); +enyo.dispatch(b); +}, +sendFlick: function(a, b, c, d) { +var e = enyo.gesture.makeEvent("flick", a); +e.xVelocity = b, e.yVelocity = c, e.velocity = d, enyo.dispatch(e); +} +}; + +// touch.js + +enyo.requiresWindow(function() { +var a = enyo.gesture; +a.events.touchstart = function(c) { +a.events = b, a.events.touchstart(c); +}; +var b = { +touchstart: function(b) { +this.excludedTarget = null; +var c = this.makeEvent(b); +a.down(c), c = this.makeEvent(b), this.overEvent = c, a.over(c); +}, +touchmove: function(b) { +var c = a.drag.dragEvent; +this.excludedTarget = c && c.dragInfo && c.dragInfo.node; +var d = this.makeEvent(b); +a.move(d), enyo.bodyIsFitting && b.preventDefault(), this.overEvent && this.overEvent.target != d.target && (this.overEvent.relatedTarget = d.target, d.relatedTarget = this.overEvent.target, a.out(this.overEvent), a.over(d)), this.overEvent = d; +}, +touchend: function(b) { +a.up(this.makeEvent(b)), a.out(this.overEvent); +}, +makeEvent: function(a) { +var b = enyo.clone(a.changedTouches[0]); +return b.srcEvent = a, b.target = this.findTarget(b.clientX, b.clientY), b.which = 1, b; +}, +calcNodeOffset: function(a) { +if (a.getBoundingClientRect) { +var b = a.getBoundingClientRect(); +return { +left: b.left, +top: b.top, +width: b.width, +height: b.height +}; +} +}, +findTarget: function(a, b) { +return document.elementFromPoint(a, b); +}, +findTargetTraverse: function(a, b, c) { +var d = a || document.body, e = this.calcNodeOffset(d); +if (e && d != this.excludedTarget) { +var f = b - e.left, g = c - e.top; +if (f > 0 && g > 0 && f <= e.width && g <= e.height) { +var h; +for (var i = d.childNodes, j = i.length - 1, k; k = i[j]; j--) { +h = this.findTargetTraverse(k, b, c); +if (h) return h; +} +return d; +} +} +}, +connect: function() { +enyo.forEach([ "ontouchstart", "ontouchmove", "ontouchend", "ongesturestart", "ongesturechange", "ongestureend" ], function(a) { +document[a] = enyo.dispatch; +}), document.elementFromPoint || (this.findTarget = function(a, b) { +return this.findTargetTraverse(null, a, b); +}); +} +}; +b.connect(); +}); + +// msevents.js + +(function() { +if (window.navigator.msPointerEnabled) { +var a = [ "MSPointerDown", "MSPointerUp", "MSPointerMove", "MSPointerOver", "MSPointerOut", "MSPointerCancel", "MSGestureTap", "MSGestureDoubleTap", "MSGestureHold", "MSGestureStart", "MSGestureChange", "MSGestureEnd" ]; +enyo.forEach(a, function(a) { +enyo.dispatcher.listen(document, a); +}), enyo.dispatcher.features.push(function(a) { +c[a.type] && c[a.type](a); +}); +} +var b = function(a, b) { +var c = enyo.clone(b); +return enyo.mixin(c, { +pageX: b.translationX || 0, +pageY: b.translationY || 0, +rotation: b.rotation * (180 / Math.PI) || 0, +type: a, +srcEvent: b, +preventDefault: enyo.gesture.preventDefault, +disablePrevention: enyo.gesture.disablePrevention +}); +}, c = { +MSGestureStart: function(a) { +enyo.dispatch(b("gesturestart", a)); +}, +MSGestureChange: function(a) { +enyo.dispatch(b("gesturechange", a)); +}, +MSGestureEnd: function(a) { +enyo.dispatch(b("gestureend", a)); +} +}; +})(); + +// gesture.js + +(function() { +!enyo.platform.gesture && enyo.platform.touch && enyo.dispatcher.features.push(function(c) { +a[c.type] && b[c.type](c); +}); +var a = { +touchstart: !0, +touchmove: !0, +touchend: !0 +}, b = { +orderedTouches: [], +gesture: null, +touchstart: function(a) { +enyo.forEach(a.changedTouches, function(a) { +var b = a.identifier; +enyo.indexOf(b, this.orderedTouches) < 0 && this.orderedTouches.push(b); +}, this); +if (a.touches.length >= 2 && !this.gesture) { +var b = this.gesturePositions(a); +this.gesture = this.gestureVector(b), this.gesture.angle = this.gestureAngle(b), this.gesture.scale = 1, this.gesture.rotation = 0; +var c = this.makeGesture("gesturestart", a, { +vector: this.gesture, +scale: 1, +rotation: 0 +}); +enyo.dispatch(c); +} +}, +touchend: function(a) { +enyo.forEach(a.changedTouches, function(a) { +enyo.remove(a.identifier, this.orderedTouches); +}, this); +if (a.touches.length <= 1 && this.gesture) { +var b = a.touches[0] || a.changedTouches[a.changedTouches.length - 1]; +enyo.dispatch(this.makeGesture("gestureend", a, { +vector: { +xcenter: b.pageX, +ycenter: b.pageY +}, +scale: this.gesture.scale, +rotation: this.gesture.rotation +})), this.gesture = null; +} +}, +touchmove: function(a) { +if (this.gesture) { +var b = this.makeGesture("gesturechange", a); +this.gesture.scale = b.scale, this.gesture.rotation = b.rotation, enyo.dispatch(b); +} +}, +findIdentifiedTouch: function(a, b) { +for (var c = 0, d; d = a[c]; c++) if (d.identifier === b) return d; +}, +gesturePositions: function(a) { +var b = this.findIdentifiedTouch(a.touches, this.orderedTouches[0]), c = this.findIdentifiedTouch(a.touches, this.orderedTouches[this.orderedTouches.length - 1]), d = b.pageX, e = c.pageX, f = b.pageY, g = c.pageY, h = e - d, i = g - f, j = Math.sqrt(h * h + i * i); +return { +x: h, +y: i, +h: j, +fx: d, +lx: e, +fy: f, +ly: g +}; +}, +gestureAngle: function(a) { +var b = a, c = Math.asin(b.y / b.h) * (180 / Math.PI); +return b.x < 0 && (c = 180 - c), b.x > 0 && b.y < 0 && (c += 360), c; +}, +gestureVector: function(a) { +var b = a; +return { +magnitude: b.h, +xcenter: Math.abs(Math.round(b.fx + b.x / 2)), +ycenter: Math.abs(Math.round(b.fy + b.y / 2)) +}; +}, +makeGesture: function(a, b, c) { +var d, e, f; +if (c) d = c.vector, e = c.scale, f = c.rotation; else { +var g = this.gesturePositions(b); +d = this.gestureVector(g), e = d.magnitude / this.gesture.magnitude, f = (360 + this.gestureAngle(g) - this.gesture.angle) % 360; +} +var h = enyo.clone(b); +return enyo.mixin(h, { +type: a, +scale: e, +pageX: d.xcenter, +pageY: d.ycenter, +rotation: f +}); +} +}; +})(); + +// ScrollMath.js + +enyo.kind({ +name: "enyo.ScrollMath", +kind: enyo.Component, +published: { +vertical: !0, +horizontal: !0 +}, +events: { +onScrollStart: "", +onScroll: "", +onScrollStop: "" +}, +kSpringDamping: .93, +kDragDamping: .5, +kFrictionDamping: .97, +kSnapFriction: .9, +kFlickScalar: 15, +kMaxFlick: enyo.platform.android > 2 ? 2 : 1e9, +kFrictionEpsilon: .01, +topBoundary: 0, +rightBoundary: 0, +bottomBoundary: 0, +leftBoundary: 0, +interval: 20, +fixedTime: !0, +x0: 0, +x: 0, +y0: 0, +y: 0, +destroy: function() { +this.stop(), this.inherited(arguments); +}, +verlet: function(a) { +var b = this.x; +this.x += b - this.x0, this.x0 = b; +var c = this.y; +this.y += c - this.y0, this.y0 = c; +}, +damping: function(a, b, c, d) { +var e = .5, f = a - b; +return Math.abs(f) < e ? b : a * d > b * d ? c * f + b : a; +}, +boundaryDamping: function(a, b, c, d) { +return this.damping(this.damping(a, b, d, 1), c, d, -1); +}, +constrain: function() { +var a = this.boundaryDamping(this.y, this.topBoundary, this.bottomBoundary, this.kSpringDamping); +a != this.y && (this.y0 = a - (this.y - this.y0) * this.kSnapFriction, this.y = a); +var b = this.boundaryDamping(this.x, this.leftBoundary, this.rightBoundary, this.kSpringDamping); +b != this.x && (this.x0 = b - (this.x - this.x0) * this.kSnapFriction, this.x = b); +}, +friction: function(a, b, c) { +var d = this[a] - this[b], e = Math.abs(d) > this.kFrictionEpsilon ? c : 0; +this[a] = this[b] + e * d; +}, +frame: 10, +simulate: function(a) { +while (a >= this.frame) a -= this.frame, this.dragging || this.constrain(), this.verlet(), this.friction("y", "y0", this.kFrictionDamping), this.friction("x", "x0", this.kFrictionDamping); +return a; +}, +animate: function() { +this.stop(); +var a = enyo.now(), b = 0, c, d, e = enyo.bind(this, function() { +var f = enyo.now(); +this.job = enyo.requestAnimationFrame(e); +var g = f - a; +a = f, this.dragging && (this.y0 = this.y = this.uy, this.x0 = this.x = this.ux), b += Math.max(16, g), this.fixedTime && !this.isInOverScroll() && (b = this.interval), b = this.simulate(b), d != this.y || c != this.x ? this.scroll() : this.dragging || (this.stop(!0), this.scroll()), d = this.y, c = this.x; +}); +this.job = enyo.requestAnimationFrame(e); +}, +start: function() { +this.job || (this.animate(), this.doScrollStart()); +}, +stop: function(a) { +this.job = enyo.cancelRequestAnimationFrame(this.job), a && this.doScrollStop(); +}, +stabilize: function() { +this.start(); +var a = Math.min(this.topBoundary, Math.max(this.bottomBoundary, this.y)), b = Math.min(this.leftBoundary, Math.max(this.rightBoundary, this.x)); +this.y = this.y0 = a, this.x = this.x0 = b, this.scroll(), this.stop(!0); +}, +startDrag: function(a) { +this.dragging = !0, this.my = a.pageY, this.py = this.uy = this.y, this.mx = a.pageX, this.px = this.ux = this.x; +}, +drag: function(a) { +if (this.dragging) { +var b = this.vertical ? a.pageY - this.my : 0; +this.uy = b + this.py, this.uy = this.boundaryDamping(this.uy, this.topBoundary, this.bottomBoundary, this.kDragDamping); +var c = this.horizontal ? a.pageX - this.mx : 0; +return this.ux = c + this.px, this.ux = this.boundaryDamping(this.ux, this.leftBoundary, this.rightBoundary, this.kDragDamping), this.start(), !0; +} +}, +dragDrop: function(a) { +if (this.dragging && !window.PalmSystem) { +var b = .5; +this.y = this.uy, this.y0 = this.y - (this.y - this.y0) * b, this.x = this.ux, this.x0 = this.x - (this.x - this.x0) * b; +} +this.dragFinish(); +}, +dragFinish: function() { +this.dragging = !1; +}, +flick: function(a) { +var b; +this.vertical && (b = a.yVelocity > 0 ? Math.min(this.kMaxFlick, a.yVelocity) : Math.max(-this.kMaxFlick, a.yVelocity), this.y = this.y0 + b * this.kFlickScalar), this.horizontal && (b = a.xVelocity > 0 ? Math.min(this.kMaxFlick, a.xVelocity) : Math.max(-this.kMaxFlick, a.xVelocity), this.x = this.x0 + b * this.kFlickScalar), this.start(); +}, +mousewheel: function(a) { +var b = this.vertical ? a.wheelDeltaY || a.wheelDelta : 0; +if (b > 0 && this.y < this.topBoundary || b < 0 && this.y > this.bottomBoundary) return this.stop(!0), this.y = this.y0 = this.y0 + b, this.start(), !0; +}, +scroll: function() { +this.doScroll(); +}, +scrollTo: function(a, b) { +a !== null && (this.y = this.y0 - (a + this.y0) * (1 - this.kFrictionDamping)), b !== null && (this.x = this.x0 - (b + this.x0) * (1 - this.kFrictionDamping)), this.start(); +}, +setScrollX: function(a) { +this.x = this.x0 = a; +}, +setScrollY: function(a) { +this.y = this.y0 = a; +}, +setScrollPosition: function(a) { +this.setScrollY(a); +}, +isScrolling: function() { +return Boolean(this.job); +}, +isInOverScroll: function() { +return this.job && (this.x > this.leftBoundary || this.x < this.rightBoundary || this.y > this.topBoundary || this.y < this.bottomBoundary); +} +}); + +// ScrollStrategy.js + +enyo.kind({ +name: "enyo.ScrollStrategy", +tag: null, +published: { +vertical: "default", +horizontal: "default", +scrollLeft: 0, +scrollTop: 0, +maxHeight: null +}, +handlers: { +ondragstart: "dragstart", +ondragfinish: "dragfinish", +ondown: "down", +onmove: "move" +}, +create: function() { +this.inherited(arguments), this.horizontalChanged(), this.verticalChanged(), this.maxHeightChanged(), this.container.setAttribute("onscroll", enyo.bubbler); +}, +rendered: function() { +this.inherited(arguments), this.scrollNode = this.calcScrollNode(); +}, +teardownRender: function() { +this.inherited(arguments), this.scrollNode = null; +}, +calcScrollNode: function() { +return this.container.hasNode(); +}, +horizontalChanged: function() { +this.container.applyStyle("overflow-x", this.horizontal == "default" ? "auto" : this.horizontal); +}, +verticalChanged: function() { +this.container.applyStyle("overflow-y", this.vertical == "default" ? "auto" : this.vertical); +}, +maxHeightChanged: function() { +this.container.applyStyle("max-height", this.maxHeight); +}, +scrollTo: function(a, b) { +this.scrollNode && (this.setScrollLeft(a), this.setScrollTop(b)); +}, +scrollToNode: function(a, b) { +if (this.scrollNode) { +var c = this.getScrollBounds(), d = a, e = { +height: d.offsetHeight, +width: d.offsetWidth, +top: 0, +left: 0 +}; +while (d && d.parentNode && d.id != this.scrollNode.id) e.top += d.offsetTop, e.left += d.offsetLeft, d = d.parentNode; +this.setScrollTop(Math.min(c.maxTop, b === !1 ? e.top - c.clientHeight + e.height : e.top)), this.setScrollLeft(Math.min(c.maxLeft, b === !1 ? e.left - c.clientWidth + e.width : e.left)); +} +}, +scrollIntoView: function(a, b) { +a.hasNode() && a.node.scrollIntoView(b); +}, +isInView: function(a) { +var b = this.getScrollBounds(), c = a.offsetTop, d = a.offsetHeight, e = a.offsetLeft, f = a.offsetWidth; +return c >= b.top && c + d <= b.top + b.clientHeight && e >= b.left && e + f <= b.left + b.clientWidth; +}, +setScrollTop: function(a) { +this.scrollTop = a, this.scrollNode && (this.scrollNode.scrollTop = this.scrollTop); +}, +setScrollLeft: function(a) { +this.scrollLeft = a, this.scrollNode && (this.scrollNode.scrollLeft = this.scrollLeft); +}, +getScrollLeft: function() { +return this.scrollNode ? this.scrollNode.scrollLeft : this.scrollLeft; +}, +getScrollTop: function() { +return this.scrollNode ? this.scrollNode.scrollTop : this.scrollTop; +}, +_getScrollBounds: function() { +var a = this.getScrollSize(), b = this.container.hasNode(), c = { +left: this.getScrollLeft(), +top: this.getScrollTop(), +clientHeight: b ? b.clientHeight : 0, +clientWidth: b ? b.clientWidth : 0, +height: a.height, +width: a.width +}; +return c.maxLeft = Math.max(0, c.width - c.clientWidth), c.maxTop = Math.max(0, c.height - c.clientHeight), c; +}, +getScrollSize: function() { +var a = this.scrollNode; +return { +width: a ? a.scrollWidth : 0, +height: a ? a.scrollHeight : 0 +}; +}, +getScrollBounds: function() { +return this._getScrollBounds(); +}, +calcStartInfo: function() { +var a = this.getScrollBounds(), b = this.getScrollTop(), c = this.getScrollLeft(); +this.canVertical = a.maxTop > 0 && this.vertical != "hidden", this.canHorizontal = a.maxLeft > 0 && this.horizontal != "hidden", this.startEdges = { +top: b === 0, +bottom: b === a.maxTop, +left: c === 0, +right: c === a.maxLeft +}; +}, +shouldDrag: function(a) { +var b = a.vertical; +return b && this.canVertical || !b && this.canHorizontal; +}, +dragstart: function(a, b) { +this.dragging = this.shouldDrag(b); +if (this.dragging) return this.preventDragPropagation; +}, +dragfinish: function(a, b) { +this.dragging && (this.dragging = !1, b.preventTap()); +}, +down: function(a, b) { +this.calcStartInfo(); +}, +move: function(a, b) { +b.which && (this.canVertical && b.vertical || this.canHorizontal && b.horizontal) && b.disablePrevention(); +} +}); + +// Thumb.js + +enyo.kind({ +name: "enyo.ScrollThumb", +minSize: 4, +cornerSize: 6, +classes: "enyo-thumb", +axis: "v", +create: function() { +this.inherited(arguments); +var a = this.axis == "v"; +this.dimension = a ? "height" : "width", this.offset = a ? "top" : "left", this.translation = a ? "translateY" : "translateX", this.positionMethod = a ? "getScrollTop" : "getScrollLeft", this.sizeDimension = a ? "clientHeight" : "clientWidth", this.addClass("enyo-" + this.axis + "thumb"), enyo.dom.canAccelerate() && enyo.dom.transformValue(this, "translateZ", 0); +}, +sync: function(a) { +this.scrollBounds = a._getScrollBounds(), this.update(a); +}, +update: function(a) { +var b = this.dimension, c = this.offset, d = this.scrollBounds[this.sizeDimension], e = this.scrollBounds[b], f = 0, g = 0, h = 0; +if (d >= e) { +this.hide(); +return; +} +a.isOverscrolling() && (h = a.getOverScrollBounds()["over" + c], f = Math.abs(h), g = Math.max(h, 0)); +var i = a[this.positionMethod]() - h, j = d - this.cornerSize, k = Math.floor(d * d / e - f); +k = Math.max(this.minSize, k); +var l = Math.floor(j * i / e + g); +l = Math.max(0, Math.min(j - this.minSize, l)), this.needed = k < d, this.needed && this.hasNode() ? (this._pos !== l && (this._pos = l, enyo.dom.transformValue(this, this.translation, l + "px")), this._size !== k && (this._size = k, this.node.style[b] = this.domStyles[b] = k + "px")) : this.hide(); +}, +setShowing: function(a) { +if (a && a != this.showing && this.scrollBounds[this.sizeDimension] >= this.scrollBounds[this.dimension]) return; +this.hasNode() && this.cancelDelayHide(); +if (a != this.showing) { +var b = this.showing; +this.showing = a, this.showingChanged(b); +} +}, +delayHide: function(a) { +this.showing && enyo.job(this.id + "hide", enyo.bind(this, "hide"), a || 0); +}, +cancelDelayHide: function() { +enyo.job.stop(this.id + "hide"); +} +}); + +// TouchScrollStrategy.js + +enyo.kind({ +name: "enyo.TouchScrollStrategy", +kind: "ScrollStrategy", +preventDragPropagation: !0, +published: { +vertical: "default", +horizontal: "default", +thumb: !0, +scrim: !1 +}, +events: { +onShouldDrag: "" +}, +handlers: { +onscroll: "domScroll", +onflick: "flick", +onhold: "hold", +ondragstart: "dragstart", +onShouldDrag: "shouldDrag", +ondrag: "drag", +ondragfinish: "dragfinish", +onmousewheel: "mousewheel" +}, +tools: [ { +kind: "ScrollMath", +onScrollStart: "scrollMathStart", +onScroll: "scrollMathScroll", +onScrollStop: "scrollMathStop" +}, { +name: "vthumb", +kind: "ScrollThumb", +axis: "v", +showing: !1 +}, { +name: "hthumb", +kind: "ScrollThumb", +axis: "h", +showing: !1 +} ], +scrimTools: [ { +name: "scrim", +classes: "enyo-fit", +style: "z-index: 1;", +showing: !1 +} ], +components: [ { +name: "client", +attributes: { +onscroll: enyo.bubbler +}, +classes: "enyo-touch-scroller" +} ], +create: function() { +this.inherited(arguments), this.accel = enyo.dom.canAccelerate(); +var a = "enyo-touch-strategy-container"; +enyo.platform.ios && this.accel && (a += " enyo-composite"), this.scrimChanged(), this.container.addClass(a), this.translation = this.accel ? "translate3d" : "translate"; +}, +initComponents: function() { +this.createChrome(this.tools), this.inherited(arguments); +}, +destroy: function() { +this.container.removeClass("enyo-touch-strategy-container"), this.inherited(arguments); +}, +rendered: function() { +this.inherited(arguments), this.calcBoundaries(), this.syncScrollMath(), this.thumb && this.alertThumbs(); +}, +scrimChanged: function() { +this.scrim && !this.$.scrim && this.makeScrim(), !this.scrim && this.$.scrim && this.$.scrim.destroy(); +}, +makeScrim: function() { +var a = this.controlParent; +this.controlParent = null, this.createChrome(this.scrimTools), this.controlParent = a; +var b = this.container.hasNode(); +b && (this.$.scrim.parentNode = b, this.$.scrim.render()); +}, +isScrolling: function() { +return this.$.scrollMath.isScrolling(); +}, +isOverscrolling: function() { +return this.$.scrollMath.isInOverScroll(); +}, +domScroll: function() { +this.isScrolling() || (this.calcBoundaries(), this.syncScrollMath(), this.thumb && this.alertThumbs()); +}, +horizontalChanged: function() { +this.$.scrollMath.horizontal = this.horizontal != "hidden"; +}, +verticalChanged: function() { +this.$.scrollMath.vertical = this.vertical != "hidden"; +}, +maxHeightChanged: function() { +this.$.client.applyStyle("max-height", this.maxHeight), this.$.client.addRemoveClass("enyo-scrollee-fit", !this.maxHeight); +}, +thumbChanged: function() { +this.hideThumbs(); +}, +stop: function() { +this.isScrolling() && this.$.scrollMath.stop(!0); +}, +stabilize: function() { +this.$.scrollMath.stabilize(); +}, +scrollTo: function(a, b) { +this.stop(), this.$.scrollMath.scrollTo(b || b === 0 ? b : null, a); +}, +scrollIntoView: function() { +this.stop(), this.inherited(arguments); +}, +setScrollLeft: function() { +this.stop(), this.inherited(arguments); +}, +setScrollTop: function() { +this.stop(), this.inherited(arguments); +}, +getScrollLeft: function() { +return this.isScrolling() ? this.scrollLeft : this.inherited(arguments); +}, +getScrollTop: function() { +return this.isScrolling() ? this.scrollTop : this.inherited(arguments); +}, +calcScrollNode: function() { +return this.$.client.hasNode(); +}, +calcAutoScrolling: function() { +var a = this.vertical == "auto", b = this.horizontal == "auto" || this.horizontal == "default"; +if ((a || b) && this.scrollNode) { +var c = this.getScrollBounds(); +a && (this.$.scrollMath.vertical = c.height > c.clientHeight), b && (this.$.scrollMath.horizontal = c.width > c.clientWidth); +} +}, +shouldDrag: function(a, b) { +this.calcAutoScrolling(); +var c = b.vertical, d = this.$.scrollMath.horizontal && !c, e = this.$.scrollMath.vertical && c, f = b.dy < 0, g = b.dx < 0, h = !f && this.startEdges.top || f && this.startEdges.bottom, i = !g && this.startEdges.left || g && this.startEdges.right; +!b.boundaryDragger && (d || e) && (b.boundaryDragger = this); +if (!h && e || !i && d) return b.dragger = this, !0; +}, +flick: function(a, b) { +var c = Math.abs(b.xVelocity) > Math.abs(b.yVelocity) ? this.$.scrollMath.horizontal : this.$.scrollMath.vertical; +if (c && this.dragging) return this.$.scrollMath.flick(b), this.preventDragPropagation; +}, +hold: function(a, b) { +if (this.isScrolling() && !this.isOverscrolling()) return this.$.scrollMath.stop(b), !0; +}, +move: function(a, b) {}, +dragstart: function(a, b) { +this.doShouldDrag(b), this.dragging = b.dragger == this || !b.dragger && b.boundaryDragger == this; +if (this.dragging) { +b.preventDefault(), this.syncScrollMath(), this.$.scrollMath.startDrag(b); +if (this.preventDragPropagation) return !0; +} +}, +drag: function(a, b) { +this.dragging && (b.preventDefault(), this.$.scrollMath.drag(b), this.scrim && this.$.scrim.show()); +}, +dragfinish: function(a, b) { +this.dragging && (b.preventTap(), this.$.scrollMath.dragFinish(), this.dragging = !1, this.scrim && this.$.scrim.hide()); +}, +mousewheel: function(a, b) { +if (!this.dragging && this.$.scrollMath.mousewheel(b)) return b.preventDefault(), !0; +}, +scrollMathStart: function(a) { +this.scrollNode && (this.calcBoundaries(), this.thumb && this.showThumbs()); +}, +scrollMathScroll: function(a) { +this.effectScroll(-a.x, -a.y), this.thumb && this.updateThumbs(); +}, +scrollMathStop: function(a) { +this.effectScrollStop(), this.thumb && this.delayHideThumbs(100); +}, +calcBoundaries: function() { +var a = this.$.scrollMath, b = this._getScrollBounds(); +a.bottomBoundary = b.clientHeight - b.height, a.rightBoundary = b.clientWidth - b.width; +}, +syncScrollMath: function() { +var a = this.$.scrollMath; +a.setScrollX(-this.getScrollLeft()), a.setScrollY(-this.getScrollTop()); +}, +effectScroll: function(a, b) { +this.scrollNode && (this.scrollLeft = this.scrollNode.scrollLeft = a, this.scrollTop = this.scrollNode.scrollTop = b, this.effectOverscroll(Math.round(a), Math.round(b))); +}, +effectScrollStop: function() { +this.effectOverscroll(null, null); +}, +effectOverscroll: function(a, b) { +var c = this.scrollNode, d = "0,", e = "0", f = this.accel ? ",0" : ""; +b !== null && Math.abs(b - c.scrollTop) > 1 && (e = c.scrollTop - b + "px"), a !== null && Math.abs(a - c.scrollLeft) > 1 && (d = c.scrollLeft - a + "px,"), enyo.dom.transformValue(this.$.client, this.translation, d + e + f); +}, +getOverScrollBounds: function() { +var a = this.$.scrollMath; +return { +overleft: Math.min(a.leftBoundary - a.x, 0) || Math.max(a.rightBoundary - a.x, 0), +overtop: Math.min(a.topBoundary - a.y, 0) || Math.max(a.bottomBoundary - a.y, 0) +}; +}, +_getScrollBounds: function() { +var a = this.inherited(arguments); +return enyo.mixin(a, this.getOverScrollBounds()), a; +}, +getScrollBounds: function() { +return this.stop(), this.inherited(arguments); +}, +alertThumbs: function() { +this.showThumbs(), this.delayHideThumbs(500); +}, +syncThumbs: function() { +this.$.vthumb.sync(this), this.$.hthumb.sync(this); +}, +updateThumbs: function() { +this.$.vthumb.update(this), this.$.hthumb.update(this); +}, +showThumbs: function() { +this.syncThumbs(), this.$.vthumb.show(), this.$.hthumb.show(); +}, +hideThumbs: function() { +this.$.vthumb.hide(), this.$.hthumb.hide(); +}, +delayHideThumbs: function(a) { +this.$.vthumb.delayHide(a), this.$.hthumb.delayHide(a); +} +}); + +// TranslateScrollStrategy.js + +enyo.kind({ +name: "enyo.TranslateScrollStrategy", +kind: "TouchScrollStrategy", +components: [ { +name: "clientContainer", +classes: "enyo-touch-scroller", +attributes: { +onscroll: enyo.bubbler +}, +components: [ { +name: "client" +} ] +} ], +translateOptimized: !1, +getScrollSize: function() { +var a = this.$.client.hasNode(); +return { +width: a ? a.scrollWidth : 0, +height: a ? a.scrollHeight : 0 +}; +}, +create: function() { +this.inherited(arguments), enyo.dom.transformValue(this.$.client, this.translation, "0,0,0"); +}, +calcScrollNode: function() { +return this.$.clientContainer.hasNode(); +}, +maxHeightChanged: function() { +this.$.client.applyStyle("min-height", this.maxHeight ? null : "100%"), this.$.client.applyStyle("max-height", this.maxHeight), this.$.clientContainer.addRemoveClass("enyo-scrollee-fit", !this.maxHeight); +}, +shouldDrag: function(a, b) { +return this.stop(), this.calcStartInfo(), this.inherited(arguments); +}, +syncScrollMath: function() { +this.translateOptimized || this.inherited(arguments); +}, +setScrollLeft: function(a) { +this.stop(); +if (this.translateOptimized) { +var b = this.$.scrollMath; +b.setScrollX(-a), b.stabilize(); +} else this.inherited(arguments); +}, +setScrollTop: function(a) { +this.stop(); +if (this.translateOptimized) { +var b = this.$.scrollMath; +b.setScrollY(-a), b.stabilize(); +} else this.inherited(arguments); +}, +getScrollLeft: function() { +return this.translateOptimized ? this.scrollLeft : this.inherited(arguments); +}, +getScrollTop: function() { +return this.translateOptimized ? this.scrollTop : this.inherited(arguments); +}, +scrollMathStart: function(a) { +this.inherited(arguments), this.scrollStarting = !0, this.startX = 0, this.startY = 0, !this.translateOptimized && this.scrollNode && (this.startX = this.getScrollLeft(), this.startY = this.getScrollTop()); +}, +scrollMathScroll: function(a) { +this.scrollLeft = -a.x, this.scrollTop = -a.y, this.isScrolling() && (this.$.scrollMath.isScrolling() && this.effectScroll(this.startX - this.scrollLeft, this.startY - this.scrollTop), this.thumb && this.updateThumbs()); +}, +effectScroll: function(a, b) { +var c = a + "px, " + b + "px" + (this.accel ? ",0" : ""); +enyo.dom.transformValue(this.$.client, this.translation, c); +}, +effectScrollStop: function() { +if (!this.translateOptimized) { +var a = "0,0" + (this.accel ? ",0" : ""), b = this.$.scrollMath, c = this._getScrollBounds(), d = Boolean(c.maxTop + b.bottomBoundary || c.maxLeft + b.rightBoundary); +enyo.dom.transformValue(this.$.client, this.translation, d ? null : a), this.setScrollLeft(this.scrollLeft), this.setScrollTop(this.scrollTop), d && enyo.dom.transformValue(this.$.client, this.translation, a); +} +}, +twiddle: function() { +this.translateOptimized && (this.scrollNode.scrollTop = 1, this.scrollNode.scrollTop = 0); +}, +down: enyo.nop +}); + +// Scroller.js + +enyo.kind({ +name: "enyo.Scroller", +published: { +horizontal: "default", +vertical: "default", +scrollTop: 0, +scrollLeft: 0, +maxHeight: null, +touch: !1, +strategyKind: "ScrollStrategy", +thumb: !0 +}, +events: { +onScrollStart: "", +onScroll: "", +onScrollStop: "" +}, +handlers: { +onscroll: "domScroll", +onScrollStart: "scrollStart", +onScroll: "scroll", +onScrollStop: "scrollStop" +}, +classes: "enyo-scroller", +preventDragPropagation: !0, +preventScrollPropagation: !0, +statics: { +osInfo: [ { +os: "android", +version: 3 +}, { +os: "ios", +version: 5 +}, { +os: "webos", +version: 1e9 +} ], +hasTouchScrolling: function() { +for (var a = 0, b, c; b = this.osInfo[a]; a++) if (enyo.platform[b.os]) return !0; +}, +hasNativeScrolling: function() { +for (var a = 0, b, c; b = this.osInfo[a]; a++) if (enyo.platform[b.os] < b.version) return !1; +return !0; +}, +getTouchStrategy: function() { +return enyo.platform.android >= 3 ? "TranslateScrollStrategy" : "TouchScrollStrategy"; +} +}, +controlParentName: "strategy", +create: function() { +this.inherited(arguments), this.horizontalChanged(), this.verticalChanged(); +}, +importProps: function(a) { +this.inherited(arguments), a && a.strategyKind === undefined && (enyo.Scroller.touchScrolling || this.touch) && (this.strategyKind = enyo.Scroller.getTouchStrategy()); +}, +initComponents: function() { +this.strategyKindChanged(), this.inherited(arguments); +}, +teardownChildren: function() { +this.cacheScrollPosition(), this.inherited(arguments); +}, +rendered: function() { +this.inherited(arguments), this.restoreScrollPosition(); +}, +strategyKindChanged: function() { +this.$.strategy && (this.$.strategy.destroy(), this.controlParent = null), this.createStrategy(), this.hasNode() && this.render(); +}, +createStrategy: function() { +this.createComponents([ { +name: "strategy", +maxHeight: this.maxHeight, +kind: this.strategyKind, +thumb: this.thumb, +preventDragPropagation: this.preventDragPropagation, +isChrome: !0 +} ]); +}, +getStrategy: function() { +return this.$.strategy; +}, +maxHeightChanged: function() { +this.$.strategy.setMaxHeight(this.maxHeight); +}, +showingChanged: function() { +this.showing || (this.cacheScrollPosition(), this.setScrollLeft(0), this.setScrollTop(0)), this.inherited(arguments), this.showing && this.restoreScrollPosition(); +}, +thumbChanged: function() { +this.$.strategy.setThumb(this.thumb); +}, +cacheScrollPosition: function() { +this.cachedPosition = { +left: this.getScrollLeft(), +top: this.getScrollTop() +}; +}, +restoreScrollPosition: function() { +this.cachedPosition && (this.setScrollLeft(this.cachedPosition.left), this.setScrollTop(this.cachedPosition.top), this.cachedPosition = null); +}, +horizontalChanged: function() { +this.$.strategy.setHorizontal(this.horizontal); +}, +verticalChanged: function() { +this.$.strategy.setVertical(this.vertical); +}, +setScrollLeft: function(a) { +this.scrollLeft = a, this.$.strategy.setScrollLeft(this.scrollLeft); +}, +setScrollTop: function(a) { +this.scrollTop = a, this.$.strategy.setScrollTop(a); +}, +getScrollLeft: function() { +return this.$.strategy.getScrollLeft(); +}, +getScrollTop: function() { +return this.$.strategy.getScrollTop(); +}, +getScrollBounds: function() { +return this.$.strategy.getScrollBounds(); +}, +scrollIntoView: function(a, b) { +this.$.strategy.scrollIntoView(a, b); +}, +scrollTo: function(a, b) { +this.$.strategy.scrollTo(a, b); +}, +scrollToControl: function(a, b) { +this.scrollToNode(a.hasNode(), b); +}, +scrollToNode: function(a, b) { +this.$.strategy.scrollToNode(a, b); +}, +domScroll: function(a, b) { +return this.$.strategy.domScroll && b.originator == this && this.$.strategy.scroll(a, b), this.doScroll(b), !0; +}, +shouldStopScrollEvent: function(a) { +return this.preventScrollPropagation && a.originator.owner != this.$.strategy; +}, +scrollStart: function(a, b) { +return this.shouldStopScrollEvent(b); +}, +scroll: function(a, b) { +return b.dispatchTarget ? this.preventScrollPropagation && b.originator != this && b.originator.owner != this.$.strategy : this.shouldStopScrollEvent(b); +}, +scrollStop: function(a, b) { +return this.shouldStopScrollEvent(b); +}, +scrollToTop: function() { +this.setScrollTop(0); +}, +scrollToBottom: function() { +this.setScrollTop(this.getScrollBounds().maxTop); +}, +scrollToRight: function() { +this.setScrollTop(this.getScrollBounds().maxLeft); +}, +scrollToLeft: function() { +this.setScrollLeft(0); +}, +stabilize: function() { +var a = this.getStrategy(); +a.stabilize && a.stabilize(); +} +}), enyo.Scroller.hasTouchScrolling() && (enyo.Scroller.prototype.strategyKind = enyo.Scroller.getTouchStrategy()); + +// Animator.js + +enyo.kind({ +name: "enyo.Animator", +kind: "Component", +published: { +duration: 350, +startValue: 0, +endValue: 1, +node: null, +easingFunction: enyo.easing.cubicOut +}, +events: { +onStep: "", +onEnd: "", +onStop: "" +}, +constructed: function() { +this.inherited(arguments), this._next = enyo.bind(this, "next"); +}, +destroy: function() { +this.stop(), this.inherited(arguments); +}, +play: function(a) { +return this.stop(), a && enyo.mixin(this, a), this.t0 = this.t1 = enyo.now(), this.value = this.startValue, this.job = !0, this.requestNext(), this; +}, +stop: function() { +if (this.isAnimating()) return this.cancel(), this.fire("onStop"), this; +}, +isAnimating: function() { +return Boolean(this.job); +}, +requestNext: function() { +this.job = enyo.requestAnimationFrame(this._next, this.node); +}, +cancel: function() { +enyo.cancelRequestAnimationFrame(this.job), this.node = null, this.job = null; +}, +shouldEnd: function() { +return this.dt >= this.duration; +}, +next: function() { +this.t1 = enyo.now(), this.dt = this.t1 - this.t0; +var a = this.fraction = enyo.easedLerp(this.t0, this.duration, this.easingFunction); +this.value = this.startValue + a * (this.endValue - this.startValue), a >= 1 || this.shouldEnd() ? (this.value = this.endValue, this.fraction = 1, this.fire("onStep"), this.fire("onEnd"), this.cancel()) : (this.fire("onStep"), this.requestNext()); +}, +fire: function(a) { +var b = this[a]; +enyo.isString(b) ? this.bubble(a) : b && b.call(this.context || window, this); +} +}); + +// BaseLayout.js + +enyo.kind({ +name: "enyo.BaseLayout", +kind: enyo.Layout, +layoutClass: "enyo-positioned", +reflow: function() { +enyo.forEach(this.container.children, function(a) { +a.fit !== null && a.addRemoveClass("enyo-fit", a.fit); +}, this); +} +}); + +// Image.js + +enyo.kind({ +name: "enyo.Image", +tag: "img", +attributes: { +onload: enyo.bubbler, +onerror: enyo.bubbler, +draggable: "false" +} +}); + +// Input.js + +enyo.kind({ +name: "enyo.Input", +published: { +value: "", +placeholder: "", +type: "", +disabled: !1 +}, +events: { +onDisabledChange: "" +}, +defaultFocus: !1, +tag: "input", +classes: "enyo-input", +attributes: { +onfocus: enyo.bubbler, +onblur: enyo.bubbler +}, +handlers: { +oninput: "input", +onclear: "clear", +ondragstart: "dragstart" +}, +create: function() { +enyo.platform.ie && (this.handlers.onkeyup = "iekeyup"), this.inherited(arguments), this.placeholderChanged(), this.type && this.typeChanged(), this.valueChanged(); +}, +rendered: function() { +this.inherited(arguments), this.disabledChanged(), this.defaultFocus && this.focus(); +}, +typeChanged: function() { +this.setAttribute("type", this.type); +}, +placeholderChanged: function() { +this.setAttribute("placeholder", this.placeholder); +}, +disabledChanged: function() { +this.setAttribute("disabled", this.disabled), this.bubble("onDisabledChange"); +}, +getValue: function() { +return this.getNodeProperty("value", this.value); +}, +valueChanged: function() { +this.setAttribute("value", this.value), this.setNodeProperty("value", this.value); +}, +iekeyup: function(a, b) { +var c = enyo.platform.ie, d = b.keyCode; +(c <= 8 || c == 9 && (d == 8 || d == 46)) && this.bubble("oninput", b); +}, +clear: function() { +this.setValue(""); +}, +focus: function() { +this.hasNode() && this.node.focus(); +}, +dragstart: function() { +return !0; +} +}); + +// RichText.js + +enyo.kind({ +name: "enyo.RichText", +classes: "enyo-richtext enyo-selectable", +published: { +allowHtml: !0, +disabled: !1, +value: "" +}, +defaultFocus: !1, +kind: enyo.Input, +tag: "div", +attributes: { +contenteditable: !0 +}, +handlers: { +onfocus: "focusHandler", +onblur: "blurHandler" +}, +focusHandler: function() { +this._value = this.getValue(); +}, +blurHandler: function() { +this._value !== this.getValue() && this.bubble("onchange"); +}, +valueChanged: function() { +this.hasFocus() ? (this.selectAll(), this.insertAtCursor(this.value)) : this.setPropertyValue("content", this.value, "contentChanged"); +}, +getValue: function() { +if (this.hasNode()) return this.node.innerHTML; +}, +hasFocus: function() { +if (this.hasNode()) return document.activeElement === this.node; +}, +getSelection: function() { +if (this.hasFocus()) return window.getSelection(); +}, +removeSelection: function(a) { +var b = this.getSelection(); +b && b[a ? "collapseToStart" : "collapseToEnd"](); +}, +modifySelection: function(a, b, c) { +var d = this.getSelection(); +d && d.modify(a || "move", b, c); +}, +moveCursor: function(a, b) { +this.modifySelection("move", a, b); +}, +moveCursorToEnd: function() { +this.moveCursor("forward", "documentboundary"); +}, +moveCursorToStart: function() { +this.moveCursor("backward", "documentboundary"); +}, +selectAll: function() { +this.hasFocus() && document.execCommand("selectAll"); +}, +insertAtCursor: function(a) { +if (this.hasFocus()) { +var b = this.allowHtml ? a : enyo.Control.escapeHtml(a).replace(/\n/g, "<br/>"); +document.execCommand("insertHTML", !1, b); +} +} +}); + +// TextArea.js + +enyo.kind({ +name: "enyo.TextArea", +kind: enyo.Input, +tag: "textarea", +classes: "enyo-textarea", +rendered: function() { +this.inherited(arguments), this.valueChanged(); +} +}); + +// Select.js + +enyo.kind({ +name: "enyo.Select", +published: { +selected: 0 +}, +handlers: { +onchange: "change" +}, +tag: "select", +defaultKind: "enyo.Option", +rendered: function() { +this.inherited(arguments), this.selectedChanged(); +}, +getSelected: function() { +return Number(this.getNodeProperty("selectedIndex", this.selected)); +}, +setSelected: function(a) { +this.setPropertyValue("selected", Number(a), "selectedChanged"); +}, +selectedChanged: function() { +this.setNodeProperty("selectedIndex", this.selected); +}, +change: function() { +this.selected = this.getSelected(); +}, +render: function() { +enyo.platform.ie ? this.parent.render() : this.inherited(arguments); +}, +getValue: function() { +if (this.hasNode()) return this.node.value; +} +}), enyo.kind({ +name: "enyo.Option", +published: { +value: "" +}, +tag: "option", +create: function() { +this.inherited(arguments), this.valueChanged(); +}, +valueChanged: function() { +this.setAttribute("value", this.value); +} +}), enyo.kind({ +name: "enyo.OptionGroup", +published: { +label: "" +}, +tag: "optgroup", +defaultKind: "enyo.Option", +create: function() { +this.inherited(arguments), this.labelChanged(); +}, +labelChanged: function() { +this.setAttribute("label", this.label); +} +}); + +// Group.js + +enyo.kind({ +name: "enyo.Group", +published: { +highlander: !0, +active: null +}, +handlers: { +onActivate: "activate" +}, +activate: function(a, b) { +this.highlander && (b.originator.active ? this.setActive(b.originator) : b.originator == this.active && this.active.setActive(!0)); +}, +activeChanged: function(a) { +a && (a.setActive(!1), a.removeClass("active")), this.active && this.active.addClass("active"); +} +}); + +// GroupItem.js + +enyo.kind({ +name: "enyo.GroupItem", +published: { +active: !1 +}, +rendered: function() { +this.inherited(arguments), this.activeChanged(); +}, +activeChanged: function() { +this.bubble("onActivate"); +} +}); + +// ToolDecorator.js + +enyo.kind({ +name: "enyo.ToolDecorator", +kind: enyo.GroupItem, +classes: "enyo-tool-decorator" +}); + +// Button.js + +enyo.kind({ +name: "enyo.Button", +kind: enyo.ToolDecorator, +tag: "Button", +published: { +disabled: !1 +}, +create: function() { +this.inherited(arguments), this.disabledChanged(); +}, +disabledChanged: function() { +this.setAttribute("disabled", this.disabled); +}, +tap: function() { +this.setActive(!0); +} +}); + +// Checkbox.js + +enyo.kind({ +name: "enyo.Checkbox", +kind: enyo.Input, +classes: "enyo-checkbox", +events: { +onActivate: "" +}, +published: { +checked: !1, +active: !1, +type: "checkbox" +}, +kindClasses: "", +handlers: { +onchange: "change", +onclick: "click" +}, +create: function() { +this.inherited(arguments); +}, +rendered: function() { +this.inherited(arguments), this.active && this.activeChanged(), this.checkedChanged(); +}, +getChecked: function() { +return Boolean(this.getNodeProperty("checked", this.checked)); +}, +checkedChanged: function() { +this.setNodeProperty("checked", this.checked), this.setAttribute("checked", this.checked ? "checked" : ""), this.setActive(this.checked); +}, +activeChanged: function() { +this.active = Boolean(this.active), this.setChecked(this.active), this.bubble("onActivate"); +}, +setValue: function(a) { +this.setChecked(Boolean(a)); +}, +getValue: function() { +return this.getChecked(); +}, +valueChanged: function() {}, +change: function() { +this.setActive(this.getChecked()); +}, +click: function(a, b) { +enyo.platform.ie <= 8 && this.bubble("onchange", b); +} +}); + +// Repeater.js + +enyo.kind({ +name: "enyo.Repeater", +published: { +count: 0 +}, +events: { +onSetupItem: "" +}, +create: function() { +this.inherited(arguments), this.countChanged(); +}, +initComponents: function() { +this.itemComponents = this.components || this.kindComponents, this.components = this.kindComponents = null, this.inherited(arguments); +}, +setCount: function(a) { +this.setPropertyValue("count", a, "countChanged"); +}, +countChanged: function() { +this.build(); +}, +itemAtIndex: function(a) { +return this.controlAtIndex(a); +}, +build: function() { +this.destroyClientControls(); +for (var a = 0, b; a < this.count; a++) b = this.createComponent({ +kind: "enyo.OwnerProxy", +index: a +}), b.createComponents(this.itemComponents), this.doSetupItem({ +index: a, +item: b +}); +this.render(); +} +}), enyo.kind({ +name: "enyo.OwnerProxy", +tag: null, +decorateEvent: function(a, b, c) { +b && (b.index = this.index), this.inherited(arguments); +}, +delegateEvent: function(a, b, c, d, e) { +a == this && (a = this.owner.owner), this.inherited(arguments, [ a, b, c, d, e ]); +} +}); + +// DragAvatar.js + +enyo.kind({ +name: "enyo._DragAvatar", +style: "position: absolute; z-index: 10; pointer-events: none; cursor: move;", +showing: !1, +showingChanged: function() { +this.inherited(arguments), document.body.style.cursor = this.showing ? "move" : null; +} +}), enyo.kind({ +name: "enyo.DragAvatar", +kind: enyo.Component, +published: { +showing: !1, +offsetX: 20, +offsetY: 30 +}, +initComponents: function() { +this.avatarComponents = this.components, this.components = null, this.inherited(arguments); +}, +requireAvatar: function() { +this.avatar || (this.avatar = this.createComponent({ +kind: enyo._DragAvatar, +parentNode: document.body, +showing: !1, +components: this.avatarComponents +}).render()); +}, +showingChanged: function() { +this.avatar.setShowing(this.showing), document.body.style.cursor = this.showing ? "move" : null; +}, +drag: function(a) { +this.requireAvatar(), this.avatar.setBounds({ +top: a.pageY - this.offsetY, +left: a.pageX + this.offsetX +}), this.show(); +}, +show: function() { +this.setShowing(!0); +}, +hide: function() { +this.setShowing(!1); +} +}); + +// FloatingLayer.js + +enyo.kind({ +name: "enyo.FloatingLayer", +create: function() { +this.inherited(arguments), this.setParent(null); +}, +render: function() { +return this.parentNode = document.body, this.inherited(arguments); +}, +generateInnerHtml: function() { +return ""; +}, +beforeChildRender: function() { +this.hasNode() || this.render(); +}, +teardownChildren: function() {} +}), enyo.floatingLayer = new enyo.FloatingLayer; + +// Popup.js + +enyo.kind({ +name: "enyo.Popup", +classes: "enyo-popup", +published: { +modal: !1, +autoDismiss: !0, +floating: !1, +centered: !1 +}, +showing: !1, +handlers: { +ondown: "down", +onkeydown: "keydown", +onfocus: "focus", +onblur: "blur", +onRequestShow: "requestShow", +onRequestHide: "requestHide" +}, +captureEvents: !0, +events: { +onShow: "", +onHide: "" +}, +tools: [ { +kind: "Signals", +onKeydown: "keydown" +} ], +create: function() { +this.inherited(arguments), this.canGenerate = !this.floating; +}, +render: function() { +this.floating && (enyo.floatingLayer.hasNode() || enyo.floatingLayer.render(), this.parentNode = enyo.floatingLayer.hasNode()), this.inherited(arguments); +}, +destroy: function() { +this.showing && this.release(), this.inherited(arguments); +}, +reflow: function() { +this.updatePosition(), this.inherited(arguments); +}, +calcViewportSize: function() { +if (window.innerWidth) return { +width: window.innerWidth, +height: window.innerHeight +}; +var a = document.documentElement; +return { +width: a.offsetWidth, +height: a.offsetHeight +}; +}, +updatePosition: function() { +if (this.centered) { +var a = this.calcViewportSize(), b = this.getBounds(); +this.addStyles("top: " + Math.max((a.height - b.height) / 2, 0) + "px; left: " + Math.max((a.width - b.width) / 2, 0) + "px;"); +} +}, +showingChanged: function() { +this.floating && this.showing && !this.hasNode() && this.render(), this.centered && this.applyStyle("visibility", "hidden"), this.inherited(arguments), this.showing ? (this.resized(), this.captureEvents && this.capture()) : this.captureEvents && this.release(), this.centered && this.applyStyle("visibility", null), this.hasNode() && this[this.showing ? "doShow" : "doHide"](); +}, +capture: function() { +enyo.dispatcher.capture(this, !this.modal); +}, +release: function() { +enyo.dispatcher.release(); +}, +down: function(a, b) { +this.modal && !b.dispatchTarget.isDescendantOf(this) && b.preventDefault(); +}, +tap: function(a, b) { +if (this.autoDismiss && !b.dispatchTarget.isDescendantOf(this)) return this.hide(), !0; +}, +keydown: function(a, b) { +this.showing && this.autoDismiss && b.keyCode == 27 && this.hide(); +}, +blur: function(a, b) { +b.dispatchTarget.isDescendantOf(this) && (this.lastFocus = b.originator); +}, +focus: function(a, b) { +var c = b.dispatchTarget; +if (this.modal && !c.isDescendantOf(this)) { +c.hasNode() && c.node.blur(); +var d = this.lastFocus && this.lastFocus.hasNode() || this.hasNode(); +d && d.focus(); +} +}, +requestShow: function(a, b) { +return this.show(), !0; +}, +requestHide: function(a, b) { +return this.hide(), !0; +} +}); |