{"size": 605619, "ext": "js", "max_stars_repo_path": "dist/main.01466b0fd0483c10c4ff.js", "max_stars_repo_name": "davichoso/davichoso.github.io", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dist/main.01466b0fd0483c10c4ff.js", "max_issues_repo_name": "davichoso/davichoso.github.io", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dist/main.01466b0fd0483c10c4ff.js", "max_forks_repo_name": "davichoso/davichoso.github.io", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 302809.5, "max_line_length": 605565, "alphanum_fraction": 0.713380855}
webpackJsonp([1],[,,,,,,,,,,,,function(t,e,n){"use strict";var r=n(1237),i=n(1234),o=n(1236),a=n(1232),s=n(1233),u=n(1235),c={allowsArrayErrors:!0,empty:{},emptyList:[],getIn:i.a,setIn:o.a,deepEqual:a.a,deleteIn:s.a,fromJS:function(t){return t},keys:u.a,size:function(t){return t?t.length:0},splice:r.a,toJS:function(t){return t}};e.a=c},,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r=Array.isArray;e.a=r},,,,,,,,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n=function(n){function a(){return r(this,a),i(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return o(a,n),u(a,[{key:"getRenderedComponent",value:function(){return this.refs.component}},{key:"render",value:function(){return(0,c.createElement)(t,s({},e(this.props),{ref:"component"}))}}]),a}(c.Component);return n.displayName="ReduxFormMaterialUI"+t.name,n}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.default=a;var c=n(0)},,,,,function(t,e,n){"use strict";function r(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}e.a=r},,,,,,,,function(t,e,n){"use strict";function r(t,e){var r=n.i(o.a)(t,e);return n.i(i.a)(r)?r:void 0}var i=n(670),o=n(701);e.a=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"errorText",n=t.meta;n=void 0===n?{}:n;var a=n.touched,s=n.error,u=n.warning,c=t.input,l=i(t,["meta","input"]);return a&&(s||u)?o({},l,c,r({},e,s||u)):o({},c,l)};e.default=a},function(t,e,n){"use strict";function r(){function t(t){p(v[t],"delete"),delete v[t]}function e(t){return t=t||s,a(v,t)||i("no-app",{name:t}),v[t]}function u(t,e){if(void 0===e&&(e={}),"object"!=typeof e||null===e){e={name:e}}var n=e;void 0===n.name&&(n.name=s);var r=n.name;"string"==typeof r&&r||i("bad-app-name",{name:r+""}),a(v,r)&&i("duplicate-app",{name:r});var o=new c(t,n,_);return v[r]=o,p(o,"create"),o}function l(){return Object.keys(v).map(function(t){return v[t]})}function h(t,r,a,s,u){y[t]&&i("duplicate-service",{name:t}),y[t]=r,s&&(g[t]=s,l().forEach(function(t){s("create",t)}));var h=function(n){return void 0===n&&(n=e()),"function"!=typeof n[t]&&i("invalid-app-argument",{name:t}),n[t]()};return void 0!==a&&n.i(o.deepExtend)(h,a),_[t]=h,c.prototype[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._getService.bind(this,t).apply(this,u?e:[])},h}function f(t){n.i(o.deepExtend)(_,t)}function p(t,e){Object.keys(y).forEach(function(n){var r=d(t,n);null!==r&&g[r]&&g[r](e,t)})}function d(t,e){if("serverAuth"===e)return null;var n=e;t.options;return n}var v={},y={},g={},_={__esModule:!0,initializeApp:u,app:e,apps:null,Promise:Promise,SDK_VERSION:"4.13.0",INTERNAL:{registerService:h,createFirebaseNamespace:r,extendNamespace:f,createSubscribe:o.createSubscribe,ErrorFactory:o.ErrorFactory,removeApp:t,factories:y,useAsService:d,Promise:Promise,deepExtend:o.deepExtend}};return n.i(o.patchProperty)(_,"default",_),Object.defineProperty(_,"apps",{get:l}),n.i(o.patchProperty)(e,"App",c),_}function i(t,e){throw h.create(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"firebase",function(){return f});var o=n(179),a=(n.n(o),function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}),s="[DEFAULT]",u=[],c=function(){function t(t,e,r){this.firebase_=r,this.isDeleted_=!1,this.services_={},this.name_=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled||!1,this.options_=n.i(o.deepCopy)(t),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(t){u.push(t),setTimeout(function(){return t(null)},0)},removeAuthTokenListener:function(t){u=u.filter(function(e){return e!==t})}}}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this._automaticDataCollectionEnabled},set:function(t){this.checkDestroyed_(),this._automaticDataCollectionEnabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise(function(e){t.checkDestroyed_(),e()}).then(function(){t.firebase_.INTERNAL.removeApp(t.name_);var e=[];return Object.keys(t.services_).forEach(function(n){Object.keys(t.services_[n]).forEach(function(r){e.push(t.services_[n][r])})}),Promise.all(e.map(function(t){return t.INTERNAL.delete()}))}).then(function(){t.isDeleted_=!0,t.services_={}})},t.prototype._getService=function(t,e){if(void 0===e&&(e=s),this.checkDestroyed_(),this.services_[t]||(this.services_[t]={}),!this.services_[t][e]){var n=e!==s?e:void 0,r=this.firebase_.INTERNAL.factories[t](this,this.extendApp.bind(this),n);this.services_[t][e]=r}return this.services_[t][e]},t.prototype.extendApp=function(t){var e=this;n.i(o.deepExtend)(this,t),t.INTERNAL&&t.INTERNAL.addAuthTokenListener&&(u.forEach(function(t){e.INTERNAL.addAuthTokenListener(t)}),u=[])},t.prototype.checkDestroyed_=function(){this.isDeleted_&&i("app-deleted",{name:this.name_})},t}();c.prototype.name&&c.prototype.options||c.prototype.delete||console.log("dc");var l={"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."},h=new o.ErrorFactory("app","Firebase",l),f=r();e.default=f},,,,,function(t,e,n){"use strict";function r(t){if("string"==typeof t||n.i(i.a)(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}var i=n(142),o=1/0;e.a=r},function(t,e,n){"use strict";function r(t,e){return t===e||t!==t&&e!==e}e.a=r},,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"mapProps",function(){return g}),n.d(e,"withProps",function(){return S}),n.d(e,"withPropsOnChange",function(){return C}),n.d(e,"withHandlers",function(){return O}),n.d(e,"defaultProps",function(){return A}),n.d(e,"renameProp",function(){return N}),n.d(e,"renameProps",function(){return D}),n.d(e,"flattenProp",function(){return x}),n.d(e,"withState",function(){return F}),n.d(e,"withStateHandlers",function(){return L}),n.d(e,"withReducer",function(){return j}),n.d(e,"branch",function(){return U}),n.d(e,"renderComponent",function(){return V}),n.d(e,"renderNothing",function(){return B}),n.d(e,"shouldUpdate",function(){return q}),n.d(e,"pure",function(){return H}),n.d(e,"onlyUpdateForKeys",function(){return K}),n.d(e,"onlyUpdateForPropTypes",function(){return G}),n.d(e,"withContext",function(){return z}),n.d(e,"getContext",function(){return Q}),n.d(e,"lifecycle",function(){return Y}),n.d(e,"toClass",function(){return $}),n.d(e,"setStatic",function(){return p}),n.d(e,"setPropTypes",function(){return J}),n.d(e,"setDisplayName",function(){return d}),n.d(e,"compose",function(){return r}),n.d(e,"getDisplayName",function(){return v}),n.d(e,"wrapDisplayName",function(){return y}),n.d(e,"isClassComponent",function(){return X}),n.d(e,"createSink",function(){return Z}),n.d(e,"componentFromProp",function(){return tt}),n.d(e,"nest",function(){return et}),n.d(e,"hoistStatics",function(){return nt}),n.d(e,"componentFromStream",function(){return st}),n.d(e,"componentFromStreamWithConfig",function(){return at}),n.d(e,"mapPropsStream",function(){return lt}),n.d(e,"mapPropsStreamWithConfig",function(){return ct}),n.d(e,"createEventHandler",function(){return ft}),n.d(e,"createEventHandlerWithConfig",function(){return ht}),n.d(e,"setObservableConfig",function(){return it});var i=n(0),o=n.n(i),a=n(78),s=n.n(a),u=n(1161),c=n.n(u),l=n(554),h=(n.n(l),n(510)),f=n.n(h);n.d(e,"shallowEqual",function(){return s.a});var p=function(t,e){return function(n){return n[t]=e,n}},d=function(t){return p("displayName",t)},v=function(t){if("string"==typeof t)return t;if(t)return t.displayName||t.name||"Component"},y=function(t,e){return e+"("+v(t)+")"},g=function(t){return function(e){var r=n.i(i.createFactory)(e),o=function(e){return r(t(e))};return o}},_=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},m=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},b=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},w=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},E=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},S=function(t){var e=g(function(e){return m({},e,"function"==typeof t?t(e):t)});return e},T=function(t,e){for(var n={},r=0;r<e.length;r++){var i=e[r];t.hasOwnProperty(i)&&(n[i]=t[i])}return n},C=function(t,e){return function(r){var o=n.i(i.createFactory)(r),a="function"==typeof t?t:function(e,n){return!s()(T(e,t),T(n,t))},u=function(t){function n(){var r,i,o;_(this,n);for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];return r=i=E(this,t.call.apply(t,[this].concat(s))),i.computedProps=e(i.props),o=r,E(i,o)}return b(n,t),n.prototype.componentWillReceiveProps=function(t){a(this.props,t)&&(this.computedProps=e(t))},n.prototype.render=function(){return o(m({},this.props,this.computedProps))},n}(i.Component);return u}},I=function(t,e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r],r));return n},O=function(t){return function(e){var r=n.i(i.createFactory)(e),o=function(t){function e(){var n,r,i;_(this,e);for(var o=arguments.length,s=Array(o),u=0;u<o;u++)s[u]=arguments[u];return n=r=E(this,t.call.apply(t,[this].concat(s))),a.call(r),i=n,E(r,i)}return b(e,t),e.prototype.componentWillReceiveProps=function(){this.cachedHandlers={}},e.prototype.render=function(){return r(m({},this.props,this.handlers))},e}(i.Component),a=function(){var e=this;this.cachedHandlers={},this.handlers=I("function"==typeof t?t(this.props):t,function(t,n){return function(){var r=e.cachedHandlers[n];if(r)return r.apply(void 0,arguments);var i=t(e.props);return e.cachedHandlers[n]=i,i.apply(void 0,arguments)}})};return o}},A=function(t){return function(e){var r=n.i(i.createFactory)(e),o=function(t){return r(t)};return o.defaultProps=t,o}},R=function(t,e){for(var n=w(t,[]),r=0;r<e.length;r++){var i=e[r];n.hasOwnProperty(i)&&delete n[i]}return n},N=function(t,e){var n=g(function(n){var r;return m({},R(n,[t]),(r={},r[e]=n[t],r))});return n},P=Object.keys,k=function(t,e){return P(t).reduce(function(n,r){var i=t[r];return n[e(i,r)]=i,n},{})},D=function(t){var e=g(function(e){return m({},R(e,P(t)),k(T(e,P(t)),function(e,n){return t[n]}))});return e},x=function(t){return function(e){var r=n.i(i.createFactory)(e),o=function(e){return r(m({},e,e[t]))};return o}},F=function(t,e,r){return function(o){var a=n.i(i.createFactory)(o),s=function(n){function i(){var t,e,o;_(this,i);for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];return t=e=E(this,n.call.apply(n,[this].concat(s))),e.state={stateValue:"function"==typeof r?r(e.props):r},e.updateStateValue=function(t,n){return e.setState(function(e){var n=e.stateValue;return{stateValue:"function"==typeof t?t(n):t}},n)},o=t,E(e,o)}return b(i,n),i.prototype.render=function(){var n;return a(m({},this.props,(n={},n[t]=this.state.stateValue,n[e]=this.updateStateValue,n)))},i}(i.Component);return s}},L=function(t,e){return function(r){var o=n.i(i.createFactory)(r),a=function(t){function e(){var n,r,i;_(this,e);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r=E(this,t.call.apply(t,[this].concat(a))),u.call(r),i=n,E(r,i)}return b(e,t),e.prototype.shouldComponentUpdate=function(t,e){var n=t!==this.props,r=!s()(e,this.state);return n||r},e.prototype.render=function(){return o(m({},this.props,this.state,this.stateUpdaters))},e}(i.Component),u=function(){var n=this;this.state="function"==typeof t?t(this.props):t,this.stateUpdaters=I(e,function(t){return function(e){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];e&&"function"==typeof e.persist&&e.persist(),n.setState(function(n,r){return t(n,r).apply(void 0,[e].concat(i))})}})};return a}},j=function(t,e,r,o){return function(a){var s=n.i(i.createFactory)(a),u=function(n){function i(){var t,e,o;_(this,i);for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];return t=e=E(this,n.call.apply(n,[this].concat(s))),e.state={stateValue:e.initializeStateValue()},e.dispatch=function(t){return e.setState(function(e){var n=e.stateValue;return{stateValue:r(n,t)}})},o=t,E(e,o)}return b(i,n),i.prototype.initializeStateValue=function(){return void 0!==o?"function"==typeof o?o(this.props):o:r(void 0,{type:"@@recompose/INIT"})},i.prototype.render=function(){var n;return s(m({},this.props,(n={},n[t]=this.state.stateValue,n[e]=this.dispatch,n)))},i}(i.Component);return u}},M=function(t){return t},U=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:M;return function(o){var a=void 0,s=void 0,u=function(u){return t(u)?(a=a||n.i(i.createFactory)(e(o)))(u):(s=s||n.i(i.createFactory)(r(o)))(u)};return u}},V=function(t){return function(e){var r=n.i(i.createFactory)(t),o=function(t){return r(t)};return o}},W=function(t){function e(){return _(this,e),E(this,t.apply(this,arguments))}return b(e,t),e.prototype.render=function(){return null},e}(i.Component),B=function(t){return W},q=function(t){return function(e){var r=n.i(i.createFactory)(e),o=function(e){function n(){return _(this,n),E(this,e.apply(this,arguments))}return b(n,e),n.prototype.shouldComponentUpdate=function(e){return t(this.props,e)},n.prototype.render=function(){return r(this.props)},n}(i.Component);return o}},H=function(t){var e=q(function(t,e){return!s()(t,e)});return e(t)},K=function(t){var e=q(function(e,n){return!s()(T(n,t),T(e,t))});return e},G=function(t){var e=t.propTypes,n=Object.keys(e||{}),r=K(n)(t);return r},z=function(t,e){return function(r){var o=n.i(i.createFactory)(r),a=function(t){function n(){var r,i,o;_(this,n);for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];return r=i=E(this,t.call.apply(t,[this].concat(s))),i.getChildContext=function(){return e(i.props)},o=r,E(i,o)}return b(n,t),n.prototype.render=function(){return o(this.props)},n}(i.Component);return a.childContextTypes=t,a}},Q=function(t){return function(e){var r=n.i(i.createFactory)(e),o=function(t,e){return r(m({},t,e))};return o.contextTypes=t,o}},Y=function(t){return function(e){var r=n.i(i.createFactory)(e),o=function(t){function e(){return _(this,e),E(this,t.apply(this,arguments))}return b(e,t),e.prototype.render=function(){return r(m({},this.props,this.state))},e}(i.Component);return Object.keys(t).forEach(function(e){return o.prototype[e]=t[e]}),o}},X=function(t){return Boolean(t&&t.prototype&&"function"==typeof t.prototype.render)},$=function(t){if(X(t))return t;var e=function(e){function n(){return _(this,n),E(this,e.apply(this,arguments))}return b(n,e),n.prototype.render=function(){return"string"==typeof t?o.a.createElement(t,this.props):t(this.props,this.context)},n}(i.Component);return e.displayName=v(t),e.propTypes=t.propTypes,e.contextTypes=t.contextTypes,e.defaultProps=t.defaultProps,e},J=function(t){return p("propTypes",t)},Z=function(t){return function(e){function n(){return _(this,n),E(this,e.apply(this,arguments))}return b(n,e),n.prototype.componentWillMount=function(){t(this.props)},n.prototype.componentWillReceiveProps=function(e){t(e)},n.prototype.render=function(){return null},n}(i.Component)},tt=function(t){var e=function(e){return n.i(i.createElement)(e[t],R(e,[t]))};return e.displayName="componentFromProp("+t+")",e},et=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.map(i.createFactory),o=function(t){var e=w(t,[]),n=t.children;return r.reduceRight(function(t,n){return n(e,t)},n)};return o},nt=function(t){return function(e){var n=t(e);return c()(n,e),n}},rt={fromESObservable:null,toESObservable:null},it=function(t){rt=t},ot={fromESObservable:function(t){return"function"==typeof rt.fromESObservable?rt.fromESObservable(t):t},toESObservable:function(t){return"function"==typeof rt.toESObservable?rt.toESObservable(t):t}},at=function(t){return function(e){return function(r){function i(){var o,a,s,u;_(this,i);for(var c=arguments.length,h=Array(c),p=0;p<c;p++)h[p]=arguments[p];return a=s=E(this,r.call.apply(r,[this].concat(h))),s.state={vdom:null},s.propsEmitter=n.i(l.createChangeEmitter)(),s.props$=t.fromESObservable((o={subscribe:function(t){return{unsubscribe:s.propsEmitter.listen(function(e){e?t.next(e):t.complete()})}}},o[f.a]=function(){return this},o)),s.vdom$=t.toESObservable(e(s.props$)),u=a,E(s,u)}return b(i,r),i.prototype.componentWillMount=function(){var t=this;this.subscription=this.vdom$.subscribe({next:function(e){t.setState({vdom:e})}}),this.propsEmitter.emit(this.props)},i.prototype.componentWillReceiveProps=function(t){this.propsEmitter.emit(t)},i.prototype.shouldComponentUpdate=function(t,e){return e.vdom!==this.state.vdom},i.prototype.componentWillUnmount=function(){this.propsEmitter.emit(),this.subscription.unsubscribe()},i.prototype.render=function(){return this.state.vdom},i}(i.Component)}},st=function(t){return at(ot)(t)},ut=function(t){return t},ct=function(t){var e=at({fromESObservable:ut,toESObservable:ut});return function(r){return function(o){var a=n.i(i.createFactory)(o),s=t.fromESObservable,u=t.toESObservable;return e(function(t){var e;return e={subscribe:function(e){var n=u(r(s(t))).subscribe({next:function(t){return e.next(a(t))}});return{unsubscribe:function(){return n.unsubscribe()}}}},e[f.a]=function(){return this},e})}}},lt=function(t){var e=ct(ot)(t);return e},ht=function(t){return function(){var e,r=n.i(l.createChangeEmitter)(),i=t.fromESObservable((e={subscribe:function(t){return{unsubscribe:r.listen(function(e){return t.next(e)})}}},e[f.a]=function(){return this},e));return{handler:r.emit,stream:i}}},ft=ht(ot)},function(t,e,n){"use strict";function r(t,e){var n=t._reduxForm.sectionPrefix;return n?n+"."+e:e}e.a=r},,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}Object.defineProperty(e,"__esModule",{value:!0}),e.actionTypes=e.Notifications=e.withNotifications=e.reducer=void 0;var o=n(181),a=i(o),s=n(532),u=r(s),c=n(531),l=r(c),h=n(530),f=r(h),p=n(180),d=i(p);e.default=a,e.reducer=u.default,e.withNotifications=l.default,e.Notifications=f.default,e.actionTypes=d},,,,,,,function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(712),o=n(713),a=n(714),s=n(715),u=n(716);r.prototype.clear=i.a,r.prototype.delete=o.a,r.prototype.get=a.a,r.prototype.has=s.a,r.prototype.set=u.a,e.a=r},,function(t,e,n){"use strict";function r(t,e){for(var r=t.length;r--;)if(n.i(i.a)(t[r][0],e))return r;return-1}var i=n(107);e.a=r},function(t,e,n){"use strict";function r(t,e,r){"__proto__"==e&&i.a?n.i(i.a)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var i=n(337);e.a=r},function(t,e,n){"use strict";function r(t,e){var r=t.__data__;return n.i(i.a)(e)?r["string"==typeof e?"string":"hash"]:r.map}var i=n(710);e.a=r},function(t,e,n){"use strict";var r=n(61),i=n.i(r.a)(Object,"create");e.a=i},function(t,e,n){"use strict";function r(t){return null!=t&&n.i(o.a)(t.length)&&!n.i(i.a)(t)}var i=n(218),o=n(219);e.a=r},function(t,e,n){"use strict";function r(t){return"symbol"==typeof t||n.i(o.a)(t)&&n.i(i.a)(t)==a}var i=n(81),o=n(62),a="[object Symbol]";e.a=r},function(t,e,n){"use strict";function r(t){return n.i(a.a)(t)?n.i(i.a)(t,c.a):n.i(s.a)(t)?[t]:n.i(o.a)(n.i(u.a)(n.i(l.a)(t)))}var i=n(331),o=n(336),a=n(39),s=n(142),u=n(344),c=n(106),l=n(349);e.a=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t){return i(void 0,t)}function i(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:var n=e;return new Date(n.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var r in e)e.hasOwnProperty(r)&&(t[r]=i(t[r],e[r]));return t}function o(t,e,n){t[e]=n}function a(t){var e=k;return k=t,e}function s(t){return JSON.parse(t)}function u(t){return JSON.stringify(t)}function c(t,e){var n=new it(t,e);return n.subscribe.bind(n)}function l(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){t.apply(void 0,n)}).catch(function(t){e&&e(t)})}}function h(t,e){if("object"!=typeof t||null===t)return!1;for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i in t&&"function"==typeof t[i])return!0}return!1}function f(){}function p(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4.  Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}function d(t,e,n,r){if((!r||n)&&"string"!=typeof n)throw new Error(p(t,e,r)+"must be a valid firebase namespace.")}function v(t,e,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(p(t,e,r)+"must be a valid function.")}function y(t,e,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(p(t,e,r)+"must be a valid context object.")}Object.defineProperty(e,"__esModule",{value:!0});var g=n(294),_={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},m=function(t,e){if(!t)throw b(e)},b=function(t){return new Error("Firebase Database ("+_.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)},w=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296==(64512&i)&&r+1<t.length&&56320==(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},E=function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var o=t[n++],a=t[n++],s=t[n++],u=((7&i)<<18|(63&o)<<12|(63&a)<<6|63&s)-65536;e[r++]=String.fromCharCode(55296+(u>>10)),e[r++]=String.fromCharCode(56320+(1023&u))}else{var o=t[n++],a=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}}return e.join("")},S={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],a=i+1<t.length,s=a?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,l=o>>2,h=(3&o)<<4|s>>4,f=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(f=64)),r.push(n[l],n[h],n[f],n[p])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(w(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):E(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],a=i<t.length,s=a?n[t.charAt(i)]:0;++i;var u=i<t.length,c=u?n[t.charAt(i)]:64;++i;var l=i<t.length,h=l?n[t.charAt(i)]:64;if(++i,null==o||null==s||null==c||null==h)throw Error();var f=o<<2|s>>4;if(r.push(f),64!=c){var p=s<<4&240|c>>2;if(r.push(p),64!=h){var d=c<<6&192|h;r.push(d)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},T=function(t){var e=w(t);return S.encodeByteArray(e,!0)},C=function(t){try{return S.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null},I=function(){function t(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"==typeof t&&(e.promise.catch(function(){}),1===t.length?t(n):t(n,r))}},t}(),O=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},A=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(O())},R=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},N=function(){return!0===_.NODE_CLIENT||!0===_.NODE_ADMIN},P="FirebaseError",k=Error.captureStackTrace,D=function(){function t(t,e){if(this.code=t,this.message=e,k)k(this,x.prototype.create);else{var n=Error.apply(this,arguments);this.name=P,Object.defineProperty(this,"stack",{get:function(){return n.stack}})}}return t}();D.prototype=Object.create(Error.prototype),D.prototype.constructor=D,D.prototype.name=P;var x=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return t.prototype.create=function(t,e){void 0===e&&(e={});var n,r=this.errors[t],i=this.service+"/"+t;n=void 0===r?"Error":r.replace(this.pattern,function(t,n){var r=e[n];return void 0!==r?r.toString():"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+i+").";var o=new D(i,n);for(var a in e)e.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(o[a]=e[a]);return o},t}(),F=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=s(C(o[0])||""),n=s(C(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(t){}return{header:e,claims:n,data:r,signature:i}},L=function(t){var e,n,r=F(t).claims,i=Math.floor((new Date).getTime()/1e3);return"object"==typeof r&&(r.hasOwnProperty("nbf")?e=r.nbf:r.hasOwnProperty("iat")&&(e=r.iat),n=r.hasOwnProperty("exp")?r.exp:e+86400),i&&e&&n&&i>=e&&i<=n},j=function(t){var e=F(t).claims;return"object"==typeof e&&e.hasOwnProperty("iat")?e.iat:null},M=function(t){var e=F(t),n=e.claims;return!!e.signature&&!!n&&"object"==typeof n&&n.hasOwnProperty("iat")},U=function(t){var e=F(t).claims;return"object"==typeof e&&!0===e.admin},V=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},W=function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},B=function(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])},q=function(t,e){return B(e,function(e,n){t[e]=n}),t},H=function(t){return q({},t)},K=function(t){return"object"==typeof t&&null!==t},G=function(t){for(var e in t)return!1;return!0},z=function(t){var e=0;for(var n in t)e++;return e},Q=function(t,e,n){var r={};for(var i in t)r[i]=e.call(n,t[i],i,t);return r},Y=function(t,e,n){for(var r in t)if(e.call(n,t[r],r,t))return r},X=function(t,e,n){var r=Y(t,e,n);return r&&t[r]},$=function(t){for(var e in t)return e},J=function(t){var e=[],n=0;for(var r in t)e[n++]=t[r];return e},Z=function(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!e(n,t[n]))return!1;return!0},tt=function(t){var e=[];return B(t,function(t,n){Array.isArray(n)?n.forEach(function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.length?"&"+e.join("&"):""},et=function(t){var e={};return t.replace(/^\?/,"").split("&").forEach(function(t){if(t){var n=t.split("=");e[n[0]]=n[1]}}),e},nt=function(){function t(){this.blockSize=-1}return t}(),rt=function(t){function e(){var e=t.call(this)||this;e.chain_=[],e.buf_=[],e.W_=[],e.pad_=[],e.inbuf_=0,e.total_=0,e.blockSize=64,e.pad_[0]=128;for(var n=1;n<e.blockSize;++n)e.pad_[n]=0;return e.reset(),e}return g.__extends(e,t),e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(var r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(var r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}for(var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],h=this.chain_[4],r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);var i=(s<<5|s>>>27)+o+h+a+n[r]&4294967295;h=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+h&4294967295},e.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0==o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++o,++r,o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++o,++r,o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},e.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);for(var r=0,n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},e}(nt),it=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(function(){t(n)}).catch(function(t){n.error(t)})}return t.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},t.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},t.prototype.complete=function(){this.forEachObserver(function(t){t.complete()}),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");r=h(t,["next","error","complete"])?t:{next:t,error:e,complete:n},void 0===r.next&&(r.next=f),void 0===r.error&&(r.error=f),void 0===r.complete&&(r.complete=f);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(t){}}),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(t){"undefined"!=typeof console&&console.error&&console.error(t)}})},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then(function(){e.observers=void 0,e.onNoObservers=void 0}))},t}(),ot=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i){var o=t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".";throw new Error(o)}},at=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=55296&&i<=56319){var o=i-55296;r++,m(r<t.length,"Surrogate pair missing trail surrogate.");i=65536+(o<<10)+(t.charCodeAt(r)-56320)}i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},st=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e};e.assert=m,e.assertionError=b,e.base64=S,e.base64Decode=C,e.base64Encode=T,e.CONSTANTS=_,e.deepCopy=r,e.deepExtend=i,e.patchProperty=o,e.Deferred=I,e.getUA=O,e.isMobileCordova=A,e.isNodeSdk=N,e.isReactNative=R,e.ErrorFactory=x,e.FirebaseError=D,e.patchCapture=a,e.jsonEval=s,e.stringify=u,e.decode=F,e.isAdmin=U,e.issuedAtTime=j,e.isValidFormat=M,e.isValidTimestamp=L,e.clone=H,e.contains=V,e.every=Z,e.extend=q,e.findKey=Y,e.findValue=X,e.forEach=B,e.getAnyKey=$,e.getCount=z,e.getValues=J,e.isEmpty=G,e.isNonNullObject=K,e.map=Q,e.safeGet=W,e.querystring=tt,e.querystringDecode=et,e.Sha1=rt,e.async=l,e.createSubscribe=c,e.errorPrefix=p,e.validateArgCount=ot,e.validateCallback=v,e.validateContextObject=y,e.validateNamespace=d,e.stringLength=st,e.stringToByteArray=at},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.NOTIFICATION_SHOW="NOTIFICATION_SHOW",e.NOTIFICATION_DISMISS="NOTIFICATION_DISMISS",e.NOTIFICATION_CLEAR="NOTIFICATION_CLEAR"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clearNotifications=e.dismissNotification=e.showError=e.showSuccess=e.showNotification=void 0;var r=n(180),i=e.showNotification=function(t){var e=Object.assign({},t);return e.id||(e.id=Date.now()),function(t){t({type:r.NOTIFICATION_SHOW,payload:e}),setTimeout(function(){t({type:r.NOTIFICATION_DISMISS,payload:e.id})},e.dismissAfter||2500)}};e.showSuccess=function(t){return i({type:"success",message:t})},e.showError=function(t){return i({type:"success",message:t})},e.dismissNotification=function(t){return{type:r.NOTIFICATION_DISMISS,payload:t}},e.clearNotifications=function(){return{type:r.NOTIFICATION_CLEAR}}},,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){function n(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then}t.exports=n},function(t,e,n){"use strict";var r=n(61),i=n(38),o=n.i(r.a)(i.a,"Map");e.a=o},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(717),o=n(718),a=n(719),s=n(720),u=n(721);r.prototype.clear=i.a,r.prototype.delete=o.a,r.prototype.get=a.a,r.prototype.has=s.a,r.prototype.set=u.a,e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__=new i.a(t);this.size=e.size}var i=n(135),o=n(734),a=n(735),s=n(736),u=n(737),c=n(738);r.prototype.clear=o.a,r.prototype.delete=a.a,r.prototype.get=s.a,r.prototype.has=u.a,r.prototype.set=c.a,e.a=r},function(t,e,n){"use strict";function r(t,e,a,s,u){return t===e||(null==t||null==e||!n.i(o.a)(t)&&!n.i(o.a)(e)?t!==t&&e!==e:n.i(i.a)(t,e,a,s,r,u))}var i=n(668),o=n(62);e.a=r},function(t,e,n){"use strict";function r(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<e}var i=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.a=r},function(t,e,n){"use strict";function r(t,e){if(n.i(i.a)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!n.i(o.a)(t))||(s.test(t)||!a.test(t)||null!=e&&t in Object(e))}var i=n(39),o=n(142),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.a=r},function(t,e,n){"use strict";function r(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}var i=Object.prototype;e.a=r},function(t,e,n){"use strict";function r(t){return t}e.a=r},function(t,e,n){"use strict";var r=n(667),i=n(62),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n.i(r.a)(function(){return arguments}())?r.a:function(t){return n.i(i.a)(t)&&a.call(t,"callee")&&!s.call(t,"callee")};e.a=u},function(t,e,n){"use strict";(function(t){var r=n(38),i=n(747),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?r.a.Buffer:void 0,c=u?u.isBuffer:void 0,l=c||i.a;e.a=l}).call(e,n(295)(t))},function(t,e,n){"use strict";function r(t){if(!n.i(o.a)(t))return!1;var e=n.i(i.a)(t);return e==s||e==u||e==a||e==c}var i=n(81),o=n(53),a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";e.a=r},function(t,e,n){"use strict";function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}var i=9007199254740991;e.a=r},,function(t,e,n){"use strict";var r=n(671),i=n(685),o=n(726),a=o.a&&o.a.isTypedArray,s=a?n.i(i.a)(a):r.a;e.a=s},function(t,e,n){"use strict";function r(t){return n.i(a.a)(t)?n.i(i.a)(t):n.i(o.a)(t)}var i=n(330),o=n(673),a=n(141);e.a=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"prefix",function(){return r}),n.d(e,"ARRAY_INSERT",function(){return i}),n.d(e,"ARRAY_MOVE",function(){return o}),n.d(e,"ARRAY_POP",function(){return a}),n.d(e,"ARRAY_PUSH",function(){return s}),n.d(e,"ARRAY_REMOVE",function(){return u}),n.d(e,"ARRAY_REMOVE_ALL",function(){return c}),n.d(e,"ARRAY_SHIFT",function(){return l}),n.d(e,"ARRAY_SPLICE",function(){return h}),n.d(e,"ARRAY_UNSHIFT",function(){return f}),n.d(e,"ARRAY_SWAP",function(){return p}),n.d(e,"AUTOFILL",function(){return d}),n.d(e,"BLUR",function(){return v}),n.d(e,"CHANGE",function(){return y}),n.d(e,"CLEAR_SUBMIT",function(){return g}),n.d(e,"CLEAR_SUBMIT_ERRORS",function(){return _}),n.d(e,"CLEAR_ASYNC_ERROR",function(){return m}),n.d(e,"DESTROY",function(){return b}),n.d(e,"FOCUS",function(){return w}),n.d(e,"INITIALIZE",function(){return E}),n.d(e,"REGISTER_FIELD",function(){return S}),n.d(e,"RESET",function(){return T}),n.d(e,"SET_SUBMIT_FAILED",function(){return C}),n.d(e,"SET_SUBMIT_SUCCEEDED",function(){return I}),n.d(e,"START_ASYNC_VALIDATION",function(){return O}),n.d(e,"START_SUBMIT",function(){return A}),n.d(e,"STOP_ASYNC_VALIDATION",function(){return R}),n.d(e,"STOP_SUBMIT",function(){return N}),n.d(e,"SUBMIT",function(){return P}),n.d(e,"TOUCH",function(){return k}),n.d(e,"UNREGISTER_FIELD",function(){return D}),n.d(e,"UNTOUCH",function(){return x}),n.d(e,"UPDATE_SYNC_ERRORS",function(){return F}),n.d(e,"UPDATE_SYNC_WARNINGS",function(){return L});var r="@@redux-form/",i=r+"ARRAY_INSERT",o=r+"ARRAY_MOVE",a=r+"ARRAY_POP",s=r+"ARRAY_PUSH",u=r+"ARRAY_REMOVE",c=r+"ARRAY_REMOVE_ALL",l=r+"ARRAY_SHIFT",h=r+"ARRAY_SPLICE",f=r+"ARRAY_UNSHIFT",p=r+"ARRAY_SWAP",d=r+"AUTOFILL",v=r+"BLUR",y=r+"CHANGE",g=r+"CLEAR_SUBMIT",_=r+"CLEAR_SUBMIT_ERRORS",m=r+"CLEAR_ASYNC_ERROR",b=r+"DESTROY",w=r+"FOCUS",E=r+"INITIALIZE",S=r+"REGISTER_FIELD",T=r+"RESET",C=r+"SET_SUBMIT_FAILED",I=r+"SET_SUBMIT_SUCCEEDED",O=r+"START_ASYNC_VALIDATION",A=r+"START_SUBMIT",R=r+"STOP_ASYNC_VALIDATION",N=r+"STOP_SUBMIT",P=r+"SUBMIT",k=r+"TOUCH",D=r+"UNREGISTER_FIELD",x=r+"UNTOUCH",F=r+"UPDATE_SYNC_ERRORS",L=r+"UPDATE_SYNC_WARNINGS"},function(t,e,n){"use strict";var r=n(1207),i=function(t){var e=t.getIn,i=t.keys,o=n.i(r.a)(t);return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(a){var s=n(a);if(e(s,t+".syncError"))return!1;if(!r){if(e(s,t+".error"))return!1}var u=e(s,t+".syncErrors"),c=e(s,t+".asyncErrors"),l=r?void 0:e(s,t+".submitErrors");if(!u&&!c&&!l)return!0;var h=e(s,t+".registeredFields");return!h||!i(h).filter(function(t){return e(h,"['"+t+"'].count")>0}).some(function(t){return o(e(h,"['"+t+"']"),u,c,l)})}}};e.a=i},function(t,e,n){"use strict";function r(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function i(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]]);return n}function o(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function a(t,e){return function(n,r){e(n,r,t)}}function s(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function u(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function c(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function l(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function h(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function f(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function p(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(f(arguments[e]));return t}function d(t){return this instanceof d?(this.v=t,this):new d(t)}function v(t,e,n){function r(t){l[t]&&(c[t]=function(e){return new Promise(function(n,r){h.push([t,e,n,r])>1||i(t,e)})})}function i(t,e){try{o(l[t](e))}catch(t){u(h[0][3],t)}}function o(t){t.value instanceof d?Promise.resolve(t.value.v).then(a,s):u(h[0][2],t)}function a(t){i("next",t)}function s(t){i("throw",t)}function u(t,e){t(e),h.shift(),h.length&&i(h[0][0],h[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,l=n.apply(t,e||[]),h=[];return c={},r("next"),r("throw"),r("return"),c[Symbol.asyncIterator]=function(){return this},c}function y(t){function e(e,i){t[e]&&(n[e]=function(n){return(r=!r)?{value:d(t[e](n)),done:"return"===e}:i?i(n):n})}var n,r;return n={},e("next"),e("throw",function(t){throw t}),e("return"),n[Symbol.iterator]=function(){return this},n}function g(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):"function"==typeof h?h(t):t[Symbol.iterator]()}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function m(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function b(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=r,n.d(e,"__assign",function(){return E}),e.__rest=i,e.__decorate=o,e.__param=a,e.__metadata=s,e.__awaiter=u,e.__generator=c,e.__exportStar=l,e.__values=h,e.__read=f,e.__spread=p,e.__await=d,e.__asyncGenerator=v,e.__asyncDelegator=y,e.__asyncValues=g,e.__makeTemplateObject=_,e.__importStar=m,e.__importDefault=b;var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},E=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=e.env="development",i=e.firebase={apiKey:"AIzaSyDJJuRHGtJnnMLtT0IMQcd46H-4P7HWNWc",authDomain:"todoapp4bene.firebaseapp.com",databaseURL:"https://todoapp4bene.firebaseio.com",projectId:"todoapp4bene",storageBucket:"todoapp4bene.appspot.com",messagingSenderId:"589459366249"},o=e.reduxFirebase={userProfile:"users",autoPopulateProfile:!0};e.default={env:r,firebase:i,reduxFirebase:o}},function(t,e,n){"use strict";function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return{type:o,payload:t}}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments[1];return e.type===o?e.payload:t}Object.defineProperty(e,"__esModule",{value:!0}),e.locationChange=r,e.default=i;var o=e.LOCATION_CHANGE="LOCATION_CHANGE",a=(e.updateLocation=function(t){var e=t.dispatch;return function(t){return e(r(t))}},null)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(120),o=n(41),a=n(268),s=r(a),u=n(444),c=r(u);e.default={spacing:s.default,zIndex:c.default,fontFamily:"Roboto, sans-serif",palette:{primary1Color:i.blueGrey500,primary2Color:i.blueGrey700,primary3Color:i.blueGrey100,accent1Color:i.pinkA200,accent2Color:i.tealA100,accent3Color:i.lightBlue500,textColor:i.grey900,alternateTextColor:i.white,canvasColor:i.white,borderColor:i.grey400,disabledColor:(0,o.fade)(i.darkBlack,.3),pickerHeaderColor:i.pinkA200}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.withRouter=e.withStore=e.logProps=e.spinnerWhileLoading=e.spinnerWhile=void 0;var i=n(254),o=r(i),a=n(253),s=r(a),u=n(1),c=r(u),l=n(71),h=n(125),f=n(524),p=r(f),d=e.spinnerWhile=function(t){return(0,h.branch)(t,(0,h.renderComponent)(p.default))};e.spinnerWhileLoading=function(t){return d(function(e){return(0,o.default)(t,function(t){return!(0,l.isLoaded)(e[t])})})},e.logProps=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,h.mapProps)(function(n){return console.log(e+" props:",t?(0,s.default)(n,t):n),n})},e.withStore=(0,h.compose)((0,h.withContext)({store:c.default.object},function(){}),(0,h.getContext)({store:c.default.object})),e.withRouter=(0,h.compose)((0,h.withContext)({router:c.default.object},function(){}),(0,h.getContext)({router:c.default.object}))},,,,,,,,,,,,,,,,,,,function(t,e){},,,,,,,,,,function(t,e,n){"use strict";var r=n(38),i=r.a.Uint8Array;e.a=i},function(t,e,n){"use strict";function r(t,e){var r=n.i(a.a)(t),l=!r&&n.i(o.a)(t),f=!r&&!l&&n.i(s.a)(t),p=!r&&!l&&!f&&n.i(c.a)(t),d=r||l||f||p,v=d?n.i(i.a)(t.length,String):[],y=v.length;for(var g in t)!e&&!h.call(t,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||n.i(u.a)(g,y))||v.push(g);return v}var i=n(683),o=n(216),a=n(39),s=n(217),u=n(212),c=n(221),l=Object.prototype,h=l.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}e.a=r},function(t,e,n){"use strict";function r(t,e,r){(void 0===r||n.i(o.a)(t[e],r))&&(void 0!==r||e in t)||n.i(i.a)(t,e,r)}var i=n(138),o=n(107);e.a=r},function(t,e,n){"use strict";var r=n(693),i=n.i(r.a)();e.a=i},function(t,e,n){"use strict";function r(t,e){e=n.i(i.a)(e,t);for(var r=0,a=e.length;null!=t&&r<a;)t=t[n.i(o.a)(e[r++])];return r&&r==a?t:void 0}var i=n(335),o=n(106);e.a=r},function(t,e,n){"use strict";function r(t,e){return n.i(i.a)(t)?t:n.i(o.a)(t,e)?[t]:n.i(a.a)(n.i(s.a)(t))}var i=n(39),o=n(213),a=n(344),s=n(349);e.a=r},function(t,e,n){"use strict";function r(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}e.a=r},function(t,e,n){"use strict";var r=n(61),i=function(){try{var t=n.i(r.a)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();e.a=i},function(t,e,n){"use strict";function r(t,e,r,c,l,h){var f=r&s,p=t.length,d=e.length;if(p!=d&&!(f&&d>p))return!1;var v=h.get(t);if(v&&h.get(e))return v==e;var y=-1,g=!0,_=r&u?new i.a:void 0;for(h.set(t,e),h.set(e,t);++y<p;){var m=t[y],b=e[y];if(c)var w=f?c(b,m,y,e,t,h):c(m,b,y,t,e,h);if(void 0!==w){if(w)continue;g=!1;break}if(_){if(!n.i(o.a)(e,function(t,e){if(!n.i(a.a)(_,e)&&(m===t||l(m,t,r,c,h)))return _.push(e)})){g=!1;break}}else if(m!==b&&!l(m,b,r,c,h)){g=!1;break}}return h.delete(t),h.delete(e),g}var i=n(656),o=n(661),a=n(686),s=1,u=2;e.a=r},,,function(t,e,n){"use strict";function r(t){return t===t&&!n.i(i.a)(t)}var i=n(53);e.a=r},function(t,e,n){"use strict";function r(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}e.a=r},,function(t,e,n){"use strict";var r=n(723),i=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=n.i(r.a)(function(t){var e=[];return i.test(t)&&e.push(""),t.replace(o,function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)}),e});e.a=s},function(t,e,n){"use strict";function r(t){if(null!=t){try{return o.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var i=Function.prototype,o=i.toString;e.a=r},function(t,e,n){"use strict";function r(t,e,r){r="function"==typeof r?r:void 0;var o=r?r(t,e):void 0;return void 0===o?n.i(i.a)(t,e,void 0,r):!!o}var i=n(211);e.a=r},function(t,e,n){"use strict";function r(t){return n.i(a.a)(t)?n.i(i.a)(t,!0):n.i(o.a)(t)}var i=n(330),o=n(674),a=n(141);e.a=r},function(t,e,n){"use strict";function r(t,e){var r={};return e=n.i(a.a)(e,3),n.i(o.a)(t,function(t,o,a){n.i(i.a)(r,o,e(t,o,a))}),r}var i=n(138),o=n(664),a=n(672);e.a=r},function(t,e,n){"use strict";function r(t){return null==t?"":n.i(i.a)(t)}var i=n(684);e.a=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(599),s=n.n(a),u=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"Submit Validation Failed"));return n.errors=t,n}return o(e,t),e}(s.a);e.a=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"arrayInsert",function(){return o}),n.d(e,"arrayMove",function(){return a}),n.d(e,"arrayPop",function(){return s}),n.d(e,"arrayPush",function(){return u}),n.d(e,"arrayRemove",function(){return c}),n.d(e,"arrayRemoveAll",function(){return l}),n.d(e,"arrayShift",function(){return h}),n.d(e,"arraySplice",function(){return f}),n.d(e,"arraySwap",function(){return p}),n.d(e,"arrayUnshift",function(){return d}),n.d(e,"autofill",function(){return v}),n.d(e,"blur",function(){return y}),n.d(e,"change",function(){return g}),n.d(e,"clearSubmit",function(){return _}),n.d(e,"clearSubmitErrors",function(){return m}),n.d(e,"clearAsyncError",function(){return b}),n.d(e,"destroy",function(){return w}),n.d(e,"focus",function(){return E}),n.d(e,"initialize",function(){return S}),n.d(e,"registerField",function(){return T}),n.d(e,"reset",function(){return C}),n.d(e,"startAsyncValidation",function(){return I}),n.d(e,"startSubmit",function(){return O}),n.d(e,"stopAsyncValidation",function(){return A}),n.d(e,"stopSubmit",function(){return R}),n.d(e,"submit",function(){return N}),n.d(e,"setSubmitFailed",function(){return P}),n.d(e,"setSubmitSucceeded",function(){return k}),n.d(e,"touch",function(){return D}),n.d(e,"unregisterField",function(){return x}),n.d(e,"untouch",function(){return F}),n.d(e,"updateSyncErrors",function(){return L}),n.d(e,"updateSyncWarnings",function(){return j});var r=n(292),i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(t,e,n,i){return{type:r.ARRAY_INSERT,meta:{form:t,field:e,index:n},payload:i}},a=function(t,e,n,i){return{type:r.ARRAY_MOVE,meta:{form:t,field:e,from:n,to:i}}},s=function(t,e){return{type:r.ARRAY_POP,meta:{form:t,field:e}}},u=function(t,e,n){return{type:r.ARRAY_PUSH,meta:{form:t,field:e},payload:n}},c=function(t,e,n){return{type:r.ARRAY_REMOVE,meta:{form:t,field:e,index:n}}},l=function(t,e){return{type:r.ARRAY_REMOVE_ALL,meta:{form:t,field:e}}},h=function(t,e){return{type:r.ARRAY_SHIFT,meta:{form:t,field:e}}},f=function(t,e,n,i,o){var a={type:r.ARRAY_SPLICE,meta:{form:t,field:e,index:n,removeNum:i}};return void 0!==o&&(a.payload=o),a},p=function(t,e,n,i){if(n===i)throw new Error("Swap indices cannot be equal");if(n<0||i<0)throw new Error("Swap indices cannot be negative");return{type:r.ARRAY_SWAP,meta:{form:t,field:e,indexA:n,indexB:i}}},d=function(t,e,n){return{type:r.ARRAY_UNSHIFT,meta:{form:t,field:e},payload:n}},v=function(t,e,n){return{type:r.AUTOFILL,meta:{form:t,field:e},payload:n}},y=function(t,e,n,i){return{type:r.BLUR,meta:{form:t,field:e,touch:i},payload:n}},g=function(t,e,n,i,o){return{type:r.CHANGE,meta:{form:t,field:e,touch:i,persistentSubmitErrors:o},payload:n}},_=function(t){return{type:r.CLEAR_SUBMIT,meta:{form:t}}},m=function(t){return{type:r.CLEAR_SUBMIT_ERRORS,meta:{form:t}}},b=function(t,e){return{type:r.CLEAR_ASYNC_ERROR,meta:{form:t,field:e}}},w=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return{type:r.DESTROY,meta:{form:e}}},E=function(t,e){return{type:r.FOCUS,meta:{form:t,field:e}}},S=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n instanceof Object&&(o=n,n=!1),{type:r.INITIALIZE,meta:i({form:t,keepDirty:n},o),payload:e}},T=function(t,e,n){return{type:r.REGISTER_FIELD,meta:{form:t},payload:{name:e,type:n}}},C=function(t){return{type:r.RESET,meta:{form:t}}},I=function(t,e){return{type:r.START_ASYNC_VALIDATION,meta:{form:t,field:e}}},O=function(t){return{type:r.START_SUBMIT,meta:{form:t}}},A=function(t,e){var n={type:r.STOP_ASYNC_VALIDATION,meta:{form:t},payload:e};return e&&Object.keys(e).length&&(n.error=!0),n},R=function(t,e){var n={type:r.STOP_SUBMIT,meta:{form:t},payload:e};return e&&Object.keys(e).length&&(n.error=!0),n},N=function(t){return{type:r.SUBMIT,meta:{form:t}}},P=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return{type:r.SET_SUBMIT_FAILED,meta:{form:t,fields:n},error:!0}},k=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return{type:r.SET_SUBMIT_SUCCEEDED,meta:{form:t,fields:n},error:!1}},D=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return{type:r.TOUCH,meta:{form:t,fields:n}}},x=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:r.UNREGISTER_FIELD,meta:{form:t},payload:{name:e,destroyOnUnmount:n}}},F=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return{type:r.UNTOUCH,meta:{form:t,fields:n}}},L=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return{type:r.UPDATE_SYNC_ERRORS,meta:{form:t},payload:{syncErrors:e,error:n}}},j=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return{type:r.UPDATE_SYNC_WARNINGS,meta:{form:t},payload:{syncWarnings:e,warning:n}}}},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(t,e,n){var r=e.value;return"checkbox"===t?i({},e,{checked:!!r}):"radio"===t?i({},e,{checked:r===n,value:n}):"select-multiple"===t?i({},e,{value:r||[]}):"file"===t?i({},e,{value:r||void 0}):e},a=function(t,e,n){var a=t.getIn,s=t.toJS,u=n.asyncError,c=n.asyncValidating,l=n.onBlur,h=n.onChange,f=n.onDrop,p=n.onDragStart,d=n.dirty,v=n.dispatch,y=n.onFocus,g=n.form,_=n.format,m=n.initial,b=(n.parse,n.pristine),w=n.props,E=n.state,S=n.submitError,T=n.submitFailed,C=n.submitting,I=n.syncError,O=n.syncWarning,A=(n.validate,n.value),R=n._value,N=(n.warn,r(n,["asyncError","asyncValidating","onBlur","onChange","onDrop","onDragStart","dirty","dispatch","onFocus","form","format","initial","parse","pristine","props","state","submitError","submitFailed","submitting","syncError","syncWarning","validate","value","_value","warn"])),P=I||u||S,k=O,D=function(t,n){if(null===n)return t;var r=null==t?"":t;return n?n(t,e):r}(A,_);return{input:o(N.type,{name:e,onBlur:l,onChange:h,onDragStart:p,onDrop:f,onFocus:y,value:D},R),meta:i({},s(E),{active:!(!E||!a(E,"active")),asyncValidating:c,autofilled:!(!E||!a(E,"autofilled")),dirty:d,dispatch:v,error:P,form:g,initial:m,warning:k,invalid:!!P,pristine:b,submitting:!!C,submitFailed:!!T,touched:!(!E||!a(E,"touched")),valid:!P,visited:!(!E||!a(E,"visited"))}),custom:i({},N,w)}};e.a=a},function(t,e,n){"use strict";var r=function(t){var e=t.initialized,n=t.trigger,r=t.pristine;if(!t.syncValidationPasses)return!1;switch(n){case"blur":return!0;case"submit":return!r||!e;default:return!1}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.values,n=t.nextProps,r=t.initialRender,i=t.lastFieldValidatorKeys,o=t.fieldValidatorKeys,a=t.structure;return!!r||(!a.deepEqual(e,n.values)||!a.deepEqual(i,o))};e.a=r},function(t,e,n){"use strict";var r=function(t){return!!(t&&t.stopPropagation&&t.preventDefault)};e.a=r},function(t,e,n){"use strict";var r=n(1193),i=n(1213),o=function(t,e){var o=e.name,a=e.parse,s=e.normalize,u=n.i(r.a)(t,i.a);return a&&(u=a(u,o)),s&&(u=s(o,u)),u};e.a=o},function(t,e,n){"use strict";var r=n(501),i=function(t){var e=n.i(r.a)(t);return e&&t.preventDefault(),e};e.a=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"actionTypes",function(){return x}),n.d(e,"actions",function(){return F}),n.d(e,"arrayInsert",function(){return L}),n.d(e,"arrayMove",function(){return j}),n.d(e,"arrayPop",function(){return M}),n.d(e,"arrayPush",function(){return U}),n.d(e,"arrayRemove",function(){return V}),n.d(e,"arrayRemoveAll",function(){return W}),n.d(e,"arrayShift",function(){return B}),n.d(e,"arraySplice",function(){return q}),n.d(e,"arraySwap",function(){return H}),n.d(e,"arrayUnshift",function(){return K}),n.d(e,"autofill",function(){return G}),n.d(e,"blur",function(){return z}),n.d(e,"change",function(){return Q}),n.d(e,"clearSubmitErrors",function(){return Y}),n.d(e,"destroy",function(){return X}),n.d(e,"focus",function(){return $}),n.d(e,"initialize",function(){return J}),n.d(e,"registerField",function(){return Z}),n.d(e,"reset",function(){return tt}),n.d(e,"setSubmitFailed",function(){return et}),n.d(e,"setSubmitSucceeded",function(){return nt}),n.d(e,"startAsyncValidation",function(){return rt}),n.d(e,"startSubmit",function(){return it}),n.d(e,"stopAsyncValidation",function(){return ot}),n.d(e,"stopSubmit",function(){return at}),n.d(e,"submit",function(){return st}),n.d(e,"touch",function(){return ut}),n.d(e,"unregisterField",function(){return ct}),n.d(e,"untouch",function(){return lt});var r=n(497),i=n(292),o=n(499);n.d(e,"defaultShouldAsyncValidate",function(){return o.a});var a=n(500);n.d(e,"defaultShouldValidate",function(){return a.a});var s=n(1180);n.d(e,"Form",function(){return s.a});var u=n(1181);n.d(e,"FormSection",function(){return u.a});var c=n(496);n.d(e,"SubmissionError",function(){return c.a});var l=n(1216);n.d(e,"propTypes",function(){return l.a}),n.d(e,"fieldInputPropTypes",function(){return l.b}),n.d(e,"fieldMetaPropTypes",function(){return l.c}),n.d(e,"fieldPropTypes",function(){return l.d}),n.d(e,"formPropTypes",function(){return l.e});var h=n(1177);n.d(e,"Field",function(){return h.a});var f=n(1179);n.d(e,"Fields",function(){return f.a});var p=n(1178);n.d(e,"FieldArray",function(){return p.a});var d=n(1195);n.d(e,"formValueSelector",function(){return d.a});var v=n(1196);n.d(e,"formValues",function(){return v.a});var y=n(1201);n.d(e,"getFormNames",function(){return y.a});var g=n(1205);n.d(e,"getFormValues",function(){return g.a});var _=n(1199);n.d(e,"getFormInitialValues",function(){return _.a});var m=n(1203);n.d(e,"getFormSyncErrors",function(){return m.a});var b=n(1200);n.d(e,"getFormMeta",function(){return b.a});var w=n(1198);n.d(e,"getFormAsyncErrors",function(){return w.a});var E=n(1204);n.d(e,"getFormSyncWarnings",function(){return E.a});var S=n(1202);n.d(e,"getFormSubmitErrors",function(){return S.a});var T=n(1210);n.d(e,"isDirty",function(){return T.a});var C=n(1211);n.d(e,"isInvalid",function(){return C.a});var I=n(1212);n.d(e,"isPristine",function(){return I.a});var O=n(1215);n.d(e,"isValid",function(){return O.a});var A=n(1214);n.d(e,"isSubmitting",function(){return A.a});var R=n(1209);n.d(e,"hasSubmitSucceeded",function(){return R.a});var N=n(1208);n.d(e,"hasSubmitFailed",function(){return N.a});var P=n(1218);n.d(e,"reduxForm",function(){return P.a});var k=n(1217);n.d(e,"reducer",function(){return k.a});var D=n(1240);n.d(e,"values",function(){return D.a});var x=i,F=r,L=r.arrayInsert,j=r.arrayMove,M=r.arrayPop,U=r.arrayPush,V=r.arrayRemove,W=r.arrayRemoveAll,B=r.arrayShift,q=r.arraySplice,H=r.arraySwap,K=r.arrayUnshift,G=r.autofill,z=r.blur,Q=r.change,Y=r.clearSubmitErrors,X=r.destroy,$=r.focus,J=r.initialize,Z=r.registerField,tt=r.reset,et=r.setSubmitFailed,nt=r.setSubmitSucceeded,rt=r.startAsyncValidation,it=r.startSubmit,ot=r.stopAsyncValidation,at=r.stopSubmit,st=r.submit,ut=r.touch,ct=r.unregisterField,lt=r.untouch},function(t,e,n){"use strict";var r=function(t){var e=t.deepEqual,n=t.empty,r=t.getIn;return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return r(t,"form")};return function(o){var a=i(o),s=r(a,t+".initial")||n,u=r(a,t+".values")||s;return e(s,u)}}};e.a=r},function(t,e,n){"use strict";var r=n(346),i=function(t,e,n,r,i,o){if(o)return t===e},o=function(t,e,o){return!n.i(r.a)(t.props,e,i)||!n.i(r.a)(t.state,o,i)};e.a=o},,,,,function(t,e){t.exports={name:"react-redux-firebase-material-example",version:"0.0.1",description:"Complete react-redux-firebase Material-UI app.",main:"index.js",scripts:{clean:"rimraf dist",compile:"node build/scripts/compile",build:"npm run clean && cross-env NODE_ENV=production npm run compile","build:prod":'echo "build:prod is deprecated. Use npm run build." && npm run build',start:"cross-env NODE_ENV=development webpack-dashboard -p 1234 -c cyan -m -t material -- node build/scripts/start","start:simple":"cross-env NODE_ENV=development node build/scripts/start",lint:"eslint .","lint:fix":"npm run lint -- --fix",format:'prettier --single-quote --no-semi --trailing-comma none --write "src/**/*.js"'},repository:{type:"git",url:"git+https://github.com/testuser/material.git"},author:"testuser (https://github.com/testuser)",license:"MIT",dependencies:{firebase:"^4.12.1",lodash:"^4.17.4","material-ui":"^0.19.1","normalize.css":"^7.0.0","object-assign":"^4.1.1",promise:"^7.1.1","prop-types":"^15.6.1",react:"^15.5.4","react-dom":"^15.5.4","react-google-button":"^0.3.0","react-redux":"^5.0.4","react-redux-firebase":"*","react-router":"^3.0.0","react-tap-event-plugin":"^2.0.1",recompose:"^0.26.0","redbox-react":"^1.3.6",redux:"^3.6.0","redux-auth-wrapper":"^1.0.0","redux-form":"^6.6.1","redux-form-material-ui":"^4.2.0","redux-logger":"^3.0.6","redux-thunk":"^2.2.0","whatwg-fetch":"^2.0.3"},devDependencies:{"babel-core":"^6.24.1","babel-eslint":"^7.2.3","babel-loader":"^7.0.0","babel-plugin-lodash":"^3.2.11","babel-plugin-syntax-dynamic-import":"^6.18.0","babel-plugin-transform-class-properties":"^6.24.1","babel-plugin-transform-decorators-legacy":"^1.3.4","babel-plugin-transform-export-extensions":"^6.22.0","babel-plugin-transform-object-rest-spread":"^6.23.0","babel-plugin-transform-runtime":"^6.15.0","babel-preset-env":"^1.4.0","babel-preset-react":"^6.24.1","babel-runtime":"^6.20.0",chalk:"^1.1.3",compression:"^1.6.2","connect-history-api-fallback":"^1.3.0","cross-env":"^5.0.0","css-loader":"^0.28.1",eslint:"^3.19.0","eslint-config-prettier":"^2.3.0","eslint-config-standard":"^10.2.1","eslint-config-standard-react":"^5.0.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-import":"^2.2.0","eslint-plugin-node":"^4.2.2","eslint-plugin-prettier":"^2.1.2","eslint-plugin-promise":"^3.5.0","eslint-plugin-react":"^7.0.1","eslint-plugin-standard":"^3.0.1",express:"^4.14.0","extract-text-webpack-plugin":"^2.1.0",figures:"^2.0.0","file-loader":"^0.11.1","fs-extra":"^3.0.1","html-webpack-plugin":"^2.29.0",husky:"^0.14.3",ip:"^1.1.5","node-sass":"^4.5.3",prettier:"^1.5.3",rimraf:"^2.6.1","sass-loader":"^6.0.5","style-loader":"^0.17.0","url-loader":"^0.5.8",webpack:"^2.5.1","webpack-dashboard":"^0.4.0","webpack-dev-middleware":"^1.11.0","webpack-hot-middleware":"^2.13.2",yargs:"^8.0.1"}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(0),o=r(i),a=n(18),s=r(a),u=n(1146),c=(r(u),n(543)),l=r(c),h=n(511),f=n(297);n(319),window.version=h.version,window.env=f.env;var p=window.___INITIAL_STATE__||{firebase:{authError:null}},d=(0,l.default)(p),v=document.getElementById("root"),y=function(){var t=n(527).default,e=n(542).default(d);s.default.render(o.default.createElement(t,{store:d,routes:e}),v)};y()},,,function(t,e,n){(function(t){(function(){function t(t){return"string"==typeof t}function e(t){return"boolean"==typeof t}function r(){}function i(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e}function o(t){return null===t}function a(t){return"array"==i(t)}function s(t){var e=i(t);return"array"==e||"object"==e&&"number"==typeof t.length}function u(t){return"function"==i(t)}function c(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}function l(t,e,n){return t.call.apply(t.bind,arguments)}function h(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function f(t,e,n){return f=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?l:h,f.apply(null,arguments)}function p(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}function d(t,e){function n(){}n.prototype=e.prototype,t.lb=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.ad=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function v(t){t.prototype.then=t.prototype.then,t.prototype.$goog_Thenable=!0}function y(t){if(!t)return!1;try{return!!t.$goog_Thenable}catch(t){return!1}}function g(t){if(Error.captureStackTrace)Error.captureStackTrace(this,g);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function _(t,e){t=t.split("%s");for(var n="",r=t.length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");g.call(this,n+t[r])}function m(t,e){throw new _("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function b(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function w(t,e){t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}function E(){this.b=this.a=null}function S(){var t=Mu,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function T(){this.next=this.b=this.a=null}function C(e,n){var r=e.length,i=t(e)?e.split(""):e;for(--r;0<=r;--r)r in i&&n.call(void 0,i[r],r,e)}function I(e){t:{for(var n=qr,r=e.length,i=t(e)?e.split(""):e,o=0;o<r;o++)if(o in i&&n.call(void 0,i[o],o,e)){n=o;break t}n=-1}return 0>n?null:t(e)?e.charAt(n):e[n]}function O(t,e){return 0<=bu(t,e)}function A(t,e){e=bu(t,e);var n;return(n=0<=e)&&Array.prototype.splice.call(t,e,1),n}function R(t,e){var n=0;C(t,function(r,i){e.call(void 0,r,i,t)&&1==Array.prototype.splice.call(t,i,1).length&&n++})}function N(t){return Array.prototype.concat.apply([],arguments)}function P(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function k(t,e){for(var n=t.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}function D(t){return Pu.test(t)?(-1!=t.indexOf("&")&&(t=t.replace(Cu,"&amp;")),-1!=t.indexOf("<")&&(t=t.replace(Iu,"&lt;")),-1!=t.indexOf(">")&&(t=t.replace(Ou,"&gt;")),-1!=t.indexOf('"')&&(t=t.replace(Au,"&quot;")),-1!=t.indexOf("'")&&(t=t.replace(Ru,"&#39;")),-1!=t.indexOf("\0")&&(t=t.replace(Nu,"&#0;")),t):t}function x(t,e){return-1!=t.indexOf(e)}function F(t,e){return t<e?-1:t>e?1:0}function L(t){return x(mu,t)}function j(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function M(t){for(var e in t)return!1;return!0}function U(t){var e,n={};for(e in t)n[e]=t[e];return n}function V(t,e){for(var n,r,i=1;i<arguments.length;i++){r=arguments[i];for(n in r)t[n]=r[n];for(var o=0;o<Lu.length;o++)n=Lu[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function W(t){du.setTimeout(function(){throw t},0)}function B(){var t=du.MessageChannel;if(void 0===t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!L("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow;t=e.document,t.open(),t.write(""),t.close();var n="callImmediate"+Math.random(),r="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=f(function(t){"*"!=r&&t.origin!=r||t.data!=n||this.port1.onmessage()},this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,r)}}}),void 0!==t&&!L("Trident")&&!L("MSIE")){var e=new t,n={},r=n;return e.port1.onmessage=function(){if(void 0!==n.next){n=n.next;var t=n.rb;n.rb=null,t()}},function(t){r.next={rb:t},r=r.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){du.setTimeout(t,0)}}function q(t,e){Fu||H(),ju||(Fu(),ju=!0),Mu.add(t,e)}function H(){if(du.Promise&&du.Promise.resolve){var t=du.Promise.resolve(void 0);Fu=function(){t.then(K)}}else Fu=function(){var t=K;!u(du.setImmediate)||du.Window&&du.Window.prototype&&!L("Edge")&&du.Window.prototype.setImmediate==du.setImmediate?(xu||(xu=B()),xu(t)):du.setImmediate(t)}}function K(){for(var t;t=S();){try{t.a.call(t.b)}catch(t){W(t)}w(_u,t)}ju=!1}function G(t,e){if(this.a=Uu,this.j=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=r)try{var n=this;t.call(e,function(t){rt(n,Vu,t)},function(t){if(!(t instanceof ht))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(t){}rt(n,Wu,t)})}catch(t){rt(this,Wu,t)}}function z(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}function Q(t,e,n){var r=Bu.get();return r.g=t,r.b=e,r.f=n,r}function Y(t){if(t instanceof G)return t;var e=new G(r);return rt(e,Vu,t),e}function X(t){return new G(function(e,n){n(t)})}function $(t,e,n){it(t,e,n,null)||q(p(e,t))}function J(t){return new G(function(e,n){var r=t.length,i=[];if(r)for(var o,a=function(t,n){r--,i[t]=n,0==r&&e(i)},s=function(t){n(t)},u=0;u<t.length;u++)o=t[u],$(o,p(a,u),s);else e(i)})}function Z(t){return new G(function(e){var n=t.length,r=[];if(n)for(var i,o=function(t,i,o){n--,r[t]=i?{Zb:!0,value:o}:{Zb:!1,reason:o},0==n&&e(r)},a=0;a<t.length;a++)i=t[a],$(i,p(o,a,!0),p(o,a,!1));else e(r)})}function tt(t,e){if(t.a==Uu)if(t.c){var n=t.c;if(n.b){for(var r=0,i=null,o=null,a=n.b;a&&(a.c||(r++,a.a==t&&(i=a),!(i&&1<r)));a=a.next)i||(o=a);i&&(n.a==Uu&&1==r?tt(n,e):(o?(r=o,r.next==n.f&&(n.f=r),r.next=r.next.next):st(n),ut(n,i,Wu,e)))}t.c=null}else rt(t,Wu,e)}function et(t,e){t.b||t.a!=Vu&&t.a!=Wu||at(t),t.f?t.f.next=e:t.b=e,t.f=e}function nt(t,e,n,r){var i=Q(null,null,null);return i.a=new G(function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(t){o(t)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof ht?o(e):t(i)}catch(t){o(t)}}:o}),i.a.c=t,et(t,i),i.a}function rt(t,e,n){t.a==Uu&&(t===n&&(e=Wu,n=new TypeError("Promise cannot resolve to itself")),t.a=1,it(n,t.Kc,t.Lc,t)||(t.j=n,t.a=e,t.c=null,at(t),e!=Wu||n instanceof ht||lt(t,n)))}function it(t,e,n,i){if(t instanceof G)return et(t,Q(e||r,n||null,i)),!0;if(y(t))return t.then(e,n,i),!0;if(c(t))try{var o=t.then;if(u(o))return ot(t,o,e,n,i),!0}catch(t){return n.call(i,t),!0}return!1}function ot(t,e,n,r,i){function o(t){s||(s=!0,r.call(i,t))}function a(t){s||(s=!0,n.call(i,t))}var s=!1;try{e.call(t,a,o)}catch(t){o(t)}}function at(t){t.h||(t.h=!0,q(t.Ub,t))}function st(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e}function ut(t,e,n,r){if(n==Wu&&e.b&&!e.c)for(;t&&t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,ct(e,n,r);else try{e.c?e.g.call(e.f):ct(e,n,r)}catch(t){qu.call(null,t)}w(Bu,e)}function ct(t,e,n){e==Vu?t.g.call(t.f,n):t.b&&t.b.call(t.f,n)}function lt(t,e){t.g=!0,q(function(){t.g&&qu.call(null,e)})}function ht(t){g.call(this,t)}function ft(){0!=Hu&&(Ku[this[vu]||(this[vu]=++yu)]=this),this.pa=this.pa,this.oa=this.oa}function pt(t){if(!t.pa&&(t.pa=!0,t.ua(),0!=Hu)){var e=t[vu]||(t[vu]=++yu);if(0!=Hu&&t.oa&&0<t.oa.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ku[e]}}function dt(t){return dt[" "](t),t}function vt(t,e){var n=rc;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}function yt(){var t=du.document;return t?t.documentMode:void 0}function gt(t){return vt(t,function(){for(var e=0,n=Tu(String(Gu)).split("."),r=Tu(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=F(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||F(0==a[2].length,0==s[2].length)||F(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e})}function _t(t,e){this.type=t,this.b=this.target=e,this.Eb=!0}function mt(e,n){if(_t.call(this,e?e.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,e){var r=this.type=e.type,i=e.changedTouches?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.b=n,n=e.relatedTarget){if($u){t:{try{dt(n.nodeName);var o=!0;break t}catch(t){}o=!1}o||(n=null)}}else"mouseover"==r?n=e.fromElement:"mouseout"==r&&(n=e.toElement);this.relatedTarget=n,null===i?(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0):(this.clientX=void 0!==i.clientX?i.clientX:i.pageX,this.clientY=void 0!==i.clientY?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType=t(e.pointerType)?e.pointerType:cc[e.pointerType]||"",this.a=e,e.defaultPrevented&&this.preventDefault()}}function bt(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.La=i,this.key=++hc,this.ma=this.Ha=!1}function wt(t){t.ma=!0,t.listener=null,t.proxy=null,t.src=null,t.La=null}function Et(t){this.src=t,this.a={},this.b=0}function St(t,e){var n=e.type;n in t.a&&A(t.a[n],e)&&(wt(e),0==t.a[n].length&&(delete t.a[n],t.b--))}function Tt(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.ma&&o.listener==e&&o.capture==!!n&&o.La==r)return i}return-1}function Ct(t,e,n,r,i){if(r&&r.once)At(t,e,n,r,i);else if(a(e))for(var o=0;o<e.length;o++)Ct(t,e[o],n,r,i);else n=Lt(n),t&&t[lc]?Mt(t,e,n,c(r)?!!r.capture:!!r,i):It(t,e,n,!1,r,i)}function It(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=c(i)?!!i.capture:!!i,s=Ft(t);if(s||(t[fc]=s=new Et(t)),n=s.add(e,n,r,a,o),!n.proxy){if(r=Ot(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)uc||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(Pt(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}dc++}}function Ot(){var t=xt,e=ac?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}function At(t,e,n,r,i){if(a(e))for(var o=0;o<e.length;o++)At(t,e[o],n,r,i);else n=Lt(n),t&&t[lc]?Ut(t,e,n,c(r)?!!r.capture:!!r,i):It(t,e,n,!0,r,i)}function Rt(t,e,n,r,i){if(a(e))for(var o=0;o<e.length;o++)Rt(t,e[o],n,r,i);else r=c(r)?!!r.capture:!!r,n=Lt(n),t&&t[lc]?(t=t.u,(e=String(e).toString())in t.a&&(o=t.a[e],-1<(n=Tt(o,n,r,i))&&(wt(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=Ft(t))&&(e=t.a[e.toString()],t=-1,e&&(t=Tt(e,n,r,i)),(n=-1<t?e[t]:null)&&Nt(n))}function Nt(t){if("number"!=typeof t&&t&&!t.ma){var e=t.src;if(e&&e[lc])St(e.u,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(Pt(n),r):e.addListener&&e.removeListener&&e.removeListener(r),dc--,(n=Ft(e))?(St(n,t),0==n.b&&(n.src=null,e[fc]=null)):wt(t)}}}function Pt(t){return t in pc?pc[t]:pc[t]="on"+t}function kt(t,e,n,r){var i=!0;if((t=Ft(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.ma&&(o=Dt(o,r),i=i&&!1!==o)}return i}function Dt(t,e){var n=t.listener,r=t.La||t.src;return t.Ha&&Nt(t),n.call(r,e)}function xt(t,e){if(t.ma)return!0;if(!ac){if(!e)t:{e=["window","event"];for(var n=du,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}if(r=e,e=new mt(r,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){t:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(t){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=e.b;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){e.b=r[i];var o=kt(r[i],t,!0,e);n=n&&o}for(i=0;i<r.length;i++)e.b=r[i],o=kt(r[i],t,!1,e),n=n&&o}return n}return Dt(t,new mt(e,this))}function Ft(t){return t=t[fc],t instanceof Et?t:null}function Lt(t){return u(t)?t:(t[vc]||(t[vc]=function(e){return t.handleEvent(e)}),t[vc])}function jt(){ft.call(this),this.u=new Et(this),this.Mb=this,this.Ta=null}function Mt(t,e,n,r,i){t.u.add(String(e),n,!1,r,i)}function Ut(t,e,n,r,i){t.u.add(String(e),n,!0,r,i)}function Vt(t,e,n,r){if(!(e=t.u.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.ma&&a.capture==n){var s=a.listener,u=a.La||a.src;a.Ha&&St(t.u,a),i=!1!==s.call(u,r)&&i}}return i&&0!=r.Eb}function Wt(t,e,n){if(u(t))n&&(t=f(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=f(t.handleEvent,t)}return 2147483647<Number(e)?-1:du.setTimeout(t,e||0)}function Bt(t){var e=null;return new G(function(n,r){-1==(e=Wt(function(){n(void 0)},t))&&r(Error("Failed to schedule timer."))}).m(function(t){throw du.clearTimeout(e),t})}function qt(e){if(e.S&&"function"==typeof e.S)return e.S();if(t(e))return e.split("");if(s(e)){for(var n=[],r=e.length,i=0;i<r;i++)n.push(e[i]);return n}n=[],r=0;for(i in e)n[r++]=e[i];return n}function Ht(e){if(e.U&&"function"==typeof e.U)return e.U();if(!e.S||"function"!=typeof e.S){if(s(e)||t(e)){var n=[];e=e.length;for(var r=0;r<e;r++)n.push(r);return n}n=[],r=0;for(var i in e)n[r++]=i;return n}}function Kt(e,n){if(e.forEach&&"function"==typeof e.forEach)e.forEach(n,void 0);else if(s(e)||t(e))wu(e,n,void 0);else for(var r=Ht(e),i=qt(e),o=i.length,a=0;a<o;a++)n.call(void 0,i[a],r&&r[a],e)}function Gt(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Gt)for(n=t.U(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function zt(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];Qt(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)r=t.a[e],Qt(i,r)||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function Qt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Yt(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function Xt(t,e){if(this.b=this.l=this.c="",this.j=null,this.h=this.g="",this.f=!1,t instanceof Xt){this.f=void 0!==e?e:t.f,$t(this,t.c),this.l=t.l,this.b=t.b,Jt(this,t.j),this.g=t.g,e=t.a;var n=new se;n.c=e.c,e.a&&(n.a=new Gt(e.a),n.b=e.b),Zt(this,n),this.h=t.h}else t&&(n=String(t).match(yc))?(this.f=!!e,$t(this,n[1]||"",!0),this.l=ie(n[2]||""),this.b=ie(n[3]||"",!0),Jt(this,n[4]),this.g=ie(n[5]||"",!0),Zt(this,n[6]||"",!0),this.h=ie(n[7]||"")):(this.f=!!e,this.a=new se(null,this.f))}function $t(t,e,n){t.c=n?ie(e,!0):e,t.c&&(t.c=t.c.replace(/:$/,""))}function Jt(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.j=e}else t.j=null}function Zt(t,e,n){e instanceof se?(t.a=e,de(t.a,t.f)):(n||(e=oe(e,bc)),t.a=new se(e,t.f))}function te(t,e,n){t.a.set(e,n)}function ee(t,e){return t.a.get(e)}function ne(t){return t instanceof Xt?new Xt(t):new Xt(t,void 0)}function re(t,e){var n=new Xt(null,void 0);return $t(n,"https"),t&&(n.b=t),e&&(n.g=e),n}function ie(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function oe(e,n,r){return t(e)?(e=encodeURI(e).replace(n,ae),r&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ae(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(15&t).toString(16)}function se(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function ue(t){t.a||(t.a=new Gt,t.b=0,t.c&&Yt(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function ce(t){var e=Ht(t);if(void 0===e)throw Error("Keys are undefined");var n=new se(null,void 0);t=qt(t);for(var r=0;r<e.length;r++){var i=e[r],o=t[r];a(o)?fe(n,i,o):n.add(i,o)}return n}function le(t,e){ue(t),e=pe(t,e),Qt(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,t=t.a,Qt(t.b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&zt(t)))}function he(t,e){return ue(t),e=pe(t,e),Qt(t.a.b,e)}function fe(t,e,n){le(t,e),0<n.length&&(t.c=null,t.a.set(pe(t,e),P(n)),t.b+=n.length)}function pe(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function de(t,e){e&&!t.f&&(ue(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(le(this,e),fe(this,n,t))},t)),t.f=e}function ve(){this.a="",this.b=Sc}function ye(t){return t instanceof ve&&t.constructor===ve&&t.b===Sc?t.a:(m("expected object of type Const, got '"+t+"'"),"type_error:Const")}function ge(t){var e=new ve;return e.a=t,e}function _e(){this.a="",this.b=Ic}function me(t){return t instanceof _e&&t.constructor===_e&&t.b===Ic?t.a:(m("expected object of type TrustedResourceUrl, got '"+t+"' of type "+i(t)),"type_error:TrustedResourceUrl")}function be(t,e){var n=ye(t);if(!Cc.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return t=n.replace(Tc,function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return t=e[r],t instanceof ve?ye(t):encodeURIComponent(String(t))}),we(t)}function we(t){var e=new _e;return e.a=t,e}function Ee(){this.a="",this.b=Ac}function Se(t){return t instanceof Ee&&t.constructor===Ee&&t.b===Ac?t.a:(m("expected object of type SafeUrl, got '"+t+"' of type "+i(t)),"type_error:SafeUrl")}function Te(t){return t instanceof Ee?t:(t=t.la?t.ja():String(t),Oc.test(t)||(t="about:invalid#zClosurez"),Ce(t))}function Ce(t){var e=new Ee;return e.a=t,e}function Ie(){this.a="",this.b=Rc}function Oe(t){return t instanceof Ie&&t.constructor===Ie&&t.b===Rc?t.a:(m("expected object of type SafeHtml, got '"+t+"' of type "+i(t)),"type_error:SafeHtml")}function Ae(t){var e=new Ie;return e.a=t,e}function Re(e){var n=document;return t(e)?n.getElementById(e):e}function Ne(t,e){j(e,function(e,n){e&&e.la&&(e=e.ja()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:Nc.hasOwnProperty(n)?t.setAttribute(Nc[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e})}function Pe(e,n,r){var i=arguments,o=document,s=String(i[0]),u=i[1];if(!Ec&&u&&(u.name||u.type)){if(s=["<",s],u.name&&s.push(' name="',D(u.name),'"'),u.type){s.push(' type="',D(u.type),'"');var c={};V(c,u),delete c.type,u=c}s.push(">"),s=s.join("")}return s=o.createElement(s),u&&(t(u)?s.className=u:a(u)?s.className=u.join(" "):Ne(s,u)),2<i.length&&ke(o,s,i),s}function ke(e,n,r){function i(r){r&&n.appendChild(t(r)?e.createTextNode(r):r)}for(var o=2;o<r.length;o++){var a=r[o];!s(a)||c(a)&&0<a.nodeType?i(a):wu(De(a)?P(a):a,i)}}function De(t){if(t&&"number"==typeof t.length){if(c(t))return"function"==typeof t.item||"string"==typeof t.item;if(u(t))return"function"==typeof t.item}return!1}function xe(t){var e=[];return Le(new Fe,t,e),e.join("")}function Fe(){}function Le(t,e,n){if(null==e)n.push("null");else{if("object"==typeof e){if(a(e)){var r=e;e=r.length,n.push("[");for(var i="",o=0;o<e;o++)n.push(i),Le(t,r[o],n),i=",";return void n.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){n.push("{"),i="";for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&"function"!=typeof(o=e[r])&&(n.push(i),je(r,n),n.push(":"),Le(t,o,n),i=",");return void n.push("}")}e=e.valueOf()}switch(typeof e){case"string":je(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?String(e):"null");break;case"boolean":n.push(String(e));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof e)}}}function je(t,e){e.push('"',t.replace(kc,function(t){var e=Pc[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),Pc[t]=e),e}),'"')}function Me(){var t=nn();return Qu&&!!nc&&11==nc||/Edge\/\d+/.test(t)}function Ue(){return du.window&&du.window.location.href||self&&self.location&&self.location.href||""}function Ve(t,e){e=e||du.window;var n="about:blank";t&&(n=Se(Te(t))),e.location.href=n}function We(t,e){var n,r=[];for(n in t)if(n in e)if(typeof t[n]!=typeof e[n])r.push(n);else if(a(t[n])){t:{var i=void 0,o=t[n],s=e[n];for(i in o)if(!(i in s)||o[i]!==s[i]){i=!1;break t}for(i in s)if(!(i in o)){i=!1;break t}i=!0}i||r.push(n)}else"object"==typeof t[n]&&null!=t[n]&&null!=e[n]?0<We(t[n],e[n]).length&&r.push(n):t[n]!==e[n]&&r.push(n);else r.push(n);for(n in e)n in t||r.push(n);return r}function Be(){var t=nn();return!((t=tn(t)!=Fc?null:(t=t.match(/\sChrome\/(\d+)/i))&&2==t.length?parseInt(t[1],10):null)&&30>t)&&(!Qu||!nc||9<nc)}function qe(t){return t=(t||nn()).toLowerCase(),!!(t.match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function He(t){t=t||du.window;try{t.close()}catch(t){}}function Ke(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;e={width:e,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=nn().toLowerCase(),r&&(e.target=r,x(n,"crios/")&&(e.target="_blank")),tn(nn())==xc&&(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof Ee?n:Te(void 0!==n.href?n.href:String(n)),n=t.target||n.target,i=[];for(a in t)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+t[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(t[a]?1:0))}var a=i.join(",");if((L("iPhone")&&!L("iPod")&&!L("iPad")||L("iPad")||L("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(a=r.document.createElement("A"),e instanceof Ee||e instanceof Ee||(e=e.la?e.ja():String(e),Oc.test(e)||(e="about:invalid#zClosurez"),e=Ce(e)),a.href=Se(e),a.setAttribute("target",n),t.noreferrer&&a.setAttribute("rel","noreferrer"),t=document.createEvent("MouseEvent"),t.initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(t),a={}):t.noreferrer?(a=r.open("",n,a),t=Se(e),a&&(Xu&&x(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),a.opener=null,ge("b/12014412, meta tag with sanitized URL"),t='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+D(t)+'">',t=Ae(t),a.document.write(Oe(t)),a.document.close())):(a=r.open(Se(e),n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(t){}return a}function Ge(t){return new G(function(e){function n(){Bt(2e3).then(function(){if(t&&!t.closed)return n();e()})}return n()})}function ze(){var t=null;return new G(function(e){"complete"==du.document.readyState?e():(t=function(){e()},At(window,"load",t))}).m(function(e){throw Rt(window,"load",t),e})}function Qe(){return Ye(void 0)?ze().then(function(){return new G(function(t,e){var n=du.document,r=setTimeout(function(){e(Error("Cordova framework is not ready."))},1e3);n.addEventListener("deviceready",function(){clearTimeout(r),t()},!1)})}):X(Error("Cordova must run in an Android or iOS file scheme."))}function Ye(t){return t=t||nn(),!("file:"!==un()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Xe(){var t=du.window;try{return!(!t||t==t.top)}catch(t){return!1}}function $e(){return"object"!=typeof du.window&&"function"==typeof du.importScripts}function Je(){return fu.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":fu.INTERNAL.hasOwnProperty("node")?"Node":$e()?"Worker":"Browser"}function Ze(){var t=Je();return"ReactNative"===t||"Node"===t}function tn(t){var e=t.toLowerCase();return x(e,"opera/")||x(e,"opr/")||x(e,"opios/")?"Opera":x(e,"iemobile")?"IEMobile":x(e,"msie")||x(e,"trident/")?"IE":x(e,"edge/")?"Edge":x(e,"firefox/")?xc:x(e,"silk/")?"Silk":x(e,"blackberry")?"Blackberry":x(e,"webos")?"Webos":!x(e,"safari/")||x(e,"chrome/")||x(e,"crios/")||x(e,"android")?!x(e,"chrome/")&&!x(e,"crios/")||x(e,"edge/")?x(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":Fc:"Safari"}function en(t,e){e=e||[];var n,r=[],i={};for(n in Lc)i[Lc[n]]=!0;for(n=0;n<e.length;n++)void 0!==i[e[n]]&&(delete i[e[n]],r.push(e[n]));return r.sort(),e=r,e.length||(e=["FirebaseCore-web"]),r=Je(),"Browser"===r?(i=nn(),r=tn(i)):"Worker"===r&&(i=nn(),r=tn(i)+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function nn(){return du.navigator&&du.navigator.userAgent||""}function rn(t,e){t=t.split("."),e=e||du;for(var n=0;n<t.length&&"object"==typeof e&&null!=e;n++)e=e[t[n]];return n!=t.length&&(e=void 0),e}function on(){try{var t=du.localStorage,e=pn();if(t)return t.setItem(e,"1"),t.removeItem(e),!Me()||!!du.indexedDB}catch(t){return $e()&&!!du.indexedDB}return!1}function an(){return(sn()||"chrome-extension:"===un()||Ye())&&!Ze()&&on()&&!$e()}function sn(){return"http:"===un()||"https:"===un()}function un(){return du.location&&du.location.protocol||null}function cn(t){return t=t||nn(),!qe(t)&&tn(t)!=xc}function ln(t){return void 0===t?null:xe(t)}function hn(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return n}function fn(t){if(null!==t)return JSON.parse(t)}function pn(t){return t||Math.floor(1e9*Math.random()).toString()}function dn(t){return t=t||nn(),"Safari"!=tn(t)&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function vn(){var t=du.___jsl;if(t&&t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var n=0;n<t.CP.length;n++)t.CP[n]=null}function yn(t,e){if(t>e)throw Error("Short delay should be less than long delay!");this.a=t,this.c=e,t=nn(),e=Je(),this.b=qe(t)||"ReactNative"===e}function gn(){var t=du.document;return!t||void 0===t.visibilityState||"visible"==t.visibilityState}function _n(){var t=du.document,e=null;return gn()||!t?Y():new G(function(n){e=function(){gn()&&(t.removeEventListener("visibilitychange",e,!1),n())},t.addEventListener("visibilitychange",e,!1)}).m(function(n){throw t.removeEventListener("visibilitychange",e,!1),n})}function mn(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&&!/[^0-9]/.test(t))return e.toUTCString()}catch(t){}return null}function bn(){return!(!rn("fireauth.oauthhelper",du)&&!rn("fireauth.iframe",du))}function wn(t,e,n){jc?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function En(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&&wn(t,n,e[n])}function Sn(t){var e={};return En(e,t),e}function Tn(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function Cn(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n<e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}function In(t){var e=t;if("object"==typeof t&&null!=t){e="length"in t?[]:{};for(var n in t)wn(e,n,In(t[n]))}return e}function On(t){var e={},n=t[Wc],r=t[Bc];if(!(t=t[qc])||t!=Vc&&!n)throw Error("Invalid provider user info!");e[Kc]=r||null,e[Hc]=n||null,wn(this,zc,t),wn(this,Gc,In(e))}function An(t,e){this.code=Qc+t,this.message=e||Yc[t]||""}function Rn(t){var e=t&&t.code;return e?new An(e.substring(Qc.length),t.message):null}function Nn(t){var e=t[Zc];if(void 0===e)throw new An("missing-continue-uri");if("string"!=typeof e||"string"==typeof e&&!e.length)throw new An("invalid-continue-uri");this.h=e,this.b=this.a=null,this.g=!1;var n=t[Xc];if(n&&"object"==typeof n){e=n[nl];var r=n[tl];if(n=n[el],"string"==typeof e&&e.length){if(this.a=e,void 0!==r&&"boolean"!=typeof r)throw new An("argument-error",tl+" property must be a boolean when specified.");if(this.g=!!r,void 0!==n&&("string"!=typeof n||"string"==typeof n&&!n.length))throw new An("argument-error",el+" property must be a non empty string when specified.");this.b=n||null}else{if(void 0!==e)throw new An("argument-error",nl+" property must be a non empty string when specified.");if(void 0!==r||void 0!==n)throw new An("missing-android-pkg-name")}}else if(void 0!==n)throw new An("argument-error",Xc+" property must be a non null object when specified.");if(this.f=null,(e=t[Jc])&&"object"==typeof e){if("string"==typeof(e=e[rl])&&e.length)this.f=e;else if(void 0!==e)throw new An("argument-error",rl+" property must be a non empty string when specified.")}else if(void 0!==e)throw new An("argument-error",Jc+" property must be a non null object when specified.");if(void 0!==(t=t[$c])&&"boolean"!=typeof t)throw new An("argument-error",$c+" property must be a boolean when specified.");this.c=!!t}function Pn(t){var e={};e.continueUrl=t.h,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&&(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f;for(var n in e)null===e[n]&&delete e[n];return e}function kn(t){return Eu(t,function(t){return t=t.toString(16),1<t.length?t:"0"+t}).join("")}function Dn(t){var e="";return xn(t,function(t){e+=String.fromCharCode(t)}),e}function xn(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=ol[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}Fn();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&&-1===i)break;e(i<<2|o>>4),64!=a&&(e(o<<4&240|a>>2),64!=s&&e(a<<6&192|s))}}function Fn(){if(!il){il={},ol={};for(var t=0;65>t;t++)il[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),ol[il[t]]=t,62<=t&&(ol["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t)]=t)}}function Ln(t){this.c=t.sub,gu(),this.a=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.b=!!t.is_anonymous||"anonymous"==this.a}function jn(t){return(t=Mn(t))&&t.sub&&t.iss&&t.aud&&t.exp?new Ln(t):null}function Mn(t){if(!t)return null;if(t=t.split("."),3!=t.length)return null;t=t[1];for(var e=(4-t.length%4)%4,n=0;n<e;n++)t+=".";try{return JSON.parse(Dn(t))}catch(t){}return null}function Un(t){for(var e in ul)if(ul[e].Na==t)return ul[e];return null}function Vn(t){var e={};e["facebook.com"]=qn,e["google.com"]=Kn,e["github.com"]=Hn,e["twitter.com"]=Gn;var n=t&&t[ll];try{if(n)return e[n]?new e[n](t):new Bn(t);if(void 0!==t[cl])return new Wn(t)}catch(t){}return null}function Wn(t){var e=t[ll];if(!e&&t[cl]){var n=jn(t[cl]);n&&n.a&&(e=n.a)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&&"custom"!=e||(e=null),n=!1,void 0!==t.isNewUser?n=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(n=!0),wn(this,"providerId",e),wn(this,"isNewUser",n)}function Bn(t){Wn.call(this,t),t=fn(t.rawUserInfo||"{}"),wn(this,"profile",In(t||{}))}function qn(t){if(Bn.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function Hn(t){if(Bn.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");wn(this,"username",this.profile&&this.profile.login||null)}function Kn(t){if(Bn.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function Gn(t){if(Bn.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");wn(this,"username",t.screenName||null)}function zn(t){this.a=ne(t)}function Qn(t){var e=ne(t),n=ee(e,"link"),r=ee(ne(n),"link");return e=ee(e,"deep_link_id"),ee(ne(e),"link")||e||r||n||t}function Yn(t,e){return t.then(function(t){if(t[Rl]){var n=jn(t[Rl]);if(!n||e!=n.c)throw new An("user-mismatch");return t}throw new An("user-mismatch")}).m(function(t){throw t&&t.code&&t.code==Qc+"user-not-found"?new An("user-mismatch"):t})}function Xn(t,e,n){if(e.idToken||e.accessToken)e.idToken&&wn(this,"idToken",e.idToken),e.accessToken&&wn(this,"accessToken",e.accessToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new An("internal-error","failed to construct a credential");wn(this,"accessToken",e.oauthToken),wn(this,"secret",e.oauthTokenSecret)}wn(this,"providerId",t),wn(this,"signInMethod",n)}function $n(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,{postBody:ce(e).toString(),requestUri:"http://localhost"}}function Jn(t,e){this.Ac=e||[],En(this,{providerId:t,isOAuthProvider:!0}),this.tb={},this.Za=(Un(t)||{}).Ma||null,this.Xa=null}function Zn(t){Jn.call(this,t,sl),this.a=[]}function tr(){Zn.call(this,"facebook.com")}function er(t){if(!t)throw new An("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return c(t)&&(e=t.accessToken),(new tr).credential(null,e)}function nr(){Zn.call(this,"github.com")}function rr(t){if(!t)throw new An("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return c(t)&&(e=t.accessToken),(new nr).credential(null,e)}function ir(){Zn.call(this,"google.com"),this.ta("profile")}function or(t,e){var n=t;return c(t)&&(n=t.idToken,e=t.accessToken),(new ir).credential(n,e)}function ar(){Jn.call(this,"twitter.com",al)}function sr(t,e){var n=t;if(c(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new An("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new Xn("twitter.com",n,"twitter.com")}function ur(t,e,n){this.a=t,this.b=e,wn(this,"providerId","password"),wn(this,"signInMethod",n===cr.EMAIL_LINK_SIGN_IN_METHOD?cr.EMAIL_LINK_SIGN_IN_METHOD:cr.EMAIL_PASSWORD_SIGN_IN_METHOD)}function cr(){En(this,{providerId:"password",isOAuthProvider:!1})}function lr(t,e){if(!(e=hr(e)))throw new An("argument-error","Invalid email link!");return new ur(t,e,cr.EMAIL_LINK_SIGN_IN_METHOD)}function hr(t){t=Qn(t),t=new zn(t);var e=ee(t.a,"oobCode")||null;return"signIn"===(ee(t.a,"mode")||null)&&e?e:null}function fr(t){if(!(t.Ra&&t.Qa||t.Ea&&t.Z))throw new An("internal-error");this.a=t,wn(this,"providerId","phone"),wn(this,"signInMethod","phone")}function pr(t){return t.a.Ea&&t.a.Z?{temporaryProof:t.a.Ea,phoneNumber:t.a.Z}:{sessionInfo:t.a.Ra,code:t.a.Qa}}function dr(t){try{this.a=t||fu.auth()}catch(t){throw new An("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}En(this,{providerId:"phone",isOAuthProvider:!1})}function vr(t,e){if(!t)throw new An("missing-verification-id");if(!e)throw new An("missing-verification-code");return new fr({Ra:t,Qa:e})}function yr(t){if(t.temporaryProof&&t.phoneNumber)return new fr({Ea:t.temporaryProof,Z:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret;t=t&&t.oauthIdToken;try{switch(e){case"google.com":return or(t,n);case"facebook.com":return er(n);case"github.com":return rr(n);case"twitter.com":return sr(n,r);default:return new Zn(e).credential(t,n)}}catch(t){return null}}function gr(t){if(!t.isOAuthProvider)throw new An("invalid-oauth-provider")}function _r(t,e,n,r,i){if(this.b=t,this.c=e||null,this.f=n||null,this.g=r||null,this.a=i||null,!this.f&&!this.a)throw new An("invalid-auth-event");if(this.f&&this.a)throw new An("invalid-auth-event");if(this.f&&!this.g)throw new An("invalid-auth-event")}function mr(t){return t=t||{},t.type?new _r(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&Rn(t.error)):null}function br(){this.b=null,this.a=[]}function wr(t){var e="unauthorized-domain",n=void 0,r=ne(t);t=r.b,r=r.c,"chrome-extension"==r?n=k("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==r||"https"==r?n=k("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",An.call(this,e,n)}function Er(t,e,n){An.call(this,t,n),t=e||{},t.ub&&wn(this,"email",t.ub),t.Z&&wn(this,"phoneNumber",t.Z),t.credential&&wn(this,"credential",t.credential)}function Sr(t){if(t.code){var e=t.code||"";0==e.indexOf(Qc)&&(e=e.substring(Qc.length));var n={credential:yr(t)};if(t.email)n.ub=t.email;else{if(!t.phoneNumber)return new An(e,t.message||void 0);n.Z=t.phoneNumber}return new Er(e,n,t.message)}return null}function Tr(){}function Cr(t){return t.c||(t.c=t.b())}function Ir(){}function Or(t){if(!t.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function Ar(){}function Rr(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseText="",this.status=-1,this.statusText="",this.a.onload=f(this.bc,this),this.a.onerror=f(this.zb,this),this.a.onprogress=f(this.cc,this),this.a.ontimeout=f(this.fc,this)}function Nr(t,e){t.readyState=e,t.onreadystatechange&&t.onreadystatechange()}function Pr(t,e,n){this.reset(t,e,n,void 0,void 0)}function kr(t){this.f=t,this.b=this.c=this.a=null}function Dr(t,e){this.name=t,this.value=e}function xr(t){return t.c?t.c:t.a?xr(t.a):(m("Root logger has no level set."),null)}function Fr(t){bl||(bl=new kr(""),ml[""]=bl,bl.c=gl);var e;if(!(e=ml[t])){e=new kr(t);var n=t.lastIndexOf("."),r=t.substr(n+1);n=Fr(t.substr(0,n)),n.b||(n.b={}),n.b[r]=e,e.a=n,ml[t]=e}return e}function Lr(t,e){t&&t.log(_l,e,void 0)}function jr(t){this.f=t}function Mr(t){jt.call(this),this.j=t,this.readyState=wl,this.status=0,this.responseText=this.statusText="",this.onreadystatechange=null,this.g=new Headers,this.b=null,this.h="GET",this.c="",this.a=!1,this.f=Fr("goog.net.FetchXmlHttp")}function Ur(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function Vr(t){jt.call(this),this.headers=new Gt,this.D=t||null,this.c=!1,this.B=this.a=null,this.h=this.N=this.l="",this.f=this.I=this.j=this.G=!1,this.g=0,this.s=null,this.o=El,this.v=this.O=!1}function Wr(t,e,n,r,i){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);n=n?n.toUpperCase():"GET",t.l=e,t.h="",t.N=n,t.G=!1,t.c=!0,t.a=t.D?t.D.a():pl.a(),t.B=Cr(t.D?t.D:pl),t.a.onreadystatechange=f(t.Db,t);try{Lr(t.b,Jr(t,"Opening Xhr")),t.I=!0,t.a.open(n,String(e),!0),t.I=!1}catch(e){return Lr(t.b,Jr(t,"Error opening Xhr: "+e.message)),void Hr(t,e)}e=r||"";var o=new Gt(t.headers);i&&Kt(i,function(t,e){o.set(e,t)}),i=I(o.U()),r=du.FormData&&e instanceof du.FormData,!O(Tl,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach(function(t,e){this.a.setRequestHeader(e,t)},t),t.o&&(t.a.responseType=t.o),"withCredentials"in t.a&&t.a.withCredentials!==t.O&&(t.a.withCredentials=t.O);try{Qr(t),0<t.g&&(t.v=Br(t.a),Lr(t.b,Jr(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.v)),t.v?(t.a.timeout=t.g,t.a.ontimeout=f(t.Fa,t)):t.s=Wt(t.Fa,t.g,t)),Lr(t.b,Jr(t,"Sending request")),t.j=!0,t.a.send(e),t.j=!1}catch(e){Lr(t.b,Jr(t,"Send error: "+e.message)),Hr(t,e)}}function Br(t){return Qu&&gt(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}function qr(t){return"content-type"==t.toLowerCase()}function Hr(t,e){t.c=!1,t.a&&(t.f=!0,t.a.abort(),t.f=!1),t.h=e,Kr(t),zr(t)}function Kr(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function Gr(t){if(t.c&&void 0!==pu)if(t.B[1]&&4==Yr(t)&&2==Xr(t))Lr(t.b,Jr(t,"Local request error detected and ignored"));else if(t.j&&4==Yr(t))Wt(t.Db,0,t);else if(t.dispatchEvent("readystatechange"),4==Yr(t)){Lr(t.b,Jr(t,"Request complete")),t.c=!1;try{var e=Xr(t);t:switch(e){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var n=!0;break t;default:n=!1}var r;if(!(r=n)){var i;if(i=0===e){var o=String(t.l).match(yc)[1]||null;if(!o&&du.self&&du.self.location){var a=du.self.location.protocol;o=a.substr(0,a.length-1)}i=!Sl.test(o?o.toLowerCase():"")}r=i}if(r)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var s=2<Yr(t)?t.a.statusText:""}catch(e){Lr(t.b,"Can not get status: "+e.message),s=""}t.h=s+" ["+Xr(t)+"]",Kr(t)}}finally{zr(t)}}}function zr(t,e){if(t.a){Qr(t);var n=t.a,i=t.B[0]?r:null;t.a=null,t.B=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=i}catch(e){(t=t.b)&&t.log(vl,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function Qr(t){t.a&&t.v&&(t.a.ontimeout=null),t.s&&(du.clearTimeout(t.s),t.s=null)}function Yr(t){return t.a?t.a.readyState:0}function Xr(t){try{return 2<Yr(t)?t.a.status:-1}catch(t){return-1}}function $r(t){try{return t.a?t.a.responseText:""}catch(e){return Lr(t.b,"Can not get responseText: "+e.message),""}}function Jr(t,e){return e+" ["+t.N+" "+t.l+" "+Xr(t)+"]"}function Zr(t,e){this.g=[],this.v=t,this.s=e||null,this.f=this.a=!1,this.c=void 0,this.u=this.B=this.j=!1,this.h=0,this.b=null,this.l=0}function ti(t,e,n){t.a=!0,t.c=n,t.f=!e,oi(t)}function ei(t){if(t.a){if(!t.u)throw new ai(t);t.u=!1}}function ni(t,e){ri(t,null,e,void 0)}function ri(t,e,n,r){t.g.push([e,n,r]),t.a&&oi(t)}function ii(t){return Su(t.g,function(t){return u(t[1])})}function oi(t){if(t.h&&t.a&&ii(t)){var e=t.h,n=Cl[e];n&&(du.clearTimeout(n.a),delete Cl[e]),t.h=0}t.b&&(t.b.l--,delete t.b),e=t.c;for(var r=n=!1;t.g.length&&!t.j;){var i=t.g.shift(),o=i[0],a=i[1];if(i=i[2],o=t.f?a:o)try{var s=o.call(i||t.s,e);void 0!==s&&(t.f=t.f&&(s==e||s instanceof Error),t.c=e=s),(y(e)||"function"==typeof du.Promise&&e instanceof du.Promise)&&(r=!0,t.j=!0)}catch(r){e=r,t.f=!0,ii(t)||(n=!0)}}t.c=e,r&&(s=f(t.o,t,!0),r=f(t.o,t,!1),e instanceof Zr?(ri(e,s,r),e.B=!0):e.then(s,r)),n&&(e=new ui(e),Cl[e.a]=e,t.h=e.a)}function ai(){g.call(this)}function si(){g.call(this)}function ui(t){this.a=du.setTimeout(f(this.c,this),0),this.b=t}function ci(t){var e={},n=e.document||document,r=me(t),i=document.createElement("SCRIPT"),o={Fb:i,Fa:void 0},a=new Zr(hi,o),s=null,u=null!=e.timeout?e.timeout:5e3;return 0<u&&(s=window.setTimeout(function(){fi(i,!0);var t=new pi(Ol,"Timeout reached for loading script "+r);ei(a),ti(a,!1,t)},u),o.Fa=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(fi(i,e.bd||!1,s),a.D())},i.onerror=function(){fi(i,!0,s);var t=new pi(Il,"Error while loading script "+r);ei(a),ti(a,!1,t)},o=e.attributes||{},V(o,{type:"text/javascript",charset:"UTF-8"}),Ne(i,o),i.src=me(t),li(n).appendChild(i),a}function li(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!=e.length?e[0]:t.documentElement}function hi(){if(this&&this.Fb){var t=this.Fb;t&&"SCRIPT"==t.tagName&&fi(t,!0,this.Fa)}}function fi(t,e,n){null!=n&&du.clearTimeout(n),t.onload=r,t.onerror=r,t.onreadystatechange=r,e&&window.setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)},0)}function pi(t,e){var n="Jsloader error (code #"+t+")";e&&(n+=": "+e),g.call(this,n),this.code=t}function di(t){this.f=t}function vi(t,e,n){if(this.b=t,t=e||{},this.j=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.l=t.secureTokenTimeout||Nl,this.f=U(t.secureTokenHeaders||Pl),this.g=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=t.firebaseTimeout||kl,this.a=U(t.firebaseHeaders||Dl),n&&(this.a["X-Client-Version"]=n,this.f["X-Client-Version"]=n),n="Node"==Je(),!(n=du.XMLHttpRequest||n&&fu.INTERNAL.node&&fu.INTERNAL.node.XMLHttpRequest)&&!$e())throw new An("internal-error","The XMLHttpRequest compatibility library was not found.");this.c=void 0,$e()?this.c=new jr(self):Ze()?this.c=new di(n):this.c=new Ar}function yi(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function gi(t,e){e?(t.a["X-Client-Version"]=e,t.f["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.f["X-Client-Version"])}function _i(t,e,n,r,i,o,a){Be()||$e()?t=f(t.o,t):(Al||(Al=new G(function(t,e){mi(t,e)})),t=f(t.u,t)),t(e,n,r,i,o,a)}function mi(t,e){if(((window.gapi||{}).client||{}).request)t();else{du[Fl]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))};ni(ci(be(xl,{onload:Fl})),function(){e(Error("CORS_UNSUPPORTED"))})}}function bi(t,e){return new G(function(n,r){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?_i(t,t.j+"?key="+encodeURIComponent(t.b),function(t){t?t.error?r(Ui(t)):t.access_token&&t.refresh_token?n(t):r(new An("internal-error")):r(new An("network-request-failed"))},"POST",ce(e).toString(),t.f,t.l.get()):r(new An("internal-error"))})}function wi(t,e,n,r,i,o){var a=ne(t.g+e);te(a,"key",t.b),o&&te(a,"cb",gu().toString());var s="GET"==n;if(s)for(var u in r)r.hasOwnProperty(u)&&te(a,u,r[u]);return new G(function(e,o){_i(t,a.toString(),function(t){t?t.error?o(Ui(t,i||{})):e(t):o(new An("network-request-failed"))},n,s?void 0:xe(hn(r)),t.a,t.h.get())})}function Ei(t){if(!fl.test(t.email))throw new An("invalid-email")}function Si(t){"email"in t&&Ei(t)}function Ti(t,e){return ji(t,Wl,{identifier:e,continueUri:sn()?Ue():"http://localhost"}).then(function(t){return t.allProviders||[]})}function Ci(t,e){return ji(t,Wl,{identifier:e,continueUri:sn()?Ue():"http://localhost"}).then(function(t){return t.signinMethods||[]})}function Ii(t){return ji(t,Xl,{}).then(function(t){return t.authorizedDomains||[]})}function Oi(t){if(!t[Rl])throw new An("internal-error")}function Ai(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new An("internal-error")}else{if(!t.sessionInfo)throw new An("missing-verification-id");if(!t.code)throw new An("missing-verification-code")}}function Ri(t,e){return ji(t,Zl,e)}function Ni(t,e,n){return ji(t,ql,{idToken:e,deleteProvider:n})}function Pi(t){if(!t.requestUri||!t.sessionId&&!t.postBody)throw new An("internal-error")}function ki(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Sr(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Sr(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Sr(t)):t.errorMessage&&(e=Mi(t.errorMessage)),e)throw e;if(!t[Rl])throw new An("internal-error")}function Di(t,e){return e.returnIdpCredential=!0,ji(t,rh,e)}function xi(t,e){return e.returnIdpCredential=!0,ji(t,oh,e)}function Fi(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,ji(t,ih,e)}function Li(t){if(!t.oobCode)throw new An("invalid-action-code")}function ji(t,e,n){if(!Cn(n,e.T))return X(new An("internal-error"));var r,i=e.Cb||"POST";return Y(n).then(e.A).then(function(){return e.R&&(n.returnSecureToken=!0),wi(t,e.endpoint,i,n,e.Tb,e.pb||!1)}).then(function(t){return r=t}).then(e.J).then(function(){if(!e.ba)return r;if(!(e.ba in r))throw new An("internal-error");return r[e.ba]})}function Mi(t){return Ui({error:{errors:[{message:t}],code:400,message:t}})}function Ui(t,e){var n=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new An(r[n]):null)return n;n=t.error&&t.error.message||"",r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash"},V(r,e||{}),e=(e=n.match(/^[^\s]+\s*:\s*(.*)$/))&&1<e.length?e[1]:void 0;for(var i in r)if(0===n.indexOf(i))return new An(r[i],e);return!e&&t&&(e=ln(t)),new An("internal-error",e)}function Vi(t){for(var e in hh)if(hh[e].id===t)return t=hh[e],{firebaseEndpoint:t.Ya,secureTokenEndpoint:t.eb};return null}function Wi(t){this.b=t,this.a=null,this.ab=Bi(this)}function Bi(t){return Ki().then(function(){return new G(function(e,n){rn("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:rn("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout(function(){n(Error("Network Error"))},dh.get());r.ping(i).then(i,function(){n(Error("Network Error"))})})})})}function qi(t,e){return t.ab.then(function(){return new G(function(n){t.a.send(e.type,e,n,rn("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}function Hi(t,e){t.ab.then(function(){t.a.register("authEvent",e,rn("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}function Ki(){return vh||(vh=new G(function(t,e){function n(){vn(),rn("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){vn(),e(Error("Network Error"))},timeout:ph.get()})}if(rn("gapi.iframes.Iframe"))t();else if(rn("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();du[r]=function(){rn("gapi.load")?n():e(Error("Network Error"))},r=be(fh,{onload:r}),Y(ci(r)).m(function(){e(Error("Network Error"))})}}).m(function(t){throw vh=null,t}))}function Gi(t,e,n){this.j=t,this.g=e,this.h=n,this.f=null,this.a=re(this.j,"/__/auth/iframe"),te(this.a,"apiKey",this.g),te(this.a,"appName",this.h),this.b=null,this.c=[]}function zi(t,e,n,r,i){this.o=t,this.u=e,this.c=n,this.l=r,this.h=this.g=this.j=null,this.a=i,this.f=null}function Qi(t){try{return fu.app(t).auth().Ka()}catch(t){return[]}}function Yi(t,e,n,r,i){this.u=t,this.f=e,this.b=n,this.c=r||null,this.h=i||null,this.o=this.s=this.v=null,this.g=[],this.l=this.a=null}function Xi(t){var e=Ue();return Ii(t).then(function(t){t:{var n=ne(e),r=n.c;n=n.b;for(var i=0;i<t.length;i++){var o=t[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=ne(o).b==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:Dc.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){t=!0;break t}}t=!1}if(!t)throw new wr(Ue())})}function $i(t){return t.l?t.l:(t.l=ze().then(function(){if(!t.s){var e=t.c,n=t.h,r=Qi(t.b),i=new Gi(t.u,t.f,t.b);i.f=e,i.b=n,i.c=P(r||[]),t.s=i.toString()}t.j=new Wi(t.s),to(t)}),t.l)}function Ji(t){return t.o||(t.v=t.c?en(t.c,Qi(t.b)):null,t.o=new vi(t.f,Vi(t.h),t.v)),t.o}function Zi(t,e,n,r,i,o,a,s,u,c){return t=new zi(t,e,n,r,i),t.j=o,t.g=a,t.h=s,t.b=U(u||null),t.f=c,t.toString()}function to(t){if(!t.j)throw Error("IfcHandler must be initialized!");Hi(t.j,function(e){var n={};if(e&&e.authEvent){var r=!1;for(e=mr(e.authEvent),n=0;n<t.g.length;n++)r=t.g[n](e)||r;return n={},n.status=r?"ACK":"ERROR",Y(n)}return n.status="ERROR",Y(n)})}function eo(t){var e={type:"webStorageSupport"};return $i(t).then(function(){return qi(t.j,e)}).then(function(t){if(t&&t.length&&void 0!==t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()})}function no(t){if(this.a=t||fu.INTERNAL.reactNative&&fu.INTERNAL.reactNative.AsyncStorage,!this.a)throw new An("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function ro(){if(!so())throw new An("web-storage-unsupported");this.f={},this.a=[],this.b=0,this.g=du.indexedDB,this.type="indexedDB"}function io(t){return new G(function(e,n){var r=t.g.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){e()},r.onerror=function(t){n(Error(t.target.error))}})}function oo(t){return new G(function(e,n){var r=t.g.open("firebaseLocalStorageDb",1);r.onerror=function(t){try{t.preventDefault()}catch(t){}n(Error(t.target.error))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){n(t)}},r.onsuccess=function(r){r=r.target.result,r.objectStoreNames.contains("firebaseLocalStorage")?e(r):io(t).then(function(){return oo(t)}).then(function(t){e(t)}).m(function(t){n(t)})}})}function ao(t){return t.h||(t.h=oo(t)),t.h}function so(){try{return!!du.indexedDB}catch(t){return!1}}function uo(t){return t.objectStore("firebaseLocalStorage")}function co(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function lo(t){return new G(function(e,n){t.onsuccess=function(t){t&&t.target?e(t.target.result):e()},t.onerror=function(t){n(Error(t.target.errorCode))}})}function ho(t){function e(){return t.c=Bt(800).then(f(t.Jc,t)).then(function(e){0<e.length&&wu(t.a,function(t){t(e)})}).then(e).m(function(t){"STOP_EVENT"!=t.message&&e()}),t.c}t.c&&t.c.cancel("STOP_EVENT"),e()}function fo(t){var e=this,n=null;this.a=[],this.type="indexedDB",this.c=t,this.b=Y().then(function(){return so()?(yh||(yh=new ro),n=yh,n.set("__sak","!").then(function(){return n.get("__sak")}).then(function(t){if("!"!==t)throw Error("indexedDB not supported!");return n.P("__sak")}).then(function(){return n}).m(function(){return e.c})):e.c}).then(function(t){return e.type=t.type,t.Y(function(t){wu(e.a,function(e){e(t)})}),t})}function po(){this.a={},this.type="inMemory"}function vo(){if(!go()){if("Node"==Je())throw new An("internal-error","The LocalStorage compatibility library was not found.");throw new An("web-storage-unsupported")}this.a=yo()||fu.INTERNAL.node.localStorage,this.type="localStorage"}function yo(){try{var t=du.localStorage,e=pn();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}function go(){var t="Node"==Je();if(!(t=yo()||t&&fu.INTERNAL.node&&fu.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}function _o(){this.type="nullStorage"}function mo(){if(!wo()){if("Node"==Je())throw new An("internal-error","The SessionStorage compatibility library was not found.");throw new An("web-storage-unsupported")}this.a=bo()||fu.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function bo(){try{var t=du.sessionStorage,e=pn();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}function wo(){var t="Node"==Je();if(!(t=bo()||t&&fu.INTERNAL.node&&fu.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}function Eo(){var t={};t.Browser=mh,t.Node=bh,t.ReactNative=wh,t.Worker=Eh,this.a=t[Je()]}function So(t){var e=new An("invalid-persistence-type"),n=new An("unsupported-persistence-type");t:{for(r in Sh)if(Sh[r]==t){var r=!0;break t}r=!1}if(!r||"string"!=typeof t)throw e;switch(Je()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;default:if(!on()&&"none"!==t)throw n}}function To(){var t=!(dn(nn())||!Xe()),e=cn(),n=on();this.o=t,this.h=e,this.l=n,this.a={},gh||(gh=new Eo),t=gh;try{this.g=!Me()&&bn()||!du.indexedDB?new t.a.w:new fo($e()?new po:new t.a.w)}catch(t){this.g=new po,this.h=!0}try{this.j=new t.a.Pa}catch(t){this.j=new po}this.u=new po,this.f=f(this.Kb,this),this.b={}}function Co(){return _h||(_h=new To),_h}function Io(t,e){switch(e){case"session":return t.j;case"none":return t.u;default:return t.g}}function Oo(t,e){return"firebase:"+t.name+(e?":"+e:"")}function Ao(t,e,n){var r=Oo(e,n),i=Io(t,e.w);return t.get(e,n).then(function(o){var a=null;try{a=fn(du.localStorage.getItem(r))}catch(t){}if(a&&!o)return du.localStorage.removeItem(r),t.set(e,a,n);a&&o&&"localStorage"!=i.type&&du.localStorage.removeItem(r)})}function Ro(t,e,n){return n=Oo(e,n),"local"==e.w&&(t.b[n]=null),Io(t,e.w).P(n)}function No(t){Po(t),t.c=setInterval(function(){for(var e in t.a){var n=du.localStorage.getItem(e),r=t.b[e];n!=r&&(t.b[e]=n,n=new mt({type:"storage",key:e,target:window,oldValue:r,newValue:n,a:!0}),t.Kb(n))}},1e3)}function Po(t){t.c&&(clearInterval(t.c),t.c=null)}function ko(t){this.a=t,this.b=Co()}function Do(t){return t.b.get(Ch,t.a).then(function(t){return mr(t)})}function xo(){this.a=Co()}function Fo(){this.b=-1}function Lo(t,e){this.b=-1,this.b=Ih,this.f=du.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.j=t,this.h=e,this.l=du.Int32Array?new Int32Array(64):Array(64),void 0!==Th||(Th=du.Int32Array?new Int32Array(Ph):Ph),this.reset()}function jo(t){for(var e=t.f,n=t.l,r=0,i=0;i<e.length;)n[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3],i=4*r;for(e=16;64>e;e++){i=0|n[e-15],r=0|n[e-2];var o=(0|n[e-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[e-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[e]=o+a|0}r=0|t.a[0],i=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],l=0|t.a[5],h=0|t.a[6];for(o=0|t.a[7],e=0;64>e;e++){var f=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;a=c&l^~c&h,o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0,a=a+(0|Th[e])|0,a=o+(a+(0|n[e])|0)|0,o=h,h=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+f|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+l|0,t.a[6]=t.a[6]+h|0,t.a[7]=t.a[7]+o|0}function Mo(e,n,r){void 0===r&&(r=n.length);var i=0,o=e.c;if(t(n))for(;i<r;)e.f[o++]=n.charCodeAt(i++),o==e.b&&(jo(e),o=0);else{if(!s(n))throw Error("message must be string or array");for(;i<r;){var a=n[i++];if(!("number"==typeof a&&0<=a&&255>=a&&a==(0|a)))throw Error("message must be a byte array");e.f[o++]=a,o==e.b&&(jo(e),o=0)}}e.c=o,e.g+=r}function Uo(){Lo.call(this,8,kh)}function Vo(t,e,n,r,i){this.u=t,this.j=e,this.l=n,this.o=r||null,this.s=i||null,this.h=e+":"+n,this.v=new xo,this.g=new ko(this.h),this.f=null,this.b=[],this.a=this.c=null}function Wo(t){return new An("invalid-cordova-configuration",t)}function Bo(){for(var t=20,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}function qo(t){var e=new Uo;Mo(e,t),t=[];var n=8*e.g;56>e.c?Mo(e,Nh,56-e.c):Mo(e,Nh,e.b-(e.c-56));for(var r=63;56<=r;r--)e.f[r]=255&n,n/=256;for(jo(e),r=n=0;r<e.j;r++)for(var i=24;0<=i;i-=8)t[n++]=e.a[r]>>i&255;return kn(t)}function Ho(t,e,n,r){var i=Bo(),o=new _r(e,r,null,i,new An("no-auth-event")),a=rn("BuildInfo.packageName",du);if("string"!=typeof a)throw new An("invalid-cordova-configuration");var s=rn("BuildInfo.displayName",du),u={};if(nn().toLowerCase().match(/iphone|ipad|ipod/))u.ibi=a;else{if(!nn().toLowerCase().match(/android/))return X(new An("operation-not-supported-in-this-environment"));u.apn=a}s&&(u.appDisplayName=s),i=qo(i),u.sessionId=i;var c=Zi(t.u,t.j,t.l,e,n,null,r,t.o,u,t.s);return t.ea().then(function(){var e=t.h;return t.v.a.set(Ch,o.C(),e)}).then(function(){var e=rn("cordova.plugins.browsertab.isAvailable",du);if("function"!=typeof e)throw new An("invalid-cordova-configuration");var n=null;e(function(e){if(e){if("function"!=typeof(n=rn("cordova.plugins.browsertab.openUrl",du)))throw new An("invalid-cordova-configuration");n(c)}else{if("function"!=typeof(n=rn("cordova.InAppBrowser.open",du)))throw new An("invalid-cordova-configuration");e=nn(),e=!(!e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)&&!e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)),t.a=n(c,e?"_blank":"_system","location=yes")}})})}function Ko(t,e){for(var n=0;n<t.b.length;n++)try{t.b[n](e)}catch(t){}}function Go(t){return t.f||(t.f=t.ea().then(function(){return new G(function(e){function n(r){return e(r),t.Ja(n),!1}t.va(n),Qo(t)})})),t.f}function zo(t){var e=null;return Do(t.g).then(function(n){return e=n,n=t.g,Ro(n.b,Ch,n.a)}).then(function(){return e})}function Qo(t){function e(e){r=!0,i&&i.cancel(),zo(t).then(function(r){var i=n;if(r&&e&&e.url){var o=null;i=Qn(e.url),-1!=i.indexOf("/__/auth/callback")&&(o=ne(i),o=fn(ee(o,"firebaseError")||null),o=(o="object"==typeof o?Rn(o):null)?new _r(r.b,r.c,null,null,o):new _r(r.b,r.c,i,r.g)),i=o||n}Ko(t,i)})}var n=new _r("unknown",null,null,null,new An("no-auth-event")),r=!1,i=Bt(500).then(function(){return zo(t).then(function(){r||Ko(t,n)})}),o=du.handleOpenURL;du.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(rn("BuildInfo.packageName",du).toLowerCase()+"://")&&e({url:t}),"function"==typeof o)try{o(t)}catch(t){console.error(t)}},hl||(hl=new br),hl.subscribe(e)}function Yo(t){this.a=t,this.b=Co()}function Xo(t){return t.b.set(Dh,"pending",t.a)}function $o(t){return Ro(t.b,Dh,t.a)}function Jo(t){return t.b.get(Dh,t.a).then(function(t){return"pending"==t})}function Zo(t,e,n){this.v=t,this.l=e,this.u=n,this.h=[],this.f=!1,this.j=f(this.o,this),this.c=new aa,this.s=new pa,this.g=new Yo(this.l+":"+this.u),this.b={},this.b.unknown=this.c,this.b.signInViaRedirect=this.c,this.b.linkViaRedirect=this.c,this.b.reauthViaRedirect=this.c,this.b.signInViaPopup=this.s,this.b.linkViaPopup=this.s,this.b.reauthViaPopup=this.s,this.a=ta(this.v,this.l,this.u,jl)}function ta(t,e,n,r){var i=fu.SDK_VERSION||null;return Ye()?new Vo(t,e,n,i,r):new Yi(t,e,n,i,r)}function ea(t){t.f||(t.f=!0,t.a.va(t.j));var e=t.a;return t.a.ea().m(function(n){throw t.a==e&&t.reset(),n})}function na(t){t.a.Gb()&&ea(t).m(function(e){var n=new _r("unknown",null,null,null,new An("operation-not-supported-in-this-environment"));ia(e)&&t.o(n)}),t.a.Bb()||sa(t.c)}function ra(t,e,n,r,i,o){return t.a.xb(e,n,r,function(){t.f||(t.f=!0,t.a.va(t.j))},function(){t.reset()},i,o)}function ia(t){return!(!t||"auth/cordova-not-ready"!=t.code)}function oa(t,e,n){var r=e+":"+n;return Lh[r]||(Lh[r]=new Zo(t,e,n)),Lh[r]}function aa(){this.b=null,this.f=[],this.c=[],this.a=null,this.g=!1}function sa(t){t.g||(t.g=!0,ha(t,!1,null,null))}function ua(t,e,n){n=n.wa(e.b,e.c);var r=e.f,i=e.g,o=!!e.b.match(/Redirect$/);n(r,i).then(function(e){ha(t,o,e,null)}).m(function(e){ha(t,o,null,e)})}function ca(t,e){if(t.b=function(){return X(e)},t.c.length)for(var n=0;n<t.c.length;n++)t.c[n](e)}function la(t,e){if(t.b=function(){return Y(e)},t.f.length)for(var n=0;n<t.f.length;n++)t.f[n](e)}function ha(t,e,n,r){e?r?ca(t,r):la(t,n):la(t,{user:null}),t.f=[],t.c=[]}function fa(t){var e=new An("timeout");t.a&&t.a.cancel(),t.a=Bt(Fh.get()).then(function(){t.b||ha(t,!0,null,e)})}function pa(){}function da(t,e){var n=t.c,r=t.b;e.wa(r,n)(t.f,t.g).then(function(t){e.ga(r,t,null,n)}).m(function(t){e.ga(r,null,t,n)})}function va(t,e){this.a=e,wn(this,"verificationId",t)}function ya(t,e,n,r){return new dr(t).Sa(e,n).then(function(t){return new va(t,r)})}function ga(t){var e=Mn(t);if(!(e&&e.exp&&e.auth_time&&e.iat))throw new An("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");En(this,{token:t,expirationTime:mn(1e3*e.exp),authTime:mn(1e3*e.auth_time),issuedAtTime:mn(1e3*e.iat),signInProvider:e.firebase&&e.firebase.sign_in_provider?e.firebase.sign_in_provider:null,claims:e})}function _a(t,e,n){if(this.h=t,this.j=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function ma(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a>t.f&&(t.a=t.f),e)}function ba(t,e){t.stop(),t.b=Bt(ma(t,e)).then(function(){return _n()}).then(function(){return t.h()}).then(function(){ba(t,!0)}).m(function(e){t.j(e)&&ba(t,!1)})}function wa(t){this.f=t,this.b=this.a=null,this.c=0}function Ea(t,e){var n=e[Rl],r=e.refreshToken;e=Sa(e.expiresIn),t.b=n,t.c=e,t.a=r}function Sa(t){return gu()+1e3*parseInt(t,10)}function Ta(t,e){return bi(t.f,e).then(function(e){return t.b=e.access_token,t.c=Sa(e.expires_in),t.a=e.refresh_token,{accessToken:t.b,expirationTime:t.c,refreshToken:t.a}}).m(function(e){throw"auth/user-token-expired"==e.code&&(t.a=null),e})}function Ca(t,e){this.a=t||null,this.b=e||null,En(this,{lastSignInTime:mn(e||null),creationTime:mn(t||null)})}function Ia(t){return new Ca(t.a,t.b)}function Oa(t,e,n,r,i,o){En(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}function Aa(t,e){_t.call(this,t);for(var n in e)this[n]=e[n]}function Ra(t,e,n){this.D=[],this.G=t.apiKey,this.s=t.appName,this.B=t.authDomain||null,t=fu.SDK_VERSION?en(fu.SDK_VERSION):null,this.b=new vi(this.G,Vi(jl),t),this.h=new wa(this.b),ja(this,e[Rl]),Ea(this.h,e),wn(this,"refreshToken",this.h.a),Wa(this,n||{}),jt.call(this),this.I=!1,this.B&&an()&&(this.a=oa(this.B,this.G,this.s)),this.N=[],this.j=null,this.l=xa(this),this.V=f(this.Ga,this);var r=this;this.ia=null,this.sa=function(t){r.na(t.g)},this.X=null,this.O=[],this.ra=function(t){Pa(r,t.c)},this.W=null}function Na(t,e){t.X&&Rt(t.X,"languageCodeChanged",t.sa),(t.X=e)&&Ct(e,"languageCodeChanged",t.sa)}function Pa(t,e){t.O=e,gi(t.b,fu.SDK_VERSION?en(fu.SDK_VERSION,t.O):null)}function ka(t,e){t.W&&Rt(t.W,"frameworkChanged",t.ra),(t.W=e)&&Ct(e,"frameworkChanged",t.ra)}function Da(t){try{return fu.app(t.s).auth()}catch(e){throw new An("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.s+"'!")}}function xa(t){return new _a(function(){return t.F(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var e=t.h.c-gu()-3e5;return 0<e?e:0})}function Fa(t){t.o||t.l.b||(t.l.start(),Rt(t,"tokenChanged",t.V),Ct(t,"tokenChanged",t.V))}function La(t){Rt(t,"tokenChanged",t.V),t.l.stop()}function ja(t,e){t.qa=e,wn(t,"_lat",e)}function Ma(t,e){R(t.N,function(t){return t==e})}function Ua(t){for(var e=[],n=0;n<t.N.length;n++)e.push(t.N[n](t));return Z(e).then(function(){return t})}function Va(t){t.a&&!t.I&&(t.I=!0,t.a.subscribe(t))}function Wa(t,e){En(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,metadata:new Ca(e.createdAt,e.lastLoginAt),providerData:[]})}function Ba(){}function qa(t){return Y().then(function(){if(t.o)throw new An("app-deleted")})}function Ha(t){return Eu(t.providerData,function(t){return t.providerId})}function Ka(t,e){e&&(Ga(t,e.providerId),t.providerData.push(e))}function Ga(t,e){R(t.providerData,function(t){return t.providerId==e})}function za(t,e,n){("uid"!=e||n)&&t.hasOwnProperty(e)&&wn(t,e,n)}function Qa(t,e){t!=e&&(En(t,{uid:e.uid,displayName:e.displayName,photoURL:e.photoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,providerData:[]}),e.metadata?wn(t,"metadata",Ia(e.metadata)):wn(t,"metadata",new Ca),wu(e.providerData,function(e){Ka(t,e)}),t.h=e.h,wn(t,"refreshToken",t.h.a))}function Ya(t){return t.F().then(function(e){var n=t.isAnonymous;return $a(t,e).then(function(){return n||za(t,"isAnonymous",!1),e})})}function Xa(t,e){e[Rl]&&t.qa!=e[Rl]&&(Ea(t.h,e),t.dispatchEvent(new Aa("tokenChanged")),ja(t,e[Rl]),za(t,"refreshToken",t.h.a))}function $a(t,e){return ji(t.b,Gl,{idToken:e}).then(f(t.uc,t))}function Ja(t){return(t=t.providerUserInfo)&&t.length?Eu(t,function(t){return new Oa(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[]}function Za(t,e){return Ya(t).then(function(){if(O(Ha(t),e))return Ua(t).then(function(){throw new An("provider-already-linked")})})}function ts(t,e,n){var r=yr(e);return e=Vn(e),Sn({user:t,credential:r,additionalUserInfo:e,operationType:n})}function es(t,e){return Xa(t,e),t.reload().then(function(){return t})}function ns(t,e,n,r,i){if(!an())return X(new An("operation-not-supported-in-this-environment"));if(t.j&&!i)return X(t.j);var o=Un(n.providerId),a=pn(t.uid+":::"),s=null;(!cn()||Xe())&&t.B&&n.isOAuthProvider&&(s=Zi(t.B,t.G,t.s,e,n,null,a,fu.SDK_VERSION||null));var u=Ke(s,o&&o.Aa,o&&o.za);return r=r().then(function(){if(is(t),!i)return t.F().then(function(){})}).then(function(){return ra(t.a,u,e,n,a,!!s)}).then(function(){return new G(function(n,r){t.ga(e,null,new An("cancelled-popup-request"),t.g||null),t.f=n,t.v=r,t.g=a,t.c=t.a.Da(t,e,u,a)})}).then(function(t){return u&&He(u),t?Sn(t):null}).m(function(t){throw u&&He(u),t}),os(t,r,i)}function rs(t,e,n,r,i){if(!an())return X(new An("operation-not-supported-in-this-environment"));if(t.j&&!i)return X(t.j);var o=null,a=pn(t.uid+":::");return r=r().then(function(){if(is(t),!i)return t.F().then(function(){})}).then(function(){return t.$=a,Ua(t)}).then(function(e){return t.fa&&(e=t.fa,e=e.b.set(jh,t.C(),e.a)),e}).then(function(){return t.a.Ba(e,n,a)}).m(function(e){if(o=e,t.fa)return ls(t.fa);throw o}).then(function(){if(o)throw o}),os(t,r,i)}function is(t){if(!t.a||!t.I){if(t.a&&!t.I)throw new An("internal-error");throw new An("auth-domain-config-required")}}function os(t,e,n){var r=as(t,e,n);return t.D.push(r),r.ha(function(){A(t.D,r)}),r}function as(t,e,n){return t.j&&!n?(e.cancel(),X(t.j)):e.m(function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(t.j||t.dispatchEvent(new Aa("userInvalidated")),t.j=e),e})}function ss(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName},n={};if(!(t.stsTokenManager&&t.stsTokenManager.accessToken&&t.stsTokenManager.expirationTime))return null;n[Rl]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null,n.expiresIn=(t.stsTokenManager.expirationTime-gu())/1e3;var r=new Ra(e,n,t);return t.providerData&&wu(t.providerData,function(t){t&&Ka(r,Sn(t))}),t.redirectEventId&&(r.$=t.redirectEventId),r}function us(t,e,n,r){var i=new Ra(t,e);return n&&(i.fa=n),r&&Pa(i,r),i.reload().then(function(){return i})}function cs(t){this.a=t,this.b=Co()}function ls(t){return Ro(t.b,jh,t.a)}function hs(t,e){return t.b.get(jh,t.a).then(function(t){return t&&e&&(t.authDomain=e),ss(t||{})})}function fs(t){this.a=t,this.b=Co(),this.c=null,this.f=ds(this),this.b.addListener(vs("local"),this.a,f(this.g,this))}function ps(t,e){var n,r=[];for(n in Sh)Sh[n]!==e&&r.push(Ro(t.b,vs(Sh[n]),t.a));return r.push(Ro(t.b,Mh,t.a)),J(r)}function ds(t){var e=vs("local"),n=vs("session"),r=vs("none");return Ao(t.b,e,t.a).then(function(){return t.b.get(n,t.a)}).then(function(i){return i?n:t.b.get(r,t.a).then(function(n){return n?r:t.b.get(e,t.a).then(function(n){return n?e:t.b.get(Mh,t.a).then(function(t){return t?vs(t):e})})})}).then(function(e){return t.c=e,ps(t,e.w)}).m(function(){t.c||(t.c=e)})}function vs(t){return{name:"authUser",w:t}}function ys(t){return bs(t,function(){return t.b.set(Mh,t.c.w,t.a)})}function gs(t,e){return bs(t,function(){return t.b.set(t.c,e.C(),t.a)})}function _s(t){return bs(t,function(){return Ro(t.b,t.c,t.a)})}function ms(t,e){return bs(t,function(){return t.b.get(t.c,t.a).then(function(t){return t&&e&&(t.authDomain=e),ss(t||{})})})}function bs(t,e){return t.f=t.f.then(e,e),t.f}function ws(t){if(this.l=!1,wn(this,"app",t),!Ds(this).options||!Ds(this).options.apiKey)throw new An("invalid-api-key");t=fu.SDK_VERSION?en(fu.SDK_VERSION):null,this.b=new vi(Ds(this).options&&Ds(this).options.apiKey,Vi(jl),t),this.N=[],this.o=[],this.I=[],this.Ob=fu.INTERNAL.createSubscribe(f(this.ic,this)),this.O=void 0,this.Pb=fu.INTERNAL.createSubscribe(f(this.jc,this)),As(this,null),this.h=new fs(Ds(this).options.apiKey+":"+Ds(this).name),this.G=new cs(Ds(this).options.apiKey+":"+Ds(this).name),this.V=Ms(this,Ns(this)),this.j=Ms(this,Ps(this)),this.X=!1,this.ia=f(this.Ic,this),this.Ga=f(this.ka,this),this.qa=f(this.Yb,this),this.ra=f(this.gc,this),this.sa=f(this.hc,this),Is(this),this.INTERNAL={},this.INTERNAL.delete=f(this.delete,this),this.INTERNAL.logFramework=f(this.qc,this),this.s=0,jt.call(this),Ts(this),this.D=[]}function Es(t){_t.call(this,"languageCodeChanged"),this.g=t}function Ss(t){_t.call(this,"frameworkChanged"),this.c=t}function Ts(t){Object.defineProperty(t,"lc",{get:function(){return this.ca()},set:function(t){this.na(t)},enumerable:!1}),t.W=null}function Cs(t){return t.Nb||X(new An("auth-domain-config-required"))}function Is(t){var e=Ds(t).options.authDomain,n=Ds(t).options.apiKey;e&&an()&&(t.Nb=t.V.then(function(){if(!t.l){if(t.a=oa(e,n,Ds(t).name),t.a.subscribe(t),xs(t)&&Va(xs(t)),t.B){Va(t.B);var r=t.B;r.na(t.ca()),Na(r,t),r=t.B,Pa(r,t.D),ka(r,t),t.B=null}return t.a}}))}function Os(t,e){var n={};return n.apiKey=Ds(t).options.apiKey,n.authDomain=Ds(t).options.authDomain,n.appName=Ds(t).name,t.V.then(function(){return us(n,e,t.G,t.Ka())}).then(function(e){return xs(t)&&e.uid==xs(t).uid?(Qa(xs(t),e),t.ka(e)):(As(t,e),Va(e),t.ka(e))}).then(function(){Ls(t)})}function As(t,e){xs(t)&&(Ma(xs(t),t.Ga),Rt(xs(t),"tokenChanged",t.qa),Rt(xs(t),"userDeleted",t.ra),Rt(xs(t),"userInvalidated",t.sa),La(xs(t))),e&&(e.N.push(t.Ga),Ct(e,"tokenChanged",t.qa),Ct(e,"userDeleted",t.ra),Ct(e,"userInvalidated",t.sa),0<t.s&&Fa(e)),wn(t,"currentUser",e),e&&(e.na(t.ca()),Na(e,t),Pa(e,t.D),ka(e,t))}function Rs(t){var e=hs(t.G,Ds(t).options.authDomain).then(function(e){return(t.B=e)&&(e.fa=t.G),ls(t.G)});return Ms(t,e)}function Ns(t){var e=Ds(t).options.authDomain,n=Rs(t).then(function(){return ms(t.h,e)}).then(function(e){return e?(e.fa=t.G,t.B&&(t.B.$||null)==(e.$||null)?e:e.reload().then(function(){return gs(t.h,e).then(function(){return e})}).m(function(n){return"auth/network-request-failed"==n.code?e:_s(t.h)})):null}).then(function(e){As(t,e||null)});return Ms(t,n)}function Ps(t){return t.V.then(function(){return t.da()}).m(function(){}).then(function(){if(!t.l)return t.ia()}).m(function(){}).then(function(){if(!t.l){t.X=!0;var e=t.h;e.b.addListener(vs("local"),e.a,t.ia)}})}function ks(t,e){var n=null,r=null;return Ms(t,e.then(function(e){return n=yr(e),r=Vn(e),Os(t,e)}).then(function(){return Sn({user:xs(t),credential:n,additionalUserInfo:r,operationType:"signIn"})}))}function Ds(t){return t.app}function xs(t){return t.currentUser}function Fs(t){return xs(t)&&xs(t)._lat||null}function Ls(t){if(t.X){for(var e=0;e<t.o.length;e++)t.o[e]&&t.o[e](Fs(t));if(t.O!==t.getUid()&&t.I.length)for(t.O=t.getUid(),e=0;e<t.I.length;e++)t.I[e]&&t.I[e](Fs(t))}}function js(t,e){t.I.push(e),Ms(t,t.j.then(function(){!t.l&&O(t.I,e)&&t.O!==t.getUid()&&(t.O=t.getUid(),e(Fs(t)))}))}function Ms(t,e){return t.N.push(e),e.ha(function(){A(t.N,e)}),e}function Us(t,e,n,r,i,o){if(wn(this,"type","recaptcha"),this.b=this.c=null,this.o=!1,this.l=e,this.a=n||{theme:"light",type:"image"},this.g=[],this.a[Wh])throw new An("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.h="invisible"===this.a[Bh],!du.document)throw new An("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!Re(e)||!this.h&&Re(e).hasChildNodes())throw new An("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new vi(t,o||null,i||null),this.s=r||function(){return null};var a=this;this.j=[];var s=this.a[Uh];this.a[Uh]=function(t){if(Vs(a,t),"function"==typeof s)s(t);else if("string"==typeof s){var e=rn(s,du);"function"==typeof e&&e(t)}};var u=this.a[Vh];this.a[Vh]=function(){if(Vs(a,null),"function"==typeof u)u();else if("string"==typeof u){var t=rn(u,du);"function"==typeof t&&t()}}}function Vs(t,e){for(var n=0;n<t.j.length;n++)try{t.j[n](e)}catch(t){}}function Ws(t,e){R(t.j,function(t){return t==e})}function Bs(t,e){return t.g.push(e),e.ha(function(){A(t.g,e)}),e}function qs(t){if(t.o)throw new An("internal-error","RecaptchaVerifier instance has been destroyed.")}function Hs(){this.b=du.grecaptcha?1/0:0,this.c=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}function Ks(t,e){return new G(function(n,r){var i=setTimeout(function(){r(new An("network-request-failed"))},Hh.get());if(!du.grecaptcha||e!==t.c&&!t.b){du[t.a]=function(){if(du.grecaptcha){t.c=e;var o=du.grecaptcha.render;du.grecaptcha.render=function(e,n){return e=o(e,n),t.b++,e},clearTimeout(i),n()}else clearTimeout(i),r(new An("internal-error"));delete du[t.a]};Y(ci(be(qh,{onload:t.a,hl:e||""}))).m(function(){clearTimeout(i),r(new An("internal-error","Unable to load external reCAPTCHA dependencies!"))})}else clearTimeout(i),n()})}function Gs(){return Kh||(Kh=new Hs),Kh}function zs(t,e,n){try{this.f=n||fu.app()}catch(t){throw new An("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.f.options||!this.f.options.apiKey)throw new An("invalid-api-key");n=this.f.options.apiKey;var r=this,i=null;try{i=this.f.auth().Ka()}catch(t){}i=fu.SDK_VERSION?en(fu.SDK_VERSION,i):null,Us.call(this,n,t,e,function(){try{var t=r.f.auth().ca()}catch(e){t=null}return t},i,Vi(jl))}function Qs(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<e.length;a++)if(e[a].optional)o=!0;else{if(o)throw new An("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=e.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=e[i].optional&&void 0===n[i],!e[i].M(n[i])&&!o){if(e=e[i],0>i||i>=Gh.length)throw new An("internal-error","Argument validator received an unsupported number of arguments.");n=Gh[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}r=null}}if(r)throw new An("argument-error",t+" failed: "+r)}function Ys(e,n){return{name:e||"",K:"a valid string",optional:!!n,M:t}}function Xs(){return{name:"opt_forceRefresh",K:"a boolean",optional:!0,M:e}}function $s(t,e){return{name:t||"",K:"a valid object",optional:!!e,M:c}}function Js(t,e){return{name:t||"",K:"a function",optional:!!e,M:u}}function Zs(t,e){return{name:t||"",K:"null",optional:!!e,M:o}}function tu(){return{name:"",K:"an HTML element",optional:!1,M:function(t){return!!(t&&t instanceof Element)}}}function eu(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(t){return!!(t&&t instanceof ws)}}}function nu(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(t){return!!(t&&t instanceof fu.app.App)}}}function ru(t){return{name:t?t+"Credential":"credential",K:t?"a valid "+t+" credential":"a valid credential",optional:!1,M:function(e){if(!e)return!1;var n=!t||e.providerId===t;return!(!e.xa||!n)}}}function iu(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}}function ou(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!!(e&&t(e.type)&&u(e.verify))}}}function au(t,e,n,r){return{name:n||"",K:t.K+" or "+e.K,optional:!!r,M:function(n){return t.M(n)||e.M(n)}}}function su(t,e){for(var n in e){var r=e[n].name;t[r]=cu(r,t[n],e[n].i)}}function uu(t,e,n,r){t[e]=cu(e,n,r)}function cu(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return Qs(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=lu(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}function lu(t){return t=t.split("."),t[t.length-1]}var hu,fu=n(101).default,pu=pu||{},du=this,vu="closure_uid_"+(1e9*Math.random()>>>0),yu=0,gu=Date.now||function(){return+new Date};d(g,Error),g.prototype.name="CustomError",d(_,g),_.prototype.name="AssertionError",b.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var _u=new b(function(){return new T},function(t){t.reset()});E.prototype.add=function(t,e){var n=_u.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},T.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},T.prototype.reset=function(){this.next=this.b=this.a=null};var mu,bu=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(e,n){if(t(e))return t(n)&&1==n.length?e.indexOf(n,0):-1;for(var r=0;r<e.length;r++)if(r in e&&e[r]===n)return r;return-1},wu=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(e,n,r){for(var i=e.length,o=t(e)?e.split(""):e,a=0;a<i;a++)a in o&&n.call(r,o[a],a,e)},Eu=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(e,n){for(var r=e.length,i=Array(r),o=t(e)?e.split(""):e,a=0;a<r;a++)a in o&&(i[a]=n.call(void 0,o[a],a,e));return i},Su=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(e,n){for(var r=e.length,i=t(e)?e.split(""):e,o=0;o<r;o++)if(o in i&&n.call(void 0,i[o],o,e))return!0;return!1},Tu=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},Cu=/&/g,Iu=/</g,Ou=/>/g,Au=/"/g,Ru=/'/g,Nu=/\x00/g,Pu=/[\x00&<>"']/;t:{var ku=du.navigator;if(ku){var Du=ku.userAgent;if(Du){mu=Du;break t}}mu=""}var xu,Fu,Lu="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),ju=!1,Mu=new E,Uu=0,Vu=2,Wu=3;z.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Bu=new b(function(){return new z},function(t){t.reset()});G.prototype.then=function(t,e,n){return nt(this,u(t)?t:null,u(e)?e:null,n)},v(G),hu=G.prototype,hu.ha=function(t,e){return t=Q(t,t,e),t.c=!0,et(this,t),this},hu.m=function(t,e){return nt(this,null,t,e)},hu.cancel=function(t){this.a==Uu&&q(function(){tt(this,new ht(t))},this)},hu.Kc=function(t){this.a=Uu,rt(this,Vu,t)},hu.Lc=function(t){this.a=Uu,rt(this,Wu,t)},hu.Ub=function(){for(var t;t=st(this);)ut(this,t,this.a,this.j);this.h=!1};var qu=W;d(ht,g),ht.prototype.name="cancel";var Hu=0,Ku={};ft.prototype.pa=!1,ft.prototype.ua=function(){if(this.oa)for(;this.oa.length;)this.oa.shift()()},dt[" "]=r;var Gu,zu=L("Opera"),Qu=L("Trident")||L("MSIE"),Yu=L("Edge"),Xu=Yu||Qu,$u=L("Gecko")&&!(x(mu.toLowerCase(),"webkit")&&!L("Edge"))&&!(L("Trident")||L("MSIE"))&&!L("Edge"),Ju=x(mu.toLowerCase(),"webkit")&&!L("Edge");t:{var Zu="",tc=function(){var t=mu;return $u?/rv:([^\);]+)(\)|;)/.exec(t):Yu?/Edge\/([\d\.]+)/.exec(t):Qu?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):Ju?/WebKit\/(\S+)/.exec(t):zu?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(tc&&(Zu=tc?tc[1]:""),Qu){var ec=yt();if(null!=ec&&ec>parseFloat(Zu)){Gu=String(ec);break t}}Gu=Zu}var nc,rc={},ic=du.document;nc=ic&&Qu?yt()||("CSS1Compat"==ic.compatMode?parseInt(Gu,10):5):void 0;var oc=Object.freeze||function(t){return t},ac=!Qu||9<=Number(nc),sc=Qu&&!gt("9"),uc=function(){if(!du.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return du.addEventListener("test",r,e),du.removeEventListener("test",r,e),t}();_t.prototype.preventDefault=function(){this.Eb=!1},d(mt,_t);var cc=oc({2:"touch",3:"pen",4:"mouse"});mt.prototype.preventDefault=function(){mt.lb.preventDefault.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,sc)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}},mt.prototype.f=function(){return this.a};var lc="closure_listenable_"+(1e6*Math.random()|0),hc=0;Et.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=Tt(t,e,r,i);return-1<a?(e=t[a],n||(e.Ha=!1)):(e=new bt(e,this.src,o,!!r,i),e.Ha=n,t.push(e)),e};var fc="closure_lm_"+(1e6*Math.random()|0),pc={},dc=0,vc="__closure_events_fn_"+(1e9*Math.random()>>>0);d(jt,ft),jt.prototype[lc]=!0,jt.prototype.addEventListener=function(t,e,n,r){Ct(this,t,e,n,r)},jt.prototype.removeEventListener=function(t,e,n,r){Rt(this,t,e,n,r)},jt.prototype.dispatchEvent=function(e){var n,r=this.Ta;if(r)for(n=[];r;r=r.Ta)n.push(r);r=this.Mb;var i=e.type||e;if(t(e))e=new _t(e,r);else if(e instanceof _t)e.target=e.target||r;else{var o=e;e=new _t(i,r),V(e,o)}if(o=!0,n)for(var a=n.length-1;0<=a;a--){var s=e.b=n[a];o=Vt(s,i,!0,e)&&o}if(s=e.b=r,o=Vt(s,i,!0,e)&&o,o=Vt(s,i,!1,e)&&o,n)for(a=0;a<n.length;a++)s=e.b=n[a],o=Vt(s,i,!1,e)&&o;return o},jt.prototype.ua=function(){if(jt.lb.ua.call(this),this.u){var t,e=this.u,n=0;for(t in e.a){for(var r=e.a[t],i=0;i<r.length;i++)++n,wt(r[i]);delete e.a[t],e.b--}}this.Ta=null},hu=Gt.prototype,hu.S=function(){zt(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},hu.U=function(){return zt(this),this.a.concat()},hu.clear=function(){this.b={},this.c=this.a.length=0},hu.get=function(t,e){return Qt(this.b,t)?this.b[t]:e},hu.set=function(t,e){Qt(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},hu.forEach=function(t,e){for(var n=this.U(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var yc=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;Xt.prototype.toString=function(){var t=[],e=this.c;e&&t.push(oe(e,gc,!0),":");var n=this.b;return(n||"file"==e)&&(t.push("//"),(e=this.l)&&t.push(oe(e,gc,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.j)&&t.push(":",String(n))),(n=this.g)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(oe(n,"/"==n.charAt(0)?mc:_c,!0))),(n=this.a.toString())&&t.push("?",n),(n=this.h)&&t.push("#",oe(n,wc)),t.join("")};var gc=/[#\/\?@]/g,_c=/[#\?:]/g,mc=/[#\?]/g,bc=/[#\?@]/g,wc=/#/g;hu=se.prototype,hu.add=function(t,e){ue(this),this.c=null,t=pe(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},hu.clear=function(){this.a=this.c=null,this.b=0},hu.forEach=function(t,e){ue(this),this.a.forEach(function(n,r){wu(n,function(n){t.call(e,n,r,this)},this)},this)},hu.U=function(){ue(this);for(var t=this.a.S(),e=this.a.U(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},hu.S=function(e){ue(this);var n=[];if(t(e))he(this,e)&&(n=N(n,this.a.get(pe(this,e))));else{e=this.a.S();for(var r=0;r<e.length;r++)n=N(n,e[r])}return n},hu.set=function(t,e){return ue(this),this.c=null,t=pe(this,t),he(this,t)&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},hu.get=function(t,e){return t=t?this.S(t):[],0<t.length?String(t[0]):e},hu.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.U(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.S(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var Ec=!Qu||9<=Number(nc);ve.prototype.la=!0,ve.prototype.ja=function(){return this.a},ve.prototype.toString=function(){return"Const{"+this.a+"}"};var Sc={};ge(""),_e.prototype.la=!0,_e.prototype.ja=function(){return this.a},_e.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Tc=/%{(\w+)}/g,Cc=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank#/i,Ic={};Ee.prototype.la=!0,Ee.prototype.ja=function(){return this.a},Ee.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Oc=/^(?:(?:https?|mailto|ftp):|[^:\/?#]*(?:[\/?#]|$))/i,Ac={};Ce("about:blank"),Ie.prototype.la=!0,Ie.prototype.ja=function(){return this.a},Ie.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Rc={};Ae("<!DOCTYPE html>"),Ae(""),Ae("<br>");var Nc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Pc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},kc=/\uffff/.test("")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Dc=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,xc="Firefox",Fc="Chrome",Lc={Qc:"FirebaseCore-web",Sc:"FirebaseUI-web"};yn.prototype.get=function(){var t=du.navigator;return(t&&"boolean"==typeof t.onLine&&(sn()||"chrome-extension:"===un()||void 0!==t.connection)?t.onLine:1)?this.b?this.c:this.a:Math.min(5e3,this.a)};var jc,Mc={};try{var Uc={};Object.defineProperty(Uc,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Uc,"abcd",{configurable:!0,enumerable:!0,value:2}),jc=2==Uc.abcd}catch(t){jc=!1}var Vc="EMAIL_SIGNIN",Wc="email",Bc="newEmail",qc="requestType",Hc="email",Kc="fromEmail",Gc="data",zc="operation";d(An,Error),An.prototype.C=function(){return{code:this.code,message:this.message}},An.prototype.toJSON=function(){return this.C()};var Qc="auth/",Yc={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},Xc="android",$c="handleCodeInApp",Jc="iOS",Zc="url",tl="installApp",el="minimumVersion",nl="packageName",rl="bundleId",il=null,ol=null;Ln.prototype.f=function(){return this.b};var al="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),sl=["client_id","response_type","scope","redirect_uri","state"],ul={Rc:{Ma:"locale",Aa:500,za:600,Na:"facebook.com",cb:sl},Tc:{Ma:null,Aa:500,za:620,Na:"github.com",cb:sl},Uc:{Ma:"hl",Aa:515,za:680,Na:"google.com",cb:sl},$c:{Ma:"lang",Aa:485,za:705,Na:"twitter.com",cb:al}},cl="idToken",ll="providerId";d(Bn,Wn),d(qn,Bn),d(Hn,Bn),d(Kn,Bn),d(Gn,Bn),Xn.prototype.xa=function(t){return Di(t,$n(this))},Xn.prototype.c=function(t,e){var n=$n(this);return n.idToken=e,xi(t,n)},Xn.prototype.f=function(t,e){return Yn(Fi(t,$n(this)),e)},Xn.prototype.C=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),t},Jn.prototype.Ca=function(t){return this.tb=U(t),this},d(Zn,Jn),Zn.prototype.ta=function(t){return O(this.a,t)||this.a.push(t),this},Zn.prototype.yb=function(){return P(this.a)},Zn.prototype.credential=function(t,e){if(!t&&!e)throw new An("argument-error","credential failed: must provide the ID token and/or the access token.");return new Xn(this.providerId,{idToken:t||null,accessToken:e||null},this.providerId)},d(tr,Zn),wn(tr,"PROVIDER_ID","facebook.com"),wn(tr,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),d(nr,Zn),wn(nr,"PROVIDER_ID","github.com"),wn(nr,"GITHUB_SIGN_IN_METHOD","github.com"),d(ir,Zn),wn(ir,"PROVIDER_ID","google.com"),wn(ir,"GOOGLE_SIGN_IN_METHOD","google.com"),d(ar,Jn),wn(ar,"PROVIDER_ID","twitter.com"),wn(ar,"TWITTER_SIGN_IN_METHOD","twitter.com"),ur.prototype.xa=function(t){return this.signInMethod==cr.EMAIL_LINK_SIGN_IN_METHOD?ji(t,Hl,{email:this.a,oobCode:this.b}):ji(t,sh,{email:this.a,password:this.b})},ur.prototype.c=function(t,e){return this.signInMethod==cr.EMAIL_LINK_SIGN_IN_METHOD?ji(t,Kl,{idToken:e,email:this.a,oobCode:this.b}):ji(t,eh,{idToken:e,email:this.a,password:this.b})},ur.prototype.f=function(t,e){return Yn(this.xa(t),e)},ur.prototype.C=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},En(cr,{PROVIDER_ID:"password"}),En(cr,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),En(cr,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),fr.prototype.xa=function(t){return t.Sa(pr(this))},fr.prototype.c=function(t,e){var n=pr(this);return n.idToken=e,ji(t,ch,n)},fr.prototype.f=function(t,e){var n=pr(this);return n.operation="REAUTH",t=ji(t,lh,n),Yn(t,e)},fr.prototype.C=function(){var t={providerId:"phone"};return this.a.Ra&&(t.verificationId=this.a.Ra),this.a.Qa&&(t.verificationCode=this.a.Qa),this.a.Ea&&(t.temporaryProof=this.a.Ea),this.a.Z&&(t.phoneNumber=this.a.Z),t},dr.prototype.Sa=function(e,n){var r=this.a.b;return Y(n.verify()).then(function(i){if(!t(i))throw new An("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(n.type){case"recaptcha":return Ri(r,{phoneNumber:e,recaptchaToken:i}).then(function(t){return"function"==typeof n.reset&&n.reset(),t},function(t){throw"function"==typeof n.reset&&n.reset(),t});default:throw new An("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})},En(dr,{PROVIDER_ID:"phone"}),En(dr,{PHONE_SIGN_IN_METHOD:"phone"}),_r.prototype.C=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.C()}};var hl=null;br.prototype.subscribe=function(t){var e=this;this.a.push(t),this.b||(this.b=function(t){for(var n=0;n<e.a.length;n++)e.a[n](t)},"function"==typeof(t=rn("universalLinks.subscribe",du))&&t(null,this.b))},br.prototype.unsubscribe=function(t){R(this.a,function(e){return e==t})},d(wr,An),d(Er,An),Er.prototype.C=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber);var e=this.credential&&this.credential.C();return e&&V(t,e),t},Er.prototype.toJSON=function(){return this.C()};var fl=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;Tr.prototype.c=null;var pl;d(Ir,Tr),Ir.prototype.a=function(){var t=Or(this);return t?new ActiveXObject(t):new XMLHttpRequest},Ir.prototype.b=function(){var t={};return Or(this)&&(t[0]=!0,t[1]=!0),t},pl=new Ir,d(Ar,Tr),Ar.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new Rr;throw Error("Unsupported browser")},Ar.prototype.b=function(){return{}},hu=Rr.prototype,hu.open=function(t,e,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(t,e)},hu.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},hu.abort=function(){this.a.abort()},hu.setRequestHeader=function(){},hu.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},hu.bc=function(){this.status=200,this.responseText=this.a.responseText,Nr(this,4)},hu.zb=function(){this.status=500,this.responseText="",Nr(this,4)},hu.fc=function(){this.zb()},hu.cc=function(){this.status=200,Nr(this,1)},hu.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},Pr.prototype.a=null;var dl=0;Pr.prototype.reset=function(t,e,n,r,i){"number"==typeof i||dl++,r||gu(),delete this.a},Dr.prototype.toString=function(){return this.name};var vl=new Dr("SEVERE",1e3),yl=new Dr("WARNING",900),gl=new Dr("CONFIG",700),_l=new Dr("FINE",500);kr.prototype.log=function(t,e,n){if(t.value>=xr(this).value)for(u(e)&&(e=e()),t=new Pr(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var ml={},bl=null;d(jr,Tr),jr.prototype.a=function(){return new Mr(this.f)},jr.prototype.b=function(t){return function(){return t}}({}),d(Mr,jt);var wl=0;hu=Mr.prototype,hu.open=function(t,e){if(this.readyState!=wl)throw this.abort(),Error("Error reopening a connection");this.h=t,this.c=e,this.readyState=1,Ur(this)},hu.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.g,method:this.h,credentials:void 0,cache:void 0};t&&(e.body=t),this.j.fetch(new Request(this.c,e)).then(this.ec.bind(this),this.Ab.bind(this))},hu.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,Ur(this)),this.readyState=wl},hu.ec=function(t){this.a&&(this.b||(this.b=t.headers,this.readyState=2,Ur(this)),this.a&&(this.readyState=3,Ur(this),this.a&&t.text().then(this.dc.bind(this,t),this.Ab.bind(this))))},hu.dc=function(t,e){this.a&&(this.status=t.status,this.statusText=t.statusText,this.responseText=e,this.readyState=4,Ur(this))},hu.Ab=function(t){var e=this.f;e&&e.log(yl,"Failed to fetch url "+this.c,t instanceof Error?t:Error(t)),this.a&&(this.readyState=4,Ur(this))},hu.setRequestHeader=function(t,e){this.g.append(t,e)},hu.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.f)&&t.log(yl,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},hu.getAllResponseHeaders=function(){if(!this.b){var t=this.f;return t&&t.log(yl,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},d(Vr,jt);var El="";Vr.prototype.b=Fr("goog.net.XhrIo");var Sl=/^https?$/i,Tl=["POST","PUT"];hu=Vr.prototype,hu.Fa=function(){void 0!==pu&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",Lr(this.b,Jr(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},hu.abort=function(){this.a&&this.c&&(Lr(this.b,Jr(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),zr(this))},hu.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),zr(this,!0)),Vr.lb.ua.call(this)},hu.Db=function(){this.pa||(this.I||this.j||this.f?Gr(this):this.tc())},hu.tc=function(){Gr(this)},hu.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case El:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&&t.log(vl,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(t){return Lr(this.b,"Can not get response: "+t.message),null}},Zr.prototype.cancel=function(t){if(this.a)this.c instanceof Zr&&this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):0>=--e.l&&e.cancel()}this.v?this.v.call(this.s,this):this.u=!0,this.a||(t=new si(this),ei(this),ti(this,!1,t))}},Zr.prototype.o=function(t,e){this.j=!1,ti(this,t,e)},Zr.prototype.D=function(){ei(this),ti(this,!0,null)},Zr.prototype.then=function(t,e,n){var r,i,o=new G(function(t,e){r=t,i=e});return ri(this,r,function(t){t instanceof si?o.cancel():i(t)}),o.then(t,e,n)},v(Zr),d(ai,g),ai.prototype.message="Deferred has already fired",ai.prototype.name="AlreadyCalledError",d(si,g),si.prototype.message="Deferred was canceled",si.prototype.name="CanceledError",ui.prototype.c=function(){throw delete Cl[this.a],this.b};var Cl={},Il=0,Ol=1;d(pi,g),d(di,Tr),di.prototype.a=function(){return new this.f},di.prototype.b=function(){return{}};var Al,Rl="idToken",Nl=new yn(3e4,6e4),Pl={"Content-Type":"application/x-www-form-urlencoded"},kl=new yn(3e4,6e4),Dl={"Content-Type":"application/json"};vi.prototype.o=function(t,e,n,r,i,o){if($e()&&(void 0===du.fetch||void 0===du.Headers||void 0===du.Request))throw new An("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var a=new Vr(this.c);if(o){a.g=Math.max(0,o);var s=setTimeout(function(){a.dispatchEvent("timeout")},o)}Mt(a,"complete",function(){s&&clearTimeout(s);var t=null;try{t=JSON.parse($r(this))||null}catch(e){t=null}e&&e(t)}),Ut(a,"ready",function(){s&&clearTimeout(s),pt(this)}),Ut(a,"timeout",function(){s&&clearTimeout(s),pt(this),e&&e(null)}),Wr(a,t,n,r,i)};var xl=ge("https://apis.google.com/js/client.js?onload=%{onload}"),Fl="__fcb"+Math.floor(1e6*Math.random()).toString();vi.prototype.u=function(t,e,n,r,i){var o=this;Al.then(function(){window.gapi.client.setApiKey(o.b);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&&e(t)}})}).m(function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})})},vi.prototype.jb=function(){return ji(this,nh,{})},vi.prototype.mb=function(t,e){return ji(this,th,{idToken:t,email:e})},vi.prototype.nb=function(t,e){return ji(this,eh,{idToken:t,password:e})};var Ll={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};hu=vi.prototype,hu.ob=function(t,e){var n={idToken:t},r=[];return j(Ll,function(t,i){var o=e[i];null===o?r.push(t):i in e&&(n[i]=o)}),r.length&&(n.deleteAttribute=r),ji(this,th,n)},hu.gb=function(t,e){return t={requestType:"PASSWORD_RESET",email:t},V(t,e),ji(this,Yl,t)},hu.hb=function(t,e){return t={requestType:"EMAIL_SIGNIN",email:t},V(t,e),ji(this,zl,t)},hu.fb=function(t,e){return t={requestType:"VERIFY_EMAIL",idToken:t},V(t,e),ji(this,Ql,t)},hu.Sa=function(t){return ji(this,uh,t)},hu.Wa=function(t,e){return ji(this,Jl,{oobCode:t,newPassword:e})},hu.Ia=function(t){return ji(this,Ul,{oobCode:t})},hu.Ua=function(t){return ji(this,Ml,{oobCode:t})};var jl,Ml={endpoint:"setAccountInfo",A:Li,ba:"email"},Ul={endpoint:"resetPassword",A:Li,J:function(t){var e=t.requestType;if(!e||!t.email&&"EMAIL_SIGNIN"!=e)throw new An("internal-error")}},Vl={endpoint:"signupNewUser",A:function(t){if(Ei(t),!t.password)throw new An("weak-password")},J:Oi,R:!0},Wl={endpoint:"createAuthUri"},Bl={endpoint:"deleteAccount",T:["idToken"]},ql={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],A:function(t){if(!a(t.deleteProvider))throw new An("internal-error")}},Hl={endpoint:"emailLinkSignin",T:["email","oobCode"],A:Ei,J:Oi,R:!0},Kl={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],A:Ei,J:Oi,R:!0},Gl={endpoint:"getAccountInfo"},zl={endpoint:"getOobConfirmationCode",T:["requestType"],A:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new An("internal-error");Ei(t)},ba:"email"},Ql={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],A:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new An("internal-error")},ba:"email"},Yl={endpoint:"getOobConfirmationCode",T:["requestType"],A:function(t){if("PASSWORD_RESET"!=t.requestType)throw new An("internal-error");Ei(t)},ba:"email"},Xl={pb:!0,endpoint:"getProjectConfig",Cb:"GET"},$l={pb:!0,endpoint:"getRecaptchaParam",Cb:"GET",J:function(t){if(!t.recaptchaSiteKey)throw new An("internal-error")}},Jl={endpoint:"resetPassword",A:Li,ba:"email"},Zl={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],ba:"sessionInfo"},th={endpoint:"setAccountInfo",T:["idToken"],A:Si,R:!0},eh={endpoint:"setAccountInfo",T:["idToken"],A:function(t){if(Si(t),!t.password)throw new An("weak-password")},J:Oi,R:!0},nh={endpoint:"signupNewUser",J:Oi,R:!0},rh={endpoint:"verifyAssertion",A:Pi,J:ki,R:!0},ih={endpoint:"verifyAssertion",A:Pi,J:function(t){if(t.errorMessage&&"USER_NOT_FOUND"==t.errorMessage)throw new An("user-not-found");if(t.errorMessage)throw Mi(t.errorMessage);if(!t[Rl])throw new An("internal-error")},R:!0},oh={endpoint:"verifyAssertion",A:function(t){if(Pi(t),!t.idToken)throw new An("internal-error")},J:ki,R:!0},ah={endpoint:"verifyCustomToken",A:function(t){if(!t.token)throw new An("invalid-custom-token")},J:Oi,R:!0},sh={endpoint:"verifyPassword",A:function(t){if(Ei(t),!t.password)throw new An("wrong-password")},J:Oi,R:!0},uh={endpoint:"verifyPhoneNumber",A:Ai,J:Oi},ch={endpoint:"verifyPhoneNumber",A:function(t){if(!t.idToken)throw new An("internal-error");Ai(t)},J:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Sr(t);Oi(t)}},lh={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:Ai,J:Oi},hh={Wc:{Ya:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",eb:"https://securetoken.googleapis.com/v1/token",id:"p"},Yc:{Ya:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",eb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},Zc:{Ya:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",eb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}};jl=Vi("__EID__")?"__EID__":void 0;var fh=ge("https://apis.google.com/js/api.js?onload=%{onload}"),ph=new yn(3e4,6e4),dh=new yn(5e3,15e3),vh=null;Gi.prototype.toString=function(){return this.f?te(this.a,"v",this.f):le(this.a.a,"v"),this.b?te(this.a,"eid",this.b):le(this.a.a,"eid"),this.c.length?te(this.a,"fw",this.c.join(",")):le(this.a.a,"fw"),this.a.toString()},zi.prototype.toString=function(){var t=re(this.o,"/__/auth/handler");if(te(t,"apiKey",this.u),te(t,"appName",this.c),te(t,"authType",this.l),this.a.isOAuthProvider){var e=this.a;try{var n=fu.app(this.c).auth().ca()}catch(t){n=null}e.Xa=n,te(t,"providerId",this.a.providerId),e=this.a,n=hn(e.tb);for(var r in n)n[r]=n[r].toString();r=e.Ac,n=U(n);for(var i=0;i<r.length;i++){var o=r[i];o in n&&delete n[o]}e.Za&&e.Xa&&!n[e.Za]&&(n[e.Za]=e.Xa),M(n)||te(t,"customParameters",ln(n))}if("function"==typeof this.a.yb&&(e=this.a.yb(),e.length&&te(t,"scopes",e.join(","))),this.j?te(t,"redirectUrl",this.j):le(t.a,"redirectUrl"),this.g?te(t,"eventId",this.g):le(t.a,"eventId"),this.h?te(t,"v",this.h):le(t.a,"v"),this.b)for(var a in this.b)this.b.hasOwnProperty(a)&&!ee(t,a)&&te(t,a,this.b[a]);return this.f?te(t,"eid",this.f):le(t.a,"eid"),a=Qi(this.c),a.length&&te(t,"fw",a.join(",")),t.toString()},hu=Yi.prototype,hu.Da=function(t,e,n){var r=new An("popup-closed-by-user"),i=new An("web-storage-unsupported"),o=this,a=!1;return this.ea().then(function(){eo(o).then(function(n){n||(t&&He(t),e(i),a=!0)})}).m(function(){}).then(function(){if(!a)return Ge(t)}).then(function(){if(!a)return Bt(n).then(function(){e(r)})})},hu.Gb=function(){var t=nn();return!cn(t)&&!dn(t)},hu.Bb=function(){return!1},hu.xb=function(t,e,n,r,i,o,a){if(!t)return X(new An("popup-blocked"));if(a&&!cn())return this.ea().m(function(e){He(t),i(e)}),r(),Y();this.a||(this.a=Xi(Ji(this)));var s=this;return this.a.then(function(){var e=s.ea().m(function(e){throw He(t),i(e),e});return r(),e}).then(function(){if(gr(n),!a){Ve(Zi(s.u,s.f,s.b,e,n,null,o,s.c,void 0,s.h),t)}}).m(function(t){throw"auth/network-request-failed"==t.code&&(s.a=null),t})},hu.Ba=function(t,e,n){this.a||(this.a=Xi(Ji(this)));var r=this;return this.a.then(function(){gr(e),Ve(Zi(r.u,r.f,r.b,t,e,Ue(),n,r.c,void 0,r.h))}).m(function(t){throw"auth/network-request-failed"==t.code&&(r.a=null),t})},hu.ea=function(){var t=this;return $i(this).then(function(){return t.j.ab}).m(function(){throw t.a=null,new An("network-request-failed")})},hu.Lb=function(){return!0},hu.va=function(t){this.g.push(t)},hu.Ja=function(t){R(this.g,function(e){return e==t})},hu=no.prototype,hu.get=function(t){return Y(this.a.getItem(t)).then(function(t){return t&&fn(t)})},hu.set=function(t,e){return Y(this.a.setItem(t,ln(e)))},hu.P=function(t){return Y(this.a.removeItem(t))},hu.Y=function(){},hu.aa=function(){};var yh;hu=ro.prototype,hu.set=function(t,e){var n,r=!1,i=this;return ao(this).then(function(e){return n=e,e=uo(co(n,!0)),lo(e.get(t))}).then(function(o){var a=uo(co(n,!0));return o?(o.value=e,lo(a.put(o))):(i.b++,r=!0,o={},o.fbase_key=t,o.value=e,lo(a.add(o)))}).then(function(){i.f[t]=e}).ha(function(){r&&i.b--})},hu.get=function(t){return ao(this).then(function(e){return lo(uo(co(e,!1)).get(t))}).then(function(t){return t&&t.value})},hu.P=function(t){var e=!1,n=this;return ao(this).then(function(r){return e=!0,n.b++,lo(uo(co(r,!0)).delete(t))}).then(function(){delete n.f[t]}).ha(function(){e&&n.b--})},hu.Jc=function(){var t=this;return ao(this).then(function(t){var e=uo(co(t,!1));return e.getAll?lo(e.getAll()):new G(function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(Error(t.target.errorCode))}})}).then(function(e){var n={},r=[];if(0==t.b){for(r=0;r<e.length;r++)n[e[r].fbase_key]=e[r].value;r=We(t.f,n),t.f=n}return r})},hu.Y=function(t){0==this.a.length&&ho(this),this.a.push(t)},hu.aa=function(t){R(this.a,function(e){return e==t}),0==this.a.length&&this.c&&this.c.cancel("STOP_EVENT")},hu=fo.prototype,hu.get=function(t){return this.b.then(function(e){return e.get(t)})},hu.set=function(t,e){return this.b.then(function(n){return n.set(t,e)})},hu.P=function(t){return this.b.then(function(e){return e.P(t)})},hu.Y=function(t){this.a.push(t)},hu.aa=function(t){R(this.a,function(e){return e==t})},hu=po.prototype,hu.get=function(t){return Y(this.a[t])},hu.set=function(t,e){return this.a[t]=e,Y()},hu.P=function(t){return delete this.a[t],Y()},hu.Y=function(){},hu.aa=function(){},hu=vo.prototype,hu.get=function(t){var e=this;return Y().then(function(){return fn(e.a.getItem(t))})},hu.set=function(t,e){var n=this;return Y().then(function(){var r=ln(e);null===r?n.P(t):n.a.setItem(t,r)})},hu.P=function(t){var e=this;return Y().then(function(){e.a.removeItem(t)})},hu.Y=function(t){du.window&&Ct(du.window,"storage",t)},hu.aa=function(t){du.window&&Rt(du.window,"storage",t)},hu=_o.prototype,hu.get=function(){return Y(null)},hu.set=function(){return Y()},hu.P=function(){return Y()},hu.Y=function(){},hu.aa=function(){},hu=mo.prototype,hu.get=function(t){var e=this;return Y().then(function(){return fn(e.a.getItem(t))})},hu.set=function(t,e){var n=this;return Y().then(function(){var r=ln(e);null===r?n.P(t):n.a.setItem(t,r)})},hu.P=function(t){var e=this;return Y().then(function(){e.a.removeItem(t)})},hu.Y=function(){},hu.aa=function(){};var gh,_h,mh={w:vo,Pa:mo},bh={w:vo,Pa:mo},wh={w:no,Pa:_o},Eh={w:vo,Pa:_o},Sh={Vc:"local",NONE:"none",Xc:"session"};hu=To.prototype,hu.get=function(t,e){return Io(this,t.w).get(Oo(t,e))},hu.set=function(t,e,n){var r=Oo(t,n),i=this,o=Io(this,t.w);return o.set(r,e).then(function(){return o.get(r)}).then(function(e){"local"==t.w&&(i.b[r]=e)})},hu.addListener=function(t,e,n){t=Oo(t,e),this.l&&(this.b[t]=du.localStorage.getItem(t)),M(this.a)&&(Io(this,"local").Y(this.f),this.h||(Me()||!bn())&&du.indexedDB||!this.l||No(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(n)},hu.removeListener=function(t,e,n){t=Oo(t,e),this.a[t]&&(R(this.a[t],function(t){return t==n}),0==this.a[t].length&&delete this.a[t]),M(this.a)&&(Io(this,"local").aa(this.f),Po(this))},hu.Kb=function(t){if(t&&t.f){var e=t.a.key;if(null==e)for(var n in this.a){var r=this.b[n];void 0===r&&(r=null);var i=du.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.Va(n))}else if(0==e.indexOf("firebase:")&&this.a[e]){if(void 0!==t.a.a?Io(this,"local").aa(this.f):Po(this),this.o)if(n=du.localStorage.getItem(e),(r=t.a.newValue)!==n)null!==r?du.localStorage.setItem(e,r):du.localStorage.removeItem(e);else if(this.b[e]===r&&void 0===t.a.a)return;var o=this;n=function(){void 0===t.a.a&&o.b[e]===du.localStorage.getItem(e)||(o.b[e]=du.localStorage.getItem(e),o.Va(e))},Qu&&nc&&10==nc&&du.localStorage.getItem(e)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(n,10):n()}}else wu(t,f(this.Va,this))},hu.Va=function(t){this.a[t]&&wu(this.a[t],function(t){t()})};var Th,Ch={name:"authEvent",w:"local"};d(Lo,Fo);for(var Ih=64,Oh=Ih-1,Ah=[],Rh=0;Rh<Oh;Rh++)Ah[Rh]=0;var Nh=N(128,Ah);Lo.prototype.reset=function(){this.g=this.c=0,this.a=du.Int32Array?new Int32Array(this.h):P(this.h)};var Ph=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];d(Uo,Lo);var kh=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];hu=Vo.prototype,hu.ea=function(){return this.ya?this.ya:this.ya=Qe().then(function(){if("function"!=typeof rn("universalLinks.subscribe",du))throw Wo("cordova-universal-links-plugin is not installed");if(void 0===rn("BuildInfo.packageName",du))throw Wo("cordova-plugin-buildinfo is not installed");if("function"!=typeof rn("cordova.plugins.browsertab.openUrl",du))throw Wo("cordova-plugin-browsertab is not installed");if("function"!=typeof rn("cordova.InAppBrowser.open",du))throw Wo("cordova-plugin-inappbrowser is not installed")},function(){throw new An("cordova-not-ready")})},hu.Da=function(t,e){return e(new An("operation-not-supported-in-this-environment")),Y()},hu.xb=function(){return X(new An("operation-not-supported-in-this-environment"))},hu.Lb=function(){return!1},hu.Gb=function(){return!0},hu.Bb=function(){return!0},hu.Ba=function(t,e,n){if(this.c)return X(new An("redirect-operation-pending"));var r=this,i=du.document,o=null,a=null,s=null,u=null;return this.c=Y().then(function(){return gr(e),Go(r)}).then(function(){return Ho(r,t,e,n)}).then(function(){return new G(function(t,e){a=function(){var e=rn("cordova.plugins.browsertab.close",du);return t(),"function"==typeof e&&e(),r.a&&"function"==typeof r.a.close&&(r.a.close(),r.a=null),!1},r.va(a),s=function(){o||(o=Bt(2e3).then(function(){e(new An("redirect-cancelled-by-user"))}))},u=function(){gn()&&s()},i.addEventListener("resume",s,!1),nn().toLowerCase().match(/android/)||i.addEventListener("visibilitychange",u,!1)}).m(function(t){return zo(r).then(function(){throw t})})}).ha(function(){s&&i.removeEventListener("resume",s,!1),u&&i.removeEventListener("visibilitychange",u,!1),o&&o.cancel(),a&&r.Ja(a),r.c=null})},hu.va=function(t){this.b.push(t),Go(this).m(function(e){"auth/invalid-cordova-configuration"===e.code&&(e=new _r("unknown",null,null,null,new An("no-auth-event")),t(e))})},hu.Ja=function(t){R(this.b,function(e){return e==t})};var Dh={name:"pendingRedirect",w:"session"};Zo.prototype.reset=function(){this.f=!1,this.a.Ja(this.j),this.a=ta(this.v,this.l,this.u)},Zo.prototype.subscribe=function(t){if(O(this.h,t)||this.h.push(t),!this.f){var e=this;Jo(this.g).then(function(t){t?$o(e.g).then(function(){ea(e).m(function(t){var n=new _r("unknown",null,null,null,new An("operation-not-supported-in-this-environment"));ia(t)&&e.o(n)})}):na(e)}).m(function(){na(e)})}},Zo.prototype.unsubscribe=function(t){R(this.h,function(e){return e==t})},Zo.prototype.o=function(t){if(!t)throw new An("invalid-auth-event");for(var e=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.qb(t.b,t.c)){(e=this.b[t.b])&&e.h(t,r),e=!0;break}}return sa(this.c),e};var xh=new yn(2e3,1e4),Fh=new yn(3e4,6e4);Zo.prototype.da=function(){return this.c.da()},Zo.prototype.Ba=function(t,e,n){var r,i=this;return Xo(this.g).then(function(){return i.a.Ba(t,e,n).m(function(t){if(ia(t))throw new An("operation-not-supported-in-this-environment");return r=t,$o(i.g).then(function(){throw r})}).then(function(){return i.a.Lb()?new G(function(){}):$o(i.g).then(function(){return i.da()}).then(function(){}).m(function(){})})})},Zo.prototype.Da=function(t,e,n,r){return this.a.Da(n,function(n){t.ga(e,null,n,r)},xh.get())};var Lh={};aa.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},aa.prototype.h=function(t,e){if(t){this.reset(),this.g=!0;var n=t.b,r=t.c,i=t.a&&"auth/web-storage-unsupported"==t.a.code,o=t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code;"unknown"!=n||i||o?t.a?(ha(this,!0,null,t.a),Y()):e.wa(n,r)?ua(this,t,e):X(new An("invalid-auth-event")):(ha(this,!1,null,null),Y())}else X(new An("invalid-auth-event"))},aa.prototype.da=function(){var t=this;return new G(function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),fa(t))})},pa.prototype.h=function(t,e){if(t){var n=t.b,r=t.c;t.a?(e.ga(t.b,null,t.a,t.c),Y()):e.wa(n,r)?da(t,e):X(new An("invalid-auth-event"))}else X(new An("invalid-auth-event"))},va.prototype.confirm=function(t){return t=vr(this.verificationId,t),this.a(t)},_a.prototype.start=function(){this.a=this.c,ba(this,!0)},_a.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},wa.prototype.C=function(){return{apiKey:this.f.b,refreshToken:this.a,accessToken:this.b,expirationTime:this.c}},wa.prototype.getToken=function(t){return t=!!t,this.b&&!this.a?X(new An("user-token-expired")):t||!this.b||gu()>this.c-3e4?this.a?Ta(this,{grant_type:"refresh_token",refresh_token:this.a}):Y(null):Y({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},Ca.prototype.C=function(){return{lastLoginAt:this.b,createdAt:this.a}},d(Aa,_t),d(Ra,jt),Ra.prototype.na=function(t){this.ia=t,yi(this.b,t)},Ra.prototype.ca=function(){return this.ia},Ra.prototype.Ka=function(){return P(this.O)},Ra.prototype.Ga=function(){this.l.b&&(this.l.stop(),this.l.start())},wn(Ra.prototype,"providerId","firebase"),hu=Ra.prototype,hu.reload=function(){var t=this;return os(this,qa(this).then(function(){return Ya(t).then(function(){return Ua(t)}).then(Ba)}))},hu.ac=function(t){return this.F(t).then(function(t){return new ga(t)})},hu.F=function(t){var e=this;return os(this,qa(this).then(function(){return e.h.getToken(t)}).then(function(t){if(!t)throw new An("internal-error");return t.accessToken!=e.qa&&(ja(e,t.accessToken),e.dispatchEvent(new Aa("tokenChanged"))),za(e,"refreshToken",t.refreshToken),t.accessToken}))},hu.getToken=function(t){return Mc["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]||(Mc["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead.")),this.F(t)},hu.uc=function(t){if(!(t=t.users)||!t.length)throw new An("internal-error");t=t[0],Wa(this,{uid:t.localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt});for(var e=Ja(t),n=0;n<e.length;n++)Ka(this,e[n]);za(this,"isAnonymous",!(this.email&&t.passwordHash||this.providerData&&this.providerData.length))},hu.bb=function(t){var e=this,n=null;return os(this,t.f(this.b,this.uid).then(function(t){return Xa(e,t),n=ts(e,t,"reauthenticate"),e.j=null,e.reload()}).then(function(){return n}),!0)},hu.vc=function(t){return this.bb(t).then(function(){})},hu.$a=function(t){var e=this,n=null;return os(this,Za(this,t.providerId).then(function(){return e.F()}).then(function(n){return t.c(e.b,n)}).then(function(t){return n=ts(e,t,"link"),es(e,t)}).then(function(){return n}))},hu.mc=function(t){return this.$a(t).then(function(t){return t.user})},hu.nc=function(t,e){var n=this;return os(this,Za(this,"phone").then(function(){return ya(Da(n),t,e,f(n.$a,n))}))},hu.wc=function(t,e){var n=this;return os(this,Y().then(function(){return ya(Da(n),t,e,f(n.bb,n))}),!0)},hu.mb=function(t){var e=this;return os(this,this.F().then(function(n){return e.b.mb(n,t)}).then(function(t){return Xa(e,t),e.reload()}))},hu.Nc=function(t){var e=this;return os(this,this.F().then(function(n){return t.c(e.b,n)}).then(function(t){return Xa(e,t),e.reload()}))},hu.nb=function(t){var e=this;return os(this,this.F().then(function(n){return e.b.nb(n,t)}).then(function(t){return Xa(e,t),e.reload()}))},hu.ob=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return qa(this);var e=this;return os(this,this.F().then(function(n){return e.b.ob(n,{displayName:t.displayName,photoUrl:t.photoURL})}).then(function(t){return Xa(e,t),za(e,"displayName",t.displayName||null),za(e,"photoURL",t.photoUrl||null),wu(e.providerData,function(t){"password"===t.providerId&&(wn(t,"displayName",e.displayName),wn(t,"photoURL",e.photoURL))}),Ua(e)}).then(Ba))},hu.Mc=function(t){var e=this;return os(this,Ya(this).then(function(n){return O(Ha(e),t)?Ni(e.b,n,[t]).then(function(t){var n={};return wu(t.providerUserInfo||[],function(t){n[t.providerId]=!0}),wu(Ha(e),function(t){n[t]||Ga(e,t)}),n[dr.PROVIDER_ID]||wn(e,"phoneNumber",null),Ua(e)}):Ua(e).then(function(){throw new An("no-such-provider")})}))},hu.delete=function(){var t=this;return os(this,this.F().then(function(e){return ji(t.b,Bl,{idToken:e})}).then(function(){t.dispatchEvent(new Aa("userDeleted"))})).then(function(){for(var e=0;e<t.D.length;e++)t.D[e].cancel("app-deleted");Na(t,null),ka(t,null),t.D=[],t.o=!0,La(t),wn(t,"refreshToken",null),t.a&&t.a.unsubscribe(t)})},hu.qb=function(t,e){return!!("linkViaPopup"==t&&(this.g||null)==e&&this.f||"reauthViaPopup"==t&&(this.g||null)==e&&this.f||"linkViaRedirect"==t&&(this.$||null)==e||"reauthViaRedirect"==t&&(this.$||null)==e)},hu.ga=function(t,e,n,r){"linkViaPopup"!=t&&"reauthViaPopup"!=t||r!=(this.g||null)||(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},hu.wa=function(t,e){return"linkViaPopup"==t&&e==(this.g||null)?f(this.vb,this):"reauthViaPopup"==t&&e==(this.g||null)?f(this.wb,this):"linkViaRedirect"==t&&(this.$||null)==e?f(this.vb,this):"reauthViaRedirect"==t&&(this.$||null)==e?f(this.wb,this):null},hu.oc=function(t){var e=this;return ns(this,"linkViaPopup",t,function(){return Za(e,t.providerId).then(function(){return Ua(e)})},!1)},hu.xc=function(t){return ns(this,"reauthViaPopup",t,function(){return Y()},!0)},hu.pc=function(t){var e=this;return rs(this,"linkViaRedirect",t,function(){return Za(e,t.providerId)},!1)},hu.yc=function(t){return rs(this,"reauthViaRedirect",t,function(){return Y()},!0)},hu.vb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return os(this,this.F().then(function(r){return xi(n.b,{requestUri:t,sessionId:e,idToken:r})}).then(function(t){return r=ts(n,t,"link"),es(n,t)}).then(function(){return r}))},hu.wb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return os(this,Y().then(function(){return Yn(Fi(n.b,{requestUri:t,sessionId:e}),n.uid)}).then(function(t){return r=ts(n,t,"reauthenticate"),Xa(n,t),n.j=null,n.reload()}).then(function(){return r}),!0)},hu.fb=function(t){var e=this,n=null;return os(this,this.F().then(function(e){return n=e,void 0===t||M(t)?{}:Pn(new Nn(t))}).then(function(t){return e.b.fb(n,t)}).then(function(t){if(e.email!=t)return e.reload()}).then(function(){}))},hu.toJSON=function(){return this.C()},hu.C=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,providerData:[],apiKey:this.G,appName:this.s,authDomain:this.B,stsTokenManager:this.h.C(),redirectEventId:this.$||null};return this.metadata&&V(t,this.metadata.C()),wu(this.providerData,function(e){t.providerData.push(Tn(e))}),t};var jh={name:"redirectUser",w:"session"};fs.prototype.g=function(){var t=this,e=vs("local");bs(this,function(){return Y().then(function(){return t.c&&"local"!=t.c.w?t.b.get(e,t.a):null}).then(function(n){if(n)return ps(t,"local").then(function(){t.c=e})})})};var Mh={name:"persistence",w:"session"};fs.prototype.ib=function(t){var e=null,n=this;return So(t),bs(this,function(){return t!=n.c.w?n.b.get(n.c,n.a).then(function(r){return e=r,ps(n,t)}).then(function(){if(n.c=vs(t),e)return n.b.set(n.c,e,n.a)}):Y()})},d(ws,jt),d(Es,_t),d(Ss,_t),hu=ws.prototype,hu.ib=function(t){return t=this.h.ib(t),Ms(this,t)},hu.na=function(t){this.W===t||this.l||(this.W=t,yi(this.b,this.W),this.dispatchEvent(new Es(this.ca())))},hu.ca=function(){return this.W},hu.Oc=function(){var t=du.navigator;this.na(t?t.languages&&t.languages[0]||t.language||t.userLanguage||null:null)},hu.qc=function(t){this.D.push(t),gi(this.b,fu.SDK_VERSION?en(fu.SDK_VERSION,this.D):null),this.dispatchEvent(new Ss(this.D))},hu.Ka=function(){return P(this.D)},hu.toJSON=function(){return{apiKey:Ds(this).options.apiKey,authDomain:Ds(this).options.authDomain,appName:Ds(this).name,currentUser:xs(this)&&xs(this).C()}},hu.qb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==e&&!!this.f;default:return!1}},hu.ga=function(t,e,n,r){"signInViaPopup"==t&&this.g==r&&(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},hu.wa=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&&this.g==e&&this.f?f(this.Xb,this):null},hu.Xb=function(t,e){var n=this;t={requestUri:t,sessionId:e},this.c&&(this.c.cancel(),this.c=null);var r=null,i=null,o=Di(n.b,t).then(function(t){return r=yr(t),i=Vn(t),t});return t=n.V.then(function(){return o}).then(function(t){return Os(n,t)}).then(function(){return Sn({user:xs(n),credential:r,additionalUserInfo:i,operationType:"signIn"})}),Ms(this,t)},hu.Gc=function(t){if(!an())return X(new An("operation-not-supported-in-this-environment"));var e=this,n=Un(t.providerId),r=pn(),i=null;(!cn()||Xe())&&Ds(this).options.authDomain&&t.isOAuthProvider&&(i=Zi(Ds(this).options.authDomain,Ds(this).options.apiKey,Ds(this).name,"signInViaPopup",t,null,r,fu.SDK_VERSION||null));var o=Ke(i,n&&n.Aa,n&&n.za);return n=Cs(this).then(function(e){return ra(e,o,"signInViaPopup",t,r,!!i)}).then(function(){return new G(function(t,n){e.ga("signInViaPopup",null,new An("cancelled-popup-request"),e.g),e.f=t,e.v=n,e.g=r,e.c=e.a.Da(e,"signInViaPopup",o,r)})}).then(function(t){return o&&He(o),t?Sn(t):null}).m(function(t){throw o&&He(o),t}),Ms(this,n)},hu.Hc=function(t){if(!an())return X(new An("operation-not-supported-in-this-environment"));var e=this;return Ms(this,Cs(this).then(function(){return ys(e.h)}).then(function(){return e.a.Ba("signInViaRedirect",t)}))},hu.da=function(){if(!an())return X(new An("operation-not-supported-in-this-environment"));var t=this;return Ms(this,Cs(this).then(function(){return t.a.da()}).then(function(t){return t?Sn(t):null}))},hu.kb=function(){var t=this;return Ms(this,this.j.then(function(){return xs(t)?(As(t,null),_s(t.h).then(function(){Ls(t)})):Y()}))},hu.Ic=function(){var t=this;return ms(this.h,Ds(this).options.authDomain).then(function(e){if(!t.l){var n;if(n=xs(t)&&e){n=xs(t).uid;var r=e.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Qa(xs(t),e),xs(t).F();(xs(t)||e)&&(As(t,e),e&&(Va(e),e.fa=t.G),t.a&&t.a.subscribe(t),Ls(t))}})},hu.ka=function(t){return gs(this.h,t)},hu.Yb=function(){Ls(this),this.ka(xs(this))},hu.gc=function(){this.kb()},hu.hc=function(){this.kb()},hu.ic=function(t){var e=this;this.addAuthTokenListener(function(){t.next(xs(e))})},hu.jc=function(t){var e=this;js(this,function(){t.next(xs(e))})},hu.sc=function(t,e,n){var r=this;return this.X&&fu.Promise.resolve().then(function(){u(t)?t(xs(r)):u(t.next)&&t.next(xs(r))}),this.Ob(t,e,n)},hu.rc=function(t,e,n){var r=this;return this.X&&fu.Promise.resolve().then(function(){r.O=r.getUid(),u(t)?t(xs(r)):u(t.next)&&t.next(xs(r))}),this.Pb(t,e,n)},hu.$b=function(t){var e=this;return Ms(this,this.j.then(function(){return xs(e)?xs(e).F(t).then(function(t){return{accessToken:t}}):null}))},hu.Cc=function(t){return this.Hb(t).then(function(t){return t.user})},hu.Hb=function(t){var e=this;return this.j.then(function(){return ks(e,ji(e.b,ah,{token:t}))}).then(function(t){var n=t.user;return za(n,"isAnonymous",!1),e.ka(n),t})},hu.Ib=function(t,e){var n=this;return this.j.then(function(){return ks(n,ji(n.b,sh,{email:t,password:e}))})},hu.Dc=function(t,e){return this.Ib(t,e).then(function(t){return t.user})},hu.Sb=function(t,e){return this.sb(t,e).then(function(t){return t.user})},hu.sb=function(t,e){var n=this;return this.j.then(function(){return ks(n,ji(n.b,Vl,{email:t,password:e}))})},hu.Bc=function(t){return this.Oa(t).then(function(t){return t.user})},hu.Oa=function(t){var e=this;return this.j.then(function(){return ks(e,t.xa(e.b))})},hu.jb=function(){return this.Jb().then(function(t){return t.user})},hu.Jb=function(){var t=this;return this.j.then(function(){var e=xs(t);if(e&&e.isAnonymous){return Sn({user:e,credential:null,additionalUserInfo:Sn({providerId:null,isNewUser:!1}),operationType:"signIn"})}return ks(t,t.b.jb()).then(function(e){var n=e.user;return za(n,"isAnonymous",!0),t.ka(n),e})})},hu.getUid=function(){return xs(this)&&xs(this).uid||null},hu.Qb=function(t){this.addAuthTokenListener(t),0<++this.s&&xs(this)&&Fa(xs(this))},hu.zc=function(t){var e=this;wu(this.o,function(n){n==t&&e.s--}),0>this.s&&(this.s=0),0==this.s&&xs(this)&&La(xs(this)),this.removeAuthTokenListener(t)},hu.addAuthTokenListener=function(t){var e=this;this.o.push(t),Ms(this,this.j.then(function(){e.l||O(e.o,t)&&t(Fs(e))}))},hu.removeAuthTokenListener=function(t){R(this.o,function(e){return e==t})},hu.delete=function(){this.l=!0;for(var t=0;t<this.N.length;t++)this.N[t].cancel("app-deleted");return this.N=[],this.h&&(t=this.h,t.b.removeListener(vs("local"),t.a,this.ia)),this.a&&this.a.unsubscribe(this),fu.Promise.resolve()},hu.Vb=function(t){return Ms(this,Ti(this.b,t))},hu.Wb=function(t){return Ms(this,Ci(this.b,t))},hu.kc=function(t){return!!hr(t)},hu.hb=function(t,e){var n=this;return Ms(this,Y().then(function(){var t=new Nn(e);if(!t.c)throw new An("argument-error",$c+" must be true when sending sign in link to email");return Pn(t)}).then(function(e){return n.b.hb(t,e)}).then(function(){}))},hu.Pc=function(t){return this.Ia(t).then(function(t){return t.data.email})},hu.Wa=function(t,e){return Ms(this,this.b.Wa(t,e).then(function(){}))},hu.Ia=function(t){return Ms(this,this.b.Ia(t).then(function(t){return new On(t)}))},hu.Ua=function(t){return Ms(this,this.b.Ua(t).then(function(){}))},hu.gb=function(t,e){var n=this;return Ms(this,Y().then(function(){return void 0===e||M(e)?{}:Pn(new Nn(e))}).then(function(e){return n.b.gb(t,e)}).then(function(){}))},hu.Fc=function(t,e){return Ms(this,ya(this,t,e,f(this.Oa,this)))},hu.Ec=function(t,e){var n=this;return Ms(this,Y().then(function(){var r=lr(t,e||Ue());return n.Oa(r)}))};var Uh="callback",Vh="expired-callback",Wh="sitekey",Bh="size";hu=Us.prototype,hu.ya=function(){var t=this;return this.c?this.c:this.c=Bs(this,Y().then(function(){if(sn()&&!$e())return ze();throw new An("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return Ks(Gs(),t.s())}).then(function(){return ji(t.u,$l,{})}).then(function(e){t.a[Wh]=e.recaptchaSiteKey}).m(function(e){throw t.c=null,e}))},hu.render=function(){qs(this);var t=this;return Bs(this,this.ya().then(function(){if(null===t.b){var e=t.l;if(!t.h){var n=Re(e);e=Pe("DIV"),n.appendChild(e)}t.b=grecaptcha.render(e,t.a)}return t.b}))},hu.verify=function(){qs(this);var t=this;return Bs(this,this.render().then(function(e){return new G(function(n){var r=grecaptcha.getResponse(e);if(r)n(r);else{var i=function(e){e&&(Ws(t,i),n(e))};t.j.push(i),t.h&&grecaptcha.execute(t.b)}})}))},hu.reset=function(){qs(this),null!==this.b&&grecaptcha.reset(this.b)},hu.clear=function(){qs(this),this.o=!0,Gs().b--;for(var t=0;t<this.g.length;t++)this.g[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.h){t=Re(this.l);for(var e;e=t.firstChild;)t.removeChild(e)}};var qh=ge("https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Hh=new yn(3e4,6e4),Kh=null;d(zs,Us);var Gh="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");su(ws.prototype,{Ua:{name:"applyActionCode",i:[Ys("code")]},Ia:{name:"checkActionCode",i:[Ys("code")]},Wa:{name:"confirmPasswordReset",i:[Ys("code"),Ys("newPassword")]},Sb:{name:"createUserWithEmailAndPassword",i:[Ys("email"),Ys("password")]},sb:{name:"createUserAndRetrieveDataWithEmailAndPassword",i:[Ys("email"),Ys("password")]},Vb:{name:"fetchProvidersForEmail",i:[Ys("email")]},Wb:{name:"fetchSignInMethodsForEmail",i:[Ys("email")]},da:{name:"getRedirectResult",i:[]},kc:{name:"isSignInWithEmailLink",i:[Ys("emailLink")]},rc:{name:"onAuthStateChanged",i:[au($s(),Js(),"nextOrObserver"),Js("opt_error",!0),Js("opt_completed",!0)]},sc:{name:"onIdTokenChanged",i:[au($s(),Js(),"nextOrObserver"),Js("opt_error",!0),Js("opt_completed",!0)]},gb:{name:"sendPasswordResetEmail",i:[Ys("email"),au($s("opt_actionCodeSettings",!0),Zs(null,!0),"opt_actionCodeSettings",!0)]},hb:{name:"sendSignInLinkToEmail",i:[Ys("email"),$s("actionCodeSettings")]},ib:{name:"setPersistence",i:[Ys("persistence")]},Oa:{name:"signInAndRetrieveDataWithCredential",i:[ru()]},jb:{name:"signInAnonymously",i:[]},Jb:{name:"signInAnonymouslyAndRetrieveData",i:[]},Bc:{name:"signInWithCredential",i:[ru()]},Cc:{name:"signInWithCustomToken",i:[Ys("token")]},Hb:{name:"signInAndRetrieveDataWithCustomToken",i:[Ys("token")]},Dc:{name:"signInWithEmailAndPassword",i:[Ys("email"),Ys("password")]},Ec:{name:"signInWithEmailLink",i:[Ys("email"),Ys("emailLink",!0)]},Ib:{name:"signInAndRetrieveDataWithEmailAndPassword",i:[Ys("email"),Ys("password")]},Fc:{name:"signInWithPhoneNumber",i:[Ys("phoneNumber"),ou()]},Gc:{name:"signInWithPopup",i:[iu()]},Hc:{name:"signInWithRedirect",i:[iu()]},kb:{name:"signOut",i:[]},toJSON:{name:"toJSON",i:[Ys(null,!0)]},Oc:{name:"useDeviceLanguage",i:[]},Pc:{name:"verifyPasswordResetCode",i:[Ys("code")]}}),function(t,e){for(var n in e){var r=e[n].name;if(r!==n){var i=e[n].Rb;Object.defineProperty(t,r,{get:function(){return this[n]},set:function(t){Qs(r,[i],[t],!0),this[n]=t},enumerable:!0})}}}(ws.prototype,{lc:{name:"languageCode",Rb:au(Ys(),Zs(),"languageCode")}}),ws.Persistence=Sh,ws.Persistence.LOCAL="local",ws.Persistence.SESSION="session",ws.Persistence.NONE="none",su(Ra.prototype,{delete:{name:"delete",i:[]},ac:{name:"getIdTokenResult",i:[Xs()]},F:{name:"getIdToken",i:[Xs()]},getToken:{name:"getToken",i:[Xs()]},$a:{name:"linkAndRetrieveDataWithCredential",i:[ru()]},mc:{name:"linkWithCredential",i:[ru()]},nc:{name:"linkWithPhoneNumber",i:[Ys("phoneNumber"),ou()]},oc:{name:"linkWithPopup",i:[iu()]},pc:{name:"linkWithRedirect",i:[iu()]},bb:{name:"reauthenticateAndRetrieveDataWithCredential",i:[ru()]},vc:{name:"reauthenticateWithCredential",i:[ru()]},wc:{name:"reauthenticateWithPhoneNumber",i:[Ys("phoneNumber"),ou()]},xc:{name:"reauthenticateWithPopup",i:[iu()]},yc:{name:"reauthenticateWithRedirect",i:[iu()]},reload:{name:"reload",i:[]},fb:{name:"sendEmailVerification",i:[au($s("opt_actionCodeSettings",!0),Zs(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",i:[Ys(null,!0)]},Mc:{name:"unlink",i:[Ys("provider")]},mb:{name:"updateEmail",i:[Ys("email")]},nb:{name:"updatePassword",i:[Ys("password")]},Nc:{name:"updatePhoneNumber",i:[ru("phone")]},ob:{name:"updateProfile",i:[$s("profile")]}}),su(G.prototype,{ha:{name:"finally"},m:{name:"catch"},then:{name:"then"}}),su(va.prototype,{confirm:{name:"confirm",i:[Ys("verificationCode")]}}),uu(cr,"credential",function(t,e){return new ur(t,e)},[Ys("email"),Ys("password")]),su(tr.prototype,{ta:{name:"addScope",i:[Ys("scope")]},Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(tr,"credential",er,[au(Ys(),$s(),"token")]),uu(cr,"credentialWithLink",lr,[Ys("email"),Ys("emailLink")]),su(nr.prototype,{ta:{name:"addScope",i:[Ys("scope")]},Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(nr,"credential",rr,[au(Ys(),$s(),"token")]),su(ir.prototype,{ta:{name:"addScope",i:[Ys("scope")]},Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(ir,"credential",or,[au(Ys(),au($s(),Zs()),"idToken"),au(Ys(),Zs(),"accessToken",!0)]),su(ar.prototype,{Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(ar,"credential",sr,[au(Ys(),$s(),"token"),Ys("secret",!0)]),su(Zn.prototype,{ta:{name:"addScope",i:[Ys("scope")]},credential:{name:"credential",i:[au(Ys(),Zs(),"idToken",!0),au(Ys(),Zs(),"accessToken",!0)]},Ca:{name:"setCustomParameters",i:[$s("customOAuthParameters")]}}),uu(dr,"credential",vr,[Ys("verificationId"),Ys("verificationCode")]),su(dr.prototype,{Sa:{name:"verifyPhoneNumber",i:[Ys("phoneNumber"),ou()]}}),su(An.prototype,{toJSON:{name:"toJSON",i:[Ys(null,!0)]}}),su(Er.prototype,{toJSON:{name:"toJSON",i:[Ys(null,!0)]}}),su(wr.prototype,{toJSON:{name:"toJSON",i:[Ys(null,!0)]}}),su(zs.prototype,{clear:{name:"clear",i:[]},render:{name:"render",i:[]},verify:{name:"verify",i:[]}}),function(){if(void 0===fu||!fu.INTERNAL||!fu.INTERNAL.registerService)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={Auth:ws,Error:An};uu(t,"EmailAuthProvider",cr,[]),uu(t,"FacebookAuthProvider",tr,[]),uu(t,"GithubAuthProvider",nr,[]),uu(t,"GoogleAuthProvider",ir,[]),uu(t,"TwitterAuthProvider",ar,[]),uu(t,"OAuthProvider",Zn,[Ys("providerId")]),uu(t,"PhoneAuthProvider",dr,[eu()]),uu(t,"RecaptchaVerifier",zs,[au(Ys(),tu(),"recaptchaContainer"),$s("recaptchaParameters",!0),nu()]),fu.INTERNAL.registerService("auth",function(t,e){return t=new ws(t),e({INTERNAL:{getUid:f(t.getUid,t),getToken:f(t.$b,t),addAuthTokenListener:f(t.Qb,t),removeAuthTokenListener:f(t.zc,t)}}),t},t,function(t,e){if("create"===t)try{e.auth()}catch(t){}}),fu.INTERNAL.extendNamespace({User:Ra})}()}).call(void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}).call(e,n(36))},function(t,e,n){"use strict";(function(r){function i(t){for(var e="",n=t.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(t){}e+="/"+i}return e}function o(t){var e={};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=t.split("&");n<r.length;n++){var i=r[n];if(0!==i.length){var o=i.split("=");2===o.length?e[decodeURIComponent(o[0])]=decodeURIComponent(o[1]):j("Invalid query segment '"+i+"' in query '"+t+"'")}}return e}function a(t,e){return q(t.name,e.name)}function s(t,e){return q(t,e)}function u(t,e){if(void 0===e&&(e=null),null===t)return Yt.EMPTY_NODE;if("object"==typeof t&&".priority"in t&&(e=t[".priority"]),g.assert(null===e||"string"==typeof e||"number"==typeof e||"object"==typeof e&&".sv"in e,"Invalid priority type found: "+typeof e),"object"==typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!=typeof t||".sv"in t){return new jt(t,u(e))}if(t instanceof Array||!Jt){var n=Yt.EMPTY_NODE,r=t;return g.forEach(r,function(t,e){if(g.contains(r,t)&&"."!==t.substring(0,1)){var i=u(e);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(t,i))}}),n.updatePriority(u(e))}var i=[],o=!1,c=t;if(g.forEach(c,function(t,e){if("string"!=typeof t||"."!==t.substring(0,1)){var n=u(c[t]);n.isEmpty()||(o=o||!n.getPriority().isEmpty(),i.push(new Pt(t,n)))}}),0==i.length)return Yt.EMPTY_NODE;var l=Gt(i,a,function(t){return t.name},s);if(o){var h=Gt(i,Ut.getCompare());return new Yt(l,u(e),new Qt({".priority":h},{".priority":Ut}))}return new Yt(l,u(e),Qt.Default)}function c(e){var n=e.INTERNAL.registerService("database",function(t,e,n){return Cn.getInstance().databaseFromApp(t,n)},{Reference:bn,Query:ce,Database:In,enableLogging:k,INTERNAL:Ln,ServerValue:Kn,TEST_ACCESS:Hn},null,!0);g.isNodeSdk()&&(t.exports=n)}Object.defineProperty(e,"__esModule",{value:!0});var l,h,f,p,d,v,y,g=n(179),_=n(517),m=n(294),b=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(n(101)),w=function(){function t(t){this.domStorage_=t,this.prefix_="firebase:"}return t.prototype.set=function(t,e){null==e?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),g.stringify(e))},t.prototype.get=function(t){var e=this.domStorage_.getItem(this.prefixedName_(t));return null==e?null:g.jsonEval(e)},t.prototype.remove=function(t){this.domStorage_.removeItem(this.prefixedName_(t))},t.prototype.prefixedName_=function(t){return this.prefix_+t},t.prototype.toString=function(){return this.domStorage_.toString()},t}(),E=function(){function t(){this.cache_={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.cache_[t]:this.cache_[t]=e},t.prototype.get=function(t){return g.contains(this.cache_,t)?this.cache_[t]:null},t.prototype.remove=function(t){delete this.cache_[t]},t}(),S=function(t){try{if("undefined"!=typeof window&&void 0!==window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new w(e)}}catch(t){}return new E},T=S("localStorage"),C=S("sessionStorage"),I=new _.Logger("@firebase/database"),O=function(){var t=1;return function(){return t++}}(),A=function(t){var e=g.stringToByteArray(t),n=new g.Sha1;n.update(e);var r=n.digest();return g.base64.encodeByteArray(r)},R=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n="",r=0;r<t.length;r++)Array.isArray(t[r])||t[r]&&"object"==typeof t[r]&&"number"==typeof t[r].length?n+=R.apply(null,t[r]):"object"==typeof t[r]?n+=g.stringify(t[r]):n+=t[r],n+=" ";return n},N=null,P=!0,k=function(t,e){g.assert(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(I.logLevel=_.LogLevel.VERBOSE,N=I.log.bind(I),e&&C.set("logging_enabled",!0)):"function"==typeof t?N=t:(N=null,C.remove("logging_enabled"))},D=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!0===P&&(P=!1,null===N&&!0===C.get("logging_enabled")&&k(!0)),N){var n=R.apply(null,t);N(n)}},x=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];D.apply(void 0,[t].concat(e))}},F=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+R.apply(void 0,t);I.error(n)},L=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+R.apply(void 0,t);throw I.error(n),new Error(n)},j=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+R.apply(void 0,t);I.warn(n)},M=function(){"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&j("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},U=function(t){return"number"==typeof t&&(t!=t||t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)},V=function(t){if(g.isNodeSdk()||"complete"===document.readyState)t();else{var e=!1,n=function(){if(!document.body)return void setTimeout(n,Math.floor(10));e||(e=!0,t())};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}},W="[MIN_NAME]",B="[MAX_NAME]",q=function(t,e){if(t===e)return 0;if(t===W||e===B)return-1;if(e===W||t===B)return 1;var n=tt(t),r=tt(e);return null!==n?null!==r?n-r==0?t.length-e.length:n-r:-1:null!==r?1:t<e?-1:1},H=function(t,e){return t===e?0:t<e?-1:1},K=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+g.stringify(e))},G=function(t){if("object"!=typeof t||null===t)return g.stringify(t);var e=[];for(var n in t)e.push(n);e.sort();for(var r="{",i=0;i<e.length;i++)0!==i&&(r+=","),r+=g.stringify(e[i]),r+=":",r+=G(t[e[i]]);return r+="}"},z=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)i+e>n?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r},Q=function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;++n)e(n,t[n]);else g.forEach(t,function(t,n){return e(n,t)})},Y=function(t){g.assert(!U(t),"Invalid JSON number");var e,n,r,i,o,a,s;for(0===t?(n=0,r=0,e=1/t==-1/0?1:0):(e=t<0,t=Math.abs(t),t>=Math.pow(2,-1022)?(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023),n=i+1023,r=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(t/Math.pow(2,-1074)))),a=[],o=52;o;o-=1)a.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)a.push(n%2?1:0),n=Math.floor(n/2);a.push(e?1:0),a.reverse(),s=a.join("");var u="";for(o=0;o<64;o+=8){var c=parseInt(s.substr(o,8),2).toString(16);1===c.length&&(c="0"+c),u+=c}return u.toLowerCase()},X=function(){return!("object"!=typeof window||!window.chrome||!window.chrome.extension||/^chrome/.test(window.location.href))},$=function(){return"object"==typeof Windows&&"object"==typeof Windows.UI},J=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==t?n="Client doesn't have permission to access the desired data.":"unavailable"==t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r},Z=new RegExp("^-?\\d{1,10}$"),tt=function(t){if(Z.test(t)){var e=Number(t);if(e>=-2147483648&&e<=2147483647)return e}return null},et=function(t){try{t()}catch(t){setTimeout(function(){var e=t.stack||"";throw j("Exception was thrown by user callback.",e),t},Math.floor(0))}},nt=function(){return("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},rt=function(t,e){var n=setTimeout(t,e);return"object"==typeof n&&n.unref&&n.unref(),n},it=function(){function t(t,e){if(void 0===e){this.pieces_=t.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")},enumerable:!0,configurable:!0}),t.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},t.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},t.prototype.popFront=function(){var e=this.pieceNum_;return e<this.pieces_.length&&e++,new t(this.pieces_,e)},t.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t.prototype.toUrlEncodedString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+encodeURIComponent(String(this.pieces_[e])));return t||"/"},t.prototype.slice=function(t){return void 0===t&&(t=0),this.pieces_.slice(this.pieceNum_+t)},t.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var e=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)e.push(this.pieces_[n]);return new t(e,0)},t.prototype.child=function(e){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(e instanceof t)for(var r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else for(var i=e.split("/"),r=0;r<i.length;r++)i[r].length>0&&n.push(i[r]);return new t(n,0)},t.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),r=e.slice(),i=0;i<n.length&&i<r.length;i++){var o=q(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},t.prototype.equals=function(t){if(this.getLength()!==t.getLength())return!1;for(var e=this.pieceNum_,n=t.pieceNum_;e<=this.pieces_.length;e++,n++)if(this.pieces_[e]!==t.pieces_[n])return!1;return!0},t.prototype.contains=function(t){var e=this.pieceNum_,n=t.pieceNum_;if(this.getLength()>t.getLength())return!1;for(;e<this.pieces_.length;){if(this.pieces_[e]!==t.pieces_[n])return!1;++e,++n}return!0},t}(),ot=function(){function t(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=g.stringLength(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!0,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=g.stringLength(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=g.stringLength(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0==this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}(),at="long_polling",st=function(){function t(t,e,n,r,i){void 0===i&&(i=""),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=T.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&T.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){g.assert("string"==typeof t,"typeof type must == string"),g.assert("object"==typeof e,"typeof params must == object");var n;if("websocket"===t)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(t!==at)throw new Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var r=[];return g.forEach(e,function(t,e){r.push(t+"="+e)}),n+r.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},t}(),ut=function(t){var e=ct(t),n=e.subdomain;"firebase"===e.domain&&L(e.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),n&&"undefined"!=n||"localhost"===e.domain||L("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),e.secure||M();var r="ws"===e.scheme||"wss"===e.scheme;return{repoInfo:new st(e.host,e.secure,n,r),path:new it(e.pathString)}},ct=function(t){var e="",n="",r="",a="",s=!0,u="https",c=443;if("string"==typeof t){var l=t.indexOf("//");l>=0&&(u=t.substring(0,l-1),t=t.substring(l+2));var h=t.indexOf("/");-1===h&&(h=t.length);var f=t.indexOf("?");-1===f&&(f=t.length),e=t.substring(0,Math.min(h,f)),h<f&&(a=i(t.substring(h,f)));var p=o(t.substring(Math.min(t.length,f)));l=e.indexOf(":"),l>=0?(s="https"===u||"wss"===u,c=parseInt(e.substring(l+1),10)):l=t.length;var d=e.split(".");3===d.length?(n=d[1],r=d[0].toLowerCase()):2===d.length?n=d[0]:"localhost"===d[0].slice(0,l).toLowerCase()&&(n="localhost"),""===r&&"ns"in p&&(r=p.ns)}return{host:e,port:c,domain:n,subdomain:r,secure:s,scheme:u,pathString:a}},lt=/[\[\].#$\/\u0000-\u001F\u007F]/,ht=/[\[\].#$\u0000-\u001F\u007F]/,ft=function(t){return"string"==typeof t&&0!==t.length&&!lt.test(t)},pt=function(t){return"string"==typeof t&&0!==t.length&&!ht.test(t)},dt=function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),pt(t)},vt=function(t){return null===t||"string"==typeof t||"number"==typeof t&&!U(t)||t&&"object"==typeof t&&g.contains(t,".sv")},yt=function(t,e,n,r,i){i&&void 0===n||gt(g.errorPrefix(t,e,i),n,r)},gt=function(t,e,n){var r=n instanceof it?new ot(n,t):n;if(void 0===e)throw new Error(t+"contains undefined "+r.toErrorString());if("function"==typeof e)throw new Error(t+"contains a function "+r.toErrorString()+" with contents = "+e.toString());if(U(e))throw new Error(t+"contains "+e.toString()+" "+r.toErrorString());if("string"==typeof e&&e.length>10485760/3&&g.stringLength(e)>10485760)throw new Error(t+"contains a string greater than 10485760 utf8 bytes "+r.toErrorString()+" ('"+e.substring(0,50)+"...')");if(e&&"object"==typeof e){var i=!1,o=!1;if(g.forEach(e,function(e,n){if(".value"===e)i=!0;else if(".priority"!==e&&".sv"!==e&&(o=!0,!ft(e)))throw new Error(t+" contains an invalid key ("+e+") "+r.toErrorString()+'.  Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');r.push(e),gt(t,n,r),r.pop()}),i&&o)throw new Error(t+' contains ".value" child '+r.toErrorString()+" in addition to actual children.")}},_t=function(t,e){var n,r;for(n=0;n<e.length;n++){r=e[n];for(var i=r.slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);else if(!ft(i[o]))throw new Error(t+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"')}e.sort(it.comparePaths);var a=null;for(n=0;n<e.length;n++){if(r=e[n],null!==a&&a.contains(r))throw new Error(t+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}},mt=function(t,e,n,r,i){if(!i||void 0!==n){var o=g.errorPrefix(t,e,i);if(!n||"object"!=typeof n||Array.isArray(n))throw new Error(o+" must be an object containing the children to replace.");var a=[];g.forEach(n,function(t,e){var n=new it(t);if(gt(o,e,r.child(n)),".priority"===n.getBack()&&!vt(e))throw new Error(o+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");a.push(n)}),_t(o,a)}},bt=function(t,e,n,r){if(!r||void 0!==n){if(U(n))throw new Error(g.errorPrefix(t,e,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!vt(n))throw new Error(g.errorPrefix(t,e,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},wt=function(t,e,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(g.errorPrefix(t,e,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},Et=function(t,e,n,r){if(!(r&&void 0===n||ft(n)))throw new Error(g.errorPrefix(t,e,r)+'was an invalid key = "'+n+'".  Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},St=function(t,e,n,r){if(!(r&&void 0===n||pt(n)))throw new Error(g.errorPrefix(t,e,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},Tt=function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),St(t,e,n,r)},Ct=function(t,e){if(".info"===e.getFront())throw new Error(t+" failed = Can't modify data under /.info/")},It=function(t,e,n){var r=n.path.toString();if("string"!=typeof n.repoInfo.host||0===n.repoInfo.host.length||!ft(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!dt(r))throw new Error(g.errorPrefix(t,e,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},Ot=function(t,e,n,r){if((!r||void 0!==n)&&"boolean"!=typeof n)throw new Error(g.errorPrefix(t,e,r)+"must be a boolean.")},At=function(){function t(t,e){this.repo_=t,this.path_=e}return t.prototype.cancel=function(t){g.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),g.validateCallback("OnDisconnect.cancel",1,t,!0);var e=new g.Deferred;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},t.prototype.remove=function(t){g.validateArgCount("OnDisconnect.remove",0,1,arguments.length),Ct("OnDisconnect.remove",this.path_),g.validateCallback("OnDisconnect.remove",1,t,!0);var e=new g.Deferred;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},t.prototype.set=function(t,e){g.validateArgCount("OnDisconnect.set",1,2,arguments.length),Ct("OnDisconnect.set",this.path_),yt("OnDisconnect.set",1,t,this.path_,!1),g.validateCallback("OnDisconnect.set",2,e,!0);var n=new g.Deferred;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},t.prototype.setWithPriority=function(t,e,n){g.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),Ct("OnDisconnect.setWithPriority",this.path_),yt("OnDisconnect.setWithPriority",1,t,this.path_,!1),bt("OnDisconnect.setWithPriority",2,e,!1),g.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var r=new g.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,r.wrapCallback(n)),r.promise},t.prototype.update=function(t,e){if(g.validateArgCount("OnDisconnect.update",1,2,arguments.length),Ct("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,j("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}mt("OnDisconnect.update",1,t,this.path_,!1),g.validateCallback("OnDisconnect.update",2,e,!0);var i=new g.Deferred;return this.repo_.onDisconnectUpdate(this.path_,t,i.wrapCallback(e)),i.promise},t}(),Rt=function(){function t(t,e){this.committed=t,this.snapshot=e}return t.prototype.toJSON=function(){return g.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},t}(),Nt=function(){var t="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",e=0,n=[];return function(r){var i=r===e;e=r;var o,a=new Array(8);for(o=7;o>=0;o--)a[o]=t.charAt(r%64),r=Math.floor(r/64);g.assert(0===r,"Cannot push at time == 0");var s=a.join("");if(i){for(o=11;o>=0&&63===n[o];o--)n[o]=0;n[o]++}else for(o=0;o<12;o++)n[o]=Math.floor(64*Math.random());for(o=0;o<12;o++)s+=t.charAt(n[o]);return g.assert(20===s.length,"nextPushId: Length should be 20."),s}}(),Pt=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}(),kt=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new Pt(W,t),r=new Pt(W,e);return 0!==this.compare(n,r)},t.prototype.minPost=function(){return Pt.MIN},t}(),Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m.__extends(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return l},set:function(t){l=t},enumerable:!0,configurable:!0}),e.prototype.compare=function(t,e){return q(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw g.assertionError("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return Pt.MIN},e.prototype.maxPost=function(){return new Pt(B,l)},e.prototype.makePost=function(t,e){return g.assert("string"==typeof t,"KeyIndex indexValue must always be a string."),new Pt(t,l)},e.prototype.toString=function(){return".key"},e}(kt),xt=new Dt,Ft=function(t){return"number"==typeof t?"number:"+Y(t):"string:"+t},Lt=function(t){if(t.isLeafNode()){var e=t.val();g.assert("string"==typeof e||"number"==typeof e||"object"==typeof e&&g.contains(e,".sv"),"Priority must be a string or number.")}else g.assert(t===h||t.isEmpty(),"priority of unexpected type.");g.assert(t===h||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},jt=function(){function t(e,n){void 0===n&&(n=t.__childrenNodeConstructor.EMPTY_NODE),this.value_=e,this.priorityNode_=n,this.lazyHash_=null,g.assert(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Lt(this.priorityNode_)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return f},set:function(t){f=t},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.priorityNode_},t.prototype.updatePriority=function(e){return new t(this.value_,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.getChild=function(e){return e.isEmpty()?this:".priority"===e.getFront()?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)},t.prototype.updateChild=function(e,n){var r=e.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(g.assert(".priority"!==r||1===e.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,t.__childrenNodeConstructor.EMPTY_NODE.updateChild(e.popFront(),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1},t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.priorityNode_.isEmpty()||(t+="priority:"+Ft(this.priorityNode_.val())+":");var e=typeof this.value_;t+=e+":",t+="number"===e?Y(this.value_):this.value_,this.lazyHash_=A(t)}return this.lazyHash_},t.prototype.getValue=function(){return this.value_},t.prototype.compareTo=function(e){return e===t.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof t.__childrenNodeConstructor?-1:(g.assert(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))},t.prototype.compareToLeafNode_=function(e){var n=typeof e.value_,r=typeof this.value_,i=t.VALUE_TYPE_ORDER.indexOf(n),o=t.VALUE_TYPE_ORDER.indexOf(r);return g.assert(i>=0,"Unknown leaf type: "+n),g.assert(o>=0,"Unknown leaf type: "+r),i===o?"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:o-i},t.prototype.withIndex=function(){return this},t.prototype.isIndexed=function(){return!0},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode()){var e=t;return this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}return!1},t.VALUE_TYPE_ORDER=["object","boolean","number","string"],t}(),Mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?q(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return Pt.MIN},e.prototype.maxPost=function(){return new Pt(B,new jt("[PRIORITY-POST]",d))},e.prototype.makePost=function(t,e){var n=p(t);return new Pt(e,new jt("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(kt),Ut=new Mt,Vt=function(){function t(t,e,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(t=t,o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return t.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var t,e=this.nodeStack_.pop();if(t=this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack_.length>0},t.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},t}(),Wt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:qt.EMPTY_NODE,this.right=null!=o?o:qt.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},t.prototype.minKey=function(){return this.min_().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r,i;return i=this,r=n(t,i.key),i=r<0?i.copy(null,null,null,i.left.insert(t,e,n),null):0===r?i.copy(null,e,null,null,null):i.copy(null,null,null,null,i.right.insert(t,e,n)),i.fixUp_()},t.prototype.removeMin_=function(){if(this.left.isEmpty())return qt.EMPTY_NODE;var t=this;return t.left.isRed_()||t.left.left.isRed_()||(t=t.moveRedLeft_()),t=t.copy(null,null,null,t.left.removeMin_(),null),t.fixUp_()},t.prototype.remove=function(t,e){var n,r;if(n=this,e(t,n.key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(t,e),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===e(t,n.key)){if(n.right.isEmpty())return qt.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(t,e))}return n.fixUp_()},t.prototype.isRed_=function(){return this.color},t.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},t.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=t.copy(null,null,null,null,t.right.rotateRight_()),t=t.rotateLeft_(),t=t.colorFlip_()),t},t.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=t.rotateRight_(),t=t.colorFlip_()),t},t.prototype.rotateLeft_=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight_=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},t.prototype.check_=function(){var t;if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");if((t=this.left.check_())!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},t.RED=!0,t.BLACK=!1,t}(),Bt=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new Wt(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.check_=function(){return 0},t.prototype.isRed_=function(){return!1},t}(),qt=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.comparator_=e,this.root_=n}return t.prototype.insert=function(e,n){return new t(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,Wt.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,Wt.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.root_;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.root_,r=null;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key.  What gives?")},t.prototype.isEmpty=function(){return this.root_.isEmpty()},t.prototype.count=function(){return this.root_.count()},t.prototype.minKey=function(){return this.root_.minKey()},t.prototype.maxKey=function(){return this.root_.maxKey()},t.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},t.prototype.getIterator=function(t){return new Vt(this.root_,null,this.comparator_,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new Vt(this.root_,t,this.comparator_,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new Vt(this.root_,t,this.comparator_,!0,e)},t.prototype.getReverseIterator=function(t){return new Vt(this.root_,null,this.comparator_,!0,t)},t.EMPTY_NODE=new Bt,t}(),Ht=Math.log(2),Kt=function(){function t(t){this.count=function(t){return parseInt(Math.log(t)/Ht,10)}(t+1),this.current_=this.count-1;var e=function(t){return parseInt(Array(t+1).join("1"),2)}(this.count);this.bits_=t+1&e}return t.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<<this.current_);return this.current_--,t},t}(),Gt=function(t,e,n,r){t.sort(e);var i=function(e,r){var o,a,s=r-e;if(0==s)return null;if(1==s)return o=t[e],a=n?n(o):o,new Wt(a,o.node,Wt.BLACK,null,null);var u=parseInt(s/2,10)+e,c=i(e,u),l=i(u+1,r);return o=t[u],a=n?n(o):o,new Wt(a,o.node,Wt.BLACK,c,l)},o=new Kt(t.length),a=function(e){for(var r=null,o=null,a=t.length,s=function(e,r){var o=a-e,s=a;a-=e;var c=i(o+1,s),l=t[o],h=n?n(l):l;u(new Wt(h,l.node,r,null,c))},u=function(t){r?(r.left=t,r=t):(o=t,r=t)},c=0;c<e.count;++c){var l=e.nextBitIsOne(),h=Math.pow(2,e.count-(c+1));l?s(h,Wt.BLACK):(s(h,Wt.BLACK),s(h,Wt.RED))}return o}(o);return new qt(r||e,a)},zt={},Qt=function(){function t(t,e){this.indexes_=t,this.indexSet_=e}return Object.defineProperty(t,"Default",{get:function(){return g.assert(zt&&Ut,"ChildrenNode.ts has not been loaded"),v=v||new t({".priority":zt},{".priority":Ut})},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var e=g.safeGet(this.indexes_,t);if(!e)throw new Error("No index defined for "+t);return e===zt?null:e},t.prototype.hasIndex=function(t){return g.contains(this.indexSet_,t.toString())},t.prototype.addIndex=function(e,n){g.assert(e!==xt,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r=[],i=!1,o=n.getIterator(Pt.Wrap),a=o.getNext();a;)i=i||e.isDefinedOn(a.node),r.push(a),a=o.getNext();var s;s=i?Gt(r,e.getCompare()):zt;var u=e.toString(),c=g.clone(this.indexSet_);c[u]=e;var l=g.clone(this.indexes_);return l[u]=s,new t(l,c)},t.prototype.addToIndexes=function(e,n){var r=this;return new t(g.map(this.indexes_,function(t,i){var o=g.safeGet(r.indexSet_,i);if(g.assert(o,"Missing index implementation for "+i),t===zt){if(o.isDefinedOn(e.node)){for(var a=[],s=n.getIterator(Pt.Wrap),u=s.getNext();u;)u.name!=e.name&&a.push(u),u=s.getNext();return a.push(e),Gt(a,o.getCompare())}return zt}var c=n.get(e.name),l=t;return c&&(l=l.remove(new Pt(e.name,c))),l.insert(e,e.node)}),this.indexSet_)},t.prototype.removeFromIndexes=function(e,n){return new t(g.map(this.indexes_,function(t){if(t===zt)return t;var r=n.get(e.name);return r?t.remove(new Pt(e.name,r)):t}),this.indexSet_)},t}(),Yt=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Lt(this.priorityNode_),this.children_.isEmpty()&&g.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return y||(y=new t(new qt(s),null,Qt.Default))},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||y},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?y:e},t.prototype.getChild=function(t){var e=t.getFront();return null===e?this:this.getImmediateChild(e).getChild(t.popFront())},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(g.assert(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var r=new Pt(e,n),i=void 0,o=void 0,a=void 0;return n.isEmpty()?(i=this.children_.remove(e),o=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),o=this.indexMap_.addToIndexes(r,this.children_)),a=i.isEmpty()?y:this.priorityNode_,new t(i,a,o)},t.prototype.updateChild=function(t,e){var n=t.getFront();if(null===n)return e;g.assert(".priority"!==t.getFront()||1===t.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(t.popFront(),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(Ut,function(a,s){n[a]=s.val(e),r++,o&&t.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1}),!e&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+Ft(this.getPriority().val())+":"),this.forEachChild(Ut,function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)}),this.lazyHash_=""===t?"":A(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new Pt(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new Pt(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new Pt(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal(function(t){return e(t.name,t.node)}):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,function(t){return t});for(var r=this.children_.getIteratorFrom(t.name,Pt.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,function(t){return t});for(var r=this.children_.getReverseIteratorFrom(t.name,Pt.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===$t?-1:0},t.prototype.withIndex=function(e){if(e===xt||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===xt||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(Ut),r=e.getIterator(Ut),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.resolveIndex_=function(t){return t===xt?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}(),Xt=function(t){function e(){return t.call(this,new qt(s),Yt.EMPTY_NODE,Qt.Default)||this}return m.__extends(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return Yt.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(Yt),$t=new Xt;Object.defineProperties(Pt,{MIN:{value:new Pt(W,Yt.EMPTY_NODE)},MAX:{value:new Pt(B,$t)}}),Dt.__EMPTY_NODE=Yt.EMPTY_NODE,jt.__childrenNodeConstructor=Yt,function(t){h=t}($t),function(t){d=t}($t);var Jt=!0;!function(t){p=t}(u);var Zt,te,ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?q(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return Pt.MIN},e.prototype.maxPost=function(){return Pt.MAX},e.prototype.makePost=function(t,e){var n=u(t);return new Pt(e,n)},e.prototype.toString=function(){return".value"},e}(kt),ne=new ee,re=function(t){function e(e){var n=t.call(this)||this;return n.indexPath_=e,g.assert(!e.isEmpty()&&".priority"!==e.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return m.__extends(e,t),e.prototype.extractChild=function(t){return t.getChild(this.indexPath_)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.indexPath_).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?q(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=u(t),r=Yt.EMPTY_NODE.updateChild(this.indexPath_,n);return new Pt(e,r)},e.prototype.maxPost=function(){var t=Yt.EMPTY_NODE.updateChild(this.indexPath_,$t);return new Pt(B,t)},e.prototype.toString=function(){return this.indexPath_.slice().join("/")},e}(kt),ie=function(){function t(t,e,n){this.node_=t,this.ref_=e,this.index_=n}return t.prototype.val=function(){return g.validateArgCount("DataSnapshot.val",0,0,arguments.length),this.node_.val()},t.prototype.exportVal=function(){return g.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},t.prototype.toJSON=function(){return g.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return g.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},t.prototype.child=function(e){g.validateArgCount("DataSnapshot.child",0,1,arguments.length),e=String(e),St("DataSnapshot.child",1,e,!1);var n=new it(e),r=this.ref_.child(n);return new t(this.node_.getChild(n),r,Ut)},t.prototype.hasChild=function(t){g.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length),St("DataSnapshot.hasChild",1,t,!1);var e=new it(t);return!this.node_.getChild(e).isEmpty()},t.prototype.getPriority=function(){return g.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},t.prototype.forEach=function(e){var n=this;return g.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),g.validateCallback("DataSnapshot.forEach",1,e,!1),!this.node_.isLeafNode()&&!!this.node_.forEachChild(this.index_,function(r,i){return e(new t(i,n.ref_.child(r),Ut))})},t.prototype.hasChildren=function(){return g.validateArgCount("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.ref_.getKey()},enumerable:!0,configurable:!0}),t.prototype.numChildren=function(){return g.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},t.prototype.getRef=function(){return g.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),oe=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+g.stringify(this.snapshot.exportVal())},t}(),ae=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path.toString()+":cancel"},t}(),se=function(){function t(t,e,n){this.callback_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new oe("value",this,new ie(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){g.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callback_;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new ae(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.callback_||!this.callback_||e.callback_===this.callback_&&e.context_===this.context_)},t.prototype.hasAnyCallback=function(){return null!==this.callback_},t}(),ue=function(){function t(t,e,n){this.callbacks_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return e="children_removed"===e?"child_removed":e,g.contains(this.callbacks_,e)},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new ae(this,t,e):null},t.prototype.createEvent=function(t,e){g.assert(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),r=e.getQueryParams().getIndex();return new oe(t.type,this,new ie(t.snapshotNode,n,r),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){g.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callbacks_[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){if(e instanceof t){if(!this.callbacks_||!e.callbacks_)return!0;if(this.context_===e.context_){var n=g.getCount(e.callbacks_);if(n===g.getCount(this.callbacks_)){if(1===n){var r=g.getAnyKey(e.callbacks_),i=g.getAnyKey(this.callbacks_);return!(i!==r||e.callbacks_[r]&&this.callbacks_[i]&&e.callbacks_[r]!==this.callbacks_[i])}return g.every(this.callbacks_,function(t,n){return e.callbacks_[t]===n})}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.callbacks_},t}(),ce=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return g.assert(Zt,"Reference.ts has not been loaded"),Zt},set:function(t){Zt=t},enumerable:!0,configurable:!0}),t.validateQueryEndpoints_=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===xt){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!=W)throw new Error(r);if("string"!=typeof e)throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!=B)throw new Error(r);if("string"!=typeof n)throw new Error(i)}}else if(t.getIndex()===Ut){if(null!=e&&!vt(e)||null!=n&&!vt(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(g.assert(t.getIndex()instanceof re||t.getIndex()===ne,"unknown index type."),null!=e&&"object"==typeof e||null!=n&&"object"==typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},t.validateLimit_=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.validateNoPreviousOrderByCall_=function(t){if(!0===this.orderByCalled_)throw new Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.queryParams_},t.prototype.getRef=function(){return g.validateArgCount("Query.ref",0,0,arguments.length),new t.__referenceConstructor(this.repo,this.path)},t.prototype.on=function(e,n,r,i){g.validateArgCount("Query.on",2,4,arguments.length),wt("Query.on",1,e,!1),g.validateCallback("Query.on",2,n,!1);var o=t.getCancelAndContextArgs_("Query.on",r,i);if("value"===e)this.onValueEvent(n,o.cancel,o.context);else{var a={};a[e]=n,this.onChildEvent(a,o.cancel,o.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new se(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new ue(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){g.validateArgCount("Query.off",0,3,arguments.length),wt("Query.off",1,t,!0),g.validateCallback("Query.off",2,e,!0),g.validateContextObject("Query.off",3,n,!0);var r=null,i=null;if("value"===t){r=new se(e||null,null,n||null)}else t&&(e&&(i={},i[t]=e),r=new ue(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},t.prototype.once=function(e,n,r,i){var o=this;g.validateArgCount("Query.once",1,4,arguments.length),wt("Query.once",1,e,!1),g.validateCallback("Query.once",2,n,!0);var a=t.getCancelAndContextArgs_("Query.once",r,i),s=!0,u=new g.Deferred;u.promise.catch(function(){});var c=function(t){s&&(s=!1,o.off(e,c),n&&n.bind(a.context)(t),u.resolve(t))};return this.on(e,c,function(t){o.off(e,c),a.cancel&&a.cancel.bind(a.context)(t),u.reject(t)}),u.promise},t.prototype.limitToFirst=function(e){if(g.validateArgCount("Query.limitToFirst",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToFirst(e),this.orderByCalled_)},t.prototype.limitToLast=function(e){if(g.validateArgCount("Query.limitToLast",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToLast(e),this.orderByCalled_)},t.prototype.orderByChild=function(e){if(g.validateArgCount("Query.orderByChild",1,1,arguments.length),"$key"===e)throw new Error('Query.orderByChild: "$key" is invalid.  Use Query.orderByKey() instead.');if("$priority"===e)throw new Error('Query.orderByChild: "$priority" is invalid.  Use Query.orderByPriority() instead.');if("$value"===e)throw new Error('Query.orderByChild: "$value" is invalid.  Use Query.orderByValue() instead.');St("Query.orderByChild",1,e,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new it(e);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path.  Use Query.orderByValue() instead.");var r=new re(n),i=this.queryParams_.orderBy(r);return t.validateQueryEndpoints_(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){g.validateArgCount("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var e=this.queryParams_.orderBy(xt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){g.validateArgCount("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var e=this.queryParams_.orderBy(Ut);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){g.validateArgCount("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var e=this.queryParams_.orderBy(ne);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),g.validateArgCount("Query.startAt",0,2,arguments.length),yt("Query.startAt",1,e,this.path,!0),Et("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===e&&(e=null,n=null),new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),g.validateArgCount("Query.endAt",0,2,arguments.length),yt("Query.endAt",1,e,this.path,!0),Et("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.equalTo=function(t,e){if(g.validateArgCount("Query.equalTo",1,2,arguments.length),yt("Query.equalTo",1,t,this.path,!1),Et("Query.equalTo",2,e,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return g.validateArgCount("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},t.prototype.toJSON=function(){return g.validateArgCount("Query.toJSON",0,1,arguments.length),this.toString()},t.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=G(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(g.validateArgCount("Query.isEqual",1,1,arguments.length),!(e instanceof t)){throw new Error("Query.isEqual failed: First argument must be an instance of firebase.database.Query.")}var n=this.repo===e.repo,r=this.path.equals(e.path),i=this.queryIdentifier()===e.queryIdentifier();return n&&r&&i},t.getCancelAndContextArgs_=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,g.validateCallback(t,3,r.cancel,!0),r.context=n,g.validateContextObject(t,4,r.context,!0);else if(e)if("object"==typeof e&&null!==e)r.context=e;else{if("function"!=typeof e)throw new Error(g.errorPrefix(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}(),le=function(){function t(){this.set={}}return t.prototype.add=function(t,e){this.set[t]=null===e||e},t.prototype.contains=function(t){return g.contains(this.set,t)},t.prototype.get=function(t){return this.contains(t)?this.set[t]:void 0},t.prototype.remove=function(t){delete this.set[t]},t.prototype.clear=function(){this.set={}},t.prototype.isEmpty=function(){return g.isEmpty(this.set)},t.prototype.count=function(){return g.getCount(this.set)},t.prototype.each=function(t){g.forEach(this.set,function(e,n){return t(e,n)})},t.prototype.keys=function(){var t=[];return g.forEach(this.set,function(e){t.push(e)}),t},t}(),he=function(){function t(){this.value_=null,this.children_=null}return t.prototype.find=function(t){if(null!=this.value_)return this.value_.getChild(t);if(t.isEmpty()||null==this.children_)return null;var e=t.getFront();if(t=t.popFront(),this.children_.contains(e)){return this.children_.get(e).find(t)}return null},t.prototype.remember=function(e,n){if(e.isEmpty())this.value_=n,this.children_=null;else if(null!==this.value_)this.value_=this.value_.updateChild(e,n);else{null==this.children_&&(this.children_=new le);var r=e.getFront();this.children_.contains(r)||this.children_.add(r,new t);var i=this.children_.get(r);e=e.popFront(),i.remember(e,n)}},t.prototype.forget=function(t){if(t.isEmpty())return this.value_=null,this.children_=null,!0;if(null!==this.value_){if(this.value_.isLeafNode())return!1;var e=this.value_;this.value_=null;var n=this;return e.forEachChild(Ut,function(t,e){n.remember(new it(t),e)}),this.forget(t)}if(null!==this.children_){var r=t.getFront();if(t=t.popFront(),this.children_.contains(r)){this.children_.get(r).forget(t)&&this.children_.remove(r)}return!!this.children_.isEmpty()&&(this.children_=null,!0)}return!0},t.prototype.forEachTree=function(t,e){null!==this.value_?e(t,this.value_):this.forEachChild(function(n,r){var i=new it(t.toString()+"/"+n);r.forEachTree(i,e)})},t.prototype.forEachChild=function(t){null!==this.children_&&this.children_.each(function(e,n){t(e,n)})},t}(),fe=function(t){return t=t||{},t.timestamp=t.timestamp||(new Date).getTime(),t},pe=function(t,e){return t&&"object"==typeof t?(g.assert(".sv"in t,"Unexpected leaf node or priority contents"),e[t[".sv"]]):t},de=function(t,e){var n=new he;return t.forEachTree(new it(""),function(t,r){n.remember(t,ve(r,e))}),n},ve=function(t,e){var n,r=t.getPriority().val(),i=pe(r,e);if(t.isLeafNode()){var o=t,a=pe(o.getValue(),e);return a!==o.getValue()||i!==o.getPriority().val()?new jt(a,u(i)):t}var s=t;return n=s,i!==s.getPriority().val()&&(n=n.updatePriority(new jt(i))),s.forEachChild(Ut,function(t,r){var i=ve(r,e);i!==r&&(n=n.updateImmediateChild(t,i))}),n};!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(te||(te={}));var ye,ge,_e=function(){function t(t,e,n,r){this.fromUser=t,this.fromServer=e,this.queryId=n,this.tagged=r,g.assert(!r||e,"Tagged queries must be from server.")}return t.User=new t(!0,!1,null,!1),t.Server=new t(!1,!0,null,!1),t.forServerTaggedQuery=function(e){return new t(!1,!0,e,!0)},t}(),me=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=te.ACK_USER_WRITE,this.source=_e.User}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return g.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new it(e));return new t(it.Empty,n,this.revert)}return g.assert(this.path.getFront()===e,"operationForChild called for unrelated child."),new t(this.path.popFront(),this.affectedTree,this.revert)},t}(),be=function(){return ye||(ye=new qt(H)),ye},we=function(){function t(t,e){void 0===e&&(e=be()),this.value=t,this.children=e}return t.fromObject=function(e){var n=t.Empty;return g.forEach(e,function(t,e){n=n.set(new it(t),e)}),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:it.Empty,value:this.value};if(t.isEmpty())return null;var n=t.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(t.popFront(),e);if(null!=i){return{path:new it(n).child(i.path),value:i.value}}return null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,function(){return!0})},t.prototype.subtree=function(e){if(e.isEmpty())return this;var n=e.getFront(),r=this.children.get(n);return null!==r?r.subtree(e.popFront()):t.Empty},t.prototype.set=function(e,n){if(e.isEmpty())return new t(n,this.children);var r=e.getFront(),i=this.children.get(r)||t.Empty,o=i.set(e.popFront(),n),a=this.children.insert(r,o);return new t(this.value,a)},t.prototype.remove=function(e){if(e.isEmpty())return this.children.isEmpty()?t.Empty:new t(null,this.children);var n=e.getFront(),r=this.children.get(n);if(r){var i=r.remove(e.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?t.Empty:new t(this.value,o)}return this},t.prototype.get=function(t){if(t.isEmpty())return this.value;var e=t.getFront(),n=this.children.get(e);return n?n.get(t.popFront()):null},t.prototype.setTree=function(e,n){if(e.isEmpty())return n;var r=e.getFront(),i=this.children.get(r)||t.Empty,o=i.setTree(e.popFront(),n),a=void 0;return a=o.isEmpty()?this.children.remove(r):this.children.insert(r,o),new t(this.value,a)},t.prototype.fold=function(t){return this.fold_(it.Empty,t)},t.prototype.fold_=function(t,e){var n={};return this.children.inorderTraversal(function(r,i){n[r]=i.fold_(t.child(r),e)}),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.findOnPath_(t,it.Empty,e)},t.prototype.findOnPath_=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if(t.isEmpty())return null;var i=t.getFront(),o=this.children.get(i);return o?o.findOnPath_(t.popFront(),e.child(i),n):null},t.prototype.foreachOnPath=function(t,e){return this.foreachOnPath_(t,it.Empty,e)},t.prototype.foreachOnPath_=function(e,n,r){if(e.isEmpty())return this;this.value&&r(n,this.value);var i=e.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(e.popFront(),n.child(i),r):t.Empty},t.prototype.foreach=function(t){this.foreach_(it.Empty,t)},t.prototype.foreach_=function(t,e){this.children.inorderTraversal(function(n,r){r.foreach_(t.child(n),e)}),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal(function(e,n){n.value&&t(e,n.value)})},t.Empty=new t(null),t}(),Ee=function(){function t(t,e){this.source=t,this.path=e,this.type=te.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,it.Empty):new t(this.source,this.path.popFront())},t}(),Se=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=te.OVERWRITE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,it.Empty,this.snap.getImmediateChild(e)):new t(this.source,this.path.popFront(),this.snap)},t}(),Te=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=te.MERGE}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){var n=this.children.subtree(new it(e));return n.isEmpty()?null:n.value?new Se(this.source,it.Empty,n.value):new t(this.source,it.Empty,n)}return g.assert(this.path.getFront()===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,this.path.popFront(),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},t}(),Ce=function(){function t(t,e,n){this.node_=t,this.fullyInitialized_=e,this.filtered_=n}return t.prototype.isFullyInitialized=function(){return this.fullyInitialized_},t.prototype.isFiltered=function(){return this.filtered_},t.prototype.isCompleteForPath=function(t){if(t.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var e=t.getFront();return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)},t.prototype.getNode=function(){return this.node_},t}(),Ie=function(){function t(t,e){this.eventCache_=t,this.serverCache_=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new Ce(e,n,r),this.serverCache_)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.eventCache_,new Ce(e,n,r))},t.prototype.getEventCache=function(){return this.eventCache_},t.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},t.prototype.getServerCache=function(){return this.serverCache_},t.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},t.Empty=new t(new Ce(Yt.EMPTY_NODE,!1,!1),new Ce(Yt.EMPTY_NODE,!1,!1)),t}(),Oe=function(){function t(t,e,n,r,i){this.type=t,this.snapshotNode=e,this.childName=n,this.oldSnap=r,this.prevName=i}return t.valueChange=function(e){return new t(t.VALUE,e)},t.childAddedChange=function(e,n){return new t(t.CHILD_ADDED,n,e)},t.childRemovedChange=function(e,n){return new t(t.CHILD_REMOVED,n,e)},t.childChangedChange=function(e,n,r){return new t(t.CHILD_CHANGED,n,e,r)},t.childMovedChange=function(e,n){return new t(t.CHILD_MOVED,n,e)},t.CHILD_ADDED="child_added",t.CHILD_REMOVED="child_removed",t.CHILD_CHANGED="child_changed",t.CHILD_MOVED="child_moved",t.VALUE="value",t}(),Ae=function(){function t(t){this.index_=t}return t.prototype.updateChild=function(t,e,n,r,i,o){g.assert(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");var a=t.getImmediateChild(e);return a.getChild(r).equals(n.getChild(r))&&a.isEmpty()==n.isEmpty()?t:(null!=o&&(n.isEmpty()?t.hasChild(e)?o.trackChildChange(Oe.childRemovedChange(e,a)):g.assert(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):a.isEmpty()?o.trackChildChange(Oe.childAddedChange(e,n)):o.trackChildChange(Oe.childChangedChange(e,n,a))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.index_))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(Ut,function(t,r){e.hasChild(t)||n.trackChildChange(Oe.childRemovedChange(t,r))}),e.isLeafNode()||e.forEachChild(Ut,function(e,r){if(t.hasChild(e)){var i=t.getImmediateChild(e);i.equals(r)||n.trackChildChange(Oe.childChangedChange(e,r,i))}else n.trackChildChange(Oe.childAddedChange(e,r))})),e.withIndex(this.index_)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?Yt.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.index_},t}(),Re=function(){function t(){this.changeMap_={}}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;g.assert(e==Oe.CHILD_ADDED||e==Oe.CHILD_CHANGED||e==Oe.CHILD_REMOVED,"Only child changes supported for tracking"),g.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var r=g.safeGet(this.changeMap_,n);if(r){var i=r.type;if(e==Oe.CHILD_ADDED&&i==Oe.CHILD_REMOVED)this.changeMap_[n]=Oe.childChangedChange(n,t.snapshotNode,r.snapshotNode);else if(e==Oe.CHILD_REMOVED&&i==Oe.CHILD_ADDED)delete this.changeMap_[n];else if(e==Oe.CHILD_REMOVED&&i==Oe.CHILD_CHANGED)this.changeMap_[n]=Oe.childRemovedChange(n,r.oldSnap);else if(e==Oe.CHILD_CHANGED&&i==Oe.CHILD_ADDED)this.changeMap_[n]=Oe.childAddedChange(n,t.snapshotNode);else{if(e!=Oe.CHILD_CHANGED||i!=Oe.CHILD_CHANGED)throw g.assertionError("Illegal combination of changes: "+t+" occurred after "+r);this.changeMap_[n]=Oe.childChangedChange(n,t.snapshotNode,r.oldSnap)}}else this.changeMap_[n]=t},t.prototype.getChanges=function(){return g.getValues(this.changeMap_)},t}(),Ne=function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}(),Pe=new Ne,ke=function(){function t(t,e,n){void 0===n&&(n=null),this.writes_=t,this.viewCache_=e,this.optCompleteServerCache_=n}return t.prototype.getCompleteChild=function(t){var e=this.viewCache_.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.optCompleteServerCache_?new Ce(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}(),De=function(){function t(t,e){this.viewCache=t,this.changes=e}return t}(),xe=function(){function t(t){this.filter_=t}return t.prototype.assertIndexed=function(t){g.assert(t.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),g.assert(t.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,r,i){var o,a,s=new Re;if(n.type===te.OVERWRITE){var u=n;u.source.fromUser?o=this.applyUserOverwrite_(e,u.path,u.snap,r,i,s):(g.assert(u.source.fromServer,"Unknown source."),a=u.source.tagged||e.getServerCache().isFiltered()&&!u.path.isEmpty(),o=this.applyServerOverwrite_(e,u.path,u.snap,r,i,a,s))}else if(n.type===te.MERGE){var c=n;c.source.fromUser?o=this.applyUserMerge_(e,c.path,c.children,r,i,s):(g.assert(c.source.fromServer,"Unknown source."),a=c.source.tagged||e.getServerCache().isFiltered(),o=this.applyServerMerge_(e,c.path,c.children,r,i,a,s))}else if(n.type===te.ACK_USER_WRITE){var l=n;o=l.revert?this.revertUserWrite_(e,l.path,r,i,s):this.ackUserWrite_(e,l.path,l.affectedTree,r,i,s)}else{if(n.type!==te.LISTEN_COMPLETE)throw g.assertionError("Unknown operation type: "+n.type);o=this.listenComplete_(e,n.path,r,s)}var h=s.getChanges();return t.maybeAddValueEvent_(e,o,h),new De(o,h)},t.maybeAddValueEvent_=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>0||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(Oe.valueChange(e.getCompleteEventSnap()))}},t.prototype.generateEventCacheAfterServerEvent_=function(t,e,n,r,i){var o=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var a=void 0,s=void 0;if(e.isEmpty())if(g.assert(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var u=t.getCompleteServerSnap(),c=u instanceof Yt?u:Yt.EMPTY_NODE,l=n.calcCompleteEventChildren(c);a=this.filter_.updateFullNode(t.getEventCache().getNode(),l,i)}else{var h=n.calcCompleteEventCache(t.getCompleteServerSnap());a=this.filter_.updateFullNode(t.getEventCache().getNode(),h,i)}else{var f=e.getFront();if(".priority"==f){g.assert(1==e.getLength(),"Can't have a priority with additional path components");var p=o.getNode();s=t.getServerCache().getNode();var d=n.calcEventCacheAfterServerOverwrite(e,p,s);a=null!=d?this.filter_.updatePriority(p,d):o.getNode()}else{var v=e.popFront(),y=void 0;if(o.isCompleteForChild(f)){s=t.getServerCache().getNode();var _=n.calcEventCacheAfterServerOverwrite(e,o.getNode(),s);y=null!=_?o.getNode().getImmediateChild(f).updateChild(v,_):o.getNode().getImmediateChild(f)}else y=n.calcCompleteChild(f,t.getServerCache());a=null!=y?this.filter_.updateChild(o.getNode(),f,y,v,r,i):o.getNode()}}return t.updateEventSnap(a,o.isFullyInitialized()||e.isEmpty(),this.filter_.filtersNodes())},t.prototype.applyServerOverwrite_=function(t,e,n,r,i,o,a){var s,u=t.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(e.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(e,n);s=c.updateFullNode(u.getNode(),l,null)}else{var h=e.getFront();if(!u.isCompleteForPath(e)&&e.getLength()>1)return t;var f=e.popFront(),p=u.getNode().getImmediateChild(h),d=p.updateChild(f,n);s=".priority"==h?c.updatePriority(u.getNode(),d):c.updateChild(u.getNode(),h,d,f,Pe,null)}var v=t.updateServerSnap(s,u.isFullyInitialized()||e.isEmpty(),c.filtersNodes()),y=new ke(r,v,i);return this.generateEventCacheAfterServerEvent_(v,e,r,y,a)},t.prototype.applyUserOverwrite_=function(t,e,n,r,i,o){var a,s,u=t.getEventCache(),c=new ke(r,t,i);if(e.isEmpty())s=this.filter_.updateFullNode(t.getEventCache().getNode(),n,o),a=t.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=e.getFront();if(".priority"===l)s=this.filter_.updatePriority(t.getEventCache().getNode(),n),a=t.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var h=e.popFront(),f=u.getNode().getImmediateChild(l),p=void 0;if(h.isEmpty())p=n;else{var d=c.getCompleteChild(l);p=null!=d?".priority"===h.getBack()&&d.getChild(h.parent()).isEmpty()?d:d.updateChild(h,n):Yt.EMPTY_NODE}if(f.equals(p))a=t;else{var v=this.filter_.updateChild(u.getNode(),l,p,h,c,o);a=t.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},t.cacheHasChild_=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.applyUserMerge_=function(e,n,r,i,o,a){var s=this,u=e;return r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))}),u},t.prototype.applyMerge_=function(t,e){return e.foreach(function(e,n){t=t.updateChild(e,n)}),t},t.prototype.applyServerMerge_=function(t,e,n,r,i,o,a){var s=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,c=t;u=e.isEmpty()?n:we.Empty.setTree(e,n);var l=t.getServerCache().getNode();return u.children.inorderTraversal(function(e,n){if(l.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),h=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new it(e),h,r,i,o,a)}}),u.children.inorderTraversal(function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!l.hasChild(e)&&!u){var h=t.getServerCache().getNode().getImmediateChild(e),f=s.applyMerge_(h,n);c=s.applyServerOverwrite_(c,new it(e),f,r,i,o,a)}}),c},t.prototype.ackUserWrite_=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var a=t.getServerCache().isFiltered(),s=t.getServerCache();if(null!=n.value){if(e.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(e))return this.applyServerOverwrite_(t,e,s.getNode().getChild(e),r,i,a,o);if(e.isEmpty()){var u=we.Empty;return s.getNode().forEachChild(xt,function(t,e){u=u.set(new it(t),e)}),this.applyServerMerge_(t,e,u,r,i,a,o)}return t}var c=we.Empty;return n.foreach(function(t,n){var r=e.child(t);s.isCompleteForPath(r)&&(c=c.set(t,s.getNode().getChild(r)))}),this.applyServerMerge_(t,e,c,r,i,a,o)},t.prototype.listenComplete_=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||e.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,e,n,Pe,r)},t.prototype.revertUserWrite_=function(t,e,n,r,i){var o;if(null!=n.shadowingWrite(e))return t;var a=new ke(n,t,r),s=t.getEventCache().getNode(),u=void 0;if(e.isEmpty()||".priority"===e.getFront()){var c=void 0;if(t.getServerCache().isFullyInitialized())c=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var l=t.getServerCache().getNode();g.assert(l instanceof Yt,"serverChildren would be complete if leaf node"),c=n.calcCompleteEventChildren(l)}c=c,u=this.filter_.updateFullNode(s,c,i)}else{var h=e.getFront(),f=n.calcCompleteChild(h,t.getServerCache());null==f&&t.getServerCache().isCompleteForChild(h)&&(f=s.getImmediateChild(h)),u=null!=f?this.filter_.updateChild(s,h,f,e.popFront(),a,i):t.getEventCache().getNode().hasChild(h)?this.filter_.updateChild(s,h,Yt.EMPTY_NODE,e.popFront(),a,i):s,u.isEmpty()&&t.getServerCache().isFullyInitialized()&&(o=n.calcCompleteEventCache(t.getCompleteServerSnap()),o.isLeafNode()&&(u=this.filter_.updateFullNode(u,o,i)))}return o=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(it.Empty),t.updateEventSnap(u,o,this.filter_.filtersNodes())},t}(),Fe=function(){function t(t){this.query_=t,this.index_=this.query_.getQueryParams().getIndex()}return t.prototype.generateEventsForChanges=function(t,e,n){var r=this,i=[],o=[];return t.forEach(function(t){t.type===Oe.CHILD_CHANGED&&r.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push(Oe.childMovedChange(t.childName,t.snapshotNode))}),this.generateEventsForType_(i,Oe.CHILD_REMOVED,t,n,e),this.generateEventsForType_(i,Oe.CHILD_ADDED,t,n,e),this.generateEventsForType_(i,Oe.CHILD_MOVED,o,n,e),this.generateEventsForType_(i,Oe.CHILD_CHANGED,t,n,e),this.generateEventsForType_(i,Oe.VALUE,t,n,e),i},t.prototype.generateEventsForType_=function(t,e,n,r,i){var o=this,a=n.filter(function(t){return t.type===e});a.sort(this.compareChanges_.bind(this)),a.forEach(function(e){var n=o.materializeSingleChange_(e,i);r.forEach(function(r){r.respondsTo(e.type)&&t.push(r.createEvent(n,o.query_))})})},t.prototype.materializeSingleChange_=function(t,e){return"value"===t.type||"child_removed"===t.type?t:(t.prevName=e.getPredecessorChildName(t.childName,t.snapshotNode,this.index_),t)},t.prototype.compareChanges_=function(t,e){if(null==t.childName||null==e.childName)throw g.assertionError("Should only compare child_ events.");var n=new Pt(t.childName,t.snapshotNode),r=new Pt(e.childName,e.snapshotNode);return this.index_.compare(n,r)},t}(),Le=function(){function t(t,e){this.query_=t,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new Ae(n.getIndex()),i=n.getNodeFilter();this.processor_=new xe(i);var o=e.getServerCache(),a=e.getEventCache(),s=r.updateFullNode(Yt.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Yt.EMPTY_NODE,a.getNode(),null),c=new Ce(s,o.isFullyInitialized(),r.filtersNodes()),l=new Ce(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new Ie(l,c),this.eventGenerator_=new Fe(this.query_)}return t.prototype.getQuery=function(){return this.query_},t.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},t.prototype.getCompleteServerCache=function(t){var e=this.viewCache_.getCompleteServerSnap();return e&&(this.query_.getQueryParams().loadsAllData()||!t.isEmpty()&&!e.getImmediateChild(t.getFront()).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},t.prototype.addEventRegistration=function(t){this.eventRegistrations_.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){g.assert(null==t,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach(function(t){e=e;var i=t.createCancelEvent(e,r);i&&n.push(i)})}if(t){for(var i=[],o=0;o<this.eventRegistrations_.length;++o){var a=this.eventRegistrations_[o];if(a.matches(t)){if(t.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(o+1));break}}else i.push(a)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},t.prototype.applyOperation=function(t,e,n){t.type===te.MERGE&&null!==t.source.queryId&&(g.assert(this.viewCache_.getCompleteServerSnap(),"We should always have a full cache before handling merges"),g.assert(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,t,e,n);return this.processor_.assertIndexed(i.viewCache),g.assert(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},t.prototype.getInitialEvents=function(t){var e=this.viewCache_.getEventCache(),n=[];if(!e.getNode().isLeafNode()){e.getNode().forEachChild(Ut,function(t,e){n.push(Oe.childAddedChange(t,e))})}return e.isFullyInitialized()&&n.push(Oe.valueChange(e.getNode())),this.generateEventsForChanges_(n,e.getNode(),t)},t.prototype.generateEventsForChanges_=function(t,e,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(t,e,r)},t}(),je=function(){function t(){this.views_={}}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return g.assert(ge,"Reference.ts has not been loaded"),ge},set:function(t){g.assert(!ge,"__referenceConstructor has already been defined"),ge=t},enumerable:!0,configurable:!0}),t.prototype.isEmpty=function(){return g.isEmpty(this.views_)},t.prototype.applyOperation=function(t,e,n){var r=t.source.queryId;if(null!==r){var i=g.safeGet(this.views_,r);return g.assert(null!=i,"SyncTree gave us an op for an invalid query."),i.applyOperation(t,e,n)}var o=[];return g.forEach(this.views_,function(r,i){o=o.concat(i.applyOperation(t,e,n))}),o},t.prototype.addEventRegistration=function(t,e,n,r,i){var o=t.queryIdentifier(),a=g.safeGet(this.views_,o);if(!a){var s=n.calcCompleteEventCache(i?r:null),u=!1;s?u=!0:r instanceof Yt?(s=n.calcCompleteEventChildren(r),u=!1):(s=Yt.EMPTY_NODE,u=!1);var c=new Ie(new Ce(s,u,!1),new Ce(r,i,!1));a=new Le(t,c),this.views_[o]=a}return a.addEventRegistration(e),a.getInitialEvents(e)},t.prototype.removeEventRegistration=function(e,n,r){var i=e.queryIdentifier(),o=[],a=[],s=this.hasCompleteView();if("default"===i){var u=this;g.forEach(this.views_,function(t,e){a=a.concat(e.removeEventRegistration(n,r)),e.isEmpty()&&(delete u.views_[t],e.getQuery().getQueryParams().loadsAllData()||o.push(e.getQuery()))})}else{var c=g.safeGet(this.views_,i);c&&(a=a.concat(c.removeEventRegistration(n,r)),c.isEmpty()&&(delete this.views_[i],c.getQuery().getQueryParams().loadsAllData()||o.push(c.getQuery())))}return s&&!this.hasCompleteView()&&o.push(new t.__referenceConstructor(e.repo,e.path)),{removed:o,events:a}},t.prototype.getQueryViews=function(){var t=this;return Object.keys(this.views_).map(function(e){return t.views_[e]}).filter(function(t){return!t.getQuery().getQueryParams().loadsAllData()})},t.prototype.getCompleteServerCache=function(t){var e=null;return g.forEach(this.views_,function(n,r){e=e||r.getCompleteServerCache(t)}),e},t.prototype.viewForQuery=function(t){if(t.getQueryParams().loadsAllData())return this.getCompleteView();var e=t.queryIdentifier();return g.safeGet(this.views_,e)},t.prototype.viewExistsForQuery=function(t){return null!=this.viewForQuery(t)},t.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},t.prototype.getCompleteView=function(){return g.findValue(this.views_,function(t){return t.getQuery().getQueryParams().loadsAllData()})||null},t}(),Me=function(){function t(t){this.writeTree_=t}return t.prototype.addWrite=function(e,n){if(e.isEmpty())return new t(new we(n));var r=this.writeTree_.findRootMostValueAndPath(e);if(null!=r){var i=r.path,o=r.value,a=it.relativePath(i,e);return o=o.updateChild(a,n),new t(this.writeTree_.set(i,o))}var s=new we(n);return new t(this.writeTree_.setTree(e,s))},t.prototype.addWrites=function(t,e){var n=this;return g.forEach(e,function(e,r){n=n.addWrite(t.child(e),r)}),n},t.prototype.removeWrite=function(e){return e.isEmpty()?t.Empty:new t(this.writeTree_.setTree(e,we.Empty))},t.prototype.hasCompleteWrite=function(t){return null!=this.getCompleteNode(t)},t.prototype.getCompleteNode=function(t){var e=this.writeTree_.findRootMostValueAndPath(t);return null!=e?this.writeTree_.get(e.path).getChild(it.relativePath(e.path,t)):null},t.prototype.getCompleteChildren=function(){var t=[],e=this.writeTree_.value;return null!=e?e.isLeafNode()||e.forEachChild(Ut,function(e,n){t.push(new Pt(e,n))}):this.writeTree_.children.inorderTraversal(function(e,n){null!=n.value&&t.push(new Pt(e,n.value))}),t},t.prototype.childCompoundWrite=function(e){if(e.isEmpty())return this;var n=this.getCompleteNode(e);return new t(null!=n?new we(n):this.writeTree_.subtree(e))},t.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},t.prototype.apply=function(e){return t.applySubtreeWrite_(it.Empty,this.writeTree_,e)},t.Empty=new t(new we(null)),t.applySubtreeWrite_=function(e,n,r){if(null!=n.value)return r.updateChild(e,n.value);var i=null;return n.children.inorderTraversal(function(n,o){".priority"===n?(g.assert(null!==o.value,"Priority writes must always be leaf nodes"),i=o.value):r=t.applySubtreeWrite_(e.child(n),o,r)}),r.getChild(e).isEmpty()||null===i||(r=r.updateChild(e.child(".priority"),i)),r},t}(),Ue=function(){function t(){this.visibleWrites_=Me.Empty,this.allWrites_=[],this.lastWriteId_=-1}return t.prototype.childWrites=function(t){return new Ve(t,this)},t.prototype.addOverwrite=function(t,e,n,r){g.assert(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(t,e)),this.lastWriteId_=n},t.prototype.addMerge=function(t,e,n){g.assert(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(t,e),this.lastWriteId_=n},t.prototype.getWrite=function(t){for(var e=0;e<this.allWrites_.length;e++){var n=this.allWrites_[e];if(n.writeId===t)return n}return null},t.prototype.removeWrite=function(t){var e=this,n=this.allWrites_.findIndex(function(e){return e.writeId===t});g.assert(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,o=!1,a=this.allWrites_.length-1;i&&a>=0;){var s=this.allWrites_[a];s.visible&&(a>=n&&this.recordContainsPath_(s,r.path)?i=!1:r.path.contains(s.path)&&(o=!0)),a--}if(i){if(o)return this.resetTree_(),!0;if(r.snap)this.visibleWrites_=this.visibleWrites_.removeWrite(r.path);else{var u=r.children;g.forEach(u,function(t){e.visibleWrites_=e.visibleWrites_.removeWrite(r.path.child(t))})}return!0}return!1},t.prototype.getCompleteWriteData=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var o=this.visibleWrites_.childCompoundWrite(e);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(it.Empty)){var a=function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(t.path.contains(e)||e.contains(t.path))},s=t.layerTree_(this.allWrites_,a,e),u=n||Yt.EMPTY_NODE;return s.apply(u)}return null}var c=this.visibleWrites_.getCompleteNode(e);if(null!=c)return c;var l=this.visibleWrites_.childCompoundWrite(e);if(l.isEmpty())return n;if(null!=n||l.hasCompleteWrite(it.Empty)){var u=n||Yt.EMPTY_NODE;return l.apply(u)}return null},t.prototype.calcCompleteEventChildren=function(t,e){var n=Yt.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(t);if(r)return r.isLeafNode()||r.forEachChild(Ut,function(t,e){n=n.updateImmediateChild(t,e)}),n;if(e){var i=this.visibleWrites_.childCompoundWrite(t);return e.forEachChild(Ut,function(t,e){var r=i.childCompoundWrite(new it(t)).apply(e);n=n.updateImmediateChild(t,r)}),i.getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n}return this.visibleWrites_.childCompoundWrite(t).getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){g.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=t.child(e);if(this.visibleWrites_.hasCompleteWrite(i))return null;var o=this.visibleWrites_.childCompoundWrite(i);return o.isEmpty()?r.getChild(e):o.apply(r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=t.child(e),i=this.visibleWrites_.getCompleteNode(r);if(null!=i)return i;if(n.isCompleteForChild(e)){return this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(e))}return null},t.prototype.shadowingWrite=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,o){var a,s=this.visibleWrites_.childCompoundWrite(t),u=s.getCompleteNode(it.Empty);if(null!=u)a=u;else{if(null==e)return[];a=s.apply(e)}if(a=a.withIndex(o),a.isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),h=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),f=h.getNext();f&&c.length<r;)0!==l(f,n)&&c.push(f),f=h.getNext();return c},t.prototype.recordContainsPath_=function(t,e){return t.snap?t.path.contains(e):!!g.findKey(t.children,function(n,r){return t.path.child(r).contains(e)})},t.prototype.resetTree_=function(){this.visibleWrites_=t.layerTree_(this.allWrites_,t.DefaultFilter_,it.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},t.DefaultFilter_=function(t){return t.visible},t.layerTree_=function(t,e,n){for(var r=Me.Empty,i=0;i<t.length;++i){var o=t[i];if(e(o)){var a=o.path,s=void 0;if(o.snap)n.contains(a)?(s=it.relativePath(n,a),r=r.addWrite(s,o.snap)):a.contains(n)&&(s=it.relativePath(a,n),r=r.addWrite(it.Empty,o.snap.getChild(s)));else{if(!o.children)throw g.assertionError("WriteRecord should have .snap or .children");if(n.contains(a))s=it.relativePath(n,a),r=r.addWrites(s,o.children);else if(a.contains(n))if(s=it.relativePath(a,n),s.isEmpty())r=r.addWrites(it.Empty,o.children);else{var u=g.safeGet(o.children,s.getFront());if(u){var c=u.getChild(s.popFront());r=r.addWrite(it.Empty,c)}}}}}return r},t}(),Ve=function(){function t(t,e){this.treePath_=t,this.writeTree_=e}return t.prototype.calcCompleteEventCache=function(t,e,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,t,e,n)},t.prototype.calcCompleteEventChildren=function(t){return this.writeTree_.calcCompleteEventChildren(this.treePath_,t)},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,t,e,n)},t.prototype.shadowingWrite=function(t){return this.writeTree_.shadowingWrite(this.treePath_.child(t))},t.prototype.calcIndexedSlice=function(t,e,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,t,e,n,r,i)},t.prototype.calcCompleteChild=function(t,e){return this.writeTree_.calcCompleteChild(this.treePath_,t,e)},t.prototype.child=function(e){return new t(this.treePath_.child(e),this.writeTree_)},t}(),We=function(){function t(t){this.listenProvider_=t,this.syncPointTree_=we.Empty,this.pendingWriteTree_=new Ue,this.tagToQueryMap_={},this.queryToTagMap_={}}return t.prototype.applyUserOverwrite=function(t,e,n,r){return this.pendingWriteTree_.addOverwrite(t,e,n,r),r?this.applyOperationToSyncPoints_(new Se(_e.User,t,e)):[]},t.prototype.applyUserMerge=function(t,e,n){this.pendingWriteTree_.addMerge(t,e,n);var r=we.fromObject(e);return this.applyOperationToSyncPoints_(new Te(_e.User,t,r))},t.prototype.ackUserWrite=function(t,e){void 0===e&&(e=!1);var n=this.pendingWriteTree_.getWrite(t);if(this.pendingWriteTree_.removeWrite(t)){var r=we.Empty;return null!=n.snap?r=r.set(it.Empty,!0):g.forEach(n.children,function(t,e){r=r.set(new it(t),e)}),this.applyOperationToSyncPoints_(new me(n.path,r,e))}return[]},t.prototype.applyServerOverwrite=function(t,e){return this.applyOperationToSyncPoints_(new Se(_e.Server,t,e))},t.prototype.applyServerMerge=function(t,e){var n=we.fromObject(e);return this.applyOperationToSyncPoints_(new Te(_e.Server,t,n))},t.prototype.applyListenComplete=function(t){return this.applyOperationToSyncPoints_(new Ee(_e.Server,t))},t.prototype.applyTaggedQueryOverwrite=function(e,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=it.relativePath(a,e),c=new Se(_e.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},t.prototype.applyTaggedQueryMerge=function(e,n,r){var i=this.queryKeyForTag_(r);if(i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=it.relativePath(a,e),c=we.fromObject(n),l=new Te(_e.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},t.prototype.applyTaggedListenComplete=function(e,n){var r=this.queryKeyForTag_(n);if(r){var i=t.parseQueryKey_(r),o=i.path,a=i.queryId,s=it.relativePath(o,e),u=new Ee(_e.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},t.prototype.addEventRegistration=function(e,n){var r=e.path,i=null,o=!1;this.syncPointTree_.foreachOnPath(r,function(t,e){var n=it.relativePath(t,r);i=i||e.getCompleteServerCache(n),o=o||e.hasCompleteView()});var a=this.syncPointTree_.get(r);a?(o=o||a.hasCompleteView(),i=i||a.getCompleteServerCache(it.Empty)):(a=new je,this.syncPointTree_=this.syncPointTree_.set(r,a));var s;if(null!=i)s=!0;else{s=!1,i=Yt.EMPTY_NODE;this.syncPointTree_.subtree(r).foreachChild(function(t,e){var n=e.getCompleteServerCache(it.Empty);n&&(i=i.updateImmediateChild(t,n))})}var u=a.viewExistsForQuery(e);if(!u&&!e.getQueryParams().loadsAllData()){var c=t.makeQueryKey_(e);g.assert(!(c in this.queryToTagMap_),"View does not exist, but we have a tag");var l=t.getNextQueryTag_();this.queryToTagMap_[c]=l,this.tagToQueryMap_["_"+l]=c}var h=this.pendingWriteTree_.childWrites(r),f=a.addEventRegistration(e,n,h,i,s);if(!u&&!o){var p=a.viewForQuery(e);f=f.concat(this.setupListener_(e,p))}return f},t.prototype.removeEventRegistration=function(e,n,r){var i=this,o=e.path,a=this.syncPointTree_.get(o),s=[];if(a&&("default"===e.queryIdentifier()||a.viewExistsForQuery(e))){var u=a.removeEventRegistration(e,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex(function(t){return t.getQueryParams().loadsAllData()}),h=this.syncPointTree_.findOnPath(o,function(t,e){return e.hasCompleteView()});if(l&&!h){var f=this.syncPointTree_.subtree(o);if(!f.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(f),d=0;d<p.length;++d){var v=p[d],y=v.getQuery(),g=this.createListenerForView_(v);this.listenProvider_.startListening(t.queryForListening_(y),this.tagForQuery_(y),g.hashFn,g.onComplete)}}if(!h&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(t.queryForListening_(e),null)}else c.forEach(function(e){var n=i.queryToTagMap_[t.makeQueryKey_(e)];i.listenProvider_.stopListening(t.queryForListening_(e),n)});this.removeTags_(c)}return s},t.prototype.calcCompleteEventCache=function(t,e){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(t,function(e,n){var r=it.relativePath(e,t),i=n.getCompleteServerCache(r);if(i)return i});return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.collectDistinctViewsForSubTree_=function(t){return t.fold(function(t,e,n){if(e&&e.hasCompleteView()){return[e.getCompleteView()]}var r=[];return e&&(r=e.getQueryViews()),g.forEach(n,function(t,e){r=r.concat(e)}),r})},t.prototype.removeTags_=function(e){for(var n=0;n<e.length;++n){var r=e[n];if(!r.getQueryParams().loadsAllData()){var i=t.makeQueryKey_(r),o=this.queryToTagMap_[i];delete this.queryToTagMap_[i],delete this.tagToQueryMap_["_"+o]}}},t.queryForListening_=function(t){return t.getQueryParams().loadsAllData()&&!t.getQueryParams().isDefault()?t.getRef():t},t.prototype.setupListener_=function(e,n){var r=e.path,i=this.tagForQuery_(e),o=this.createListenerForView_(n),a=this.listenProvider_.startListening(t.queryForListening_(e),i,o.hashFn,o.onComplete),s=this.syncPointTree_.subtree(r);if(i)g.assert(!s.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var u=s.fold(function(t,e,n){if(!t.isEmpty()&&e&&e.hasCompleteView())return[e.getCompleteView().getQuery()];var r=[];return e&&(r=r.concat(e.getQueryViews().map(function(t){return t.getQuery()}))),g.forEach(n,function(t,e){r=r.concat(e)}),r}),c=0;c<u.length;++c){var l=u[c];this.listenProvider_.stopListening(t.queryForListening_(l),this.tagForQuery_(l))}return a},t.prototype.createListenerForView_=function(t){var e=this,n=t.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(t.getServerCache()||Yt.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?e.applyTaggedListenComplete(n.path,r):e.applyListenComplete(n.path);var i=J(t,n);return e.removeEventRegistration(n,null,i)}}},t.makeQueryKey_=function(t){return t.path.toString()+"$"+t.queryIdentifier()},t.parseQueryKey_=function(t){var e=t.indexOf("$");return g.assert(-1!==e&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new it(t.substr(0,e))}},t.prototype.queryKeyForTag_=function(t){return this.tagToQueryMap_["_"+t]},t.prototype.tagForQuery_=function(e){var n=t.makeQueryKey_(e);return g.safeGet(this.queryToTagMap_,n)},t.getNextQueryTag_=function(){return t.nextQueryTag_++},t.prototype.applyTaggedOperation_=function(t,e){var n=this.syncPointTree_.get(t);g.assert(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(t);return n.applyOperation(e,r,null)},t.prototype.applyOperationToSyncPoints_=function(t){return this.applyOperationHelper_(t,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(it.Empty))},t.prototype.applyOperationHelper_=function(t,e,n,r){if(t.path.isEmpty())return this.applyOperationDescendantsHelper_(t,e,n,r);var i=e.get(it.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(it.Empty));var o=[],a=t.path.getFront(),s=t.operationForChild(a),u=e.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(t,r,n))),o},t.prototype.applyOperationDescendantsHelper_=function(t,e,n,r){var i=this,o=e.get(it.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(it.Empty));var a=[];return e.children.inorderTraversal(function(e,o){var s=n?n.getImmediateChild(e):null,u=r.child(e),c=t.operationForChild(e);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))}),o&&(a=a.concat(o.applyOperation(t,r,n))),a},t.nextQueryTag_=1,t}(),Be=function(){function t(){this.rootNode_=Yt.EMPTY_NODE}return t.prototype.getNode=function(t){return this.rootNode_.getChild(t)},t.prototype.updateSnapshot=function(t,e){this.rootNode_=this.rootNode_.updateChild(t,e)},t}(),qe=function(){function t(t){this.app_=t}return t.prototype.getToken=function(t){return this.app_.INTERNAL.getToken(t).then(null,function(t){return t&&"auth/token-not-initialized"===t.code?(D("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(t)})},t.prototype.addTokenChangeListener=function(t){this.app_.INTERNAL.addAuthTokenListener(t)},t.prototype.removeTokenChangeListener=function(t){this.app_.INTERNAL.removeAuthTokenListener(t)},t.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',j(t)},t}(),He=function(){function t(){this.counters_={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),g.contains(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},t.prototype.get=function(){return g.deepCopy(this.counters_)},t}(),Ke=function(){function t(){}return t.getCollection=function(t){var e=t.toString();return this.collections_[e]||(this.collections_[e]=new He),this.collections_[e]},t.getOrCreateReporter=function(t,e){var n=t.toString();return this.reporters_[n]||(this.reporters_[n]=e()),this.reporters_[n]},t.collections_={},t.reporters_={},t}(),Ge=function(){function t(t){this.collection_=t,this.last_=null}return t.prototype.get=function(){var t=this.collection_.get(),e=g.clone(t);return this.last_&&g.forEach(this.last_,function(t,n){e[t]=e[t]-n}),this.last_=t,e},t}(),ze=1e4,Qe=3e4,Ye=function(){function t(t,e){this.server_=e,this.statsToReport_={},this.statsListener_=new Ge(t);var n=ze+(Qe-ze)*Math.random();rt(this.reportStats_.bind(this),Math.floor(n))}return t.prototype.includeStat=function(t){this.statsToReport_[t]=!0},t.prototype.reportStats_=function(){var t=this,e=this.statsListener_.get(),n={},r=!1;g.forEach(e,function(e,i){i>0&&g.contains(t.statsToReport_,e)&&(n[e]=i,r=!0)}),r&&this.server_.reportStats(n),rt(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},t}(),Xe=function(){function t(){this.eventLists_=[],this.recursionDepth_=0}return t.prototype.queueEvents=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n],i=r.getPath();null===e||i.equals(e.getPath())||(this.eventLists_.push(e),e=null),null===e&&(e=new $e(i)),e.add(r)}e&&this.eventLists_.push(e)},t.prototype.raiseEventsAtPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.equals(t)})},t.prototype.raiseEventsForChangedPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.contains(t)||t.contains(e)})},t.prototype.raiseQueuedEventsMatchingPredicate_=function(t){this.recursionDepth_++;for(var e=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r){t(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):e=!1}}e&&(this.eventLists_=[]),this.recursionDepth_--},t}(),$e=function(){function t(t){this.path_=t,this.events_=[]}return t.prototype.add=function(t){this.events_.push(t)},t.prototype.raise=function(){for(var t=0;t<this.events_.length;t++){var e=this.events_[t];if(null!==e){this.events_[t]=null;var n=e.getEventRunner();N&&D("event: "+e.toString()),et(n)}}},t.prototype.getPath=function(){return this.path_},t}(),Je=function(){function t(t){this.allowedEvents_=t,this.listeners_={},g.assert(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Array.isArray(this.listeners_[t]))for(var r=this.listeners_[t].slice(),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,e)},t.prototype.on=function(t,e,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:e,context:n});var r=this.getInitialEvent(t);r&&e.apply(n,r)},t.prototype.off=function(t,e,n){this.validateEventType_(t);for(var r=this.listeners_[t]||[],i=0;i<r.length;i++)if(r[i].callback===e&&(!n||n===r[i].context))return void r.splice(i,1)},t.prototype.validateEventType_=function(t){g.assert(this.allowedEvents_.find(function(e){return e===t}),"Unknown event: "+t)},t}(),Ze=function(t){function e(){var e,n,r=t.call(this,["visible"])||this;return"undefined"!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(n="visibilitychange",e="hidden"):void 0!==document.mozHidden?(n="mozvisibilitychange",e="mozHidden"):void 0!==document.msHidden?(n="msvisibilitychange",e="msHidden"):void 0!==document.webkitHidden&&(n="webkitvisibilitychange",e="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,function(){var t=!document[e];t!==r.visible_&&(r.visible_=t,r.trigger("visible",t))},!1),r}return m.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return g.assert("visible"===t,"Unknown event type: "+t),[this.visible_]},e}(Je),tn=function(t){function e(){var e=t.call(this,["online"])||this;return e.online_=!0,"undefined"==typeof window||void 0===window.addEventListener||g.isMobileCordova()||(window.addEventListener("online",function(){e.online_||(e.online_=!0,e.trigger("online",!0))},!1),window.addEventListener("offline",function(){e.online_&&(e.online_=!1,e.trigger("online",!1))},!1)),e}return m.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return g.assert("online"===t,"Unknown event type: "+t),[this.online_]},e.prototype.currentlyOnline=function(){return this.online_},e}(Je),en=function(){function t(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return t.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},t.prototype.handleResponse=function(t,e){var n=this;this.pendingResponses[t]=e;for(var r=this;this.pendingResponses[this.currentResponseNum];){if("break"===function(){var t=r.pendingResponses[r.currentResponseNum];delete r.pendingResponses[r.currentResponseNum];for(var e=0;e<t.length;++e)!function(e){t[e]&&et(function(){n.onMessage_(t[e])})}(e);if(r.currentResponseNum===r.closeAfterResponse)return r.onClose&&(r.onClose(),r.onClose=null),"break";r.currentResponseNum++}())break}},t}(),nn="pLPCommand",rn="pRTLPCB",on=function(){function t(t,e,n,r){this.connId=t,this.repoInfo=e,this.transportSessionId=n,this.lastSessionId=r,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=x(t),this.stats_=Ke.getCollection(e),this.urlFn=function(t){return e.connectionURL(at,t)}}return t.prototype.open=function(t,e){var n=this;this.curSegmentNum=0,this.onDisconnect_=e,this.myPacketOrderer=new en(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null},Math.floor(3e4)),V(function(){if(!n.isClosed_){n.scriptTagHolder=new an(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[0],i=t[1],o=t[2];if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,"start"==r)n.id=i,n.password=o;else{if("close"!==r)throw new Error("Unrecognized command received: "+r);i?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(i,function(){n.onClosed_()})):n.onClosed_()}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[0],i=t[1];n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(r,i)},function(){n.onClosed_()},n.urlFn);var t={};t.start="t",t.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(t.cb=n.scriptTagHolder.uniqueCallbackIdentifier),t.v="5",n.transportSessionId&&(t.s=n.transportSessionId),n.lastSessionId&&(t.ls=n.lastSessionId),!g.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f");var e=n.urlFn(t);n.log_("Connecting via long-poll to "+e),n.scriptTagHolder.addTag(e,function(){})}})},t.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},t.forceAllow=function(){t.forceAllow_=!0},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){return t.forceAllow_||!t.forceDisallow_&&"undefined"!=typeof document&&null!=document.createElement&&!X()&&!$()&&!g.isNodeSdk()},t.prototype.markConnectionHealthy=function(){},t.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},t.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},t.prototype.send=function(t){var e=g.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);for(var n=g.base64Encode(e),r=z(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},t.prototype.addDisconnectPingFrame=function(t,e){if(!g.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var n={};n.dframe="t",n.id=t,n.pw=e,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},t.prototype.incrementIncomingBytes_=function(t){var e=g.stringify(t).length;this.bytesReceived+=e,this.stats_.incrementCounter("bytes_received",e)},t}(),an=function(){function t(e,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new le,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,g.isNodeSdk())this.commandCB=e,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=O(),window[nn+this.uniqueCallbackIdentifier]=e,window[rn+this.uniqueCallbackIdentifier]=n,this.myIFrame=t.createIFrame_();var o="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length)){o='<script>document.domain="'+document.domain+'";<\/script>'}var a="<html><body>"+o+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(a),this.myIFrame.doc.close()}catch(t){D("frame writing exception"),t.stack&&D(t.stack),D(t)}}}return t.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||D("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var e=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==e.myIFrame&&(document.body.removeChild(e.myIFrame),e.myIFrame=null)},Math.floor(0))),g.isNodeSdk()&&this.myID){var n={};n.disconn="t",n.id=this.myID,n.pw=this.myPW;var r=this.urlFn(n);t.nodeRestRequest(r)}var i=this.onDisconnect;i&&(this.onDisconnect=null,i())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.newRequest_(););},t.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t.id=this.myID,t.pw=this.myPW,t.ser=this.currentSerial;for(var e=this.urlFn(t),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return e+=n,this.addLongPollTag_(e,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.newRequest_()},t.prototype.addLongPollTag_=function(t,e){var n=this;this.outstandingRequests.add(e,1);var r=function(){n.outstandingRequests.remove(e),n.newRequest_()},i=setTimeout(r,Math.floor(25e3)),o=function(){clearTimeout(i),r()};this.addTag(t,o)},t.prototype.addTag=function(t,e){var n=this;g.isNodeSdk()?this.doNodeLongPoll(t,e):setTimeout(function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),e())},r.onerror=function(){D("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(t){}},Math.floor(1))},t}(),sn=null;"undefined"!=typeof MozWebSocket?sn=MozWebSocket:"undefined"!=typeof WebSocket&&(sn=WebSocket);var un=function(){function t(e,n,r,i){this.connId=e,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=x(this.connId),this.stats_=Ke.getCollection(n),this.connURL=t.connectionURL_(n,r,i)}return t.connectionURL_=function(t,e,n){var r={};return r.v="5",!g.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(r.r="f"),e&&(r.s=e),n&&(r.ls=n),t.connectionURL("websocket",r)},t.prototype.open=function(t,e){var i=this;this.onDisconnect=e,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,T.set("previous_websocket_failure",!0);try{if(g.isNodeSdk()){var o=g.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",a={headers:{"User-Agent":"Firebase/5/"+b.SDK_VERSION+"/"+r.platform+"/"+o}},s=n.i({NODE_ENV:"production"}),u=0==this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;u&&(a.proxy={origin:u}),this.mySock=new sn(this.connURL,[],a)}else this.mySock=new sn(this.connURL)}catch(t){this.log_("Error instantiating WebSocket.");var c=t.message||t.data;return c&&this.log_(c),void this.onClosed_()}this.mySock.onopen=function(){i.log_("Websocket connected."),i.everConnected_=!0},this.mySock.onclose=function(){i.log_("Websocket connection was disconnected."),i.mySock=null,i.onClosed_()},this.mySock.onmessage=function(t){i.handleIncomingFrame(t)},this.mySock.onerror=function(t){i.log_("WebSocket error.  Closing connection.");var e=t.message||t.data;e&&i.log_(e),i.onClosed_()}},t.prototype.start=function(){},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(e=!0)}return!e&&null!==sn&&!t.forceDisallow_},t.previouslyFailed=function(){return T.isInMemoryStorage||!0===T.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){T.remove("previous_websocket_failure")},t.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length==this.totalFrames){var e=this.frames.join("");this.frames=null;var n=g.jsonEval(e);this.onMessage(n)}},t.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},t.prototype.extractFrameCount_=function(t){if(g.assert(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=Number(t);if(!isNaN(e))return this.handleNewFrameCount_(e),null}return this.handleNewFrameCount_(1),t},t.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.stats_.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(e);else{var n=this.extractFrameCount_(e);null!==n&&this.appendFrame_(n)}}},t.prototype.send=function(t){this.resetKeepAlive();var e=g.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);var n=z(e,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},t.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},t.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},t.prototype.resetKeepAlive=function(){var t=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(function(){t.mySock&&t.sendString_("0"),t.resetKeepAlive()},Math.floor(45e3))},t.prototype.sendString_=function(t){try{this.mySock.send(t)}catch(t){this.log_("Exception thrown from WebSocket.send():",t.message||t.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},t.responsesRequiredToBeHealthy=2,t.healthyTimeout=3e4,t}(),cn=function(){function t(t){this.initTransports_(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[on,un]},enumerable:!0,configurable:!0}),t.prototype.initTransports_=function(e){var n=un&&un.isAvailable(),r=n&&!un.previouslyFailed();if(e.webSocketOnly&&(n||j("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),r=!0),r)this.transports_=[un];else{var i=this.transports_=[];Q(t.ALL_TRANSPORTS,function(t,e){e&&e.isAvailable()&&i.push(e)})}},t.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},t.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},t}(),ln=function(){function t(t,e,n,r,i,o,a){this.id=t,this.repoInfo_=e,this.onMessage_=n,this.onReady_=r,this.onDisconnect_=i,this.onKill_=o,this.lastSessionId=a,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=x("c:"+this.id+":"),this.transportManager_=new cn(e),this.log_("Connection created"),this.start_()}return t.prototype.start_=function(){var t=this,e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,void 0,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(function(){t.conn_&&t.conn_.open(n,r)},Math.floor(0));var i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=rt(function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>102400?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes.  Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>10240?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes.  Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))},Math.floor(i)))},t.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.disconnReceiver_=function(t){var e=this;return function(n){t===e.conn_?e.onConnectionLost_(n):t===e.secondaryConn_?(e.log_("Secondary connection lost."),e.onSecondaryConnectionLost_()):e.log_("closing an old connection")}},t.prototype.connReceiver_=function(t){var e=this;return function(n){2!=e.state_&&(t===e.rx_?e.onPrimaryMessageReceived_(n):t===e.secondaryConn_?e.onSecondaryMessageReceived_(n):e.log_("message on old connection"))}},t.prototype.sendRequest=function(t){var e={t:"d",d:t};this.sendData_(e)},t.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},t.prototype.onSecondaryControl_=function(t){if("t"in t){var e=t.t;"a"===e?this.upgradeIfSecondaryHealthy_():"r"===e?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===e&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},t.prototype.onSecondaryMessageReceived_=function(t){var e=K("t",t),n=K("d",t);if("c"==e)this.onSecondaryControl_(n);else{if("d"!=e)throw new Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},t.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},t.prototype.onPrimaryMessageReceived_=function(t){var e=K("t",t),n=K("d",t);"c"==e?this.onControl_(n):"d"==e&&this.onDataMessage_(n)},t.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},t.prototype.onPrimaryResponse_=function(){this.isHealthy_||--this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy())},t.prototype.onControl_=function(t){var e=K("t",t);if("d"in t){var n=t.d;if("h"===e)this.onHandshake_(n);else if("n"===e){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===e?this.onConnectionShutdown_(n):"r"===e?this.onReset_(n):"e"===e?F("Server Error: "+n):"o"===e?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):F("Unknown control packet command: "+e)}},t.prototype.onHandshake_=function(t){var e=t.ts,n=t.v,r=t.h;this.sessionId=t.s,this.repoInfo_.updateHost(r),0==this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,e),"5"!==n&&j("Protocol version mismatch detected"),this.tryStartUpgrade_())},t.prototype.tryStartUpgrade_=function(){var t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)},t.prototype.startUpgrade_=function(t){var e=this;this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),rt(function(){e.secondaryConn_&&(e.log_("Timed out trying to upgrade."),e.secondaryConn_.close())},Math.floor(6e4))},t.prototype.onReset_=function(t){this.log_("Reset packet received.  New host: "+t),this.repoInfo_.updateHost(t),1===this.state_?this.close():(this.closeConnections_(),this.start_())},t.prototype.onConnectionEstablished_=function(t,e){var n=this;this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(e,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):rt(function(){n.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))},t.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},t.prototype.onSecondaryConnectionLost_=function(){var t=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==t&&this.rx_!==t||this.close()},t.prototype.onConnectionLost_=function(t){this.conn_=null,t||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(T.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},t.prototype.onConnectionShutdown_=function(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()},t.prototype.sendData_=function(t){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(t)},t.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},t.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},t}(),hn=function(){function t(){}return t.prototype.put=function(t,e,n,r){},t.prototype.merge=function(t,e,n,r){},t.prototype.refreshAuthToken=function(t){},t.prototype.onDisconnectPut=function(t,e,n){},t.prototype.onDisconnectMerge=function(t,e,n){},t.prototype.onDisconnectCancel=function(t,e){},t.prototype.reportStats=function(t){},t}(),fn=1e3,pn=3e5,dn=function(t){function e(n,r,i,o,a,s){var u=t.call(this)||this;if(u.repoInfo_=n,u.onDataUpdate_=r,u.onConnectStatus_=i,u.onServerInfoUpdate_=o,u.authTokenProvider_=a,u.authOverride_=s,u.id=e.nextPersistentConnectionId_++,u.log_=x("p:"+u.id+":"),u.interruptReasons_={},u.listens_={},u.outstandingPuts_=[],u.outstandingPutCount_=0,u.onDisconnectRequestQueue_=[],u.connected_=!1,u.reconnectDelay_=fn,u.maxReconnectDelay_=pn,u.securityDebugCallback_=null,u.lastSessionId=null,u.establishConnectionTimer_=null,u.visible_=!1,u.requestCBHash_={},u.requestNumber_=0,u.realtime_=null,u.authToken_=null,u.forceTokenRefresh_=!1,u.invalidAuthTokenCount_=0,u.firstConnection_=!0,u.lastConnectionAttemptTime_=null,u.lastConnectionEstablishedTime_=null,s&&!g.isNodeSdk())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return u.scheduleConnect_(0),Ze.getInstance().on("visible",u.onVisible_,u),-1===n.host.indexOf("fblocal")&&tn.getInstance().on("online",u.onOnline_,u),u}return m.__extends(e,t),e.prototype.sendRequest=function(t,e,n){var r=++this.requestNumber_,i={r:r,a:t,b:e};this.log_(g.stringify(i)),g.assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},e.prototype.listen=function(t,e,n,r){var i=t.queryIdentifier(),o=t.path.toString();this.log_("Listen called for "+o+" "+i),this.listens_[o]=this.listens_[o]||{},g.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),g.assert(!this.listens_[o][i],"listen() called twice for same path/queryId.");var a={onComplete:r,hashFn:e,query:t,tag:n};this.listens_[o][i]=a,this.connected_&&this.sendListen_(a)},e.prototype.sendListen_=function(t){var n=this,r=t.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};t.tag&&(a.q=r.queryObject(),a.t=t.tag),a.h=t.hashFn(),this.sendRequest("q",a,function(a){var s=a.d,u=a.s;e.warnOnListenWarnings_(s,r),(n.listens_[i]&&n.listens_[i][o])===t&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),t.onComplete&&t.onComplete(u,s))})},e.warnOnListenWarnings_=function(t,e){if(t&&"object"==typeof t&&g.contains(t,"w")){var n=g.safeGet(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+e.getQueryParams().getIndex().toString()+'"',i=e.path.toString();j("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},e.prototype.refreshAuthToken=function(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},function(){}),this.reduceReconnectDelayIfAdminCredential_(t)},e.prototype.reduceReconnectDelayIfAdminCredential_=function(t){(t&&40===t.length||g.isAdmin(t))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},e.prototype.tryAuth=function(){var t=this;if(this.connected_&&this.authToken_){var e=this.authToken_,n=g.isValidFormat(e)?"auth":"gauth",r={cred:e};null===this.authOverride_?r.noauth=!0:"object"==typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,function(n){var r=n.s,i=n.d||"error";t.authToken_===e&&("ok"===r?t.invalidAuthTokenCount_=0:t.onAuthRevoked_(r,i))})}},e.prototype.unlisten=function(t,e){var n=t.path.toString(),r=t.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),g.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,t.queryObject(),e)},e.prototype.sendUnlisten_=function(t,e,n,r){this.log_("Unlisten on "+t+" for "+e);var i={p:t};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},e.prototype.onDisconnectPut=function(t,e,n){this.connected_?this.sendOnDisconnect_("o",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:e,onComplete:n})},e.prototype.onDisconnectMerge=function(t,e,n){this.connected_?this.sendOnDisconnect_("om",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:e,onComplete:n})},e.prototype.onDisconnectCancel=function(t,e){this.connected_?this.sendOnDisconnect_("oc",t,null,e):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:e})},e.prototype.sendOnDisconnect_=function(t,e,n,r){var i={p:e,d:n};this.log_("onDisconnect "+t,i),this.sendRequest(t,i,function(t){r&&setTimeout(function(){r(t.s,t.d)},Math.floor(0))})},e.prototype.put=function(t,e,n,r){this.putInternal("p",t,e,n,r)},e.prototype.merge=function(t,e,n,r){this.putInternal("m",t,e,n,r)},e.prototype.putInternal=function(t,e,n,r,i){var o={p:e,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:t,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+e)},e.prototype.sendPut_=function(t){var e=this,n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,function(r){e.log_(n+" response",r),delete e.outstandingPuts_[t],e.outstandingPutCount_--,0===e.outstandingPutCount_&&(e.outstandingPuts_=[]),i&&i(r.s,r.d)})},e.prototype.reportStats=function(t){var e=this;if(this.connected_){var n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,function(t){if("ok"!==t.s){var n=t.d;e.log_("reportStats","Error sending stats: "+n)}})}},e.prototype.onDataMessage_=function(t){if("r"in t){this.log_("from server: "+g.stringify(t));var e=t.r,n=this.requestCBHash_[e];n&&(delete this.requestCBHash_[e],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}},e.prototype.onDataPush_=function(t,e){this.log_("handleServerMessage",t,e),"d"===t?this.onDataUpdate_(e.p,e.d,!1,e.t):"m"===t?this.onDataUpdate_(e.p,e.d,!0,e.t):"c"===t?this.onListenRevoked_(e.p,e.q):"ac"===t?this.onAuthRevoked_(e.s,e.d):"sd"===t?this.onSecurityDebugPacket_(e):F("Unrecognized action received from server: "+g.stringify(t)+"\nAre you using the latest client?")},e.prototype.onReady_=function(t,e){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(t),this.lastSessionId=e,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},e.prototype.scheduleConnect_=function(t){var e=this;g.assert(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(function(){e.establishConnectionTimer_=null,e.establishConnection_()},Math.floor(t))},e.prototype.onVisible_=function(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=fn,this.realtime_||this.scheduleConnect_(0)),this.visible_=t},e.prototype.onOnline_=function(t){t?(this.log_("Browser went online."),this.reconnectDelay_=fn,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())},e.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){var t=(new Date).getTime()-this.lastConnectionEstablishedTime_;t>3e4&&(this.reconnectDelay_=fn),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var e=(new Date).getTime()-this.lastConnectionAttemptTime_,n=Math.max(0,this.reconnectDelay_-e);n=Math.random()*n,this.log_("Trying to reconnect in "+n+"ms"),this.scheduleConnect_(n),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},e.prototype.establishConnection_=function(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var t=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+e.nextConnectionId_++,o=this,a=this.lastSessionId,s=!1,u=null,c=function(){u?u.close():(s=!0,r())},l=function(t){g.assert(u,"sendRequest call when we're not connected not allowed."),u.sendRequest(t)};this.realtime_={close:c,sendRequest:l};var h=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(h).then(function(e){s?D("getToken() completed but was canceled"):(D("getToken() completed. Creating connection."),o.authToken_=e&&e.accessToken,u=new ln(i,o.repoInfo_,t,n,r,function(t){j(t+" ("+o.repoInfo_.toString()+")"),o.interrupt("server_kill")},a))}).then(null,function(t){o.log_("Failed to get token: "+t),s||(g.CONSTANTS.NODE_ADMIN&&j(t),c())})}},e.prototype.interrupt=function(t){D("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},e.prototype.resume=function(t){D("Resuming connection for reason: "+t),delete this.interruptReasons_[t],g.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=fn,this.realtime_||this.scheduleConnect_(0))},e.prototype.handleTimestamp_=function(t){var e=t-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:e})},e.prototype.cancelSentTransactions_=function(){for(var t=0;t<this.outstandingPuts_.length;t++){var e=this.outstandingPuts_[t];e&&"h"in e.request&&e.queued&&(e.onComplete&&e.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},e.prototype.onListenRevoked_=function(t,e){var n;n=e?e.map(function(t){return G(t)}).join("$"):"default";var r=this.removeListen_(t,n);r&&r.onComplete&&r.onComplete("permission_denied")},e.prototype.removeListen_=function(t,e){var n,r=new it(t).toString();return void 0!==this.listens_[r]?(n=this.listens_[r][e],delete this.listens_[r][e],0===g.getCount(this.listens_[r])&&delete this.listens_[r]):n=void 0,n},e.prototype.onAuthRevoked_=function(t,e){D("Auth token revoked: "+t+"/"+e),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==t&&"permission_denied"!==t||++this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken())},e.prototype.onSecurityDebugPacket_=function(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.restoreState_=function(){var t=this;this.tryAuth(),g.forEach(this.listens_,function(e,n){g.forEach(n,function(e,n){t.sendListen_(n)})});for(var e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){var n=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(n.action,n.pathString,n.data,n.onComplete)}},e.prototype.sendConnectStats_=function(){var t={},e="js";g.CONSTANTS.NODE_ADMIN?e="admin_node":g.CONSTANTS.NODE_CLIENT&&(e="node"),t["sdk."+e+"."+b.SDK_VERSION.replace(/\./g,"-")]=1,g.isMobileCordova()?t["framework.cordova"]=1:g.isReactNative()&&(t["framework.reactnative"]=1),this.reportStats(t)},e.prototype.shouldReconnect_=function(){var t=tn.getInstance().currentlyOnline();return g.isEmpty(this.interruptReasons_)&&t},e.nextPersistentConnectionId_=0,e.nextConnectionId_=0,e}(hn),vn=function(t){function e(e,n,r){var i=t.call(this)||this;return i.repoInfo_=e,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=x("p:rest:"),i.listens_={},i}return m.__extends(e,t),e.prototype.reportStats=function(t){throw new Error("Method not implemented.")},e.getListenId_=function(t,e){return void 0!==e?"tag$"+e:(g.assert(t.getQueryParams().isDefault(),"should have a tag if it's not a default query."),t.path.toString())},e.prototype.listen=function(t,n,r,i){var o=this,a=t.path.toString();this.log_("Listen called for "+a+" "+t.queryIdentifier());var s=e.getListenId_(t,r),u={};this.listens_[s]=u;var c=t.getQueryParams().toRestQueryStringParameters();this.restRequest_(a+".json",c,function(t,e){var n=e;if(404===t&&(n=null,t=null),null===t&&o.onDataUpdate_(a,n,!1,r),g.safeGet(o.listens_,s)===u){var c;c=t?401==t?"permission_denied":"rest_error:"+t:"ok",i(c,null)}})},e.prototype.unlisten=function(t,n){var r=e.getListenId_(t,n);delete this.listens_[r]},e.prototype.refreshAuthToken=function(t){},e.prototype.restRequest_=function(t,e,n){var r=this;void 0===e&&(e={}),e.format="export",this.authTokenProvider_.getToken(!1).then(function(i){var o=i&&i.accessToken;o&&(e.auth=o);var a=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+t+"?"+g.querystring(e);r.log_("Sending REST request for "+a);var s=new XMLHttpRequest;s.onreadystatechange=function(){if(n&&4===s.readyState){r.log_("REST Response for "+a+" received. status:",s.status,"response:",s.responseText);var t=null;if(s.status>=200&&s.status<300){try{t=g.jsonEval(s.responseText)}catch(t){j("Failed to parse JSON response for "+a+": "+s.responseText)}n(null,t)}else 401!==s.status&&404!==s.status&&j("Got unsuccessful REST response for "+a+" Status: "+s.status),n(s.status);n=null}},s.open("GET",a,!0),s.send()})},e}(hn),yn=function(){function t(t,e,n){var r=this;this.repoInfo_=t,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Xe,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new he,this.persistentConnection_=null;var i=new qe(n);if(this.stats_=Ke.getCollection(t),e||nt())this.server_=new vn(this.repoInfo_,this.onDataUpdate_.bind(this),i),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if(void 0!==o&&null!==o){if("object"!=typeof o)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{g.stringify(o)}catch(t){throw new Error("Invalid authOverride provided: "+t)}}this.persistentConnection_=new dn(this.repoInfo_,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),i,o),this.server_=this.persistentConnection_}i.addTokenChangeListener(function(t){r.server_.refreshAuthToken(t)}),this.statsReporter_=Ke.getOrCreateReporter(t,function(){return new Ye(r.stats_,r.server_)}),this.transactions_init_(),this.infoData_=new Be,this.infoSyncTree_=new We({startListening:function(t,e,n,i){var o=[],a=r.infoData_.getNode(t.path);return a.isEmpty()||(o=r.infoSyncTree_.applyServerOverwrite(t.path,a),setTimeout(function(){i("ok")},0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new We({startListening:function(t,e,n,i){return r.server_.listen(t,n,e,function(e,n){var o=i(e,n);r.eventQueue_.raiseEventsForChangedPath(t.path,o)}),[]},stopListening:function(t,e){r.server_.unlisten(t,e)}})}return t.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},t.prototype.name=function(){return this.repoInfo_.namespace},t.prototype.serverTime=function(){var t=this.infoData_.getNode(new it(".info/serverTimeOffset")),e=t.val()||0;return(new Date).getTime()+e},t.prototype.generateServerValues=function(){return fe({timestamp:this.serverTime()})},t.prototype.onDataUpdate_=function(t,e,n,r){this.dataUpdateCount++;var i=new it(t);e=this.interceptServerDataCallback_?this.interceptServerDataCallback_(t,e):e;var o=[];if(r)if(n){var a=g.map(e,function(t){return u(t)});o=this.serverSyncTree_.applyTaggedQueryMerge(i,a,r)}else{var s=u(e);o=this.serverSyncTree_.applyTaggedQueryOverwrite(i,s,r)}else if(n){var c=g.map(e,function(t){return u(t)});o=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=u(e);o=this.serverSyncTree_.applyServerOverwrite(i,l)}var h=i;o.length>0&&(h=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(h,o)},t.prototype.interceptServerData_=function(t){this.interceptServerDataCallback_=t},t.prototype.onConnectStatus_=function(t){this.updateInfo_("connected",t),!1===t&&this.runOnDisconnectEvents_()},t.prototype.onServerInfoUpdate_=function(t){var e=this;Q(t,function(t,n){e.updateInfo_(n,t)})},t.prototype.updateInfo_=function(t,e){var n=new it("/.info/"+t),r=u(e);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},t.prototype.getNextWriteId_=function(){return this.nextWriteId_++},t.prototype.setWithPriority=function(t,e,n,r){var i=this;this.log_("set",{path:t.toString(),value:e,priority:n});var o=this.generateServerValues(),a=u(e,n),s=ve(a,o),c=this.getNextWriteId_(),l=this.serverSyncTree_.applyUserOverwrite(t,s,c,!0);this.eventQueue_.queueEvents(l),this.server_.put(t.toString(),a.val(!0),function(e,n){var o="ok"===e;o||j("set at "+t+" failed: "+e);var a=i.serverSyncTree_.ackUserWrite(c,!o);i.eventQueue_.raiseEventsForChangedPath(t,a),i.callOnCompleteCallback(r,e,n)});var h=this.abortTransactions_(t);this.rerunTransactions_(h),this.eventQueue_.raiseEventsForChangedPath(h,[])},t.prototype.update=function(t,e,n){var r=this;this.log_("update",{path:t.toString(),value:e});var i=!0,o=this.generateServerValues(),a={};if(g.forEach(e,function(t,e){i=!1;var n=u(e);a[t]=ve(n,o)}),i)D("update() called with empty data.  Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var s=this.getNextWriteId_(),c=this.serverSyncTree_.applyUserMerge(t,a,s);this.eventQueue_.queueEvents(c),this.server_.merge(t.toString(),e,function(e,i){var o="ok"===e;o||j("update at "+t+" failed: "+e);var a=r.serverSyncTree_.ackUserWrite(s,!o),u=a.length>0?r.rerunTransactions_(t):t;r.eventQueue_.raiseEventsForChangedPath(u,a),r.callOnCompleteCallback(n,e,i)}),g.forEach(e,function(e){var n=r.abortTransactions_(t.child(e));r.rerunTransactions_(n)}),this.eventQueue_.raiseEventsForChangedPath(t,[])}},t.prototype.runOnDisconnectEvents_=function(){var t=this;this.log_("onDisconnectEvents");var e=this.generateServerValues(),n=de(this.onDisconnect_,e),r=[];n.forEachTree(it.Empty,function(e,n){r=r.concat(t.serverSyncTree_.applyServerOverwrite(e,n));var i=t.abortTransactions_(e);t.rerunTransactions_(i)}),this.onDisconnect_=new he,this.eventQueue_.raiseEventsForChangedPath(it.Empty,r)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.server_.onDisconnectCancel(t.toString(),function(r,i){"ok"===r&&n.onDisconnect_.forget(t),n.callOnCompleteCallback(e,r,i)})},t.prototype.onDisconnectSet=function(t,e,n){var r=this,i=u(e);this.server_.onDisconnectPut(t.toString(),i.val(!0),function(e,o){"ok"===e&&r.onDisconnect_.remember(t,i),r.callOnCompleteCallback(n,e,o)})},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var i=this,o=u(e,n);this.server_.onDisconnectPut(t.toString(),o.val(!0),function(e,n){"ok"===e&&i.onDisconnect_.remember(t,o),i.callOnCompleteCallback(r,e,n)})},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(g.isEmpty(e))return D("onDisconnect().update() called with empty data.  Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(t.toString(),e,function(i,o){"ok"===i&&g.forEach(e,function(e,n){var i=u(n);r.onDisconnect_.remember(t.child(e),i)}),r.callOnCompleteCallback(n,i,o)})},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.addEventRegistration(t,e):this.serverSyncTree_.addEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.removeEventRegistration(t,e):this.serverSyncTree_.removeEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt("repo_interrupt")},t.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume("repo_interrupt")},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!=typeof console){var e;t?(this.statsListener_||(this.statsListener_=new Ge(this.stats_)),e=this.statsListener_.get()):e=this.stats_.get();var n=Object.keys(e).reduce(function(t,e){return Math.max(e.length,t)},0);g.forEach(e,function(t,e){for(var r=t.length;r<n+2;r++)t+=" ";console.log(t+e)})}},t.prototype.statsIncrementCounter=function(t){this.stats_.incrementCounter(t),this.statsReporter_.includeStat(t)},t.prototype.log_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),D.apply(void 0,[n].concat(t))},t.prototype.callOnCompleteCallback=function(t,e,n){t&&et(function(){if("ok"==e)t(null);else{var r=(e||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,t(o)}})},Object.defineProperty(t.prototype,"database",{get:function(){return this.__database||(this.__database=new In(this))},enumerable:!0,configurable:!0}),t}(),gn=function(){function t(e){this.indexedFilter_=new Ae(e.getIndex()),this.index_=e.getIndex(),this.startPost_=t.getStartPost_(e),this.endPost_=t.getEndPost_(e)}return t.prototype.getStartPost=function(){return this.startPost_},t.prototype.getEndPost=function(){return this.endPost_},t.prototype.matches=function(t){return this.index_.compare(this.getStartPost(),t)<=0&&this.index_.compare(t,this.getEndPost())<=0},t.prototype.updateChild=function(t,e,n,r,i,o){return this.matches(new Pt(e,n))||(n=Yt.EMPTY_NODE),this.indexedFilter_.updateChild(t,e,n,r,i,o)},t.prototype.updateFullNode=function(t,e,n){e.isLeafNode()&&(e=Yt.EMPTY_NODE);var r=e.withIndex(this.index_);r=r.updatePriority(Yt.EMPTY_NODE);var i=this;return e.forEachChild(Ut,function(t,e){i.matches(new Pt(t,e))||(r=r.updateImmediateChild(t,Yt.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.indexedFilter_},t.prototype.getIndex=function(){return this.index_},t.getStartPost_=function(t){if(t.hasStart()){var e=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),e)}return t.getIndex().minPost()},t.getEndPost_=function(t){if(t.hasEnd()){var e=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),e)}return t.getIndex().maxPost()},t}(),_n=function(){function t(t){this.rangedFilter_=new gn(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return t.prototype.updateChild=function(t,e,n,r,i,o){return this.rangedFilter_.matches(new Pt(e,n))||(n=Yt.EMPTY_NODE),t.getImmediateChild(e).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,e,n,r,i,o):this.fullLimitUpdateChild_(t,e,n,i,o)},t.prototype.updateFullNode=function(t,e,n){var r;if(e.isLeafNode()||e.isEmpty())r=Yt.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<e.numChildren()&&e.isIndexed(this.index_)){r=Yt.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?e.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):e.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext(),s=void 0;if(!(s=this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=e.withIndex(this.index_),r=r.updatePriority(Yt.EMPTY_NODE);var u=void 0,c=void 0,l=void 0,i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),u=this.rangedFilter_.getEndPost(),c=this.rangedFilter_.getStartPost();var h=this.index_.getCompare();l=function(t,e){return h(e,t)}}else i=r.getIterator(this.index_),u=this.rangedFilter_.getStartPost(),c=this.rangedFilter_.getEndPost(),l=this.index_.getCompare();for(var o=0,f=!1;i.hasNext();){var a=i.getNext();!f&&l(u,a)<=0&&(f=!0);var s=f&&o<this.limit_&&l(a,c)<=0;s?o++:r=r.updateImmediateChild(a.name,Yt.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},t.prototype.getIndex=function(){return this.index_},t.prototype.fullLimitUpdateChild_=function(t,e,n,r,i){var o;if(this.reverse_){var a=this.index_.getCompare();o=function(t,e){return a(e,t)}}else o=this.index_.getCompare();var s=t;g.assert(s.numChildren()==this.limit_,"");var u=new Pt(e,n),c=this.reverse_?s.getFirstChild(this.index_):s.getLastChild(this.index_),l=this.rangedFilter_.matches(u);if(s.hasChild(e)){for(var h=s.getImmediateChild(e),f=r.getChildAfterChild(this.index_,c,this.reverse_);null!=f&&(f.name==e||s.hasChild(f.name));)f=r.getChildAfterChild(this.index_,f,this.reverse_);var p=null==f?1:o(f,u);if(l&&!n.isEmpty()&&p>=0)return null!=i&&i.trackChildChange(Oe.childChangedChange(e,n,h)),s.updateImmediateChild(e,n);null!=i&&i.trackChildChange(Oe.childRemovedChange(e,h));var d=s.updateImmediateChild(e,Yt.EMPTY_NODE);return null!=f&&this.rangedFilter_.matches(f)?(null!=i&&i.trackChildChange(Oe.childAddedChange(f.name,f.node)),d.updateImmediateChild(f.name,f.node)):d}return n.isEmpty()?t:l&&o(c,u)>=0?(null!=i&&(i.trackChildChange(Oe.childRemovedChange(c.name,c.node)),i.trackChildChange(Oe.childAddedChange(e,n))),s.updateImmediateChild(e,n).updateImmediateChild(c.name,Yt.EMPTY_NODE)):t},t}(),mn=function(){function t(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=Ut}return t.prototype.hasStart=function(){return this.startSet_},t.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},t.prototype.getIndexStartValue=function(){return g.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},t.prototype.getIndexStartName=function(){return g.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:W},t.prototype.hasEnd=function(){return this.endSet_},t.prototype.getIndexEndValue=function(){return g.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},t.prototype.getIndexEndName=function(){return g.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:B},t.prototype.hasLimit=function(){return this.limitSet_},t.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},t.prototype.getLimit=function(){return g.assert(this.limitSet_,"Only valid if limit has been set"),this.limit_},t.prototype.getIndex=function(){return this.index_},t.prototype.copy_=function(){var e=new t;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e},t.prototype.limit=function(t){var e=this.copy_();return e.limitSet_=!0,e.limit_=t,e.viewFrom_="",e},t.prototype.limitToFirst=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},t.prototype.limitToLast=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},t.prototype.startAt=function(t,e){var n=this.copy_();return n.startSet_=!0,void 0===t&&(t=null),n.indexStartValue_=t,null!=e?(n.startNameSet_=!0,n.indexStartName_=e):(n.startNameSet_=!1,n.indexStartName_=""),n},t.prototype.endAt=function(t,e){var n=this.copy_();return n.endSet_=!0,void 0===t&&(t=null),n.indexEndValue_=t,void 0!==e?(n.endNameSet_=!0,n.indexEndName_=e):(n.endNameSet_=!1,n.indexEndName_=""),n},t.prototype.orderBy=function(t){var e=this.copy_();return e.index_=t,e},t.prototype.getQueryObject=function(){var e=t.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[e.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[e.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[e.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[e.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[e.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?e.VIEW_FROM_LEFT:e.VIEW_FROM_RIGHT),n[e.VIEW_FROM]=r}return this.index_!==Ut&&(n[e.INDEX]=this.index_.toString()),n},t.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.index_==Ut},t.prototype.getNodeFilter=function(){return this.loadsAllData()?new Ae(this.getIndex()):this.hasLimit()?new _n(this):new gn(this)},t.prototype.toRestQueryStringParameters=function(){var e=t.REST_QUERY_CONSTANTS_,n={};if(this.isDefault())return n;var r;return this.index_===Ut?r=e.PRIORITY_INDEX:this.index_===ne?r=e.VALUE_INDEX:this.index_===xt?r=e.KEY_INDEX:(g.assert(this.index_ instanceof re,"Unrecognized index type!"),r=this.index_.toString()),n[e.ORDER_BY]=g.stringify(r),this.startSet_&&(n[e.START_AT]=g.stringify(this.indexStartValue_),this.startNameSet_&&(n[e.START_AT]+=","+g.stringify(this.indexStartName_))),this.endSet_&&(n[e.END_AT]=g.stringify(this.indexEndValue_),this.endNameSet_&&(n[e.END_AT]+=","+g.stringify(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?n[e.LIMIT_TO_FIRST]=this.limit_:n[e.LIMIT_TO_LAST]=this.limit_),n},t.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},t.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},t.DEFAULT=new t,t}(),bn=function(t){function e(e,n){if(!(e instanceof yn))throw new Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,mn.DEFAULT,!1)||this}return m.__extends(e,t),e.prototype.getKey=function(){return g.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},e.prototype.child=function(t){return g.validateArgCount("Reference.child",1,1,arguments.length),"number"==typeof t?t=String(t):t instanceof it||(null===this.path.getFront()?Tt("Reference.child",1,t,!1):St("Reference.child",1,t,!1)),new e(this.repo,this.path.child(t))},e.prototype.getParent=function(){g.validateArgCount("Reference.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){g.validateArgCount("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){g.validateArgCount("Reference.set",1,2,arguments.length),Ct("Reference.set",this.path),yt("Reference.set",1,t,this.path,!1),g.validateCallback("Reference.set",2,e,!0);var n=new g.Deferred;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(g.validateArgCount("Reference.update",1,2,arguments.length),Ct("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,j("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}mt("Reference.update",1,t,this.path,!1),g.validateCallback("Reference.update",2,e,!0);var i=new g.Deferred;return this.repo.update(this.path,t,i.wrapCallback(e)),i.promise},e.prototype.setWithPriority=function(t,e,n){if(g.validateArgCount("Reference.setWithPriority",2,3,arguments.length),Ct("Reference.setWithPriority",this.path),yt("Reference.setWithPriority",1,t,this.path,!1),bt("Reference.setWithPriority",2,e,!1),g.validateCallback("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new g.Deferred;return this.repo.setWithPriority(this.path,t,e,r.wrapCallback(n)),r.promise},e.prototype.remove=function(t){return g.validateArgCount("Reference.remove",0,1,arguments.length),Ct("Reference.remove",this.path),g.validateCallback("Reference.remove",1,t,!0),this.set(null,t)},e.prototype.transaction=function(t,e,n){if(g.validateArgCount("Reference.transaction",1,3,arguments.length),Ct("Reference.transaction",this.path),g.validateCallback("Reference.transaction",1,t,!1),g.validateCallback("Reference.transaction",2,e,!0),Ot("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new g.Deferred;"function"==typeof e&&r.promise.catch(function(){});var i=function(t,n,i){t?r.reject(t):r.resolve(new Rt(n,i)),"function"==typeof e&&e(t,n,i)};return this.repo.startTransaction(this.path,t,i,n),r.promise},e.prototype.setPriority=function(t,e){g.validateArgCount("Reference.setPriority",1,2,arguments.length),Ct("Reference.setPriority",this.path),bt("Reference.setPriority",1,t,!1),g.validateCallback("Reference.setPriority",2,e,!0);var n=new g.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),t,null,n.wrapCallback(e)),n.promise},e.prototype.push=function(t,e){g.validateArgCount("Reference.push",0,2,arguments.length),Ct("Reference.push",this.path),yt("Reference.push",1,t,this.path,!0),g.validateCallback("Reference.push",2,e,!0);var n,r=this.repo.serverTime(),i=Nt(r),o=this.child(i),a=this.child(i);return n=null!=t?o.set(t,e).then(function(){return a}):Promise.resolve(a),o.then=n.then.bind(n),o.catch=n.then.bind(n,void 0),"function"==typeof e&&n.catch(function(){}),o},e.prototype.onDisconnect=function(){return Ct("Reference.onDisconnect",this.path),new At(this.repo,this.path)},Object.defineProperty(e.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.getKey()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.getParent()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.getRoot()},enumerable:!0,configurable:!0}),e}(ce);ce.__referenceConstructor=bn,je.__referenceConstructor=bn;var wn,En=function(){function t(){this.children={},this.childCount=0,this.value=null}return t}(),Sn=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=null),void 0===n&&(n=new En),this.name_=t,this.parent_=e,this.node_=n}return t.prototype.subTree=function(e){for(var n,r=e instanceof it?e:new it(e),i=this;null!==(n=r.getFront());){i=new t(n,i,g.safeGet(i.node_.children,n)||new En),r=r.popFront()}return i},t.prototype.getValue=function(){return this.node_.value},t.prototype.setValue=function(t){g.assert(void 0!==t,"Cannot set value to undefined"),this.node_.value=t,this.updateParents_()},t.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},t.prototype.hasChildren=function(){return this.node_.childCount>0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;g.forEach(this.node_.children,function(r,i){e(new t(r,n,i))})},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild(function(e){e.forEachDescendant(t,!0,n)}),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild(function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)})},t.prototype.path=function(){return new it(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},t.prototype.name=function(){return this.name_},t.prototype.parent=function(){return this.parent_},t.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},t.prototype.updateChild_=function(t,e){var n=e.isEmpty(),r=g.contains(this.node_.children,t);n&&r?(delete this.node_.children[t],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[t]=e.node_,this.node_.childCount++,this.updateParents_())},t}();!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}(wn||(wn={})),yn.MAX_TRANSACTION_RETRIES_=25,yn.prototype.transactions_init_=function(){this.transactionQueueTree_=new Sn},yn.prototype.startTransaction=function(t,e,n,r){this.log_("transaction on "+t);var i=function(){},o=new bn(this,t);o.on("value",i);var a=function(){o.off("value",i)},s={path:t,update:e,onComplete:n,status:null,order:O(),applyLocally:r,retryCount:0,unwatcher:a,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},c=this.getLatestState_(t);s.currentInputSnapshot=c;var l=s.update(c.val());if(void 0===l){if(s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete){var h=new ie(s.currentInputSnapshot,new bn(this,s.path),Ut);s.onComplete(null,!1,h)}}else{gt("transaction failed: Data returned ",l,s.path),s.status=wn.RUN;var f=this.transactionQueueTree_.subTree(t),p=f.getValue()||[];p.push(s),f.setValue(p);var d=void 0;if("object"==typeof l&&null!==l&&g.contains(l,".priority"))d=g.safeGet(l,".priority"),g.assert(vt(d),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else{d=(this.serverSyncTree_.calcCompleteEventCache(t)||Yt.EMPTY_NODE).getPriority().val()}d=d;var v=this.generateServerValues(),y=u(l,d),_=ve(y,v);s.currentOutputSnapshotRaw=y,s.currentOutputSnapshotResolved=_,s.currentWriteId=this.getNextWriteId_();var m=this.serverSyncTree_.applyUserOverwrite(t,_,s.currentWriteId,s.applyLocally);this.eventQueue_.raiseEventsForChangedPath(t,m),this.sendReadyTransactions_()}},yn.prototype.getLatestState_=function(t,e){return this.serverSyncTree_.calcCompleteEventCache(t,e)||Yt.EMPTY_NODE},yn.prototype.sendReadyTransactions_=function(t){var e=this;if(void 0===t&&(t=this.transactionQueueTree_),t||this.pruneCompletedTransactionsBelowNode_(t),null!==t.getValue()){var n=this.buildTransactionQueue_(t);g.assert(n.length>0,"Sending zero length transaction queue");n.every(function(t){return t.status===wn.RUN})&&this.sendTransactionQueue_(t.path(),n)}else t.hasChildren()&&t.forEachChild(function(t){e.sendReadyTransactions_(t)})},yn.prototype.sendTransactionQueue_=function(t,e){for(var n=this,r=e.map(function(t){return t.currentWriteId}),i=this.getLatestState_(t,r),o=i,a=i.hash(),s=0;s<e.length;s++){var u=e[s];g.assert(u.status===wn.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),u.status=wn.SENT,u.retryCount++;var c=it.relativePath(t,u.path);o=o.updateChild(c,u.currentOutputSnapshotRaw)}var l=o.val(!0),h=t;this.server_.put(h.toString(),l,function(r){n.log_("transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<e.length;a++){if(e[a].status=wn.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(e[a].currentWriteId)),e[a].onComplete){var s=e[a].currentOutputSnapshotResolved,u=new bn(n,e[a].path),c=new ie(s,u,Ut);o.push(e[a].onComplete.bind(null,null,!0,c))}e[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(t)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(t,i);for(var a=0;a<o.length;a++)et(o[a])}else{if("datastale"===r)for(var a=0;a<e.length;a++)e[a].status===wn.SENT_NEEDS_ABORT?e[a].status=wn.NEEDS_ABORT:e[a].status=wn.RUN;else{j("transaction at "+h.toString()+" failed: "+r);for(var a=0;a<e.length;a++)e[a].status=wn.NEEDS_ABORT,e[a].abortReason=r}n.rerunTransactions_(t)}},a)},yn.prototype.rerunTransactions_=function(t){var e=this.getAncestorTransactionNode_(t),n=e.path(),r=this.buildTransactionQueue_(e);return this.rerunTransactionQueue_(r,n),n},yn.prototype.rerunTransactionQueue_=function(t,e){if(0!==t.length){for(var n=[],r=[],i=t.filter(function(t){return t.status===wn.RUN}),o=i.map(function(t){return t.currentWriteId}),a=0;a<t.length;a++){var s=t[a],c=it.relativePath(e,s.path),l=!1,h=void 0;if(g.assert(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),s.status===wn.NEEDS_ABORT)l=!0,h=s.abortReason,r=r.concat(this.serverSyncTree_.ackUserWrite(s.currentWriteId,!0));else if(s.status===wn.RUN)if(s.retryCount>=yn.MAX_TRANSACTION_RETRIES_)l=!0,h="maxretry",r=r.concat(this.serverSyncTree_.ackUserWrite(s.currentWriteId,!0));else{var f=this.getLatestState_(s.path,o);s.currentInputSnapshot=f;var p=t[a].update(f.val());if(void 0!==p){gt("transaction failed: Data returned ",p,s.path);var d=u(p),v="object"==typeof p&&null!=p&&g.contains(p,".priority");v||(d=d.updatePriority(f.getPriority()));var y=s.currentWriteId,_=this.generateServerValues(),m=ve(d,_);s.currentOutputSnapshotRaw=d,s.currentOutputSnapshotResolved=m,s.currentWriteId=this.getNextWriteId_(),o.splice(o.indexOf(y),1),r=r.concat(this.serverSyncTree_.applyUserOverwrite(s.path,m,s.currentWriteId,s.applyLocally)),r=r.concat(this.serverSyncTree_.ackUserWrite(y,!0))}else l=!0,h="nodata",r=r.concat(this.serverSyncTree_.ackUserWrite(s.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(e,r),r=[],l&&(t[a].status=wn.COMPLETED,function(t){setTimeout(t,Math.floor(0))}(t[a].unwatcher),t[a].onComplete))if("nodata"===h){var b=new bn(this,t[a].path),w=t[a].currentInputSnapshot,E=new ie(w,b,Ut);n.push(t[a].onComplete.bind(null,null,!1,E))}else n.push(t[a].onComplete.bind(null,new Error(h),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(var a=0;a<n.length;a++)et(n[a]);this.sendReadyTransactions_()}},yn.prototype.getAncestorTransactionNode_=function(t){for(var e,n=this.transactionQueueTree_;null!==(e=t.getFront())&&null===n.getValue();)n=n.subTree(e),t=t.popFront();return n},yn.prototype.buildTransactionQueue_=function(t){var e=[];return this.aggregateTransactionQueuesForNode_(t,e),e.sort(function(t,e){return t.order-e.order}),e},yn.prototype.aggregateTransactionQueuesForNode_=function(t,e){var n=this,r=t.getValue();if(null!==r)for(var i=0;i<r.length;i++)e.push(r[i]);t.forEachChild(function(t){n.aggregateTransactionQueuesForNode_(t,e)})},yn.prototype.pruneCompletedTransactionsBelowNode_=function(t){var e=this,n=t.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==wn.COMPLETED&&(n[r]=n[i],r++);n.length=r,t.setValue(n.length>0?n:null)}t.forEachChild(function(t){e.pruneCompletedTransactionsBelowNode_(t)})},yn.prototype.abortTransactions_=function(t){var e=this,n=this.getAncestorTransactionNode_(t).path(),r=this.transactionQueueTree_.subTree(t);return r.forEachAncestor(function(t){e.abortTransactionsOnNode_(t)}),this.abortTransactionsOnNode_(r),r.forEachDescendant(function(t){e.abortTransactionsOnNode_(t)}),n},yn.prototype.abortTransactionsOnNode_=function(t){var e=t.getValue();if(null!==e){for(var n=[],r=[],i=-1,o=0;o<e.length;o++)if(e[o].status===wn.SENT_NEEDS_ABORT);else if(e[o].status===wn.SENT)g.assert(i===o-1,"All SENT items should be at beginning of queue."),i=o,e[o].status=wn.SENT_NEEDS_ABORT,e[o].abortReason="set";else if(g.assert(e[o].status===wn.RUN,"Unexpected transaction status in abort"),e[o].unwatcher(),r=r.concat(this.serverSyncTree_.ackUserWrite(e[o].currentWriteId,!0)),e[o].onComplete){n.push(e[o].onComplete.bind(null,new Error("set"),!1,null))}-1===i?t.setValue(null):e.length=i+1,this.eventQueue_.raiseEventsForChangedPath(t.path(),r);for(var o=0;o<n.length;o++)et(n[o])}};var Tn,Cn=function(){function t(){this.repos_={},this.useRestClient_=!1}return t.getInstance=function(){return Tn||(Tn=new t),Tn},t.prototype.interrupt=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].interrupt()},t.prototype.resume=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].resume()},t.prototype.databaseFromApp=function(t,e){var n=e||t.options.databaseURL;void 0===n&&L("Can't determine Firebase Database URL.  Be sure to include databaseURL option when calling firebase.initializeApp().");var r=ut(n),i=r.repoInfo;return It("Invalid Firebase Database URL",1,r),r.path.isEmpty()||L("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(i,t).database},t.prototype.deleteRepo=function(t){var e=g.safeGet(this.repos_,t.app.name);e&&g.safeGet(e,t.repoInfo_.toURLString())===t||L("Database "+t.app.name+"("+t.repoInfo_+") has already been deleted."),t.interrupt(),delete e[t.repoInfo_.toURLString()]},t.prototype.createRepo=function(t,e){var n=g.safeGet(this.repos_,e.name);n||(n={},this.repos_[e.name]=n);var r=g.safeGet(n,t.toURLString());return r&&L("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),r=new yn(t,this.useRestClient_,e),n[t.toURLString()]=r,r},t.prototype.forceRestClient=function(t){this.useRestClient_=t},t}(),In=function(){function t(t){this.repo_=t,t instanceof yn||L("Don't call new Database() directly - please use firebase.database()."),this.root_=new bn(t,it.Empty),this.INTERNAL=new On(this)}return Object.defineProperty(t.prototype,"app",{get:function(){return this.repo_.app},enumerable:!0,configurable:!0}),t.prototype.ref=function(t){return this.checkDeleted_("ref"),g.validateArgCount("database.ref",0,1,arguments.length),t instanceof bn?this.refFromURL(t.toString()):void 0!==t?this.root_.child(t):this.root_},t.prototype.refFromURL=function(t){var e="database.refFromURL";this.checkDeleted_(e),g.validateArgCount(e,1,1,arguments.length);var n=ut(t);It(e,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&L(e+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},t.prototype.checkDeleted_=function(t){null===this.repo_&&L("Cannot call "+t+" on a deleted database.")},t.prototype.goOffline=function(){g.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},t.prototype.goOnline=function(){g.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},t.ServerValue={TIMESTAMP:{".sv":"timestamp"}},t}(),On=function(){function t(t){this.database=t}return t.prototype.delete=function(){return m.__awaiter(this,void 0,void 0,function(){return m.__generator(this,function(t){return this.database.checkDeleted_("delete"),Cn.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]})})},t}(),An=function(){un.forceDisallow(),on.forceAllow()},Rn=function(){on.forceDisallow()},Nn=function(){return un.isAvailable()},Pn=function(t,e){t.repo.persistentConnection_.securityDebugCallback_=e},kn=function(t,e){t.repo.stats(e)},Dn=function(t,e){t.repo.statsIncrementCounter(e)},xn=function(t){return t.repo.dataUpdateCount},Fn=function(t,e){return t.repo.interceptServerData_(e)},Ln=Object.freeze({forceLongPolling:An,forceWebSockets:Rn,isWebSocketsAvailable:Nn,setSecurityDebugCallback:Pn,stats:kn,statsIncrementCounter:Dn,dataUpdateCount:xn,interceptServerData:Fn}),jn=dn;dn.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)},dn.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};var Mn=ln,Un=function(t){var e=dn.prototype.put;return dn.prototype.put=function(n,r,i,o){void 0!==o&&(o=t()),e.call(this,n,r,i,o)},function(){dn.prototype.put=e}},Vn=st,Wn=function(t){return t.queryIdentifier()},Bn=function(t){return t.repo.persistentConnection_.listens_},qn=function(t){Cn.getInstance().forceRestClient(t)},Hn=Object.freeze({DataConnection:jn,RealTimeConnection:Mn,hijackHash:Un,ConnectionTarget:Vn,queryIdentifier:Wn,listens:Bn,forceRestClient:qn}),Kn=In.ServerValue;c(b),e.registerDatabase=c,e.Database=In,e.Query=ce,e.Reference=bn,e.enableLogging=k,e.ServerValue=Kn,e.DataSnapshot=ie,e.OnDisconnect=At}).call(e,n(177))},function(t,e,n){"use strict";function r(t){o.forEach(function(e){e.logLevel=t})}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"setLogLevel",function(){return r}),n.d(e,"Logger",function(){return u}),n.d(e,"LogLevel",function(){return i});var i,o=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(i||(i={}));var a=i.INFO,s=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(e<t.logLevel)){var o=(new Date).toISOString();switch(e){case i.DEBUG:case i.VERBOSE:console.log.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case i.INFO:console.info.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case i.WARN:console.warn.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;case i.ERROR:console.error.apply(console,["["+o+"]  "+t.name+":"].concat(n));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+e+")")}}},u=function(){function t(t){this.name=t,this._logLevel=a,this._logHandler=s,o.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in i))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!0,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.DEBUG].concat(t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.VERBOSE].concat(t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.INFO].concat(t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.WARN].concat(t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.ERROR].concat(t))},t}()},function(t,e,n){"use strict";function r(t,e){if(null==t||null==e)return!1;if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(var n=new DataView(t),r=new DataView(e),i=0;i<t.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function i(t){var e=new Uint8Array(t);return btoa(String.fromCharCode.apply(null,e))}function o(t){return i(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function a(t){for(var e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(n),i=new Uint8Array(r.length),o=0;o<r.length;++o)i[o]=r.charCodeAt(o);return i}function s(t){if(t.objectStoreNames.contains(A)){var e=t.transaction(A),n=e.objectStore(A),r=new I,i=n.openCursor();i.onerror=function(t){console.warn("Unable to cleanup old IDB.",t)},i.onsuccess=function(){var e=i.result;if(e){var n=e.value;r.deleteToken(n.fcmSenderId,n.fcmToken,n.fcmPushSet),e.continue()}else t.close(),indexedDB.deleteDatabase(O)}}}function u(){var t=indexedDB.open(O);t.onerror=function(t){},t.onsuccess=function(e){s(t.result)}}function c(t){return new Promise(function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function l(t){if(t.fcmToken&&("string"!=typeof t.fcmToken||0===t.fcmToken.length))throw E.create(b.BAD_TOKEN);if(t.swScope&&("string"!=typeof t.swScope||0===t.swScope.length))throw E.create(b.BAD_SCOPE);if(t.vapidKey&&(!(t.vapidKey instanceof Uint8Array)||65!==t.vapidKey.length))throw E.create(b.BAD_VAPID_KEY);if(t.endpoint&&("string"!=typeof t.endpoint||0===t.endpoint.length))throw E.create(b.BAD_SUBSCRIPTION);if(t.auth&&!(t.auth instanceof ArrayBuffer))throw E.create(b.BAD_SUBSCRIPTION);if(t.p256dh&&!(t.p256dh instanceof ArrayBuffer))throw E.create(b.BAD_SUBSCRIPTION);if(t.fcmSenderId&&("string"!=typeof t.fcmSenderId||0===t.fcmSenderId.length))throw E.create(b.BAD_SENDER_ID);if(t.fcmPushSet&&("string"!=typeof t.fcmPushSet||0===t.fcmPushSet.length))throw E.create(b.BAD_PUSH_SET)}function h(t,e,n){if(!r(e.buffer,n.vapidKey.buffer))return!1;var i=t.endpoint===n.endpoint,o=r(t.getKey("auth"),n.auth),a=r(t.getKey("p256dh"),n.p256dh);return i&&o&&a}function f(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function p(t,e){return n={},n[y.TYPE_OF_MSG]=t,n[y.DATA]=e,n;var n}function d(t){var e=function(t){return self&&"ServiceWorkerGlobalScope"in self?new x(t):new F(t)},n={Messaging:F};t.INTERNAL.registerService("messaging",e,n)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"registerMessaging",function(){return d});var v,y,g=n(179),_=(n.n(g),n(294)),m=n(101),b={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",TOKEN_UNSUBSCRIBE_FAILED:"token-unsubscribe-failed",TOKEN_UPDATE_FAILED:"token-update-failed",TOKEN_UPDATE_NO_TOKEN:"token-update-no-token",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key",INVALID_PUBLIC_VAPID_KEY:"invalid-public-vapid-key",USE_PUBLIC_KEY_BEFORE_GET_TOKEN:"use-public-key-before-get-token",PUBLIC_KEY_DECRYPTION_FAILED:"public-vapid-key-decryption-failed"},w=(v={},v[b.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",v[b.AVAILABLE_IN_SW]="This method is available in a service worker context.",v[b.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",v[b.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",v[b.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",v[b.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",v[b.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",v[b.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",v[b.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",v[b.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",v[b.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",v[b.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",v[b.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",v[b.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",v[b.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",v[b.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",v[b.TOKEN_UNSUBSCRIBE_FAILED]="A problem occured while unsubscribing the user from FCM: {$message}",v[b.TOKEN_UPDATE_FAILED]="A problem occured while updating the user from FCM: {$message}",v[b.TOKEN_UPDATE_NO_TOKEN]="FCM returned no token when updating the user to push.",v[b.USE_SW_BEFORE_GET_TOKEN]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",v[b.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",v[b.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",v[b.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",v[b.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroundMessageHandler() must be a function.",v[b.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",v[b.UNABLE_TO_RESUBSCRIBE]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",v[b.NO_FCM_TOKEN_FOR_RESUBSCRIBE]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",v[b.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",v[b.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",v[b.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",v[b.BAD_SCOPE]="The service worker scope must be a string with at least one character.",v[b.BAD_VAPID_KEY]="The public VAPID key is not a Uint8Array with 65 bytes.",v[b.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",v[b.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",v[b.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",v[b.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",v[b.INVALID_PUBLIC_VAPID_KEY]="The public VAPID key must be a string.",v[b.PUBLIC_KEY_DECRYPTION_FAILED]="The public VAPID key did not equal 65 bytes when decrypted.",v),E=new g.ErrorFactory("messaging","Messaging",w),S=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),T="https://fcm.googleapis.com";!function(t){t.TYPE_OF_MSG="firebase-messaging-msg-type",t.DATA="firebase-messaging-msg-data"}(y||(y={}));var C;!function(t){t.PUSH_MSG_RECEIVED="push-msg-received",t.NOTIFICATION_CLICKED="notification-clicked"}(C||(C={}));var I=function(){function t(){}return t.prototype.getToken=function(t,e,r){return n.i(_.__awaiter)(this,void 0,void 0,function(){var i,a,s,u,c,l,h,f,p,d;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:i=o(e.getKey("p256dh")),a=o(e.getKey("auth")),s="authorized_entity="+t+"&endpoint="+e.endpoint+"&encryption_key="+i+"&encryption_auth="+a,r!==S&&(u=o(r),s+="&application_pub_key="+u),c=new Headers,c.append("Content-Type","application/x-www-form-urlencoded"),l={method:"POST",headers:c,body:s},n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(T+"/fcm/connect/subscribe",l)];case 2:return f=n.sent(),[4,f.json()];case 3:return h=n.sent(),[3,5];case 4:throw p=n.sent(),E.create(b.TOKEN_SUBSCRIBE_FAILED);case 5:if(h.error)throw d=h.error.message,E.create(b.TOKEN_SUBSCRIBE_FAILED,{message:d});if(!h.token)throw E.create(b.TOKEN_SUBSCRIBE_NO_TOKEN);if(!h.pushSet)throw E.create(b.TOKEN_SUBSCRIBE_NO_PUSH_SET);return[2,{token:h.token,pushSet:h.pushSet}]}})})},t.prototype.updateToken=function(t,e,r,i,a){return n.i(_.__awaiter)(this,void 0,void 0,function(){var s,u,c,l,h,f,p,d,v,y;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:s=o(i.getKey("p256dh")),u=o(i.getKey("auth")),c="push_set="+r+"&token="+e+"&authorized_entity="+t+"&endpoint="+i.endpoint+"&encryption_key="+s+"&encryption_auth="+u,a!==S&&(l=o(a),c+="&application_pub_key="+l),h=new Headers,h.append("Content-Type","application/x-www-form-urlencoded"),f={method:"POST",headers:h,body:c},n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(T+"/fcm/connect/subscribe",f)];case 2:return d=n.sent(),[4,d.json()];case 3:return p=n.sent(),[3,5];case 4:throw v=n.sent(),E.create(b.TOKEN_UPDATE_FAILED);case 5:if(p.error)throw y=p.error.message,E.create(b.TOKEN_UPDATE_FAILED,{message:y});if(!p.token)throw E.create(b.TOKEN_UPDATE_NO_TOKEN);return[2,p.token]}})})},t.prototype.deleteToken=function(t,e,r){return n.i(_.__awaiter)(this,void 0,void 0,function(){var i,o,a,s,u,c,l;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:i="authorized_entity="+t+"&token="+e+"&pushSet="+r,o=new Headers,o.append("Content-Type","application/x-www-form-urlencoded"),a={method:"POST",headers:o,body:i},n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(T+"/fcm/connect/unsubscribe",a)];case 2:return s=n.sent(),[4,s.json()];case 3:if(u=n.sent(),u.error)throw c=u.error.message,E.create(b.TOKEN_UNSUBSCRIBE_FAILED,{message:c});return[3,5];case 4:throw l=n.sent(),E.create(b.TOKEN_UNSUBSCRIBE_FAILED);case 5:return[2]}})})},t}(),O="undefined",A="fcm_token_object_Store",R=function(){function t(){this.dbPromise=null}return t.prototype.get=function(t){return this.createTransaction(function(e){return e.get(t)})},t.prototype.getIndex=function(t,e){function n(n){return n.index(t).get(e)}return this.createTransaction(n)},t.prototype.put=function(t){return this.createTransaction(function(e){return e.put(t)},"readwrite")},t.prototype.delete=function(t){return this.createTransaction(function(e){return e.delete(t)},"readwrite")},t.prototype.closeDatabase=function(){return n.i(_.__awaiter)(this,void 0,void 0,function(){var t;return n.i(_.__generator)(this,function(e){switch(e.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:t=e.sent(),t.close(),this.dbPromise=null,e.label=2;case 2:return[2]}})})},t.prototype.createTransaction=function(t,e){return n.i(_.__awaiter)(this,void 0,void 0,function(){var r,i,o,a;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return[4,this.getDb()];case 1:return r=n.sent(),i=r.transaction(this.objectStoreName,e),o=i.objectStore(this.objectStoreName),[4,c(t(o))];case 2:return a=n.sent(),[2,new Promise(function(t,e){i.oncomplete=function(){t(a)},i.onerror=function(){e(i.error)}})]}})})},t.prototype.getDb=function(){var t=this;return this.dbPromise||(this.dbPromise=new Promise(function(e,n){var r=indexedDB.open(t.dbName,t.dbVersion);r.onsuccess=function(){e(r.result)},r.onerror=function(){t.dbPromise=null,n(r.error)},r.onupgradeneeded=function(e){return t.onDbUpgrade(r,e)}})),this.dbPromise},t}(),N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dbName="fcm_token_details_db",e.dbVersion=3,e.objectStoreName="fcm_token_object_Store",e}return n.i(_.__extends)(e,t),e.prototype.onDbUpgrade=function(t,e){var r=t.result;switch(e.oldVersion){case 0:var i=r.createObjectStore(this.objectStoreName,{keyPath:"swScope"});i.createIndex("fcmSenderId","fcmSenderId",{unique:!1}),i.createIndex("fcmToken","fcmToken",{unique:!0});case 1:u();case 2:var i=t.transaction.objectStore(this.objectStoreName),o=i.openCursor();o.onsuccess=function(){var t=o.result;if(t){var e=t.value,r=n.i(_.__assign)({},e);e.createTime||(r.createTime=Date.now()),"string"==typeof e.vapidKey&&(r.vapidKey=a(e.vapidKey)),"string"==typeof e.auth&&(r.auth=a(e.auth).buffer),"string"==typeof e.auth&&(r.p256dh=a(e.p256dh).buffer),t.update(r),t.continue()}}}},e.prototype.getTokenDetailsFromToken=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){return n.i(_.__generator)(this,function(e){if(!t)throw E.create(b.BAD_TOKEN);return l({fcmToken:t}),[2,this.getIndex("fcmToken",t)]})})},e.prototype.getTokenDetailsFromSWScope=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){return n.i(_.__generator)(this,function(e){if(!t)throw E.create(b.BAD_SCOPE);return l({swScope:t}),[2,this.get(t)]})})},e.prototype.saveTokenDetails=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){return n.i(_.__generator)(this,function(e){if(!t.swScope)throw E.create(b.BAD_SCOPE);if(!t.vapidKey)throw E.create(b.BAD_VAPID_KEY);if(!t.endpoint||!t.auth||!t.p256dh)throw E.create(b.BAD_SUBSCRIPTION);if(!t.fcmSenderId)throw E.create(b.BAD_SENDER_ID);if(!t.fcmToken)throw E.create(b.BAD_TOKEN);if(!t.fcmPushSet)throw E.create(b.BAD_PUSH_SET);return l(t),[2,this.put(t)]})})},e.prototype.deleteToken=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var e;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return"string"!=typeof t||0===t.length?[2,Promise.reject(E.create(b.INVALID_DELETE_TOKEN))]:[4,this.getTokenDetailsFromToken(t)];case 1:if(!(e=n.sent()))throw E.create(b.DELETE_TOKEN_NOT_FOUND);return[4,this.delete(e.swScope)];case 2:return n.sent(),[2,e]}})})},e}(R),P=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dbName="fcm_vapid_details_db",e.dbVersion=1,e.objectStoreName="fcm_vapid_object_Store",e}return n.i(_.__extends)(e,t),e.prototype.onDbUpgrade=function(t){t.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},e.prototype.getVapidFromSWScope=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var e;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:if("string"!=typeof t||0===t.length)throw E.create(b.BAD_SCOPE);return[4,this.get(t)];case 1:return e=n.sent(),[2,e?e.vapidKey:void 0]}})})},e.prototype.saveVapidDetails=function(t,e){return n.i(_.__awaiter)(this,void 0,void 0,function(){var r;return n.i(_.__generator)(this,function(n){if("string"!=typeof t||0===t.length)throw E.create(b.BAD_SCOPE);if(null===e||65!==e.length)throw E.create(b.BAD_VAPID_KEY);return r={swScope:t,vapidKey:e},[2,this.put(r)]})})},e.prototype.deleteVapidDetails=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var e;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(t)];case 1:if(!(e=n.sent()))throw E.create(b.DELETE_SCOPE_NOT_FOUND);return[4,this.delete(t)];case 2:return n.sent(),[2,e]}})})},e}(R),k="messagingSenderId",D=function(){function t(t){var e=this;if(!t.options[k]||"string"!=typeof t.options[k])throw E.create(b.BAD_SENDER_ID);this.messagingSenderId=t.options[k],this.tokenDetailsModel=new N,this.vapidDetailsModel=new P,this.iidModel=new I,this.app=t,this.INTERNAL={delete:function(){return e.delete()}}}return t.prototype.getToken=function(){return n.i(_.__awaiter)(this,void 0,void 0,function(){var t,e,r,i,o;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return t=this.getNotificationPermission_(),"granted"!==t?"denied"===t?[2,Promise.reject(E.create(b.NOTIFICATIONS_BLOCKED))]:[2,Promise.resolve(null)]:[4,this.getSWRegistration_()];case 1:return e=n.sent(),[4,this.getPublicVapidKey_()];case 2:return r=n.sent(),[4,this.getPushSubscription(e,r)];case 3:return i=n.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(e.scope)];case 4:return o=n.sent(),o?[2,this.manageExistingToken(e,i,r,o)]:[2,this.getNewToken(e,i,r)]}})})},t.prototype.manageExistingToken=function(t,e,r,i){return n.i(_.__awaiter)(this,void 0,void 0,function(){var o,a;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return o=h(e,r,i),o?(a=Date.now(),a<i.createTime+6048e5?[2,i.fcmToken]:[2,this.updateToken(t,e,r,i)]):[4,this.deleteTokenFromDB(i.fcmToken)];case 1:return n.sent(),[2,this.getNewToken(t,e,r)]}})})},t.prototype.updateToken=function(t,e,r,i){return n.i(_.__awaiter)(this,void 0,void 0,function(){var o,a,s;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,i.fcmToken,i.fcmPushSet,e,r)];case 1:return o=n.sent(),a={swScope:t.scope,vapidKey:r,fcmSenderId:this.messagingSenderId,fcmToken:o,fcmPushSet:i.fcmPushSet,createTime:Date.now(),endpoint:e.endpoint,auth:e.getKey("auth"),p256dh:e.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(a)];case 2:return n.sent(),[4,this.vapidDetailsModel.saveVapidDetails(t.scope,r)];case 3:return n.sent(),[2,o];case 4:return s=n.sent(),[4,this.deleteToken(i.fcmToken)];case 5:throw n.sent(),s;case 6:return[2]}})})},t.prototype.getNewToken=function(t,e,r){return n.i(_.__awaiter)(this,void 0,void 0,function(){var i,o;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,e,r)];case 1:return i=n.sent(),o={swScope:t.scope,vapidKey:r,fcmSenderId:this.messagingSenderId,fcmToken:i.token,fcmPushSet:i.pushSet,createTime:Date.now(),endpoint:e.endpoint,auth:e.getKey("auth"),p256dh:e.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(o)];case 2:return n.sent(),[4,this.vapidDetailsModel.saveVapidDetails(t.scope,r)];case 3:return n.sent(),[2,i.token]}})})},t.prototype.deleteToken=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var e,r;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return[4,this.deleteTokenFromDB(t)];case 1:return n.sent(),[4,this.getSWRegistration_()];case 2:return e=n.sent(),e?[4,e.pushManager.getSubscription()]:[3,4];case 3:if(r=n.sent())return[2,r.unsubscribe()];n.label=4;case 4:return[2,!0]}})})},t.prototype.deleteTokenFromDB=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var e;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(t)];case 1:return e=n.sent(),[4,this.iidModel.deleteToken(e.fcmSenderId,e.fcmToken,e.fcmPushSet)];case 2:return n.sent(),[2]}})})},t.prototype.getPushSubscription=function(t,e){return t.pushManager.getSubscription().then(function(n){return n||t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e})})},t.prototype.requestPermission=function(){throw E.create(b.AVAILABLE_IN_WINDOW)},t.prototype.useServiceWorker=function(t){throw E.create(b.AVAILABLE_IN_WINDOW)},t.prototype.usePublicVapidKey=function(t){throw E.create(b.AVAILABLE_IN_WINDOW)},t.prototype.onMessage=function(t,e,n){throw E.create(b.AVAILABLE_IN_WINDOW)},t.prototype.onTokenRefresh=function(t,e,n){throw E.create(b.AVAILABLE_IN_WINDOW)},t.prototype.setBackgroundMessageHandler=function(t){throw E.create(b.AVAILABLE_IN_SW)},t.prototype.delete=function(){return n.i(_.__awaiter)(this,void 0,void 0,function(){return n.i(_.__generator)(this,function(t){switch(t.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return t.sent(),[2]}})})},t.prototype.getNotificationPermission_=function(){return Notification.permission},t.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},t.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},t.prototype.getIIDModel=function(){return this.iidModel},t}(),x=function(t){function e(e){var n=t.call(this,e)||this;return n.bgMessageHandler=null,self.addEventListener("push",function(t){n.onPush(t)}),self.addEventListener("pushsubscriptionchange",function(t){n.onSubChange(t)}),self.addEventListener("notificationclick",function(t){n.onNotificationClick(t)}),n}return n.i(_.__extends)(e,t),e.prototype.onPush=function(t){t.waitUntil(this.onPush_(t))},e.prototype.onSubChange=function(t){t.waitUntil(this.onSubChange_(t))},e.prototype.onNotificationClick=function(t){t.waitUntil(this.onNotificationClick_(t))},e.prototype.onPush_=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var e,r,i,o,a;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:if(!t.data)return[2];try{e=t.data.json()}catch(t){return[2]}return[4,this.hasVisibleClients_()];case 1:return(r=n.sent())?e.notification||this.bgMessageHandler?[2,this.sendMessageToWindowClients_(e)]:[2]:(i=this.getNotificationData_(e))?(o=i.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return a=n.sent(),[2,a.showNotification(o,i)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(e)]:[3,5];case 4:return n.sent(),[2];case 5:return[2]}})})},e.prototype.onSubChange_=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var t,e,r,i,o;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return t=n.sent(),[3,3];case 2:throw e=n.sent(),E.create(b.UNABLE_TO_RESUBSCRIBE,{message:e});case 3:return n.trys.push([3,5,,8]),[4,t.pushManager.getSubscription()];case 4:return n.sent(),[3,8];case 5:return r=n.sent(),i=this.getTokenDetailsModel(),[4,i.getTokenDetailsFromSWScope(t.scope)];case 6:if(!(o=n.sent()))throw r;return[4,this.deleteToken(o.fcmToken)];case 7:throw n.sent(),r;case 8:return[2]}})})},e.prototype.onNotificationClick_=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var e,r,i,o;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return t.notification&&t.notification.data&&t.notification.data.FCM_MSG?(t.stopImmediatePropagation(),t.notification.close(),e=t.notification.data.FCM_MSG,e.notification?(r=e.notification.click_action,r?[4,this.getWindowClient_(r)]:[2]):[2]):[2];case 1:return i=n.sent(),i?[3,3]:[4,self.clients.openWindow(r)];case 2:return i=n.sent(),[3,5];case 3:return[4,i.focus()];case 4:i=n.sent(),n.label=5;case 5:return i?(delete e.notification,o=p(C.NOTIFICATION_CLICKED,e),[2,this.attemptToMessageClient_(i,o)]):[2]}})})},e.prototype.getNotificationData_=function(t){if(t&&"object"==typeof t.notification){var e=n.i(_.__assign)({},t.notification);return e.data=(r={},r.FCM_MSG=t,r),e;var r}},e.prototype.setBackgroundMessageHandler=function(t){if(!t||"function"!=typeof t)throw E.create(b.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler=t},e.prototype.getWindowClient_=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var e,r,i,o,a;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return e=new URL(t,self.location.href).href,[4,f()];case 1:for(r=n.sent(),i=null,o=0;o<r.length;o++)if((a=new URL(r[o].url,self.location.href).href)===e){i=r[o];break}return[2,i]}})})},e.prototype.attemptToMessageClient_=function(t,e){return n.i(_.__awaiter)(this,void 0,void 0,function(){return n.i(_.__generator)(this,function(n){if(!t)throw E.create(b.NO_WINDOW_CLIENT_TO_MSG);return t.postMessage(e),[2]})})},e.prototype.hasVisibleClients_=function(){return n.i(_.__awaiter)(this,void 0,void 0,function(){var t;return n.i(_.__generator)(this,function(e){switch(e.label){case 0:return[4,f()];case 1:return t=e.sent(),[2,t.some(function(t){return"visible"===t.visibilityState})]}})})},e.prototype.sendMessageToWindowClients_=function(t){return n.i(_.__awaiter)(this,void 0,void 0,function(){var e,r,i=this;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return[4,f()];case 1:return e=n.sent(),r=p(C.PUSH_MSG_RECEIVED,t),[4,Promise.all(e.map(function(t){return i.attemptToMessageClient_(t,r)}))];case 2:return n.sent(),[2]}})})},e.prototype.getSWRegistration_=function(){return n.i(_.__awaiter)(this,void 0,void 0,function(){return n.i(_.__generator)(this,function(t){return[2,self.registration]})})},e.prototype.getPublicVapidKey_=function(){return n.i(_.__awaiter)(this,void 0,void 0,function(){var t,e;return n.i(_.__generator)(this,function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()];case 1:if(!(t=n.sent()))throw E.create(b.SW_REGISTRATION_EXPECTED);return[4,this.getVapidDetailsModel().getVapidFromSWScope(t.scope)];case 2:return e=n.sent(),null==e?[2,S]:[2,e]}})})},e}(D),F=function(t){function e(e){var r=t.call(this,e)||this;return r.registrationToUse=null,r.publicVapidKeyToUse=null,r.manifestCheckPromise=null,r.messageObserver=null,r.tokenRefreshObserver=null,r.onMessageInternal=n.i(g.createSubscribe)(function(t){r.messageObserver=t}),r.onTokenRefreshInternal=n.i(g.createSubscribe)(function(t){r.tokenRefreshObserver=t}),r.setupSWMessageListener_(),r}return n.i(_.__extends)(e,t),e.prototype.getToken=function(){var e=this;return this.isSupported_()?this.manifestCheck_().then(function(){return t.prototype.getToken.call(e)}):Promise.reject(E.create(b.UNSUPPORTED_BROWSER))},e.prototype.manifestCheck_=function(){if(this.manifestCheckPromise)return this.manifestCheckPromise;var t=document.querySelector('link[rel="manifest"]');return this.manifestCheckPromise=t?fetch(t.href).then(function(t){return t.json()}).catch(function(){}).then(function(t){if(t&&t.gcm_sender_id&&"103953800507"!==t.gcm_sender_id)throw E.create(b.INCORRECT_GCM_SENDER_ID)}):Promise.resolve(),this.manifestCheckPromise},e.prototype.requestPermission=function(){return n.i(_.__awaiter)(this,void 0,void 0,function(){return n.i(_.__generator)(this,function(t){return"granted"===Notification.permission?[2]:[2,new Promise(function(t,e){var n=function(n){return"granted"===n?t():e("denied"===n?E.create(b.PERMISSION_BLOCKED):E.create(b.PERMISSION_DEFAULT))},r=Notification.requestPermission(n);r&&r.then(n)})]})})},e.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw E.create(b.SW_REGISTRATION_EXPECTED);if(null!=this.registrationToUse)throw E.create(b.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse=t},e.prototype.usePublicVapidKey=function(t){if("string"!=typeof t)throw E.create(b.INVALID_PUBLIC_VAPID_KEY);if(null!=this.publicVapidKeyToUse)throw E.create(b.USE_PUBLIC_KEY_BEFORE_GET_TOKEN);var e=a(t);if(65!==e.length)throw E.create(b.PUBLIC_KEY_DECRYPTION_FAILED);this.publicVapidKeyToUse=e},e.prototype.onMessage=function(t,e,n){return"function"==typeof t?this.onMessageInternal(t,e,n):this.onMessageInternal(t)},e.prototype.onTokenRefresh=function(t,e,n){return"function"==typeof t?this.onTokenRefreshInternal(t,e,n):this.onTokenRefreshInternal(t)},e.prototype.waitForRegistrationToActivate_=function(t){var e=t.installing||t.waiting||t.active;return new Promise(function(n,r){if(!e)return void r(E.create(b.NO_SW_IN_REG));if("activated"===e.state)return void n(t);if("redundant"===e.state)return void r(E.create(b.SW_REG_REDUNDANT));var i=function(){if("activated"===e.state)n(t);else{if("redundant"!==e.state)return;r(E.create(b.SW_REG_REDUNDANT))}e.removeEventListener("statechange",i)};e.addEventListener("statechange",i)})},e.prototype.getSWRegistration_=function(){var t=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(t){throw E.create(b.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message})}).then(function(e){return t.waitForRegistrationToActivate_(e).then(function(){return t.registrationToUse=e,e.update(),e})}))},e.prototype.getPublicVapidKey_=function(){return this.publicVapidKeyToUse?Promise.resolve(this.publicVapidKeyToUse):Promise.resolve(S)},e.prototype.setupSWMessageListener_=function(){var t=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(e){if(e.data&&e.data[y.TYPE_OF_MSG]){var n=e.data;switch(n[y.TYPE_OF_MSG]){case C.PUSH_MSG_RECEIVED:case C.NOTIFICATION_CLICKED:var r=n[y.DATA];t.messageObserver&&t.messageObserver.next(r)}}},!1)},e.prototype.isSupported_=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")},e}(D);d(m.default)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){function r(){}function i(t,e){return function(){t.apply(e,arguments)}}function o(t){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(t,this)}function a(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?s:u)(e.promise,t._value);var r;try{r=n(t._value)}catch(t){return void u(e.promise,t)}s(e.promise,r)})}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(i(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)a(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function h(t,e){var n=!1;try{t(function(t){n||(n=!0,s(e,t))},function(t){n||(n=!0,u(e,t))})}catch(t){if(n)return;n=!0,u(e,t)}}function f(t,e){return e={exports:{}},t(e,e.exports),e.exports}var p=n(520),d=(n.n(p),setTimeout);o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(r);return a(this,new l(t,e,n)),n},o.prototype.finally=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})},o.all=function(t){return new o(function(e,n){function r(t,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(t,e)},n)}i[t]=a,0==--o&&e(i)}catch(t){n(t)}}if(!t||void 0===t.length)throw new TypeError("Promise.all accepts an array");var i=Array.prototype.slice.call(t);if(0===i.length)return e([]);for(var o=i.length,a=0;a<i.length;a++)r(a,i[a])})},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o(function(e){e(t)})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){for(var r=0,i=t.length;r<i;r++)t[r].then(e,n)})},o._immediateFn="function"==typeof t&&function(e){t(e)}||function(t){d(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var v=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw new Error("unable to locate global object")}();v.Promise||(v.Promise=o);var y=f(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),g=f(function(t){var e=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=e)}),_=(g.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),m=function(t){if(!_(t))throw TypeError(t+" is not an object!");return t},b=function(t){try{return!!t()}catch(t){return!0}},w=!b(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),E=y.document,S=_(E)&&_(E.createElement),T=function(t){return S?E.createElement(t):{}},C=!w&&!b(function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a}),I=function(t,e){if(!_(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!_(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!_(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!_(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},O=Object.defineProperty,A=w?Object.defineProperty:function(t,e,n){if(m(t),e=I(e,!0),m(n),C)try{return O(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t},R={f:A},N=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},P=w?function(t,e,n){return R.f(t,e,N(1,n))}:function(t,e,n){return t[e]=n,t},k={}.hasOwnProperty,D=function(t,e){return k.call(t,e)},x=0,F=Math.random(),L=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++x+F).toString(36))},j=f(function(t){var e=L("src"),n=Function.toString,r=(""+n).split("toString");g.inspectSource=function(t){return n.call(t)},(t.exports=function(t,n,i,o){var a="function"==typeof i;a&&(D(i,"name")||P(i,"name",n)),t[n]!==i&&(a&&(D(i,e)||P(i,e,t[n]?""+t[n]:r.join(String(n)))),t===y?t[n]=i:o?t[n]?t[n]=i:P(t,n,i):(delete t[n],P(t,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[e]||n.call(this)})}),M=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},U=function(t,e,n){if(M(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},V=function(t,e,n){var r,i,o,a,s=t&V.F,u=t&V.G,c=t&V.S,l=t&V.P,h=t&V.B,f=u?y:c?y[e]||(y[e]={}):(y[e]||{}).prototype,p=u?g:g[e]||(g[e]={}),d=p.prototype||(p.prototype={});u&&(n=e);for(r in n)i=!s&&f&&void 0!==f[r],o=(i?f:n)[r],a=h&&i?U(o,y):l&&"function"==typeof o?U(Function.call,o):o,f&&j(f,r,o,t&V.U),p[r]!=o&&P(p,r,a),l&&d[r]!=o&&(d[r]=o)};y.core=g,V.F=1,V.G=2,V.S=4,V.P=8,V.B=16,V.W=32,V.U=64,V.R=128;var W=V,B={}.toString,q=function(t){return B.call(t).slice(8,-1)},H=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==q(t)?t.split(""):Object(t)},K=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t},G=function(t){return Object(K(t))},z=Math.ceil,Q=Math.floor,Y=function(t){return isNaN(t=+t)?0:(t>0?Q:z)(t)},X=Math.min,$=function(t){return t>0?X(Y(t),9007199254740991):0},J=Array.isArray||function(t){return"Array"==q(t)},Z=y["__core-js_shared__"]||(y["__core-js_shared__"]={}),tt=function(t){return Z[t]||(Z[t]={})},et=f(function(t){var e=tt("wks"),n=y.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:L)("Symbol."+t))}).store=e}),nt=et("species"),rt=function(t){var e;return J(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!J(e.prototype)||(e=void 0),_(e)&&null===(e=e[nt])&&(e=void 0)),void 0===e?Array:e},it=function(t,e){return new(rt(t))(e)},ot=function(t,e){var n=1==t,r=2==t,i=3==t,o=4==t,a=6==t,s=5==t||a,u=e||it;return function(e,c,l){for(var h,f,p=G(e),d=H(p),v=U(c,l,3),y=$(d.length),g=0,_=n?u(e,y):r?u(e,0):void 0;y>g;g++)if((s||g in d)&&(h=d[g],f=v(h,g,p),t))if(n)_[g]=f;else if(f)switch(t){case 3:return!0;case 5:return h;case 6:return g;case 2:_.push(h)}else if(o)return!1;return a?-1:i||o?o:_}},at=et("unscopables"),st=Array.prototype;void 0==st[at]&&P(st,at,{});var ut=function(t){st[at][t]=!0},ct=ot(5),lt=!0;"find"in[]&&Array(1).find(function(){lt=!1}),W(W.P+W.F*lt,"Array",{find:function(t){return ct(this,t,arguments.length>1?arguments[1]:void 0)}}),ut("find");var ht=(g.Array.find,ot(6)),ft=!0;"findIndex"in[]&&Array(1).findIndex(function(){ft=!1}),W(W.P+W.F*ft,"Array",{findIndex:function(t){return ht(this,t,arguments.length>1?arguments[1]:void 0)}}),ut("findIndex");var pt=(g.Array.findIndex,et("match")),dt=function(t){var e;return _(t)&&(void 0!==(e=t[pt])?!!e:"RegExp"==q(t))},vt=function(t,e,n){if(dt(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(K(t))},yt=et("match"),gt="".startsWith;W(W.P+W.F*function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[yt]=!1,!"/./"[t](e)}catch(t){}}return!0}("startsWith"),"String",{startsWith:function(t){var e=vt(this,t,"startsWith"),n=$(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return gt?gt.call(e,r,n):e.slice(n,n+r.length)===r}});g.String.startsWith}.call(e,n(1249).setImmediate,n(36))},function(t,e){!function(t){"use strict";function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!=typeof t&&(t=String(t)),t}function r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return g.iterable&&(e[Symbol.iterator]=function(){return e}),e}function i(t){this.map={},t instanceof i?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function o(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function a(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function s(t){var e=new FileReader,n=a(e);return e.readAsArrayBuffer(t),n}function u(t){var e=new FileReader,n=a(e);return e.readAsText(t),n}function c(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}function l(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(g.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(g.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(g.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(g.arrayBuffer&&g.blob&&m(t))this._bodyArrayBuffer=l(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!g.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!b(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=l(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):g.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},g.blob&&(this.blob=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(c(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},g.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(t){var e=t.toUpperCase();return w.indexOf(e)>-1?e:t}function p(t,e){e=e||{};var n=e.body;if(t instanceof p){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new i(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new i(e.headers)),this.method=f(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function v(t){var e=new i;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e}function y(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new i(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var g={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(g.arrayBuffer)var _=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=function(t){return t&&DataView.prototype.isPrototypeOf(t)},b=ArrayBuffer.isView||function(t){return t&&_.indexOf(Object.prototype.toString.call(t))>-1};i.prototype.append=function(t,r){t=e(t),r=n(r);var i=this.map[t];this.map[t]=i?i+","+r:r},i.prototype.delete=function(t){delete this.map[e(t)]},i.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},i.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},i.prototype.set=function(t,r){this.map[e(t)]=n(r)},i.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},i.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},i.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},i.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},g.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},h.call(p.prototype),h.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];y.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},t.Headers=i,t.Request=p,t.Response=y,t.fetch=function(t,e){return new Promise(function(n,r){var i=new p(t,e),o=new XMLHttpRequest;o.onload=function(){var t={status:o.status,statusText:o.statusText,headers:v(o.getAllResponseHeaders()||"")};t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL");var e="response"in o?o.response:o.responseText;n(new y(e,t))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&g.blob&&(o.responseType="blob"),i.headers.forEach(function(t,e){o.setRequestHeader(e,t)}),o.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(t,e,n){"use strict";function r(t){return"storage/"+t}function i(){return new te(ee.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function o(t){return new te(ee.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function a(t){return new te(ee.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function s(){return new te(ee.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again.")}function u(t){return new te(ee.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function c(){return new te(ee.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function l(){return new te(ee.CANCELED,"User canceled the upload/download.")}function h(t){return new te(ee.INVALID_URL,"Invalid URL '"+t+"'.")}function f(t){return new te(ee.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function p(){return new te(ee.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function d(){return new te(ee.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function v(){return new te(ee.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function y(t,e,n){return new te(ee.INVALID_ARGUMENT,"Invalid argument in `"+e+"` at index "+t+": "+n)}function g(t,e,n,r){var i,o;return t===e?(i=t,o=1===t?"argument":"arguments"):(i="between "+t+" and "+e,o="arguments"),new te(ee.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+n+"`: Expected "+i+" "+o+", received "+r+".")}function _(){return new te(ee.APP_DELETED,"The Firebase app was deleted.")}function m(t){return new te(ee.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function b(t,e){return new te(ee.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function w(t){throw new te(ee.INTERNAL_ERROR,"Internal error: "+t)}function E(t){switch(t){case ne.RAW:case ne.BASE64:case ne.BASE64URL:case ne.DATA_URL:return;default:throw"Expected one of the event types: ["+ne.RAW+", "+ne.BASE64+", "+ne.BASE64URL+", "+ne.DATA_URL+"]."}}function S(t,e){switch(t){case ne.RAW:return new re(T(e));case ne.BASE64:case ne.BASE64URL:return new re(I(t,e));case ne.DATA_URL:return new re(O(e),A(e))}throw i()}function T(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296==(64512&r)){var i=n<t.length-1&&56320==(64512&t.charCodeAt(n+1));if(i){var o=r,a=t.charCodeAt(++n);r=65536|(1023&o)<<10|1023&a,e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}else e.push(239,191,189)}else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function C(t){var e;try{e=decodeURIComponent(t)}catch(t){throw b(ne.DATA_URL,"Malformed data URL.")}return T(e)}function I(t,e){switch(t){case ne.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r){var i=n?"-":"_";throw b(t,"Invalid character '"+i+"' found: is it base64url encoded?")}break;case ne.BASE64URL:var o=-1!==e.indexOf("+"),a=-1!==e.indexOf("/");if(o||a){var i=o?"+":"/";throw b(t,"Invalid character '"+i+"' found: is it base64 encoded?")}e=e.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(e)}catch(e){throw b(t,"Invalid character found")}for(var u=new Uint8Array(s.length),c=0;c<s.length;c++)u[c]=s.charCodeAt(c);return u}function O(t){var e=new ie(t);return e.base64?I(ne.BASE64,e.rest):C(e.rest)}function A(t){return new ie(t).contentType}function R(t,e){return!!(t.length>=e.length)&&t.substring(t.length-e.length)===e}function N(t){switch(t){case ae.RUNNING:case ae.PAUSING:case ae.CANCELING:return se.RUNNING;case ae.PAUSED:return se.PAUSED;case ae.SUCCESS:return se.SUCCESS;case ae.CANCELED:return se.CANCELED;case ae.ERROR:default:return se.ERROR}}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function k(t,e){for(var n in t)P(t,n)&&e(n,t[n])}function D(t){if(null==t)return{};var e={};return k(t,function(t,n){e[t]=n}),e}function x(t){return new Promise(t)}function F(t){return Promise.resolve(t)}function L(t){return Promise.reject(t)}function j(t){return null!=t}function M(t){return void 0!==t}function U(t){return"function"==typeof t}function V(t){return"object"==typeof t}function W(t){return V(t)&&null!==t}function B(t){return V(t)&&!Array.isArray(t)}function q(t){return"string"==typeof t||t instanceof String}function H(t){return"number"==typeof t||t instanceof Number}function K(t){return G()&&t instanceof Blob}function G(){return"undefined"!=typeof Blob}function z(t){var e;try{e=JSON.parse(t)}catch(t){return null}return B(e)?e:null}function Q(t){if(0==t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}function Y(t,e){var n=e.split("/").filter(function(t){return t.length>0}).join("/");return 0===t.length?n:t+"/"+n}function X(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function $(t){return zt+Yt+t}function J(t){return Qt+Yt+t}function Z(t){return zt+Xt+t}function tt(t){var e=encodeURIComponent,n="?";return k(t,function(t,r){var i=e(t)+"="+e(r);n=n+i+"&"}),n=n.slice(0,-1)}function et(t,e){return e}function nt(t){return!q(t)||t.length<2?t:(t=t,X(t))}function rt(){function t(t,e){return nt(e)}function e(t,e){return j(e)?+e:e}function n(t,e){if(!(q(e)&&e.length>0))return[];var n=encodeURIComponent;return e.split(",").map(function(e){var r=t.bucket,i=t.fullPath;return J("/b/"+n(r)+"/o/"+n(i))+tt({alt:"media",token:e})})}if(fe)return fe;var r=[];r.push(new he("bucket")),r.push(new he("generation")),r.push(new he("metageneration")),r.push(new he("name","fullPath",!0));var i=new he("name");i.xform=t,r.push(i);var o=new he("size");return o.xform=e,r.push(o),r.push(new he("timeCreated")),r.push(new he("updated")),r.push(new he("md5Hash",null,!0)),r.push(new he("cacheControl",null,!0)),r.push(new he("contentDisposition",null,!0)),r.push(new he("contentEncoding",null,!0)),r.push(new he("contentLanguage",null,!0)),r.push(new he("contentType",null,!0)),r.push(new he("metadata","customMetadata",!0)),r.push(new he("downloadTokens","downloadURLs",!1,n)),fe=r}function it(t,e){function n(){var n=t.bucket,r=t.fullPath,i=new le(n,r);return e.makeStorageReference(i)}Object.defineProperty(t,"ref",{get:n})}function ot(t,e,n){var r={};r.type="file";for(var i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,e[a.server])}return it(r,t),r}function at(t,e,n){var r=z(e);return null===r?null:ot(t,r,n)}function st(t,e){for(var n={},r=e.length,i=0;i<r;i++){var o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}function ut(t){if(!t||!V(t))throw"Expected Metadata object.";for(var e in t){var n=t[e];if("customMetadata"===e){if(!V(n))throw"Expected object for 'customMetadata' mapping."}else if(W(n))throw"Mapping for '"+e+"' cannot be an object."}}function ct(t,e,n){for(var r=e.length,i=e.length,o=0;o<e.length;o++)if(e[o].optional){r=o;break}if(!(r<=n.length&&n.length<=i))throw g(r,i,t,n.length);for(var o=0;o<n.length;o++)try{e[o].validator(n[o])}catch(e){throw e instanceof Error?y(o,t,e.message):y(o,t,e)}}function lt(t,e){return function(n){t(n),e(n)}}function ht(t,e){function n(t){if(!q(t))throw"Expected string."}var r;return r=t?lt(n,t):n,new pe(r,e)}function ft(){function t(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer||G()&&t instanceof Blob))throw"Expected Blob or File."}return new pe(t)}function pt(t){return new pe(ut,t)}function dt(){function t(t){if(!(H(t)&&t>=0))throw"Expected a number 0 or greater."}return new pe(t)}function vt(t,e){function n(e){if(!(null===e||j(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)}return new pe(n,e)}function yt(t){function e(t){if(null!==t&&!U(t))throw"Expected a Function."}return new pe(e,t)}function gt(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function _t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=gt();if(void 0!==n){for(var r=new n,i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}if(G())return new Blob(t);throw Error("This browser doesn't seem to support creating Blobs")}function mt(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}function bt(t,e){return-1!==t.indexOf(e)}function wt(t){return Array.prototype.slice.call(t)}function Et(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}function St(t){if(!t)throw i()}function Tt(t,e){function n(n,r){var i=at(t,r,e);return St(null!==i),i}return n}function Ct(t){function e(e,n){var r;return r=401===e.getStatus()?s():402===e.getStatus()?a(t.bucket):403===e.getStatus()?u(t.path):n,r.setServerResponseProp(n.serverResponseProp()),r}return e}function It(t){function e(e,r){var i=n(e,r);return 404===e.getStatus()&&(i=o(t.path)),i.setServerResponseProp(r.serverResponseProp()),i}var n=Ct(t);return e}function Ot(t,e,n){var r=e.fullServerUrl(),i=$(r),o=t.maxOperationRetryTime(),a=new ve(i,"GET",Tt(t,n),o);return a.errorHandler=It(e),a}function At(t,e,n,r){var i=e.fullServerUrl(),o=$(i),a=st(n,r),s={"Content-Type":"application/json; charset=utf-8"},u=t.maxOperationRetryTime(),c=new ve(o,"PATCH",Tt(t,r),u);return c.headers=s,c.body=a,c.errorHandler=It(e),c}function Rt(t,e){function n(t,e){}var r=e.fullServerUrl(),i=$(r),o=t.maxOperationRetryTime(),a=new ve(i,"DELETE",n,o);return a.successCodes=[200,204],a.errorHandler=It(e),a}function Nt(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function Pt(t,e,n){var r=D(n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=Nt(null,e)),r}function kt(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();a["Content-Type"]="multipart/related; boundary="+s;var u=Pt(e,r,i),c=st(u,n),l="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+c+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",h="\r\n--"+s+"--",f=de.getBlob(l,r,h);if(null===f)throw p();var d={name:u.fullPath},v=Z(o),y=t.maxUploadRetryTime(),g=new ve(v,"POST",Tt(t,n),y);return g.urlParams=d,g.headers=a,g.body=f.uploadData(),g.errorHandler=Ct(e),g}function Dt(t,e){var n;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(t){St(!1)}return St(bt(e||["active"],n)),n}function xt(t,e,n,r,i){function o(t,e){Dt(t);var n;try{n=t.getResponseHeader("X-Goog-Upload-URL")}catch(t){St(!1)}return St(q(n)),n}var a=e.bucketOnlyServerUrl(),s=Pt(e,r,i),u={name:s.fullPath},c=Z(a),l={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":s.contentType,"Content-Type":"application/json; charset=utf-8"},h=st(s,n),f=t.maxUploadRetryTime(),p=new ve(c,"POST",o,f);return p.urlParams=u,p.headers=l,p.body=h,p.errorHandler=Ct(e),p}function Ft(t,e,n,r){function i(t,e){var n,i=Dt(t,["active","final"]);try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(t){St(!1)}var o=parseInt(n,10);return St(!isNaN(o)),new ye(o,r.size(),"final"===i)}var o={"X-Goog-Upload-Command":"query"},a=t.maxUploadRetryTime(),s=new ve(n,"POST",i,a);return s.headers=o,s.errorHandler=Ct(e),s}function Lt(t,e,n,r,i,o,a,s){function u(t,n){var i,a=Dt(t,["active","final"]),s=c.current+h,u=r.size();return i="final"===a?Tt(e,o)(t,n):null,new ye(s,u,"final"===a,i)}var c=new ye(0,0);if(a?(c.current=a.current,c.total=a.total):(c.current=0,c.total=r.size()),r.size()!==c.total)throw d();var l=c.total-c.current,h=l;i>0&&(h=Math.min(h,i));var f=c.current,v=f+h,y=h===l?"upload, finalize":"upload",g={"X-Goog-Upload-Command":y,"X-Goog-Upload-Offset":c.current},_=r.slice(f,v);if(null===_)throw p();var m=e.maxUploadRetryTime(),b=new ve(n,"POST",u,m);return b.headers=g,b.body=_.uploadData(),b.progressCallback=s||null,b.errorHandler=Ct(t),b}function jt(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];F(!0).then(function(){t.apply(null,e)})}}function Mt(t,e,n){function r(){return 2===h}function i(){f||(f=!0,e.apply(null,arguments))}function o(e){c=setTimeout(function(){c=null,t(a,r())},e)}function a(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!f){if(t)return void i.apply(null,arguments);if(r()||l)return void i.apply(null,arguments);u<64&&(u*=2);var a;1===h?(h=2,a=0):a=1e3*(u+Math.random()),o(a)}}function s(t){p||(p=!0,f||(null!==c?(t||(h=2),clearTimeout(c),o(0)):t||(h=1)))}var u=1,c=null,l=!1,h=0,f=!1,p=!1;return o(0),setTimeout(function(){l=!0,s(!0)},n),s}function Ut(t){t(!1)}function Vt(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}function Wt(t){var e=void 0!==Gt.default?Gt.default.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}function Bt(t,e,n){var r=tt(t.urlParams),i=t.url+r,o=D(t.headers);return Vt(o,e),Wt(o),new Te(i,t.method,o,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}function qt(t,e,n){return new Ie(t,new ce,n)}function Ht(t){var e={TaskState:se,TaskEvent:oe,StringFormat:ne,Storage:Ie,Reference:be};t.INTERNAL.registerService(Ae,qt,e,void 0,!0)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"registerStorage",function(){return Ht});var Kt,Gt=n(101),zt="https://firebasestorage.googleapis.com",Qt="https://firebasestorage.googleapis.com",Yt="/v0",Xt="/v0",$t=12e4,Jt=6e4,Zt=-9007199254740991,te=function(){function t(t,e){this.code_=r(t),this.message_="Firebase Storage: "+e,this.serverResponse_=null,this.name_="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return r(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.serverResponse_},t.prototype.setServerResponseProp=function(t){this.serverResponse_=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.code_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.message_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.serverResponse_},enumerable:!0,configurable:!0}),t}(),ee={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"},ne={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},re=function(){function t(t,e){this.data=t,this.contentType=e||null}return t}(),ie=function(){function t(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw b(ne.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=e[1]||null;null!=n&&(this.base64=R(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=t.substring(t.indexOf(",")+1)}return t}(),oe={STATE_CHANGED:"state_changed"},ae={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},se={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(Kt||(Kt={}));var ue=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=Kt.NO_ERROR,this.sendPromise_=x(function(e,n){t.xhr_.addEventListener("abort",function(n){t.errorCode_=Kt.ABORT,e(t)}),t.xhr_.addEventListener("error",function(n){t.errorCode_=Kt.NETWORK_ERROR,e(t)}),t.xhr_.addEventListener("load",function(n){e(t)})})}return t.prototype.send=function(t,e,n,r){var i=this;if(this.sent_)throw w("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(e,t,!0),j(r)){k(r,function(t,e){i.xhr_.setRequestHeader(t,e.toString())})}return j(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},t.prototype.getErrorCode=function(){if(!this.sent_)throw w("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw w("cannot .getStatus() before sending");try{return this.xhr_.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw w("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){j(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){j(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",t)},t}(),ce=function(){function t(){}return t.prototype.createXhrIo=function(){return new ue},t}(),le=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!0,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(n){return new t(e,"")}if(""===n.path)return n;throw f(e)},t.makeFromUrl=function(e){function n(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}function r(t){t.path_=decodeURIComponent(t.path)}for(var i=null,o=new RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),a={bucket:1,path:3},s=new RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),u={bucket:1,path:3},c=[{regex:o,indices:a,postModify:n},{regex:s,indices:u,postModify:r}],l=0;l<c.length;l++){var f=c[l],p=f.regex.exec(e);if(p){var d=p[f.indices.bucket],v=p[f.indices.path];v||(v=""),i=new t(d,v),f.postModify(i);break}}if(null==i)throw h(e);return i},t}(),he=function(){function t(t,e,n,r){this.server=t,this.local=e||t,this.writable=!!n,this.xform=r||et}return t}(),fe=null,pe=function(){function t(t,e){var n=this;this.validator=function(e){n.optional&&!M(e)||t(e)},this.optional=!!e}return t}(),de=function(){function t(t,e){var n=0,r="";K(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,n){if(K(this.data_)){var r=this.data_,i=mt(r,e,n);return null===i?null:new t(i)}return new t(new Uint8Array(this.data_.buffer,e,n-e),!0)},t.getBlob=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(G()){var r=e.map(function(e){return e instanceof t?e.data_:e});return new t(_t.apply(null,r))}var i=e.map(function(t){return q(t)?S(ne.RAW,t).data:t.data_}),o=0;i.forEach(function(t){o+=t.byteLength});var a=new Uint8Array(o),s=0;return i.forEach(function(t){for(var e=0;e<t.length;e++)a[s++]=t[e]}),new t(a,!0)},t.prototype.uploadData=function(){return this.data_},t}(),ve=function(){function t(t,e,n,r){this.url=t,this.method=e,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}return t}(),ye=function(){function t(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null}return t}(),ge=function(){function t(t,e,n){if(U(t)||j(e)||j(n))this.next=t,this.error=e||null,this.complete=n||null;else{var r=t;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}}return t}(),_e=function(){function t(t,e,n,r,i,o){this.bytesTransferred=t,this.totalBytes=e,this.state=n,this.metadata=r,this.task=i,this.ref=o}return Object.defineProperty(t.prototype,"downloadURL",{get:function(){if(null!==this.metadata){var t=this.metadata.downloadURLs;return null!=t&&null!=t[0]?t[0]:null}return null},enumerable:!0,configurable:!0}),t}(),me=function(){function t(t,e,n,r,i,o){void 0===o&&(o=null);var a=this;this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=t,this.authWrapper_=e,this.location_=n,this.blob_=i,this.metadata_=o,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=ae.RUNNING,this.errorHandler_=function(t){a.request_=null,a.chunkMultiplier_=1,t.codeEquals(ee.CANCELED)?(a.needToFetchStatus_=!0,a.completeTransitions_()):(a.error_=t,a.transition_(ae.ERROR))},this.metadataErrorHandler_=function(t){a.request_=null,t.codeEquals(ee.CANCELED)?a.completeTransitions_():(a.error_=t,a.transition_(ae.ERROR))},this.promise_=x(function(t,e){a.resolve_=t,a.reject_=e,a.start_()}),this.promise_.then(null,function(){})}return t.prototype.makeProgressCallback_=function(){var t=this,e=this.transferred_;return function(n,r){t.updateProgress_(e+n)}},t.prototype.shouldDoResumable_=function(t){return t.size()>262144},t.prototype.start_=function(){this.state_===ae.RUNNING&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},t.prototype.resolveToken_=function(t){var e=this;this.authWrapper_.getAuthToken().then(function(n){switch(e.state_){case ae.RUNNING:t(n);break;case ae.CANCELING:e.transition_(ae.CANCELED);break;case ae.PAUSING:e.transition_(ae.PAUSED)}})},t.prototype.createResumable_=function(){var t=this;this.resolveToken_(function(e){var n=xt(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.uploadUrl_=e,t.needToFetchStatus_=!1,t.completeTransitions_()},t.errorHandler_)})},t.prototype.fetchStatus_=function(){var t=this,e=this.uploadUrl_;this.resolveToken_(function(n){var r=Ft(t.authWrapper_,t.location_,e,t.blob_),i=t.authWrapper_.makeRequest(r,n);t.request_=i,i.getPromise().then(function(e){e=e,t.request_=null,t.updateProgress_(e.current),t.needToFetchStatus_=!1,e.finalized&&(t.needToFetchMetadata_=!0),t.completeTransitions_()},t.errorHandler_)})},t.prototype.continueUpload_=function(){var t=this,e=262144*this.chunkMultiplier_,n=new ye(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_(function(i){var o;try{o=Lt(t.location_,t.authWrapper_,r,t.blob_,e,t.mappings_,n,t.makeProgressCallback_())}catch(e){return t.error_=e,void t.transition_(ae.ERROR)}var a=t.authWrapper_.makeRequest(o,i);t.request_=a,a.getPromise().then(function(e){t.increaseMultiplier_(),t.request_=null,t.updateProgress_(e.current),e.finalized?(t.metadata_=e.metadata,t.transition_(ae.SUCCESS)):t.completeTransitions_()},t.errorHandler_)})},t.prototype.increaseMultiplier_=function(){262144*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},t.prototype.fetchMetadata_=function(){var t=this;this.resolveToken_(function(e){var n=Ot(t.authWrapper_,t.location_,t.mappings_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.transition_(ae.SUCCESS)},t.metadataErrorHandler_)})},t.prototype.oneShotUpload_=function(){var t=this;this.resolveToken_(function(e){var n=kt(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.updateProgress_(t.blob_.size()),t.transition_(ae.SUCCESS)},t.errorHandler_)})},t.prototype.updateProgress_=function(t){var e=this.transferred_;this.transferred_=t,this.transferred_!==e&&this.notifyObservers_()},t.prototype.transition_=function(t){if(this.state_!==t)switch(t){case ae.CANCELING:case ae.PAUSING:this.state_=t,null!==this.request_&&this.request_.cancel();break;case ae.RUNNING:var e=this.state_===ae.PAUSED;this.state_=t,e&&(this.notifyObservers_(),this.start_());break;case ae.PAUSED:this.state_=t,this.notifyObservers_();break;case ae.CANCELED:this.error_=l(),this.state_=t,this.notifyObservers_();break;case ae.ERROR:case ae.SUCCESS:this.state_=t,this.notifyObservers_()}},t.prototype.completeTransitions_=function(){switch(this.state_){case ae.PAUSING:this.transition_(ae.PAUSED);break;case ae.CANCELING:this.transition_(ae.CANCELED);break;case ae.RUNNING:this.start_()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=N(this.state_);return new _e(this.transferred_,this.blob_.size(),t,this.metadata_,this,this.ref_)},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e,n,r){function i(e){if(t!==oe.STATE_CHANGED)throw"Expected one of the event types: ["+oe.STATE_CHANGED+"]."}function o(t){try{return void c(t)}catch(t){}try{l(t);if(!(M(t.next)||M(t.error)||M(t.complete)))throw"";return}catch(t){throw u}}function a(t){function e(e,n,i){null!==t&&ct("on",t,arguments);var o=new ge(e,n,r);return h.addObserver_(o),function(){h.removeObserver_(o)}}return e}function s(t){if(null===t)throw u;o(t)}void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var u="Expected a function or an Object with one of `next`, `error`, `complete` properties.",c=yt(!0).validator,l=vt(null,!0).validator;ct("on",[ht(i),vt(o,!0),yt(!0),yt(!0)],arguments);var h=this,f=[vt(s),yt(!0),yt(!0)];return M(e)||M(n)||M(r)?a(null)(e,n,r):a(f)},t.prototype.then=function(t,e){return this.promise_.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.addObserver_=function(t){this.observers_.push(t),this.notifyObserver_(t)},t.prototype.removeObserver_=function(t){Et(this.observers_,t)},t.prototype.notifyObservers_=function(){var t=this;this.finishPromise_(),wt(this.observers_).forEach(function(e){t.notifyObserver_(e)})},t.prototype.finishPromise_=function(){if(null!==this.resolve_){var t=!0;switch(N(this.state_)){case se.SUCCESS:jt(this.resolve_.bind(null,this.snapshot))();break;case se.CANCELED:case se.ERROR:jt(this.reject_.bind(null,this.error_))();break;default:t=!1}t&&(this.resolve_=null,this.reject_=null)}},t.prototype.notifyObserver_=function(t){switch(N(this.state_)){case se.RUNNING:case se.PAUSED:null!==t.next&&jt(t.next.bind(t,this.snapshot))();break;case se.SUCCESS:null!==t.complete&&jt(t.complete.bind(t))();break;case se.CANCELED:case se.ERROR:null!==t.error&&jt(t.error.bind(t,this.error_))();break;default:null!==t.error&&jt(t.error.bind(t,this.error_))()}},t.prototype.resume=function(){ct("resume",[],arguments);var t=this.state_===ae.PAUSED||this.state_===ae.PAUSING;return t&&this.transition_(ae.RUNNING),t},t.prototype.pause=function(){ct("pause",[],arguments);var t=this.state_===ae.RUNNING;return t&&this.transition_(ae.PAUSING),t},t.prototype.cancel=function(){ct("cancel",[],arguments);var t=this.state_===ae.RUNNING||this.state_===ae.PAUSING;return t&&this.transition_(ae.CANCELING),t},t}(),be=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof le?e:le.makeFromUrl(e)}return t.prototype.toString=function(){return ct("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return rt()},t.prototype.child=function(t){ct("child",[ht()],arguments);var e=Y(this.location.path,t),n=new le(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=Q(this.location.path);if(null===t)return null;var e=new le(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new le(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return X(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),ct("put",[ft(),pt(!0)],arguments),this.throwIfRoot_("put"),new me(this,this.authWrapper,this.location,this.mappings(),new de(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=ne.RAW),ct("putString",[ht(),ht(E,!0),pt(!0)],arguments),this.throwIfRoot_("putString");var r=S(e,t),i=D(n);return!j(i.contentType)&&j(r.contentType)&&(i.contentType=r.contentType),new me(this,this.authWrapper,this.location,this.mappings(),new de(r.data,!0),i)},t.prototype.delete=function(){ct("delete",[],arguments),this.throwIfRoot_("delete");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Rt(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){ct("getMetadata",[],arguments),this.throwIfRoot_("getMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Ot(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){ct("updateMetadata",[pt()],arguments),this.throwIfRoot_("updateMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=At(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){return ct("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL"),this.getMetadata().then(function(t){var e=t.downloadURLs[0];if(j(e))return e;throw v()})},t.prototype.throwIfRoot_=function(t){if(""===this.location.path)throw m(t)},t}(),we=function(){function t(t){this.promise_=L(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),Ee=function(){function t(){this.map_={},this.id_=Zt}return t.prototype.addRequest=function(t){function e(){delete r.map_[n]}var n=this.id_;this.id_++,this.map_[n]=t;var r=this;t.getPromise().then(e,e)},t.prototype.clear=function(){k(this.map_,function(t,e){e&&e.cancel(!0)}),this.map_={}},t}(),Se=function(){function t(e,n,r,i,o){if(this.bucket_=null,this.deleted_=!1,this.app_=e,null!==this.app_){var a=this.app_.options;j(a)&&(this.bucket_=t.extractBucket_(a))}this.storageRefMaker_=n,this.requestMaker_=r,this.pool_=o,this.service_=i,this.maxOperationRetryTime_=$t,this.maxUploadRetryTime_=Jt,this.requestMap_=new Ee}return t.extractBucket_=function(t){var e=t.storageBucket||null;return null==e?null:le.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.app_&&j(this.app_.INTERNAL)&&j(this.app_.INTERNAL.getToken)?this.app_.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):F(null)},t.prototype.bucket=function(){if(this.deleted_)throw _();return this.bucket_},t.prototype.service=function(){return this.service_},t.prototype.makeStorageReference=function(t){return this.storageRefMaker_(this,t)},t.prototype.makeRequest=function(t,e){if(this.deleted_)return new we(_());var n=this.requestMaker_(t,e,this.pool_);return this.requestMap_.addRequest(n),n},t.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requestMap_.clear()},t.prototype.maxUploadRetryTime=function(){return this.maxUploadRetryTime_},t.prototype.setMaxUploadRetryTime=function(t){this.maxUploadRetryTime_=t},t.prototype.maxOperationRetryTime=function(){return this.maxOperationRetryTime_},t.prototype.setMaxOperationRetryTime=function(t){this.maxOperationRetryTime_=t},t}(),Te=function(){function t(t,e,n,r,i,o,a,s,u,c,l){this.pendingXhr_=null,this.backoffId_=null,this.resolve_=null,this.reject_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l;var h=this;this.promise_=x(function(t,e){h.resolve_=t,h.reject_=e,h.start_()})}return t.prototype.start_=function(){function t(t,e){function r(t){var e=t.loaded,r=t.lengthComputable?t.total:-1;null!==n.progressCallback_&&n.progressCallback_(e,r)}if(e)return void t(!1,new Ce(!1,null,!0));var i=n.pool_.createXhrIo();n.pendingXhr_=i,null!==n.progressCallback_&&i.addUploadProgressListener(r),i.send(n.url_,n.method_,n.body_,n.headers_).then(function(e){null!==n.progressCallback_&&e.removeUploadProgressListener(r),n.pendingXhr_=null,e=e;var i=e.getErrorCode()===Kt.NO_ERROR,o=e.getStatus();if(!i||n.isRetryStatusCode_(o)){var a=e.getErrorCode()===Kt.ABORT;return void t(!1,new Ce(!1,null,a))}var s=bt(n.successCodes_,o);t(!0,new Ce(s,e))})}function e(t,e){var r=n.resolve_,o=n.reject_,a=e.xhr;if(e.wasSuccessCode)try{var s=n.callback_(a,a.getResponseText());M(s)?r(s):r()}catch(t){o(t)}else if(null!==a){var u=i();u.setServerResponseProp(a.getResponseText()),o(n.errorCallback_?n.errorCallback_(a,u):u)}else if(e.canceled){var u=n.appDelete_?_():l();o(u)}else{var u=c();o(u)}}var n=this;this.canceled_?e(!1,new Ce(!1,null,!0)):this.backoffId_=Mt(t,e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&Ut(this.backoffId_),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,n=[408,429],r=bt(n,t),i=bt(this.additionalRetryCodes_,t);return e||r||i},t}(),Ce=function(){function t(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n}return t}(),Ie=function(){function t(t,e,n){function r(t,e){return new be(t,e)}if(this.bucket_=null,this.authWrapper_=new Se(t,r,Bt,this,e),this.app_=t,null!=n)this.bucket_=le.makeFromBucketSpec(n);else{var i=this.authWrapper_.bucket();null!=i&&(this.bucket_=new le(i,""))}this.internals_=new Oe(this)}return t.prototype.ref=function(t){function e(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."}if(ct("ref",[ht(e,!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var n=new be(this.authWrapper_,this.bucket_);return null!=t?n.child(t):n},t.prototype.refFromURL=function(t){function e(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{le.makeFromUrl(t)}catch(t){throw"Expected valid full URL but got an invalid one."}}return ct("refFromURL",[ht(e,!1)],arguments),new be(this.authWrapper_,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.authWrapper_.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){ct("setMaxUploadRetryTime",[dt()],arguments),this.authWrapper_.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this.authWrapper_.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){ct("setMaxOperationRetryTime",[dt()],arguments),this.authWrapper_.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!0,configurable:!0}),t}(),Oe=function(){function t(t){this.service_=t}return t.prototype.delete=function(){return this.service_.authWrapper_.deleteApp(),F(void 0)},t}(),Ae="storage";Ht(Gt.default)},,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.LoadingSpinner=void 0;var i=n(0),o=r(i),a=n(1),s=r(a),u=n(413),c=r(u),l=n(600),h=r(l),f=e.LoadingSpinner=function(t){var e=t.size;return o.default.createElement("div",{className:h.default.container},o.default.createElement("div",{className:h.default.progress},o.default.createElement(c.default,{mode:"indeterminate",size:e||80})))};f.propTypes={size:s.default.number},e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(523),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=e.LIST_PATH="/projects",i=e.DETAIL_PATH=":projectname",o=e.ACCOUNT_PATH="/account",a=e.LOGIN_PATH="/login",s=e.SIGNUP_PATH="/signup",u=e.ACCOUNT_FORM_NAME="account",c=e.LOGIN_FORM_NAME="login",l=e.SIGNUP_FORM_NAME="signup",h=e.PHONE_FORM_NAME="phone",f=(e.NEW_PROJECT_FORM_NAME="newProject",e.RECOVER_CODE_FORM_NAME="recoverCode"),p=e.RECOVER_EMAIL_FORM_NAME="recoverEmail",d=e.NEW_TODO_FORM_NAME="newTodo",v=e.formNames={account:u,signup:l,login:c,phone:h,recoverCode:f,recoverEmail:p,newTodo:d},y=e.paths={list:r,account:o,detail:i,login:a,signup:s};e.default=Object.assign({},y,v)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i,o,a=n(2),s=r(a),u=n(3),c=r(u),l=n(5),h=r(l),f=n(4),p=r(f),d=n(0),v=r(d),y=n(1),g=r(y),_=n(178),m=n(37),b=n(128),w=n(299),E=(r(w),n(443)),S=r(E),T=n(997),C=r(T),I=(o=i=function(t){function e(){var t,n,r,i;(0,s.default)(this,e);for(var o=arguments.length,a=Array(o),u=0;u<o;u++)a[u]=arguments[u];return n=r=(0,h.default)(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),r.getChildContext=function(){return{muiTheme:(0,S.default)(C.default)}},i=n,(0,h.default)(r,i)}return(0,p.default)(e,t),(0,c.default)(e,[{key:"render",value:function(){var t=this.props,e=t.routes,n=t.store;return v.default.createElement(m.Provider,{store:n},v.default.createElement("div",null,v.default.createElement(_.Router,{history:_.browserHistory},e),v.default.createElement(b.Notifications,null)))}}]),e}(d.Component),i.childContextTypes={muiTheme:g.default.object},i.propTypes={routes:g.default.object.isRequired,store:g.default.object.isRequired},o);e.default=I},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(526),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CoreLayout=void 0;var i=n(0),o=r(i),a=n(1),s=r(a),u=n(601),c=r(u);n(319);var l=e.CoreLayout=function(t){var e=t.children;return o.default.createElement("div",{className:c.default.container},o.default.createElement("div",{className:c.default.children},e))};l.propTypes={children:s.default.element.isRequired},e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(528),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Notifications=void 0;var i=n(163),o=r(i),a=n(0),s=r(a),u=n(1),c=r(u),l=n(37),h=n(125),f=n(425),p=r(f),d=n(1012),v=r(d),y=n(181),g=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(y),_={paddingTop:"5px",height:"30px"},m=e.Notifications=function(t){var e=t.allIds,n=t.byId,r=t.dismissNotification;return s.default.createElement("div",null,e.map(function(t){return s.default.createElement(p.default,{key:t,open:!0,contentStyle:{color:"white"},bodyStyle:{paddingRight:0},action:s.default.createElement(v.default,{color:"white",style:_}),onActionTouchTap:function(){return r(t)},message:n[t].message})}))};m.propTypes={allIds:c.default.array.isRequired,byId:c.default.object.isRequired,dismissNotification:c.default.func.isRequired},e.default=(0,h.compose)(h.pure,(0,l.connect)(function(t){var e=t.notifications;return{allIds:e.allIds,byId:e.byId}},g),(0,h.branch)(function(t){return!(0,o.default)(t.allIds)},h.renderNothing))(m)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(125),i=n(300),o=n(181),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(o),s=(0,r.compose)(i.withStore,(0,r.withHandlers)({showError:function(t){var e=t.store;return function(t){return a.showError(t)(e.dispatch)}},showSuccess:function(t){var e=t.store;return function(t){return a.showSuccess(t)(e.dispatch)}},dismissNotification:function(t){var e=t.store;return function(t){return a.dismissNotification(t)(e.dispatch)}}}));e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.notifications=void 0;var i=n(184),o=r(i),a=n(72),s=r(a),u=n(252),c=r(u),l=n(902),h=r(l),f=n(57),p=n(180),d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case p.NOTIFICATION_SHOW:return e.payload;case p.NOTIFICATION_DISMISS:return;default:return t}},v=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];switch(e.type){case p.NOTIFICATION_SHOW:return[].concat((0,s.default)(t),[e.payload.id]);case p.NOTIFICATION_DISMISS:return(0,h.default)(t,e.payload);default:return t}},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case p.NOTIFICATION_SHOW:return Object.assign({},t,(0,o.default)({},e.payload.id,d(t[e.payload.id],e)));case p.NOTIFICATION_DISMISS:return(0,c.default)(t,e.payload);default:return t}},g=e.notifications=(0,f.combineReducers)({byId:y,allIds:v});e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(i),a=n(1),s=r(a),u=n(37),c=n(125),l=n(71),h=n(299),f=r(h),p=n(128),d=n(536),v=r(d),y=n(540),g=r(y),_=n(602),m=r(_),b=[{child:"owner",root:"users"}],w=(0,c.compose)(p.withNotifications,(0,l.firebaseConnect)([{path:"todos",queryParams:[],populates:b}]),(0,u.connect)(function(t){var e=t.firebase;return{uid:t.firebase.auth.uid,todos:(0,l.populate)(e,"todos",b)}}),(0,c.withHandlers)({addNew:function(t){return function(e){return t.firebase.push("todos",Object.assign({},e,{owner:t.uid||"Anonymous"}))}},onSubmitFail:function(t){return function(e,n,r){return t.showError(e?"Form Invalid":r.message||"Error")}}})),E=function(t){var e=t.todos,n=t.uid,r=t.addNew,i=t.onSubmitFail;return o.default.createElement("div",{className:m.default.container,style:{color:f.default.palette.primary2Color}},o.default.createElement("div",{className:m.default.todos},o.default.createElement(v.default,{disabled:!1,onSubmit:r,onSubmitFail:i}),o.default.createElement(g.default,{todos:e,uid:n})))};E.propTypes={todos:s.default.oneOfType([s.default.object,s.default.array]),addNew:s.default.func.isRequired,onSubmitFail:s.default.func.isRequired,uid:s.default.string},e.default=w(E)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(533),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(i),a=n(1),s=r(a),u=n(504),c=n(1173),l=n(25),h=r(l),f=n(67),p=r(f),d=n(1004),v=r(d),y=n(166),g=r(y),_=n(525),m=n(545),b=n(603),w=r(b),E=function(t){var e=t.submitting,n=t.handleSubmit,r=t.disabled;return o.default.createElement(h.default,{className:w.default.container},o.default.createElement(g.default,null,"New Todo"),o.default.createElement("form",{className:w.default.inputSection,onSubmit:n},o.default.createElement(u.Field,{name:"text",component:c.TextField,floatingLabelText:"New Todo Text",validate:[m.required]}),o.default.createElement(p.default,{type:"submit",disabled:e,tooltipPosition:"top-center",tooltip:r?"Login To Add Todo":"Add Todo"},o.default.createElement(v.default,null))))};E.propTypes={handleSubmit:s.default.func,disabled:s.default.bool,submitting:s.default.bool},e.default=(0,u.reduxForm)({form:_.NEW_TODO_FORM_NAME})(E)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(535),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(2),o=r(i),a=n(3),s=r(a),u=n(5),c=r(u),l=n(4),h=r(l),f=n(0),p=r(f),d=n(1),v=(r(d),n(604)),y=r(v),g=n(259),_=n(116),m=r(_),b=n(1002),w=r(b),E=n(1e3),S=r(E),T=n(1003),C=r(T),I=function(t){function e(t){(0,o.default)(this,e);var n=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={text:t.todo.text,edit:!1},n}return(0,h.default)(e,t),(0,s.default)(e,[{key:"render",value:function(){var t=this,e=this.props.todo,n=this.props.id,r=this.props.onCompleteClick,i=this.props.onDeleteClick,o=this.props.onEditClickDone;return p.default.createElement("div",{className:y.default.container},p.default.createElement(g.ListItem,{leftIcon:p.default.createElement(m.default,{defaultChecked:e.done,onCheck:function(){return r(e,e._key||n)}}),rightIcon:p.default.createElement("div",null,this.state.edit&&p.default.createElement(C.default,{onClick:function(){t.setState({edit:!1}),o(t.state.text,e._key||n)}}),!this.state.edit&&p.default.createElement(S.default,{onClick:function(){return t.setState({edit:!0})}}),p.default.createElement(w.default,{onClick:function(){return i(e._key||n)}})),secondaryText:p.default.createElement("div",null,!this.state.edit&&p.default.createElement("span",{className:"TodoItem-Text"},e.text),this.state.edit&&p.default.createElement("div",null,p.default.createElement("input",{type:"text",value:this.state.text,onChange:function(e){t.setState({text:e.target.value})}}))),secondaryTextLines:2}))}}]),e}(p.default.Component);e.default=I},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(537),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=i.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(114),o=r(i),a=n(0),s=r(a),u=n(1),c=r(u),l=n(125),h=n(71),f=n(259),p=n(25),d=r(p),v=n(166),y=r(v),g=n(128),_=n(300),m=n(538),b=r(m),w=n(605),E=r(w),S=function(t){var e=t.todos,n=t.toggleDone,r=t.deleteTodo,i=t.editTodo,a=t.editTodoDone;return s.default.createElement(d.default,{className:E.default.container},(0,h.isEmpty)(e)?s.default.createElement("div",{className:E.default.empty},"No Todos"):s.default.createElement("div",null,s.default.createElement(y.default,null,"Todos"),s.default.createElement(f.List,{className:E.default.list},(0,o.default)(e,function(t,e){return s.default.createElement(b.default,{key:e,id:e,todo:t,onCompleteClick:n,onDeleteClick:r,onEditClick:i,onEditClickDone:a})}))))};S.propTypes={todos:c.default.object,toggleDone:c.default.func,deleteTodo:c.default.func,editTodo:c.default.func,editTodoDone:c.default.func,firebase:c.default.object},e.default=(0,l.compose)(h.withFirebase,g.withNotifications,(0,_.spinnerWhileLoading)(["todos"]),(0,l.withHandlers)({toggleDone:function(t){return function(e,n){var r=t.firebase;t.auth;return r.set("todos/"+n+"/done",!e.done)}},deleteTodo:function(t){return function(e){t.todos,t.auth;return t.firebase.remove("todos/"+e).catch(function(e){return console.error("Error removing todo: ",e),t.showError("Error Removing todo"),Promise.reject(e)})}},editTodoDone:function(t){return function(e,n){var r=t.firebase;t.auth;return r.set("todos/"+n+"/text",e)}}}))(S)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(539),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(534),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default={component:i.default}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.createRoutes=void 0;var i=n(529),o=r(i),a=n(541),s=r(a),u=e.createRoutes=function(t){return{path:"*",component:o.default,indexRoute:s.default}};e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(57),o=n(296),a=r(o),s=n(178),u=n(71),c=n(544),l=r(c),h=n(622),f=r(h),p=n(297),d=n(511),v=n(298),y=n(1241),g=r(y);e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.version=d.version;var e=[a.default.withExtraArgument(u.getFirebase),g.default],n=[];f.default.initializeApp(p.firebase);var r=(0,i.createStore)((0,l.default)(),t,i.compose.apply(void 0,[(0,u.reactReduxFirebase)(f.default,p.reduxFirebase),i.applyMiddleware.apply(void 0,e)].concat(n)));return r.asyncReducers={},r.unsubscribeHistory=s.browserHistory.listen((0,v.updateLocation)(r)),r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.injectReducer=e.makeRootReducer=void 0;var r=n(57),i=n(504),o=n(71),a=n(128),s=n(298),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=e.makeRootReducer=function(t){return(0,r.combineReducers)(Object.assign({firebase:o.firebaseStateReducer,form:i.reducer,location:u.default,notifications:a.reducer},t))};e.injectReducer=function(t,e){var n=e.key,r=e.reducer;t.asyncReducers[n]=r,t.replaceReducer(c(t.asyncReducers))};e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.required=function(t){return t?void 0:"Required"},e.validateEmail=function(t){return t&&!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(t)?"Invalid email address":void 0}},,,,,,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.createChangeEmitter=function(){function t(){i===r&&(i=r.slice())}function e(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var n=!0;return t(),i.push(e),function(){if(n){n=!1,t();var r=i.indexOf(e);i.splice(r,1)}}}function n(){r=i;for(var t=r,e=0;e<t.length;e++)t[e].apply(t,arguments)}var r=[],i=r;return{listen:e,emit:n}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:n.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(n,n.constructor),i(n)):(Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,value:new Error(t).stack,writable:!0}),n)}return o(e,t),e}(function(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Error));e.default=a,t.exports=e.default},function(t,e){t.exports={flex:"LoadingSpinner__flex___3_WWY","flex-column":"LoadingSpinner__flex-column___7pU45","flex-column-center":"LoadingSpinner__flex-column-center___i6D0c",container:"LoadingSpinner__container___2RCDF","flex-row":"LoadingSpinner__flex-row___2emXl","flex-row-center":"LoadingSpinner__flex-row-center___1UmZG",progress:"LoadingSpinner__progress___3WiaW"}},function(t,e){t.exports={flex:"CoreLayout__flex___wvH7-","flex-column":"CoreLayout__flex-column___HGyul","flex-column-center":"CoreLayout__flex-column-center___3xCaT","flex-row":"CoreLayout__flex-row___3zIAE","flex-row-center":"CoreLayout__flex-row-center___2cRy3",container:"CoreLayout__container___31Gy2",children:"CoreLayout__children___2zncu"}},function(t,e){t.exports={flex:"HomePage__flex___3Ehcg","flex-column":"HomePage__flex-column___1jA2W","flex-column-center":"HomePage__flex-column-center___3y_L6",container:"HomePage__container___10tMq",info:"HomePage__info___2ty5D","flex-row":"HomePage__flex-row___1rSd1","flex-row-center":"HomePage__flex-row-center___1HqCa",note:"HomePage__note___1Lnkf"}},function(t,e){t.exports={flex:"NewTodoPanel__flex___2jo4f","flex-column":"NewTodoPanel__flex-column___2morQ","flex-column-center":"NewTodoPanel__flex-column-center___wFTh1",container:"NewTodoPanel__container___YNdlr","flex-row":"NewTodoPanel__flex-row___roLT1","flex-row-center":"NewTodoPanel__flex-row-center___uCaXn",inputSection:"NewTodoPanel__inputSection___1Jcjf",input:"NewTodoPanel__input___HlPbu",button:"NewTodoPanel__button___8A2kn"}},function(t,e){t.exports={flex:"TodoItem__flex___1zTKF","flex-column":"TodoItem__flex-column___lQZhK","flex-column-center":"TodoItem__flex-column-center___23zeo","flex-row":"TodoItem__flex-row___2Eq9x","flex-row-center":"TodoItem__flex-row-center___rqALj"}},function(t,e){t.exports={flex:"TodosList__flex___UoC1_","flex-column":"TodosList__flex-column___PEAr6","flex-column-center":"TodosList__flex-column-center___3lp4Q","flex-row":"TodosList__flex-row___WpSlf","flex-row-center":"TodosList__flex-row-center___13VWl",empty:"TodosList__empty___4H2RL",container:"TodosList__container___3CTdt"}},,,,,,,,,,,,function(t,e,n){"use strict";var r=function(t){var e;for(e in t)if(t.hasOwnProperty(e))return e;return null};t.exports=r},,function(t,e,n){n(519),t.exports=n(101).default},function(t,e,n){n(515)},function(t,e,n){t.exports=n(516)},function(t,e,n){var r=n(619);n(620),n(621),n(623),n(624),t.exports=r},function(t,e,n){n(518)},function(t,e,n){n(521)},,,,,,,function(t,e,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;t.exports=function(t,e,n){if("string"!=typeof e){var a=Object.getOwnPropertyNames(e);o&&(a=a.concat(Object.getOwnPropertySymbols(e)));for(var s=0;s<a.length;++s)if(!(r[a[s]]||i[a[s]]||n&&n[a[s]]))try{t[a[s]]=e[a[s]]}catch(t){}}return t}},,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r=n(61),i=n(38),o=n.i(r.a)(i.a,"DataView");e.a=o},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(703),o=n(704),a=n(705),s=n(706),u=n(707);r.prototype.clear=i.a,r.prototype.delete=o.a,r.prototype.get=a.a,r.prototype.has=s.a,r.prototype.set=u.a,e.a=r},function(t,e,n){"use strict";var r=n(61),i=n(38),o=n.i(r.a)(i.a,"Promise");e.a=o},function(t,e,n){"use strict";var r=n(61),i=n(38),o=n.i(r.a)(i.a,"Set");e.a=o},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i.a;++e<n;)this.add(t[e])}var i=n(209),o=n(729),a=n(730);r.prototype.add=r.prototype.push=o.a,r.prototype.has=a.a,e.a=r},function(t,e,n){"use strict";var r=n(61),i=n(38),o=n.i(r.a)(i.a,"WeakMap");e.a=o},function(t,e,n){"use strict";function r(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}e.a=r},function(t,e,n){"use strict";function r(t,e,r){var a=t[e];s.call(t,e)&&n.i(o.a)(a,r)&&(void 0!==r||e in t)||n.i(i.a)(t,e,r)}var i=n(138),o=n(107),a=Object.prototype,s=a.hasOwnProperty;e.a=r},function(t,e,n){"use strict";var r=n(53),i=Object.create,o=function(){function t(){}return function(e){if(!n.i(r.a)(e))return{};if(i)return i(e);t.prototype=e;var o=new t;return t.prototype=void 0,o}}();e.a=o},function(t,e,n){"use strict";function r(t,e){return t&&n.i(i.a)(t,e,o.a)}var i=n(333),o=n(222);e.a=r},function(t,e,n){"use strict";function r(t,e,r){var a=e(t);return n.i(o.a)(t)?a:n.i(i.a)(a,r(t))}var i=n(660),o=n(39);e.a=r},function(t,e,n){"use strict";function r(t,e){return null!=t&&e in Object(t)}e.a=r},function(t,e,n){"use strict";function r(t){return n.i(o.a)(t)&&n.i(i.a)(t)==a}var i=n(81),o=n(62),a="[object Arguments]";e.a=r},function(t,e,n){"use strict";function r(t,e,r,y,_,m){var b=n.i(c.a)(t),w=n.i(c.a)(e),E=b?d:n.i(u.a)(t),S=w?d:n.i(u.a)(e);E=E==p?v:E,S=S==p?v:S;var T=E==v,C=S==v,I=E==S;if(I&&n.i(l.a)(t)){if(!n.i(l.a)(e))return!1;b=!0,T=!1}if(I&&!T)return m||(m=new i.a),b||n.i(h.a)(t)?n.i(o.a)(t,e,r,y,_,m):n.i(a.a)(t,e,E,r,y,_,m);if(!(r&f)){var O=T&&g.call(t,"__wrapped__"),A=C&&g.call(e,"__wrapped__");if(O||A){var R=O?t.value():t,N=A?e.value():e;return m||(m=new i.a),_(R,N,r,y,m)}}return!!I&&(m||(m=new i.a),n.i(s.a)(t,e,r,y,_,m))}var i=n(210),o=n(338),a=n(694),s=n(695),u=n(700),c=n(39),l=n(217),h=n(221),f=1,p="[object Arguments]",d="[object Array]",v="[object Object]",y=Object.prototype,g=y.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t,e,r,u){var c=r.length,l=c,h=!u;if(null==t)return!l;for(t=Object(t);c--;){var f=r[c];if(h&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return!1}for(;++c<l;){f=r[c];var p=f[0],d=t[p],v=f[1];if(h&&f[2]){if(void 0===d&&!(p in t))return!1}else{var y=new i.a;if(u)var g=u(d,v,p,t,e,y);if(!(void 0===g?n.i(o.a)(v,d,a|s,u,y):g))return!1}}return!0}var i=n(210),o=n(211),a=1,s=2;e.a=r},function(t,e,n){"use strict";function r(t){return!(!n.i(a.a)(t)||n.i(o.a)(t))&&(n.i(i.a)(t)?d:c).test(n.i(s.a)(t))}var i=n(218),o=n(711),a=n(53),s=n(345),u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,l=Function.prototype,h=Object.prototype,f=l.toString,p=h.hasOwnProperty,d=RegExp("^"+f.call(p).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.a=r},function(t,e,n){"use strict";function r(t){return n.i(a.a)(t)&&n.i(o.a)(t.length)&&!!s[n.i(i.a)(t)]}var i=n(81),o=n(219),a=n(62),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.a=r},function(t,e,n){"use strict";function r(t){return"function"==typeof t?t:null==t?a.a:"object"==typeof t?n.i(s.a)(t)?n.i(o.a)(t[0],t[1]):n.i(i.a)(t):n.i(u.a)(t)}var i=n(675),o=n(676),a=n(215),s=n(39),u=n(745);e.a=r},function(t,e,n){"use strict";function r(t){if(!n.i(i.a)(t))return n.i(o.a)(t);var e=[];for(var r in Object(t))s.call(t,r)&&"constructor"!=r&&e.push(r);return e}var i=n(214),o=n(724),a=Object.prototype,s=a.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t){if(!n.i(i.a)(t))return n.i(a.a)(t);var e=n.i(o.a)(t),r=[];for(var s in t)("constructor"!=s||!e&&u.call(t,s))&&r.push(s);return r}var i=n(53),o=n(214),a=n(725),s=Object.prototype,u=s.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t){var e=n.i(o.a)(t);return 1==e.length&&e[0][2]?n.i(a.a)(e[0][0],e[0][1]):function(r){return r===t||n.i(i.a)(r,t,e)}}var i=n(669),o=n(697),a=n(342);e.a=r},function(t,e,n){"use strict";function r(t,e){return n.i(s.a)(t)&&n.i(u.a)(e)?n.i(c.a)(n.i(l.a)(t),e):function(r){var s=n.i(o.a)(r,t);return void 0===s&&s===e?n.i(a.a)(r,t):n.i(i.a)(e,s,h|f)}}var i=n(211),o=n(740),a=n(741),s=n(213),u=n(341),c=n(342),l=n(106),h=1,f=2;e.a=r},function(t,e,n){"use strict";function r(t,e,l,h,f){t!==e&&n.i(a.a)(e,function(a,c){if(n.i(u.a)(a))f||(f=new i.a),n.i(s.a)(t,e,c,l,r,h,f);else{var p=h?h(t[c],a,c+"",t,e,f):void 0;void 0===p&&(p=a),n.i(o.a)(t,c,p)}},c.a)}var i=n(210),o=n(332),a=n(333),s=n(678),u=n(53),c=n(347);e.a=r},function(t,e,n){"use strict";function r(t,e,r,_,m,b,w){var E=t[r],S=e[r],T=w.get(S);if(T)return void n.i(i.a)(t,r,T);var C=b?b(E,S,r+"",t,e,w):void 0,I=void 0===C;if(I){var O=n.i(l.a)(S),A=!O&&n.i(f.a)(S),R=!O&&!A&&n.i(y.a)(S);C=S,O||A||R?n.i(l.a)(E)?C=E:n.i(h.a)(E)?C=n.i(s.a)(E):A?(I=!1,C=n.i(o.a)(S,!0)):R?(I=!1,C=n.i(a.a)(S,!0)):C=[]:n.i(v.a)(S)||n.i(c.a)(S)?(C=E,n.i(c.a)(E)?C=n.i(g.a)(E):(!n.i(d.a)(E)||_&&n.i(p.a)(E))&&(C=n.i(u.a)(S))):I=!1}I&&(w.set(S,C),m(C,S,_,b,w),w.delete(S)),n.i(i.a)(t,r,C)}var i=n(332),o=n(688),a=n(689),s=n(336),u=n(708),c=n(216),l=n(39),h=n(742),f=n(217),p=n(218),d=n(53),v=n(220),y=n(221),g=n(748);e.a=r},function(t,e,n){"use strict";function r(t){return function(e){return null==e?void 0:e[t]}}e.a=r},function(t,e,n){"use strict";function r(t){return function(e){return n.i(i.a)(e,t)}}var i=n(334);e.a=r},function(t,e,n){"use strict";function r(t,e){return n.i(a.a)(n.i(o.a)(t,e,i.a),t+"")}var i=n(215),o=n(728),a=n(732);e.a=r},function(t,e,n){"use strict";var r=n(739),i=n(337),o=n(215),a=i.a?function(t,e){return n.i(i.a)(t,"toString",{configurable:!0,enumerable:!1,value:n.i(r.a)(e),writable:!0})}:o.a;e.a=a},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}e.a=r},function(t,e,n){"use strict";function r(t){if("string"==typeof t)return t;if(n.i(a.a)(t))return n.i(o.a)(t,r)+"";if(n.i(s.a)(t))return l?l.call(t):"";var e=t+"";return"0"==e&&1/t==-u?"-0":e}var i=n(136),o=n(331),a=n(39),s=n(142),u=1/0,c=i.a?i.a.prototype:void 0,l=c?c.toString:void 0;e.a=r},function(t,e,n){"use strict";function r(t){return function(e){return t(e)}}e.a=r},function(t,e,n){"use strict";function r(t,e){return t.has(e)}e.a=r},function(t,e,n){"use strict";function r(t){var e=new t.constructor(t.byteLength);return new i.a(e).set(new i.a(t)),e}var i=n(329);e.a=r},function(t,e,n){"use strict";(function(t){function r(t,e){if(e)return t.slice();var n=t.length,r=c?c(n):new t.constructor(n);return t.copy(r),r}var i=n(38),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?i.a.Buffer:void 0,c=u?u.allocUnsafe:void 0;e.a=r}).call(e,n(295)(t))},function(t,e,n){"use strict";function r(t,e){var r=e?n.i(i.a)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var i=n(687);e.a=r},function(t,e,n){"use strict";function r(t,e,r,a){var s=!r;r||(r={});for(var u=-1,c=e.length;++u<c;){var l=e[u],h=a?a(r[l],t[l],l,r,t):void 0;void 0===h&&(h=t[l]),s?n.i(o.a)(r,l,h):n.i(i.a)(r,l,h)}return r}var i=n(662),o=n(138);e.a=r},function(t,e,n){"use strict";var r=n(38),i=r.a["__core-js_shared__"];e.a=i},function(t,e,n){"use strict";function r(t){return n.i(i.a)(function(e,r){var i=-1,a=r.length,s=a>1?r[a-1]:void 0,u=a>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(a--,s):void 0,u&&n.i(o.a)(r[0],r[1],u)&&(s=a<3?void 0:s,a=1),e=Object(e);++i<a;){var c=r[i];c&&t(e,c,i,s)}return e})}var i=n(681),o=n(709);e.a=r},function(t,e,n){"use strict";function r(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}e.a=r},function(t,e,n){"use strict";function r(t,e,r,i,S,C,I){switch(r){case E:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case w:return!(t.byteLength!=e.byteLength||!C(new o.a(t),new o.a(e)));case f:case p:case y:return n.i(a.a)(+t,+e);case d:return t.name==e.name&&t.message==e.message;case g:case m:return t==e+"";case v:var O=u.a;case _:var A=i&l;if(O||(O=c.a),t.size!=e.size&&!A)return!1;var R=I.get(t);if(R)return R==e;i|=h,I.set(t,e);var N=n.i(s.a)(O(t),O(e),i,S,C,I);return I.delete(t),N;case b:if(T)return T.call(t)==T.call(e)}return!1}var i=n(136),o=n(329),a=n(107),s=n(338),u=n(722),c=n(731),l=1,h=2,f="[object Boolean]",p="[object Date]",d="[object Error]",v="[object Map]",y="[object Number]",g="[object RegExp]",_="[object Set]",m="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",E="[object DataView]",S=i.a?i.a.prototype:void 0,T=S?S.valueOf:void 0;e.a=r},function(t,e,n){"use strict";function r(t,e,r,a,u,c){var l=r&o,h=n.i(i.a)(t),f=h.length;if(f!=n.i(i.a)(e).length&&!l)return!1;for(var p=f;p--;){var d=h[p];if(!(l?d in e:s.call(e,d)))return!1}var v=c.get(t);if(v&&c.get(e))return v==e;var y=!0;c.set(t,e),c.set(e,t);for(var g=l;++p<f;){d=h[p];var _=t[d],m=e[d];if(a)var b=l?a(m,_,d,e,t,c):a(_,m,d,t,e,c);if(!(void 0===b?_===m||u(_,m,r,a,c):b)){y=!1;break}g||(g="constructor"==d)}if(y&&!g){var w=t.constructor,E=e.constructor;w!=E&&"constructor"in t&&"constructor"in e&&!("function"==typeof w&&w instanceof w&&"function"==typeof E&&E instanceof E)&&(y=!1)}return c.delete(t),c.delete(e),y}var i=n(696),o=1,a=Object.prototype,s=a.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t){return n.i(i.a)(t,a.a,o.a)}var i=n(665),o=n(699),a=n(222);e.a=r},function(t,e,n){"use strict";function r(t){for(var e=n.i(o.a)(t),r=e.length;r--;){var a=e[r],s=t[a];e[r]=[a,s,n.i(i.a)(s)]}return e}var i=n(341),o=n(222);e.a=r},,function(t,e,n){"use strict";var r=n(659),i=n(746),o=Object.prototype,a=o.propertyIsEnumerable,s=Object.getOwnPropertySymbols,u=s?function(t){return null==t?[]:(t=Object(t),n.i(r.a)(s(t),function(e){return a.call(t,e)}))}:i.a;e.a=u},function(t,e,n){"use strict";var r=n(652),i=n(208),o=n(654),a=n(655),s=n(657),u=n(81),c=n(345),l=n.i(c.a)(r.a),h=n.i(c.a)(i.a),f=n.i(c.a)(o.a),p=n.i(c.a)(a.a),d=n.i(c.a)(s.a),v=u.a;(r.a&&"[object DataView]"!=v(new r.a(new ArrayBuffer(1)))||i.a&&"[object Map]"!=v(new i.a)||o.a&&"[object Promise]"!=v(o.a.resolve())||a.a&&"[object Set]"!=v(new a.a)||s.a&&"[object WeakMap]"!=v(new s.a))&&(v=function(t){var e=n.i(u.a)(t),r="[object Object]"==e?t.constructor:void 0,i=r?n.i(c.a)(r):"";if(i)switch(i){case l:return"[object DataView]";case h:return"[object Map]";case f:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),e.a=v},function(t,e,n){"use strict";function r(t,e){return null==t?void 0:t[e]}e.a=r},function(t,e,n){"use strict";function r(t,e,r){e=n.i(i.a)(e,t);for(var l=-1,h=e.length,f=!1;++l<h;){var p=n.i(c.a)(e[l]);if(!(f=null!=t&&r(t,p)))break;t=t[p]}return f||++l!=h?f:!!(h=null==t?0:t.length)&&n.i(u.a)(h)&&n.i(s.a)(p,h)&&(n.i(a.a)(t)||n.i(o.a)(t))}var i=n(335),o=n(216),a=n(39),s=n(212),u=n(219),c=n(106);e.a=r},function(t,e,n){"use strict";function r(){this.__data__=i.a?n.i(i.a)(null):{},this.size=0}var i=n(140);e.a=r},function(t,e,n){"use strict";function r(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__;if(i.a){var n=e[t];return n===o?void 0:n}return s.call(e,t)?e[t]:void 0}var i=n(140),o="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__;return i.a?void 0!==e[t]:a.call(e,t)}var i=n(140),o=Object.prototype,a=o.hasOwnProperty;e.a=r},function(t,e,n){"use strict";function r(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i.a&&void 0===e?o:e,this}var i=n(140),o="__lodash_hash_undefined__";e.a=r},function(t,e,n){"use strict";function r(t){return"function"!=typeof t.constructor||n.i(a.a)(t)?{}:n.i(i.a)(n.i(o.a)(t))}var i=n(663),o=n(340),a=n(214);e.a=r},function(t,e,n){"use strict";function r(t,e,r){if(!n.i(s.a)(r))return!1;var u=typeof e;return!!("number"==u?n.i(o.a)(r)&&n.i(a.a)(e,r.length):"string"==u&&e in r)&&n.i(i.a)(r[e],t)}var i=n(107),o=n(141),a=n(212),s=n(53);e.a=r},function(t,e,n){"use strict";function r(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}e.a=r},function(t,e,n){"use strict";function r(t){return!!o&&o in t}var i=n(691),o=function(){var t=/[^.]+$/.exec(i.a&&i.a.keys&&i.a.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();e.a=r},function(t,e,n){"use strict";function r(){this.__data__=[],this.size=0}e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__,r=n.i(i.a)(e,t);return!(r<0)&&(r==e.length-1?e.pop():a.call(e,r,1),--this.size,!0)}var i=n(137),o=Array.prototype,a=o.splice;e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__,r=n.i(i.a)(e,t);return r<0?void 0:e[r][1]}var i=n(137);e.a=r},function(t,e,n){"use strict";function r(t){return n.i(i.a)(this.__data__,t)>-1}var i=n(137);e.a=r},function(t,e,n){"use strict";function r(t,e){var r=this.__data__,o=n.i(i.a)(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}var i=n(137);e.a=r},function(t,e,n){"use strict";function r(){this.size=0,this.__data__={hash:new i.a,map:new(a.a||o.a),string:new i.a}}var i=n(653),o=n(135),a=n(208);e.a=r},function(t,e,n){"use strict";function r(t){var e=n.i(i.a)(this,t).delete(t);return this.size-=e?1:0,e}var i=n(139);e.a=r},function(t,e,n){"use strict";function r(t){return n.i(i.a)(this,t).get(t)}var i=n(139);e.a=r},function(t,e,n){"use strict";function r(t){return n.i(i.a)(this,t).has(t)}var i=n(139);e.a=r},function(t,e,n){"use strict";function r(t,e){var r=n.i(i.a)(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var i=n(139);e.a=r},function(t,e,n){"use strict";function r(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}e.a=r},function(t,e,n){"use strict";function r(t){var e=n.i(i.a)(t,function(t){return r.size===o&&r.clear(),t}),r=e.cache;return e}var i=n(743),o=500;e.a=r},function(t,e,n){"use strict";var r=n(343),i=n.i(r.a)(Object.keys,Object);e.a=i},function(t,e,n){"use strict";function r(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}e.a=r},function(t,e,n){"use strict";(function(t){var r=n(339),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a&&r.a.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(t){}}();e.a=u}).call(e,n(295)(t))},,function(t,e,n){"use strict";function r(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var a=arguments,s=-1,u=o(a.length-e,0),c=Array(u);++s<u;)c[s]=a[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=a[s];return l[e]=r(c),n.i(i.a)(t,this,l)}}var i=n(658),o=Math.max;e.a=r},function(t,e,n){"use strict";function r(t){return this.__data__.set(t,i),this}var i="__lodash_hash_undefined__";e.a=r},function(t,e,n){"use strict";function r(t){return this.__data__.has(t)}e.a=r},function(t,e,n){"use strict";function r(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}e.a=r},function(t,e,n){"use strict";var r=n(682),i=n(733),o=n.i(i.a)(r.a);e.a=o},function(t,e,n){"use strict";function r(t){var e=0,n=0;return function(){var r=a(),s=o-(r-n);if(n=r,s>0){if(++e>=i)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var i=800,o=16,a=Date.now;e.a=r},function(t,e,n){"use strict";function r(){this.__data__=new i.a,this.size=0}var i=n(135);e.a=r},function(t,e,n){"use strict";function r(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}e.a=r},function(t,e,n){"use strict";function r(t){return this.__data__.get(t)}e.a=r},function(t,e,n){"use strict";function r(t){return this.__data__.has(t)}e.a=r},function(t,e,n){"use strict";function r(t,e){var n=this.__data__;if(n instanceof i.a){var r=n.__data__;if(!o.a||r.length<s-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new a.a(r)}return n.set(t,e),this.size=n.size,this}var i=n(135),o=n(208),a=n(209),s=200;e.a=r},function(t,e,n){"use strict";function r(t){return function(){return t}}e.a=r},function(t,e,n){"use strict";function r(t,e,r){var o=null==t?void 0:n.i(i.a)(t,e);return void 0===o?r:o}var i=n(334);e.a=r},function(t,e,n){"use strict";function r(t,e){return null!=t&&n.i(o.a)(t,e,i.a)}var i=n(666),o=n(702);e.a=r},function(t,e,n){"use strict";function r(t){return n.i(o.a)(t)&&n.i(i.a)(t)}var i=n(141),o=n(62);e.a=r},function(t,e,n){"use strict";function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(r.Cache||i.a),n}var i=n(209),o="Expected a function";r.Cache=i.a,e.a=r},function(t,e,n){"use strict";var r=n(677),i=n(692),o=n.i(i.a)(function(t,e,i){n.i(r.a)(t,e,i)});e.a=o},function(t,e,n){"use strict";function r(t){return n.i(a.a)(t)?n.i(i.a)(n.i(s.a)(t)):n.i(o.a)(t)}var i=n(679),o=n(680),a=n(213),s=n(106);e.a=r},function(t,e,n){"use strict";function r(){return[]}e.a=r},function(t,e,n){"use strict";function r(){return!1}e.a=r},function(t,e,n){"use strict";function r(t){return n.i(i.a)(t,n.i(o.a)(t))}var i=n(690),o=n(347);e.a=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var r=n(360),i=n(153),o=n(247),a=i(function(t,e){return o(t)?r(t,e):[]});t.exports=a},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(120),i=n(41),o=n(268),a=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default={spacing:a.default,fontFamily:"Roboto, sans-serif",borderRadius:2,palette:{primary1Color:r.cyan700,primary2Color:r.cyan700,primary3Color:r.grey600,accent1Color:r.pinkA200,accent2Color:r.pinkA400,accent3Color:r.pinkA100,textColor:r.fullWhite,secondaryTextColor:(0,i.fade)(r.fullWhite,.7),alternateTextColor:"#303030",canvasColor:"#303030",borderColor:(0,i.fade)(r.fullWhite,.3),disabledColor:(0,i.fade)(r.fullWhite,.3),pickerHeaderColor:(0,i.fade)(r.fullWhite,.12),clockCircleColor:(0,i.fade)(r.fullWhite,.12)}}},,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(i),a=n(21),s=r(a),u=n(19),c=r(u),l=function(t){return o.default.createElement(c.default,t,o.default.createElement("path",{d:"M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"}))};l=(0,s.default)(l),l.displayName="ActionBuild",l.muiName="SvgIcon",e.default=l},,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(i),a=n(21),s=r(a),u=n(19),c=r(u),l=function(t){return o.default.createElement(c.default,t,o.default.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}))};l=(0,s.default)(l),l.displayName="ActionDeleteForever",l.muiName="SvgIcon",e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(i),a=n(21),s=r(a),u=n(19),c=r(u),l=function(t){return o.default.createElement(c.default,t,o.default.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}))};l=(0,s.default)(l),l.displayName="ActionDone",l.muiName="SvgIcon",e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(i),a=n(21),s=r(a),u=n(19),c=r(u),l=function(t){return o.default.createElement(c.default,t,o.default.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))};l=(0,s.default)(l),l.displayName="ContentAdd",l.muiName="SvgIcon",e.default=l},,,,,,,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(i),a=n(21),s=r(a),u=n(19),c=r(u),l=function(t){return o.default.createElement(c.default,t,o.default.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))};l=(0,s.default)(l),l.displayName="NavigationClose",l.muiName="SvgIcon",e.default=l},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r={topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough: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,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null},i={topLevelTypes:r};t.exports=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t,e){var n=l.extractSingleTouch(e);return n?n[t.page]:t.page in e?e[t.page]:e[t.client]+h[t.envScroll]}function i(t,e){var n=r(b.x,e),i=r(b.y,e);return Math.pow(Math.pow(n-t.x,2)+Math.pow(i-t.y,2),.5)}function o(t){return{tapMoveThreshold:y,ignoreMouseThreshold:g,eventTypes:S,extractEvents:function(e,n,o,a){if(!p(e)&&!d(e))return null;if(v(e))m=T();else if(t(m,T()))return null;var s=null,l=i(_,o);return d(e)&&l<y&&(s=c.getPooled(S.touchTap,n,o,a)),p(e)?(_.x=r(b.x,o),_.y=r(b.y,o)):d(e)&&(_.x=0,_.y=0),u.accumulateTwoPhaseDispatches(s),s}}}var a=n(1040),s=n(169),u=n(93),c=n(95),l=n(1144),h=n(277),f=n(617),p=(a.topLevelTypes,s.isStartish),d=s.isEndish,v=function(t){return["topTouchCancel","topTouchEnd","topTouchStart","topTouchMove"].indexOf(t)>=0},y=10,g=750,_={x:null,y:null},m=null,b={x:{page:"pageX",client:"clientX",envScroll:"currentPageScrollLeft"},y:{page:"pageY",client:"clientY",envScroll:"currentPageScrollTop"}},w=["topTouchStart","topTouchCancel","topTouchEnd","topTouchMove"],E=["topMouseDown","topMouseMove","topMouseUp"].concat(w),S={touchTap:{phasedRegistrationNames:{bubbled:f({onTouchTap:null}),captured:f({onTouchTapCapture:null})},dependencies:E}},T=function(){return Date.now?Date.now:function(){return+new Date}}();t.exports=o},function(t,e){var n={extractSingleTouch:function(t){var e=t.touches,n=t.changedTouches,r=e&&e.length>0,i=n&&n.length>0;return!r&&i?n[0]:r?e[0]:t}};t.exports=n},function(t,e){t.exports=function(t,e){if(t&&e-t<750)return!0}},function(t,e,n){var r=(n(10),n(1145)),i=!1;t.exports=function(t){t=t||{};var e=t.shouldRejectClick||r;i=!0,n(92).injection.injectEventPluginsByName({TapEventPlugin:n(1143)(e)})}},,,,,,,,,,,,,,,function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";var t={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n=Object.defineProperty,r=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,o=Object.getOwnPropertyDescriptor,a=Object.getPrototypeOf,s=a&&a(Object);return function u(c,l,h){if("string"!=typeof l){if(s){var f=a(l);f&&f!==s&&u(c,f,h)}var p=r(l);i&&(p=p.concat(i(l)));for(var d=0;d<p.length;++d){var v=p[d];if(!(t[v]||e[v]||h&&h[v])){var y=o(l,v);try{n(c,v,y)}catch(t){}}}return c}return c}})},,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=n(404),u=r(s),c=n(48),l=r(c),h=n(100),f=r(h);e.default=(0,l.default)(u.default,function(t){var e=t.input,n=e.onChange,r=e.value,s=t.onNewRequest,u=t.dataSourceConfig,c=t.dataSource,l=i(t,["input","onNewRequest","dataSourceConfig","dataSource"]);return a({},(0,f.default)(l),{dataSourceConfig:u,dataSource:c,searchText:u&&c?(c.find(function(t){return t[u.value]===r})||{})[u.text]:r,onNewRequest:function(t,e){n("object"===(void 0===t?"undefined":o(t))&&u?t[u.value]:t),s&&s(t,e)},onUpdateInput:function(t){u||n(t)}})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(116),s=r(a),u=n(48),c=r(u);e.default=(0,c.default)(s.default,function(t){var e=t.input,n=e.onChange,r=e.value,a=i(e,["onChange","value"]),s=(t.meta,t.onCheck),u=(t.defaultChecked,i(t,["input","meta","onCheck","defaultChecked"]));return o({},a,u,{checked:!!r,onCheck:function(t,e){n(e),s&&s(e)}})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(414),s=r(a),u=n(48),c=r(u),l=n(100),h=r(l);e.default=(0,c.default)(s.default,function(t){var e=t.input,n=(e.onBlur,i(e,["onBlur"])),r=(t.defaultDate,t.onChange),a=i(t,["input","defaultDate","onChange"]);return o({},n,(0,h.default)(a),{onChange:function(t,e){n.onChange(e),r&&r(e)}})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(422),s=n(48),u=r(s),c=n(100),l=r(c),h=function(t,e){var n=i(t.input,[]),r=i(t,["input"]);return(0,l.default)(o({},r,{input:o({},n,{valueSelected:n.value})}),e)};e.default=(0,u.default)(a.RadioButtonGroup,h)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(423),s=r(a),u=n(48),c=r(u),l=n(100),h=r(l);e.default=(0,c.default)(s.default,function(t){var e=t.input,n=e.onChange,r=e.value,a=e.onBlur,s=i(e,["onChange","value","onBlur"]),u=t.onChange,c=i(t,["input","onChange"]);return o({},(0,h.default)(c),s,{value:r,onChange:function(t,e,r){n(r),u&&u(r)},onBlur:function(){return a(r)}})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(424),s=r(a),u=n(48),c=r(u);e.default=(0,c.default)(s.default,function(t){var e=t.input,n=(e.onDragStart,e.onChange),r=e.name,a=e.value,s=t.onChange,u=(t.defaultValue,t.meta,i(t,["input","onChange","defaultValue","meta"]));return o({},u,{name:r,value:a,onChange:function(t,e){n(e),s&&s(e)}})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o=n(89),a=r(o),s=n(48),u=r(s),c=n(100),l=r(c);e.default=(0,u.default)(a.default,function(t){var e=(t.defaultValue,i(t,["defaultValue"]));return(0,l.default)(e)})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(434),s=r(a),u=n(48),c=r(u),l=n(100),h=r(l);e.default=(0,c.default)(s.default,function(t){var e=t.input,n=(e.onBlur,i(e,["onBlur"])),r=(t.defaultTime,t.onChange),a=i(t,["input","defaultTime","onChange"]);return o({},n,(0,h.default)(a),{onChange:function(t,e){n.onChange(e),r&&r(e)}})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(435),s=r(a),u=n(48),c=r(u);e.default=(0,c.default)(s.default,function(t){var e=t.input,n=e.onChange,r=e.value,a=i(e,["onChange","value"]),s=(t.defaultToggled,t.meta,i(t,["input","defaultToggled","meta"]));return o({},a,s,{onToggle:n,toggled:!!r})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1172);Object.defineProperty(e,"Toggle",{enumerable:!0,get:function(){return r(i).default}});var o=n(1169);Object.defineProperty(e,"Slider",{enumerable:!0,get:function(){return r(o).default}});var a=n(1165);Object.defineProperty(e,"Checkbox",{enumerable:!0,get:function(){return r(a).default}});var s=n(1170);Object.defineProperty(e,"TextField",{enumerable:!0,get:function(){return r(s).default}});var u=n(1171);Object.defineProperty(e,"TimePicker",{enumerable:!0,get:function(){return r(u).default}});var c=n(1166);Object.defineProperty(e,"DatePicker",{enumerable:!0,get:function(){return r(c).default}});var l=n(1168);Object.defineProperty(e,"SelectField",{enumerable:!0,get:function(){return r(l).default}});var h=n(1164);Object.defineProperty(e,"AutoComplete",{enumerable:!0,get:function(){return r(h).default}});var f=n(1167);Object.defineProperty(e,"RadioButtonGroup",{enumerable:!0,get:function(){return r(f).default}})},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),u=(n.n(s),n(1)),c=n.n(u),l=n(37),h=n(498),f=n(502),p=n(1238),d=n(12),v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},y=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_=["_reduxForm"],m=function(t){return t&&"object"===(void 0===t?"undefined":g(t))},b=function(t){return t&&"function"==typeof t},w=function(t){m(t)&&b(t.preventDefault)&&t.preventDefault()},E=function(t,e){if(m(t)&&m(t.dataTransfer)&&b(t.dataTransfer.getData))return t.dataTransfer.getData(e)},S=function(t,e,n){m(t)&&m(t.dataTransfer)&&b(t.dataTransfer.setData)&&t.dataTransfer.setData(e,n)},T=function(t){var e=t.deepEqual,u=t.getIn,g=t.toJS,m=function(t,e){var n=d.a.getIn(t,e);return n&&n._error?n._error:n},b=function(t,e){var n=u(t,e);return n&&n._warning?n._warning:n},T=function(t){function c(t){i(this,c);var e=o(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,t));return e.handleChange=e.handleChange.bind(e),e.handleFocus=e.handleFocus.bind(e),e.handleBlur=e.handleBlur.bind(e),e.handleDragStart=e.handleDragStart.bind(e),e.handleDrop=e.handleDrop.bind(e),e}return a(c,t),y(c,[{key:"shouldComponentUpdate",value:function(t){var n=this,r=Object.keys(t),i=Object.keys(this.props);return r.length!==i.length||r.some(function(r){return!~_.indexOf(r)&&!e(n.props[r],t[r])})}},{key:"isPristine",value:function(){return this.props.pristine}},{key:"getValue",value:function(){return this.props.value}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"handleChange",value:function(t){var e=this.props,r=e.name,i=e.dispatch,o=e.parse,a=e.normalize,s=e.onChange,u=e._reduxForm,c=e.value,l=n.i(f.a)(t,{name:r,parse:o,normalize:a}),h=!1;s&&s(v({},t,{preventDefault:function(){return h=!0,w(t)}}),l,c),h||i(u.change(r,l))}},{key:"handleFocus",value:function(t){var e=this.props,n=e.name,r=e.dispatch,i=e.onFocus,o=e._reduxForm,a=!1;i&&i(v({},t,{preventDefault:function(){return a=!0,w(t)}})),a||r(o.focus(n))}},{key:"handleBlur",value:function(t){var e=this.props,r=e.name,i=e.dispatch,o=e.parse,a=e.normalize,s=e.onBlur,u=e._reduxForm,c=e._value,l=e.value,h=n.i(f.a)(t,{name:r,parse:o,normalize:a});h===c&&void 0!==c&&(h=l);var p=!1;s&&s(v({},t,{preventDefault:function(){return p=!0,w(t)}}),h,l),p||(i(u.blur(r,h)),u.asyncValidate&&u.asyncValidate(r,h))}},{key:"handleDragStart",value:function(t){var e=this.props,n=e.onDragStart,r=e.value;S(t,p.a,null==r?"":r),n&&n(t)}},{key:"handleDrop",value:function(t){var e=this.props,n=e.name,r=e.dispatch,i=e.onDrop,o=e._reduxForm,a=e.value,s=E(t,p.a),u=!1;i&&i(v({},t,{preventDefault:function(){return u=!0,w(t)}}),s,a),u||(r(o.change(n,s)),w(t))}},{key:"render",value:function(){var t=this.props,e=t.component,i=t.withRef,o=t.name,a=t._reduxForm,c=(t.normalize,t.onBlur,t.onChange,t.onFocus,t.onDragStart,t.onDrop,r(t,["component","withRef","name","_reduxForm","normalize","onBlur","onChange","onFocus","onDragStart","onDrop"])),l=n.i(h.a)({getIn:u,toJS:g},o,v({},c,{form:a.form,onBlur:this.handleBlur,onChange:this.handleChange,onDrop:this.handleDrop,onDragStart:this.handleDragStart,onFocus:this.handleFocus})),f=l.custom,p=r(l,["custom"]);if(i&&(f.ref="renderedComponent"),"string"==typeof e){var d=p.input;p.meta;return n.i(s.createElement)(e,v({},d,f))}return n.i(s.createElement)(e,v({},p,f))}}]),c}(s.Component);return T.propTypes={component:c.a.oneOfType([c.a.func,c.a.string]).isRequired,props:c.a.object},n.i(l.connect)(function(t,n){var r=n.name,i=n._reduxForm,o=i.initialValues,a=i.getFormState,s=a(t),c=u(s,"initial."+r),l=void 0!==c?c:o&&u(o,r),h=u(s,"values."+r),f=u(s,"submitting"),p=m(u(s,"syncErrors"),r),d=b(u(s,"syncWarnings"),r),v=e(h,l);return{asyncError:u(s,"asyncErrors."+r),asyncValidating:u(s,"asyncValidating")===r,dirty:!v,pristine:v,state:u(s,"fields."+r),submitError:u(s,"submitErrors."+r),submitFailed:u(s,"submitFailed"),submitting:f,syncError:p,syncWarning:d,initial:l,value:h,_value:n.value}},void 0,void 0,{withRef:!0})(T)};e.a=T},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(348),u=n(0),c=(n.n(u),n(1)),l=n.n(c),h=n(37),f=n(57),p=n(1185),d=n(12),v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=["_reduxForm","value"],g=function(t){var e=t.deepEqual,c=t.getIn,g=t.size,_=function(t,e){return d.a.getIn(t,e+"._error")},m=function(t,e){return c(t,e+"._warning")},b=function(t){function s(){i(this,s);var t=o(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return t.getValue=t.getValue.bind(t),t}return a(s,t),v(s,[{key:"shouldComponentUpdate",value:function(t){var n=this,r=this.props.value,i=t.value;if(r&&i&&(r.length!==i.length||t.rerenderOnEveryChange&&r.some(function(t){return i.every(function(n){return!e(t,n)})})))return!0;var o=Object.keys(t),a=Object.keys(this.props);return o.length!==a.length||o.some(function(r){return!~y.indexOf(r)&&!e(n.props[r],t[r])})}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"getValue",value:function(t){return this.props.value&&c(this.props.value,t)}},{key:"render",value:function(){var t=this.props,e=t.component,i=t.withRef,o=t.name,a=t._reduxForm,s=(t.validate,t.warn,t.rerenderOnEveryChange,r(t,["component","withRef","name","_reduxForm","validate","warn","rerenderOnEveryChange"])),l=n.i(p.a)(c,o,a.form,a.sectionPrefix,this.getValue,s);return i&&(l.ref="renderedComponent"),n.i(u.createElement)(e,l)}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),s}(u.Component);return b.propTypes={component:l.a.oneOfType([l.a.func,l.a.string]).isRequired,props:l.a.object,rerenderOnEveryChange:l.a.bool},b.defaultProps={rerenderOnEveryChange:!1},b.contextTypes={_reduxForm:l.a.object},n.i(h.connect)(function(t,n){var r=n.name,i=n._reduxForm,o=i.initialValues,a=i.getFormState,s=a(t),u=c(s,"initial."+r)||o&&c(o,r),l=c(s,"values."+r),h=c(s,"submitting"),f=_(c(s,"syncErrors"),r),p=m(c(s,"syncWarnings"),r),d=e(l,u);return{asyncError:c(s,"asyncErrors."+r+"._error"),dirty:!d,pristine:d,state:c(s,"fields."+r),submitError:c(s,"submitErrors."+r+"._error"),submitFailed:c(s,"submitFailed"),submitting:h,syncError:f,syncWarning:p,value:l,length:g(l)}},function(t,e){var r=e.name,i=e._reduxForm,o=i.arrayInsert,a=i.arrayMove,u=i.arrayPop,c=i.arrayPush,l=i.arrayRemove,h=i.arrayRemoveAll,p=i.arrayShift,d=i.arraySplice,v=i.arraySwap,y=i.arrayUnshift;return n.i(s.a)({arrayInsert:o,arrayMove:a,arrayPop:u,arrayPush:c,arrayRemove:l,arrayRemoveAll:h,arrayShift:p,arraySplice:d,arraySwap:v,arrayUnshift:y},function(e){return n.i(f.bindActionCreators)(e.bind(null,r),t)})},void 0,{withRef:!0})(b)};e.a=g},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),u=(n.n(s),n(1)),c=n.n(u),l=n(37),h=n(498),f=n(12),p=n(502),d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=["_reduxForm"],g=function(t){var e=t.deepEqual,u=t.getIn,g=t.toJS,_=t.size,m=function(t,e){return f.a.getIn(t,e+"._error")||f.a.getIn(t,e)},b=function(t,e){var n=u(t,e);return n&&n._warning?n._warning:n},w=function(t){function c(t){i(this,c);var e=o(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,t));return e.handleChange=e.handleChange.bind(e),e.handleFocus=e.handleFocus.bind(e),e.handleBlur=e.handleBlur.bind(e),e.onChangeFns=t.names.reduce(function(t,n){return t[n]=function(t){return e.handleChange(n,t)},t},{}),e.onFocusFns=t.names.reduce(function(t,n){return t[n]=function(){return e.handleFocus(n)},t},{}),e.onBlurFns=t.names.reduce(function(t,n){return t[n]=function(t){return e.handleBlur(n,t)},t},{}),e}return a(c,t),v(c,[{key:"componentWillReceiveProps",value:function(t){var e=this;this.props.names===t.names||_(this.props.names)===_(t.names)&&!t.names.some(function(t){return!e.props._fields[t]})||(this.onChangeFns=t.names.reduce(function(t,n){return t[n]=function(t){return e.handleChange(n,t)},t},{}),this.onFocusFns=t.names.reduce(function(t,n){return t[n]=function(){return e.handleFocus(n)},t},{}),this.onBlurFns=t.names.reduce(function(t,n){return t[n]=function(t){return e.handleBlur(n,t)},t},{}))}},{key:"shouldComponentUpdate",value:function(t){var n=this,r=Object.keys(t),i=Object.keys(this.props);return r.length!==i.length||r.some(function(r){return!~y.indexOf(r)&&!e(n.props[r],t[r])})}},{key:"isDirty",value:function(){var t=this.props._fields;return Object.keys(t).some(function(e){return t[e].dirty})}},{key:"getValues",value:function(){var t=this.props._fields;return Object.keys(t).reduce(function(e,n){return f.a.setIn(e,n,t[n].value)},{})}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"handleChange",value:function(t,e){var r=this.props,i=r.dispatch,o=r.parse,a=r.normalize,s=r._reduxForm,u=n.i(p.a)(e,{name:t,parse:o,normalize:a});i(s.change(t,u))}},{key:"handleFocus",value:function(t){var e=this.props;(0,e.dispatch)(e._reduxForm.focus(t))}},{key:"handleBlur",value:function(t,e){var r=this.props,i=r.dispatch,o=r.parse,a=r.normalize,s=r._reduxForm,u=n.i(p.a)(e,{name:t,parse:o,normalize:a});i(s.blur(t,u)),s.asyncValidate&&s.asyncValidate(t,u)}},{key:"render",value:function(){var t=this,e=this.props,i=e.component,o=e.withRef,a=e._fields,c=e._reduxForm,l=r(e,["component","withRef","_fields","_reduxForm"]),p=c.sectionPrefix,v=c.form,y=Object.keys(a).reduce(function(e,i){var o=a[i],s=n.i(h.a)({getIn:u,toJS:g},i,d({},o,l,{form:v,onBlur:t.onBlurFns[i],onChange:t.onChangeFns[i],onFocus:t.onFocusFns[i]})),c=s.custom,y=r(s,["custom"]);e.custom=c;var _=p?i.replace(p+".",""):i;return f.a.setIn(e,_,y)},{}),_=y.custom,m=r(y,["custom"]);return o&&(m.ref="renderedComponent"),n.i(s.createElement)(i,d({},m,_))}}]),c}(s.Component);return w.propTypes={component:c.a.oneOfType([c.a.func,c.a.string]).isRequired,_fields:c.a.object.isRequired,props:c.a.object},n.i(l.connect)(function(t,e){var n=e.names,r=e._reduxForm,i=r.initialValues,o=r.getFormState,a=o(t);return{_fields:n.reduce(function(t,n){var r=u(a,"initial."+n),o=void 0!==r?r:i&&u(i,n),s=u(a,"values."+n),c=m(u(a,"syncErrors"),n),l=b(u(a,"syncWarnings"),n),h=u(a,"submitting"),f=s===o;return t[n]={asyncError:u(a,"asyncErrors."+n),asyncValidating:u(a,"asyncValidating")===n,dirty:!f,pristine:f,state:u(a,"fields."+n),submitError:u(a,"submitErrors."+n),submitFailed:u(a,"submitFailed"),submitting:h,syncError:c,syncWarning:l,value:s,_value:e.value},t},{})}},void 0,void 0,{withRef:!0})(w)};e.a=g},function(t,e,n){"use strict";var r=n(1183),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1184),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1186),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=n.n(a),u=n(1),c=n.n(u),l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),h=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(!n._reduxForm)throw new Error("Form must be inside a component decorated with reduxForm()");return o}return o(e,t),l(e,[{key:"componentWillMount",value:function(){this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit)}},{key:"render",value:function(){return s.a.createElement("form",this.props)}}]),e}(a.Component);h.propTypes={onSubmit:c.a.func.isRequired},h.contextTypes={_reduxForm:c.a.object},e.a=h},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=n(0),u=n.n(s),c=n(1),l=n.n(c),h=n(126),f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},p=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function(t){function e(t,n){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(!n._reduxForm)throw new Error("FormSection must be inside a component decorated with reduxForm()");return r}return a(e,t),p(e,[{key:"getChildContext",value:function(){var t=this.context,e=this.props.name;return{_reduxForm:f({},t._reduxForm,{sectionPrefix:n.i(h.a)(t,e)})}}},{key:"render",value:function(){var t=this.props,e=t.children,i=(t.name,t.component),o=r(t,["children","name","component"]);return u.a.isValidElement(e)?e:n.i(s.createElement)(i,f({},o,{children:e}))}}]),e}(s.Component);d.propTypes={name:l.a.string.isRequired,component:l.a.oneOfType([l.a.func,l.a.string])},d.defaultProps={component:"div"},d.childContextTypes={_reduxForm:l.a.object.isRequired},d.contextTypes={_reduxForm:l.a.object},e.a=d},function(t,e,n){"use strict";var r=n(207),i=n.n(r),o=function(t,e,n,r){e(r);var o=t();if(!i()(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var a=function(t){return function(e){if(e&&Object.keys(e).length)return n(e),e;if(t)throw n(),new Error("Asynchronous validation promise was rejected without errors.");return n(),Promise.resolve()}};return o.then(a(!1),a(!0))};e.a=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=(n.n(a),n(1)),u=n.n(s),c=n(22),l=n.n(c),h=n(1174),f=n(506),p=n(126),d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=function(t){var e=t.deepEqual,s=t.getIn,c=t.setIn,y=t.toJS,g=n.i(h.a)({deepEqual:e,getIn:s,toJS:y}),_=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(!n._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return o.normalize=o.normalize.bind(o),o}return o(e,t),v(e,[{key:"shouldComponentUpdate",value:function(t,e){return n.i(f.a)(this,t,e)}},{key:"componentWillMount",value:function(){var t=this;this.context._reduxForm.register(this.name,"Field",function(){return t.props.validate},function(){return t.props.warn})}},{key:"componentWillReceiveProps",value:function(t){this.props.name!==t.name&&(this.context._reduxForm.unregister(this.name),this.context._reduxForm.register(n.i(p.a)(this.context,t.name),"Field"))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return l()(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to Field"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"normalize",value:function(t,e){var n=this.props.normalize;if(!n)return e;var r=this.context._reduxForm.getValues();return n(e,this.value,c(r,t,e),r)}},{key:"render",value:function(){return n.i(a.createElement)(g,d({},this.props,{name:this.name,normalize:this.normalize,_reduxForm:this.context._reduxForm,ref:"connected"}))}},{key:"name",get:function(){return n.i(p.a)(this.context,this.props.name)}},{key:"dirty",get:function(){return!this.pristine}},{key:"pristine",get:function(){return this.refs.connected.getWrappedInstance().isPristine()}},{key:"value",get:function(){return this.refs.connected&&this.refs.connected.getWrappedInstance().getValue()}}]),e}(a.Component);return _.propTypes={name:u.a.string.isRequired,component:u.a.oneOfType([u.a.func,u.a.string]).isRequired,format:u.a.func,normalize:u.a.func,onBlur:u.a.func,onChange:u.a.func,onFocus:u.a.func,onDragStart:u.a.func,onDrop:u.a.func,parse:u.a.func,props:u.a.object,validate:u.a.oneOfType([u.a.func,u.a.arrayOf(u.a.func)]),warn:u.a.oneOfType([u.a.func,u.a.arrayOf(u.a.func)]),withRef:u.a.bool},_.contextTypes={_reduxForm:u.a.object},_};e.a=y},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=n(0),u=(n.n(s),n(1)),c=n.n(u),l=n(22),h=n.n(l),f=n(1175),p=n(126),d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=function(t){return Array.isArray(t)?t:[t]},g=function(t,e){return t&&function(){for(var n=y(t),r=0;r<n.length;r++){var i=n[r].apply(n,arguments);if(i)return a({},e,i)}}},_=function(t){var e=t.deepEqual,a=t.getIn,u=t.size,l=n.i(f.a)({deepEqual:e,getIn:a,size:u}),y=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(!n._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return o}return o(e,t),v(e,[{key:"componentWillMount",value:function(){var t=this;this.context._reduxForm.register(this.name,"FieldArray",function(){return g(t.props.validate,"_error")},function(){return g(t.props.warn,"_warning")})}},{key:"componentWillReceiveProps",value:function(t){this.props.name!==t.name&&(this.context._reduxForm.unregister(this.name),this.context._reduxForm.register(n.i(p.a)(this.context,t.name),"FieldArray"))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return h()(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to FieldArray"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){return n.i(s.createElement)(l,d({},this.props,{name:this.name,syncError:this.syncError,syncWarning:this.syncWarning,_reduxForm:this.context._reduxForm,ref:"connected"}))}},{key:"name",get:function(){return n.i(p.a)(this.context,this.props.name)}},{key:"dirty",get:function(){return this.refs.connected.getWrappedInstance().dirty}},{key:"pristine",get:function(){return this.refs.connected.getWrappedInstance().pristine}},{key:"value",get:function(){return this.refs.connected.getWrappedInstance().value}}]),e}(s.Component);return y.propTypes={name:c.a.string.isRequired,component:c.a.func.isRequired,props:c.a.object,validate:c.a.oneOfType([c.a.func,c.a.arrayOf(c.a.func)]),warn:c.a.oneOfType([c.a.func,c.a.arrayOf(c.a.func)]),withRef:c.a.bool},y.contextTypes={_reduxForm:c.a.object},y};e.a=_},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(t,e,n,o,a,s){var u=s.arrayInsert,c=s.arrayMove,l=s.arrayPop,h=s.arrayPush,f=s.arrayRemove,p=s.arrayRemoveAll,d=s.arrayShift,v=(s.arraySplice,s.arraySwap),y=s.arrayUnshift,g=s.asyncError,_=s.dirty,m=s.length,b=s.pristine,w=s.submitError,E=(s.state,s.submitFailed),S=s.submitting,T=s.syncError,C=s.syncWarning,I=s.value,O=s.props,A=r(s,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","dirty","length","pristine","submitError","state","submitFailed","submitting","syncError","syncWarning","value","props"]),R=T||g||w,N=C,P=o?e.replace(o+".",""):e,k=i({fields:{_isFieldArray:!0,forEach:function(t){return(I||[]).forEach(function(e,n){return t(P+"["+n+"]",n,k.fields)})},get:a,getAll:function(){return I},insert:u,length:m,map:function(t){return(I||[]).map(function(e,n){return t(P+"["+n+"]",n,k.fields)})},move:c,name:e,pop:function(){return l(),t(I,m-1)},push:h,reduce:function(t,e){return(I||[]).reduce(function(e,n,r){return t(e,P+"["+r+"]",r,k.fields)},e)},remove:f,removeAll:p,shift:function(){return d(),t(I,0)},swap:v,unshift:y},meta:{dirty:_,error:R,form:n,warning:N,invalid:!!R,pristine:b,submitting:S,submitFailed:E,valid:!R}},O,A);return k};e.a=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=(n.n(a),n(1)),u=n.n(s),c=n(22),l=n.n(c),h=n(1176),f=n(506),p=n(12),d=n(126),v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},y=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),g=function(t){return t?Array.isArray(t)||t._isFieldArray?void 0:new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'):new Error('No "names" prop was specified <Fields/>')},_=function(t){var e=t.deepEqual,s=t.getIn,c=t.toJS,_=t.size,m=n.i(h.a)({deepEqual:e,getIn:s,toJS:c,size:_}),b=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(!n._reduxForm)throw new Error("Fields must be inside a component decorated with reduxForm()");return o}return o(e,t),y(e,[{key:"shouldComponentUpdate",value:function(t,e){return n.i(f.a)(this,t,e)}},{key:"componentWillMount",value:function(){var t=g(this.props.names);if(t)throw t;var e=this.context,n=e._reduxForm.register;this.names.forEach(function(t){return n(t,"Field")})}},{key:"componentWillReceiveProps",value:function(t){if(!p.a.deepEqual(this.props.names,t.names)){var e=this.context,r=e._reduxForm,i=r.register,o=r.unregister;this.props.names.forEach(function(t){return o(n.i(d.a)(e,t))}),t.names.forEach(function(t){return i(n.i(d.a)(e,t),"Field")})}}},{key:"componentWillUnmount",value:function(){var t=this.context,e=t._reduxForm.unregister;this.props.names.forEach(function(r){return e(n.i(d.a)(t,r))})}},{key:"getRenderedComponent",value:function(){return l()(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to Fields"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){var t=this.context;return n.i(a.createElement)(m,v({},this.props,{names:this.props.names.map(function(e){return n.i(d.a)(t,e)}),_reduxForm:this.context._reduxForm,ref:"connected"}))}},{key:"names",get:function(){var t=this.context;return this.props.names.map(function(e){return n.i(d.a)(t,e)})}},{key:"dirty",get:function(){return this.refs.connected.getWrappedInstance().isDirty()}},{key:"pristine",get:function(){return!this.dirty}},{key:"values",get:function(){return this.refs.connected&&this.refs.connected.getWrappedInstance().getValues()}}]),e}(a.Component);return b.propTypes={names:function(t,e){return g(t[e])},component:u.a.oneOfType([u.a.func,u.a.string]).isRequired,format:u.a.func,parse:u.a.func,props:u.a.object,withRef:u.a.bool},b.contextTypes={_reduxForm:u.a.object},b};e.a=_},function(t,e,n){"use strict";var r=n(22),i=n.n(r),o=n(12),a=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return i()(t,"Form value must be specified"),function(r){for(var a=arguments.length,s=Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];return i()(s.length,"No fields specified"),1===s.length?e(n(r),t+".values."+s[0]):s.reduce(function(i,a){var s=e(n(r),t+".values."+a);return void 0===s?i:o.a.setIn(i,a,s)},{})}}};e.a=a},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(0),s=n.n(a),u=n(1),c=n.n(u),l=n(37),h=n(126),f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),p=function(t){var e=t.getIn;return function(){for(var t=arguments.length,a=Array(t),u=0;u<t;u++)a[u]=arguments[u];var p=void 0;if("string"==typeof a[0])p=a.map(function(t){return{prop:t,path:t}});else{var d=a[0];p=Object.keys(d).map(function(t){return{prop:t,path:d[t]}})}if(!p.length)throw new Error("formValues(): You must specify values to get as formValues(name1, name2, ...) or formValues({propName1: propPath1, ...})");return function(t){var a=function(a){function u(o,a){r(this,u);var s=i(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,o,a));if(!a._reduxForm)throw new Error("formValues() must be used inside a React tree decorated with reduxForm()");var c=a._reduxForm.getValues,f=function(t){var r={},i=c();return p.forEach(function(t){var o=t.prop,s=t.path;return r[o]=e(i,n.i(h.a)(a,s))}),r};return s.Component=n.i(l.connect)(f,function(){return{}})(t),s}return o(u,a),f(u,[{key:"render",value:function(){return s.a.createElement(this.Component,this.props)}}]),u}(s.a.Component);return a.contextTypes={_reduxForm:c.a.object},a}}};e.a=p},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var o=n(292),a=n(1192),s=n(12),u=function(t){return t&&t.type&&t.type.length>o.prefix.length&&t.type.substring(0,o.prefix.length)===o.prefix},c=function(t){function e(t){return t.plugin=function(t){var n=this;return e(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce(function(n,i){var o=f(n,i),a=t[i](o,r,f(e,i));return a===o?n:p(n,i,a)},n(e,r))})},t}var c,l=t.deepEqual,h=t.empty,f=t.getIn,p=t.setIn,d=t.deleteIn,v=t.fromJS,y=t.keys,g=t.size,_=t.splice,m=n.i(a.a)(t),b=function(t,e,n,r,i,o,a){var s=f(t,e+"."+n);return s||a?p(t,e+"."+n,_(s,r,i,o)):t},w=function(t,e,n,r,i,o,a){var u=f(t,e),c=s.a.getIn(u,n);return c||a?p(t,e,s.a.setIn(u,n,s.a.splice(c,r,i,o))):t},E=["values","fields","submitErrors","asyncErrors"],S=function(t,e,n,r,i){var o=t,a=null!=i?h:void 0;return o=b(o,"values",e,n,r,i,!0),o=b(o,"fields",e,n,r,a),o=w(o,"syncErrors",e,n,r,void 0),o=w(o,"syncWarnings",e,n,r,void 0),o=b(o,"submitErrors",e,n,r,void 0),o=b(o,"asyncErrors",e,n,r,void 0)},T=(c={},r(c,o.ARRAY_INSERT,function(t,e){var n=e.meta,r=n.field,i=n.index,o=e.payload;return S(t,r,i,0,o)}),r(c,o.ARRAY_MOVE,function(t,e){var n=e.meta,r=n.field,i=n.from,o=n.to,a=f(t,"values."+r),s=a?g(a):0,u=t;return s&&E.forEach(function(t){var e=t+"."+r;if(f(u,e)){var n=f(u,e+"["+i+"]");u=p(u,e,_(f(u,e),i,1)),u=p(u,e,_(f(u,e),o,0,n))}}),u}),r(c,o.ARRAY_POP,function(t,e){var n=e.meta.field,r=f(t,"values."+n),i=r?g(r):0;return i?S(t,n,i-1,1):t}),r(c,o.ARRAY_PUSH,function(t,e){var n=e.meta.field,r=e.payload,i=f(t,"values."+n),o=i?g(i):0;return S(t,n,o,0,r)}),r(c,o.ARRAY_REMOVE,function(t,e){var n=e.meta,r=n.field,i=n.index;return S(t,r,i,1)}),r(c,o.ARRAY_REMOVE_ALL,function(t,e){var n=e.meta.field,r=f(t,"values."+n),i=r?g(r):0;return i?S(t,n,0,i):t}),r(c,o.ARRAY_SHIFT,function(t,e){var n=e.meta.field;return S(t,n,0,1)}),r(c,o.ARRAY_SPLICE,function(t,e){var n=e.meta,r=n.field,i=n.index,o=n.removeNum,a=e.payload;return S(t,r,i,o,a)}),r(c,o.ARRAY_SWAP,function(t,e){var n=e.meta,r=n.field,i=n.indexA,o=n.indexB,a=t;return E.forEach(function(t){var e=f(a,t+"."+r+"["+i+"]"),n=f(a,t+"."+r+"["+o+"]");void 0===e&&void 0===n||(a=p(a,t+"."+r+"["+i+"]",n),a=p(a,t+"."+r+"["+o+"]",e))}),a}),r(c,o.ARRAY_UNSHIFT,function(t,e){var n=e.meta.field,r=e.payload;return S(t,n,0,0,r)}),r(c,o.AUTOFILL,function(t,e){var n=e.meta.field,r=e.payload,i=t;return i=m(i,"asyncErrors."+n),i=m(i,"submitErrors."+n),i=p(i,"fields."+n+".autofilled",!0),i=p(i,"values."+n,r)}),r(c,o.BLUR,function(t,e){var n=e.meta,r=n.field,i=n.touch,o=e.payload,a=t;return void 0===f(a,"initial."+r)&&""===o?a=m(a,"values."+r):void 0!==o&&(a=p(a,"values."+r,o)),r===f(a,"active")&&(a=d(a,"active")),a=d(a,"fields."+r+".active"),i&&(a=p(a,"fields."+r+".touched",!0),a=p(a,"anyTouched",!0)),a}),r(c,o.CHANGE,function(t,e){var n=e.meta,r=n.field,i=n.touch,o=n.persistentSubmitErrors,a=e.payload,s=t;return void 0===f(s,"initial."+r)&&""===a?s=m(s,"values."+r):void 0!==a&&(s=p(s,"values."+r,a)),s=m(s,"asyncErrors."+r),o||(s=m(s,"submitErrors."+r)),s=m(s,"fields."+r+".autofilled"),i&&(s=p(s,"fields."+r+".touched",!0),s=p(s,"anyTouched",!0)),s}),r(c,o.CLEAR_SUBMIT,function(t){return d(t,"triggerSubmit")}),r(c,o.CLEAR_SUBMIT_ERRORS,function(t){return m(t,"submitErrors")}),r(c,o.CLEAR_ASYNC_ERROR,function(t,e){var n=e.meta.field;return d(t,"asyncErrors."+n)}),r(c,o.FOCUS,function(t,e){var n=e.meta.field,r=t,i=f(t,"active");return r=d(r,"fields."+i+".active"),r=p(r,"fields."+n+".visited",!0),r=p(r,"fields."+n+".active",!0),r=p(r,"active",n)}),r(c,o.INITIALIZE,function(t,e){var n=e.payload,r=e.meta,i=r.keepDirty,o=r.keepSubmitSucceeded,a=v(n),s=h,u=f(t,"warning");u&&(s=p(s,"warning",u));var c=f(t,"syncWarnings");c&&(s=p(s,"syncWarnings",c));var d=f(t,"error");d&&(s=p(s,"error",d));var g=f(t,"syncErrors");g&&(s=p(s,"syncErrors",g));var _=f(t,"registeredFields");_&&(s=p(s,"registeredFields",_));var m=f(t,"values"),b=f(t,"initial"),w=a,E=m;return i&&_?l(w,b)||(y(_).forEach(function(t){var e=f(b,t),n=f(m,t);if(l(n,e)){var r=f(w,t);E=p(E,t,r)}}),y(w).forEach(function(t){if(void 0===f(b,t)){var e=f(w,t);E=p(E,t,e)}})):E=w,o&&f(t,"submitSucceeded")&&(s=p(s,"submitSucceeded",!0)),s=p(s,"values",E),s=p(s,"initial",w)}),r(c,o.REGISTER_FIELD,function(t,e){var n=e.payload,r=n.name,i=n.type,o="registeredFields['"+r+"']",a=f(t,o);if(a){var s=f(a,"count")+1;a=p(a,"count",s)}else a=v({name:r,type:i,count:1});return p(t,o,a)}),r(c,o.RESET,function(t){var e=h,n=f(t,"registeredFields");n&&(e=p(e,"registeredFields",n));var r=f(t,"initial");return r&&(e=p(e,"values",r),e=p(e,"initial",r)),e}),r(c,o.SUBMIT,function(t){return p(t,"triggerSubmit",!0)}),r(c,o.START_ASYNC_VALIDATION,function(t,e){var n=e.meta.field;return p(t,"asyncValidating",n||!0)}),r(c,o.START_SUBMIT,function(t){return p(t,"submitting",!0)}),r(c,o.STOP_ASYNC_VALIDATION,function(t,e){var n=e.payload,r=t;if(r=d(r,"asyncValidating"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);o&&(r=p(r,"error",o)),r=Object.keys(a).length?p(r,"asyncErrors",v(a)):d(r,"asyncErrors")}else r=d(r,"error"),r=d(r,"asyncErrors");return r}),r(c,o.STOP_SUBMIT,function(t,e){var n=e.payload,r=t;if(r=d(r,"submitting"),r=d(r,"submitFailed"),r=d(r,"submitSucceeded"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);r=o?p(r,"error",o):d(r,"error"),r=Object.keys(a).length?p(r,"submitErrors",v(a)):d(r,"submitErrors"),r=p(r,"submitFailed",!0)}else r=p(r,"submitSucceeded",!0),r=d(r,"error"),r=d(r,"submitErrors");return r}),r(c,o.SET_SUBMIT_FAILED,function(t,e){var n=e.meta.fields,r=t;return r=p(r,"submitFailed",!0),r=d(r,"submitSucceeded"),r=d(r,"submitting"),n.forEach(function(t){return r=p(r,"fields."+t+".touched",!0)}),n.length&&(r=p(r,"anyTouched",!0)),r}),r(c,o.SET_SUBMIT_SUCCEEDED,function(t){var e=t;return e=d(e,"submitFailed"),e=p(e,"submitSucceeded",!0)}),r(c,o.TOUCH,function(t,e){var n=e.meta.fields,r=t;return n.forEach(function(t){return r=p(r,"fields."+t+".touched",!0)}),r=p(r,"anyTouched",!0)}),r(c,o.UNREGISTER_FIELD,function(t,e){var n=e.payload,r=n.name,i=n.destroyOnUnmount,o=t,a="registeredFields['"+r+"']",s=f(o,a);if(!s)return o;var u=f(s,"count")-1;return u<=0&&i?(o=d(o,a),l(f(o,"registeredFields"),h)&&(o=d(o,"registeredFields"))):(s=p(s,"count",u),o=p(o,a,s)),i&&(o=m(o,"syncErrors."+r),o=m(o,"submitErrors."+r),o=m(o,"asyncErrors."+r),o=m(o,"syncWarnings."+r)),o}),r(c,o.UNTOUCH,function(t,e){var n=e.meta.fields,r=t;n.forEach(function(t){return r=d(r,"fields."+t+".touched")});var i=y(f(r,"registeredFields")).some(function(t){return f(r,"fields."+t+".touched")});return r=i?p(r,"anyTouched",!0):d(r,"anyTouched")}),r(c,o.UPDATE_SYNC_ERRORS,function(t,e){var n=e.payload,r=n.syncErrors,i=n.error,o=t;return i?(o=p(o,"error",i),o=p(o,"syncError",!0)):(o=d(o,"error"),o=d(o,"syncError")),o=Object.keys(r).length?p(o,"syncErrors",r):d(o,"syncErrors")}),r(c,o.UPDATE_SYNC_WARNINGS,function(t,e){var n=e.payload,r=n.syncWarnings,i=n.warning,o=t;return o=i?p(o,"warning",i):d(o,"warning"),o=Object.keys(r).length?p(o,"syncWarnings",r):d(o,"syncWarnings")}),c),C=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,e=arguments[1],n=T[e.type];return n?n(t,e):t};return e(function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n&&n.meta&&n.meta.form;if(!r||!u(n))return e;if(n.type===o.DESTROY)return n.meta.form.reduce(function(t,e){return m(t,e)},e);var i=f(e,r),a=t(i,n);return a===i?e:p(e,r,a)}}(C))};e.a=c},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var u=n(744),c=n(348),l=n(631),h=n.n(l),f=n(207),p=n.n(f),d=n(1),v=n.n(d),y=n(0),g=(n.n(y),n(37)),_=n(57),m=n(497),b=n(1182),w=n(499),E=n(500),S=n(503),T=n(1194),C=n(1197),I=n(1206),O=n(293),A=n(12),R=n(1239),N=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),P=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D=function(t){return Boolean(t&&t.prototype&&"object"===k(t.prototype.isReactComponent))},x=m.arrayInsert,F=m.arrayMove,L=m.arrayPop,j=m.arrayPush,M=m.arrayRemove,U=m.arrayRemoveAll,V=m.arrayShift,W=m.arraySplice,B=m.arraySwap,q=m.arrayUnshift,H=m.blur,K=m.change,G=m.focus,z=s(m,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),Q={arrayInsert:x,arrayMove:F,arrayPop:L,arrayPush:j,arrayRemove:M,arrayRemoveAll:U,arrayShift:V,arraySplice:W,arraySwap:B,arrayUnshift:q},Y=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(Object.keys(m)),["array","asyncErrors","initialValues","syncErrors","syncWarnings","values","registeredFields"]),X=function(t){if(!t||"function"!=typeof t)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return t},$=function(t){var e=t.deepEqual,l=t.empty,f=t.getIn,d=t.setIn,m=t.keys,k=t.fromJS,x=n.i(O.a)(t);return function(O){var F=P({touchOnBlur:!0,touchOnChange:!1,persistentSubmitErrors:!1,destroyOnUnmount:!0,shouldAsyncValidate:w.a,shouldValidate:E.a,enableReinitialize:!1,keepDirtyOnReinitialize:!1,getFormState:function(t){return f(t,"form")},pure:!0,forceUnregisterOnUnmount:!1},O);return function(w){var E=function(c){function l(t){i(this,l);var e=o(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,t));return e.submit=e.submit.bind(e),e.reset=e.reset.bind(e),e.asyncValidate=e.asyncValidate.bind(e),e.getValues=e.getValues.bind(e),e.register=e.register.bind(e),e.unregister=e.unregister.bind(e),e.submitCompleted=e.submitCompleted.bind(e),e.submitFailed=e.submitFailed.bind(e),e.fieldValidators={},e.lastFieldValidatorKeys=[],e.fieldWarners={},e.lastFieldWarnerKeys=[],e}return a(l,c),N(l,[{key:"getChildContext",value:function(){var t=this;return{_reduxForm:P({},this.props,{getFormState:function(e){return f(t.props.getFormState(e),t.props.form)},asyncValidate:this.asyncValidate,getValues:this.getValues,sectionPrefix:void 0,register:this.register,unregister:this.unregister,registerInnerOnSubmit:function(e){return t.innerOnSubmit=e}})}}},{key:"initIfNeeded",value:function(t){var n=this.props.enableReinitialize;if(t){if((n||!t.initialized)&&!e(this.props.initialValues,t.initialValues)){var r=t.initialized&&this.props.keepDirtyOnReinitialize;this.props.initialize(t.initialValues,r,{lastInitialValues:this.props.initialValues})}}else!this.props.initialValues||this.props.initialized&&!n||this.props.initialize(this.props.initialValues,this.props.keepDirtyOnReinitialize)}},{key:"updateSyncErrorsIfNeeded",value:function(t,e,n){var r=this.props,i=r.error,o=r.updateSyncErrors,a=!(n&&Object.keys(n).length||i),s=!(t&&Object.keys(t).length||e);a&&s||A.a.deepEqual(n,t)&&A.a.deepEqual(i,e)||o(t,e)}},{key:"clearSubmitPromiseIfNeeded",value:function(t){var e=this.props.submitting;this.submitPromise&&e&&!t.submitting&&delete this.submitPromise}},{key:"submitIfNeeded",value:function(t){var e=this.props,n=e.clearSubmit;!e.triggerSubmit&&t.triggerSubmit&&(n(),this.submit())}},{key:"validateIfNeeded",value:function(e){var r=this.props,i=r.shouldValidate,o=r.validate,a=r.values,c=this.generateValidator();if(o||c){var l=void 0===e,h=Object.keys(this.getValidators());if(i({values:a,nextProps:e,props:this.props,initialRender:l,lastFieldValidatorKeys:this.lastFieldValidatorKeys,fieldValidatorKeys:h,structure:t})){var f=l?this.props:e,p=n.i(u.a)(o?o(f.values,f)||{}:{},c?c(f.values,f)||{}:{}),d=p._error,v=s(p,["_error"]);this.lastFieldValidatorKeys=h,this.updateSyncErrorsIfNeeded(v,d,f.syncErrors)}}}},{key:"updateSyncWarningsIfNeeded",value:function(t,e,n){var r=this.props,i=r.warning,o=r.syncWarnings,a=r.updateSyncWarnings,s=!(o&&Object.keys(o).length||i),u=!(t&&Object.keys(t).length||e);s&&u||A.a.deepEqual(n,t)&&A.a.deepEqual(i,e)||a(t,e)}},{key:"warnIfNeeded",value:function(e){var r=this.props,i=r.shouldValidate,o=r.warn,a=r.values,c=this.generateWarner();if(o||c){var l=void 0===e,h=Object.keys(this.getWarners());if(i({values:a,nextProps:e,props:this.props,initialRender:l,lastFieldValidatorKeys:this.lastFieldWarnerKeys,fieldValidatorKeys:h,structure:t})){var f=l?this.props:e,p=n.i(u.a)(o?o(f.values,f):{},c?c(f.values,f):{}),d=p._warning,v=s(p,["_warning"]);this.lastFieldWarnerKeys=h,this.updateSyncWarningsIfNeeded(v,d,f.syncWarnings)}}}},{key:"componentWillMount",value:function(){this.initIfNeeded(),this.validateIfNeeded(),this.warnIfNeeded()}},{key:"componentWillReceiveProps",value:function(t){this.initIfNeeded(t),this.validateIfNeeded(t),this.warnIfNeeded(t),this.clearSubmitPromiseIfNeeded(t),this.submitIfNeeded(t),t.onChange&&(e(t.values,this.props.values)||t.onChange(t.values,t.dispatch,t))}},{key:"shouldComponentUpdate",value:function(t){var n=this;if(!this.props.pure)return!0;var r=O.immutableProps,i=void 0===r?[]:r;return Object.keys(t).some(function(r){return~i.indexOf(r)?n.props[r]!==t[r]:!~Y.indexOf(r)&&!e(n.props[r],t[r])})}},{key:"componentWillUnmount",value:function(){var t=this.props,e=t.destroyOnUnmount,n=t.destroy;e&&(this.destroyed=!0,n())}},{key:"getValues",value:function(){return this.props.values}},{key:"isValid",value:function(){return this.props.valid}},{key:"isPristine",value:function(){return this.props.pristine}},{key:"register",value:function(t,e,n,r){this.props.registerField(t,e),n&&(this.fieldValidators[t]=n),r&&(this.fieldWarners[t]=r)}},{key:"unregister",value:function(t){this.destroyed||(this.props.destroyOnUnmount||this.props.forceUnregisterOnUnmount?(this.props.unregisterField(t),delete this.fieldValidators[t],delete this.fieldWarners[t]):this.props.unregisterField(t,!1))}},{key:"getFieldList",value:function(t){var e=this.props.registeredFields,n=[];if(!e)return n;var r=m(e);return t&&t.excludeFieldArray&&(r=r.filter(function(t){return"FieldArray"!==f(e,"['"+t+"'].type")})),k(r.reduce(function(t,e){return t.push(e),t},n))}},{key:"getValidators",value:function(){var t=this,e={};return Object.keys(this.fieldValidators).forEach(function(n){var r=t.fieldValidators[n]();r&&(e[n]=r)}),e}},{key:"generateValidator",value:function(){var e=this.getValidators();return Object.keys(e).length?n.i(C.a)(e,t):void 0}},{key:"getWarners",value:function(){var t=this,e={};return Object.keys(this.fieldWarners).forEach(function(n){var r=t.fieldWarners[n]();r&&(e[n]=r)}),e}},{key:"generateWarner",value:function(){var e=this.getWarners();return Object.keys(e).length?n.i(C.a)(e,t):void 0}},{key:"asyncValidate",value:function(t,e){var r=this,i=this.props,o=i.asyncBlurFields,a=i.asyncErrors,s=i.asyncValidate,u=i.dispatch,c=i.initialized,l=i.pristine,h=i.shouldAsyncValidate,p=i.startAsyncValidation,v=i.stopAsyncValidation,y=i.syncErrors,g=i.values,_=!t;if(s){var m=_?g:d(g,t,e),w=_||!f(y,t);if((!_&&(!o||~o.indexOf(t.replace(/\[[0-9]+\]/g,"[]")))||_)&&h({asyncErrors:a,initialized:c,trigger:_?"submit":"blur",blurredField:t,pristine:l,syncValidationPasses:w}))return n.i(b.a)(function(){return s(m,u,r.props,t)},p,v,t)}}},{key:"submitCompleted",value:function(t){return delete this.submitPromise,t}},{key:"submitFailed",value:function(t){throw delete this.submitPromise,t}},{key:"listenToSubmit",value:function(t){return p()(t)?(this.submitPromise=t,t.then(this.submitCompleted,this.submitFailed)):t}},{key:"submit",value:function(t){var e=this,r=this.props,i=r.onSubmit,o=r.blur,a=r.change,s=r.dispatch;return t&&!n.i(S.a)(t)?n.i(T.a)(function(){return!e.submitPromise&&e.listenToSubmit(n.i(I.a)(X(t),P({},e.props,n.i(_.bindActionCreators)({blur:o,change:a},s)),e.props.validExceptSubmit,e.asyncValidate,e.getFieldList({excludeFieldArray:!0})))}):this.submitPromise?void 0:this.innerOnSubmit&&this.innerOnSubmit!==this.submit?this.innerOnSubmit():this.listenToSubmit(n.i(I.a)(X(i),P({},this.props,n.i(_.bindActionCreators)({blur:o,change:a},s)),this.props.validExceptSubmit,this.asyncValidate,this.getFieldList({excludeFieldArray:!0})))}},{key:"reset",value:function(){this.props.reset()}},{key:"render",value:function(){var t=this.props,e=t.anyTouched,i=(t.arrayInsert,t.arrayMove,t.arrayPop,t.arrayPush,t.arrayRemove,t.arrayRemoveAll,t.arrayShift,t.arraySplice,t.arraySwap,t.arrayUnshift,t.asyncErrors,t.asyncValidate,t.asyncValidating),o=t.blur,a=t.change,u=t.destroy,c=(t.destroyOnUnmount,t.forceUnregisterOnUnmount,t.dirty),l=t.dispatch,h=(t.enableReinitialize,t.error),f=(t.focus,t.form),p=(t.getFormState,t.initialize),d=t.initialized,v=t.initialValues,g=t.invalid,m=(t.keepDirtyOnReinitialize,t.pristine),b=t.propNamespace,E=(t.registeredFields,t.registerField,t.reset),S=(t.setSubmitFailed,t.setSubmitSucceeded,t.shouldAsyncValidate,t.shouldValidate,t.startAsyncValidation,t.startSubmit,t.stopAsyncValidation,t.stopSubmit,t.submitting),T=t.submitFailed,C=t.submitSucceeded,I=t.touch,O=(t.touchOnBlur,t.touchOnChange,t.persistentSubmitErrors,t.syncErrors,t.syncWarnings,t.unregisterField,t.untouch),A=(t.updateSyncErrors,t.updateSyncWarnings,t.valid),R=(t.validExceptSubmit,t.values,t.warning),N=s(t,["anyTouched","arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","asyncValidate","asyncValidating","blur","change","destroy","destroyOnUnmount","forceUnregisterOnUnmount","dirty","dispatch","enableReinitialize","error","focus","form","getFormState","initialize","initialized","initialValues","invalid","keepDirtyOnReinitialize","pristine","propNamespace","registeredFields","registerField","reset","setSubmitFailed","setSubmitSucceeded","shouldAsyncValidate","shouldValidate","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitting","submitFailed","submitSucceeded","touch","touchOnBlur","touchOnChange","persistentSubmitErrors","syncErrors","syncWarnings","unregisterField","untouch","updateSyncErrors","updateSyncWarnings","valid","validExceptSubmit","values","warning"]),k=P({anyTouched:e,asyncValidate:this.asyncValidate,asyncValidating:i},n.i(_.bindActionCreators)({blur:o,change:a},l),{destroy:u,dirty:c,dispatch:l,error:h,form:f,handleSubmit:this.submit,initialize:p,initialized:d,initialValues:v,invalid:g,pristine:m,reset:E,submitting:S,submitFailed:T,submitSucceeded:C,touch:I,untouch:O,valid:A,warning:R}),x=P({},b?r({},b,k):k,N);return D(w)&&(x.ref="wrapped"),n.i(y.createElement)(w,x)}}]),l}(y.Component);E.displayName="Form("+n.i(R.a)(w)+")",E.WrappedComponent=w,E.childContextTypes={_reduxForm:v.a.object.isRequired},E.propTypes={destroyOnUnmount:v.a.bool,forceUnregisterOnUnmount:v.a.bool,form:v.a.string.isRequired,initialValues:v.a.oneOfType([v.a.array,v.a.object]),getFormState:v.a.func,onSubmitFail:v.a.func,onSubmitSuccess:v.a.func,propNameSpace:v.a.string,validate:v.a.func,warn:v.a.func,touchOnBlur:v.a.bool,touchOnChange:v.a.bool,triggerSubmit:v.a.bool,persistentSubmitErrors:v.a.bool,registeredFields:v.a.any};var L=n.i(g.connect)(function(t,n){var r=n.form,i=n.getFormState,o=n.initialValues,a=n.enableReinitialize,s=n.keepDirtyOnReinitialize,u=f(i(t)||l,r)||l,c=f(u,"initial"),h=!!c,p=a&&h&&!e(o,c),d=p&&!s,v=o||c||l;p&&(v=c||l);var y=f(u,"values")||v;d&&(y=v);var g=d||e(v,y),_=f(u,"asyncErrors"),m=f(u,"syncErrors")||{},b=f(u,"syncWarnings")||{},w=f(u,"registeredFields"),E=x(r,i,!1)(t),S=x(r,i,!0)(t),T=!!f(u,"anyTouched"),C=!!f(u,"submitting"),I=!!f(u,"submitFailed"),O=!!f(u,"submitSucceeded"),A=f(u,"error"),R=f(u,"warning"),N=f(u,"triggerSubmit");return{anyTouched:T,asyncErrors:_,asyncValidating:f(u,"asyncValidating")||!1,dirty:!g,error:A,initialized:h,invalid:!E,pristine:g,registeredFields:w,submitting:C,submitFailed:I,submitSucceeded:O,syncErrors:m,syncWarnings:b,triggerSubmit:N,values:y,valid:E,validExceptSubmit:S,warning:R}},function(t,e){var r=function(t){return t.bind(null,e.form)},i=n.i(c.a)(z,r),o=n.i(c.a)(Q,r),a=function(t,n){return H(e.form,t,n,!!e.touchOnBlur)},s=function(t,n){return K(e.form,t,n,!!e.touchOnChange,!!e.persistentSubmitErrors)},u=r(G),l=n.i(_.bindActionCreators)(i,t),h={insert:n.i(_.bindActionCreators)(o.arrayInsert,t),move:n.i(_.bindActionCreators)(o.arrayMove,t),pop:n.i(_.bindActionCreators)(o.arrayPop,t),push:n.i(_.bindActionCreators)(o.arrayPush,t),remove:n.i(_.bindActionCreators)(o.arrayRemove,t),removeAll:n.i(_.bindActionCreators)(o.arrayRemoveAll,t),shift:n.i(_.bindActionCreators)(o.arrayShift,t),splice:n.i(_.bindActionCreators)(o.arraySplice,t),swap:n.i(_.bindActionCreators)(o.arraySwap,t),unshift:n.i(_.bindActionCreators)(o.arrayUnshift,t)},f=P({},l,o,{blur:a,change:s,array:h,focus:u,dispatch:t});return function(){return f}},void 0,{withRef:!0}),j=h()(L(E),w);return j.defaultProps=F,function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),N(e,[{key:"submit",value:function(){return this.refs.wrapped.getWrappedInstance().submit()}},{key:"reset",value:function(){return this.refs.wrapped.getWrappedInstance().reset()}},{key:"render",value:function(){var t=this.props,e=t.initialValues,r=s(t,["initialValues"]);return n.i(y.createElement)(j,P({},r,{ref:"wrapped",initialValues:k(e)}))}},{key:"valid",get:function(){return this.refs.wrapped.getWrappedInstance().isValid()}},{key:"invalid",get:function(){return!this.valid}},{key:"pristine",get:function(){return this.refs.wrapped.getWrappedInstance().isPristine()}},{key:"dirty",get:function(){return!this.pristine}},{key:"values",get:function(){return this.refs.wrapped.getWrappedInstance().getValues()}},{key:"fieldList",get:function(){return this.refs.wrapped.getWrappedInstance().getFieldList()}},{key:"wrappedInstance",get:function(){return this.refs.wrapped.getWrappedInstance().refs.wrapped}}]),e}(y.Component)}}};e.a=$},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=n(37),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=function(t){var e=t.getIn;return function(t){var a=o({prop:"values",getFormState:function(t){return e(t,"form")}},t),s=a.form,u=a.prop,c=a.getFormState;return n.i(i.connect)(function(t){return r({},u,e(c(t),s+".values"))},function(){return{}})}};e.a=a},function(t,e,n){"use strict";var r=n(143),i=function(t){var e=t.deepEqual,i=t.empty,o=t.getIn,a=t.deleteIn,s=t.setIn;return function t(u,c){if("]"===c[c.length-1]){var l=n.i(r.a)(c);l.pop();return o(u,l.join("."))?s(u,c,void 0):u}var h=u;void 0!==o(u,c)&&(h=a(u,c));var f=c.lastIndexOf(".");if(f>0){var p=c.substring(0,f);if("]"!==p[p.length-1]){var d=o(h,p);if(e(d,i))return t(h,p)}}return h}};e.a=i},function(t,e,n){"use strict";var r=n(501),i=function(t){var e=[];if(t)for(var n=0;n<t.length;n++){var r=t[n];r.selected&&e.push(r.value)}return e},o=function(t,e){if(n.i(r.a)(t)){if(!e&&t.nativeEvent&&void 0!==t.nativeEvent.text)return t.nativeEvent.text;if(e&&void 0!==t.nativeEvent)return t.nativeEvent.text;var o=t.target,a=o.type,s=o.value,u=o.checked,c=o.files,l=t.dataTransfer;return"checkbox"===a?u||"":"file"===a?c||l&&l.files:"select-multiple"===a?i(t.target.options):s}return t};e.a=o},function(t,e,n){"use strict";var r=n(503),i=function(t){return function(e){for(var i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return n.i(r.a)(e)?t.apply(void 0,o):t.apply(void 0,[e].concat(o))}};e.a=i},function(t,e,n){"use strict";var r=n(1187),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1188),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(12),i=function(t){return Array.isArray(t)?t:[t]},o=function(t,e,n,r){for(var o=i(r),a=0;a<o.length;a++){var s=o[a](t,e,n);if(s)return s}},a=function(t,e){var n=e.getIn;return function(e,i){var a={};return Object.keys(t).forEach(function(s){var u=n(e,s),c=o(u,e,i,t[s]);c&&(a=r.a.setIn(a,s,c))}),a}};e.a=a},function(t,e,n){"use strict";var r=n(1219),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1220),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1221),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1222),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1223),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1224),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1225),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1226),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var i=n(207),o=n.n(i),a=n(496),s=function(t,e,n,i,s){var u=e.dispatch,c=e.onSubmitFail,l=e.onSubmitSuccess,h=e.startSubmit,f=e.stopSubmit,p=e.setSubmitFailed,d=e.setSubmitSucceeded,v=e.syncErrors,y=e.touch,g=e.values,_=e.persistentSubmitErrors;if(y.apply(void 0,r(s)),n||_){var m=function(){var n=void 0;try{n=t(g,u,e)}catch(t){var i=t instanceof a.a?t.errors:void 0;if(f(i),p.apply(void 0,r(s)),c&&c(i,u,t,e),i||c)return i;throw t}return o()(n)?(h(),n.then(function(t){return f(),d(),l&&l(t,u,e),t},function(t){var n=t instanceof a.a?t.errors:void 0;if(f(n),p.apply(void 0,r(s)),c&&c(n,u,t,e),n||c)return n;throw t})):(d(),l&&l(n,u,e),n)},b=i&&i();return b?b.then(function(t){if(t)throw t;return m()}).catch(function(t){return p.apply(void 0,r(s)),c&&c(t,u,null,e),Promise.reject(t)}):m()}return p.apply(void 0,r(s)),c&&c(v,u,null,e),v};e.a=s},function(t,e,n){"use strict";var r=function(t,e){switch(e){case"Field":return[t,t+"._error"];case"FieldArray":return[t+"._error"];default:throw new Error("Unknown field type")}},i=function(t){var e=t.getIn;return function(t,n,i,o){if(!n&&!i&&!o)return!1;var a=e(t,"name"),s=e(t,"type");return r(a,s).some(function(t){return e(n,t)||e(i,t)||e(o,t)})}};e.a=i},function(t,e,n){"use strict";var r=n(1227),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1228),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1229),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1230),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(505),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;e.a=r},function(t,e,n){"use strict";var r=n(1231),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(293),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";n.d(e,"e",function(){return f}),n.d(e,"b",function(){return p}),n.d(e,"c",function(){return d}),n.d(e,"d",function(){return v});var r=n(1),i=n.n(r),o=i.a.any,a=i.a.bool,s=i.a.func,u=i.a.shape,c=i.a.string,l=i.a.oneOfType,h=i.a.object,f={anyTouched:a.isRequired,asyncValidating:l([a,c]).isRequired,dirty:a.isRequired,error:o,form:c.isRequired,invalid:a.isRequired,initialized:a.isRequired,initialValues:h,pristine:a.isRequired,pure:a.isRequired,submitting:a.isRequired,submitFailed:a.isRequired,submitSucceeded:a.isRequired,valid:a.isRequired,warning:o,array:u({insert:s.isRequired,move:s.isRequired,pop:s.isRequired,push:s.isRequired,remove:s.isRequired,removeAll:s.isRequired,shift:s.isRequired,splice:s.isRequired,swap:s.isRequired,unshift:s.isRequired}),asyncValidate:s.isRequired,autofill:s.isRequired,blur:s.isRequired,change:s.isRequired,clearAsyncError:s.isRequired,destroy:s.isRequired,dispatch:s.isRequired,handleSubmit:s.isRequired,initialize:s.isRequired,reset:s.isRequired,touch:s.isRequired,submit:s.isRequired,untouch:s.isRequired,triggerSubmit:a,clearSubmit:s.isRequired},p={checked:a,name:c.isRequired,onBlur:s.isRequired,onChange:s.isRequired,onDragStart:s.isRequired,onDrop:s.isRequired,onFocus:s.isRequired,value:o},d={active:a.isRequired,asyncValidating:a.isRequired,autofilled:a.isRequired,dirty:a.isRequired,dispatch:s.isRequired,error:c,form:c.isRequired,invalid:a.isRequired,pristine:a.isRequired,submitting:a.isRequired,submitFailed:a.isRequired,touched:a.isRequired,valid:a.isRequired,visited:a.isRequired,warning:c},v={input:u(p).isRequired,meta:u(d).isRequired,custom:h.isRequired};e.a=f},function(t,e,n){"use strict";var r=n(1189),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=n(1190),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){return e(n(r),t+".asyncErrors")}}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){return e(n(r),t+".initial")}}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){return e(n(r),t+".fields")}}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.getIn,n=t.keys;return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t){return e(t,"form")};return function(e){return n(t(e))}}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){return e(n(r),t+".submitErrors")}}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){return e(n(r),t+".syncErrors")}}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){return e(n(r),t+".syncWarnings")}}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){return e(n(r),t+".values")}}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){var i=n(r);return e(i,t+".submitFailed")||!1}}};e.a=r},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){var i=n(r);return e(i,t+".submitSucceeded")||!1}}};e.a=r},function(t,e,n){"use strict";var r=n(505),i=function(t){return function(e,i){var o=n.i(r.a)(t)(e,i);return function(t){return!o(t)}}};e.a=i},function(t,e,n){"use strict";var r=n(293),i=function(t){return function(e,i){var o=n.i(r.a)(t)(e,i);return function(t){return!o(t)}}};e.a=i},function(t,e,n){"use strict";var r=function(t){var e=t.getIn;return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return e(t,"form")};return function(r){var i=n(r);return e(i,t+".submitting")||!1}}};e.a=r},function(t,e,n){"use strict";var r=n(346),i=function(t,e){return t===e||(!(null!=t&&""!==t&&!1!==t||null!=e&&""!==e&&!1!==e)||(!t||!e||t._error===e._error)&&((!t||!e||t._warning===e._warning)&&void 0))},o=function(t,e){return n.i(r.a)(t,e,i)};e.a=o},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var o=n(143),a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=function t(e,n){for(var o=arguments.length,s=Array(o>2?o-2:0),u=2;u<o;u++)s[u-2]=arguments[u];if(void 0===e||void 0===n)return e;if(s.length){if(Array.isArray(e)){if(n<e.length){var c=t.apply(void 0,[e&&e[n]].concat(s));if(c!==e[n]){var l=[].concat(i(e));return l[n]=c,l}}return e}if(n in e){var h=t.apply(void 0,[e&&e[n]].concat(s));return e[n]===h?e:a({},e,r({},n,h))}return e}if(Array.isArray(e)){if(isNaN(n))throw new Error("Cannot delete non-numerical index from an array");if(n<e.length){var f=[].concat(i(e));return f.splice(n,1),f}return e}if(n in e){var p=a({},e);return delete p[n],p}return e},u=function(t,e){return s.apply(void 0,[t].concat(i(n.i(o.a)(e))))};e.a=u},function(t,e,n){"use strict";var r=n(143),i=function(t,e){if(!t)return t;var i=n.i(r.a)(e),o=i.length;if(o){for(var a=t,s=0;s<o&&a;++s)a=a[i[s]];return a}};e.a=i},function(t,e,n){"use strict";var r=function(t){return t?Array.isArray(t)?t.map(function(t){return t.name}):Object.keys(t):[]};e.a=r},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=n(143),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=function t(e,n,i,a){if(a>=i.length)return n;var s=i[a],u=t(e&&e[s],n,i,a+1);if(!e){var c=isNaN(s)?{}:[];return c[s]=u,c}if(Array.isArray(e)){var l=[].concat(e);return l[s]=u,l}return o({},e,r({},s,u))},s=function(t,e,r){return a(t,r,n.i(i.a)(e),0)};e.a=s},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var i=function(t,e,n,i){if(t=t||[],e<t.length){if(void 0===i&&!n){var o=[].concat(r(t));return o.splice(e,0,null),o[e]=void 0,o}if(null!=i){var a=[].concat(r(t));return a.splice(e,n,i),a}var s=[].concat(r(t));return s.splice(e,n),s}if(n)return t;var u=[].concat(r(t));return u[e]=i,u};e.a=i},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="text"},function(t,e,n){"use strict";var r=function(t){return t.displayName||t.name||"Component"};e.a=r},function(t,e,n){"use strict";var r=n(1191),i=n(12);e.a=n.i(r.a)(i.a)},function(t,e,n){(function(t){!function(t,n){n(e)}(0,function(e){"use strict";function n(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}function r(t,e){Object.defineProperty(this,"kind",{value:t,enumerable:!0}),e&&e.length&&Object.defineProperty(this,"path",{value:e,enumerable:!0})}function i(t,e,n){i.super_.call(this,"E",t),Object.defineProperty(this,"lhs",{value:e,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function o(t,e){o.super_.call(this,"N",t),Object.defineProperty(this,"rhs",{value:e,enumerable:!0})}function a(t,e){a.super_.call(this,"D",t),Object.defineProperty(this,"lhs",{value:e,enumerable:!0})}function s(t,e,n){s.super_.call(this,"A",t),Object.defineProperty(this,"index",{value:e,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function u(t,e,n){var r=t.slice((n||e)+1||t.length);return t.length=e<0?t.length+e:e,t.push.apply(t,r),t}function c(t){var e=void 0===t?"undefined":N(t);return"object"!==e?e:t===Math?"math":null===t?"null":Array.isArray(t)?"array":"[object Date]"===Object.prototype.toString.call(t)?"date":"function"==typeof t.toString&&/^\/.*\//.test(t.toString())?"regexp":"object"}function l(t,e,n,r,h,f,p){h=h||[],p=p||[];var d=h.slice(0);if(void 0!==f){if(r){if("function"==typeof r&&r(d,f))return;if("object"===(void 0===r?"undefined":N(r))){if(r.prefilter&&r.prefilter(d,f))return;if(r.normalize){var v=r.normalize(d,f,t,e);v&&(t=v[0],e=v[1])}}}d.push(f)}"regexp"===c(t)&&"regexp"===c(e)&&(t=t.toString(),e=e.toString());var y=void 0===t?"undefined":N(t),g=void 0===e?"undefined":N(e),_="undefined"!==y||p&&p[p.length-1].lhs&&p[p.length-1].lhs.hasOwnProperty(f),m="undefined"!==g||p&&p[p.length-1].rhs&&p[p.length-1].rhs.hasOwnProperty(f);if(!_&&m)n(new o(d,e));else if(!m&&_)n(new a(d,t));else if(c(t)!==c(e))n(new i(d,t,e));else if("date"===c(t)&&t-e!=0)n(new i(d,t,e));else if("object"===y&&null!==t&&null!==e)if(p.filter(function(e){return e.lhs===t}).length)t!==e&&n(new i(d,t,e));else{if(p.push({lhs:t,rhs:e}),Array.isArray(t)){var b;for(t.length,b=0;b<t.length;b++)b>=e.length?n(new s(d,b,new a(void 0,t[b]))):l(t[b],e[b],n,r,d,b,p);for(;b<e.length;)n(new s(d,b,new o(void 0,e[b++])))}else{var w=Object.keys(t),E=Object.keys(e);w.forEach(function(i,o){var a=E.indexOf(i);a>=0?(l(t[i],e[i],n,r,d,i,p),E=u(E,a)):l(t[i],void 0,n,r,d,i,p)}),E.forEach(function(t){l(void 0,e[t],n,r,d,t,p)})}p.length=p.length-1}else t!==e&&("number"===y&&isNaN(t)&&isNaN(e)||n(new i(d,t,e)))}function h(t,e,n,r){return r=r||[],l(t,e,function(t){t&&r.push(t)},n),r.length?r:void 0}function f(t,e,n){if(n.path&&n.path.length){var r,i=t[e],o=n.path.length-1;for(r=0;r<o;r++)i=i[n.path[r]];switch(n.kind){case"A":f(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs}}else switch(n.kind){case"A":f(t[e],n.index,n.item);break;case"D":t=u(t,e);break;case"E":case"N":t[e]=n.rhs}return t}function p(t,e,n){if(t&&e&&n&&n.kind){for(var r=t,i=-1,o=n.path?n.path.length-1:0;++i<o;)void 0===r[n.path[i]]&&(r[n.path[i]]="number"==typeof n.path[i]?[]:{}),r=r[n.path[i]];switch(n.kind){case"A":f(n.path?r[n.path[i]]:r,n.index,n.item);break;case"D":delete r[n.path[i]];break;case"E":case"N":r[n.path[i]]=n.rhs}}}function d(t,e,n){if(n.path&&n.path.length){var r,i=t[e],o=n.path.length-1;for(r=0;r<o;r++)i=i[n.path[r]];switch(n.kind){case"A":d(i[n.path[r]],n.index,n.item);break;case"D":case"E":i[n.path[r]]=n.lhs;break;case"N":delete i[n.path[r]]}}else switch(n.kind){case"A":d(t[e],n.index,n.item);break;case"D":case"E":t[e]=n.lhs;break;case"N":t=u(t,e)}return t}function v(t,e,n){if(t&&e&&n&&n.kind){var r,i,o=t;for(i=n.path.length-1,r=0;r<i;r++)void 0===o[n.path[r]]&&(o[n.path[r]]={}),o=o[n.path[r]];switch(n.kind){case"A":d(o[n.path[r]],n.index,n.item);break;case"D":case"E":o[n.path[r]]=n.lhs;break;case"N":delete o[n.path[r]]}}}function y(t,e,n){if(t&&e){l(t,e,function(r){n&&!n(t,e,r)||p(t,e,r)})}}function g(t){return"color: "+D[t].color+"; font-weight: bold"}function _(t){var e=t.kind,n=t.path,r=t.lhs,i=t.rhs,o=t.index,a=t.item;switch(e){case"E":return[n.join("."),r,"→",i];case"N":return[n.join("."),i];case"D":return[n.join(".")];case"A":return[n.join(".")+"["+o+"]",a];default:return[]}}function m(t,e,n,r){var i=h(t,e);try{r?n.groupCollapsed("diff"):n.group("diff")}catch(t){n.log("diff")}i?i.forEach(function(t){var e=t.kind,r=_(t);n.log.apply(n,["%c "+D[e].text,g(e)].concat(P(r)))}):n.log("—— no diff ——");try{n.groupEnd()}catch(t){n.log("—— diff end —— ")}}function b(t,e,n,r){switch(void 0===t?"undefined":N(t)){case"object":return"function"==typeof t[r]?t[r].apply(t,P(n)):t[r];case"function":return t(e);default:return t}}function w(t){var e=t.timestamp,n=t.duration;return function(t,r,i){var o=["action"];return o.push("%c"+String(t.type)),e&&o.push("%c@ "+r),n&&o.push("%c(in "+i.toFixed(2)+" ms)"),o.join(" ")}}function E(t,e){var n=e.logger,r=e.actionTransformer,i=e.titleFormatter,o=void 0===i?w(e):i,a=e.collapsed,s=e.colors,u=e.level,c=e.diff,l=void 0===e.titleFormatter;t.forEach(function(i,h){var f=i.started,p=i.startedTime,d=i.action,v=i.prevState,y=i.error,g=i.took,_=i.nextState,w=t[h+1];w&&(_=w.prevState,g=w.started-f);var E=r(d),S="function"==typeof a?a(function(){return _},d,i):a,T=A(p),C=s.title?"color: "+s.title(E)+";":"",I=["color: gray; font-weight: lighter;"];I.push(C),e.timestamp&&I.push("color: gray; font-weight: lighter;"),e.duration&&I.push("color: gray; font-weight: lighter;");var O=o(E,T,g);try{S?s.title&&l?n.groupCollapsed.apply(n,["%c "+O].concat(I)):n.groupCollapsed(O):s.title&&l?n.group.apply(n,["%c "+O].concat(I)):n.group(O)}catch(t){n.log(O)}var R=b(u,E,[v],"prevState"),N=b(u,E,[E],"action"),P=b(u,E,[y,v],"error"),k=b(u,E,[_],"nextState");if(R)if(s.prevState){var D="color: "+s.prevState(v)+"; font-weight: bold";n[R]("%c prev state",D,v)}else n[R]("prev state",v);if(N)if(s.action){var x="color: "+s.action(E)+"; font-weight: bold";n[N]("%c action    ",x,E)}else n[N]("action    ",E);if(y&&P)if(s.error){var F="color: "+s.error(y,v)+"; font-weight: bold;";n[P]("%c error     ",F,y)}else n[P]("error     ",y);if(k)if(s.nextState){var L="color: "+s.nextState(_)+"; font-weight: bold";n[k]("%c next state",L,_)}else n[k]("next state",_);c&&m(v,_,n,S);try{n.groupEnd()}catch(t){n.log("—— log end ——")}})}function S(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.assign({},x,t),n=e.logger,r=e.stateTransformer,i=e.errorTransformer,o=e.predicate,a=e.logErrors,s=e.diffPredicate;if(void 0===n)return function(){return function(t){return function(e){return t(e)}}};if(t.getState&&t.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n  reducer,\n  applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n  // ...options\n});\nconst store = createStore(\n  reducer,\n  applyMiddleware(logger)\n)\n"),function(){return function(t){return function(e){return t(e)}}};var u=[];return function(t){var n=t.getState;return function(t){return function(c){if("function"==typeof o&&!o(n,c))return t(c);var l={};u.push(l),l.started=R.now(),l.startedTime=new Date,l.prevState=r(n()),l.action=c;var h=void 0;if(a)try{h=t(c)}catch(t){l.error=i(t)}else h=t(c);l.took=R.now()-l.started,l.nextState=r(n());var f=e.diff&&"function"==typeof s?s(n,c):e.diff;if(E(u,Object.assign({},e,{diff:f})),u.length=0,l.error)throw l.error;return h}}}}var T,C,I=function(t,e){return new Array(e+1).join(t)},O=function(t,e){return I("0",e-t.toString().length)+t},A=function(t){return O(t.getHours(),2)+":"+O(t.getMinutes(),2)+":"+O(t.getSeconds(),2)+"."+O(t.getMilliseconds(),3)},R="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)},k=[];T="object"===(void 0===t?"undefined":N(t))&&t?t:"undefined"!=typeof window?window:{},C=T.DeepDiff,C&&k.push(function(){void 0!==C&&T.DeepDiff===h&&(T.DeepDiff=C,C=void 0)}),n(i,r),n(o,r),n(a,r),n(s,r),Object.defineProperties(h,{diff:{value:h,enumerable:!0},observableDiff:{value:l,enumerable:!0},applyDiff:{value:y,enumerable:!0},applyChange:{value:p,enumerable:!0},revertChange:{value:v,enumerable:!0},isConflict:{value:function(){return void 0!==C},enumerable:!0},noConflict:{value:function(){return k&&(k.forEach(function(t){t()}),k=null),h},enumerable:!0}});var D={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},x={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(t){return t},actionTransformer:function(t){return t},errorTransformer:function(t){return t},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},F=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.dispatch,n=t.getState;return"function"==typeof e||"function"==typeof n?S()({dispatch:e,getState:n}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};e.defaults=x,e.createLogger=S,e.logger=F,e.default=F,Object.defineProperty(e,"__esModule",{value:!0})})}).call(e,n(36))},,,,function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return c[u]=r,s(u),u++}function i(t){delete c[t]}function o(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}function a(t){if(l)setTimeout(a,0,t);else{var e=c[t];if(e){l=!0;try{o(e)}finally{i(t),l=!1}}}}if(!t.setImmediate){var s,u=1,c={},l=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),s=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():h&&"onreadystatechange"in h.createElement("script")?function(){var t=h.documentElement;s=function(e){var n=h.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){s=function(t){setTimeout(a,0,t)}}(),f.setImmediate=r,f.clearImmediate=i}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(36),n(177))},,,,function(t,e,n){function r(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(1245),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},,,function(t,e,n){t.exports=n(512)}],[1252]);
//# sourceMappingURL=main.01466b0fd0483c10c4ff.js.map