var slim=function(e){"use strict";function t(){}var o="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},r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},n=function(e){if("object"!==(void 0===e?"undefined":o(e))||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},i=function(e){return"string"==typeof e},u=window.console.warn,a=function(e){throw new Error(e)},s=function(e,t){e&&a(t)},c=function(e,t){e&&u(t)},f=null,d=function(e){var t=e.reducers,r=void 0===t?{}:t,u=e.state,a=void 0===u?{}:u,d=e.plugin,g=e.getters,v=void 0===g?{}:g,w=e.mode,P=void 0===w?"strict":w;if(!n(a))throw new TypeError("type of state expect to [Object] but got ["+(void 0===a?"undefined":o(a))+"]");var O=l(a,P),S=y(r),x=b(d);return v=h(v),{dispatch:function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];s(!i(e),"Actions must be plain string. Use custom middleware for all actions."),s(f,"Reducers may not dispatch actions.");try{if(f=e,c(!r[e],"You may not has not registered ["+e+"] in store"),m("before",x,O,e),S[e]){var u=S[e].apply(S,[O].concat(o));c(void 0===u,"It is recommended to return a new state to replace the old state, which is more conducive to our observation of state changes in complex situations."),u?O=l(u,P):l(O,P)}m("after",x,O,e)}finally{f=null}return e},subscribe:function(e,t){s("function"!=typeof t,"Expected the reducer to be a function."),s(f,"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. "),c(S.hasOwnProperty(e),"Action ["+e+"] has been registered. It allows only the new one will be retained when you repeat the subscription."),S[e]=t},unsubscribe:function(e){s(f===e,"You may not unsubscribe from a store reducer while the reducer is executing. ");var t=S.hasOwnProperty(e);c(!t,"Action ["+e+"] not exist in reducers."),t&&delete S[e]},getState:function(e){return s(f,"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store."),c(e&&!v.hasOwnProperty(e),"Getter of key ["+e+"] is not exist. Please register it with when createStore."),e?v[e]?v[e](O):void 0:O},applyPlugin:function(e){p(e),s(f,"You may not call removeMiddleware() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store."),x?x.push(e):x=[e]}}},l=function(e,t){switch(t){case"strict":return function e(t,o){var i={set:function(e,t,o){return s(!f,"You may not be able to assign values ​​directly to state. Please return a new state for reducing or edit with state in reducer."),Reflect.set(e,t,o)},get:function(e,t){return Reflect.get(e,t)}},u=r({},i,{set:function(e,t,o){if(f)return Reflect.set(e,t,o);if("__proto__"===t)return Reflect.set(e,t,o);throw new Error("You may not be able to assign values ​​directly to state. Please return a new state for reducing or edit with state in reducer.")}});for(var a in t){var c=t[a];n(c)?c.$$isSlimProxy?e(c):t[a]=e(c):Array.isArray(c)&&(c.$$isSlimProxy?e(c):t[a]=e(c,!0))}return t.$$isSlimProxy?t:(t.$$isSlimProxy=!0,new Proxy(t,o?u:i))}(e);case"loose":return e}},y=function(e){return Object.keys(e).forEach(function(t){var r=e[t];s("function"!=typeof r,"Reducer for key ["+t+"] must be type of [Function] but got ["+(void 0===r?"undefined":o(r))+"]")}),e},h=function(e){return Object.keys(e).forEach(function(t){var r=e[t];s("function"!=typeof r,"Getter for key ["+t+"] must be type of [Function] but got ["+(void 0===r?"undefined":o(r))+"]")}),e},b=function(e){if(e){var t=Array.isArray(e)?e:[e];return t.forEach(function(e){p(e)}),t}},p=function(e){var t=e.before,r=e.after;t&&s("function"!=typeof t,"Hook [before] of Plugin must be type of [Function] but got ["+(void 0===t?"undefined":o(t))+"]"),r&&s("function"!=typeof r,"Hook [before] of Plugin must be type of [Function] but got ["+(void 0===r?"undefined":o(r))+"]")},m=function(e,t,o,r){t&&t.forEach(function(t){t[e]&&t[e](o,r)})};return c("production"!==process.env.NODE_ENV&&"string"==typeof t.name&&"isCrushed"!==t.name,'You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Slim. '),e.createStore=d,e}({});
