From 4ee8c50865c357e005cb40ea03cdd403533aad26 Mon Sep 17 00:00:00 2001 From: Yangshun Date: Wed, 22 Mar 2023 07:35:18 +0800 Subject: [PATCH] 4.0.4 --- dist/Flux.js | 2 +- dist/Flux.min.js | 6 +++--- dist/FluxUtils.js | 2 +- dist/FluxUtils.min.js | 10 +++++----- package.json | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dist/Flux.js b/dist/Flux.js index d32cc0a4..b636fa8c 100644 --- a/dist/Flux.js +++ b/dist/Flux.js @@ -1,5 +1,5 @@ /** - * Flux v4.0.3 + * Flux v4.0.4 */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') diff --git a/dist/Flux.min.js b/dist/Flux.min.js index d44c5a4f..f8b0fde1 100644 --- a/dist/Flux.min.js +++ b/dist/Flux.min.js @@ -1,10 +1,10 @@ /** - * Flux v4.0.3 + * Flux v4.0.4 * - * Copyright (c) Facebook, Inc. and its affiliates. + * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ -!function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Flux=t():i.Flux=t()}(this,function(){return function(i){function t(s){if(n[s])return n[s].exports;var e=n[s]={exports:{},id:s,loaded:!1};return i[s].call(e.exports,e,e.exports,t),e.loaded=!0,e.exports}var n={};return t.m=i,t.c=n,t.p="",t(0)}([function(i,t,n){i.exports.Dispatcher=n(1)},function(i,t,n){"use strict";function s(i,t,n){return t in i?Object.defineProperty(i,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):i[t]=n,i}var e=n(2),o="ID_",a=function(){function i(){s(this,"_callbacks",void 0),s(this,"_isDispatching",void 0),s(this,"_isHandled",void 0),s(this,"_isPending",void 0),s(this,"_lastID",void 0),s(this,"_pendingPayload",void 0),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var t=i.prototype;return t.register=function(i){var t=o+this._lastID++;return this._callbacks[t]=i,t},t.unregister=function(i){this._callbacks[i]?void 0:e(!1),delete this._callbacks[i]},t.waitFor=function(i){var t,n;for(this._isDispatching?void 0:e(!1),t=0;t2?n-2:0),o=2;o2?n-2:0),r=2;r2?r-2:0),i=2;i2?r-2:0),o=2;o=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return i=!0,u=!1,{s:function(){c=c.call(t)},n:function(){var t=c.next();return i=t.done,t},e:function(t){u=!0,s=t},f:function(){try{i||null==c.return||c.return()}finally{if(u)throw s}}}}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{withProps:!1};return t=t.filter(function(t){return!!t}),{getInitialState:function(){return s(this),e.withProps?this.constructor.calculateState(null,this.props):this.constructor.calculateState(null,void 0)},componentWillMount:function(){var r,n=this,o=!1,i=function(){o=!0};this._fluxMixinSubscriptions=t.map(function(t){return t.addListener(i)}),r=function(){o&&n.setState(function(t){return e.withProps?n.constructor.calculateState(t,n.props):n.constructor.calculateState(t,void 0)}),o=!1},this._fluxMixinStoreGroup=new c(t,r)},componentWillUnmount:function(){var t,e,r;this._fluxMixinStoreGroup.release(),t=n(this._fluxMixinSubscriptions);try{for(t.s();!(e=t.n()).done;)r=e.value,r.remove()}catch(e){t.e(e)}finally{t.f()}this._fluxMixinSubscriptions=[]}}}function s(t){t.constructor.calculateState?void 0:a(!1)}var c=r(3),a=r(4);t.exports=u},function(t,e,r){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(11),c=r(19),a=r(4),f=function(t){function e(e){var r;return r=t.call(this,e)||this,u(n(r),"_state",void 0),r._state=r.getInitialState(),r}o(e,t);var r=e.prototype;return r.getState=function(){return this._state},r.getInitialState=function(){return c("FluxReduceStore","getInitialState")},r.reduce=function(t,e){return c("FluxReduceStore","reduce")},r.areEqual=function(t,e){return t===e},r.__invokeOnDispatch=function(t){var e,r;this.__changed=!1,e=this._state,r=this.reduce(e,t),void 0===r?a(!1):void 0,this.areEqual(e,r)||(this._state=r,this.__emitChange()),this.__changed&&this.__emitter.emit(this.__changeEvent)},e}(s);t.exports=f},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(12),i=o.EventEmitter,u=r(4),s=function(){function t(t){var e=this;n(this,"_dispatchToken",void 0),n(this,"__changed",void 0),n(this,"__changeEvent",void 0),n(this,"__className",void 0),n(this,"__dispatcher",void 0),n(this,"__emitter",void 0),this.__className=this.constructor.name,this.__changed=!1,this.__changeEvent="change",this.__dispatcher=t,this.__emitter=new i,this._dispatchToken=t.register(function(t){e.__invokeOnDispatch(t)})}var e=t.prototype;return e.addListener=function(t){return this.__emitter.addListener(this.__changeEvent,t)},e.getDispatcher=function(){return this.__dispatcher},e.getDispatchToken=function(){return this._dispatchToken},e.hasChanged=function(){return this.__dispatcher.isDispatching()?void 0:u(!1),this.__changed},e.__emitChange=function(){this.__dispatcher.isDispatching()?void 0:u(!1),this.__changed=!0},e.__invokeOnDispatch=function(t){this.__changed=!1,this.__onDispatch(t),this.__changed&&this.__emitter.emit(this.__changeEvent)},e.__onDispatch=function(t){u(!1)},t}();t.exports=s},function(t,e,r){var n={EventEmitter:r(13),EmitterSubscription:r(14)};t.exports=n},function(t,e,r){"use strict";var n=r(14),o=r(16),i=r(17),u=r(18),s=function(){function t(){this._subscriber=new o,this._currentSubscription=null}var e=t.prototype;return e.addListener=function(t,e,r){return this._subscriber.addSubscription(t,new n(this._subscriber,e,r))},e.once=function(t,e,r){var n=this;return this.addListener(t,function(){n.removeCurrentListener(),e.apply(r,arguments)})},e.removeAllListeners=function(t){this._subscriber.removeAllSubscriptions(t)},e.removeCurrentListener=function(){this._currentSubscription?void 0:i(!1),this._subscriber.removeSubscription(this._currentSubscription)},e.listeners=function(t){var e=this._subscriber.getSubscriptionsForType(t);return e?e.filter(u.thatReturnsTrue).map(function(t){return t.listener}):[]},e.emit=function(t){var e,r,n,o,i=this._subscriber.getSubscriptionsForType(t);if(i){for(e=Object.keys(i),r=0;r2?r-2:0),i=2;i=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return o=!0,u=!1,{s:function(){c=c.call(t)},n:function(){var t=c.next();return o=t.done,t},e:function(t){u=!0,s=t},f:function(){try{o||null==c.return||c.return()}finally{if(u)throw s}}}}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{withProps:!1};return t=t.filter(function(t){return!!t}),{getInitialState:function(){return s(this),e.withProps?this.constructor.calculateState(null,this.props):this.constructor.calculateState(null,void 0)},componentWillMount:function(){var r,n=this,i=!1,o=function(){i=!0};this._fluxMixinSubscriptions=t.map(function(t){return t.addListener(o)}),r=function(){i&&n.setState(function(t){return e.withProps?n.constructor.calculateState(t,n.props):n.constructor.calculateState(t,void 0)}),i=!1},this._fluxMixinStoreGroup=new c(t,r)},componentWillUnmount:function(){var t,e,r;this._fluxMixinStoreGroup.release(),t=n(this._fluxMixinSubscriptions);try{for(t.s();!(e=t.n()).done;)r=e.value,r.remove()}catch(e){t.e(e)}finally{t.f()}this._fluxMixinSubscriptions=[]}}}function s(t){t.constructor.calculateState?void 0:a(!1)}var c=r(3),a=r(4);t.exports=u},function(t,e,r){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}function o(t,e){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e,r){return e=s(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t){var e=c(t,"string");return"symbol"==typeof e?e:String(e)}function c(t,e){var r,n;if("object"!=typeof t||null===t)return t;if(r=t[Symbol.toPrimitive],void 0!==r){if(n=r.call(t,e||"default"),"object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var a=r(11),f=r(18),l=r(4),p=function(t){function e(e){var r;return r=t.call(this,e)||this,u(n(r),"_state",void 0),r._state=r.getInitialState(),r}i(e,t);var r=e.prototype;return r.getState=function(){return this._state},r.getInitialState=function(){return f("FluxReduceStore","getInitialState")},r.reduce=function(t,e){return f("FluxReduceStore","reduce")},r.areEqual=function(t,e){return t===e},r.__invokeOnDispatch=function(t){var e,r;this.__changed=!1,e=this._state,r=this.reduce(e,t),void 0===r?l(!1):void 0,this.areEqual(e,r)||(this._state=r,this.__emitChange()),this.__changed&&this.__emitter.emit(this.__changeEvent)},e}(a);t.exports=p},function(t,e,r){"use strict";function n(t,e,r){return e=i(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t){var e=o(t,"string");return"symbol"==typeof e?e:String(e)}function o(t,e){var r,n;if("object"!=typeof t||null===t)return t;if(r=t[Symbol.toPrimitive],void 0!==r){if(n=r.call(t,e||"default"),"object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var u=r(12),s=u.EventEmitter,c=r(4),a=function(){function t(t){var e=this;n(this,"_dispatchToken",void 0),n(this,"__changed",void 0),n(this,"__changeEvent",void 0),n(this,"__className",void 0),n(this,"__dispatcher",void 0),n(this,"__emitter",void 0),this.__className=this.constructor.name,this.__changed=!1,this.__changeEvent="change",this.__dispatcher=t,this.__emitter=new s,this._dispatchToken=t.register(function(t){e.__invokeOnDispatch(t)})}var e=t.prototype;return e.addListener=function(t){return this.__emitter.addListener(this.__changeEvent,t)},e.getDispatcher=function(){return this.__dispatcher},e.getDispatchToken=function(){return this._dispatchToken},e.hasChanged=function(){return this.__dispatcher.isDispatching()?void 0:c(!1),this.__changed},e.__emitChange=function(){this.__dispatcher.isDispatching()?void 0:c(!1),this.__changed=!0},e.__invokeOnDispatch=function(t){this.__changed=!1,this.__onDispatch(t),this.__changed&&this.__emitter.emit(this.__changeEvent)},e.__onDispatch=function(t){c(!1)},t}();t.exports=a},function(t,e,r){var n={EventEmitter:r(13),EmitterSubscription:r(14)};t.exports=n},function(t,e,r){"use strict";var n=r(14),i=r(16),o=r(4),u=r(17),s=function(){function t(){this._subscriber=new i,this._currentSubscription=null}var e=t.prototype;return e.addListener=function(t,e,r){return this._subscriber.addSubscription(t,new n(this._subscriber,e,r))},e.once=function(t,e,r){var n=this;return this.addListener(t,function(){n.removeCurrentListener(),e.apply(r,arguments)})},e.removeAllListeners=function(t){this._subscriber.removeAllSubscriptions(t)},e.removeCurrentListener=function(){this._currentSubscription?void 0:o(!1),this._subscriber.removeSubscription(this._currentSubscription)},e.listeners=function(t){var e=this._subscriber.getSubscriptionsForType(t);return e?e.filter(u.thatReturnsTrue).map(function(t){return t.listener}):[]},e.emit=function(t){var e,r,n,i,o=this._subscriber.getSubscriptionsForType(t);if(o){for(e=Object.keys(o),r=0;r