/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./scheduler.js"),s=require("./types.js");exports.Store=class{constructor(t,s){this.listeners=new Set,this.subscribe=t=>{var s,e;this.listeners.add(t);const i=null==(e=null==(s=this.options)?void 0:s.onSubscribe)?void 0:e.call(s,t,this);return()=>{this.listeners.delete(t),null==i||i()}},this.prevState=t,this.state=t,this.options=s}setState(e){var i,o,r;this.prevState=this.state,(null==(i=this.options)?void 0:i.updateFn)?this.state=this.options.updateFn(this.prevState)(e):s.isUpdaterFunction(e)?this.state=e(this.prevState):this.state=e,null==(r=null==(o=this.options)?void 0:o.onUpdate)||r.call(o),t.__flush(this)}};