<commit_before>import "regenerator-runtime/runtime"

import { Component, PropTypes} from "react"
import { createStore, combineReducers, compose, applyMiddleware } from "redux"
import { ApolloProvider } from "react-apollo"
import thunk from "redux-thunk"
import sagaMiddleware from "redux-saga"

import Global from "../blocks/global"
import { reducers, middlewares, sagas } from "./utilities"
import { syncHistory, routeReducer } from "../store/routing"

// let logger;
// if (process.env.NODE_ENV === "development") {
  // const createLogger = require("redux-logger")
  // logger = createLogger()
// }

const createReduxStore = (initialState, history) => {

  if (initialState) {
    // bug with SSR
    delete initialState.nav
  }


  const joinedReducers = {...reducers, ...{
    routing: routeReducer
  }}

  let convertedSagas = sagas.map((saga) => (saga()))

  let sharedMiddlewares = [...[
    thunk
  ], ...middlewares]

  const reduxRouterMiddleware = syncHistory(history)
  let sharedCompose = [
    applyMiddleware(...sharedMiddlewares, sagaMiddleware(...convertedSagas), reduxRouterMiddleware),
  ]


  if (process.env.NODE_ENV != "production") {
    sharedCompose = [...sharedCompose, ...[
      typeof window === 'object' && typeof window.devToolsExtension !== 'undefined' ? window.devToolsExtension() : f => f
    ]]

  }

  const store = compose(...sharedCompose)(createStore)(combineReducers(joinedReducers), initialState)


  return store

}


// const wrapper = (props) => (
//   <Provider {...props}>
//     <Global>
//       {props.children}
//     </Global>
//   </Provider>
// )
// class wrapper extends Component {
//   render() {
//     return (
//       <Provider {...this.props}>
//         <Global>
//           {this.props.children}
//         </Global>
//       </Provider>
//     )
//   }
// }
const wrapper = Provider

export {
  wrapper,<commit_msg>:mole:<commit_after>import "regenerator-runtime/runtime"

import { Component, PropTypes} from "react"
import { createStore, combineReducers, compose, applyMiddleware } from "redux"
import { ApolloProvider } from "react-apollo"
import thunk from "redux-thunk"
import sagaMiddleware from "redux-saga"

import Global from "../blocks/global"
import { reducers, middlewares, sagas } from "./utilities"
import { syncHistory, routeReducer } from "../store/routing"

// let logger;
// if (process.env.NODE_ENV === "development") {
  // const createLogger = require("redux-logger")
  // logger = createLogger()
// }

const createReduxStore = (initialState, history) => {

  if (initialState) {
    // bug with SSR
    delete initialState.nav
  }


  const joinedReducers = {...reducers, ...{
    routing: routeReducer
  }}

  let convertedSagas = sagas.map((saga) => (saga()))

  let sharedMiddlewares = [...[
    thunk
  ], ...middlewares]

  const reduxRouterMiddleware = syncHistory(history)
  let sharedCompose = [
    applyMiddleware(...sharedMiddlewares, sagaMiddleware(...convertedSagas), reduxRouterMiddleware),
  ]


  if (process.env.NODE_ENV != "production") {
    sharedCompose = [...sharedCompose, ...[
      typeof window === 'object' && typeof window.devToolsExtension !== 'undefined' ? window.devToolsExtension() : f => f
    ]]

  }

  const store = compose(...sharedCompose)(createStore)(combineReducers(joinedReducers), initialState)


  return store

}


// const wrapper = (props) => (
//   <Provider {...props}>
//     <Global>
//       {props.children}
//     </Global>
//   </Provider>
// )
// class wrapper extends Component {
//   render() {
//     return (
//       <Provider {...this.props}>
//         <Global>
//           {this.props.children}
//         </Global>
//       </Provider>
//     )
//   }
// }
const wrapper = ApolloProvider

export {
  wrapper,
{'fraction_non_alphanumeric': 0.16112735974474873, 'fraction_numerical': 0.0, 'mean_word_length': 2.9310344827586206, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5298206', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1161, 'n_words': 257}