forgeplus/public/react/build/static/js/94.81465828.chunk.js

1 line
12 KiB
JavaScript

(this.webpackJsonp=this.webpackJsonp||[]).push([[94],{"+hnl":function(e,t,n){},MKzF:function(e,t,n){"use strict";n.r(t);n("SchZ"),n("+hnl")},kaz8:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n("17x9"),a=n("VCL8"),c=n("TSYQ"),u=n.n(c),i=n("x1Ya"),l=n("Gytx"),s=n.n(l),f=n("H84U"),p=n("6CfX");function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=x(e);if(t){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function O(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?k(e):t}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(c,e);var t,n,o,a=g(c);function c(){var e;return b(this,c),(e=a.apply(this,arguments)).saveCheckbox=function(t){e.rcCheckbox=t},e.renderCheckbox=function(t){var n,o=t.getPrefixCls,a=k(e),c=a.props,l=a.context,s=c.prefixCls,f=c.className,p=c.children,y=c.indeterminate,b=c.style,v=c.onMouseEnter,m=c.onMouseLeave,g=C(c,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave"]),O=l.checkboxGroup,x=o("checkbox",s),j=h({},g);O&&(j.onChange=function(){g.onChange&&g.onChange.apply(g,arguments),O.toggleOption({label:p,value:c.value})},j.name=O.name,j.checked=-1!==O.value.indexOf(c.value),j.disabled=c.disabled||O.disabled);var w=u()(f,(d(n={},"".concat(x,"-wrapper"),!0),d(n,"".concat(x,"-wrapper-checked"),j.checked),d(n,"".concat(x,"-wrapper-disabled"),j.disabled),n)),S=u()(d({},"".concat(x,"-indeterminate"),y));return r.createElement("label",{className:w,style:b,onMouseEnter:v,onMouseLeave:m},r.createElement(i.a,h({},j,{prefixCls:x,className:S,ref:e.saveCheckbox})),void 0!==p&&r.createElement("span",null,p))},e}return t=c,(n=[{key:"componentDidMount",value:function(){var e=this.props.value,t=(this.context||{}).checkboxGroup,n=void 0===t?{}:t;n.registerValue&&n.registerValue(e),Object(p.a)("checked"in this.props||(this.context||{}).checkboxGroup||!("value"in this.props),"Checkbox","`value` is not validate prop, do you mean `checked`?")}},{key:"shouldComponentUpdate",value:function(e,t,n){return!s()(this.props,e)||!s()(this.state,t)||!s()(this.context.checkboxGroup,n.checkboxGroup)}},{key:"componentDidUpdate",value:function(e){var t=e.value,n=this.props.value,r=(this.context||{}).checkboxGroup,o=void 0===r?{}:r;n!==t&&o.registerValue&&o.cancelValue&&(o.cancelValue(t),o.registerValue(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.value,t=(this.context||{}).checkboxGroup,n=void 0===t?{}:t;n.cancelValue&&n.cancelValue(e)}},{key:"focus",value:function(){this.rcCheckbox.focus()}},{key:"blur",value:function(){this.rcCheckbox.blur()}},{key:"render",value:function(){return r.createElement(f.a,null,this.renderCheckbox)}}])&&v(t.prototype,n),o&&v(t,o),c}(r.Component);j.__ANT_CHECKBOX=!0,j.defaultProps={indeterminate:!1},j.contextTypes={checkboxGroup:o.any},Object(a.polyfill)(j);var w=j,S=n("BGR+");function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(){return(E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function V(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=F(e);if(t){var o=F(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return R(this,n)}}function R(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?T(e):t}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(c,e);var t,n,o,a=I(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=a.call(this,e)).cancelValue=function(e){t.setState((function(t){return{registeredValues:t.registeredValues.filter((function(t){return t!==e}))}}))},t.registerValue=function(e){t.setState((function(t){var n=t.registeredValues;return{registeredValues:[].concat(V(n),[e])}}))},t.toggleOption=function(e){var n=t.state.registeredValues,r=t.state.value.indexOf(e.value),o=V(t.state.value);-1===r?o.push(e.value):o.splice(r,1),"value"in t.props||t.setState({value:o});var a=t.props.onChange;if(a){var c=t.getOptions();a(o.filter((function(e){return-1!==n.indexOf(e)})).sort((function(e,t){return c.findIndex((function(t){return t.value===e}))-c.findIndex((function(e){return e.value===t}))})))}},t.renderGroup=function(e){var n=e.getPrefixCls,o=T(t),a=o.props,c=o.state,i=a.prefixCls,l=a.className,s=a.style,f=a.options,p=D(a,["prefixCls","className","style","options"]),y=n("checkbox",i),d="".concat(y,"-group"),h=Object(S.a)(p,["children","defaultValue","value","onChange","disabled"]),b=a.children;f&&f.length>0&&(b=t.getOptions().map((function(e){return r.createElement(w,{prefixCls:y,key:e.value.toString(),disabled:"disabled"in e?e.disabled:a.disabled,value:e.value,checked:-1!==c.value.indexOf(e.value),onChange:e.onChange,className:"".concat(d,"-item")},e.label)})));var v=u()(d,l);return r.createElement("div",E({className:v,style:s},h),b)},t.state={value:e.value||e.defaultValue||[],registeredValues:[]},t}return t=c,o=[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value||[]}:null}}],(n=[{key:"getChildContext",value:function(){return{checkboxGroup:{toggleOption:this.toggleOption,value:this.state.value,disabled:this.props.disabled,name:this.props.name,registerValue:this.registerValue,cancelValue:this.cancelValue}}}},{key:"shouldComponentUpdate",value:function(e,t){return!s()(this.props,e)||!s()(this.state,t)}},{key:"getOptions",value:function(){return this.props.options.map((function(e){return"string"==typeof e?{label:e,value:e}:e}))}},{key:"render",value:function(){return r.createElement(f.a,null,this.renderGroup)}}])&&N(t.prototype,n),o&&N(t,o),c}(r.Component);M.defaultProps={options:[]},M.propTypes={defaultValue:o.array,value:o.array,options:o.array.isRequired,onChange:o.func},M.childContextTypes={checkboxGroup:o.any},Object(a.polyfill)(M);var A=M;w.Group=A;t.default=w},x1Ya:function(e,t,n){"use strict";var r=n("jo6Y"),o=n.n(r),a=n("QbLZ"),c=n.n(a),u=n("iCc5"),i=n.n(u),l=n("FYw3"),s=n.n(l),f=n("mRg0"),p=n.n(f),y=n("q1tI"),d=n.n(y),h=n("17x9"),b=n.n(h),v=n("TSYQ"),m=n.n(v),g=n("VCL8"),O=function(e){function t(n){i()(this,t);var r=s()(this,e.call(this,n));r.handleChange=function(e){var t=r.props,n=t.disabled,o=t.onChange;n||("checked"in r.props||r.setState({checked:e.target.checked}),o&&o({target:c()({},r.props,{checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e.nativeEvent}))},r.saveInput=function(e){r.input=e};var o="checked"in n?n.checked:n.defaultChecked;return r.state={checked:o},r}return p()(t,e),t.getDerivedStateFromProps=function(e,t){return"checked"in e?c()({},t,{checked:e.checked}):null},t.prototype.focus=function(){this.input.focus()},t.prototype.blur=function(){this.input.blur()},t.prototype.render=function(){var e,t=this.props,n=t.prefixCls,r=t.className,a=t.style,u=t.name,i=t.id,l=t.type,s=t.disabled,f=t.readOnly,p=t.tabIndex,y=t.onClick,h=t.onFocus,b=t.onBlur,v=t.autoFocus,g=t.value,O=o()(t,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","autoFocus","value"]),k=Object.keys(O).reduce((function(e,t){return"aria-"!==t.substr(0,5)&&"data-"!==t.substr(0,5)&&"role"!==t||(e[t]=O[t]),e}),{}),x=this.state.checked,C=m()(n,r,((e={})[n+"-checked"]=x,e[n+"-disabled"]=s,e));return d.a.createElement("span",{className:C,style:a},d.a.createElement("input",c()({name:u,id:i,type:l,readOnly:f,disabled:s,tabIndex:p,className:n+"-input",checked:!!x,onClick:y,onFocus:h,onBlur:b,onChange:this.handleChange,autoFocus:v,ref:this.saveInput,value:g},k)),d.a.createElement("span",{className:n+"-inner"}))},t}(y.Component);O.propTypes={prefixCls:b.a.string,className:b.a.string,style:b.a.object,name:b.a.string,id:b.a.string,type:b.a.string,defaultChecked:b.a.oneOfType([b.a.number,b.a.bool]),checked:b.a.oneOfType([b.a.number,b.a.bool]),disabled:b.a.bool,onFocus:b.a.func,onBlur:b.a.func,onChange:b.a.func,onClick:b.a.func,tabIndex:b.a.oneOfType([b.a.string,b.a.number]),readOnly:b.a.bool,autoFocus:b.a.bool,value:b.a.any},O.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){}},Object(g.polyfill)(O);var k=O;t.a=k}}]);