@wellesley/store 1.0.824 → 1.0.826
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSlice as m,createAction as D,createSelector as c,combineSlices as we,configureStore as be}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import{api as ne}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.825";import{subscribeActionMiddleware as ve}from"https://cdn.jsdelivr.net/npm/@wellesley/redux-subscribe-action@1.0.569";const k=()=>"object"!=typeof window,se=()=>re()?location.hostname:location.hostname.replace(/\w\w\w\.|^/,"."),oe=e=>{const t=new Date;return t.setTime(t.getTime()+24*e*60*60*1e3),t.toUTCString()},ie=e=>Object.keys(e).reduce(((t,n)=>`${t}${n}${!0===e[n]?"":`=${e[n]}`};`),""),Pe=(e,t)=>{const n=k()?"":document.cookie,s=`; ${t||n}`.split(`; ${e}=`);if(2===s.length)return(s.pop()||"").replace("=","").split(";").shift()},Ee=(e,t)=>{k()||(document.cookie=ie({[e]:"",path:"/",domain:t||se(),expires:"Thu, 01 Jan 1970 00:00:01 GMT"}))},Ie=["localhost","127.0.0.1","dev.localtest.me","wellesleydev.localtest.me"],re=()=>Ie.includes(location.hostname),ke=(e,t="",n=10,s)=>{k()||(document.cookie=ie({[e]:t,path:"/",domain:s||se(),expires:oe(n),...!re()&&{SameSite:"None",Secure:!0}}))},U={set:ke,remove:Ee,get:Pe,getExpireDate:oe},R="auth_token",ae=()=>U.get(R)||void 0,Le=e=>U.set(R,e),Ce=()=>U.remove(R),Oe=()=>!!ae(),Ne={getToken:ae,setToken:Le,removeToken:Ce,hasToken:Oe},W={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isPending:!!Ne.getToken(),isAuthenticated:!1,isAskLoginOpen:!1},xe=m({name:"auth",initialState:W,reducers:{setAskLoginOpen:(e,t)=>{e.isAskLoginOpen=t.payload},login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...W,isPending:!1}),setNewEmail:(e,t)=>{e.newEmail=t.payload},setForgotPasswordStep:(e,t)=>{e.forgotPasswordStep=t.payload},updateForgotPasswordFields:(e,t)=>{e.forgotPasswordFields={...e.forgotPasswordFields,...t.payload}},resetForgotPasswordFields:e=>{e.forgotPasswordFields=null},setSignupStep:(e,t)=>{e.signupStep=t.payload},updateSignupFields:(e,t)=>{e.signupFields={...e.signupFields,...t.payload}},resetSignupFields:e=>{e.signupFields=null},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectAskLoginOpen:e=>e.isAskLoginOpen,selectToken:e=>e.token,selectNewEmail:e=>e.newEmail,selectForgotPasswordStep:e=>e.forgotPasswordStep,selectForgotPasswordFields:e=>e.forgotPasswordFields,selectSignupStep:e=>e.signupStep,selectSignupFields:e=>e.signupFields,selectPending:e=>e.isPending,selectIsAuthenticated:e=>e.isAuthenticated}}),Ae={data:null,isPending:!1,isSuccess:!1},Te=m({name:"userNoHTML",initialState:Ae,reducers:{setUser:(e,t)=>{e.data=t.payload},setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},selectors:{selectUser:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),De=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||null===Object.getPrototypeOf(e)},Ue=e=>De(e)&&"type"in e&&"string"==typeof e.type,i=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>Ue(t)&&t.type===e,t};i("remoteReady"),i("askLogin"),i("reselectUser"),i("requestLogout"),i("setConfirmLeavePage"),i("requestChangePath"),i("wsSubscribe"),i("wsUnSubscribe"),i("hostStoreConnect"),i("remoteLogin"),i("remoteLogout"),i("wsOnMessage"),i("setRouterPath");const Re=i("setDeviceType"),Me=i("setDeviceWidth"),Fe=i("setUserError"),$e=i("setUserIsError"),Be=i("setUserPending"),qe=i("setUserSuccess"),je=i("setUserData"),He=i("updateAccountData"),We=i("updateUser"),Ge=i("addNotification"),Ke=i("markNotification"),Ve=i("setNotificationsError"),Ye=i("setNotificationsList"),ze=i("setNotificationsPending"),Je=i("setNotificationsTotalCount"),Xe=i("setNotificationsUnreadCount"),Qe=i("acceptAllFollowRequests"),Ze=i("resetNotificationsState"),et=i("undoNotification"),tt=i("setInstanceInfo"),nt=i("setInstanceInfoPending"),st=i("setInstanceInfoError"),ot=i("setPlatformSettings"),it=i("setProfileSettings");i("setGroupData"),i("setGroupLoading"),i("requestLocalStorageGet"),i("requestLocalStorageSet"),i("requestLocalStorageRemove"),i("requestLocalStorageClear"),i("requestLocalStorageKeys"),i("requestLocalStorageHas"),i("sendLocalStorageResponse"),i("sendLocalStorageChanged");const b="8.48.0",p=globalThis;function M(e,t,n){const s=p,i=s.__SENTRY__=s.__SENTRY__||{},o=i[b]=i[b]||{};return o[e]||(o[e]=t())}const ce=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rt="Sentry Logger ",G=["debug","info","warn","error","log","assert","trace"],K={};function at(e){if(!("console"in p))return e();const t=p.console,n={},s=Object.keys(K);s.forEach((e=>{const s=K[e];n[e]=t[e],t[e]=s}));try{return e()}finally{s.forEach((e=>{t[e]=n[e]}))}}function ct(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ce?G.forEach((n=>{t[n]=(...t)=>{e&&at((()=>{p.console[n](`${rt}[${n}]:`,...t)}))}})):G.forEach((e=>{t[e]=()=>{}})),t}const I=M("logger",ct);function F(){return $(p),p}function $(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||b,t[b]=t[b]||{}}const lt=Object.prototype.toString;function dt(e,t){return lt.call(e)===`[object ${t}]`}function ut(e){return dt(e,"Object")}function pt(e){return!(!e||!e.then||"function"!=typeof e.then)}function mt(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ce&&I.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const le=1e3;function de(){return Date.now()/le}function ft(){const{performance:e}=p;if(!e||!e.now)return de;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/le}const _t=ft();function h(){const e=p,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function ht(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||_t(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:h()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function V(){return h()}function Y(){return h().substring(16)}function ue(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const s={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=ue(s[e],t[e],n-1));return s}(()=>{const{performance:e}=p;if(!e||!e.now)return;const t=36e5,n=e.now(),s=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-s):t,o=i<t,a=e.timing&&e.timing.navigationStart,r="number"==typeof a?Math.abs(a+n-s):t;(o||r<t)&&(i<=r&&e.timeOrigin)})();const A="_sentrySpan";function z(e,t){t?mt(e,A,t):delete e[A]}function J(e){return e[A]}const gt=100;class B{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:V(),spanId:Y()}}clone(){const e=new B;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,z(e,J(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ht(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,s]=t instanceof v?[t.getScopeData(),t.getRequestSession()]:ut(t)?[e,e.requestSession]:[],{tags:i,extra:o,user:a,contexts:r,level:l,fingerprint:c=[],propagationContext:d}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...r},a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),c.length&&(this._fingerprint=c),d&&(this._propagationContext=d),s&&(this._requestSession=s),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,z(this,void 0),this._attachments=[],this.setPropagationContext({traceId:V()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:gt;if(n<=0)return this;const s={timestamp:de(),...e},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:J(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=ue(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Y(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:h();if(!this._client)return I.warn("No client configured on scope - will not capture exception!"),n;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...t,event_id:n},this),n}captureMessage(e,t,n){const s=n&&n.event_id?n.event_id:h();if(!this._client)return I.warn("No client configured on scope - will not capture message!"),s;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:s},this),s}captureEvent(e,t){const n=t&&t.event_id?t.event_id:h();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(I.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const v=B;function St(){return M("defaultCurrentScope",(()=>new v))}function yt(){return M("defaultIsolationScope",(()=>new v))}class wt{constructor(e,t){let n,s;n=e||new v,s=t||new v,this._stack=[{scope:n}],this._isolationScope=s}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return pt(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function g(){const e=$(F());return e.stack=e.stack||new wt(St(),yt())}function bt(e){return g().withScope(e)}function vt(e,t){const n=g();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function X(e){return g().withScope((()=>e(g().getIsolationScope())))}function Pt(){return{withIsolationScope:X,withScope:bt,withSetScope:vt,withSetIsolationScope:(e,t)=>X(t),getCurrentScope:()=>g().getScope(),getIsolationScope:()=>g().getIsolationScope()}}function pe(e){const t=$(e);return t.acs?t.acs:Pt()}function me(){return pe(F()).getCurrentScope()}function Et(){return pe(F()).getIsolationScope()}function It(e,t){return me().captureException(e,void 0)}function kt(e,t){const n={captureContext:t};return me().captureMessage(e,void 0,n)}function Lt(e,t){Et().setExtra(e,t)}const Ct=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return Lt("exceptionMessage",t),void It(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}kt(t)},Ot="wlsy",fe=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},Nt=()=>{const e=new Set,t=fe();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const s=null==t?void 0:t.key(n);"string"==typeof s&&e.add(s)}return Array.from(e)},xt=e=>{const t=`${Ot}`,n=e=>`${t}:${e}`,s=()=>Nt().filter((e=>e.startsWith(`${t}:`))),i=e=>e.slice(t.length+1),o=fe(),a=e=>{try{return null==o?void 0:o.getItem(n(e))}catch{return null}},r=(e,t)=>{try{null==o||o.setItem(n(e),String(t))}catch{return}};return{getItem:a,setItem:r,removeItem:e=>{try{null==o||o.removeItem(n(e))}catch{return}},clear:()=>{try{s().forEach((e=>null==o?void 0:o.removeItem(e)))}catch{return}},keys:()=>s().map(i),has:e=>null!==a(e),getJSON:e=>{const t=a(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{r(e,JSON.stringify(t))}catch{return}}}},Q=["debug","info","warn","error"],At=(e,t)=>{const n=Q.indexOf(e);return Q.indexOf(t)>=n},P=(e,t,n,...s)=>{At(t,e)&&console.log(`[${e}] ${n}`,...s)},Tt=()=>xt().getItem("logger_lvl"),Dt=(e=(k()?"info":Tt()||"warn"))=>{let t=e;return{debug:(e,...n)=>P("debug",t,e,...n),info:(e,...n)=>P("info",t,e,...n),warn:(e,...n)=>P("warn",t,e,...n),error:(e,...n)=>(Ct(e,...n),P("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}};Dt(),D("requestMicroFrontendFetch"),D("sendMicroFrontendFetchResponse");const Z={data:null,isError:!1,isPending:!1,isSuccess:!1},Ut=m({name:"user",initialState:Z,reducers:{reset:e=>{Object.assign(e,Z)}},extraReducers:e=>{e.addCase(je,((e,{payload:t})=>{e.data=t})).addCase(He,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(qe,((e,{payload:t})=>{e.isSuccess=t})).addCase(Be,((e,{payload:t})=>{e.isPending=t})).addCase($e,((e,{payload:t})=>{e.isError=t})).addCase(Fe,((e,{payload:t})=>{e.error=t})).addCase(We,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}}),q=e=>e,L=c(q,(e=>e.data)),Rt=c(q,(e=>e.error)),Mt=c(q,(e=>e.isPending)),Ft=c(L,(e=>null==e?void 0:e.rules)),$t=c(L,(e=>null==e?void 0:e.contact_account)),Bt=c(L,(e=>(null==e?void 0:e.stats)&&Object.fromEntries(Object.entries(e.stats).map((([e,t])=>[e,t??0]))))),qt={data:null,isPending:!1},jt=m({name:"instanceInfo",initialState:qt,reducers:{},extraReducers:e=>{e.addCase(tt,((e,{payload:t})=>{e.data=t})).addCase(nt,((e,{payload:t})=>{e.isPending=t})).addCase(st,((e,{payload:t})=>{e.error=t}))},selectors:{selectInstanceInfo:L,selectInstanceInfoError:Rt,selectInstanceInfoPending:Mt,selectPlatformRules:Ft,selectInstanceContacts:$t,selectInstanceStats:Bt,selectDescription:e=>{var t;return null==(t=e.data)?void 0:t.description},selectStats:e=>{var t;return null==(t=e.data)?void 0:t.stats},selectRegistrations:e=>{var t;return null==(t=e.data)?void 0:t.configuration.registrations}}}),Ht={data:null,isPending:!1,isSuccess:!1},Wt=m({name:"profileSettings",initialState:Ht,reducers:{setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},extraReducers:e=>{e.addCase(it,((e,{payload:t})=>{e.data=t}))},selectors:{selectProfileSettings:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),Gt={sms:"wellesley.admin.sms",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},T={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},w=e=>(null==e?void 0:e.map((e=>e.value||e)))||[],Kt={data:null,isPending:!1},{posts:N,uploadsPolicyDoc:ee,uploadsPolicyAudio:x,uploadsPolicyImage:E,uploadsPolicyVideo:y,registration:_e,captcha:Vt,instanceAdmin:Yt,branding:zt,translation:Jt,domainBlocks:Xt,access:Qt}=T,{captcha:Zt,language:en,translation:tn,openai:nn,link_service:sn}=Gt,_=e=>e.data,on=c(_,(e=>{var t,n,s;return{max_characters:(null==(t=null==e?void 0:e[N])?void 0:t.max_characters)||0,max_media_attachments:(null==(n=null==e?void 0:e[N])?void 0:n.max_media_attachments)||0,max_pins:(null==(s=null==e?void 0:e[N])?void 0:s.max_pins)||0}})),j=c(_,(e=>{var t,n,s;return{...null==e?void 0:e[E],maxSize:(null==(t=null==e?void 0:e[E])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[E])?void 0:n.maxMatrix)||0,maxResolution:(null==(s=null==e?void 0:e[E])?void 0:s.maxResolution)||0}})),rn=c(j,(e=>w(e.extensions))),he=c(_,(e=>{var t,n,s,i;return{...null==e?void 0:e[y],maxSize:(null==(t=null==e?void 0:e[y])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[y])?void 0:n.maxMatrix)||0,maxDuration:(null==(s=null==e?void 0:e[y])?void 0:s.maxDuration)||0,maxResolution:(null==(i=null==e?void 0:e[y])?void 0:i.maxResolution)||0}})),ge=c(_,(e=>{var t,n;return{...null==e?void 0:e[x],maxSize:null==(t=null==e?void 0:e[x])?void 0:t.maxSize,keepOriginal:(null==(n=null==e?void 0:e[x])?void 0:n.keepOriginal)||0}})),Se=c(_,(e=>{var t;return{...null==e?void 0:e[ee],maxSize:(null==(t=null==e?void 0:e[ee])?void 0:t.maxSize)||0}})),ye=c([j,he,ge,Se],((e,t,n,s)=>({IMAGE:w(null==e?void 0:e.extensions),VIDEO:w(null==t?void 0:t.extensions),AUDIO:w(null==n?void 0:n.extensions),DOCUMENT:w(null==s?void 0:s.extensions)}))),an=c(ye,(e=>Object.keys(e).reduce(((t,n)=>[...t,...e[n]||[]]),[]))),cn=c(_,(e=>{var t;return null==(t=null==e?void 0:e[_e])?void 0:t.invites})),ln=m({name:"platformSettings",initialState:Kt,reducers:{setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},extraReducers:e=>{e.addCase(ot,((e,{payload:t})=>{e.data={...e.data,...t}}))},selectors:{selectSettings:_,selectPostConfig:on,selectDocPolicy:Se,selectImagePolicy:j,selectVideoPolicy:he,selectAudioPolicy:ge,selectInvitesEnabled:cn,selectImageExtensions:rn,selectSupportedExtensions:ye,selectFullExtensionsList:an,selectRegistration:e=>{var t;return null==(t=e.data)?void 0:t[_e]},selectLanguageDetection:e=>{var t;return null==(t=e.data)?void 0:t[en]},selectLanguageTranslation:e=>{var t;return null==(t=e.data)?void 0:t[tn]},selectOpenai:e=>{var t;return null==(t=e.data)?void 0:t[nn]},selectCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[Vt]},selectAdminCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[Zt]},selectPlatformTranslation:e=>{var t;return null==(t=e.data)?void 0:t[Jt]},selectAccess:e=>{var t;return null==(t=e.data)?void 0:t[Qt]},selectBranding:e=>{var t;return null==(t=e.data)?void 0:t[zt]},selectLinkService:e=>{var t;return null==(t=e.data)?void 0:t[sn]},selectInstanceAdmin:e=>{var t;return null==(t=e.data)?void 0:t[Yt]},selectLegal:e=>{var t;return null==(t=e.data)?void 0:t[T.legal]},selectDomainBlocks:e=>{var t;return null==(t=e.data)?void 0:t[Xt]},selectContacts:e=>{var t;return null==(t=e.data)?void 0:t[T.contacts]}}}),te={data:{userId:"",list:[]},count:{},isPending:!1},dn=e=>e,un=e=>e.error,pn=e=>e.isPending,mn=e=>{var t;return null==(t=e.count)?void 0:t.total},fn=e=>{var t;return null==(t=e.count)?void 0:t.unread},_n=e=>e.data.userId,H=c(dn,(e=>e.data.list)),hn=c(H,(e=>null==e?void 0:e.filter((e=>"UNREAD"===e.status)))),gn=c(H,(e=>null==e?void 0:e.at(-1))),Sn=m({name:"notifications",initialState:te,reducers:{updateNotification:(e,t)=>{var n;if(!e.data.list)return;const s=t.payload;e.data.list=null==(n=e.data.list)?void 0:n.map((e=>e.id===s.id?{...e,...s}:e))},readAll:e=>{var t;e.data.list&&(e.data.list=null==(t=e.data.list)?void 0:t.map((e=>({...e,status:"READ"}))))}},extraReducers:e=>{e.addCase(ze,((e,t)=>{e.isPending=t.payload})).addCase(Ve,((e,t)=>{e.error=t.payload})).addCase(Ye,((e,t)=>{const n=t.payload.userId,s=t.payload.list;e.data={userId:n,list:[...e.data.list||[],...s.filter((t=>{var n;return!(null!=(n=e.data.list)&&n.some((e=>e.id===t.id)))}))]}})).addCase(Ge,((e,t)=>{e.count.unread=(e.count.unread||0)+1,e.data.list&&(e.data.list=[t.payload,...e.data.list||[]])})).addCase(Ke,((e,t)=>{e.data.list&&(e.data.list=e.data.list.map((e=>e.id===t.payload.id?{...e,status:t.payload.status}:e)))})).addCase(Je,((e,t)=>{e.count.total=t.payload})).addCase(Xe,((e,t)=>{e.count.unread=t.payload})).addCase(Ze,(()=>te)).addCase(et,((e,t)=>{var n,s,i;const o=t.payload;"UNREAD"===(null==(s=null==(n=e.data.list)?void 0:n.find((e=>e.id===o)))?void 0:s.status)&&e.count.unread&&(e.count.unread-=1),e.data.list=(null==(i=e.data.list)?void 0:i.filter((e=>e.id!==o)))||[]})).addCase(Qe,(e=>{e.data.list&&(e.data.list=e.data.list.map((e=>"FOLLOW_REQUEST"===e.type?{...e,followResponse:"Accepted"}:e)))}))},selectors:{selectError:un,selectIsPending:pn,selectTotalCount:mn,selectUnreadCount:fn,selectNotifications:H,selectUnreadNotifications:hn,selectLastNotification:gn,selectNotificationsOwner:_n}}),yn=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},wn={deviceType:yn(),deviceWidth:window.innerWidth},bn=m({name:"ui",initialState:wn,reducers:{},extraReducers:e=>{e.addCase(Re,((e,{payload:t})=>{e.deviceType=t})),e.addCase(Me,((e,{payload:t})=>{e.deviceWidth=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectDeviceWidth:e=>e.deviceWidth,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});function vn(){return!(typeof navigator<"u"&&"boolean"==typeof navigator.onLine)||navigator.onLine}const Pn={isOnline:vn()},En=m({name:"network",initialState:Pn,reducers:{setOnline:(e,{payload:t})=>{e.isOnline=t}},selectors:{selectOnline:e=>e.isOnline}});var In={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/store/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/store/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"42ef901cff00598f",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/store",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.824",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/store",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"true",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/store",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3743",APP_NAME:"@wellesley/store"};const kn=we(ne,En,bn,xe,Ut,Te,jt,Sn,Wt,ln),Ln=D("app/hydrate"),Cn=(e,t)=>Ln.match(t)?{...e,...t.payload}:kn(e,t),On=e=>{const t=be({devTools:{name:In.APP_NAME},reducer:Cn,preloadedState:e,middleware:e=>e().concat(ne.middleware,ve)});return window._wlsy_store=t,t},Un=()=>window._wlsy_store,Rn=e=>(window._wlsy_store||(window._wlsy_store=On(e)),window._wlsy_store);export{On as createStore,Rn as getOrCreateStore,Un as getStore,Ln as hydrate,kn as rootReducer,Cn as rootReducerWithHydrate};
|
|
1
|
+
import{createSlice as m,createAction as D,createSelector as c,combineSlices as we,configureStore as be}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import{api as ne}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.827";import{subscribeActionMiddleware as ve}from"https://cdn.jsdelivr.net/npm/@wellesley/redux-subscribe-action@1.0.571";const k=()=>"object"!=typeof window,se=()=>re()?location.hostname:location.hostname.replace(/\w\w\w\.|^/,"."),oe=e=>{const t=new Date;return t.setTime(t.getTime()+24*e*60*60*1e3),t.toUTCString()},ie=e=>Object.keys(e).reduce(((t,n)=>`${t}${n}${!0===e[n]?"":`=${e[n]}`};`),""),Pe=(e,t)=>{const n=k()?"":document.cookie,s=`; ${t||n}`.split(`; ${e}=`);if(2===s.length)return(s.pop()||"").replace("=","").split(";").shift()},Ee=(e,t)=>{k()||(document.cookie=ie({[e]:"",path:"/",domain:t||se(),expires:"Thu, 01 Jan 1970 00:00:01 GMT"}))},Ie=["localhost","127.0.0.1","dev.localtest.me","wellesleydev.localtest.me"],re=()=>Ie.includes(location.hostname),ke=(e,t="",n=10,s)=>{k()||(document.cookie=ie({[e]:t,path:"/",domain:s||se(),expires:oe(n),...!re()&&{SameSite:"None",Secure:!0}}))},U={set:ke,remove:Ee,get:Pe,getExpireDate:oe},R="auth_token",ae=()=>U.get(R)||void 0,Le=e=>U.set(R,e),Ce=()=>U.remove(R),Oe=()=>!!ae(),Ne={getToken:ae,setToken:Le,removeToken:Ce,hasToken:Oe},W={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isPending:!!Ne.getToken(),isAuthenticated:!1,isAskLoginOpen:!1},xe=m({name:"auth",initialState:W,reducers:{setAskLoginOpen:(e,t)=>{e.isAskLoginOpen=t.payload},login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...W,isPending:!1}),setNewEmail:(e,t)=>{e.newEmail=t.payload},setForgotPasswordStep:(e,t)=>{e.forgotPasswordStep=t.payload},updateForgotPasswordFields:(e,t)=>{e.forgotPasswordFields={...e.forgotPasswordFields,...t.payload}},resetForgotPasswordFields:e=>{e.forgotPasswordFields=null},setSignupStep:(e,t)=>{e.signupStep=t.payload},updateSignupFields:(e,t)=>{e.signupFields={...e.signupFields,...t.payload}},resetSignupFields:e=>{e.signupFields=null},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectAskLoginOpen:e=>e.isAskLoginOpen,selectToken:e=>e.token,selectNewEmail:e=>e.newEmail,selectForgotPasswordStep:e=>e.forgotPasswordStep,selectForgotPasswordFields:e=>e.forgotPasswordFields,selectSignupStep:e=>e.signupStep,selectSignupFields:e=>e.signupFields,selectPending:e=>e.isPending,selectIsAuthenticated:e=>e.isAuthenticated}}),Ae={data:null,isPending:!1,isSuccess:!1},Te=m({name:"userNoHTML",initialState:Ae,reducers:{setUser:(e,t)=>{e.data=t.payload},setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},selectors:{selectUser:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),De=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||null===Object.getPrototypeOf(e)},Ue=e=>De(e)&&"type"in e&&"string"==typeof e.type,i=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>Ue(t)&&t.type===e,t};i("remoteReady"),i("askLogin"),i("reselectUser"),i("requestLogout"),i("setConfirmLeavePage"),i("requestChangePath"),i("wsSubscribe"),i("wsUnSubscribe"),i("hostStoreConnect"),i("remoteLogin"),i("remoteLogout"),i("wsOnMessage"),i("setRouterPath");const Re=i("setDeviceType"),Me=i("setDeviceWidth"),Fe=i("setUserError"),$e=i("setUserIsError"),Be=i("setUserPending"),qe=i("setUserSuccess"),je=i("setUserData"),He=i("updateAccountData"),We=i("updateUser"),Ge=i("addNotification"),Ke=i("markNotification"),Ve=i("setNotificationsError"),Ye=i("setNotificationsList"),ze=i("setNotificationsPending"),Je=i("setNotificationsTotalCount"),Xe=i("setNotificationsUnreadCount"),Qe=i("acceptAllFollowRequests"),Ze=i("resetNotificationsState"),et=i("undoNotification"),tt=i("setInstanceInfo"),nt=i("setInstanceInfoPending"),st=i("setInstanceInfoError"),ot=i("setPlatformSettings"),it=i("setProfileSettings");i("setGroupData"),i("setGroupLoading"),i("requestLocalStorageGet"),i("requestLocalStorageSet"),i("requestLocalStorageRemove"),i("requestLocalStorageClear"),i("requestLocalStorageKeys"),i("requestLocalStorageHas"),i("sendLocalStorageResponse"),i("sendLocalStorageChanged");const b="8.48.0",p=globalThis;function M(e,t,n){const s=p,i=s.__SENTRY__=s.__SENTRY__||{},o=i[b]=i[b]||{};return o[e]||(o[e]=t())}const ce=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rt="Sentry Logger ",G=["debug","info","warn","error","log","assert","trace"],K={};function at(e){if(!("console"in p))return e();const t=p.console,n={},s=Object.keys(K);s.forEach((e=>{const s=K[e];n[e]=t[e],t[e]=s}));try{return e()}finally{s.forEach((e=>{t[e]=n[e]}))}}function ct(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ce?G.forEach((n=>{t[n]=(...t)=>{e&&at((()=>{p.console[n](`${rt}[${n}]:`,...t)}))}})):G.forEach((e=>{t[e]=()=>{}})),t}const I=M("logger",ct);function F(){return $(p),p}function $(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||b,t[b]=t[b]||{}}const lt=Object.prototype.toString;function dt(e,t){return lt.call(e)===`[object ${t}]`}function ut(e){return dt(e,"Object")}function pt(e){return!(!e||!e.then||"function"!=typeof e.then)}function mt(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ce&&I.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const le=1e3;function de(){return Date.now()/le}function ft(){const{performance:e}=p;if(!e||!e.now)return de;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/le}const _t=ft();function h(){const e=p,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function ht(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||_t(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:h()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function V(){return h()}function Y(){return h().substring(16)}function ue(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const s={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=ue(s[e],t[e],n-1));return s}(()=>{const{performance:e}=p;if(!e||!e.now)return;const t=36e5,n=e.now(),s=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-s):t,o=i<t,a=e.timing&&e.timing.navigationStart,r="number"==typeof a?Math.abs(a+n-s):t;(o||r<t)&&(i<=r&&e.timeOrigin)})();const A="_sentrySpan";function z(e,t){t?mt(e,A,t):delete e[A]}function J(e){return e[A]}const gt=100;class B{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:V(),spanId:Y()}}clone(){const e=new B;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,z(e,J(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ht(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,s]=t instanceof v?[t.getScopeData(),t.getRequestSession()]:ut(t)?[e,e.requestSession]:[],{tags:i,extra:o,user:a,contexts:r,level:l,fingerprint:c=[],propagationContext:d}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...r},a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),c.length&&(this._fingerprint=c),d&&(this._propagationContext=d),s&&(this._requestSession=s),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,z(this,void 0),this._attachments=[],this.setPropagationContext({traceId:V()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:gt;if(n<=0)return this;const s={timestamp:de(),...e},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:J(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=ue(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Y(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:h();if(!this._client)return I.warn("No client configured on scope - will not capture exception!"),n;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...t,event_id:n},this),n}captureMessage(e,t,n){const s=n&&n.event_id?n.event_id:h();if(!this._client)return I.warn("No client configured on scope - will not capture message!"),s;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:s},this),s}captureEvent(e,t){const n=t&&t.event_id?t.event_id:h();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(I.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const v=B;function St(){return M("defaultCurrentScope",(()=>new v))}function yt(){return M("defaultIsolationScope",(()=>new v))}class wt{constructor(e,t){let n,s;n=e||new v,s=t||new v,this._stack=[{scope:n}],this._isolationScope=s}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return pt(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function g(){const e=$(F());return e.stack=e.stack||new wt(St(),yt())}function bt(e){return g().withScope(e)}function vt(e,t){const n=g();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function X(e){return g().withScope((()=>e(g().getIsolationScope())))}function Pt(){return{withIsolationScope:X,withScope:bt,withSetScope:vt,withSetIsolationScope:(e,t)=>X(t),getCurrentScope:()=>g().getScope(),getIsolationScope:()=>g().getIsolationScope()}}function pe(e){const t=$(e);return t.acs?t.acs:Pt()}function me(){return pe(F()).getCurrentScope()}function Et(){return pe(F()).getIsolationScope()}function It(e,t){return me().captureException(e,void 0)}function kt(e,t){const n={captureContext:t};return me().captureMessage(e,void 0,n)}function Lt(e,t){Et().setExtra(e,t)}const Ct=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return Lt("exceptionMessage",t),void It(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}kt(t)},Ot="wlsy",fe=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},Nt=()=>{const e=new Set,t=fe();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const s=null==t?void 0:t.key(n);"string"==typeof s&&e.add(s)}return Array.from(e)},xt=e=>{const t=`${Ot}`,n=e=>`${t}:${e}`,s=()=>Nt().filter((e=>e.startsWith(`${t}:`))),i=e=>e.slice(t.length+1),o=fe(),a=e=>{try{return null==o?void 0:o.getItem(n(e))}catch{return null}},r=(e,t)=>{try{null==o||o.setItem(n(e),String(t))}catch{return}};return{getItem:a,setItem:r,removeItem:e=>{try{null==o||o.removeItem(n(e))}catch{return}},clear:()=>{try{s().forEach((e=>null==o?void 0:o.removeItem(e)))}catch{return}},keys:()=>s().map(i),has:e=>null!==a(e),getJSON:e=>{const t=a(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{r(e,JSON.stringify(t))}catch{return}}}},Q=["debug","info","warn","error"],At=(e,t)=>{const n=Q.indexOf(e);return Q.indexOf(t)>=n},P=(e,t,n,...s)=>{At(t,e)&&console.log(`[${e}] ${n}`,...s)},Tt=()=>xt().getItem("logger_lvl"),Dt=(e=(k()?"info":Tt()||"warn"))=>{let t=e;return{debug:(e,...n)=>P("debug",t,e,...n),info:(e,...n)=>P("info",t,e,...n),warn:(e,...n)=>P("warn",t,e,...n),error:(e,...n)=>(Ct(e,...n),P("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}};Dt(),D("requestMicroFrontendFetch"),D("sendMicroFrontendFetchResponse");const Z={data:null,isError:!1,isPending:!1,isSuccess:!1},Ut=m({name:"user",initialState:Z,reducers:{reset:e=>{Object.assign(e,Z)}},extraReducers:e=>{e.addCase(je,((e,{payload:t})=>{e.data=t})).addCase(He,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(qe,((e,{payload:t})=>{e.isSuccess=t})).addCase(Be,((e,{payload:t})=>{e.isPending=t})).addCase($e,((e,{payload:t})=>{e.isError=t})).addCase(Fe,((e,{payload:t})=>{e.error=t})).addCase(We,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}}),q=e=>e,L=c(q,(e=>e.data)),Rt=c(q,(e=>e.error)),Mt=c(q,(e=>e.isPending)),Ft=c(L,(e=>null==e?void 0:e.rules)),$t=c(L,(e=>null==e?void 0:e.contact_account)),Bt=c(L,(e=>(null==e?void 0:e.stats)&&Object.fromEntries(Object.entries(e.stats).map((([e,t])=>[e,t??0]))))),qt={data:null,isPending:!1},jt=m({name:"instanceInfo",initialState:qt,reducers:{},extraReducers:e=>{e.addCase(tt,((e,{payload:t})=>{e.data=t})).addCase(nt,((e,{payload:t})=>{e.isPending=t})).addCase(st,((e,{payload:t})=>{e.error=t}))},selectors:{selectInstanceInfo:L,selectInstanceInfoError:Rt,selectInstanceInfoPending:Mt,selectPlatformRules:Ft,selectInstanceContacts:$t,selectInstanceStats:Bt,selectDescription:e=>{var t;return null==(t=e.data)?void 0:t.description},selectStats:e=>{var t;return null==(t=e.data)?void 0:t.stats},selectRegistrations:e=>{var t;return null==(t=e.data)?void 0:t.configuration.registrations}}}),Ht={data:null,isPending:!1,isSuccess:!1},Wt=m({name:"profileSettings",initialState:Ht,reducers:{setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},extraReducers:e=>{e.addCase(it,((e,{payload:t})=>{e.data=t}))},selectors:{selectProfileSettings:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),Gt={sms:"wellesley.admin.sms",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},T={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},w=e=>(null==e?void 0:e.map((e=>e.value||e)))||[],Kt={data:null,isPending:!1},{posts:N,uploadsPolicyDoc:ee,uploadsPolicyAudio:x,uploadsPolicyImage:E,uploadsPolicyVideo:y,registration:_e,captcha:Vt,instanceAdmin:Yt,branding:zt,translation:Jt,domainBlocks:Xt,access:Qt}=T,{captcha:Zt,language:en,translation:tn,openai:nn,link_service:sn}=Gt,_=e=>e.data,on=c(_,(e=>{var t,n,s;return{max_characters:(null==(t=null==e?void 0:e[N])?void 0:t.max_characters)||0,max_media_attachments:(null==(n=null==e?void 0:e[N])?void 0:n.max_media_attachments)||0,max_pins:(null==(s=null==e?void 0:e[N])?void 0:s.max_pins)||0}})),j=c(_,(e=>{var t,n,s;return{...null==e?void 0:e[E],maxSize:(null==(t=null==e?void 0:e[E])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[E])?void 0:n.maxMatrix)||0,maxResolution:(null==(s=null==e?void 0:e[E])?void 0:s.maxResolution)||0}})),rn=c(j,(e=>w(e.extensions))),he=c(_,(e=>{var t,n,s,i;return{...null==e?void 0:e[y],maxSize:(null==(t=null==e?void 0:e[y])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[y])?void 0:n.maxMatrix)||0,maxDuration:(null==(s=null==e?void 0:e[y])?void 0:s.maxDuration)||0,maxResolution:(null==(i=null==e?void 0:e[y])?void 0:i.maxResolution)||0}})),ge=c(_,(e=>{var t,n;return{...null==e?void 0:e[x],maxSize:null==(t=null==e?void 0:e[x])?void 0:t.maxSize,keepOriginal:(null==(n=null==e?void 0:e[x])?void 0:n.keepOriginal)||0}})),Se=c(_,(e=>{var t;return{...null==e?void 0:e[ee],maxSize:(null==(t=null==e?void 0:e[ee])?void 0:t.maxSize)||0}})),ye=c([j,he,ge,Se],((e,t,n,s)=>({IMAGE:w(null==e?void 0:e.extensions),VIDEO:w(null==t?void 0:t.extensions),AUDIO:w(null==n?void 0:n.extensions),DOCUMENT:w(null==s?void 0:s.extensions)}))),an=c(ye,(e=>Object.keys(e).reduce(((t,n)=>[...t,...e[n]||[]]),[]))),cn=c(_,(e=>{var t;return null==(t=null==e?void 0:e[_e])?void 0:t.invites})),ln=m({name:"platformSettings",initialState:Kt,reducers:{setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},extraReducers:e=>{e.addCase(ot,((e,{payload:t})=>{e.data={...e.data,...t}}))},selectors:{selectSettings:_,selectPostConfig:on,selectDocPolicy:Se,selectImagePolicy:j,selectVideoPolicy:he,selectAudioPolicy:ge,selectInvitesEnabled:cn,selectImageExtensions:rn,selectSupportedExtensions:ye,selectFullExtensionsList:an,selectRegistration:e=>{var t;return null==(t=e.data)?void 0:t[_e]},selectLanguageDetection:e=>{var t;return null==(t=e.data)?void 0:t[en]},selectLanguageTranslation:e=>{var t;return null==(t=e.data)?void 0:t[tn]},selectOpenai:e=>{var t;return null==(t=e.data)?void 0:t[nn]},selectCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[Vt]},selectAdminCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[Zt]},selectPlatformTranslation:e=>{var t;return null==(t=e.data)?void 0:t[Jt]},selectAccess:e=>{var t;return null==(t=e.data)?void 0:t[Qt]},selectBranding:e=>{var t;return null==(t=e.data)?void 0:t[zt]},selectLinkService:e=>{var t;return null==(t=e.data)?void 0:t[sn]},selectInstanceAdmin:e=>{var t;return null==(t=e.data)?void 0:t[Yt]},selectLegal:e=>{var t;return null==(t=e.data)?void 0:t[T.legal]},selectDomainBlocks:e=>{var t;return null==(t=e.data)?void 0:t[Xt]},selectContacts:e=>{var t;return null==(t=e.data)?void 0:t[T.contacts]}}}),te={data:{userId:"",list:[]},count:{},isPending:!1},dn=e=>e,un=e=>e.error,pn=e=>e.isPending,mn=e=>{var t;return null==(t=e.count)?void 0:t.total},fn=e=>{var t;return null==(t=e.count)?void 0:t.unread},_n=e=>e.data.userId,H=c(dn,(e=>e.data.list)),hn=c(H,(e=>null==e?void 0:e.filter((e=>"UNREAD"===e.status)))),gn=c(H,(e=>null==e?void 0:e.at(-1))),Sn=m({name:"notifications",initialState:te,reducers:{updateNotification:(e,t)=>{var n;if(!e.data.list)return;const s=t.payload;e.data.list=null==(n=e.data.list)?void 0:n.map((e=>e.id===s.id?{...e,...s}:e))},readAll:e=>{var t;e.data.list&&(e.data.list=null==(t=e.data.list)?void 0:t.map((e=>({...e,status:"READ"}))))}},extraReducers:e=>{e.addCase(ze,((e,t)=>{e.isPending=t.payload})).addCase(Ve,((e,t)=>{e.error=t.payload})).addCase(Ye,((e,t)=>{const n=t.payload.userId,s=t.payload.list;e.data={userId:n,list:[...e.data.list||[],...s.filter((t=>{var n;return!(null!=(n=e.data.list)&&n.some((e=>e.id===t.id)))}))]}})).addCase(Ge,((e,t)=>{e.count.unread=(e.count.unread||0)+1,e.data.list&&(e.data.list=[t.payload,...e.data.list||[]])})).addCase(Ke,((e,t)=>{e.data.list&&(e.data.list=e.data.list.map((e=>e.id===t.payload.id?{...e,status:t.payload.status}:e)))})).addCase(Je,((e,t)=>{e.count.total=t.payload})).addCase(Xe,((e,t)=>{e.count.unread=t.payload})).addCase(Ze,(()=>te)).addCase(et,((e,t)=>{var n,s,i;const o=t.payload;"UNREAD"===(null==(s=null==(n=e.data.list)?void 0:n.find((e=>e.id===o)))?void 0:s.status)&&e.count.unread&&(e.count.unread-=1),e.data.list=(null==(i=e.data.list)?void 0:i.filter((e=>e.id!==o)))||[]})).addCase(Qe,(e=>{e.data.list&&(e.data.list=e.data.list.map((e=>"FOLLOW_REQUEST"===e.type?{...e,followResponse:"Accepted"}:e)))}))},selectors:{selectError:un,selectIsPending:pn,selectTotalCount:mn,selectUnreadCount:fn,selectNotifications:H,selectUnreadNotifications:hn,selectLastNotification:gn,selectNotificationsOwner:_n}}),yn=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},wn={deviceType:yn(),deviceWidth:window.innerWidth},bn=m({name:"ui",initialState:wn,reducers:{},extraReducers:e=>{e.addCase(Re,((e,{payload:t})=>{e.deviceType=t})),e.addCase(Me,((e,{payload:t})=>{e.deviceWidth=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectDeviceWidth:e=>e.deviceWidth,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});function vn(){return!(typeof navigator<"u"&&"boolean"==typeof navigator.onLine)||navigator.onLine}const Pn={isOnline:vn()},En=m({name:"network",initialState:Pn,reducers:{setOnline:(e,{payload:t})=>{e.isOnline=t}},selectors:{selectOnline:e=>e.isOnline}});var In={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/store/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/store/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"ad34fd662515e2c4",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/store",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.826",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/store",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"true",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/store",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3745",APP_NAME:"@wellesley/store"};const kn=we(ne,En,bn,xe,Ut,Te,jt,Sn,Wt,ln),Ln=D("app/hydrate"),Cn=(e,t)=>Ln.match(t)?{...e,...t.payload}:kn(e,t),On=e=>{const t=be({devTools:{name:In.APP_NAME},reducer:Cn,preloadedState:e,middleware:e=>e().concat(ne.middleware,ve)});return window._wlsy_store=t,t},Un=()=>window._wlsy_store,Rn=e=>(window._wlsy_store||(window._wlsy_store=On(e)),window._wlsy_store);export{On as createStore,Rn as getOrCreateStore,Un as getStore,Ln as hydrate,kn as rootReducer,Cn as rootReducerWithHydrate};
|
package/package.json
CHANGED