redux-form
Advanced tools
Comparing version 6.0.0-rc.2 to 6.0.0-rc.3
@@ -1,2 +0,2 @@ | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("react-redux"),require("redux")):"function"==typeof define&&define.amd?define(["react","react-redux","redux"],r):"object"==typeof exports?exports.ReduxForm=r(require("react"),require("react-redux"),require("redux")):e.ReduxForm=r(e.React,e.ReactRedux,e.Redux)}(this,function(e,r,t){return function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}(function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))switch(typeof e[r]){case"function":break;case"object":e[r]=function(r){var t=r.slice(1),n=e[r[0]];return function(e,r,o){n.apply(this,[e,r,o].concat(t))}}(e[r]);break;default:e[r]=e[e[r]]}return e}([function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0}),r.values=r.untouch=r.touch=r.SubmissionError=r.stopSubmit=r.stopAsyncValidation=r.startSubmit=r.startAsyncValidation=r.setSubmitFailed=r.reset=r.propTypes=r.initialize=r.reduxForm=r.reducer=r.formValueSelector=r.focus=r.FieldArray=r.Field=r.destroy=r.change=r.blur=r.arrayUnshift=r.arraySwap=r.arraySplice=r.arrayShift=r.arrayRemoveAll=r.arrayRemove=r.arrayPush=r.arrayPop=r.arrayMove=r.arrayInsert=r.actionTypes=void 0;var o=t(33),i=n(o),a=t(2),u=n(a),s=(0,i.default)(u.default),c=s.actionTypes,f=s.arrayInsert,l=s.arrayMove,p=s.arrayPop,d=s.arrayPush,y=s.arrayRemove,v=s.arrayRemoveAll,h=s.arrayShift,m=s.arraySplice,b=s.arraySwap,g=s.arrayUnshift,_=s.blur,O=s.change,A=s.destroy,P=s.Field,R=s.FieldArray,S=s.focus,E=s.formValueSelector,j=s.reducer,T=s.reduxForm,w=s.initialize,x=s.propTypes,I=s.reset,F=s.setSubmitFailed,M=s.startAsyncValidation,V=s.startSubmit,k=s.stopAsyncValidation,C=s.stopSubmit,U=s.SubmissionError,N=s.touch,Y=s.untouch,L=s.values;r.actionTypes=c,r.arrayInsert=f,r.arrayMove=l,r.arrayPop=p,r.arrayPush=d,r.arrayRemove=y,r.arrayRemoveAll=v,r.arrayShift=h,r.arraySplice=m,r.arraySwap=b,r.arrayUnshift=g,r.blur=_,r.change=O,r.destroy=A,r.Field=P,r.FieldArray=R,r.focus=S,r.formValueSelector=E,r.reducer=j,r.reduxForm=T,r.initialize=w,r.propTypes=x,r.reset=I,r.setSubmitFailed=F,r.startAsyncValidation=M,r.startSubmit=V,r.stopAsyncValidation=k,r.stopSubmit=C,r.SubmissionError=U,r.touch=N,r.untouch=Y,r.values=L},function(r,t){r.exports=e},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(97),i=n(o),a=t(53),u=n(a),s=t(20),c=n(s),f=t(52),l=n(f),p=t(50),d=n(p),y=t(51),v=n(y),h={empty:{},getIn:c.default,setIn:l.default,deepEqual:d.default,deleteIn:v.default,fromJS:function(e){return e},size:function(e){return e?e.length:0},some:i.default,splice:u.default};r.default=h},function(e,r){function t(e,r){return null==e?void 0:e[r]}e.exports=t},function(e,r,t){(function(r){var n=t(75),o=n("object"==typeof r&&r),i=n("object"==typeof self&&self),a=n("object"==typeof this&&this),u=o||i||a||Function("return this")();e.exports=u}).call(r,function(){return this}())},function(e,r,t){function n(e,r){for(var t=e.length;t--;)if(o(e[t][0],r))return t;return-1}var o=t(89);e.exports=n},function(e,r,t){function n(e){return a(e)?o(e,c):u(e)?[e]:i(s(e))}var o=t(67),i=t(76),a=t(26),u=t(93),s=t(86),c=t(87);e.exports=n},function(e,t){e.exports=r},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ARRAY_INSERT="redux-form/ARRAY_INSERT",r.ARRAY_MOVE="redux-form/ARRAY_MOVE",r.ARRAY_POP="redux-form/ARRAY_POP",r.ARRAY_PUSH="redux-form/ARRAY_PUSH",r.ARRAY_REMOVE="redux-form/ARRAY_REMOVE",r.ARRAY_REMOVE_ALL="redux-form/ARRAY_REMOVE_ALL",r.ARRAY_SHIFT="redux-form/ARRAY_SHIFT",r.ARRAY_SPLICE="redux-form/ARRAY_SPLICE",r.ARRAY_UNSHIFT="redux-form/ARRAY_UNSHIFT",r.ARRAY_SWAP="redux-form/ARRAY_SWAP",r.BLUR="redux-form/BLUR",r.CHANGE="redux-form/CHANGE",r.DESTROY="redux-form/DESTROY",r.FOCUS="redux-form/FOCUS",r.INITIALIZE="redux-form/INITIALIZE",r.REGISTER_FIELD="redux-form/REGISTER_FIELD",r.RESET="redux-form/RESET",r.SET_SUBMIT_FAILED="redux-form/SET_SUBMIT_FAILED",r.START_ASYNC_VALIDATION="redux-form/START_ASYNC_VALIDATION",r.START_SUBMIT="redux-form/START_SUBMIT",r.STOP_ASYNC_VALIDATION="redux-form/STOP_ASYNC_VALIDATION",r.STOP_SUBMIT="redux-form/STOP_SUBMIT",r.TOUCH="redux-form/TOUCH",r.UNREGISTER_FIELD="redux-form/UNREGISTER_FIELD",r.UNTOUCH="redux-form/UNTOUCH"},function(e,r,t){"use strict";var n=function(e,r,t,n,o,i,a,u){if(!e){var s;if(void 0===r)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[t,n,o,i,a,u],f=0;s=new Error(r.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=n},function(e,r){function t(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=t},function(e,r,t){function n(e,r){var t={};return r=i(r,3),o(e,function(e,n,o){t[n]=r(e,n,o)}),t}var o=t(70),i=t(74);e.exports=n},function(e,r,t){e.exports=t(99)},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function i(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var u=t(56),s=n(u),c=function(e){function r(e){o(this,r);var t=i(this,Object.getPrototypeOf(r).call(this,"Submit Validation Failed"));return t.errors=e,t}return a(r,e),r}(s.default);r.default=c},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.untouch=r.unregisterField=r.touch=r.setSubmitFailed=r.stopSubmit=r.stopAsyncValidation=r.startSubmit=r.startAsyncValidation=r.reset=r.registerField=r.initialize=r.focus=r.destroy=r.change=r.blur=r.arrayUnshift=r.arraySwap=r.arraySplice=r.arrayShift=r.arrayRemoveAll=r.arrayRemove=r.arrayPush=r.arrayPop=r.arrayMove=r.arrayInsert=void 0;var n=t(8);r.arrayInsert=function(e,r,t,o){return{type:n.ARRAY_INSERT,meta:{form:e,field:r,index:t},payload:o}},r.arrayMove=function(e,r,t,o){return{type:n.ARRAY_MOVE,meta:{form:e,field:r,from:t,to:o}}},r.arrayPop=function(e,r){return{type:n.ARRAY_POP,meta:{form:e,field:r}}},r.arrayPush=function(e,r,t){return{type:n.ARRAY_PUSH,meta:{form:e,field:r},payload:t}},r.arrayRemove=function(e,r,t){return{type:n.ARRAY_REMOVE,meta:{form:e,field:r,index:t}}},r.arrayRemoveAll=function(e,r){return{type:n.ARRAY_REMOVE_ALL,meta:{form:e,field:r}}},r.arrayShift=function(e,r){return{type:n.ARRAY_SHIFT,meta:{form:e,field:r}}},r.arraySplice=function(e,r,t,o,i){var a={type:n.ARRAY_SPLICE,meta:{form:e,field:r,index:t,removeNum:o}};return void 0!==i&&(a.payload=i),a},r.arraySwap=function(e,r,t,o){if(t===o)throw new Error("Swap indices cannot be equal");if(t<0||o<0)throw new Error("Swap indices cannot be negative");return{type:n.ARRAY_SWAP,meta:{form:e,field:r,indexA:t,indexB:o}}},r.arrayUnshift=function(e,r,t){return{type:n.ARRAY_UNSHIFT,meta:{form:e,field:r},payload:t}},r.blur=function(e,r,t,o){return{type:n.BLUR,meta:{form:e,field:r,touch:o},payload:t}},r.change=function(e,r,t,o){return{type:n.CHANGE,meta:{form:e,field:r,touch:o},payload:t}},r.destroy=function(e){return{type:n.DESTROY,meta:{form:e}}},r.focus=function(e,r){return{type:n.FOCUS,meta:{form:e,field:r}}},r.initialize=function(e,r){return{type:n.INITIALIZE,meta:{form:e},payload:r}},r.registerField=function(e,r,t){return{type:n.REGISTER_FIELD,meta:{form:e},payload:{name:r,type:t}}},r.reset=function(e){return{type:n.RESET,meta:{form:e}}},r.startAsyncValidation=function(e,r){return{type:n.START_ASYNC_VALIDATION,meta:{form:e,field:r}}},r.startSubmit=function(e){return{type:n.START_SUBMIT,meta:{form:e}}},r.stopAsyncValidation=function(e,r){var t={type:n.STOP_ASYNC_VALIDATION,meta:{form:e},payload:r};return r&&Object.keys(r).length&&(t.error=!0),t},r.stopSubmit=function(e,r){var t={type:n.STOP_SUBMIT,meta:{form:e},payload:r};return r&&Object.keys(r).length&&(t.error=!0),t},r.setSubmitFailed=function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];return{type:n.SET_SUBMIT_FAILED,meta:{form:e,fields:t},error:!0}},r.touch=function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];return{type:n.TOUCH,meta:{form:e,fields:t}}},r.unregisterField=function(e,r){return{type:n.UNREGISTER_FIELD,meta:{form:e},payload:{name:r}}},r.untouch=function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];return{type:n.UNTOUCH,meta:{form:e,fields:t}}}},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=r.dataKey="value",n=function(e,r){return function(e){e.dataTransfer.setData(t,r)}};r.default=n},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(17),i=n(o),a=function(e){var r=[];if(e)for(var t=0;t<e.length;t++){var n=e[t];n.selected&&r.push(n.value)}return r},u=function(e,r){if((0,i.default)(e)){if(!r&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(r&&void 0!==e.nativeEvent)return e.nativeEvent.text;var t=e.target,n=t.type,o=t.value,u=t.checked,s=t.files,c=e.dataTransfer;return"checkbox"===n?u:"file"===n?s||c&&c.files:"select-multiple"===n?a(e.target.options):""===o||"number"!==n&&"range"!==n?o:parseFloat(o)}return e&&void 0!==e.value?e.value:e};r.default=u},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e){return!!(e&&e.stopPropagation&&e.preventDefault)};r.default=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(17),i=n(o),a=function(e){var r=(0,i.default)(e);return r&&e.preventDefault(),r};r.default=a},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;r.default=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var i=t(6),a=n(i),u=function c(e,r){for(var t=arguments.length,n=Array(t>2?t-2:0),o=2;o<t;o++)n[o-2]=arguments[o];if(!e)return e;var i=e[r];return n.length?c.apply(void 0,[i].concat(n)):i},s=function(e,r){return u.apply(void 0,[e].concat(o((0,a.default)(r))))};r.default=s},function(e,r){function t(){this.__data__=[]}e.exports=t},function(e,r,t){function n(e){var r=this.__data__,t=o(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():a.call(r,t,1),!0}var o=t(5),i=Array.prototype,a=i.splice;e.exports=n},function(e,r,t){function n(e){var r=this.__data__,t=o(r,e);return t<0?void 0:r[t][1]}var o=t(5);e.exports=n},function(e,r,t){function n(e){return o(this.__data__,e)>-1}var o=t(5);e.exports=n},function(e,r,t){function n(e,r){var t=this.__data__,n=o(t,e);return n<0?t.push([e,r]):t[n][1]=r,this}var o=t(5);e.exports=n},function(e,r){var t=Array.isArray;e.exports=t},function(e,r){function t(e){return n(Object(e))}var n=Object.keys;e.exports=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function i(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function a(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function u(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var s=t(11),c=n(s),f=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),l=t(1),p=t(7),d=t(35),y=n(d),v=function(e,r,t){var n=e.asyncValidate,s=e.blur,d=e.change,v=e.focus,h=e.getFormState,m=e.initialValues,b=r.deepEqual,g=r.getIn,_=m&&g(m,t),O=function(e){function r(){return i(this,r),a(this,Object.getPrototypeOf(r).apply(this,arguments))}return u(r,e),f(r,[{key:"shouldComponentUpdate",value:function(e){return!b(this.props,e)}},{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:"render",value:function(){var e=this.props,r=e.component,i=e.withRef,a=o(e,["component","withRef"]),u=(0,y.default)(g,t,a,n);return i&&(u.ref="renderedComponent"),(0,l.createElement)(r,"string"==typeof r?u.input:u)}}]),r}(l.Component);O.propTypes={component:l.PropTypes.oneOfType([l.PropTypes.func,l.PropTypes.string]).isRequired,defaultValue:l.PropTypes.any,props:l.PropTypes.object},O.contextTypes={_reduxForm:l.PropTypes.object};var A=(0,c.default)({blur:s,change:d,focus:v},function(e){return e.bind(null,t)}),P=(0,p.connect)(function(e,r){var n=g(h(e),"initial."+t)||_,o=g(h(e),"values."+t),i=o===n;return{asyncError:g(h(e),"asyncErrors."+t),asyncValidating:g(h(e),"asyncValidating")===t,dirty:!i,pristine:i,state:g(h(e),"fields."+t),submitError:g(h(e),"submitErrors."+t),value:o,_value:r.value}},A,void 0,{withRef:!0});return P(O)};r.default=v},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function i(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function a(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function u(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var s=t(11),c=n(s),f=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),l=t(1),p=t(7),d=t(34),y=n(d),v=t(12),h=n(v),m=function(e,r,t){var n=e.arrayInsert,s=e.arrayMove,d=e.arrayPop,v=e.arrayPush,m=e.arrayRemove,b=e.arrayRemoveAll,g=e.arrayShift,_=e.arraySplice,O=e.arraySwap,A=e.arrayUnshift,P=(e.asyncValidate,e.blur,e.change,e.focus,e.getFormState),R=e.initialValues,S=r.deepEqual,E=r.getIn,j=r.size,T=R&&E(R,t),w=function(e){function r(){return i(this,r),a(this,Object.getPrototypeOf(r).apply(this,arguments))}return u(r,e),f(r,[{key:"shouldComponentUpdate",value:function(e){return(0,h.default)(this,e)}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,r=e.component,n=e.withRef,i=o(e,["component","withRef"]),a=(0,y.default)(E,j,t,i);return n&&(a.ref="renderedComponent"),(0,l.createElement)(r,a)}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),r}(l.Component);w.propTypes={component:l.PropTypes.oneOfType([l.PropTypes.func,l.PropTypes.string]).isRequired,defaultValue:l.PropTypes.any,props:l.PropTypes.object},w.contextTypes={_reduxForm:l.PropTypes.object};var x=(0,c.default)({arrayInsert:n,arrayMove:s,arrayPop:d,arrayPush:v,arrayRemove:m,arrayRemoveAll:b,arrayShift:g,arraySplice:_,arraySwap:O,arrayUnshift:A},function(e){return e.bind(null,t)}),I=(0,p.connect)(function(e){var r=E(P(e),"initial."+t)||T,n=E(P(e),"values."+t),o=S(n,r);return{asyncError:E(P(e),"asyncErrors."+t+"._error"),dirty:!o,pristine:o,submitError:E(P(e),"submitErrors."+t+"._error"),value:n}},x,void 0,{withRef:!0});return I(w)};r.default=m},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function i(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),c=t(1),f=t(9),l=n(f),p=t(28),d=n(p),y=t(12),v=n(y),h=t(2),m=n(h),b=function(e,r){var t=e._reduxForm.syncErrors,n=m.default.getIn(t,r);return n&&n._error?n._error:n},g=function(e){var r=e.deepEqual,t=e.getIn,n=e.setIn,f=function(e){function f(e,n){o(this,f);var a=i(this,Object.getPrototypeOf(f).call(this,e,n));if(!n._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return a.ConnectedField=(0,d.default)(n._reduxForm,{deepEqual:r,getIn:t},e.name),a.normalize=a.normalize.bind(a),a}return a(f,e),s(f,[{key:"shouldComponentUpdate",value:function(e,r,t){var n=b(t,e.name);return(0,v.default)(this,e,r)||this.syncError!==n}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"Field")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedField=(0,d.default)(this.context._reduxForm,{deepEqual:r,getIn:t},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,l.default)(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 p(e){var p=this.props.normalize;if(!p)return e;var r=this.context._reduxForm.getValues(),t=this.value,o=n(r,this.props.name,e);return p(e,t,o,r)}},{key:"render",value:function(){return(0,c.createElement)(this.ConnectedField,u({},this.props,{normalize:this.normalize,syncError:this.syncError,ref:"connected"}))}},{key:"syncError",get:function(){return b(this.context,this.props.name)}},{key:"name",get:function(){return 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.getWrappedInstance().getValue()}}]),f}(c.Component);return f.propTypes={name:c.PropTypes.string.isRequired,component:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string]).isRequired,defaultValue:c.PropTypes.any,normalize:c.PropTypes.func,props:c.PropTypes.object},f.contextTypes={_reduxForm:c.PropTypes.object},f};r.default=g},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function i(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),c=t(1),f=t(9),l=n(f),p=t(29),d=n(p),y=t(12),v=n(y),h=t(2),m=n(h),b=function(e,r){var t=e._reduxForm.syncErrors;return m.default.getIn(t,r+"._error")},g=function(e){var r=e.deepEqual,t=e.getIn,n=e.size,f=function(e){function f(e,a){o(this,f);var u=i(this,Object.getPrototypeOf(f).call(this,e,a));if(!a._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return u.ConnectedFieldArray=(0,d.default)(a._reduxForm,{deepEqual:r,getIn:t,size:n},e.name),u}return a(f,e),s(f,[{key:"shouldComponentUpdate",value:function(e,r,t){var n=b(t,e.name);return(0,v.default)(this,e,r)||this.syncError!==n}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"FieldArray")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedFieldArray=(0,d.default)(this.context._reduxForm,{deepEqual:r,getIn:t,size:n},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,l.default)(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(0,c.createElement)(this.ConnectedFieldArray,u({},this.props,{syncError:this.syncError,ref:"connected"}))}},{key:"syncError",get:function(){return b(this.context,this.props.name)}},{key:"name",get:function(){return 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}}]),f}(c.Component);return f.propTypes={name:c.PropTypes.string.isRequired,component:c.PropTypes.func.isRequired,props:c.PropTypes.object},f.contextTypes={_reduxForm:c.PropTypes.object},f};r.default=g},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(10),i=n(o),a=function(e,r,t,n){r(n);var o=e();if(!(0,i.default)(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var a=function(e){return function(r){if(r&&Object.keys(r).length)return t(r),Promise.reject(r);if(e)throw t(),new Error("Asynchronous validation promise was rejected without errors.");return t(),Promise.resolve()}};return o.then(a(!1),a(!0))};r.default=a},function(e,r,t){"use strict";function n(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},a=t(48),u=o(a),s=t(49),c=o(s),f=t(30),l=o(f),p=t(31),d=o(p),y=t(43),v=o(y),h=t(55),m=o(h),b=t(13),g=o(b),_=t(47),O=o(_),A=t(14),P=n(A),R=t(8),S=n(R),E=function(e){return i({actionTypes:S},P,{Field:(0,l.default)(e),FieldArray:(0,d.default)(e),formValueSelector:(0,v.default)(e),propTypes:O.default,reduxForm:(0,c.default)(e),reducer:(0,u.default)(e),SubmissionError:g.default,values:(0,m.default)(e)})};r.default=E},function(e,r){"use strict";function t(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}Object.defineProperty(r,"__esModule",{value:!0});var n=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o=function(e,r,o,i){var a=i.arrayInsert,u=i.arrayMove,s=i.arrayPop,c=i.arrayPush,f=i.arrayRemove,l=i.arrayRemoveAll,p=i.arrayShift,d=(i.arraySplice,i.arraySwap),y=i.arrayUnshift,v=i.asyncError,h=i.dirty,m=i.pristine,b=i.submitError,g=(i.submitFailed,i.syncError),_=i.value,O=i.props,A=t(i,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","dirty","pristine","submitError","submitFailed","syncError","value","props"]),P=g||v||b,R=r(_);return n({fields:{dirty:h,error:P,forEach:function(e){return(_||[]).forEach(function(r,t){return e(o+"["+t+"]",t)})},insert:a,invalid:!!P,length:R,map:function(e){return(_||[]).map(function(r,t){return e(o+"["+t+"]",t)})},move:u,pop:function(){return s(),e(_,R-1)},pristine:m,push:c,remove:f,removeAll:l,shift:function(){return p(),e(_,0)},swap:d,unshift:y,valid:!P}},O,A)};r.default=o},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}Object.defineProperty(r,"__esModule",{value:!0});var i=t(96),a=n(i),u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s=t(38),c=n(s),f=t(39),l=n(f),p=t(15),d=n(p),y=t(40),v=n(y),h=t(41),m=n(h),b=function(e,r){var t=e.type,n=e.value,i=o(e,["type","value"]);return"checkbox"===t?u({},i,{checked:!!n,type:t}):"radio"===t?u({},i,{checked:n===r,type:t,value:r}):"select-multiple"===t?u({},i,{type:t,value:n||[]}):"file"===t?u({},i,{type:t,value:void 0}):e},g=function(e,r,t){var n=t.asyncError,i=t.asyncValidating,s=t.blur,f=t.change,p=t.defaultValue,y=void 0===p?"":p,h=t.dirty,g=t.focus,_=t.normalize,O=t.pristine,A=t.props,P=t.state,R=t.submitError,S=t.value,E=t._value,j=t.syncError,T=o(t,["asyncError","asyncValidating","blur","change","defaultValue","dirty","focus","normalize","pristine","props","state","submitError","value","_value","syncError"]),w=arguments.length<=3||void 0===arguments[3]?a.default:arguments[3],x=j||n||R,I=(0,l.default)(f,_),F=b(u({name:r,onBlur:(0,c.default)(s,_,w.bind(null,r)),onChange:I,onDragStart:(0,d.default)(r,S),onDrop:(0,v.default)(r,f),onFocus:(0,m.default)(r,g),value:null==S?y:S},A,T),E);return{active:P&&!!e(P,"active"),asyncValidating:i,dirty:h,error:x,invalid:!!x,input:F,pristine:O,touched:!(!P||!e(P,"touched")),valid:!x,visited:P&&!!e(P,"visited")}};r.default=g},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e){var r=e.initialized,t=e.trigger,n=e.pristine,o=e.syncValidationPasses;if(!o)return!1;switch(t){case"blur":return!0;case"submit":return!n||!r;default:return!1}};r.default=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(6),i=n(o),a=function(e){var r=e.deepEqual,t=e.empty,n=e.getIn,o=e.deleteIn,a=e.setIn,u=function s(e,u){if("]"===u[u.length-1]){var c=(0,i.default)(u);c.pop();var f=n(e,c.join("."));return f?a(e,u,void 0):e}var l=o(e,u),p=u.lastIndexOf(".");if(p>0){var d=u.substring(0,p);if("]"!==d[d.length-1]){var y=n(l,d);if(r(y,t))return s(l,d)}}return l};return u};r.default=a},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(16),i=n(o),a=t(19),u=n(a),s=function(e,r,t){return function(n){var o=r((0,i.default)(n,u.default));e(o),t&&t(o)}};r.default=s},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(16),i=n(o),a=t(19),u=n(a),s=function(e,r){return function(t){return e(r((0,i.default)(t,u.default)))}};r.default=s},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t(15),o=function(e,r){return function(t){r(e,t.dataTransfer.getData(n.dataKey))}};r.default=o},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e,r){return function(){return r(e)}};r.default=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(18),i=n(o),a=function(e){return function(r){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return(0,i.default)(r)?e.apply(void 0,n):e.apply(void 0,[r].concat(n))}};r.default=a},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(9),i=n(o),a=t(2),u=n(a),s=function(e){var r=e.getIn;return function(e){var t=arguments.length<=1||void 0===arguments[1]?function(e){return r(e,"form")}:arguments[1];return(0,i.default)(e,"Form value must be specified"),function(n){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return(0,i.default)(a.length,"No fields specified"),1===a.length?r(t(n),e+".values."+a[0]):a.reduce(function(o,i){var a=r(t(n),e+".values."+i);return void 0===a?o:u.default.setIn(o,i,a)},{})}}};r.default=s},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var i=t(10),a=n(i),u=t(13),s=n(u),c=function(e,r,t,n,i){var u=r.dispatch,c=r.onSubmitFail,f=r.onSubmitSuccess,l=r.startSubmit,p=r.stopSubmit,d=r.setSubmitFailed,y=r.syncErrors,v=r.touch,h=r.values;if(v.apply(void 0,o(i)),t){var m=function(){var r=void 0;try{r=e(h,u)}catch(t){var n=t instanceof s.default?t.errors:void 0;return c&&c(n,u),n}return(0,a.default)(r)?(l(),r.then(function(e){return p(),f&&f(e,u),e},function(e){var r=e instanceof s.default?e.errors:void 0;return p(r),c&&c(r,u),r})):(f&&f(r,u),r)},b=n&&n();return b?b.then(m,function(e){return d.apply(void 0,o(i)),c&&c(e,u),Promise.reject(e)}):m()}return d.apply(void 0,o(i)),c&&c(y,u),y};r.default=c},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(20),i=n(o),a=function(e,r){switch(r){case"Field":return e;case"FieldArray":return e+"._error"}},u=function(e){var r=e.getIn,t=function(e,t,n,o){var u=r(e,"name"),s=r(e,"type");if(!t&&!n&&!o)return!1;var c=a(u,s),f=(0,i.default)(t,c);if(f&&"string"==typeof f)return!0;var l=r(n,c);if(l&&"string"==typeof l)return!0;var p=r(o,c);return!(!p||"string"!=typeof p)};return t};r.default=u},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e){var r=e.getIn,t=function(e){if(!e)return!1;var t=r(e,"_error"); | ||
return!!t||"string"==typeof e&&!!e};return t};r.default=t},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.propTypes=void 0;var n=t(1),o=n.PropTypes.any,i=n.PropTypes.bool,a=n.PropTypes.func;r.propTypes={asyncValidating:i.isRequired,autofilled:i,dirty:i.isRequired,error:o,invalid:i.isRequired,pristine:i.isRequired,submitting:i.isRequired,submitFailed:i.isRequired,valid:i.isRequired,asyncValidate:a.isRequired,destroy:a.isRequired,handleSubmit:a.isRequired,initialize:a.isRequired,reset:a.isRequired,touch:a.isRequired,untouch:a.isRequired}},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}Object.defineProperty(r,"__esModule",{value:!0});var a=t(8),u=t(37),s=n(u),c=function(e){function r(e){return e.plugin=function(e){var t=this;return r(function(){var r=arguments.length<=0||void 0===arguments[0]?u:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return Object.keys(e).reduce(function(r,t){var o=c(r,t),i=e[t](o,n);return i===o?r:f(r,t,i)},t(r,n))})},e}var t,n=e.splice,u=e.empty,c=e.getIn,f=e.setIn,l=e.deleteIn,p=e.fromJS,d=e.size,y=e.some,v=(0,s.default)(e),h=function(e,r,t,o,i,a,u){var s=c(e,r+"."+t);return s||u?f(e,r+"."+t,n(s,o,i,a)):e},m=["values","fields","submitErrors","asyncErrors"],b=function(e,r,t,n,o){var i=e;return i=h(i,"values",r,t,n,o,!0),i=h(i,"fields",r,t,n,u),i=h(i,"submitErrors",r,t,n,u),i=h(i,"asyncErrors",r,t,n,u)},g=(t={},o(t,a.ARRAY_INSERT,function(e,r){var t=r.meta,n=t.field,o=t.index,i=r.payload;return b(e,n,o,0,i)}),o(t,a.ARRAY_MOVE,function(e,r){var t=r.meta,o=t.field,i=t.from,a=t.to,u=c(e,"values."+o),s=u?d(u):0,l=e;return s&&m.forEach(function(e){var r=e+"."+o;if(c(l,r)){var t=c(l,r+"["+i+"]");l=f(l,r,n(c(l,r),i,1)),l=f(l,r,n(c(l,r),a,0,t))}}),l}),o(t,a.ARRAY_POP,function(e,r){var t=r.meta.field,n=c(e,"values."+t),o=n?d(n):0;return o?b(e,t,o-1,1):e}),o(t,a.ARRAY_PUSH,function(e,r){var t=r.meta.field,n=r.payload,o=c(e,"values."+t),i=o?d(o):0;return b(e,t,i,0,n)}),o(t,a.ARRAY_REMOVE,function(e,r){var t=r.meta,n=t.field,o=t.index;return b(e,n,o,1)}),o(t,a.ARRAY_REMOVE_ALL,function(e,r){var t=r.meta.field,n=c(e,"values."+t),o=n?d(n):0;return o?b(e,t,0,o):e}),o(t,a.ARRAY_SHIFT,function(e,r){var t=r.meta.field;return b(e,t,0,1)}),o(t,a.ARRAY_SPLICE,function(e,r){var t=r.meta,n=t.field,o=t.index,i=t.removeNum,a=r.payload;return b(e,n,o,i,a)}),o(t,a.ARRAY_SWAP,function(e,r){var t=r.meta,n=t.field,o=t.indexA,i=t.indexB,a=e;return m.forEach(function(e){var r=c(a,e+"."+n+"["+o+"]"),t=c(a,e+"."+n+"["+i+"]");void 0===r&&void 0===t||(a=f(a,e+"."+n+"["+o+"]",t),a=f(a,e+"."+n+"["+i+"]",r))}),a}),o(t,a.ARRAY_UNSHIFT,function(e,r){var t=r.meta.field,n=r.payload;return b(e,t,0,0,n)}),o(t,a.BLUR,function(e,r){var t=r.meta,n=t.field,o=t.touch,i=r.payload,a=e,u=c(a,"initial."+n);return void 0===u&&""===i?a=v(a,"values."+n):void 0!==i&&(a=f(a,"values."+n,i)),n===c(a,"active")&&(a=l(a,"active")),a=l(a,"fields."+n+".active"),o&&(a=f(a,"fields."+n+".touched",!0),a=f(a,"anyTouched",!0)),a}),o(t,a.CHANGE,function(e,r){var t=r.meta,n=t.field,o=t.touch,i=r.payload,a=e,u=c(a,"initial."+n);return void 0===u&&""===i?a=v(a,"values."+n):void 0!==i&&(a=f(a,"values."+n,i)),a=v(a,"asyncErrors."+n),a=v(a,"submitErrors."+n),o&&(a=f(a,"fields."+n+".touched",!0),a=f(a,"anyTouched",!0)),a}),o(t,a.FOCUS,function(e,r){var t=r.meta.field,n=e,o=c(e,"active");return n=l(n,"fields."+o+".active"),n=f(n,"fields."+t+".visited",!0),n=f(n,"fields."+t+".active",!0),n=f(n,"active",t)}),o(t,a.INITIALIZE,function(e,r){var t=r.payload,n=p(t),o=u,i=c(e,"registeredFields");return i&&(o=f(o,"registeredFields",i)),o=f(o,"values",n),o=f(o,"initial",n)}),o(t,a.REGISTER_FIELD,function(e,r){var t=r.payload,o=t.name,i=t.type,a=e,u=c(a,"registeredFields");if(y(u,function(e){return c(e,"name")===o}))return e;var s=p({name:o,type:i});return a=f(e,"registeredFields",n(u,d(u),0,s))}),o(t,a.RESET,function(e){var r=u,t=c(e,"registeredFields");t&&(r=f(r,"registeredFields",t));var n=c(e,"initial");return n&&(r=f(r,"values",n),r=f(r,"initial",n)),r}),o(t,a.START_ASYNC_VALIDATION,function(e,r){var t=r.meta.field;return f(e,"asyncValidating",t||!0)}),o(t,a.START_SUBMIT,function(e){return f(e,"submitting",!0)}),o(t,a.STOP_ASYNC_VALIDATION,function(e,r){var t=r.payload,n=e;if(n=l(n,"asyncValidating"),t&&Object.keys(t).length){var o=t._error,a=i(t,["_error"]);o&&(n=f(n,"error",o)),n=Object.keys(a).length?f(n,"asyncErrors",p(a)):l(n,"asyncErrors")}else n=l(n,"error"),n=l(n,"asyncErrors");return n}),o(t,a.STOP_SUBMIT,function(e,r){var t=r.payload,n=e;if(n=l(n,"submitting"),n=l(n,"submitFailed"),t&&Object.keys(t).length){var o=t._error,a=i(t,["_error"]);o&&(n=f(n,"error",o)),n=Object.keys(a).length?f(n,"submitErrors",p(a)):l(n,"submitErrors"),n=f(n,"submitFailed",!0)}else n=l(n,"error"),n=l(n,"submitErrors");return n}),o(t,a.SET_SUBMIT_FAILED,function(e,r){var t=r.meta.fields,n=e;return n=f(n,"submitFailed",!0),n=l(n,"submitting"),t.forEach(function(e){return n=f(n,"fields."+e+".touched",!0)}),t.length&&(n=f(n,"anyTouched",!0)),n}),o(t,a.TOUCH,function(e,r){var t=r.meta.fields,n=e;return t.forEach(function(e){return n=f(n,"fields."+e+".touched",!0)}),n=f(n,"anyTouched",!0)}),o(t,a.UNREGISTER_FIELD,function(e,r){var t=r.payload.name,o=c(e,"registeredFields");if(!o)return e;var i=o.findIndex(function(e){return c(e,"name")===t});return d(o)<=1&&i>=0?v(e,"registeredFields"):f(e,"registeredFields",n(o,i,1))}),o(t,a.UNTOUCH,function(e,r){var t=r.meta.fields,n=e;return t.forEach(function(e){return n=l(n,"fields."+e+".touched")}),n}),t),_=function(){var e=arguments.length<=0||void 0===arguments[0]?u:arguments[0],r=arguments[1],t=g[r.type];return t?t(e,r):e},O=function(e){return function(){var r=arguments.length<=0||void 0===arguments[0]?u:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t&&t.meta&&t.meta.form;if(!n)return r;if(t.type===a.DESTROY)return v(r,t.meta.form);var o=c(r,n),i=e(o,t);return i===o?r:f(r,n,i)}};return r(O(_))};r.default=c},function(e,r,t){"use strict";function n(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function u(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function s(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}function c(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}function f(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}Object.defineProperty(r,"__esModule",{value:!0});var l=t(11),p=o(l),d=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),y=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},h=t(1),m=t(58),b=o(m),g=t(7),_=t(100),O=t(10),A=o(O),P=t(54),R=o(P),S=t(14),E=n(S),j=t(44),T=o(j),w=t(18),x=o(w),I=t(42),F=o(I),M=t(32),V=o(M),k=t(46),C=o(k),U=t(45),N=o(U),Y=t(36),L=o(Y),q=t(2),z=o(q),D=function(e){return Boolean(e&&e.prototype&&"object"===v(e.prototype.isReactComponent))},W=E.arrayInsert,B=E.arrayPop,H=E.arrayPush,G=E.arrayRemove,Z=E.arrayShift,J=E.arraySplice,K=E.arraySwap,$=E.arrayUnshift,Q=E.blur,X=E.change,ee=E.focus,re=f(E,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),te={arrayInsert:W,arrayPop:B,arrayPush:H,arrayRemove:G,arrayShift:Z,arraySplice:J,arraySwap:K,arrayUnshift:$},ne=[].concat(c(Object.keys(E)),["array","asyncErrors","initialized","initialValues","syncErrors","values","registeredFields"]),oe=function(e){if(!e||"function"!=typeof e)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return e},ie=function(e){var r=e.deepEqual,t=e.empty,n=e.getIn,o=e.setIn,c=e.fromJS,l=e.some,m=(0,C.default)(e),O=(0,N.default)(e),P=(0,C.default)(z.default);return function(e){var S=y({touchOnBlur:!0,touchOnChange:!1,destroyOnUnmount:!0,shouldAsyncValidate:L.default,enableReinitialize:!1,getFormState:function(e){return n(e,"form")}},e);return function(e){var E=function(t){function c(e){a(this,c);var r=u(this,Object.getPrototypeOf(c).call(this,e));return r.submit=r.submit.bind(r),r.reset=r.reset.bind(r),r.asyncValidate=r.asyncValidate.bind(r),r.getValues=r.getValues.bind(r),r.register=r.register.bind(r),r.unregister=r.unregister.bind(r),r.submitCompleted=r.submitCompleted.bind(r),r}return s(c,t),d(c,[{key:"getChildContext",value:function(){var e=this;return{_reduxForm:y({},this.props,{getFormState:function(r){return n(e.props.getFormState(r),e.props.form)},asyncValidate:this.asyncValidate,getValues:this.getValues,register:this.register,unregister:this.unregister})}}},{key:"initIfNeeded",value:function(e){if(e){var t=this.props.enableReinitialize;!t&&e.initialized||r(this.props.initialValues,e.initialValues)||this.props.initialize(e.initialValues)}else this.props.initialValues&&this.props.initialize(this.props.initialValues)}},{key:"componentWillMount",value:function(){this.initIfNeeded()}},{key:"componentWillReceiveProps",value:function(e){this.initIfNeeded(e)}},{key:"shouldComponentUpdate",value:function(e){var t=this;return Object.keys(e).some(function(n){return!~ne.indexOf(n)&&!r(t.props[n],e[n])})}},{key:"componentWillUnmount",value:function(){var e=this.props,r=e.destroyOnUnmount,t=e.destroy;r&&(this.destroyed=!0,t())}},{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(e,r){this.props.registerField(e,r)}},{key:"unregister",value:function(e){this.destroyed||this.props.unregisterField(e)}},{key:"getFieldList",value:function(){return this.props.registeredFields.map(function(e){return n(e,"name")})}},{key:"asyncValidate",value:function l(e,r){var t=this,i=this.props,a=i.asyncBlurFields,u=i.asyncErrors,l=i.asyncValidate,s=i.dispatch,c=i.initialized,f=i.pristine,p=i.shouldAsyncValidate,d=i.startAsyncValidation,y=i.stopAsyncValidation,h=i.syncErrors,m=i.values,b=!e;if(l){var g=function(){var i=b?m:o(m,e,r),v=b||!n(h,e),g=!b&&(!a||~a.indexOf(e.replace(/\[[0-9]+\]/g,"[]")));if((g||b)&&p({asyncErrors:u,initialized:c,trigger:b?"submit":"blur",blurredField:e,pristine:f,syncValidationPasses:v}))return{v:(0,V.default)(function(){return l(i,s,t.props)},d,y,e)}}();if("object"===("undefined"==typeof g?"undefined":v(g)))return g.v}}},{key:"submitCompleted",value:function(e){return delete this.submitPromise,e}},{key:"listenToSubmit",value:function(e){var r=this;return(0,A.default)(e)?(this.submitPromise=e,e.then(this.submitCompleted,function(e){return r.submitCompleted(),Promise.reject(e)})):e}},{key:"submit",value:function(e){var r=this,t=this.props.onSubmit;return e&&!(0,x.default)(e)?(0,F.default)(function(){return!r.submitPromise&&r.listenToSubmit((0,T.default)(oe(e),r.props,r.isValid(),r.asyncValidate,r.getFieldList()))}):this.submitPromise?void 0:this.listenToSubmit((0,T.default)(oe(t),this.props,this.isValid(),this.asyncValidate,this.getFieldList()))}},{key:"reset",value:function(){this.props.reset()}},{key:"render",value:function(){var r=this.props,t=r.anyTouched,n=(r.arrayInsert,r.arrayPop,r.arrayPush,r.arrayRemove,r.arrayShift,r.arraySplice,r.arraySwap,r.arrayUnshift,r.asyncErrors,r.asyncValidate),o=r.asyncValidating,a=r.destroy,u=(r.destroyOnUnmount,r.dirty),s=r.dispatch,c=(r.enableReinitialize,r.error),l=r.form,p=(r.getFormState,r.initialize),d=r.invalid,v=r.pristine,m=r.propNamespace,b=(r.registerField,r.reset),g=r.submitting,_=r.submitFailed,O=r.touch,A=(r.touchOnBlur,r.touchOnChange,r.syncErrors,r.unregisterField,r.untouch),P=r.valid,R=(r.values,f(r,["anyTouched","arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","asyncValidate","asyncValidating","destroy","destroyOnUnmount","dirty","dispatch","enableReinitialize","error","form","getFormState","initialize","invalid","pristine","propNamespace","registerField","reset","submitting","submitFailed","touch","touchOnBlur","touchOnChange","syncErrors","unregisterField","untouch","valid","values"])),S={anyTouched:t,asyncValidate:n,asyncValidating:o,destroy:a,dirty:u,dispatch:s,error:c,form:l,handleSubmit:this.submit,initialize:p,invalid:d,pristine:v,reset:b,submitting:g,submitFailed:_,touch:O,untouch:A,valid:P},E=y({},m?i({},m,S):S,R);return D(e)&&(E.ref="wrapped"),(0,h.createElement)(e,E)}}]),c}(h.Component);E.displayName="Form("+(0,R.default)(e)+")",E.WrappedComponent=e,E.childContextTypes={_reduxForm:h.PropTypes.object.isRequired},E.propTypes={destroyOnUnmount:h.PropTypes.bool,form:h.PropTypes.string.isRequired,initialValues:h.PropTypes.object,getFormState:h.PropTypes.func,onSubmitFail:h.PropTypes.func,onSubmitSuccess:h.PropTypes.func,propNameSpace:h.PropTypes.string,validate:h.PropTypes.func,touchOnBlur:h.PropTypes.bool,touchOnChange:h.PropTypes.bool,registeredFields:h.PropTypes.any};var j=(0,g.connect)(function(e,o){var i=o.form,a=o.getFormState,u=o.initialValues,s=o.validate,c=n(a(e)||t,i)||t,f=n(c,"initial"),p=u||f||t,d=n(c,"values")||p,y=r(p,d),v=n(c,"asyncErrors"),h=n(c,"submitErrors"),b=s&&s(d,o)||{},g=P(b),_=m(v),A=m(h),R=n(c,"registeredFields")||[],S=R&&l(R,function(e){return O(e,b,v,h)}),E=!(g||_||A||S),j=!!n(c,"anyTouched"),T=!!n(c,"submitting"),w=!!n(c,"submitFailed"),x=n(c,"error");return{anyTouched:j,asyncErrors:v,asyncValidating:n(c,"asyncValidating"),dirty:!y,error:x,initialized:!!f,invalid:!E,pristine:y,registeredFields:R,submitting:T,submitFailed:w,syncErrors:b,values:d,valid:E}},function(e,r){var t=function(e){return e.bind(null,r.form)},n=(0,p.default)(re,t),o=(0,p.default)(te,t),i=function(e,t){return Q(r.form,e,t,!!r.touchOnBlur)},a=function(e,t){return X(r.form,e,t,!!r.touchOnChange)},u=t(ee),s=(0,_.bindActionCreators)(n,e),c={insert:(0,_.bindActionCreators)(o.arrayInsert,e),pop:(0,_.bindActionCreators)(o.arrayPop,e),push:(0,_.bindActionCreators)(o.arrayPush,e),remove:(0,_.bindActionCreators)(o.arrayRemove,e),shift:(0,_.bindActionCreators)(o.arrayShift,e),splice:(0,_.bindActionCreators)(o.arraySplice,e),swap:(0,_.bindActionCreators)(o.arraySwap,e),unshift:(0,_.bindActionCreators)(o.arrayUnshift,e)},f=y({},s,o,{blur:i,change:a,array:c,focus:u,dispatch:e});return function(){return f}},void 0,{withRef:!0}),w=(0,b.default)(j(E),e);return w.defaultProps=S,function(e){function r(){return a(this,r),u(this,Object.getPrototypeOf(r).apply(this,arguments))}return s(r,e),d(r,[{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 e=this.props,r=e.initialValues,t=f(e,["initialValues"]);return(0,h.createElement)(w,y({},t,{ref:"wrapped",initialValues:c(r)}))}},{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}}]),r}(h.Component)}}};r.default=ie},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(90),i=n(o),a=function(e,r){return e==r||(null==e&&""===r||(""===e&&null==r||void 0))},u=function(e,r){return(0,i.default)(e,r,a)};r.default=u},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var a=t(6),u=n(a),s=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},c=function l(e,r){for(var t=arguments.length,n=Array(t>2?t-2:0),a=2;a<t;a++)n[a-2]=arguments[a];if(void 0===e||void 0===r)return e;if(n.length){if(Array.isArray(e)){if(r<e.length){var u=l.apply(void 0,[e&&e[r]].concat(n));if(u!==e[r]){var c=[].concat(i(e));return c[r]=u,c}}return e}if(r in e){var f=l.apply(void 0,[e&&e[r]].concat(n));return e[r]===f?e:s({},e,o({},r,f))}return e}if(Array.isArray(e)){if(isNaN(r))throw new Error("Cannot delete non-numerical index from an array");if(r<e.length){var p=[].concat(i(e));return p.splice(r,1),p}return e}if(r in e){var d=s({},e);return delete d[r],d}return e},f=function(e,r){return c.apply(void 0,[e].concat(i((0,u.default)(r))))};r.default=f},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var a=t(6),u=n(a),s=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},c=function l(e,r,t){for(var n=arguments.length,a=Array(n>3?n-3:0),u=3;u<n;u++)a[u-3]=arguments[u];if(void 0===t)return r;var c=l.apply(void 0,[e&&e[t],r].concat(a));if(!e){var f=isNaN(t)?{}:[];return f[t]=c,f}if(Array.isArray(e)){var p=[].concat(i(e));return p[t]=c,p}return s({},e,o({},t,c))},f=function(e,r,t){return c.apply(void 0,[e,t].concat(i((0,u.default)(r))))};r.default=f},function(e,r){"use strict";function t(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],r=arguments[1],n=arguments[2],o=arguments[3],i=[].concat(t(e));return n?i.splice(r,n):r<i.length?i.splice(r,0,o):i[r]=o,i};r.default=n},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e){return e.displayName||e.name||"Component"};r.default=t},function(e,r,t){"use strict";function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Object.defineProperty(r,"__esModule",{value:!0});var o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i=t(7),a=function(e){var r=e.getIn;return function(e){var t=o({prop:"values",getFormState:function(e){return r(e,"form")}},e),a=t.form,u=t.prop,s=t.getFormState;return(0,i.connect)(function(e){return n({},u,r(s(e),a+".values"))},function(){return{}})}};r.default=a},function(e,r){"use strict";function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function o(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}function i(e){function r(){e.apply(this,arguments)}return r.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e,r}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e){function r(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];t(this,r);var o=n(this,Object.getPrototypeOf(r).call(this,e));return Object.defineProperty(o,"message",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(o,"name",{configurable:!0,enumerable:!1,value:o.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(o,o.constructor),n(o)):(Object.defineProperty(o,"stack",{configurable:!0,enumerable:!1,value:new Error(e).stack,writable:!0}),o)}return o(r,e),r}(i(Error));r.default=a,e.exports=r.default},function(e,r){"use strict";function t(e,r){return e===r?0!==e||1/e===1/r:e!==e&&r!==r}function n(e,r){if(t(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var n=Object.keys(e),i=Object.keys(r);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(r,n[a])||!t(e[n[a]],r[n[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=n},function(e,r){"use strict";var t={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;e.exports=function(e,r,i){if("string"!=typeof r){var a=Object.getOwnPropertyNames(r);o&&(a=a.concat(Object.getOwnPropertySymbols(r)));for(var u=0;u<a.length;++u)if(!(t[a[u]]||n[a[u]]||i&&i[a[u]]))try{e[a[u]]=r[a[u]]}catch(s){}}return e}},function(e,r,t){var n=t(3),o=t(4),i=n(o,"DataView");e.exports=i},function(e,r,t){var n=t(3),o=t(4),i=n(o,"Map");e.exports=i},function(e,r,t){function n(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}var o=t(21),i=t(22),a=t(23),u=t(24),s=t(25);n.prototype.clear=o,n.prototype.delete=i,n.prototype.get=a,n.prototype.has=u,n.prototype.set=s,e.exports=n},function(e,r,t){var n=t(3),o=t(4),i=n(o,"Promise");e.exports=i},function(e,r,t){var n=t(3),o=t(4),i=n(o,"Set");e.exports=i},function(e,r,t){function n(e){var r=-1,t=e?e.length:0;for(this.__data__=new o;++r<t;)this.add(e[r])}var o=t(61),i=t(84),a=t(85);n.prototype.add=n.prototype.push=i,n.prototype.has=a,e.exports=n},61,function(e,r,t){var n=t(3),o=t(4),i=n(o,"WeakMap");e.exports=i},function(e,r){function t(e,r){for(var t=-1,n=e?e.length:0,o=Array(n);++t<n;)o[t]=r(e[t],t,e);return o}e.exports=t},function(e,r){function t(e,r){for(var t=-1,n=e?e.length:0;++t<n;)if(r(e[t],t,e))return!0;return!1}e.exports=t},function(e,r,t){var n=t(77),o=n();e.exports=o},function(e,r,t){function n(e,r){return e&&o(e,r,i)}var o=t(69),i=t(27);e.exports=n},function(e,r,t){function n(e,r){return null!=e&&(a.call(e,r)||"object"==typeof e&&r in e&&null===o(e))}var o=t(81),i=Object.prototype,a=i.hasOwnProperty;e.exports=n},function(e,r,t){function n(e,r,t,u,s){return e===r||(null==e||null==r||!i(e)&&!a(r)?e!==e&&r!==r:o(e,r,n,t,u,s))}var o=t(73),i=t(91),a=t(92);e.exports=n},function(e,r,t){function n(e,r,t,n,h,b){var g=c(e),_=c(r),O=y,A=y;g||(O=s(e),O=O==d?v:O),_||(A=s(r),A=A==d?v:A);var P=O==v&&!f(e),R=A==v&&!f(r),S=O==A;if(S&&!P)return b||(b=new o),g||l(e)?i(e,r,t,n,h,b):a(e,r,O,t,n,h,b);if(!(h&p)){var E=P&&m.call(e,"__wrapped__"),j=R&&m.call(r,"__wrapped__");if(E||j){var T=E?e.value():e,w=j?r.value():r;return b||(b=new o),t(T,w,n,h,b)}}return!!S&&(b||(b=new o),u(e,r,t,n,h,b))}var o=t(65),i=t(78),a=t(79),u=t(80),s=t(82),c=t(26),f=t(83),l=t(94),p=2,d="[object Arguments]",y="[object Array]",v="[object Object]",h=Object.prototype,m=h.hasOwnProperty;e.exports=n},function(e,r){function t(e){return e}e.exports=t},function(e,r){function t(e){return e&&e.Object===Object?e:null}e.exports=t},function(e,r){function t(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}e.exports=t},function(e,r){function t(e){return function(r,t,n){for(var o=-1,i=Object(r),a=n(r),u=a.length;u--;){var s=a[e?u:++o];if(t(i[s],s,i)===!1)break}return r}}e.exports=t},function(e,r,t){function n(e,r,t,n,s,c){var f=s&u,l=e.length,p=r.length;if(l!=p&&!(f&&p>l))return!1;var d=c.get(e);if(d)return d==r;var y=-1,v=!0,h=s&a?new o:void 0;for(c.set(e,r);++y<l;){var m=e[y],b=r[y];if(n)var g=f?n(b,m,y,r,e,c):n(m,b,y,e,r,c);if(void 0!==g){if(g)continue;v=!1;break}if(h){if(!i(r,function(e,r){if(!h.has(r)&&(m===e||t(m,e,n,s,c)))return h.add(r)})){v=!1;break}}else if(m!==b&&!t(m,b,n,s,c)){v=!1;break}}return c.delete(e),v}var o=t(64),i=t(68),a=1,u=2;e.exports=n},function(e,r){function t(e,r){return e===r||e!==e&&r!==r}e.exports=t},function(e,r,t){function n(e,r,t,n,u,s){var c=u&a,f=i(e),l=f.length,p=i(r),d=p.length;if(l!=d&&!c)return!1;for(var y=l;y--;){var v=f[y];if(!(c?v in r:o(r,v)))return!1}var h=s.get(e);if(h)return h==r;var m=!0;s.set(e,r);for(var b=c;++y<l;){v=f[y];var g=e[v],_=r[v];if(n)var O=c?n(_,g,v,r,e,s):n(g,_,v,e,r,s);if(!(void 0===O?g===_||t(g,_,n,u,s):O)){m=!1;break}b||(b="constructor"==v)}if(m&&!b){var A=e.constructor,P=r.constructor;A!=P&&"constructor"in e&&"constructor"in r&&!("function"==typeof A&&A instanceof A&&"function"==typeof P&&P instanceof P)&&(m=!1)}return s.delete(e),m}var o=t(71),i=t(27),a=2;e.exports=n},function(e,r){function t(e){return n(Object(e))}var n=Object.getPrototypeOf;e.exports=t},function(e,r,t){function n(e){return m.call(e)}var o=t(59),i=t(60),a=t(62),u=t(63),s=t(66),c=t(88),f="[object Map]",l="[object Object]",p="[object Promise]",d="[object Set]",y="[object WeakMap]",v="[object DataView]",h=Object.prototype,m=h.toString,b=c(o),g=c(i),_=c(a),O=c(u),A=c(s);(o&&n(new o(new ArrayBuffer(1)))!=v||i&&n(new i)!=f||a&&n(a.resolve())!=p||u&&n(new u)!=d||s&&n(new s)!=y)&&(n=function(e){var r=m.call(e),t=r==l?e.constructor:void 0,n=t?c(t):void 0;if(n)switch(n){case b:return v;case g:return f;case _:return p;case O:return d;case A:return y}return r}),e.exports=n},function(e,r){function t(){return!1}e.exports=t},function(e,r){function t(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=t},function(e,r){function t(e){return this.__data__.has(e)}e.exports=t},function(e,r,t){var n=t(95),o=t(98),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,a=/\\(\\)?/g,u=n(function(e){var r=[];return o(e).replace(i,function(e,t,n,o){r.push(n?o.replace(a,"$1"):t||e)}),r});e.exports=u},74,function(e,r){function t(e){if(null!=e){try{return n.call(e)}catch(r){}try{return e+""}catch(r){}}return""}var n=Function.prototype.toString;e.exports=t},79,function(e,r,t){function n(e,r,t){t="function"==typeof t?t:void 0;var n=t?t(e,r):void 0;return void 0===n?o(e,r,t):!!n}var o=t(72);e.exports=n},function(e,r){function t(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}e.exports=t},function(e,r){function t(e){return!!e&&"object"==typeof e}e.exports=t},83,83,74,function(e,r){function t(){}e.exports=t},68,74,function(e,r,t){"use strict";function n(e,r,t){return!o(e.props,r)||!o(e.state,t)}var o=t(57);e.exports=n},function(e,r){e.exports=t}]))}); | ||
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("react-redux"),require("redux")):"function"==typeof define&&define.amd?define(["react","react-redux","redux"],r):"object"==typeof exports?exports.ReduxForm=r(require("react"),require("react-redux"),require("redux")):e.ReduxForm=r(e.React,e.ReactRedux,e.Redux)}(this,function(e,r,t){return function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}(function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))switch(typeof e[r]){case"function":break;case"object":e[r]=function(r){var t=r.slice(1),n=e[r[0]];return function(e,r,o){n.apply(this,[e,r,o].concat(t))}}(e[r]);break;default:e[r]=e[e[r]]}return e}([function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0}),r.values=r.untouch=r.touch=r.SubmissionError=r.stopSubmit=r.stopAsyncValidation=r.startSubmit=r.startAsyncValidation=r.setSubmitFailed=r.reset=r.propTypes=r.initialize=r.reduxForm=r.reducer=r.formValueSelector=r.focus=r.FieldArray=r.Field=r.destroy=r.change=r.blur=r.arrayUnshift=r.arraySwap=r.arraySplice=r.arrayShift=r.arrayRemoveAll=r.arrayRemove=r.arrayPush=r.arrayPop=r.arrayMove=r.arrayInsert=r.actionTypes=void 0;var o=t(33),i=n(o),a=t(2),u=n(a),s=(0,i.default)(u.default),c=s.actionTypes,f=s.arrayInsert,l=s.arrayMove,p=s.arrayPop,d=s.arrayPush,y=s.arrayRemove,v=s.arrayRemoveAll,h=s.arrayShift,m=s.arraySplice,b=s.arraySwap,_=s.arrayUnshift,g=s.blur,O=s.change,A=s.destroy,P=s.Field,R=s.FieldArray,S=s.focus,E=s.formValueSelector,j=s.reducer,T=s.reduxForm,w=s.initialize,x=s.propTypes,I=s.reset,F=s.setSubmitFailed,M=s.startAsyncValidation,V=s.startSubmit,k=s.stopAsyncValidation,C=s.stopSubmit,U=s.SubmissionError,N=s.touch,Y=s.untouch,L=s.values;r.actionTypes=c,r.arrayInsert=f,r.arrayMove=l,r.arrayPop=p,r.arrayPush=d,r.arrayRemove=y,r.arrayRemoveAll=v,r.arrayShift=h,r.arraySplice=m,r.arraySwap=b,r.arrayUnshift=_,r.blur=g,r.change=O,r.destroy=A,r.Field=P,r.FieldArray=R,r.focus=S,r.formValueSelector=E,r.reducer=j,r.reduxForm=T,r.initialize=w,r.propTypes=x,r.reset=I,r.setSubmitFailed=F,r.startAsyncValidation=M,r.startSubmit=V,r.stopAsyncValidation=k,r.stopSubmit=C,r.SubmissionError=U,r.touch=N,r.untouch=Y,r.values=L},function(r,t){r.exports=e},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(97),i=n(o),a=t(53),u=n(a),s=t(20),c=n(s),f=t(52),l=n(f),p=t(50),d=n(p),y=t(51),v=n(y),h={empty:{},getIn:c.default,setIn:l.default,deepEqual:d.default,deleteIn:v.default,fromJS:function(e){return e},size:function(e){return e?e.length:0},some:i.default,splice:u.default};r.default=h},function(e,r){function t(e,r){return null==e?void 0:e[r]}e.exports=t},function(e,r,t){(function(r){var n=t(75),o=n("object"==typeof r&&r),i=n("object"==typeof self&&self),a=n("object"==typeof this&&this),u=o||i||a||Function("return this")();e.exports=u}).call(r,function(){return this}())},function(e,r,t){function n(e,r){for(var t=e.length;t--;)if(o(e[t][0],r))return t;return-1}var o=t(89);e.exports=n},function(e,r,t){function n(e){return a(e)?o(e,c):u(e)?[e]:i(s(e))}var o=t(67),i=t(76),a=t(26),u=t(93),s=t(86),c=t(87);e.exports=n},function(e,t){e.exports=r},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ARRAY_INSERT="redux-form/ARRAY_INSERT",r.ARRAY_MOVE="redux-form/ARRAY_MOVE",r.ARRAY_POP="redux-form/ARRAY_POP",r.ARRAY_PUSH="redux-form/ARRAY_PUSH",r.ARRAY_REMOVE="redux-form/ARRAY_REMOVE",r.ARRAY_REMOVE_ALL="redux-form/ARRAY_REMOVE_ALL",r.ARRAY_SHIFT="redux-form/ARRAY_SHIFT",r.ARRAY_SPLICE="redux-form/ARRAY_SPLICE",r.ARRAY_UNSHIFT="redux-form/ARRAY_UNSHIFT",r.ARRAY_SWAP="redux-form/ARRAY_SWAP",r.BLUR="redux-form/BLUR",r.CHANGE="redux-form/CHANGE",r.DESTROY="redux-form/DESTROY",r.FOCUS="redux-form/FOCUS",r.INITIALIZE="redux-form/INITIALIZE",r.REGISTER_FIELD="redux-form/REGISTER_FIELD",r.RESET="redux-form/RESET",r.SET_SUBMIT_FAILED="redux-form/SET_SUBMIT_FAILED",r.START_ASYNC_VALIDATION="redux-form/START_ASYNC_VALIDATION",r.START_SUBMIT="redux-form/START_SUBMIT",r.STOP_ASYNC_VALIDATION="redux-form/STOP_ASYNC_VALIDATION",r.STOP_SUBMIT="redux-form/STOP_SUBMIT",r.TOUCH="redux-form/TOUCH",r.UNREGISTER_FIELD="redux-form/UNREGISTER_FIELD",r.UNTOUCH="redux-form/UNTOUCH",r.UPDATE_SYNC_ERRORS="redux-form/UPDATE_SYNC_ERRORS"},function(e,r,t){"use strict";var n=function(e,r,t,n,o,i,a,u){if(!e){var s;if(void 0===r)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[t,n,o,i,a,u],f=0;s=new Error(r.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=n},function(e,r){function t(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=t},function(e,r,t){function n(e,r){var t={};return r=i(r,3),o(e,function(e,n,o){t[n]=r(e,n,o)}),t}var o=t(70),i=t(74);e.exports=n},function(e,r,t){e.exports=t(99)},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function i(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var u=t(56),s=n(u),c=function(e){function r(e){o(this,r);var t=i(this,Object.getPrototypeOf(r).call(this,"Submit Validation Failed"));return t.errors=e,t}return a(r,e),r}(s.default);r.default=c},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.updateSyncErrors=r.untouch=r.unregisterField=r.touch=r.setSubmitFailed=r.stopSubmit=r.stopAsyncValidation=r.startSubmit=r.startAsyncValidation=r.reset=r.registerField=r.initialize=r.focus=r.destroy=r.change=r.blur=r.arrayUnshift=r.arraySwap=r.arraySplice=r.arrayShift=r.arrayRemoveAll=r.arrayRemove=r.arrayPush=r.arrayPop=r.arrayMove=r.arrayInsert=void 0;var n=t(8);r.arrayInsert=function(e,r,t,o){return{type:n.ARRAY_INSERT,meta:{form:e,field:r,index:t},payload:o}},r.arrayMove=function(e,r,t,o){return{type:n.ARRAY_MOVE,meta:{form:e,field:r,from:t,to:o}}},r.arrayPop=function(e,r){return{type:n.ARRAY_POP,meta:{form:e,field:r}}},r.arrayPush=function(e,r,t){return{type:n.ARRAY_PUSH,meta:{form:e,field:r},payload:t}},r.arrayRemove=function(e,r,t){return{type:n.ARRAY_REMOVE,meta:{form:e,field:r,index:t}}},r.arrayRemoveAll=function(e,r){return{type:n.ARRAY_REMOVE_ALL,meta:{form:e,field:r}}},r.arrayShift=function(e,r){return{type:n.ARRAY_SHIFT,meta:{form:e,field:r}}},r.arraySplice=function(e,r,t,o,i){var a={type:n.ARRAY_SPLICE,meta:{form:e,field:r,index:t,removeNum:o}};return void 0!==i&&(a.payload=i),a},r.arraySwap=function(e,r,t,o){if(t===o)throw new Error("Swap indices cannot be equal");if(t<0||o<0)throw new Error("Swap indices cannot be negative");return{type:n.ARRAY_SWAP,meta:{form:e,field:r,indexA:t,indexB:o}}},r.arrayUnshift=function(e,r,t){return{type:n.ARRAY_UNSHIFT,meta:{form:e,field:r},payload:t}},r.blur=function(e,r,t,o){return{type:n.BLUR,meta:{form:e,field:r,touch:o},payload:t}},r.change=function(e,r,t,o){return{type:n.CHANGE,meta:{form:e,field:r,touch:o},payload:t}},r.destroy=function(e){return{type:n.DESTROY,meta:{form:e}}},r.focus=function(e,r){return{type:n.FOCUS,meta:{form:e,field:r}}},r.initialize=function(e,r){return{type:n.INITIALIZE,meta:{form:e},payload:r}},r.registerField=function(e,r,t){return{type:n.REGISTER_FIELD,meta:{form:e},payload:{name:r,type:t}}},r.reset=function(e){return{type:n.RESET,meta:{form:e}}},r.startAsyncValidation=function(e,r){return{type:n.START_ASYNC_VALIDATION,meta:{form:e,field:r}}},r.startSubmit=function(e){return{type:n.START_SUBMIT,meta:{form:e}}},r.stopAsyncValidation=function(e,r){var t={type:n.STOP_ASYNC_VALIDATION,meta:{form:e},payload:r};return r&&Object.keys(r).length&&(t.error=!0),t},r.stopSubmit=function(e,r){var t={type:n.STOP_SUBMIT,meta:{form:e},payload:r};return r&&Object.keys(r).length&&(t.error=!0),t},r.setSubmitFailed=function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];return{type:n.SET_SUBMIT_FAILED,meta:{form:e,fields:t},error:!0}},r.touch=function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];return{type:n.TOUCH,meta:{form:e,fields:t}}},r.unregisterField=function(e,r){return{type:n.UNREGISTER_FIELD,meta:{form:e},payload:{name:r}}},r.untouch=function(e){for(var r=arguments.length,t=Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];return{type:n.UNTOUCH,meta:{form:e,fields:t}}},r.updateSyncErrors=function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return{type:n.UPDATE_SYNC_ERRORS,meta:{form:e},payload:r}}},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=r.dataKey="value",n=function(e,r){return function(e){e.dataTransfer.setData(t,r)}};r.default=n},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(17),i=n(o),a=function(e){var r=[];if(e)for(var t=0;t<e.length;t++){var n=e[t];n.selected&&r.push(n.value)}return r},u=function(e,r){if((0,i.default)(e)){if(!r&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(r&&void 0!==e.nativeEvent)return e.nativeEvent.text;var t=e.target,n=t.type,o=t.value,u=t.checked,s=t.files,c=e.dataTransfer;return"checkbox"===n?u:"file"===n?s||c&&c.files:"select-multiple"===n?a(e.target.options):""===o||"number"!==n&&"range"!==n?o:parseFloat(o)}return e&&void 0!==e.value?e.value:e};r.default=u},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e){return!!(e&&e.stopPropagation&&e.preventDefault)};r.default=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(17),i=n(o),a=function(e){var r=(0,i.default)(e);return r&&e.preventDefault(),r};r.default=a},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;r.default=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var i=t(6),a=n(i),u=function c(e,r){for(var t=arguments.length,n=Array(t>2?t-2:0),o=2;o<t;o++)n[o-2]=arguments[o];if(!e)return e;var i=e[r];return n.length?c.apply(void 0,[i].concat(n)):i},s=function(e,r){return u.apply(void 0,[e].concat(o((0,a.default)(r))))};r.default=s},function(e,r){function t(){this.__data__=[]}e.exports=t},function(e,r,t){function n(e){var r=this.__data__,t=o(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():a.call(r,t,1),!0}var o=t(5),i=Array.prototype,a=i.splice;e.exports=n},function(e,r,t){function n(e){var r=this.__data__,t=o(r,e);return t<0?void 0:r[t][1]}var o=t(5);e.exports=n},function(e,r,t){function n(e){return o(this.__data__,e)>-1}var o=t(5);e.exports=n},function(e,r,t){function n(e,r){var t=this.__data__,n=o(t,e);return n<0?t.push([e,r]):t[n][1]=r,this}var o=t(5);e.exports=n},function(e,r){var t=Array.isArray;e.exports=t},function(e,r){function t(e){return n(Object(e))}var n=Object.keys;e.exports=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function i(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function a(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function u(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var s=t(11),c=n(s),f=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),l=t(1),p=t(7),d=t(35),y=n(d),v=t(2),h=n(v),m=function(e,r,t){var n=e.asyncValidate,s=e.blur,d=e.change,v=e.focus,m=e.getFormState,b=e.initialValues,_=r.deepEqual,g=r.getIn,O=b&&g(b,t),A=function(e){var r=h.default.getIn(e,t);return r&&r._error?r._error:r},P=function(e){function r(){return i(this,r),a(this,Object.getPrototypeOf(r).apply(this,arguments))}return u(r,e),f(r,[{key:"shouldComponentUpdate",value:function(e){return!_(this.props,e)}},{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:"render",value:function(){var e=this.props,r=e.component,i=e.withRef,a=o(e,["component","withRef"]),u=(0,y.default)(g,t,a,n);return i&&(u.ref="renderedComponent"),(0,l.createElement)(r,"string"==typeof r?u.input:u)}}]),r}(l.Component);P.propTypes={component:l.PropTypes.oneOfType([l.PropTypes.func,l.PropTypes.string]).isRequired,defaultValue:l.PropTypes.any,props:l.PropTypes.object};var R=(0,c.default)({blur:s,change:d,focus:v},function(e){return e.bind(null,t)}),S=(0,p.connect)(function(e,r){var n=m(e),o=g(n,"initial."+t)||O,i=g(n,"values."+t),a=A(g(n,"syncErrors")),u=i===o;return{asyncError:g(n,"asyncErrors."+t),asyncValidating:g(n,"asyncValidating")===t,dirty:!u,pristine:u,state:g(n,"fields."+t),submitError:g(n,"submitErrors."+t),syncError:a,value:i,_value:r.value}},R,void 0,{withRef:!0});return S(P)};r.default=m},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function i(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function a(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function u(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var s=t(11),c=n(s),f=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),l=t(1),p=t(7),d=t(34),y=n(d),v=t(12),h=n(v),m=t(2),b=n(m),_=function(e,r,t){var n=e.arrayInsert,s=e.arrayMove,d=e.arrayPop,v=e.arrayPush,m=e.arrayRemove,_=e.arrayRemoveAll,g=e.arrayShift,O=e.arraySplice,A=e.arraySwap,P=e.arrayUnshift,R=(e.asyncValidate,e.blur,e.change,e.focus,e.getFormState),S=e.initialValues,E=r.deepEqual,j=r.getIn,T=r.size,w=S&&j(S,t),x=function(e){return b.default.getIn(e,t+"._error")},I=function(e){function r(){return i(this,r),a(this,Object.getPrototypeOf(r).apply(this,arguments))}return u(r,e),f(r,[{key:"shouldComponentUpdate",value:function(e){return(0,h.default)(this,e)}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,r=e.component,n=e.withRef,i=o(e,["component","withRef"]),a=(0,y.default)(j,T,t,i);return n&&(a.ref="renderedComponent"),(0,l.createElement)(r,a)}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),r}(l.Component);I.propTypes={component:l.PropTypes.oneOfType([l.PropTypes.func,l.PropTypes.string]).isRequired,defaultValue:l.PropTypes.any,props:l.PropTypes.object},I.contextTypes={_reduxForm:l.PropTypes.object};var F=(0,c.default)({arrayInsert:n,arrayMove:s,arrayPop:d,arrayPush:v,arrayRemove:m,arrayRemoveAll:_,arrayShift:g,arraySplice:O,arraySwap:A,arrayUnshift:P},function(e){return e.bind(null,t)}),M=(0,p.connect)(function(e){var r=R(e),n=j(r,"initial."+t)||w,o=j(r,"values."+t),i=x(j(r,"syncErrors")),a=E(o,n);return{asyncError:j(r,"asyncErrors."+t+"._error"),dirty:!a,pristine:a,submitError:j(r,"submitErrors."+t+"._error"),syncError:i,value:o}},F,void 0,{withRef:!0});return M(I)};r.default=_},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function i(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),c=t(1),f=t(9),l=n(f),p=t(28),d=n(p),y=t(12),v=n(y),h=function(e){var r=e.deepEqual,t=e.getIn,n=e.setIn,f=function(e){function f(e,n){o(this,f);var a=i(this,Object.getPrototypeOf(f).call(this,e,n));if(!n._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return a.ConnectedField=(0,d.default)(n._reduxForm,{deepEqual:r,getIn:t},e.name),a.normalize=a.normalize.bind(a),a}return a(f,e),s(f,[{key:"shouldComponentUpdate",value:function(e,r){return(0,v.default)(this,e,r)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"Field")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedField=(0,d.default)(this.context._reduxForm,{deepEqual:r,getIn:t},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,l.default)(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 p(e){var p=this.props.normalize;if(!p)return e;var r=this.context._reduxForm.getValues(),t=this.value,o=n(r,this.props.name,e);return p(e,t,o,r)}},{key:"render",value:function(){return(0,c.createElement)(this.ConnectedField,u({},this.props,{normalize:this.normalize,ref:"connected"}))}},{key:"name",get:function(){return 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.getWrappedInstance().getValue()}}]),f}(c.Component);return f.propTypes={name:c.PropTypes.string.isRequired,component:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string]).isRequired,defaultValue:c.PropTypes.any,normalize:c.PropTypes.func,props:c.PropTypes.object},f.contextTypes={_reduxForm:c.PropTypes.object},f};r.default=h},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function i(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),c=t(1),f=t(9),l=n(f),p=t(29),d=n(p),y=t(12),v=n(y),h=function(e){var r=e.deepEqual,t=e.getIn,n=e.size,f=function(e){function f(e,a){o(this,f);var u=i(this,Object.getPrototypeOf(f).call(this,e,a));if(!a._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return u.ConnectedFieldArray=(0,d.default)(a._reduxForm,{deepEqual:r,getIn:t,size:n},e.name),u}return a(f,e),s(f,[{key:"shouldComponentUpdate",value:function(e,r){return(0,v.default)(this,e,r)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"FieldArray")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedFieldArray=(0,d.default)(this.context._reduxForm,{deepEqual:r,getIn:t,size:n},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,l.default)(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(0,c.createElement)(this.ConnectedFieldArray,u({},this.props,{syncError:this.syncError,ref:"connected"}))}},{key:"name",get:function(){return 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}}]),f}(c.Component);return f.propTypes={name:c.PropTypes.string.isRequired,component:c.PropTypes.func.isRequired,props:c.PropTypes.object},f.contextTypes={_reduxForm:c.PropTypes.object},f};r.default=h},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(10),i=n(o),a=function(e,r,t,n){r(n);var o=e();if(!(0,i.default)(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var a=function(e){return function(r){if(r&&Object.keys(r).length)return t(r),Promise.reject(r);if(e)throw t(),new Error("Asynchronous validation promise was rejected without errors.");return t(),Promise.resolve()}};return o.then(a(!1),a(!0))};r.default=a},function(e,r,t){"use strict";function n(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},a=t(48),u=o(a),s=t(49),c=o(s),f=t(30),l=o(f),p=t(31),d=o(p),y=t(43),v=o(y),h=t(55),m=o(h),b=t(13),_=o(b),g=t(47),O=o(g),A=t(14),P=n(A),R=t(8),S=n(R),E=function(e){return i({actionTypes:S},P,{Field:(0,l.default)(e),FieldArray:(0,d.default)(e),formValueSelector:(0,v.default)(e),propTypes:O.default,reduxForm:(0,c.default)(e),reducer:(0,u.default)(e),SubmissionError:_.default,values:(0,m.default)(e)})};r.default=E},function(e,r){"use strict";function t(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}Object.defineProperty(r,"__esModule",{value:!0});var n=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o=function(e,r,o,i){var a=i.arrayInsert,u=i.arrayMove,s=i.arrayPop,c=i.arrayPush,f=i.arrayRemove,l=i.arrayRemoveAll,p=i.arrayShift,d=(i.arraySplice,i.arraySwap),y=i.arrayUnshift,v=i.asyncError,h=i.dirty,m=i.pristine,b=i.submitError,_=(i.submitFailed,i.syncError),g=i.value,O=i.props,A=t(i,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","dirty","pristine","submitError","submitFailed","syncError","value","props"]),P=_||v||b,R=r(g);return n({fields:{dirty:h,error:P,forEach:function(e){return(g||[]).forEach(function(r,t){return e(o+"["+t+"]",t)})},insert:a,invalid:!!P,length:R,map:function(e){return(g||[]).map(function(r,t){return e(o+"["+t+"]",t)})},move:u,pop:function(){return s(),e(g,R-1)},pristine:m,push:c,remove:f,removeAll:l,shift:function(){return p(),e(g,0)},swap:d,unshift:y,valid:!P}},O,A)};r.default=o},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}Object.defineProperty(r,"__esModule",{value:!0});var i=t(96),a=n(i),u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s=t(38),c=n(s),f=t(39),l=n(f),p=t(15),d=n(p),y=t(40),v=n(y),h=t(41),m=n(h),b=function(e,r){var t=e.type,n=e.value,i=o(e,["type","value"]);return"checkbox"===t?u({},i,{checked:!!n,type:t}):"radio"===t?u({},i,{checked:n===r,type:t,value:r}):"select-multiple"===t?u({},i,{type:t,value:n||[]}):"file"===t?u({},i,{type:t,value:void 0}):e},_=function(e,r,t){var n=t.asyncError,i=t.asyncValidating,s=t.blur,f=t.change,p=t.defaultValue,y=void 0===p?"":p,h=t.dirty,_=t.focus,g=t.normalize,O=t.pristine,A=t.props,P=t.state,R=t.submitError,S=t.value,E=t._value,j=t.syncError,T=o(t,["asyncError","asyncValidating","blur","change","defaultValue","dirty","focus","normalize","pristine","props","state","submitError","value","_value","syncError"]),w=arguments.length<=3||void 0===arguments[3]?a.default:arguments[3],x=j||n||R,I=(0,l.default)(f,g),F=b(u({name:r,onBlur:(0,c.default)(s,g,w.bind(null,r)),onChange:I,onDragStart:(0,d.default)(r,S),onDrop:(0,v.default)(r,f),onFocus:(0,m.default)(r,_),value:null==S?y:S},A,T),E);return{active:P&&!!e(P,"active"),asyncValidating:i,dirty:h,error:x,invalid:!!x,input:F,pristine:O,touched:!(!P||!e(P,"touched")),valid:!x,visited:P&&!!e(P,"visited")}};r.default=_},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e){var r=e.initialized,t=e.trigger,n=e.pristine,o=e.syncValidationPasses;if(!o)return!1;switch(t){case"blur":return!0;case"submit":return!n||!r;default:return!1}};r.default=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(6),i=n(o),a=function(e){var r=e.deepEqual,t=e.empty,n=e.getIn,o=e.deleteIn,a=e.setIn,u=function s(e,u){if("]"===u[u.length-1]){var c=(0,i.default)(u);c.pop();var f=n(e,c.join("."));return f?a(e,u,void 0):e}var l=o(e,u),p=u.lastIndexOf(".");if(p>0){var d=u.substring(0,p);if("]"!==d[d.length-1]){var y=n(l,d);if(r(y,t))return s(l,d)}}return l};return u};r.default=a},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(16),i=n(o),a=t(19),u=n(a),s=function(e,r,t){return function(n){var o=r((0,i.default)(n,u.default));e(o),t&&t(o)}};r.default=s},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(16),i=n(o),a=t(19),u=n(a),s=function(e,r){return function(t){return e(r((0,i.default)(t,u.default)))}};r.default=s},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t(15),o=function(e,r){return function(t){r(e,t.dataTransfer.getData(n.dataKey))}};r.default=o},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e,r){return function(){return r(e)}};r.default=t},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(18),i=n(o),a=function(e){return function(r){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return(0,i.default)(r)?e.apply(void 0,n):e.apply(void 0,[r].concat(n))}};r.default=a},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(9),i=n(o),a=t(2),u=n(a),s=function(e){var r=e.getIn;return function(e){var t=arguments.length<=1||void 0===arguments[1]?function(e){return r(e,"form")}:arguments[1];return(0,i.default)(e,"Form value must be specified"),function(n){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return(0,i.default)(a.length,"No fields specified"),1===a.length?r(t(n),e+".values."+a[0]):a.reduce(function(o,i){var a=r(t(n),e+".values."+i);return void 0===a?o:u.default.setIn(o,i,a)},{})}}};r.default=s},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var i=t(10),a=n(i),u=t(13),s=n(u),c=function(e,r,t,n,i){var u=r.dispatch,c=r.onSubmitFail,f=r.onSubmitSuccess,l=r.startSubmit,p=r.stopSubmit,d=r.setSubmitFailed,y=r.syncErrors,v=r.touch,h=r.values;if(v.apply(void 0,o(i)),t){var m=function(){var r=void 0;try{r=e(h,u)}catch(t){var n=t instanceof s.default?t.errors:void 0;return c&&c(n,u),n}return(0,a.default)(r)?(l(),r.then(function(e){return p(),f&&f(e,u),e},function(e){var r=e instanceof s.default?e.errors:void 0;return p(r),c&&c(r,u),r})):(f&&f(r,u),r)},b=n&&n();return b?b.then(m,function(e){return d.apply(void 0,o(i)),c&&c(e,u),Promise.reject(e)}):m()}return d.apply(void 0,o(i)),c&&c(y,u),y};r.default=c},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(20),i=n(o),a=function(e,r){switch(r){case"Field":return e;case"FieldArray":return e+"._error"}},u=function(e){var r=e.getIn,t=function(e,t,n,o){var u=r(e,"name"),s=r(e,"type");if(!t&&!n&&!o)return!1;var c=a(u,s),f=(0,i.default)(t,c);if(f&&"string"==typeof f)return!0;var l=r(n,c);if(l&&"string"==typeof l)return!0;var p=r(o,c);return!(!p||"string"!=typeof p)};return t};r.default=u},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e){var r=e.getIn,t=function(e){if(!e)return!1;var t=r(e,"_error");return!!t||"string"==typeof e&&!!e};return t};r.default=t},function(e,r,t){ | ||
"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.propTypes=void 0;var n=t(1),o=n.PropTypes.any,i=n.PropTypes.bool,a=n.PropTypes.func;r.propTypes={asyncValidating:i.isRequired,autofilled:i,dirty:i.isRequired,error:o,invalid:i.isRequired,pristine:i.isRequired,submitting:i.isRequired,submitFailed:i.isRequired,valid:i.isRequired,asyncValidate:a.isRequired,destroy:a.isRequired,handleSubmit:a.isRequired,initialize:a.isRequired,reset:a.isRequired,touch:a.isRequired,untouch:a.isRequired}},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}Object.defineProperty(r,"__esModule",{value:!0});var a=t(8),u=t(37),s=n(u),c=function(e){function r(e){return e.plugin=function(e){var t=this;return r(function(){var r=arguments.length<=0||void 0===arguments[0]?u:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return Object.keys(e).reduce(function(r,t){var o=c(r,t),i=e[t](o,n);return i===o?r:f(r,t,i)},t(r,n))})},e}var t,n=e.splice,u=e.empty,c=e.getIn,f=e.setIn,l=e.deleteIn,p=e.fromJS,d=e.size,y=e.some,v=(0,s.default)(e),h=function(e,r,t,o,i,a,u){var s=c(e,r+"."+t);return s||u?f(e,r+"."+t,n(s,o,i,a)):e},m=["values","fields","submitErrors","asyncErrors"],b=function(e,r,t,n,o){var i=e;return i=h(i,"values",r,t,n,o,!0),i=h(i,"fields",r,t,n,u),i=h(i,"submitErrors",r,t,n,u),i=h(i,"asyncErrors",r,t,n,u)},_=(t={},o(t,a.ARRAY_INSERT,function(e,r){var t=r.meta,n=t.field,o=t.index,i=r.payload;return b(e,n,o,0,i)}),o(t,a.ARRAY_MOVE,function(e,r){var t=r.meta,o=t.field,i=t.from,a=t.to,u=c(e,"values."+o),s=u?d(u):0,l=e;return s&&m.forEach(function(e){var r=e+"."+o;if(c(l,r)){var t=c(l,r+"["+i+"]");l=f(l,r,n(c(l,r),i,1)),l=f(l,r,n(c(l,r),a,0,t))}}),l}),o(t,a.ARRAY_POP,function(e,r){var t=r.meta.field,n=c(e,"values."+t),o=n?d(n):0;return o?b(e,t,o-1,1):e}),o(t,a.ARRAY_PUSH,function(e,r){var t=r.meta.field,n=r.payload,o=c(e,"values."+t),i=o?d(o):0;return b(e,t,i,0,n)}),o(t,a.ARRAY_REMOVE,function(e,r){var t=r.meta,n=t.field,o=t.index;return b(e,n,o,1)}),o(t,a.ARRAY_REMOVE_ALL,function(e,r){var t=r.meta.field,n=c(e,"values."+t),o=n?d(n):0;return o?b(e,t,0,o):e}),o(t,a.ARRAY_SHIFT,function(e,r){var t=r.meta.field;return b(e,t,0,1)}),o(t,a.ARRAY_SPLICE,function(e,r){var t=r.meta,n=t.field,o=t.index,i=t.removeNum,a=r.payload;return b(e,n,o,i,a)}),o(t,a.ARRAY_SWAP,function(e,r){var t=r.meta,n=t.field,o=t.indexA,i=t.indexB,a=e;return m.forEach(function(e){var r=c(a,e+"."+n+"["+o+"]"),t=c(a,e+"."+n+"["+i+"]");void 0===r&&void 0===t||(a=f(a,e+"."+n+"["+o+"]",t),a=f(a,e+"."+n+"["+i+"]",r))}),a}),o(t,a.ARRAY_UNSHIFT,function(e,r){var t=r.meta.field,n=r.payload;return b(e,t,0,0,n)}),o(t,a.BLUR,function(e,r){var t=r.meta,n=t.field,o=t.touch,i=r.payload,a=e,u=c(a,"initial."+n);return void 0===u&&""===i?a=v(a,"values."+n):void 0!==i&&(a=f(a,"values."+n,i)),n===c(a,"active")&&(a=l(a,"active")),a=l(a,"fields."+n+".active"),o&&(a=f(a,"fields."+n+".touched",!0),a=f(a,"anyTouched",!0)),a}),o(t,a.CHANGE,function(e,r){var t=r.meta,n=t.field,o=t.touch,i=r.payload,a=e,u=c(a,"initial."+n);return void 0===u&&""===i?a=v(a,"values."+n):void 0!==i&&(a=f(a,"values."+n,i)),a=v(a,"asyncErrors."+n),a=v(a,"submitErrors."+n),o&&(a=f(a,"fields."+n+".touched",!0),a=f(a,"anyTouched",!0)),a}),o(t,a.FOCUS,function(e,r){var t=r.meta.field,n=e,o=c(e,"active");return n=l(n,"fields."+o+".active"),n=f(n,"fields."+t+".visited",!0),n=f(n,"fields."+t+".active",!0),n=f(n,"active",t)}),o(t,a.INITIALIZE,function(e,r){var t=r.payload,n=p(t),o=u,i=c(e,"registeredFields");return i&&(o=f(o,"registeredFields",i)),o=f(o,"values",n),o=f(o,"initial",n)}),o(t,a.REGISTER_FIELD,function(e,r){var t=r.payload,o=t.name,i=t.type,a=e,u=c(a,"registeredFields");if(y(u,function(e){return c(e,"name")===o}))return e;var s=p({name:o,type:i});return a=f(e,"registeredFields",n(u,d(u),0,s))}),o(t,a.RESET,function(e){var r=u,t=c(e,"registeredFields");t&&(r=f(r,"registeredFields",t));var n=c(e,"initial");return n&&(r=f(r,"values",n),r=f(r,"initial",n)),r}),o(t,a.START_ASYNC_VALIDATION,function(e,r){var t=r.meta.field;return f(e,"asyncValidating",t||!0)}),o(t,a.START_SUBMIT,function(e){return f(e,"submitting",!0)}),o(t,a.STOP_ASYNC_VALIDATION,function(e,r){var t=r.payload,n=e;if(n=l(n,"asyncValidating"),t&&Object.keys(t).length){var o=t._error,a=i(t,["_error"]);o&&(n=f(n,"error",o)),n=Object.keys(a).length?f(n,"asyncErrors",p(a)):l(n,"asyncErrors")}else n=l(n,"error"),n=l(n,"asyncErrors");return n}),o(t,a.STOP_SUBMIT,function(e,r){var t=r.payload,n=e;if(n=l(n,"submitting"),n=l(n,"submitFailed"),t&&Object.keys(t).length){var o=t._error,a=i(t,["_error"]);o&&(n=f(n,"error",o)),n=Object.keys(a).length?f(n,"submitErrors",p(a)):l(n,"submitErrors"),n=f(n,"submitFailed",!0)}else n=l(n,"error"),n=l(n,"submitErrors");return n}),o(t,a.SET_SUBMIT_FAILED,function(e,r){var t=r.meta.fields,n=e;return n=f(n,"submitFailed",!0),n=l(n,"submitting"),t.forEach(function(e){return n=f(n,"fields."+e+".touched",!0)}),t.length&&(n=f(n,"anyTouched",!0)),n}),o(t,a.TOUCH,function(e,r){var t=r.meta.fields,n=e;return t.forEach(function(e){return n=f(n,"fields."+e+".touched",!0)}),n=f(n,"anyTouched",!0)}),o(t,a.UNREGISTER_FIELD,function(e,r){var t=r.payload.name,o=c(e,"registeredFields");if(!o)return e;var i=o.findIndex(function(e){return c(e,"name")===t});return d(o)<=1&&i>=0?v(e,"registeredFields"):f(e,"registeredFields",n(o,i,1))}),o(t,a.UNTOUCH,function(e,r){var t=r.meta.fields,n=e;return t.forEach(function(e){return n=l(n,"fields."+e+".touched")}),n}),o(t,a.UPDATE_SYNC_ERRORS,function(e,r){var t=r.payload;return Object.keys(t).length?f(e,"syncErrors",t):l(e,"syncErrors")}),t),g=function(){var e=arguments.length<=0||void 0===arguments[0]?u:arguments[0],r=arguments[1],t=_[r.type];return t?t(e,r):e},O=function(e){return function(){var r=arguments.length<=0||void 0===arguments[0]?u:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t&&t.meta&&t.meta.form;if(!n)return r;if(t.type===a.DESTROY)return v(r,t.meta.form);var o=c(r,n),i=e(o,t);return i===o?r:f(r,n,i)}};return r(O(g))};r.default=c},function(e,r,t){"use strict";function n(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function u(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function s(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}function c(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}function f(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}Object.defineProperty(r,"__esModule",{value:!0});var l=t(11),p=o(l),d=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),y=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},h=t(1),m=t(58),b=o(m),_=t(7),g=t(100),O=t(10),A=o(O),P=t(54),R=o(P),S=t(14),E=n(S),j=t(44),T=o(j),w=t(18),x=o(w),I=t(42),F=o(I),M=t(32),V=o(M),k=t(46),C=o(k),U=t(45),N=o(U),Y=t(36),L=o(Y),q=t(2),D=o(q),z=function(e){return Boolean(e&&e.prototype&&"object"===v(e.prototype.isReactComponent))},W=E.arrayInsert,B=E.arrayPop,H=E.arrayPush,G=E.arrayRemove,Z=E.arrayShift,J=E.arraySplice,K=E.arraySwap,$=E.arrayUnshift,Q=E.blur,X=E.change,ee=E.focus,re=f(E,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),te={arrayInsert:W,arrayPop:B,arrayPush:H,arrayRemove:G,arrayShift:Z,arraySplice:J,arraySwap:K,arrayUnshift:$},ne=[].concat(c(Object.keys(E)),["array","asyncErrors","initialized","initialValues","syncErrors","values","registeredFields"]),oe=function(e){if(!e||"function"!=typeof e)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return e},ie=function(e){var r=e.deepEqual,t=e.empty,n=e.getIn,o=e.setIn,c=e.fromJS,l=e.some,m=(0,C.default)(e),O=(0,N.default)(e),P=(0,C.default)(D.default);return function(e){var S=y({touchOnBlur:!0,touchOnChange:!1,destroyOnUnmount:!0,shouldAsyncValidate:L.default,enableReinitialize:!1,getFormState:function(e){return n(e,"form")}},e);return function(e){var E=function(t){function c(e){a(this,c);var r=u(this,Object.getPrototypeOf(c).call(this,e));return r.submit=r.submit.bind(r),r.reset=r.reset.bind(r),r.asyncValidate=r.asyncValidate.bind(r),r.getValues=r.getValues.bind(r),r.register=r.register.bind(r),r.unregister=r.unregister.bind(r),r.submitCompleted=r.submitCompleted.bind(r),r}return s(c,t),d(c,[{key:"getChildContext",value:function(){var e=this;return{_reduxForm:y({},this.props,{getFormState:function(r){return n(e.props.getFormState(r),e.props.form)},asyncValidate:this.asyncValidate,getValues:this.getValues,register:this.register,unregister:this.unregister})}}},{key:"initIfNeeded",value:function(e){if(e){var t=this.props.enableReinitialize;!t&&e.initialized||r(this.props.initialValues,e.initialValues)||this.props.initialize(e.initialValues)}else this.props.initialValues&&this.props.initialize(this.props.initialValues)}},{key:"updateSyncErrorsIfNeeded",value:function(e){var r=this.props,t=r.syncErrors,n=r.updateSyncErrors,o=!t||!Object.keys(t).length,i=!e||!Object.keys(e).length;o&&i||D.default.deepEqual(t,e)||n(e)}},{key:"validateIfNeeded",value:function(e){var t=this.props,n=t.validate,o=t.values;if(n)if(e){if(!r(o,e.values)){var i=n(e.values,e);this.updateSyncErrorsIfNeeded(i)}}else{var a=n(o,this.props);this.updateSyncErrorsIfNeeded(a)}}},{key:"componentWillMount",value:function(){this.initIfNeeded(),this.validateIfNeeded()}},{key:"componentWillReceiveProps",value:function(e){this.initIfNeeded(e),this.validateIfNeeded(e)}},{key:"shouldComponentUpdate",value:function(e){var t=this;return Object.keys(e).some(function(n){return!~ne.indexOf(n)&&!r(t.props[n],e[n])})}},{key:"componentWillUnmount",value:function(){var e=this.props,r=e.destroyOnUnmount,t=e.destroy;r&&(this.destroyed=!0,t())}},{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(e,r){this.props.registerField(e,r)}},{key:"unregister",value:function(e){this.destroyed||this.props.unregisterField(e)}},{key:"getFieldList",value:function(){return this.props.registeredFields.map(function(e){return n(e,"name")})}},{key:"asyncValidate",value:function l(e,r){var t=this,i=this.props,a=i.asyncBlurFields,u=i.asyncErrors,l=i.asyncValidate,s=i.dispatch,c=i.initialized,f=i.pristine,p=i.shouldAsyncValidate,d=i.startAsyncValidation,y=i.stopAsyncValidation,h=i.syncErrors,m=i.values,b=!e;if(l){var _=function(){var i=b?m:o(m,e,r),v=b||!n(h,e),_=!b&&(!a||~a.indexOf(e.replace(/\[[0-9]+\]/g,"[]")));if((_||b)&&p({asyncErrors:u,initialized:c,trigger:b?"submit":"blur",blurredField:e,pristine:f,syncValidationPasses:v}))return{v:(0,V.default)(function(){return l(i,s,t.props)},d,y,e)}}();if("object"===("undefined"==typeof _?"undefined":v(_)))return _.v}}},{key:"submitCompleted",value:function(e){return delete this.submitPromise,e}},{key:"listenToSubmit",value:function(e){var r=this;return(0,A.default)(e)?(this.submitPromise=e,e.then(this.submitCompleted,function(e){return r.submitCompleted(),Promise.reject(e)})):e}},{key:"submit",value:function(e){var r=this,t=this.props.onSubmit;return e&&!(0,x.default)(e)?(0,F.default)(function(){return!r.submitPromise&&r.listenToSubmit((0,T.default)(oe(e),r.props,r.isValid(),r.asyncValidate,r.getFieldList()))}):this.submitPromise?void 0:this.listenToSubmit((0,T.default)(oe(t),this.props,this.isValid(),this.asyncValidate,this.getFieldList()))}},{key:"reset",value:function(){this.props.reset()}},{key:"render",value:function(){var r=this.props,t=r.anyTouched,n=(r.arrayInsert,r.arrayPop,r.arrayPush,r.arrayRemove,r.arrayShift,r.arraySplice,r.arraySwap,r.arrayUnshift,r.asyncErrors,r.asyncValidate),o=r.asyncValidating,a=r.destroy,u=(r.destroyOnUnmount,r.dirty),s=r.dispatch,c=(r.enableReinitialize,r.error),l=r.form,p=(r.getFormState,r.initialize),d=r.invalid,v=r.pristine,m=r.propNamespace,b=(r.registerField,r.reset),_=r.submitting,g=r.submitFailed,O=r.touch,A=(r.touchOnBlur,r.touchOnChange,r.syncErrors,r.unregisterField,r.untouch),P=r.valid,R=(r.values,f(r,["anyTouched","arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","asyncValidate","asyncValidating","destroy","destroyOnUnmount","dirty","dispatch","enableReinitialize","error","form","getFormState","initialize","invalid","pristine","propNamespace","registerField","reset","submitting","submitFailed","touch","touchOnBlur","touchOnChange","syncErrors","unregisterField","untouch","valid","values"])),S={anyTouched:t,asyncValidate:n,asyncValidating:o,destroy:a,dirty:u,dispatch:s,error:c,form:l,handleSubmit:this.submit,initialize:p,invalid:d,pristine:v,reset:b,submitting:_,submitFailed:g,touch:O,untouch:A,valid:P},E=y({},m?i({},m,S):S,R);return z(e)&&(E.ref="wrapped"),(0,h.createElement)(e,E)}}]),c}(h.Component);E.displayName="Form("+(0,R.default)(e)+")",E.WrappedComponent=e,E.childContextTypes={_reduxForm:h.PropTypes.object.isRequired},E.propTypes={destroyOnUnmount:h.PropTypes.bool,form:h.PropTypes.string.isRequired,initialValues:h.PropTypes.object,getFormState:h.PropTypes.func,onSubmitFail:h.PropTypes.func,onSubmitSuccess:h.PropTypes.func,propNameSpace:h.PropTypes.string,validate:h.PropTypes.func,touchOnBlur:h.PropTypes.bool,touchOnChange:h.PropTypes.bool,registeredFields:h.PropTypes.any};var j=(0,_.connect)(function(e,o){var i=o.form,a=o.getFormState,u=o.initialValues,s=n(a(e)||t,i)||t,c=n(s,"initial"),f=u||c||t,p=n(s,"values")||f,d=r(f,p),y=n(s,"asyncErrors"),v=n(s,"submitErrors"),h=n(s,"syncErrors"),b=P(h),_=m(y),g=m(v),A=n(s,"registeredFields")||[],R=A&&l(A,function(e){return O(e,h,y,v)}),S=!(b||_||g||R),E=!!n(s,"anyTouched"),j=!!n(s,"submitting"),T=!!n(s,"submitFailed"),w=n(s,"error");return{anyTouched:E,asyncErrors:y,asyncValidating:n(s,"asyncValidating"),dirty:!d,error:w,initialized:!!c,invalid:!S,pristine:d,registeredFields:A,submitting:j,submitFailed:T,syncErrors:h,values:p,valid:S}},function(e,r){var t=function(e){return e.bind(null,r.form)},n=(0,p.default)(re,t),o=(0,p.default)(te,t),i=function(e,t){return Q(r.form,e,t,!!r.touchOnBlur)},a=function(e,t){return X(r.form,e,t,!!r.touchOnChange)},u=t(ee),s=(0,g.bindActionCreators)(n,e),c={insert:(0,g.bindActionCreators)(o.arrayInsert,e),pop:(0,g.bindActionCreators)(o.arrayPop,e),push:(0,g.bindActionCreators)(o.arrayPush,e),remove:(0,g.bindActionCreators)(o.arrayRemove,e),shift:(0,g.bindActionCreators)(o.arrayShift,e),splice:(0,g.bindActionCreators)(o.arraySplice,e),swap:(0,g.bindActionCreators)(o.arraySwap,e),unshift:(0,g.bindActionCreators)(o.arrayUnshift,e)},f=y({},s,o,{blur:i,change:a,array:c,focus:u,dispatch:e});return function(){return f}},void 0,{withRef:!0}),w=(0,b.default)(j(E),e);return w.defaultProps=S,function(e){function r(){return a(this,r),u(this,Object.getPrototypeOf(r).apply(this,arguments))}return s(r,e),d(r,[{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 e=this.props,r=e.initialValues,t=f(e,["initialValues"]);return(0,h.createElement)(w,y({},t,{ref:"wrapped",initialValues:c(r)}))}},{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}}]),r}(h.Component)}}};r.default=ie},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var o=t(90),i=n(o),a=function(e,r){return e==r||(null==e&&""===r||(""===e&&null==r||(!e||!r||e._error===r._error)&&void 0))},u=function(e,r){return(0,i.default)(e,r,a)};r.default=u},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var a=t(6),u=n(a),s=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},c=function l(e,r){for(var t=arguments.length,n=Array(t>2?t-2:0),a=2;a<t;a++)n[a-2]=arguments[a];if(void 0===e||void 0===r)return e;if(n.length){if(Array.isArray(e)){if(r<e.length){var u=l.apply(void 0,[e&&e[r]].concat(n));if(u!==e[r]){var c=[].concat(i(e));return c[r]=u,c}}return e}if(r in e){var f=l.apply(void 0,[e&&e[r]].concat(n));return e[r]===f?e:s({},e,o({},r,f))}return e}if(Array.isArray(e)){if(isNaN(r))throw new Error("Cannot delete non-numerical index from an array");if(r<e.length){var p=[].concat(i(e));return p.splice(r,1),p}return e}if(r in e){var d=s({},e);return delete d[r],d}return e},f=function(e,r){return c.apply(void 0,[e].concat(i((0,u.default)(r))))};r.default=f},function(e,r,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var a=t(6),u=n(a),s=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},c=function l(e,r,t){for(var n=arguments.length,a=Array(n>3?n-3:0),u=3;u<n;u++)a[u-3]=arguments[u];if(void 0===t)return r;var c=l.apply(void 0,[e&&e[t],r].concat(a));if(!e){var f=isNaN(t)?{}:[];return f[t]=c,f}if(Array.isArray(e)){var p=[].concat(i(e));return p[t]=c,p}return s({},e,o({},t,c))},f=function(e,r,t){return c.apply(void 0,[e,t].concat(i((0,u.default)(r))))};r.default=f},function(e,r){"use strict";function t(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],r=arguments[1],n=arguments[2],o=arguments[3],i=[].concat(t(e));return n?i.splice(r,n):r<i.length?i.splice(r,0,o):i[r]=o,i};r.default=n},function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=function(e){return e.displayName||e.name||"Component"};r.default=t},function(e,r,t){"use strict";function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Object.defineProperty(r,"__esModule",{value:!0});var o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i=t(7),a=function(e){var r=e.getIn;return function(e){var t=o({prop:"values",getFormState:function(e){return r(e,"form")}},e),a=t.form,u=t.prop,s=t.getFormState;return(0,i.connect)(function(e){return n({},u,r(s(e),a+".values"))},function(){return{}})}};r.default=a},function(e,r){"use strict";function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function n(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function o(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}function i(e){function r(){e.apply(this,arguments)}return r.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e,r}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e){function r(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];t(this,r);var o=n(this,Object.getPrototypeOf(r).call(this,e));return Object.defineProperty(o,"message",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(o,"name",{configurable:!0,enumerable:!1,value:o.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(o,o.constructor),n(o)):(Object.defineProperty(o,"stack",{configurable:!0,enumerable:!1,value:new Error(e).stack,writable:!0}),o)}return o(r,e),r}(i(Error));r.default=a,e.exports=r.default},function(e,r){"use strict";function t(e,r){return e===r?0!==e||1/e===1/r:e!==e&&r!==r}function n(e,r){if(t(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var n=Object.keys(e),i=Object.keys(r);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(r,n[a])||!t(e[n[a]],r[n[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=n},function(e,r){"use strict";var t={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;e.exports=function(e,r,i){if("string"!=typeof r){var a=Object.getOwnPropertyNames(r);o&&(a=a.concat(Object.getOwnPropertySymbols(r)));for(var u=0;u<a.length;++u)if(!(t[a[u]]||n[a[u]]||i&&i[a[u]]))try{e[a[u]]=r[a[u]]}catch(s){}}return e}},function(e,r,t){var n=t(3),o=t(4),i=n(o,"DataView");e.exports=i},function(e,r,t){var n=t(3),o=t(4),i=n(o,"Map");e.exports=i},function(e,r,t){function n(e){var r=-1,t=e?e.length:0;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}var o=t(21),i=t(22),a=t(23),u=t(24),s=t(25);n.prototype.clear=o,n.prototype.delete=i,n.prototype.get=a,n.prototype.has=u,n.prototype.set=s,e.exports=n},function(e,r,t){var n=t(3),o=t(4),i=n(o,"Promise");e.exports=i},function(e,r,t){var n=t(3),o=t(4),i=n(o,"Set");e.exports=i},function(e,r,t){function n(e){var r=-1,t=e?e.length:0;for(this.__data__=new o;++r<t;)this.add(e[r])}var o=t(61),i=t(84),a=t(85);n.prototype.add=n.prototype.push=i,n.prototype.has=a,e.exports=n},61,function(e,r,t){var n=t(3),o=t(4),i=n(o,"WeakMap");e.exports=i},function(e,r){function t(e,r){for(var t=-1,n=e?e.length:0,o=Array(n);++t<n;)o[t]=r(e[t],t,e);return o}e.exports=t},function(e,r){function t(e,r){for(var t=-1,n=e?e.length:0;++t<n;)if(r(e[t],t,e))return!0;return!1}e.exports=t},function(e,r,t){var n=t(77),o=n();e.exports=o},function(e,r,t){function n(e,r){return e&&o(e,r,i)}var o=t(69),i=t(27);e.exports=n},function(e,r,t){function n(e,r){return null!=e&&(a.call(e,r)||"object"==typeof e&&r in e&&null===o(e))}var o=t(81),i=Object.prototype,a=i.hasOwnProperty;e.exports=n},function(e,r,t){function n(e,r,t,u,s){return e===r||(null==e||null==r||!i(e)&&!a(r)?e!==e&&r!==r:o(e,r,n,t,u,s))}var o=t(73),i=t(91),a=t(92);e.exports=n},function(e,r,t){function n(e,r,t,n,h,b){var _=c(e),g=c(r),O=y,A=y;_||(O=s(e),O=O==d?v:O),g||(A=s(r),A=A==d?v:A);var P=O==v&&!f(e),R=A==v&&!f(r),S=O==A;if(S&&!P)return b||(b=new o),_||l(e)?i(e,r,t,n,h,b):a(e,r,O,t,n,h,b);if(!(h&p)){var E=P&&m.call(e,"__wrapped__"),j=R&&m.call(r,"__wrapped__");if(E||j){var T=E?e.value():e,w=j?r.value():r;return b||(b=new o),t(T,w,n,h,b)}}return!!S&&(b||(b=new o),u(e,r,t,n,h,b))}var o=t(65),i=t(78),a=t(79),u=t(80),s=t(82),c=t(26),f=t(83),l=t(94),p=2,d="[object Arguments]",y="[object Array]",v="[object Object]",h=Object.prototype,m=h.hasOwnProperty;e.exports=n},function(e,r){function t(e){return e}e.exports=t},function(e,r){function t(e){return e&&e.Object===Object?e:null}e.exports=t},function(e,r){function t(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}e.exports=t},function(e,r){function t(e){return function(r,t,n){for(var o=-1,i=Object(r),a=n(r),u=a.length;u--;){var s=a[e?u:++o];if(t(i[s],s,i)===!1)break}return r}}e.exports=t},function(e,r,t){function n(e,r,t,n,s,c){var f=s&u,l=e.length,p=r.length;if(l!=p&&!(f&&p>l))return!1;var d=c.get(e);if(d)return d==r;var y=-1,v=!0,h=s&a?new o:void 0;for(c.set(e,r);++y<l;){var m=e[y],b=r[y];if(n)var _=f?n(b,m,y,r,e,c):n(m,b,y,e,r,c);if(void 0!==_){if(_)continue;v=!1;break}if(h){if(!i(r,function(e,r){if(!h.has(r)&&(m===e||t(m,e,n,s,c)))return h.add(r)})){v=!1;break}}else if(m!==b&&!t(m,b,n,s,c)){v=!1;break}}return c.delete(e),v}var o=t(64),i=t(68),a=1,u=2;e.exports=n},function(e,r){function t(e,r){return e===r||e!==e&&r!==r}e.exports=t},function(e,r,t){function n(e,r,t,n,u,s){var c=u&a,f=i(e),l=f.length,p=i(r),d=p.length;if(l!=d&&!c)return!1;for(var y=l;y--;){var v=f[y];if(!(c?v in r:o(r,v)))return!1}var h=s.get(e);if(h)return h==r;var m=!0;s.set(e,r);for(var b=c;++y<l;){v=f[y];var _=e[v],g=r[v];if(n)var O=c?n(g,_,v,r,e,s):n(_,g,v,e,r,s);if(!(void 0===O?_===g||t(_,g,n,u,s):O)){m=!1;break}b||(b="constructor"==v)}if(m&&!b){var A=e.constructor,P=r.constructor;A!=P&&"constructor"in e&&"constructor"in r&&!("function"==typeof A&&A instanceof A&&"function"==typeof P&&P instanceof P)&&(m=!1)}return s.delete(e),m}var o=t(71),i=t(27),a=2;e.exports=n},function(e,r){function t(e){return n(Object(e))}var n=Object.getPrototypeOf;e.exports=t},function(e,r,t){function n(e){return m.call(e)}var o=t(59),i=t(60),a=t(62),u=t(63),s=t(66),c=t(88),f="[object Map]",l="[object Object]",p="[object Promise]",d="[object Set]",y="[object WeakMap]",v="[object DataView]",h=Object.prototype,m=h.toString,b=c(o),_=c(i),g=c(a),O=c(u),A=c(s);(o&&n(new o(new ArrayBuffer(1)))!=v||i&&n(new i)!=f||a&&n(a.resolve())!=p||u&&n(new u)!=d||s&&n(new s)!=y)&&(n=function(e){var r=m.call(e),t=r==l?e.constructor:void 0,n=t?c(t):void 0;if(n)switch(n){case b:return v;case _:return f;case g:return p;case O:return d;case A:return y}return r}),e.exports=n},function(e,r){function t(){return!1}e.exports=t},function(e,r){function t(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=t},function(e,r){function t(e){return this.__data__.has(e)}e.exports=t},function(e,r,t){var n=t(95),o=t(98),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,a=/\\(\\)?/g,u=n(function(e){var r=[];return o(e).replace(i,function(e,t,n,o){r.push(n?o.replace(a,"$1"):t||e)}),r});e.exports=u},74,function(e,r){function t(e){if(null!=e){try{return n.call(e)}catch(r){}try{return e+""}catch(r){}}return""}var n=Function.prototype.toString;e.exports=t},79,function(e,r,t){function n(e,r,t){t="function"==typeof t?t:void 0;var n=t?t(e,r):void 0;return void 0===n?o(e,r,t):!!n}var o=t(72);e.exports=n},function(e,r){function t(e){var r=typeof e;return!!e&&("object"==r||"function"==r)}e.exports=t},function(e,r){function t(e){return!!e&&"object"==typeof e}e.exports=t},83,83,74,function(e,r){function t(){}e.exports=t},68,74,function(e,r,t){"use strict";function n(e,r,t){return!o(e.props,r)||!o(e.state,t)}var o=t(57);e.exports=n},function(e,r){e.exports=t}]))}); |
import expect from 'expect'; | ||
import expectPredicate from 'expect-predicate'; | ||
import { ARRAY_INSERT, ARRAY_MOVE, ARRAY_POP, ARRAY_PUSH, ARRAY_REMOVE, ARRAY_REMOVE_ALL, ARRAY_SHIFT, ARRAY_SPLICE, ARRAY_SWAP, ARRAY_UNSHIFT, BLUR, CHANGE, DESTROY, FOCUS, INITIALIZE, REGISTER_FIELD, RESET, SET_SUBMIT_FAILED, START_ASYNC_VALIDATION, START_SUBMIT, STOP_ASYNC_VALIDATION, STOP_SUBMIT, TOUCH, UNREGISTER_FIELD, UNTOUCH } from '../actionTypes'; | ||
import { arrayInsert, arrayMove, arrayPop, arrayPush, arrayRemove, arrayRemoveAll, arrayShift, arraySplice, arraySwap, arrayUnshift, blur, change, destroy, focus, initialize, registerField, reset, setSubmitFailed, startAsyncValidation, startSubmit, stopAsyncValidation, stopSubmit, touch, unregisterField, untouch } from '../actions'; | ||
import { ARRAY_INSERT, ARRAY_MOVE, ARRAY_POP, ARRAY_PUSH, ARRAY_REMOVE, ARRAY_REMOVE_ALL, ARRAY_SHIFT, ARRAY_SPLICE, ARRAY_SWAP, ARRAY_UNSHIFT, BLUR, CHANGE, DESTROY, FOCUS, INITIALIZE, REGISTER_FIELD, RESET, SET_SUBMIT_FAILED, START_ASYNC_VALIDATION, START_SUBMIT, STOP_ASYNC_VALIDATION, STOP_SUBMIT, TOUCH, UNREGISTER_FIELD, UNTOUCH, UPDATE_SYNC_ERRORS } from '../actionTypes'; | ||
import { arrayInsert, arrayMove, arrayPop, arrayPush, arrayRemove, arrayRemoveAll, arrayShift, arraySplice, arraySwap, arrayUnshift, blur, change, destroy, focus, initialize, registerField, reset, setSubmitFailed, startAsyncValidation, startSubmit, stopAsyncValidation, stopSubmit, touch, unregisterField, untouch, updateSyncErrors } from '../actions'; | ||
import { isFSA } from 'flux-standard-action'; | ||
@@ -385,2 +385,24 @@ expect.extend(expectPredicate); | ||
}); | ||
it('should create updateSyncErrors action', function () { | ||
expect(updateSyncErrors('myForm', { foo: 'foo error' })).toEqual({ | ||
type: UPDATE_SYNC_ERRORS, | ||
meta: { | ||
form: 'myForm' | ||
}, | ||
payload: { | ||
foo: 'foo error' | ||
} | ||
}).toPass(isFSA); | ||
}); | ||
it('should create updateSyncErrors action with no errors if none given', function () { | ||
expect(updateSyncErrors('myForm')).toEqual({ | ||
type: UPDATE_SYNC_ERRORS, | ||
meta: { | ||
form: 'myForm' | ||
}, | ||
payload: {} | ||
}).toPass(isFSA); | ||
}); | ||
}); |
@@ -557,2 +557,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
expect(input).toHaveBeenCalled(); | ||
expect(input.calls.length).toBe(1); | ||
expect(input.calls[0].arguments[0].valid).toBe(false); | ||
@@ -1012,2 +1013,64 @@ expect(input.calls[0].arguments[0].error).toBe('bar error'); | ||
}); | ||
it('should rerender when sync error is cleared', function () { | ||
var store = makeStore(); | ||
var usernameInput = createSpy(function (props) { | ||
return React.createElement('input', props.input); | ||
}).andCallThrough(); | ||
var validate = function validate(values) { | ||
var username = getIn(values, 'username'); | ||
return username ? {} : { username: 'Required' }; | ||
}; | ||
var Form = function (_Component18) { | ||
_inherits(Form, _Component18); | ||
function Form() { | ||
_classCallCheck(this, Form); | ||
return _possibleConstructorReturn(this, Object.getPrototypeOf(Form).apply(this, arguments)); | ||
} | ||
_createClass(Form, [{ | ||
key: 'render', | ||
value: function render() { | ||
return React.createElement( | ||
'div', | ||
null, | ||
React.createElement(Field, { name: 'username', component: usernameInput }) | ||
); | ||
} | ||
}]); | ||
return Form; | ||
}(Component); | ||
var TestForm = reduxForm({ | ||
form: 'testForm', | ||
validate: validate | ||
})(Form); | ||
TestUtils.renderIntoDocument(React.createElement( | ||
Provider, | ||
{ store: store }, | ||
React.createElement(TestForm, null) | ||
)); | ||
// username input rendered | ||
expect(usernameInput).toHaveBeenCalled(); | ||
expect(usernameInput.calls.length).toBe(1); | ||
// username field has error | ||
expect(usernameInput.calls[0].arguments[0].valid).toBe(false); | ||
expect(usernameInput.calls[0].arguments[0].error).toBe('Required'); | ||
// update username field so it passes | ||
usernameInput.calls[0].arguments[0].input.onChange('erikras'); | ||
// username input rerendered twice, once for value, once for sync error | ||
expect(usernameInput.calls.length).toBe(3); | ||
// should be valid now | ||
expect(usernameInput.calls[2].arguments[0].valid).toBe(true); | ||
expect(usernameInput.calls[2].arguments[0].error).toBe(undefined); | ||
}); | ||
}); | ||
@@ -1014,0 +1077,0 @@ }; |
@@ -23,3 +23,2 @@ import createReducer from '../reducer'; | ||
import describeTouch from './reducer.touch.spec'; | ||
import describeUntouch from './reducer.untouch.spec'; | ||
import describeReset from './reducer.reset.spec'; | ||
@@ -34,2 +33,4 @@ import describePlugin from './reducer.plugin.spec'; | ||
import describeUnregisterField from './reducer.unregisterField.spec'; | ||
import describeUntouch from './reducer.untouch.spec'; | ||
import describeUpdateSyncErrors from './reducer.updateSyncErrors.spec'; | ||
@@ -54,3 +55,2 @@ var tests = { | ||
touch: describeTouch, | ||
untouch: describeUntouch, | ||
setSubmitFailed: describeSetSubmitFailed, | ||
@@ -63,2 +63,4 @@ startSubmit: describeStartSubmit, | ||
unregisterField: describeUnregisterField, | ||
untouch: describeUntouch, | ||
updateSyncErrors: describeUpdateSyncErrors, | ||
plugin: describePlugin | ||
@@ -65,0 +67,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { ARRAY_INSERT, ARRAY_MOVE, ARRAY_POP, ARRAY_PUSH, ARRAY_REMOVE, ARRAY_REMOVE_ALL, ARRAY_SHIFT, ARRAY_SPLICE, ARRAY_SWAP, ARRAY_UNSHIFT, BLUR, CHANGE, DESTROY, FOCUS, INITIALIZE, REGISTER_FIELD, RESET, SET_SUBMIT_FAILED, START_ASYNC_VALIDATION, START_SUBMIT, STOP_ASYNC_VALIDATION, STOP_SUBMIT, TOUCH, UNREGISTER_FIELD, UNTOUCH } from './actionTypes'; | ||
import { ARRAY_INSERT, ARRAY_MOVE, ARRAY_POP, ARRAY_PUSH, ARRAY_REMOVE, ARRAY_REMOVE_ALL, ARRAY_SHIFT, ARRAY_SPLICE, ARRAY_SWAP, ARRAY_UNSHIFT, BLUR, CHANGE, DESTROY, FOCUS, INITIALIZE, REGISTER_FIELD, RESET, SET_SUBMIT_FAILED, START_ASYNC_VALIDATION, START_SUBMIT, STOP_ASYNC_VALIDATION, STOP_SUBMIT, TOUCH, UNREGISTER_FIELD, UNTOUCH, UPDATE_SYNC_ERRORS } from './actionTypes'; | ||
@@ -142,2 +142,7 @@ export var arrayInsert = function arrayInsert(form, field, index, value) { | ||
return { type: UNTOUCH, meta: { form: form, fields: fields } }; | ||
}; | ||
export var updateSyncErrors = function updateSyncErrors(form) { | ||
var syncErrors = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
return { type: UPDATE_SYNC_ERRORS, meta: { form: form }, payload: syncErrors }; | ||
}; |
@@ -25,2 +25,3 @@ export var ARRAY_INSERT = 'redux-form/ARRAY_INSERT'; | ||
export var UNREGISTER_FIELD = 'redux-form/UNREGISTER_FIELD'; | ||
export var UNTOUCH = 'redux-form/UNTOUCH'; | ||
export var UNTOUCH = 'redux-form/UNTOUCH'; | ||
export var UPDATE_SYNC_ERRORS = 'redux-form/UPDATE_SYNC_ERRORS'; |
@@ -17,2 +17,3 @@ import _mapValues from 'lodash-es/mapValues'; | ||
import plain from './structure/plain'; | ||
@@ -32,2 +33,9 @@ var createConnectedField = function createConnectedField(_ref, _ref2, name) { | ||
var getSyncError = function getSyncError(syncErrors) { | ||
var error = plain.getIn(syncErrors, name); | ||
// Because the error for this field might not be at a level in the error structure where | ||
// it can be set directly, it might need to be unwrapped from the _error property | ||
return error && error._error ? error._error : error; | ||
}; | ||
var ConnectedField = function (_Component) { | ||
@@ -88,6 +96,2 @@ _inherits(ConnectedField, _Component); | ||
ConnectedField.contextTypes = { | ||
_reduxForm: PropTypes.object | ||
}; | ||
var actions = _mapValues({ | ||
@@ -101,12 +105,15 @@ blur: blur, | ||
var connector = connect(function (state, ownProps) { | ||
var initial = getIn(getFormState(state), 'initial.' + name) || propInitialValue; | ||
var value = getIn(getFormState(state), 'values.' + name); | ||
var formState = getFormState(state); | ||
var initial = getIn(formState, 'initial.' + name) || propInitialValue; | ||
var value = getIn(formState, 'values.' + name); | ||
var syncError = getSyncError(getIn(formState, 'syncErrors')); | ||
var pristine = value === initial; | ||
return { | ||
asyncError: getIn(getFormState(state), 'asyncErrors.' + name), | ||
asyncValidating: getIn(getFormState(state), 'asyncValidating') === name, | ||
asyncError: getIn(formState, 'asyncErrors.' + name), | ||
asyncValidating: getIn(formState, 'asyncValidating') === name, | ||
dirty: !pristine, | ||
pristine: pristine, | ||
state: getIn(getFormState(state), 'fields.' + name), | ||
submitError: getIn(getFormState(state), 'submitErrors.' + name), | ||
state: getIn(formState, 'fields.' + name), | ||
submitError: getIn(formState, 'submitErrors.' + name), | ||
syncError: syncError, | ||
value: value, | ||
@@ -113,0 +120,0 @@ _value: ownProps.value // save value passed in (for checkboxes) |
@@ -18,2 +18,3 @@ import _mapValues from 'lodash-es/mapValues'; | ||
import shallowCompare from 'react-addons-shallow-compare'; | ||
import plain from './structure/plain'; | ||
@@ -44,2 +45,9 @@ var createConnectedFieldArray = function createConnectedFieldArray(_ref, _ref2, name) { | ||
var getSyncError = function getSyncError(syncErrors) { | ||
// For an array, the error can _ONLY_ be under _error. | ||
// This is why this getSyncError is not the same as the | ||
// one in Field. | ||
return plain.getIn(syncErrors, name + '._error'); | ||
}; | ||
var ConnectedFieldArray = function (_Component) { | ||
@@ -124,10 +132,13 @@ _inherits(ConnectedFieldArray, _Component); | ||
var connector = connect(function (state) { | ||
var initial = getIn(getFormState(state), 'initial.' + name) || propInitialValue; | ||
var value = getIn(getFormState(state), 'values.' + name); | ||
var formState = getFormState(state); | ||
var initial = getIn(formState, 'initial.' + name) || propInitialValue; | ||
var value = getIn(formState, 'values.' + name); | ||
var syncError = getSyncError(getIn(formState, 'syncErrors')); | ||
var pristine = deepEqual(value, initial); | ||
return { | ||
asyncError: getIn(getFormState(state), 'asyncErrors.' + name + '._error'), | ||
asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), | ||
dirty: !pristine, | ||
pristine: pristine, | ||
submitError: getIn(getFormState(state), 'submitErrors.' + name + '._error'), | ||
submitError: getIn(formState, 'submitErrors.' + name + '._error'), | ||
syncError: syncError, | ||
value: value | ||
@@ -134,0 +145,0 @@ }; |
@@ -15,13 +15,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
import shallowCompare from 'react-addons-shallow-compare'; | ||
import plain from './structure/plain'; | ||
var getSyncError = function getSyncError(context, name) { | ||
var syncErrors = context._reduxForm.syncErrors; | ||
var error = plain.getIn(syncErrors, name); | ||
// Because the error for this field might not be at a level in the error structure where | ||
// it can be set directly, it might need to be unwrapped from the _error property | ||
return error && error._error ? error._error : error; | ||
}; | ||
var createField = function createField(_ref) { | ||
@@ -53,5 +43,4 @@ var deepEqual = _ref.deepEqual; | ||
key: 'shouldComponentUpdate', | ||
value: function shouldComponentUpdate(nextProps, nextState, nextContext) { | ||
var nextSyncError = getSyncError(nextContext, nextProps.name); | ||
return shallowCompare(this, nextProps, nextState) || this.syncError !== nextSyncError; | ||
value: function shouldComponentUpdate(nextProps, nextState) { | ||
return shallowCompare(this, nextProps, nextState); | ||
} | ||
@@ -100,3 +89,2 @@ }, { | ||
normalize: this.normalize, | ||
syncError: this.syncError, | ||
ref: 'connected' | ||
@@ -106,7 +94,2 @@ })); | ||
}, { | ||
key: 'syncError', | ||
get: function get() { | ||
return getSyncError(this.context, this.props.name); | ||
} | ||
}, { | ||
key: 'name', | ||
@@ -113,0 +96,0 @@ get: function get() { |
@@ -15,13 +15,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
import shallowCompare from 'react-addons-shallow-compare'; | ||
import plain from './structure/plain'; | ||
var getSyncError = function getSyncError(context, name) { | ||
var syncErrors = context._reduxForm.syncErrors; | ||
// For an array, the error can _ONLY_ be under _error. | ||
// This is why this getSyncError is not the same as the | ||
// one in Field. | ||
return plain.getIn(syncErrors, name + '._error'); | ||
}; | ||
var createFieldArray = function createFieldArray(_ref) { | ||
@@ -49,5 +39,4 @@ var deepEqual = _ref.deepEqual; | ||
key: 'shouldComponentUpdate', | ||
value: function shouldComponentUpdate(nextProps, nextState, nextContext) { | ||
var nextSyncError = getSyncError(nextContext, nextProps.name); | ||
return shallowCompare(this, nextProps, nextState) || this.syncError !== nextSyncError; | ||
value: function shouldComponentUpdate(nextProps, nextState) { | ||
return shallowCompare(this, nextProps, nextState); | ||
} | ||
@@ -91,7 +80,2 @@ }, { | ||
}, { | ||
key: 'syncError', | ||
get: function get() { | ||
return getSyncError(this.context, this.props.name); | ||
} | ||
}, { | ||
key: 'name', | ||
@@ -98,0 +82,0 @@ get: function get() { |
@@ -5,3 +5,3 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
import { ARRAY_INSERT, ARRAY_MOVE, ARRAY_POP, ARRAY_PUSH, ARRAY_REMOVE, ARRAY_REMOVE_ALL, ARRAY_SHIFT, ARRAY_SPLICE, ARRAY_SWAP, ARRAY_UNSHIFT, BLUR, CHANGE, DESTROY, FOCUS, INITIALIZE, REGISTER_FIELD, RESET, SET_SUBMIT_FAILED, START_ASYNC_VALIDATION, START_SUBMIT, STOP_ASYNC_VALIDATION, STOP_SUBMIT, TOUCH, UNREGISTER_FIELD, UNTOUCH } from './actionTypes'; | ||
import { ARRAY_INSERT, ARRAY_MOVE, ARRAY_POP, ARRAY_PUSH, ARRAY_REMOVE, ARRAY_REMOVE_ALL, ARRAY_SHIFT, ARRAY_SPLICE, ARRAY_SWAP, ARRAY_UNSHIFT, BLUR, CHANGE, DESTROY, FOCUS, INITIALIZE, REGISTER_FIELD, RESET, SET_SUBMIT_FAILED, START_ASYNC_VALIDATION, START_SUBMIT, STOP_ASYNC_VALIDATION, STOP_SUBMIT, TOUCH, UNREGISTER_FIELD, UNTOUCH, UPDATE_SYNC_ERRORS } from './actionTypes'; | ||
import createDeleteInWithCleanUp from './deleteInWithCleanUp'; | ||
@@ -314,2 +314,6 @@ | ||
return result; | ||
}), _defineProperty(_behaviors, UPDATE_SYNC_ERRORS, function (state, _ref23) { | ||
var payload = _ref23.payload; | ||
return Object.keys(payload).length ? setIn(state, 'syncErrors', payload) : deleteIn(state, 'syncErrors'); | ||
}), _behaviors); | ||
@@ -316,0 +320,0 @@ |
@@ -152,5 +152,40 @@ import _mapValues from 'lodash-es/mapValues'; | ||
}, { | ||
key: 'updateSyncErrorsIfNeeded', | ||
value: function updateSyncErrorsIfNeeded(nextSyncErrors) { | ||
var _props = this.props; | ||
var syncErrors = _props.syncErrors; | ||
var updateSyncErrors = _props.updateSyncErrors; | ||
var noErrors = !syncErrors || !Object.keys(syncErrors).length; | ||
var nextNoErrors = !nextSyncErrors || !Object.keys(nextSyncErrors).length; | ||
if (!(noErrors && nextNoErrors) && !plain.deepEqual(syncErrors, nextSyncErrors)) { | ||
updateSyncErrors(nextSyncErrors); | ||
} | ||
} | ||
}, { | ||
key: 'validateIfNeeded', | ||
value: function validateIfNeeded(nextProps) { | ||
var _props2 = this.props; | ||
var validate = _props2.validate; | ||
var values = _props2.values; | ||
if (validate) { | ||
if (nextProps) { | ||
// not initial render | ||
if (!deepEqual(values, nextProps.values)) { | ||
var nextSyncErrors = validate(nextProps.values, nextProps); | ||
this.updateSyncErrorsIfNeeded(nextSyncErrors); | ||
} | ||
} else { | ||
// initial render | ||
var _nextSyncErrors = validate(values, this.props); | ||
this.updateSyncErrorsIfNeeded(_nextSyncErrors); | ||
} | ||
} | ||
} | ||
}, { | ||
key: 'componentWillMount', | ||
value: function componentWillMount() { | ||
this.initIfNeeded(); | ||
this.validateIfNeeded(); | ||
} | ||
@@ -161,2 +196,3 @@ }, { | ||
this.initIfNeeded(nextProps); | ||
this.validateIfNeeded(nextProps); | ||
} | ||
@@ -179,5 +215,5 @@ }, { | ||
value: function componentWillUnmount() { | ||
var _props = this.props; | ||
var destroyOnUnmount = _props.destroyOnUnmount; | ||
var destroy = _props.destroy; | ||
var _props3 = this.props; | ||
var destroyOnUnmount = _props3.destroyOnUnmount; | ||
var destroy = _props3.destroy; | ||
@@ -228,14 +264,14 @@ if (destroyOnUnmount) { | ||
var _props2 = this.props; | ||
var asyncBlurFields = _props2.asyncBlurFields; | ||
var asyncErrors = _props2.asyncErrors; | ||
var asyncValidate = _props2.asyncValidate; | ||
var dispatch = _props2.dispatch; | ||
var initialized = _props2.initialized; | ||
var pristine = _props2.pristine; | ||
var shouldAsyncValidate = _props2.shouldAsyncValidate; | ||
var startAsyncValidation = _props2.startAsyncValidation; | ||
var stopAsyncValidation = _props2.stopAsyncValidation; | ||
var syncErrors = _props2.syncErrors; | ||
var values = _props2.values; | ||
var _props4 = this.props; | ||
var asyncBlurFields = _props4.asyncBlurFields; | ||
var asyncErrors = _props4.asyncErrors; | ||
var asyncValidate = _props4.asyncValidate; | ||
var dispatch = _props4.dispatch; | ||
var initialized = _props4.initialized; | ||
var pristine = _props4.pristine; | ||
var shouldAsyncValidate = _props4.shouldAsyncValidate; | ||
var startAsyncValidation = _props4.startAsyncValidation; | ||
var stopAsyncValidation = _props4.stopAsyncValidation; | ||
var syncErrors = _props4.syncErrors; | ||
var values = _props4.values; | ||
@@ -317,41 +353,41 @@ var submitting = !name; | ||
/* eslint-disable no-unused-vars */ | ||
var _props3 = this.props; | ||
var anyTouched = _props3.anyTouched; | ||
var arrayInsert = _props3.arrayInsert; | ||
var arrayPop = _props3.arrayPop; | ||
var arrayPush = _props3.arrayPush; | ||
var arrayRemove = _props3.arrayRemove; | ||
var arrayShift = _props3.arrayShift; | ||
var arraySplice = _props3.arraySplice; | ||
var arraySwap = _props3.arraySwap; | ||
var arrayUnshift = _props3.arrayUnshift; | ||
var asyncErrors = _props3.asyncErrors; | ||
var asyncValidate = _props3.asyncValidate; | ||
var asyncValidating = _props3.asyncValidating; | ||
var destroy = _props3.destroy; | ||
var destroyOnUnmount = _props3.destroyOnUnmount; | ||
var dirty = _props3.dirty; | ||
var dispatch = _props3.dispatch; | ||
var enableReinitialize = _props3.enableReinitialize; | ||
var error = _props3.error; | ||
var form = _props3.form; | ||
var getFormState = _props3.getFormState; | ||
var initialize = _props3.initialize; | ||
var invalid = _props3.invalid; | ||
var pristine = _props3.pristine; | ||
var propNamespace = _props3.propNamespace; | ||
var registerField = _props3.registerField; | ||
var reset = _props3.reset; | ||
var submitting = _props3.submitting; | ||
var submitFailed = _props3.submitFailed; | ||
var touch = _props3.touch; | ||
var touchOnBlur = _props3.touchOnBlur; | ||
var touchOnChange = _props3.touchOnChange; | ||
var syncErrors = _props3.syncErrors; | ||
var unregisterField = _props3.unregisterField; | ||
var untouch = _props3.untouch; | ||
var valid = _props3.valid; | ||
var values = _props3.values; | ||
var _props5 = this.props; | ||
var anyTouched = _props5.anyTouched; | ||
var arrayInsert = _props5.arrayInsert; | ||
var arrayPop = _props5.arrayPop; | ||
var arrayPush = _props5.arrayPush; | ||
var arrayRemove = _props5.arrayRemove; | ||
var arrayShift = _props5.arrayShift; | ||
var arraySplice = _props5.arraySplice; | ||
var arraySwap = _props5.arraySwap; | ||
var arrayUnshift = _props5.arrayUnshift; | ||
var asyncErrors = _props5.asyncErrors; | ||
var asyncValidate = _props5.asyncValidate; | ||
var asyncValidating = _props5.asyncValidating; | ||
var destroy = _props5.destroy; | ||
var destroyOnUnmount = _props5.destroyOnUnmount; | ||
var dirty = _props5.dirty; | ||
var dispatch = _props5.dispatch; | ||
var enableReinitialize = _props5.enableReinitialize; | ||
var error = _props5.error; | ||
var form = _props5.form; | ||
var getFormState = _props5.getFormState; | ||
var initialize = _props5.initialize; | ||
var invalid = _props5.invalid; | ||
var pristine = _props5.pristine; | ||
var propNamespace = _props5.propNamespace; | ||
var registerField = _props5.registerField; | ||
var reset = _props5.reset; | ||
var submitting = _props5.submitting; | ||
var submitFailed = _props5.submitFailed; | ||
var touch = _props5.touch; | ||
var touchOnBlur = _props5.touchOnBlur; | ||
var touchOnChange = _props5.touchOnChange; | ||
var syncErrors = _props5.syncErrors; | ||
var unregisterField = _props5.unregisterField; | ||
var untouch = _props5.untouch; | ||
var valid = _props5.valid; | ||
var values = _props5.values; | ||
var rest = _objectWithoutProperties(_props3, ['anyTouched', 'arrayInsert', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'destroy', 'destroyOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'form', 'getFormState', 'initialize', 'invalid', 'pristine', 'propNamespace', 'registerField', 'reset', 'submitting', 'submitFailed', 'touch', 'touchOnBlur', 'touchOnChange', 'syncErrors', 'unregisterField', 'untouch', 'valid', 'values']); | ||
var rest = _objectWithoutProperties(_props5, ['anyTouched', 'arrayInsert', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'destroy', 'destroyOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'form', 'getFormState', 'initialize', 'invalid', 'pristine', 'propNamespace', 'registerField', 'reset', 'submitting', 'submitFailed', 'touch', 'touchOnBlur', 'touchOnChange', 'syncErrors', 'unregisterField', 'untouch', 'valid', 'values']); | ||
/* eslint-enable no-unused-vars */ | ||
@@ -414,3 +450,2 @@ | ||
var initialValues = props.initialValues; | ||
var validate = props.validate; | ||
@@ -424,3 +459,3 @@ var formState = getIn(getFormState(state) || empty, form) || empty; | ||
var submitErrors = getIn(formState, 'submitErrors'); | ||
var syncErrors = validate && validate(values, props) || {}; | ||
var syncErrors = getIn(formState, 'syncErrors'); | ||
var hasSyncErrors = plainHasErrors(syncErrors); | ||
@@ -521,6 +556,6 @@ var hasAsyncErrors = hasErrors(asyncErrors); | ||
value: function render() { | ||
var _props4 = this.props; | ||
var initialValues = _props4.initialValues; | ||
var _props6 = this.props; | ||
var initialValues = _props6.initialValues; | ||
var rest = _objectWithoutProperties(_props4, ['initialValues']); | ||
var rest = _objectWithoutProperties(_props6, ['initialValues']); | ||
@@ -527,0 +562,0 @@ return createElement(ConnectedForm, _extends({}, rest, { |
@@ -163,2 +163,13 @@ import expect from 'expect'; | ||
}); | ||
it('should special case _error key for arrays', function () { | ||
var a = ['a', 'b']; | ||
var b = ['a', 'b']; | ||
b._error = 'something'; | ||
var c = ['a', 'b']; | ||
c._error = 'something'; | ||
testBothWays(a, b, false); | ||
testBothWays(b, c, true); | ||
}); | ||
}); |
@@ -8,2 +8,3 @@ import _isEqualWith from 'lodash-es/isEqualWith'; | ||
if (obj === '' && other == null) return true; | ||
if (obj && other && obj._error !== other._error) return false; | ||
}; | ||
@@ -10,0 +11,0 @@ |
@@ -398,2 +398,24 @@ 'use strict'; | ||
}); | ||
it('should create updateSyncErrors action', function () { | ||
(0, _expect2.default)((0, _actions.updateSyncErrors)('myForm', { foo: 'foo error' })).toEqual({ | ||
type: _actionTypes.UPDATE_SYNC_ERRORS, | ||
meta: { | ||
form: 'myForm' | ||
}, | ||
payload: { | ||
foo: 'foo error' | ||
} | ||
}).toPass(_fluxStandardAction.isFSA); | ||
}); | ||
it('should create updateSyncErrors action with no errors if none given', function () { | ||
(0, _expect2.default)((0, _actions.updateSyncErrors)('myForm')).toEqual({ | ||
type: _actionTypes.UPDATE_SYNC_ERRORS, | ||
meta: { | ||
form: 'myForm' | ||
}, | ||
payload: {} | ||
}).toPass(_fluxStandardAction.isFSA); | ||
}); | ||
}); |
@@ -594,2 +594,3 @@ 'use strict'; | ||
expect(input).toHaveBeenCalled(); | ||
expect(input.calls.length).toBe(1); | ||
expect(input.calls[0].arguments[0].valid).toBe(false); | ||
@@ -1049,2 +1050,64 @@ expect(input.calls[0].arguments[0].error).toBe('bar error'); | ||
}); | ||
it('should rerender when sync error is cleared', function () { | ||
var store = makeStore(); | ||
var usernameInput = (0, _expect.createSpy)(function (props) { | ||
return _react2.default.createElement('input', props.input); | ||
}).andCallThrough(); | ||
var validate = function validate(values) { | ||
var username = getIn(values, 'username'); | ||
return username ? {} : { username: 'Required' }; | ||
}; | ||
var Form = function (_Component18) { | ||
_inherits(Form, _Component18); | ||
function Form() { | ||
_classCallCheck(this, Form); | ||
return _possibleConstructorReturn(this, Object.getPrototypeOf(Form).apply(this, arguments)); | ||
} | ||
_createClass(Form, [{ | ||
key: 'render', | ||
value: function render() { | ||
return _react2.default.createElement( | ||
'div', | ||
null, | ||
_react2.default.createElement(Field, { name: 'username', component: usernameInput }) | ||
); | ||
} | ||
}]); | ||
return Form; | ||
}(_react.Component); | ||
var TestForm = reduxForm({ | ||
form: 'testForm', | ||
validate: validate | ||
})(Form); | ||
_reactAddonsTestUtils2.default.renderIntoDocument(_react2.default.createElement( | ||
_reactRedux.Provider, | ||
{ store: store }, | ||
_react2.default.createElement(TestForm, null) | ||
)); | ||
// username input rendered | ||
expect(usernameInput).toHaveBeenCalled(); | ||
expect(usernameInput.calls.length).toBe(1); | ||
// username field has error | ||
expect(usernameInput.calls[0].arguments[0].valid).toBe(false); | ||
expect(usernameInput.calls[0].arguments[0].error).toBe('Required'); | ||
// update username field so it passes | ||
usernameInput.calls[0].arguments[0].input.onChange('erikras'); | ||
// username input rerendered twice, once for value, once for sync error | ||
expect(usernameInput.calls.length).toBe(3); | ||
// should be valid now | ||
expect(usernameInput.calls[2].arguments[0].valid).toBe(true); | ||
expect(usernameInput.calls[2].arguments[0].error).toBe(undefined); | ||
}); | ||
}); | ||
@@ -1051,0 +1114,0 @@ }; |
@@ -91,6 +91,2 @@ 'use strict'; | ||
var _reducerUntouch = require('./reducer.untouch.spec'); | ||
var _reducerUntouch2 = _interopRequireDefault(_reducerUntouch); | ||
var _reducerReset = require('./reducer.reset.spec'); | ||
@@ -132,2 +128,10 @@ | ||
var _reducerUntouch = require('./reducer.untouch.spec'); | ||
var _reducerUntouch2 = _interopRequireDefault(_reducerUntouch); | ||
var _reducerUpdateSyncErrors = require('./reducer.updateSyncErrors.spec'); | ||
var _reducerUpdateSyncErrors2 = _interopRequireDefault(_reducerUpdateSyncErrors); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -153,3 +157,2 @@ | ||
touch: _reducerTouch2.default, | ||
untouch: _reducerUntouch2.default, | ||
setSubmitFailed: _reducerSetSubmitFailed2.default, | ||
@@ -162,2 +165,4 @@ startSubmit: _reducerStartSubmit2.default, | ||
unregisterField: _reducerUnregisterField2.default, | ||
untouch: _reducerUntouch2.default, | ||
updateSyncErrors: _reducerUpdateSyncErrors2.default, | ||
plugin: _reducerPlugin2.default | ||
@@ -164,0 +169,0 @@ }; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.untouch = exports.unregisterField = exports.touch = exports.setSubmitFailed = exports.stopSubmit = exports.stopAsyncValidation = exports.startSubmit = exports.startAsyncValidation = exports.reset = exports.registerField = exports.initialize = exports.focus = exports.destroy = exports.change = exports.blur = exports.arrayUnshift = exports.arraySwap = exports.arraySplice = exports.arrayShift = exports.arrayRemoveAll = exports.arrayRemove = exports.arrayPush = exports.arrayPop = exports.arrayMove = exports.arrayInsert = undefined; | ||
exports.updateSyncErrors = exports.untouch = exports.unregisterField = exports.touch = exports.setSubmitFailed = exports.stopSubmit = exports.stopAsyncValidation = exports.startSubmit = exports.startAsyncValidation = exports.reset = exports.registerField = exports.initialize = exports.focus = exports.destroy = exports.change = exports.blur = exports.arrayUnshift = exports.arraySwap = exports.arraySplice = exports.arrayShift = exports.arrayRemoveAll = exports.arrayRemove = exports.arrayPush = exports.arrayPop = exports.arrayMove = exports.arrayInsert = undefined; | ||
@@ -150,2 +150,7 @@ var _actionTypes = require('./actionTypes'); | ||
return { type: _actionTypes.UNTOUCH, meta: { form: form, fields: fields } }; | ||
}; | ||
var updateSyncErrors = exports.updateSyncErrors = function updateSyncErrors(form) { | ||
var syncErrors = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
return { type: _actionTypes.UPDATE_SYNC_ERRORS, meta: { form: form }, payload: syncErrors }; | ||
}; |
@@ -30,2 +30,3 @@ 'use strict'; | ||
var UNREGISTER_FIELD = exports.UNREGISTER_FIELD = 'redux-form/UNREGISTER_FIELD'; | ||
var UNTOUCH = exports.UNTOUCH = 'redux-form/UNTOUCH'; | ||
var UNTOUCH = exports.UNTOUCH = 'redux-form/UNTOUCH'; | ||
var UPDATE_SYNC_ERRORS = exports.UPDATE_SYNC_ERRORS = 'redux-form/UPDATE_SYNC_ERRORS'; |
@@ -21,2 +21,6 @@ 'use strict'; | ||
var _plain = require('./structure/plain'); | ||
var _plain2 = _interopRequireDefault(_plain); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -45,2 +49,9 @@ | ||
var getSyncError = function getSyncError(syncErrors) { | ||
var error = _plain2.default.getIn(syncErrors, name); | ||
// Because the error for this field might not be at a level in the error structure where | ||
// it can be set directly, it might need to be unwrapped from the _error property | ||
return error && error._error ? error._error : error; | ||
}; | ||
var ConnectedField = function (_Component) { | ||
@@ -101,6 +112,2 @@ _inherits(ConnectedField, _Component); | ||
ConnectedField.contextTypes = { | ||
_reduxForm: _react.PropTypes.object | ||
}; | ||
var actions = (0, _mapValues3.default)({ | ||
@@ -114,12 +121,15 @@ blur: blur, | ||
var connector = (0, _reactRedux.connect)(function (state, ownProps) { | ||
var initial = getIn(getFormState(state), 'initial.' + name) || propInitialValue; | ||
var value = getIn(getFormState(state), 'values.' + name); | ||
var formState = getFormState(state); | ||
var initial = getIn(formState, 'initial.' + name) || propInitialValue; | ||
var value = getIn(formState, 'values.' + name); | ||
var syncError = getSyncError(getIn(formState, 'syncErrors')); | ||
var pristine = value === initial; | ||
return { | ||
asyncError: getIn(getFormState(state), 'asyncErrors.' + name), | ||
asyncValidating: getIn(getFormState(state), 'asyncValidating') === name, | ||
asyncError: getIn(formState, 'asyncErrors.' + name), | ||
asyncValidating: getIn(formState, 'asyncValidating') === name, | ||
dirty: !pristine, | ||
pristine: pristine, | ||
state: getIn(getFormState(state), 'fields.' + name), | ||
submitError: getIn(getFormState(state), 'submitErrors.' + name), | ||
state: getIn(formState, 'fields.' + name), | ||
submitError: getIn(formState, 'submitErrors.' + name), | ||
syncError: syncError, | ||
value: value, | ||
@@ -126,0 +136,0 @@ _value: ownProps.value // save value passed in (for checkboxes) |
@@ -25,2 +25,6 @@ 'use strict'; | ||
var _plain = require('./structure/plain'); | ||
var _plain2 = _interopRequireDefault(_plain); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -60,2 +64,9 @@ | ||
var getSyncError = function getSyncError(syncErrors) { | ||
// For an array, the error can _ONLY_ be under _error. | ||
// This is why this getSyncError is not the same as the | ||
// one in Field. | ||
return _plain2.default.getIn(syncErrors, name + '._error'); | ||
}; | ||
var ConnectedFieldArray = function (_Component) { | ||
@@ -140,10 +151,13 @@ _inherits(ConnectedFieldArray, _Component); | ||
var connector = (0, _reactRedux.connect)(function (state) { | ||
var initial = getIn(getFormState(state), 'initial.' + name) || propInitialValue; | ||
var value = getIn(getFormState(state), 'values.' + name); | ||
var formState = getFormState(state); | ||
var initial = getIn(formState, 'initial.' + name) || propInitialValue; | ||
var value = getIn(formState, 'values.' + name); | ||
var syncError = getSyncError(getIn(formState, 'syncErrors')); | ||
var pristine = deepEqual(value, initial); | ||
return { | ||
asyncError: getIn(getFormState(state), 'asyncErrors.' + name + '._error'), | ||
asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), | ||
dirty: !pristine, | ||
pristine: pristine, | ||
submitError: getIn(getFormState(state), 'submitErrors.' + name + '._error'), | ||
submitError: getIn(formState, 'submitErrors.' + name + '._error'), | ||
syncError: syncError, | ||
value: value | ||
@@ -150,0 +164,0 @@ }; |
@@ -25,6 +25,2 @@ 'use strict'; | ||
var _plain = require('./structure/plain'); | ||
var _plain2 = _interopRequireDefault(_plain); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -38,11 +34,2 @@ | ||
var getSyncError = function getSyncError(context, name) { | ||
var syncErrors = context._reduxForm.syncErrors; | ||
var error = _plain2.default.getIn(syncErrors, name); | ||
// Because the error for this field might not be at a level in the error structure where | ||
// it can be set directly, it might need to be unwrapped from the _error property | ||
return error && error._error ? error._error : error; | ||
}; | ||
var createField = function createField(_ref) { | ||
@@ -74,5 +61,4 @@ var deepEqual = _ref.deepEqual; | ||
key: 'shouldComponentUpdate', | ||
value: function shouldComponentUpdate(nextProps, nextState, nextContext) { | ||
var nextSyncError = getSyncError(nextContext, nextProps.name); | ||
return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState) || this.syncError !== nextSyncError; | ||
value: function shouldComponentUpdate(nextProps, nextState) { | ||
return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); | ||
} | ||
@@ -121,3 +107,2 @@ }, { | ||
normalize: this.normalize, | ||
syncError: this.syncError, | ||
ref: 'connected' | ||
@@ -127,7 +112,2 @@ })); | ||
}, { | ||
key: 'syncError', | ||
get: function get() { | ||
return getSyncError(this.context, this.props.name); | ||
} | ||
}, { | ||
key: 'name', | ||
@@ -134,0 +114,0 @@ get: function get() { |
@@ -25,6 +25,2 @@ 'use strict'; | ||
var _plain = require('./structure/plain'); | ||
var _plain2 = _interopRequireDefault(_plain); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -38,11 +34,2 @@ | ||
var getSyncError = function getSyncError(context, name) { | ||
var syncErrors = context._reduxForm.syncErrors; | ||
// For an array, the error can _ONLY_ be under _error. | ||
// This is why this getSyncError is not the same as the | ||
// one in Field. | ||
return _plain2.default.getIn(syncErrors, name + '._error'); | ||
}; | ||
var createFieldArray = function createFieldArray(_ref) { | ||
@@ -70,5 +57,4 @@ var deepEqual = _ref.deepEqual; | ||
key: 'shouldComponentUpdate', | ||
value: function shouldComponentUpdate(nextProps, nextState, nextContext) { | ||
var nextSyncError = getSyncError(nextContext, nextProps.name); | ||
return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState) || this.syncError !== nextSyncError; | ||
value: function shouldComponentUpdate(nextProps, nextState) { | ||
return (0, _reactAddonsShallowCompare2.default)(this, nextProps, nextState); | ||
} | ||
@@ -112,7 +98,2 @@ }, { | ||
}, { | ||
key: 'syncError', | ||
get: function get() { | ||
return getSyncError(this.context, this.props.name); | ||
} | ||
}, { | ||
key: 'name', | ||
@@ -119,0 +100,0 @@ get: function get() { |
@@ -324,2 +324,6 @@ 'use strict'; | ||
return result; | ||
}), _defineProperty(_behaviors, _actionTypes.UPDATE_SYNC_ERRORS, function (state, _ref23) { | ||
var payload = _ref23.payload; | ||
return Object.keys(payload).length ? setIn(state, 'syncErrors', payload) : deleteIn(state, 'syncErrors'); | ||
}), _behaviors); | ||
@@ -326,0 +330,0 @@ |
@@ -201,5 +201,40 @@ 'use strict'; | ||
}, { | ||
key: 'updateSyncErrorsIfNeeded', | ||
value: function updateSyncErrorsIfNeeded(nextSyncErrors) { | ||
var _props = this.props; | ||
var syncErrors = _props.syncErrors; | ||
var updateSyncErrors = _props.updateSyncErrors; | ||
var noErrors = !syncErrors || !Object.keys(syncErrors).length; | ||
var nextNoErrors = !nextSyncErrors || !Object.keys(nextSyncErrors).length; | ||
if (!(noErrors && nextNoErrors) && !_plain2.default.deepEqual(syncErrors, nextSyncErrors)) { | ||
updateSyncErrors(nextSyncErrors); | ||
} | ||
} | ||
}, { | ||
key: 'validateIfNeeded', | ||
value: function validateIfNeeded(nextProps) { | ||
var _props2 = this.props; | ||
var validate = _props2.validate; | ||
var values = _props2.values; | ||
if (validate) { | ||
if (nextProps) { | ||
// not initial render | ||
if (!deepEqual(values, nextProps.values)) { | ||
var nextSyncErrors = validate(nextProps.values, nextProps); | ||
this.updateSyncErrorsIfNeeded(nextSyncErrors); | ||
} | ||
} else { | ||
// initial render | ||
var _nextSyncErrors = validate(values, this.props); | ||
this.updateSyncErrorsIfNeeded(_nextSyncErrors); | ||
} | ||
} | ||
} | ||
}, { | ||
key: 'componentWillMount', | ||
value: function componentWillMount() { | ||
this.initIfNeeded(); | ||
this.validateIfNeeded(); | ||
} | ||
@@ -210,2 +245,3 @@ }, { | ||
this.initIfNeeded(nextProps); | ||
this.validateIfNeeded(nextProps); | ||
} | ||
@@ -228,5 +264,5 @@ }, { | ||
value: function componentWillUnmount() { | ||
var _props = this.props; | ||
var destroyOnUnmount = _props.destroyOnUnmount; | ||
var destroy = _props.destroy; | ||
var _props3 = this.props; | ||
var destroyOnUnmount = _props3.destroyOnUnmount; | ||
var destroy = _props3.destroy; | ||
@@ -277,14 +313,14 @@ if (destroyOnUnmount) { | ||
var _props2 = this.props; | ||
var asyncBlurFields = _props2.asyncBlurFields; | ||
var asyncErrors = _props2.asyncErrors; | ||
var asyncValidate = _props2.asyncValidate; | ||
var dispatch = _props2.dispatch; | ||
var initialized = _props2.initialized; | ||
var pristine = _props2.pristine; | ||
var shouldAsyncValidate = _props2.shouldAsyncValidate; | ||
var startAsyncValidation = _props2.startAsyncValidation; | ||
var stopAsyncValidation = _props2.stopAsyncValidation; | ||
var syncErrors = _props2.syncErrors; | ||
var values = _props2.values; | ||
var _props4 = this.props; | ||
var asyncBlurFields = _props4.asyncBlurFields; | ||
var asyncErrors = _props4.asyncErrors; | ||
var asyncValidate = _props4.asyncValidate; | ||
var dispatch = _props4.dispatch; | ||
var initialized = _props4.initialized; | ||
var pristine = _props4.pristine; | ||
var shouldAsyncValidate = _props4.shouldAsyncValidate; | ||
var startAsyncValidation = _props4.startAsyncValidation; | ||
var stopAsyncValidation = _props4.stopAsyncValidation; | ||
var syncErrors = _props4.syncErrors; | ||
var values = _props4.values; | ||
@@ -366,41 +402,41 @@ var submitting = !name; | ||
/* eslint-disable no-unused-vars */ | ||
var _props3 = this.props; | ||
var anyTouched = _props3.anyTouched; | ||
var arrayInsert = _props3.arrayInsert; | ||
var arrayPop = _props3.arrayPop; | ||
var arrayPush = _props3.arrayPush; | ||
var arrayRemove = _props3.arrayRemove; | ||
var arrayShift = _props3.arrayShift; | ||
var arraySplice = _props3.arraySplice; | ||
var arraySwap = _props3.arraySwap; | ||
var arrayUnshift = _props3.arrayUnshift; | ||
var asyncErrors = _props3.asyncErrors; | ||
var asyncValidate = _props3.asyncValidate; | ||
var asyncValidating = _props3.asyncValidating; | ||
var destroy = _props3.destroy; | ||
var destroyOnUnmount = _props3.destroyOnUnmount; | ||
var dirty = _props3.dirty; | ||
var dispatch = _props3.dispatch; | ||
var enableReinitialize = _props3.enableReinitialize; | ||
var error = _props3.error; | ||
var form = _props3.form; | ||
var getFormState = _props3.getFormState; | ||
var initialize = _props3.initialize; | ||
var invalid = _props3.invalid; | ||
var pristine = _props3.pristine; | ||
var propNamespace = _props3.propNamespace; | ||
var registerField = _props3.registerField; | ||
var reset = _props3.reset; | ||
var submitting = _props3.submitting; | ||
var submitFailed = _props3.submitFailed; | ||
var touch = _props3.touch; | ||
var touchOnBlur = _props3.touchOnBlur; | ||
var touchOnChange = _props3.touchOnChange; | ||
var syncErrors = _props3.syncErrors; | ||
var unregisterField = _props3.unregisterField; | ||
var untouch = _props3.untouch; | ||
var valid = _props3.valid; | ||
var values = _props3.values; | ||
var _props5 = this.props; | ||
var anyTouched = _props5.anyTouched; | ||
var arrayInsert = _props5.arrayInsert; | ||
var arrayPop = _props5.arrayPop; | ||
var arrayPush = _props5.arrayPush; | ||
var arrayRemove = _props5.arrayRemove; | ||
var arrayShift = _props5.arrayShift; | ||
var arraySplice = _props5.arraySplice; | ||
var arraySwap = _props5.arraySwap; | ||
var arrayUnshift = _props5.arrayUnshift; | ||
var asyncErrors = _props5.asyncErrors; | ||
var asyncValidate = _props5.asyncValidate; | ||
var asyncValidating = _props5.asyncValidating; | ||
var destroy = _props5.destroy; | ||
var destroyOnUnmount = _props5.destroyOnUnmount; | ||
var dirty = _props5.dirty; | ||
var dispatch = _props5.dispatch; | ||
var enableReinitialize = _props5.enableReinitialize; | ||
var error = _props5.error; | ||
var form = _props5.form; | ||
var getFormState = _props5.getFormState; | ||
var initialize = _props5.initialize; | ||
var invalid = _props5.invalid; | ||
var pristine = _props5.pristine; | ||
var propNamespace = _props5.propNamespace; | ||
var registerField = _props5.registerField; | ||
var reset = _props5.reset; | ||
var submitting = _props5.submitting; | ||
var submitFailed = _props5.submitFailed; | ||
var touch = _props5.touch; | ||
var touchOnBlur = _props5.touchOnBlur; | ||
var touchOnChange = _props5.touchOnChange; | ||
var syncErrors = _props5.syncErrors; | ||
var unregisterField = _props5.unregisterField; | ||
var untouch = _props5.untouch; | ||
var valid = _props5.valid; | ||
var values = _props5.values; | ||
var rest = _objectWithoutProperties(_props3, ['anyTouched', 'arrayInsert', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'destroy', 'destroyOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'form', 'getFormState', 'initialize', 'invalid', 'pristine', 'propNamespace', 'registerField', 'reset', 'submitting', 'submitFailed', 'touch', 'touchOnBlur', 'touchOnChange', 'syncErrors', 'unregisterField', 'untouch', 'valid', 'values']); | ||
var rest = _objectWithoutProperties(_props5, ['anyTouched', 'arrayInsert', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'destroy', 'destroyOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'form', 'getFormState', 'initialize', 'invalid', 'pristine', 'propNamespace', 'registerField', 'reset', 'submitting', 'submitFailed', 'touch', 'touchOnBlur', 'touchOnChange', 'syncErrors', 'unregisterField', 'untouch', 'valid', 'values']); | ||
/* eslint-enable no-unused-vars */ | ||
@@ -463,3 +499,2 @@ | ||
var initialValues = props.initialValues; | ||
var validate = props.validate; | ||
@@ -473,3 +508,3 @@ var formState = getIn(getFormState(state) || empty, form) || empty; | ||
var submitErrors = getIn(formState, 'submitErrors'); | ||
var syncErrors = validate && validate(values, props) || {}; | ||
var syncErrors = getIn(formState, 'syncErrors'); | ||
var hasSyncErrors = plainHasErrors(syncErrors); | ||
@@ -570,6 +605,6 @@ var hasAsyncErrors = hasErrors(asyncErrors); | ||
value: function render() { | ||
var _props4 = this.props; | ||
var initialValues = _props4.initialValues; | ||
var _props6 = this.props; | ||
var initialValues = _props6.initialValues; | ||
var rest = _objectWithoutProperties(_props4, ['initialValues']); | ||
var rest = _objectWithoutProperties(_props6, ['initialValues']); | ||
@@ -576,0 +611,0 @@ return (0, _react.createElement)(ConnectedForm, _extends({}, rest, { |
@@ -172,2 +172,13 @@ 'use strict'; | ||
}); | ||
it('should special case _error key for arrays', function () { | ||
var a = ['a', 'b']; | ||
var b = ['a', 'b']; | ||
b._error = 'something'; | ||
var c = ['a', 'b']; | ||
c._error = 'something'; | ||
testBothWays(a, b, false); | ||
testBothWays(b, c, true); | ||
}); | ||
}); |
@@ -17,2 +17,3 @@ 'use strict'; | ||
if (obj === '' && other == null) return true; | ||
if (obj && other && obj._error !== other._error) return false; | ||
}; | ||
@@ -19,0 +20,0 @@ |
{ | ||
"name": "redux-form", | ||
"version": "6.0.0-rc.2", | ||
"version": "6.0.0-rc.3", | ||
"description": "A higher order component decorator for forms using Redux and React", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1192479
367775
226
30929