{"size": 31373, "ext": "js", "max_stars_repo_path": "release/formsy-react.js", "max_stars_repo_name": "maccuaa/formsy-react", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "release/formsy-react.js", "max_issues_repo_name": "maccuaa/formsy-react", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "release/formsy-react.js", "max_forks_repo_name": "maccuaa/formsy-react", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 15686.5, "max_line_length": 31332, "alphanum_fraction": 0.6901475791}
!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.Formsy=e(require("react")):t.Formsy=e(t.react)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){(function(e){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}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 u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=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},c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),f=r(9),p=n(f),d=r(13),h=n(d),y=r(12),v=n(y),F=r(7),m=n(F),b=r(3),g=n(b),E=r(11),x=n(E),_=r(10),O=n(_),D=e.React||r(2),w={},V=[],j={};j.HOC=x.default,j.Decorator=O.default,j.Mixin=g.default,j.defaults=function(t){w=t},j.addValidationRule=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return r||Object.keys(v.default).indexOf(t)===-1?void(v.default[t]=e):void console.error("A Validation Rule with that name already exists: "+t)};var S=function(t){function e(){var t,r,n,o;i(this,e);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return r=n=u(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),n.displayName="Formsy",n.state={isValid:!0,isSubmitting:!1,canChange:!1},n.reset=function(t){n.setFormPristine(!0),n.resetModel(t)},n.submit=function(t){t&&t.preventDefault(),n.setFormPristine(!1);var e=n.getModel();n.props.onSubmit(e,n.resetModel.bind(n),n.updateInputsWithError.bind(n)),n.state.isValid?n.props.onValidSubmit(e,n.resetModel.bind(n),n.updateInputsWithError.bind(n)):n.props.onInvalidSubmit(e,n.resetModel.bind(n),n.updateInputsWithError.bind(n))},n.isFormDisabled=function(){return n.props.disabled||!1},n.validate=function(t){n.state.canChange&&n.props.onChange(n.getCurrentValues(),n.isChanged());var e=n.runValidation(t);t.setState({_isValid:e.isValid,_isRequired:e.isRequired,_validationError:e.error,_externalError:null},n.validateForm)},n.validateForm=function(){var t=function(){var t=this.inputs.every(function(t){return t.state._isValid});this.setState({isValid:t}),t?this.props.onValid():this.props.onInvalid(),this.setState({canChange:!0})}.bind(n);n.inputs.forEach(function(t,e){var r=n.runValidation(t);r.isValid&&t.state._externalError&&(r.isValid=!1),t.setState({_isValid:r.isValid,_isRequired:r.isRequired,_validationError:r.error,_externalError:!r.isValid&&t.state._externalError?t.state._externalError:null})}),t(),n.inputs.length||n.setState({canChange:!0})},n.attachToForm=function(t){n.inputs.indexOf(t)===-1&&n.inputs.push(t),n.validate(t)},n.detachFromForm=function(t){var e=n.inputs.indexOf(t);e!==-1&&(n.inputs=n.inputs.slice(0,e).concat(n.inputs.slice(e+1))),n.validateForm()},o=r,u(n,o)}return a(e,t),l(e,[{key:"getChildContext",value:function(){var t=this;return{formsy:{attachToForm:this.attachToForm,detachFromForm:this.detachFromForm,validate:this.validate,isFormDisabled:this.isFormDisabled,isValidValue:function(e,r){return t.runValidation(e,r).isValid}}}}},{key:"componentWillMount",value:function(){this.inputs=[]}},{key:"componentDidMount",value:function(){this.validateForm()}},{key:"componentWillUpdate",value:function(){this.prevInputNames=this.inputs.map(function(t){return t.props.name})}},{key:"componentDidUpdate",value:function(){this.props.validationErrors&&"object"===c(this.props.validationErrors)&&Object.keys(this.props.validationErrors).length>0&&this.setInputValidationErrors(this.props.validationErrors);var t=this.inputs.map(function(t){return t.props.name});m.default.arraysDiffer(this.prevInputNames,t)&&this.validateForm()}},{key:"mapModel",value:function(t){return this.props.mapping?this.props.mapping(t):h.default.toObj(Object.keys(t).reduce(function(e,r){for(var n=r.split("."),o=e;n.length;){var i=n.shift();o=o[i]=n.length?o[i]||{}:t[r]}return e},{}))}},{key:"getModel",value:function(){var t=this.getCurrentValues();return this.mapModel(t)}},{key:"resetModel",value:function(t){this.inputs.forEach(function(e){var r=e.props.name;t&&t.hasOwnProperty(r)?e.setValue(t[r]):e.resetValue()}),this.validateForm()}},{key:"setInputValidationErrors",value:function(t){this.inputs.forEach(function(e){var r=e.props.name,n=[{_isValid:!(r in t),_validationError:"string"==typeof t[r]?[t[r]]:t[r]}];e.setState.apply(e,n)})}},{key:"isChanged",value:function(){return!m.default.isSame(this.getPristineValues(),this.getCurrentValues())}},{key:"getPristineValues",value:function(){return this.inputs.reduce(function(t,e){var r=e.props.name;return t[r]=e.props.value,t},{})}},{key:"updateInputsWithError",value:function(t){var e=this;Object.keys(t).forEach(function(r,n){var o=m.default.find(e.inputs,function(t){return t.props.name===r});if(!o)throw new Error("You are trying to update an input that does not exist. Verify errors object with input names. "+JSON.stringify(t));var i=[{_isValid:e.props.preventExternalInvalidation||!1,_externalError:"string"==typeof t[r]?[t[r]]:t[r]}];o.setState.apply(o,i)},this)}},{key:"getCurrentValues",value:function(){return this.inputs.reduce(function(t,e){var r=e.props.name;return t[r]=e.state._value,t},{})}},{key:"setFormPristine",value:function(t){this.setState({_formSubmitted:!t}),this.inputs.forEach(function(e,r){e.setState({_formSubmitted:!t,_isPristine:t})})}},{key:"runValidation",value:function(t,e){var r=this.getCurrentValues(),n=t.props.validationErrors,o=t.props.validationError;e=2===arguments.length?e:t.state._value;var i=this.runRules(e,r,t._validations),u=this.runRules(e,r,t._requiredValidations);"function"==typeof t.validate&&(i.failed=t.validate()?[]:[{method:"failed"}]);var a=!!Object.keys(t._requiredValidations).length&&!!u.success.length,s=!(i.failed.length||this.props.validationErrors&&this.props.validationErrors[t.props.name]);return{isRequired:a,isValid:!a&&s,error:function(){if(s&&!a)return V;if(i.errors.length)return i.errors;if(this.props.validationErrors&&this.props.validationErrors[t.props.name])return"string"==typeof this.props.validationErrors[t.props.name]?[this.props.validationErrors[t.props.name]]:this.props.validationErrors[t.props.name];if(a){var e=n[u.success[0]];return e?[e]:null}return i.failed.map(function(t){var e=n&&n[t.method]?n[t.method]:o;return t.args&&[].concat(t.args).forEach(function(t,r){e=e.replace(new RegExp("\\{"+r+"\\}","g"),t)}),e}).filter(function(t,e,r){return r.indexOf(t)===e})}.call(this)}}},{key:"runRules",value:function(t,e,r){var n={errors:[],failed:[],success:[]};return Object.keys(r).length&&Object.keys(r).forEach(function(o){if(v.default[o]&&"function"==typeof r[o])throw new Error("Formsy does not allow you to override default validations: "+o);if(!v.default[o]&&"function"!=typeof r[o])throw new Error("Formsy does not have the validation rule: "+o);if("function"==typeof r[o]){var i=r[o](e,t);return void("string"==typeof i?(n.errors.push(i),n.failed.push({method:o})):i||n.failed.push({method:o}))}if("function"!=typeof r[o]){var i=v.default[o](e,t,r[o]);return void("string"==typeof i?(n.errors.push(i),n.failed.push({method:o,args:r[o]})):i?n.success.push(o):n.failed.push({method:o,args:r[o]}))}return n.success.push(o)}),n}},{key:"render",value:function(){var t=this.props,e=(t.mapping,t.validationErrors,t.onSubmit,t.onValid,t.onValidSubmit,t.onInvalid,t.onInvalidSubmit,t.onChange,t.reset,t.preventExternalInvalidation,t.onSuccess,t.onError,o(t,["mapping","validationErrors","onSubmit","onValid","onValidSubmit","onInvalid","onInvalidSubmit","onChange","reset","preventExternalInvalidation","onSuccess","onError"]));return D.createElement("form",s({},e,{onSubmit:this.submit}),this.props.children)}}]),e}(D.Component);S.childContextTypes={formsy:p.default.object},S.defaultProps={onSuccess:function(){},onError:function(){},onSubmit:function(){},onValidSubmit:function(){},onInvalidSubmit:function(){},onValid:function(){},onInvalid:function(){},onChange:function(){},validationErrors:null,preventExternalInvalidation:!1},j.Form=S,e.exports||e.module||e.define&&e.define.amd||(e.Formsy=j),t.exports=j}).call(e,function(){return this}())},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function u(){y&&d&&(y=!1,d.length?h=d.concat(h):v=-1,h.length&&a())}function a(){if(!y){var t=o(u);y=!0;for(var e=h.length;e;){for(d=h,h=[];++v<e;)d&&d[v].run();v=-1,e=h.length}d=null,y=!1,i(t)}}function s(t,e){this.fun=t,this.array=e}function c(){}var l,f,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(t){f=n}}();var d,h=[],y=!1,v=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];h.push(new s(t,e)),1!==h.length||y||o(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,r){e.exports=t},function(t,e,r){(function(t){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}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 u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(9),l=n(c),f=r(7),p=n(f),d=t.React||r(2),h=function(t){return"string"==typeof t?t.split(/\,(?![^{\[]*[}\]])/g).reduce(function(t,e){var r=e.split(":"),n=r.shift();if(r=r.map(function(t){try{return JSON.parse(t)}catch(e){return t}}),r.length>1)throw new Error("Formsy does not support multiple args on string validations. Use object format of validations instead.");return t[n]=!r.length||r[0],t},{}):t||{}},y=function(t){function e(){var t,r,n,a;i(this,e);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return r=n=u(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(c))),n.state={_value:n.props.value,_isRequired:!1,_isValid:!0,_isPristine:!0,_pristineValue:n.props.value,_validationError:[],_externalError:null,_formSubmitted:!1},n.removeFormsyProps=function(t){var e=(t.requiredError,t.validations,t.validationError,t.validationErrors,o(t,["requiredError","validations","validationError","validationErrors"]));return e},n.setValidations=function(t,e){n._validations=h(t)||{},n._requiredValidations=e===!0?{isDefaultRequiredValue:!0}:h(e)},n.setValue=function(t){n.setState({_value:t,_isPristine:!1},function(){n.context.formsy.validate(n)})},n.resetValue=function(){n.setState({_value:n.state._pristineValue,_isPristine:!0},function(){n.context.formsy.validate(n)})},n.getValue=function(){return n.state._value},n.hasValue=function(){return""!==n.state._value},n.getErrorMessage=function(){var t=n.getErrorMessages();return t.length?t[0]:null},n.getErrorMessages=function(){var t=n.isRequired()&&!n.isPristine()&&!n.isValid()&&n.isFormSubmitted()&&n.props.requiredError;return!n.isValid()||n.showRequired()?n.state._externalError||n.state._validationError||t&&[t]||[]:[]},n.isFormDisabled=function(){return n.context.formsy.isFormDisabled()},n.isValid=function(){return n.state._isValid},n.isPristine=function(){return n.state._isPristine},n.isFormSubmitted=function(){return n.state._formSubmitted},n.isRequired=function(){return!!n.props.required},n.showRequired=function(){return n.state._isRequired},n.showError=function(){return!n.showRequired()&&!n.isValid()},n.isValidValue=function(t){return n.context.formsy.isValidValue.call(null,n,t)},a=r,u(n,a)}return a(e,t),s(e,[{key:"componentWillMount",value:function(){var t=this,e=function(){t.setValidations(t.props.validations,t.props.required),t.context.formsy.attachToForm(t)};if(!this.props.name)throw new Error("Form Input requires a name property when used");e()}},{key:"componentWillReceiveProps",value:function(t){this.setValidations(t.validations,t.required)}},{key:"componentDidUpdate",value:function(t){p.default.isSame(this.props.value,t.value)||this.setValue(this.props.value),p.default.isSame(this.props.validations,t.validations)&&p.default.isSame(this.props.required,t.required)||this.context.formsy.validate(this)}},{key:"componentWillUnmount",value:function(){this.context.formsy.detachFromForm(this)}}],[{key:"defaultProps",get:function(){return{validationError:"",validationErrors:{}}},set:function(t){Object.assign(e.defaultProps,t)}}]),e}(d.PureComponent);y.propTypes={requiredError:l.default.string,validationError:l.default.string,validationErrors:l.default.object,validations:l.default.oneOfType([l.default.string,l.default.object])},y.contextTypes={formsy:l.default.object},e.default=y}).call(e,function(){return this}())},function(t,e){"use strict";function r(t){return function(){return t}}var n=function(){};n.thatReturns=r,n.thatReturnsFalse=r(!1),n.thatReturnsTrue=r(!0),n.thatReturnsNull=r(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(t){return t},t.exports=n},function(t,e,r){(function(e){"use strict";function r(t,e,r,o,i,u,a,s){if(n(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,o,i,u,a,s],f=0;c=new Error(e.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var n=function(t){};"production"!==e.env.NODE_ENV&&(n=function(t){if(void 0===t)throw new Error("invariant requires an error message argument")}),t.exports=r}).call(e,r(1))},function(t,e){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r},function(t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports={arraysDiffer:function(t,e){var r=!1;return t.length!==e.length?r=!0:t.forEach(function(t,n){this.isSame(t,e[n])||(r=!0)},this),r},objectsDiffer:function(t,e){var r=!1;return Object.keys(t).length!==Object.keys(e).length?r=!0:Object.keys(t).forEach(function(n){this.isSame(t[n],e[n])||(r=!0)},this),r},isSame:function(t,e){return("undefined"==typeof t?"undefined":r(t))===("undefined"==typeof e?"undefined":r(e))&&(Array.isArray(t)&&Array.isArray(e)?!this.arraysDiffer(t,e):"function"==typeof t?t.toString()===e.toString():"object"===("undefined"==typeof t?"undefined":r(t))&&null!==t&&null!==e?!this.objectsDiffer(t,e):t===e)},find:function(t,e){for(var r=0,n=t.length;r<n;r++){var o=t[r];if(e(o))return o}return null}}},function(t,e,r){(function(e){"use strict";var n=r(4),o=n;if("production"!==e.env.NODE_ENV){var i=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var o=0,i="Warning: "+t.replace(/%s/g,function(){return r[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(t){}};o=function(t,e){if(void 0===e)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==e.indexOf("Failed Composite propType: ")&&!t){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];i.apply(void 0,[e].concat(n))}}}t.exports=o}).call(e,r(1))},function(t,e,r){(function(e){if("production"!==e.env.NODE_ENV){var n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},i=!0;t.exports=r(16)(o,i)}else t.exports=r(15)()}).call(e,r(1))},function(t,e,r){(function(t){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=n(o),u=t.React||r(2);e.default=function(){return function(t){return(0,i.default)(function(e){return u.createElement(t,e)})}}}).call(e,function(){return this}())},function(t,e,r){(function(t){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=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},s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(3),l=n(c),f=t.React||r(2),p=function(t){return t.displayName||t.name||("string"==typeof t?t:"Component")};e.default=function(t){return function(e){function r(){var e,n,u,a;o(this,r);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return n=u=i(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(c))),u.displayName="Formsy("+p(t)+")",a=n,i(u,a)}return u(r,e),s(r,[{key:"render",value:function(){var e=this.props.innerRef;return f.createElement(t,a({ref:e},this.props))}}]),r}(l.default)}}).call(e,function(){return this}())},function(t,e){"use strict";var r=function(t){return null!==t&&void 0!==t},n=function(t){return""===t},o={isDefaultRequiredValue:function(t,e){return void 0===e||""===e},isExisty:function(t,e){return r(e)},matchRegexp:function(t,e,o){return!r(e)||n(e)||o.test(e)},isUndefined:function(t,e){return void 0===e},isEmptyString:function(t,e){return n(e)},isEmail:function(t,e){return o.matchRegexp(t,e,/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i)},isUrl:function(t,e){return o.matchRegexp(t,e,/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i)},isTrue:function(t,e){return e===!0},isFalse:function(t,e){return e===!1},isNumeric:function(t,e){return"number"==typeof e||o.matchRegexp(t,e,/^[-+]?(?:\d*[.])?\d+$/)},isAlpha:function(t,e){return o.matchRegexp(t,e,/^[A-Z]+$/i)},isAlphanumeric:function(t,e){return o.matchRegexp(t,e,/^[0-9A-Z]+$/i)},isInt:function(t,e){return o.matchRegexp(t,e,/^(?:[-+]?(?:0|[1-9]\d*))$/)},isFloat:function(t,e){return o.matchRegexp(t,e,/^(?:[-+]?(?:\d+))?(?:\.\d*)?(?:[eE][\+\-]?(?:\d+))?$/)},isWords:function(t,e){return o.matchRegexp(t,e,/^[A-Z\s]+$/i)},isSpecialWords:function(t,e){return o.matchRegexp(t,e,/^[A-Z\s\u00C0-\u017F]+$/i)},isLength:function(t,e,o){return!r(e)||n(e)||e.length===o},equals:function(t,e,o){return!r(e)||n(e)||e==o},equalsField:function(t,e,r){return e==t[r]},maxLength:function(t,e,n){return!r(e)||e.length<=n},minLength:function(t,e,o){return!r(e)||n(e)||e.length>=o}};t.exports=o},function(t,e){function r(t){return Object.keys(t).reduce(function(e,r){var n=r.match(/[^\[]*/i),o=r.match(/\[.*?\]/g)||[];o=[n[0]].concat(o).map(function(t){return t.replace(/\[|\]/g,"")});for(var i=e;o.length;){var u=o.shift();u in i?i=i[u]:(i[u]=o.length?isNaN(o[0])?{}:[]:t[r],i=i[u])}return e},{})}function n(t){function e(t,r,n){return Array.isArray(n)||"[object Object]"===Object.prototype.toString.call(n)?(Object.keys(n).forEach(function(o){e(t,r+"["+o+"]",n[o])}),t):(t[r]=n,t)}var r=Object.keys(t);return r.reduce(function(r,n){return e(r,n,t[n])},{})}t.exports={fromObj:n,toObj:r}},function(t,e,r){(function(e){"use strict";function n(t,r,n,s,c){if("production"!==e.env.NODE_ENV)for(var l in t)if(t.hasOwnProperty(l)){var f;try{o("function"==typeof t[l],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",s||"React class",n,l),f=t[l](r,l,s,n,null,u)}catch(t){f=t}if(i(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",n,l,typeof f),f instanceof Error&&!(f.message in a)){a[f.message]=!0;var p=c?c():"";i(!1,"Failed %s type: %s%s",n,f.message,null!=p?p:"")}}}if("production"!==e.env.NODE_ENV)var o=r(5),i=r(8),u=r(6),a={};t.exports=n}).call(e,r(1))},function(t,e,r){"use strict";var n=r(4),o=r(5),i=r(6);t.exports=function(){function t(t,e,r,n,u,a){a!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return r.checkPropTypes=n,r.PropTypes=r,r}},function(t,e,r){(function(e){"use strict";var n=r(4),o=r(5),i=r(8),u=r(6),a=r(14);t.exports=function(t,r){function s(t){var e=t&&(j&&t[j]||t[S]);if("function"==typeof e)return e}function c(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e}function l(t){this.message=t,this.stack=""}function f(t){function n(n,c,f,p,d,h,y){if(p=p||R,h=h||f,y!==u)if(r)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==e.env.NODE_ENV&&"undefined"!=typeof console){var v=p+":"+f;!a[v]&&s<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,p),a[v]=!0,s++)}return null==c[f]?n?new l(null===c[f]?"The "+d+" `"+h+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+h+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:t(c,f,p,d,h)}if("production"!==e.env.NODE_ENV)var a={},s=0;var c=n.bind(null,!1);return c.isRequired=n.bind(null,!0),c}function p(t){function e(e,r,n,o,i,u){var a=e[r],s=O(a);if(s!==t){var c=D(a);return new l("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+n+"`, expected ")+("`"+t+"`."))}return null}return f(e)}function d(){return f(n.thatReturnsNull)}function h(t){function e(e,r,n,o,i){if("function"!=typeof t)return new l("Property `"+i+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var a=e[r];if(!Array.isArray(a)){var s=O(a);return new l("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+n+"`, expected an array."))}for(var c=0;c<a.length;c++){var f=t(a,c,n,o,i+"["+c+"]",u);if(f instanceof Error)return f}return null}return f(e)}function y(){function e(e,r,n,o,i){var u=e[r];if(!t(u)){var a=O(u);return new l("Invalid "+o+" `"+i+"` of type "+("`"+a+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return f(e)}function v(t){function e(e,r,n,o,i){if(!(e[r]instanceof t)){var u=t.name||R,a=V(e[r]);return new l("Invalid "+o+" `"+i+"` of type "+("`"+a+"` supplied to `"+n+"`, expected ")+("instance of `"+u+"`."))}return null}return f(e)}function F(t){function r(e,r,n,o,i){for(var u=e[r],a=0;a<t.length;a++)if(c(u,t[a]))return null;var s=JSON.stringify(t);return new l("Invalid "+o+" `"+i+"` of value `"+u+"` "+("supplied to `"+n+"`, expected one of "+s+"."))}return Array.isArray(t)?f(r):("production"!==e.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,n.thatReturnsNull)}function m(t){function e(e,r,n,o,i){if("function"!=typeof t)return new l("Property `"+i+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var a=e[r],s=O(a);if("object"!==s)return new l("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+n+"`, expected an object."));for(var c in a)if(a.hasOwnProperty(c)){var f=t(a,c,n,o,i+"."+c,u);if(f instanceof Error)return f}return null}return f(e)}function b(t){function r(e,r,n,o,i){for(var a=0;a<t.length;a++){var s=t[a];if(null==s(e,r,n,o,i,u))return null}return new l("Invalid "+o+" `"+i+"` supplied to "+("`"+n+"`."))}if(!Array.isArray(t))return"production"!==e.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,n.thatReturnsNull;for(var o=0;o<t.length;o++){var a=t[o];if("function"!=typeof a)return i(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",w(a),o),n.thatReturnsNull}return f(r)}function g(){function t(t,e,r,n,o){return x(t[e])?null:new l("Invalid "+n+" `"+o+"` supplied to "+("`"+r+"`, expected a ReactNode."))}return f(t)}function E(t){function e(e,r,n,o,i){var a=e[r],s=O(a);if("object"!==s)return new l("Invalid "+o+" `"+i+"` of type `"+s+"` "+("supplied to `"+n+"`, expected `object`."));for(var c in t){var f=t[c];if(f){var p=f(a,c,n,o,i+"."+c,u);if(p)return p}}return null}return f(e)}function x(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(x);if(null===e||t(e))return!0;var r=s(e);if(!r)return!1;var n,o=r.call(e);if(r!==e.entries){for(;!(n=o.next()).done;)if(!x(n.value))return!1}else for(;!(n=o.next()).done;){var i=n.value;if(i&&!x(i[1]))return!1}return!0;default:return!1}}function _(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function O(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":_(e,t)?"symbol":e}function D(t){if("undefined"==typeof t||null===t)return""+t;var e=O(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function w(t){var e=D(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function V(t){return t.constructor&&t.constructor.name?t.constructor.name:R}var j="function"==typeof Symbol&&Symbol.iterator,S="@@iterator",R="<<anonymous>>",T={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:d(),arrayOf:h,element:y(),instanceOf:v,node:g(),objectOf:m,oneOf:F,oneOfType:b,shape:E};return l.prototype=Error.prototype,T.checkPropTypes=a,T.PropTypes=T,T}}).call(e,r(1))}])});
//# sourceMappingURL=formsy-react.js.map