author | Ryan VanderMeulen <ryanvm@gmail.com> |
Sun, 12 Oct 2014 14:26:20 -0400 | |
changeset 210006 | 5ec529e71a22b16e6de6c553ca7cdf13b876bcf6 |
parent 209981 | debdd2301bb678f13d7416c8ba0e286d88123a9c (current diff) |
parent 210005 | 1ceec2777843403a6da2316ba34d00930b9d58bf (diff) |
child 210007 | c0d968dc9a29611ea01d51bbbb7fb28f01c72e80 |
push id | 1 |
push user | root |
push date | Mon, 20 Oct 2014 17:29:22 +0000 |
reviewers | merge |
milestone | 35.0a1 |
browser/components/loop/content/shared/libs/react-0.11.1-prod.js | file | annotate | diff | comparison | revisions | |
browser/components/loop/content/shared/libs/react-0.11.1.js | file | annotate | diff | comparison | revisions |
--- a/browser/base/content/pageinfo/permissions.js +++ b/browser/base/content/pageinfo/permissions.js @@ -1,13 +1,14 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ Components.utils.import("resource:///modules/SitePermissions.jsm"); +Components.utils.import("resource://gre/modules/BrowserUtils.jsm"); const nsIQuotaManager = Components.interfaces.nsIQuotaManager; var gPermURI; var gUsageRequest; var gPermissions = SitePermissions.listPermissions(); gPermissions.push("plugins"); @@ -226,30 +227,16 @@ function onIndexedDBUsageCallback(uri, u status.value = gBundle.getFormattedString("indexedDBUsage", DownloadUtils.convertByteUnits(usage)); status.removeAttribute("hidden"); button.removeAttribute("hidden"); } } -// XXX copied this from browser-plugins.js - is there a way to share? -function makeNicePluginName(aName) { - if (aName == "Shockwave Flash") - return "Adobe Flash"; - - // Clean up the plugin name by stripping off any trailing version numbers - // or "plugin". EG, "Foo Bar Plugin 1.23_02" --> "Foo Bar" - // Do this by first stripping the numbers, etc. off the end, and then - // removing "Plugin" (and then trimming to get rid of any whitespace). - // (Otherwise, something like "Java(TM) Plug-in 1.7.0_07" gets mangled) - let newName = aName.replace(/[\s\d\.\-\_\(\)]+$/, "").replace(/\bplug-?in\b/i, "").trim(); - return newName; -} - function fillInPluginPermissionTemplate(aPluginName, aPermissionString) { let permPluginTemplate = document.getElementById("permPluginTemplate").cloneNode(true); permPluginTemplate.setAttribute("permString", aPermissionString); let attrs = [ [ ".permPluginTemplateLabel", "value", aPluginName ], [ ".permPluginTemplateRadioGroup", "id", aPermissionString + "RadioGroup" ], [ ".permPluginTemplateRadioDefault", "id", aPermissionString + "#0" ], [ ".permPluginTemplateRadioAsk", "id", aPermissionString + "#3" ], @@ -283,17 +270,17 @@ function initPluginsRow() { for (let plugin of pluginHost.getPluginTags()) { if (plugin.disabled) { continue; } for (let mimeType of plugin.getMimeTypes()) { let permString = pluginHost.getPermissionStringForType(mimeType); if (!permissionMap.has(permString)) { - var name = makeNicePluginName(plugin.name); + let name = BrowserUtils.makeNicePluginName(plugin.name); if (permString.startsWith("plugin-vulnerable:")) { name += " \u2014 " + vulnerableLabel; } permissionMap.set(permString, name); } } }
--- a/browser/base/content/searchSuggestionUI.js +++ b/browser/base/content/searchSuggestionUI.js @@ -296,16 +296,17 @@ SearchSuggestionUIController.prototype = _speculativeConnect: function () { if (this.engineName) { this._sendMsg("SpeculativeConnect", this.engineName); } }, _makeTableRow: function (type, suggestionStr, currentRow, searchWords) { let row = document.createElementNS(HTML_NS, "tr"); + row.dir = "auto"; row.classList.add("searchSuggestionRow"); row.classList.add(type); row.setAttribute("role", "presentation"); row.addEventListener("mousemove", this); row.addEventListener("mousedown", this); let entry = document.createElementNS(HTML_NS, "td"); entry.classList.add("searchSuggestionEntry"); @@ -360,17 +361,16 @@ SearchSuggestionUIController.prototype = } return row.rowIndex; }, _makeTable: function (id) { this._table = document.createElementNS(HTML_NS, "table"); this._table.id = id; this._table.hidden = true; - this._table.dir = "auto"; this._table.classList.add("searchSuggestionTable"); this._table.setAttribute("role", "listbox"); return this._table; }, _sendMsg: function (type, data=null) { dispatchEvent(new CustomEvent("ContentSearchClient", { detail: {
--- a/browser/base/content/test/general/browser_action_searchengine.js +++ b/browser/base/content/test/general/browser_action_searchengine.js @@ -38,14 +38,16 @@ add_task(function* () { gBrowser.removeTab(tab); } catch(ex) { /* tab may have already been closed in case of failure */ } return promiseClearHistory(); }); let result = yield promise_first_result("open a search"); isnot(result, null, "Should have a result"); + is(result.hasAttribute("image"), false, "Result shouldn't have an image attribute"); + let tabPromise = promiseTabLoaded(gBrowser.selectedTab); EventUtils.synthesizeMouseAtCenter(result, {}); yield tabPromise; is(gBrowser.selectedBrowser.currentURI.spec, "http://example.com/?q=open+a+search"); });
--- a/browser/base/content/test/general/browser_action_searchengine_alias.js +++ b/browser/base/content/test/general/browser_action_searchengine_alias.js @@ -1,42 +1,48 @@ /** * Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ **/ - let gOriginalEngine; +let gOriginalEngine; add_task(function* () { - // This test is only relevant if UnifiedComplete is enabled. - if (!Services.prefs.getBoolPref("browser.urlbar.unifiedcomplete")) - return; + Services.prefs.setBoolPref("browser.urlbar.unifiedcomplete", true); - Services.search.addEngineWithDetails("MozSearch", "", "moz", "", "GET", + let iconURI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC"; + Services.search.addEngineWithDetails("MozSearch", iconURI, "moz", "", "GET", "http://example.com/?q={searchTerms}"); let engine = Services.search.getEngineByName("MozSearch"); gOriginalEngine = Services.search.currentEngine; Services.search.currentEngine = engine; let tab = gBrowser.selectedTab = gBrowser.addTab(); registerCleanupFunction(() => { Services.search.currentEngine = gOriginalEngine; let engine = Services.search.getEngineByName("MozSearch"); Services.search.removeEngine(engine); + Services.prefs.clearUserPref("browser.urlbar.unifiedcomplete"); try { gBrowser.removeTab(tab); } catch(ex) { /* tab may have already been closed in case of failure */ } return promiseClearHistory(); }); gURLBar.focus(); gURLBar.value = "moz open a searc"; EventUtils.synthesizeKey("h" , {}); yield promiseSearchComplete(); + let result = gURLBar.popup.richlistbox.children[0]; + ok(result.hasAttribute("image"), "Result should have an image attribute"); + // Image attribute gets a suffix (-moz-resolution) added in the value. + ok(result.getAttribute("image").startsWith(engine.iconURI.spec), + "Image attribute should have the search engine's icon"); + EventUtils.synthesizeKey("VK_RETURN" , { }); yield promiseTabLoaded(gBrowser.selectedTab); is(gBrowser.selectedBrowser.currentURI.spec, "http://example.com/?q=open+a+search"); });
--- a/browser/base/content/test/general/browser_devedition.js +++ b/browser/base/content/test/general/browser_devedition.js @@ -19,17 +19,19 @@ registerCleanupFunction(() => { }); function test() { waitForExplicitFinish(); startTests(); } function startTests() { - ok (!DevEdition.styleSheet, "There is no devedition style sheet by default."); + info ("Setting browser.devedition.theme.enabled to false."); + Services.prefs.setBoolPref(PREF_DEVEDITION_THEME, false); + ok (!DevEdition.styleSheet, "There is no devedition style sheet when the pref is false."); info ("Setting browser.devedition.theme.enabled to true."); Services.prefs.setBoolPref(PREF_DEVEDITION_THEME, true); ok (DevEdition.styleSheet, "There is a devedition stylesheet when no themes are applied and pref is set."); info ("Adding a lightweight theme."); Services.prefs.setBoolPref(PREF_LWTHEME, true); ok (!DevEdition.styleSheet, "The devedition stylesheet has been removed when a lightweight theme is applied."); @@ -48,16 +50,17 @@ function startTests() { Services.prefs.clearUserPref(PREF_THEME); ok (DevEdition.styleSheet, "The devedition stylesheet is still here when a complete theme is removed."); info ("Setting browser.devedition.theme.enabled to false."); Services.prefs.setBoolPref(PREF_DEVEDITION_THEME, false); ok (!DevEdition.styleSheet, "The devedition stylesheet has been removed."); info ("Checking :root attributes based on devtools theme."); + Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light"); is (document.documentElement.getAttribute("devtoolstheme"), "light", "The documentElement has an attribute based on devtools theme."); Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark"); is (document.documentElement.getAttribute("devtoolstheme"), "dark", "The documentElement has an attribute based on devtools theme."); Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light"); is (document.documentElement.getAttribute("devtoolstheme"), "light", "The documentElement has an attribute based on devtools theme.");
--- a/browser/components/loop/content/conversation.html +++ b/browser/components/loop/content/conversation.html @@ -15,17 +15,17 @@ <div id="messages"></div> <div id="main"></div> <script type="text/javascript" src="loop/libs/l10n.js"></script> <script type="text/javascript" src="loop/js/otconfig.js"></script> <script type="text/javascript" src="loop/libs/sdk.js"></script> - <script type="text/javascript" src="loop/shared/libs/react-0.11.1.js"></script> + <script type="text/javascript" src="loop/shared/libs/react-0.11.2.js"></script> <script type="text/javascript" src="loop/shared/libs/jquery-2.1.0.js"></script> <script type="text/javascript" src="loop/shared/libs/lodash-2.4.1.js"></script> <script type="text/javascript" src="loop/shared/libs/backbone-1.1.2.js"></script> <script type="text/javascript" src="loop/shared/js/utils.js"></script> <script type="text/javascript" src="loop/shared/js/models.js"></script> <script type="text/javascript" src="loop/shared/js/mixins.js"></script> <script type="text/javascript" src="loop/shared/js/views.js"></script>
--- a/browser/components/loop/content/panel.html +++ b/browser/components/loop/content/panel.html @@ -9,17 +9,17 @@ <link rel="stylesheet" type="text/css" href="loop/shared/css/common.css"> <link rel="stylesheet" type="text/css" href="loop/shared/css/panel.css"> <link rel="stylesheet" type="text/css" href="loop/shared/css/contacts.css"> </head> <body class="panel"> <div id="main"></div> - <script type="text/javascript" src="loop/shared/libs/react-0.11.1.js"></script> + <script type="text/javascript" src="loop/shared/libs/react-0.11.2.js"></script> <script type="text/javascript" src="loop/libs/l10n.js"></script> <script type="text/javascript" src="loop/shared/libs/jquery-2.1.0.js"></script> <script type="text/javascript" src="loop/shared/libs/lodash-2.4.1.js"></script> <script type="text/javascript" src="loop/shared/libs/backbone-1.1.2.js"></script> <script type="text/javascript" src="loop/shared/js/utils.js"></script> <script type="text/javascript" src="loop/shared/js/models.js"></script> <script type="text/javascript" src="loop/shared/js/mixins.js"></script>
rename from browser/components/loop/content/shared/libs/react-0.11.1-prod.js rename to browser/components/loop/content/shared/libs/react-0.11.2-prod.js --- a/browser/components/loop/content/shared/libs/react-0.11.1-prod.js +++ b/browser/components/loop/content/shared/libs/react-0.11.2-prod.js @@ -1,22 +1,22 @@ /** - * React (with addons) v0.11.1 + * React (with addons) v0.11.2 * * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t){"use strict";var n=e("./focusNode"),r={componentDidMount:function(){this.props.autoFocus&&n(this.getDOMNode())}};t.exports=r},{"./focusNode":117}],2:[function(e,t){"use strict";function n(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function r(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}var o=e("./EventConstants"),i=e("./EventPropagators"),a=e("./ExecutionEnvironment"),s=e("./SyntheticInputEvent"),u=e("./keyOf"),c=a.canUseDOM&&"TextEvent"in window&&!("documentMode"in document||n()),l=32,p=String.fromCharCode(l),d=o.topLevelTypes,f={beforeInput:{phasedRegistrationNames:{bubbled:u({onBeforeInput:null}),captured:u({onBeforeInputCapture:null})},dependencies:[d.topCompositionEnd,d.topKeyPress,d.topTextInput,d.topPaste]}},h=null,v={eventTypes:f,extractEvents:function(e,t,n,o){var a;if(c)switch(e){case d.topKeyPress:var u=o.which;if(u!==l)return;a=String.fromCharCode(u);break;case d.topTextInput:if(a=o.data,a===p)return;break;default:return}else{switch(e){case d.topPaste:h=null;break;case d.topKeyPress:o.which&&!r(o)&&(h=String.fromCharCode(o.which));break;case d.topCompositionEnd:h=o.data}if(null===h)return;a=h}if(a){var v=s.getPooled(f.beforeInput,n,o);return v.data=a,h=null,i.accumulateTwoPhaseDispatches(v),v}}};t.exports=v},{"./EventConstants":16,"./EventPropagators":21,"./ExecutionEnvironment":22,"./SyntheticInputEvent":95,"./keyOf":138}],3:[function(e,t){var n=e("./invariant"),r={addClass:function(e,t){return n(!/\s/.test(t)),t&&(e.classList?e.classList.add(t):r.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return n(!/\s/.test(t)),t&&(e.classList?e.classList.remove(t):r.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?r.addClass:r.removeClass)(e,t)},hasClass:function(e,t){return n(!/\s/.test(t)),e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}};t.exports=r},{"./invariant":131}],4:[function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={columnCount:!0,fillOpacity:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};t.exports=a},{}],5:[function(e,t){"use strict";var n=e("./CSSProperty"),r=e("./dangerousStyleValue"),o=e("./hyphenateStyleName"),i=e("./memoizeStringOnly"),a=i(function(e){return o(e)}),s={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];null!=o&&(t+=a(n)+":",t+=r(n,o)+";")}return t||null},setValueForStyles:function(e,t){var o=e.style;for(var i in t)if(t.hasOwnProperty(i)){var a=r(i,t[i]);if(a)o[i]=a;else{var s=n.shorthandPropertyExpansions[i];if(s)for(var u in s)o[u]="";else o[i]=""}}}};t.exports=s},{"./CSSProperty":4,"./dangerousStyleValue":112,"./hyphenateStyleName":129,"./memoizeStringOnly":140}],6:[function(e,t){"use strict";function n(){this._callbacks=null,this._contexts=null}var r=e("./PooledClass"),o=e("./invariant"),i=e("./mixInto");i(n,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){o(e.length===t.length),this._callbacks=null,this._contexts=null;for(var n=0,r=e.length;r>n;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),r.addPoolingTo(n),t.exports=n},{"./PooledClass":28,"./invariant":131,"./mixInto":144}],7:[function(e,t){"use strict";function n(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function r(e){var t=M.getPooled(P.change,S,e);C.accumulateTwoPhaseDispatches(t),R.batchedUpdates(o,t)}function o(e){y.enqueueEvents(e),y.processEventQueue()}function i(e,t){T=e,S=t,T.attachEvent("onchange",r)}function a(){T&&(T.detachEvent("onchange",r),T=null,S=null)}function s(e,t,n){return e===O.topChange?n:void 0}function u(e,t,n){e===O.topFocus?(a(),i(t,n)):e===O.topBlur&&a()}function c(e,t){T=e,S=t,w=e.value,_=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(T,"value",k),T.attachEvent("onpropertychange",p)}function l(){T&&(delete T.value,T.detachEvent("onpropertychange",p),T=null,S=null,w=null,_=null)}function p(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==w&&(w=t,r(e))}}function d(e,t,n){return e===O.topInput?n:void 0}function f(e,t,n){e===O.topFocus?(l(),c(t,n)):e===O.topBlur&&l()}function h(e){return e!==O.topSelectionChange&&e!==O.topKeyUp&&e!==O.topKeyDown||!T||T.value===w?void 0:(w=T.value,S)}function v(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function m(e,t,n){return e===O.topClick?n:void 0}var g=e("./EventConstants"),y=e("./EventPluginHub"),C=e("./EventPropagators"),E=e("./ExecutionEnvironment"),R=e("./ReactUpdates"),M=e("./SyntheticEvent"),D=e("./isEventSupported"),x=e("./isTextInputElement"),b=e("./keyOf"),O=g.topLevelTypes,P={change:{phasedRegistrationNames:{bubbled:b({onChange:null}),captured:b({onChangeCapture:null})},dependencies:[O.topBlur,O.topChange,O.topClick,O.topFocus,O.topInput,O.topKeyDown,O.topKeyUp,O.topSelectionChange]}},T=null,S=null,w=null,_=null,I=!1;E.canUseDOM&&(I=D("change")&&(!("documentMode"in document)||document.documentMode>8));var N=!1;E.canUseDOM&&(N=D("input")&&(!("documentMode"in document)||document.documentMode>9));var k={get:function(){return _.get.call(this)},set:function(e){w=""+e,_.set.call(this,e)}},A={eventTypes:P,extractEvents:function(e,t,r,o){var i,a;if(n(t)?I?i=s:a=u:x(t)?N?i=d:(i=h,a=f):v(t)&&(i=m),i){var c=i(e,t,r);if(c){var l=M.getPooled(P.change,c,o);return C.accumulateTwoPhaseDispatches(l),l}}a&&a(e,t,r)}};t.exports=A},{"./EventConstants":16,"./EventPluginHub":18,"./EventPropagators":21,"./ExecutionEnvironment":22,"./ReactUpdates":84,"./SyntheticEvent":93,"./isEventSupported":132,"./isTextInputElement":134,"./keyOf":138}],8:[function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};t.exports=r},{}],9:[function(e,t){"use strict";function n(e){switch(e){case g.topCompositionStart:return C.compositionStart;case g.topCompositionEnd:return C.compositionEnd;case g.topCompositionUpdate:return C.compositionUpdate}}function r(e,t){return e===g.topKeyDown&&t.keyCode===h}function o(e,t){switch(e){case g.topKeyUp:return-1!==f.indexOf(t.keyCode);case g.topKeyDown:return t.keyCode!==h;case g.topKeyPress:case g.topMouseDown:case g.topBlur:return!0;default:return!1}}function i(e){this.root=e,this.startSelection=c.getSelection(e),this.startValue=this.getText()}var a=e("./EventConstants"),s=e("./EventPropagators"),u=e("./ExecutionEnvironment"),c=e("./ReactInputSelection"),l=e("./SyntheticCompositionEvent"),p=e("./getTextContentAccessor"),d=e("./keyOf"),f=[9,13,27,32],h=229,v=u.canUseDOM&&"CompositionEvent"in window,m=!v||"documentMode"in document&&document.documentMode>8&&document.documentMode<=11,g=a.topLevelTypes,y=null,C={compositionEnd:{phasedRegistrationNames:{bubbled:d({onCompositionEnd:null}),captured:d({onCompositionEndCapture:null})},dependencies:[g.topBlur,g.topCompositionEnd,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:d({onCompositionStart:null}),captured:d({onCompositionStartCapture:null})},dependencies:[g.topBlur,g.topCompositionStart,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:d({onCompositionUpdate:null}),captured:d({onCompositionUpdateCapture:null})},dependencies:[g.topBlur,g.topCompositionUpdate,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]}};i.prototype.getText=function(){return this.root.value||this.root[p()]},i.prototype.getData=function(){var e=this.getText(),t=this.startSelection.start,n=this.startValue.length-this.startSelection.end;return e.substr(t,e.length-n-t)};var E={eventTypes:C,extractEvents:function(e,t,a,u){var c,p;if(v?c=n(e):y?o(e,u)&&(c=C.compositionEnd):r(e,u)&&(c=C.compositionStart),m&&(y||c!==C.compositionStart?c===C.compositionEnd&&y&&(p=y.getData(),y=null):y=new i(t)),c){var d=l.getPooled(c,a,u);return p&&(d.data=p),s.accumulateTwoPhaseDispatches(d),d}}};t.exports=E},{"./EventConstants":16,"./EventPropagators":21,"./ExecutionEnvironment":22,"./ReactInputSelection":61,"./SyntheticCompositionEvent":91,"./getTextContentAccessor":126,"./keyOf":138}],10:[function(e,t){"use strict";function n(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var r,o=e("./Danger"),i=e("./ReactMultiChildUpdateTypes"),a=e("./getTextContentAccessor"),s=e("./invariant"),u=a();r="textContent"===u?function(e,t){e.textContent=t}:function(e,t){for(;e.firstChild;)e.removeChild(e.firstChild);if(t){var n=e.ownerDocument||document;e.appendChild(n.createTextNode(t))}};var c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:r,processUpdates:function(e,t){for(var a,u=null,c=null,l=0;a=e[l];l++)if(a.type===i.MOVE_EXISTING||a.type===i.REMOVE_NODE){var p=a.fromIndex,d=a.parentNode.childNodes[p],f=a.parentID;s(d),u=u||{},u[f]=u[f]||[],u[f][p]=d,c=c||[],c.push(d)}var h=o.dangerouslyRenderMarkup(t);if(c)for(var v=0;v<c.length;v++)c[v].parentNode.removeChild(c[v]);for(var m=0;a=e[m];m++)switch(a.type){case i.INSERT_MARKUP:n(a.parentNode,h[a.markupIndex],a.toIndex);break;case i.MOVE_EXISTING:n(a.parentNode,u[a.parentID][a.fromIndex],a.toIndex);break;case i.TEXT_CONTENT:r(a.parentNode,a.textContent);break;case i.REMOVE_NODE:}}};t.exports=c},{"./Danger":13,"./ReactMultiChildUpdateTypes":67,"./getTextContentAccessor":126,"./invariant":131}],11:[function(e,t){"use strict";var n=e("./invariant"),r={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=e.Properties||{},o=e.DOMAttributeNames||{},a=e.DOMPropertyNames||{},s=e.DOMMutationMethods||{};e.isCustomAttribute&&i._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var u in t){n(!i.isStandardName.hasOwnProperty(u)),i.isStandardName[u]=!0;var c=u.toLowerCase();if(i.getPossibleStandardName[c]=u,o.hasOwnProperty(u)){var l=o[u];i.getPossibleStandardName[l]=u,i.getAttributeName[u]=l}else i.getAttributeName[u]=c;i.getPropertyName[u]=a.hasOwnProperty(u)?a[u]:u,i.getMutationMethod[u]=s.hasOwnProperty(u)?s[u]:null;var p=t[u];i.mustUseAttribute[u]=p&r.MUST_USE_ATTRIBUTE,i.mustUseProperty[u]=p&r.MUST_USE_PROPERTY,i.hasSideEffects[u]=p&r.HAS_SIDE_EFFECTS,i.hasBooleanValue[u]=p&r.HAS_BOOLEAN_VALUE,i.hasNumericValue[u]=p&r.HAS_NUMERIC_VALUE,i.hasPositiveNumericValue[u]=p&r.HAS_POSITIVE_NUMERIC_VALUE,i.hasOverloadedBooleanValue[u]=p&r.HAS_OVERLOADED_BOOLEAN_VALUE,n(!i.mustUseAttribute[u]||!i.mustUseProperty[u]),n(i.mustUseProperty[u]||!i.hasSideEffects[u]),n(!!i.hasBooleanValue[u]+!!i.hasNumericValue[u]+!!i.hasOverloadedBooleanValue[u]<=1)}}},o={},i={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<i._isCustomAttributeFunctions.length;t++){var n=i._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=o[e];return r||(o[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:r};t.exports=i},{"./invariant":131}],12:[function(e,t){"use strict";function n(e,t){return null==t||r.hasBooleanValue[e]&&!t||r.hasNumericValue[e]&&isNaN(t)||r.hasPositiveNumericValue[e]&&1>t||r.hasOverloadedBooleanValue[e]&&t===!1}var r=e("./DOMProperty"),o=e("./escapeTextForBrowser"),i=e("./memoizeStringOnly"),a=(e("./warning"),i(function(e){return o(e)+'="'})),s={createMarkupForID:function(e){return a(r.ID_ATTRIBUTE_NAME)+o(e)+'"'},createMarkupForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(e)&&r.isStandardName[e]){if(n(e,t))return"";var i=r.getAttributeName[e];return r.hasBooleanValue[e]||r.hasOverloadedBooleanValue[e]&&t===!0?o(i):a(i)+o(t)+'"'}return r.isCustomAttribute(e)?null==t?"":a(e)+o(t)+'"':null},setValueForProperty:function(e,t,o){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var i=r.getMutationMethod[t];if(i)i(e,o);else if(n(t,o))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute[t])e.setAttribute(r.getAttributeName[t],""+o);else{var a=r.getPropertyName[t];r.hasSideEffects[t]&&e[a]===o||(e[a]=o)}}else r.isCustomAttribute(t)&&(null==o?e.removeAttribute(t):e.setAttribute(t,""+o))},deleteValueForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var n=r.getMutationMethod[t];if(n)n(e,void 0);else if(r.mustUseAttribute[t])e.removeAttribute(r.getAttributeName[t]);else{var o=r.getPropertyName[t],i=r.getDefaultValueForProperty(e.nodeName,o);r.hasSideEffects[t]&&e[o]===i||(e[o]=i)}}else r.isCustomAttribute(t)&&e.removeAttribute(t)}};t.exports=s},{"./DOMProperty":11,"./escapeTextForBrowser":115,"./memoizeStringOnly":140,"./warning":153}],13:[function(e,t){"use strict";function n(e){return e.substring(1,e.indexOf(" "))}var r=e("./ExecutionEnvironment"),o=e("./createNodesFromMarkup"),i=e("./emptyFunction"),a=e("./getMarkupWrap"),s=e("./invariant"),u=/^(<[^ \/>]+)/,c="data-danger-index",l={dangerouslyRenderMarkup:function(e){s(r.canUseDOM);for(var t,l={},p=0;p<e.length;p++)s(e[p]),t=n(e[p]),t=a(t)?t:"*",l[t]=l[t]||[],l[t][p]=e[p];var d=[],f=0;for(t in l)if(l.hasOwnProperty(t)){var h=l[t];for(var v in h)if(h.hasOwnProperty(v)){var m=h[v];h[v]=m.replace(u,"$1 "+c+'="'+v+'" ')}var g=o(h.join(""),i);for(p=0;p<g.length;++p){var y=g[p];y.hasAttribute&&y.hasAttribute(c)&&(v=+y.getAttribute(c),y.removeAttribute(c),s(!d.hasOwnProperty(v)),d[v]=y,f+=1)}}return s(f===d.length),s(d.length===e.length),d},dangerouslyReplaceNodeWithMarkup:function(e,t){s(r.canUseDOM),s(t),s("html"!==e.tagName.toLowerCase());var n=o(t,i)[0];e.parentNode.replaceChild(n,e)}};t.exports=l},{"./ExecutionEnvironment":22,"./createNodesFromMarkup":110,"./emptyFunction":113,"./getMarkupWrap":123,"./invariant":131}],14:[function(e,t){"use strict";var n=e("./keyOf"),r=[n({ResponderEventPlugin:null}),n({SimpleEventPlugin:null}),n({TapEventPlugin:null}),n({EnterLeaveEventPlugin:null}),n({ChangeEventPlugin:null}),n({SelectEventPlugin:null}),n({CompositionEventPlugin:null}),n({BeforeInputEventPlugin:null}),n({AnalyticsEventPlugin:null}),n({MobileSafariClickEventPlugin:null})];t.exports=r},{"./keyOf":138}],15:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./EventPropagators"),o=e("./SyntheticMouseEvent"),i=e("./ReactMount"),a=e("./keyOf"),s=n.topLevelTypes,u=i.getFirstReactDOM,c={mouseEnter:{registrationName:a({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:a({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},l=[null,null],p={eventTypes:c,extractEvents:function(e,t,n,a){if(e===s.topMouseOver&&(a.relatedTarget||a.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var p;if(t.window===t)p=t;else{var d=t.ownerDocument;p=d?d.defaultView||d.parentWindow:window}var f,h;if(e===s.topMouseOut?(f=t,h=u(a.relatedTarget||a.toElement)||p):(f=p,h=t),f===h)return null;var v=f?i.getID(f):"",m=h?i.getID(h):"",g=o.getPooled(c.mouseLeave,v,a);g.type="mouseleave",g.target=f,g.relatedTarget=h;var y=o.getPooled(c.mouseEnter,m,a);return y.type="mouseenter",y.target=h,y.relatedTarget=f,r.accumulateEnterLeaveDispatches(g,y,v,m),l[0]=g,l[1]=y,l}};t.exports=p},{"./EventConstants":16,"./EventPropagators":21,"./ReactMount":65,"./SyntheticMouseEvent":97,"./keyOf":138}],16:[function(e,t){"use strict";var n=e("./keyMirror"),r=n({bubbled:null,captured:null}),o=n({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),i={topLevelTypes:o,PropagationPhases:r};t.exports=i},{"./keyMirror":137}],17:[function(e,t){var n=e("./emptyFunction"),r={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,r){return e.addEventListener?(e.addEventListener(t,r,!0),{remove:function(){e.removeEventListener(t,r,!0)}}):{remove:n}},registerDefault:function(){}};t.exports=r},{"./emptyFunction":113}],18:[function(e,t){"use strict";var n=e("./EventPluginRegistry"),r=e("./EventPluginUtils"),o=e("./accumulate"),i=e("./forEachAccumulated"),a=e("./invariant"),s=(e("./isEventSupported"),e("./monitorCodeUse"),{}),u=null,c=function(e){if(e){var t=r.executeDispatch,o=n.getPluginModuleForEvent(e);o&&o.executeDispatch&&(t=o.executeDispatch),r.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},l=null,p={injection:{injectMount:r.injection.injectMount,injectInstanceHandle:function(e){l=e},getInstanceHandle:function(){return l},injectEventPluginOrder:n.injectEventPluginOrder,injectEventPluginsByName:n.injectEventPluginsByName},eventNameDispatchConfigs:n.eventNameDispatchConfigs,registrationNameModules:n.registrationNameModules,putListener:function(e,t,n){a(!n||"function"==typeof n);var r=s[t]||(s[t]={});r[e]=n},getListener:function(e,t){var n=s[t];return n&&n[e]},deleteListener:function(e,t){var n=s[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in s)delete s[t][e]},extractEvents:function(e,t,r,i){for(var a,s=n.plugins,u=0,c=s.length;c>u;u++){var l=s[u];if(l){var p=l.extractEvents(e,t,r,i);p&&(a=o(a,p))}}return a},enqueueEvents:function(e){e&&(u=o(u,e))},processEventQueue:function(){var e=u;u=null,i(e,c),a(!u)},__purge:function(){s={}},__getListenerBank:function(){return s}};t.exports=p},{"./EventPluginRegistry":19,"./EventPluginUtils":20,"./accumulate":103,"./forEachAccumulated":118,"./invariant":131,"./isEventSupported":132,"./monitorCodeUse":145}],19:[function(e,t){"use strict";function n(){if(a)for(var e in s){var t=s[e],n=a.indexOf(e);if(i(n>-1),!u.plugins[n]){i(t.extractEvents),u.plugins[n]=t;var o=t.eventTypes;for(var c in o)i(r(o[c],t,c))}}}function r(e,t,n){i(!u.eventNameDispatchConfigs.hasOwnProperty(n)),u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var a in r)if(r.hasOwnProperty(a)){var s=r[a];o(s,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){i(!u.registrationNameModules[e]),u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e("./invariant"),a=null,s={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){i(!a),a=Array.prototype.slice.call(e),n()},injectEventPluginsByName:function(e){var t=!1;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];s.hasOwnProperty(r)&&s[r]===o||(i(!s[r]),s[r]=o,t=!0)}t&&n()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){a=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=u},{"./invariant":131}],20:[function(e,t){"use strict";function n(e){return e===v.topMouseUp||e===v.topTouchEnd||e===v.topTouchCancel}function r(e){return e===v.topMouseMove||e===v.topTouchMove}function o(e){return e===v.topMouseDown||e===v.topTouchStart}function i(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)t(e,n[o],r[o]);else n&&t(e,n,r)}function a(e,t,n){e.currentTarget=h.Mount.getNode(n);var r=t(e,n);return e.currentTarget=null,r}function s(e,t){i(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function u(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function c(e){var t=u(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function l(e){var t=e._dispatchListeners,n=e._dispatchIDs;f(!Array.isArray(t));var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function p(e){return!!e._dispatchListeners}var d=e("./EventConstants"),f=e("./invariant"),h={Mount:null,injectMount:function(e){h.Mount=e}},v=d.topLevelTypes,m={isEndish:n,isMoveish:r,isStartish:o,executeDirectDispatch:l,executeDispatch:a,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:c,hasDispatches:p,injection:h,useTouchEvents:!1};t.exports=m},{"./EventConstants":16,"./invariant":131}],21:[function(e,t){"use strict";function n(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return v(e,r)}function r(e,t,r){var o=t?h.bubbled:h.captured,i=n(e,r,o);i&&(r._dispatchListeners=d(r._dispatchListeners,i),r._dispatchIDs=d(r._dispatchIDs,e))}function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&p.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,r,e)}function i(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=v(e,r);o&&(n._dispatchListeners=d(n._dispatchListeners,o),n._dispatchIDs=d(n._dispatchIDs,e))}}function a(e){e&&e.dispatchConfig.registrationName&&i(e.dispatchMarker,null,e)}function s(e){f(e,o)}function u(e,t,n,r){p.injection.getInstanceHandle().traverseEnterLeave(n,r,i,e,t)}function c(e){f(e,a)}var l=e("./EventConstants"),p=e("./EventPluginHub"),d=e("./accumulate"),f=e("./forEachAccumulated"),h=l.PropagationPhases,v=p.getListener,m={accumulateTwoPhaseDispatches:s,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:u};t.exports=m},{"./EventConstants":16,"./EventPluginHub":18,"./accumulate":103,"./forEachAccumulated":118}],22:[function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};t.exports=r},{}],23:[function(e,t){"use strict";var n,r=e("./DOMProperty"),o=e("./ExecutionEnvironment"),i=r.injection.MUST_USE_ATTRIBUTE,a=r.injection.MUST_USE_PROPERTY,s=r.injection.HAS_BOOLEAN_VALUE,u=r.injection.HAS_SIDE_EFFECTS,c=r.injection.HAS_NUMERIC_VALUE,l=r.injection.HAS_POSITIVE_NUMERIC_VALUE,p=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(o.canUseDOM){var d=document.implementation;n=d&&d.hasFeature&&d.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var f={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,accessKey:null,action:null,allowFullScreen:i|s,allowTransparency:i,alt:null,async:s,autoComplete:null,autoPlay:s,cellPadding:null,cellSpacing:null,charSet:i,checked:a|s,className:n?i:a,cols:i|l,colSpan:null,content:null,contentEditable:null,contextMenu:i,controls:a|s,coords:null,crossOrigin:null,data:null,dateTime:i,defer:s,dir:null,disabled:i|s,download:p,draggable:null,encType:null,form:i,formNoValidate:s,frameBorder:i,height:i,hidden:i|s,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:a,label:null,lang:null,list:null,loop:a|s,max:null,maxLength:i,mediaGroup:null,method:null,min:null,multiple:a|s,muted:a|s,name:null,noValidate:s,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:a|s,rel:null,required:s,role:i,rows:i|l,rowSpan:null,sandbox:null,scope:null,scrollLeft:a,scrolling:null,scrollTop:a,seamless:i|s,selected:a|s,shape:null,size:i|l,span:l,spellCheck:null,src:null,srcDoc:a,srcSet:null,start:c,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:a|u,width:i,wmode:i,autoCapitalize:null,autoCorrect:null,itemProp:i,itemScope:i|s,itemType:i,property:null},DOMAttributeNames:{className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"enctype",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=f},{"./DOMProperty":11,"./ExecutionEnvironment":22}],24:[function(e,t){"use strict";var n=e("./ReactLink"),r=e("./ReactStateSetters"),o={linkState:function(e){return new n(this.state[e],r.createStateKeySetter(this,e))}};t.exports=o},{"./ReactLink":63,"./ReactStateSetters":79}],25:[function(e,t){"use strict";function n(e){u(null==e.props.checkedLink||null==e.props.valueLink)}function r(e){n(e),u(null==e.props.value&&null==e.props.onChange)}function o(e){n(e),u(null==e.props.checked&&null==e.props.onChange)}function i(e){this.props.valueLink.requestChange(e.target.value)}function a(e){this.props.checkedLink.requestChange(e.target.checked)}var s=e("./ReactPropTypes"),u=e("./invariant"),c={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},l={Mixin:{propTypes:{value:function(e,t){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?void 0:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t){return!e[t]||e.onChange||e.readOnly||e.disabled?void 0:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func}},getValue:function(e){return e.props.valueLink?(r(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(o(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(r(e),i):e.props.checkedLink?(o(e),a):e.props.onChange}};t.exports=l},{"./ReactPropTypes":73,"./invariant":131}],26:[function(e,t){"use strict";function n(e){e.remove()}var r=e("./ReactBrowserEventEmitter"),o=e("./accumulate"),i=e("./forEachAccumulated"),a=e("./invariant"),s={trapBubbledEvent:function(e,t){a(this.isMounted());var n=r.trapBubbledEvent(e,t,this.getDOMNode());this._localEventListeners=o(this._localEventListeners,n)},componentWillUnmount:function(){this._localEventListeners&&i(this._localEventListeners,n)}};t.exports=s},{"./ReactBrowserEventEmitter":31,"./accumulate":103,"./forEachAccumulated":118,"./invariant":131}],27:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./emptyFunction"),o=n.topLevelTypes,i={eventTypes:null,extractEvents:function(e,t,n,i){if(e===o.topTouchStart){var a=i.target;a&&!a.onclick&&(a.onclick=r)}}};t.exports=i},{"./EventConstants":16,"./emptyFunction":113}],28:[function(e,t){"use strict";var n=e("./invariant"),r=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},o=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},a=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},s=function(e){var t=this;n(e instanceof t),e.destructor&&e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},u=10,c=r,l=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||c,n.poolSize||(n.poolSize=u),n.release=s,n},p={addPoolingTo:l,oneArgumentPooler:r,twoArgumentPooler:o,threeArgumentPooler:i,fiveArgumentPooler:a};t.exports=p},{"./invariant":131}],29:[function(e,t){"use strict";var n=e("./DOMPropertyOperations"),r=e("./EventPluginUtils"),o=e("./ReactChildren"),i=e("./ReactComponent"),a=e("./ReactCompositeComponent"),s=e("./ReactContext"),u=e("./ReactCurrentOwner"),c=e("./ReactDescriptor"),l=e("./ReactDOM"),p=e("./ReactDOMComponent"),d=e("./ReactDefaultInjection"),f=e("./ReactInstanceHandles"),h=e("./ReactMount"),v=e("./ReactMultiChild"),m=e("./ReactPerf"),g=e("./ReactPropTypes"),y=e("./ReactServerRendering"),C=e("./ReactTextComponent"),E=e("./onlyChild");d.inject();var R={Children:{map:o.map,forEach:o.forEach,count:o.count,only:E},DOM:l,PropTypes:g,initializeTouchEvents:function(e){r.useTouchEvents=e},createClass:a.createClass,createDescriptor:function(e){var t=Array.prototype.slice.call(arguments,1);return e.apply(null,t)},constructAndRenderComponent:h.constructAndRenderComponent,constructAndRenderComponentByID:h.constructAndRenderComponentByID,renderComponent:m.measure("React","renderComponent",h.renderComponent),renderComponentToString:y.renderComponentToString,renderComponentToStaticMarkup:y.renderComponentToStaticMarkup,unmountComponentAtNode:h.unmountComponentAtNode,isValidClass:c.isValidFactory,isValidComponent:c.isValidDescriptor,withContext:s.withContext,__internals:{Component:i,CurrentOwner:u,DOMComponent:p,DOMPropertyOperations:n,InstanceHandles:f,Mount:h,MultiChild:v,TextComponent:C}};R.version="0.11.1",t.exports=R},{"./DOMPropertyOperations":12,"./EventPluginUtils":20,"./ReactChildren":34,"./ReactComponent":35,"./ReactCompositeComponent":38,"./ReactContext":39,"./ReactCurrentOwner":40,"./ReactDOM":41,"./ReactDOMComponent":43,"./ReactDefaultInjection":53,"./ReactDescriptor":54,"./ReactInstanceHandles":62,"./ReactMount":65,"./ReactMultiChild":66,"./ReactPerf":69,"./ReactPropTypes":73,"./ReactServerRendering":77,"./ReactTextComponent":80,"./onlyChild":146}],30:[function(e,t){"use strict"; -var n=e("./ReactEmptyComponent"),r=e("./ReactMount"),o=e("./invariant"),i={getDOMNode:function(){return o(this.isMounted()),n.isNullComponentID(this._rootNodeID)?null:r.getNode(this._rootNodeID)}};t.exports=i},{"./ReactEmptyComponent":56,"./ReactMount":65,"./invariant":131}],31:[function(e,t){"use strict";function n(e){return Object.prototype.hasOwnProperty.call(e,h)||(e[h]=d++,l[e[h]]={}),l[e[h]]}var r=e("./EventConstants"),o=e("./EventPluginHub"),i=e("./EventPluginRegistry"),a=e("./ReactEventEmitterMixin"),s=e("./ViewportMetrics"),u=e("./isEventSupported"),c=e("./merge"),l={},p=!1,d=0,f={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},h="_reactListenersID"+String(Math.random()).slice(2),v=c(a,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var o=t,a=n(o),s=i.registrationNameDependencies[e],c=r.topLevelTypes,l=0,p=s.length;p>l;l++){var d=s[l];a.hasOwnProperty(d)&&a[d]||(d===c.topWheel?u("wheel")?v.ReactEventListener.trapBubbledEvent(c.topWheel,"wheel",o):u("mousewheel")?v.ReactEventListener.trapBubbledEvent(c.topWheel,"mousewheel",o):v.ReactEventListener.trapBubbledEvent(c.topWheel,"DOMMouseScroll",o):d===c.topScroll?u("scroll",!0)?v.ReactEventListener.trapCapturedEvent(c.topScroll,"scroll",o):v.ReactEventListener.trapBubbledEvent(c.topScroll,"scroll",v.ReactEventListener.WINDOW_HANDLE):d===c.topFocus||d===c.topBlur?(u("focus",!0)?(v.ReactEventListener.trapCapturedEvent(c.topFocus,"focus",o),v.ReactEventListener.trapCapturedEvent(c.topBlur,"blur",o)):u("focusin")&&(v.ReactEventListener.trapBubbledEvent(c.topFocus,"focusin",o),v.ReactEventListener.trapBubbledEvent(c.topBlur,"focusout",o)),a[c.topBlur]=!0,a[c.topFocus]=!0):f.hasOwnProperty(d)&&v.ReactEventListener.trapBubbledEvent(d,f[d],o),a[d]=!0)}},trapBubbledEvent:function(e,t,n){return v.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return v.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!p){var e=s.refreshScrollValues;v.ReactEventListener.monitorScrollValue(e),p=!0}},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:o.putListener,getListener:o.getListener,deleteListener:o.deleteListener,deleteAllListeners:o.deleteAllListeners});t.exports=v},{"./EventConstants":16,"./EventPluginHub":18,"./EventPluginRegistry":19,"./ReactEventEmitterMixin":58,"./ViewportMetrics":102,"./isEventSupported":132,"./merge":141}],32:[function(e,t){"use strict";var n=e("./React"),r=e("./ReactTransitionGroup"),o=e("./ReactCSSTransitionGroupChild"),i=n.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:n.PropTypes.string.isRequired,transitionEnter:n.PropTypes.bool,transitionLeave:n.PropTypes.bool},getDefaultProps:function(){return{transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return o({name:this.props.transitionName,enter:this.props.transitionEnter,leave:this.props.transitionLeave},e)},render:function(){return this.transferPropsTo(r({childFactory:this._wrapChild},this.props.children))}});t.exports=i},{"./React":29,"./ReactCSSTransitionGroupChild":33,"./ReactTransitionGroup":83}],33:[function(e,t){"use strict";var n=e("./React"),r=e("./CSSCore"),o=e("./ReactTransitionEvents"),i=e("./onlyChild"),a=17,s=n.createClass({displayName:"ReactCSSTransitionGroupChild",transition:function(e,t){var n=this.getDOMNode(),i=this.props.name+"-"+e,a=i+"-active",s=function(){r.removeClass(n,i),r.removeClass(n,a),o.removeEndEventListener(n,s),t&&t()};o.addEndEventListener(n,s),r.addClass(n,i),this.queueClass(a)},queueClass:function(e){this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,a))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(r.addClass.bind(r,this.getDOMNode())),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout)},componentWillEnter:function(e){this.props.enter?this.transition("enter",e):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e):e()},render:function(){return i(this.props.children)}});t.exports=s},{"./CSSCore":3,"./React":29,"./ReactTransitionEvents":82,"./onlyChild":146}],34:[function(e,t){"use strict";function n(e,t){this.forEachFunction=e,this.forEachContext=t}function r(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function o(e,t,o){if(null==e)return e;var i=n.getPooled(t,o);p(e,r,i),n.release(i)}function i(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function a(e,t,n,r){var o=e,i=o.mapResult,a=!i.hasOwnProperty(n);if(a){var s=o.mapFunction.call(o.mapContext,t,r);i[n]=s}}function s(e,t,n){if(null==e)return e;var r={},o=i.getPooled(r,t,n);return p(e,a,o),i.release(o),r}function u(){return null}function c(e){return p(e,u,null)}var l=e("./PooledClass"),p=e("./traverseAllChildren"),d=(e("./warning"),l.twoArgumentPooler),f=l.threeArgumentPooler;l.addPoolingTo(n,d),l.addPoolingTo(i,f);var h={forEach:o,map:s,count:c};t.exports=h},{"./PooledClass":28,"./traverseAllChildren":151,"./warning":153}],35:[function(e,t){"use strict";var n=e("./ReactDescriptor"),r=e("./ReactOwner"),o=e("./ReactUpdates"),i=e("./invariant"),a=e("./keyMirror"),s=e("./merge"),u=a({MOUNTED:null,UNMOUNTED:null}),c=!1,l=null,p=null,d={injection:{injectEnvironment:function(e){i(!c),p=e.mountImageIntoNode,l=e.unmountIDFromEnvironment,d.BackendIDOperations=e.BackendIDOperations,c=!0}},LifeCycle:u,BackendIDOperations:null,Mixin:{isMounted:function(){return this._lifeCycleState===u.MOUNTED},setProps:function(e,t){var n=this._pendingDescriptor||this._descriptor;this.replaceProps(s(n.props,e),t)},replaceProps:function(e,t){i(this.isMounted()),i(0===this._mountDepth),this._pendingDescriptor=n.cloneAndReplaceProps(this._pendingDescriptor||this._descriptor,e),o.enqueueUpdate(this,t)},_setPropsInternal:function(e,t){var r=this._pendingDescriptor||this._descriptor;this._pendingDescriptor=n.cloneAndReplaceProps(r,s(r.props,e)),o.enqueueUpdate(this,t)},construct:function(e){this.props=e.props,this._owner=e._owner,this._lifeCycleState=u.UNMOUNTED,this._pendingCallbacks=null,this._descriptor=e,this._pendingDescriptor=null},mountComponent:function(e,t,n){i(!this.isMounted());var o=this._descriptor.props;if(null!=o.ref){var a=this._descriptor._owner;r.addComponentAsRefTo(this,o.ref,a)}this._rootNodeID=e,this._lifeCycleState=u.MOUNTED,this._mountDepth=n},unmountComponent:function(){i(this.isMounted());var e=this.props;null!=e.ref&&r.removeComponentAsRefFrom(this,e.ref,this._owner),l(this._rootNodeID),this._rootNodeID=null,this._lifeCycleState=u.UNMOUNTED},receiveComponent:function(e,t){i(this.isMounted()),this._pendingDescriptor=e,this.performUpdateIfNecessary(t)},performUpdateIfNecessary:function(e){if(null!=this._pendingDescriptor){var t=this._descriptor,n=this._pendingDescriptor;this._descriptor=n,this.props=n.props,this._owner=n._owner,this._pendingDescriptor=null,this.updateComponent(e,t)}},updateComponent:function(e,t){var n=this._descriptor;(n._owner!==t._owner||n.props.ref!==t.props.ref)&&(null!=t.props.ref&&r.removeComponentAsRefFrom(this,t.props.ref,t._owner),null!=n.props.ref&&r.addComponentAsRefTo(this,n.props.ref,n._owner))},mountComponentIntoNode:function(e,t,n){var r=o.ReactReconcileTransaction.getPooled();r.perform(this._mountComponentIntoNode,this,e,t,r,n),o.ReactReconcileTransaction.release(r)},_mountComponentIntoNode:function(e,t,n,r){var o=this.mountComponent(e,n,0);p(o,t,r)},isOwnedBy:function(e){return this._owner===e},getSiblingByRef:function(e){var t=this._owner;return t&&t.refs?t.refs[e]:null}}};t.exports=d},{"./ReactDescriptor":54,"./ReactOwner":68,"./ReactUpdates":84,"./invariant":131,"./keyMirror":137,"./merge":141}],36:[function(e,t){"use strict";var n=e("./ReactDOMIDOperations"),r=e("./ReactMarkupChecksum"),o=e("./ReactMount"),i=e("./ReactPerf"),a=e("./ReactReconcileTransaction"),s=e("./getReactRootElementInContainer"),u=e("./invariant"),c=e("./setInnerHTML"),l=1,p=9,d={ReactReconcileTransaction:a,BackendIDOperations:n,unmountIDFromEnvironment:function(e){o.purgeID(e)},mountImageIntoNode:i.measure("ReactComponentBrowserEnvironment","mountImageIntoNode",function(e,t,n){if(u(t&&(t.nodeType===l||t.nodeType===p)),n){if(r.canReuseMarkup(e,s(t)))return;u(t.nodeType!==p)}u(t.nodeType!==p),c(t,e)})};t.exports=d},{"./ReactDOMIDOperations":45,"./ReactMarkupChecksum":64,"./ReactMount":65,"./ReactPerf":69,"./ReactReconcileTransaction":75,"./getReactRootElementInContainer":125,"./invariant":131,"./setInnerHTML":147}],37:[function(e,t){"use strict";var n=e("./shallowEqual"),r={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}};t.exports=r},{"./shallowEqual":148}],38:[function(e,t){"use strict";function n(e){var t=e._owner||null;return t&&t.constructor&&t.constructor.displayName?" Check the render method of `"+t.constructor.displayName+"`.":""}function r(e,t){for(var n in t)t.hasOwnProperty(n)&&D("function"==typeof t[n])}function o(e,t){var n=_.hasOwnProperty(t)?_[t]:null;k.hasOwnProperty(t)&&D(n===S.OVERRIDE_BASE),e.hasOwnProperty(t)&&D(n===S.DEFINE_MANY||n===S.DEFINE_MANY_MERGED)}function i(e){var t=e._compositeLifeCycleState;D(e.isMounted()||t===N.MOUNTING),D(t!==N.RECEIVING_STATE),D(t!==N.UNMOUNTING)}function a(e,t){D(!h.isValidFactory(t)),D(!h.isValidDescriptor(t));var n=e.prototype;for(var r in t){var i=t[r];if(t.hasOwnProperty(r))if(o(n,r),I.hasOwnProperty(r))I[r](e,i);else{var a=_.hasOwnProperty(r),s=n.hasOwnProperty(r),u=i&&i.__reactDontBind,p="function"==typeof i,d=p&&!a&&!s&&!u;if(d)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[r]=i,n[r]=i;else if(s){var f=_[r];D(a&&(f===S.DEFINE_MANY_MERGED||f===S.DEFINE_MANY)),f===S.DEFINE_MANY_MERGED?n[r]=c(n[r],i):f===S.DEFINE_MANY&&(n[r]=l(n[r],i))}else n[r]=i}}}function s(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in e,i=r;if(o){var a=e[n],s=typeof a,u=typeof r;D("function"===s&&"function"===u),i=l(a,r)}e[n]=i}}}function u(e,t){return D(e&&t&&"object"==typeof e&&"object"==typeof t),P(t,function(t,n){D(void 0===e[n]),e[n]=t}),e}function c(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);return null==n?r:null==r?n:u(n,r)}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}var p=e("./ReactComponent"),d=e("./ReactContext"),f=e("./ReactCurrentOwner"),h=e("./ReactDescriptor"),v=(e("./ReactDescriptorValidator"),e("./ReactEmptyComponent")),m=e("./ReactErrorUtils"),g=e("./ReactOwner"),y=e("./ReactPerf"),C=e("./ReactPropTransferer"),E=e("./ReactPropTypeLocations"),R=(e("./ReactPropTypeLocationNames"),e("./ReactUpdates")),M=e("./instantiateReactComponent"),D=e("./invariant"),x=e("./keyMirror"),b=e("./merge"),O=e("./mixInto"),P=(e("./monitorCodeUse"),e("./mapObject")),T=e("./shouldUpdateReactComponent"),S=(e("./warning"),x({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null})),w=[],_={mixins:S.DEFINE_MANY,statics:S.DEFINE_MANY,propTypes:S.DEFINE_MANY,contextTypes:S.DEFINE_MANY,childContextTypes:S.DEFINE_MANY,getDefaultProps:S.DEFINE_MANY_MERGED,getInitialState:S.DEFINE_MANY_MERGED,getChildContext:S.DEFINE_MANY_MERGED,render:S.DEFINE_ONCE,componentWillMount:S.DEFINE_MANY,componentDidMount:S.DEFINE_MANY,componentWillReceiveProps:S.DEFINE_MANY,shouldComponentUpdate:S.DEFINE_ONCE,componentWillUpdate:S.DEFINE_MANY,componentDidUpdate:S.DEFINE_MANY,componentWillUnmount:S.DEFINE_MANY,updateComponent:S.OVERRIDE_BASE},I={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)a(e,t[n])},childContextTypes:function(e,t){r(e,t,E.childContext),e.childContextTypes=b(e.childContextTypes,t)},contextTypes:function(e,t){r(e,t,E.context),e.contextTypes=b(e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps=e.getDefaultProps?c(e.getDefaultProps,t):t},propTypes:function(e,t){r(e,t,E.prop),e.propTypes=b(e.propTypes,t)},statics:function(e,t){s(e,t)}},N=x({MOUNTING:null,UNMOUNTING:null,RECEIVING_PROPS:null,RECEIVING_STATE:null}),k={construct:function(){p.Mixin.construct.apply(this,arguments),g.Mixin.construct.apply(this,arguments),this.state=null,this._pendingState=null,this.context=null,this._compositeLifeCycleState=null},isMounted:function(){return p.Mixin.isMounted.call(this)&&this._compositeLifeCycleState!==N.MOUNTING},mountComponent:y.measure("ReactCompositeComponent","mountComponent",function(e,t,n){p.Mixin.mountComponent.call(this,e,t,n),this._compositeLifeCycleState=N.MOUNTING,this.__reactAutoBindMap&&this._bindAutoBindMethods(),this.context=this._processContext(this._descriptor._context),this.props=this._processProps(this.props),this.state=this.getInitialState?this.getInitialState():null,D("object"==typeof this.state&&!Array.isArray(this.state)),this._pendingState=null,this._pendingForceUpdate=!1,this.componentWillMount&&(this.componentWillMount(),this._pendingState&&(this.state=this._pendingState,this._pendingState=null)),this._renderedComponent=M(this._renderValidatedComponent()),this._compositeLifeCycleState=null;var r=this._renderedComponent.mountComponent(e,t,n+1);return this.componentDidMount&&t.getReactMountReady().enqueue(this.componentDidMount,this),r}),unmountComponent:function(){this._compositeLifeCycleState=N.UNMOUNTING,this.componentWillUnmount&&this.componentWillUnmount(),this._compositeLifeCycleState=null,this._renderedComponent.unmountComponent(),this._renderedComponent=null,p.Mixin.unmountComponent.call(this)},setState:function(e,t){D("object"==typeof e||null==e),this.replaceState(b(this._pendingState||this.state,e),t)},replaceState:function(e,t){i(this),this._pendingState=e,this._compositeLifeCycleState!==N.MOUNTING&&R.enqueueUpdate(this,t)},_processContext:function(e){var t=null,n=this.constructor.contextTypes;if(n){t={};for(var r in n)t[r]=e[r]}return t},_processChildContext:function(e){var t=this.getChildContext&&this.getChildContext();if(this.constructor.displayName||"ReactCompositeComponent",t){D("object"==typeof this.constructor.childContextTypes);for(var n in t)D(n in this.constructor.childContextTypes);return b(e,t)}return e},_processProps:function(e){var t,n=this.constructor.defaultProps;if(n){t=b(e);for(var r in n)"undefined"==typeof t[r]&&(t[r]=n[r])}else t=e;return t},_checkPropTypes:function(e,t,r){var o=this.constructor.displayName;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i](t,i,o,r);a instanceof Error&&n(this)}},performUpdateIfNecessary:function(e){var t=this._compositeLifeCycleState;if(t!==N.MOUNTING&&t!==N.RECEIVING_PROPS&&(null!=this._pendingDescriptor||null!=this._pendingState||this._pendingForceUpdate)){var n=this.context,r=this.props,o=this._descriptor;null!=this._pendingDescriptor&&(o=this._pendingDescriptor,n=this._processContext(o._context),r=this._processProps(o.props),this._pendingDescriptor=null,this._compositeLifeCycleState=N.RECEIVING_PROPS,this.componentWillReceiveProps&&this.componentWillReceiveProps(r,n)),this._compositeLifeCycleState=N.RECEIVING_STATE;var i=this._pendingState||this.state;this._pendingState=null;try{var a=this._pendingForceUpdate||!this.shouldComponentUpdate||this.shouldComponentUpdate(r,i,n);a?(this._pendingForceUpdate=!1,this._performComponentUpdate(o,r,i,n,e)):(this._descriptor=o,this.props=r,this.state=i,this.context=n,this._owner=o._owner)}finally{this._compositeLifeCycleState=null}}},_performComponentUpdate:function(e,t,n,r,o){var i=this._descriptor,a=this.props,s=this.state,u=this.context;this.componentWillUpdate&&this.componentWillUpdate(t,n,r),this._descriptor=e,this.props=t,this.state=n,this.context=r,this._owner=e._owner,this.updateComponent(o,i),this.componentDidUpdate&&o.getReactMountReady().enqueue(this.componentDidUpdate.bind(this,a,s,u),this)},receiveComponent:function(e,t){(e!==this._descriptor||null==e._owner)&&p.Mixin.receiveComponent.call(this,e,t)},updateComponent:y.measure("ReactCompositeComponent","updateComponent",function(e,t){p.Mixin.updateComponent.call(this,e,t);var n=this._renderedComponent,r=n._descriptor,o=this._renderValidatedComponent();if(T(r,o))n.receiveComponent(o,e);else{var i=this._rootNodeID,a=n._rootNodeID;n.unmountComponent(),this._renderedComponent=M(o);var s=this._renderedComponent.mountComponent(i,e,this._mountDepth+1);p.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(a,s)}}),forceUpdate:function(e){var t=this._compositeLifeCycleState;D(this.isMounted()||t===N.MOUNTING),D(t!==N.RECEIVING_STATE&&t!==N.UNMOUNTING),this._pendingForceUpdate=!0,R.enqueueUpdate(this,e)},_renderValidatedComponent:y.measure("ReactCompositeComponent","_renderValidatedComponent",function(){var e,t=d.current;d.current=this._processChildContext(this._descriptor._context),f.current=this;try{e=this.render(),null===e||e===!1?(e=v.getEmptyComponent(),v.registerNullComponentID(this._rootNodeID)):v.deregisterNullComponentID(this._rootNodeID)}finally{d.current=t,f.current=null}return D(h.isValidDescriptor(e)),e}),_bindAutoBindMethods:function(){for(var e in this.__reactAutoBindMap)if(this.__reactAutoBindMap.hasOwnProperty(e)){var t=this.__reactAutoBindMap[e];this[e]=this._bindAutoBindMethod(m.guard(t,this.constructor.displayName+"."+e))}},_bindAutoBindMethod:function(e){var t=this,n=function(){return e.apply(t,arguments)};return n}},A=function(){};O(A,p.Mixin),O(A,g.Mixin),O(A,C.Mixin),O(A,k);var L={LifeCycle:N,Base:A,createClass:function(e){var t=function(e,t){this.construct(e,t)};t.prototype=new A,t.prototype.constructor=t,w.forEach(a.bind(null,t)),a(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),D(t.prototype.render);for(var n in _)t.prototype[n]||(t.prototype[n]=null);var r=h.createFactory(t);return r},injection:{injectMixin:function(e){w.push(e)}}};t.exports=L},{"./ReactComponent":35,"./ReactContext":39,"./ReactCurrentOwner":40,"./ReactDescriptor":54,"./ReactDescriptorValidator":55,"./ReactEmptyComponent":56,"./ReactErrorUtils":57,"./ReactOwner":68,"./ReactPerf":69,"./ReactPropTransferer":70,"./ReactPropTypeLocationNames":71,"./ReactPropTypeLocations":72,"./ReactUpdates":84,"./instantiateReactComponent":130,"./invariant":131,"./keyMirror":137,"./mapObject":139,"./merge":141,"./mixInto":144,"./monitorCodeUse":145,"./shouldUpdateReactComponent":149,"./warning":153}],39:[function(e,t){"use strict";var n=e("./merge"),r={current:{},withContext:function(e,t){var o,i=r.current;r.current=n(i,e);try{o=t()}finally{r.current=i}return o}};t.exports=r},{"./merge":141}],40:[function(e,t){"use strict";var n={current:null};t.exports=n},{}],41:[function(e,t){"use strict";function n(e,t){var n=function(e){this.construct(e)};n.prototype=new o(t,e),n.prototype.constructor=n,n.displayName=t;var i=r.createFactory(n);return i}var r=e("./ReactDescriptor"),o=(e("./ReactDescriptorValidator"),e("./ReactDOMComponent")),i=e("./mergeInto"),a=e("./mapObject"),s=a({a:!1,abbr:!1,address:!1,area:!0,article:!1,aside:!1,audio:!1,b:!1,base:!0,bdi:!1,bdo:!1,big:!1,blockquote:!1,body:!1,br:!0,button:!1,canvas:!1,caption:!1,cite:!1,code:!1,col:!0,colgroup:!1,data:!1,datalist:!1,dd:!1,del:!1,details:!1,dfn:!1,div:!1,dl:!1,dt:!1,em:!1,embed:!0,fieldset:!1,figcaption:!1,figure:!1,footer:!1,form:!1,h1:!1,h2:!1,h3:!1,h4:!1,h5:!1,h6:!1,head:!1,header:!1,hr:!0,html:!1,i:!1,iframe:!1,img:!0,input:!0,ins:!1,kbd:!1,keygen:!0,label:!1,legend:!1,li:!1,link:!0,main:!1,map:!1,mark:!1,menu:!1,menuitem:!1,meta:!0,meter:!1,nav:!1,noscript:!1,object:!1,ol:!1,optgroup:!1,option:!1,output:!1,p:!1,param:!0,pre:!1,progress:!1,q:!1,rp:!1,rt:!1,ruby:!1,s:!1,samp:!1,script:!1,section:!1,select:!1,small:!1,source:!0,span:!1,strong:!1,style:!1,sub:!1,summary:!1,sup:!1,table:!1,tbody:!1,td:!1,textarea:!1,tfoot:!1,th:!1,thead:!1,time:!1,title:!1,tr:!1,track:!0,u:!1,ul:!1,"var":!1,video:!1,wbr:!0,circle:!1,defs:!1,ellipse:!1,g:!1,line:!1,linearGradient:!1,mask:!1,path:!1,pattern:!1,polygon:!1,polyline:!1,radialGradient:!1,rect:!1,stop:!1,svg:!1,text:!1,tspan:!1},n),u={injectComponentClasses:function(e){i(s,e)}};s.injection=u,t.exports=s},{"./ReactDOMComponent":43,"./ReactDescriptor":54,"./ReactDescriptorValidator":55,"./mapObject":139,"./mergeInto":143}],42:[function(e,t){"use strict";var n=e("./AutoFocusMixin"),r=e("./ReactBrowserComponentMixin"),o=e("./ReactCompositeComponent"),i=e("./ReactDOM"),a=e("./keyMirror"),s=i.button,u=a({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),c=o.createClass({displayName:"ReactDOMButton",mixins:[n,r],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&u[t]||(e[t]=this.props[t]);return s(e,this.props.children)}});t.exports=c},{"./AutoFocusMixin":1,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41,"./keyMirror":137}],43:[function(e,t){"use strict";function n(e){e&&(v(null==e.children||null==e.dangerouslySetInnerHTML),v(null==e.style||"object"==typeof e.style))}function r(e,t,n,r){var o=p.findReactContainerForID(e);if(o){var i=o.nodeType===x?o.ownerDocument:o;E(t,i)}r.getPutListenerQueue().enqueuePutListener(e,t,n)}function o(e,t){this._tagOpen="<"+e,this._tagClose=t?"":"</"+e+">",this.tagName=e.toUpperCase()}var i=e("./CSSPropertyOperations"),a=e("./DOMProperty"),s=e("./DOMPropertyOperations"),u=e("./ReactBrowserComponentMixin"),c=e("./ReactComponent"),l=e("./ReactBrowserEventEmitter"),p=e("./ReactMount"),d=e("./ReactMultiChild"),f=e("./ReactPerf"),h=e("./escapeTextForBrowser"),v=e("./invariant"),m=e("./keyOf"),g=e("./merge"),y=e("./mixInto"),C=l.deleteListener,E=l.listenTo,R=l.registrationNameModules,M={string:!0,number:!0},D=m({style:null}),x=1;o.Mixin={mountComponent:f.measure("ReactDOMComponent","mountComponent",function(e,t,r){return c.Mixin.mountComponent.call(this,e,t,r),n(this.props),this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t)+this._tagClose}),_createOpenTagMarkupAndPutListeners:function(e){var t=this.props,n=this._tagOpen;for(var o in t)if(t.hasOwnProperty(o)){var a=t[o];if(null!=a)if(R.hasOwnProperty(o))r(this._rootNodeID,o,a,e);else{o===D&&(a&&(a=t.style=g(t.style)),a=i.createMarkupForStyles(a));var u=s.createMarkupForProperty(o,a);u&&(n+=" "+u)}}if(e.renderToStaticMarkup)return n+">";var c=s.createMarkupForID(this._rootNodeID);return n+" "+c+">"},_createContentMarkup:function(e){var t=this.props.dangerouslySetInnerHTML;if(null!=t){if(null!=t.__html)return t.__html}else{var n=M[typeof this.props.children]?this.props.children:null,r=null!=n?null:this.props.children;if(null!=n)return h(n);if(null!=r){var o=this.mountChildren(r,e);return o.join("")}}return""},receiveComponent:function(e,t){(e!==this._descriptor||null==e._owner)&&c.Mixin.receiveComponent.call(this,e,t)},updateComponent:f.measure("ReactDOMComponent","updateComponent",function(e,t){n(this._descriptor.props),c.Mixin.updateComponent.call(this,e,t),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e)}),_updateDOMProperties:function(e,t){var n,o,i,s=this.props;for(n in e)if(!s.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===D){var u=e[n];for(o in u)u.hasOwnProperty(o)&&(i=i||{},i[o]="")}else R.hasOwnProperty(n)?C(this._rootNodeID,n):(a.isStandardName[n]||a.isCustomAttribute(n))&&c.BackendIDOperations.deletePropertyByID(this._rootNodeID,n);for(n in s){var l=s[n],p=e[n];if(s.hasOwnProperty(n)&&l!==p)if(n===D)if(l&&(l=s.style=g(l)),p){for(o in p)!p.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(i=i||{},i[o]="");for(o in l)l.hasOwnProperty(o)&&p[o]!==l[o]&&(i=i||{},i[o]=l[o])}else i=l;else R.hasOwnProperty(n)?r(this._rootNodeID,n,l,t):(a.isStandardName[n]||a.isCustomAttribute(n))&&c.BackendIDOperations.updatePropertyByID(this._rootNodeID,n,l)}i&&c.BackendIDOperations.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t){var n=this.props,r=M[typeof e.children]?e.children:null,o=M[typeof n.children]?n.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,a=n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html,s=null!=r?null:e.children,u=null!=o?null:n.children,l=null!=r||null!=i,p=null!=o||null!=a;null!=s&&null==u?this.updateChildren(null,t):l&&!p&&this.updateTextContent(""),null!=o?r!==o&&this.updateTextContent(""+o):null!=a?i!==a&&c.BackendIDOperations.updateInnerHTMLByID(this._rootNodeID,a):null!=u&&this.updateChildren(u,t)},unmountComponent:function(){this.unmountChildren(),l.deleteAllListeners(this._rootNodeID),c.Mixin.unmountComponent.call(this)}},y(o,c.Mixin),y(o,o.Mixin),y(o,d.Mixin),y(o,u),t.exports=o},{"./CSSPropertyOperations":5,"./DOMProperty":11,"./DOMPropertyOperations":12,"./ReactBrowserComponentMixin":30,"./ReactBrowserEventEmitter":31,"./ReactComponent":35,"./ReactMount":65,"./ReactMultiChild":66,"./ReactPerf":69,"./escapeTextForBrowser":115,"./invariant":131,"./keyOf":138,"./merge":141,"./mixInto":144}],44:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./LocalEventTrapMixin"),o=e("./ReactBrowserComponentMixin"),i=e("./ReactCompositeComponent"),a=e("./ReactDOM"),s=a.form,u=i.createClass({displayName:"ReactDOMForm",mixins:[o,r],render:function(){return this.transferPropsTo(s(null,this.props.children))},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(n.topLevelTypes.topSubmit,"submit")}});t.exports=u},{"./EventConstants":16,"./LocalEventTrapMixin":26,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41}],45:[function(e,t){"use strict";var n=e("./CSSPropertyOperations"),r=e("./DOMChildrenOperations"),o=e("./DOMPropertyOperations"),i=e("./ReactMount"),a=e("./ReactPerf"),s=e("./invariant"),u=e("./setInnerHTML"),c={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:a.measure("ReactDOMIDOperations","updatePropertyByID",function(e,t,n){var r=i.getNode(e);s(!c.hasOwnProperty(t)),null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)}),deletePropertyByID:a.measure("ReactDOMIDOperations","deletePropertyByID",function(e,t,n){var r=i.getNode(e);s(!c.hasOwnProperty(t)),o.deleteValueForProperty(r,t,n)}),updateStylesByID:a.measure("ReactDOMIDOperations","updateStylesByID",function(e,t){var r=i.getNode(e);n.setValueForStyles(r,t)}),updateInnerHTMLByID:a.measure("ReactDOMIDOperations","updateInnerHTMLByID",function(e,t){var n=i.getNode(e);u(n,t)}),updateTextContentByID:a.measure("ReactDOMIDOperations","updateTextContentByID",function(e,t){var n=i.getNode(e);r.updateTextContent(n,t)}),dangerouslyReplaceNodeWithMarkupByID:a.measure("ReactDOMIDOperations","dangerouslyReplaceNodeWithMarkupByID",function(e,t){var n=i.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)}),dangerouslyProcessChildrenUpdates:a.measure("ReactDOMIDOperations","dangerouslyProcessChildrenUpdates",function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=i.getNode(e[n].parentID);r.processUpdates(e,t)})};t.exports=l},{"./CSSPropertyOperations":5,"./DOMChildrenOperations":10,"./DOMPropertyOperations":12,"./ReactMount":65,"./ReactPerf":69,"./invariant":131,"./setInnerHTML":147}],46:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./LocalEventTrapMixin"),o=e("./ReactBrowserComponentMixin"),i=e("./ReactCompositeComponent"),a=e("./ReactDOM"),s=a.img,u=i.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[o,r],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(n.topLevelTypes.topError,"error")}});t.exports=u},{"./EventConstants":16,"./LocalEventTrapMixin":26,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41}],47:[function(e,t){"use strict";var n=e("./AutoFocusMixin"),r=e("./DOMPropertyOperations"),o=e("./LinkedValueUtils"),i=e("./ReactBrowserComponentMixin"),a=e("./ReactCompositeComponent"),s=e("./ReactDOM"),u=e("./ReactMount"),c=e("./invariant"),l=e("./merge"),p=s.input,d={},f=a.createClass({displayName:"ReactDOMInput",mixins:[n,o.Mixin,i],getInitialState:function(){var e=this.props.defaultValue;return{checked:this.props.defaultChecked||!1,value:null!=e?e:null}},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var e=l(this.props);e.defaultChecked=null,e.defaultValue=null;var t=o.getValue(this);e.value=null!=t?t:this.state.value;var n=o.getChecked(this);return e.checked=null!=n?n:this.state.checked,e.onChange=this._handleChange,p(e,this.props.children)},componentDidMount:function(){var e=u.getID(this.getDOMNode());d[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=u.getID(e);delete d[t]},componentDidUpdate:function(){var e=this.getDOMNode();null!=this.props.checked&&r.setValueForProperty(e,"checked",this.props.checked||!1);var t=o.getValue(this);null!=t&&r.setValueForProperty(e,"value",""+t)},_handleChange:function(e){var t,n=o.getOnChange(this);n&&(this._isChanging=!0,t=n.call(this,e),this._isChanging=!1),this.setState({checked:e.target.checked,value:e.target.value});var r=this.props.name;if("radio"===this.props.type&&null!=r){for(var i=this.getDOMNode(),a=i;a.parentNode;)a=a.parentNode;for(var s=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),l=0,p=s.length;p>l;l++){var f=s[l];if(f!==i&&f.form===i.form){var h=u.getID(f);c(h);var v=d[h];c(v),v.setState({checked:!1})}}}return t}});t.exports=f},{"./AutoFocusMixin":1,"./DOMPropertyOperations":12,"./LinkedValueUtils":25,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41,"./ReactMount":65,"./invariant":131,"./merge":141}],48:[function(e,t){"use strict";var n=e("./ReactBrowserComponentMixin"),r=e("./ReactCompositeComponent"),o=e("./ReactDOM"),i=(e("./warning"),o.option),a=r.createClass({displayName:"ReactDOMOption",mixins:[n],componentWillMount:function(){},render:function(){return i(this.props,this.props.children)}});t.exports=a},{"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41,"./warning":153}],49:[function(e,t){"use strict";function n(e,t){if(null!=e[t])if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function r(e,t){var n,r,o,i=e.props.multiple,a=null!=t?t:e.state.value,s=e.getDOMNode().options;if(i)for(n={},r=0,o=a.length;o>r;++r)n[""+a[r]]=!0;else n=""+a;for(r=0,o=s.length;o>r;r++){var u=i?n.hasOwnProperty(s[r].value):s[r].value===n;u!==s[r].selected&&(s[r].selected=u)}}var o=e("./AutoFocusMixin"),i=e("./LinkedValueUtils"),a=e("./ReactBrowserComponentMixin"),s=e("./ReactCompositeComponent"),u=e("./ReactDOM"),c=e("./merge"),l=u.select,p=s.createClass({displayName:"ReactDOMSelect",mixins:[o,i.Mixin,a],propTypes:{defaultValue:n,value:n},getInitialState:function(){return{value:this.props.defaultValue||(this.props.multiple?[]:"")} +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t){"use strict";var n=e("./focusNode"),r={componentDidMount:function(){this.props.autoFocus&&n(this.getDOMNode())}};t.exports=r},{"./focusNode":117}],2:[function(e,t){"use strict";function n(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function r(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}var o=e("./EventConstants"),i=e("./EventPropagators"),a=e("./ExecutionEnvironment"),s=e("./SyntheticInputEvent"),u=e("./keyOf"),c=a.canUseDOM&&"TextEvent"in window&&!("documentMode"in document||n()),l=32,p=String.fromCharCode(l),d=o.topLevelTypes,f={beforeInput:{phasedRegistrationNames:{bubbled:u({onBeforeInput:null}),captured:u({onBeforeInputCapture:null})},dependencies:[d.topCompositionEnd,d.topKeyPress,d.topTextInput,d.topPaste]}},h=null,v={eventTypes:f,extractEvents:function(e,t,n,o){var a;if(c)switch(e){case d.topKeyPress:var u=o.which;if(u!==l)return;a=String.fromCharCode(u);break;case d.topTextInput:if(a=o.data,a===p)return;break;default:return}else{switch(e){case d.topPaste:h=null;break;case d.topKeyPress:o.which&&!r(o)&&(h=String.fromCharCode(o.which));break;case d.topCompositionEnd:h=o.data}if(null===h)return;a=h}if(a){var v=s.getPooled(f.beforeInput,n,o);return v.data=a,h=null,i.accumulateTwoPhaseDispatches(v),v}}};t.exports=v},{"./EventConstants":16,"./EventPropagators":21,"./ExecutionEnvironment":22,"./SyntheticInputEvent":95,"./keyOf":138}],3:[function(e,t){var n=e("./invariant"),r={addClass:function(e,t){return n(!/\s/.test(t)),t&&(e.classList?e.classList.add(t):r.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return n(!/\s/.test(t)),t&&(e.classList?e.classList.remove(t):r.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?r.addClass:r.removeClass)(e,t)},hasClass:function(e,t){return n(!/\s/.test(t)),e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}};t.exports=r},{"./invariant":131}],4:[function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={columnCount:!0,fillOpacity:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};t.exports=a},{}],5:[function(e,t){"use strict";var n=e("./CSSProperty"),r=e("./dangerousStyleValue"),o=e("./hyphenateStyleName"),i=e("./memoizeStringOnly"),a=i(function(e){return o(e)}),s={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];null!=o&&(t+=a(n)+":",t+=r(n,o)+";")}return t||null},setValueForStyles:function(e,t){var o=e.style;for(var i in t)if(t.hasOwnProperty(i)){var a=r(i,t[i]);if(a)o[i]=a;else{var s=n.shorthandPropertyExpansions[i];if(s)for(var u in s)o[u]="";else o[i]=""}}}};t.exports=s},{"./CSSProperty":4,"./dangerousStyleValue":112,"./hyphenateStyleName":129,"./memoizeStringOnly":140}],6:[function(e,t){"use strict";function n(){this._callbacks=null,this._contexts=null}var r=e("./PooledClass"),o=e("./invariant"),i=e("./mixInto");i(n,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){o(e.length===t.length),this._callbacks=null,this._contexts=null;for(var n=0,r=e.length;r>n;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),r.addPoolingTo(n),t.exports=n},{"./PooledClass":28,"./invariant":131,"./mixInto":144}],7:[function(e,t){"use strict";function n(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function r(e){var t=M.getPooled(P.change,S,e);C.accumulateTwoPhaseDispatches(t),R.batchedUpdates(o,t)}function o(e){y.enqueueEvents(e),y.processEventQueue()}function i(e,t){T=e,S=t,T.attachEvent("onchange",r)}function a(){T&&(T.detachEvent("onchange",r),T=null,S=null)}function s(e,t,n){return e===O.topChange?n:void 0}function u(e,t,n){e===O.topFocus?(a(),i(t,n)):e===O.topBlur&&a()}function c(e,t){T=e,S=t,w=e.value,_=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(T,"value",k),T.attachEvent("onpropertychange",p)}function l(){T&&(delete T.value,T.detachEvent("onpropertychange",p),T=null,S=null,w=null,_=null)}function p(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==w&&(w=t,r(e))}}function d(e,t,n){return e===O.topInput?n:void 0}function f(e,t,n){e===O.topFocus?(l(),c(t,n)):e===O.topBlur&&l()}function h(e){return e!==O.topSelectionChange&&e!==O.topKeyUp&&e!==O.topKeyDown||!T||T.value===w?void 0:(w=T.value,S)}function v(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function m(e,t,n){return e===O.topClick?n:void 0}var g=e("./EventConstants"),y=e("./EventPluginHub"),C=e("./EventPropagators"),E=e("./ExecutionEnvironment"),R=e("./ReactUpdates"),M=e("./SyntheticEvent"),D=e("./isEventSupported"),x=e("./isTextInputElement"),b=e("./keyOf"),O=g.topLevelTypes,P={change:{phasedRegistrationNames:{bubbled:b({onChange:null}),captured:b({onChangeCapture:null})},dependencies:[O.topBlur,O.topChange,O.topClick,O.topFocus,O.topInput,O.topKeyDown,O.topKeyUp,O.topSelectionChange]}},T=null,S=null,w=null,_=null,I=!1;E.canUseDOM&&(I=D("change")&&(!("documentMode"in document)||document.documentMode>8));var N=!1;E.canUseDOM&&(N=D("input")&&(!("documentMode"in document)||document.documentMode>9));var k={get:function(){return _.get.call(this)},set:function(e){w=""+e,_.set.call(this,e)}},A={eventTypes:P,extractEvents:function(e,t,r,o){var i,a;if(n(t)?I?i=s:a=u:x(t)?N?i=d:(i=h,a=f):v(t)&&(i=m),i){var c=i(e,t,r);if(c){var l=M.getPooled(P.change,c,o);return C.accumulateTwoPhaseDispatches(l),l}}a&&a(e,t,r)}};t.exports=A},{"./EventConstants":16,"./EventPluginHub":18,"./EventPropagators":21,"./ExecutionEnvironment":22,"./ReactUpdates":84,"./SyntheticEvent":93,"./isEventSupported":132,"./isTextInputElement":134,"./keyOf":138}],8:[function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};t.exports=r},{}],9:[function(e,t){"use strict";function n(e){switch(e){case g.topCompositionStart:return C.compositionStart;case g.topCompositionEnd:return C.compositionEnd;case g.topCompositionUpdate:return C.compositionUpdate}}function r(e,t){return e===g.topKeyDown&&t.keyCode===h}function o(e,t){switch(e){case g.topKeyUp:return-1!==f.indexOf(t.keyCode);case g.topKeyDown:return t.keyCode!==h;case g.topKeyPress:case g.topMouseDown:case g.topBlur:return!0;default:return!1}}function i(e){this.root=e,this.startSelection=c.getSelection(e),this.startValue=this.getText()}var a=e("./EventConstants"),s=e("./EventPropagators"),u=e("./ExecutionEnvironment"),c=e("./ReactInputSelection"),l=e("./SyntheticCompositionEvent"),p=e("./getTextContentAccessor"),d=e("./keyOf"),f=[9,13,27,32],h=229,v=u.canUseDOM&&"CompositionEvent"in window,m=!v||"documentMode"in document&&document.documentMode>8&&document.documentMode<=11,g=a.topLevelTypes,y=null,C={compositionEnd:{phasedRegistrationNames:{bubbled:d({onCompositionEnd:null}),captured:d({onCompositionEndCapture:null})},dependencies:[g.topBlur,g.topCompositionEnd,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:d({onCompositionStart:null}),captured:d({onCompositionStartCapture:null})},dependencies:[g.topBlur,g.topCompositionStart,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:d({onCompositionUpdate:null}),captured:d({onCompositionUpdateCapture:null})},dependencies:[g.topBlur,g.topCompositionUpdate,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]}};i.prototype.getText=function(){return this.root.value||this.root[p()]},i.prototype.getData=function(){var e=this.getText(),t=this.startSelection.start,n=this.startValue.length-this.startSelection.end;return e.substr(t,e.length-n-t)};var E={eventTypes:C,extractEvents:function(e,t,a,u){var c,p;if(v?c=n(e):y?o(e,u)&&(c=C.compositionEnd):r(e,u)&&(c=C.compositionStart),m&&(y||c!==C.compositionStart?c===C.compositionEnd&&y&&(p=y.getData(),y=null):y=new i(t)),c){var d=l.getPooled(c,a,u);return p&&(d.data=p),s.accumulateTwoPhaseDispatches(d),d}}};t.exports=E},{"./EventConstants":16,"./EventPropagators":21,"./ExecutionEnvironment":22,"./ReactInputSelection":61,"./SyntheticCompositionEvent":91,"./getTextContentAccessor":126,"./keyOf":138}],10:[function(e,t){"use strict";function n(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var r,o=e("./Danger"),i=e("./ReactMultiChildUpdateTypes"),a=e("./getTextContentAccessor"),s=e("./invariant"),u=a();r="textContent"===u?function(e,t){e.textContent=t}:function(e,t){for(;e.firstChild;)e.removeChild(e.firstChild);if(t){var n=e.ownerDocument||document;e.appendChild(n.createTextNode(t))}};var c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:r,processUpdates:function(e,t){for(var a,u=null,c=null,l=0;a=e[l];l++)if(a.type===i.MOVE_EXISTING||a.type===i.REMOVE_NODE){var p=a.fromIndex,d=a.parentNode.childNodes[p],f=a.parentID;s(d),u=u||{},u[f]=u[f]||[],u[f][p]=d,c=c||[],c.push(d)}var h=o.dangerouslyRenderMarkup(t);if(c)for(var v=0;v<c.length;v++)c[v].parentNode.removeChild(c[v]);for(var m=0;a=e[m];m++)switch(a.type){case i.INSERT_MARKUP:n(a.parentNode,h[a.markupIndex],a.toIndex);break;case i.MOVE_EXISTING:n(a.parentNode,u[a.parentID][a.fromIndex],a.toIndex);break;case i.TEXT_CONTENT:r(a.parentNode,a.textContent);break;case i.REMOVE_NODE:}}};t.exports=c},{"./Danger":13,"./ReactMultiChildUpdateTypes":67,"./getTextContentAccessor":126,"./invariant":131}],11:[function(e,t){"use strict";var n=e("./invariant"),r={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=e.Properties||{},o=e.DOMAttributeNames||{},a=e.DOMPropertyNames||{},s=e.DOMMutationMethods||{};e.isCustomAttribute&&i._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var u in t){n(!i.isStandardName.hasOwnProperty(u)),i.isStandardName[u]=!0;var c=u.toLowerCase();if(i.getPossibleStandardName[c]=u,o.hasOwnProperty(u)){var l=o[u];i.getPossibleStandardName[l]=u,i.getAttributeName[u]=l}else i.getAttributeName[u]=c;i.getPropertyName[u]=a.hasOwnProperty(u)?a[u]:u,i.getMutationMethod[u]=s.hasOwnProperty(u)?s[u]:null;var p=t[u];i.mustUseAttribute[u]=p&r.MUST_USE_ATTRIBUTE,i.mustUseProperty[u]=p&r.MUST_USE_PROPERTY,i.hasSideEffects[u]=p&r.HAS_SIDE_EFFECTS,i.hasBooleanValue[u]=p&r.HAS_BOOLEAN_VALUE,i.hasNumericValue[u]=p&r.HAS_NUMERIC_VALUE,i.hasPositiveNumericValue[u]=p&r.HAS_POSITIVE_NUMERIC_VALUE,i.hasOverloadedBooleanValue[u]=p&r.HAS_OVERLOADED_BOOLEAN_VALUE,n(!i.mustUseAttribute[u]||!i.mustUseProperty[u]),n(i.mustUseProperty[u]||!i.hasSideEffects[u]),n(!!i.hasBooleanValue[u]+!!i.hasNumericValue[u]+!!i.hasOverloadedBooleanValue[u]<=1)}}},o={},i={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<i._isCustomAttributeFunctions.length;t++){var n=i._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=o[e];return r||(o[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:r};t.exports=i},{"./invariant":131}],12:[function(e,t){"use strict";function n(e,t){return null==t||r.hasBooleanValue[e]&&!t||r.hasNumericValue[e]&&isNaN(t)||r.hasPositiveNumericValue[e]&&1>t||r.hasOverloadedBooleanValue[e]&&t===!1}var r=e("./DOMProperty"),o=e("./escapeTextForBrowser"),i=e("./memoizeStringOnly"),a=(e("./warning"),i(function(e){return o(e)+'="'})),s={createMarkupForID:function(e){return a(r.ID_ATTRIBUTE_NAME)+o(e)+'"'},createMarkupForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(e)&&r.isStandardName[e]){if(n(e,t))return"";var i=r.getAttributeName[e];return r.hasBooleanValue[e]||r.hasOverloadedBooleanValue[e]&&t===!0?o(i):a(i)+o(t)+'"'}return r.isCustomAttribute(e)?null==t?"":a(e)+o(t)+'"':null},setValueForProperty:function(e,t,o){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var i=r.getMutationMethod[t];if(i)i(e,o);else if(n(t,o))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute[t])e.setAttribute(r.getAttributeName[t],""+o);else{var a=r.getPropertyName[t];r.hasSideEffects[t]&&e[a]===o||(e[a]=o)}}else r.isCustomAttribute(t)&&(null==o?e.removeAttribute(t):e.setAttribute(t,""+o))},deleteValueForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var n=r.getMutationMethod[t];if(n)n(e,void 0);else if(r.mustUseAttribute[t])e.removeAttribute(r.getAttributeName[t]);else{var o=r.getPropertyName[t],i=r.getDefaultValueForProperty(e.nodeName,o);r.hasSideEffects[t]&&e[o]===i||(e[o]=i)}}else r.isCustomAttribute(t)&&e.removeAttribute(t)}};t.exports=s},{"./DOMProperty":11,"./escapeTextForBrowser":115,"./memoizeStringOnly":140,"./warning":153}],13:[function(e,t){"use strict";function n(e){return e.substring(1,e.indexOf(" "))}var r=e("./ExecutionEnvironment"),o=e("./createNodesFromMarkup"),i=e("./emptyFunction"),a=e("./getMarkupWrap"),s=e("./invariant"),u=/^(<[^ \/>]+)/,c="data-danger-index",l={dangerouslyRenderMarkup:function(e){s(r.canUseDOM);for(var t,l={},p=0;p<e.length;p++)s(e[p]),t=n(e[p]),t=a(t)?t:"*",l[t]=l[t]||[],l[t][p]=e[p];var d=[],f=0;for(t in l)if(l.hasOwnProperty(t)){var h=l[t];for(var v in h)if(h.hasOwnProperty(v)){var m=h[v];h[v]=m.replace(u,"$1 "+c+'="'+v+'" ')}var g=o(h.join(""),i);for(p=0;p<g.length;++p){var y=g[p];y.hasAttribute&&y.hasAttribute(c)&&(v=+y.getAttribute(c),y.removeAttribute(c),s(!d.hasOwnProperty(v)),d[v]=y,f+=1)}}return s(f===d.length),s(d.length===e.length),d},dangerouslyReplaceNodeWithMarkup:function(e,t){s(r.canUseDOM),s(t),s("html"!==e.tagName.toLowerCase());var n=o(t,i)[0];e.parentNode.replaceChild(n,e)}};t.exports=l},{"./ExecutionEnvironment":22,"./createNodesFromMarkup":110,"./emptyFunction":113,"./getMarkupWrap":123,"./invariant":131}],14:[function(e,t){"use strict";var n=e("./keyOf"),r=[n({ResponderEventPlugin:null}),n({SimpleEventPlugin:null}),n({TapEventPlugin:null}),n({EnterLeaveEventPlugin:null}),n({ChangeEventPlugin:null}),n({SelectEventPlugin:null}),n({CompositionEventPlugin:null}),n({BeforeInputEventPlugin:null}),n({AnalyticsEventPlugin:null}),n({MobileSafariClickEventPlugin:null})];t.exports=r},{"./keyOf":138}],15:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./EventPropagators"),o=e("./SyntheticMouseEvent"),i=e("./ReactMount"),a=e("./keyOf"),s=n.topLevelTypes,u=i.getFirstReactDOM,c={mouseEnter:{registrationName:a({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:a({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},l=[null,null],p={eventTypes:c,extractEvents:function(e,t,n,a){if(e===s.topMouseOver&&(a.relatedTarget||a.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var p;if(t.window===t)p=t;else{var d=t.ownerDocument;p=d?d.defaultView||d.parentWindow:window}var f,h;if(e===s.topMouseOut?(f=t,h=u(a.relatedTarget||a.toElement)||p):(f=p,h=t),f===h)return null;var v=f?i.getID(f):"",m=h?i.getID(h):"",g=o.getPooled(c.mouseLeave,v,a);g.type="mouseleave",g.target=f,g.relatedTarget=h;var y=o.getPooled(c.mouseEnter,m,a);return y.type="mouseenter",y.target=h,y.relatedTarget=f,r.accumulateEnterLeaveDispatches(g,y,v,m),l[0]=g,l[1]=y,l}};t.exports=p},{"./EventConstants":16,"./EventPropagators":21,"./ReactMount":65,"./SyntheticMouseEvent":97,"./keyOf":138}],16:[function(e,t){"use strict";var n=e("./keyMirror"),r=n({bubbled:null,captured:null}),o=n({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),i={topLevelTypes:o,PropagationPhases:r};t.exports=i},{"./keyMirror":137}],17:[function(e,t){var n=e("./emptyFunction"),r={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,r){return e.addEventListener?(e.addEventListener(t,r,!0),{remove:function(){e.removeEventListener(t,r,!0)}}):{remove:n}},registerDefault:function(){}};t.exports=r},{"./emptyFunction":113}],18:[function(e,t){"use strict";var n=e("./EventPluginRegistry"),r=e("./EventPluginUtils"),o=e("./accumulate"),i=e("./forEachAccumulated"),a=e("./invariant"),s=(e("./isEventSupported"),e("./monitorCodeUse"),{}),u=null,c=function(e){if(e){var t=r.executeDispatch,o=n.getPluginModuleForEvent(e);o&&o.executeDispatch&&(t=o.executeDispatch),r.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},l=null,p={injection:{injectMount:r.injection.injectMount,injectInstanceHandle:function(e){l=e},getInstanceHandle:function(){return l},injectEventPluginOrder:n.injectEventPluginOrder,injectEventPluginsByName:n.injectEventPluginsByName},eventNameDispatchConfigs:n.eventNameDispatchConfigs,registrationNameModules:n.registrationNameModules,putListener:function(e,t,n){a(!n||"function"==typeof n);var r=s[t]||(s[t]={});r[e]=n},getListener:function(e,t){var n=s[t];return n&&n[e]},deleteListener:function(e,t){var n=s[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in s)delete s[t][e]},extractEvents:function(e,t,r,i){for(var a,s=n.plugins,u=0,c=s.length;c>u;u++){var l=s[u];if(l){var p=l.extractEvents(e,t,r,i);p&&(a=o(a,p))}}return a},enqueueEvents:function(e){e&&(u=o(u,e))},processEventQueue:function(){var e=u;u=null,i(e,c),a(!u)},__purge:function(){s={}},__getListenerBank:function(){return s}};t.exports=p},{"./EventPluginRegistry":19,"./EventPluginUtils":20,"./accumulate":103,"./forEachAccumulated":118,"./invariant":131,"./isEventSupported":132,"./monitorCodeUse":145}],19:[function(e,t){"use strict";function n(){if(a)for(var e in s){var t=s[e],n=a.indexOf(e);if(i(n>-1),!u.plugins[n]){i(t.extractEvents),u.plugins[n]=t;var o=t.eventTypes;for(var c in o)i(r(o[c],t,c))}}}function r(e,t,n){i(!u.eventNameDispatchConfigs.hasOwnProperty(n)),u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var a in r)if(r.hasOwnProperty(a)){var s=r[a];o(s,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){i(!u.registrationNameModules[e]),u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e("./invariant"),a=null,s={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){i(!a),a=Array.prototype.slice.call(e),n()},injectEventPluginsByName:function(e){var t=!1;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];s.hasOwnProperty(r)&&s[r]===o||(i(!s[r]),s[r]=o,t=!0)}t&&n()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){a=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=u},{"./invariant":131}],20:[function(e,t){"use strict";function n(e){return e===v.topMouseUp||e===v.topTouchEnd||e===v.topTouchCancel}function r(e){return e===v.topMouseMove||e===v.topTouchMove}function o(e){return e===v.topMouseDown||e===v.topTouchStart}function i(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)t(e,n[o],r[o]);else n&&t(e,n,r)}function a(e,t,n){e.currentTarget=h.Mount.getNode(n);var r=t(e,n);return e.currentTarget=null,r}function s(e,t){i(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function u(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function c(e){var t=u(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function l(e){var t=e._dispatchListeners,n=e._dispatchIDs;f(!Array.isArray(t));var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function p(e){return!!e._dispatchListeners}var d=e("./EventConstants"),f=e("./invariant"),h={Mount:null,injectMount:function(e){h.Mount=e}},v=d.topLevelTypes,m={isEndish:n,isMoveish:r,isStartish:o,executeDirectDispatch:l,executeDispatch:a,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:c,hasDispatches:p,injection:h,useTouchEvents:!1};t.exports=m},{"./EventConstants":16,"./invariant":131}],21:[function(e,t){"use strict";function n(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return v(e,r)}function r(e,t,r){var o=t?h.bubbled:h.captured,i=n(e,r,o);i&&(r._dispatchListeners=d(r._dispatchListeners,i),r._dispatchIDs=d(r._dispatchIDs,e))}function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&p.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,r,e)}function i(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=v(e,r);o&&(n._dispatchListeners=d(n._dispatchListeners,o),n._dispatchIDs=d(n._dispatchIDs,e))}}function a(e){e&&e.dispatchConfig.registrationName&&i(e.dispatchMarker,null,e)}function s(e){f(e,o)}function u(e,t,n,r){p.injection.getInstanceHandle().traverseEnterLeave(n,r,i,e,t)}function c(e){f(e,a)}var l=e("./EventConstants"),p=e("./EventPluginHub"),d=e("./accumulate"),f=e("./forEachAccumulated"),h=l.PropagationPhases,v=p.getListener,m={accumulateTwoPhaseDispatches:s,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:u};t.exports=m},{"./EventConstants":16,"./EventPluginHub":18,"./accumulate":103,"./forEachAccumulated":118}],22:[function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};t.exports=r},{}],23:[function(e,t){"use strict";var n,r=e("./DOMProperty"),o=e("./ExecutionEnvironment"),i=r.injection.MUST_USE_ATTRIBUTE,a=r.injection.MUST_USE_PROPERTY,s=r.injection.HAS_BOOLEAN_VALUE,u=r.injection.HAS_SIDE_EFFECTS,c=r.injection.HAS_NUMERIC_VALUE,l=r.injection.HAS_POSITIVE_NUMERIC_VALUE,p=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(o.canUseDOM){var d=document.implementation;n=d&&d.hasFeature&&d.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var f={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,accessKey:null,action:null,allowFullScreen:i|s,allowTransparency:i,alt:null,async:s,autoComplete:null,autoPlay:s,cellPadding:null,cellSpacing:null,charSet:i,checked:a|s,className:n?i:a,cols:i|l,colSpan:null,content:null,contentEditable:null,contextMenu:i,controls:a|s,coords:null,crossOrigin:null,data:null,dateTime:i,defer:s,dir:null,disabled:i|s,download:p,draggable:null,encType:null,form:i,formNoValidate:s,frameBorder:i,height:i,hidden:i|s,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:a,label:null,lang:null,list:null,loop:a|s,max:null,maxLength:i,media:i,mediaGroup:null,method:null,min:null,multiple:a|s,muted:a|s,name:null,noValidate:s,open:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:a|s,rel:null,required:s,role:i,rows:i|l,rowSpan:null,sandbox:null,scope:null,scrollLeft:a,scrolling:null,scrollTop:a,seamless:i|s,selected:a|s,shape:null,size:i|l,sizes:i,span:l,spellCheck:null,src:null,srcDoc:a,srcSet:i,start:c,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:a|u,width:i,wmode:i,autoCapitalize:null,autoCorrect:null,itemProp:i,itemScope:i|s,itemType:i,property:null},DOMAttributeNames:{className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"enctype",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=f},{"./DOMProperty":11,"./ExecutionEnvironment":22}],24:[function(e,t){"use strict";var n=e("./ReactLink"),r=e("./ReactStateSetters"),o={linkState:function(e){return new n(this.state[e],r.createStateKeySetter(this,e))}};t.exports=o},{"./ReactLink":63,"./ReactStateSetters":79}],25:[function(e,t){"use strict";function n(e){u(null==e.props.checkedLink||null==e.props.valueLink)}function r(e){n(e),u(null==e.props.value&&null==e.props.onChange)}function o(e){n(e),u(null==e.props.checked&&null==e.props.onChange)}function i(e){this.props.valueLink.requestChange(e.target.value)}function a(e){this.props.checkedLink.requestChange(e.target.checked)}var s=e("./ReactPropTypes"),u=e("./invariant"),c={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},l={Mixin:{propTypes:{value:function(e,t){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?void 0:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t){return!e[t]||e.onChange||e.readOnly||e.disabled?void 0:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func}},getValue:function(e){return e.props.valueLink?(r(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(o(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(r(e),i):e.props.checkedLink?(o(e),a):e.props.onChange}};t.exports=l},{"./ReactPropTypes":73,"./invariant":131}],26:[function(e,t){"use strict";function n(e){e.remove()}var r=e("./ReactBrowserEventEmitter"),o=e("./accumulate"),i=e("./forEachAccumulated"),a=e("./invariant"),s={trapBubbledEvent:function(e,t){a(this.isMounted());var n=r.trapBubbledEvent(e,t,this.getDOMNode());this._localEventListeners=o(this._localEventListeners,n)},componentWillUnmount:function(){this._localEventListeners&&i(this._localEventListeners,n)}};t.exports=s},{"./ReactBrowserEventEmitter":31,"./accumulate":103,"./forEachAccumulated":118,"./invariant":131}],27:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./emptyFunction"),o=n.topLevelTypes,i={eventTypes:null,extractEvents:function(e,t,n,i){if(e===o.topTouchStart){var a=i.target;a&&!a.onclick&&(a.onclick=r)}}};t.exports=i},{"./EventConstants":16,"./emptyFunction":113}],28:[function(e,t){"use strict";var n=e("./invariant"),r=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},o=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},a=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},s=function(e){var t=this;n(e instanceof t),e.destructor&&e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},u=10,c=r,l=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||c,n.poolSize||(n.poolSize=u),n.release=s,n},p={addPoolingTo:l,oneArgumentPooler:r,twoArgumentPooler:o,threeArgumentPooler:i,fiveArgumentPooler:a};t.exports=p},{"./invariant":131}],29:[function(e,t){"use strict";function n(e){var t=Array.prototype.slice.call(arguments,1);return e.apply(null,t)}{var r=e("./DOMPropertyOperations"),o=e("./EventPluginUtils"),i=e("./ReactChildren"),a=e("./ReactComponent"),s=e("./ReactCompositeComponent"),u=e("./ReactContext"),c=e("./ReactCurrentOwner"),l=e("./ReactDescriptor"),p=e("./ReactDOM"),d=e("./ReactDOMComponent"),f=e("./ReactDefaultInjection"),h=e("./ReactInstanceHandles"),v=e("./ReactMount"),m=e("./ReactMultiChild"),g=e("./ReactPerf"),y=e("./ReactPropTypes"),C=e("./ReactServerRendering"),E=e("./ReactTextComponent"),R=e("./onlyChild");e("./warning")}f.inject();var M={Children:{map:i.map,forEach:i.forEach,count:i.count,only:R},DOM:p,PropTypes:y,initializeTouchEvents:function(e){o.useTouchEvents=e},createClass:s.createClass,createDescriptor:function(){return n.apply(this,arguments)},createElement:n,constructAndRenderComponent:v.constructAndRenderComponent,constructAndRenderComponentByID:v.constructAndRenderComponentByID,renderComponent:g.measure("React","renderComponent",v.renderComponent),renderComponentToString:C.renderComponentToString,renderComponentToStaticMarkup:C.renderComponentToStaticMarkup,unmountComponentAtNode:v.unmountComponentAtNode,isValidClass:l.isValidFactory,isValidComponent:l.isValidDescriptor,withContext:u.withContext,__internals:{Component:a,CurrentOwner:c,DOMComponent:d,DOMPropertyOperations:r,InstanceHandles:h,Mount:v,MultiChild:m,TextComponent:E}};M.version="0.11.2",t.exports=M},{"./DOMPropertyOperations":12,"./EventPluginUtils":20,"./ReactChildren":34,"./ReactComponent":35,"./ReactCompositeComponent":38,"./ReactContext":39,"./ReactCurrentOwner":40,"./ReactDOM":41,"./ReactDOMComponent":43,"./ReactDefaultInjection":53,"./ReactDescriptor":54,"./ReactInstanceHandles":62,"./ReactMount":65,"./ReactMultiChild":66,"./ReactPerf":69,"./ReactPropTypes":73,"./ReactServerRendering":77,"./ReactTextComponent":80,"./onlyChild":146,"./warning":153}],30:[function(e,t){"use strict"; +var n=e("./ReactEmptyComponent"),r=e("./ReactMount"),o=e("./invariant"),i={getDOMNode:function(){return o(this.isMounted()),n.isNullComponentID(this._rootNodeID)?null:r.getNode(this._rootNodeID)}};t.exports=i},{"./ReactEmptyComponent":56,"./ReactMount":65,"./invariant":131}],31:[function(e,t){"use strict";function n(e){return Object.prototype.hasOwnProperty.call(e,h)||(e[h]=d++,l[e[h]]={}),l[e[h]]}var r=e("./EventConstants"),o=e("./EventPluginHub"),i=e("./EventPluginRegistry"),a=e("./ReactEventEmitterMixin"),s=e("./ViewportMetrics"),u=e("./isEventSupported"),c=e("./merge"),l={},p=!1,d=0,f={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},h="_reactListenersID"+String(Math.random()).slice(2),v=c(a,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var o=t,a=n(o),s=i.registrationNameDependencies[e],c=r.topLevelTypes,l=0,p=s.length;p>l;l++){var d=s[l];a.hasOwnProperty(d)&&a[d]||(d===c.topWheel?u("wheel")?v.ReactEventListener.trapBubbledEvent(c.topWheel,"wheel",o):u("mousewheel")?v.ReactEventListener.trapBubbledEvent(c.topWheel,"mousewheel",o):v.ReactEventListener.trapBubbledEvent(c.topWheel,"DOMMouseScroll",o):d===c.topScroll?u("scroll",!0)?v.ReactEventListener.trapCapturedEvent(c.topScroll,"scroll",o):v.ReactEventListener.trapBubbledEvent(c.topScroll,"scroll",v.ReactEventListener.WINDOW_HANDLE):d===c.topFocus||d===c.topBlur?(u("focus",!0)?(v.ReactEventListener.trapCapturedEvent(c.topFocus,"focus",o),v.ReactEventListener.trapCapturedEvent(c.topBlur,"blur",o)):u("focusin")&&(v.ReactEventListener.trapBubbledEvent(c.topFocus,"focusin",o),v.ReactEventListener.trapBubbledEvent(c.topBlur,"focusout",o)),a[c.topBlur]=!0,a[c.topFocus]=!0):f.hasOwnProperty(d)&&v.ReactEventListener.trapBubbledEvent(d,f[d],o),a[d]=!0)}},trapBubbledEvent:function(e,t,n){return v.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return v.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!p){var e=s.refreshScrollValues;v.ReactEventListener.monitorScrollValue(e),p=!0}},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:o.putListener,getListener:o.getListener,deleteListener:o.deleteListener,deleteAllListeners:o.deleteAllListeners});t.exports=v},{"./EventConstants":16,"./EventPluginHub":18,"./EventPluginRegistry":19,"./ReactEventEmitterMixin":58,"./ViewportMetrics":102,"./isEventSupported":132,"./merge":141}],32:[function(e,t){"use strict";var n=e("./React"),r=e("./ReactTransitionGroup"),o=e("./ReactCSSTransitionGroupChild"),i=n.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:n.PropTypes.string.isRequired,transitionEnter:n.PropTypes.bool,transitionLeave:n.PropTypes.bool},getDefaultProps:function(){return{transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return o({name:this.props.transitionName,enter:this.props.transitionEnter,leave:this.props.transitionLeave},e)},render:function(){return this.transferPropsTo(r({childFactory:this._wrapChild},this.props.children))}});t.exports=i},{"./React":29,"./ReactCSSTransitionGroupChild":33,"./ReactTransitionGroup":83}],33:[function(e,t){"use strict";var n=e("./React"),r=e("./CSSCore"),o=e("./ReactTransitionEvents"),i=e("./onlyChild"),a=17,s=n.createClass({displayName:"ReactCSSTransitionGroupChild",transition:function(e,t){var n=this.getDOMNode(),i=this.props.name+"-"+e,a=i+"-active",s=function(){r.removeClass(n,i),r.removeClass(n,a),o.removeEndEventListener(n,s),t&&t()};o.addEndEventListener(n,s),r.addClass(n,i),this.queueClass(a)},queueClass:function(e){this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,a))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(r.addClass.bind(r,this.getDOMNode())),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout)},componentWillEnter:function(e){this.props.enter?this.transition("enter",e):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e):e()},render:function(){return i(this.props.children)}});t.exports=s},{"./CSSCore":3,"./React":29,"./ReactTransitionEvents":82,"./onlyChild":146}],34:[function(e,t){"use strict";function n(e,t){this.forEachFunction=e,this.forEachContext=t}function r(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function o(e,t,o){if(null==e)return e;var i=n.getPooled(t,o);p(e,r,i),n.release(i)}function i(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function a(e,t,n,r){var o=e,i=o.mapResult,a=!i.hasOwnProperty(n);if(a){var s=o.mapFunction.call(o.mapContext,t,r);i[n]=s}}function s(e,t,n){if(null==e)return e;var r={},o=i.getPooled(r,t,n);return p(e,a,o),i.release(o),r}function u(){return null}function c(e){return p(e,u,null)}var l=e("./PooledClass"),p=e("./traverseAllChildren"),d=(e("./warning"),l.twoArgumentPooler),f=l.threeArgumentPooler;l.addPoolingTo(n,d),l.addPoolingTo(i,f);var h={forEach:o,map:s,count:c};t.exports=h},{"./PooledClass":28,"./traverseAllChildren":151,"./warning":153}],35:[function(e,t){"use strict";var n=e("./ReactDescriptor"),r=e("./ReactOwner"),o=e("./ReactUpdates"),i=e("./invariant"),a=e("./keyMirror"),s=e("./merge"),u=a({MOUNTED:null,UNMOUNTED:null}),c=!1,l=null,p=null,d={injection:{injectEnvironment:function(e){i(!c),p=e.mountImageIntoNode,l=e.unmountIDFromEnvironment,d.BackendIDOperations=e.BackendIDOperations,c=!0}},LifeCycle:u,BackendIDOperations:null,Mixin:{isMounted:function(){return this._lifeCycleState===u.MOUNTED},setProps:function(e,t){var n=this._pendingDescriptor||this._descriptor;this.replaceProps(s(n.props,e),t)},replaceProps:function(e,t){i(this.isMounted()),i(0===this._mountDepth),this._pendingDescriptor=n.cloneAndReplaceProps(this._pendingDescriptor||this._descriptor,e),o.enqueueUpdate(this,t)},_setPropsInternal:function(e,t){var r=this._pendingDescriptor||this._descriptor;this._pendingDescriptor=n.cloneAndReplaceProps(r,s(r.props,e)),o.enqueueUpdate(this,t)},construct:function(e){this.props=e.props,this._owner=e._owner,this._lifeCycleState=u.UNMOUNTED,this._pendingCallbacks=null,this._descriptor=e,this._pendingDescriptor=null},mountComponent:function(e,t,n){i(!this.isMounted());var o=this._descriptor.props;if(null!=o.ref){var a=this._descriptor._owner;r.addComponentAsRefTo(this,o.ref,a)}this._rootNodeID=e,this._lifeCycleState=u.MOUNTED,this._mountDepth=n},unmountComponent:function(){i(this.isMounted());var e=this.props;null!=e.ref&&r.removeComponentAsRefFrom(this,e.ref,this._owner),l(this._rootNodeID),this._rootNodeID=null,this._lifeCycleState=u.UNMOUNTED},receiveComponent:function(e,t){i(this.isMounted()),this._pendingDescriptor=e,this.performUpdateIfNecessary(t)},performUpdateIfNecessary:function(e){if(null!=this._pendingDescriptor){var t=this._descriptor,n=this._pendingDescriptor;this._descriptor=n,this.props=n.props,this._owner=n._owner,this._pendingDescriptor=null,this.updateComponent(e,t)}},updateComponent:function(e,t){var n=this._descriptor;(n._owner!==t._owner||n.props.ref!==t.props.ref)&&(null!=t.props.ref&&r.removeComponentAsRefFrom(this,t.props.ref,t._owner),null!=n.props.ref&&r.addComponentAsRefTo(this,n.props.ref,n._owner))},mountComponentIntoNode:function(e,t,n){var r=o.ReactReconcileTransaction.getPooled();r.perform(this._mountComponentIntoNode,this,e,t,r,n),o.ReactReconcileTransaction.release(r)},_mountComponentIntoNode:function(e,t,n,r){var o=this.mountComponent(e,n,0);p(o,t,r)},isOwnedBy:function(e){return this._owner===e},getSiblingByRef:function(e){var t=this._owner;return t&&t.refs?t.refs[e]:null}}};t.exports=d},{"./ReactDescriptor":54,"./ReactOwner":68,"./ReactUpdates":84,"./invariant":131,"./keyMirror":137,"./merge":141}],36:[function(e,t){"use strict";var n=e("./ReactDOMIDOperations"),r=e("./ReactMarkupChecksum"),o=e("./ReactMount"),i=e("./ReactPerf"),a=e("./ReactReconcileTransaction"),s=e("./getReactRootElementInContainer"),u=e("./invariant"),c=e("./setInnerHTML"),l=1,p=9,d={ReactReconcileTransaction:a,BackendIDOperations:n,unmountIDFromEnvironment:function(e){o.purgeID(e)},mountImageIntoNode:i.measure("ReactComponentBrowserEnvironment","mountImageIntoNode",function(e,t,n){if(u(t&&(t.nodeType===l||t.nodeType===p)),n){if(r.canReuseMarkup(e,s(t)))return;u(t.nodeType!==p)}u(t.nodeType!==p),c(t,e)})};t.exports=d},{"./ReactDOMIDOperations":45,"./ReactMarkupChecksum":64,"./ReactMount":65,"./ReactPerf":69,"./ReactReconcileTransaction":75,"./getReactRootElementInContainer":125,"./invariant":131,"./setInnerHTML":147}],37:[function(e,t){"use strict";var n=e("./shallowEqual"),r={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}};t.exports=r},{"./shallowEqual":148}],38:[function(e,t){"use strict";function n(e){var t=e._owner||null;return t&&t.constructor&&t.constructor.displayName?" Check the render method of `"+t.constructor.displayName+"`.":""}function r(e,t){for(var n in t)t.hasOwnProperty(n)&&D("function"==typeof t[n])}function o(e,t){var n=_.hasOwnProperty(t)?_[t]:null;k.hasOwnProperty(t)&&D(n===S.OVERRIDE_BASE),e.hasOwnProperty(t)&&D(n===S.DEFINE_MANY||n===S.DEFINE_MANY_MERGED)}function i(e){var t=e._compositeLifeCycleState;D(e.isMounted()||t===N.MOUNTING),D(t!==N.RECEIVING_STATE),D(t!==N.UNMOUNTING)}function a(e,t){D(!h.isValidFactory(t)),D(!h.isValidDescriptor(t));var n=e.prototype;for(var r in t){var i=t[r];if(t.hasOwnProperty(r))if(o(n,r),I.hasOwnProperty(r))I[r](e,i);else{var a=_.hasOwnProperty(r),s=n.hasOwnProperty(r),u=i&&i.__reactDontBind,p="function"==typeof i,d=p&&!a&&!s&&!u;if(d)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[r]=i,n[r]=i;else if(s){var f=_[r];D(a&&(f===S.DEFINE_MANY_MERGED||f===S.DEFINE_MANY)),f===S.DEFINE_MANY_MERGED?n[r]=c(n[r],i):f===S.DEFINE_MANY&&(n[r]=l(n[r],i))}else n[r]=i}}}function s(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in e,i=r;if(o){var a=e[n],s=typeof a,u=typeof r;D("function"===s&&"function"===u),i=l(a,r)}e[n]=i}}}function u(e,t){return D(e&&t&&"object"==typeof e&&"object"==typeof t),P(t,function(t,n){D(void 0===e[n]),e[n]=t}),e}function c(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);return null==n?r:null==r?n:u(n,r)}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}var p=e("./ReactComponent"),d=e("./ReactContext"),f=e("./ReactCurrentOwner"),h=e("./ReactDescriptor"),v=(e("./ReactDescriptorValidator"),e("./ReactEmptyComponent")),m=e("./ReactErrorUtils"),g=e("./ReactOwner"),y=e("./ReactPerf"),C=e("./ReactPropTransferer"),E=e("./ReactPropTypeLocations"),R=(e("./ReactPropTypeLocationNames"),e("./ReactUpdates")),M=e("./instantiateReactComponent"),D=e("./invariant"),x=e("./keyMirror"),b=e("./merge"),O=e("./mixInto"),P=(e("./monitorCodeUse"),e("./mapObject")),T=e("./shouldUpdateReactComponent"),S=(e("./warning"),x({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null})),w=[],_={mixins:S.DEFINE_MANY,statics:S.DEFINE_MANY,propTypes:S.DEFINE_MANY,contextTypes:S.DEFINE_MANY,childContextTypes:S.DEFINE_MANY,getDefaultProps:S.DEFINE_MANY_MERGED,getInitialState:S.DEFINE_MANY_MERGED,getChildContext:S.DEFINE_MANY_MERGED,render:S.DEFINE_ONCE,componentWillMount:S.DEFINE_MANY,componentDidMount:S.DEFINE_MANY,componentWillReceiveProps:S.DEFINE_MANY,shouldComponentUpdate:S.DEFINE_ONCE,componentWillUpdate:S.DEFINE_MANY,componentDidUpdate:S.DEFINE_MANY,componentWillUnmount:S.DEFINE_MANY,updateComponent:S.OVERRIDE_BASE},I={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)a(e,t[n])},childContextTypes:function(e,t){r(e,t,E.childContext),e.childContextTypes=b(e.childContextTypes,t)},contextTypes:function(e,t){r(e,t,E.context),e.contextTypes=b(e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps=e.getDefaultProps?c(e.getDefaultProps,t):t},propTypes:function(e,t){r(e,t,E.prop),e.propTypes=b(e.propTypes,t)},statics:function(e,t){s(e,t)}},N=x({MOUNTING:null,UNMOUNTING:null,RECEIVING_PROPS:null,RECEIVING_STATE:null}),k={construct:function(){p.Mixin.construct.apply(this,arguments),g.Mixin.construct.apply(this,arguments),this.state=null,this._pendingState=null,this.context=null,this._compositeLifeCycleState=null},isMounted:function(){return p.Mixin.isMounted.call(this)&&this._compositeLifeCycleState!==N.MOUNTING},mountComponent:y.measure("ReactCompositeComponent","mountComponent",function(e,t,n){p.Mixin.mountComponent.call(this,e,t,n),this._compositeLifeCycleState=N.MOUNTING,this.__reactAutoBindMap&&this._bindAutoBindMethods(),this.context=this._processContext(this._descriptor._context),this.props=this._processProps(this.props),this.state=this.getInitialState?this.getInitialState():null,D("object"==typeof this.state&&!Array.isArray(this.state)),this._pendingState=null,this._pendingForceUpdate=!1,this.componentWillMount&&(this.componentWillMount(),this._pendingState&&(this.state=this._pendingState,this._pendingState=null)),this._renderedComponent=M(this._renderValidatedComponent()),this._compositeLifeCycleState=null;var r=this._renderedComponent.mountComponent(e,t,n+1);return this.componentDidMount&&t.getReactMountReady().enqueue(this.componentDidMount,this),r}),unmountComponent:function(){this._compositeLifeCycleState=N.UNMOUNTING,this.componentWillUnmount&&this.componentWillUnmount(),this._compositeLifeCycleState=null,this._renderedComponent.unmountComponent(),this._renderedComponent=null,p.Mixin.unmountComponent.call(this)},setState:function(e,t){D("object"==typeof e||null==e),this.replaceState(b(this._pendingState||this.state,e),t)},replaceState:function(e,t){i(this),this._pendingState=e,this._compositeLifeCycleState!==N.MOUNTING&&R.enqueueUpdate(this,t)},_processContext:function(e){var t=null,n=this.constructor.contextTypes;if(n){t={};for(var r in n)t[r]=e[r]}return t},_processChildContext:function(e){var t=this.getChildContext&&this.getChildContext();if(this.constructor.displayName||"ReactCompositeComponent",t){D("object"==typeof this.constructor.childContextTypes);for(var n in t)D(n in this.constructor.childContextTypes);return b(e,t)}return e},_processProps:function(e){var t,n=this.constructor.defaultProps;if(n){t=b(e);for(var r in n)"undefined"==typeof t[r]&&(t[r]=n[r])}else t=e;return t},_checkPropTypes:function(e,t,r){var o=this.constructor.displayName;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i](t,i,o,r);a instanceof Error&&n(this)}},performUpdateIfNecessary:function(e){var t=this._compositeLifeCycleState;if(t!==N.MOUNTING&&t!==N.RECEIVING_PROPS&&(null!=this._pendingDescriptor||null!=this._pendingState||this._pendingForceUpdate)){var n=this.context,r=this.props,o=this._descriptor;null!=this._pendingDescriptor&&(o=this._pendingDescriptor,n=this._processContext(o._context),r=this._processProps(o.props),this._pendingDescriptor=null,this._compositeLifeCycleState=N.RECEIVING_PROPS,this.componentWillReceiveProps&&this.componentWillReceiveProps(r,n)),this._compositeLifeCycleState=N.RECEIVING_STATE;var i=this._pendingState||this.state;this._pendingState=null;try{var a=this._pendingForceUpdate||!this.shouldComponentUpdate||this.shouldComponentUpdate(r,i,n);a?(this._pendingForceUpdate=!1,this._performComponentUpdate(o,r,i,n,e)):(this._descriptor=o,this.props=r,this.state=i,this.context=n,this._owner=o._owner)}finally{this._compositeLifeCycleState=null}}},_performComponentUpdate:function(e,t,n,r,o){var i=this._descriptor,a=this.props,s=this.state,u=this.context;this.componentWillUpdate&&this.componentWillUpdate(t,n,r),this._descriptor=e,this.props=t,this.state=n,this.context=r,this._owner=e._owner,this.updateComponent(o,i),this.componentDidUpdate&&o.getReactMountReady().enqueue(this.componentDidUpdate.bind(this,a,s,u),this)},receiveComponent:function(e,t){(e!==this._descriptor||null==e._owner)&&p.Mixin.receiveComponent.call(this,e,t)},updateComponent:y.measure("ReactCompositeComponent","updateComponent",function(e,t){p.Mixin.updateComponent.call(this,e,t);var n=this._renderedComponent,r=n._descriptor,o=this._renderValidatedComponent();if(T(r,o))n.receiveComponent(o,e);else{var i=this._rootNodeID,a=n._rootNodeID;n.unmountComponent(),this._renderedComponent=M(o);var s=this._renderedComponent.mountComponent(i,e,this._mountDepth+1);p.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(a,s)}}),forceUpdate:function(e){var t=this._compositeLifeCycleState;D(this.isMounted()||t===N.MOUNTING),D(t!==N.RECEIVING_STATE&&t!==N.UNMOUNTING),this._pendingForceUpdate=!0,R.enqueueUpdate(this,e)},_renderValidatedComponent:y.measure("ReactCompositeComponent","_renderValidatedComponent",function(){var e,t=d.current;d.current=this._processChildContext(this._descriptor._context),f.current=this;try{e=this.render(),null===e||e===!1?(e=v.getEmptyComponent(),v.registerNullComponentID(this._rootNodeID)):v.deregisterNullComponentID(this._rootNodeID)}finally{d.current=t,f.current=null}return D(h.isValidDescriptor(e)),e}),_bindAutoBindMethods:function(){for(var e in this.__reactAutoBindMap)if(this.__reactAutoBindMap.hasOwnProperty(e)){var t=this.__reactAutoBindMap[e];this[e]=this._bindAutoBindMethod(m.guard(t,this.constructor.displayName+"."+e))}},_bindAutoBindMethod:function(e){var t=this,n=function(){return e.apply(t,arguments)};return n}},A=function(){};O(A,p.Mixin),O(A,g.Mixin),O(A,C.Mixin),O(A,k);var L={LifeCycle:N,Base:A,createClass:function(e){var t=function(e,t){this.construct(e,t)};t.prototype=new A,t.prototype.constructor=t,w.forEach(a.bind(null,t)),a(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),D(t.prototype.render);for(var n in _)t.prototype[n]||(t.prototype[n]=null);var r=h.createFactory(t);return r},injection:{injectMixin:function(e){w.push(e)}}};t.exports=L},{"./ReactComponent":35,"./ReactContext":39,"./ReactCurrentOwner":40,"./ReactDescriptor":54,"./ReactDescriptorValidator":55,"./ReactEmptyComponent":56,"./ReactErrorUtils":57,"./ReactOwner":68,"./ReactPerf":69,"./ReactPropTransferer":70,"./ReactPropTypeLocationNames":71,"./ReactPropTypeLocations":72,"./ReactUpdates":84,"./instantiateReactComponent":130,"./invariant":131,"./keyMirror":137,"./mapObject":139,"./merge":141,"./mixInto":144,"./monitorCodeUse":145,"./shouldUpdateReactComponent":149,"./warning":153}],39:[function(e,t){"use strict";var n=e("./merge"),r={current:{},withContext:function(e,t){var o,i=r.current;r.current=n(i,e);try{o=t()}finally{r.current=i}return o}};t.exports=r},{"./merge":141}],40:[function(e,t){"use strict";var n={current:null};t.exports=n},{}],41:[function(e,t){"use strict";function n(e,t){var n=function(e){this.construct(e)};n.prototype=new o(t,e),n.prototype.constructor=n,n.displayName=t;var i=r.createFactory(n);return i}var r=e("./ReactDescriptor"),o=(e("./ReactDescriptorValidator"),e("./ReactDOMComponent")),i=e("./mergeInto"),a=e("./mapObject"),s=a({a:!1,abbr:!1,address:!1,area:!0,article:!1,aside:!1,audio:!1,b:!1,base:!0,bdi:!1,bdo:!1,big:!1,blockquote:!1,body:!1,br:!0,button:!1,canvas:!1,caption:!1,cite:!1,code:!1,col:!0,colgroup:!1,data:!1,datalist:!1,dd:!1,del:!1,details:!1,dfn:!1,dialog:!1,div:!1,dl:!1,dt:!1,em:!1,embed:!0,fieldset:!1,figcaption:!1,figure:!1,footer:!1,form:!1,h1:!1,h2:!1,h3:!1,h4:!1,h5:!1,h6:!1,head:!1,header:!1,hr:!0,html:!1,i:!1,iframe:!1,img:!0,input:!0,ins:!1,kbd:!1,keygen:!0,label:!1,legend:!1,li:!1,link:!0,main:!1,map:!1,mark:!1,menu:!1,menuitem:!1,meta:!0,meter:!1,nav:!1,noscript:!1,object:!1,ol:!1,optgroup:!1,option:!1,output:!1,p:!1,param:!0,picture:!1,pre:!1,progress:!1,q:!1,rp:!1,rt:!1,ruby:!1,s:!1,samp:!1,script:!1,section:!1,select:!1,small:!1,source:!0,span:!1,strong:!1,style:!1,sub:!1,summary:!1,sup:!1,table:!1,tbody:!1,td:!1,textarea:!1,tfoot:!1,th:!1,thead:!1,time:!1,title:!1,tr:!1,track:!0,u:!1,ul:!1,"var":!1,video:!1,wbr:!0,circle:!1,defs:!1,ellipse:!1,g:!1,line:!1,linearGradient:!1,mask:!1,path:!1,pattern:!1,polygon:!1,polyline:!1,radialGradient:!1,rect:!1,stop:!1,svg:!1,text:!1,tspan:!1},n),u={injectComponentClasses:function(e){i(s,e)}};s.injection=u,t.exports=s},{"./ReactDOMComponent":43,"./ReactDescriptor":54,"./ReactDescriptorValidator":55,"./mapObject":139,"./mergeInto":143}],42:[function(e,t){"use strict";var n=e("./AutoFocusMixin"),r=e("./ReactBrowserComponentMixin"),o=e("./ReactCompositeComponent"),i=e("./ReactDOM"),a=e("./keyMirror"),s=i.button,u=a({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),c=o.createClass({displayName:"ReactDOMButton",mixins:[n,r],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&u[t]||(e[t]=this.props[t]);return s(e,this.props.children)}});t.exports=c},{"./AutoFocusMixin":1,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41,"./keyMirror":137}],43:[function(e,t){"use strict";function n(e){e&&(v(null==e.children||null==e.dangerouslySetInnerHTML),v(null==e.style||"object"==typeof e.style))}function r(e,t,n,r){var o=p.findReactContainerForID(e);if(o){var i=o.nodeType===x?o.ownerDocument:o;E(t,i)}r.getPutListenerQueue().enqueuePutListener(e,t,n)}function o(e,t){this._tagOpen="<"+e,this._tagClose=t?"":"</"+e+">",this.tagName=e.toUpperCase()}var i=e("./CSSPropertyOperations"),a=e("./DOMProperty"),s=e("./DOMPropertyOperations"),u=e("./ReactBrowserComponentMixin"),c=e("./ReactComponent"),l=e("./ReactBrowserEventEmitter"),p=e("./ReactMount"),d=e("./ReactMultiChild"),f=e("./ReactPerf"),h=e("./escapeTextForBrowser"),v=e("./invariant"),m=e("./keyOf"),g=e("./merge"),y=e("./mixInto"),C=l.deleteListener,E=l.listenTo,R=l.registrationNameModules,M={string:!0,number:!0},D=m({style:null}),x=1;o.Mixin={mountComponent:f.measure("ReactDOMComponent","mountComponent",function(e,t,r){return c.Mixin.mountComponent.call(this,e,t,r),n(this.props),this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t)+this._tagClose}),_createOpenTagMarkupAndPutListeners:function(e){var t=this.props,n=this._tagOpen;for(var o in t)if(t.hasOwnProperty(o)){var a=t[o];if(null!=a)if(R.hasOwnProperty(o))r(this._rootNodeID,o,a,e);else{o===D&&(a&&(a=t.style=g(t.style)),a=i.createMarkupForStyles(a));var u=s.createMarkupForProperty(o,a);u&&(n+=" "+u)}}if(e.renderToStaticMarkup)return n+">";var c=s.createMarkupForID(this._rootNodeID);return n+" "+c+">"},_createContentMarkup:function(e){var t=this.props.dangerouslySetInnerHTML;if(null!=t){if(null!=t.__html)return t.__html}else{var n=M[typeof this.props.children]?this.props.children:null,r=null!=n?null:this.props.children;if(null!=n)return h(n);if(null!=r){var o=this.mountChildren(r,e);return o.join("")}}return""},receiveComponent:function(e,t){(e!==this._descriptor||null==e._owner)&&c.Mixin.receiveComponent.call(this,e,t)},updateComponent:f.measure("ReactDOMComponent","updateComponent",function(e,t){n(this._descriptor.props),c.Mixin.updateComponent.call(this,e,t),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e)}),_updateDOMProperties:function(e,t){var n,o,i,s=this.props;for(n in e)if(!s.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===D){var u=e[n];for(o in u)u.hasOwnProperty(o)&&(i=i||{},i[o]="")}else R.hasOwnProperty(n)?C(this._rootNodeID,n):(a.isStandardName[n]||a.isCustomAttribute(n))&&c.BackendIDOperations.deletePropertyByID(this._rootNodeID,n);for(n in s){var l=s[n],p=e[n];if(s.hasOwnProperty(n)&&l!==p)if(n===D)if(l&&(l=s.style=g(l)),p){for(o in p)!p.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(i=i||{},i[o]="");for(o in l)l.hasOwnProperty(o)&&p[o]!==l[o]&&(i=i||{},i[o]=l[o])}else i=l;else R.hasOwnProperty(n)?r(this._rootNodeID,n,l,t):(a.isStandardName[n]||a.isCustomAttribute(n))&&c.BackendIDOperations.updatePropertyByID(this._rootNodeID,n,l)}i&&c.BackendIDOperations.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t){var n=this.props,r=M[typeof e.children]?e.children:null,o=M[typeof n.children]?n.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,a=n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html,s=null!=r?null:e.children,u=null!=o?null:n.children,l=null!=r||null!=i,p=null!=o||null!=a;null!=s&&null==u?this.updateChildren(null,t):l&&!p&&this.updateTextContent(""),null!=o?r!==o&&this.updateTextContent(""+o):null!=a?i!==a&&c.BackendIDOperations.updateInnerHTMLByID(this._rootNodeID,a):null!=u&&this.updateChildren(u,t)},unmountComponent:function(){this.unmountChildren(),l.deleteAllListeners(this._rootNodeID),c.Mixin.unmountComponent.call(this)}},y(o,c.Mixin),y(o,o.Mixin),y(o,d.Mixin),y(o,u),t.exports=o},{"./CSSPropertyOperations":5,"./DOMProperty":11,"./DOMPropertyOperations":12,"./ReactBrowserComponentMixin":30,"./ReactBrowserEventEmitter":31,"./ReactComponent":35,"./ReactMount":65,"./ReactMultiChild":66,"./ReactPerf":69,"./escapeTextForBrowser":115,"./invariant":131,"./keyOf":138,"./merge":141,"./mixInto":144}],44:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./LocalEventTrapMixin"),o=e("./ReactBrowserComponentMixin"),i=e("./ReactCompositeComponent"),a=e("./ReactDOM"),s=a.form,u=i.createClass({displayName:"ReactDOMForm",mixins:[o,r],render:function(){return this.transferPropsTo(s(null,this.props.children))},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(n.topLevelTypes.topSubmit,"submit")}});t.exports=u},{"./EventConstants":16,"./LocalEventTrapMixin":26,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41}],45:[function(e,t){"use strict";var n=e("./CSSPropertyOperations"),r=e("./DOMChildrenOperations"),o=e("./DOMPropertyOperations"),i=e("./ReactMount"),a=e("./ReactPerf"),s=e("./invariant"),u=e("./setInnerHTML"),c={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:a.measure("ReactDOMIDOperations","updatePropertyByID",function(e,t,n){var r=i.getNode(e);s(!c.hasOwnProperty(t)),null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)}),deletePropertyByID:a.measure("ReactDOMIDOperations","deletePropertyByID",function(e,t,n){var r=i.getNode(e);s(!c.hasOwnProperty(t)),o.deleteValueForProperty(r,t,n)}),updateStylesByID:a.measure("ReactDOMIDOperations","updateStylesByID",function(e,t){var r=i.getNode(e);n.setValueForStyles(r,t)}),updateInnerHTMLByID:a.measure("ReactDOMIDOperations","updateInnerHTMLByID",function(e,t){var n=i.getNode(e);u(n,t)}),updateTextContentByID:a.measure("ReactDOMIDOperations","updateTextContentByID",function(e,t){var n=i.getNode(e);r.updateTextContent(n,t)}),dangerouslyReplaceNodeWithMarkupByID:a.measure("ReactDOMIDOperations","dangerouslyReplaceNodeWithMarkupByID",function(e,t){var n=i.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)}),dangerouslyProcessChildrenUpdates:a.measure("ReactDOMIDOperations","dangerouslyProcessChildrenUpdates",function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=i.getNode(e[n].parentID);r.processUpdates(e,t)})};t.exports=l},{"./CSSPropertyOperations":5,"./DOMChildrenOperations":10,"./DOMPropertyOperations":12,"./ReactMount":65,"./ReactPerf":69,"./invariant":131,"./setInnerHTML":147}],46:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./LocalEventTrapMixin"),o=e("./ReactBrowserComponentMixin"),i=e("./ReactCompositeComponent"),a=e("./ReactDOM"),s=a.img,u=i.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[o,r],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(n.topLevelTypes.topError,"error")}});t.exports=u},{"./EventConstants":16,"./LocalEventTrapMixin":26,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41}],47:[function(e,t){"use strict";var n=e("./AutoFocusMixin"),r=e("./DOMPropertyOperations"),o=e("./LinkedValueUtils"),i=e("./ReactBrowserComponentMixin"),a=e("./ReactCompositeComponent"),s=e("./ReactDOM"),u=e("./ReactMount"),c=e("./invariant"),l=e("./merge"),p=s.input,d={},f=a.createClass({displayName:"ReactDOMInput",mixins:[n,o.Mixin,i],getInitialState:function(){var e=this.props.defaultValue;return{checked:this.props.defaultChecked||!1,value:null!=e?e:null}},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var e=l(this.props);e.defaultChecked=null,e.defaultValue=null;var t=o.getValue(this);e.value=null!=t?t:this.state.value;var n=o.getChecked(this);return e.checked=null!=n?n:this.state.checked,e.onChange=this._handleChange,p(e,this.props.children)},componentDidMount:function(){var e=u.getID(this.getDOMNode());d[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=u.getID(e);delete d[t]},componentDidUpdate:function(){var e=this.getDOMNode();null!=this.props.checked&&r.setValueForProperty(e,"checked",this.props.checked||!1);var t=o.getValue(this);null!=t&&r.setValueForProperty(e,"value",""+t)},_handleChange:function(e){var t,n=o.getOnChange(this);n&&(this._isChanging=!0,t=n.call(this,e),this._isChanging=!1),this.setState({checked:e.target.checked,value:e.target.value});var r=this.props.name;if("radio"===this.props.type&&null!=r){for(var i=this.getDOMNode(),a=i;a.parentNode;)a=a.parentNode;for(var s=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),l=0,p=s.length;p>l;l++){var f=s[l];if(f!==i&&f.form===i.form){var h=u.getID(f);c(h);var v=d[h];c(v),v.setState({checked:!1})}}}return t}});t.exports=f},{"./AutoFocusMixin":1,"./DOMPropertyOperations":12,"./LinkedValueUtils":25,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41,"./ReactMount":65,"./invariant":131,"./merge":141}],48:[function(e,t){"use strict";var n=e("./ReactBrowserComponentMixin"),r=e("./ReactCompositeComponent"),o=e("./ReactDOM"),i=(e("./warning"),o.option),a=r.createClass({displayName:"ReactDOMOption",mixins:[n],componentWillMount:function(){},render:function(){return i(this.props,this.props.children)}});t.exports=a},{"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41,"./warning":153}],49:[function(e,t){"use strict";function n(e,t){if(null!=e[t])if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function r(e,t){var n,r,o,i=e.props.multiple,a=null!=t?t:e.state.value,s=e.getDOMNode().options;if(i)for(n={},r=0,o=a.length;o>r;++r)n[""+a[r]]=!0;else n=""+a;for(r=0,o=s.length;o>r;r++){var u=i?n.hasOwnProperty(s[r].value):s[r].value===n;u!==s[r].selected&&(s[r].selected=u)}}var o=e("./AutoFocusMixin"),i=e("./LinkedValueUtils"),a=e("./ReactBrowserComponentMixin"),s=e("./ReactCompositeComponent"),u=e("./ReactDOM"),c=e("./merge"),l=u.select,p=s.createClass({displayName:"ReactDOMSelect",mixins:[o,i.Mixin,a],propTypes:{defaultValue:n,value:n},getInitialState:function(){return{value:this.props.defaultValue||(this.props.multiple?[]:"")} },componentWillReceiveProps:function(e){!this.props.multiple&&e.multiple?this.setState({value:[this.state.value]}):this.props.multiple&&!e.multiple&&this.setState({value:this.state.value[0]})},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var e=c(this.props);return e.onChange=this._handleChange,e.value=null,l(e,this.props.children)},componentDidMount:function(){r(this,i.getValue(this))},componentDidUpdate:function(e){var t=i.getValue(this),n=!!e.multiple,o=!!this.props.multiple;(null!=t||n!==o)&&r(this,t)},_handleChange:function(e){var t,n=i.getOnChange(this);n&&(this._isChanging=!0,t=n.call(this,e),this._isChanging=!1);var r;if(this.props.multiple){r=[];for(var o=e.target.options,a=0,s=o.length;s>a;a++)o[a].selected&&r.push(o[a].value)}else r=e.target.value;return this.setState({value:r}),t}});t.exports=p},{"./AutoFocusMixin":1,"./LinkedValueUtils":25,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41,"./merge":141}],50:[function(e,t){"use strict";function n(e,t,n,r){return e===n&&t===r}function r(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function o(e){var t=window.getSelection();if(0===t.rangeCount)return null;var r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0),u=n(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=u?0:s.toString().length,l=s.cloneRange();l.selectNodeContents(e),l.setEnd(s.startContainer,s.startOffset);var p=n(l.startContainer,l.startOffset,l.endContainer,l.endOffset),d=p?0:l.toString().length,f=d+c,h=document.createRange();h.setStart(r,o),h.setEnd(i,a);var v=h.collapsed;return h.detach(),{start:v?f:d,end:v?d:f}}function i(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function a(e,t){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=u(e,o),l=u(e,i);if(s&&l){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(l.node,l.offset)):(p.setEnd(l.node,l.offset),n.addRange(p)),p.detach()}}var s=e("./ExecutionEnvironment"),u=e("./getNodeForCharacterOffset"),c=e("./getTextContentAccessor"),l=s.canUseDOM&&document.selection,p={getOffsets:l?r:o,setOffsets:l?i:a};t.exports=p},{"./ExecutionEnvironment":22,"./getNodeForCharacterOffset":124,"./getTextContentAccessor":126}],51:[function(e,t){"use strict";var n=e("./AutoFocusMixin"),r=e("./DOMPropertyOperations"),o=e("./LinkedValueUtils"),i=e("./ReactBrowserComponentMixin"),a=e("./ReactCompositeComponent"),s=e("./ReactDOM"),u=e("./invariant"),c=e("./merge"),l=(e("./warning"),s.textarea),p=a.createClass({displayName:"ReactDOMTextarea",mixins:[n,o.Mixin,i],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(u(null==e),Array.isArray(t)&&(u(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=o.getValue(this);return{initialValue:""+(null!=n?n:e)}},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var e=c(this.props);return u(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,l(e,this.state.initialValue)},componentDidUpdate:function(){var e=o.getValue(this);if(null!=e){var t=this.getDOMNode();r.setValueForProperty(t,"value",""+e)}},_handleChange:function(e){var t,n=o.getOnChange(this);return n&&(this._isChanging=!0,t=n.call(this,e),this._isChanging=!1),this.setState({value:e.target.value}),t}});t.exports=p},{"./AutoFocusMixin":1,"./DOMPropertyOperations":12,"./LinkedValueUtils":25,"./ReactBrowserComponentMixin":30,"./ReactCompositeComponent":38,"./ReactDOM":41,"./invariant":131,"./merge":141,"./warning":153}],52:[function(e,t){"use strict";function n(){this.reinitializeTransaction()}var r=e("./ReactUpdates"),o=e("./Transaction"),i=e("./emptyFunction"),a=e("./mixInto"),s={initialize:i,close:function(){p.isBatchingUpdates=!1}},u={initialize:i,close:r.flushBatchedUpdates.bind(r)},c=[u,s];a(n,o.Mixin),a(n,{getTransactionWrappers:function(){return c}});var l=new n,p={isBatchingUpdates:!1,batchedUpdates:function(e,t,n){var r=p.isBatchingUpdates;p.isBatchingUpdates=!0,r?e(t,n):l.perform(e,null,t,n)}};t.exports=p},{"./ReactUpdates":84,"./Transaction":101,"./emptyFunction":113,"./mixInto":144}],53:[function(e,t){"use strict";function n(){x.EventEmitter.injectReactEventListener(D),x.EventPluginHub.injectEventPluginOrder(s),x.EventPluginHub.injectInstanceHandle(b),x.EventPluginHub.injectMount(O),x.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:S,EnterLeaveEventPlugin:u,ChangeEventPlugin:o,CompositionEventPlugin:a,MobileSafariClickEventPlugin:p,SelectEventPlugin:P,BeforeInputEventPlugin:r}),x.DOM.injectComponentClasses({button:m,form:g,img:y,input:C,option:E,select:R,textarea:M,html:_(v.html),head:_(v.head),body:_(v.body)}),x.CompositeComponent.injectMixin(d),x.DOMProperty.injectDOMPropertyConfig(l),x.DOMProperty.injectDOMPropertyConfig(w),x.EmptyComponent.injectEmptyComponent(v.noscript),x.Updates.injectReconcileTransaction(f.ReactReconcileTransaction),x.Updates.injectBatchingStrategy(h),x.RootIndex.injectCreateReactRootIndex(c.canUseDOM?i.createReactRootIndex:T.createReactRootIndex),x.Component.injectEnvironment(f)}var r=e("./BeforeInputEventPlugin"),o=e("./ChangeEventPlugin"),i=e("./ClientReactRootIndex"),a=e("./CompositionEventPlugin"),s=e("./DefaultEventPluginOrder"),u=e("./EnterLeaveEventPlugin"),c=e("./ExecutionEnvironment"),l=e("./HTMLDOMPropertyConfig"),p=e("./MobileSafariClickEventPlugin"),d=e("./ReactBrowserComponentMixin"),f=e("./ReactComponentBrowserEnvironment"),h=e("./ReactDefaultBatchingStrategy"),v=e("./ReactDOM"),m=e("./ReactDOMButton"),g=e("./ReactDOMForm"),y=e("./ReactDOMImg"),C=e("./ReactDOMInput"),E=e("./ReactDOMOption"),R=e("./ReactDOMSelect"),M=e("./ReactDOMTextarea"),D=e("./ReactEventListener"),x=e("./ReactInjection"),b=e("./ReactInstanceHandles"),O=e("./ReactMount"),P=e("./SelectEventPlugin"),T=e("./ServerReactRootIndex"),S=e("./SimpleEventPlugin"),w=e("./SVGDOMPropertyConfig"),_=e("./createFullPageComponent");t.exports={inject:n}},{"./BeforeInputEventPlugin":2,"./ChangeEventPlugin":7,"./ClientReactRootIndex":8,"./CompositionEventPlugin":9,"./DefaultEventPluginOrder":14,"./EnterLeaveEventPlugin":15,"./ExecutionEnvironment":22,"./HTMLDOMPropertyConfig":23,"./MobileSafariClickEventPlugin":27,"./ReactBrowserComponentMixin":30,"./ReactComponentBrowserEnvironment":36,"./ReactDOM":41,"./ReactDOMButton":42,"./ReactDOMForm":44,"./ReactDOMImg":46,"./ReactDOMInput":47,"./ReactDOMOption":48,"./ReactDOMSelect":49,"./ReactDOMTextarea":51,"./ReactDefaultBatchingStrategy":52,"./ReactEventListener":59,"./ReactInjection":60,"./ReactInstanceHandles":62,"./ReactMount":65,"./SVGDOMPropertyConfig":86,"./SelectEventPlugin":87,"./ServerReactRootIndex":88,"./SimpleEventPlugin":89,"./createFullPageComponent":109}],54:[function(e,t){"use strict";function n(e,t){if("function"==typeof t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if("function"==typeof r){var o=r.bind(t);for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);e[n]=o}else e[n]=r}}var r=e("./ReactContext"),o=e("./ReactCurrentOwner"),i=e("./merge"),a=(e("./warning"),function(){});a.createFactory=function(e){var t=Object.create(a.prototype),s=function(e,n){null==e?e={}:"object"==typeof e&&(e=i(e));var a=arguments.length-1;if(1===a)e.children=n;else if(a>1){for(var s=Array(a),u=0;a>u;u++)s[u]=arguments[u+1];e.children=s}var c=Object.create(t);return c._owner=o.current,c._context=r.current,c.props=e,c};return s.prototype=t,s.type=e,t.type=e,n(s,e),t.constructor=s,s},a.cloneAndReplaceProps=function(e,t){var n=Object.create(e.constructor.prototype);return n._owner=e._owner,n._context=e._context,n.props=t,n},a.isValidFactory=function(e){return"function"==typeof e&&e.prototype instanceof a},a.isValidDescriptor=function(e){return e instanceof a},t.exports=a},{"./ReactContext":39,"./ReactCurrentOwner":40,"./merge":141,"./warning":153}],55:[function(e,t){"use strict";function n(){var e=p.current;return e&&e.constructor.displayName||void 0}function r(e,t){e._store.validated||null!=e.props.key||(e._store.validated=!0,i("react_key_warning",'Each child in an array should have a unique "key" prop.',e,t))}function o(e,t,n){m.test(e)&&i("react_numeric_key_warning","Child objects should have non-numeric keys so ordering is preserved.",t,n)}function i(e,t,r,o){var i=n(),a=o.displayName,s=i||a,u=f[e];if(!u.hasOwnProperty(s)){u[s]=!0,t+=i?" Check the render method of "+i+".":" Check the renderComponent call using <"+a+">.";var c=null;r._owner&&r._owner!==p.current&&(c=r._owner.constructor.displayName,t+=" It was passed a child from "+c+"."),t+=" See http://fb.me/react-warning-keys for more information.",d(e,{component:s,componentOwner:c}),console.warn(t)}}function a(){var e=n()||"";h.hasOwnProperty(e)||(h[e]=!0,d("react_object_map_children"))}function s(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++){var i=e[n];c.isValidDescriptor(i)&&r(i,t)}else if(c.isValidDescriptor(e))e._store.validated=!0;else if(e&&"object"==typeof e){a();for(var s in e)o(s,e[s],t)}}function u(e,t,n,r){for(var o in t)if(t.hasOwnProperty(o)){var i;try{i=t[o](n,o,e,r)}catch(a){i=a}i instanceof Error&&!(i.message in v)&&(v[i.message]=!0,d("react_failed_descriptor_type_check",{message:i.message}))}}var c=e("./ReactDescriptor"),l=e("./ReactPropTypeLocations"),p=e("./ReactCurrentOwner"),d=e("./monitorCodeUse"),f={react_key_warning:{},react_numeric_key_warning:{}},h={},v={},m=/^\d+$/,g={createFactory:function(e,t,n){var r=function(){for(var r=e.apply(this,arguments),o=1;o<arguments.length;o++)s(arguments[o],r.type);var i=r.type.displayName;return t&&u(i,t,r.props,l.prop),n&&u(i,n,r._context,l.context),r};r.prototype=e.prototype,r.type=e.type;for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o]);return r}};t.exports=g},{"./ReactCurrentOwner":40,"./ReactDescriptor":54,"./ReactPropTypeLocations":72,"./monitorCodeUse":145}],56:[function(e,t){"use strict";function n(){return s(a),a()}function r(e){u[e]=!0}function o(e){delete u[e]}function i(e){return u[e]}var a,s=e("./invariant"),u={},c={injectEmptyComponent:function(e){a=e}},l={deregisterNullComponentID:o,getEmptyComponent:n,injection:c,isNullComponentID:i,registerNullComponentID:r};t.exports=l},{"./invariant":131}],57:[function(e,t){"use strict";var n={guard:function(e){return e}};t.exports=n},{}],58:[function(e,t){"use strict";function n(e){r.enqueueEvents(e),r.processEventQueue()}var r=e("./EventPluginHub"),o={handleTopLevel:function(e,t,o,i){var a=r.extractEvents(e,t,o,i);n(a)}};t.exports=o},{"./EventPluginHub":18}],59:[function(e,t){"use strict";function n(e){var t=l.getID(e),n=c.getReactRootIDFromNodeID(t),r=l.findReactContainerForID(n),o=l.getFirstReactDOM(r);return o}function r(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){for(var t=l.getFirstReactDOM(d(e.nativeEvent))||window,r=t;r;)e.ancestors.push(r),r=n(r);for(var o=0,i=e.ancestors.length;i>o;o++){t=e.ancestors[o];var a=l.getID(t)||"";v._handleTopLevel(e.topLevelType,t,a,e.nativeEvent)}}function i(e){var t=f(window);e(t)}var a=e("./EventListener"),s=e("./ExecutionEnvironment"),u=e("./PooledClass"),c=e("./ReactInstanceHandles"),l=e("./ReactMount"),p=e("./ReactUpdates"),d=e("./getEventTarget"),f=e("./getUnboundedScrollPosition"),h=e("./mixInto");h(r,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),u.addPoolingTo(r,u.twoArgumentPooler);var v={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:s.canUseDOM?window:null,setHandleTopLevel:function(e){v._handleTopLevel=e},setEnabled:function(e){v._enabled=!!e},isEnabled:function(){return v._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?a.listen(r,t,v.dispatchEvent.bind(null,e)):void 0},trapCapturedEvent:function(e,t,n){var r=n;return r?a.capture(r,t,v.dispatchEvent.bind(null,e)):void 0},monitorScrollValue:function(e){var t=i.bind(null,e);a.listen(window,"scroll",t),a.listen(window,"resize",t)},dispatchEvent:function(e,t){if(v._enabled){var n=r.getPooled(e,t);try{p.batchedUpdates(o,n)}finally{r.release(n)}}}};t.exports=v},{"./EventListener":17,"./ExecutionEnvironment":22,"./PooledClass":28,"./ReactInstanceHandles":62,"./ReactMount":65,"./ReactUpdates":84,"./getEventTarget":122,"./getUnboundedScrollPosition":127,"./mixInto":144}],60:[function(e,t){"use strict";var n=e("./DOMProperty"),r=e("./EventPluginHub"),o=e("./ReactComponent"),i=e("./ReactCompositeComponent"),a=e("./ReactDOM"),s=e("./ReactEmptyComponent"),u=e("./ReactBrowserEventEmitter"),c=e("./ReactPerf"),l=e("./ReactRootIndex"),p=e("./ReactUpdates"),d={Component:o.injection,CompositeComponent:i.injection,DOMProperty:n.injection,EmptyComponent:s.injection,EventPluginHub:r.injection,DOM:a.injection,EventEmitter:u.injection,Perf:c.injection,RootIndex:l.injection,Updates:p.injection};t.exports=d},{"./DOMProperty":11,"./EventPluginHub":18,"./ReactBrowserEventEmitter":31,"./ReactComponent":35,"./ReactCompositeComponent":38,"./ReactDOM":41,"./ReactEmptyComponent":56,"./ReactPerf":69,"./ReactRootIndex":76,"./ReactUpdates":84}],61:[function(e,t){"use strict";function n(e){return o(document.documentElement,e)}var r=e("./ReactDOMSelection"),o=e("./containsNode"),i=e("./focusNode"),a=e("./getActiveElement"),s={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=a();return{focusedElem:e,selectionRange:s.hasSelectionCapabilities(e)?s.getSelection(e):null}},restoreSelection:function(e){var t=a(),r=e.focusedElem,o=e.selectionRange;t!==r&&n(r)&&(s.hasSelectionCapabilities(r)&&s.setSelection(r,o),i(r))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=r.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,o=t.end;if("undefined"==typeof o&&(o=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(o,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",o-n),i.select()}else r.setOffsets(e,t)}};t.exports=s},{"./ReactDOMSelection":50,"./containsNode":106,"./focusNode":117,"./getActiveElement":119}],62:[function(e,t){"use strict";function n(e){return d+e.toString(36)}function r(e,t){return e.charAt(t)===d||t===e.length}function o(e){return""===e||e.charAt(0)===d&&e.charAt(e.length-1)!==d}function i(e,t){return 0===t.indexOf(e)&&r(t,e.length)}function a(e){return e?e.substr(0,e.lastIndexOf(d)):""}function s(e,t){if(p(o(e)&&o(t)),p(i(e,t)),e===t)return e;for(var n=e.length+f,a=n;a<t.length&&!r(t,a);a++);return t.substr(0,a)}function u(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var i=0,a=0;n>=a;a++)if(r(e,a)&&r(t,a))i=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,i);return p(o(s)),s}function c(e,t,n,r,o,u){e=e||"",t=t||"",p(e!==t);var c=i(t,e);p(c||i(e,t));for(var l=0,d=c?a:s,f=e;;f=d(f,t)){var v;if(o&&f===e||u&&f===t||(v=n(f,c,r)),v===!1||f===t)break;p(l++<h)}}var l=e("./ReactRootIndex"),p=e("./invariant"),d=".",f=d.length,h=100,v={createReactRootID:function(){return n(l.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===d&&e.length>1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=u(e,t);i!==e&&c(e,i,n,r,!1,!0),i!==t&&c(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},_getFirstCommonAncestorID:u,_getNextDescendantID:s,isAncestorIDOf:i,SEPARATOR:d};t.exports=v},{"./ReactRootIndex":76,"./invariant":131}],63:[function(e,t){"use strict";function n(e,t){this.value=e,this.requestChange=t}function r(e){var t={value:"undefined"==typeof e?o.PropTypes.any.isRequired:e.isRequired,requestChange:o.PropTypes.func.isRequired};return o.PropTypes.shape(t)}var o=e("./React");n.PropTypes={link:r},t.exports=n},{"./React":29}],64:[function(e,t){"use strict";var n=e("./adler32"),r={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=n(e);return e.replace(">"," "+r.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var o=t.getAttribute(r.CHECKSUM_ATTR_NAME);o=o&&parseInt(o,10);var i=n(e);return i===o}};t.exports=r},{"./adler32":104}],65:[function(e,t){"use strict";function n(e){var t=g(e);return t&&w.getID(t)}function r(e){var t=o(e);if(t)if(D.hasOwnProperty(t)){var n=D[t];n!==e&&(C(!s(n,t)),D[t]=e)}else D[t]=e;return t}function o(e){return e&&e.getAttribute&&e.getAttribute(M)||""}function i(e,t){var n=o(e);n!==t&&delete D[n],e.setAttribute(M,t),D[t]=e}function a(e){return D.hasOwnProperty(e)&&s(D[e],e)||(D[e]=w.findReactNodeByID(e)),D[e]}function s(e,t){if(e){C(o(e)===t);var n=w.findReactContainerForID(t);if(n&&m(n,e))return!0}return!1}function u(e){delete D[e]}function c(e){var t=D[e];return t&&s(t,e)?void(S=t):!1}function l(e){S=null,h.traverseAncestors(e,c);var t=S;return S=null,t}var p=e("./DOMProperty"),d=e("./ReactBrowserEventEmitter"),f=(e("./ReactCurrentOwner"),e("./ReactDescriptor")),h=e("./ReactInstanceHandles"),v=e("./ReactPerf"),m=e("./containsNode"),g=e("./getReactRootElementInContainer"),y=e("./instantiateReactComponent"),C=e("./invariant"),E=e("./shouldUpdateReactComponent"),R=(e("./warning"),h.SEPARATOR),M=p.ID_ATTRIBUTE_NAME,D={},x=1,b=9,O={},P={},T=[],S=null,w={_instancesByReactRootID:O,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){var o=t.props;return w.scrollMonitor(n,function(){e.replaceProps(o,r)}),e},_registerComponent:function(e,t){C(t&&(t.nodeType===x||t.nodeType===b)),d.ensureScrollValueMonitoring();var n=w.registerContainer(t);return O[n]=e,n},_renderNewRootComponent:v.measure("ReactMount","_renderNewRootComponent",function(e,t,n){var r=y(e),o=w._registerComponent(r,t);return r.mountComponentIntoNode(o,t,n),r}),renderComponent:function(e,t,r){C(f.isValidDescriptor(e));var o=O[n(t)];if(o){var i=o._descriptor;if(E(i,e))return w._updateRootComponent(o,e,t,r);w.unmountComponentAtNode(t)}var a=g(t),s=a&&w.isRenderedByReact(a),u=s&&!o,c=w._renderNewRootComponent(e,t,u);return r&&r.call(c),c},constructAndRenderComponent:function(e,t,n){return w.renderComponent(e(t),n)},constructAndRenderComponentByID:function(e,t,n){var r=document.getElementById(n);return C(r),w.constructAndRenderComponent(e,t,r)},registerContainer:function(e){var t=n(e);return t&&(t=h.getReactRootIDFromNodeID(t)),t||(t=h.createReactRootID()),P[t]=e,t},unmountComponentAtNode:function(e){var t=n(e),r=O[t];return r?(w.unmountComponentFromNode(r,e),delete O[t],delete P[t],!0):!1},unmountComponentFromNode:function(e,t){for(e.unmountComponent(),t.nodeType===b&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=h.getReactRootIDFromNodeID(e),n=P[t];return n},findReactNodeByID:function(e){var t=w.findReactContainerForID(e);return w.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=w.getID(e);return t?t.charAt(0)===R:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(w.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=T,r=0,o=l(t)||e;for(n[0]=o.firstChild,n.length=1;r<n.length;){for(var i,a=n[r++];a;){var s=w.getID(a);s?t===s?i=a:h.isAncestorIDOf(s,t)&&(n.length=r=0,n.push(a.firstChild)):n.push(a.firstChild),a=a.nextSibling}if(i)return n.length=0,i}n.length=0,C(!1)},getReactRootID:n,getID:r,setID:i,getNode:a,purgeID:u};t.exports=w},{"./DOMProperty":11,"./ReactBrowserEventEmitter":31,"./ReactCurrentOwner":40,"./ReactDescriptor":54,"./ReactInstanceHandles":62,"./ReactPerf":69,"./containsNode":106,"./getReactRootElementInContainer":125,"./instantiateReactComponent":130,"./invariant":131,"./shouldUpdateReactComponent":149,"./warning":153}],66:[function(e,t){"use strict";function n(e,t,n){h.push({parentID:e,parentNode:null,type:c.INSERT_MARKUP,markupIndex:v.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function r(e,t,n){h.push({parentID:e,parentNode:null,type:c.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function o(e,t){h.push({parentID:e,parentNode:null,type:c.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function i(e,t){h.push({parentID:e,parentNode:null,type:c.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function a(){h.length&&(u.BackendIDOperations.dangerouslyProcessChildrenUpdates(h,v),s())}function s(){h.length=0,v.length=0}var u=e("./ReactComponent"),c=e("./ReactMultiChildUpdateTypes"),l=e("./flattenChildren"),p=e("./instantiateReactComponent"),d=e("./shouldUpdateReactComponent"),f=0,h=[],v=[],m={Mixin:{mountChildren:function(e,t){var n=l(e),r=[],o=0;this._renderedChildren=n;for(var i in n){var a=n[i];if(n.hasOwnProperty(i)){var s=p(a);n[i]=s;var u=this._rootNodeID+i,c=s.mountComponent(u,t,this._mountDepth+1);s._mountIndex=o,r.push(c),o++}}return r},updateTextContent:function(e){f++;var t=!0;try{var n=this._renderedChildren;for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{f--,f||(t?s():a())}},updateChildren:function(e,t){f++;var n=!0;try{this._updateChildren(e,t),n=!1}finally{f--,f||(n?s():a())}},_updateChildren:function(e,t){var n=l(e),r=this._renderedChildren;if(n||r){var o,i=0,a=0;for(o in n)if(n.hasOwnProperty(o)){var s=r&&r[o],u=s&&s._descriptor,c=n[o];if(d(u,c))this.moveChild(s,a,i),i=Math.max(s._mountIndex,i),s.receiveComponent(c,t),s._mountIndex=a;else{s&&(i=Math.max(s._mountIndex,i),this._unmountChildByName(s,o));var f=p(c);this._mountChildByNameAtIndex(f,o,a,t)}a++}for(o in r)!r.hasOwnProperty(o)||n&&n[o]||this._unmountChildByName(r[o],o)}},unmountChildren:function(){var e=this._renderedChildren;for(var t in e){var n=e[t];n.unmountComponent&&n.unmountComponent()}this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&r(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){n(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){o(this._rootNodeID,e._mountIndex)},setTextContent:function(e){i(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r){var o=this._rootNodeID+t,i=e.mountComponent(o,r,this._mountDepth+1);e._mountIndex=n,this.createChild(e,i),this._renderedChildren=this._renderedChildren||{},this._renderedChildren[t]=e},_unmountChildByName:function(e,t){this.removeChild(e),e._mountIndex=null,e.unmountComponent(),delete this._renderedChildren[t]}}};t.exports=m},{"./ReactComponent":35,"./ReactMultiChildUpdateTypes":67,"./flattenChildren":116,"./instantiateReactComponent":130,"./shouldUpdateReactComponent":149}],67:[function(e,t){"use strict";var n=e("./keyMirror"),r=n({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});t.exports=r},{"./keyMirror":137}],68:[function(e,t){"use strict";var n=e("./emptyObject"),r=e("./invariant"),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){r(o.isValidOwner(n)),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){r(o.isValidOwner(n)),n.refs[t]===e&&n.detachRef(t)},Mixin:{construct:function(){this.refs=n},attachRef:function(e,t){r(t.isOwnedBy(this));var o=this.refs===n?this.refs={}:this.refs;o[e]=t},detachRef:function(e){delete this.refs[e]}}};t.exports=o},{"./emptyObject":114,"./invariant":131}],69:[function(e,t){"use strict";function n(e,t,n){return n}var r={enableMeasure:!1,storedMeasure:n,measure:function(e,t,n){return n},injection:{injectMeasure:function(e){r.storedMeasure=e}}};t.exports=r},{}],70:[function(e,t){"use strict";function n(e){return function(t,n,r){t[n]=t.hasOwnProperty(n)?e(t[n],r):r}}function r(e,t){for(var n in t)if(t.hasOwnProperty(n)){var r=c[n];r&&c.hasOwnProperty(n)?r(e,n,t[n]):e.hasOwnProperty(n)||(e[n]=t[n])}return e}var o=e("./emptyFunction"),i=e("./invariant"),a=e("./joinClasses"),s=e("./merge"),u=n(function(e,t){return s(t,e)}),c={children:o,className:n(a),key:o,ref:o,style:u},l={TransferStrategies:c,mergeProps:function(e,t){return r(s(e),t)},Mixin:{transferPropsTo:function(e){return i(e._owner===this),r(e.props,this.props),e}}};t.exports=l},{"./emptyFunction":113,"./invariant":131,"./joinClasses":136,"./merge":141}],71:[function(e,t){"use strict";var n={};t.exports=n},{}],72:[function(e,t){"use strict";var n=e("./keyMirror"),r=n({prop:null,context:null,childContext:null});t.exports=r},{"./keyMirror":137}],73:[function(e,t){"use strict";function n(e){function t(t,n,r,o,i){if(o=o||C,null!=n[r])return e(n,r,o,i);var a=g[i];return t?new Error("Required "+a+" `"+r+"` was not specified in "+("`"+o+"`.")):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function r(e){function t(t,n,r,o){var i=t[n],a=h(i);if(a!==e){var s=g[o],u=v(i);return new Error("Invalid "+s+" `"+n+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `"+e+"`."))}}return n(t)}function o(){return n(y.thatReturns())}function i(e){function t(t,n,r,o){var i=t[n];if(!Array.isArray(i)){var a=g[o],s=h(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u<i.length;u++){var c=e(i,u,r,o);if(c instanceof Error)return c}}return n(t)}function a(){function e(e,t,n,r){if(!m.isValidDescriptor(e[t])){var o=g[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a React component."))}}return n(e)}function s(e){function t(t,n,r,o){if(!(t[n]instanceof e)){var i=g[o],a=e.name||C;return new Error("Invalid "+i+" `"+n+"` supplied to "+("`"+r+"`, expected instance of `"+a+"`."))}}return n(t)}function u(e){function t(t,n,r,o){for(var i=t[n],a=0;a<e.length;a++)if(i===e[a])return;var s=g[o],u=JSON.stringify(e);return new Error("Invalid "+s+" `"+n+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+u+"."))}return n(t)}function c(e){function t(t,n,r,o){var i=t[n],a=h(i);if("object"!==a){var s=g[o];return new Error("Invalid "+s+" `"+n+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var u in i)if(i.hasOwnProperty(u)){var c=e(i,u,r,o);if(c instanceof Error)return c}}return n(t)}function l(e){function t(t,n,r,o){for(var i=0;i<e.length;i++){var a=e[i];if(null==a(t,n,r,o))return}var s=g[o];return new Error("Invalid "+s+" `"+n+"` supplied to "+("`"+r+"`."))}return n(t)}function p(){function e(e,t,n,r){if(!f(e[t])){var o=g[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a renderable prop."))}}return n(e)}function d(e){function t(t,n,r,o){var i=t[n],a=h(i);if("object"!==a){var s=g[o];return new Error("Invalid "+s+" `"+n+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var u in e){var c=e[u];if(c){var l=c(i,u,r,o);if(l)return l}}}return n(t,"expected `object`")}function f(e){switch(typeof e){case"number":case"string":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(f);if(m.isValidDescriptor(e))return!0;for(var t in e)if(!f(e[t]))return!1;return!0;default:return!1}}function h(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function v(e){var t=h(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}var m=e("./ReactDescriptor"),g=e("./ReactPropTypeLocationNames"),y=e("./emptyFunction"),C="<<anonymous>>",E={array:r("array"),bool:r("boolean"),func:r("function"),number:r("number"),object:r("object"),string:r("string"),any:o(),arrayOf:i,component:a(),instanceOf:s,objectOf:c,oneOf:u,oneOfType:l,renderable:p(),shape:d};t.exports=E},{"./ReactDescriptor":54,"./ReactPropTypeLocationNames":71,"./emptyFunction":113}],74:[function(e,t){"use strict";function n(){this.listenersToPut=[]}var r=e("./PooledClass"),o=e("./ReactBrowserEventEmitter"),i=e("./mixInto");i(n,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e<this.listenersToPut.length;e++){var t=this.listenersToPut[e];o.putListener(t.rootNodeID,t.propKey,t.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),r.addPoolingTo(n),t.exports=n},{"./PooledClass":28,"./ReactBrowserEventEmitter":31,"./mixInto":144}],75:[function(e,t){"use strict";function n(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=r.getPooled(null),this.putListenerQueue=s.getPooled()}var r=e("./CallbackQueue"),o=e("./PooledClass"),i=e("./ReactBrowserEventEmitter"),a=e("./ReactInputSelection"),s=e("./ReactPutListenerQueue"),u=e("./Transaction"),c=e("./mixInto"),l={initialize:a.getSelectionInformation,close:a.restoreSelection},p={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},d={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},f={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},h=[f,l,p,d],v={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){r.release(this.reactMountReady),this.reactMountReady=null,s.release(this.putListenerQueue),this.putListenerQueue=null}};c(n,u.Mixin),c(n,v),o.addPoolingTo(n),t.exports=n},{"./CallbackQueue":6,"./PooledClass":28,"./ReactBrowserEventEmitter":31,"./ReactInputSelection":61,"./ReactPutListenerQueue":74,"./Transaction":101,"./mixInto":144}],76:[function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};t.exports=r},{}],77:[function(e,t){"use strict";function n(e){c(o.isValidDescriptor(e)),c(!(2===arguments.length&&"function"==typeof arguments[1]));var t;try{var n=i.createReactRootID();return t=s.getPooled(!1),t.perform(function(){var r=u(e),o=r.mountComponent(n,t,0);return a.addChecksumToMarkup(o)},null)}finally{s.release(t)}}function r(e){c(o.isValidDescriptor(e));var t;try{var n=i.createReactRootID();return t=s.getPooled(!0),t.perform(function(){var r=u(e);return r.mountComponent(n,t,0)},null)}finally{s.release(t)}}var o=e("./ReactDescriptor"),i=e("./ReactInstanceHandles"),a=e("./ReactMarkupChecksum"),s=e("./ReactServerRenderingTransaction"),u=e("./instantiateReactComponent"),c=e("./invariant");t.exports={renderComponentToString:n,renderComponentToStaticMarkup:r}},{"./ReactDescriptor":54,"./ReactInstanceHandles":62,"./ReactMarkupChecksum":64,"./ReactServerRenderingTransaction":78,"./instantiateReactComponent":130,"./invariant":131}],78:[function(e,t){"use strict";function n(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=o.getPooled(null),this.putListenerQueue=i.getPooled()}var r=e("./PooledClass"),o=e("./CallbackQueue"),i=e("./ReactPutListenerQueue"),a=e("./Transaction"),s=e("./emptyFunction"),u=e("./mixInto"),c={initialize:function(){this.reactMountReady.reset()},close:s},l={initialize:function(){this.putListenerQueue.reset()},close:s},p=[l,c],d={getTransactionWrappers:function(){return p},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null,i.release(this.putListenerQueue),this.putListenerQueue=null }};u(n,a.Mixin),u(n,d),r.addPoolingTo(n),t.exports=n},{"./CallbackQueue":6,"./PooledClass":28,"./ReactPutListenerQueue":74,"./Transaction":101,"./emptyFunction":113,"./mixInto":144}],79:[function(e,t){"use strict";function n(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}var r={createStateSetter:function(e,t){return function(n,r,o,i,a,s){var u=t.call(e,n,r,o,i,a,s);u&&e.setState(u)}},createStateKeySetter:function(e,t){var r=e.__keySetters||(e.__keySetters={});return r[t]||(r[t]=n(e,t))}};r.Mixin={createStateSetter:function(e){return r.createStateSetter(this,e)},createStateKeySetter:function(e){return r.createStateKeySetter(this,e)}},t.exports=r},{}],80:[function(e,t){"use strict";var n=e("./DOMPropertyOperations"),r=e("./ReactBrowserComponentMixin"),o=e("./ReactComponent"),i=e("./ReactDescriptor"),a=e("./escapeTextForBrowser"),s=e("./mixInto"),u=function(e){this.construct(e)};s(u,o.Mixin),s(u,r),s(u,{mountComponent:function(e,t,r){o.Mixin.mountComponent.call(this,e,t,r);var i=a(this.props);return t.renderToStaticMarkup?i:"<span "+n.createMarkupForID(e)+">"+i+"</span>"},receiveComponent:function(e){var t=e.props;t!==this.props&&(this.props=t,o.BackendIDOperations.updateTextContentByID(this._rootNodeID,t))}}),t.exports=i.createFactory(u)},{"./DOMPropertyOperations":12,"./ReactBrowserComponentMixin":30,"./ReactComponent":35,"./ReactDescriptor":54,"./escapeTextForBrowser":115,"./mixInto":144}],81:[function(e,t){"use strict";var n=e("./ReactChildren"),r={getChildMapping:function(e){return n.map(e,function(e){return e})},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a<r[u].length;a++){var c=r[u][a];s[r[u][a]]=n(c)}s[u]=n(u)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}};t.exports=r},{"./ReactChildren":34}],82:[function(e,t){"use strict";function n(){var e=document.createElement("div"),t=e.style;"AnimationEvent"in window||delete a.animationend.animation,"TransitionEvent"in window||delete a.transitionend.transition;for(var n in a){var r=a[n];for(var o in r)if(o in t){s.push(r[o]);break}}}function r(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}var i=e("./ExecutionEnvironment"),a={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},s=[];i.canUseDOM&&n();var u={addEndEventListener:function(e,t){return 0===s.length?void window.setTimeout(t,0):void s.forEach(function(n){r(e,n,t)})},removeEndEventListener:function(e,t){0!==s.length&&s.forEach(function(n){o(e,n,t)})}};t.exports=u},{"./ExecutionEnvironment":22}],83:[function(e,t){"use strict";var n=e("./React"),r=e("./ReactTransitionChildMapping"),o=e("./cloneWithProps"),i=e("./emptyFunction"),a=e("./merge"),s=n.createClass({displayName:"ReactTransitionGroup",propTypes:{component:n.PropTypes.func,childFactory:n.PropTypes.func},getDefaultProps:function(){return{component:n.DOM.span,childFactory:i.thatReturnsArgument}},getInitialState:function(){return{children:r.getChildMapping(this.props.children)}},componentWillReceiveProps:function(e){var t=r.getChildMapping(e.children),n=this.state.children;this.setState({children:r.mergeChildMappings(n,t)});var o;for(o in t){var i=n&&n.hasOwnProperty(o);!t[o]||i||this.currentlyTransitioningKeys[o]||this.keysToEnter.push(o)}for(o in n){var a=t&&t.hasOwnProperty(o);!n[o]||a||this.currentlyTransitioningKeys[o]||this.keysToLeave.push(o)}},componentWillMount:function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);if(n&&n.hasOwnProperty(e))this.performEnter(e);else{var o=a(this.state.children);delete o[e],this.setState({children:o})}},render:function(){var e={};for(var t in this.state.children){var n=this.state.children[t];n&&(e[t]=o(this.props.childFactory(n),{ref:t}))}return this.transferPropsTo(this.props.component(null,e))}});t.exports=s},{"./React":29,"./ReactTransitionChildMapping":81,"./cloneWithProps":105,"./emptyFunction":113,"./merge":141}],84:[function(e,t){"use strict";function n(){d(R.ReactReconcileTransaction&&v)}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=u.getPooled(null),this.reconcileTransaction=R.ReactReconcileTransaction.getPooled()}function o(e,t,r){n(),v.batchedUpdates(e,t,r)}function i(e,t){return e._mountDepth-t._mountDepth}function a(e){var t=e.dirtyComponentsLength;d(t===h.length),h.sort(i);for(var n=0;t>n;n++){var r=h[n];if(r.isMounted()){var o=r._pendingCallbacks;if(r._pendingCallbacks=null,r.performUpdateIfNecessary(e.reconcileTransaction),o)for(var a=0;a<o.length;a++)e.callbackQueue.enqueue(o[a],r)}}}function s(e,t){return d(!t||"function"==typeof t),n(),v.isBatchingUpdates?(h.push(e),void(t&&(e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t]))):void v.batchedUpdates(s,e,t)}var u=e("./CallbackQueue"),c=e("./PooledClass"),l=(e("./ReactCurrentOwner"),e("./ReactPerf")),p=e("./Transaction"),d=e("./invariant"),f=e("./mixInto"),h=(e("./warning"),[]),v=null,m={initialize:function(){this.dirtyComponentsLength=h.length},close:function(){this.dirtyComponentsLength!==h.length?(h.splice(0,this.dirtyComponentsLength),C()):h.length=0}},g={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},y=[m,g];f(r,p.Mixin),f(r,{getTransactionWrappers:function(){return y},destructor:function(){this.dirtyComponentsLength=null,u.release(this.callbackQueue),this.callbackQueue=null,R.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return p.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),c.addPoolingTo(r);var C=l.measure("ReactUpdates","flushBatchedUpdates",function(){for(;h.length;){var e=r.getPooled();e.perform(a,null,e),r.release(e)}}),E={injectReconcileTransaction:function(e){d(e),R.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){d(e),d("function"==typeof e.batchedUpdates),d("boolean"==typeof e.isBatchingUpdates),v=e}},R={ReactReconcileTransaction:null,batchedUpdates:o,enqueueUpdate:s,flushBatchedUpdates:C,injection:E};t.exports=R},{"./CallbackQueue":6,"./PooledClass":28,"./ReactCurrentOwner":40,"./ReactPerf":69,"./Transaction":101,"./invariant":131,"./mixInto":144,"./warning":153}],85:[function(e,t){"use strict";var n=e("./LinkedStateMixin"),r=e("./React"),o=e("./ReactComponentWithPureRenderMixin"),i=e("./ReactCSSTransitionGroup"),a=e("./ReactTransitionGroup"),s=e("./cx"),u=e("./cloneWithProps"),c=e("./update");r.addons={CSSTransitionGroup:i,LinkedStateMixin:n,PureRenderMixin:o,TransitionGroup:a,classSet:s,cloneWithProps:u,update:c},t.exports=r},{"./LinkedStateMixin":24,"./React":29,"./ReactCSSTransitionGroup":32,"./ReactComponentWithPureRenderMixin":37,"./ReactTransitionGroup":83,"./cloneWithProps":105,"./cx":111,"./update":152}],86:[function(e,t){"use strict";var n=e("./DOMProperty"),r=n.injection.MUST_USE_ATTRIBUTE,o={Properties:{cx:r,cy:r,d:r,dx:r,dy:r,fill:r,fillOpacity:r,fontFamily:r,fontSize:r,fx:r,fy:r,gradientTransform:r,gradientUnits:r,markerEnd:r,markerMid:r,markerStart:r,offset:r,opacity:r,patternContentUnits:r,patternUnits:r,points:r,preserveAspectRatio:r,r:r,rx:r,ry:r,spreadMethod:r,stopColor:r,stopOpacity:r,stroke:r,strokeDasharray:r,strokeLinecap:r,strokeOpacity:r,strokeWidth:r,textAnchor:r,transform:r,version:r,viewBox:r,x1:r,x2:r,x:r,y1:r,y2:r,y:r},DOMAttributeNames:{fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};t.exports=o},{"./DOMProperty":11}],87:[function(e,t){"use strict";function n(e){if("selectionStart"in e&&a.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(document.selection){var t=document.selection.createRange();return{parentElement:t.parentElement(),text:t.text,top:t.boundingTop,left:t.boundingLeft}}var n=window.getSelection();return{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}}function r(e){if(!g&&null!=h&&h==u()){var t=n(h);if(!m||!p(m,t)){m=t;var r=s.getPooled(f.select,v,e);return r.type="select",r.target=h,i.accumulateTwoPhaseDispatches(r),r}}}var o=e("./EventConstants"),i=e("./EventPropagators"),a=e("./ReactInputSelection"),s=e("./SyntheticEvent"),u=e("./getActiveElement"),c=e("./isTextInputElement"),l=e("./keyOf"),p=e("./shallowEqual"),d=o.topLevelTypes,f={select:{phasedRegistrationNames:{bubbled:l({onSelect:null}),captured:l({onSelectCapture:null})},dependencies:[d.topBlur,d.topContextMenu,d.topFocus,d.topKeyDown,d.topMouseDown,d.topMouseUp,d.topSelectionChange]}},h=null,v=null,m=null,g=!1,y={eventTypes:f,extractEvents:function(e,t,n,o){switch(e){case d.topFocus:(c(t)||"true"===t.contentEditable)&&(h=t,v=n,m=null);break;case d.topBlur:h=null,v=null,m=null;break;case d.topMouseDown:g=!0;break;case d.topContextMenu:case d.topMouseUp:return g=!1,r(o);case d.topSelectionChange:case d.topKeyDown:case d.topKeyUp:return r(o)}}};t.exports=y},{"./EventConstants":16,"./EventPropagators":21,"./ReactInputSelection":61,"./SyntheticEvent":93,"./getActiveElement":119,"./isTextInputElement":134,"./keyOf":138,"./shallowEqual":148}],88:[function(e,t){"use strict";var n=Math.pow(2,53),r={createReactRootIndex:function(){return Math.ceil(Math.random()*n)}};t.exports=r},{}],89:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./EventPluginUtils"),o=e("./EventPropagators"),i=e("./SyntheticClipboardEvent"),a=e("./SyntheticEvent"),s=e("./SyntheticFocusEvent"),u=e("./SyntheticKeyboardEvent"),c=e("./SyntheticMouseEvent"),l=e("./SyntheticDragEvent"),p=e("./SyntheticTouchEvent"),d=e("./SyntheticUIEvent"),f=e("./SyntheticWheelEvent"),h=e("./invariant"),v=e("./keyOf"),m=n.topLevelTypes,g={blur:{phasedRegistrationNames:{bubbled:v({onBlur:!0}),captured:v({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:v({onClick:!0}),captured:v({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:v({onContextMenu:!0}),captured:v({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:v({onCopy:!0}),captured:v({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:v({onCut:!0}),captured:v({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:v({onDoubleClick:!0}),captured:v({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:v({onDrag:!0}),captured:v({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:v({onDragEnd:!0}),captured:v({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:v({onDragEnter:!0}),captured:v({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:v({onDragExit:!0}),captured:v({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:v({onDragLeave:!0}),captured:v({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:v({onDragOver:!0}),captured:v({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:v({onDragStart:!0}),captured:v({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:v({onDrop:!0}),captured:v({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:v({onFocus:!0}),captured:v({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:v({onInput:!0}),captured:v({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:v({onKeyDown:!0}),captured:v({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:v({onKeyPress:!0}),captured:v({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:v({onKeyUp:!0}),captured:v({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:v({onLoad:!0}),captured:v({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:v({onError:!0}),captured:v({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:v({onMouseDown:!0}),captured:v({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:v({onMouseMove:!0}),captured:v({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:v({onMouseOut:!0}),captured:v({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:v({onMouseOver:!0}),captured:v({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:v({onMouseUp:!0}),captured:v({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:v({onPaste:!0}),captured:v({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:v({onReset:!0}),captured:v({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:v({onScroll:!0}),captured:v({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:v({onSubmit:!0}),captured:v({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:v({onTouchCancel:!0}),captured:v({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:v({onTouchEnd:!0}),captured:v({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:v({onTouchMove:!0}),captured:v({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:v({onTouchStart:!0}),captured:v({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:v({onWheel:!0}),captured:v({onWheelCapture:!0})}}},y={topBlur:g.blur,topClick:g.click,topContextMenu:g.contextMenu,topCopy:g.copy,topCut:g.cut,topDoubleClick:g.doubleClick,topDrag:g.drag,topDragEnd:g.dragEnd,topDragEnter:g.dragEnter,topDragExit:g.dragExit,topDragLeave:g.dragLeave,topDragOver:g.dragOver,topDragStart:g.dragStart,topDrop:g.drop,topError:g.error,topFocus:g.focus,topInput:g.input,topKeyDown:g.keyDown,topKeyPress:g.keyPress,topKeyUp:g.keyUp,topLoad:g.load,topMouseDown:g.mouseDown,topMouseMove:g.mouseMove,topMouseOut:g.mouseOut,topMouseOver:g.mouseOver,topMouseUp:g.mouseUp,topPaste:g.paste,topReset:g.reset,topScroll:g.scroll,topSubmit:g.submit,topTouchCancel:g.touchCancel,topTouchEnd:g.touchEnd,topTouchMove:g.touchMove,topTouchStart:g.touchStart,topWheel:g.wheel};for(var C in y)y[C].dependencies=[C];var E={eventTypes:g,executeDispatch:function(e,t,n){var o=r.executeDispatch(e,t,n);o===!1&&(e.stopPropagation(),e.preventDefault())},extractEvents:function(e,t,n,r){var v=y[e];if(!v)return null;var g;switch(e){case m.topInput:case m.topLoad:case m.topError:case m.topReset:case m.topSubmit:g=a;break;case m.topKeyPress:if(0===r.charCode)return null;case m.topKeyDown:case m.topKeyUp:g=u;break;case m.topBlur:case m.topFocus:g=s;break;case m.topClick:if(2===r.button)return null;case m.topContextMenu:case m.topDoubleClick:case m.topMouseDown:case m.topMouseMove:case m.topMouseOut:case m.topMouseOver:case m.topMouseUp:g=c;break;case m.topDrag:case m.topDragEnd:case m.topDragEnter:case m.topDragExit:case m.topDragLeave:case m.topDragOver:case m.topDragStart:case m.topDrop:g=l;break;case m.topTouchCancel:case m.topTouchEnd:case m.topTouchMove:case m.topTouchStart:g=p;break;case m.topScroll:g=d;break;case m.topWheel:g=f;break;case m.topCopy:case m.topCut:case m.topPaste:g=i}h(g);var C=g.getPooled(v,n,r);return o.accumulateTwoPhaseDispatches(C),C}};t.exports=E},{"./EventConstants":16,"./EventPluginUtils":20,"./EventPropagators":21,"./SyntheticClipboardEvent":90,"./SyntheticDragEvent":92,"./SyntheticEvent":93,"./SyntheticFocusEvent":94,"./SyntheticKeyboardEvent":96,"./SyntheticMouseEvent":97,"./SyntheticTouchEvent":98,"./SyntheticUIEvent":99,"./SyntheticWheelEvent":100,"./invariant":131,"./keyOf":138}],90:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticEvent"),o={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};r.augmentClass(n,o),t.exports=n},{"./SyntheticEvent":93}],91:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticEvent"),o={data:null};r.augmentClass(n,o),t.exports=n},{"./SyntheticEvent":93}],92:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticMouseEvent"),o={dataTransfer:null};r.augmentClass(n,o),t.exports=n},{"./SyntheticMouseEvent":97}],93:[function(e,t){"use strict";function n(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var i in r)if(r.hasOwnProperty(i)){var a=r[i];this[i]=a?a(n):n[i]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;this.isDefaultPrevented=s?o.thatReturnsTrue:o.thatReturnsFalse,this.isPropagationStopped=o.thatReturnsFalse}var r=e("./PooledClass"),o=e("./emptyFunction"),i=e("./getEventTarget"),a=e("./merge"),s=e("./mergeInto"),u={type:null,target:i,currentTarget:o.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};s(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=o.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=o.thatReturnsTrue},persist:function(){this.isPersistent=o.thatReturnsTrue},isPersistent:o.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),n.Interface=u,n.augmentClass=function(e,t){var n=this,o=Object.create(n.prototype);s(o,e.prototype),e.prototype=o,e.prototype.constructor=e,e.Interface=a(n.Interface,t),e.augmentClass=n.augmentClass,r.addPoolingTo(e,r.threeArgumentPooler)},r.addPoolingTo(n,r.threeArgumentPooler),t.exports=n},{"./PooledClass":28,"./emptyFunction":113,"./getEventTarget":122,"./merge":141,"./mergeInto":143}],94:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticUIEvent"),o={relatedTarget:null};r.augmentClass(n,o),t.exports=n},{"./SyntheticUIEvent":99}],95:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticEvent"),o={data:null};r.augmentClass(n,o),t.exports=n},{"./SyntheticEvent":93}],96:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticUIEvent"),o=e("./getEventKey"),i=e("./getEventModifierState"),a={key:o,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:i,charCode:function(e){return"keypress"===e.type?"charCode"in e?e.charCode:e.keyCode:0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return e.keyCode||e.charCode}};r.augmentClass(n,a),t.exports=n},{"./SyntheticUIEvent":99,"./getEventKey":120,"./getEventModifierState":121}],97:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticUIEvent"),o=e("./ViewportMetrics"),i=e("./getEventModifierState"),a={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:i,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+o.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+o.currentScrollTop}};r.augmentClass(n,a),t.exports=n},{"./SyntheticUIEvent":99,"./ViewportMetrics":102,"./getEventModifierState":121}],98:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticUIEvent"),o=e("./getEventModifierState"),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:o};r.augmentClass(n,i),t.exports=n},{"./SyntheticUIEvent":99,"./getEventModifierState":121}],99:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticEvent"),o=e("./getEventTarget"),i={view:function(e){if(e.view)return e.view;var t=o(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};r.augmentClass(n,i),t.exports=n},{"./SyntheticEvent":93,"./getEventTarget":122}],100:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e("./SyntheticMouseEvent"),o={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};r.augmentClass(n,o),t.exports=n},{"./SyntheticMouseEvent":97}],101:[function(e,t){"use strict";var n=e("./invariant"),r={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,r,o,i,a,s,u){n(!this.isInTransaction());var c,l;try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=e.call(t,r,o,i,a,s,u),c=!1}finally{try{if(c)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=o.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(i){}}}},closeAll:function(e){n(this.isInTransaction());for(var t=this.transactionWrappers,r=e;r<t.length;r++){var i,a=t[r],s=this.wrapperInitData[r];try{i=!0,s!==o.OBSERVED_ERROR&&a.close&&a.close.call(this,s),i=!1}finally{if(i)try{this.closeAll(r+1)}catch(u){}}}this.wrapperInitData.length=0}},o={Mixin:r,OBSERVED_ERROR:{}};t.exports=o},{"./invariant":131}],102:[function(e,t){"use strict";var n=e("./getUnboundedScrollPosition"),r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(){var e=n(window);r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};t.exports=r},{"./getUnboundedScrollPosition":127}],103:[function(e,t){"use strict";function n(e,t){if(r(null!=t),null==e)return t;var n=Array.isArray(e),o=Array.isArray(t);return n?e.concat(t):o?[e].concat(t):[e,t]}var r=e("./invariant");t.exports=n},{"./invariant":131}],104:[function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0;o<e.length;o++)t=(t+e.charCodeAt(o))%r,n=(n+t)%r;return t|n<<16}var r=65521;t.exports=n},{}],105:[function(e,t){"use strict";function n(e,t){var n=r.mergeProps(t,e.props);return!n.hasOwnProperty(i)&&e.props.hasOwnProperty(i)&&(n.children=e.props.children),e.constructor(n)}var r=e("./ReactPropTransferer"),o=e("./keyOf"),i=(e("./warning"),o({children:null}));t.exports=n},{"./ReactPropTransferer":70,"./keyOf":138,"./warning":153}],106:[function(e,t){function n(e,t){return e&&t?e===t?!0:r(e)?!1:r(t)?n(e,t.parentNode):e.contains?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var r=e("./isTextNode");t.exports=n},{"./isTextNode":135}],107:[function(e,t){function n(e,t,n,r,o,i){e=e||{};for(var a,s=[t,n,r,o,i],u=0;s[u];){a=s[u++];for(var c in a)e[c]=a[c];a.hasOwnProperty&&a.hasOwnProperty("toString")&&"undefined"!=typeof a.toString&&e.toString!==a.toString&&(e.toString=a.toString)}return e}t.exports=n},{}],108:[function(e,t){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function r(e){return n(e)?Array.isArray(e)?e.slice():o(e):[e]}var o=e("./toArray");t.exports=r},{"./toArray":150}],109:[function(e,t){"use strict";function n(e){var t=r.createClass({displayName:"ReactFullPageComponent"+(e.type.displayName||""),componentWillUnmount:function(){o(!1)},render:function(){return this.transferPropsTo(e(null,this.props.children))}});return t}var r=e("./ReactCompositeComponent"),o=e("./invariant");t.exports=n},{"./ReactCompositeComponent":38,"./invariant":131}],110:[function(e,t){function n(e){var t=e.match(c);return t&&t[1].toLowerCase()}function r(e,t){var r=u;s(!!u);var o=n(e),c=o&&a(o);if(c){r.innerHTML=c[1]+e+c[2];for(var l=c[0];l--;)r=r.lastChild}else r.innerHTML=e;var p=r.getElementsByTagName("script");p.length&&(s(t),i(p).forEach(t));for(var d=i(r.childNodes);r.lastChild;)r.removeChild(r.lastChild);return d}var o=e("./ExecutionEnvironment"),i=e("./createArrayFrom"),a=e("./getMarkupWrap"),s=e("./invariant"),u=o.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=r},{"./ExecutionEnvironment":22,"./createArrayFrom":108,"./getMarkupWrap":123,"./invariant":131}],111:[function(e,t){function n(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).join(" "):Array.prototype.join.call(arguments," ")}t.exports=n},{}],112:[function(e,t){"use strict";function n(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||o.hasOwnProperty(e)&&o[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var r=e("./CSSProperty"),o=r.isUnitlessNumber;t.exports=n},{"./CSSProperty":4}],113:[function(e,t){function n(e){return function(){return e}}function r(){}var o=e("./copyProperties");o(r,{thatReturns:n,thatReturnsFalse:n(!1),thatReturnsTrue:n(!0),thatReturnsNull:n(null),thatReturnsThis:function(){return this},thatReturnsArgument:function(e){return e}}),t.exports=r},{"./copyProperties":107}],114:[function(e,t){"use strict";var n={};t.exports=n},{}],115:[function(e,t){"use strict";function n(e){return o[e]}function r(e){return(""+e).replace(i,n)}var o={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;t.exports=r},{}],116:[function(e,t){"use strict";function n(e,t,n){var r=e,o=!r.hasOwnProperty(n);o&&null!=t&&(r[n]=t)}function r(e){if(null==e)return e;var t={};return o(e,n,t),t}{var o=e("./traverseAllChildren");e("./warning")}t.exports=r},{"./traverseAllChildren":151,"./warning":153}],117:[function(e,t){"use strict";function n(e){e.disabled||e.focus()}t.exports=n},{}],118:[function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=n},{}],119:[function(e,t){function n(){try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=n},{}],120:[function(e,t){"use strict";function n(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n="charCode"in e?e.charCode:e.keyCode;return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":void r(!1)}var r=e("./invariant"),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},{"./invariant":131}],121:[function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return r?!!n[r]:!1}function r(){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=r},{}],122:[function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=n},{}],123:[function(e,t){function n(e){return o(!!i),p.hasOwnProperty(e)||(e="*"),a.hasOwnProperty(e)||(i.innerHTML="*"===e?"<link />":"<"+e+"></"+e+">",a[e]=!i.firstChild),a[e]?p[e]:null}var r=e("./ExecutionEnvironment"),o=e("./invariant"),i=r.canUseDOM?document.createElement("div"):null,a={circle:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},s=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],l=[1,"<svg>","</svg>"],p={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:s,option:s,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c,circle:l,defs:l,ellipse:l,g:l,line:l,linearGradient:l,path:l,polygon:l,polyline:l,radialGradient:l,rect:l,stop:l,text:l};t.exports=n},{"./ExecutionEnvironment":22,"./invariant":131}],124:[function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3==o.nodeType){if(a=i+o.textContent.length,t>=i&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}t.exports=o},{}],125:[function(e,t){"use strict";function n(e){return e?e.nodeType===r?e.documentElement:e.firstChild:null}var r=9;t.exports=n},{}],126:[function(e,t){"use strict";function n(){return!o&&r.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var r=e("./ExecutionEnvironment"),o=null;t.exports=n},{"./ExecutionEnvironment":22}],127:[function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=n},{}],128:[function(e,t){function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;t.exports=n},{}],129:[function(e,t){"use strict";function n(e){return r(e).replace(o,"-ms-")}var r=e("./hyphenate"),o=/^ms-/;t.exports=n},{"./hyphenate":128}],130:[function(e,t){"use strict";function n(e){return e&&"function"==typeof e.type&&"function"==typeof e.type.prototype.mountComponent&&"function"==typeof e.type.prototype.receiveComponent}function r(e){return o(n(e)),new e.type(e)}var o=e("./invariant");t.exports=r},{"./invariant":131}],131:[function(e,t){"use strict";var n=function(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,s],l=0; -u=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return c[l++]}))}throw u.framesToPop=1,u}};t.exports=n},{}],132:[function(e,t){"use strict";function n(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,o=e("./ExecutionEnvironment");o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=n},{"./ExecutionEnvironment":22}],133:[function(e,t){function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=n},{}],134:[function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=n},{}],135:[function(e,t){function n(e){return r(e)&&3==e.nodeType}var r=e("./isNode");t.exports=n},{"./isNode":133}],136:[function(e,t){"use strict";function n(e){e||(e="");var t,n=arguments.length;if(n>1)for(var r=1;n>r;r++)t=arguments[r],t&&(e+=" "+t);return e}t.exports=n},{}],137:[function(e,t){"use strict";var n=e("./invariant"),r=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};t.exports=r},{"./invariant":131}],138:[function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=n},{}],139:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var r=0,o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]=t.call(n,e[i],i,r++));return o}t.exports=n},{}],140:[function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)?t[n]:t[n]=e.call(this,n)}}t.exports=n},{}],141:[function(e,t){"use strict";var n=e("./mergeInto"),r=function(e,t){var r={};return n(r,e),n(r,t),r};t.exports=r},{"./mergeInto":143}],142:[function(e,t){"use strict";var n=e("./invariant"),r=e("./keyMirror"),o=36,i=function(e){return"object"!=typeof e||null===e},a={MAX_MERGE_DEPTH:o,isTerminal:i,normalizeMergeArg:function(e){return void 0===e||null===e?{}:e},checkMergeArrayArgs:function(e,t){n(Array.isArray(e)&&Array.isArray(t))},checkMergeObjectArgs:function(e,t){a.checkMergeObjectArg(e),a.checkMergeObjectArg(t)},checkMergeObjectArg:function(e){n(!i(e)&&!Array.isArray(e))},checkMergeIntoObjectArg:function(e){n(!(i(e)&&"function"!=typeof e||Array.isArray(e)))},checkMergeLevel:function(e){n(o>e)},checkArrayStrategy:function(e){n(void 0===e||e in a.ArrayStrategies)},ArrayStrategies:r({Clobber:!0,IndexByIndex:!0})};t.exports=a},{"./invariant":131,"./keyMirror":137}],143:[function(e,t){"use strict";function n(e,t){if(i(e),null!=t){o(t);for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}var r=e("./mergeHelpers"),o=r.checkMergeObjectArg,i=r.checkMergeIntoObjectArg;t.exports=n},{"./mergeHelpers":142}],144:[function(e,t){"use strict";var n=function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e.prototype[n]=t[n])};t.exports=n},{}],145:[function(e,t){"use strict";function n(e){r(e&&!/[^a-z0-9_]/.test(e))}var r=e("./invariant");t.exports=n},{"./invariant":131}],146:[function(e,t){"use strict";function n(e){return o(r.isValidDescriptor(e)),e}var r=e("./ReactDescriptor"),o=e("./invariant");t.exports=n},{"./ReactDescriptor":54,"./invariant":131}],147:[function(e,t){"use strict";var n=e("./ExecutionEnvironment"),r=function(e,t){e.innerHTML=t};if(n.canUseDOM){var o=document.createElement("div");o.innerHTML=" ",""===o.innerHTML&&(r=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),t.match(/^[ \r\n\t\f]/)||"<"===t[0]&&(-1!==t.indexOf("<noscript")||-1!==t.indexOf("<script")||-1!==t.indexOf("<style")||-1!==t.indexOf("<meta")||-1!==t.indexOf("<link"))){e.innerHTML=""+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=r},{"./ExecutionEnvironment":22}],148:[function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=n},{}],149:[function(e,t){"use strict";function n(e,t){return e&&t&&e.type===t.type&&(e.props&&e.props.key)===(t.props&&t.props.key)&&e._owner===t._owner?!0:!1}t.exports=n},{}],150:[function(e,t){function n(e){var t=e.length;if(r(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),r("number"==typeof t),r(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var o=Array(t),i=0;t>i;i++)o[i]=e[i];return o}var r=e("./invariant");t.exports=n},{"./invariant":131}],151:[function(e,t){"use strict";function n(e){return d[e]}function r(e,t){return e&&e.props&&null!=e.props.key?i(e.props.key):t.toString(36)}function o(e){return(""+e).replace(f,n)}function i(e){return"$"+o(e)}function a(e,t,n){return null==e?0:h(e,"",0,t,n)}var s=e("./ReactInstanceHandles"),u=e("./ReactTextComponent"),c=e("./invariant"),l=s.SEPARATOR,p=":",d={"=":"=0",".":"=1",":":"=2"},f=/[=.:]/g,h=function(e,t,n,o,a){var s=0;if(Array.isArray(e))for(var d=0;d<e.length;d++){var f=e[d],v=t+(t?p:l)+r(f,d),m=n+s;s+=h(f,v,m,o,a)}else{var g=typeof e,y=""===t,C=y?l+r(e,0):t;if(null==e||"boolean"===g)o(a,null,C,n),s=1;else if(e.type&&e.type.prototype&&e.type.prototype.mountComponentIntoNode)o(a,e,C,n),s=1;else if("object"===g){c(!e||1!==e.nodeType);for(var E in e)e.hasOwnProperty(E)&&(s+=h(e[E],t+(t?p:l)+i(E)+p+r(e[E],0),n+s,o,a))}else if("string"===g){var R=u(e);o(a,R,C,n),s+=1}else if("number"===g){var M=u(""+e);o(a,M,C,n),s+=1}}return s};t.exports=a},{"./ReactInstanceHandles":62,"./ReactTextComponent":80,"./invariant":131}],152:[function(e,t){"use strict";function n(e){return Array.isArray(e)?e.concat():e&&"object"==typeof e?i(new e.constructor,e):e}function r(e,t,n){s(Array.isArray(e));var r=t[n];s(Array.isArray(r))}function o(e,t){if(s("object"==typeof t),t.hasOwnProperty(p))return s(1===Object.keys(t).length),t[p];var a=n(e);if(t.hasOwnProperty(d)){var h=t[d];s(h&&"object"==typeof h),s(a&&"object"==typeof a),i(a,t[d])}t.hasOwnProperty(u)&&(r(e,t,u),t[u].forEach(function(e){a.push(e)})),t.hasOwnProperty(c)&&(r(e,t,c),t[c].forEach(function(e){a.unshift(e)})),t.hasOwnProperty(l)&&(s(Array.isArray(e)),s(Array.isArray(t[l])),t[l].forEach(function(e){s(Array.isArray(e)),a.splice.apply(a,e)})),t.hasOwnProperty(f)&&(s("function"==typeof t[f]),a=t[f](a));for(var m in t)v.hasOwnProperty(m)&&v[m]||(a[m]=o(e[m],t[m]));return a}var i=e("./copyProperties"),a=e("./keyOf"),s=e("./invariant"),u=a({$push:null}),c=a({$unshift:null}),l=a({$splice:null}),p=a({$set:null}),d=a({$merge:null}),f=a({$apply:null}),h=[u,c,l,p,d,f],v={};h.forEach(function(e){v[e]=!0}),t.exports=o},{"./copyProperties":107,"./invariant":131,"./keyOf":138}],153:[function(e,t){"use strict";var n=e("./emptyFunction"),r=n;t.exports=r},{"./emptyFunction":113}]},{},[85])(85)}); \ No newline at end of file +u=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return c[l++]}))}throw u.framesToPop=1,u}};t.exports=n},{}],132:[function(e,t){"use strict";function n(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,o=e("./ExecutionEnvironment");o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=n},{"./ExecutionEnvironment":22}],133:[function(e,t){function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=n},{}],134:[function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=n},{}],135:[function(e,t){function n(e){return r(e)&&3==e.nodeType}var r=e("./isNode");t.exports=n},{"./isNode":133}],136:[function(e,t){"use strict";function n(e){e||(e="");var t,n=arguments.length;if(n>1)for(var r=1;n>r;r++)t=arguments[r],t&&(e+=" "+t);return e}t.exports=n},{}],137:[function(e,t){"use strict";var n=e("./invariant"),r=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};t.exports=r},{"./invariant":131}],138:[function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=n},{}],139:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var r=0,o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]=t.call(n,e[i],i,r++));return o}t.exports=n},{}],140:[function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)?t[n]:t[n]=e.call(this,n)}}t.exports=n},{}],141:[function(e,t){"use strict";var n=e("./mergeInto"),r=function(e,t){var r={};return n(r,e),n(r,t),r};t.exports=r},{"./mergeInto":143}],142:[function(e,t){"use strict";var n=e("./invariant"),r=e("./keyMirror"),o=36,i=function(e){return"object"!=typeof e||null===e},a={MAX_MERGE_DEPTH:o,isTerminal:i,normalizeMergeArg:function(e){return void 0===e||null===e?{}:e},checkMergeArrayArgs:function(e,t){n(Array.isArray(e)&&Array.isArray(t))},checkMergeObjectArgs:function(e,t){a.checkMergeObjectArg(e),a.checkMergeObjectArg(t)},checkMergeObjectArg:function(e){n(!i(e)&&!Array.isArray(e))},checkMergeIntoObjectArg:function(e){n(!(i(e)&&"function"!=typeof e||Array.isArray(e)))},checkMergeLevel:function(e){n(o>e)},checkArrayStrategy:function(e){n(void 0===e||e in a.ArrayStrategies)},ArrayStrategies:r({Clobber:!0,IndexByIndex:!0})};t.exports=a},{"./invariant":131,"./keyMirror":137}],143:[function(e,t){"use strict";function n(e,t){if(i(e),null!=t){o(t);for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}var r=e("./mergeHelpers"),o=r.checkMergeObjectArg,i=r.checkMergeIntoObjectArg;t.exports=n},{"./mergeHelpers":142}],144:[function(e,t){"use strict";var n=function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e.prototype[n]=t[n])};t.exports=n},{}],145:[function(e,t){"use strict";function n(e){r(e&&!/[^a-z0-9_]/.test(e))}var r=e("./invariant");t.exports=n},{"./invariant":131}],146:[function(e,t){"use strict";function n(e){return o(r.isValidDescriptor(e)),e}var r=e("./ReactDescriptor"),o=e("./invariant");t.exports=n},{"./ReactDescriptor":54,"./invariant":131}],147:[function(e,t){"use strict";var n=e("./ExecutionEnvironment"),r=function(e,t){e.innerHTML=t};if(n.canUseDOM){var o=document.createElement("div");o.innerHTML=" ",""===o.innerHTML&&(r=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),t.match(/^[ \r\n\t\f]/)||"<"===t[0]&&(-1!==t.indexOf("<noscript")||-1!==t.indexOf("<script")||-1!==t.indexOf("<style")||-1!==t.indexOf("<meta")||-1!==t.indexOf("<link"))){e.innerHTML=""+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=r},{"./ExecutionEnvironment":22}],148:[function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=n},{}],149:[function(e,t){"use strict";function n(e,t){return e&&t&&e.type===t.type&&(e.props&&e.props.key)===(t.props&&t.props.key)&&e._owner===t._owner?!0:!1}t.exports=n},{}],150:[function(e,t){function n(e){var t=e.length;if(r(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),r("number"==typeof t),r(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var o=Array(t),i=0;t>i;i++)o[i]=e[i];return o}var r=e("./invariant");t.exports=n},{"./invariant":131}],151:[function(e,t){"use strict";function n(e){return d[e]}function r(e,t){return e&&e.props&&null!=e.props.key?i(e.props.key):t.toString(36)}function o(e){return(""+e).replace(f,n)}function i(e){return"$"+o(e)}function a(e,t,n){return null==e?0:h(e,"",0,t,n)}var s=e("./ReactInstanceHandles"),u=e("./ReactTextComponent"),c=e("./invariant"),l=s.SEPARATOR,p=":",d={"=":"=0",".":"=1",":":"=2"},f=/[=.:]/g,h=function(e,t,n,o,a){var s=0;if(Array.isArray(e))for(var d=0;d<e.length;d++){var f=e[d],v=t+(t?p:l)+r(f,d),m=n+s;s+=h(f,v,m,o,a)}else{var g=typeof e,y=""===t,C=y?l+r(e,0):t;if(null==e||"boolean"===g)o(a,null,C,n),s=1;else if(e.type&&e.type.prototype&&e.type.prototype.mountComponentIntoNode)o(a,e,C,n),s=1;else if("object"===g){c(!e||1!==e.nodeType);for(var E in e)e.hasOwnProperty(E)&&(s+=h(e[E],t+(t?p:l)+i(E)+p+r(e[E],0),n+s,o,a))}else if("string"===g){var R=u(e);o(a,R,C,n),s+=1}else if("number"===g){var M=u(""+e);o(a,M,C,n),s+=1}}return s};t.exports=a},{"./ReactInstanceHandles":62,"./ReactTextComponent":80,"./invariant":131}],152:[function(e,t){"use strict";function n(e){return Array.isArray(e)?e.concat():e&&"object"==typeof e?i(new e.constructor,e):e}function r(e,t,n){s(Array.isArray(e));var r=t[n];s(Array.isArray(r))}function o(e,t){if(s("object"==typeof t),t.hasOwnProperty(p))return s(1===Object.keys(t).length),t[p];var a=n(e);if(t.hasOwnProperty(d)){var h=t[d];s(h&&"object"==typeof h),s(a&&"object"==typeof a),i(a,t[d])}t.hasOwnProperty(u)&&(r(e,t,u),t[u].forEach(function(e){a.push(e)})),t.hasOwnProperty(c)&&(r(e,t,c),t[c].forEach(function(e){a.unshift(e)})),t.hasOwnProperty(l)&&(s(Array.isArray(e)),s(Array.isArray(t[l])),t[l].forEach(function(e){s(Array.isArray(e)),a.splice.apply(a,e)})),t.hasOwnProperty(f)&&(s("function"==typeof t[f]),a=t[f](a));for(var m in t)v.hasOwnProperty(m)&&v[m]||(a[m]=o(e[m],t[m]));return a}var i=e("./copyProperties"),a=e("./keyOf"),s=e("./invariant"),u=a({$push:null}),c=a({$unshift:null}),l=a({$splice:null}),p=a({$set:null}),d=a({$merge:null}),f=a({$apply:null}),h=[u,c,l,p,d,f],v={};h.forEach(function(e){v[e]=!0}),t.exports=o},{"./copyProperties":107,"./invariant":131,"./keyOf":138}],153:[function(e,t){"use strict";var n=e("./emptyFunction"),r=n;t.exports=r},{"./emptyFunction":113}]},{},[85])(85)});
rename from browser/components/loop/content/shared/libs/react-0.11.1.js rename to browser/components/loop/content/shared/libs/react-0.11.2.js --- a/browser/components/loop/content/shared/libs/react-0.11.1.js +++ b/browser/components/loop/content/shared/libs/react-0.11.2.js @@ -1,10 +1,10 @@ /** - * React (with addons) v0.11.1 + * React (with addons) v0.11.2 */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -3708,23 +3708,25 @@ var HTMLDOMPropertyConfig = { icon: null, id: MUST_USE_PROPERTY, label: null, lang: null, list: null, loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, max: null, maxLength: MUST_USE_ATTRIBUTE, + media: MUST_USE_ATTRIBUTE, mediaGroup: null, method: null, min: null, multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, name: null, noValidate: HAS_BOOLEAN_VALUE, + open: null, pattern: null, placeholder: null, poster: null, preload: null, radioGroup: null, readOnly: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, rel: null, required: HAS_BOOLEAN_VALUE, @@ -3735,21 +3737,22 @@ var HTMLDOMPropertyConfig = { scope: null, scrollLeft: MUST_USE_PROPERTY, scrolling: null, scrollTop: MUST_USE_PROPERTY, seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, shape: null, size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE, + sizes: MUST_USE_ATTRIBUTE, span: HAS_POSITIVE_NUMERIC_VALUE, spellCheck: null, src: null, srcDoc: MUST_USE_PROPERTY, - srcSet: null, + srcSet: MUST_USE_ATTRIBUTE, start: HAS_NUMERIC_VALUE, step: null, style: null, tabIndex: null, target: null, title: null, type: null, useMap: null, @@ -4274,36 +4277,56 @@ var ReactInstanceHandles = _dereq_("./Re var ReactMount = _dereq_("./ReactMount"); var ReactMultiChild = _dereq_("./ReactMultiChild"); var ReactPerf = _dereq_("./ReactPerf"); var ReactPropTypes = _dereq_("./ReactPropTypes"); var ReactServerRendering = _dereq_("./ReactServerRendering"); var ReactTextComponent = _dereq_("./ReactTextComponent"); var onlyChild = _dereq_("./onlyChild"); +var warning = _dereq_("./warning"); ReactDefaultInjection.inject(); +// Specifying arguments isn't necessary since we just use apply anyway, but it +// makes it clear for those actually consuming this API. +function createDescriptor(type, props, children) { + var args = Array.prototype.slice.call(arguments, 1); + return type.apply(null, args); +} + +if ("production" !== "development") { + var _warnedForDeprecation = false; +} + var React = { Children: { map: ReactChildren.map, forEach: ReactChildren.forEach, count: ReactChildren.count, only: onlyChild }, DOM: ReactDOM, PropTypes: ReactPropTypes, initializeTouchEvents: function(shouldUseTouch) { EventPluginUtils.useTouchEvents = shouldUseTouch; }, createClass: ReactCompositeComponent.createClass, - createDescriptor: function(type, props, children) { - var args = Array.prototype.slice.call(arguments, 1); - return type.apply(null, args); - }, + createDescriptor: function() { + if ("production" !== "development") { + ("production" !== "development" ? warning( + _warnedForDeprecation, + 'React.createDescriptor is deprecated and will be removed in the ' + + 'next version of React. Use React.createElement instead.' + ) : null); + _warnedForDeprecation = true; + } + return createDescriptor.apply(this, arguments); + }, + createElement: createDescriptor, constructAndRenderComponent: ReactMount.constructAndRenderComponent, constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID, renderComponent: ReactPerf.measure( 'React', 'renderComponent', ReactMount.renderComponent ), renderComponentToString: ReactServerRendering.renderComponentToString, @@ -4362,21 +4385,21 @@ if ("production" !== "development") { break; } } } } // Version exists only in the open-source version of React, not in Facebook's // internal version. -React.version = '0.11.1'; +React.version = '0.11.2'; module.exports = React; -},{"./DOMPropertyOperations":12,"./EventPluginUtils":20,"./ExecutionEnvironment":22,"./ReactChildren":34,"./ReactComponent":35,"./ReactCompositeComponent":38,"./ReactContext":39,"./ReactCurrentOwner":40,"./ReactDOM":41,"./ReactDOMComponent":43,"./ReactDefaultInjection":53,"./ReactDescriptor":56,"./ReactInstanceHandles":64,"./ReactMount":67,"./ReactMultiChild":68,"./ReactPerf":71,"./ReactPropTypes":75,"./ReactServerRendering":79,"./ReactTextComponent":83,"./onlyChild":149}],30:[function(_dereq_,module,exports){ +},{"./DOMPropertyOperations":12,"./EventPluginUtils":20,"./ExecutionEnvironment":22,"./ReactChildren":34,"./ReactComponent":35,"./ReactCompositeComponent":38,"./ReactContext":39,"./ReactCurrentOwner":40,"./ReactDOM":41,"./ReactDOMComponent":43,"./ReactDefaultInjection":53,"./ReactDescriptor":56,"./ReactInstanceHandles":64,"./ReactMount":67,"./ReactMultiChild":68,"./ReactPerf":71,"./ReactPropTypes":75,"./ReactServerRendering":79,"./ReactTextComponent":83,"./onlyChild":149,"./warning":158}],30:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 @@ -7403,16 +7426,17 @@ var ReactDOM = mapObject({ col: true, colgroup: false, data: false, datalist: false, dd: false, del: false, details: false, dfn: false, + dialog: false, div: false, dl: false, dt: false, em: false, embed: true, fieldset: false, figcaption: false, figure: false, @@ -7450,16 +7474,17 @@ var ReactDOM = mapObject({ noscript: false, object: false, ol: false, optgroup: false, option: false, output: false, p: false, param: true, + picture: false, pre: false, progress: false, q: false, rp: false, rt: false, ruby: false, s: false, samp: false,
--- a/browser/components/loop/jar.mn +++ b/browser/components/loop/jar.mn @@ -64,19 +64,19 @@ browser.jar: content/browser/loop/shared/js/otSdkDriver.js (content/shared/js/otSdkDriver.js) content/browser/loop/shared/js/views.js (content/shared/js/views.js) content/browser/loop/shared/js/utils.js (content/shared/js/utils.js) content/browser/loop/shared/js/validate.js (content/shared/js/validate.js) content/browser/loop/shared/js/websocket.js (content/shared/js/websocket.js) # Shared libs #ifdef DEBUG - content/browser/loop/shared/libs/react-0.11.1.js (content/shared/libs/react-0.11.1.js) + content/browser/loop/shared/libs/react-0.11.2.js (content/shared/libs/react-0.11.2.js) #else - content/browser/loop/shared/libs/react-0.11.1.js (content/shared/libs/react-0.11.1-prod.js) + content/browser/loop/shared/libs/react-0.11.2.js (content/shared/libs/react-0.11.2-prod.js) #endif content/browser/loop/shared/libs/lodash-2.4.1.js (content/shared/libs/lodash-2.4.1.js) content/browser/loop/shared/libs/jquery-2.1.0.js (content/shared/libs/jquery-2.1.0.js) content/browser/loop/shared/libs/backbone-1.1.2.js (content/shared/libs/backbone-1.1.2.js) # Shared sounds content/browser/loop/shared/sounds/Firefox-Long.ogg (content/shared/sounds/Firefox-Long.ogg)
--- a/browser/components/loop/standalone/content/index.html +++ b/browser/components/loop/standalone/content/index.html @@ -24,17 +24,17 @@ cdnURL: 'shared/libs/', }; window.OTProperties.assetURL = window.OTProperties.cdnURL + 'sdk-content/'; window.OTProperties.configURL = window.OTProperties.assetURL + 'js/dynamic_config.min.js'; window.OTProperties.cssURL = window.OTProperties.assetURL + 'css/ot.css'; </script> <script type="text/javascript" src="shared/libs/sdk.js"></script> <script type="text/javascript" src="libs/l10n-gaia-02ca67948fe8.js"></script> - <script type="text/javascript" src="shared/libs/react-0.11.1.js"></script> + <script type="text/javascript" src="shared/libs/react-0.11.2.js"></script> <script type="text/javascript" src="shared/libs/jquery-2.1.0.js"></script> <script type="text/javascript" src="shared/libs/lodash-2.4.1.js"></script> <script type="text/javascript" src="shared/libs/backbone-1.1.2.js"></script> <!-- app scripts --> <script type="text/javascript" src="config.js"></script> <script type="text/javascript" src="shared/js/utils.js"></script> <script type="text/javascript" src="shared/js/models.js"></script>
--- a/browser/components/loop/test/desktop-local/index.html +++ b/browser/components/loop/test/desktop-local/index.html @@ -11,17 +11,17 @@ <body> <div id="mocha"> <p><a href="../">Index</a></p> </div> <div id="messages"></div> <div id="fixtures"></div> <!-- libs --> <script src="../../content/libs/l10n.js"></script> - <script src="../../content/shared/libs/react-0.11.1.js"></script> + <script src="../../content/shared/libs/react-0.11.2.js"></script> <script src="../../content/shared/libs/jquery-2.1.0.js"></script> <script src="../../content/shared/libs/lodash-2.4.1.js"></script> <script src="../../content/shared/libs/backbone-1.1.2.js"></script> <!-- test dependencies --> <script src="../shared/vendor/mocha-1.17.1.js"></script> <script src="../shared/vendor/chai-1.9.0.js"></script> <script src="../shared/vendor/sinon-1.9.0.js"></script>
--- a/browser/components/loop/test/shared/index.html +++ b/browser/components/loop/test/shared/index.html @@ -11,17 +11,17 @@ <body> <div id="mocha"> <p><a href="../">Index</a></p> </div> <div id="messages"></div> <div id="fixtures"></div> <!-- libs --> - <script src="../../content/shared/libs/react-0.11.1.js"></script> + <script src="../../content/shared/libs/react-0.11.2.js"></script> <script src="../../content/shared/libs/jquery-2.1.0.js"></script> <script src="../../content/shared/libs/lodash-2.4.1.js"></script> <script src="../../content/shared/libs/backbone-1.1.2.js"></script> <script src="../../standalone/content/libs/l10n-gaia-02ca67948fe8.js"></script> <!-- test dependencies --> <script src="vendor/mocha-1.17.1.js"></script> <script src="vendor/chai-1.9.0.js"></script>
--- a/browser/components/loop/test/standalone/index.html +++ b/browser/components/loop/test/standalone/index.html @@ -11,17 +11,17 @@ <body> <div id="mocha"> <p><a href="../">Index</a></p> <p><a href="../shared/">Shared Tests</a></p> </div> <div id="messages"></div> <div id="fixtures"></div> <!-- libs --> - <script src="../../content/shared/libs/react-0.11.1.js"></script> + <script src="../../content/shared/libs/react-0.11.2.js"></script> <script src="../../content/shared/libs/jquery-2.1.0.js"></script> <script src="../../content/shared/libs/lodash-2.4.1.js"></script> <script src="../../content/shared/libs/backbone-1.1.2.js"></script> <script src="../../standalone/content/libs/l10n-gaia-02ca67948fe8.js"></script> <!-- test dependencies --> <script src="../shared/vendor/mocha-1.17.1.js"></script> <script src="../shared/vendor/chai-1.9.0.js"></script> <script src="../shared/vendor/sinon-1.9.0.js"></script>
--- a/browser/components/loop/ui/index.html +++ b/browser/components/loop/ui/index.html @@ -22,17 +22,17 @@ window.OTProperties = { cdnURL: '../content/shared/libs/' }; window.OTProperties.assetURL = window.OTProperties.cdnURL + 'sdk-content/'; window.OTProperties.configURL = window.OTProperties.assetURL + 'js/dynamic_config.min.js'; window.OTProperties.cssURL = window.OTProperties.assetURL + 'css/ot.css'; </script> <script src="../content/shared/libs/sdk.js"></script> - <script src="../content/shared/libs/react-0.11.1.js"></script> + <script src="../content/shared/libs/react-0.11.2.js"></script> <script src="../content/shared/libs/jquery-2.1.0.js"></script> <script src="../content/shared/libs/lodash-2.4.1.js"></script> <script src="../content/shared/libs/backbone-1.1.2.js"></script> <script src="../content/shared/js/feedbackApiClient.js"></script> <script src="../content/shared/js/actions.js"></script> <script src="../content/shared/js/utils.js"></script> <script src="../content/shared/js/models.js"></script> <script src="../content/shared/js/mixins.js"></script>
--- a/browser/components/sessionstore/SessionStore.jsm +++ b/browser/components/sessionstore/SessionStore.jsm @@ -1012,20 +1012,16 @@ let SessionStoreInternal = { if (isFullyLoaded) { winData.title = tabbrowser.selectedBrowser.contentTitle || tabbrowser.selectedTab.label; winData.title = this._replaceLoadingTitle(winData.title, tabbrowser, tabbrowser.selectedTab); SessionCookies.update([winData]); } - // Until we decide otherwise elsewhere, this window is part of a series - // of closing windows to quit. - RevivableWindows.add(winData); - // Store the window's close date to figure out when each individual tab // was closed. This timestamp should allow re-arranging data based on how // recently something was closed. winData.closedAt = Date.now(); // Save non-private windows if they have at // least one saveable tab or are the last window. if (!winData.isPrivate) { @@ -1046,16 +1042,20 @@ let SessionStoreInternal = { if (hasSaveableTabs || isLastWindow) { // we don't want to save the busy state delete winData.busy; this._closedWindows.unshift(winData); this._capClosedWindows(); } + + // Until we decide otherwise elsewhere, this window + // is part of a series of closing windows to quit. + RevivableWindows.add(winData); } // clear this window from the list delete this._windows[aWindow.__SSi]; // save the state without this window to disk this.saveStateDelayed(); }
--- a/browser/components/sessionstore/test/browser_revive_windows.js +++ b/browser/components/sessionstore/test/browser_revive_windows.js @@ -34,16 +34,26 @@ add_task(function* test_revive_windows() for (let i = 0; i < 3; i++) { let win = yield promiseNewWindow(); windows.push(win); let tab = win.gBrowser.addTab("about:mozilla"); yield promiseBrowserLoaded(tab.linkedBrowser); } + // Create a private window. + // This window must not be revived. + { + let win = yield promiseNewWindow({private: true}); + windows.push(win); + + let tab = win.gBrowser.addTab("about:mozilla"); + yield promiseBrowserLoaded(tab.linkedBrowser); + } + // Close all windows. for (let win of windows) { yield promiseWindowClosed(win); } is(ss.getClosedWindowCount(), 1, "one window restorable"); // Save to disk and read. @@ -134,17 +144,17 @@ add_task(function* test_revive_windows_o ok(JSON.stringify(windows[1]).contains(URL_ADD_WINDOW2), "correct second additional window"); ok(JSON.stringify(windows[2]).contains(URL_MAIN_WINDOW), "correct main window"); } } }); -function promiseNewWindow() { - return new Promise(resolve => whenNewWindowLoaded({private: false}, resolve)); +function promiseNewWindow(opts = {private: false}) { + return new Promise(resolve => whenNewWindowLoaded(opts, resolve)); } function forgetClosedWindows() { while (ss.getClosedWindowCount()) { ss.forgetClosedWindow(0); } }
--- a/browser/modules/PluginContent.jsm +++ b/browser/modules/PluginContent.jsm @@ -9,16 +9,17 @@ let Cc = Components.classes; let Ci = Components.interfaces; let Cu = Components.utils; this.EXPORTED_SYMBOLS = [ "PluginContent" ]; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Timer.jsm"); +Cu.import("resource://gre/modules/BrowserUtils.jsm"); XPCOMUtils.defineLazyGetter(this, "gNavigatorBundle", function() { const url = "chrome://browser/locale/browser.properties"; return Services.strings.createBundle(url); }); this.PluginContent = function (global) { this.init(global); @@ -114,17 +115,17 @@ PluginContent.prototype = { tagMimetype = pluginElement.actualType; if (tagMimetype == "") { tagMimetype = pluginElement.type; } if (this.isKnownPlugin(pluginElement)) { pluginTag = pluginHost.getPluginTagForType(pluginElement.actualType); - pluginName = this.makeNicePluginName(pluginTag.name); + pluginName = BrowserUtils.makeNicePluginName(pluginTag.name); permissionString = pluginHost.getPermissionStringForType(pluginElement.actualType); fallbackType = pluginElement.defaultFallbackType; blocklistState = pluginHost.getBlocklistStateForType(pluginElement.actualType); // Make state-softblocked == state-notblocked for our purposes, // they have the same UI. STATE_OUTDATED should not exist for plugin // items, but let's alias it anyway, just in case. if (blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED || @@ -137,36 +138,16 @@ PluginContent.prototype = { pluginName: pluginName, pluginTag: pluginTag, permissionString: permissionString, fallbackType: fallbackType, blocklistState: blocklistState, }; }, - // Map the plugin's name to a filtered version more suitable for user UI. - makeNicePluginName : function (aName) { - if (aName == "Shockwave Flash") - return "Adobe Flash"; - // Regex checks if aName begins with "Java" + non-letter char - if (/^Java\W/.exec(aName)) - return "Java"; - - // Clean up the plugin name by stripping off parenthetical clauses, - // trailing version numbers or "plugin". - // EG, "Foo Bar (Linux) Plugin 1.23_02" --> "Foo Bar" - // Do this by first stripping the numbers, etc. off the end, and then - // removing "Plugin" (and then trimming to get rid of any whitespace). - // (Otherwise, something like "Java(TM) Plug-in 1.7.0_07" gets mangled) - let newName = aName.replace(/\(.*?\)/g, ""). - replace(/[\s\d\.\-\_\(\)]+$/, ""). - replace(/\bplug-?in\b/i, "").trim(); - return newName; - }, - /** * Update the visibility of the plugin overlay. */ setVisibility : function (plugin, overlay, shouldShow) { overlay.classList.toggle("visible", shouldShow); }, /** @@ -838,17 +819,17 @@ PluginContent.prototype = { try { gmpPlugin = propBag.getPropertyAsBool("gmpPlugin"); } catch (e) { // This property is only set for GMP plugins. } // For non-GMP plugins, remap the plugin name to a more user-presentable form. if (!gmpPlugin) { - pluginName = this.makeNicePluginName(pluginName); + pluginName = BrowserUtils.makeNicePluginName(pluginName); } let messageString = gNavigatorBundle.formatStringFromName("crashedpluginsMessage.title", [pluginName], 1); let plugin = null, doc; if (target instanceof Ci.nsIObjectLoadingContent) { plugin = target; doc = plugin.ownerDocument;
--- a/browser/themes/shared/customizableui/panelUIOverlay.inc.css +++ b/browser/themes/shared/customizableui/panelUIOverlay.inc.css @@ -141,17 +141,17 @@ panelmultiview[nosubviews=true] > .panel min-height: 41px; padding: 11px 12px; } .panel-subview-header { margin: -4px -4px 4px; box-shadow: 0 -1px 0 hsla(210,4%,10%,.05) inset; color: GrayText; - text-transform: uppercase; + font-variant: small-caps; } .cui-widget-panelview .panel-subview-header { display: none; } .cui-widget-panelview .subviewbutton.panel-subview-footer { margin: 4px 0 0;
--- a/js/ductwork/debugger/jsdebugger.jsm +++ b/js/ductwork/debugger/jsdebugger.jsm @@ -10,15 +10,15 @@ this.EXPORTED_SYMBOLS = [ "addDebuggerTo * Components.utils.import("resource://gre/modules/jsdebugger.jsm"); * addDebuggerToGlobal(this); * * This will create a 'Debugger' object, which provides an interface to debug * JavaScript code running in other compartments in the same process, on the * same thread. * * For documentation on the API, see: - * https://wiki.mozilla.org/Debugger + * https://developer.mozilla.org/en-US/docs/Tools/Debugger-API */ const init = Components.classes["@mozilla.org/jsdebugger;1"].createInstance(Components.interfaces.IJSDebugger); this.addDebuggerToGlobal = function addDebuggerToGlobal(global) { init.addClass(global); };
--- a/mobile/android/base/ANRReporter.java +++ b/mobile/android/base/ANRReporter.java @@ -245,17 +245,18 @@ public final class ANRReporter extends B long uptimeMins = (new File("/proc/self/stat")).lastModified(); if (uptimeMins != 0L) { uptimeMins = (System.currentTimeMillis() - uptimeMins) / 1000L / 60L; if (DEBUG) { Log.d(LOGTAG, "uptime " + String.valueOf(uptimeMins)); } return uptimeMins; - } else if (DEBUG) { + } + if (DEBUG) { Log.d(LOGTAG, "could not get uptime"); } return 0L; } /* a saved telemetry ping file consists of JSON in the following format, {
--- a/mobile/android/base/ActionModeCompatView.java +++ b/mobile/android/base/ActionModeCompatView.java @@ -57,16 +57,17 @@ class ActionModeCompatView extends Linea mTitleView = (Button) findViewById(R.id.actionmode_title); mMenuButton = (ImageButton) findViewById(R.id.actionbar_menu); mActionButtonBar = (ViewGroup) findViewById(R.id.actionbar_buttons); mPopupMenu = new GeckoPopupMenu(getContext(), mMenuButton); ((GeckoMenu) mPopupMenu.getMenu()).setActionItemBarPresenter(this); mMenuButton.setOnClickListener(new View.OnClickListener() { + @Override public void onClick(View v) { openMenu(); } }); } public void initForMode(final ActionModeCompat mode) { mTitleView.setOnClickListener(mode); @@ -85,16 +86,17 @@ class ActionModeCompatView extends Linea public void setTitle(int resId) { mTitleView.setText(resId); } public Menu getMenu() { return mPopupMenu.getMenu(); } + @Override public void invalidate() { // onFinishInflate may not have been called yet on some versions of Android if (mPopupMenu != null && mMenuButton != null) { mMenuButton.setVisibility(mPopupMenu.getMenu().hasVisibleItems() ? View.VISIBLE : View.GONE); } super.invalidate(); }
--- a/mobile/android/base/AndroidGamepadManager.java +++ b/mobile/android/base/AndroidGamepadManager.java @@ -253,17 +253,19 @@ public class AndroidGamepadManager { return false; } int deviceId = ev.getDeviceId(); if (sPendingGamepads.containsKey(deviceId)) { // Queue up key events for pending devices. sPendingGamepads.get(deviceId).add(ev); return true; - } else if (!sGamepads.containsKey(deviceId)) { + } + + if (!sGamepads.containsKey(deviceId)) { InputDevice device = ev.getDevice(); if (device != null && (device.getSources() & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) { // This is a gamepad we haven't seen yet. addGamepad(device); sPendingGamepads.get(deviceId).add(ev); return true; } @@ -327,49 +329,53 @@ public class AndroidGamepadManager { sGamepads.remove(deviceId); } private static void addDeviceListener() { if (Versions.preJB) { // Poll known gamepads to see if they've disappeared. sPollTimer = new Timer(); sPollTimer.scheduleAtFixedRate(new TimerTask() { + @Override public void run() { for (Integer deviceId : sGamepads.keySet()) { if (InputDevice.getDevice(deviceId) == null) { removeGamepad(deviceId); } } } }, POLL_TIMER_PERIOD, POLL_TIMER_PERIOD); return; } sListener = new InputManager.InputDeviceListener() { + @Override public void onInputDeviceAdded(int deviceId) { InputDevice device = InputDevice.getDevice(deviceId); if (device == null) { return; } if ((device.getSources() & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) { addGamepad(device); } } + @Override public void onInputDeviceRemoved(int deviceId) { if (sPendingGamepads.containsKey(deviceId)) { // Got removed before Gecko's ack reached us. // gamepadAdded will deal with it. sPendingGamepads.remove(deviceId); return; } if (sGamepads.containsKey(deviceId)) { removeGamepad(deviceId); } } + @Override public void onInputDeviceChanged(int deviceId) { } }; ((InputManager)GeckoAppShell.getContext().getSystemService(Context.INPUT_SERVICE)).registerInputDeviceListener(sListener, ThreadUtils.getUiHandler()); } private static void removeDeviceListener() { if (Versions.preJB) {
--- a/mobile/android/base/BaseGeckoInterface.java +++ b/mobile/android/base/BaseGeckoInterface.java @@ -30,103 +30,125 @@ public class BaseGeckoInterface implemen private final Context mContext; private GeckoProfile mProfile; public BaseGeckoInterface(Context context) { mContext = context; } + @Override public GeckoProfile getProfile() { // Fall back to default profile if we didn't load a specific one if (mProfile == null) { mProfile = GeckoProfile.get(mContext); } return mProfile; } // Bug 908770: Implement this + @Override public PromptService getPromptService() { return null; } + @Override public Activity getActivity() { return (Activity)mContext; } + @Override public String getDefaultUAString() { return HardwareUtils.isTablet() ? AppConstants.USER_AGENT_FENNEC_TABLET : AppConstants.USER_AGENT_FENNEC_MOBILE; } // Bug 908772: Implement this + @Override public LocationListener getLocationListener() { return null; } // Bug 908773: Implement this + @Override public SensorEventListener getSensorEventListener() { return null; } // Bug 908775: Implement this + @Override public void doRestart() {} + @Override public void setFullScreen(final boolean fullscreen) { ThreadUtils.postToUiThread(new Runnable() { @Override public void run() { ActivityUtils.setFullScreen(getActivity(), fullscreen); } }); } // Bug 908779: Implement this + @Override public void addPluginView(final View view, final RectF rect, final boolean isFullScreen) {} // Bug 908781: Implement this + @Override public void removePluginView(final View view, final boolean isFullScreen) {} // Bug 908783: Implement this + @Override public void enableCameraView() {} // Bug 908785: Implement this + @Override public void disableCameraView() {} // Bug 908786: Implement this + @Override public void addAppStateListener(GeckoAppShell.AppStateListener listener) {} // Bug 908787: Implement this + @Override public void removeAppStateListener(GeckoAppShell.AppStateListener listener) {} // Bug 908788: Implement this + @Override public View getCameraView() { return null; } // Bug 908789: Implement this + @Override public void notifyWakeLockChanged(String topic, String state) {} // Bug 908790: Implement this + @Override public FormAssistPopup getFormAssistPopup() { return null; } + @Override public boolean areTabsShown() { return false; } // Bug 908791: Implement this + @Override public AbsoluteLayout getPluginContainer() { return null; } + @Override public void notifyCheckUpdateResult(String result) { GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Update:CheckResult", result)); } + @Override public boolean hasTabsSideBar() { return false; } // Bug 908792: Implement this + @Override public void invalidateOptionsMenu() {} }
--- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -855,56 +855,62 @@ public class BrowserApp extends GeckoApp mLayerView.showSurface(); } }); } } private void setBrowserToolbarListeners() { mBrowserToolbar.setOnActivateListener(new BrowserToolbar.OnActivateListener() { + @Override public void onActivate() { enterEditingMode(); } }); mBrowserToolbar.setOnCommitListener(new BrowserToolbar.OnCommitListener() { + @Override public void onCommit() { commitEditingMode(); } }); mBrowserToolbar.setOnDismissListener(new BrowserToolbar.OnDismissListener() { + @Override public void onDismiss() { mBrowserToolbar.cancelEdit(); } }); mBrowserToolbar.setOnFilterListener(new BrowserToolbar.OnFilterListener() { + @Override public void onFilter(String searchText, AutocompleteHandler handler) { filterEditingMode(searchText, handler); } }); mBrowserToolbar.setOnFocusChangeListener(new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { if (isHomePagerVisible()) { mHomePager.onToolbarFocusChange(hasFocus); } } }); mBrowserToolbar.setOnStartEditingListener(new BrowserToolbar.OnStartEditingListener() { + @Override public void onStartEditing() { // Temporarily disable doorhanger notifications. mDoorHangerPopup.disable(); } }); mBrowserToolbar.setOnStopEditingListener(new BrowserToolbar.OnStopEditingListener() { + @Override public void onStopEditing() { selectTargetTabForEditingMode(); // Since the underlying LayerView is set visible in hideHomePager, we would // ordinarily want to call it first. However, hideBrowserSearch changes the // visibility of the HomePager and hideHomePager will take no action if the // HomePager is hidden, so we want to call hideBrowserSearch to restore the // HomePager visibility first. @@ -1248,30 +1254,32 @@ public class BrowserApp extends GeckoApp // If the page has shrunk so that the toolbar no longer scrolls, make // sure the toolbar is visible. if (aMetrics.getPageHeight() <= aMetrics.getHeight()) { if (mDynamicToolbarCanScroll) { mDynamicToolbarCanScroll = false; if (mBrowserChrome.getVisibility() != View.VISIBLE) { ThreadUtils.postToUiThread(new Runnable() { + @Override public void run() { mDynamicToolbar.setVisible(true, VisibilityTransition.ANIMATE); } }); } } } else { mDynamicToolbarCanScroll = true; } final View browserChrome = mBrowserChrome; final ToolbarProgressView progressView = mProgressView; final int marginTop = Math.round(aMetrics.marginTop); ThreadUtils.postToUiThread(new Runnable() { + @Override public void run() { final float translationY = marginTop - browserChrome.getHeight(); ViewHelper.setTranslationY(browserChrome, translationY); ViewHelper.setTranslationY(progressView, translationY); if (mDoorHangerPopup.isShowing()) { mDoorHangerPopup.updatePopup(); }
--- a/mobile/android/base/BrowserLocaleManager.java +++ b/mobile/android/base/BrowserLocaleManager.java @@ -70,16 +70,17 @@ public class BrowserLocaleManager implem localeManager = new BrowserLocaleManager(); if (instance.compareAndSet(null, localeManager)) { return localeManager; } else { return instance.get(); } } + @Override public boolean isEnabled() { return AppConstants.MOZ_LOCALE_SWITCHER; } /** * Sometimes we want just the language for a locale, not the entire * language tag. But Java's .getLanguage method is wrong. *
--- a/mobile/android/base/ChromeCast.java +++ b/mobile/android/base/ChromeCast.java @@ -147,16 +147,17 @@ class ChromeCast implements GeckoMediaPl this.context = context; this.route = route; this.canMirror = route.supportsControlCategory(CastMediaControlIntent.categoryForCast(MIRROR_RECIEVER_APP_ID)); } // This dumps everything we can find about the device into JSON. This will hopefully make it // easier to filter out duplicate devices from different sources in js. + @Override public JSONObject toJSON() { final JSONObject obj = new JSONObject(); try { final CastDevice device = CastDevice.getFromBundle(route.getExtras()); if (device == null) { return null; } @@ -170,16 +171,17 @@ class ChromeCast implements GeckoMediaPl obj.put("manufacturer", "Google Inc."); } catch(JSONException ex) { debug("Error building route", ex); } return obj; } + @Override public void load(final String title, final String url, final String type, final EventCallback callback) { final CastDevice device = CastDevice.getFromBundle(route.getExtras()); Cast.CastOptions.Builder apiOptionsBuilder = Cast.CastOptions.builder(device, new Cast.Listener() { @Override public void onApplicationStatusChanged() { } @Override public void onVolumeChanged() { } @@ -213,21 +215,23 @@ class ChromeCast implements GeckoMediaPl public void onConnectionSuspended(int cause) { debug("suspended"); } }).build(); apiClient.connect(); } + @Override public void start(final EventCallback callback) { // Nothing to be done here callback.sendSuccess(null); } + @Override public void stop(final EventCallback callback) { // Nothing to be done here callback.sendSuccess(null); } public boolean verifySession(final EventCallback callback) { String msg = null; if (apiClient == null || !apiClient.isConnected()) { @@ -244,16 +248,17 @@ class ChromeCast implements GeckoMediaPl callback.sendError(msg); } return false; } return true; } + @Override public void play(final EventCallback callback) { if (!verifySession(callback)) { return; } try { remoteMediaPlayer.play(apiClient).setResultCallback(new ResultCallback<MediaChannelResult>() { @Override @@ -268,16 +273,17 @@ class ChromeCast implements GeckoMediaPl } }); } catch(IllegalStateException ex) { // The media player may throw if the session has been killed. For now, we're just catching this here. callback.sendError("Error playing"); } } + @Override public void pause(final EventCallback callback) { if (!verifySession(callback)) { return; } try { remoteMediaPlayer.pause(apiClient).setResultCallback(new ResultCallback<MediaChannelResult>() { @Override @@ -292,16 +298,17 @@ class ChromeCast implements GeckoMediaPl } }); } catch(IllegalStateException ex) { // The media player may throw if the session has been killed. For now, we're just catching this here. callback.sendError("Error pausing"); } } + @Override public void end(final EventCallback callback) { if (!verifySession(callback)) { return; } try { Cast.CastApi.stopApplication(apiClient).setResultCallback(new ResultCallback<Status>() { @Override @@ -371,16 +378,17 @@ class ChromeCast implements GeckoMediaPl private class MirrorCallback implements ResultCallback<ApplicationConnectionResult> { final EventCallback callback; MirrorCallback(final EventCallback callback) { this.callback = callback; } + @Override public void onResult(ApplicationConnectionResult result) { Status status = result.getStatus(); if (status.isSuccess()) { ApplicationMetadata applicationMetadata = result.getApplicationMetadata(); mSessionId = result.getSessionId(); String applicationStatus = result.getApplicationStatus(); boolean wasLaunched = result.getWasLaunched(); mApplicationStarted = true; @@ -400,22 +408,24 @@ class ChromeCast implements GeckoMediaPl GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Casting:Mirror", route.getId())); } else { callback.sendError(status.toString()); } } } + @Override public void message(String msg, final EventCallback callback) { if (mMirrorChannel != null) { mMirrorChannel.sendMessage(msg); } } + @Override public void mirror(final EventCallback callback) { final CastDevice device = CastDevice.getFromBundle(route.getExtras()); Cast.CastOptions.Builder apiOptionsBuilder = Cast.CastOptions.builder(device, new Cast.Listener() { @Override public void onApplicationStatusChanged() { } @Override public void onVolumeChanged() { }
--- a/mobile/android/base/ContactService.java +++ b/mobile/android/base/ContactService.java @@ -242,19 +242,17 @@ public class ContactService implements G // If filter value is undefined, avoid all the logic below and just return // all available raw contact IDs if ("".equals(filterValue) || "".equals(filterOp)) { long[] allRawContactIds = getAllRawContactIds(); // Truncate the raw contacts IDs array if necessary if (filterLimit > 0 && allRawContactIds.length > filterLimit) { long[] truncatedRawContactIds = new long[filterLimit]; - for (int i = 0; i < filterLimit; i++) { - truncatedRawContactIds[i] = allRawContactIds[i]; - } + System.arraycopy(allRawContactIds, 0, truncatedRawContactIds, 0, filterLimit); return truncatedRawContactIds; } return allRawContactIds; } // "match" can only be used with the "tel" field if ("match".equals(filterOp)) { for (int i = 0; i < filterBy.length(); i++) { @@ -397,51 +395,57 @@ public class ContactService implements G if (databaseValue == null) { return false; } filterValue = filterValue.toLowerCase(); databaseValue = databaseValue.toLowerCase(); - if ("match".equals(filterOp)) { - // If substring matching is a positive number, only pay attention to the last X characters - // of both the filter and database values - if (substringMatching > 0) { - databaseValue = substringStartFromEnd(cleanPhoneNumber(databaseValue), substringMatching); - filterValue = substringStartFromEnd(cleanPhoneNumber(filterValue), substringMatching); - return databaseValue.startsWith(filterValue); - } - return databaseValue.equals(filterValue); - } else if ("equals".equals(filterOp)) { - if (isPhone) { - return PhoneNumberUtils.compare(filterValue, databaseValue); - } - return databaseValue.equals(filterValue); - } else if ("contains".equals(filterOp)) { - if (isPhone) { - filterValue = cleanPhoneNumber(filterValue); - databaseValue = cleanPhoneNumber(databaseValue); - } - return databaseValue.contains(filterValue); - } else if ("startsWith".equals(filterOp)) { - // If a phone number, remove non-dialable characters and then only pay attention to - // the last X digits given by the substring matching values (see bug 877302) - if (isPhone) { - String cleanedDatabasePhone = cleanPhoneNumber(databaseValue); + switch (filterOp) { + case "match": + // If substring matching is a positive number, only pay attention to the last X characters + // of both the filter and database values if (substringMatching > 0) { - cleanedDatabasePhone = substringStartFromEnd(cleanedDatabasePhone, substringMatching); + databaseValue = substringStartFromEnd(cleanPhoneNumber(databaseValue), substringMatching); + filterValue = substringStartFromEnd(cleanPhoneNumber(filterValue), substringMatching); + return databaseValue.startsWith(filterValue); + } + + return databaseValue.equals(filterValue); + case "equals": + if (isPhone) { + return PhoneNumberUtils.compare(filterValue, databaseValue); } - if (cleanedDatabasePhone.startsWith(filterValue)) { - return true; + return databaseValue.equals(filterValue); + case "contains": + if (isPhone) { + filterValue = cleanPhoneNumber(filterValue); + databaseValue = cleanPhoneNumber(databaseValue); } - } - return databaseValue.startsWith(filterValue); + + return databaseValue.contains(filterValue); + case "startsWith": + // If a phone number, remove non-dialable characters and then only pay attention to + // the last X digits given by the substring matching values (see bug 877302) + if (isPhone) { + String cleanedDatabasePhone = cleanPhoneNumber(databaseValue); + if (substringMatching > 0) { + cleanedDatabasePhone = substringStartFromEnd(cleanedDatabasePhone, substringMatching); + } + + if (cleanedDatabasePhone.startsWith(filterValue)) { + return true; + } + } + + return databaseValue.startsWith(filterValue); } + return false; } private static String cleanPhoneNumber(String phone) { return phone.replace(" ", "").replace("(", "").replace(")", "").replace("-", ""); } private static String substringStartFromEnd(final String string, final int distanceFromEnd) { @@ -654,17 +658,17 @@ public class ContactService implements G Log.d(LOGTAG, "Got contact: " + contact.toString(3)); } catch (JSONException e) {} } return contact; } private boolean bool(int integer) { - return integer != 0 ? true : false; + return integer != 0; } private void getGenericDataAsJSONObject(Cursor cursor, JSONArray array, final String dataColumn, final String typeColumn, final String typeLabelColumn, final HashMap<String, Integer> typeMap) throws JSONException { String value = cursor.getString(cursor.getColumnIndex(dataColumn)); int typeConstant = cursor.getInt(cursor.getColumnIndex(typeColumn)); String type; @@ -1553,16 +1557,17 @@ public class ContactService implements G mAccountName = accounts[position].name; mAccountType = accounts[position].type; dialog.dismiss(); gotDeviceAccount(handleMessage); } }); mActivity.runOnUiThread(new Runnable() { + @Override public void run() { builder.show(); } }); } private void gotDeviceAccount(final Runnable handleMessage) { // Force the handleMessage runnable and getDefaultGroupId to run on the background thread
--- a/mobile/android/base/EventDispatcher.java +++ b/mobile/android/base/EventDispatcher.java @@ -250,20 +250,22 @@ public final class EventDispatcher { private final String type; private boolean sent; public GeckoEventCallback(final String guid, final String type) { this.guid = guid; this.type = type; } + @Override public void sendSuccess(final Object response) { sendResponse(STATUS_SUCCESS, response); } + @Override public void sendError(final Object response) { sendResponse(STATUS_ERROR, response); } private void sendResponse(final String status, final Object response) { if (sent) { throw new IllegalStateException("Callback has already been executed for type=" + type + ", guid=" + guid);
--- a/mobile/android/base/FilePicker.java +++ b/mobile/android/base/FilePicker.java @@ -56,16 +56,17 @@ public class FilePicker implements Gecko final String title = message.optString("title"); if ("mimeType".equals(mode)) mimeType = message.optString("mimeType"); else if ("extension".equals(mode)) mimeType = GeckoAppShell.getMimeTypeFromExtensions(message.optString("extensions")); showFilePickerAsync(title, mimeType, new ResultHandler() { + @Override public void gotFile(String filename) { try { message.put("file", filename); } catch (JSONException ex) { Log.i(LOGTAG, "Can't add filename to message " + filename); } @@ -193,17 +194,17 @@ public class FilePicker implements Gecko handler.gotIntent(base); return; } if (TextUtils.isEmpty(title)) { title = getFilePickerTitle(mimeType); } Intent chooser = Intent.createChooser(base, title); - chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toArray(new Parcelable[]{})); + chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toArray(new Parcelable[intents.size()])); handler.gotIntent(chooser); } /* Allows the user to pick an activity to load files from using a list prompt. Then opens the activity and * sends the file returned to the passed in handler. If a null handler is passed in, will still * pick and launch the file picker, but will throw away the result. */ protected void showFilePickerAsync(final String title, final String mimeType, final ResultHandler handler, final int tabId) {
--- a/mobile/android/base/FormAssistPopup.java +++ b/mobile/android/base/FormAssistPopup.java @@ -68,23 +68,23 @@ public class FormAssistPopup extends Rel private static int sValidationMessageHeight; private static int sValidationTextMarginTop; private static LayoutParams sValidationTextLayoutNormal; private static LayoutParams sValidationTextLayoutInverted; private static final String LOGTAG = "GeckoFormAssistPopup"; // The blocklist is so short that ArrayList is probably cheaper than HashSet. - private static final Collection<String> sInputMethodBlocklist = Arrays.asList(new String[] { + private static final Collection<String> sInputMethodBlocklist = Arrays.asList( InputMethods.METHOD_GOOGLE_JAPANESE_INPUT, // bug 775850 InputMethods.METHOD_OPENWNN_PLUS, // bug 768108 InputMethods.METHOD_SIMEJI, // bug 768108 InputMethods.METHOD_SWYPE, // bug 755909 - InputMethods.METHOD_SWYPE_BETA, // bug 755909 - }); + InputMethods.METHOD_SWYPE_BETA // bug 755909 + ); public FormAssistPopup(Context context, AttributeSet attrs) { super(context, attrs); mContext = context; mAnimation = AnimationUtils.loadAnimation(context, R.anim.grow_fade_in); mAnimation.setDuration(75);
--- a/mobile/android/base/GeckoAccessibility.java +++ b/mobile/android/base/GeckoAccessibility.java @@ -258,16 +258,17 @@ public class GeckoAccessibility { } public static void setAccessibilityStateChangeListener(final Context context) { // The state change listener is only supported on API14+ if (Versions.feature14Plus) { AccessibilityManager accessibilityManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE); accessibilityManager.addAccessibilityStateChangeListener(new AccessibilityManager.AccessibilityStateChangeListener() { + @Override public void onAccessibilityStateChanged(boolean enabled) { updateAccessibilitySettings(context); } }); } } public static void onLayerViewFocusChanged(LayerView layerview, boolean gainFocus) {
--- a/mobile/android/base/GeckoApp.java +++ b/mobile/android/base/GeckoApp.java @@ -193,16 +193,17 @@ public abstract class GeckoApp private String mPrivateBrowsingSession; private volatile HealthRecorder mHealthRecorder; private volatile Locale mLastLocale; private EventListener mWebappEventListener; abstract public int getLayout(); + @Override abstract public boolean hasTabsSideBar(); abstract protected String getDefaultProfileName() throws NoMozillaDirectoryException; private static final String RESTARTER_ACTION = "org.mozilla.gecko.restart"; private static final String RESTARTER_CLASS = "org.mozilla.gecko.Restarter"; @SuppressWarnings("serial") class SessionRestoreException extends Exception { @@ -224,40 +225,47 @@ public abstract class GeckoApp return this; } @Override public SharedPreferences getSharedPreferences() { return GeckoSharedPrefs.forApp(this); } + @Override public Activity getActivity() { return this; } + @Override public LocationListener getLocationListener() { return this; } + @Override public SensorEventListener getSensorEventListener() { return this; } + @Override public View getCameraView() { return mCameraView; } + @Override public void addAppStateListener(GeckoAppShell.AppStateListener listener) { mAppStateListeners.add(listener); } + @Override public void removeAppStateListener(GeckoAppShell.AppStateListener listener) { mAppStateListeners.remove(listener); } + @Override public FormAssistPopup getFormAssistPopup() { return mFormAssistPopup; } @Override public void onTabChanged(Tab tab, Tabs.TabEvents msg, Object data) { // When a tab is closed, it is always unselected first. // When a tab is unselected, another tab is always selected first. @@ -532,16 +540,17 @@ public abstract class GeckoApp * Close the tab UI indirectly (not as the result of a direct user * action). This does not force the UI to close; for example in Firefox * tablet mode it will remain open unless the user explicitly closes it. * * @return True if the tab UI was hidden. */ public boolean autoHideTabs() { return false; } + @Override public boolean areTabsShown() { return false; } @Override public void handleMessage(final String event, final NativeJSObject message, final EventCallback callback) { if ("Accessibility:Ready".equals(event)) { GeckoAccessibility.updateAccessibilitySettings(this); @@ -857,16 +866,17 @@ public abstract class GeckoApp FrameLayout decor = (FrameLayout)getWindow().getDecorView(); decor.addView(mFullScreenPluginContainer, layoutParams); mFullScreenPluginView = view; } + @Override public void addPluginView(final View view, final RectF rect, final boolean isFullScreen) { ThreadUtils.postToUiThread(new Runnable() { @Override public void run() { Tabs tabs = Tabs.getInstance(); Tab tab = tabs.getSelectedTab(); if (isFullScreen) { @@ -914,16 +924,17 @@ public abstract class GeckoApp decor.removeView(mFullScreenPluginContainer); mFullScreenPluginView = null; GeckoScreenOrientation.getInstance().unlock(); setFullScreen(false); } + @Override public void removePluginView(final View view, final boolean isFullScreen) { ThreadUtils.postToUiThread(new Runnable() { @Override public void run() { Tabs tabs = Tabs.getInstance(); Tab tab = tabs.getSelectedTab(); if (isFullScreen) { @@ -1066,16 +1077,17 @@ public abstract class GeckoApp if (layer instanceof PluginLayer) { ((PluginLayer) layer).setVisible(true); } } requestRender(); } + @Override public void setFullScreen(final boolean fullscreen) { ThreadUtils.postToUiThread(new Runnable() { @Override public void run() { ActivityUtils.setFullScreen(GeckoApp.this, fullscreen); } }); } @@ -1653,16 +1665,17 @@ public abstract class GeckoApp restoreData.put("sessionString", sessionString); return restoreData.toString(); } catch (JSONException e) { throw new SessionRestoreException(e); } } + @Override public synchronized GeckoProfile getProfile() { // fall back to default profile if we didn't load a specific one if (mProfile == null) { mProfile = GeckoProfile.get(this); } return mProfile; } @@ -1717,53 +1730,56 @@ public abstract class GeckoApp .build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectAll() .penaltyLog() .build()); } + @Override public void enableCameraView() { // Start listening for orientation events mCameraOrientationEventListener = new OrientationEventListener(this) { @Override public void onOrientationChanged(int orientation) { if (mAppStateListeners != null) { for (GeckoAppShell.AppStateListener listener: mAppStateListeners) { listener.onOrientationChanged(); } } } }; mCameraOrientationEventListener.enable(); // Try to make it fully transparent. - if (mCameraView != null && (mCameraView instanceof SurfaceView)) { + if (mCameraView instanceof SurfaceView) { if (Versions.feature11Plus) { mCameraView.setAlpha(0.0f); } ViewGroup mCameraLayout = (ViewGroup) findViewById(R.id.camera_layout); // Some phones (eg. nexus S) need at least a 8x16 preview size mCameraLayout.addView(mCameraView, new AbsoluteLayout.LayoutParams(8, 16, 0, 0)); } } + @Override public void disableCameraView() { if (mCameraOrientationEventListener != null) { mCameraOrientationEventListener.disable(); mCameraOrientationEventListener = null; } if (mCameraView != null) { ViewGroup mCameraLayout = (ViewGroup) findViewById(R.id.camera_layout); mCameraLayout.removeView(mCameraView); } } + @Override public String getDefaultUAString() { return HardwareUtils.isTablet() ? AppConstants.USER_AGENT_FENNEC_TABLET : AppConstants.USER_AGENT_FENNEC_MOBILE; } private void processAlertCallback(Intent intent) { String alertName = ""; String alertCookie = ""; @@ -2114,16 +2130,17 @@ public abstract class GeckoApp while (envIter.hasNext()) { Map.Entry<String,String> entry = envIter.next(); intent.putExtra("env" + c, entry.getKey() + "=" + entry.getValue()); c++; } } + @Override public void doRestart() { doRestart(RESTARTER_ACTION, null, null); } public void doRestart(String args) { doRestart(RESTARTER_ACTION, args, null); } @@ -2217,16 +2234,17 @@ public abstract class GeckoApp if (cleanupVersion != CURRENT_CLEANUP_VERSION) { SharedPreferences.Editor editor = GeckoApp.this.getSharedPreferences().edit(); editor.putInt(CLEANUP_VERSION, CURRENT_CLEANUP_VERSION); editor.apply(); } } } + @Override public PromptService getPromptService() { return mPromptService; } @Override public void onBackPressed() { if (getSupportFragmentManager().getBackStackEntryCount() > 0) { super.onBackPressed(); @@ -2282,16 +2300,17 @@ public abstract class GeckoApp @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (!ActivityHandlerHelper.handleActivityResult(requestCode, resultCode, data)) { super.onActivityResult(requestCode, resultCode, data); } } + @Override public AbsoluteLayout getPluginContainer() { return mPluginContainer; } // Accelerometer. @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { } @Override @@ -2320,16 +2339,17 @@ public abstract class GeckoApp public void onStatusChanged(String provider, int status, Bundle extras) { } private static final String CPU = "cpu"; private static final String SCREEN = "screen"; // Called when a Gecko Hal WakeLock is changed + @Override public void notifyWakeLockChanged(String topic, String state) { PowerManager.WakeLock wl = mWakeLocks.get(topic); if (state.equals("locked-foreground") && wl == null) { PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); if (CPU.equals(topic)) { wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, topic); } else if (SCREEN.equals(topic)) { @@ -2341,16 +2361,17 @@ public abstract class GeckoApp mWakeLocks.put(topic, wl); } } else if (!state.equals("locked-foreground") && wl != null) { wl.release(); mWakeLocks.remove(topic); } } + @Override public void notifyCheckUpdateResult(String result) { GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Update:CheckResult", result)); } protected void geckoConnected() { mLayerView.geckoConnected(); mLayerView.setOverScrollMode(View.OVER_SCROLL_NEVER); }
--- a/mobile/android/base/GeckoJavaSampler.java +++ b/mobile/android/base/GeckoJavaSampler.java @@ -66,16 +66,17 @@ public class GeckoJavaSampler { private int mSamplePos; public SamplingThread(final int aInterval, final int aSampleCount) { // If we sample faster then 10ms we get to many missed samples mInterval = Math.max(10, aInterval); mSampleCount = aSampleCount; } + @Override public void run() { synchronized (GeckoJavaSampler.class) { mSamples.put(0, new Sample[mSampleCount]); mSamplePos = 0; // Find the main thread Set<Thread> threadSet = Thread.getAllStackTraces().keySet(); for (Thread t : threadSet) {
--- a/mobile/android/base/GeckoNetworkManager.java +++ b/mobile/android/base/GeckoNetworkManager.java @@ -275,19 +275,22 @@ public class GeckoNetworkManager extends Log.e(LOGTAG, "Telephony service does not exist"); return -1; } String networkOperator = tel.getNetworkOperator(); if (networkOperator == null || networkOperator.length() <= 3) { return -1; } + if (type == InfoType.MNC) { return Integer.parseInt(networkOperator.substring(3)); - } else if (type == InfoType.MCC) { + } + + if (type == InfoType.MCC) { return Integer.parseInt(networkOperator.substring(0, 3)); } return -1; } /** * These are called from JavaScript ctypes. Avoid letting ProGuard delete them.
--- a/mobile/android/base/GeckoScreenOrientation.java +++ b/mobile/android/base/GeckoScreenOrientation.java @@ -293,34 +293,31 @@ public class GeckoScreenOrientation { * Retrieve the scren orientation from a string. * * @param aStr * String hopefully containing a screen orientation name. * @return Gecko screen orientation if matched, DEFAULT_SCREEN_ORIENTATION * otherwise. */ public static ScreenOrientation screenOrientationFromString(String aStr) { - if ("portrait".equals(aStr)) { - return ScreenOrientation.PORTRAIT_PRIMARY; - } - else if ("landscape".equals(aStr)) { - return ScreenOrientation.LANDSCAPE_PRIMARY; - } - else if ("portrait-primary".equals(aStr)) { - return ScreenOrientation.PORTRAIT_PRIMARY; + switch (aStr) { + case "portrait": + return ScreenOrientation.PORTRAIT_PRIMARY; + case "landscape": + return ScreenOrientation.LANDSCAPE_PRIMARY; + case "portrait-primary": + return ScreenOrientation.PORTRAIT_PRIMARY; + case "portrait-secondary": + return ScreenOrientation.PORTRAIT_SECONDARY; + case "landscape-primary": + return ScreenOrientation.LANDSCAPE_PRIMARY; + case "landscape-secondary": + return ScreenOrientation.LANDSCAPE_SECONDARY; } - else if ("portrait-secondary".equals(aStr)) { - return ScreenOrientation.PORTRAIT_SECONDARY; - } - else if ("landscape-primary".equals(aStr)) { - return ScreenOrientation.LANDSCAPE_PRIMARY; - } - else if ("landscape-secondary".equals(aStr)) { - return ScreenOrientation.LANDSCAPE_SECONDARY; - } + Log.w(LOGTAG, "screenOrientationFromString: unknown orientation string"); return DEFAULT_SCREEN_ORIENTATION; } /* * Convert Gecko screen orientation to Android orientation. * * @param aScreenOrientation
--- a/mobile/android/base/GeckoView.java +++ b/mobile/android/base/GeckoView.java @@ -349,16 +349,17 @@ public class GeckoView extends LayerView public static GeckoAppShell.GeckoInterface getGeckoInterface() { return GeckoAppShell.getGeckoInterface(); } protected String getSharedPreferencesFile() { return DEFAULT_SHARED_PREFERENCES_FILE; } + @Override public SharedPreferences getSharedPreferences() { return getContext().getSharedPreferences(getSharedPreferencesFile(), 0); } /** * Wrapper for a browser in the GeckoView container. Associated with a browser * element in the Gecko system. */
--- a/mobile/android/base/GeckoViewChrome.java +++ b/mobile/android/base/GeckoViewChrome.java @@ -5,57 +5,62 @@ package org.mozilla.gecko; public class GeckoViewChrome implements GeckoView.ChromeDelegate { /** * Tell the host application that Gecko is ready to handle requests. * @param view The GeckoView that initiated the callback. */ + @Override public void onReady(GeckoView view) {} /** * Tell the host application to display an alert dialog. * @param view The GeckoView that initiated the callback. * @param browser The Browser that is loading the content. * @param message The string to display in the dialog. * @param result A PromptResult used to send back the result without blocking. * Defaults to cancel requests. */ + @Override public void onAlert(GeckoView view, GeckoView.Browser browser, String message, GeckoView.PromptResult result) { result.cancel(); } /** * Tell the host application to display a confirmation dialog. * @param view The GeckoView that initiated the callback. * @param browser The Browser that is loading the content. * @param message The string to display in the dialog. * @param result A PromptResult used to send back the result without blocking. * Defaults to cancel requests. */ + @Override public void onConfirm(GeckoView view, GeckoView.Browser browser, String message, GeckoView.PromptResult result) { result.cancel(); } /** * Tell the host application to display an input prompt dialog. * @param view The GeckoView that initiated the callback. * @param browser The Browser that is loading the content. * @param message The string to display in the dialog. * @param defaultValue The string to use as default input. * @param result A PromptResult used to send back the result without blocking. * Defaults to cancel requests. */ + @Override public void onPrompt(GeckoView view, GeckoView.Browser browser, String message, String defaultValue, GeckoView.PromptResult result) { result.cancel(); } /** * Tell the host application to display a remote debugging request dialog. * @param view The GeckoView that initiated the callback. * @param result A PromptResult used to send back the result without blocking. * Defaults to cancel requests. */ + @Override public void onDebugRequest(GeckoView view, GeckoView.PromptResult result) { result.cancel(); } }
--- a/mobile/android/base/GeckoViewContent.java +++ b/mobile/android/base/GeckoViewContent.java @@ -7,45 +7,50 @@ package org.mozilla.gecko; public class GeckoViewContent implements GeckoView.ContentDelegate { /** * A Browser has started loading content from the network. * @param view The GeckoView that initiated the callback. * @param browser The Browser that is loading the content. * @param url The resource being loaded. */ + @Override public void onPageStart(GeckoView view, GeckoView.Browser browser, String url) {} /** * A Browser has finished loading content from the network. * @param view The GeckoView that initiated the callback. * @param browser The Browser that was loading the content. * @param success Whether the page loaded successfully or an error occured. */ + @Override public void onPageStop(GeckoView view, GeckoView.Browser browser, boolean success) {} /** * A Browser is displaying content. This page could have been loaded via * network or from the session history. * @param view The GeckoView that initiated the callback. * @param browser The Browser that is showing the content. */ + @Override public void onPageShow(GeckoView view, GeckoView.Browser browser) {} /** * A page title was discovered in the content or updated after the content * loaded. * @param view The GeckoView that initiated the callback. * @param browser The Browser that is showing the content. * @param title The title sent from the content. */ + @Override public void onReceivedTitle(GeckoView view, GeckoView.Browser browser, String title) {} /** * A link element was discovered in the content or updated after the content * loaded that specifies a favicon. * @param view The GeckoView that initiated the callback. * @param browser The Browser that is showing the content. * @param url The href of the link element specifying the favicon. * @param size The maximum size specified for the favicon, or -1 for any size. */ + @Override public void onReceivedFavicon(GeckoView view, GeckoView.Browser browser, String url, int size) {} }
--- a/mobile/android/base/LightweightTheme.java +++ b/mobile/android/base/LightweightTheme.java @@ -338,17 +338,17 @@ public class LightweightTheme implements } parent = curView.getParent(); if (parent instanceof View) { curView = (View) parent; } - } while(parent instanceof View && parent != null); + } while(parent instanceof View); // Adjust the coordinates for the offset. left -= offsetX; right -= offsetX; top -= offsetY; bottom -= offsetY; // The either the required height may be less than the available image height or more than it.
--- a/mobile/android/base/NotificationHandler.java +++ b/mobile/android/base/NotificationHandler.java @@ -157,17 +157,17 @@ public class NotificationHandler { /** * Helper method to determines whether a notification is an AlertNotification that is showing progress * This method will be deprecated when AlertNotifications are removed (bug 893289). * * @param notification the notification to check * @return whether the notification is an AlertNotification showing progress. */ private boolean isProgressStyle(Notification notification) { - if (notification != null && notification instanceof AlertNotification) { + if (notification instanceof AlertNotification) { return ((AlertNotification)notification).isProgressStyle(); } return false; } protected void setForegroundNotification(int id, Notification notification) { mForegroundNotificationId = id; mForegroundNotification = notification;
--- a/mobile/android/base/RemoteClientsDialogFragment.java +++ b/mobile/android/base/RemoteClientsDialogFragment.java @@ -107,16 +107,17 @@ public class RemoteClientsDialogFragment checked.add(clients.get(i)); } } notifyListener(checked); } }); } else { builder.setItems(clientNames, new DialogInterface.OnClickListener() { + @Override public void onClick(DialogInterface dialog, int index) { final ArrayList<RemoteClient> checked = new ArrayList<RemoteClient>(); checked.add(clients.get(index)); notifyListener(checked); } }); }
--- a/mobile/android/base/TextSelection.java +++ b/mobile/android/base/TextSelection.java @@ -272,45 +272,49 @@ class TextSelection extends Layer implem for (int i = 0; i < length; i++) { try { final JSONObject obj = mItems.getJSONObject(i); final GeckoMenuItem menuitem = (GeckoMenuItem) menu.add(0, i, 0, obj.optString("label")); final int actionEnum = obj.optBoolean("showAsAction") ? GeckoMenuItem.SHOW_AS_ACTION_ALWAYS : GeckoMenuItem.SHOW_AS_ACTION_NEVER; menuitem.setShowAsAction(actionEnum, R.attr.menuItemActionModeStyle); BitmapUtils.getDrawable(mStartHandle.getContext(), obj.optString("icon"), new BitmapLoader() { + @Override public void onBitmapFound(Drawable d) { if (d != null) { menuitem.setIcon(d); } } }); } catch(Exception ex) { Log.i(LOGTAG, "Exception building menu", ex); } } return true; } + @Override public boolean onCreateActionMode(ActionModeCompat mode, Menu menu) { mActionMode = mode; return true; } + @Override public boolean onActionItemClicked(ActionModeCompat mode, MenuItem item) { try { final JSONObject obj = mItems.getJSONObject(item.getItemId()); GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("TextSelection:Action", obj.optString("id"))); return true; } catch(Exception ex) { Log.i(LOGTAG, "Exception calling action", ex); } return false; } // Called when the user exits the action mode + @Override public void onDestroyActionMode(ActionModeCompat mode) { mActionMode = null; mCallback = null; GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("TextSelection:End", null)); } } }
--- a/mobile/android/base/background/common/log/writers/AndroidLevelCachingLogWriter.java +++ b/mobile/android/base/background/common/log/writers/AndroidLevelCachingLogWriter.java @@ -37,90 +37,96 @@ public class AndroidLevelCachingLogWrite isInfoLoggable = new IdentityHashMap<String, Boolean>(); isDebugLoggable = new IdentityHashMap<String, Boolean>(); isVerboseLoggable = new IdentityHashMap<String, Boolean>(); } private boolean shouldLogError(String logTag) { Boolean out = isErrorLoggable.get(logTag); if (out != null) { - return out.booleanValue(); + return out; } out = Log.isLoggable(logTag, Log.ERROR); isErrorLoggable.put(logTag, out); return out; } private boolean shouldLogWarn(String logTag) { Boolean out = isWarnLoggable.get(logTag); if (out != null) { - return out.booleanValue(); + return out; } out = Log.isLoggable(logTag, Log.WARN); isWarnLoggable.put(logTag, out); return out; } private boolean shouldLogInfo(String logTag) { Boolean out = isInfoLoggable.get(logTag); if (out != null) { - return out.booleanValue(); + return out; } out = Log.isLoggable(logTag, Log.INFO); isInfoLoggable.put(logTag, out); return out; } private boolean shouldLogDebug(String logTag) { Boolean out = isDebugLoggable.get(logTag); if (out != null) { - return out.booleanValue(); + return out; } out = Log.isLoggable(logTag, Log.DEBUG); isDebugLoggable.put(logTag, out); return out; } @Override public boolean shouldLogVerbose(String logTag) { Boolean out = isVerboseLoggable.get(logTag); if (out != null) { - return out.booleanValue(); + return out; } out = Log.isLoggable(logTag, Log.VERBOSE); isVerboseLoggable.put(logTag, out); return out; } + @Override public void error(String tag, String message, Throwable error) { if (shouldLogError(tag)) { inner.error(tag, message, error); } } + @Override public void warn(String tag, String message, Throwable error) { if (shouldLogWarn(tag)) { inner.warn(tag, message, error); } } + @Override public void info(String tag, String message, Throwable error) { if (shouldLogInfo(tag)) { inner.info(tag, message, error); } } + @Override public void debug(String tag, String message, Throwable error) { if (shouldLogDebug(tag)) { inner.debug(tag, message, error); } } + @Override public void trace(String tag, String message, Throwable error) { if (shouldLogVerbose(tag)) { inner.trace(tag, message, error); } } + @Override public void close() { inner.close(); } }
--- a/mobile/android/base/background/common/log/writers/AndroidLogWriter.java +++ b/mobile/android/base/background/common/log/writers/AndroidLogWriter.java @@ -10,31 +10,37 @@ import android.util.Log; * Log to the Android log. */ public class AndroidLogWriter extends LogWriter { @Override public boolean shouldLogVerbose(String logTag) { return true; } + @Override public void error(String tag, String message, Throwable error) { Log.e(tag, message, error); } + @Override public void warn(String tag, String message, Throwable error) { Log.w(tag, message, error); } + @Override public void info(String tag, String message, Throwable error) { Log.i(tag, message, error); } + @Override public void debug(String tag, String message, Throwable error) { Log.d(tag, message, error); } + @Override public void trace(String tag, String message, Throwable error) { Log.v(tag, message, error); } + @Override public void close() { } }
--- a/mobile/android/base/background/common/log/writers/LevelFilteringLogWriter.java +++ b/mobile/android/base/background/common/log/writers/LevelFilteringLogWriter.java @@ -15,16 +15,17 @@ public class LevelFilteringLogWriter ext protected final LogWriter inner; protected final int logLevel; public LevelFilteringLogWriter(int logLevel, LogWriter inner) { this.inner = inner; this.logLevel = logLevel; } + @Override public void close() { inner.close(); } @Override public void error(String tag, String message, Throwable error) { if (logLevel <= Log.ERROR) { inner.error(tag, message, error);
--- a/mobile/android/base/background/common/log/writers/PrintLogWriter.java +++ b/mobile/android/base/background/common/log/writers/PrintLogWriter.java @@ -59,16 +59,17 @@ public class PrintLogWriter extends LogW log(tag, VERBOSE + message, error); } @Override public boolean shouldLogVerbose(String tag) { return true; } + @Override public void close() { if (closed) { return; } if (pw != null) { pw.close(); } closed = true;
--- a/mobile/android/base/background/common/log/writers/SimpleTagLogWriter.java +++ b/mobile/android/base/background/common/log/writers/SimpleTagLogWriter.java @@ -9,12 +9,13 @@ package org.mozilla.gecko.background.com */ public class SimpleTagLogWriter extends TagLogWriter { final String tag; public SimpleTagLogWriter(String tag, LogWriter inner) { super(inner); this.tag = tag; } + @Override protected String getMainTag() { return tag; } }
--- a/mobile/android/base/background/common/log/writers/StringLogWriter.java +++ b/mobile/android/base/background/common/log/writers/StringLogWriter.java @@ -20,32 +20,38 @@ public class StringLogWriter extends Log return sw.toString(); } @Override public boolean shouldLogVerbose(String tag) { return true; } + @Override public void error(String tag, String message, Throwable error) { inner.error(tag, message, error); } + @Override public void warn(String tag, String message, Throwable error) { inner.warn(tag, message, error); } + @Override public void info(String tag, String message, Throwable error) { inner.info(tag, message, error); } + @Override public void debug(String tag, String message, Throwable error) { inner.debug(tag, message, error); } + @Override public void trace(String tag, String message, Throwable error) { inner.trace(tag, message, error); } + @Override public void close() { inner.close(); } }
--- a/mobile/android/base/background/fxa/FxAccountAgeLockoutHelper.java +++ b/mobile/android/base/background/fxa/FxAccountAgeLockoutHelper.java @@ -86,11 +86,11 @@ public class FxAccountAgeLockoutHelper { try { yearOfBirth = Integer.valueOf(yearText, 10); } catch (NumberFormatException e) { // Any non-numbers in the list are ranges (and we say as much to // translators in the resource file), so these people pass the age check. FxAccountConstants.pii(LOG_TAG, "Passed age check: year text was found in item list but was not a number."); return true; } - return passesAgeCheck(yearOfBirth.intValue()); + return passesAgeCheck(yearOfBirth); } }
--- a/mobile/android/base/background/fxa/FxAccountClient20.java +++ b/mobile/android/base/background/fxa/FxAccountClient20.java @@ -139,45 +139,42 @@ public class FxAccountClient20 extends F try { final String[] requiredStringFields = getKeys ? LOGIN_RESPONSE_REQUIRED_STRING_FIELDS_KEYS : LOGIN_RESPONSE_REQUIRED_STRING_FIELDS; body.throwIfFieldsMissingOrMisTyped(requiredStringFields, String.class); String uid = body.getString(JSON_KEY_UID); boolean verified = false; // In production, we're definitely not verified immediately upon creation. Boolean tempVerified = body.getBoolean(JSON_KEY_VERIFIED); if (tempVerified != null) { - verified = tempVerified.booleanValue(); + verified = tempVerified; } byte[] sessionToken = Utils.hex2Byte(body.getString(JSON_KEY_SESSIONTOKEN)); byte[] keyFetchToken = null; if (getKeys) { keyFetchToken = Utils.hex2Byte(body.getString(JSON_KEY_KEYFETCHTOKEN)); } LoginResponse loginResponse = new LoginResponse(new String(emailUTF8, "UTF-8"), uid, verified, sessionToken, keyFetchToken); delegate.handleSuccess(loginResponse); - return; } catch (Exception e) { delegate.handleError(e); - return; } } }; post(resource, body, delegate); } @Override public void createAccountAndGetKeys(byte[] emailUTF8, PasswordStretcher passwordStretcher, RequestDelegate<LoginResponse> delegate) { try { byte[] quickStretchedPW = passwordStretcher.getQuickStretchedPW(emailUTF8); createAccount(emailUTF8, quickStretchedPW, true, false, "sync", delegate); } catch (Exception e) { invokeHandleError(delegate, e); - return; } } @Override public void loginAndGetKeys(byte[] emailUTF8, PasswordStretcher passwordStretcher, RequestDelegate<LoginResponse> delegate) { login(emailUTF8, passwordStretcher, true, delegate); }
--- a/mobile/android/base/background/fxa/QuickPasswordStretcher.java +++ b/mobile/android/base/background/fxa/QuickPasswordStretcher.java @@ -14,16 +14,17 @@ import org.mozilla.gecko.sync.Utils; public class QuickPasswordStretcher implements PasswordStretcher { protected final String password; protected final Map<String, String> cache = new HashMap<String, String>(); public QuickPasswordStretcher(String password) { this.password = password; } + @Override public synchronized byte[] getQuickStretchedPW(byte[] emailUTF8) throws UnsupportedEncodingException, GeneralSecurityException { if (emailUTF8 == null) { throw new IllegalArgumentException("emailUTF8 must not be null"); } String key = Utils.byte2Hex(emailUTF8); if (!cache.containsKey(key)) { byte[] value = FxAccountUtils.generateQuickStretchedPW(emailUTF8, password.getBytes("UTF-8")); cache.put(key, Utils.byte2Hex(value));
--- a/mobile/android/base/background/healthreport/HealthReportDatabaseStorage.java +++ b/mobile/android/base/background/healthreport/HealthReportDatabaseStorage.java @@ -1192,17 +1192,17 @@ public class HealthReportDatabaseStorage @Override public void recordDailyLast(int env, int day, int field, String value) { this.recordDailyLast(env, day, field, value, EVENTS_TEXTUAL); } @Override public void recordDailyLast(int env, int day, int field, int value) { - this.recordDailyLast(env, day, field, Integer.valueOf(value), EVENTS_INTEGER); + this.recordDailyLast(env, day, field, value, EVENTS_INTEGER); } private void recordDailyDiscrete(int env, int day, int field, Object value, String table) { if (env == -1) { Logger.warn(LOG_TAG, "Refusing to record with environment = -1."); return; } @@ -1366,20 +1366,22 @@ public class HealthReportDatabaseStorage final int start = this.getDay(time); final SQLiteDatabase db = this.helper.getReadableDatabase(); final String dayString = Integer.toString(start, 10); return db.query("named_events", COLUMNS_DATE_ENVSTR_M_MV_F_VALUE, "date >= ?", new String[] {dayString}, null, null, "date, environment, measurement_name, measurement_version, field_name"); } + @Override public int getEventCount() { return getRowCount("events"); } + @Override public int getEnvironmentCount() { return getRowCount("environments"); } private int getRowCount(String table) { // table should be parameterized, but SQL throws a compilation error if the table in unknown // in advance. return getIntFromQuery("SELECT COUNT(*) from " + table, null); @@ -1389,16 +1391,17 @@ public class HealthReportDatabaseStorage * Deletes all environments, addons, and events from the database before the given time. If this * data does not have recorded dates but are no longer referenced by other fields, they are also * removed (with exception to the current environment). * * @param time milliseconds since epoch. Will be converted by {@link #getDay(long)}. * @param curEnv The ID of the current environment. * @return The number of environments and addon entries deleted. */ + @Override public int deleteDataBefore(final long time, final int curEnv) { final SQLiteDatabase db = this.helper.getWritableDatabase(); db.beginTransaction(); int numRowsDeleted = 0; try { numRowsDeleted += deleteEnvAndEventsBefore(db, time, curEnv); numRowsDeleted += deleteOrphanedAddons(db); db.setTransactionSuccessful(); @@ -1593,16 +1596,17 @@ public class HealthReportDatabaseStorage db.endTransaction(); } } /** * Prunes the given number of least-recently used environments. Note that orphaned environments * are not removed and the environment cache is cleared. */ + @Override public void pruneEnvironments(final int numToPrune) { final SQLiteDatabase db = this.helper.getWritableDatabase(); db.beginTransaction(); try { db.delete("environments", "id in (SELECT env " + " FROM events " + " GROUP BY env " + @@ -1620,16 +1624,17 @@ public class HealthReportDatabaseStorage /** * Prunes up to a maximum of the given number of the oldest events. While it is more correct to * prune the exact given amount, there is no unique identifier among events so we cannot be so * precise. Instead, we prune on date, deleting all events up to the day before our count of * events reaches the given maximum. Note that this technicality means this method cannot be * used to delete all events. */ + @Override public void pruneEvents(final int maxNumToPrune) { final SQLiteDatabase db = this.helper.getWritableDatabase(); final Cursor c = db.rawQuery( "SELECT MAX(date) " + "FROM (SELECT date " + " FROM events " + " ORDER BY date " +
--- a/mobile/android/base/background/healthreport/HealthReportProvider.java +++ b/mobile/android/base/background/healthreport/HealthReportProvider.java @@ -184,17 +184,17 @@ public class HealthReportProvider extend int by = values.containsKey("value") ? values.getAsInteger("value") : 1; storage.incrementDailyCount(env, day, field.getID(), by); return 1; case EVENTS_FIELD_LAST: Object object = values.get("value"); if (object instanceof Integer || object instanceof Long) { - storage.recordDailyLast(env, day, field.getID(), ((Integer) object).intValue()); + storage.recordDailyLast(env, day, field.getID(), (Integer) object); } else if (object instanceof String) { storage.recordDailyLast(env, day, field.getID(), (String) object); } else { storage.recordDailyLast(env, day, field.getID(), object.toString()); } return 1; default: @@ -282,17 +282,17 @@ public class HealthReportProvider extend field = pathSegments.get(4); return storage.getField(measurement, measurementVersion, field); } private MeasurementFields getFieldSpecs(ContentValues values) { final ArrayList<FieldSpec> specs = new ArrayList<FieldSpec>(values.size()); for (Entry<String, Object> entry : values.valueSet()) { - specs.add(new FieldSpec(entry.getKey(), ((Integer) entry.getValue()).intValue())); + specs.add(new FieldSpec(entry.getKey(), (Integer) entry.getValue())); } return new MeasurementFields() { @Override public Iterable<FieldSpec> getFields() { return specs; } };
--- a/mobile/android/base/background/healthreport/prune/PrunePolicyDatabaseStorage.java +++ b/mobile/android/base/background/healthreport/prune/PrunePolicyDatabaseStorage.java @@ -36,53 +36,60 @@ public class PrunePolicyDatabaseStorage public PrunePolicyDatabaseStorage(final Context context, final String profilePath) { this.context = context; this.profilePath = profilePath; this.config = new AndroidConfigurationProvider(context); this.currentEnvironmentID = -1; } + @Override public void pruneEvents(final int count) { getStorage().pruneEvents(count); } + @Override public void pruneEnvironments(final int count) { getStorage().pruneEnvironments(count); // Re-populate the DB and environment cache with the current environment in the unlikely event // that it was deleted. this.currentEnvironmentID = -1; getCurrentEnvironmentID(); } /** * Deletes data recorded before the given time. Note that if this method fails to retrieve the * current environment from the profile cache, it will not delete data so be sure to prune by * other methods (e.g. {@link pruneEvents}) as well. */ + @Override public int deleteDataBefore(final long time) { return getStorage().deleteDataBefore(time, getCurrentEnvironmentID()); } + @Override public void cleanup() { final HealthReportDatabaseStorage storage = getStorage(); // The change to auto_vacuum will only take affect after a vacuum. storage.disableAutoVacuuming(); storage.vacuum(); } + @Override public int getEventCount() { return getStorage().getEventCount(); } + @Override public int getEnvironmentCount() { return getStorage().getEnvironmentCount(); } + @Override public void close() { if (client != null) { client.release(); client = null; } } /**
--- a/mobile/android/base/background/healthreport/upload/ObsoleteDocumentTracker.java +++ b/mobile/android/base/background/healthreport/upload/ObsoleteDocumentTracker.java @@ -126,23 +126,23 @@ public class ObsoleteDocumentTracker { * * Public for testing only. */ public static class PairComparator implements Comparator<Entry<String, Object>> { @Override public int compare(Entry<String, Object> lhs, Entry<String, Object> rhs) { Object l = lhs.getValue(); Object r = rhs.getValue(); - if (l == null || !(l instanceof Long)) { - if (r == null || !(r instanceof Long)) { + if (!(l instanceof Long)) { + if (!(r instanceof Long)) { return 0; } return -1; } - if (r == null || !(r instanceof Long)) { + if (!(r instanceof Long)) { return 1; } return ((Long) r).compareTo((Long) l); } } /** * Return a batch of obsolete document IDs that should be deleted next. @@ -231,15 +231,15 @@ public class ObsoleteDocumentTracker { ExtendedJSONObject ids = getObsoleteIds(); Set<String> keys = new HashSet<String>(ids.keySet()); // Avoid invalidating an iterator. for (String key : keys) { Object o = ids.get(key); if (!(o instanceof Long)) { continue; } - if (((Long) o).longValue() > HealthReportConstants.DELETION_ATTEMPTS_PER_OBSOLETE_DOCUMENT_ID) { + if ((Long) o > HealthReportConstants.DELETION_ATTEMPTS_PER_OBSOLETE_DOCUMENT_ID) { ids.put(key, HealthReportConstants.DELETION_ATTEMPTS_PER_OBSOLETE_DOCUMENT_ID); } } setObsoleteIds(ids); } }
--- a/mobile/android/base/background/preferences/PreferenceManagerCompat.java +++ b/mobile/android/base/background/preferences/PreferenceManagerCompat.java @@ -27,205 +27,200 @@ import android.content.Context; import android.content.Intent; import android.preference.Preference; import android.preference.PreferenceManager; import android.preference.PreferenceScreen; import android.util.Log; public class PreferenceManagerCompat { - private static final String TAG = PreferenceManagerCompat.class.getSimpleName(); - - /** - * Interface definition for a callback to be invoked when a - * {@link Preference} in the hierarchy rooted at this {@link PreferenceScreen} is - * clicked. - */ - interface OnPreferenceTreeClickListener { - /** - * Called when a preference in the tree rooted at this - * {@link PreferenceScreen} has been clicked. - * - * @param preferenceScreen The {@link PreferenceScreen} that the - * preference is located in. - * @param preference The preference that was clicked. - * @return Whether the click was handled. - */ - boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference); - } + private static final String TAG = PreferenceManagerCompat.class.getSimpleName(); - static PreferenceManager newInstance(Activity activity, int firstRequestCode) { - try { - Constructor<PreferenceManager> c = PreferenceManager.class.getDeclaredConstructor(Activity.class, int.class); - c.setAccessible(true); - return c.newInstance(activity, firstRequestCode); - } catch (Exception e) { - Log.w(TAG, "Couldn't call constructor PreferenceManager by reflection", e); - } - return null; - } - + /** + * Interface definition for a callback to be invoked when a {@link Preference} in the hierarchy + * rooted at this {@link PreferenceScreen} is clicked. + */ + interface OnPreferenceTreeClickListener { /** - * Sets the owning preference fragment - */ - static void setFragment(PreferenceManager manager, PreferenceFragment fragment) { - // stub - } - - /** - * Sets the callback to be invoked when a {@link Preference} in the - * hierarchy rooted at this {@link PreferenceManager} is clicked. + * Called when a preference in the tree rooted at this {@link PreferenceScreen} has been + * clicked. * - * @param listener The callback to be invoked. + * @param preferenceScreen The {@link PreferenceScreen} that the preference is located in. + * @param preference The preference that was clicked. + * + * @return Whether the click was handled. */ - static void setOnPreferenceTreeClickListener(PreferenceManager manager, final OnPreferenceTreeClickListener listener) { - try { - Field onPreferenceTreeClickListener = PreferenceManager.class.getDeclaredField("mOnPreferenceTreeClickListener"); - onPreferenceTreeClickListener.setAccessible(true); - if (listener != null) { - Object proxy = Proxy.newProxyInstance( - onPreferenceTreeClickListener.getType().getClassLoader(), - new Class<?>[] { onPreferenceTreeClickListener.getType() }, - new InvocationHandler() { - @Override - public Object invoke(Object proxy, Method method, Object[] args) { - if (method.getName().equals("onPreferenceTreeClick")) { - return Boolean.valueOf(listener.onPreferenceTreeClick((PreferenceScreen) args[0], (Preference) args[1])); - } else { - return null; - } - } - }); - onPreferenceTreeClickListener.set(manager, proxy); - } else { - onPreferenceTreeClickListener.set(manager, null); - } - } catch (Exception e) { - Log.w(TAG, "Couldn't set PreferenceManager.mOnPreferenceTreeClickListener by reflection", e); - } + boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference); + } + + static PreferenceManager newInstance(Activity activity, int firstRequestCode) { + try { + Constructor<PreferenceManager> c = PreferenceManager.class.getDeclaredConstructor(Activity.class, int.class); + c.setAccessible(true); + return c.newInstance(activity, firstRequestCode); + } catch (Exception e) { + Log.w(TAG, "Couldn't call constructor PreferenceManager by reflection", e); } + return null; + } + + /** + * Sets the owning preference fragment + */ + static void setFragment(PreferenceManager manager, PreferenceFragment fragment) { + // stub + } - /** - * Inflates a preference hierarchy from the preference hierarchies of - * {@link Activity Activities} that match the given {@link Intent}. An - * {@link Activity} defines its preference hierarchy with meta-data using - * the {@link #METADATA_KEY_PREFERENCES} key. - * <p> - * If a preference hierarchy is given, the new preference hierarchies will - * be merged in. - * - * @param queryIntent The intent to match activities. - * @param rootPreferences Optional existing hierarchy to merge the new - * hierarchies into. - * @return The root hierarchy (if one was not provided, the new hierarchy's - * root). - */ - static PreferenceScreen inflateFromIntent(PreferenceManager manager, Intent intent, PreferenceScreen screen) { - try { - Method m = PreferenceManager.class.getDeclaredMethod("inflateFromIntent", Intent.class, PreferenceScreen.class); - m.setAccessible(true); - PreferenceScreen prefScreen = (PreferenceScreen) m.invoke(manager, intent, screen); - return prefScreen; - } catch (Exception e) { - Log.w(TAG, "Couldn't call PreferenceManager.inflateFromIntent by reflection", e); - } - return null; + /** + * Sets the callback to be invoked when a {@link Preference} in the hierarchy rooted at this + * {@link PreferenceManager} is clicked. + * + * @param listener The callback to be invoked. + */ + static void setOnPreferenceTreeClickListener(PreferenceManager manager, final OnPreferenceTreeClickListener listener) { + try { + Field onPreferenceTreeClickListener = PreferenceManager.class.getDeclaredField("mOnPreferenceTreeClickListener"); + onPreferenceTreeClickListener.setAccessible(true); + if (listener != null) { + Object proxy = Proxy.newProxyInstance( + onPreferenceTreeClickListener.getType().getClassLoader(), + new Class<?>[] { onPreferenceTreeClickListener.getType() }, + new InvocationHandler() { + @Override + public Object invoke(Object proxy, Method method, Object[] args) { + if (method.getName().equals("onPreferenceTreeClick")) { + return listener.onPreferenceTreeClick((PreferenceScreen) args[0], (Preference) args[1]); + } else { + return null; + } + } + }); + onPreferenceTreeClickListener.set(manager, proxy); + } else { + onPreferenceTreeClickListener.set(manager, null); + } + } catch (Exception e) { + Log.w(TAG, "Couldn't set PreferenceManager.mOnPreferenceTreeClickListener by reflection", e); } + } + + /** + * Inflates a preference hierarchy from the preference hierarchies of {@link Activity Activities} + * that match the given {@link Intent}. An {@link Activity} defines its preference hierarchy with + * meta-data using the {@link #METADATA_KEY_PREFERENCES} key. + * <p/> + * If a preference hierarchy is given, the new preference hierarchies will be merged in. + * + * @param queryIntent The intent to match activities. + * @param rootPreferences Optional existing hierarchy to merge the new hierarchies into. + * + * @return The root hierarchy (if one was not provided, the new hierarchy's root). + */ + static PreferenceScreen inflateFromIntent(PreferenceManager manager, Intent intent, PreferenceScreen screen) { + try { + Method m = PreferenceManager.class.getDeclaredMethod("inflateFromIntent", Intent.class, PreferenceScreen.class); + m.setAccessible(true); + PreferenceScreen prefScreen = (PreferenceScreen) m.invoke(manager, intent, screen); + return prefScreen; + } catch (Exception e) { + Log.w(TAG, "Couldn't call PreferenceManager.inflateFromIntent by reflection", e); + } + return null; + } - /** - * Inflates a preference hierarchy from XML. If a preference hierarchy is - * given, the new preference hierarchies will be merged in. - * - * @param context The context of the resource. - * @param resId The resource ID of the XML to inflate. - * @param rootPreferences Optional existing hierarchy to merge the new - * hierarchies into. - * @return The root hierarchy (if one was not provided, the new hierarchy's - * root). - * @hide - */ - static PreferenceScreen inflateFromResource(PreferenceManager manager, Activity activity, int resId, PreferenceScreen screen) { - try { - Method m = PreferenceManager.class.getDeclaredMethod("inflateFromResource", Context.class, int.class, PreferenceScreen.class); - m.setAccessible(true); - PreferenceScreen prefScreen = (PreferenceScreen) m.invoke(manager, activity, resId, screen); - return prefScreen; - } catch (Exception e) { - Log.w(TAG, "Couldn't call PreferenceManager.inflateFromResource by reflection", e); - } - return null; + /** + * Inflates a preference hierarchy from XML. If a preference hierarchy is given, the new + * preference hierarchies will be merged in. + * + * @param context The context of the resource. + * @param resId The resource ID of the XML to inflate. + * @param rootPreferences Optional existing hierarchy to merge the new hierarchies into. + * + * @return The root hierarchy (if one was not provided, the new hierarchy's root). + * + * @hide + */ + static PreferenceScreen inflateFromResource(PreferenceManager manager, Activity activity, int resId, PreferenceScreen screen) { + try { + Method m = PreferenceManager.class.getDeclaredMethod("inflateFromResource", Context.class, int.class, PreferenceScreen.class); + m.setAccessible(true); + PreferenceScreen prefScreen = (PreferenceScreen) m.invoke(manager, activity, resId, screen); + return prefScreen; + } catch (Exception e) { + Log.w(TAG, "Couldn't call PreferenceManager.inflateFromResource by reflection", e); } + return null; + } - /** - * Returns the root of the preference hierarchy managed by this class. - * - * @return The {@link PreferenceScreen} object that is at the root of the hierarchy. - */ - static PreferenceScreen getPreferenceScreen(PreferenceManager manager) { - try { - Method m = PreferenceManager.class.getDeclaredMethod("getPreferenceScreen"); - m.setAccessible(true); - return (PreferenceScreen) m.invoke(manager); - } catch (Exception e) { - Log.w(TAG, "Couldn't call PreferenceManager.getPreferenceScreen by reflection", e); - } - return null; + /** + * Returns the root of the preference hierarchy managed by this class. + * + * @return The {@link PreferenceScreen} object that is at the root of the hierarchy. + */ + static PreferenceScreen getPreferenceScreen(PreferenceManager manager) { + try { + Method m = PreferenceManager.class.getDeclaredMethod("getPreferenceScreen"); + m.setAccessible(true); + return (PreferenceScreen) m.invoke(manager); + } catch (Exception e) { + Log.w(TAG, "Couldn't call PreferenceManager.getPreferenceScreen by reflection", e); } + return null; + } - /** - * Called by the {@link PreferenceManager} to dispatch a subactivity result. - */ - static void dispatchActivityResult(PreferenceManager manager, int requestCode, int resultCode, Intent data) { - try { - Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityResult", int.class, int.class, Intent.class); - m.setAccessible(true); - m.invoke(manager, requestCode, resultCode, data); - } catch (Exception e) { - Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityResult by reflection", e); - } + /** + * Called by the {@link PreferenceManager} to dispatch a subactivity result. + */ + static void dispatchActivityResult(PreferenceManager manager, int requestCode, int resultCode, Intent data) { + try { + Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityResult", int.class, int.class, Intent.class); + m.setAccessible(true); + m.invoke(manager, requestCode, resultCode, data); + } catch (Exception e) { + Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityResult by reflection", e); } + } - /** - * Called by the {@link PreferenceManager} to dispatch the activity stop - * event. - */ - static void dispatchActivityStop(PreferenceManager manager) { - try { - Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityStop"); - m.setAccessible(true); - m.invoke(manager); - } catch (Exception e) { - Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityStop by reflection", e); - } + /** + * Called by the {@link PreferenceManager} to dispatch the activity stop event. + */ + static void dispatchActivityStop(PreferenceManager manager) { + try { + Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityStop"); + m.setAccessible(true); + m.invoke(manager); + } catch (Exception e) { + Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityStop by reflection", e); } + } - /** - * Called by the {@link PreferenceManager} to dispatch the activity destroy - * event. - */ - static void dispatchActivityDestroy(PreferenceManager manager) { - try { - Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityDestroy"); - m.setAccessible(true); - m.invoke(manager); - } catch (Exception e) { - Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityDestroy by reflection", e); - } + /** + * Called by the {@link PreferenceManager} to dispatch the activity destroy event. + */ + static void dispatchActivityDestroy(PreferenceManager manager) { + try { + Method m = PreferenceManager.class.getDeclaredMethod("dispatchActivityDestroy"); + m.setAccessible(true); + m.invoke(manager); + } catch (Exception e) { + Log.w(TAG, "Couldn't call PreferenceManager.dispatchActivityDestroy by reflection", e); } + } - /** - * Sets the root of the preference hierarchy. - * - * @param preferenceScreen The root {@link PreferenceScreen} of the preference hierarchy. - * @return Whether the {@link PreferenceScreen} given is different than the previous. - */ - static boolean setPreferences(PreferenceManager manager, PreferenceScreen screen) { - try { - Method m = PreferenceManager.class.getDeclaredMethod("setPreferences", PreferenceScreen.class); - m.setAccessible(true); - return ((Boolean) m.invoke(manager, screen)); - } catch (Exception e) { - Log.w(TAG, "Couldn't call PreferenceManager.setPreferences by reflection", e); - } - return false; + /** + * Sets the root of the preference hierarchy. + * + * @param preferenceScreen The root {@link PreferenceScreen} of the preference hierarchy. + * + * @return Whether the {@link PreferenceScreen} given is different than the previous. + */ + static boolean setPreferences(PreferenceManager manager, PreferenceScreen screen) { + try { + Method m = PreferenceManager.class.getDeclaredMethod("setPreferences", PreferenceScreen.class); + m.setAccessible(true); + return ((Boolean) m.invoke(manager, screen)); + } catch (Exception e) { + Log.w(TAG, "Couldn't call PreferenceManager.setPreferences by reflection", e); } + return false; + } }
--- a/mobile/android/base/db/TabsProvider.java +++ b/mobile/android/base/db/TabsProvider.java @@ -209,16 +209,17 @@ public class TabsProvider extends PerPro return Clients.CONTENT_ITEM_TYPE; } debug("URI has unrecognized type: " + uri); return null; } + @Override @SuppressWarnings("fallthrough") public int deleteInTransaction(Uri uri, String selection, String[] selectionArgs) { trace("Calling delete in transaction on URI: " + uri); final int match = URI_MATCHER.match(uri); int deleted = 0; switch (match) { @@ -250,16 +251,17 @@ public class TabsProvider extends PerPro throw new UnsupportedOperationException("Unknown delete URI " + uri); } debug("Deleted " + deleted + " rows for URI: " + uri); return deleted; } + @Override public Uri insertInTransaction(Uri uri, ContentValues values) { trace("Calling insert in transaction on URI: " + uri); final SQLiteDatabase db = getWritableDatabase(uri); int match = URI_MATCHER.match(uri); long id = -1; switch (match) { @@ -282,16 +284,17 @@ public class TabsProvider extends PerPro debug("Inserted ID in database: " + id); if (id >= 0) return ContentUris.withAppendedId(uri, id); return null; } + @Override public int updateInTransaction(Uri uri, ContentValues values, String selection, String[] selectionArgs) { trace("Calling update in transaction on URI: " + uri); int match = URI_MATCHER.match(uri); int updated = 0; switch (match) { case CLIENTS_ID:
--- a/mobile/android/base/db/TopSitesCursorWrapper.java +++ b/mobile/android/base/db/TopSitesCursorWrapper.java @@ -471,16 +471,17 @@ public class TopSitesCursorWrapper imple throw new UnsupportedOperationException(); } @Override public boolean getWantsAllOnMoveCalls() { return false; } + @Override public Uri getNotificationUri() { // There's no single notification URI for the wrapper return null; } @Override public void setNotificationUri(ContentResolver cr, Uri uri) { // Keep the original notification URI for the
--- a/mobile/android/base/favicons/cache/FaviconCacheElement.java +++ b/mobile/android/base/favicons/cache/FaviconCacheElement.java @@ -79,17 +79,19 @@ public class FaviconCacheElement impleme if (invalidated) { return 0; } final int w1 = imageSize; final int w2 = another.imageSize; if (w1 > w2) { return 1; - } else if (w2 > w1) { + } + + if (w2 > w1) { return -1; } return 0; } /** * Called when this element is evicted from the cache. *
--- a/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java +++ b/mobile/android/base/fxa/activities/FxAccountAbstractSetupActivity.java @@ -374,17 +374,17 @@ abstract public class FxAccountAbstractS for (Account account : accounts) { if (!Patterns.EMAIL_ADDRESS.matcher(account.name).matches()) { continue; } emails.add(account.name); } // And then sorted in alphabetical order. - final String[] sortedEmails = emails.toArray(new String[0]); + final String[] sortedEmails = emails.toArray(new String[emails.size()]); Arrays.sort(sortedEmails); final ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, sortedEmails); emailEdit.setAdapter(adapter); } @Override protected void onCreate(Bundle savedInstanceState) {
--- a/mobile/android/base/fxa/activities/FxAccountCreateAccountActivity.java +++ b/mobile/android/base/fxa/activities/FxAccountCreateAccountActivity.java @@ -171,17 +171,17 @@ public class FxAccountCreateAccountActiv */ protected String[] getYearItems() { int year = Calendar.getInstance().get(Calendar.YEAR); LinkedList<String> years = new LinkedList<String>(); years.add(getResources().getString(R.string.fxaccount_create_account_1990_or_earlier)); for (int i = 1991; i <= year - 5; i++) { years.add(Integer.toString(i)); } - return years.toArray(new String[0]); + return years.toArray(new String[years.size()]); } protected void createYearEdit() { yearItems = getYearItems(); yearEdit.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) {
--- a/mobile/android/base/fxa/activities/FxAccountStatusActivity.java +++ b/mobile/android/base/fxa/activities/FxAccountStatusActivity.java @@ -166,17 +166,19 @@ public class FxAccountStatusActivity ext } @Override public boolean onOptionsItemSelected(MenuItem item) { int itemId = item.getItemId(); if (itemId == android.R.id.home) { finish(); return true; - } else if (itemId == R.id.remove_account) { + } + + if (itemId == R.id.remove_account) { maybeDeleteAndroidAccount(FirefoxAccounts.getFirefoxAccount(this)); return true; } return super.onOptionsItemSelected(item); } @Override
--- a/mobile/android/base/fxa/authenticator/AccountPickler.java +++ b/mobile/android/base/fxa/authenticator/AccountPickler.java @@ -77,18 +77,18 @@ public class AccountPickler { * @return <code>true</code> if given pickle existed and was successfully deleted. */ public static boolean deletePickle(final Context context, final String filename) { return context.deleteFile(filename); } public static ExtendedJSONObject toJSON(final AndroidFxAccount account, final long now) { final ExtendedJSONObject o = new ExtendedJSONObject(); - o.put(KEY_PICKLE_VERSION, Long.valueOf(PICKLE_VERSION)); - o.put(KEY_PICKLE_TIMESTAMP, Long.valueOf(now)); + o.put(KEY_PICKLE_VERSION, PICKLE_VERSION); + o.put(KEY_PICKLE_TIMESTAMP, now); o.put(KEY_ACCOUNT_VERSION, AndroidFxAccount.CURRENT_ACCOUNT_VERSION); o.put(KEY_ACCOUNT_TYPE, FxAccountConstants.ACCOUNT_TYPE); o.put(KEY_EMAIL, account.getEmail()); o.put(KEY_PROFILE, account.getProfile()); o.put(KEY_IDP_SERVER_URI, account.getAccountServerURI()); o.put(KEY_TOKEN_SERVER_URI, account.getTokenServerURI()); o.put(KEY_IS_SYNCING_ENABLED, account.isSyncing()); @@ -183,17 +183,17 @@ public class AccountPickler { if (account == null) { Logger.warn(LOG_TAG, "Failed to add Android Account; aborting."); return null; } Long timestamp = json.getLong(KEY_PICKLE_TIMESTAMP); if (timestamp == null) { Logger.warn(LOG_TAG, "Did not find timestamp in pickle file; ignoring."); - timestamp = Long.valueOf(-1); + timestamp = -1L; } Logger.info(LOG_TAG, "Un-pickled Android account named " + params.email + " (version " + params.pickleVersion + ", pickled at " + timestamp + ")."); return account; }
--- a/mobile/android/base/fxa/authenticator/AndroidFxAccount.java +++ b/mobile/android/base/fxa/authenticator/AndroidFxAccount.java @@ -58,18 +58,17 @@ public class AndroidFxAccount { public static final String ACCOUNT_KEY_TOKEN_SERVER = "tokenServerURI"; // Sync-specific. public static final String ACCOUNT_KEY_DESCRIPTOR = "descriptor"; public static final int CURRENT_BUNDLE_VERSION = 2; public static final String BUNDLE_KEY_BUNDLE_VERSION = "version"; public static final String BUNDLE_KEY_STATE_LABEL = "stateLabel"; public static final String BUNDLE_KEY_STATE = "state"; - protected static final List<String> ANDROID_AUTHORITIES = Collections.unmodifiableList(Arrays.asList( - new String[] { BrowserContract.AUTHORITY })); + protected static final List<String> ANDROID_AUTHORITIES = Collections.unmodifiableList(Arrays.asList(BrowserContract.AUTHORITY)); protected final Context context; protected final AccountManager accountManager; protected final Account account; /** * Create an Android Firefox Account instance backed by an Android Account * instance. @@ -165,17 +164,17 @@ public class AndroidFxAccount { ExtendedJSONObject o = unbundle(); if (o == null) { return def; } Boolean b = o.getBoolean(key); if (b == null) { return def; } - return b.booleanValue(); + return b; } protected byte[] getBundleDataBytes(String key) { ExtendedJSONObject o = unbundle(); if (o == null) { return null; } return o.getByteArrayHex(key);
--- a/mobile/android/base/gfx/BitmapUtils.java +++ b/mobile/android/base/gfx/BitmapUtils.java @@ -139,16 +139,17 @@ public final class BitmapUtils { runOnBitmapFoundOnUiThread(loader, null); } public static void getThumbnailDrawable(final Context context, final String data, final BitmapLoader loader) { int id = Integer.parseInt(data.substring(10), 10); final Tab tab = Tabs.getInstance().getTab(id); runOnBitmapFoundOnUiThread(loader, tab.getThumbnail()); Tabs.registerOnTabsChangedListener(new Tabs.OnTabsChangedListener() { + @Override public void onTabChanged(Tab t, Tabs.TabEvents msg, Object data) { if (tab == t && msg == Tabs.TabEvents.THUMBNAIL) { Tabs.unregisterOnTabsChangedListener(this); runOnBitmapFoundOnUiThread(loader, t.getThumbnail()); } } }); ThumbnailHelper.getInstance().getAndProcessThumbnailFor(tab);
--- a/mobile/android/base/gfx/NativePanZoomController.java +++ b/mobile/android/base/gfx/NativePanZoomController.java @@ -27,68 +27,82 @@ class NativePanZoomController implements mDispatcher = dispatcher; if (GeckoThread.checkLaunchState(GeckoThread.LaunchState.GeckoRunning)) { init(); } else { mDispatcher.registerGeckoThreadListener(this, "Gecko:Ready"); } } + @Override public void handleMessage(String event, JSONObject message) { if ("Gecko:Ready".equals(event)) { mDispatcher.unregisterGeckoThreadListener(this, "Gecko:Ready"); init(); } } + @Override public boolean onTouchEvent(MotionEvent event) { GeckoEvent wrapped = GeckoEvent.createMotionEvent(event, true); return handleTouchEvent(wrapped); } + @Override public boolean onMotionEvent(MotionEvent event) { // FIXME implement this return false; } + @Override public boolean onKeyEvent(KeyEvent event) { // FIXME implement this return false; } + @Override public PointF getVelocityVector() { // FIXME implement this return new PointF(0, 0); } + @Override public void pageRectUpdated() { // no-op in APZC, I think } + @Override public void abortPanning() { // no-op in APZC, I think } + @Override public void notifyDefaultActionPrevented(boolean prevented) { // This should never get called; there is a different // codepath that notifies the APZ code of this. throw new IllegalStateException("APZCCallbackHandler::NotifyDefaultPrevented should be getting called, not this!"); } + @Override public native void abortAnimation(); private native void init(); private native boolean handleTouchEvent(GeckoEvent event); private native void handleMotionEvent(GeckoEvent event); + @Override public native void destroy(); + @Override public native boolean getRedrawHint(); + @Override public native void setOverScrollMode(int overscrollMode); + @Override public native int getOverScrollMode(); @WrapElementForJNI(allowMultithread = true, stubName = "RequestContentRepaintWrapper") private void requestContentRepaint(float x, float y, float width, float height, float resolution) { mTarget.forceRedraw(new DisplayPortMetrics(x, y, x + width, y + height, resolution)); } + @Override public void setOverscrollHandler(final Overscroll listener) { } }
--- a/mobile/android/base/gfx/OverscrollEdgeEffect.java +++ b/mobile/android/base/gfx/OverscrollEdgeEffect.java @@ -29,16 +29,17 @@ public class OverscrollEdgeEffect implem public OverscrollEdgeEffect(final View v) { mView = v; Context context = v.getContext(); for (int i = 0; i < 4; i++) { mEdges[i] = new EdgeEffect(context); } } + @Override public void setSize(final int width, final int height) { mEdges[LEFT].setSize(height, width); mEdges[RIGHT].setSize(height, width); mEdges[TOP].setSize(width, height); mEdges[BOTTOM].setSize(width, height); } private EdgeEffect getEdgeForAxisAndSide(final Axis axis, final float side) { @@ -60,41 +61,44 @@ public class OverscrollEdgeEffect implem private void invalidate() { if (Versions.feature16Plus) { mView.postInvalidateOnAnimation(); } else { mView.postInvalidateDelayed(10); } } + @Override public void setVelocity(final float velocity, final Axis axis) { final EdgeEffect edge = getEdgeForAxisAndSide(axis, velocity); // If we're showing overscroll already, start fading it out. if (!edge.isFinished()) { edge.onRelease(); } else { // Otherwise, show an absorb effect edge.onAbsorb((int)velocity); } invalidate(); } + @Override public void setDistance(final float distance, final Axis axis) { // The first overscroll event often has zero distance. Throw it out if (distance == 0.0f) { return; } final EdgeEffect edge = getEdgeForAxisAndSide(axis, (int)distance); edge.onPull(distance / (axis == Axis.X ? mView.getWidth() : mView.getHeight())); invalidate(); } + @Override public void draw(final Canvas canvas, final ImmutableViewportMetrics metrics) { if (metrics == null) { return; } // If we're pulling an edge, or fading it out, draw! boolean invalidate = false; if (!mEdges[TOP].isFinished()) {
--- a/mobile/android/base/health/BrowserHealthRecorder.java +++ b/mobile/android/base/health/BrowserHealthRecorder.java @@ -96,26 +96,29 @@ public class BrowserHealthRecorder imple private final ConfigurationProvider configProvider; private final SharedPreferences prefs; // We track previousSession to avoid order-of-initialization confusion. We // accept it in the constructor, and process it after init. private final SessionInformation previousSession; private volatile SessionInformation session; + @Override public void setCurrentSession(SessionInformation session) { this.session = session; } + @Override public void recordGeckoStartupTime(long duration) { if (this.session == null) { return; } this.session.setTimedGeckoStartup(duration); } + @Override public void recordJavaStartupTime(long duration) { if (this.session == null) { return; } this.session.setTimedJavaStartup(duration); } /** @@ -159,24 +162,26 @@ public class BrowserHealthRecorder imple Log.e(LOG_TAG, "Exception initializing.", e); } this.configProvider = new AndroidConfigurationProvider(context); this.prefs = appPrefs; } + @Override public boolean isEnabled() { return true; } /** * Shut down database connections, unregister event listeners, and perform * provider-specific uninitialization. */ + @Override public synchronized void close() { switch (this.state) { case CLOSED: Log.w(LOG_TAG, "Ignoring attempt to double-close closed BrowserHealthRecorder."); return; case INITIALIZED: Log.i(LOG_TAG, "Closing Health Report client."); break; @@ -203,31 +208,34 @@ public class BrowserHealthRecorder imple EVENT_SNAPSHOT, EVENT_ADDONS_CHANGE, EVENT_ADDONS_UNINSTALLING, EVENT_PREF_CHANGE, EVENT_KEYWORD_SEARCH, EVENT_SEARCH); } + @Override public void onAppLocaleChanged(String to) { Log.d(LOG_TAG, "Setting health recorder app locale to " + to); this.profileCache.beginInitialization(); this.profileCache.setAppLocale(to); } + @Override public void onAddonChanged(String id, JSONObject json) { this.profileCache.beginInitialization(); try { this.profileCache.updateJSONForAddon(id, json); } catch (IllegalStateException e) { Log.w(LOG_TAG, "Attempted to update add-on cache prior to full init.", e); } } + @Override public void onAddonUninstalling(String id) { this.profileCache.beginInitialization(); try { this.profileCache.removeAddon(id); } catch (IllegalStateException e) { Log.w(LOG_TAG, "Attempted to update add-on cache prior to full init.", e); } } @@ -238,25 +246,27 @@ public class BrowserHealthRecorder imple * for use in future events. * * Invoke this method after calls that mutate the environment. * * If this change resulted in a transition between two environments, {@link * #onEnvironmentTransition(int, int, boolean, String)} will be invoked on the background * thread. */ + @Override public synchronized void onEnvironmentChanged() { onEnvironmentChanged(true, "E"); } /** * If `startNewSession` is false, it means no new session should begin * (e.g., because we're about to restart, and we don't want to create * an orphan). */ + @Override public synchronized void onEnvironmentChanged(final boolean startNewSession, final String sessionEndReason) { final int previousEnv = this.env; this.env = -1; try { profileCache.completeInitialization(); } catch (java.io.IOException e) { Log.e(LOG_TAG, "Error completing profile cache initialization.", e); this.state = State.INITIALIZATION_FAILED; @@ -680,16 +690,17 @@ public class BrowserHealthRecorder imple } /** * Record a search. * * @param engineID the string identifier for the engine. Can be <code>null</code>. * @param location one of a fixed set of locations: see {@link #SEARCH_LOCATIONS}. */ + @Override public void recordSearch(final String engineID, final String location) { if (this.state != State.INITIALIZED) { Log.d(LOG_TAG, "Not initialized: not recording search. (" + this.state + ")"); return; } final int env = this.env; @@ -819,16 +830,17 @@ public class BrowserHealthRecorder imple final int day = storage.getDay(session.wallStartTime); storage.recordDailyDiscrete(environment, day, sessionField, value); Log.v(LOG_TAG, "Recorded session entry for env " + environment + ", current is " + env); } catch (Exception e) { Log.w(LOG_TAG, "Unable to record session completion.", e); } } + @Override public void checkForOrphanSessions() { if (!this.orphanChecked.compareAndSet(false, true)) { Log.w(LOG_TAG, "Attempting to check for orphan sessions more than once."); return; } Log.d(LOG_TAG, "Checking for orphan session."); if (this.previousSession == null) { @@ -849,26 +861,28 @@ public class BrowserHealthRecorder imple this.previousSession.getCrashedJSON()); } catch (Exception e) { Log.w(LOG_TAG, "Unable to generate session JSON.", e); // Future: record this exception in FHR's own error submitter. } } + @Override public void recordSessionEnd(String reason, SharedPreferences.Editor editor) { recordSessionEnd(reason, editor, env); } /** * Record that the current session ended. Does not commit the provided editor. * * @param environment An environment ID. This allows callers to record the * end of a session due to an observed environment change. */ + @Override public void recordSessionEnd(String reason, SharedPreferences.Editor editor, final int environment) { Log.d(LOG_TAG, "Recording session end: " + reason); if (state != State.INITIALIZED) { // Something has gone awry. Log.e(LOG_TAG, "Attempted to record session end without initialized recorder."); return; }
--- a/mobile/android/base/health/StubbedHealthRecorder.java +++ b/mobile/android/base/health/StubbedHealthRecorder.java @@ -9,30 +9,44 @@ import android.content.SharedPreferences import org.json.JSONObject; /** * StubbedHealthRecorder is an implementation of HealthRecorder that does (you guessed it!) * nothing. */ public class StubbedHealthRecorder implements HealthRecorder { + @Override public boolean isEnabled() { return false; } + @Override public void setCurrentSession(SessionInformation session) { } + @Override public void checkForOrphanSessions() { } + @Override public void recordGeckoStartupTime(long duration) { } + @Override public void recordJavaStartupTime(long duration) { } + @Override public void recordSearch(final String engineID, final String location) { } + @Override public void recordSessionEnd(String reason, SharedPreferences.Editor editor) { } + @Override public void recordSessionEnd(String reason, SharedPreferences.Editor editor, final int environment) { } + @Override public void onAppLocaleChanged(String to) { } + @Override public void onAddonChanged(String id, JSONObject json) { } + @Override public void onAddonUninstalling(String id) { } + @Override public void onEnvironmentChanged() { } + @Override public void onEnvironmentChanged(final boolean startNewSession, final String sessionEndReason) { } + @Override public void close() { } @Override public void processDelayed() { } }
--- a/mobile/android/base/home/BookmarksListAdapter.java +++ b/mobile/android/base/home/BookmarksListAdapter.java @@ -80,20 +80,22 @@ class BookmarksListAdapter extends Multi @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(id); dest.writeString(title); } public static final Creator<FolderInfo> CREATOR = new Creator<FolderInfo>() { + @Override public FolderInfo createFromParcel(Parcel in) { return new FolderInfo(in); } + @Override public FolderInfo[] newArray(int size) { return new FolderInfo[size]; } }; } // A listener that knows how to refresh the list for a given folder id. // This is usually implemented by the enclosing fragment/activity.
--- a/mobile/android/base/home/BrowserSearch.java +++ b/mobile/android/base/home/BrowserSearch.java @@ -817,17 +817,19 @@ public class BrowserSearch extends HomeF } @Override public int getItemViewType(int position) { final int engine = getEngineIndex(position); if (engine == -1) { return ROW_STANDARD; - } else if (engine == 0 && mSuggestionsEnabled) { + } + + if (engine == 0 && mSuggestionsEnabled) { // Give suggestion views their own type to prevent them from // sharing other recycled search engine views. Using other // recycled views for the suggestion row can break animations // (bug 815937). return ROW_SUGGEST; } return ROW_SEARCH;
--- a/mobile/android/base/home/HomeFragment.java +++ b/mobile/android/base/home/HomeFragment.java @@ -111,17 +111,17 @@ public abstract class HomeFragment exten mCanLoadHint = DEFAULT_CAN_LOAD_HINT; } mIsLoaded = false; } @Override public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) { - if (menuInfo == null || !(menuInfo instanceof HomeContextMenuInfo)) { + if (!(menuInfo instanceof HomeContextMenuInfo)) { return; } HomeContextMenuInfo info = (HomeContextMenuInfo) menuInfo; // Don't show the context menu for folders. if (info.isFolder) { return; @@ -156,17 +156,17 @@ public abstract class HomeFragment exten @Override public boolean onContextItemSelected(MenuItem item) { // onContextItemSelected() is first dispatched to the activity and // then dispatched to its fragments. Since fragments cannot "override" // menu item selection handling, it's better to avoid menu id collisions // between the activity and its fragments. ContextMenuInfo menuInfo = item.getMenuInfo(); - if (menuInfo == null || !(menuInfo instanceof HomeContextMenuInfo)) { + if (!(menuInfo instanceof HomeContextMenuInfo)) { return false; } final HomeContextMenuInfo info = (HomeContextMenuInfo) menuInfo; final Context context = getActivity(); final int itemId = item.getItemId();
--- a/mobile/android/base/home/PanelLayout.java +++ b/mobile/android/base/home/PanelLayout.java @@ -184,20 +184,22 @@ abstract class PanelLayout extends Frame return "{ index: " + mViewIndex + ", type: " + mType + ", dataset: " + mDatasetId + ", filter: " + mFilterDetail + " }"; } public static final Creator<DatasetRequest> CREATOR = new Creator<DatasetRequest>() { + @Override public DatasetRequest createFromParcel(Parcel in) { return new DatasetRequest(in); } + @Override public DatasetRequest[] newArray(int size) { return new DatasetRequest[size]; } }; } /** * Defines the contract with the component that is responsible @@ -624,20 +626,22 @@ abstract class PanelLayout extends Frame @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(filter); dest.writeString(title); } public static final Creator<FilterDetail> CREATOR = new Creator<FilterDetail>() { + @Override public FilterDetail createFromParcel(Parcel in) { return new FilterDetail(in); } + @Override public FilterDetail[] newArray(int size) { return new FilterDetail[size]; } }; } /** * Pushes filter to {@code ViewState}'s stack and makes request for new filter value.
--- a/mobile/android/base/home/RecentTabsPanel.java +++ b/mobile/android/base/home/RecentTabsPanel.java @@ -358,31 +358,33 @@ public class RecentTabsPanel extends Hom private static final int[] VIEW_TYPES = new int[] { ROW_STANDARD, ROW_HEADER, ROW_OPEN_ALL }; private static final int[] LAYOUT_TYPES = new int[] { R.layout.home_item_row, R.layout.home_header_row, R.layout.home_open_all_row }; public RecentTabsAdapter(Context context) { super(context, null, VIEW_TYPES, LAYOUT_TYPES); } + @Override public int getItemViewType(int position) { final Cursor c = getCursor(position); final int type = c.getInt(c.getColumnIndexOrThrow(RecentTabs.TYPE)); if (type == RecentTabs.TYPE_HEADER) { return ROW_HEADER; } if (type == RecentTabs.TYPE_OPEN_ALL_LAST_TIME || type == RecentTabs.TYPE_OPEN_ALL_CLOSED) { return ROW_OPEN_ALL; } return ROW_STANDARD; } + @Override public boolean isEnabled(int position) { return (getItemViewType(position) != ROW_HEADER); } @Override public void bindView(View view, Context context, int position) { final int itemType = getItemViewType(position); if (itemType == ROW_OPEN_ALL) {
--- a/mobile/android/base/home/RemoteTabsExpandableListFragment.java +++ b/mobile/android/base/home/RemoteTabsExpandableListFragment.java @@ -163,17 +163,19 @@ public class RemoteTabsExpandableListFra final int type = ExpandableListView.getPackedPositionType(packedPosition); if (type == ExpandableListView.PACKED_POSITION_TYPE_CHILD) { final int childPosition = ExpandableListView.getPackedPositionChild(packedPosition); final RemoteTab tab = (RemoteTab) adapter.getChild(groupPosition, childPosition); final HomeContextMenuInfo info = new HomeContextMenuInfo(view, position, id); info.url = tab.url; info.title = tab.title; return info; - } else if (type == ExpandableListView.PACKED_POSITION_TYPE_GROUP) { + } + + if (type == ExpandableListView.PACKED_POSITION_TYPE_GROUP) { final RemoteClient client = (RemoteClient) adapter.getGroup(groupPosition); final RemoteTabsClientContextMenuInfo info = new RemoteTabsClientContextMenuInfo(view, position, id, client); return info; } return null; } }); @@ -283,21 +285,24 @@ public class RemoteTabsExpandableListFra final RemoteTabsClientContextMenuInfo info = (RemoteTabsClientContextMenuInfo) menuInfo; final int itemId = item.getItemId(); if (itemId == R.id.home_remote_tabs_hide_client) { sState.setClientHidden(info.client.guid, true); getLoaderManager().restartLoader(LOADER_ID_REMOTE_TABS, null, mCursorLoaderCallbacks); return true; - } else if (itemId == R.id.home_remote_tabs_show_client) { + } + + if (itemId == R.id.home_remote_tabs_show_client) { sState.setClientHidden(info.client.guid, false); getLoaderManager().restartLoader(LOADER_ID_REMOTE_TABS, null, mCursorLoaderCallbacks); return true; } + return false; } private void updateUiFromClients(List<RemoteClient> clients, List<RemoteClient> hiddenClients) { // We have three states: no clients (including hidden clients) at all; // all clients hidden; some clients hidden. We want to show the empty // list view only when we have no clients at all. This flag // differentiates the first from the latter two states. @@ -353,16 +358,17 @@ public class RemoteTabsExpandableListFra final TextView emptyText = (TextView) mEmptyView.findViewById(R.id.home_empty_text); emptyText.setText(R.string.home_remote_tabs_empty); mList.setEmptyView(mEmptyView); } } + @Override public void onClients(List<RemoteClient> clients) { // The clients listed were hidden and have been checked by the user. We // interpret that as "show these clients now". for (RemoteClient client : clients) { sState.setClientHidden(client.guid, false); // There's no particular need to do this, but if you want to see it, // let's show it all. sState.setClientCollapsed(client.guid, false); @@ -438,19 +444,21 @@ public class RemoteTabsExpandableListFra return getActivity(); } @Override public Account getAccount() { return FirefoxAccounts.getFirefoxAccount(getContext()); } + @Override public void onSyncStarted() { } + @Override public void onSyncFinished() { mRefreshLayout.setRefreshing(false); } } /** * Stores information regarding the creation of the context menu for a remote client. */
--- a/mobile/android/base/home/TopSitesPanel.java +++ b/mobile/android/base/home/TopSitesPanel.java @@ -279,17 +279,17 @@ public class TopSitesPanel extends HomeF public boolean onContextItemSelected(MenuItem item) { if (super.onContextItemSelected(item)) { // HomeFragment was able to handle to selected item. return true; } ContextMenuInfo menuInfo = item.getMenuInfo(); - if (menuInfo == null || !(menuInfo instanceof TopSitesGridContextMenuInfo)) { + if (!(menuInfo instanceof TopSitesGridContextMenuInfo)) { return false; } TopSitesGridContextMenuInfo info = (TopSitesGridContextMenuInfo) menuInfo; final int itemId = item.getItemId(); if (itemId == R.id.top_sites_pin) {
--- a/mobile/android/base/locales/en-US/android_strings.dtd +++ b/mobile/android/base/locales/en-US/android_strings.dtd @@ -261,18 +261,17 @@ size. --> <!ENTITY datareporting_abouthr_title "View my Health Report"> <!ENTITY datareporting_telemetry_title "Telemetry"> <!ENTITY datareporting_telemetry_summary "Shares performance, usage, hardware and customization data about your browser with &vendorShortName; to help us make &brandShortName; better"> <!ENTITY datareporting_crashreporter_summary "&brandShortName; submits crash reports to help &vendorShortName; make your browser more stable and secure"> <!-- Localization note (datareporting_crashreporter_title_short) : This string matches (crashReporterSection.label) in en-US/chrome/browser/preferences/advanced.dtd.--> <!ENTITY datareporting_crashreporter_title_short "Crash Reporter"> <!ENTITY datareporting_wifi_title2 "&vendorShortName; Location Service"> -<!ENTITY datareporting_wifi_geolocation_summary "Receives Wi-Fi and cellular location data when running in the background and shares it with &vendorShortName; to improve our geolocation service"> - +<!ENTITY datareporting_wifi_geolocation_summary2 "Shares approximate Wi-Fi and cellular location of your device with &vendorShortName; to improve our geolocation service"> <!-- Localization note (pref_update_autodownload2) : This should mention downloading specifically, since the pref only prevents automatic downloads and not the actual notification that an update is available. --> <!ENTITY pref_update_autodownload2 "Download updates automatically"> <!ENTITY pref_update_autodownload_wifi "Only over Wi-Fi"> <!ENTITY pref_update_autodownload_never "Never"> <!ENTITY pref_update_autodownload_always "Always">
--- a/mobile/android/base/mozglue/DirectBufferAllocator.java +++ b/mobile/android/base/mozglue/DirectBufferAllocator.java @@ -19,17 +19,19 @@ public final class DirectBufferAllocator public static ByteBuffer allocate(int size) { if (size <= 0) { throw new IllegalArgumentException("Invalid size " + size); } ByteBuffer directBuffer = nativeAllocateDirectBuffer(size); if (directBuffer == null) { throw new OutOfMemoryError("allocateDirectBuffer() returned null"); - } else if (!directBuffer.isDirect()) { + } + + if (!directBuffer.isDirect()) { throw new AssertionError("allocateDirectBuffer() did not return a direct buffer"); } return directBuffer; } public static ByteBuffer free(ByteBuffer buffer) { if (buffer == null) {
--- a/mobile/android/base/overlays/service/sharemethods/AddBookmark.java +++ b/mobile/android/base/overlays/service/sharemethods/AddBookmark.java @@ -19,16 +19,17 @@ public class AddBookmark extends ShareMe ContentResolver resolver = context.getContentResolver(); LocalBrowserDB browserDB = new LocalBrowserDB(GeckoProfile.DEFAULT_PROFILE); browserDB.addBookmark(resolver, shareData.title, shareData.url); return Result.SUCCESS; } + @Override public String getSuccessMesssage() { return context.getResources().getString(R.string.bookmark_added); } // Unused. @Override public String getFailureMessage() { return null;
--- a/mobile/android/base/overlays/ui/SendTabList.java +++ b/mobile/android/base/overlays/ui/SendTabList.java @@ -143,16 +143,17 @@ public class SendTabList extends ListVie final String[] dialogElements = new String[records.length]; for (int i = 0; i < records.length; i++) { dialogElements[i] = records[i].name; } builder.setTitle(R.string.overlay_share_select_device) .setItems(dialogElements, new DialogInterface.OnClickListener() { + @Override public void onClick(DialogInterface dialog, int index) { listener.onSendTabTargetSelected(records[index].guid); } }); return builder.create(); }
--- a/mobile/android/base/preferences/GeckoPreferences.java +++ b/mobile/android/base/preferences/GeckoPreferences.java @@ -435,16 +435,17 @@ OnSharedPreferenceChangeListener } } // Build fragment intent. intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT, GeckoPreferenceFragment.class.getName()); intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); } + @Override public boolean isValidFragment(String fragmentName) { return GeckoPreferenceFragment.class.getName().equals(fragmentName); } @Override public void onBuildHeaders(List<Header> target) { if (onIsMultiPane()) { loadHeadersFromResource(R.xml.preference_headers, target); @@ -1283,16 +1284,17 @@ OnSharedPreferenceChangeListener final Preference pref = getField(prefName); final CheckBoxPrefSetter prefSetter; if (Versions.preICS) { prefSetter = new CheckBoxPrefSetter(); } else { prefSetter = new TwoStatePrefSetter(); } ThreadUtils.postToUiThread(new Runnable() { + @Override public void run() { prefSetter.setBooleanPref(pref, value); } }); } @Override public void prefValue(String prefName, final String value) {
--- a/mobile/android/base/preferences/ListCheckboxPreference.java +++ b/mobile/android/base/preferences/ListCheckboxPreference.java @@ -31,17 +31,17 @@ class ListCheckboxPreference extends Mul return checked; } @Override protected void onBindView(View view) { super.onBindView(view); View checkboxView = view.findViewById(R.id.checkbox); - if (checkboxView != null && checkboxView instanceof Checkable) { + if (checkboxView instanceof Checkable) { ((Checkable) checkboxView).setChecked(checked); } } @Override public void setChecked(boolean checked) { boolean changed = checked != this.checked; this.checked = checked;
--- a/mobile/android/base/preferences/MultiChoicePreference.java +++ b/mobile/android/base/preferences/MultiChoicePreference.java @@ -187,20 +187,20 @@ class MultiChoicePreference extends Dial // have been set before the dialog was closed. return; } if (!positiveResult) { // user cancelled; reset checkbox values to their previous state mValues = mPrevValues.clone(); return; - } else { - mPrevValues = mValues.clone(); } + mPrevValues = mValues.clone(); + if (!callChangeListener(getValues())) { return; } persist(); } /* Persists the current data stored by this pref to SharedPreferences. */
--- a/mobile/android/base/prompts/IconGridInput.java +++ b/mobile/android/base/prompts/IconGridInput.java @@ -154,16 +154,17 @@ public class IconGridInput extends Promp public IconGridItem(final Context context, final JSONObject obj) { label = obj.optString("name"); final String iconUrl = obj.optString("iconUri"); description = obj.optString("description"); selected = obj.optBoolean("selected"); BitmapUtils.getDrawable(context, iconUrl, new BitmapUtils.BitmapLoader() { + @Override public void onBitmapFound(Drawable d) { icon = d; if (mAdapter != null) { mAdapter.notifyDataSetChanged(); } } }); }
--- a/mobile/android/base/prompts/PromptInput.java +++ b/mobile/android/base/prompts/PromptInput.java @@ -57,16 +57,17 @@ public class PromptInput { public static final String INPUT_TYPE = "textbox"; public EditInput(JSONObject object) { super(object); mHint = object.optString("hint"); mAutofocus = object.optBoolean("autofocus"); } + @Override public View getView(final Context context) throws UnsupportedOperationException { EditText input = new FloatingHintEditText(context); input.setInputType(InputType.TYPE_CLASS_TEXT); input.setText(mValue); if (!TextUtils.isEmpty(mHint)) { input.setHint(mHint); } @@ -95,31 +96,33 @@ public class PromptInput { } public static class NumberInput extends EditInput { public static final String INPUT_TYPE = "number"; public NumberInput(JSONObject obj) { super(obj); } + @Override public View getView(final Context context) throws UnsupportedOperationException { EditText input = (EditText) super.getView(context); input.setRawInputType(Configuration.KEYBOARD_12KEY); input.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED); return input; } } public static class PasswordInput extends EditInput { public static final String INPUT_TYPE = "password"; public PasswordInput(JSONObject obj) { super(obj); } + @Override public View getView(Context context) throws UnsupportedOperationException { EditText input = (EditText) super.getView(context); input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS); return input; } @@ -134,16 +137,17 @@ public class PromptInput { public static final String INPUT_TYPE = "checkbox"; private final boolean mChecked; public CheckboxInput(JSONObject obj) { super(obj); mChecked = obj.optBoolean("checked"); } + @Override public View getView(Context context) throws UnsupportedOperationException { CheckBox checkbox = new CheckBox(context); checkbox.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); checkbox.setText(mLabel); checkbox.setChecked(mChecked); mView = (View)checkbox; return mView; } @@ -164,16 +168,17 @@ public class PromptInput { "datetime", "month" }; public DateTimeInput(JSONObject obj) { super(obj); } + @Override public View getView(Context context) throws UnsupportedOperationException { if (mType.equals("date")) { try { DateTimePicker input = new DateTimePicker(context, "yyyy-MM-dd", mValue, DateTimePicker.PickersState.DATE); input.toggleCalendar(true); mView = (View)input; } catch (UnsupportedOperationException ex) { @@ -272,16 +277,17 @@ public class PromptInput { public AllCapsTextView textView; public MenulistInput(JSONObject obj) { super(obj); mListitems = Prompt.getStringArray(obj, "values"); mSelected = obj.optInt("selected"); } + @Override public View getView(final Context context) throws UnsupportedOperationException { if (Versions.preHC) { spinner = new Spinner(context); } else { spinner = new Spinner(context, Spinner.MODE_DIALOG); } try { if (mListitems.length > 0) { @@ -316,16 +322,17 @@ public class PromptInput { } public static class LabelInput extends PromptInput { public static final String INPUT_TYPE = "label"; public LabelInput(JSONObject obj) { super(obj); } + @Override public View getView(Context context) throws UnsupportedOperationException { // not really an input, but a way to add labels and such to the dialog TextView view = new TextView(context); view.setText(Html.fromHtml(mLabel)); mView = view; return mView; } } @@ -335,41 +342,45 @@ public class PromptInput { mType = obj.optString("type"); String id = obj.optString("id"); mId = TextUtils.isEmpty(id) ? mType : id; mValue = obj.optString("value"); } public static PromptInput getInput(JSONObject obj) { String type = obj.optString("type"); - if (EditInput.INPUT_TYPE.equals(type)) { - return new EditInput(obj); - } else if (NumberInput.INPUT_TYPE.equals(type)) { - return new NumberInput(obj); - } else if (PasswordInput.INPUT_TYPE.equals(type)) { - return new PasswordInput(obj); - } else if (CheckboxInput.INPUT_TYPE.equals(type)) { - return new CheckboxInput(obj); - } else if (MenulistInput.INPUT_TYPE.equals(type)) { - return new MenulistInput(obj); - } else if (LabelInput.INPUT_TYPE.equals(type)) { - return new LabelInput(obj); - } else if (IconGridInput.INPUT_TYPE.equals(type)) { - return new IconGridInput(obj); - } else if (ColorPickerInput.INPUT_TYPE.equals(type)) { - return new ColorPickerInput(obj); - } else if (TabInput.INPUT_TYPE.equals(type)) { - return new TabInput(obj); - } else { - for (String dtType : DateTimeInput.INPUT_TYPES) { - if (dtType.equals(type)) { - return new DateTimeInput(obj); + switch (type) { + case EditInput.INPUT_TYPE: + return new EditInput(obj); + case NumberInput.INPUT_TYPE: + return new NumberInput(obj); + case PasswordInput.INPUT_TYPE: + return new PasswordInput(obj); + case CheckboxInput.INPUT_TYPE: + return new CheckboxInput(obj); + case MenulistInput.INPUT_TYPE: + return new MenulistInput(obj); + case LabelInput.INPUT_TYPE: + return new LabelInput(obj); + case IconGridInput.INPUT_TYPE: + return new IconGridInput(obj); + case ColorPickerInput.INPUT_TYPE: + return new ColorPickerInput(obj); + case TabInput.INPUT_TYPE: + return new TabInput(obj); + default: + for (String dtType : DateTimeInput.INPUT_TYPES) { + if (dtType.equals(type)) { + return new DateTimeInput(obj); + } } - } + + break; } + return null; } public View getView(Context context) throws UnsupportedOperationException { return null; } public String getId() {
--- a/mobile/android/base/prompts/PromptService.java +++ b/mobile/android/base/prompts/PromptService.java @@ -50,16 +50,17 @@ public class PromptService implements Ge @Override public void handleMessage(String event, final JSONObject message) { // The dialog must be created on the UI thread. ThreadUtils.postToUiThread(new Runnable() { @Override public void run() { Prompt p; p = new Prompt(mContext, new Prompt.PromptCallback() { + @Override public void onPromptFinished(String jsonResult) { try { EventDispatcher.sendResponse(message, new JSONObject(jsonResult)); } catch(JSONException ex) { Log.i(LOGTAG, "Error building json response", ex); } } });
--- a/mobile/android/base/strings.xml.in +++ b/mobile/android/base/strings.xml.in @@ -256,17 +256,17 @@ <string name="datareporting_telemetry_title">&datareporting_telemetry_title;</string> <string name="datareporting_telemetry_summary">&datareporting_telemetry_summary;</string> <string name="datareporting_fhr_title">&datareporting_fhr_title;</string> <string name="datareporting_fhr_summary2">&datareporting_fhr_summary2;</string> <string name="datareporting_abouthr_title">&datareporting_abouthr_title;</string> <string name="datareporting_crashreporter_title_short">&datareporting_crashreporter_title_short;</string> <string name="datareporting_crashreporter_summary">&datareporting_crashreporter_summary;</string> <string name="datareporting_wifi_title">&datareporting_wifi_title2;</string> - <string name="datareporting_wifi_geolocation_summary">&datareporting_wifi_geolocation_summary;</string> + <string name="datareporting_wifi_geolocation_summary">&datareporting_wifi_geolocation_summary2;</string> <string name="go">&go;</string> <string name="search">&search;</string> <string name="reload">&reload;</string> <string name="forward">&forward;</string> <string name="menu">&menu;</string> <string name="back">&back;</string> <string name="stop">&stop;</string>
--- a/mobile/android/base/sync/CredentialException.java +++ b/mobile/android/base/sync/CredentialException.java @@ -16,16 +16,17 @@ public abstract class CredentialExceptio public CredentialException() { super(); } public CredentialException(final Throwable e) { super(e); } + @Override public void updateStats(GlobalSession globalSession, SyncResult syncResult) { syncResult.stats.numAuthExceptions += 1; } /** * No credentials at all. */ public static class MissingAllCredentialsException extends CredentialException {
--- a/mobile/android/base/sync/CryptoRecord.java +++ b/mobile/android/base/sync/CryptoRecord.java @@ -148,17 +148,17 @@ public class CryptoRecord extends Record CryptoRecord record = new CryptoRecord(payload); record.guid = id; record.collection = collection; if (jsonRecord.containsKey(KEY_MODIFIED)) { Long timestamp = jsonRecord.getTimestamp(KEY_MODIFIED); if (timestamp == null) { throw new RecordParseException("timestamp could not be parsed"); } - record.lastModified = timestamp.longValue(); + record.lastModified = timestamp; } if (jsonRecord.containsKey(KEY_SORTINDEX)) { // getLong tries to cast to Long, and might return null. We catch all // exceptions, just to be safe. try { record.sortIndex = jsonRecord.getLong(KEY_SORTINDEX); } catch (Exception e) { throw new RecordParseException("timestamp could not be parsed");
--- a/mobile/android/base/sync/EngineSettings.java +++ b/mobile/android/base/sync/EngineSettings.java @@ -11,17 +11,17 @@ public class EngineSettings { public EngineSettings(final String syncID, final int version) { this.syncID = syncID; this.version = version; } public EngineSettings(ExtendedJSONObject object) { try { this.syncID = object.getString("syncID"); - this.version = object.getIntegerSafely("version").intValue(); + this.version = object.getIntegerSafely("version"); } catch (Exception e ) { throw new IllegalArgumentException(e); } } public ExtendedJSONObject toJSONObject() { ExtendedJSONObject json = new ExtendedJSONObject(); json.put("syncID", syncID);
--- a/mobile/android/base/sync/ExtendedJSONObject.java +++ b/mobile/android/base/sync/ExtendedJSONObject.java @@ -219,17 +219,17 @@ public class ExtendedJSONObject { Object val = this.object.get(key); if (val == null) { return null; } if (val instanceof Integer) { return (Integer) val; } if (val instanceof Long) { - return Integer.valueOf(((Long) val).intValue()); + return ((Long) val).intValue(); } if (val instanceof String) { return Integer.parseInt((String) val, 10); } throw new NumberFormatException("Expecting Integer, got " + val.getClass()); } /** @@ -238,17 +238,17 @@ public class ExtendedJSONObject { * @param key * @return A Long, or null if the value is non-numeric or doesn't exist. */ public Long getTimestamp(String key) { Object val = this.object.get(key); // This is absurd. if (val instanceof Double) { - double millis = ((Double) val).doubleValue() * 1000; + double millis = ((Double) val) * 1000; return Double.valueOf(millis).longValue(); } if (val instanceof Float) { double millis = ((Float) val).doubleValue() * 1000; return Double.valueOf(millis).longValue(); } if (val instanceof Number) { // Must be an integral number. @@ -337,17 +337,17 @@ public class ExtendedJSONObject { if (this.object == null) { return getClass().hashCode(); } return this.object.hashCode() ^ getClass().hashCode(); } @Override public boolean equals(Object o) { - if (o == null || !(o instanceof ExtendedJSONObject)) { + if (!(o instanceof ExtendedJSONObject)) { return false; } if (o == this) { return true; } ExtendedJSONObject other = (ExtendedJSONObject) o; if (this.object == null) { return other.object == null;
--- a/mobile/android/base/sync/GlobalSession.java +++ b/mobile/android/base/sync/GlobalSession.java @@ -1009,17 +1009,17 @@ public class GlobalSession implements Ht for (String engineName : enabledEngineNames()) { EngineSettings engineSettings = null; try { GlobalSyncStage globalStage = this.getSyncStageByName(engineName); Integer version = globalStage.getStorageVersion(); if (version == null) { continue; // Don't want this stage to be included in meta/global. } - engineSettings = new EngineSettings(Utils.generateGuid(), version.intValue()); + engineSettings = new EngineSettings(Utils.generateGuid(), version); } catch (NoSuchStageException e) { // No trouble; Android Sync might not recognize this engine yet. // By default, version 0. Other clients will see the 0 version and reset/wipe accordingly. engineSettings = new EngineSettings(Utils.generateGuid(), 0); } engines.put(engineName, engineSettings.toJSONObject()); }
--- a/mobile/android/base/sync/InfoCollections.java +++ b/mobile/android/base/sync/InfoCollections.java @@ -93,11 +93,11 @@ public class InfoCollections { // No meta/global on the server? We need an update. The server fetch will fail and // then we will upload a fresh meta/global. Long serverLastModified = getTimestamp(collection); if (serverLastModified == null) { return true; } // Otherwise, we need an update if our modification time is stale. - return (serverLastModified.longValue() > lastModified); + return serverLastModified > lastModified; } }
--- a/mobile/android/base/sync/JSONRecordFetcher.java +++ b/mobile/android/base/sync/JSONRecordFetcher.java @@ -41,20 +41,22 @@ public class JSONRecordFetcher { private class JSONFetchHandler implements SyncStorageRequestDelegate { // SyncStorageRequestDelegate methods for fetching. @Override public AuthHeaderProvider getAuthHeaderProvider() { return authHeaderProvider; } + @Override public String ifUnmodifiedSince() { return null; } + @Override public void handleRequestSuccess(SyncStorageResponse response) { if (response.wasSuccessful()) { try { delegate.handleSuccess(response.jsonObjectBody()); } catch (Exception e) { handleRequestError(e); } return;
--- a/mobile/android/base/sync/MetaGlobal.java +++ b/mobile/android/base/sync/MetaGlobal.java @@ -222,17 +222,17 @@ public class MetaGlobal implements SyncS " for " + engineName + ". Recording exception."); exceptions.put(engineName, new MetaGlobalMalformedSyncIDException()); } try { Integer version = engineEntry.getIntegerSafely("version"); Logger.trace(LOG_TAG, "Engine " + engineName + " has server version " + version); if (version == null || - version.intValue() == 0) { + version == 0) { // Invalid version. Wipe the server. Logger.warn(LOG_TAG, "Malformed version " + version + " for " + engineName + ". Recording exception."); exceptions.put(engineName, new MetaGlobalMalformedVersionException()); return; } versions.put(engineName, version); } catch (NumberFormatException e) { @@ -320,20 +320,22 @@ public class MetaGlobal implements SyncS return null; } @Override public AuthHeaderProvider getAuthHeaderProvider() { return authHeaderProvider; } + @Override public String ifUnmodifiedSince() { return null; } + @Override public void handleRequestSuccess(SyncStorageResponse response) { if (this.isUploading) { this.handleUploadSuccess(response); } else { this.handleDownloadSuccess(response); } } @@ -350,20 +352,22 @@ public class MetaGlobal implements SyncS } catch (Exception e) { this.callback.handleError(e); } return; } this.callback.handleFailure(response); } + @Override public void handleRequestFailure(SyncStorageResponse response) { if (response.getStatusCode() == 404) { this.callback.handleMissing(this, response); return; } this.callback.handleFailure(response); } + @Override public void handleRequestError(Exception e) { this.callback.handleError(e); } }
--- a/mobile/android/base/sync/SyncConfiguration.java +++ b/mobile/android/base/sync/SyncConfiguration.java @@ -32,16 +32,17 @@ public class SyncConfiguration { public EditorBranch(SyncConfiguration config, String prefix) { if (!prefix.endsWith(".")) { throw new IllegalArgumentException("No trailing period in prefix."); } this.prefix = prefix; this.editor = config.getEditor(); } + @Override public void apply() { // Android <=r8 SharedPreferences.Editor does not contain apply() for overriding. this.editor.commit(); } @Override public Editor clear() { this.editor = this.editor.clear(); @@ -80,16 +81,17 @@ public class SyncConfiguration { @Override public Editor putString(String key, String value) { this.editor = this.editor.putString(prefix + key, value); return this; } // Not marking as Override, because Android <= 10 doesn't have // putStringSet. Neither can we implement it. + @Override public Editor putStringSet(String key, Set<String> value) { throw new RuntimeException("putStringSet not available."); } @Override public Editor remove(String key) { this.editor = this.editor.remove(prefix + key); return this; @@ -155,16 +157,17 @@ public class SyncConfiguration { @Override public String getString(String key, String defValue) { return config.getPrefs().getString(prefix + key, defValue); } // Not marking as Override, because Android <= 10 doesn't have // getStringSet. Neither can we implement it. + @Override public Set<String> getStringSet(String key, Set<String> defValue) { throw new RuntimeException("getStringSet not available."); } @Override public void registerOnSharedPreferenceChangeListener(OnSharedPreferenceChangeListener listener) { config.getPrefs().registerOnSharedPreferenceChangeListener(listener); } @@ -403,18 +406,18 @@ public class SyncConfiguration { jObj.put(engine, enabled); if (!enabled) { declined.add(engine); } } // Our history checkbox drives form history, too. // We don't need to do this for enablement: that's done at retrieval time. - if (selectedEngines.containsKey("history") && !selectedEngines.get("history").booleanValue()) { - declined.add("forms"); + if (selectedEngines.containsKey("history") && !selectedEngines.get("history")) { + declined.add("forms"); } String json = jObj.toJSONString(); long currentTime = System.currentTimeMillis(); Editor edit = prefs.edit(); edit.putString(PREF_USER_SELECTED_ENGINES_TO_SYNC, json); edit.putString(PREF_DECLINED_ENGINE_NAMES, setToJSONObjectString(declined)); edit.putLong(PREF_USER_SELECTED_ENGINES_TO_SYNC_TIMESTAMP, currentTime);
--- a/mobile/android/base/sync/config/AccountPickler.java +++ b/mobile/android/base/sync/config/AccountPickler.java @@ -166,17 +166,17 @@ public class AccountPickler { Logger.warn(LOG_TAG, "Failed to add Android Account; aborting."); return null; } Integer version = json.getIntegerSafely(Constants.JSON_KEY_VERSION); Integer timestamp = json.getIntegerSafely(Constants.JSON_KEY_TIMESTAMP); if (version == null || timestamp == null) { Logger.warn(LOG_TAG, "Did not find version or timestamp in pickle file; ignoring."); - version = new Integer(-1); - timestamp = new Integer(-1); + version = -1; + timestamp = -1; } Logger.info(LOG_TAG, "Un-pickled Android account named " + params.username + " (version " + version + ", pickled at " + timestamp + ")."); return account; } }
--- a/mobile/android/base/sync/config/ConfigurationMigrator.java +++ b/mobile/android/base/sync/config/ConfigurationMigrator.java @@ -50,23 +50,23 @@ public class ConfigurationMigrator { String fromKey = entry.getKey(); String toKey = map.get(fromKey); if (toKey == null) { continue; } Object value = entry.getValue(); if (value instanceof Boolean) { - to.putBoolean(toKey, ((Boolean) value).booleanValue()); + to.putBoolean(toKey, (Boolean) value); } else if (value instanceof Float) { - to.putFloat(toKey, ((Float) value).floatValue()); + to.putFloat(toKey, (Float) value); } else if (value instanceof Integer) { - to.putInt(toKey, ((Integer) value).intValue()); + to.putInt(toKey, (Integer) value); } else if (value instanceof Long) { - to.putLong(toKey, ((Long) value).longValue()); + to.putLong(toKey, (Long) value); } else if (value instanceof String) { to.putString(toKey, (String) value); } else { // Do nothing -- perhaps SharedPreferences accepts types we don't know about. } if (Logger.LOG_PERSONAL_INFORMATION) { Logger.debug(LOG_TAG, "Migrated '" + fromKey + "' to '" + toKey + "' (" + value + ").");
--- a/mobile/android/base/sync/middleware/Crypto5MiddlewareRepository.java +++ b/mobile/android/base/sync/middleware/Crypto5MiddlewareRepository.java @@ -28,16 +28,18 @@ public class Crypto5MiddlewareRepository public class Crypto5MiddlewareRepositorySessionCreationDelegate extends MiddlewareRepository.SessionCreationDelegate { private final Crypto5MiddlewareRepository repository; private final RepositorySessionCreationDelegate outerDelegate; public Crypto5MiddlewareRepositorySessionCreationDelegate(Crypto5MiddlewareRepository repository, RepositorySessionCreationDelegate outerDelegate) { this.repository = repository; this.outerDelegate = outerDelegate; } + + @Override public void onSessionCreateFailed(Exception ex) { this.outerDelegate.onSessionCreateFailed(ex); } @Override public void onSessionCreated(RepositorySession session) { // Do some work, then report success with the wrapping session. Crypto5MiddlewareRepositorySession cryptoSession;
--- a/mobile/android/base/sync/middleware/MiddlewareRepositorySession.java +++ b/mobile/android/base/sync/middleware/MiddlewareRepositorySession.java @@ -70,16 +70,17 @@ public abstract class MiddlewareReposito @Override public RepositorySessionBeginDelegate deferredBeginDelegate(ExecutorService executor) { return this; } }; } } + @Override public void begin(RepositorySessionBeginDelegate delegate) throws InvalidSessionTransitionException { inner.begin(new MiddlewareRepositorySessionBeginDelegate(this, delegate)); } public class MiddlewareRepositorySessionFinishDelegate implements RepositorySessionFinishDelegate { private final MiddlewareRepositorySession outerSession; private final RepositorySessionFinishDelegate next;
--- a/mobile/android/base/sync/repositories/RepositorySessionBundle.java +++ b/mobile/android/base/sync/repositories/RepositorySessionBundle.java @@ -32,17 +32,17 @@ public class RepositorySessionBundle { return object.getLong(JSON_KEY_TIMESTAMP); } return -1; } public void setTimestamp(long timestamp) { Logger.debug(LOG_TAG, "Setting timestamp to " + timestamp + "."); - object.put(JSON_KEY_TIMESTAMP, Long.valueOf(timestamp)); + object.put(JSON_KEY_TIMESTAMP, timestamp); } public void bumpTimestamp(long timestamp) { long existing = this.getTimestamp(); if (timestamp > existing) { this.setTimestamp(timestamp); } else { Logger.debug(LOG_TAG, "Timestamp " + timestamp + " not greater than " + existing + "; not bumping.");
--- a/mobile/android/base/sync/repositories/Server11RepositorySession.java +++ b/mobile/android/base/sync/repositories/Server11RepositorySession.java @@ -465,17 +465,17 @@ public class Server11RepositorySession e this.handleRequestError(e); return; } // Be defensive when logging timestamp. if (body.containsKey("modified")) { Long modified = body.getTimestamp("modified"); if (modified != null) { - Logger.trace(LOG_TAG, "POST request success. Modified timestamp: " + modified.longValue()); + Logger.trace(LOG_TAG, "POST request success. Modified timestamp: " + modified); } else { Logger.warn(LOG_TAG, "POST success body contains malformed 'modified': " + body.toJSONString()); } } else { Logger.warn(LOG_TAG, "POST success body does not contain key 'modified': " + body.toJSONString()); } try {
--- a/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java +++ b/mobile/android/base/sync/repositories/android/AndroidBrowserBookmarksRepositorySession.java @@ -267,17 +267,17 @@ public class AndroidBrowserBookmarksRepo } private long getIDForGUID(String guid) { Long id = parentGuidToIDMap.get(guid); if (id == null) { Logger.warn(LOG_TAG, "Couldn't find local ID for GUID " + guid); return -1; } - return id.longValue(); + return id; } private String getGUID(Cursor cur) { return RepoUtils.getStringFromCursor(cur, "guid"); } private long getParentID(Cursor cur) { return RepoUtils.getLongFromCursor(cur, BrowserContract.Bookmarks.PARENT); @@ -359,17 +359,17 @@ public class AndroidBrowserBookmarksRepo // This will suffice for taking a jumble of records and indices and // producing a sorted sequence that preserves some kind of order -- // from the abs of the position, falling back on cursor order (that // is, creation time and ID). // Note that this code is not intended to merge values from two sources! boolean changed = false; int i = 0; for (Entry<Long, ArrayList<String>> entry : guids.entrySet()) { - long pos = entry.getKey().longValue(); + long pos = entry.getKey(); int atPos = entry.getValue().size(); // If every element has a different index, and the indices are // in strict natural order, then changed will be false. if (atPos > 1 || pos != i) { changed = true; } @@ -1081,20 +1081,20 @@ public class AndroidBrowserBookmarksRepo } int rowType = getTypeFromCursor(cur); String typeString = BrowserContractHelpers.typeStringForCode(rowType); if (typeString == null) { Logger.warn(LOG_TAG, "Unsupported type code " + rowType); return null; - } else { - Logger.trace(LOG_TAG, "Record " + guid + " has type " + typeString); } + Logger.trace(LOG_TAG, "Record " + guid + " has type " + typeString); + rec.type = typeString; rec.title = RepoUtils.getStringFromCursor(cur, BrowserContract.Bookmarks.TITLE); rec.bookmarkURI = RepoUtils.getStringFromCursor(cur, BrowserContract.Bookmarks.URL); rec.description = RepoUtils.getStringFromCursor(cur, BrowserContract.Bookmarks.DESCRIPTION); rec.tags = RepoUtils.getJSONArrayFromCursor(cur, BrowserContract.Bookmarks.TAGS); rec.keyword = RepoUtils.getStringFromCursor(cur, BrowserContract.Bookmarks.KEYWORD); rec.androidID = RepoUtils.getLongFromCursor(cur, BrowserContract.Bookmarks._ID);
--- a/mobile/android/base/sync/repositories/android/AndroidBrowserRepository.java +++ b/mobile/android/base/sync/repositories/android/AndroidBrowserRepository.java @@ -33,16 +33,17 @@ public abstract class AndroidBrowserRepo public CleanThread(RepositorySessionCleanDelegate delegate, Context context) { if (context == null) { throw new IllegalArgumentException("context is null"); } this.delegate = delegate; this.context = context; } + @Override public void run() { try { getDataAccessor(context).purgeDeleted(); } catch (NullCursorException e) { delegate.onCleanFailed(AndroidBrowserRepository.this, e); return; } catch (Exception e) { delegate.onCleanFailed(AndroidBrowserRepository.this, e); @@ -62,14 +63,15 @@ public abstract class AndroidBrowserRepo public CreateSessionThread(RepositorySessionCreationDelegate delegate, Context context) { if (context == null) { throw new IllegalArgumentException("context is null."); } this.delegate = delegate; this.context = context; } + @Override public void run() { sessionCreator(delegate, context); } } }
--- a/mobile/android/base/sync/repositories/android/AndroidBrowserRepositorySession.java +++ b/mobile/android/base/sync/repositories/android/AndroidBrowserRepositorySession.java @@ -677,17 +677,17 @@ public abstract class AndroidBrowserRepo Logger.debug(LOG_TAG, "Existing record does not match incoming record. Trying to find record by record string."); return findByRecordString(recordString); } protected String getGuidForString(String recordString) throws NoGuidForIdException, NullCursorException, ParentNotFoundException { if (recordToGuid == null) { createRecordToGuidMap(); } - return recordToGuid.get(Integer.valueOf(recordString.hashCode())); + return recordToGuid.get(recordString.hashCode()); } protected void createRecordToGuidMap() throws NoGuidForIdException, NullCursorException, ParentNotFoundException { Logger.info(LOG_TAG, "BEGIN: creating record -> GUID map."); recordToGuid = new SparseArray<String>(); // TODO: we should be able to do this entire thing with string concatenations within SQL. // Also consider whether it's better to fetch and process every record in the DB into @@ -697,17 +697,17 @@ public abstract class AndroidBrowserRepo if (!cur.moveToFirst()) { return; } while (!cur.isAfterLast()) { Record record = retrieveDuringStore(cur); if (record != null) { final String recordString = buildRecordString(record); if (recordString != null) { - recordToGuid.put(Integer.valueOf(recordString.hashCode()), record.guid); + recordToGuid.put(recordString.hashCode(), record.guid); } } cur.moveToNext(); } } finally { cur.close(); } Logger.info(LOG_TAG, "END: creating record -> GUID map."); @@ -755,17 +755,17 @@ public abstract class AndroidBrowserRepo public void putRecordToGuidMap(String recordString, String guid) throws NoGuidForIdException, NullCursorException, ParentNotFoundException { if (recordString == null) { return; } if (recordToGuid == null) { createRecordToGuidMap(); } - recordToGuid.put(Integer.valueOf(recordString.hashCode()), guid); + recordToGuid.put(recordString.hashCode(), guid); } protected abstract Record prepareRecord(Record record); protected void updateBookkeeping(Record record) throws NoGuidForIdException, NullCursorException, ParentNotFoundException { putRecordToGuidMap(buildRecordString(record), record.guid);
--- a/mobile/android/base/sync/repositories/android/BrowserContractHelpers.java +++ b/mobile/android/base/sync/repositories/android/BrowserContractHelpers.java @@ -138,15 +138,15 @@ public class BrowserContractHelpers exte * @param type a type string, such as "livemark". * @return the type code, or -1 if not found. */ public static int typeCodeForString(String type) { Integer found = BOOKMARK_TYPE_STRING_TO_CODE.get(type); if (found == null) { return -1; } - return found.intValue(); + return found; } public static boolean isSupportedType(String type) { return BOOKMARK_TYPE_STRING_TO_CODE.containsKey(type); } }
--- a/mobile/android/base/sync/repositories/android/CachedSQLiteOpenHelper.java +++ b/mobile/android/base/sync/repositories/android/CachedSQLiteOpenHelper.java @@ -36,16 +36,17 @@ public abstract class CachedSQLiteOpenHe synchronized protected SQLiteDatabase getCachedWritableDatabase() { if (writableDatabase == null) { writableDatabase = this.getWritableDatabase(); } return writableDatabase; } + @Override synchronized public void close() { if (readableDatabase != null) { readableDatabase.close(); readableDatabase = null; } if (writableDatabase != null) { writableDatabase.close(); writableDatabase = null;
--- a/mobile/android/base/sync/repositories/android/FormHistoryRepositorySession.java +++ b/mobile/android/base/sync/repositories/android/FormHistoryRepositorySession.java @@ -168,17 +168,17 @@ public class FormHistoryRepositorySessio delegate.onGuidsSinceFailed(e); return; } finally { if (cur != null) { cur.close(); } } - String guidsArray[] = guids.toArray(new String[0]); + String guidsArray[] = guids.toArray(new String[guids.size()]); delegate.onGuidsSinceSucceeded(guidsArray); } }; delegateQueue.execute(command); } protected static FormHistoryRecord retrieveDuringFetch(final Cursor cursor) { // A simple and efficient way to distinguish two tables. @@ -461,17 +461,17 @@ public class FormHistoryRepositorySessio recordsBuffer.add(contentValuesForRegularRecord(record)); } } // Should always be called from storeWorkQueue. protected void flushInsertQueue() throws RemoteException { synchronized (recordsBufferMonitor) { if (recordsBuffer.size() > 0) { - final ContentValues[] outgoing = recordsBuffer.toArray(new ContentValues[0]); + final ContentValues[] outgoing = recordsBuffer.toArray(new ContentValues[recordsBuffer.size()]); recordsBuffer = new ArrayList<ContentValues>(); if (outgoing == null || outgoing.length == 0) { Logger.debug(LOG_TAG, "No form history items to insert; returning immediately."); return; } long before = System.currentTimeMillis();
--- a/mobile/android/base/sync/repositories/android/RepoUtils.java +++ b/mobile/android/base/sync/repositories/android/RepoUtils.java @@ -189,17 +189,17 @@ public class RepoUtils { final long visitCount = getLongFromCursor(cur, BrowserContract.History.VISITS); if (visitCount <= 0) { Logger.debug(LOG_TAG, "Skipping history record " + guid + " with <= 0 visit count."); return null; } final String collection = "history"; final long lastModified = getLongFromCursor(cur, BrowserContract.SyncColumns.DATE_MODIFIED); - final boolean deleted = getLongFromCursor(cur, BrowserContract.SyncColumns.IS_DELETED) == 1 ? true : false; + final boolean deleted = getLongFromCursor(cur, BrowserContract.SyncColumns.IS_DELETED) == 1; final HistoryRecord rec = new HistoryRecord(guid, collection, lastModified, deleted); rec.androidID = getLongFromCursor(cur, BrowserContract.History._ID); rec.fennecDateVisited = getLongFromCursor(cur, BrowserContract.History.DATE_LAST_VISITED); rec.fennecVisitCount = visitCount; rec.histURI = historyURI; rec.title = getStringFromCursor(cur, BrowserContract.History.TITLE);
--- a/mobile/android/base/sync/repositories/domain/BookmarkRecord.java +++ b/mobile/android/base/sync/repositories/domain/BookmarkRecord.java @@ -312,17 +312,17 @@ public class BookmarkRecord extends Reco private void trace(String s) { Logger.trace(LOG_TAG, s); } @Override public boolean equalPayloads(Object o) { trace("Calling BookmarkRecord.equalPayloads."); - if (o == null || !(o instanceof BookmarkRecord)) { + if (!(o instanceof BookmarkRecord)) { return false; } BookmarkRecord other = (BookmarkRecord) o; if (!super.equalPayloads(other)) { return false; }
--- a/mobile/android/base/sync/repositories/domain/FormHistoryRecord.java +++ b/mobile/android/base/sync/repositories/domain/FormHistoryRecord.java @@ -81,30 +81,30 @@ public class FormHistoryRecord extends R } /** * We consider two form history records to be congruent if they represent the * same form element regardless of times used. */ @Override public boolean congruentWith(Object o) { - if (o == null || !(o instanceof FormHistoryRecord)) { + if (!(o instanceof FormHistoryRecord)) { return false; } FormHistoryRecord other = (FormHistoryRecord) o; if (!super.congruentWith(other)) { return false; } return RepoUtils.stringsEqual(this.fieldName, other.fieldName) && RepoUtils.stringsEqual(this.fieldValue, other.fieldValue); } @Override public boolean equalPayloads(Object o) { - if (o == null || !(o instanceof FormHistoryRecord)) { + if (!(o instanceof FormHistoryRecord)) { Logger.debug(LOG_TAG, "Not a FormHistoryRecord: " + o.getClass()); return false; } FormHistoryRecord other = (FormHistoryRecord) o; if (!super.equalPayloads(other)) { Logger.debug(LOG_TAG, "super.equalPayloads returned false."); return false; }
--- a/mobile/android/base/sync/repositories/domain/HistoryRecord.java +++ b/mobile/android/base/sync/repositories/domain/HistoryRecord.java @@ -98,29 +98,29 @@ public class HistoryRecord extends Recor /** * We consider two history records to be congruent if they represent the * same history record regardless of visits. Titles are allowed to differ, * but the URI must be the same. */ @Override public boolean congruentWith(Object o) { - if (o == null || !(o instanceof HistoryRecord)) { + if (!(o instanceof HistoryRecord)) { return false; } HistoryRecord other = (HistoryRecord) o; if (!super.congruentWith(other)) { return false; } return RepoUtils.stringsEqual(this.histURI, other.histURI); } @Override public boolean equalPayloads(Object o) { - if (o == null || !(o instanceof HistoryRecord)) { + if (!(o instanceof HistoryRecord)) { Logger.debug(LOG_TAG, "Not a HistoryRecord: " + o.getClass()); return false; } HistoryRecord other = (HistoryRecord) o; if (!super.equalPayloads(other)) { Logger.debug(LOG_TAG, "super.equalPayloads returned false."); return false; }
--- a/mobile/android/base/sync/repositories/domain/PasswordRecord.java +++ b/mobile/android/base/sync/repositories/domain/PasswordRecord.java @@ -105,17 +105,17 @@ public class PasswordRecord extends Reco putPayload(payload, PAYLOAD_USERNAME, this.encryptedUsername); putPayload(payload, PAYLOAD_PASSWORD, this.encryptedPassword); putPayload(payload, PAYLOAD_USERNAME_FIELD, this.usernameField); putPayload(payload, PAYLOAD_PASSWORD_FIELD, this.passwordField); } @Override public boolean congruentWith(Object o) { - if (o == null || !(o instanceof PasswordRecord)) { + if (!(o instanceof PasswordRecord)) { return false; } PasswordRecord other = (PasswordRecord) o; if (!super.congruentWith(other)) { return false; } return RepoUtils.stringsEqual(this.hostname, other.hostname) && RepoUtils.stringsEqual(this.formSubmitURL, other.formSubmitURL) @@ -125,17 +125,17 @@ public class PasswordRecord extends Reco && RepoUtils.stringsEqual(this.usernameField, other.usernameField) && RepoUtils.stringsEqual(this.passwordField, other.passwordField) && RepoUtils.stringsEqual(this.encryptedUsername, other.encryptedUsername) && RepoUtils.stringsEqual(this.encryptedPassword, other.encryptedPassword); } @Override public boolean equalPayloads(Object o) { - if (o == null || !(o instanceof PasswordRecord)) { + if (!(o instanceof PasswordRecord)) { return false; } PasswordRecord other = (PasswordRecord) o; Logger.debug("PasswordRecord", "thisRecord:" + this.toString()); Logger.debug("PasswordRecord", "otherRecord:" + o.toString()); if (this.deleted) {
--- a/mobile/android/base/sync/repositories/domain/Record.java +++ b/mobile/android/base/sync/repositories/domain/Record.java @@ -97,17 +97,17 @@ public abstract class Record { this.androidID = -1; } /** * Return true iff the input is a Record and has the same * collection and guid as this object. */ public boolean equalIdentifiers(Object o) { - if (o == null || !(o instanceof Record)) { + if (!(o instanceof Record)) { return false; } Record other = (Record) o; if (this.guid == null) { if (other.guid != null) { return false; } @@ -174,17 +174,17 @@ public abstract class Record { } /** * Return true iff the input is both equal in terms of payload, * and also shares transient values such as timestamps. */ @Override public boolean equals(Object o) { - if (o == null || !(o instanceof Record)) { + if (!(o instanceof Record)) { return false; } Record other = (Record) o; return equalTimestamps(other) && equalSortIndices(other) && equalAndroidIDs(other) && equalPayloads(o); @@ -194,17 +194,17 @@ public abstract class Record { return this.androidID == other.androidID; } public boolean equalSortIndices(Record other) { return this.sortIndex == other.sortIndex; } public boolean equalTimestamps(Object o) { - if (o == null || !(o instanceof Record)) { + if (!(o instanceof Record)) { return false; } return ((Record) o).lastModified == this.lastModified; } protected abstract void populatePayload(ExtendedJSONObject payload); protected abstract void initFromPayload(ExtendedJSONObject payload);
--- a/mobile/android/base/sync/setup/activities/AccountActivity.java +++ b/mobile/android/base/sync/setup/activities/AccountActivity.java @@ -183,16 +183,17 @@ public class AccountActivity extends Acc clearErrors(); displayVerifying(true); cancelButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { cancelConnectHandler(v); // Set cancel click handler to leave account setup. cancelButton.setOnClickListener(new OnClickListener() { + @Override public void onClick(View v) { cancelClickHandler(v); } }); } }); accountAuthenticator = new AccountAuthenticator(this);
--- a/mobile/android/base/sync/setup/activities/SendTabActivity.java +++ b/mobile/android/base/sync/setup/activities/SendTabActivity.java @@ -309,17 +309,17 @@ public class SendTabActivity extends Loc sender.sync(); return true; } @Override protected void onPostExecute(final Boolean success) { // We're allowed to update the UI from here. - notifyAndFinish(success.booleanValue()); + notifyAndFinish(success); } }.execute(); } /** * Notify the user about sent tabs status and then finish the activity. * <p> * "Success" is a bit of a misnomer: we wrote "displayURI" commands to the local
--- a/mobile/android/base/sync/stage/AbstractNonRepositorySyncStage.java +++ b/mobile/android/base/sync/stage/AbstractNonRepositorySyncStage.java @@ -14,12 +14,13 @@ public abstract class AbstractNonReposit // Do nothing. } @Override protected void wipeLocal() { // Do nothing. } + @Override public Integer getStorageVersion() { return null; // Never include these engines in any meta/global records. } }
--- a/mobile/android/base/sync/stage/SafeConstrainedServer11Repository.java +++ b/mobile/android/base/sync/stage/SafeConstrainedServer11Repository.java @@ -89,18 +89,18 @@ public class SafeConstrainedServer11Repo } Integer c = counts.getCount(collection); if (c == null) { Logger.info(LOG_TAG, "Fetched counts does not include collection " + collection + "; syncing as usual."); return false; } - Logger.info(LOG_TAG, "First sync for " + collection + ": " + c.intValue() + " items."); - if (c.intValue() > fetchLimit) { + Logger.info(LOG_TAG, "First sync for " + collection + ": " + c + " items."); + if (c > fetchLimit) { Logger.warn(LOG_TAG, "Too many items to sync safely. Skipping."); return true; } } return super.shouldSkip(); } } }
--- a/mobile/android/base/sync/stage/ServerSyncStage.java +++ b/mobile/android/base/sync/stage/ServerSyncStage.java @@ -120,24 +120,24 @@ public abstract class ServerSyncStage ex } } } protected EngineSettings getEngineSettings() throws NonObjectJSONException, IOException, ParseException { Integer version = getStorageVersion(); if (version == null) { Logger.warn(LOG_TAG, "null storage version for " + this + "; using version 0."); - version = Integer.valueOf(0); + version = 0; } SynchronizerConfiguration config = this.getConfig(); if (config == null) { - return new EngineSettings(null, version.intValue()); + return new EngineSettings(null, version); } - return new EngineSettings(config.syncID, version.intValue()); + return new EngineSettings(config.syncID, version); } protected abstract String getCollection(); protected abstract String getEngineName(); protected abstract Repository getLocalRepository(); protected abstract RecordFactory getRecordFactory(); // Override this in subclasses.
--- a/mobile/android/base/sync/synchronizer/ServerLocalSynchronizerSession.java +++ b/mobile/android/base/sync/synchronizer/ServerLocalSynchronizerSession.java @@ -22,16 +22,17 @@ import org.mozilla.gecko.sync.repositori */ public class ServerLocalSynchronizerSession extends SynchronizerSession { protected static final String LOG_TAG = "ServLocSynchronizerSess"; public ServerLocalSynchronizerSession(Synchronizer synchronizer, SynchronizerSessionDelegate delegate) { super(synchronizer, delegate); } + @Override public void onFirstFlowCompleted(RecordsChannel recordsChannel, long fetchEnd, long storeEnd) { // Fetch failures always abort. int numRemoteFetchFailed = recordsChannel.getFetchFailureCount(); if (numRemoteFetchFailed > 0) { final String message = "Got " + numRemoteFetchFailed + " failures fetching remote records!"; Logger.warn(LOG_TAG, message + " Aborting session."); delegate.onSynchronizeFailed(this, new FetchFailedException(), message); return; @@ -45,16 +46,17 @@ public class ServerLocalSynchronizerSess Logger.warn(LOG_TAG, message + " Ignoring local store failures and continuing synchronizer session."); } else { Logger.trace(LOG_TAG, "No failures storing local records."); } super.onFirstFlowCompleted(recordsChannel, fetchEnd, storeEnd); } + @Override public void onSecondFlowCompleted(RecordsChannel recordsChannel, long fetchEnd, long storeEnd) { // Fetch failures always abort. int numLocalFetchFailed = recordsChannel.getFetchFailureCount(); if (numLocalFetchFailed > 0) { final String message = "Got " + numLocalFetchFailed + " failures fetching local records!"; Logger.warn(LOG_TAG, message + " Aborting session."); delegate.onSynchronizeFailed(this, new FetchFailedException(), message); return;
--- a/mobile/android/base/sync/synchronizer/SynchronizerSession.java +++ b/mobile/android/base/sync/synchronizer/SynchronizerSession.java @@ -153,16 +153,17 @@ implements RecordsChannelDelegate, // TODO: failed record handling. // This is the *second* record channel to flow. // I, SynchronizerSession, am the delegate for the *second* flow. channelBToA = new RecordsChannel(this.sessionB, this.sessionA, this); // This is the delegate for the *first* flow. RecordsChannelDelegate channelAToBDelegate = new RecordsChannelDelegate() { + @Override public void onFlowCompleted(RecordsChannel recordsChannel, long fetchEnd, long storeEnd) { session.onFirstFlowCompleted(recordsChannel, fetchEnd, storeEnd); } @Override public void onFlowBeginFailed(RecordsChannel recordsChannel, Exception ex) { Logger.warn(LOG_TAG, "First RecordsChannel onFlowBeginFailed. Logging session error.", ex); session.delegate.onSynchronizeFailed(session, ex, "Failed to begin first flow.");
--- a/mobile/android/base/tabs/TabStripItemView.java +++ b/mobile/android/base/tabs/TabStripItemView.java @@ -202,17 +202,18 @@ public class TabStripItemView extends Th setPrivateMode(tab.isPrivate()); } private void updateFavicon(final Bitmap favicon) { if (favicon == null) { lastFavicon = null; faviconView.setImageResource(R.drawable.new_tablet_default_favicon); return; - } else if (favicon == lastFavicon) { + } + if (favicon == lastFavicon) { return; } // Cache the original so we can debounce without scaling. lastFavicon = favicon; final Bitmap scaledFavicon = Bitmap.createScaledBitmap(favicon, faviconSize, faviconSize, false);
--- a/mobile/android/base/tests/helpers/JavascriptBridge.java +++ b/mobile/android/base/tests/helpers/JavascriptBridge.java @@ -251,62 +251,65 @@ public final class JavascriptBridge { final JSONArray argsArray; final Object[] args; try { if (!EVENT_TYPE.equals(message.getString("type"))) { throw new IllegalStateException("Message type is not " + EVENT_TYPE); } type = message.getString("innerType"); - if ("progress".equals(type)) { - // Javascript harness message - mLogParser.logMessage(message.getString("message")); - return MessageStatus.PROCESSED; + switch (type) { + case "progress": + // Javascript harness message + mLogParser.logMessage(message.getString("message")); + return MessageStatus.PROCESSED; - } else if ("notify-loaded".equals(type)) { - mJavaBridgeLoaded = true; - return MessageStatus.PROCESSED; + case "notify-loaded": + mJavaBridgeLoaded = true; + return MessageStatus.PROCESSED; - } else if ("sync-reply".equals(type)) { - // Reply to Java-to-Javascript sync call - return MessageStatus.REPLIED; + case "sync-reply": + // Reply to Java-to-Javascript sync call + return MessageStatus.REPLIED; - } else if ("sync-call".equals(type) || "async-call".equals(type)) { + case "sync-call": + case "async-call": - if ("async-call".equals(type)) { - // Save this async message until another async message arrives, then we - // process the saved message and save the new one. This is done as a - // form of tail call optimization, by making sync-replies come before - // async-calls. On the other hand, if (message == mSavedAsyncMessage), - // it means we're currently processing the saved message and should clear - // mSavedAsyncMessage. - final JSONObject newSavedMessage = - (message != mSavedAsyncMessage ? message : null); - message = mSavedAsyncMessage; - mSavedAsyncMessage = newSavedMessage; - if (message == null) { - // Saved current message and there wasn't an already saved one. - return MessageStatus.SAVED; + if ("async-call".equals(type)) { + // Save this async message until another async message arrives, then we + // process the saved message and save the new one. This is done as a + // form of tail call optimization, by making sync-replies come before + // async-calls. On the other hand, if (message == mSavedAsyncMessage), + // it means we're currently processing the saved message and should clear + // mSavedAsyncMessage. + final JSONObject newSavedMessage = + (message != mSavedAsyncMessage ? message : null); + message = mSavedAsyncMessage; + mSavedAsyncMessage = newSavedMessage; + if (message == null) { + // Saved current message and there wasn't an already saved one. + return MessageStatus.SAVED; + } } - } - methodName = message.getString("method"); - argsArray = message.getJSONArray("args"); - args = new Object[argsArray.length()]; - for (int i = 0; i < args.length; i++) { - args[i] = convertFromJSONValue(argsArray.get(i)); - } - invokeMethod(methodName, args); + methodName = message.getString("method"); + argsArray = message.getJSONArray("args"); + args = new Object[argsArray.length()]; + for (int i = 0; i < args.length; i++) { + args[i] = convertFromJSONValue(argsArray.get(i)); + } + invokeMethod(methodName, args); - if ("sync-call".equals(type)) { - // Reply for sync messages - sendMessage("sync-reply", methodName, null); - } - return MessageStatus.PROCESSED; + if ("sync-call".equals(type)) { + // Reply for sync messages + sendMessage("sync-reply", methodName, null); + } + return MessageStatus.PROCESSED; } + throw new IllegalStateException("Message type is unexpected"); } catch (final JSONException e) { throw new IllegalStateException("Unable to retrieve JSON message", e); } } /**
--- a/mobile/android/base/tests/testClearPrivateData.java +++ b/mobile/android/base/tests/testClearPrivateData.java @@ -43,16 +43,17 @@ public class testClearPrivateData extend verifyHistoryCount(0); // Checking that the user made bookmark is not removed mAsserter.ok(mDatabaseHelper.isBookmark(blank2), "Checking that bookmarks have not been removed", "User made bookmarks were not removed with private data"); } private void verifyHistoryCount(final int expectedCount) { boolean match = waitForTest( new BooleanTest() { + @Override public boolean test() { return (mDatabaseHelper.getBrowserDBUrls(DatabaseHelper.BrowserDataType.HISTORY).size() == expectedCount); } }, TEST_WAIT_MS); mAsserter.ok(match, "Checking that the number of history items is correct", String.valueOf(expectedCount) + " history items present in the database"); } public void clearSiteSettings() {
--- a/mobile/android/base/tests/testFindInPage.java +++ b/mobile/android/base/tests/testFindInPage.java @@ -40,16 +40,17 @@ public class testFindInPage extends Pixe painted.close(); } } public void findText(String text, int nrOfMatches){ selectMenuItem(StringHelper.FIND_IN_PAGE_LABEL); close = mDriver.findElement(getActivity(), R.id.find_close); boolean success = waitForTest ( new BooleanTest() { + @Override public boolean test() { next = mDriver.findElement(getActivity(), R.id.find_next); if (next != null) { return true; } else { return false; } } @@ -61,16 +62,17 @@ public class testFindInPage extends Pixe mSolo.sleep(500); mActions.sendKeys(text); mActions.sendSpecialKey(Actions.SpecialKey.ENTER); // Advance a few matches to scroll the page for (int i=1;i < nrOfMatches;i++) { success = waitForTest ( new BooleanTest() { + @Override public boolean test() { if (next.click()) { return true; } else { return false; } } }, WAIT_FOR_TEST);
--- a/mobile/android/base/tests/testImportFromAndroid.java +++ b/mobile/android/base/tests/testImportFromAndroid.java @@ -134,16 +134,17 @@ public class testImportFromAndroid exten selectSettingsItem(StringHelper.CUSTOMIZE_SECTION_LABEL, StringHelper.IMPORT_FROM_ANDROID_LABEL); // Wait for the Import form Android pop-up to be opened. It has the same title as the option so waiting for the "Cancel" button waitForText("Cancel"); mSolo.clickOnButton("Import"); // Wait until the import pop-up is dismissed. This depending on the number of items in the android history can take up to a few seconds boolean importComplete = waitForTest(new BooleanTest() { + @Override public boolean test() { return !mSolo.searchText("Please wait..."); } }, MAX_WAIT_TIMEOUT); mAsserter.ok(importComplete, "Waiting for import to finish and the pop-up to be dismissed", "Import was completed and the pop-up was dismissed"); // Import has finished. Waiting to get back to the Settings Menu and looking for the Import&Export subsection @@ -194,13 +195,14 @@ public class testImportFromAndroid exten mDatabaseHelper.deleteBookmark(url); } // History for (String url:androidData) { mDatabaseHelper.deleteHistoryItem(url); } } + @Override public void tearDown() throws Exception { deleteImportedData(); super.tearDown(); } }
--- a/mobile/android/base/tests/testInputUrlBar.java +++ b/mobile/android/base/tests/testInputUrlBar.java @@ -40,43 +40,47 @@ public final class testInputUrlBar exten assertUrlBarText("zyefcd"); mActions.sendSpecialKey(Actions.SpecialKey.RIGHT); mActions.sendKeys("gh"); assertUrlBarText("zyefcghd"); final EditText editText = mUrlBarEditView; runOnUiThreadSync(new Runnable() { + @Override public void run() { // Select "ef" editText.setSelection(2); } }); mActions.sendKeys("op"); assertUrlBarText("zyopefcghd"); runOnUiThreadSync(new Runnable() { + @Override public void run() { // Select "cg" editText.setSelection(6, 8); } }); mActions.sendKeys("qr"); assertUrlBarText("zyopefqrhd"); runOnUiThreadSync(new Runnable() { + @Override public void run() { // Select "op" editText.setSelection(4,2); } }); mActions.sendKeys("st"); assertUrlBarText("zystefqrhd"); runOnUiThreadSync(new Runnable() { + @Override public void run() { editText.selectAll(); } }); mActions.sendKeys("uv"); assertUrlBarText("uv"); // Dismiss the VKB
--- a/mobile/android/base/tests/testMasterPassword.java +++ b/mobile/android/base/tests/testMasterPassword.java @@ -131,16 +131,17 @@ public class testMasterPassword extends // Checks to see if the device is a Tablet, because for those devices we need an extra back action to close the keyboard public void closeTabletKeyboard() { if (dev.type.equals("tablet")) { mSolo.sleep(1500); toggleVKB();// Close the keyboard for tablets } } + @Override public void clearPrivateData() { // Look for the 'Settings' menu if this device/OS uses it selectSettingsItem(StringHelper.PRIVACY_SECTION_LABEL, StringHelper.CLEAR_PRIVATE_DATA_LABEL); waitForText("Browsing history"); // Make sure the Clear private data pop-up is displayed Actions.EventExpecter clearPrivateDataEventExpecter = mActions.expectGeckoEvent("Sanitize:Finished"); if (mSolo.searchText("Clear data") && !mSolo.searchText("Cookies")) {
--- a/mobile/android/base/tests/testSettingsMenuItems.java +++ b/mobile/android/base/tests/testSettingsMenuItems.java @@ -167,17 +167,17 @@ public class testSettingsMenuItems exten // New tablet UI: we don't allow a page title option. if (NewTabletUI.isEnabled(getActivity())) { settingsMap.get(PATH_DISPLAY).remove(TITLE_BAR_LABEL_ARR); } if (AppConstants.MOZ_STUMBLER_BUILD_TIME_ENABLED) { // Anonymous cell tower/wifi collection - String[] networkReportingUi = { "Mozilla Location Service", "Receives Wi-Fi and cellular location data when running in the background and shares it with Mozilla to improve our geolocation service" }; + String[] networkReportingUi = { "Mozilla Location Service", "Shares approximate Wi-Fi and cellular location of your device with Mozilla to improve our geolocation service" }; settingsMap.get(PATH_MOZILLA).add(networkReportingUi); String[] learnMoreUi = { "Learn more" }; settingsMap.get(PATH_MOZILLA).add(learnMoreUi); } } // Automatic updates
--- a/mobile/android/base/toolbar/BrowserToolbar.java +++ b/mobile/android/base/toolbar/BrowserToolbar.java @@ -673,16 +673,17 @@ public abstract class BrowserToolbar ext public void setOnDismissListener(OnDismissListener listener) { urlEditLayout.setOnDismissListener(listener); } public void setOnFilterListener(OnFilterListener listener) { urlEditLayout.setOnFilterListener(listener); } + @Override public void setOnFocusChangeListener(OnFocusChangeListener listener) { focusChangeListener = listener; } public void setOnStartEditingListener(OnStartEditingListener listener) { startEditingListener = listener; }
--- a/mobile/android/base/toolbar/ToolbarEditText.java +++ b/mobile/android/base/toolbar/ToolbarEditText.java @@ -551,17 +551,19 @@ public class ToolbarEditText extends Cus return true; } if (mCommitListener != null) { mCommitListener.onCommit(); } return true; - } else if (GamepadUtils.isBackKey(event)) { + } + + if (GamepadUtils.isBackKey(event)) { if (mDismissListener != null) { mDismissListener.onDismiss(); } return true; } if ((keyCode == KeyEvent.KEYCODE_DEL ||
--- a/mobile/android/base/util/WebActivityMapper.java +++ b/mobile/android/base/util/WebActivityMapper.java @@ -43,23 +43,25 @@ public final class WebActivityMapper { /** * Provides useful defaults for mime type and uri. */ private static abstract class BaseMapping extends WebActivityMapping { /** * If 'type' is present in data object, uses the value as the MIME type. */ + @Override public String getMime(JSONObject data) throws JSONException { return data.optString("type", null); } /** * If 'uri' or 'url' is present in data object, uses the respecitve value as the Uri. */ + @Override public String getUri(JSONObject data) throws JSONException { // Will return uri or url if present. String uri = data.optString("uri", null); return uri != null ? uri : data.optString("url", null); } } public static Intent getIntentForWebActivity(JSONObject message) throws JSONException {
--- a/mobile/android/base/webapp/InstallListener.java +++ b/mobile/android/base/webapp/InstallListener.java @@ -56,17 +56,18 @@ public class InstallListener extends Bro Log.e(LOGTAG, "Can't find package that's just been installed"); return; } String manifestUrl = apkResources.getManifestUrl(); if (TextUtils.isEmpty(manifestUrl)) { Log.i(LOGTAG, "No manifest URL present in metadata"); return; - } else if (!isCorrectManifest(manifestUrl)) { + } + if (!isCorrectManifest(manifestUrl)) { // This happens when the updater triggers installation of multiple // APK updates simultaneously. If we're the receiver for another // update, then simply ignore this intent by returning early. Log.i(LOGTAG, "Manifest URL is for a different install; ignoring"); return; } // If we're here then everything is looking good and installation can continue.
--- a/mobile/android/base/webapp/WebappImpl.java +++ b/mobile/android/base/webapp/WebappImpl.java @@ -144,20 +144,20 @@ public class WebappImpl extends GeckoApp Log.e(LOGTAG, "Couldn't install packaged app", e); } } else { // an install is already happening, so we should let it complete. Log.i(LOGTAG, "Waiting for existing install to complete"); installHelper.registerGeckoListener(); } return; - } else { - launchWebapp(origin); } + launchWebapp(origin); + setTitle(mAppName); } @Override protected String getURIFromIntent(Intent intent) { String uri = super.getURIFromIntent(intent); if (uri != null) { return uri;
--- a/mobile/android/base/widget/ActivityChooserModel.java +++ b/mobile/android/base/widget/ActivityChooserModel.java @@ -974,16 +974,17 @@ public class ActivityChooserModel extend } ActivityResolveInfo other = (ActivityResolveInfo) obj; if (Float.floatToIntBits(weight) != Float.floatToIntBits(other.weight)) { return false; } return true; } + @Override public int compareTo(ActivityResolveInfo another) { return Float.floatToIntBits(another.weight) - Float.floatToIntBits(weight); } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("["); @@ -998,16 +999,17 @@ public class ActivityChooserModel extend * Default activity sorter implementation. */ private final class DefaultSorter implements ActivitySorter { private static final float WEIGHT_DECAY_COEFFICIENT = 0.95f; private final Map<String, ActivityResolveInfo> mPackageNameToActivityMap = new HashMap<String, ActivityResolveInfo>(); + @Override public void sort(Intent intent, List<ActivityResolveInfo> activities, List<HistoricalRecord> historicalRecords) { Map<String, ActivityResolveInfo> packageNameToActivityMap = mPackageNameToActivityMap; packageNameToActivityMap.clear(); final int activityCount = activities.size(); for (int i = 0; i < activityCount; i++) {
--- a/mobile/android/base/widget/BasicColorPicker.java +++ b/mobile/android/base/widget/BasicColorPicker.java @@ -112,16 +112,17 @@ public class BasicColorPicker extends Li private class ColorPickerListAdapter extends ArrayAdapter<Integer> { private final List<Integer> mColors; public ColorPickerListAdapter(Context context, List<Integer> colors) { super(context, R.layout.color_picker_row, colors); mColors = colors; } + @Override public View getView(int position, View convertView, ViewGroup parent) { View v = super.getView(position, convertView, parent); Drawable d = v.getBackground(); d.setColorFilter(getItem(position), PorterDuff.Mode.MULTIPLY); v.setBackgroundDrawable(d); Drawable check = null;
--- a/mobile/android/base/widget/ButtonToast.java +++ b/mobile/android/base/widget/ButtonToast.java @@ -150,20 +150,22 @@ public class ButtonToast { } else { // Using Android's animation frameworks will not correctly turn off clicking. // See bug 885717. PropertyAnimator animator = new PropertyAnimator(duration); animator.attach(mView, PropertyAnimator.Property.ALPHA, 0.0f); animator.addPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener () { // If we are showing a toast and go in the background // onAnimationEnd will be called when the app is restored + @Override public void onPropertyAnimationEnd() { mView.clearAnimation(); mView.setVisibility(View.GONE); } + @Override public void onPropertyAnimationStart() { } }); animator.start(); } } private final Runnable mHideRunnable = new Runnable() { @Override
--- a/mobile/android/base/widget/TwoWayView.java +++ b/mobile/android/base/widget/TwoWayView.java @@ -1271,17 +1271,19 @@ public class TwoWayView extends AdapterV final int motionPosition = findMotionRowOrColumn((int) mLastTouchPos); mActivePointerId = MotionEventCompat.getPointerId(ev, 0); mTouchRemainderPos = 0; if (mTouchMode == TOUCH_MODE_FLINGING) { return true; - } else if (motionPosition >= 0) { + } + + if (motionPosition >= 0) { mMotionPosition = motionPosition; mTouchMode = TOUCH_MODE_DOWN; } break; case MotionEvent.ACTION_MOVE: { if (mTouchMode != TOUCH_MODE_DOWN) { @@ -1371,17 +1373,19 @@ public class TwoWayView extends AdapterV break; } if (mTouchMode == TOUCH_MODE_FLINGING) { mTouchMode = TOUCH_MODE_DRAGGING; reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL); motionPosition = findMotionRowOrColumn((int) mLastTouchPos); return true; - } else if (mMotionPosition >= 0 && mAdapter.isEnabled(mMotionPosition)) { + } + + if (mMotionPosition >= 0 && mAdapter.isEnabled(mMotionPosition)) { mTouchMode = TOUCH_MODE_DOWN; triggerCheckForTap(); } mMotionPosition = motionPosition; break; } @@ -1496,17 +1500,17 @@ public class TwoWayView extends AdapterV mTouchMode = TOUCH_MODE_TAP; setPressed(true); positionSelector(mMotionPosition, child); child.setPressed(true); if (mSelector != null) { Drawable d = mSelector.getCurrent(); - if (d != null && d instanceof TransitionDrawable) { + if (d instanceof TransitionDrawable) { ((TransitionDrawable) d).resetTransition(); } } if (mTouchModeReset != null) { removeCallbacks(mTouchModeReset); } @@ -3337,17 +3341,17 @@ public class TwoWayView extends AdapterV child.setPressed(true); } setPressed(true); final boolean longClickable = isLongClickable(); final Drawable d = selector.getCurrent(); - if (d != null && d instanceof TransitionDrawable) { + if (d instanceof TransitionDrawable) { if (longClickable) { ((TransitionDrawable) d).startTransition( ViewConfiguration.getLongPressTimeout()); } else { ((TransitionDrawable) d).resetTransition(); } } @@ -3844,17 +3848,19 @@ public class TwoWayView extends AdapterV handleDataChanged(); } // Handle the empty set by removing all views that are visible // and calling it a day if (mItemCount == 0) { resetState(); return; - } else if (mItemCount != mAdapter.getCount()) { + } + + if (mItemCount != mAdapter.getCount()) { throw new IllegalStateException("The content of the adapter has changed but " + "TwoWayView did not receive a notification. Make sure the content of " + "your adapter is not modified from a background thread, but only " + "from the UI thread. [in TwoWayView(" + getId() + ", " + getClass() + ") with Adapter(" + mAdapter.getClass() + ")]"); } setSelectedPositionInt(mNextSelectedPosition); @@ -4269,41 +4275,40 @@ public class TwoWayView extends AdapterV // We saved our state when not in touch mode. (We know this because // mSyncMode is SYNC_SELECTED_POSITION.) Now we are trying to // restore in touch mode. Just leave mSyncPosition as it is (possibly // adjusting if the available range changed) and return. mLayoutMode = LAYOUT_SYNC; mSyncPosition = Math.min(Math.max(0, mSyncPosition), itemCount - 1); return; - } else { - // See if we can find a position in the new data with the same - // id as the old selection. This will change mSyncPosition. - newPos = findSyncPosition(); - if (newPos >= 0) { - // Found it. Now verify that new selection is still selectable - selectablePos = lookForSelectablePosition(newPos, true); - if (selectablePos == newPos) { - // Same row id is selected - mSyncPosition = newPos; - - if (mSyncHeight == getHeight()) { - // If we are at the same height as when we saved state, try - // to restore the scroll position too. - mLayoutMode = LAYOUT_SYNC; - } else { - // We are not the same height as when the selection was saved, so - // don't try to restore the exact position - mLayoutMode = LAYOUT_SET_SELECTION; - } - - // Restore selection - setNextSelectedPositionInt(newPos); - return; + } + // See if we can find a position in the new data with the same + // id as the old selection. This will change mSyncPosition. + newPos = findSyncPosition(); + if (newPos >= 0) { + // Found it. Now verify that new selection is still selectable + selectablePos = lookForSelectablePosition(newPos, true); + if (selectablePos == newPos) { + // Same row id is selected + mSyncPosition = newPos; + + if (mSyncHeight == getHeight()) { + // If we are at the same height as when we saved state, try + // to restore the scroll position too. + mLayoutMode = LAYOUT_SYNC; + } else { + // We are not the same height as when the selection was saved, so + // don't try to restore the exact position + mLayoutMode = LAYOUT_SET_SELECTION; } + + // Restore selection + setNextSelectedPositionInt(newPos); + return; } } break; case SYNC_FIRST_POSITION: // Leave mSyncPosition as it is -- just pin to available range mLayoutMode = LAYOUT_SYNC; mSyncPosition = Math.min(Math.max(0, mSyncPosition), itemCount - 1); @@ -5782,21 +5787,20 @@ public class TwoWayView extends AdapterV if (mTransientStateViews != null) { mTransientStateViews.clear(); } } View getScrapView(int position) { if (mViewTypeCount == 1) { return retrieveFromScrap(mCurrentScrap, position); - } else { - int whichScrap = mAdapter.getItemViewType(position); - if (whichScrap >= 0 && whichScrap < mScrapViews.length) { - return retrieveFromScrap(mScrapViews[whichScrap], position); - } + } + int whichScrap = mAdapter.getItemViewType(position); + if (whichScrap >= 0 && whichScrap < mScrapViews.length) { + return retrieveFromScrap(mScrapViews[whichScrap], position); } return null; } @TargetApi(14) void addScrapView(View scrap, int position) { LayoutParams lp = (LayoutParams) scrap.getLayoutParams(); @@ -6248,17 +6252,17 @@ public class TwoWayView extends AdapterV positionSelector(mMotionPosition, child); refreshDrawableState(); final boolean longClickable = isLongClickable(); if (mSelector != null) { Drawable d = mSelector.getCurrent(); - if (d != null && d instanceof TransitionDrawable) { + if (d instanceof TransitionDrawable) { if (longClickable) { final int longPressTimeout = ViewConfiguration.getLongPressTimeout(); ((TransitionDrawable) d).startTransition(longPressTimeout); } else { ((TransitionDrawable) d).resetTransition(); } } } @@ -6296,16 +6300,17 @@ public class TwoWayView extends AdapterV } else { mTouchMode = TOUCH_MODE_DONE_WAITING; } } } } private class CheckForKeyLongPress extends WindowRunnnable implements Runnable { + @Override public void run() { if (!isPressed() || mSelectedPosition < 0) { return; } final int index = mSelectedPosition - mFirstPosition; final View v = getChildAt(index);
--- a/mobile/android/modules/WebappManager.jsm +++ b/mobile/android/modules/WebappManager.jsm @@ -229,18 +229,17 @@ this.WebappManager = { let app = DOMApplicationRegistry.getAppByManifestURL(aData.manifestURL); if (!app) { throw new Error("app not found in registry"); } // If the APK is installed, then _getAPKVersions will return a version // for it, so we can use that function to determine its install status. - let apkVersions = yield this._getAPKVersions([ app.apkPackageName ]); - if (app.apkPackageName in apkVersions) { + if (app.apkPackageName && app.apkPackageName in (yield this._getAPKVersions([ app.apkPackageName ]))) { debug("APK is installed; requesting uninstallation"); Messaging.sendRequest({ type: "Webapps:UninstallApk", apkPackageName: app.apkPackageName, }); // We don't need to call DOMApplicationRegistry.doUninstall at this point, // because the APK uninstall listener will call autoUninstall once the APK @@ -254,17 +253,17 @@ this.WebappManager = { // and make EventListener.uninstallApk return an error when APK uninstall // fails (which it should be able to detect reliably on Android 4+), // which we observe here and use to notify the requester of failure. } else { // The APK isn't installed, but remove the app from the registry anyway, // to ensure the user can always remove an app from the registry (and thus // about:apps) even if it's out of sync with installed APKs. debug("APK not installed; proceeding directly to removal from registry"); - DOMApplicationRegistry.doUninstall(aData, aMessageManager); + DOMApplicationRegistry.uninstall(aData.manifestURL); } }), autoInstall: function(aData) { debug("autoInstall " + aData.manifestURL); // If the app is already installed, update the existing installation.
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/Reporter.java +++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/Reporter.java @@ -106,26 +106,30 @@ public final class Reporter extends Broa mBundle = (newPosition != null) ? new StumblerBundle(newPosition, mPhoneType) : mBundle; } } @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); - if (action.equals(ACTION_FLUSH_TO_BUNDLE)) { - flush(); - return; - } else if (action.equals(WifiScanner.ACTION_WIFIS_SCANNED)) { - receivedWifiMessage(intent); - } else if (action.equals(CellScanner.ACTION_CELLS_SCANNED)) { - receivedCellMessage(intent); - } else if (action.equals(GPSScanner.ACTION_GPS_UPDATED)) { - // Calls reportCollectedLocation, this is the ideal case - receivedGpsMessage(intent); + switch (action) { + case ACTION_FLUSH_TO_BUNDLE: + flush(); + return; + case WifiScanner.ACTION_WIFIS_SCANNED: + receivedWifiMessage(intent); + break; + case CellScanner.ACTION_CELLS_SCANNED: + receivedCellMessage(intent); + break; + case GPSScanner.ACTION_GPS_UPDATED: + // Calls reportCollectedLocation, this is the ideal case + receivedGpsMessage(intent); + break; } if (mBundle != null && (mBundle.getWifiData().size() > MAX_WIFIS_PER_LOCATION || mBundle.getCellData().size() > MAX_CELLS_PER_LOCATION)) { // no gps for a while, have too much data, just bundle it reportCollectedLocation(); }
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/StumblerService.java +++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/StumblerService.java @@ -232,16 +232,17 @@ public class StumblerService extends Per } if (!mScanManager.isScanning()) { startScanning(); } } // Note that in passive mode, having data isn't an upload trigger, it is triggered by the start intent + @Override public void notifyStorageStateEmpty(boolean isEmpty) { if (isEmpty) { UploadAlarmReceiver.cancelAlarm(this, !mScanManager.isPassiveMode()); } else if (!mScanManager.isPassiveMode()) { UploadAlarmReceiver.scheduleAlarm(this, FREQUENCY_IN_SEC_OF_UPLOAD_IN_ACTIVE_MODE, true /* repeating */); } } }
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/GPSScanner.java +++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/GPSScanner.java @@ -76,16 +76,17 @@ public class GPSScanner implements Locat LocationManager lm = getLocationManager(); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, ACTIVE_MODE_GPS_MIN_UPDATE_TIME_MS, ACTIVE_MODE_GPS_MIN_UPDATE_DISTANCE_M, this); reportLocationLost(); mGPSListener = new GpsStatus.Listener() { + @Override public void onGpsStatusChanged(int event) { if (event == GpsStatus.GPS_EVENT_SATELLITE_STATUS) { GpsStatus status = getLocationManager().getGpsStatus(null); Iterable<GpsSatellite> sats = status.getSatellites(); int satellites = 0; int fixes = 0;
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/WifiScanner.java +++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/WifiScanner.java @@ -89,16 +89,17 @@ public class WifiScanner extends Broadca public synchronized void stop() { if (mStarted) { mContext.unregisterReceiver(this); } deactivatePeriodicScan(); mStarted = false; } + @Override public void onReceive(Context c, Intent intent) { String action = intent.getAction(); if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(action)) { if (isWifiEnabled()) { activatePeriodicScan(ActiveOrPassiveStumbling.ACTIVE_STUMBLING); } else { deactivatePeriodicScan();
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/cellscanner/CellInfo.java +++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/scanners/cellscanner/CellInfo.java @@ -30,20 +30,22 @@ public class CellInfo implements Parcela public static final String CELL_RADIO_CDMA = "cdma"; public static final String CELL_RADIO_LTE = "lte"; public static final int UNKNOWN_CID = -1; public static final int UNKNOWN_SIGNAL = -1000; public static final Parcelable.Creator<CellInfo> CREATOR = new Parcelable.Creator<CellInfo>() { + @Override public CellInfo createFromParcel(Parcel in) { return new CellInfo(in); } + @Override public CellInfo[] newArray(int size) { return new CellInfo[size]; } }; private String mRadio; private String mCellRadio;
--- a/toolkit/components/places/UnifiedComplete.js +++ b/toolkit/components/places/UnifiedComplete.js @@ -854,21 +854,22 @@ Search.prototype = { }); return true; }, _matchSearchEngineAlias: function* () { if (this._searchTokens.length < 2) return false; - let match = yield PlacesSearchAutocompleteProvider.findMatchByAlias( - this._searchTokens[0]); + let alias = this._searchTokens[0]; + let match = yield PlacesSearchAutocompleteProvider.findMatchByAlias(alias); if (!match) return false; + match.engineAlias = alias; let query = this._searchTokens.slice(1).join(" "); yield this._addSearchEngineMatch(match, query); return true; }, _matchCurrentSearchEngine: function* () { let match = yield PlacesSearchAutocompleteProvider.getDefaultMatch(); @@ -876,21 +877,25 @@ Search.prototype = { return; let query = this._originalSearchString; yield this._addSearchEngineMatch(match, query); }, _addSearchEngineMatch: function* (match, query) { - let value = makeActionURL("searchengine", { + let actionURLParams = { engineName: match.engineName, input: this._originalSearchString, searchQuery: query, - }); + }; + if (match.engineAlias) { + actionURLParams.alias = match.engineAlias; + } + let value = makeActionURL("searchengine", actionURLParams); this._addMatch({ value: value, comment: match.engineName, icon: match.iconUrl, style: "action searchengine", finalCompleteValue: this._trimmedOriginalSearchString, frecency: FRECENCY_SEARCHENGINES_DEFAULT,
--- a/toolkit/components/places/tests/unifiedcomplete/test_searchEngine_alias.js +++ b/toolkit/components/places/tests/unifiedcomplete/test_searchEngine_alias.js @@ -15,19 +15,19 @@ add_task(function*() { search: "doit", searchParam: "enable-actions", matches: [ { uri: makeActionURI("searchengine", {engineName: "MozSearch", input: "doit", searchQuery: "doit"}), title: "MozSearch" }, ] }); yield check_autocomplete({ search: "doit mozilla", searchParam: "enable-actions", - matches: [ { uri: makeActionURI("searchengine", {engineName: "AliasedMozSearch", input: "doit mozilla", searchQuery: "mozilla"}), title: "AliasedMozSearch" }, ] + matches: [ { uri: makeActionURI("searchengine", {engineName: "AliasedMozSearch", input: "doit mozilla", searchQuery: "mozilla", alias: "doit"}), title: "AliasedMozSearch" }, ] }); yield check_autocomplete({ search: "doit mozzarella mozilla", searchParam: "enable-actions", - matches: [ { uri: makeActionURI("searchengine", {engineName: "AliasedMozSearch", input: "doit mozzarella mozilla", searchQuery: "mozzarella mozilla"}), title: "AliasedMozSearch" }, ] + matches: [ { uri: makeActionURI("searchengine", {engineName: "AliasedMozSearch", input: "doit mozzarella mozilla", searchQuery: "mozzarella mozilla", alias: "doit"}), title: "AliasedMozSearch" }, ] }); yield cleanup(); });
--- a/toolkit/content/widgets/autocomplete.xml +++ b/toolkit/content/widgets/autocomplete.xml @@ -1581,19 +1581,25 @@ extends="chrome://global/content/binding } else if (action.type == "searchengine") { emphasiseUrl = false; let sourceStr = this._stringBundle.GetStringFromName("searchWithEngineForQuery"); title = this._generateEmphasisPairs(sourceStr, [ [action.params.engineName, false], [action.params.searchQuery, true] ]); - // Remove the image, so we can style it ourselves with a generic - // search icon. - this.removeAttribute("image"); + // If this is a default search match, we remove the image so we + // can style it ourselves with a generic search icon. + // We don't do this when matching an aliased search engine, + // because the icon helps with recognising which engine will be + // used (when using the default engine, we don't need that + // recognition). + if (!action.params.alias) { + this.removeAttribute("image"); + } } else if (action.type == "visiturl") { emphasiseUrl = false; url = action.params.url; let sourceStr = this._stringBundle.GetStringFromName("visitURL"); title = this._generateEmphasisPairs(sourceStr, [ [trimURL(url), true], ]);
--- a/toolkit/devtools/server/actors/string.js +++ b/toolkit/devtools/server/actors/string.js @@ -74,32 +74,29 @@ exports.ShortLongString = Class({ release: function() { this.str = null; return promise.resolve(undefined); } }) exports.LongStringFront = protocol.FrontClass(exports.LongStringActor, { - initialize: function(client, form) { - // Don't give the form by default, because we're being tricky and it might just - // be a string. - protocol.Front.prototype.initialize.call(this, client, null); - this.form(form); + initialize: function(client) { + protocol.Front.prototype.initialize.call(this, client); }, destroy: function() { this.initial = null; this.length = null; this.strPromise = null; protocol.Front.prototype.destroy.call(this); }, form: function(form) { - this.actorID = form.actorID; + this.actorID = form.actor; this.initial = form.initial; this.length = form.length; }, string: function() { if (!this.strPromise) { let promiseRest = (thusFar) => { if (thusFar.length === this.length)
--- a/toolkit/devtools/server/actors/timeline.js +++ b/toolkit/devtools/server/actors/timeline.js @@ -18,19 +18,21 @@ * * When markers are available, an event is emitted: * TimelineFront.on("markers", function(markers) {...}) * */ const {Ci, Cu} = require("chrome"); const protocol = require("devtools/server/protocol"); -const {method, Arg, RetVal} = protocol; +const {method, Arg, RetVal, Option} = protocol; const events = require("sdk/event/core"); const {setTimeout, clearTimeout} = require("sdk/timers"); +const {MemoryActor} = require("devtools/server/actors/memory"); +const {FramerateActor} = require("devtools/server/actors/framerate"); // How often do we pull markers from the docShells, and therefore, how often do // we send events to the front (knowing that when there are no markers in the // docShell, no event is sent). const DEFAULT_TIMELINE_DATA_PULL_TIMEOUT = 200; // ms /** * The timeline actor pops and forwards timeline markers registered in docshells. @@ -45,16 +47,36 @@ let TimelineActor = exports.TimelineActo * properties: * - start {Number} ms * - end {Number} ms * - name {String} */ "markers" : { type: "markers", markers: Arg(0, "array:json") + }, + + /** + * "memory" events emitted in tandem with "markers", if this was enabled + * when the recording started. + */ + "memory" : { + type: "memory", + delta: Arg(0, "number"), + measurement: Arg(1, "json") + }, + + /** + * "ticks" events (from the refresh driver) emitted in tandem with "markers", + * if this was enabled when the recording started. + */ + "ticks" : { + type: "ticks", + delta: Arg(0, "number"), + timestamps: Arg(1, "array:number") } }, initialize: function(conn, tabActor) { protocol.Actor.prototype.initialize.call(this, conn); this.tabActor = tabActor; this._isRecording = false; @@ -117,16 +139,22 @@ let TimelineActor = exports.TimelineActo let markers = []; for (let docShell of this.docShells) { markers = [...markers, ...docShell.popProfileTimelineMarkers()]; } if (markers.length > 0) { events.emit(this, "markers", markers); } + if (this._memoryActor) { + events.emit(this, "memory", Date.now(), this._memoryActor.measure()); + } + if (this._framerateActor) { + events.emit(this, "ticks", Date.now(), this._framerateActor.getPendingTicks()); + } this._dataPullTimeout = setTimeout(() => { this._pullTimelineData(); }, DEFAULT_TIMELINE_DATA_PULL_TIMEOUT); }, /** * Are we recording profile markers currently? @@ -138,38 +166,60 @@ let TimelineActor = exports.TimelineActo response: { value: RetVal("boolean") } }), /** * Start recording profile markers. */ - start: method(function() { + start: method(function({ withMemory, withTicks }) { if (this._isRecording) { return; } this._isRecording = true; for (let docShell of this.docShells) { docShell.recordProfileTimelineMarkers = true; } + if (withMemory) { + this._memoryActor = new MemoryActor(this.conn, this.tabActor); + events.emit(this, "memory", Date.now(), this._memoryActor.measure()); + } + if (withTicks) { + this._framerateActor = new FramerateActor(this.conn, this.tabActor); + this._framerateActor.startRecording(); + } + this._pullTimelineData(); - }, {}), + }, { + request: { + withMemory: Option(0, "boolean"), + withTicks: Option(0, "boolean") + } + }), /** * Stop recording profile markers. */ stop: method(function() { if (!this._isRecording) { return; } this._isRecording = false; + if (this._memoryActor) { + this._memoryActor = null; + } + if (this._framerateActor) { + this._framerateActor.stopRecording(); + this._framerateActor = null; + } + for (let docShell of this.docShells) { docShell.recordProfileTimelineMarkers = false; } clearTimeout(this._dataPullTimeout); }, {}), /**
--- a/toolkit/devtools/server/actors/webaudio.js +++ b/toolkit/devtools/server/actors/webaudio.js @@ -293,17 +293,21 @@ let AudioNodeActor = exports.AudioNodeAc }); /** * The corresponding Front object for the AudioNodeActor. */ let AudioNodeFront = protocol.FrontClass(AudioNodeActor, { initialize: function (client, form) { protocol.Front.prototype.initialize.call(this, client, form); - this.manage(this); + // if we were manually passed a form, this was created manually and + // needs to own itself for now. + if (form) { + this.manage(this); + } } }); /** * The Web Audio Actor handles simple interaction with an AudioContext * high-level methods. After instantiating this actor, you'll need to set it * up by calling setup(). */ @@ -430,16 +434,18 @@ let WebAudioActor = exports.WebAudioActo * to hibernation. This method is called automatically just before the * actor is destroyed. */ finalize: method(function() { if (!this._initialized) { return; } this._initialized = false; + systemOff("webaudio-node-demise", this._onDestroyNode); + off(this.tabActor, "window-destroyed", this._onGlobalDestroyed); off(this.tabActor, "window-ready", this._onGlobalCreated); this.tabActor = null; this._nativeToActorID = null; this._callWatcher.eraseRecording(); this._callWatcher.finalize(); this._callWatcher = null; }, {
--- a/toolkit/devtools/server/protocol.js +++ b/toolkit/devtools/server/protocol.js @@ -140,16 +140,17 @@ function identityWrite(v) { * @returns a type object that can be used in protocol definitions. */ types.addType = function(name, typeObject={}, options={}) { if (registeredTypes.has(name)) { throw Error("Type '" + name + "' already exists."); } let type = object.merge({ + toString() { return "[protocol type:" + name + "]"}, name: name, primitive: !(typeObject.read || typeObject.write), read: identityWrite, write: identityWrite }, typeObject); registeredTypes.set(name, type); @@ -253,38 +254,56 @@ types.addActorType = function(name) { return ctx.conn.getActor(v); } // Reading a response on the client side, check for an // existing front on the connection, and create the front // if it isn't found. let actorID = typeof(v) === "string" ? v : v.actor; let front = ctx.conn.getActor(actorID); - if (front) { - front.form(v, detail, ctx); - } else { - front = new type.frontClass(ctx.conn, v, detail, ctx) + if (!front) { + front = new type.frontClass(ctx.conn); front.actorID = actorID; ctx.marshallPool().manage(front); } + + v = type.formType(detail).read(v, front, detail); + front.form(v, detail, ctx); + return front; }, write: (v, ctx, detail) => { // If returning a response from the server side, make sure // the actor is added to a parent object and return its form. if (v instanceof Actor) { if (!v.actorID) { ctx.marshallPool().manage(v); } - return v.form(detail); + return type.formType(detail).write(v.form(detail), ctx, detail); } // Writing a request from the client side, just send the actor id. return v.actorID; }, + formType: (detail) => { + if (!("formType" in type.actorSpec)) { + return types.Primitive; + } + + let formAttr = "formType"; + if (detail) { + formAttr += "#" + detail; + } + + if (!(formAttr in type.actorSpec)) { + throw new Error("No type defined for " + formAttr); + } + + return type.actorSpec[formAttr]; + } }, { // We usually freeze types, but actor types are updated when clients are // created, so don't freeze yet. thawed: true }); return type; } @@ -819,16 +838,18 @@ let Actor = Class({ let sendEvent = this._sendEvent.bind(this, name) this.on(name, (...args) => { sendEvent.apply(null, args); }); } } }, + toString: function() { return "[Actor " + this.typeName + "/" + this.actorID + "]" }, + _sendEvent: function(name, ...args) { if (!this._actorSpec.events.has(name)) { // It's ok to emit events that don't go over the wire. return; } let request = this._actorSpec.events.get(name); let packet; try { @@ -903,23 +924,34 @@ let actorProto = function(actorProto) { if (actorProto._actorSpec) { throw new Error("actorProto called twice on the same actor prototype!"); } let protoSpec = { methods: [], }; - // Find method specifications attached to prototype properties. + // Find method and form specifications attached to prototype properties. for (let name of Object.getOwnPropertyNames(actorProto)) { let desc = Object.getOwnPropertyDescriptor(actorProto, name); if (!desc.value) { continue; } + if (name.startsWith("formType")) { + if (typeof(desc.value) === "string") { + protoSpec[name] = types.getType(desc.value); + } else if (desc.value.name && registeredTypes.has(desc.value.name)) { + protoSpec[name] = desc.value; + } else { + // Shorthand for a newly-registered DictType. + protoSpec[name] = types.addDictType(actorProto.typeName + "__" + name, desc.value); + } + } + if (desc.value._methodSpec) { let frozenSpec = desc.value._methodSpec; let spec = {}; spec.name = frozenSpec.name || name; spec.request = Request(object.merge({type: spec.name}, frozenSpec.request || undefined)); spec.response = Response(frozenSpec.response || undefined); spec.telemetry = frozenSpec.telemetry; spec.release = frozenSpec.release; @@ -1039,18 +1071,24 @@ let Front = Class({ * conn can be null if the subclass provides a conn property. * @param optional form * The json form provided by the server. * @constructor */ initialize: function(conn=null, form=null, detail=null, context=null) { Pool.prototype.initialize.call(this, conn); this._requests = []; + + // protocol.js no longer uses this data in the constructor, only external + // uses do. External usage of manually-constructed fronts will be + // drastically reduced if we convert the root and tab actors to + // protocol.js, in which case this can probably go away. if (form) { this.actorID = form.actor; + form = types.getType(this.typeName).formType(detail).read(form, this, detail); this.form(form, detail, context); } }, destroy: function() { // Reject all outstanding requests, they won't make sense after // the front is destroyed. while (this._requests && this._requests.length > 0) { @@ -1115,16 +1153,17 @@ let Front = Class({ let type = packet.type || undefined; if (this._clientSpec.events && this._clientSpec.events.has(type)) { let event = this._clientSpec.events.get(packet.type); let args; try { args = event.request.read(packet, this); } catch(ex) { console.error("Error reading event: " + packet.type); + console.exception(ex); throw ex; } if (event.pre) { event.pre.forEach((pre) => pre.apply(this, args)); } events.emit.apply(null, [this, event.name].concat(args)); return; }
--- a/toolkit/devtools/server/tests/browser/browser.ini +++ b/toolkit/devtools/server/tests/browser/browser.ini @@ -14,10 +14,12 @@ support-files = timeline-iframe-parent.html [browser_navigateEvents.js] [browser_storage_dynamic_windows.js] [browser_storage_listings.js] [browser_storage_updates.js] [browser_timeline.js] skip-if = buildapp == 'mulet' +[browser_timeline_actors.js] +skip-if = buildapp == 'mulet' [browser_timeline_iframes.js] skip-if = buildapp == 'mulet'
new file mode 100644 --- /dev/null +++ b/toolkit/devtools/server/tests/browser/browser_timeline_actors.js @@ -0,0 +1,69 @@ +/* vim: set ft=javascript ts=2 et sw=2 tw=80: */ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Test that the timeline can also record data from the memory and framerate +// actors, emitted as events in tadem with the markers. + +const {TimelineFront} = require("devtools/server/actors/timeline"); + +let test = asyncTest(function*() { + let doc = yield addTab("data:text/html;charset=utf-8,mop"); + + initDebuggerServer(); + let client = new DebuggerClient(DebuggerServer.connectPipe()); + let form = yield connectDebuggerClient(client); + let front = TimelineFront(client, form); + + info("Start timeline marker recording"); + yield front.start({ withMemory: true, withTicks: true }); + + let updatedMemory = 0; + let updatedTicks = 0; + + front.on("memory", (delta, measurement) => { + ok(delta > 0, "The delta should be a timestamp."); + ok(measurement, "The measurement should not be null."); + ok(measurement.total > 0, "There should be a 'total' value in the measurement."); + info("Received 'memory' event at " + delta + " with " + measurement.toSource()); + updatedMemory++; + }); + + front.on("ticks", (delta, ticks) => { + ok(delta > 0, "The delta should be a timestamp."); + ok(ticks, "The ticks should not be null."); + info("Received 'ticks' event with " + ticks.toSource()); + updatedTicks++; + }); + + ok((yield waitUntil(() => updatedMemory > 1)), + "Some memory measurements were emitted."); + ok((yield waitUntil(() => updatedTicks > 1)), + "Some refresh driver ticks were emitted."); + + info("Stop timeline marker recording"); + yield front.stop(); + yield closeDebuggerClient(client); + gBrowser.removeCurrentTab(); +}); + +/** + * Waits until a predicate returns true. + * + * @param function predicate + * Invoked once in a while until it returns true. + * @param number interval [optional] + * How often the predicate is invoked, in milliseconds. + */ +function waitUntil(predicate, interval = 10) { + if (predicate()) { + return promise.resolve(true); + } + let deferred = promise.defer(); + setTimeout(function() { + waitUntil(predicate).then(() => deferred.resolve(true)); + }, interval); + return deferred.promise; +}
--- a/toolkit/devtools/server/tests/unit/test_protocol_children.js +++ b/toolkit/devtools/server/tests/unit/test_protocol_children.js @@ -229,17 +229,19 @@ let RootFront = protocol.FrontClass(Root this.actorID = "root"; protocol.Front.prototype.initialize.call(this, client); // Root actor owns itself. this.manage(this); }, getTemporaryChild: protocol.custom(function(id) { if (!this._temporaryHolder) { - this._temporaryHolder = this.manage(new protocol.Front(this.conn, {actor: this.actorID + "_temp"})); + this._temporaryHolder = protocol.Front(this.conn); + this._temporaryHolder.actorID = this.actorID + "_temp"; + this._temporaryHolder = this.manage(this._temporaryHolder); } return this._getTemporaryChild(id); },{ impl: "_getTemporaryChild" }), clearTemporaryChildren: protocol.custom(function() { if (!this._temporaryHolder) {
new file mode 100644 --- /dev/null +++ b/toolkit/devtools/server/tests/unit/test_protocol_formtype.js @@ -0,0 +1,160 @@ +let protocol = devtools.require("devtools/server/protocol"); +let {method, Arg, Option, RetVal} = protocol; + +protocol.types.addActorType("child"); +protocol.types.addActorType("root"); + +// The child actor doesn't provide a form description +let ChildActor = protocol.ActorClass({ + typeName: "child", + initialize(conn) { + protocol.Actor.prototype.initialize.call(this, conn); + }, + + form(detail) { + return { + actor: this.actorID, + extra: "extra" + } + }, + + getChild: method(function() { + return this; + }, { + response: RetVal("child") + }), +}); + +let ChildFront = protocol.FrontClass(ChildActor, { + initialize(client) { + protocol.Front.prototype.initialize.call(this, client); + }, + + form(v, ctx, detail) { + this.extra = v.extra; + } +}); + +// The root actor does provide a form description. +let RootActor = protocol.ActorClass({ + typeName: "root", + initialize(conn) { + protocol.Actor.prototype.initialize.call(this, conn); + this.manage(this); + this.child = new ChildActor(); + }, + + // Basic form type, relies on implicit DictType creation + formType: { + childActor: "child" + }, + + sayHello() { + return { + from: "root", + applicationType: "xpcshell-tests", + traits: [] + } + }, + + // This detail uses explicit DictType creation + "formType#detail1": protocol.types.addDictType("RootActorFormTypeDetail1", { + detailItem: "child" + }), + + // This detail a string type. + "formType#actorid": "string", + + form(detail) { + if (detail === "detail1") { + return { + actor: this.actorID, + detailItem: this.child + } + } else if (detail === "actorid") { + return this.actorID; + } + + return { + actor: this.actorID, + childActor: this.child + } + }, + + getDefault: method(function() { + return this; + }, { + response: RetVal("root") + }), + + getDetail1: method(function() { + return this; + }, { + response: RetVal("root#detail1") + }), + + getDetail2: method(function() { + return this; + }, { + response: { + item: RetVal("root#actorid") + } + }), + + getUnknownDetail: method(function() { + return this; + }, { + response: RetVal("root#unknownDetail") + }), +}); + +let RootFront = protocol.FrontClass(RootActor, { + initialize(client) { + this.actorID = "root"; + protocol.Front.prototype.initialize.call(this, client); + + // Root owns itself. + this.manage(this); + }, + + form(v, ctx, detail) { + this.lastForm = v; + } +}); + +const run_test = Test(function*() { + DebuggerServer.createRootActor = (conn => { + return RootActor(conn); + }); + DebuggerServer.init(() => true); + + const connection = DebuggerServer.connectPipe(); + const conn = new DebuggerClient(connection); + const client = Async(conn); + + yield client.connect(); + + let rootFront = RootFront(conn); + + // Trigger some methods that return forms. + let retval = yield rootFront.getDefault(); + do_check_true(retval instanceof RootFront); + do_check_true(rootFront.lastForm.childActor instanceof ChildFront); + + retval = yield rootFront.getDetail1(); + do_check_true(retval instanceof RootFront); + do_check_true(rootFront.lastForm.detailItem instanceof ChildFront); + + retval = yield rootFront.getDetail2(); + do_check_true(retval instanceof RootFront); + do_check_true(typeof(rootFront.lastForm) === "string"); + + // getUnknownDetail should fail, since no typeName is specified. + try { + yield rootFront.getUnknownDetail(); + do_check_true(false); + } catch(ex) { + } + + yield client.close(); +});
--- a/toolkit/devtools/server/tests/unit/xpcshell.ini +++ b/toolkit/devtools/server/tests/unit/xpcshell.ini @@ -60,16 +60,17 @@ support-files = [test_eval-02.js] [test_eval-03.js] [test_eval-04.js] [test_eval-05.js] [test_protocol_async.js] [test_protocol_simple.js] [test_protocol_longstring.js] [test_protocol_children.js] +[test_protocol_formtype.js] [test_breakpoint-01.js] [test_register_actor.js] skip-if = toolkit == "gonk" reason = bug 820380 [test_breakpoint-02.js] skip-if = toolkit == "gonk" reason = bug 820380 [test_breakpoint-03.js]
--- a/toolkit/modules/BrowserUtils.jsm +++ b/toolkit/modules/BrowserUtils.jsm @@ -174,9 +174,34 @@ this.BrowserUtils = { // Special case: ignore "www" prefix if it is part of host string let [longHost, shortHost] = linkHost.length > docHost.length ? [linkHost, docHost] : [docHost, linkHost]; if (longHost == "www." + shortHost) return originalTarget; return "_blank"; }, + + /** + * Map the plugin's name to a filtered version more suitable for UI. + * + * @param aName The full-length name string of the plugin. + * @return the simplified name string. + */ + makeNicePluginName: function (aName) { + if (aName == "Shockwave Flash") + return "Adobe Flash"; + // Regex checks if aName begins with "Java" + non-letter char + if (/^Java\W/.exec(aName)) + return "Java"; + + // Clean up the plugin name by stripping off parenthetical clauses, + // trailing version numbers or "plugin". + // EG, "Foo Bar (Linux) Plugin 1.23_02" --> "Foo Bar" + // Do this by first stripping the numbers, etc. off the end, and then + // removing "Plugin" (and then trimming to get rid of any whitespace). + // (Otherwise, something like "Java(TM) Plug-in 1.7.0_07" gets mangled) + let newName = aName.replace(/\(.*?\)/g, ""). + replace(/[\s\d\.\-\_\(\)]+$/, ""). + replace(/\bplug-?in\b/i, "").trim(); + return newName; + }, };
new file mode 100644 --- /dev/null +++ b/webapprt/test/chrome/browser_install-app.js @@ -0,0 +1,49 @@ +Cu.import("resource://gre/modules/Services.jsm"); +let { WebappOSUtils } = Cu.import("resource://gre/modules/WebappOSUtils.jsm", {}); + +let url = "http://test/webapprtChrome/webapprt/test/chrome/sample.webapp"; + +function test() { + waitForExplicitFinish(); + + loadWebapp("install-app.webapp", undefined, function onLoad() { + + let dialogShown = false; + + let winObserver = function(win, topic) { + if (topic == "domwindowopened") { + win.addEventListener("load", function onLoadWindow() { + win.removeEventListener("load", onLoadWindow, false); + + if (win.document.documentURI == "chrome://global/content/commonDialog.xul") { + dialogShown = true; + + executeSoon(() => { + win.document.documentElement.acceptDialog(); + }); + } + }, false); + } + } + + Services.ww.registerNotification(winObserver); + + registerCleanupFunction(function() { + Services.ww.unregisterNotification(winObserver); + }); + + let request = navigator.mozApps.install(url); + request.onsuccess = function() { + ok(dialogShown, "Install app dialog shown"); + ok(request.result, "App installed"); + + navigator.mozApps.mgmt.uninstall(request.result).onsuccess = function() { + finish(); + } + } + request.onerror = function() { + ok(false, "Not installed: " + request.error.name); + finish(); + } + }); +}
new file mode 100644 --- /dev/null +++ b/webapprt/test/chrome/install-app.html @@ -0,0 +1,10 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Install Test App</title> + <meta charset="utf-8"> + </head> + <body> + <h1>Install Test App</h1> + </body> +</html>
new file mode 100644 --- /dev/null +++ b/webapprt/test/chrome/install-app.webapp @@ -0,0 +1,5 @@ +{ + "name": "Install Test App", + "description": "an app for testing installing apps", + "launch_path": "/webapprtChrome/webapprt/test/chrome/install-app.html" +}
new file mode 100644 --- /dev/null +++ b/webapprt/test/chrome/install-app.webapp^headers^ @@ -0,0 +1,1 @@ +Content-Type: application/x-web-app-manifest+json
--- a/webapprt/test/chrome/webapprt.ini +++ b/webapprt/test/chrome/webapprt.ini @@ -41,23 +41,27 @@ support-files = window-open-blank.html alarm.html alarm.webapp alarm.webapp^headers^ download.html download.webapp download.webapp^headers^ download.test + install-app.html + install-app.webapp + install-app.webapp^headers^ -[browser_sample.js] -[browser_window-title.js] -[browser_webperm.js] +[browser_alarm.js] +[browser_debugger.js] +[browser_download.js] +[browser_geolocation-prompt-noperm.js] +[browser_geolocation-prompt-perm.js] +[browser_getUserMedia.js] +[browser_install-app.js] +[browser_mozpay.js] [browser_noperm.js] -[browser_geolocation-prompt-perm.js] -[browser_geolocation-prompt-noperm.js] -[browser_debugger.js] -[browser_mozpay.js] -[browser_getUserMedia.js] +[browser_sample.js] +[browser_webperm.js] +[browser_window-open-blank.js] [browser_window-open-self.js] [browser_window-open.js] -[browser_window-open-blank.js] -[browser_alarm.js] -[browser_download.js] +[browser_window-title.js]