redux-form
Advanced tools
Comparing version 3.1.7 to 4.0.0
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReduxForm=e(require("react")):t.ReduxForm=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var u=r[n]={exports:{},id:n,loaded:!1};return t[n].call(u.exports,u,u.exports,e),u.loaded=!0,u.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(25),o=n(u),i=r(55),a=r(27),s=n(a),f=s.default(!1,o.default,i.connect),c=f.actionTypes,l=f.blur,d=f.change,p=f.changeWithKey,v=f.destroy,y=f.focus,h=f.reducer,m=f.reduxForm,g=f.getValues,b=f.initialize,_=f.initializeWithKey,O=f.propTypes,x=f.reset,A=f.startAsyncValidation,S=f.startSubmit,j=f.stopAsyncValidation,T=f.stopSubmit,R=f.touch,M=f.touchWithKey,w=f.untouch,E=f.untouchWithKey;e.actionTypes=c,e.blur=l,e.change=d,e.changeWithKey=p,e.destroy=v,e.focus=y,e.reducer=h,e.reduxForm=m,e.getValues=g,e.initialize=b,e.initializeWithKey=_,e.propTypes=O,e.reset=x,e.startAsyncValidation=A,e.startSubmit=S,e.stopAsyncValidation=j,e.stopSubmit=T,e.touch=R,e.touchWithKey=M,e.untouch=w,e.untouchWithKey=E},function(t,e){"use strict";function r(t){return Array.isArray(t)?t.reduce(function(t,e){return t&&r(e)},!0):t&&"object"==typeof t?Object.keys(t).reduce(function(e,n){return e&&r(t[n])},!0):!t}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="redux-form/ADD_ARRAY_VALUE";e.ADD_ARRAY_VALUE=r;var n="redux-form/BLUR";e.BLUR=n;var u="redux-form/CHANGE";e.CHANGE=u;var o="redux-form/DESTROY";e.DESTROY=o;var i="redux-form/FOCUS";e.FOCUS=i;var a="redux-form/INITIALIZE";e.INITIALIZE=a;var s="redux-form/REMOVE_ARRAY_VALUE";e.REMOVE_ARRAY_VALUE=s;var f="redux-form/RESET";e.RESET=f;var c="redux-form/START_ASYNC_VALIDATION";e.START_ASYNC_VALIDATION=c;var l="redux-form/START_SUBMIT";e.START_SUBMIT=l;var d="redux-form/STOP_ASYNC_VALIDATION";e.STOP_ASYNC_VALIDATION=d;var p="redux-form/STOP_SUBMIT";e.STOP_SUBMIT=p;var v="redux-form/SUBMIT_FAILED";e.SUBMIT_FAILED=v;var y="redux-form/TOUCH";e.TOUCH=y;var h="redux-form/UNTOUCH";e.UNTOUCH=h},function(t,e){"use strict";function r(t,e){return t?Object.keys(t).reduce(function(r,u){var o;return n({},r,(o={},o[u]=e(t[u],u),o))},{}):t}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=r,t.exports=e.default},function(t,e){function r(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then}t.exports=r},function(t,e,r){"use strict";function n(t,e,r){return{type:g.ADD_ARRAY_VALUE,path:t,value:e,index:r}}function u(t,e){return{type:g.BLUR,field:t,value:e}}function o(t,e){return{type:g.CHANGE,field:t,value:e}}function i(){return{type:g.DESTROY}}function a(t){return{type:g.FOCUS,field:t}}function s(t){return{type:g.INITIALIZE,data:t}}function f(t,e){return{type:g.REMOVE_ARRAY_VALUE,path:t,index:e}}function c(){return{type:g.RESET}}function l(){return{type:g.START_ASYNC_VALIDATION}}function d(){return{type:g.START_SUBMIT}}function p(t){return{type:g.STOP_ASYNC_VALIDATION,errors:t}}function v(t){return{type:g.STOP_SUBMIT,errors:t}}function y(){return{type:g.SUBMIT_FAILED}}function h(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:g.TOUCH,fields:e}}function m(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:g.UNTOUCH,fields:e}}e.__esModule=!0,e.addArrayValue=n,e.blur=u,e.change=o,e.destroy=i,e.focus=a,e.initialize=s,e.removeArrayValue=f,e.reset=c,e.startAsyncValidation=l,e.startSubmit=d,e.stopAsyncValidation=p,e.stopSubmit=v,e.submitFailed=y,e.touch=h,e.untouch=m;var g=r(2)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){return"function"==typeof t?function(){return o({},t.apply(void 0,arguments),e)}:"object"==typeof t?a.default(t,function(t){return u(t,e)}):t}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var i=r(3),a=n(i);t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="value";e.dataKey=r;var n=function(t,e){return function(t){t.dataTransfer.setData(r,e())}};e.default=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(9),o=n(u),i=function(t){var e=[];if(t)for(var r=0;r<t.length;r++){var n=t[r];n.selected&&e.push(n.value)}return e},a=function(t,e){if(o.default(t)){if(!e&&t.nativeEvent&&void 0!==t.nativeEvent.text)return t.nativeEvent.text;if(e&&void 0!==t.nativeEvent)return t.nativeEvent.text;var r=t.target,n=r.type,u=r.value,a=r.checked,s=r.files,f=t.dataTransfer;return"checkbox"===n?a:"file"===n?s||f&&f.files:"select-multiple"===n?i(t.target.options):u}return t&&"object"==typeof t&&void 0!==t.value?t.value:t};e.default=a,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t){return!!(t&&t.stopPropagation&&t.preventDefault)};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(9),o=n(u),i=function(t){var e=o.default(t);return e&&t.preventDefault(),e};e.default=i,t.exports=e.default},function(t,e){"use strict";function r(t){return t.displayName||t.name||"Component"}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function u(t,e,r){var n=t.indexOf("."),o=t.indexOf("["),i=t.indexOf("]");if(o>0&&i!==o+1)throw new Error("found [ not followed by ]");if(o>0&&(0>n||n>o))!function(){var n=t.substring(0,o),a=t.substring(i+1);"."===a[0]&&(a=a.substring(1));var s=e&&e[n]||[];a?(r[n]||(r[n]=[]),s.forEach(function(t,e){r[n][e]||(r[n][e]={}),u(a,t,r[n][e])})):r[n]=s.map(function(t){return t.value})}();else if(n>0){var a=t.substring(0,n),s=t.substring(n+1);r[a]||(r[a]={}),u(s,e&&e[a]||{},r[a])}else r[t]=e[t]&&e[t].value},n=function(t,e){return t.reduce(function(t,n){return r(n,e,t),t},{})};e.default=n,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function n(t){if(!t)return t;var e=Object.keys(t);if(e.length)return e.reduce(function(e,r){var u=t[r];return u&&(u.hasOwnProperty&&u.hasOwnProperty("value")?void 0!==u.value&&(e[r]=u.value):Array.isArray(u)?e[r]=u.map(function(t){return t.value||n(t)}):"string"!=typeof u&&(e[r]=n(u))),e},{})};e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t,e){var r=!0;t:for(;r;){var n=t,u=e;if(r=!1,!n||!u)return u;var o=n.indexOf(".");if(0!==o){var i=n.indexOf("["),a=n.indexOf("]");if(o>=0&&(0>i||i>o))t=n.substring(o+1),e=u[n.substring(0,o)],r=!0,o=i=a=void 0;else{if(!(i>=0&&(0>o||o>i)))return u[n];if(0>a)throw new Error("found [ but no ]");var s=n.substring(0,i),f=n.substring(i+1,a);if(0===i){t=n.substring(a+1),e=u[f],r=!0,o=i=a=s=f=void 0;continue t}if(!u[s])return;t=n.substring(a+1),e=u[s][f],r=!0,o=i=a=s=f=void 0}}else t=n.substring(1),e=u,r=!0,o=void 0}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function o(){var t,e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r.form,o=r.key,i=u(r,["form","key"]);if(!n)return e;if(o){var a,c;if(r.type===f.DESTROY){var l;return s({},e,(l={},l[n]=e[n]&&Object.keys(e[n]).reduce(function(t,r){var u;return r===o?t:s({},t,(u={},u[r]=e[n][r],u))},{}),l))}return s({},e,(c={},c[n]=s({},e[n],(a={},a[o]=S((e[n]||{})[o],i),a)),c))}return r.type===f.DESTROY?Object.keys(e).reduce(function(t,r){var u;return r===n?t:s({},t,(u={},u[r]=e[r],u))},{}):s({},e,(t={},t[n]=S(e[n],i),t))}function i(t){return t.plugin=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=e(r,n);return s({},u,l.default(t,function(t,e){return t(u[e]||x,n)}))})},t.normalize=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=e(r,n);return s({},u,l.default(t,function(t,e){var o=function(e,r){var n=m.default(s({},x,e)),u=s({},x,r);return s({},u,l.default(t,function(t,r){return s({},u[r],{value:t(u[r]?u[r].value:void 0,e&&e[r]?e[r].value:void 0,m.default(u),n)})}))};if(n.key){var i;return s({},u[e],(i={},i[n.key]=o(r[e][n.key],u[e][n.key]),i))}return o(r[e],u[e])}))})},t}e.__esModule=!0;var a,s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f=r(2),c=r(3),l=n(c),d=r(14),p=n(d),v=r(16),y=n(v),h=r(13),m=n(h),g=r(38),b=n(g),_=r(42),O=n(_),x={_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1,_submitFailed:!1};e.initialState=x;var A=(a={},a[f.ADD_ARRAY_VALUE]=function(t,e){var r=e.path,n=e.index,u=e.value,o=p.default(r,t),i=s({},t),a=o?[].concat(o):[],f={value:u};return void 0===n?a.push(f):a.splice(n,0,f),y.default(r,a,i)},a[f.BLUR]=function(t,e){var r=e.field,n=e.value,o=e.touch,i=(t._active,u(t,["_active"]));return y.default(r,function(t){var e=s({},t);return void 0!==n&&(e.value=n),o&&(e.touched=!0),e},i)},a[f.CHANGE]=function(t,e){var r=e.field,n=e.value,o=e.touch;return y.default(r,function(t){var e=s({},t,{value:n}),r=(e.asyncError,e.submitError,u(e,["asyncError","submitError"]));return o&&(r.touched=!0),r},t)},a[f.DESTROY]=function(){},a[f.FOCUS]=function(t,e){var r=e.field,n=y.default(r+".visited",!0,t);return n._active=r,n},a[f.INITIALIZE]=function(t,e){var r=e.data;return s({},b.default(r),{_asyncValidating:!1,_active:void 0,_error:void 0,_submitting:!1,_submitFailed:!1})},a[f.REMOVE_ARRAY_VALUE]=function(t,e){var r=e.path,n=e.index,u=p.default(r,t),o=s({},t),i=u?[].concat(u):[];return void 0===n?i.pop():isNaN(n)?delete i[n]:i.splice(n,1),y.default(r,i,o)},a[f.RESET]=function(t){return s({},O.default(t),{_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1,_submitFailed:!1})},a[f.START_ASYNC_VALIDATION]=function(t){return s({},t,{_asyncValidating:!0})},a[f.START_SUBMIT]=function(t){return s({},t,{_submitting:!0})},a[f.STOP_ASYNC_VALIDATION]=function(t,e){var r=e.errors;return s({},l.default(t,function(t){return t&&t.asyncError?s({},t,{asyncError:void 0}):t}),l.default(r,function(e,r){return s({},t[r],{asyncError:e})}),{_asyncValidating:!1,_error:r&&r._error})},a[f.STOP_SUBMIT]=function(t,e){var r=e.errors;return s({},t,r?l.default(r,function(e,r){return s({},t[r],{submitError:e})}):{},{_error:r&&r._error,_submitting:!1,_submitFailed:!(!r||!Object.keys(r).length)})},a[f.SUBMIT_FAILED]=function(t){return s({},t,{_submitFailed:!0})},a[f.TOUCH]=function(t,e){var r=e.fields;return s({},t,r.reduce(function(t,e){return y.default(e,function(t){return s({},t,{touched:!0})},t)},t))},a[f.UNTOUCH]=function(t,e){var r=e.fields;return s({},t,r.reduce(function(t,e){return y.default(e,function(t){if(t){var e=(t.touched,u(t,["touched"]));return e}return t},t)},t))},a),S=function(){var t=arguments.length<=0||void 0===arguments[0]?x:arguments[0],e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=A[e.type];return r?r(t,e):t};e.default=i(o)},function(t,e){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=function u(t,e,n){for(var o=!0;o;){var i,a=t,s=e,f=n;o=!1;var c=a.indexOf(".");if(0!==c){var l=a.indexOf("["),d=a.indexOf("]");if(c>=0&&(0>l||l>c)){var p,v=a.substring(0,c);return r({},f,(p={},p[v]=u(a.substring(c+1),s,f[v]||{}),p))}if(l>=0&&(0>c||c>l)){var y,h,m,g,b=function(){if(0>d)throw new Error("found [ but no ]");var t=a.substring(0,l),e=a.substring(l+1,d),n=f[t]||[],o=a.substring(d+1);if(e){if(o.length){var i=n[e]||{},c=[].concat(n);return c[e]=u(o,s,i),{v:r({},f||{},(m={},m[t]=c,m))}}var p=[].concat(n);return p[e]="function"==typeof s?s(p[e]):s,{v:r({},f||{},(h={},h[t]=p,h))}}if(o.length){var c=n.map(function(t){return u(o,s,t)});return{v:r({},f||{},(g={},g[t]=c,g))}}return{v:r({},f||{},(y={},y[t]=n.map(function(t){return"function"==typeof s?s(t):s}),y))}}();if("object"==typeof b)return b.v}return r({},f,(i={},i[a]="function"==typeof s?s(f[a]):s,i))}t=a.substring(1),e=s,n=f,o=!0,i=c=void 0}};e.default=n,t.exports=e.default},function(t,e,r){function n(t){return null===t||void 0===t}function u(t){return t&&"object"==typeof t&&"number"==typeof t.length?"function"!=typeof t.copy||"function"!=typeof t.slice?!1:t.length>0&&"number"!=typeof t[0]?!1:!0:!1}function o(t,e,r){var o,c;if(n(t)||n(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return s(e)?(t=i.call(t),e=i.call(e),f(t,e,r)):!1;if(u(t)){if(!u(e))return!1;if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}try{var l=a(t),d=a(e)}catch(p){return!1}if(l.length!=d.length)return!1;for(l.sort(),d.sort(),o=l.length-1;o>=0;o--)if(l[o]!=d[o])return!1;for(o=l.length-1;o>=0;o--)if(c=l[o],!f(t[c],e[c],r))return!1;return typeof t==typeof e}var i=Array.prototype.slice,a=r(48),s=r(47),f=t.exports=function(t,e,r){return r||(r={}),t===e?!0:t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?t===e:t==e:o(t,e,r)}},function(t,e){"use strict";var r={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};t.exports=function(t,e){for(var u=Object.getOwnPropertyNames(e),o=0;o<u.length;++o)r[u[o]]||n[u[o]]||(t[u[o]]=e[u[o]]);return t}},function(t,e){"use strict";function r(t){return t.shape({subscribe:t.func.isRequired,dispatch:t.func.isRequired,getState:t.func.isRequired})}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){function r(){return f}function n(t){c.push(t);var e=!0;return function(){if(e){e=!1;var r=c.indexOf(t);c.splice(r,1)}}}function u(t){if(!i.default(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,f=s(f,t)}finally{l=!1}return c.slice().forEach(function(t){return t()}),t}function o(t){s=t,u({type:a.INIT})}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var s=t,f=e,c=[],l=!1;return u({type:a.INIT}),{dispatch:u,subscribe:n,getState:r,replaceReducer:o}}e.__esModule=!0,e.default=u;var o=r(23),i=n(o),a={INIT:"@@redux/INIT"};e.ActionTypes=a},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(20),o=n(u),i=r(61),a=n(i),s=r(60),f=n(s),c=r(59),l=n(c),d=r(22),p=n(d);e.createStore=o.default,e.combineReducers=a.default,e.bindActionCreators=f.default,e.applyMiddleware=l.default,e.compose=p.default},function(t,e){"use strict";function r(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return e.reduceRight(function(t,e){return e(t)},t)}}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return r[n]=e(t[n],n),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(4),o=n(u),i=r(1),a=n(i),s=function(t,e,r){e();var n=t();if(!o.default(n))throw new Error("asyncValidate function passed to reduxForm must return a promise");var u=function(t){return function(e){if(!a.default(e))return r(e),Promise.reject();if(t)throw r(),new Error("Asynchronous validation promise was rejected without errors.");return r(),Promise.resolve()}};return n.then(u(!1),u(!0))};e.default=s,t.exports=e.default},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function u(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,r){return{actionTypes:g,blur:S,change:j,changeWithKey:T,destroy:R,focus:M,getValues:x.default,initialize:w,initializeWithKey:E,propTypes:_.default(e),reduxForm:c.default(t,e,r),reducer:s.default,reset:P,startAsyncValidation:V,startSubmit:I,stopAsyncValidation:C,stopSubmit:F,submitFailed:N,touch:U,touchWithKey:q,untouch:D,untouchWithKey:k}}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=o;var a=r(15),s=u(a),f=r(30),c=u(f),l=r(3),d=u(l),p=r(6),v=u(p),y=r(5),h=n(y),m=r(2),g=n(m),b=r(29),_=u(b),O=r(13),x=u(O),A=i({},d.default(i({},h,{changeWithKey:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;e>n;n++)r[n-1]=arguments[n];return v.default(h.change,{key:t}).apply(void 0,r)},initializeWithKey:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;e>n;n++)r[n-1]=arguments[n];return v.default(h.initialize,{key:t}).apply(void 0,r)},reset:function(t){return v.default(h.reset,{key:t})()},touchWithKey:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;e>n;n++)r[n-1]=arguments[n];return v.default(h.touch,{key:t}).apply(void 0,r)},untouchWithKey:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;e>n;n++)r[n-1]=arguments[n];return v.default(h.untouch,{key:t}).apply(void 0,r)},destroy:function(t){return v.default(h.destroy,{key:t})()}}),function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),u=1;r>u;u++)n[u-1]=arguments[u];return v.default(t,{form:e}).apply(void 0,n)}})),S=A.blur,j=A.change,T=A.changeWithKey,R=A.destroy,M=A.focus,w=A.initialize,E=A.initializeWithKey,P=A.reset,V=A.startAsyncValidation,I=A.startSubmit,C=A.stopAsyncValidation,F=A.stopSubmit,N=A.submitFailed,U=A.touch,q=A.touchWithKey,D=A.untouch,k=A.untouchWithKey;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f=r(5),c=u(f),l=r(11),d=n(l),p=r(15),v=r(17),y=n(v),h=r(6),m=n(h),g=r(12),b=n(g),_=r(1),O=n(_),x=r(41),A=n(x),S=r(37),j=n(S),T=r(26),R=n(T),M=r(36),w=n(M),E=r(10),P=n(E),V=r(45),I=n(V),C=r(46),F=n(C),N=function(t,e,r,n,u,f,l){var v=r.Component,h=r.PropTypes;return function(g,_,x,S){var T=function(n){function f(t){i(this,f),n.call(this,t),this.asyncValidate=this.asyncValidate.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.fields=A.default(t,{},this.asyncValidate,e)}return a(f,n),f.prototype.componentWillMount=function(){var t=this.props,e=t.initialize,r=t.initialValues;r&&e(r)},f.prototype.componentWillReceiveProps=function(t){y.default(this.props.fields,t.fields)&&y.default(this.props.form,t.form)||(this.fields=A.default(t,this.fields,this.asyncValidate,e)),y.default(this.props.initialValues,t.initialValues)||this.props.initialize(t.initialValues)},f.prototype.componentWillUnmount=function(){t.destroyOnUnmount&&this.props.destroy()},f.prototype.asyncValidate=function c(t,e){var r=this,n=this.props,c=n.asyncValidate,u=n.dispatch,o=n.fields,i=n.form,a=n.startAsyncValidation,s=n.stopAsyncValidation,f=n.validate;if(c){var l=function(){var n=b.default(o,i);t&&(n[t]=e);var l=f(n,r.props);return!t||O.default(l[t])?{v:R.default(function(){return c(n,u,r.props)},a,s)}:void 0}();if("object"==typeof l)return l.v}},f.prototype.handleSubmit=function(t){var e=this,r=this.props,n=r.onSubmit,u=r.fields,o=r.form,i=function(t){if(!t||"function"!=typeof t)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return t},a=b.default(u,o);return!t||P.default(t)?j.default(i(n),a,this.props,this.asyncValidate):w.default(function(r){P.default(r),j.default(i(t),a,e.props,e.asyncValidate)})},f.prototype.render=function(){var t,e=this,n=this.fields,i=this.props,a=(i.addArrayValue,i.asyncBlurFields,i.blur,i.change,i.destroy),f=(i.focus,i.fields),c=i.form,l=(i.initialValues,i.initialize),d=(i.onSubmit,i.propNamespace),p=i.reset,v=(i.removeArrayValue,i.returnRejectedSubmitPromise,i.startAsyncValidation,i.startSubmit,i.stopAsyncValidation,i.stopSubmit,i.submitFailed,i.touch),y=i.untouch,h=(i.validate,o(i,["addArrayValue","asyncBlurFields","blur","change","destroy","focus","fields","form","initialValues","initialize","onSubmit","propNamespace","reset","removeArrayValue","returnRejectedSubmitPromise","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitFailed","touch","untouch","validate"])),m=n._meta,g=m.allPristine,b=m.allValid,_=m.errors,O=m.formError,A=m.values,S={active:c._active,asyncValidating:c._asyncValidating,dirty:!g,error:O,errors:_,fields:n,formKey:x,invalid:!b,pristine:g,submitting:c._submitting,submitFailed:c._submitFailed,valid:b,values:A,asyncValidate:w.default(function(){return e.asyncValidate()}),destroyForm:w.default(a),handleSubmit:this.handleSubmit,initializeForm:w.default(l),resetForm:w.default(p),touch:w.default(function(){return v.apply(void 0,arguments)}),touchAll:w.default(function(){return v.apply(void 0,f)}),untouch:w.default(function(){return y.apply(void 0,arguments)}),untouchAll:w.default(function(){return y.apply(void 0,f)})},j=d?(t={},t[d]=S,t):S;return r.createElement(u,s({},h,j))},f}(v);T.displayName="ReduxForm("+d.default(u)+")",T.WrappedComponent=u,T.propTypes={asyncBlurFields:h.arrayOf(h.string),asyncValidate:h.func,dispatch:h.func.isRequired,fields:h.arrayOf(h.string).isRequired,form:h.object,initialValues:h.any,onSubmit:h.func,propNamespace:h.string,readonly:h.bool,returnRejectedSubmitPromise:h.bool,validate:h.func,addArrayValue:h.func.isRequired,blur:h.func.isRequired,change:h.func.isRequired,destroy:h.func.isRequired,focus:h.func.isRequired,initialize:h.func.isRequired,removeArrayValue:h.func.isRequired,reset:h.func.isRequired,startAsyncValidation:h.func.isRequired,startSubmit:h.func.isRequired,stopAsyncValidation:h.func.isRequired,stopSubmit:h.func.isRequired,submitFailed:h.func.isRequired,touch:h.func.isRequired,untouch:h.func.isRequired},T.defaultProps={asyncBlurFields:[],form:p.initialState,readonly:!1,returnRejectedSubmitPromise:!1,validate:function(){return{}}};var M=s({},c,{blur:m.default(c.blur,{touch:!!t.touchOnBlur}),change:m.default(c.change,{touch:!!t.touchOnChange})}),E=void 0!==x&&null!==x?n(F.default(f,function(t){var e=S(t,g);if(!e)throw new Error('You need to mount the redux-form reducer at "'+g+'"');return e&&e[_]&&e[_][x]}),I.default(l,m.default(M,{form:_,key:x}))):n(F.default(f,function(t){var e=S(t,g);if(!e)throw new Error('You need to mount the redux-form reducer at "'+g+'"');return e&&e[_]}),I.default(l,m.default(M,{form:_})));return E(T)}};e.default=N,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t){var e=t.PropTypes,r=e.any,n=e.bool,u=e.string,o=e.func,i=e.object;return{active:u,asyncValidating:n.isRequired,dirty:n.isRequired,error:r,errors:i,fields:i.isRequired,formKey:r,invalid:n.isRequired,pristine:n.isRequired,submitting:n.isRequired,submitFailed:n.isRequired,valid:n.isRequired,values:i.isRequired,asyncValidate:o.isRequired,destroyForm:o.isRequired,handleSubmit:o.isRequired,initializeForm:o.isRequired,resetForm:o.isRequired,touch:o.isRequired,touchAll:o.isRequired,untouch:o.isRequired,untouchAll:o.isRequired}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a=r(31),s=n(a),f=r(18),c=n(f),l=function(t,e,r){var n=e.Component,a=s.default(t,e,r);return function(t,r,s){return function(f){var l=a(f,r,s),d=i({touchOnBlur:!0,touchOnChange:!1,destroyOnUnmount:!0},t),p=function(t){function r(){u(this,r),t.apply(this,arguments)}return o(r,t),r.prototype.render=function(){return e.createElement(l,i({},d,this.props))},r}(n);return c.default(p,f)}}};e.default=l,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=r(50),s=n(a),f=r(11),c=n(f),l=r(28),d=n(l),p=function(t,e,r){return function(n,a,f){var l=e.Component,p=e.PropTypes,v=function(c){function l(u){o(this,l),c.call(this,u),this.cache=s.default(this,{ReduxForm:{params:["reduxMountPoint","form","formKey","getFormState"],fn:d.default(u,t,e,r,n,a,f)}})}return i(l,c),l.prototype.componentWillReceiveProps=function(t){this.cache.componentWillReceiveProps(t)},l.prototype.render=function(){var t=this.cache.ReduxForm,r=this.props,n=(r.reduxMountPoint,r.destroyOnUnmount,r.form,r.getFormState,r.touchOnBlur,r.touchOnChange,u(r,["reduxMountPoint","destroyOnUnmount","form","getFormState","touchOnBlur","touchOnChange"]));return e.createElement(t,n)},l}(l);return v.displayName="ReduxFormConnector("+c.default(n)+")",v.WrappedComponent=n,v.propTypes={destroyOnUnmount:p.bool,reduxMountPoint:p.string,form:p.string.isRequired,formKey:p.string,getFormState:p.func,touchOnBlur:p.bool,touchOnChange:p.bool},v.defaultProps={reduxMountPoint:"form",getFormState:function(t,e){return t[e]}},v}};e.default=p,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(8),o=n(u),i=function(t,e,r,n){return function(u){var i=o.default(u,r);e(t,i),n&&n(t,i)}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(8),o=n(u),i=function(t,e,r){return function(n){return e(t,o.default(n,r))}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=r(7),u=function(t,e){return function(r){e(t,r.dataTransfer.getData(n.dataKey))}};e.default=u,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t,e){return function(){return e(t)}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(10),o=n(u),i=function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),u=1;r>u;u++)n[u-1]=arguments[u];return o.default(e)?t.apply(void 0,n):t.apply(void 0,[e].concat(n))}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(4),o=n(u),i=r(1),a=n(i),s=function(t,e,r,n){var u=r.dispatch,i=r.fields,s=r.startSubmit,f=r.stopSubmit,c=r.submitFailed,l=r.returnRejectedSubmitPromise,d=r.touch,p=r.validate,v=p(e,r);if(d.apply(void 0,i),a.default(v)){var y=function(){var r=t(e,u);return o.default(r)?(s(),r.then(function(t){return f(),t},function(t){return f(t),l?Promise.reject(t):void 0})):r},h=n();return o.default(h)?h.then(y,function(){return c(),l?Promise.reject():Promise.resolve()}):y()}c()};e.default=s,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t){return void 0===t?{}:{initial:t,value:t}},n=function u(t){return t?Object.keys(t).reduce(function(e,n){var o=t[n];return Array.isArray(o)?e[n]=o.map(function(t){return"object"==typeof t?u(t):r(t)}):null!==o&&"object"==typeof o?e[n]=u(o):e[n]=r(o),e},{}):t};e.default=n,t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;if("boolean"==typeof t||"boolean"==typeof e)return t===e;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t&&"object"==typeof t){if(!e||"object"!=typeof e)return!1;var n=Object.keys(t),u=Object.keys(e);if(n.length!==u.length)return!1;for(var o=0;o<u.length;o++){var i=u[o];if(!r(t[i],e[i]))return!1}}else if(t||e)return t===e;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(32),o=n(u),i=r(33),a=n(i),s=r(7),f=n(s),c=r(34),l=n(c),d=r(35),p=n(d),v=r(43),y=n(v),h=r(14),m=n(h),g=r(44),b=n(g),_=function O(t,e,r,n,u,i,s,c){for(var d=arguments,v=!0;v;){var h=t,g=e,_=r,x=n,A=u,S=i,j=s,T=c;void 0===_&&(_=""),v=!1;var R=d.length<=8||void 0===d[8]?function(){return null}:d[8],M=T.asyncBlurFields,w=T.blur,E=T.change,P=T.focus,V=T.form,I=T.initialValues,C=T.readonly,F=T.addArrayValue,N=T.removeArrayValue,U=g.indexOf("."),q=g.indexOf("["),D=g.indexOf("]");if(q>0&&D!==q+1)throw new Error("found [ not followed by ]");if(q>0&&(0>U||U>q)){var k=function(){var t=g.substring(0,q),e=g.substring(D+1);"."===e[0]&&(e=e.substring(1));var r=h&&h[t]||[];x[t]||(x[t]=[],Object.defineProperty(x[t],"addField",{value:function(e,r){return F(_+t,e,r)}}),Object.defineProperty(x[t],"removeField",{value:function(e){return N(_+t,e)}}));var n=x[t];return r.forEach(function(r,u){e&&!n[u]&&(n[u]={});var o=e?n[u]:{},i=O(r,e,""+_+t+"["+u+"]"+(e?".":""),o,A,S,j,T,R);e||(n[u]=i)}),n.length>r.length&&n.splice(r.length,n.length-r.length),{v:n}}();if("object"==typeof k)return k.v}if(!(U>0)){var W=_+g,B=x[g]||{};if(B.name!==W){var L=a.default(W,E,j),K=m.default(W,I);B.name=W,B.defaultChecked=K===!0,B.defaultValue=K,B.initialValue=K,C||(B.onBlur=o.default(W,w,j,~M.indexOf(W)&&function(t,e){return y.default(S(t,e))}),B.onChange=L,B.onDragStart=f.default(W,function(){return B.value}),B.onDrop=l.default(W,E), | ||
B.onFocus=p.default(W,P),B.onUpdate=L),B.valid=!0,B.invalid=!1}var Y=(g?h[g]:h)||{},z=m.default(W,A),H=b.default(B,Y,W===V._active,z);return(g||x[g]!==H)&&(x[g]=H),R(H),H}var G=g.substring(0,U),Z=g.substring(U+1);x[G]||(x[G]={}),d=[t=h[G]||{},e=Z,r=_+G+".",n=x[G],u=A,i=S,s=j,c=T,R],v=!0,R=M=w=E=P=V=I=C=F=N=U=q=D=k=G=Z=void 0}};e.default=_,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(40),i=n(o),a=r(16),s=n(a),f=r(12),c=n(f),l=function(t,e,r,n){var o=t.fields,a=t.form,f=t.validate,l=c.default(o,a),d=f(l,t),p={},v=d._error||a._error,y=!v,h=!0,m=function(t){t.error&&(p=s.default(t.name,t.error,p),y=!1),t.dirty&&(h=!1)},g=u({},e);return o.forEach(function(e){i.default(a,e,void 0,g,d,r,n,t,m)}),Object.defineProperty(g,"_meta",{value:{allPristine:h,allValid:y,values:l,errors:p,formError:v}}),g};e.default=l,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t){return void 0===t||t&&void 0===t.initial?{}:{initial:t.initial,value:t.initial}},n=function(t){return t&&"object"==typeof t&&(void 0!==t.value||void 0!==t.initial)},u=function o(t){return t?Object.keys(t).reduce(function(e,u){var i=t[u];return Array.isArray(i)?e[u]=i.map(function(t){return n(t)?r(t):o(t)}):i&&(n(i)?e[u]=r(i):"object"==typeof i&&null!==i?e[u]=o(i):e[u]=i),e},{}):t};e.default=u,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(4),o=n(u),i=function(){},a=function(t){return o.default(t)?t.then(i,i):t};e.default=a,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(39),i=n(o),a=r(1),s=n(a),f=function(t,e,r,n){var o={};t.value!==e.value&&(o.value=e.value,o.checked="boolean"==typeof e.value?e.value:void 0);var a=i.default(e.value,e.initial);t.pristine!==a&&(o.dirty=!a,o.pristine=a);var f=n||e.submitError||e.asyncError;f!==t.error&&(o.error=f);var c=s.default(f);t.valid!==c&&(o.invalid=!c,o.valid=c),r!==t.active&&(o.active=r);var l=!!e.touched;l!==t.touched&&(o.touched=l);var d=!!e.visited;return d!==t.visited&&(o.visited=d),Object.keys(o).length?u({},t,o):t};e.default=f,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},u=r(21),o=function(t,e){return t?"function"==typeof t?t.length>1?function(r,o){return n({},t(r,o),u.bindActionCreators(e,r),{dispatch:r})}:function(r){return n({},t(r),u.bindActionCreators(e,r),{dispatch:r})}:function(r){return n({},u.bindActionCreators(t,r),u.bindActionCreators(e,r),{dispatch:r})}:function(t){return n({},u.bindActionCreators(e,t),{dispatch:t})}};e.default=o,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=function(t,e){if(t){if("function"!=typeof t)throw new Error("mapStateToProps must be a function");return t.length>1?function(n,u){return r({},t(n,u),{form:e(n)})}:function(n){return r({},t(n),{form:e(n)})}}return function(t){return{form:e(t)}}};e.default=n,t.exports=e.default},function(t,e){function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function n(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var u="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=u?r:n,e.supported=r,e.unsupported=n},function(t,e){function r(t){var e=[];for(var r in t)e.push(r);return e}e=t.exports="function"==typeof Object.keys?Object.keys:r,e.shim=r},function(t,e,r){"use strict";var n=function(t,e,r,n,u,o,i,a){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[r,n,u,o,i,a],c=0;s=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return f[c++]}))}throw s.framesToPop=1,s}};t.exports=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(51),o=n(u);e.default=o.default,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r=[],n={},u={},o=function a(t){Object.keys(n).forEach(function(e){~n[e].props.indexOf(t)&&(delete n[e].value,a(e))})};return Object.keys(e).forEach(function(o){var i=e[o].fn,a=e[o].params;a.forEach(function(t){~r.indexOf(t)||r.push(t)}),n[o]={props:a},Object.defineProperty(u,o,{get:function(){var e=n[o];if(e&&void 0!==e.value)return e.value;var r=a.map(function(e){return t.props[e]||u[e]}),s=i.apply(void 0,r);return n[o]={props:a,value:s},s}})}),u.componentWillReceiveProps=function(e){var n=[];r.forEach(function(r){i.default(t.props[r],e[r])||n.push(r)}),n.forEach(o)},u}e.__esModule=!0,e.default=u;var o=r(17),i=n(o);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){var e=i.default(t),r=s.default(t);return{Provider:e,connect:r}}e.__esModule=!0,e.default=u;var o=r(54),i=n(o),a=r(53),s=n(a);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return t.displayName||t.name||"Component"}function a(t){var e=t.Component,r=t.PropTypes,n=c.default(r);return function(r,a,f){function c(t,e){var r=t.getState(),n=R?b(r,e):b(r);return _.default(v.default(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function l(t,e){var r=t.dispatch,n=M?j(r,e):j(r);return _.default(v.default(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function p(t,e,r){var n=T(t,e,r);return _.default(v.default(n),"`mergeProps` must return an object. Instead received %s.",n),n}var y=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],m=Boolean(r),b=r||O,j=v.default(a)?h.default(a):a||x,T=f||A,R=b.length>1,M=j.length>1,w=y.pure,E=void 0===w?!0:w,P=S++;return function(r){var a=function(e){function n(t,r){u(this,n),e.call(this,t,r),this.version=P,this.store=t.store||r.store,_.default(this.store,'Could not find "store" in either the context or '+('props of "'+this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+this.constructor.displayName+'".')),this.stateProps=c(this.store,t),this.dispatchProps=l(this.store,t),this.state={storeState:null},this.updateState()}return o(n,e),n.prototype.shouldComponentUpdate=function(t,e){if(!E)return this.updateStateProps(t),this.updateDispatchProps(t),this.updateState(t),!0;var r=e.storeState!==this.state.storeState,n=!d.default(t,this.props),u=!1,o=!1;return(r||n&&R)&&(u=this.updateStateProps(t)),n&&M&&(o=this.updateDispatchProps(t)),n||u||o?(this.updateState(t),!0):!1},n.prototype.computeNextState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return p(this.stateProps,this.dispatchProps,t)},n.prototype.updateStateProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=c(this.store,t);return d.default(e,this.stateProps)?!1:(this.stateProps=e,!0)},n.prototype.updateDispatchProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=l(this.store,t);return d.default(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},n.prototype.updateState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];this.nextState=this.computeNextState(t)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){m&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},n.prototype.handleChange=function(){this.unsubscribe&&this.setState({storeState:this.store.getState()})},n.prototype.getWrappedInstance=function(){return this.refs.wrappedInstance},n.prototype.render=function(){return t.createElement(r,s({ref:"wrappedInstance"},this.nextState))},n}(e);return a.displayName="Connect("+i(r)+")",a.WrappedComponent=r,a.contextTypes={store:n},a.propTypes={store:n},g.default(a,r)}}}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=a;var f=r(19),c=n(f),l=r(57),d=n(l),p=r(56),v=n(p),y=r(58),h=n(y),m=r(18),g=n(m),b=r(49),_=n(b),O=function(){return{}},x=function(t){return{dispatch:t}},A=function(t,e,r){return s({},r,t,e)},S=0;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){var e=t.version;if("string"!=typeof e)return!0;var r=e.split("."),n=parseInt(r[0],10),u=parseInt(r[1],10);return 0===n&&13===u}function a(t){function e(){p||d||(p=!0,console.error("With React 0.14 and later versions, you no longer need to wrap <Provider> child into a function."))}function r(){!p&&d&&(p=!0,console.error("With React 0.13, you need to wrap <Provider> child into a function. This restriction will be removed with React 0.14."))}function n(){v||(v=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}var a=t.Component,s=t.PropTypes,c=t.Children,l=f.default(s),d=i(t),p=!1,v=!1,y=function(t){function i(e,r){u(this,i),t.call(this,e,r),this.store=e.store}return o(i,t),i.prototype.getChildContext=function(){return{store:this.store}},i.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&n()},i.prototype.render=function(){var t=this.props.children;return"function"==typeof t?(e(),t=t()):r(),c.only(t)},i}(a);return y.childContextTypes={store:l.isRequired},y.propTypes={store:l.isRequired,children:(d?s.func:s.element).isRequired},y}e.__esModule=!0,e.default=a;var s=r(19),f=n(s);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(25),o=n(u),i=r(52),a=n(i),s=a.default(o.default),f=s.Provider,c=s.connect;e.Provider=f,e.connect=c},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var u=Object.prototype.hasOwnProperty,o=0;o<r.length;o++)if(!u.call(e,r[o])||t[r[o]]!==e[r[o]])return!1;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return function(e){return u.bindActionCreators(t,e)}}e.__esModule=!0,e.default=n;var u=r(21);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return function(r,n){var u=t(r,n),i=u.dispatch,s=[],f={getState:u.getState,dispatch:function(t){return i(t)}};return s=e.map(function(t){return t(f)}),i=a.default.apply(void 0,s)(u.dispatch),o({},u,{dispatch:i})}}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var i=r(22),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){return function(){return e(t.apply(void 0,arguments))}}function o(t,e){if("function"==typeof t)return u(t,e);if("object"!=typeof t||null===t||void 0===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');return a.default(t,function(t){return u(t,e)})}e.__esModule=!0,e.default=o;var i=r(24),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r=e&&e.type,n=r&&'"'+r.toString()+'"'||"an action";return'Reducer "'+t+'" returned undefined handling '+n+". To ignore an action, you must explicitly return the previous state."}function o(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof n)throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var u="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof r(void 0,{type:u}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function i(t){var e,r=d.default(t,function(t){return"function"==typeof t});try{o(r)}catch(n){e=n}var i=c.default(r,function(){});return function(t,n){if(void 0===t&&(t=i),e)throw e;var o=!1,a=c.default(r,function(e,r){var i=t[r],a=e(i,n);if("undefined"==typeof a){var s=u(r,n);throw new Error(s)}return o=o||a!==i,a});return o?a:t}}e.__esModule=!0,e.default=i;var a=r(20),s=r(23),f=(n(s),r(24)),c=n(f),l=r(62),d=n(l);t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReduxForm=e(require("react")):t.ReduxForm=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var u=r[n]={exports:{},id:n,loaded:!1};return t[n].call(u.exports,u,u.exports,e),u.loaded=!0,u.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(25),o=n(u),i=r(55),a=r(27),s=n(a),f=s.default(!1,o.default,i.connect),c=f.actionTypes,l=f.blur,d=f.change,p=f.changeWithKey,v=f.destroy,y=f.focus,h=f.reducer,m=f.reduxForm,g=f.getValues,b=f.initialize,_=f.initializeWithKey,O=f.propTypes,x=f.reset,A=f.startAsyncValidation,S=f.startSubmit,j=f.stopAsyncValidation,T=f.stopSubmit,w=f.touch,R=f.touchWithKey,M=f.untouch,E=f.untouchWithKey;e.actionTypes=c,e.blur=l,e.change=d,e.changeWithKey=p,e.destroy=v,e.focus=y,e.reducer=h,e.reduxForm=m,e.getValues=g,e.initialize=b,e.initializeWithKey=_,e.propTypes=O,e.reset=x,e.startAsyncValidation=A,e.startSubmit=S,e.stopAsyncValidation=j,e.stopSubmit=T,e.touch=w,e.touchWithKey=R,e.untouch=M,e.untouchWithKey=E},function(t,e){"use strict";function r(t){return Array.isArray(t)?t.reduce(function(t,e){return t&&r(e)},!0):t&&"object"==typeof t?Object.keys(t).reduce(function(e,n){return e&&r(t[n])},!0):!t}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="redux-form/ADD_ARRAY_VALUE";e.ADD_ARRAY_VALUE=r;var n="redux-form/BLUR";e.BLUR=n;var u="redux-form/CHANGE";e.CHANGE=u;var o="redux-form/DESTROY";e.DESTROY=o;var i="redux-form/FOCUS";e.FOCUS=i;var a="redux-form/INITIALIZE";e.INITIALIZE=a;var s="redux-form/REMOVE_ARRAY_VALUE";e.REMOVE_ARRAY_VALUE=s;var f="redux-form/RESET";e.RESET=f;var c="redux-form/START_ASYNC_VALIDATION";e.START_ASYNC_VALIDATION=c;var l="redux-form/START_SUBMIT";e.START_SUBMIT=l;var d="redux-form/STOP_ASYNC_VALIDATION";e.STOP_ASYNC_VALIDATION=d;var p="redux-form/STOP_SUBMIT";e.STOP_SUBMIT=p;var v="redux-form/SUBMIT_FAILED";e.SUBMIT_FAILED=v;var y="redux-form/TOUCH";e.TOUCH=y;var h="redux-form/UNTOUCH";e.UNTOUCH=h},function(t,e){"use strict";function r(t,e){return t?Object.keys(t).reduce(function(r,u){var o;return n({},r,(o={},o[u]=e(t[u],u),o))},{}):t}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=r,t.exports=e.default},function(t,e){function r(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then}t.exports=r},function(t,e,r){"use strict";e.__esModule=!0;var n=r(2),u=function(t,e,r){return{type:n.ADD_ARRAY_VALUE,path:t,value:e,index:r}};e.addArrayValue=u;var o=function(t,e){return{type:n.BLUR,field:t,value:e}};e.blur=o;var i=function(t,e){return{type:n.CHANGE,field:t,value:e}};e.change=i;var a=function(){return{type:n.DESTROY}};e.destroy=a;var s=function(t){return{type:n.FOCUS,field:t}};e.focus=s;var f=function(t,e){if(!Array.isArray(e))throw new Error("must provide fields array to initialize() action creator");return{type:n.INITIALIZE,data:t,fields:e}};e.initialize=f;var c=function(t,e){return{type:n.REMOVE_ARRAY_VALUE,path:t,index:e}};e.removeArrayValue=c;var l=function(){return{type:n.RESET}};e.reset=l;var d=function(){return{type:n.START_ASYNC_VALIDATION}};e.startAsyncValidation=d;var p=function(){return{type:n.START_SUBMIT}};e.startSubmit=p;var v=function(t){return{type:n.STOP_ASYNC_VALIDATION,errors:t}};e.stopAsyncValidation=v;var y=function(t){return{type:n.STOP_SUBMIT,errors:t}};e.stopSubmit=y;var h=function(){return{type:n.SUBMIT_FAILED}};e.submitFailed=h;var m=function(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:n.TOUCH,fields:e}};e.touch=m;var g=function(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:n.UNTOUCH,fields:e}};e.untouch=g},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){return"function"==typeof t?function(){return o({},t.apply(void 0,arguments),e)}:"object"==typeof t?a.default(t,function(t){return u(t,e)}):t}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var i=r(3),a=n(i);t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="value";e.dataKey=r;var n=function(t,e){return function(t){t.dataTransfer.setData(r,e())}};e.default=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(9),o=n(u),i=function(t){var e=[];if(t)for(var r=0;r<t.length;r++){var n=t[r];n.selected&&e.push(n.value)}return e},a=function(t,e){if(o.default(t)){if(!e&&t.nativeEvent&&void 0!==t.nativeEvent.text)return t.nativeEvent.text;if(e&&void 0!==t.nativeEvent)return t.nativeEvent.text;var r=t.target,n=r.type,u=r.value,a=r.checked,s=r.files,f=t.dataTransfer;return"checkbox"===n?a:"file"===n?s||f&&f.files:"select-multiple"===n?i(t.target.options):u}return t&&"object"==typeof t&&void 0!==t.value?t.value:t};e.default=a,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t){return!!(t&&t.stopPropagation&&t.preventDefault)};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(9),o=n(u),i=function(t){var e=o.default(t);return e&&t.preventDefault(),e};e.default=i,t.exports=e.default},function(t,e){"use strict";function r(t){return t.displayName||t.name||"Component"}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function u(t,e,r){var n=t.indexOf("."),o=t.indexOf("["),i=t.indexOf("]");if(o>0&&i!==o+1)throw new Error("found [ not followed by ]");if(o>0&&(0>n||n>o))!function(){var n=t.substring(0,o),a=t.substring(i+1);"."===a[0]&&(a=a.substring(1));var s=e&&e[n]||[];a?(r[n]||(r[n]=[]),s.forEach(function(t,e){r[n][e]||(r[n][e]={}),u(a,t,r[n][e])})):r[n]=s.map(function(t){return t.value})}();else if(n>0){var a=t.substring(0,n),s=t.substring(n+1);r[a]||(r[a]={}),u(s,e&&e[a]||{},r[a])}else r[t]=e[t]&&e[t].value},n=function(t,e){return t.reduce(function(t,n){return r(n,e,t),t},{})};e.default=n,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function n(t){if(!t)return t;var e=Object.keys(t);if(e.length)return e.reduce(function(e,r){var u=t[r];return u&&(u.hasOwnProperty&&u.hasOwnProperty("value")?void 0!==u.value&&(e[r]=u.value):Array.isArray(u)?e[r]=u.map(function(t){return t.value||n(t)}):"string"!=typeof u&&(e[r]=n(u))),e},{})};e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t,e){var r=!0;t:for(;r;){var n=t,u=e;if(r=!1,!n||!u)return u;var o=n.indexOf(".");if(0!==o){var i=n.indexOf("["),a=n.indexOf("]");if(o>=0&&(0>i||i>o))t=n.substring(o+1),e=u[n.substring(0,o)],r=!0,o=i=a=void 0;else{if(!(i>=0&&(0>o||o>i)))return u[n];if(0>a)throw new Error("found [ but no ]");var s=n.substring(0,i),f=n.substring(i+1,a);if(!f.length)return u[s];if(0===i){t=n.substring(a+1),e=u[f],r=!0,o=i=a=s=f=void 0;continue t}if(!u[s])return;t=n.substring(a+1),e=u[s][f],r=!0,o=i=a=s=f=void 0}}else t=n.substring(1),e=u,r=!0,o=void 0}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function o(){var t,e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r.form,o=r.key,i=u(r,["form","key"]);if(!n)return e;if(o){var a,c;if(r.type===f.DESTROY){var l;return s({},e,(l={},l[n]=e[n]&&Object.keys(e[n]).reduce(function(t,r){var u;return r===o?t:s({},t,(u={},u[r]=e[n][r],u))},{}),l))}return s({},e,(c={},c[n]=s({},e[n],(a={},a[o]=S((e[n]||{})[o],i),a)),c))}return r.type===f.DESTROY?Object.keys(e).reduce(function(t,r){var u;return r===n?t:s({},t,(u={},u[r]=e[r],u))},{}):s({},e,(t={},t[n]=S(e[n],i),t))}function i(t){return t.plugin=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=e(r,n);return s({},u,l.default(t,function(t,e){return t(u[e]||x,n)}))})},t.normalize=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=e(r,n);return s({},u,l.default(t,function(t,e){var o=function(e,r){var n=m.default(s({},x,e)),u=s({},x,r);return s({},u,l.default(t,function(t,r){return s({},u[r],{value:t(u[r]?u[r].value:void 0,e&&e[r]?e[r].value:void 0,m.default(u),n)})}))};if(n.key){var i;return s({},u[e],(i={},i[n.key]=o(r[e][n.key],u[e][n.key]),i))}return o(r[e],u[e])}))})},t}e.__esModule=!0;var a,s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f=r(2),c=r(3),l=n(c),d=r(14),p=n(d),v=r(16),y=n(v),h=r(13),m=n(h),g=r(38),b=n(g),_=r(42),O=n(_),x={_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1,_submitFailed:!1};e.initialState=x;var A=(a={},a[f.ADD_ARRAY_VALUE]=function(t,e){var r=e.path,n=e.index,u=e.value,o=p.default(r,t),i=s({},t),a=o?[].concat(o):[],f={value:u};return void 0===n?a.push(f):a.splice(n,0,f),y.default(r,a,i)},a[f.BLUR]=function(t,e){var r=e.field,n=e.value,o=e.touch,i=(t._active,u(t,["_active"]));return y.default(r,function(t){var e=s({},t);return void 0!==n&&(e.value=n),o&&(e.touched=!0),e},i)},a[f.CHANGE]=function(t,e){var r=e.field,n=e.value,o=e.touch;return y.default(r,function(t){var e=s({},t,{value:n}),r=(e.asyncError,e.submitError,u(e,["asyncError","submitError"]));return o&&(r.touched=!0),r},t)},a[f.DESTROY]=function(){},a[f.FOCUS]=function(t,e){var r=e.field,n=y.default(r+".visited",!0,t);return n._active=r,n},a[f.INITIALIZE]=function(t,e){var r=e.data,n=e.fields;return s({},b.default(r,n,t),{_asyncValidating:!1,_active:void 0,_error:void 0,_submitting:!1,_submitFailed:!1})},a[f.REMOVE_ARRAY_VALUE]=function(t,e){var r=e.path,n=e.index,u=p.default(r,t),o=s({},t),i=u?[].concat(u):[];return void 0===n?i.pop():isNaN(n)?delete i[n]:i.splice(n,1),y.default(r,i,o)},a[f.RESET]=function(t){return s({},O.default(t),{_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1,_submitFailed:!1})},a[f.START_ASYNC_VALIDATION]=function(t){return s({},t,{_asyncValidating:!0})},a[f.START_SUBMIT]=function(t){return s({},t,{_submitting:!0})},a[f.STOP_ASYNC_VALIDATION]=function(t,e){var r=e.errors;return s({},l.default(t,function(t){return t&&t.asyncError?s({},t,{asyncError:void 0}):t}),l.default(r,function(e,r){return s({},t[r],{asyncError:e})}),{_asyncValidating:!1,_error:r&&r._error})},a[f.STOP_SUBMIT]=function(t,e){var r=e.errors;return s({},t,r?l.default(r,function(e,r){return s({},t[r],{submitError:e})}):{},{_error:r&&r._error,_submitting:!1,_submitFailed:!(!r||!Object.keys(r).length)})},a[f.SUBMIT_FAILED]=function(t){return s({},t,{_submitFailed:!0})},a[f.TOUCH]=function(t,e){var r=e.fields;return s({},t,r.reduce(function(t,e){return y.default(e,function(t){return s({},t,{touched:!0})},t)},t))},a[f.UNTOUCH]=function(t,e){var r=e.fields;return s({},t,r.reduce(function(t,e){return y.default(e,function(t){if(t){var e=(t.touched,u(t,["touched"]));return e}return t},t)},t))},a),S=function(){var t=arguments.length<=0||void 0===arguments[0]?x:arguments[0],e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=A[e.type];return r?r(t,e):t};e.default=i(o)},function(t,e){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=function u(t,e,n){for(var o=!0;o;){var i,a=t,s=e,f=n;o=!1;var c=a.indexOf(".");if(0!==c){var l=a.indexOf("["),d=a.indexOf("]");if(c>=0&&(0>l||l>c)){var p,v=a.substring(0,c);return r({},f,(p={},p[v]=u(a.substring(c+1),s,f[v]||{}),p))}if(l>=0&&(0>c||c>l)){var y,h,m,g,b=function(){if(0>d)throw new Error("found [ but no ]");var t=a.substring(0,l),e=a.substring(l+1,d),n=f[t]||[],o=a.substring(d+1);if(e){if(o.length){var i=n[e]||{},c=[].concat(n);return c[e]=u(o,s,i),{v:r({},f||{},(m={},m[t]=c,m))}}var p=[].concat(n);return p[e]="function"==typeof s?s(p[e]):s,{v:r({},f||{},(h={},h[t]=p,h))}}if(o.length){if(!(n&&n.length||"function"!=typeof s))return{v:f};var c=n.map(function(t){return u(o,s,t)});return{v:r({},f||{},(g={},g[t]=c,g))}}var v=void 0;if(Array.isArray(s))v=s;else if(f[t])v=n.map(function(t){return"function"==typeof s?s(t):s});else{if("function"==typeof s)return{v:f};v=s}return{v:r({},f||{},(y={},y[t]=v,y))}}();if("object"==typeof b)return b.v}return r({},f,(i={},i[a]="function"==typeof s?s(f[a]):s,i))}t=a.substring(1),e=s,n=f,o=!0,i=c=void 0}};e.default=n,t.exports=e.default},function(t,e,r){function n(t){return null===t||void 0===t}function u(t){return t&&"object"==typeof t&&"number"==typeof t.length?"function"!=typeof t.copy||"function"!=typeof t.slice?!1:t.length>0&&"number"!=typeof t[0]?!1:!0:!1}function o(t,e,r){var o,c;if(n(t)||n(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return s(e)?(t=i.call(t),e=i.call(e),f(t,e,r)):!1;if(u(t)){if(!u(e))return!1;if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}try{var l=a(t),d=a(e)}catch(p){return!1}if(l.length!=d.length)return!1;for(l.sort(),d.sort(),o=l.length-1;o>=0;o--)if(l[o]!=d[o])return!1;for(o=l.length-1;o>=0;o--)if(c=l[o],!f(t[c],e[c],r))return!1;return typeof t==typeof e}var i=Array.prototype.slice,a=r(48),s=r(47),f=t.exports=function(t,e,r){return r||(r={}),t===e?!0:t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?t===e:t==e:o(t,e,r)}},function(t,e){"use strict";var r={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};t.exports=function(t,e){for(var u=Object.getOwnPropertyNames(e),o=0;o<u.length;++o)r[u[o]]||n[u[o]]||(t[u[o]]=e[u[o]]);return t}},function(t,e){"use strict";function r(t){return t.shape({subscribe:t.func.isRequired,dispatch:t.func.isRequired,getState:t.func.isRequired})}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){function r(){return f}function n(t){c.push(t);var e=!0;return function(){if(e){e=!1;var r=c.indexOf(t);c.splice(r,1)}}}function u(t){if(!i.default(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,f=s(f,t)}finally{l=!1}return c.slice().forEach(function(t){return t()}),t}function o(t){s=t,u({type:a.INIT})}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var s=t,f=e,c=[],l=!1;return u({type:a.INIT}),{dispatch:u,subscribe:n,getState:r,replaceReducer:o}}e.__esModule=!0,e.default=u;var o=r(23),i=n(o),a={INIT:"@@redux/INIT"};e.ActionTypes=a},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(20),o=n(u),i=r(61),a=n(i),s=r(60),f=n(s),c=r(59),l=n(c),d=r(22),p=n(d);e.createStore=o.default,e.combineReducers=a.default,e.bindActionCreators=f.default,e.applyMiddleware=l.default,e.compose=p.default},function(t,e){"use strict";function r(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return e.reduceRight(function(t,e){return e(t)},t)}}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return r[n]=e(t[n],n),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(4),o=n(u),i=r(1),a=n(i),s=function(t,e,r){e();var n=t();if(!o.default(n))throw new Error("asyncValidate function passed to reduxForm must return a promise");var u=function(t){return function(e){if(!a.default(e))return r(e),Promise.reject();if(t)throw r(),new Error("Asynchronous validation promise was rejected without errors.");return r(),Promise.resolve()}};return n.then(u(!1),u(!0))};e.default=s,t.exports=e.default},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function u(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,r){return{actionTypes:g,blur:S,change:j,changeWithKey:T,destroy:w,focus:R,getValues:x.default,initialize:M,initializeWithKey:E,propTypes:_.default(e),reduxForm:c.default(t,e,r),reducer:s.default,reset:P,startAsyncValidation:V,startSubmit:I,stopAsyncValidation:C,stopSubmit:F,submitFailed:N,touch:U,touchWithKey:q,untouch:D,untouchWithKey:k}}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=o;var a=r(15),s=u(a),f=r(30),c=u(f),l=r(3),d=u(l),p=r(6),v=u(p),y=r(5),h=n(y),m=r(2),g=n(m),b=r(29),_=u(b),O=r(13),x=u(O),A=i({},d.default(i({},h,{changeWithKey:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;e>n;n++)r[n-1]=arguments[n];return v.default(h.change,{key:t}).apply(void 0,r)},initializeWithKey:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;e>n;n++)r[n-1]=arguments[n];return v.default(h.initialize,{key:t}).apply(void 0,r)},reset:function(t){return v.default(h.reset,{key:t})()},touchWithKey:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;e>n;n++)r[n-1]=arguments[n];return v.default(h.touch,{key:t}).apply(void 0,r)},untouchWithKey:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;e>n;n++)r[n-1]=arguments[n];return v.default(h.untouch,{key:t}).apply(void 0,r)},destroy:function(t){return v.default(h.destroy,{key:t})()}}),function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),u=1;r>u;u++)n[u-1]=arguments[u];return v.default(t,{form:e}).apply(void 0,n)}})),S=A.blur,j=A.change,T=A.changeWithKey,w=A.destroy,R=A.focus,M=A.initialize,E=A.initializeWithKey,P=A.reset,V=A.startAsyncValidation,I=A.startSubmit,C=A.stopAsyncValidation,F=A.stopSubmit,N=A.submitFailed,U=A.touch,q=A.touchWithKey,D=A.untouch,k=A.untouchWithKey;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f=r(5),c=u(f),l=r(11),d=n(l),p=r(15),v=r(17),y=n(v),h=r(6),m=n(h),g=r(12),b=n(g),_=r(1),O=n(_),x=r(41),A=n(x),S=r(37),j=n(S),T=r(26),w=n(T),R=r(36),M=n(R),E=r(10),P=n(E),V=r(45),I=n(V),C=r(46),F=n(C),N=function(t,e,r,n,u,f,l){var v=r.Component,h=r.PropTypes;return function(g,_,x,S){var T=function(n){function f(t){i(this,f),n.call(this,t),this.asyncValidate=this.asyncValidate.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.fields=A.default(t,{},this.asyncValidate,e)}return a(f,n),f.prototype.componentWillMount=function(){var t=this.props,e=t.fields,r=t.initialize,n=t.initialValues;n&&r(n,e)},f.prototype.componentWillReceiveProps=function(t){y.default(this.props.fields,t.fields)&&y.default(this.props.form,t.form)||(this.fields=A.default(t,this.fields,this.asyncValidate,e)),y.default(this.props.initialValues,t.initialValues)||this.props.initialize(t.initialValues)},f.prototype.componentWillUnmount=function(){t.destroyOnUnmount&&this.props.destroy()},f.prototype.asyncValidate=function c(t,e){var r=this,n=this.props,c=n.asyncValidate,u=n.dispatch,o=n.fields,i=n.form,a=n.startAsyncValidation,s=n.stopAsyncValidation,f=n.validate;if(c){var l=function(){var n=b.default(o,i);t&&(n[t]=e);var l=f(n,r.props);return!t||O.default(l[t])?{v:w.default(function(){return c(n,u,r.props)},a,s)}:void 0}();if("object"==typeof l)return l.v}},f.prototype.handleSubmit=function(t){var e=this,r=this.props,n=r.onSubmit,u=r.fields,o=r.form,i=function(t){if(!t||"function"!=typeof t)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return t},a=b.default(u,o);return!t||P.default(t)?j.default(i(n),a,this.props,this.asyncValidate):M.default(function(r){P.default(r),j.default(i(t),a,e.props,e.asyncValidate)})},f.prototype.render=function(){var t,e=this,n=this.fields,i=this.props,a=(i.addArrayValue,i.asyncBlurFields,i.blur,i.change,i.destroy),f=(i.focus,i.fields),c=i.form,l=(i.initialValues,i.initialize),d=(i.onSubmit,i.propNamespace),p=i.reset,v=(i.removeArrayValue,i.returnRejectedSubmitPromise,i.startAsyncValidation,i.startSubmit,i.stopAsyncValidation,i.stopSubmit,i.submitFailed,i.touch),y=i.untouch,h=(i.validate,o(i,["addArrayValue","asyncBlurFields","blur","change","destroy","focus","fields","form","initialValues","initialize","onSubmit","propNamespace","reset","removeArrayValue","returnRejectedSubmitPromise","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitFailed","touch","untouch","validate"])),m=n._meta,g=m.allPristine,b=m.allValid,_=m.errors,O=m.formError,A=m.values,S={active:c._active,asyncValidating:c._asyncValidating,dirty:!g,error:O,errors:_,fields:n,formKey:x,invalid:!b,pristine:g,submitting:c._submitting,submitFailed:c._submitFailed,valid:b,values:A,asyncValidate:M.default(function(){return e.asyncValidate()}),destroyForm:M.default(a),handleSubmit:this.handleSubmit,initializeForm:M.default(function(t){return l(t,f)}),resetForm:M.default(p),touch:M.default(function(){return v.apply(void 0,arguments)}),touchAll:M.default(function(){return v.apply(void 0,f)}),untouch:M.default(function(){return y.apply(void 0,arguments)}),untouchAll:M.default(function(){return y.apply(void 0,f)})},j=d?(t={},t[d]=S,t):S;return r.createElement(u,s({},h,j))},f}(v);T.displayName="ReduxForm("+d.default(u)+")",T.WrappedComponent=u,T.propTypes={asyncBlurFields:h.arrayOf(h.string),asyncValidate:h.func,dispatch:h.func.isRequired,fields:h.arrayOf(h.string).isRequired,form:h.object,initialValues:h.any,onSubmit:h.func,propNamespace:h.string,readonly:h.bool,returnRejectedSubmitPromise:h.bool,validate:h.func,addArrayValue:h.func.isRequired,blur:h.func.isRequired,change:h.func.isRequired,destroy:h.func.isRequired,focus:h.func.isRequired,initialize:h.func.isRequired,removeArrayValue:h.func.isRequired,reset:h.func.isRequired,startAsyncValidation:h.func.isRequired,startSubmit:h.func.isRequired,stopAsyncValidation:h.func.isRequired,stopSubmit:h.func.isRequired,submitFailed:h.func.isRequired,touch:h.func.isRequired,untouch:h.func.isRequired},T.defaultProps={asyncBlurFields:[],form:p.initialState,readonly:!1,returnRejectedSubmitPromise:!1,validate:function(){return{}}};var R=s({},c,{blur:m.default(c.blur,{touch:!!t.touchOnBlur}),change:m.default(c.change,{touch:!!t.touchOnChange})}),E=void 0!==x&&null!==x?n(F.default(f,function(t){var e=S(t,g);if(!e)throw new Error('You need to mount the redux-form reducer at "'+g+'"');return e&&e[_]&&e[_][x]}),I.default(l,m.default(R,{form:_,key:x}))):n(F.default(f,function(t){var e=S(t,g);if(!e)throw new Error('You need to mount the redux-form reducer at "'+g+'"');return e&&e[_]}),I.default(l,m.default(R,{form:_})));return E(T)}};e.default=N,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t){var e=t.PropTypes,r=e.any,n=e.bool,u=e.string,o=e.func,i=e.object;return{active:u,asyncValidating:n.isRequired,dirty:n.isRequired,error:r,errors:i,fields:i.isRequired,formKey:r,invalid:n.isRequired,pristine:n.isRequired,submitting:n.isRequired,submitFailed:n.isRequired,valid:n.isRequired,values:i.isRequired,asyncValidate:o.isRequired,destroyForm:o.isRequired,handleSubmit:o.isRequired,initializeForm:o.isRequired,resetForm:o.isRequired,touch:o.isRequired,touchAll:o.isRequired,untouch:o.isRequired,untouchAll:o.isRequired}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a=r(31),s=n(a),f=r(18),c=n(f),l=function(t,e,r){var n=e.Component,a=s.default(t,e,r);return function(t,r,s){return function(f){var l=a(f,r,s),d=i({touchOnBlur:!0,touchOnChange:!1,destroyOnUnmount:!0},t),p=function(t){function r(){u(this,r),t.apply(this,arguments)}return o(r,t),r.prototype.render=function(){return e.createElement(l,i({},d,this.props))},r}(n);return c.default(p,f)}}};e.default=l,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=r(50),s=n(a),f=r(11),c=n(f),l=r(28),d=n(l),p=function(t,e,r){return function(n,a,f){var l=e.Component,p=e.PropTypes,v=function(c){function l(u){o(this,l),c.call(this,u),this.cache=s.default(this,{ReduxForm:{params:["reduxMountPoint","form","formKey","getFormState"],fn:d.default(u,t,e,r,n,a,f)}})}return i(l,c),l.prototype.componentWillReceiveProps=function(t){this.cache.componentWillReceiveProps(t)},l.prototype.render=function(){var t=this.cache.ReduxForm,r=this.props,n=(r.reduxMountPoint,r.destroyOnUnmount,r.form,r.getFormState,r.touchOnBlur,r.touchOnChange,u(r,["reduxMountPoint","destroyOnUnmount","form","getFormState","touchOnBlur","touchOnChange"]));return e.createElement(t,n)},l}(l);return v.displayName="ReduxFormConnector("+c.default(n)+")",v.WrappedComponent=n,v.propTypes={destroyOnUnmount:p.bool,reduxMountPoint:p.string,form:p.string.isRequired,formKey:p.string,getFormState:p.func,touchOnBlur:p.bool,touchOnChange:p.bool},v.defaultProps={reduxMountPoint:"form",getFormState:function(t,e){return t[e]}},v}};e.default=p,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(8),o=n(u),i=function(t,e,r,n){return function(u){var i=o.default(u,r);e(t,i),n&&n(t,i)}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(8),o=n(u),i=function(t,e,r){return function(n){return e(t,o.default(n,r))}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=r(7),u=function(t,e){return function(r){e(t,r.dataTransfer.getData(n.dataKey))}};e.default=u,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t,e){return function(){return e(t)}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(10),o=n(u),i=function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),u=1;r>u;u++)n[u-1]=arguments[u];return o.default(e)?t.apply(void 0,n):t.apply(void 0,[e].concat(n))}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(4),o=n(u),i=r(1),a=n(i),s=function(t,e,r,n){var u=r.dispatch,i=r.fields,s=r.startSubmit,f=r.stopSubmit,c=r.submitFailed,l=r.returnRejectedSubmitPromise,d=r.touch,p=r.validate,v=p(e,r);if(d.apply(void 0,i),a.default(v)){var y=function(){var r=t(e,u);return o.default(r)?(s(),r.then(function(t){return f(),t},function(t){return f(t),l?Promise.reject(t):void 0})):r},h=n();return o.default(h)?h.then(y,function(){return c(),l?Promise.reject():Promise.resolve()}):y()}c()};e.default=s,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=function(t,e){return t&&void 0!==t.value?{initial:e,value:t.value}:void 0===e?{}:{initial:e,value:e}},u=function(t,e){var u=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(!e)throw new Error("fields must be passed when initializing state");if(!t||!e.length)return u;var o=function i(t,e,r){for(var u=!0;u;){var o=t,a=e,s=r;u=!1;var f=o.indexOf(".");{if(0!==f){var c=o.indexOf("["),l=o.indexOf("]"),d=s||{};if(f>=0&&(0>c||c>f)){var p=o.substring(0,f);d[p]=a[p]&&i(o.substring(f+1),a[p],d[p]||{})}else c>=0&&(0>f||f>c)?!function(){if(0>l)throw new Error("found '[' but no ']': '"+o+"'");var t=o.substring(0,c),e=a[t],r=d[t],u=o.substring(l+1);Array.isArray(e)?u.length?d[t]=e.map(function(t,e){return i(u,t,r&&r[e])}):d[t]=e.map(function(t,e){return n(r&&r[e],t)}):d[t]=n(r,e)}():d[o]=n(d[o],a&&a[o]);return d}t=o.substring(1),e=a,r=s,u=!0,f=void 0}}};return e.reduce(function(e,r){return o(r,t,e)},r({},u))};e.default=u,t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;if("boolean"==typeof t||"boolean"==typeof e)return t===e;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t&&"object"==typeof t){if(!e||"object"!=typeof e)return!1;var n=Object.keys(t),u=Object.keys(e);if(n.length!==u.length)return!1;for(var o=0;o<u.length;o++){var i=u[o];if(!r(t[i],e[i]))return!1}}else if(t||e)return t===e;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(32),o=n(u),i=r(33),a=n(i),s=r(7),f=n(s),c=r(34),l=n(c),d=r(35),p=n(d),v=r(43),y=n(v),h=r(14),m=n(h),g=r(44),b=n(g),_=function O(t,e,r,n,u,i,s,c){for(var d=arguments,v=!0;v;){var h=t,g=e,_=r,x=n,A=u,S=i,j=s,T=c; | ||
void 0===_&&(_=""),v=!1;var w=d.length<=8||void 0===d[8]?function(){return null}:d[8],R=T.asyncBlurFields,M=T.blur,E=T.change,P=T.focus,V=T.form,I=T.initialValues,C=T.readonly,F=T.addArrayValue,N=T.removeArrayValue,U=g.indexOf("."),q=g.indexOf("["),D=g.indexOf("]");if(q>0&&D!==q+1)throw new Error("found [ not followed by ]");if(q>0&&(0>U||U>q)){var k=function(){var t=g.substring(0,q),e=g.substring(D+1);"."===e[0]&&(e=e.substring(1));var r=h&&h[t]||[];x[t]||(x[t]=[],Object.defineProperty(x[t],"addField",{value:function(e,r){return F(_+t,e,r)}}),Object.defineProperty(x[t],"removeField",{value:function(e){return N(_+t,e)}}));var n=x[t];return r.forEach(function(r,u){e&&!n[u]&&(n[u]={});var o=e?n[u]:{},i=O(r,e,""+_+t+"["+u+"]"+(e?".":""),o,A,S,j,T,w);e||(n[u]=i)}),n.length>r.length&&n.splice(r.length,n.length-r.length),{v:n}}();if("object"==typeof k)return k.v}if(!(U>0)){var W=_+g,B=x[g]||{};if(B.name!==W){var L=a.default(W,E,j),K=m.default(W,I);B.name=W,B.defaultChecked=K===!0,B.defaultValue=K,B.initialValue=K,C||(B.onBlur=o.default(W,M,j,~R.indexOf(W)&&function(t,e){return y.default(S(t,e))}),B.onChange=L,B.onDragStart=f.default(W,function(){return B.value}),B.onDrop=l.default(W,E),B.onFocus=p.default(W,P),B.onUpdate=L),B.valid=!0,B.invalid=!1}var Y=(g?h[g]:h)||{},z=m.default(W,A),H=b.default(B,Y,W===V._active,z);return(g||x[g]!==H)&&(x[g]=H),w(H),H}var G=g.substring(0,U),Z=g.substring(U+1);x[G]||(x[G]={}),d=[t=h[G]||{},e=Z,r=_+G+".",n=x[G],u=A,i=S,s=j,c=T,w],v=!0,w=R=M=E=P=V=I=C=F=N=U=q=D=k=G=Z=void 0}};e.default=_,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(40),i=n(o),a=r(16),s=n(a),f=r(12),c=n(f),l=function(t,e,r,n){var o=t.fields,a=t.form,f=t.validate,l=c.default(o,a),d=f(l,t),p={},v=d._error||a._error,y=!v,h=!0,m=function(t){t.error&&(p=s.default(t.name,t.error,p),y=!1),t.dirty&&(h=!1)},g=u({},e);return o.forEach(function(e){i.default(a,e,void 0,g,d,r,n,t,m)}),Object.defineProperty(g,"_meta",{value:{allPristine:h,allValid:y,values:l,errors:p,formError:v}}),g};e.default=l,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t){return void 0===t||t&&void 0===t.initial?{}:{initial:t.initial,value:t.initial}},n=function(t){return t&&"object"==typeof t&&(void 0!==t.value||void 0!==t.initial)},u=function o(t){return t?Object.keys(t).reduce(function(e,u){var i=t[u];return Array.isArray(i)?e[u]=i.map(function(t){return n(t)?r(t):o(t)}):i&&(n(i)?e[u]=r(i):"object"==typeof i&&null!==i?e[u]=o(i):e[u]=i),e},{}):t};e.default=u,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(4),o=n(u),i=function(){},a=function(t){return o.default(t)?t.then(i,i):t};e.default=a,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(39),i=n(o),a=r(1),s=n(a),f=function(t,e,r,n){var o={};t.value!==e.value&&(o.value=e.value,o.checked="boolean"==typeof e.value?e.value:void 0);var a=i.default(e.value,e.initial);t.pristine!==a&&(o.dirty=!a,o.pristine=a);var f=n||e.submitError||e.asyncError;f!==t.error&&(o.error=f);var c=s.default(f);t.valid!==c&&(o.invalid=!c,o.valid=c),r!==t.active&&(o.active=r);var l=!!e.touched;l!==t.touched&&(o.touched=l);var d=!!e.visited;return d!==t.visited&&(o.visited=d),Object.keys(o).length?u({},t,o):t};e.default=f,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},u=r(21),o=function(t,e){return t?"function"==typeof t?t.length>1?function(r,o){return n({},t(r,o),u.bindActionCreators(e,r),{dispatch:r})}:function(r){return n({},t(r),u.bindActionCreators(e,r),{dispatch:r})}:function(r){return n({},u.bindActionCreators(t,r),u.bindActionCreators(e,r),{dispatch:r})}:function(t){return n({},u.bindActionCreators(e,t),{dispatch:t})}};e.default=o,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=function(t,e){if(t){if("function"!=typeof t)throw new Error("mapStateToProps must be a function");return t.length>1?function(n,u){return r({},t(n,u),{form:e(n)})}:function(n){return r({},t(n),{form:e(n)})}}return function(t){return{form:e(t)}}};e.default=n,t.exports=e.default},function(t,e){function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function n(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var u="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=u?r:n,e.supported=r,e.unsupported=n},function(t,e){function r(t){var e=[];for(var r in t)e.push(r);return e}e=t.exports="function"==typeof Object.keys?Object.keys:r,e.shim=r},function(t,e,r){"use strict";var n=function(t,e,r,n,u,o,i,a){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[r,n,u,o,i,a],c=0;s=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return f[c++]}))}throw s.framesToPop=1,s}};t.exports=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(51),o=n(u);e.default=o.default,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r=[],n={},u={},o=function a(t){Object.keys(n).forEach(function(e){~n[e].props.indexOf(t)&&(delete n[e].value,a(e))})};return Object.keys(e).forEach(function(o){var i=e[o].fn,a=e[o].params;a.forEach(function(t){~r.indexOf(t)||r.push(t)}),n[o]={props:a},Object.defineProperty(u,o,{get:function(){var e=n[o];if(e&&void 0!==e.value)return e.value;var r=a.map(function(e){return t.props[e]||u[e]}),s=i.apply(void 0,r);return n[o]={props:a,value:s},s}})}),u.componentWillReceiveProps=function(e){var n=[];r.forEach(function(r){i.default(t.props[r],e[r])||n.push(r)}),n.forEach(o)},u}e.__esModule=!0,e.default=u;var o=r(17),i=n(o);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){var e=i.default(t),r=s.default(t);return{Provider:e,connect:r}}e.__esModule=!0,e.default=u;var o=r(54),i=n(o),a=r(53),s=n(a);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return t.displayName||t.name||"Component"}function a(t){var e=t.Component,r=t.PropTypes,n=c.default(r);return function(r,a,f){function c(t,e){var r=t.getState(),n=w?b(r,e):b(r);return _.default(v.default(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function l(t,e){var r=t.dispatch,n=R?j(r,e):j(r);return _.default(v.default(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function p(t,e,r){var n=T(t,e,r);return _.default(v.default(n),"`mergeProps` must return an object. Instead received %s.",n),n}var y=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],m=Boolean(r),b=r||O,j=v.default(a)?h.default(a):a||x,T=f||A,w=b.length>1,R=j.length>1,M=y.pure,E=void 0===M?!0:M,P=S++;return function(r){var a=function(e){function n(t,r){u(this,n),e.call(this,t,r),this.version=P,this.store=t.store||r.store,_.default(this.store,'Could not find "store" in either the context or '+('props of "'+this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+this.constructor.displayName+'".')),this.stateProps=c(this.store,t),this.dispatchProps=l(this.store,t),this.state={storeState:null},this.updateState()}return o(n,e),n.prototype.shouldComponentUpdate=function(t,e){if(!E)return this.updateStateProps(t),this.updateDispatchProps(t),this.updateState(t),!0;var r=e.storeState!==this.state.storeState,n=!d.default(t,this.props),u=!1,o=!1;return(r||n&&w)&&(u=this.updateStateProps(t)),n&&R&&(o=this.updateDispatchProps(t)),n||u||o?(this.updateState(t),!0):!1},n.prototype.computeNextState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return p(this.stateProps,this.dispatchProps,t)},n.prototype.updateStateProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=c(this.store,t);return d.default(e,this.stateProps)?!1:(this.stateProps=e,!0)},n.prototype.updateDispatchProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=l(this.store,t);return d.default(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},n.prototype.updateState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];this.nextState=this.computeNextState(t)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){m&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},n.prototype.handleChange=function(){this.unsubscribe&&this.setState({storeState:this.store.getState()})},n.prototype.getWrappedInstance=function(){return this.refs.wrappedInstance},n.prototype.render=function(){return t.createElement(r,s({ref:"wrappedInstance"},this.nextState))},n}(e);return a.displayName="Connect("+i(r)+")",a.WrappedComponent=r,a.contextTypes={store:n},a.propTypes={store:n},g.default(a,r)}}}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=a;var f=r(19),c=n(f),l=r(57),d=n(l),p=r(56),v=n(p),y=r(58),h=n(y),m=r(18),g=n(m),b=r(49),_=n(b),O=function(){return{}},x=function(t){return{dispatch:t}},A=function(t,e,r){return s({},r,t,e)},S=0;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){var e=t.version;if("string"!=typeof e)return!0;var r=e.split("."),n=parseInt(r[0],10),u=parseInt(r[1],10);return 0===n&&13===u}function a(t){function e(){p||d||(p=!0,console.error("With React 0.14 and later versions, you no longer need to wrap <Provider> child into a function."))}function r(){!p&&d&&(p=!0,console.error("With React 0.13, you need to wrap <Provider> child into a function. This restriction will be removed with React 0.14."))}function n(){v||(v=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}var a=t.Component,s=t.PropTypes,c=t.Children,l=f.default(s),d=i(t),p=!1,v=!1,y=function(t){function i(e,r){u(this,i),t.call(this,e,r),this.store=e.store}return o(i,t),i.prototype.getChildContext=function(){return{store:this.store}},i.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&n()},i.prototype.render=function(){var t=this.props.children;return"function"==typeof t?(e(),t=t()):r(),c.only(t)},i}(a);return y.childContextTypes={store:l.isRequired},y.propTypes={store:l.isRequired,children:(d?s.func:s.element).isRequired},y}e.__esModule=!0,e.default=a;var s=r(19),f=n(s);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(25),o=n(u),i=r(52),a=n(i),s=a.default(o.default),f=s.Provider,c=s.connect;e.Provider=f,e.connect=c},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var u=Object.prototype.hasOwnProperty,o=0;o<r.length;o++)if(!u.call(e,r[o])||t[r[o]]!==e[r[o]])return!1;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return function(e){return u.bindActionCreators(t,e)}}e.__esModule=!0,e.default=n;var u=r(21);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return function(r,n){var u=t(r,n),i=u.dispatch,s=[],f={getState:u.getState,dispatch:function(t){return i(t)}};return s=e.map(function(t){return t(f)}),i=a.default.apply(void 0,s)(u.dispatch),o({},u,{dispatch:i})}}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var i=r(22),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){return function(){return e(t.apply(void 0,arguments))}}function o(t,e){if("function"==typeof t)return u(t,e);if("object"!=typeof t||null===t||void 0===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');return a.default(t,function(t){return u(t,e)})}e.__esModule=!0,e.default=o;var i=r(24),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r=e&&e.type,n=r&&'"'+r.toString()+'"'||"an action";return'Reducer "'+t+'" returned undefined handling '+n+". To ignore an action, you must explicitly return the previous state."}function o(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof n)throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var u="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof r(void 0,{type:u}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function i(t){var e,r=d.default(t,function(t){return"function"==typeof t});try{o(r)}catch(n){e=n}var i=c.default(r,function(){});return function(t,n){if(void 0===t&&(t=i),e)throw e;var o=!1,a=c.default(r,function(e,r){var i=t[r],a=e(i,n);if("undefined"==typeof a){var s=u(r,n);throw new Error(s)}return o=o||a!==i,a});return o?a:t}}e.__esModule=!0,e.default=i;var a=r(20),s=r(23),f=(n(s),r(24)),c=n(f),l=r(62),d=n(l);t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default}])}); |
@@ -70,5 +70,18 @@ 'use strict'; | ||
var data = { a: 8, c: 9 }; | ||
_expect2['default'](_actions.initialize(data)).toEqual({ type: _actionTypes.INITIALIZE, data: data }); | ||
var fields = ['a', 'c']; | ||
_expect2['default'](_actions.initialize(data, fields)).toEqual({ type: _actionTypes.INITIALIZE, data: data, fields: fields }); | ||
}); | ||
it('should throw an error if initialize is not given a fields array', function () { | ||
_expect2['default'](function () { | ||
return _actions.initialize({ a: 1, b: 2 }, undefined); | ||
}).toThrow(/must provide fields array/); | ||
_expect2['default'](function () { | ||
return _actions.initialize({ a: 1, b: 2 }, 'not an array'); | ||
}).toThrow(/must provide fields array/); | ||
_expect2['default'](function () { | ||
return _actions.initialize({ a: 1, b: 2 }, { also: 'not an array' }); | ||
}).toThrow(/must provide fields array/); | ||
}); | ||
it('should create remove array value action', function () { | ||
@@ -75,0 +88,0 @@ _expect2['default'](_actions.removeArrayValue('foo', 3)).toEqual({ |
@@ -458,2 +458,4 @@ /* eslint react/no-multi-comp:0*/ | ||
var stub = _reactAddonsTestUtils2['default'].findRenderedComponentWithType(dom, Form); | ||
_expect2['default'](stub.props.fields.children).toBeA('array'); | ||
_expect2['default'](stub.props.fields.children.length).toBe(2); | ||
@@ -460,0 +462,0 @@ expectField({ |
@@ -14,7 +14,17 @@ 'use strict'; | ||
describe('initializeState', function () { | ||
it('should return empty if no values', function () { | ||
_expect2['default'](_initializeState2['default']({})).toEqual({}); | ||
it('should throw error when no fields passed', function () { | ||
_expect2['default'](function () { | ||
return _initializeState2['default']({}, undefined, {}); | ||
}).toThrow(/fields must be passed/); | ||
}); | ||
it('should initialize simple values to state', function () { | ||
it('should return empty if no fields', function () { | ||
_expect2['default'](_initializeState2['default']({}, [], {})).toEqual({}); | ||
}); | ||
it('should return empty field entries for each field', function () { | ||
_expect2['default'](_initializeState2['default']({}, ['foo', 'bar'], {})).toEqual({ foo: {}, bar: {} }); | ||
}); | ||
it('should initialize simple field values to state', function () { | ||
_expect2['default'](_initializeState2['default']({ | ||
@@ -24,3 +34,3 @@ foo: 'bar', | ||
alive: true | ||
})).toBeA('object').toEqual({ | ||
}, ['foo', 'catLives', 'alive'], {})).toBeA('object').toEqual({ | ||
foo: { | ||
@@ -41,3 +51,3 @@ initial: 'bar', | ||
it('should initialize deep values to state', function () { | ||
it('should initialize deep field values to state', function () { | ||
_expect2['default'](_initializeState2['default']({ | ||
@@ -51,3 +61,3 @@ foo: { | ||
alive: true | ||
})).toBeA('object').toEqual({ | ||
}, ['foo.bar', 'lives.cat', 'alive'], {})).toBeA('object').toEqual({ | ||
foo: { | ||
@@ -72,7 +82,7 @@ bar: { | ||
it('should initialize array values to state', function () { | ||
it('should initialize array field values to state', function () { | ||
_expect2['default'](_initializeState2['default']({ | ||
foo: ['bar', 'baz', undefined], | ||
alive: true | ||
})).toBeA('object').toEqual({ | ||
}, ['foo[]', 'alive'], {})).toBeA('object').toEqual({ | ||
foo: [{ | ||
@@ -92,35 +102,40 @@ initial: 'bar', | ||
it('should allow an array to be empty', function () { | ||
it('should allow an array field to be empty', function () { | ||
_expect2['default'](_initializeState2['default']({ | ||
foo: [] | ||
})).toBeA('object').toEqual({ foo: [] }); | ||
}, ['foo[]'], {})).toBeA('object').toEqual({ foo: [] }); | ||
}); | ||
it('should initialize deep array values to state', function () { | ||
it('should initialize array values to state', function () { | ||
_expect2['default'](_initializeState2['default']({ | ||
foo: { | ||
animals: ['cat', 'dog', 'rat'] | ||
animals: ['cat', 'dog', 'rat'], | ||
bar: [{ deeper: 42 }] | ||
}, ['animals', 'bar'], {})).toBeA('object').toEqual({ | ||
animals: { | ||
initial: ['cat', 'dog', 'rat'], | ||
value: ['cat', 'dog', 'rat'] | ||
}, | ||
bar: [{ deeper: 42 }] | ||
})).toBeA('object').toEqual({ | ||
bar: { | ||
initial: [{ deeper: 42 }], | ||
value: [{ deeper: 42 }] | ||
} | ||
}); | ||
}); | ||
it('should initialize object values to state', function () { | ||
_expect2['default'](_initializeState2['default']({ | ||
foo: { bar: 'baz' }, | ||
lives: { cat: 9 }, | ||
alive: true | ||
}, ['foo', 'lives'], {})).toBeA('object').toEqual({ | ||
foo: { | ||
animals: [{ | ||
initial: 'cat', | ||
value: 'cat' | ||
}, { | ||
initial: 'dog', | ||
value: 'dog' | ||
}, { | ||
initial: 'rat', | ||
value: 'rat' | ||
}] | ||
initial: { bar: 'baz' }, | ||
value: { bar: 'baz' } | ||
}, | ||
bar: [{ | ||
deeper: { | ||
initial: 42, | ||
value: 42 | ||
} | ||
}] | ||
lives: { | ||
initial: { cat: 9 }, | ||
value: { cat: 9 } | ||
} | ||
}); | ||
}); | ||
}); |
@@ -1155,2 +1155,3 @@ 'use strict'; | ||
var foo1 = result1.foo; | ||
var bar1 = result1.bar; | ||
_expect2['default'](foo1.value).toBe('fooValue'); | ||
@@ -1174,4 +1175,7 @@ var result2 = _readFields2['default']({ | ||
var foo2 = result2.foo; | ||
var bar2 = result2.bar; | ||
_expect2['default'](foo1.value).toBe('fooValue'); | ||
_expect2['default'](foo2.value).toBe('newValue'); | ||
_expect2['default'](foo1).toNotBe(foo2); | ||
_expect2['default'](bar1).toBe(bar2); | ||
}); | ||
@@ -1178,0 +1182,0 @@ |
@@ -522,3 +522,3 @@ 'use strict'; | ||
it('should set initialize values on initialize on empty state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.initialize({ myField: 'initialValue' }), { | ||
var state = _reducer2['default']({}, _extends({}, _actions.initialize({ myField: 'initialValue' }, ['myField']), { | ||
form: 'foo' | ||
@@ -540,3 +540,3 @@ })); | ||
it('should allow initializing null values', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.initialize({ bar: 'baz', dog: null }), { | ||
var state = _reducer2['default']({}, _extends({}, _actions.initialize({ bar: 'baz', dog: null }, ['bar', 'dog']), { | ||
form: 'foo' | ||
@@ -562,3 +562,3 @@ })); | ||
it('should initialize nested values on initialize on empty state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.initialize({ myField: { subField: 'initialValue' } }), { | ||
var state = _reducer2['default']({}, _extends({}, _actions.initialize({ myField: { subField: 'initialValue' } }, ['myField.subField'], {}), { | ||
form: 'foo' | ||
@@ -582,3 +582,3 @@ })); | ||
it('should initialize array values on initialize on empty state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.initialize({ myField: ['initialValue'] }), { | ||
var state = _reducer2['default']({}, _extends({}, _actions.initialize({ myField: ['initialValue'] }, ['myField[]'], {}), { | ||
form: 'foo' | ||
@@ -599,3 +599,43 @@ })); | ||
it('should set initialize values on initialize on with previous state', function () { | ||
it('should initialize array values with subvalues on initialize on empty state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.initialize({ | ||
accounts: [{ | ||
name: 'Bobby Tables', | ||
email: 'bobby@gmail.com' | ||
}, { | ||
name: 'Sammy Tables', | ||
email: 'sammy@gmail.com' | ||
}] | ||
}, ['accounts[].name', 'accounts[].email'], {}), { | ||
form: 'foo' | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
accounts: [{ | ||
name: { | ||
initial: 'Bobby Tables', | ||
value: 'Bobby Tables' | ||
}, | ||
email: { | ||
initial: 'bobby@gmail.com', | ||
value: 'bobby@gmail.com' | ||
} | ||
}, { | ||
name: { | ||
initial: 'Sammy Tables', | ||
value: 'Sammy Tables' | ||
}, | ||
email: { | ||
initial: 'sammy@gmail.com', | ||
value: 'sammy@gmail.com' | ||
} | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should set initialize values, but not change dirty value when initializing', function () { | ||
var state = _reducer2['default']({ | ||
@@ -613,3 +653,3 @@ foo: { | ||
} | ||
}, _extends({}, _actions.initialize({ myField: 'initialValue' }), { | ||
}, _extends({}, _actions.initialize({ myField: 'initialValue' }, ['myField']), { | ||
form: 'foo', | ||
@@ -621,3 +661,3 @@ touch: true | ||
initial: 'initialValue', | ||
value: 'initialValue' | ||
value: 'dirtyValue' | ||
}, | ||
@@ -1371,2 +1411,44 @@ _active: undefined, | ||
it('should ignore empty index-less array fields on touch', function () { | ||
var state = _reducer2['default']({ | ||
foo: { | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.touch('myFields[]'), { | ||
form: 'foo' | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should ignore empty index-less array subfields on touch', function () { | ||
var state = _reducer2['default']({ | ||
foo: { | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.touch('myFields[].name'), { | ||
form: 'foo' | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should unmark fields as touched on untouch', function () { | ||
@@ -1373,0 +1455,0 @@ var state = _reducer2['default']({ |
@@ -41,2 +41,41 @@ 'use strict'; | ||
it('should put simple arrays', function () { | ||
var data1 = _write2['default']('cat', ['foo', 'bar'], {}); | ||
_expect2['default'](data1.cat).toBeA('array').toEqual(['foo', 'bar']); | ||
var data2 = _write2['default']('dog', ['rabbit', 42], {}); | ||
_expect2['default'](data2.dog).toBeA('array').toEqual(['rabbit', 42]); | ||
}); | ||
it('should put simple indexless array values', function () { | ||
var data = _write2['default']('cat[]', 'meow', { | ||
cat: [1, 2, 3, 4] | ||
}); | ||
_expect2['default'](data.cat).toBeA('array').toEqual(['meow', 'meow', 'meow', 'meow']); | ||
}); | ||
it('should put arrays as indexless array values', function () { | ||
var data = _write2['default']('cat[]', ['meow', 'woof'], { | ||
cat: [1, 2, 3, 4] | ||
}); | ||
_expect2['default'](data.cat).toBeA('array').toEqual(['meow', 'woof']); | ||
}); | ||
it('should put simple indexless array values', function () { | ||
var data = _write2['default']('cat[]', 'meow', { | ||
cat: [1, 2, 3, 4] | ||
}); | ||
_expect2['default'](data.cat).toBeA('array').toEqual(['meow', 'meow', 'meow', 'meow']); | ||
}); | ||
it('should put properties on array values', function () { | ||
var data1 = _write2['default']('cat[0].name', 'foo', {}); | ||
_expect2['default'](data1.cat).toBeA('array'); | ||
_expect2['default'](data1.cat[0]).toBeA('object'); | ||
_expect2['default'](data1.cat[0].name).toBe('foo'); | ||
var data2 = _write2['default']('dog[2].friend', 'rabbit', {}); | ||
_expect2['default'](data2.dog).toBeA('array'); | ||
_expect2['default'](data2.dog[2]).toBeA('object'); | ||
_expect2['default'](data2.dog[2].friend).toBe('rabbit'); | ||
}); | ||
it('should put simple array values', function () { | ||
@@ -43,0 +82,0 @@ var data1 = _write2['default']('cat[0]', 'foo', {}); |
'use strict'; | ||
exports.__esModule = true; | ||
exports.addArrayValue = addArrayValue; | ||
exports.blur = blur; | ||
exports.change = change; | ||
exports.destroy = destroy; | ||
exports.focus = focus; | ||
exports.initialize = initialize; | ||
exports.removeArrayValue = removeArrayValue; | ||
exports.reset = reset; | ||
exports.startAsyncValidation = startAsyncValidation; | ||
exports.startSubmit = startSubmit; | ||
exports.stopAsyncValidation = stopAsyncValidation; | ||
exports.stopSubmit = stopSubmit; | ||
exports.submitFailed = submitFailed; | ||
exports.touch = touch; | ||
exports.untouch = untouch; | ||
var _actionTypes = require('./actionTypes'); | ||
function addArrayValue(path, value, index) { | ||
var addArrayValue = function addArrayValue(path, value, index) { | ||
return { type: _actionTypes.ADD_ARRAY_VALUE, path: path, value: value, index: index }; | ||
} | ||
}; | ||
function blur(field, value) { | ||
exports.addArrayValue = addArrayValue; | ||
var blur = function blur(field, value) { | ||
return { type: _actionTypes.BLUR, field: field, value: value }; | ||
} | ||
}; | ||
function change(field, value) { | ||
exports.blur = blur; | ||
var change = function change(field, value) { | ||
return { type: _actionTypes.CHANGE, field: field, value: value }; | ||
} | ||
}; | ||
function destroy() { | ||
exports.change = change; | ||
var destroy = function destroy() { | ||
return { type: _actionTypes.DESTROY }; | ||
} | ||
}; | ||
function focus(field) { | ||
exports.destroy = destroy; | ||
var focus = function focus(field) { | ||
return { type: _actionTypes.FOCUS, field: field }; | ||
} | ||
}; | ||
function initialize(data) { | ||
return { type: _actionTypes.INITIALIZE, data: data }; | ||
} | ||
exports.focus = focus; | ||
var initialize = function initialize(data, fields) { | ||
if (!Array.isArray(fields)) { | ||
throw new Error('must provide fields array to initialize() action creator'); | ||
} | ||
return { type: _actionTypes.INITIALIZE, data: data, fields: fields }; | ||
}; | ||
function removeArrayValue(path, index) { | ||
exports.initialize = initialize; | ||
var removeArrayValue = function removeArrayValue(path, index) { | ||
return { type: _actionTypes.REMOVE_ARRAY_VALUE, path: path, index: index }; | ||
} | ||
}; | ||
function reset() { | ||
exports.removeArrayValue = removeArrayValue; | ||
var reset = function reset() { | ||
return { type: _actionTypes.RESET }; | ||
} | ||
}; | ||
function startAsyncValidation() { | ||
exports.reset = reset; | ||
var startAsyncValidation = function startAsyncValidation() { | ||
return { type: _actionTypes.START_ASYNC_VALIDATION }; | ||
} | ||
}; | ||
function startSubmit() { | ||
exports.startAsyncValidation = startAsyncValidation; | ||
var startSubmit = function startSubmit() { | ||
return { type: _actionTypes.START_SUBMIT }; | ||
} | ||
}; | ||
function stopAsyncValidation(errors) { | ||
exports.startSubmit = startSubmit; | ||
var stopAsyncValidation = function stopAsyncValidation(errors) { | ||
return { type: _actionTypes.STOP_ASYNC_VALIDATION, errors: errors }; | ||
} | ||
}; | ||
function stopSubmit(errors) { | ||
exports.stopAsyncValidation = stopAsyncValidation; | ||
var stopSubmit = function stopSubmit(errors) { | ||
return { type: _actionTypes.STOP_SUBMIT, errors: errors }; | ||
} | ||
}; | ||
function submitFailed() { | ||
exports.stopSubmit = stopSubmit; | ||
var submitFailed = function submitFailed() { | ||
return { type: _actionTypes.SUBMIT_FAILED }; | ||
} | ||
}; | ||
function touch() { | ||
exports.submitFailed = submitFailed; | ||
var touch = function touch() { | ||
for (var _len = arguments.length, fields = Array(_len), _key = 0; _key < _len; _key++) { | ||
@@ -80,5 +81,6 @@ fields[_key] = arguments[_key]; | ||
return { type: _actionTypes.TOUCH, fields: fields }; | ||
} | ||
}; | ||
function untouch() { | ||
exports.touch = touch; | ||
var untouch = function untouch() { | ||
for (var _len2 = arguments.length, fields = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
@@ -89,2 +91,3 @@ fields[_key2] = arguments[_key2]; | ||
return { type: _actionTypes.UNTOUCH, fields: fields }; | ||
} | ||
}; | ||
exports.untouch = untouch; |
@@ -94,2 +94,3 @@ 'use strict'; | ||
var _props = this.props; | ||
var fields = _props.fields; | ||
var initialize = _props.initialize; | ||
@@ -99,3 +100,3 @@ var initialValues = _props.initialValues; | ||
if (initialValues) { | ||
initialize(initialValues); | ||
initialize(initialValues, fields); | ||
} | ||
@@ -241,3 +242,5 @@ }; | ||
handleSubmit: this.handleSubmit, | ||
initializeForm: _eventsSilenceEvents2['default'](initialize), | ||
initializeForm: _eventsSilenceEvents2['default'](function (initValues) { | ||
return initialize(initValues, fields); | ||
}), | ||
resetForm: _eventsSilenceEvents2['default'](reset), | ||
@@ -244,0 +247,0 @@ touch: _eventsSilenceEvents2['default'](function () { |
'use strict'; | ||
exports.__esModule = true; | ||
var makeEntry = function makeEntry(value) { | ||
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; }; | ||
var updateEntry = function updateEntry(entry, value) { | ||
if (entry && entry.value !== undefined) { | ||
return { initial: value, value: entry.value }; | ||
} | ||
return value === undefined ? {} : { initial: value, value: value }; | ||
}; | ||
/** | ||
* Sets the initial values into the state and returns a new copy of the state | ||
*/ | ||
var initializeState = function initializeState(values) { | ||
return values ? Object.keys(values).reduce(function (accumulator, key) { | ||
var value = values[key]; | ||
if (Array.isArray(value)) { | ||
accumulator[key] = value.map(function (item) { | ||
return typeof item === 'object' ? initializeState(item) : makeEntry(item); | ||
}); | ||
} else if (value !== null && typeof value === 'object') { | ||
accumulator[key] = initializeState(value); | ||
} else { | ||
accumulator[key] = makeEntry(value); | ||
var initializeState = function initializeState(values, fields) { | ||
var state = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
if (!fields) { | ||
throw new Error('fields must be passed when initializing state'); | ||
} | ||
if (!values || !fields.length) { | ||
return state; | ||
} | ||
var initializeField = function initializeField(_x2, _x3, _x4) { | ||
var _again = true; | ||
_function: while (_again) { | ||
var path = _x2, | ||
src = _x3, | ||
dest = _x4; | ||
_again = false; | ||
var dotIndex = path.indexOf('.'); | ||
if (dotIndex === 0) { | ||
_x2 = path.substring(1); | ||
_x3 = src; | ||
_x4 = dest; | ||
_again = true; | ||
dotIndex = undefined; | ||
continue _function; | ||
} | ||
var openIndex = path.indexOf('['); | ||
var closeIndex = path.indexOf(']'); | ||
var result = dest || {}; | ||
if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) { | ||
// is dot notation | ||
var key = path.substring(0, dotIndex); | ||
result[key] = src[key] && initializeField(path.substring(dotIndex + 1), src[key], result[key] || {}); | ||
} else if (openIndex >= 0 && (dotIndex < 0 || openIndex < dotIndex)) { | ||
(function () { | ||
// is array notation | ||
if (closeIndex < 0) { | ||
throw new Error('found \'[\' but no \']\': \'' + path + '\''); | ||
} | ||
var key = path.substring(0, openIndex); | ||
var srcArray = src[key]; | ||
var destArray = result[key]; | ||
var rest = path.substring(closeIndex + 1); | ||
if (Array.isArray(srcArray)) { | ||
if (rest.length) { | ||
// need to keep recursing | ||
result[key] = srcArray.map(function (srcValue, srcIndex) { | ||
return initializeField(rest, srcValue, destArray && destArray[srcIndex]); | ||
}); | ||
} else { | ||
result[key] = srcArray.map(function (srcValue, srcIndex) { | ||
return updateEntry(destArray && destArray[srcIndex], srcValue); | ||
}); | ||
} | ||
} else { | ||
result[key] = updateEntry(destArray, srcArray); | ||
} | ||
})(); | ||
} else { | ||
result[path] = updateEntry(result[path], src && src[path]); | ||
} | ||
return result; | ||
} | ||
return accumulator; | ||
}, {}) : values; | ||
}; | ||
return fields.reduce(function (accumulator, field) { | ||
return initializeField(field, values, accumulator); | ||
}, _extends({}, state)); | ||
}; | ||
@@ -25,0 +86,0 @@ |
@@ -29,2 +29,3 @@ /** | ||
if (dotIndex >= 0 && (openIndex < 0 || dotIndex < openIndex)) { | ||
// iterate down object tree | ||
_x = path.substring(dotIndex + 1); | ||
@@ -42,2 +43,5 @@ _x2 = object[path.substring(0, dotIndex)]; | ||
var index = path.substring(openIndex + 1, closeIndex); | ||
if (!index.length) { | ||
return object[key]; | ||
} | ||
if (openIndex === 0) { | ||
@@ -44,0 +48,0 @@ _x = path.substring(closeIndex + 1); |
@@ -112,4 +112,5 @@ 'use strict'; | ||
var data = _ref5.data; | ||
var fields = _ref5.fields; | ||
return _extends({}, _initializeState2['default'](data), { | ||
return _extends({}, _initializeState2['default'](data, fields, state), { | ||
_asyncValidating: false, | ||
@@ -116,0 +117,0 @@ _active: undefined, |
@@ -79,2 +79,7 @@ /** | ||
// need to keep recursing | ||
if ((!array || !array.length) && typeof value === 'function') { | ||
return { | ||
v: object | ||
}; // don't even set a value under [key] | ||
} | ||
var arrayCopy = array.map(function (dest) { | ||
@@ -87,6 +92,18 @@ return write(rest, value, dest); | ||
} | ||
var result = undefined; | ||
if (Array.isArray(value)) { | ||
result = value; | ||
} else if (object[key]) { | ||
result = array.map(function (dest) { | ||
return typeof value === 'function' ? value(dest) : value; | ||
}); | ||
} else if (typeof value === 'function') { | ||
return { | ||
v: object | ||
}; // don't even set a value under [key] | ||
} else { | ||
result = value; | ||
} | ||
return { | ||
v: _extends({}, object || {}, (_extends6 = {}, _extends6[key] = array.map(function (dest) { | ||
return typeof value === 'function' ? value(dest) : value; | ||
}), _extends6)) | ||
v: _extends({}, object || {}, (_extends6 = {}, _extends6[key] = result, _extends6)) | ||
}; | ||
@@ -93,0 +110,0 @@ })(); |
{ | ||
"name": "redux-form", | ||
"version": "3.1.7", | ||
"version": "4.0.0", | ||
"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
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
511035
12165