node_modules/pinia/dist/pinia.iife.js
/**
   * Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the
   * context of all actions, allowing us to set `runningAction` on each access and effectively associating any state
   * mutation to the action.
   *
   * @param store - store to patch
   * @param actionNames - list of actionst to patch
   */
Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the
context of all actions, allowing us to set `runningAction` on each access and effectively associating any state
mutation to the action.

@param store - store to patch
@param actionNames - list of actionst to patch
Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the context of all actions allowing us to set ` runningAction ` on each access and effectively associating any state mutation to the action . @param store - store to patch @param actionNames - list of actionst to patch
function patchActionForGrouping(store, actionNames) {
      const actions = actionNames.reduce((storeActions, actionName) => {
          storeActions[actionName] = vueDemi.toRaw(store)[actionName];
          return storeActions;
      }, {});
      for (const actionName in actions) {
          store[actionName] = function () {
              const _actionId = runningActionId;
              const trackedStore = new Proxy(store, {
                  get(...args) {
                      activeAction = _actionId;
                      return Reflect.get(...args);
                  },
                  set(...args) {
                      activeAction = _actionId;
                      return Reflect.set(...args);
                  },
              });
              return actions[actionName].apply(trackedStore, arguments);
          };
      }
  }
function patchActionForGrouping ( store , actionNames ) { const actions = actionNames . reduce ( ( storeActions , actionName ) => { storeActions [ actionName ] = vueDemi . toRaw ( store ) [ actionName ] ; return storeActions ; } , { } ) ; for ( const actionName in actions ) { store [ actionName ] = function ( ) { const _actionId = runningActionId ; const trackedStore = new Proxy ( store , { get ( ... args ) { activeAction = _actionId ; return Reflect . get ( ... args ) ; } , set ( ... args ) { activeAction = _actionId ; return Reflect . set ( ... args ) ; } , } ) ; return actions [ actionName ] . apply ( trackedStore , arguments ) ; } ; } }
Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the
 context of all actions, allowing us to set `runningAction` on each access and effectively associating any state
 mutation to the action.
Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the context of all actions allowing us to set ` runningAction ` on each access and effectively associating any state mutation to the action .
// original actions of the store as they are given by pinia. We are going to override them // use toRaw to avoid tracking #541 // setActivePinia(store._p) // the running action id is incremented in a before action hook