mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
|
var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,c=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,a=(e,t)=>{for(var n in t||(t={}))o.call(t,n)&&c(e,n,t[n]);if(r)for(var n of r(t))i.call(t,n)&&c(e,n,t[n]);return e},s=(e,r)=>t(e,n(r));import{enableES5 as u}from"immer";export*from"redux";import{default as f,current as l,freeze as d,original as p,isDraft as m}from"immer";import{createSelector as y}from"reselect";import{current as h,isDraft as g}from"immer";import{createSelector as b}from"reselect";var O=(...e)=>{const t=b(...e);return(e,...n)=>t(g(e)?h(e):e,...n)};import{createStore as j,compose as v,applyMiddleware as w,combineReducers as E}from"redux";import{compose as S}from"redux";var A="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?S:S.apply(null,arguments)};function x(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window;import _ from"redux-thunk";var I=class extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,I.prototype)}static get[Symbol.species](){return I}concat(...e){return super.concat.apply(this,e)}prepend(...e){return 1===e.length&&Array.isArray(e[0])?new I(...e[0].concat(this)):new I(...e.concat(this))}};function P(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function M(e={}){return()=>e=>t=>e(t)}function C(e){const t=typeof e;return"undefined"===t||null===e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||x(e)}function q(e,t="",n=C,r,o=[]){let i;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;const c=null!=r?r(e):Object.entries(e),a=o.length>0;for(const[e,s]of c){const c=t?t+"."+e:e;if(!(a&&o.indexOf(c)>=0)){if(!n(s))return{keyPath:c,value:s};if("object"==typeof s&&(i=q(s,c,n,r,o),i))return i}}return!1}function D(e={}){return()=>e=>t=>e(t)}function k(e={}){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0}=e;let o=new I;return t&&o.push("boolean"==typeof t?_:_.withExtraArgument(t.extraArgument)),o}function R(e){const t=function(e){return k(e)},{reducer:n,middleware:r=t(),devTools:o=!0,preloadedState:i,enhancers:c}=e||{};let s;if("function"==typeof n)s=n;else{if(!x(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');s=E(n)}let u=r;"function"==typeof u&&(u=u(t));const f=w(...u);let l=v;o&&(l=A(a({trace:!1},"object"==typeof o&&o)));let d=[f];Array.isArray(c)?d=[f,...c]:"function"==typeof c&&(d=c(d));const p=l(...d);return j(s,i,p)}function T(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("prepareAction did not return an object");return a(a({type:e,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>t.type===e,n}function V(e){return["type","payload","error","meta"].indexOf(e)>-1}function N(e){return`${e}`}import L,{isDraft as X,isDraftable as W}from"immer";function z(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(r in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function U(e,t,n=[],r){let[o,i,c]="function"==typeof t?z(t):[t,n,r];const a=L(e,(()=>{}));return function(e=a,t){let n=[o[t.type],...i.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===n.filter((e=>!!e)).length&&(n=[c]),n.reduce(((e,n)=>{if(n){if(X(e)){const r=n(e,t);return void 0===r?e:r}if(W(e))return L(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)ret
|