{"version":3,"sources":["../src/index.ts","../src/components/connect.tsx","../src/GsmContext.ts","../src/hooks/useGsmContext.ts","../src/Util/Random.ts","../src/Util/Iterates.ts","../src/components/Provider.tsx","../src/Util/Schedules.ts","../src/Util/deferred.ts","../src/heavyAnimation.ts","../src/StateStore.ts","../src/storage/getStorage.ts","../src/storage/WebStorage.ts","../src/StoreCaching.ts","../src/hooks/useStore.ts","../src/hooks/useGlobal.ts","../src/hooks/useStaticGlobal.ts"],"sourcesContent":["import connect from \"./components/connect\";\nimport Provider from \"./components/Provider\";\nimport StateStore from \"./StateStore\";\nimport { Store } from \"./StateStore\";\nimport WebStorage from './storage/WebStorage';\n\nexport { StoreCaching } from \"./StoreCaching\";\nexport { StateStore, Store, Provider, connect };\nexport { WebStorage };\n\nexport * from \"./hooks\";\nexport * from \"./types\";\n","import { createElement, memo, useCallback, useEffect, useState } from \"react\";\nimport useGsmContext from \"../hooks/useGsmContext\";\nimport { ConnectOptions, TypedConnector } from \"../types\";\nimport { randomString } from \"../Util/Random\";\nimport { shallowEqual, stacksDiff, stacksEqual } from \"../Util/Iterates\";\n\n\nconst updateContainer = <T, S, O>(selector: (state: T, ownProps: O) => S, updateCallback: Function, options: ConnectOptions) => {\n  return (global: T, reason?: string): S =>\n    updateCallback((prevState: T, ownProps: O) => {\n      let nextState;\n      try {\n        nextState = selector(global, ownProps);\n      } catch (err) {\n        console.error(\"[GSM]\", `connect on ${options.label}\\n`, \"next selector thrown an error\\n\", err);\n        return prevState;\n      }\n\n      if (global !== undefined) {\n        const isArray = Array.isArray(prevState) || Array.isArray(nextState);\n        const shouldUpdate = isArray ?\n          !stacksEqual(prevState as Array<any>, nextState as Array<any>) :\n          !shallowEqual(prevState, nextState);\n\n        if (options.debugCallbackPicker) {\n          console.debug(\n            \"[GSM]\", `connect on ${options.label}\\n`, \"next selector is picking\",\n            \"\\n\", \"reason\", \"=>\", reason,\n            \"\\n\", \"next\", \"=>\", nextState,\n            \"\\n\", \"current\", \"=>\", prevState,\n            \"\\n\", \"result\", \"=>\", shouldUpdate,\n            ...(isArray ? (\n              [\n                \"\\n\", \"stacksEqual\", \"=>\", stacksEqual(prevState as Array<any>, nextState as Array<any>),\n                \"\\n\", \"stacksDiff\", \"=>\", stacksDiff(prevState as Array<any>, nextState as Array<any>),\n              ]\n            ) : [])\n          );\n        }\n\n        if (shouldUpdate) {\n          return nextState;\n        }\n      }\n      return prevState;\n    });\n};\n\nconst connect = <\n  OwnProps extends AnyLiteral,\n  TState extends AnyLiteral,\n  Selected extends AnyLiteral & OwnProps\n>(\n  selector: (global: TState, props: OwnProps) => Selected,\n  options: ConnectOptions = {}\n) => {\n\n  options = Object.assign({\n    nonMemoizedContainer: false,\n    label: randomString(5),\n    debugInitialPicker: false,\n    debugCallbackPicker: false,\n  } satisfies ConnectOptions, options);\n\n  return (Component: React.FC<Selected>) => {\n\n    function TCContainer(props: OwnProps) {\n      const { store } = useGsmContext();\n\n      const computeMappedProps: () => Selected = () => {\n        options.debugInitialPicker &&\n          console.debug(\"[GSM]\", `connect on ${options.label}\\n`, \"initial selector is started picking\");\n        try {\n          const nextState = selector(store.getState(), props);\n          options.debugInitialPicker &&\n            console.debug(\"[GSM]\", `connect on ${options.label}\\n`, \"initial selector is picked\\n\", { nextState, props });\n          return nextState;\n        } catch (err) {\n          console.error(\"[GSM]\", `connect on ${options.label}\\n`, \"initial selector thrown an error\\n\", err);\n          return mappedProps;\n        }\n      };\n\n      const [mappedProps, setMappedProps] = useState(() => computeMappedProps());\n\n      useEffect(() => { // force update on selector or props update\n        setMappedProps(computeMappedProps());\n      }, [selector, props]);\n\n      (options.debugInitialPicker || options.debugCallbackPicker) &&\n        console.debug(\"[GSM]\", `connect on ${options.label}\\n`, \"is rendering TCContainer\\n\", { props, mappedProps: mappedProps, label: options.label });\n\n      const updateCallback = useCallback((next: AnyFunction) => {\n        setMappedProps((prev) => {\n          options.debugCallbackPicker &&\n            console.debug(\"[GSM]\", `connect on ${options.label}\\n`, \"next selector is started picking\");\n            const nextState = next(prev, props);\n          options.debugCallbackPicker &&\n            console.debug(\"[GSM]\", `connect on ${options.label}\\n`, \"next selector is picked\", { nextState, props });\n          return nextState != prev ? nextState : prev;\n        });\n      }, [mappedProps, props]);\n\n      const storeCallback = useCallback(\n        updateContainer<TState, Selected, OwnProps>(selector, updateCallback, options),\n        [updateCallback]\n      );\n\n      useEffect(() => {\n        store.addCallback(storeCallback);\n        return () => store.removeCallback(storeCallback);\n      }, [storeCallback]);\n\n      return createElement(Component, {\n        ...mappedProps,\n        ...props,\n      } as Selected);\n    };\n\n    return options.nonMemoizedContainer ? TCContainer : memo(TCContainer);\n  };\n};\n\nexport default connect as TypedConnector<AnyLiteral>;\n","import { createContext } from \"react\";\nimport { Store } from \"./StateStore\";\n\nexport interface ReactGSMContextValue<S extends AnyLiteral = any, A = unknown> {\n\tstore: Store<S,A>;\n}\n\nexport const ReactGSMContext = createContext<ReactGSMContextValue | null>(null as any);\n\nexport type ReactGSMContextInstance = typeof ReactGSMContext\n\nexport default ReactGSMContext;","import ReactGSMContext from \"../GsmContext\";\nimport React from \"react\";\n\n\nconst useGsmContext = (context = ReactGSMContext) => {\n\tconst contextValue = React.useContext(context);\n\treturn contextValue!;\n}\n\nexport default useGsmContext;","export const randomInteger = (min = 0, max = 1) => Math.floor(min + Math.random() * (max + 1 - min));\n\nexport const randomString = (length: number) => {\n\tlet result = '';\n\tlet characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\tlet charactersLength = characters.length;\n\tfor (let i = 0; i < length; i++) {\n\t\tresult += characters.charAt(Math.floor(Math.random() * charactersLength));\n\t}\n\treturn result;\n};\n\nexport const generateIdFor = (obj: object) => {\n\tlet id;\n\n\tdo {\n\t\tid = String(Math.random()).replace('0.', 'id');\n\t} while (obj.hasOwnProperty(id));\n\n\treturn id;\n};","export function pick<T, K extends keyof T>(object: T, keys: K[]) {\n  return keys.reduce((result, key) => {\n    result[key] = object[key];\n    return result;\n  }, {} as Pick<T, K>);\n}\n\nexport function omit<T extends object, K extends keyof T>(object: T, keys: K[]): Omit<T, K> {\n  const stringKeys = new Set(keys.map(String));\n  const savedKeys = Object.keys(object)\n    .filter((key) => !stringKeys.has(key)) as Array<Exclude<keyof T, K>>;\n\n  return pick(object, savedKeys);\n}\n\nexport function arePropsShallowEqual(currentProps: AnyLiteral, newProps: AnyLiteral): boolean {\n\n\tif (currentProps === newProps) {\n\t\treturn true;\n\t}\n\n\tconst currentKeys = Object.keys(currentProps);\n\tconst currentKeysLength = currentKeys.length;\n\tconst newKeysLength = Object.keys(newProps).length;\n\n\tif (currentKeysLength !== newKeysLength) {\n\t\treturn false;\n\t}\n\n\tif (currentKeysLength === 0) {\n\t\treturn true;\n\t}\n\n\tfor (let i = 0; i < currentKeysLength; i++) {\n\t\tconst prop = currentKeys[i];\n\t\tif (currentProps[prop] !== newProps[prop]) return false;\n\t}\n\n\treturn true;\n}\n\nexport function getUnequalProps(currentProps: AnyLiteral, newProps: AnyLiteral) {\n\tconst currentKeys = Object.keys(currentProps);\n\tconst currentKeysLength = currentKeys.length;\n\tconst newKeysLength = Object.keys(newProps).length;\n\n\tif (currentKeysLength !== newKeysLength) {\n\t\treturn ['%LENGTH%'];\n\t}\n\n\treturn currentKeys.reduce((res, prop) => {\n\t\tif (currentProps[prop] !== newProps[prop]) {\n\t\t\tres.push(`${prop}: ${currentProps[prop]} => ${newProps[prop]}`);\n\t\t}\n\t\treturn res;\n\t}, [] as Array<string>);\n}\n\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x: any, y: any): boolean {\n\t// SameValue algorithm\n\tif (x === y) { // Steps 1-5, 7-10\n\t\t// Steps 6.b-6.e: +0 != -0\n\t\t// Added the nonzero y check to make Flow happy, but it is redundant\n\t\treturn x !== 0 || y !== 0 || 1 / x === 1 / y;\n\t} else {\n\t\t// Step 6.a: NaN == NaN\n\t\treturn x !== x && y !== y;\n\t}\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\nexport function shallowEqual(objA: AnyLiteral | any, objB: AnyLiteral | any): boolean {\n\tif (is(objA, objB)) {\n\t\treturn true;\n\t}\n\n\tif (typeof objA !== 'object' || objA === null ||\n\t\ttypeof objB !== 'object' || objB === null) {\n\t\treturn false;\n\t}\n\n\tconst keysA = Object.keys(objA);\n\tconst keysB = Object.keys(objB);\n\n\tif (keysA.length !== keysB.length) {\n\t\treturn false;\n\t}\n\n\t// Test for A's keys different from B.\n\tfor (let i = 0; i < keysA.length; i++) {\n\t\tif (\n\t\t\t!hasOwnProperty.call(objB, keysA[i]) ||\n\t\t\t!is(objA[keysA[i]], objB[keysA[i]])\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nexport const getObjectDiff = (obj1: AnyLiteral, obj2: AnyLiteral) => {\n\tconst combinedObject = { ...obj1, ...obj2 };\n\treturn Object.entries(combinedObject).reduce((acc, [key, value]) => {\n\t\tif (\n\t\t\t!Object.values(obj1).includes(value) ||\n\t\t\t!Object.values(obj2).includes(value)\n\t\t) acc[key] = value;\n\t\treturn acc;\n\t}, {} as AnyLiteral);\n};\n\nexport function compareObjects(original:AnyLiteral, copy:AnyLiteral) {\n\tfor (let [k, v] of Object.entries(original)) {\n\t\tif (typeof v === \"object\" && v !== null) {\n\t\t\tcompareObjects(v, copy?.[k]);\n\t\t} else {\n\t\t\tif (Object.is(v, copy?.[k])) delete copy?.[k];\n\t\t}\n\t}\n\treturn copy;\n}\n\nexport const stacksEqual = <T>(a1: Array<T>, a2: Array<T>) => a1 === a2 || (\n\ta1 !== null && a2 !== null &&\n\tArray.isArray(a1) && Array.isArray(a2) &&\n\ta1.length === a2.length &&\n\ta1.map((val, idx) => shallowEqual(val, a2[idx])).every(e => e)\n);\n\nexport const stacksDiff = <T>(arr1: Array<T>, arr2: Array<T>) =>\n\tarr1 !== null && arr2 !== null &&\n\tArray.isArray(arr1) && Array.isArray(arr2) &&\n\tarr1.length > 0 && arr2.length > 0 &&\n\tarr1\n\t\t.filter(x => !arr2.includes(x))\n\t\t.concat(arr2.filter(x => !arr1.includes(x)));\n\nexport const validateKeySet = <T extends AnyLiteral, E extends Partial<T>>(srcObj: T, destObj: E): T => {\n\tif (srcObj == null) srcObj = {} as T;\n\tconst destCopy = Object.assign(destObj);\n\tconst keys = Object.keys(srcObj) as (keyof T)[];\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst key = keys[i];\n\t\tif (typeof destCopy[key] === 'undefined') {\n\t\t\tdestCopy[key] = srcObj[key];\n\t\t} else if (\n\t\t\ttypeof srcObj[key] === 'object' &&\n\t\t\tsrcObj[key] != null &&\n\t\t\t// @ts-ignore\n\t\t\t!(srcObj[key] instanceof Array)\n\t\t) {\n\t\t\tdestCopy[key] = validateKeySet(srcObj[key], destCopy[key]);\n\t\t}\n\t}\n\treturn destCopy as T;\n}","import React from \"react\";\nimport type { ReactNode, Context } from \"react\";\nimport ReactGSMContext, { ReactGSMContextValue } from \"../GsmContext\";\nimport { Store } from \"../StateStore\";\n\nexport interface ProviderProps<S extends AnyLiteral, A> {\n\tstore: Store<S, A>,\n\tcontext?: Context<ReactGSMContextValue | null>,\n\tchildren: ReactNode,\n}\n\nconst Provider = <S extends AnyLiteral, A>({\n\tstore,\n\tcontext,\n\tchildren,\n}: ProviderProps<S, A>) => {\n\n\tconst contextValue = React.useMemo(() => {\n\t\treturn { store };\n\t}, [store]);\n\n\tconst Context = context || ReactGSMContext;\n\n\treturn <Context.Provider value={contextValue} children={children} />;\n\n};\n\nexport default Provider;","export type Scheduler = typeof requestAnimationFrame | typeof onTickEnd;\n\nexport function debounce<F extends AnyToVoidFunction>(\n\tfn: F,\n\tms: number,\n\tshouldRunFirst = true,\n\tshouldRunLast = true\n) {\n\tlet waitingTimeout: number | undefined;\n\n\treturn (...args: Parameters<F>) => {\n\t\tif (waitingTimeout) {\n\t\t\tclearTimeout(waitingTimeout);\n\t\t\twaitingTimeout = undefined;\n\t\t} else if (shouldRunFirst) {\n\t\t\tfn(...args);\n\t\t}\n\n\t\t// eslint-disable-next-line no-restricted-globals\n\t\twaitingTimeout = self.setTimeout(() => {\n\t\t\tif (shouldRunLast) {\n\t\t\t\tfn(...args);\n\t\t\t}\n\n\t\t\twaitingTimeout = undefined;\n\t\t}, ms);\n\t};\n}\n\nexport function throttle<F extends AnyToVoidFunction>(\n\tfn: F,\n\tms: number = 500,\n\tshouldRunFirst = true\n) {\n\tlet interval: number | undefined;\n\tlet isPending: boolean;\n\tlet args: Parameters<F>;\n\n\treturn (..._args: Parameters<F>) => {\n\t\tisPending = true;\n\t\targs = _args;\n\n\t\tif (!interval) {\n\t\t\tif (shouldRunFirst) {\n\t\t\t\tisPending = false;\n\t\t\t\tfn(...args);\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line no-restricted-globals\n\t\t\tinterval = self.setInterval(() => {\n\t\t\t\tif (!isPending) {\n\t\t\t\t\t// eslint-disable-next-line no-restricted-globals\n\t\t\t\t\tself.clearInterval(interval);\n\t\t\t\t\tinterval = undefined;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisPending = false;\n\t\t\t\tfn(...args);\n\t\t\t}, ms);\n\t\t}\n\t};\n}\n\n\n\nexport function throttleWithTickEnd<F extends AnyToVoidFunction>(fn: F) {\n  return throttleWith(onTickEnd, fn);\n}\n\nexport function throttleWith<F extends AnyToVoidFunction>(schedulerFn: Scheduler, fn: F) {\n  let waiting = false;\n  let args: Parameters<F>;\n\n  return (..._args: Parameters<F>) => {\n    args = _args;\n\n    if (!waiting) {\n      waiting = true;\n\n      schedulerFn(() => {\n        waiting = false;\n        fn(...args);\n      });\n    }\n  };\n}\n\n\nlet onTickEndCallbacks: NoneToVoidFunction[] | undefined;\n\nexport function onTickEnd(callback: NoneToVoidFunction) {\n  if (!onTickEndCallbacks) {\n    onTickEndCallbacks = [callback];\n\n    Promise.resolve().then(() => {\n      const currentCallbacks = onTickEndCallbacks!;\n      onTickEndCallbacks = undefined;\n      currentCallbacks.forEach((cb) => cb());\n    });\n  } else {\n    onTickEndCallbacks.push(callback);\n  }\n}","export default class Deferred<T = void> {\n  promise: Promise<T>;\n  reject!: (reason?: any) => void;\n  resolve!: (value: T | PromiseLike<T>) => void;\n\n  constructor() {\n    this.promise = new Promise((resolve, reject) => {\n      this.reject = reject;\n      this.resolve = resolve;\n    });\n  }\n}\n","import Deferred from \"./Util/deferred\";\n\nconst AUTO_END_TIMEOUT = 1000; // 1 sec\n\nexport default function createHeavyAnimationController() {\n\n\tlet counter = 0;\n\tlet deferred: Deferred | null = null;\n\n\tconst getIsHeavyAnimating = () => (deferred != null && deferred instanceof Deferred);\n\n\tconst waitHeavyAnimation = () => deferred?.promise;\n\n\tconst beginHeavyAnimation = (duration = AUTO_END_TIMEOUT) => {\n\t\tcounter++;\n\n\t\tif (counter === 1) { // first set\n\t\t\tdeferred = new Deferred();\n\t\t}\n\n\t\tconst timeout = window.setTimeout(onEnd, duration);\n\t\tlet hasEnded = false;\n\n\t\tfunction onEnd() {\n\t\t\tif (hasEnded) return;\n\t\t\thasEnded = true;\n\n\t\t\tclearTimeout(timeout);\n\t\t\tcounter--;\n\n\t\t\tif (counter === 0) { // last unset\n\t\t\t\tdeferred?.resolve();\n\t\t\t\tdeferred = null;\n\t\t\t}\n\t\t}\n\n\t\treturn onEnd;\n\t};\n\n\treturn {\n\t\tgetIsHeavyAnimating,\n\t\twaitHeavyAnimation,\n\t\tbeginHeavyAnimation,\n\t};\n}\n","import type { ActionOptions } from \"./types\";\nimport { shallowEqual } from \"./Util/Iterates\";\nimport { generateIdFor } from \"./Util/Random\";\nimport { throttleWithTickEnd } from \"./Util/Schedules\";\nimport createHeavyAnimationController from \"./heavyAnimation\";\n\nexport default function StateStore<TState = AnyLiteral, ActionPayloads = Record<string, any>>(\n\tinitialState?: TState | undefined,\n\tdebugMode?: boolean,\n) {\n\n\ttype ActionNames = keyof ActionPayloads;\n\ttype Actions = {\n\t\t[ActionName in ActionNames]:\n\t\t\tundefined extends ActionPayloads[ActionName]\n\t\t\t\t? (payload?: ActionPayloads[ActionName], options?: ActionOptions) => Promise<void>\n\t\t\t\t: (payload: ActionPayloads[ActionName], options?: ActionOptions) => Promise<void>;\n\t};\n\ttype ActionPayload<ActionName extends ActionNames> = ActionPayloads[ActionName];\n\ttype ActionHandler<ActionName extends ActionNames> = (\n\t\tglobal: TState,\n\t\tactions: Actions,\n\t\tpayload: ActionPayload<ActionName>,\n\t) => TState | void | Promise<void>;\n\ttype ActionHandlers = {\n\t\t[ActionName in ActionNames]: ActionHandler<ActionName>[];\n\t};\n\n\ttype Container = {\n\t\tselector: (state: TState, ownProps?: AnyLiteral) => Partial<TState>;\n\t\townProps?: AnyLiteral | undefined;\n\t\tmappedProps?: AnyLiteral | undefined;\n\t\tcallback: (mappedProps: AnyLiteral, reason?: string) => void;\n\t\tdebug?: AnyLiteral | string;\n\t};\n\ttype Containers = Map<string, Container>;\n\n\tconst {\n\t\tbeginHeavyAnimation,\n\t\tgetIsHeavyAnimating,\n\t\twaitHeavyAnimation,\n\t} = createHeavyAnimationController();\n\n\tlet currentState: TState | undefined = initialState;\n\tlet reducers: ActionHandlers = {} as ActionHandlers;\n\tlet actions: Actions = {} as Actions;\n\tlet containers: Containers = new Map();\n\n\tlet forceOnHeavyAnimation = true;\n\n\tconst setState: (state: TState, options?: ActionOptions) => TState = (state, options) => {\n\t\tif (typeof state === 'object' && state !== currentState) {\n\t\t\tcurrentState = state;\n\t\t\tdebugMode && console.debug(\"[StateStore]\", \"[setState]\", \"\\noptions:\", options, \"\\nstate:\", state);\n\t\t\tif (!options?.silent) { // if silent -> no callbacks\n\t\t\t\tif (options?.forceSync) {\n\t\t\t\t\tforceOnHeavyAnimation = true;\n\t\t\t\t\trunCallbacks(options?.reason);\n\t\t\t\t} else {\n\t\t\t\t\tif (options?.forceOnHeavyAnimation) forceOnHeavyAnimation = true;\n\t\t\t\t\trunCallbacksThrottled(options?.reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn currentState as TState;\n\t}\n\n\tfunction getState<S = Partial<TState>>(selector: (state: TState) => S): S;\n\tfunction getState(selector?: undefined): TState;\n\tfunction getState<S = Partial<TState>>(selector?: (state: TState) => S): S | TState {\n\t\treturn selector ? selector(currentState as TState) : currentState as TState;\n\t}\n\n\tconst updateContainers = (currentState: TState, reason?: string) => {\n\t\tfor (const container of containers.values()) {\n\t\t\tconst { selector, ownProps, mappedProps, callback } = container;\n\n\t\t\tlet newMappedProps;\n\n\t\t\ttry {\n\t\t\t\tnewMappedProps = selector(currentState, ownProps);\n\t\t\t} catch (err) {\n\t\t\t\tdebugMode && console.error(\"[GSM]\", \"updateContainers\\n\", \"selector thrown an error\", err);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (Object.keys(newMappedProps).length && !shallowEqual(mappedProps, newMappedProps)) {\n\t\t\t\tcontainer.mappedProps = newMappedProps;\n\t\t\t\tcallback(container.mappedProps, reason); // pass reason of update\n\t\t\t}\n\t\t}\n\t};\n\n\n\ttype StoreCallback = (global: TState, reason?: string) => void;\n\n\tconst callbacks: StoreCallback[] = [updateContainers];\n\tconst addCallback = (cb: StoreCallback) => {\n\t\tif (typeof cb === \"function\") {\n\t\t\tcallbacks.push(cb);\n\t\t}\n\t};\n\tconst removeCallback = (cb: StoreCallback) => {\n\t\tconst index = callbacks.indexOf(cb);\n\t\tif (index !== -1) {\n\t\t\tcallbacks.splice(index, 1);\n\t\t}\n\t};\n\tconst runCallbacks = async (reason?: string) => {\n\t\tif (forceOnHeavyAnimation) forceOnHeavyAnimation = false;\n\t\telse if (getIsHeavyAnimating()) {\n\t\t\tdebugMode && console.debug(\"[GSM]\", \"runCallbacks is waiting for heavy animation end\");\n\t\t\tawait waitHeavyAnimation();\n\t\t\tvoid runCallbacksThrottled();\n\t\t\treturn;\n\t\t}\n\t\treason = reason || '@ss_no_reason';\n\t\tdebugMode && console.debug(\"[GSM]\", \"runCallbacks for\", reason);\n\t\tcallbacks.forEach((cb) => cb(currentState as TState, reason)); // skip check cause we already checked while adding it\n\t};\n\n\tconst runCallbacksThrottled = throttleWithTickEnd(runCallbacks);\n\n\n\n\tconst onDispatch = async <T extends ActionNames>(name: T, payload?: ActionPayload<T>, options?: ActionOptions) => {\n\t\tif (!Array.isArray(reducers[name])) return; // if reducers for this name exists\n\n\t\tfor (const reducer of reducers[name]) {\n\t\t\ttry {\n\t\t\t\tconst result = reducer(currentState as TState, actions, payload as ActionPayload<T>);\n\n\t\t\t\tif (!result) continue;\n\n\t\t\t\tif (typeof (result as Promise<unknown>).then === \"function\") {\n\t\t\t\t\tawait (result as Promise<unknown>);\n\t\t\t\t} else {\n\t\t\t\t\toptions = {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\treason: `@dispatch:${name.toString()}${options?.reason ? ('->' + options?.reason) : ''}`,\n\t\t\t\t\t};\n\t\t\t\t\tsetState(result as TState, options);\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(\"[GSM]\", \"[onDispatch]\", \"reducer thrown an error:\", err);\n\t\t\t\tif (options?.shouldThrow) throw err;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst addReducer = <T extends ActionNames>(name: T, reducer: ActionHandler<T>) => {\n\t\tif (!reducers[name]) { // if no reducers for this name\n\t\t\treducers[name] = [];\n\t\t\tactions[name] = (payload?: ActionPayload<T>, options?: ActionOptions) => // add dispatch action\n\t\t\t\tonDispatch(name, payload, options);\n\t\t}\n\t\treducers[name].push(reducer);\n\t};\n\n\tconst removeReducer: (name: keyof ActionPayloads, reducer: AnyFunction) => void = (name, reducer) => {\n\t\tif (!reducers[name]) return;\n\t\tconst index = reducers[name].indexOf(reducer);\n\t\tif (index !== -1) {\n\t\t\treducers[name].splice(index, 1);\n\t\t}\n\t};\n\n\tconst getDispatch = () => actions as Actions;\n\n\n\tconst withState = (\n\t\tselector: (state: TState, ownProps?: AnyLiteral) => Partial<TState>,\n\t\tdebug?: AnyLiteral | undefined\n\t) => {\n\t\treturn (callback: Container['callback']) => {\n\t\t\tconst id = generateIdFor(containers);\n\t\t\tlet container = containers.get(id);\n\t\t\tif (!container) {\n\t\t\t\tcontainer = {\n\t\t\t\t\tselector,\n\t\t\t\t\tcallback,\n\t\t\t\t\tmappedProps: undefined,\n\t\t\t\t\tdebug: debug || id,\n\t\t\t\t};\n\t\t\t\tcontainers.set(id, container);\n\t\t\t}\n\t\t\tif (!container.mappedProps) {\n\t\t\t\ttry {\n\t\t\t\t\tcontainer.mappedProps = selector(currentState as TState);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tdebug && console.error(\">> GSTATE\", \"CONTAINER\\n\", \"INITIAL UPDATE\",\n\t\t\t\t\t\t\"Чёт наебнулось в первый раз, но всем как-то похуй, да?\\n\",\n\t\t\t\t\t\t\"Может трейс глянешь хоть:\\n\", err);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcallback(container.mappedProps, '@initial_update');\n\t\t\treturn () => {\n\t\t\t\tdebug && console.debug(\"[withState]\", \"{GC}\", \"container\", \"->\", id);\n\t\t\t\tcontainers.delete(id);\n\t\t\t};\n\t\t};\n\t};\n\n\treturn {\n\t\tsetState,\n\t\tgetState,\n\t\taddCallback,\n\t\tremoveCallback,\n\t\taddReducer,\n\t\tremoveReducer,\n\t\tgetDispatch,\n\t\twithState,\n\t\tbeginHeavyAnimation,\n\t};\n};\n\nexport type Store<T, A> = ReturnType<typeof StateStore<T, A>>;","import { Storage } from \"../types\";\n\nfunction noop() {}\nconst noopStorage = {\n  getItem: noop,\n  setItem: noop,\n  removeItem: noop,\n  keys: [],\n  getAllKeys: noop,\n}\n\nfunction hasStorage(storageType: string) {\n  if (typeof self !== 'object' || !(storageType in self)) {\n    return false\n  }\n\n  try {\n    const storage = (self as unknown as { [key: string]: Storage})[storageType] as unknown as Storage\n    const testKey = `redux-persist ${storageType} test`\n    storage.setItem(testKey, 'test')\n    storage.getItem(testKey)\n    storage.removeItem(testKey)\n  } catch (e) {\n    if (process.env.NODE_ENV !== 'production')\n      console.warn(\n        `redux-persist ${storageType} test failed, persistence will be disabled.`\n      )\n    return false\n  }\n  return true\n}\n\nexport default function getStorage(type: string): Storage {\n  const storageType = `${type}Storage`\n  if (hasStorage(storageType)) return (self as unknown as { [key: string]: Storage })[storageType]\n  else {\n    if (process.env.NODE_ENV !== 'production') {\n      console.error(\n        `redux-persist failed to create sync storage. falling back to noop storage.`\n      )\n    }\n    return noopStorage\n  }\n}","import getStorage from \"./getStorage\"\n\nexport default function createWebStorage(type: string = 'local'): any {\n  const storage = getStorage(type)\n  return {\n    getItem: (key: string): Promise<string> => {\n      return new Promise((resolve) => {\n        resolve(storage.getItem(key))\n      })\n    },\n    setItem: (key: string, item: string): Promise<void> => {\n      return new Promise((resolve) => {\n        resolve(storage.setItem(key, item))\n      })\n    },\n    removeItem: (key: string): Promise<void> => {\n      return new Promise((resolve) => {\n        resolve(storage.removeItem(key))\n      })\n    },\n  }\n}","import { throttle } from \"./Util/Schedules\";\nimport { Store } from \"./StateStore\";\n\nimport { CachingOptions, Storage } from \"./types\";\nimport { validateKeySet } from \"./Util/Iterates\";\n\nexport const StoreCaching = <T extends AnyLiteral, A extends AnyLiteral>(\n\tstore: Store<T, A>,\n\tstorage: Storage,\n\tcache_key: string = \"tjmc.global.state\",\n\treduceGlobal: (global: T) => Partial<T> | AnyLiteral,\n\toptions?: Partial<CachingOptions>\n) => {\n\n\tif (typeof store != \"object\") throw new Error(\"Caching store in not instance of StateStore\");\n\n\tconst opts: CachingOptions = Object.assign<CachingOptions, Partial<CachingOptions>>({\n\t\tshouldRunFirstUpdateCacheThrottle: false,\n\t\tupdateCacheThrottle: 500,\n\t\tskipValidateKeySetOnReadCache: false,\n\t}, options || {});\n\n\tconst STATE_CACHE_KEY = cache_key;\n\n\tconst updateCacheThrottled = throttle(() => updateCache(), opts.updateCacheThrottle, opts.shouldRunFirstUpdateCacheThrottle);\n\tlet isCaching = false;\n\n\tconst setupCaching = () => {\n\t\tisCaching = true;\n\t\tstore.addCallback(updateCacheThrottled);\n\t};\n\n\tconst clearCaching = () => {\n\t\tisCaching = false;\n\t\tstore.removeCallback(updateCacheThrottled);\n\t};\n\n\tconst resetCache = async () => {\n\t\tawait storage.removeItem(STATE_CACHE_KEY);\n\t\tif (!isCaching) return;\n\t\tclearCaching();\n\t};\n\n\tconst loadCache = async (initialState: T) => {\n\t\tsetupCaching();\n\t\treturn await readCache(initialState);\n\t};\n\n\tconst readCache = async (initialState: T) => {\n\t\tconst json = await storage.getItem(STATE_CACHE_KEY);\n\t\tconst cached = json ? JSON.parse(json) : {};\n\t\tconst newState = opts.skipValidateKeySetOnReadCache ?\n\t\t\tObject.assign(initialState, cached) :\n\t\t\tvalidateKeySet<T, Partial<T>>(initialState, cached);\n\t\treturn { ...newState };\n\t};\n\n\tconst updateCache = () => {\n\t\tif (!isCaching) {\n\t\t\treturn;\n\t\t}\n\t\tlet reducedGlobal = {};\n\t\ttry {\n\t\t\tconst global = store.getState(e => e);\n\t\t\treducedGlobal = reduceGlobal(global);\n\t\t} catch (e) {\n\t\t\tconsole.warn(\"[StoreCaching]\", e, reducedGlobal);\n\t\t}\n\t\ttry {\n\t\t\tconst json = JSON.stringify(reducedGlobal);\n\t\t\tstorage.setItem(STATE_CACHE_KEY, json);\n\t\t} catch (e) {\n\t\t\tconsole.warn(\"[StoreCaching]\", e, reducedGlobal);\n\t\t}\n\t};\n\n\treturn { loadCache, resetCache };\n\n};","import { Store } from \"../StateStore\";\nimport useGsmContext from \"./useGsmContext\";\n\nconst useStore = <S extends AnyLiteral, Action>() => {\n\tconst { store } = useGsmContext();\n\treturn store as Store<S, Action>;\n}\n\nexport default useStore;","import React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { shallowEqual, stacksDiff, stacksEqual } from \"../Util/Iterates\";\nimport { randomString } from \"../Util/Random\";\n\nimport type { PickOptions, TypedUseSelectorHook } from \"../types\";\nimport useGsmContext from \"./useGsmContext\";\n\nconst updateContainer = <T, S>(\n\tselector: (state: T) => S,\n\tupdateCallback: Function,\n\toptions: PickOptions\n) => {\n\treturn (global: T, reason?: string): S =>\n\t\tupdateCallback((prevState: T) => {\n\t\t\tlet nextState;\n\t\t\ttry {\n\t\t\t\tnextState = selector(global as T);\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(\"[GSM]\", `useGlobal on ${options.label}\\n`, \"next selector thrown an error\\n\", err);\n\t\t\t\treturn prevState;\n\t\t\t}\n\n\t\t\tif (global !== undefined) {\n\t\t\t\tconst isArray = Array.isArray(prevState) || Array.isArray(nextState);\n\t\t\t\tconst shouldUpdate = isArray ?\n\t\t\t\t\t!stacksEqual(prevState as Array<any>, nextState as Array<any>) :\n\t\t\t\t\t!shallowEqual(prevState, nextState);\n\n\t\t\t\tif (options.debugCallbackPicker) {\n\t\t\t\t\t// prettier-ignore\n\t\t\t\t\tconsole.debug(\n\t\t\t\t\t\t\"[GSM]\", `useGlobal on ${options.label}\\n`, \"next selector is picking\",\n\t\t\t\t\t\t\"\\n\", \"reason\", \"=>\", reason,\n\t\t\t\t\t\t\"\\n\", \"current\", \"=>\", prevState,\n\t\t\t\t\t\t\"\\n\", \"next\", \"=>\", nextState,\n\t\t\t\t\t\t\"\\n\", \"result\", \"=>\", shouldUpdate,\n\t\t\t\t\t\t...(isArray ? (\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\"\\n\", \"stacksEqual\", \"=>\", stacksEqual(prevState as Array<any>, nextState as Array<any>),\n\t\t\t\t\t\t\t\t\"\\n\", \"stacksDiff\", \"=>\", stacksDiff(prevState as Array<any>, nextState as Array<any>),\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t) : [])\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t// !arePropsShallowEqual(prevState, nextState)\n\t\t\t\t\tshouldUpdate\n\t\t\t\t) {\n\t\t\t\t\treturn nextState;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn prevState;\n\t\t});\n};\n\nconst useGlobal: TypedUseSelectorHook<AnyLiteral> = <TState = AnyLiteral, Selected = Partial<TState>>(\n\tselector: (state: TState) => Selected,\n\tinputs: React.DependencyList = [],\n\toptions: PickOptions = {}\n): Selected => {\n\n\tconst { store } = useGsmContext();\n\n\toptions = useMemo(() => Object.assign<PickOptions, PickOptions>({\n\t\tdebugInitialPicker: false,\n\t\tdebugCallbackPicker: false,\n\t\tlabel: randomString(5),\n\t}, options), [options]);\n\n\tconst picker = useCallback(selector, [...inputs]);\n\n\tconst computeMappedProps: () => Selected = () => {\n\t\ttry {\n\t\t\toptions.debugInitialPicker &&\n\t\t\t\tconsole.debug(\"[GSM]\", `useGlobal on ${options.label}\\n`, \"initial selector is started picking\");\n\t\t\tconst nextState = picker(store.getState());\n\t\t\toptions.debugInitialPicker &&\n\t\t\t\tconsole.debug(\"[GSM]\", `useGlobal on ${options.label}\\n`, \"initial selector is picked\\n\", { nextState });\n\t\t\treturn nextState;\n\t\t} catch (err) {\n\t\t\tconsole.error(\"[GSM]\", `useGlobal on ${options.label}\\n`, \"initial selector thrown an error\\n\", err);\n\t\t\treturn mappedProps;\n\t\t}\n\t};\n\n\tconst [mappedProps, setMappedProps] = useState(() => computeMappedProps());\n\n\tuseEffect(() => { // force update on inputs or selector update\n\t\tsetMappedProps(computeMappedProps());\n\t}, [picker]);\n\n\tconst updateCallback = useCallback((next: AnyFunction | AnyLiteral) =>\n\t\tsetMappedProps((prev) => {\n\t\t\tconst nextState = typeof next === 'function' ? next(prev) : next;\n      return nextState !== prev ? nextState : prev;\n\t\t})\n\t, []);\n\n\tconst storeCallback = useCallback(\n\t\tupdateContainer<TState, Selected>(picker, updateCallback, options),\n\t\t[updateCallback, picker]\n\t);\n\n\tuseEffect(() => {\n\t\tstore.addCallback(storeCallback);\n\t\treturn () => store.removeCallback(storeCallback);\n\t}, [storeCallback]);\n\n\treturn mappedProps as Selected;\n};\n\nexport default useGlobal;","import type { TypedUseStaticHook } from \"../types\";\n\nimport { useMemo } from \"react\";\nimport useGsmContext from \"./useGsmContext\";\n\n/**\n * Provides static selector without hooking to global store\n *\n * Useful for picking static state and creating state triggers with dependency\n *\n * @param selector Global state mapper function\n * @param inputs Peer dependency list\n * @returns Selected state\n */\nconst useStaticGlobal: TypedUseStaticHook<AnyLiteral> = <TState = AnyLiteral, Selected = Partial<TState>>(\n  selector: (state: TState) => Selected,\n  inputs: React.DependencyList = []\n) => {\n  const { store } = useGsmContext();\n\n  const mappedProps = useMemo(() => {\n    let nextState;\n    try {\n      nextState = store.getState(selector);\n    } catch (e) {\n      return undefined;\n    }\n    return nextState;\n  }, [selector, ...inputs]);\n\n  return mappedProps as Selected;\n};\n\nexport default useStaticGlobal;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAsE;;;ACAtE,mBAA8B;AAOvB,IAAM,sBAAkB,4BAA2C,IAAW;AAIrF,IAAO,qBAAQ;;;ACVf,IAAAC,gBAAkB;AAGlB,IAAM,gBAAgB,CAAC,UAAU,uBAAoB;AACpD,QAAM,eAAe,cAAAC,QAAM,WAAW,OAAO;AAC7C,SAAO;AACR;AAEA,IAAO,wBAAQ;;;ACPR,IAAM,eAAe,CAAC,WAAmB;AAC/C,MAAI,SAAS;AACb,MAAI,aAAa;AACjB,MAAI,mBAAmB,WAAW;AAClC,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAChC,cAAU,WAAW,OAAO,KAAK,MAAM,KAAK,OAAO,IAAI,gBAAgB,CAAC;AAAA,EACzE;AACA,SAAO;AACR;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G,MAAM,CAAC;AAExB,SAAO;AACT;AAEA,IAAO,0BAAQ;","names":["import_react","import_react","React","import_react","React","currentState","import_react","updateContainer","import_react"]}