"use strict";(self["jsonp-component-islands"]=self["jsonp-component-islands"]||[]).push([["async/component-islands/vendor"],{36702:(t,e,s)=>{s.d(e,{ActionTypes:()=>i,browserHistoryApiIsSupported:()=>r,default:()=>n});const i={PUSH:"etsy/history/PUSH",REPLACE:"etsy/history/REPLACE",GO:"etsy/history/GO",BACK:"etsy/history/BACK",FORWARD:"etsy/history/FORWARD",LOCATION_CHANGE:"etsy/history/LOCATION_CHANGE"};function r(){const t=window&&window.history&&window.history.pushState;return!!t&&!false}const n=t=>()=>e=>s=>{switch(s.type){case i.PUSH:t.push(s.payload.to,s.payload.state);return;case i.REPLACE:t.replace(s.payload.to,s.payload.state);return;case i.GO:t.go(s.payload.delta);return;case i.BACK:t.back();return;case i.FORWARD:t.forward();return;default:return e(s)}}},35742:(t,e,s)=>{s.d(e,{default:()=>S});var i=s(75559);function r(t,e,s){e in t?Object.defineProperty(t,e,{value:s,enumerable:true,configurable:true,writable:true}):t[e]=s;return t}const n=(0,i.createSlice)({name:"_noop",initialState:{},reducers:{}});class a{constructor(){r(this,"_emitChange",void 0);r(this,"_reducers",void 0);this._emitChange=null;this._reducers=this.getInitialReducer()}getReducers(){return{...this._reducers}}register(t,e){this._reducers[t]||(this._reducers[t]=e);this._emitChange&&this._emitChange(this.getReducers())}setChangeListener(t){this._emitChange=t}getInitialReducer(){return{_noop:n.reducer}}clearListeners(){this._reducers=this.getInitialReducer()}}const o=a;var h=s(48707);var c=s(36702);function d(t,e,s){e in t?Object.defineProperty(t,e,{value:s,enumerable:true,configurable:true,writable:true}):t[e]=s;return t}const u=({pathname:t=null,search:e=null,hash:s=null,state:i=null,action:r=null})=>({type:c.ActionTypes.LOCATION_CHANGE,payload:{pathname:t,search:e,hash:s,state:i,action:r}});class l{constructor(t,e){d(this,"historyLibrary",void 0);d(this,"stopListening",void 0);d(this,"dispatch",void 0);this.historyLibrary=t;this.stopListening=null;this.dispatch=e}dispatchChangeAction({pathname:t,search:e,hash:s,state:i},r){this.dispatch(u({pathname:t,search:e,hash:s,state:i,action:r||null}))}start(){this.dispatchChangeAction(this.historyLibrary.location);this.stopListening=this.historyLibrary.listen((({action:t,location:e})=>{this.dispatchChangeAction(e,t)}))}stop(){if(this.stopListening){this.stopListening();this.stopListening=null}}}var p;function y(t,e,s){e in t?Object.defineProperty(t,e,{value:s,enumerable:true,configurable:true,writable:true}):t[e]=s;return t}const g=window;class L{constructor(t={}){y(this,"store",void 0);y(this,"registry",void 0);y(this,"historyListener",void 0);y(this,"storeListeners",void 0);y(this,"lastBroadcastState",void 0);y(this,"initialState",void 0);this.registry=new o;this.initialState=t;this.storeListeners=[];this.lastBroadcastState={};this.init(t)}init(t={}){const e=(0,c.browserHistoryApiIsSupported)()?(0,h.createBrowserHistory)():(0,h.createMemoryHistory)();this.store=this.createStore(this.registry.getReducers(),e,Object.assign(t,this.initialState));this.registry.setChangeListener((t=>{this.store.replaceReducer((0,i.combineReducers)(t))}));this.storeListeners=[];this.store.subscribe((()=>this.onStoreChange()));this.historyListener=new l(e,this.store.dispatch.bind(this));this.lastBroadcastState=this.getState()}__initForTestingOnly(t={}){this.init(t)}createStore(t,e,s={}){return(0,i.configureStore)({reducer:(0,i.combineReducers)(t),middleware:t=>t().concat((0,c["default"])(e)),preloadedState:s})}getState(t=void 0){return void 0!==t?this.store.getState()[t]:this.store.getState()}getLastBroadcastState(t=void 0){return void 0!==t?this.lastBroadcastState[t]:this.lastBroadcastState}onStoreChange(){const t=[];for(const{reducerKey:e,onChange:s}of this.storeListeners){const i=this.getLastBroadcastState(e);const r=this.getState(e);i!==r&&t.push((()=>s(r,i)))}this.lastBroadcastState=this.getState();t.forEach((t=>t()))}subscribeTo(t,e){const s={reducerKey:t,onChange:e};this.storeListeners.push(s);const i=()=>{this.storeListeners=this.storeListeners.filter((t=>t!==s))};return i}enableHistoryListener(){var t;null===(t=this.historyListener)||void 0===t?void 0:t.start()}registerReducer(t,e){this.registry.register(t,e)}clearListeners(){this.storeListeners=[];this.registry.clearListeners()}}g.__componentIslands=null!==(p=g.__componentIslands)&&void 0!==p?p:{};g.__componentIslands.ReduxStoreManager=g.__componentIslands.ReduxStoreManager||new L;const S=g.__componentIslands.ReduxStoreManager}}]); //# sourceMappingURL=https://www.etsy.com/sourcemaps/evergreenVendor/es/async/component-islands/vendor.1433eefd9b52fe38384e.js.map