Socket
Socket
Sign inDemoInstall

wechat-mini-program-extend

Package Overview
Dependencies
0
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.5 to 1.3.6

2

dist/core/FrameworkInstaller.js

@@ -1,1 +0,1 @@

"use strict";function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var FrameworkInstaller=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"configuration",value:function(e,r,t){return null}},{key:"install",value:function(e,r,t){return t}},{key:"build",value:function(e,r,t){return{}}}]),e}();exports.default=FrameworkInstaller;
"use strict";function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var FrameworkInstaller=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"use",value:function(e,r){return!0}},{key:"configuration",value:function(e,r,t){return null}},{key:"install",value:function(e,r,t){return t}},{key:"build",value:function(e,r,t){return{}}}]),e}();exports.default=FrameworkInstaller;

@@ -1,1 +0,1 @@

"use strict";function _typeof(e){return(_typeof="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)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _OptionInstaller=_interopRequireDefault(require("./OptionInstaller")),_MethodsInstaller=_interopRequireDefault(require("./MethodsInstaller")),_ConstantsInstaller=_interopRequireDefault(require("./ConstantsInstaller")),_PropertiesInstaller=_interopRequireDefault(require("./PropertiesInstaller")),_DataInstaller=_interopRequireDefault(require("./DataInstaller")),_StateInstaller=_interopRequireDefault(require("./StateInstaller")),_ProviderInstaller=_interopRequireDefault(require("./ProviderInstaller")),_WatcherInstaller=_interopRequireDefault(require("./WatcherInstaller")),_HookInstaller=_interopRequireDefault(require("./HookInstaller")),_ComputedInstaller=_interopRequireDefault(require("./ComputedInstaller")),_MixinInstaller=_interopRequireDefault(require("./MixinInstaller")),_LifeCycleInstaller=_interopRequireDefault(require("./LifeCycleInstaller")),_InstanceInstaller=_interopRequireDefault(require("./InstanceInstaller")),_RelationsInstaller=_interopRequireDefault(require("./RelationsInstaller")),_EventBusInstaller=_interopRequireDefault(require("./EventBusInstaller")),_UpdateInstaller=_interopRequireDefault(require("./UpdateInstaller")),_ContextInstaller=_interopRequireDefault(require("./ContextInstaller")),_StoreInstaller=_interopRequireDefault(require("./StoreInstaller")),_Singleton3=require("../libs/Singleton"),_common=require("../utils/common"),_object=require("../utils/object"),_default=_interopRequireDefault(require("../libs/rfdc/default")),_Stream=require("../libs/Stream"),_options=_interopRequireDefault(require("../utils/options")),_lifecycle=_interopRequireDefault(require("../utils/lifecycle"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _createForOfIteratorHelper(e,t){var n,r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return r&&(e=r),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function _get(){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=_superPropBase(e,t);if(r)return r=Object.getOwnPropertyDescriptor(r,t),r.get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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 _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _inherits(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var r=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(n);return _possibleConstructorReturn(this,r?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RTCSign=Symbol("__wxRTC__"),InstallersSingleton=function(){_inherits(n,_Singleton3.Singleton);var t=_createSuper(n);function n(){var e;return _classCallCheck(this,n),_defineProperty(_assertThisInitialized(e=t.call(this,function(){return _toConsumableArray(e._installers.entries()).sort(function(e,t){return e[1]-t[1]}).map(function(e){return e[0]})})),"_installers",new Map),e}return _createClass(n,[{key:"prepare",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:100;e instanceof _OptionInstaller.default&&(this._installers.has(e)||this._installers.set(e,t))}}]),n}(),RuntimeContextSingleton=function(){_inherits(f,_Singleton3.Singleton);var o=_createSuper(f);function f(){var e;_classCallCheck(this,f);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty(_assertThisInitialized(e=o.call.apply(o,[this].concat(n))),"__interceptors",[]),e}return _createClass(f,[{key:"get",value:function(){var l=this,e=Array.prototype.slice.call(arguments),t=e[0],n=e[1],r=e[2],u=e[3],s=e[4],o=e[5],i=e[6],a=e[7],c=e[8],e=e[9];return this.intercept(void 0===o?null:o,void 0===i?null:i,void 0===a?null:a,void 0===c?null:c,void 0===e?null:e),_get(_getPrototypeOf(f.prototype),"get",this).call(this,t,n,r,u,s,function(e,t,n){l.__interceptors.length&&l.__onStateGetting(e,t,n)},function(e,t,n){l.__interceptors.length&&l.__onStateSetting(e,t,n)},function(e,t,n){l.__interceptors.length&&l.__onStateDeleted(e,t,n)},function(e,t,n,r,o,i,a){l.__interceptors.length&&l.__beforeMethodCall(e,t,n,r,o,i,a)},function(e,t,n,r){l.__interceptors.length&&l.__afterMethodCall(e,t,n,r)})}},{key:"__onStateGetting",value:function(e,t,n){var r,o=_createForOfIteratorHelper(this.__interceptors);try{for(o.s();!(r=o.n()).done;){var i=r.value.get;if(i&&!0===i(e,t,n))break}}catch(e){o.e(e)}finally{o.f()}}},{key:"__onStateSetting",value:function(e,t,n){var r,o=_createForOfIteratorHelper(this.__interceptors);try{for(o.s();!(r=o.n()).done;){var i=r.value.set;if(i&&!0===i(e,t,n))break}}catch(e){o.e(e)}finally{o.f()}}},{key:"__onStateDeleted",value:function(e,t,n){var r,o=_createForOfIteratorHelper(this.__interceptors);try{for(o.s();!(r=o.n()).done;){var i=r.value.del;if(i&&!0===i(e,t,n))break}}catch(e){o.e(e)}finally{o.f()}}},{key:"__beforeMethodCall",value:function(e,t,n,r,o,i,a){var l,c=_createForOfIteratorHelper(this.__interceptors);try{for(c.s();!(l=c.n()).done;){var u=l.value.before;if(u&&!0===u(e,t,n,r,o,i,a))break}}catch(e){c.e(e)}finally{c.f()}}},{key:"__afterMethodCall",value:function(e,t,n,r){var o,i=_createForOfIteratorHelper(this.__interceptors);try{for(i.s();!(o=i.n()).done;){var a=o.value.after;if(a&&!0===a(e,t,n,r))break}}catch(e){i.e(e)}finally{i.f()}}},{key:"intercept",value:function(t,n,r,o,i){var e=this;return!(t||n||r||o||i)||0<=this.__interceptors.findIndex(function(e){return e.get===t&&e.set===n&&e.del===r&&e.before===o&&e.after===i})?null:(this.__interceptors.push({get:t,set:n,del:r,before:o,after:i}),function(){e.cancelIntercept(t,n,r,o,i)})}},{key:"cancelIntercept",value:function(t,n,r,o,i){var e=this.__interceptors.findIndex(function(e){return e.get===t&&e.set===n&&e.del===r&&e.before===o&&e.after===i});0<=e&&this.__interceptors.splice(e,1)}}]),f}(),MPExtender=function(){function e(){_classCallCheck(this,e),_defineProperty(this,"_installers",new InstallersSingleton),_defineProperty(this,"_context",new Map),_defineProperty(this,"_initializationCompatibleContextEnabled",!1),this.use(new _MixinInstaller.default,5),this.use(new _LifeCycleInstaller.default,10),this.use(new _MethodsInstaller.default,15),this.use(new _ConstantsInstaller.default,20),this.use(new _PropertiesInstaller.default,25),this.use(new _DataInstaller.default,30),this.use(new _StateInstaller.default,35),this.use(new _ComputedInstaller.default,40),this.use(new _StoreInstaller.default,45),this.use(new _ProviderInstaller.default,50),this.use(new _WatcherInstaller.default,55),this.use(new _InstanceInstaller.default,95),this.use(new _EventBusInstaller.default,150),this.use(new _RelationsInstaller.default,200),this.use(new _HookInstaller.default,250),this.use(new _ContextInstaller.default,300),this.use(new _UpdateInstaller.default,350)}return _createClass(e,[{key:"installers",get:function(){return this._installers.get()}},{key:"use",value:function(e){this._installers.prepare(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:100)}},{key:"createRuntimeCompatibleContext",value:function(a,l,i,c,u){var s=this,e=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,t=6<arguments.length&&void 0!==arguments[6]?arguments[6]:null,o=7<arguments.length&&void 0!==arguments[7]?arguments[7]:null,_=8<arguments.length&&void 0!==arguments[8]?arguments[8]:null,d=9<arguments.length&&void 0!==arguments[9]?arguments[9]:null,f=[],p=(0,_object.createReactiveObject)(l.data,l.data,function(e,t){var n,r,o,i=_defineProperty({},e,t);n=a,r=l,o=i,s.installers.forEach(function(e){e.beforeUpdate(s,s._context,n,r,o)}),u(i,function(){var t,n,r;t=a,n=l,r=i,s.installers.forEach(function(e){e.updated(s,s._context,t,n,r)})})},"",e,t,function(e,t,n){var r=(0,_object.selectPathParent)(e);f.includes(r)||(0,_object.setData)(p,_defineProperty({},r,n)),o.call(void 0,e,t,n)},function(e,t,n,r,o,i,a){Array.isArray(a)&&["push","splice","shift","pop","fill","unshift","reverse","copyWithin"].includes(t)&&f.push(e),_.call(void 0,e,t,n,r,o,i,a)},function(e,t,n,r){f.splice(0).forEach(function(e){(0,_object.setData)(p,_defineProperty({},e,r))}),d.call(void 0,e,t,n,r)}),h=new _Singleton3.Singleton(function(n){var e={};return Object.keys(i).forEach(function(t){Object.defineProperty(e,t,{get:function(){return Reflect.get(n,t)},set:function(e){Reflect.set(n,t,e)}})}),e});return new Proxy(l,{ownKeys:function(e){return _toConsumableArray(new Set(["$data","$props"].concat(Object.keys(l)).concat(Object.keys(l.data))))},has:function(e,t){return!!["$data","$props"].includes(t)||(Reflect.has(l.data,t)||Reflect.has(l,t))},get:function(e,t,n){var r,o;return"$data"===t?(o=Object.keys(l.data||{}).filter(function(e){return(!i||!Reflect.has(i,e))&&(!c||!Reflect.has(c,e))}),r={},o.forEach(function(t){Object.defineProperty(r,t,{get:function(){return Reflect.get(p,t)},set:function(e){Reflect.set(p,t,e)}})}),r):"$props"===t?h.get(p):Reflect.has(e,t)?(o=Reflect.get(e,t),(0,_common.isFunction)(o)?o.bind(e):o):Reflect.has(l.data,t)?Reflect.get(p,t):Reflect.get(e,t)},set:function(e,t,n,r){return!["$data","$props"].includes(t)&&(Reflect.has(l.data,t)||i&&Reflect.has(i,t)||c&&Reflect.has(c,t)?Reflect.set(p,t,n):Reflect.set(l,t,n))},deleteProperty:function(e,t){return!["$data","$props"].includes(t)&&(Reflect.has(l.data,t)?Reflect.deleteProperty(l.data,t):Reflect.deleteProperty(e,t))}})}},{key:"createRuntimeContextSingleton",value:function(){var i=this;return new RuntimeContextSingleton(function(e,t,n,r,o){return i.createRuntimeCompatibleContext(e,t,n,r,o,5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,6<arguments.length&&void 0!==arguments[6]?arguments[6]:null,7<arguments.length&&void 0!==arguments[7]?arguments[7]:null,8<arguments.length&&void 0!==arguments[8]?arguments[8]:null,9<arguments.length&&void 0!==arguments[9]?arguments[9]:null)})}},{key:"getRuntimeContextSingleton",value:function(e){return Reflect.has(e,RTCSign)||Object.defineProperty(e,RTCSign,{value:this.createRuntimeContextSingleton(),configurable:!0,enumerable:!1,writable:!1}),Reflect.get(e,RTCSign)}},{key:"deleteRuntimeContextSingleton",value:function(e){var t=this.getRuntimeContextSingleton();t&&t.release(),Reflect.has(e,RTCSign)&&Reflect.deleteProperty(e,RTCSign)}},{key:"createConstantsContext",value:function(o){var e=_Stream.Stream.of(Object.keys(o).filter(function(e){return!_options.default.has(e)&&!_lifecycle.default.has(e)})).map(function(e){return[e,o[e]]}).collect(_Stream.Collectors.toMap());return new Proxy(e,{set:function(e,t,n,r){return!!Reflect.set(e,t,n)&&(Reflect.has(o,t)&&Reflect.set(o,t,n),!0)}})}},{key:"createPropertiesCompatibleContext",value:function(n,o){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=new _Singleton3.Singleton(function(n){var e={};Object.keys(o).forEach(function(t){Object.defineProperty(e,t,{get:function(){return Reflect.get(n,t)},set:function(e){Reflect.set(n,t,e)}})})}),a=new Proxy(n,{has:function(e,t){return Reflect.has(e,t)||["$options","$props"].includes(t)},ownKeys:function(e){return _toConsumableArray(new Set(["$options","$props"].concat(Object.keys(e))))},get:function(e,t,n){return"$options"===t?r:"$props"===t?i.get(n):Reflect.has(e,t)?Reflect.get(e,t):Reflect.has(o,t)?(e=Reflect.get(o,t),Reflect.has(e,"value")?e.value:(0,_common.isFunction)(e.default)?e.default.call(n):e.default):void 0},set:function(e,t,n,r){return!["$options","$props"].includes(t)&&(Reflect.has(o,t)&&Reflect.set(o[t],"value",n),Reflect.set(e,t,n))}});return Object.keys(o).forEach(function(e){var t=o[e];Reflect.has(n,e)||(Reflect.has(t,"value")?n[e]=t.value:(0,_common.isFunction)(t.default)?n[e]=t.default.call(a):n[e]=t.default)}),a}},{key:"createDataCompatibleContext",value:function(i,a,e,l,c){var t,u=this.createPropertiesCompatibleContext(i,a||{},5<arguments.length&&void 0!==arguments[5]?arguments[5]:{}),n=new Proxy(i,{has:function(e,t){return Reflect.has(e,t)||Reflect.has(u,t)||!c&&Reflect.has(c,t)||!l&&Reflect.has(l,t)||["data","$data"].includes(t)},ownKeys:function(e){var t=[];return[c,u,l,e].forEach(function(e){e&&Array.prototype.push.apply(t,Object.keys(e))}),_toConsumableArray(new Set(["data","$data"].concat(t)))},get:function(e,t,n){return"data"===t?e:"$data"===t?(o=Object.keys(i).filter(function(e){return(!a||!Reflect.has(a,e))&&(!l||!Reflect.has(l,e))}),r={},o.forEach(function(e){Object.defineProperty(r,e,{get:function(){return Reflect.get(n,e)},set:function(e){Reflect.set(n,t,e)}})}),r):Reflect.has(u,t)?Reflect.get(u,t):c&&Reflect.has(c,t)?(o=c[t],(0,_common.isFunction)(o)?o.bind(n):o):Reflect.get(e,t);var r,o},set:function(e,t,n,r){return!["data","$data"].includes(t)&&(Reflect.has(u,t)?Reflect.set(u,t,n):c&&Reflect.has(c,t)?Reflect.set(c,t,n):Reflect.set(e,t,n))}});return(0,_common.isFunction)(e)?(t=e.call(n),Object.keys(t).forEach(function(e){if(Reflect.has(i,e))throw new Error('The data property "'.concat(e,'" is already declared as a prop. Use prop default value instead.'))}),Object.assign(i,t)):(e&&Object.keys(e).forEach(function(e){if(Reflect.has(i,e))throw new Error('The data property "'.concat(e,'" is already declared as a prop. Use prop default value instead.'))}),Object.assign(i,e)),n}},{key:"getComputedDependencies",value:function(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},i=(0,_default.default)(e),a=new Map,l=[],e=(0,_object.createReactiveObject)(i,i,function(e,t){(0,_object.setData)(i,_defineProperty({},e,t))},"",function(e,t,n){l.includes(e)||0!==n||l.push(e)},function(e,t,n){var r=(0,_object.selectPathRoot)(e);l.splice(0).map(function(e){return(0,_object.selectPathRoot)(e)}).filter(function(e){return e!==r}).forEach(function(e){a.has(e)||a.set(e,[]);e=a.get(e);e.includes(r)||e.push(r)})}),c=this.createDataCompatibleContext(e,t,null,n,r,o);return((0,_common.isPlainObject)(n)?Object.keys(n).filter(function(e){return(0,_common.isPlainObject)(n[e])&&(0,_common.isFunction)(n[e].get)||(0,_common.isFunction)(n[e])}):[]).forEach(function(e){var t;Reflect.has(i,e)||(t=(0,_common.isFunction)(n[e].get)?n[e].get:n[e],(0,_common.isFunction)(t)&&(c[e]=t.call(c)))}),a}},{key:"createInitializationCompatibleContext",value:function(o,i,e,a,t){var n=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{},l=new Set,c=[],r=(0,_object.createReactiveObject)(o,o,function(e,t){var n=(0,_object.selectPathRoot)(e);if(!l.has(n)){if(l.add(n),n!==e)(0,_object.getData)(o,e)!==t&&(0,_object.setData)(o,_defineProperty({},e,t));else{var r=a[n]&&(0,_common.isFunction)(a[n].set)?a[n].set:null;if(t!==o[n])if((0,_common.isFunction)(r)){r.call(u,t);r=a[n]&&(0,_common.isFunction)(a[n].get)?a[n].get:a[n];if(!(0,_common.isFunction)(r))throw new Error('Getter is missing for computed property "'.concat(n,'".'));o[n]=r.call(u)}else(0,_object.setData)(o,_defineProperty({},e,t))}r=i.get(n);r&&r.forEach(function(e){var t;l.has(e)||(t=a[e]&&(0,_common.isFunction)(a[e].get)?a[e].get:a[e],(0,_common.isFunction)(t)?u[e]=t.call(u):u[e]=o[e])}),l.delete(n)}},"",null,null,function(e,t,n){var r=(0,_object.selectPathParent)(e);c.includes(r)||(r=_defineProperty({},e,n),(0,_object.setData)(o,r))},function(e,t,n,r,o,i,a){Array.isArray(a)&&["push","splice","shift","pop","fill","unshift","reverse","copyWithin"].includes(t)&&c.push(e)},function(e,t,n,r){c.splice(0).forEach(function(e){e=_defineProperty({},e,r);(0,_object.setData)(o,e)})}),u=this.createDataCompatibleContext(r,e,null,a,t,n);return((0,_common.isPlainObject)(a)?Object.keys(a).filter(function(e){return(0,_common.isPlainObject)(a[e])&&(0,_common.isFunction)(a[e].get)||(0,_common.isFunction)(a[e])}):[]).forEach(function(e){var t;Reflect.has(o,e)||(t=a[e]&&(0,_common.isFunction)(a[e].get)?a[e].get:a[e],(0,_common.isFunction)(t)&&(o[e]=t.call(u)))}),u}},{key:"createInitializationContextSingleton",value:function(){var a=this;return new _Singleton3.Singleton(function(e,t,n,r,o,i){return a.createInitializationCompatibleContext(e,t,n,r,o,i)})}},{key:"extends",value:function(e){var r=this,o=e,i=this.installers,t={},n=(i.forEach(function(e){e=e.configuration(r,r._context,o);e&&Object.assign(t,e)}),i.forEach(function(e){e.install(r,r._context,t)}),{behaviors:[Behavior({definitionFilter:function(t,n){i.forEach(function(e){e.definitionFilter(r,r._context,o,t,n);e=e.behaviors();Array.isArray(e)&&e.length&&(t.behaviors=_Stream.Stream.of((t.behaviors||[]).concat(e)).distinct().collect(_Stream.Collectors.toList()))})}})]});return i.forEach(function(e){Object.assign(n,e.build(r,r._context,t))}),n}}],[{key:"getRuntimeContext",value:function(e){if(!Reflect.has(e,RTCSign))throw new Error("Runtime context has not been initialized.");return Reflect.get(e,RTCSign).get()}}]),e}();exports.default=MPExtender;
"use strict";function _typeof(e){return(_typeof="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)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _OptionInstaller=_interopRequireDefault(require("./OptionInstaller")),_MethodsInstaller=_interopRequireDefault(require("./MethodsInstaller")),_ConstantsInstaller=_interopRequireDefault(require("./ConstantsInstaller")),_PropertiesInstaller=_interopRequireDefault(require("./PropertiesInstaller")),_DataInstaller=_interopRequireDefault(require("./DataInstaller")),_StateInstaller=_interopRequireDefault(require("./StateInstaller")),_ProviderInstaller=_interopRequireDefault(require("./ProviderInstaller")),_WatcherInstaller=_interopRequireDefault(require("./WatcherInstaller")),_HookInstaller=_interopRequireDefault(require("./HookInstaller")),_ComputedInstaller=_interopRequireDefault(require("./ComputedInstaller")),_MixinInstaller=_interopRequireDefault(require("./MixinInstaller")),_LifeCycleInstaller=_interopRequireDefault(require("./LifeCycleInstaller")),_InstanceInstaller=_interopRequireDefault(require("./InstanceInstaller")),_RelationsInstaller=_interopRequireDefault(require("./RelationsInstaller")),_EventBusInstaller=_interopRequireDefault(require("./EventBusInstaller")),_UpdateInstaller=_interopRequireDefault(require("./UpdateInstaller")),_ContextInstaller=_interopRequireDefault(require("./ContextInstaller")),_StoreInstaller=_interopRequireDefault(require("./StoreInstaller")),_Singleton2=require("../libs/Singleton"),_common=require("../utils/common"),_object=require("../utils/object"),_default=_interopRequireDefault(require("../libs/rfdc/default")),_Stream=require("../libs/Stream"),_options=_interopRequireDefault(require("../utils/options")),_lifecycle=_interopRequireDefault(require("../utils/lifecycle"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){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 _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var n,r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return r&&(e=r),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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 _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _get(){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=_superPropBase(e,t);if(r)return r=Object.getOwnPropertyDescriptor(r,t),r.get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var r=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(n);return _possibleConstructorReturn(this,r?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RTCSign=Symbol("__wxRTC__"),RuntimeContextSingleton=function(){_inherits(f,_Singleton2.Singleton);var o=_createSuper(f);function f(){var e;_classCallCheck(this,f);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty(_assertThisInitialized(e=o.call.apply(o,[this].concat(n))),"__interceptors",[]),e}return _createClass(f,[{key:"get",value:function(){var l=this,e=Array.prototype.slice.call(arguments),t=e[0],n=e[1],r=e[2],u=e[3],s=e[4],o=e[5],i=e[6],a=e[7],c=e[8],e=e[9];return this.intercept(void 0===o?null:o,void 0===i?null:i,void 0===a?null:a,void 0===c?null:c,void 0===e?null:e),_get(_getPrototypeOf(f.prototype),"get",this).call(this,t,n,r,u,s,function(e,t,n){l.__interceptors.length&&l.__onStateGetting(e,t,n)},function(e,t,n){l.__interceptors.length&&l.__onStateSetting(e,t,n)},function(e,t,n){l.__interceptors.length&&l.__onStateDeleted(e,t,n)},function(e,t,n,r,o,i,a){l.__interceptors.length&&l.__beforeMethodCall(e,t,n,r,o,i,a)},function(e,t,n,r){l.__interceptors.length&&l.__afterMethodCall(e,t,n,r)})}},{key:"__onStateGetting",value:function(e,t,n){var r,o=_createForOfIteratorHelper(this.__interceptors);try{for(o.s();!(r=o.n()).done;){var i=r.value.get;if(i&&!0===i(e,t,n))break}}catch(e){o.e(e)}finally{o.f()}}},{key:"__onStateSetting",value:function(e,t,n){var r,o=_createForOfIteratorHelper(this.__interceptors);try{for(o.s();!(r=o.n()).done;){var i=r.value.set;if(i&&!0===i(e,t,n))break}}catch(e){o.e(e)}finally{o.f()}}},{key:"__onStateDeleted",value:function(e,t,n){var r,o=_createForOfIteratorHelper(this.__interceptors);try{for(o.s();!(r=o.n()).done;){var i=r.value.del;if(i&&!0===i(e,t,n))break}}catch(e){o.e(e)}finally{o.f()}}},{key:"__beforeMethodCall",value:function(e,t,n,r,o,i,a){var l,c=_createForOfIteratorHelper(this.__interceptors);try{for(c.s();!(l=c.n()).done;){var u=l.value.before;if(u&&!0===u(e,t,n,r,o,i,a))break}}catch(e){c.e(e)}finally{c.f()}}},{key:"__afterMethodCall",value:function(e,t,n,r){var o,i=_createForOfIteratorHelper(this.__interceptors);try{for(i.s();!(o=i.n()).done;){var a=o.value.after;if(a&&!0===a(e,t,n,r))break}}catch(e){i.e(e)}finally{i.f()}}},{key:"intercept",value:function(t,n,r,o,i){var e=this;return!(t||n||r||o||i)||0<=this.__interceptors.findIndex(function(e){return e.get===t&&e.set===n&&e.del===r&&e.before===o&&e.after===i})?null:(this.__interceptors.push({get:t,set:n,del:r,before:o,after:i}),function(){e.cancelIntercept(t,n,r,o,i)})}},{key:"cancelIntercept",value:function(t,n,r,o,i){var e=this.__interceptors.findIndex(function(e){return e.get===t&&e.set===n&&e.del===r&&e.before===o&&e.after===i});0<=e&&this.__interceptors.splice(e,1)}}]),f}(),MPExtender=function(){function e(){_classCallCheck(this,e),_defineProperty(this,"_installers",new Map),_defineProperty(this,"_context",new Map),_defineProperty(this,"_initializationCompatibleContextEnabled",!1),this.use(new _MixinInstaller.default,5),this.use(new _LifeCycleInstaller.default,10),this.use(new _MethodsInstaller.default,15),this.use(new _ConstantsInstaller.default,20),this.use(new _PropertiesInstaller.default,25),this.use(new _DataInstaller.default,30),this.use(new _StateInstaller.default,35),this.use(new _ComputedInstaller.default,40),this.use(new _StoreInstaller.default,45),this.use(new _ProviderInstaller.default,50),this.use(new _WatcherInstaller.default,55),this.use(new _InstanceInstaller.default,95),this.use(new _EventBusInstaller.default,150),this.use(new _RelationsInstaller.default,200),this.use(new _HookInstaller.default,250),this.use(new _ContextInstaller.default,300),this.use(new _UpdateInstaller.default,350)}return _createClass(e,[{key:"installers",get:function(){return _toConsumableArray(this._installers.entries()).sort(function(e,t){return e[1]-t[1]}).map(function(e){return e[0]})}},{key:"use",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:100;e instanceof _OptionInstaller.default&&(this._installers.has(e)||this._installers.set(e,t))}},{key:"createRuntimeCompatibleContext",value:function(a,l,i,c,u){var s=this,e=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,t=6<arguments.length&&void 0!==arguments[6]?arguments[6]:null,o=7<arguments.length&&void 0!==arguments[7]?arguments[7]:null,_=8<arguments.length&&void 0!==arguments[8]?arguments[8]:null,d=9<arguments.length&&void 0!==arguments[9]?arguments[9]:null,f=[],p=(0,_object.createReactiveObject)(l.data,l.data,function(e,t){var n,r,o,i=_defineProperty({},e,t);n=a,r=l,o=i,s.installers.forEach(function(e){e.beforeUpdate(s,s._context,n,r,o)}),u(i,function(){var t,n,r;t=a,n=l,r=i,s.installers.forEach(function(e){e.updated(s,s._context,t,n,r)})})},"",e,t,function(e,t,n){var r=(0,_object.selectPathParent)(e);f.includes(r)||(0,_object.setData)(p,_defineProperty({},r,n)),o.call(void 0,e,t,n)},function(e,t,n,r,o,i,a){Array.isArray(a)&&["push","splice","shift","pop","fill","unshift","reverse","copyWithin"].includes(t)&&f.push(e),_.call(void 0,e,t,n,r,o,i,a)},function(e,t,n,r){f.splice(0).forEach(function(e){(0,_object.setData)(p,_defineProperty({},e,r))}),d.call(void 0,e,t,n,r)}),h=new _Singleton2.Singleton(function(n){var e={};return Object.keys(i).forEach(function(t){Object.defineProperty(e,t,{get:function(){return Reflect.get(n,t)},set:function(e){Reflect.set(n,t,e)}})}),e});return new Proxy(l,{ownKeys:function(e){return _toConsumableArray(new Set(["$data","$props"].concat(Object.keys(l)).concat(Object.keys(l.data))))},has:function(e,t){return!!["$data","$props"].includes(t)||(Reflect.has(l.data,t)||Reflect.has(l,t))},get:function(e,t,n){var r,o;return"$data"===t?(o=Object.keys(l.data||{}).filter(function(e){return(!i||!Reflect.has(i,e))&&(!c||!Reflect.has(c,e))}),r={},o.forEach(function(t){Object.defineProperty(r,t,{get:function(){return Reflect.get(p,t)},set:function(e){Reflect.set(p,t,e)}})}),r):"$props"===t?h.get(p):Reflect.has(e,t)?(o=Reflect.get(e,t),(0,_common.isFunction)(o)?o.bind(e):o):Reflect.has(l.data,t)?Reflect.get(p,t):Reflect.get(e,t)},set:function(e,t,n,r){return!["$data","$props"].includes(t)&&(Reflect.has(l.data,t)||i&&Reflect.has(i,t)||c&&Reflect.has(c,t)?Reflect.set(p,t,n):Reflect.set(l,t,n))},deleteProperty:function(e,t){return!["$data","$props"].includes(t)&&(Reflect.has(l.data,t)?Reflect.deleteProperty(l.data,t):Reflect.deleteProperty(e,t))}})}},{key:"createRuntimeContextSingleton",value:function(){var i=this;return new RuntimeContextSingleton(function(e,t,n,r,o){return i.createRuntimeCompatibleContext(e,t,n,r,o,5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,6<arguments.length&&void 0!==arguments[6]?arguments[6]:null,7<arguments.length&&void 0!==arguments[7]?arguments[7]:null,8<arguments.length&&void 0!==arguments[8]?arguments[8]:null,9<arguments.length&&void 0!==arguments[9]?arguments[9]:null)})}},{key:"getRuntimeContextSingleton",value:function(e){return Reflect.has(e,RTCSign)||Object.defineProperty(e,RTCSign,{value:this.createRuntimeContextSingleton(),configurable:!0,enumerable:!1,writable:!1}),Reflect.get(e,RTCSign)}},{key:"deleteRuntimeContextSingleton",value:function(e){var t=this.getRuntimeContextSingleton();t&&t.release(),Reflect.has(e,RTCSign)&&Reflect.deleteProperty(e,RTCSign)}},{key:"createConstantsContext",value:function(o){var e=_Stream.Stream.of(Object.keys(o).filter(function(e){return!_options.default.has(e)&&!_lifecycle.default.has(e)})).map(function(e){return[e,o[e]]}).collect(_Stream.Collectors.toMap());return new Proxy(e,{set:function(e,t,n,r){return!!Reflect.set(e,t,n)&&(Reflect.has(o,t)&&Reflect.set(o,t,n),!0)}})}},{key:"createPropertiesCompatibleContext",value:function(n,o){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=new _Singleton2.Singleton(function(n){var e={};Object.keys(o).forEach(function(t){Object.defineProperty(e,t,{get:function(){return Reflect.get(n,t)},set:function(e){Reflect.set(n,t,e)}})})}),a=new Proxy(n,{has:function(e,t){return Reflect.has(e,t)||["$options","$props"].includes(t)},ownKeys:function(e){return _toConsumableArray(new Set(["$options","$props"].concat(Object.keys(e))))},get:function(e,t,n){return"$options"===t?r:"$props"===t?i.get(n):Reflect.has(e,t)?Reflect.get(e,t):Reflect.has(o,t)?(e=Reflect.get(o,t),Reflect.has(e,"value")?e.value:(0,_common.isFunction)(e.default)?e.default.call(n):e.default):void 0},set:function(e,t,n,r){return!["$options","$props"].includes(t)&&(Reflect.has(o,t)&&Reflect.set(o[t],"value",n),Reflect.set(e,t,n))}});return Object.keys(o).forEach(function(e){var t=o[e];Reflect.has(n,e)||(Reflect.has(t,"value")?n[e]=t.value:(0,_common.isFunction)(t.default)?n[e]=t.default.call(a):n[e]=t.default)}),a}},{key:"createDataCompatibleContext",value:function(i,a,e,l,c){var t,u=this.createPropertiesCompatibleContext(i,a||{},5<arguments.length&&void 0!==arguments[5]?arguments[5]:{}),n=new Proxy(i,{has:function(e,t){return Reflect.has(e,t)||Reflect.has(u,t)||!c&&Reflect.has(c,t)||!l&&Reflect.has(l,t)||["data","$data"].includes(t)},ownKeys:function(e){var t=[];return[c,u,l,e].forEach(function(e){e&&Array.prototype.push.apply(t,Object.keys(e))}),_toConsumableArray(new Set(["data","$data"].concat(t)))},get:function(e,t,n){return"data"===t?e:"$data"===t?(o=Object.keys(i).filter(function(e){return(!a||!Reflect.has(a,e))&&(!l||!Reflect.has(l,e))}),r={},o.forEach(function(e){Object.defineProperty(r,e,{get:function(){return Reflect.get(n,e)},set:function(e){Reflect.set(n,t,e)}})}),r):Reflect.has(u,t)?Reflect.get(u,t):c&&Reflect.has(c,t)?(o=c[t],(0,_common.isFunction)(o)?o.bind(n):o):Reflect.get(e,t);var r,o},set:function(e,t,n,r){return!["data","$data"].includes(t)&&(Reflect.has(u,t)?Reflect.set(u,t,n):c&&Reflect.has(c,t)?Reflect.set(c,t,n):Reflect.set(e,t,n))}});return(0,_common.isFunction)(e)?(t=e.call(n),Object.keys(t).forEach(function(e){if(Reflect.has(i,e))throw new Error('The data property "'.concat(e,'" is already declared as a prop. Use prop default value instead.'))}),Object.assign(i,t)):(e&&Object.keys(e).forEach(function(e){if(Reflect.has(i,e))throw new Error('The data property "'.concat(e,'" is already declared as a prop. Use prop default value instead.'))}),Object.assign(i,e)),n}},{key:"getComputedDependencies",value:function(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},i=(0,_default.default)(e),a=new Map,l=[],e=(0,_object.createReactiveObject)(i,i,function(e,t){(0,_object.setData)(i,_defineProperty({},e,t))},"",function(e,t,n){l.includes(e)||0!==n||l.push(e)},function(e,t,n){var r=(0,_object.selectPathRoot)(e);l.splice(0).map(function(e){return(0,_object.selectPathRoot)(e)}).filter(function(e){return e!==r}).forEach(function(e){a.has(e)||a.set(e,[]);e=a.get(e);e.includes(r)||e.push(r)})}),c=this.createDataCompatibleContext(e,t,null,n,r,o);return((0,_common.isPlainObject)(n)?Object.keys(n).filter(function(e){return(0,_common.isPlainObject)(n[e])&&(0,_common.isFunction)(n[e].get)||(0,_common.isFunction)(n[e])}):[]).forEach(function(e){var t;Reflect.has(i,e)||(t=(0,_common.isFunction)(n[e].get)?n[e].get:n[e],(0,_common.isFunction)(t)&&(c[e]=t.call(c)))}),a}},{key:"createInitializationCompatibleContext",value:function(o,i,e,a,t){var n=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{},l=new Set,c=[],r=(0,_object.createReactiveObject)(o,o,function(e,t){var n=(0,_object.selectPathRoot)(e);if(!l.has(n)){if(l.add(n),n!==e)(0,_object.getData)(o,e)!==t&&(0,_object.setData)(o,_defineProperty({},e,t));else{var r=a[n]&&(0,_common.isFunction)(a[n].set)?a[n].set:null;if(t!==o[n])if((0,_common.isFunction)(r)){r.call(u,t);r=a[n]&&(0,_common.isFunction)(a[n].get)?a[n].get:a[n];if(!(0,_common.isFunction)(r))throw new Error('Getter is missing for computed property "'.concat(n,'".'));o[n]=r.call(u)}else(0,_object.setData)(o,_defineProperty({},e,t))}r=i.get(n);r&&r.forEach(function(e){var t;l.has(e)||(t=a[e]&&(0,_common.isFunction)(a[e].get)?a[e].get:a[e],(0,_common.isFunction)(t)?u[e]=t.call(u):u[e]=o[e])}),l.delete(n)}},"",null,null,function(e,t,n){var r=(0,_object.selectPathParent)(e);c.includes(r)||(r=_defineProperty({},e,n),(0,_object.setData)(o,r))},function(e,t,n,r,o,i,a){Array.isArray(a)&&["push","splice","shift","pop","fill","unshift","reverse","copyWithin"].includes(t)&&c.push(e)},function(e,t,n,r){c.splice(0).forEach(function(e){e=_defineProperty({},e,r);(0,_object.setData)(o,e)})}),u=this.createDataCompatibleContext(r,e,null,a,t,n);return((0,_common.isPlainObject)(a)?Object.keys(a).filter(function(e){return(0,_common.isPlainObject)(a[e])&&(0,_common.isFunction)(a[e].get)||(0,_common.isFunction)(a[e])}):[]).forEach(function(e){var t;Reflect.has(o,e)||(t=a[e]&&(0,_common.isFunction)(a[e].get)?a[e].get:a[e],(0,_common.isFunction)(t)&&(o[e]=t.call(u)))}),u}},{key:"createInitializationContextSingleton",value:function(){var a=this;return new _Singleton2.Singleton(function(e,t,n,r,o,i){return a.createInitializationCompatibleContext(e,t,n,r,o,i)})}},{key:"extends",value:function(e){var r=this,o=e,i=(this.installers.forEach(function(e){!1===e.use(r,o)&&r._installers.delete(e)}),this.installers),t={},n=(i.forEach(function(e){e=e.configuration(r,r._context,o);e&&Object.assign(t,e)}),i.forEach(function(e){e.install(r,r._context,t)}),{behaviors:[Behavior({definitionFilter:function(t,n){i.forEach(function(e){e.definitionFilter(r,r._context,o,t,n);e=e.behaviors();Array.isArray(e)&&e.length&&(t.behaviors=_Stream.Stream.of((t.behaviors||[]).concat(e)).distinct().collect(_Stream.Collectors.toList()))})}})]});return i.forEach(function(e){Object.assign(n,e.build(r,r._context,t))}),n}}],[{key:"getRuntimeContext",value:function(e){if(!Reflect.has(e,RTCSign))throw new Error("Runtime context has not been initialized.");return Reflect.get(e,RTCSign).get()}}]),e}();exports.default=MPExtender;
{
"name": "wechat-mini-program-extend",
"version": "1.3.5",
"version": "1.3.6",
"repository": "git@github.com:sitorhy/wechat-mini-program-extend.git",

@@ -5,0 +5,0 @@ "author": "sitorhy <sitorhy>",

@@ -6,3 +6,3 @@ # wechat-mini-program-extend

<img src="https://github.com/sitorhy/wechat-mini-program-extend/blob/main/main/mp-wechat/pages/index/logo.svg" width="100" height="100" />
<img alt="logo" src="https://github.com/sitorhy/wechat-mini-program-extend/blob/main/main/mp-wechat/pages/index/logo.svg" width="100" height="100" />

@@ -348,4 +348,4 @@ <br>

```
created
num = 114
created
onLoad

@@ -762,3 +762,3 @@ mounted

computed: {
count: () => store.state.count;
count: () => store.state.count
},

@@ -765,0 +765,0 @@ increment() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc