mutts 1.0.8 → 1.0.9
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/README.md +19 -2
- package/dist/browser.cjs +1030 -4406
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.ts +310 -573
- package/dist/browser.esm.js +18 -24
- package/dist/browser.esm.js.map +1 -1
- package/dist/chunks/{async-browser-CA0jPWIi.cjs → async-browser-lvzLOCgk.cjs} +17 -24
- package/dist/chunks/async-browser-lvzLOCgk.cjs.map +1 -0
- package/dist/chunks/{async-core-UqHzvJ-S.cjs → async-core-CRLKP3l-.cjs} +8 -4
- package/dist/chunks/async-core-CRLKP3l-.cjs.map +1 -0
- package/dist/chunks/{async-node-BYHuGTni.cjs → async-node-C3DeIb0y.cjs} +5 -12
- package/dist/chunks/async-node-C3DeIb0y.cjs.map +1 -0
- package/dist/chunks/index-2vea86wD.esm.js +3011 -0
- package/dist/chunks/index-2vea86wD.esm.js.map +1 -0
- package/dist/chunks/index-CtA2AWl3.esm.js +4376 -0
- package/dist/chunks/index-CtA2AWl3.esm.js.map +1 -0
- package/dist/chunks/index-VTO-b2vR.cjs +4461 -0
- package/dist/chunks/index-VTO-b2vR.cjs.map +1 -0
- package/dist/{reactive → debug}/debug.d.ts +19 -8
- package/dist/debug/debug.d.ts.map +1 -0
- package/dist/debug/index.d.ts +4 -0
- package/dist/debug/index.d.ts.map +1 -0
- package/dist/debug/lineage-panel.d.ts +5 -0
- package/dist/debug/lineage-panel.d.ts.map +1 -0
- package/dist/debug/lineage.d.ts +79 -0
- package/dist/debug/lineage.d.ts.map +1 -0
- package/dist/debug.cjs +35 -0
- package/dist/debug.cjs.map +1 -0
- package/dist/debug.d.ts +209 -0
- package/dist/debug.esm.js +2 -0
- package/dist/debug.esm.js.map +1 -0
- package/dist/index.d.ts +1 -13
- package/dist/mutts.umd.js +1 -1
- package/dist/mutts.umd.js.map +1 -1
- package/dist/mutts.umd.min.js +1 -1
- package/dist/mutts.umd.min.js.map +1 -1
- package/dist/node.cjs +65 -63
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.ts +2 -1
- package/dist/node.esm.js +5 -11
- package/dist/node.esm.js.map +1 -1
- package/dist/{async → src/async}/browser.d.ts.map +1 -1
- package/dist/{async → src/async}/index.d.ts +2 -1
- package/dist/src/async/index.d.ts.map +1 -0
- package/dist/{async → src/async}/node.d.ts.map +1 -1
- package/dist/src/decorator.d.ts.map +1 -0
- package/dist/src/destroyable.d.ts.map +1 -0
- package/dist/src/entry-browser.d.ts.map +1 -0
- package/dist/src/entry-node.d.ts.map +1 -0
- package/dist/src/eventful.d.ts +20 -0
- package/dist/src/eventful.d.ts.map +1 -0
- package/dist/src/flavored.d.ts +33 -0
- package/dist/src/flavored.d.ts.map +1 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/indexable.d.ts.map +1 -0
- package/dist/{introspection.d.ts → src/introspection.d.ts} +1 -1
- package/dist/src/introspection.d.ts.map +1 -0
- package/dist/src/iterableWeak.d.ts.map +1 -0
- package/dist/src/mixins.d.ts.map +1 -0
- package/dist/src/promiseChain.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/array.d.ts +9 -10
- package/dist/src/reactive/array.d.ts.map +1 -0
- package/dist/src/reactive/buffer.d.ts +120 -0
- package/dist/src/reactive/buffer.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/change.d.ts +2 -2
- package/dist/src/reactive/change.d.ts.map +1 -0
- package/dist/src/reactive/deep-touch.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/deep-watch-state.d.ts +3 -3
- package/dist/src/reactive/deep-watch-state.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/deep-watch.d.ts +2 -1
- package/dist/src/reactive/deep-watch.d.ts.map +1 -0
- package/dist/src/reactive/describe.d.ts +12 -0
- package/dist/src/reactive/describe.d.ts.map +1 -0
- package/dist/src/reactive/effect-context.d.ts +34 -0
- package/dist/src/reactive/effect-context.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/effects.d.ts +31 -18
- package/dist/src/reactive/effects.d.ts.map +1 -0
- package/dist/src/reactive/index.d.ts +19 -0
- package/dist/src/reactive/index.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/map.d.ts +0 -2
- package/dist/src/reactive/map.d.ts.map +1 -0
- package/dist/src/reactive/memoize.d.ts +28 -0
- package/dist/src/reactive/memoize.d.ts.map +1 -0
- package/dist/src/reactive/non-reactive-state.d.ts.map +1 -0
- package/dist/src/reactive/non-reactive.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/project.d.ts +1 -2
- package/dist/src/reactive/project.d.ts.map +1 -0
- package/dist/src/reactive/proxy-state.d.ts.map +1 -0
- package/dist/src/reactive/proxy.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/record.d.ts +2 -3
- package/dist/src/reactive/record.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/register.d.ts +61 -0
- package/dist/src/reactive/register.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/registry.d.ts +6 -5
- package/dist/src/reactive/registry.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/set.d.ts +0 -2
- package/dist/src/reactive/set.d.ts.map +1 -0
- package/dist/src/reactive/tracking.d.ts.map +1 -0
- package/dist/{reactive → src/reactive}/types.d.ts +69 -21
- package/dist/src/reactive/types.d.ts.map +1 -0
- package/dist/{reactive/interface.d.ts → src/reactive/watch.d.ts} +7 -23
- package/dist/src/reactive/watch.d.ts.map +1 -0
- package/dist/{std-decorators.d.ts → src/std-decorators.d.ts} +1 -6
- package/dist/src/std-decorators.d.ts.map +1 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/{zone.d.ts → src/zone.d.ts} +2 -2
- package/dist/src/zone.d.ts.map +1 -0
- package/dist/types-DaHFfhlN.d.ts +414 -0
- package/docs/ai/api-reference.md +1 -1
- package/docs/ai/manual.md +443 -17
- package/docs/events.md +57 -2
- package/docs/flavored.md +210 -0
- package/docs/reactive/advanced.md +2 -3
- package/docs/reactive/attend.md +143 -0
- package/docs/reactive/collections.md +55 -0
- package/docs/reactive/core.md +120 -4
- package/docs/reactive/debugging.md +8 -10
- package/docs/reactive/describe.md +85 -0
- package/docs/reactive/error-handling.md +121 -0
- package/docs/reactive/project.md +1 -1
- package/docs/reactive/scan.md +215 -0
- package/docs/reactive.md +2 -0
- package/docs/std-decorators.md +102 -51
- package/docs/zone.md +3 -7
- package/package.json +6 -1
- package/src/async/browser.ts +110 -106
- package/src/async/index.ts +15 -11
- package/src/async/node.ts +5 -17
- package/src/eventful.ts +82 -49
- package/src/flavored.ts +106 -0
- package/src/index.d.ts +12 -12
- package/src/index.ts +2 -2
- package/src/introspection.ts +1 -1
- package/src/reactive/array.ts +29 -36
- package/src/reactive/buffer.ts +187 -27
- package/src/reactive/change.ts +16 -23
- package/src/reactive/deep-touch.ts +19 -14
- package/src/reactive/deep-watch-state.ts +3 -3
- package/src/reactive/deep-watch.ts +7 -4
- package/src/reactive/describe.ts +39 -0
- package/src/reactive/effect-context.ts +69 -4
- package/src/reactive/effects.ts +445 -393
- package/src/reactive/index.ts +12 -15
- package/src/reactive/map.ts +9 -25
- package/src/reactive/memoize.ts +26 -3
- package/src/reactive/project.md +107 -0
- package/src/reactive/project.ts +48 -71
- package/src/reactive/proxy.ts +21 -3
- package/src/reactive/record.ts +30 -45
- package/src/reactive/register.ts +138 -19
- package/src/reactive/registry.ts +22 -9
- package/src/reactive/set.ts +8 -21
- package/src/reactive/tracking.ts +9 -12
- package/src/reactive/types.ts +104 -24
- package/src/reactive/{interface.ts → watch.ts} +29 -59
- package/src/std-decorators.ts +56 -17
- package/src/utils.ts +2 -3
- package/src/zone.ts +28 -24
- package/dist/async/index.d.ts.map +0 -1
- package/dist/chunks/async-browser-CA0jPWIi.cjs.map +0 -1
- package/dist/chunks/async-core-UqHzvJ-S.cjs.map +0 -1
- package/dist/chunks/async-node-BYHuGTni.cjs.map +0 -1
- package/dist/chunks/index-DhaOVusv.esm.js +0 -6411
- package/dist/chunks/index-DhaOVusv.esm.js.map +0 -1
- package/dist/decorator.d.ts.map +0 -1
- package/dist/destroyable.d.ts.map +0 -1
- package/dist/entry-browser.d.ts.map +0 -1
- package/dist/entry-node.d.ts.map +0 -1
- package/dist/eventful.d.ts +0 -18
- package/dist/eventful.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/indexable.d.ts.map +0 -1
- package/dist/introspection.d.ts.map +0 -1
- package/dist/iterableWeak.d.ts.map +0 -1
- package/dist/mixins.d.ts.map +0 -1
- package/dist/promiseChain.d.ts.map +0 -1
- package/dist/reactive/array.d.ts.map +0 -1
- package/dist/reactive/buffer.d.ts +0 -44
- package/dist/reactive/buffer.d.ts.map +0 -1
- package/dist/reactive/change.d.ts.map +0 -1
- package/dist/reactive/debug.d.ts.map +0 -1
- package/dist/reactive/deep-touch.d.ts.map +0 -1
- package/dist/reactive/deep-watch-state.d.ts.map +0 -1
- package/dist/reactive/deep-watch.d.ts.map +0 -1
- package/dist/reactive/effect-context.d.ts +0 -7
- package/dist/reactive/effect-context.d.ts.map +0 -1
- package/dist/reactive/effects.d.ts.map +0 -1
- package/dist/reactive/index.d.ts +0 -20
- package/dist/reactive/index.d.ts.map +0 -1
- package/dist/reactive/interface.d.ts.map +0 -1
- package/dist/reactive/map.d.ts.map +0 -1
- package/dist/reactive/memoize.d.ts +0 -5
- package/dist/reactive/memoize.d.ts.map +0 -1
- package/dist/reactive/non-reactive-state.d.ts.map +0 -1
- package/dist/reactive/non-reactive.d.ts.map +0 -1
- package/dist/reactive/project.d.ts.map +0 -1
- package/dist/reactive/proxy-state.d.ts.map +0 -1
- package/dist/reactive/proxy.d.ts.map +0 -1
- package/dist/reactive/record.d.ts.map +0 -1
- package/dist/reactive/register.d.ts.map +0 -1
- package/dist/reactive/registry.d.ts.map +0 -1
- package/dist/reactive/set.d.ts.map +0 -1
- package/dist/reactive/tracking.d.ts.map +0 -1
- package/dist/reactive/types.d.ts.map +0 -1
- package/dist/std-decorators.d.ts.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/zone.d.ts.map +0 -1
- package/src/reactive/debug.ts +0 -517
- /package/dist/{async → src/async}/browser.d.ts +0 -0
- /package/dist/{async → src/async}/node.d.ts +0 -0
- /package/dist/{decorator.d.ts → src/decorator.d.ts} +0 -0
- /package/dist/{destroyable.d.ts → src/destroyable.d.ts} +0 -0
- /package/dist/{entry-browser.d.ts → src/entry-browser.d.ts} +0 -0
- /package/dist/{entry-node.d.ts → src/entry-node.d.ts} +0 -0
- /package/dist/{indexable.d.ts → src/indexable.d.ts} +0 -0
- /package/dist/{iterableWeak.d.ts → src/iterableWeak.d.ts} +0 -0
- /package/dist/{mixins.d.ts → src/mixins.d.ts} +0 -0
- /package/dist/{promiseChain.d.ts → src/promiseChain.d.ts} +0 -0
- /package/dist/{reactive → src/reactive}/deep-touch.d.ts +0 -0
- /package/dist/{reactive → src/reactive}/non-reactive-state.d.ts +0 -0
- /package/dist/{reactive → src/reactive}/non-reactive.d.ts +0 -0
- /package/dist/{reactive → src/reactive}/proxy-state.d.ts +0 -0
- /package/dist/{reactive → src/reactive}/proxy.d.ts +0 -0
- /package/dist/{reactive → src/reactive}/tracking.d.ts +0 -0
- /package/dist/{utils.d.ts → src/utils.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CtA2AWl3.esm.js","sources":["../../src/async/index.ts","../../src/utils.ts","../../src/decorator.ts","../../src/flavored.ts","../../src/iterableWeak.ts","../../src/mixins.ts","../../src/reactive/types.ts","../../src/reactive/registry.ts","../../src/zone.ts","../../src/reactive/effect-context.ts","../../debug/lineage.ts","../../src/reactive/deep-watch-state.ts","../../src/reactive/proxy-state.ts","../../src/reactive/change.ts","../../src/reactive/non-reactive-state.ts","../../src/reactive/deep-touch.ts","../../src/reactive/tracking.ts","../../src/reactive/proxy.ts","../../debug/lineage-panel.ts","../../debug/debug.ts","../../src/reactive/effects.ts"],"sourcesContent":["export type Restorer = () => () => void\nexport type Hook = () => Restorer\n\n// Queue for hooks registered before the environment is ready (circular dependency fix)\nexport const hooks = new Set<Hook>()\n\nexport const asyncHooks = {\n\taddHook(hook: Hook): () => void {\n\t\thooks.add(hook)\n\t\treturn () => hooks.delete(hook)\n\t},\n\t/**\n\t * [Hack] Sanitize a promise (or value) to prevent context leaks.\n\t * Default: Identity function.\n\t * Browser: Uses Macrotask wrapping to break microtask chains.\n\t */\n\tsanitizePromise(p: any): any {\n\t\treturn p\n\t},\n}\n\n/**\n * Register a hook that will be called whenever an asynchronous operation is initiated.\n * The hook should return a restorer function which will be called just before the async callback runs.\n * That restorer should in turn return an undoer function which will be called just after the async callback finishes.\n */\nexport const asyncHook = (hook: Hook) => asyncHooks.addHook(hook)\n","type ElementTypes<T extends readonly unknown[]> = {\n\t[K in keyof T]: T[K] extends readonly (infer U)[] ? U : T[K]\n}\n\n/**\n * Combines multiple arrays into an array of tuples, stopping at the shortest array length\n * @param args - Arrays to zip together\n * @returns Array of tuples containing elements from each input array\n */\nexport function zip<T extends (readonly unknown[])[]>(...args: T): ElementTypes<T>[] {\n\tif (!args.length) return []\n\tconst minLength = Math.min(...args.map((arr) => arr.length))\n\tconst result: ElementTypes<T>[] = []\n\n\tfor (let i = 0; i < minLength; i++) {\n\t\tconst tuple = args.map((arr) => arr[i]) as ElementTypes<T>\n\t\tresult.push(tuple)\n\t}\n\n\treturn result\n}\n\n/**\n * Checks if two arrays are strictly equal (shallow comparison)\n * @param a - First value\n * @param b - Second value\n * @returns True if arrays are equal or values are strictly equal\n */\nexport function arrayEquals(a: any, b: any): boolean {\n\tif (a === b) return true\n\tif (!Array.isArray(a) || !Array.isArray(b)) return false\n\tif (a.length !== b.length) return false\n\tfor (let i = 0; i < a.length; i++) {\n\t\tif (a[i] !== b[i]) return false\n\t}\n\treturn true\n}\n\nconst nativeConstructors = new Set<Function>([\n\tObject,\n\tArray,\n\tDate,\n\tFunction,\n\tSet,\n\tMap,\n\tWeakMap,\n\tWeakSet,\n\tPromise,\n\tError,\n\tTypeError,\n\tReferenceError,\n\tSyntaxError,\n\tRangeError,\n\tURIError,\n\tEvalError,\n\tReflect,\n\tProxy,\n\tRegExp,\n\tString,\n\tNumber,\n\tBoolean,\n] as Function[])\n/**\n * Checks if a function is a constructor (class or constructor function)\n * @param fn - The function to check\n * @returns True if the function is a constructor\n */\nexport function isConstructor(fn: Function): boolean {\n\treturn (\n\t\tfn &&\n\t\ttypeof fn === 'function' &&\n\t\t(nativeConstructors.has(fn) || fn.toString?.().startsWith('class '))\n\t)\n}\n\n/**\n * Renames a function with a new name\n * @param fct - The function to rename\n * @param name - The new name for the function\n * @returns The function with the new name\n */\nexport function renamed<F extends Function>(fct: F, name: string): F {\n\treturn Object.defineProperties(fct, {\n\t\tname: {\n\t\t\tvalue: name,\n\t\t},\n\t})\n}\nexport const FoolProof = {\n\tget(obj: any, prop: any, receiver: any) {\n\t\t// Check if Node is available and obj is an instance of Node\n\t\tif (typeof Node !== 'undefined' && obj instanceof Node) return (obj as any)[prop]\n\t\treturn Reflect.get(obj, prop, receiver)\n\t},\n\tset(obj: any, prop: any, value: any, receiver: any) {\n\t\t// Check if Node is available and obj is an instance of Node\n\t\tif (typeof Node !== 'undefined' && obj instanceof Node) {\n\t\t\t;(obj as any)[prop] = value\n\t\t\treturn true\n\t\t}\n\t\tif (!(obj instanceof Object) && !Reflect.has(obj, prop)) {\n\t\t\tObject.defineProperty(obj, prop, {\n\t\t\t\tvalue,\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tenumerable: true,\n\t\t\t})\n\t\t\treturn true\n\t\t}\n\t\treturn Reflect.set(obj, prop, value, receiver)\n\t},\n}\n\nexport function isOwnAccessor(obj: any, prop: any) {\n\tconst opd = Object.getOwnPropertyDescriptor(obj, prop)\n\treturn !!(opd?.get || opd?.set)\n}\n\n/**\n * Deeply compares two values.\n * For objects, compares prototypes with === and then own properties recursively.\n * Uses a cache to handle circular references.\n * @param a - First value\n * @param b - Second value\n * @param cache - Map for circular reference protection (internal use)\n * @returns True if values are deeply equal\n */\nexport function deepCompare(a: any, b: any, cache = new Map<object, Set<object>>()): boolean {\n\tif (a === b) return true\n\n\tif (typeof a !== 'object' || a === null || typeof b !== 'object' || b === null) {\n\t\treturn a === b\n\t}\n\n\t// Prototype check\n\tconst protoA = Object.getPrototypeOf(a)\n\tconst protoB = Object.getPrototypeOf(b)\n\tif (protoA !== protoB) {\n\t\tconsole.warn(`[deepCompare] prototype mismatch:`, {\n\t\t\tnameA: a?.constructor?.name,\n\t\t\tnameB: b?.constructor?.name,\n\t\t})\n\t\treturn false\n\t}\n\t// Circular reference protection\n\tlet compared = cache.get(a)\n\tif (compared?.has(b)) return true\n\tif (!compared) {\n\t\tcompared = new Set()\n\t\tcache.set(a, compared)\n\t}\n\tcompared.add(b)\n\n\t// Handle specific object types\n\tif (Array.isArray(a)) {\n\t\tif (!Array.isArray(b)) {\n\t\t\tconsole.warn(`[deepCompare] B is not an array`)\n\t\t\treturn false\n\t\t}\n\t\tif (a.length !== b.length) {\n\t\t\tconsole.warn(`[deepCompare] array length mismatch:`, { lenA: a.length, lenB: b.length })\n\t\t\treturn false\n\t\t}\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tif (!deepCompare(a[i], b[i], cache)) {\n\t\t\t\tconsole.warn(`[deepCompare] array element mismatch at index ${i}`)\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\n\tif (a instanceof Date) {\n\t\tconst match = b instanceof Date && a.getTime() === b.getTime()\n\t\tif (!match) console.warn(`[deepCompare] Date mismatch`)\n\t\treturn match\n\t}\n\tif (a instanceof RegExp) {\n\t\tconst match = b instanceof RegExp && a.toString() === b.toString()\n\t\tif (!match) console.warn(`[deepCompare] RegExp mismatch`)\n\t\treturn match\n\t}\n\tif (a instanceof Set) {\n\t\tif (!(b instanceof Set) || a.size !== b.size) {\n\t\t\tconsole.warn(`[deepCompare] Set size mismatch`)\n\t\t\treturn false\n\t\t}\n\t\tfor (const val of a) {\n\t\t\tlet found = false\n\t\t\tfor (const bVal of b) {\n\t\t\t\tif (deepCompare(val, bVal, cache)) {\n\t\t\t\t\tfound = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tconsole.warn(`[deepCompare] missing Set element`)\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\tif (a instanceof Map) {\n\t\tif (!(b instanceof Map) || a.size !== b.size) {\n\t\t\tconsole.warn(`[deepCompare] Map size mismatch`)\n\t\t\treturn false\n\t\t}\n\t\tfor (const [key, val] of a) {\n\t\t\tif (!b.has(key)) {\n\t\t\t\tlet foundMatch = false\n\t\t\t\tfor (const [bKey, bVal] of b) {\n\t\t\t\t\tif (deepCompare(key, bKey, cache) && deepCompare(val, bVal, cache)) {\n\t\t\t\t\t\tfoundMatch = true\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!foundMatch) {\n\t\t\t\t\tconsole.warn(`[deepCompare] missing Map key`)\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!deepCompare(val, b.get(key), cache)) {\n\t\t\t\t\tconsole.warn(`[deepCompare] Map value mismatch for key`)\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\n\t// Compare own properties\n\tconst keysA = Object.keys(a)\n\tconst keysB = Object.keys(b)\n\tif (keysA.length !== keysB.length) {\n\t\tconsole.warn(`[deepCompare] keys length mismatch:`, {\n\t\t\tlenA: keysA.length,\n\t\t\tlenB: keysB.length,\n\t\t\tkeysA,\n\t\t\tkeysB,\n\t\t\ta,\n\t\t\tb,\n\t\t})\n\t\treturn false\n\t}\n\n\tfor (const key of keysA) {\n\t\tif (!Object.hasOwn(b, key)) {\n\t\t\tconsole.warn(`[deepCompare] missing key ${String(key)} in B`)\n\t\t\treturn false\n\t\t}\n\t\tif (!deepCompare(a[key], b[key], cache)) {\n\t\t\tconsole.warn(`[deepCompare] value mismatch for key ${String(key)}:`, {\n\t\t\t\tvalA: a[key],\n\t\t\t\tvalB: b[key],\n\t\t\t})\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\nconst contentRefs = new WeakMap<object, any>()\nexport function contentRef(container: object) {\n\tif (!contentRefs.has(container))\n\t\tcontentRefs.set(\n\t\t\tcontainer,\n\t\t\tObject.seal(\n\t\t\t\tObject.create(null, {\n\t\t\t\t\tcontentOf: { value: container, writable: false, configurable: false },\n\t\t\t\t})\n\t\t\t)\n\t\t)\n\treturn contentRefs.get(container)\n}\n\nexport function tag<T extends object>(name: string, obj: T): T {\n\tObject.defineProperties(obj, {\n\t\t[Symbol.toStringTag]: {\n\t\t\tvalue: name,\n\t\t\twritable: false,\n\t\t\tconfigurable: false,\n\t\t},\n\t\ttoString: {\n\t\t\tvalue: () => name,\n\t\t\twritable: false,\n\t\t\tconfigurable: false,\n\t\t},\n\t})\n\treturn obj\n}\n\nexport function named<T extends Function>(name: string, fn: T): T {\n\tObject.defineProperty(fn, 'name', {\n\t\tvalue: fn.name ? `${fn.name}::${name}` : name,\n\t\twritable: false,\n\t\tconfigurable: true,\n\t})\n\treturn fn\n}\n","// biome-ignore-all lint/suspicious/noConfusingVoidType: We *love* voids\n// Standardized decorator system that works with both Legacy and Modern decorators\n\nimport { isConstructor } from './utils'\n\n/**\n * Error thrown when decorator operations fail\n */\nexport class DecoratorError extends Error {\n\tconstructor(message: string) {\n\t\tsuper(message)\n\t\tthis.name = 'DecoratorException'\n\t}\n}\n//#region all decorator types\n\n// Used for get/set and method decorators\n/**\n * Legacy property decorator type for methods, getters, and setters\n */\nexport type LegacyPropertyDecorator<T> = (\n\ttarget: T,\n\tname: string | symbol,\n\tdescriptor: PropertyDescriptor\n) => any\n\n/**\n * Legacy class decorator type\n */\nexport type LegacyClassDecorator<T> = (target: T) => any\n\n/**\n * Modern method decorator type\n */\nexport type ModernMethodDecorator<T> = (target: T, context: ClassMethodDecoratorContext) => any\n\n/**\n * Modern getter decorator type\n */\nexport type ModernGetterDecorator<T> = (target: T, context: ClassGetterDecoratorContext) => any\n\n/**\n * Modern setter decorator type\n */\nexport type ModernSetterDecorator<T> = (target: T, context: ClassSetterDecoratorContext) => any\n\n/**\n * Modern accessor decorator type\n */\nexport type ModernAccessorDecorator<T> = (target: T, context: ClassAccessorDecoratorContext) => any\n\n/**\n * Modern class decorator type\n */\nexport type ModernClassDecorator<T> = (target: T, context: ClassDecoratorContext) => any\n\n//#endregion\n\ntype DDMethod<T> = (\n\toriginal: (this: T, ...args: any[]) => any,\n\ttarget: any,\n\tname: PropertyKey\n) => ((this: T, ...args: any[]) => any) | void\n\ntype DDGetter<T> = (\n\toriginal: (this: T) => any,\n\ttarget: any,\n\tname: PropertyKey\n) => ((this: T) => any) | void\n\ntype DDSetter<T> = (\n\toriginal: (this: T, value: any) => void,\n\ttarget: any,\n\tname: PropertyKey\n) => ((this: T, value: any) => void) | void\n\ntype DDClass<T> = <Ctor extends new (...args: any[]) => T = new (...args: any[]) => T>(\n\ttarget: Ctor\n) => Ctor | void\n/**\n * Description object for creating decorators that work with both Legacy and Modern decorator proposals\n */\nexport interface DecoratorDescription<T> {\n\t/** Handler for method decorators */\n\tmethod?: DDMethod<T>\n\t/** Handler for class decorators */\n\tclass?: DDClass<T>\n\t/** Handler for getter decorators */\n\tgetter?: DDGetter<T>\n\t/** Handler for setter decorators */\n\tsetter?: DDSetter<T>\n\t/** Default handler for any decorator type not explicitly defined */\n\tdefault?: (...args: any[]) => any\n}\n\n/**\n * Type for decorators that work with both Legacy and Modern decorator proposals\n * Automatically infers the correct decorator type based on the description\n */\nexport type Decorator<T, Description extends DecoratorDescription<T>> = (Description extends {\n\tmethod: DDMethod<T>\n}\n\t? LegacyPropertyDecorator<T> & ModernMethodDecorator<T>\n\t: unknown) &\n\t(Description extends { class: DDClass<new (...args: any[]) => T> }\n\t\t? LegacyClassDecorator<new (...args: any[]) => T> &\n\t\t\t\tModernClassDecorator<new (...args: any[]) => T>\n\t\t: unknown) &\n\t(Description extends { getter: DDGetter<T> }\n\t\t? LegacyPropertyDecorator<T> & ModernGetterDecorator<T> & ModernAccessorDecorator<T>\n\t\t: unknown) &\n\t(Description extends { setter: DDSetter<T> }\n\t\t? LegacyPropertyDecorator<T> & ModernSetterDecorator<T> & ModernAccessorDecorator<T>\n\t\t: unknown) &\n\t(Description extends { default: infer Signature } ? Signature : unknown)\n\n/**\n * Factory type for creating decorators that work with both Legacy and Modern decorator proposals\n */\nexport type DecoratorFactory<T> = <Description extends DecoratorDescription<T>>(\n\tdescription: Description\n) => (Description extends { method: DDMethod<T> }\n\t? LegacyPropertyDecorator<T> & ModernMethodDecorator<T>\n\t: unknown) &\n\t(Description extends { class: DDClass<new (...args: any[]) => T> }\n\t\t? LegacyClassDecorator<new (...args: any[]) => T> &\n\t\t\t\tModernClassDecorator<new (...args: any[]) => T>\n\t\t: unknown) &\n\t(Description extends { getter: DDGetter<T> }\n\t\t? LegacyPropertyDecorator<T> & ModernGetterDecorator<T> & ModernAccessorDecorator<T>\n\t\t: unknown) &\n\t(Description extends { setter: DDSetter<T> }\n\t\t? LegacyPropertyDecorator<T> & ModernSetterDecorator<T> & ModernAccessorDecorator<T>\n\t\t: unknown) &\n\t(Description extends { default: infer Signature } ? Signature : unknown)\n\n/**\n * Creates a decorator that works with Legacy decorator proposals\n * @param description - The decorator description object\n * @returns A decorator function compatible with Legacy decorators\n */\nexport function legacyDecorator<T = any>(description: DecoratorDescription<T>): any {\n\treturn function (\n\t\tthis: any,\n\t\ttarget: any,\n\t\tpropertyKey?: PropertyKey,\n\t\tdescriptor?: PropertyDescriptor,\n\t\t...args: any[]\n\t) {\n\t\tif (propertyKey === undefined) {\n\t\t\tif (isConstructor(target)) {\n\t\t\t\tif (!('class' in description)) throw new Error('Decorator cannot be applied to a class')\n\t\t\t\treturn description.class!(target)\n\t\t\t}\n\t\t} else if (typeof target === 'object' && ['string', 'symbol'].includes(typeof propertyKey)) {\n\t\t\tif (!descriptor) throw new Error('Decorator cannot be applied to a field')\n\t\t\telse if (typeof descriptor === 'object' && 'configurable' in descriptor) {\n\t\t\t\tif ('get' in descriptor || 'set' in descriptor) {\n\t\t\t\t\tif (!('getter' in description || 'setter' in description))\n\t\t\t\t\t\tthrow new Error('Decorator cannot be applied to a getter or setter')\n\t\t\t\t\tif ('getter' in description) {\n\t\t\t\t\t\tconst newGetter = description.getter!(descriptor.get as any, target, propertyKey)\n\t\t\t\t\t\tif (newGetter) descriptor.get = newGetter\n\t\t\t\t\t}\n\t\t\t\t\tif ('setter' in description) {\n\t\t\t\t\t\tconst newSetter = description.setter!(descriptor.set as any, target, propertyKey)\n\t\t\t\t\t\tif (newSetter) descriptor.set = newSetter\n\t\t\t\t\t}\n\t\t\t\t\treturn descriptor\n\t\t\t\t} else if (typeof descriptor.value === 'function') {\n\t\t\t\t\tif (!('method' in description)) throw new Error('Decorator cannot be applied to a method')\n\t\t\t\t\tconst newMethod = description.method!(descriptor.value, target, propertyKey)\n\t\t\t\t\tif (newMethod) descriptor.value = newMethod\n\t\t\t\t\treturn descriptor\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!('default' in description))\n\t\t\tthrow new Error('Decorator do not have a default implementation')\n\t\treturn description.default!.call(this, target, propertyKey, descriptor, ...args)\n\t}\n}\n\n/**\n * Creates a decorator that works with Modern decorator proposals\n * @param description - The decorator description object\n * @returns A decorator function compatible with Modern decorators\n */\nexport function modernDecorator<T = any>(description: DecoratorDescription<T>): any {\n\t/*return function (target: any, context?: DecoratorContext, ...args: any[]) {*/\n\treturn function (this: any, target: any, context?: DecoratorContext, ...args: any[]) {\n\t\tif (!context?.kind || typeof context.kind !== 'string') {\n\t\t\tif (!('default' in description))\n\t\t\t\tthrow new Error('Decorator do not have a default implementation')\n\t\t\treturn description.default!.call(this, target, context, ...args)\n\t\t}\n\t\tswitch (context.kind) {\n\t\t\tcase 'class':\n\t\t\t\tif (!('class' in description)) throw new Error('Decorator cannot be applied to a class')\n\t\t\t\treturn description.class!(target)\n\t\t\tcase 'field':\n\t\t\t\tthrow new Error('Decorator cannot be applied to a field')\n\t\t\tcase 'getter':\n\t\t\t\tif (!('getter' in description)) throw new Error('Decorator cannot be applied to a getter')\n\t\t\t\treturn description.getter!(target, target, context.name)\n\t\t\tcase 'setter':\n\t\t\t\tif (!('setter' in description)) throw new Error('Decorator cannot be applied to a setter')\n\t\t\t\treturn description.setter!(target, target, context.name)\n\t\t\tcase 'method':\n\t\t\t\tif (!('method' in description)) throw new Error('Decorator cannot be applied to a method')\n\t\t\t\treturn description.method!(target, target, context.name)\n\t\t\tcase 'accessor': {\n\t\t\t\tif (!('getter' in description || 'setter' in description))\n\t\t\t\t\tthrow new Error('Decorator cannot be applied to a getter or setter')\n\t\t\t\tconst rv: Partial<ClassAccessorDecoratorResult<any, any>> = {}\n\t\t\t\tif ('getter' in description) {\n\t\t\t\t\tconst newGetter = description.getter!(target.get, target, context.name)\n\t\t\t\t\tif (newGetter) rv.get = newGetter\n\t\t\t\t}\n\t\t\t\tif ('setter' in description) {\n\t\t\t\t\tconst newSetter = description.setter!(target.set, target, context.name)\n\t\t\t\t\tif (newSetter) rv.set = newSetter\n\t\t\t\t}\n\t\t\t\treturn rv\n\t\t\t}\n\t\t\t//return description.accessor?.(target, context.name, target)\n\t\t}\n\t}\n}\n\n/**\n * Detects if the decorator is being called in modern (Modern) or legacy (Legacy) mode\n * based on the arguments passed to the decorator function\n */\nfunction detectDecoratorMode(\n\t_target: any,\n\tcontextOrKey?: any,\n\t_descriptor?: any\n): 'modern' | 'legacy' {\n\t// Modern decorators have a context object as the second parameter\n\t// Legacy decorators have a string/symbol key as the second parameter\n\tif (\n\t\ttypeof contextOrKey === 'object' &&\n\t\tcontextOrKey !== null &&\n\t\ttypeof contextOrKey.kind === 'string'\n\t) {\n\t\treturn 'modern'\n\t}\n\treturn 'legacy'\n}\n\n/**\n * Main decorator factory that automatically detects and works with both Legacy and Modern decorator proposals\n * @param description - The decorator description object\n * @returns A decorator that works in both Legacy and Modern environments\n */\nexport const decorator: DecoratorFactory<any> = (description: DecoratorDescription<any>) => {\n\tconst modern = modernDecorator(description)\n\tconst legacy = legacyDecorator(description)\n\treturn ((target: any, contextOrKey?: any, ...args: any[]) => {\n\t\tconst mode = detectDecoratorMode(target, contextOrKey, args[0])\n\t\treturn mode === 'modern'\n\t\t\t? modern(target, contextOrKey, ...args)\n\t\t\t: legacy(target, contextOrKey, ...args)\n\t}) as any\n}\n\n/**\n * Generic class decorator type that works with both Legacy and Modern decorator proposals\n */\nexport type GenericClassDecorator<T> = LegacyClassDecorator<abstract new (...args: any[]) => T> &\n\tModernClassDecorator<abstract new (...args: any[]) => T>\n","/**\n * Creates a flavored (extensible) version of a function with chainable property modifiers.\n *\n * Each property defined in `flavors` returns a new flavored function that transforms\n * how the original function is called. This enables a fluent API where properties\n * create specialized variants of the base function.\n *\n * @param fn - The base function to flavor\n * @param flavors - Object defining the flavor properties (getters or methods)\n * @returns A proxy of the function with the flavor properties attached\n *\n * @example\n * ```typescript\n * function greet(name: string, options?: { loud?: boolean }) {\n * const greeting = `Hello, ${name}!`\n * return options?.loud ? greeting.toUpperCase() : greeting\n * }\n *\n * const flavoredGreet = flavored(greet, {\n * get loud() {\n * return createFlavor(this, (name, opts) => [name, { ...opts, loud: true }])\n * }\n * })\n *\n * flavoredGreet('World') // \"Hello, World!\"\n * flavoredGreet.loud('World') // \"HELLO, WORLD!\"\n * ```\n */\nimport { named } from './utils'\n\n/**\n * Creates a flavored (extensible) version of a function with chainable property modifiers.\n */\nexport function flavored<T extends (...args: any[]) => any, F extends Record<string, any>>(\n\tfn: T,\n\tflavors: F\n): T & F {\n\t// Store flavors for recursive flavoring\n\t;(fn as any).flavors = flavors\n\n\treturn new Proxy(fn, {\n\t\tget(target, prop, receiver) {\n\t\t\tif (prop in flavors) {\n\t\t\t\treturn Reflect.get(flavors, prop, receiver)\n\t\t\t}\n\t\t\treturn (target as any)[prop]\n\t\t},\n\t}) as T & F\n}\n\n/**\n * Creates a new flavored function that transforms arguments before calling the base.\n *\n * @param fn - The base flavored function\n * @param transform - Function that receives the original arguments and returns transformed arguments\n * @returns A new flavored function with the transformation applied\n *\n * @example\n * ```typescript\n * const loudGreet = createFlavor(greet, (name, opts) => [name, { ...opts, loud: true }])\n * ```\n */\nexport function createFlavor<T extends (...args: any[]) => any>(\n\tfn: T,\n\ttransform: (...args: Parameters<T>) => Parameters<T>,\n\tname?: string\n): T {\n\tconst fct = function flavorWrapper(this: any, ...args: Parameters<T>) {\n\t\treturn fn.apply(this, transform(...args))\n\t}\n\tif (name) named(name, fct)\n\n\treturn flavored(fct as any as T, (fn as any).flavors || {})\n}\n\n/**\n * Creates a new flavored function that merges options objects.\n * Useful when the last argument is an options object that should be merged.\n *\n * @param fn - The base flavored function\n * @param defaultOptions - Options to merge with the provided options\n * @returns A new flavored function with merged options\n *\n * @example\n * ```typescript\n * const opaqueEffect = flavorOptions(effect, { opaque: true })\n * const namedEffect = flavorOptions(effect, { name: 'myEffect' })\n * ```\n */\nexport function flavorOptions<T extends (...args: any[]) => any>(\n\tfn: T,\n\tdefaultOptions: Record<string, any>,\n\tname?: string\n): T {\n\tconst fct = function flavorOptionsWrapper(this: any, ...args: any[]) {\n\t\tconst lastArg = args[args.length - 1]\n\t\tconst mergedArgs =\n\t\t\tlastArg !== undefined && typeof lastArg === 'object'\n\t\t\t\t? [...args.slice(0, -1), { ...defaultOptions, ...lastArg }]\n\t\t\t\t: [...args, defaultOptions]\n\t\treturn fn.apply(this, mergedArgs)\n\t}\n\tif (name) named(name, fct)\n\n\treturn flavored(fct as any as T, (fn as any).flavors || {})\n}\n","/// <reference lib=\"esnext.collection\" />\n\n/**\n * Uses weak references but still may iterate through them\n * Note: The behavior is highly dependant on the garbage collector - some entries are perhaps deemed to be collected: don't resuscitate them\n */\nexport class IterableWeakMap<K extends WeakKey, V> implements Map<K, V> {\n\tprivate uuids = new WeakMap<K, string>()\n\tprivate refs: Record<string, [WeakRef<K>, any]> = {}\n\tprivate readonly registry: FinalizationRegistry<string>\n\n\tconstructor(entries?: Iterable<[K, V]>) {\n\t\t// Create a FinalizationRegistry to clean up refs when keys are garbage collected\n\t\tthis.registry = new FinalizationRegistry((uuid: string) => {\n\t\t\tdelete this.refs[uuid]\n\t\t})\n\t\tif (entries) for (const [k, v] of entries) this.set(k, v)\n\t}\n\tprivate createIterator<I>(cb: (key: K, value: V) => I): MapIterator<I> {\n\t\tconst { refs } = this\n\t\treturn (function* () {\n\t\t\tfor (const uuid of Object.keys(refs)) {\n\t\t\t\tconst [keyRef, value] = refs[uuid]\n\t\t\t\tconst key = keyRef.deref()\n\t\t\t\tif (key) yield cb(key, value)\n\t\t\t\telse delete refs[uuid]\n\t\t\t}\n\t\t\treturn undefined\n\t\t})()\n\t}\n\tclear(): void {\n\t\t// Unregister all keys from the FinalizationRegistry\n\t\tfor (const uuid of Object.keys(this.refs)) {\n\t\t\tconst key = this.refs[uuid][0].deref()\n\t\t\tif (key) this.registry.unregister(key)\n\t\t}\n\t\tthis.uuids = new WeakMap<K, string>()\n\t\tthis.refs = {}\n\t}\n\tdelete(key: K): boolean {\n\t\tconst uuid = this.uuids.get(key)\n\t\tif (!uuid) return false\n\t\tdelete this.refs[uuid]\n\t\tthis.uuids.delete(key)\n\t\tthis.registry.unregister(key)\n\t\treturn true\n\t}\n\tforEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void {\n\t\tfor (const [k, v] of this) callbackfn.call(thisArg ?? this, v, k, thisArg ?? this)\n\t}\n\tget(key: K): V | undefined {\n\t\tconst uuid = this.uuids.get(key)\n\t\tif (!uuid) return undefined\n\t\treturn this.refs[uuid][1]\n\t}\n\thas(key: K): boolean {\n\t\treturn this.uuids.has(key)\n\t}\n\tset(key: K, value: V): this {\n\t\tlet uuid = this.uuids.get(key)\n\t\tif (uuid) {\n\t\t\tthis.refs[uuid][1] = value\n\t\t} else {\n\t\t\tuuid = crypto.randomUUID()\n\t\t\tthis.uuids.set(key, uuid)\n\t\t\tthis.refs[uuid] = [new WeakRef(key), value]\n\t\t\t// Register key for cleanup when garbage collected\n\t\t\tthis.registry.register(key, uuid, key)\n\t\t}\n\t\treturn this\n\t}\n\tget size(): number {\n\t\treturn [...this].length\n\t}\n\tentries(): MapIterator<[K, V]> {\n\t\treturn this.createIterator((key, value) => [key, value] as [K, V])\n\t}\n\tkeys(): MapIterator<K> {\n\t\treturn this.createIterator((key, _value) => key)\n\t}\n\tvalues(): MapIterator<V> {\n\t\treturn this.createIterator((_key, value) => value)\n\t}\n\t[Symbol.iterator](): MapIterator<[K, V]> {\n\t\treturn this.entries()\n\t}\n\treadonly [Symbol.toStringTag]: string = 'IterableWeakMap'\n}\n\n/**\n * Uses weak references but still may iterate through them\n * Note: The behavior is highly dependant on the garbage collector - some entries are perhaps deemed to be collected: don't resuscitate them\n */\nexport class IterableWeakSet<K extends WeakKey> implements Set<K> {\n\tprivate uuids = new WeakMap<K, string>()\n\tprivate refs: Record<string, WeakRef<K>> = {}\n\tprivate readonly registry: FinalizationRegistry<string>\n\n\tconstructor(entries?: Iterable<K>) {\n\t\t// Create a FinalizationRegistry to clean up refs when values are garbage collected\n\t\tthis.registry = new FinalizationRegistry((uuid: string) => {\n\t\t\tdelete this.refs[uuid]\n\t\t})\n\t\tif (entries) for (const k of entries) this.add(k)\n\t}\n\tprivate createIterator<I>(cb: (key: K) => I): MapIterator<I> {\n\t\tconst { refs } = this\n\t\treturn (function* () {\n\t\t\tfor (const uuid of Object.keys(refs)) {\n\t\t\t\tconst key = refs[uuid].deref()\n\t\t\t\tif (key) yield cb(key)\n\t\t\t\telse delete refs[uuid]\n\t\t\t}\n\t\t\treturn undefined\n\t\t})()\n\t}\n\n\tclear(): void {\n\t\t// Unregister all values from the FinalizationRegistry\n\t\tfor (const uuid of Object.keys(this.refs)) {\n\t\t\tconst value = this.refs[uuid].deref()\n\t\t\tif (value) this.registry.unregister(value)\n\t\t}\n\t\tthis.uuids = new WeakMap<K, string>()\n\t\tthis.refs = {}\n\t}\n\n\tadd(value: K): this {\n\t\tlet uuid = this.uuids.get(value)\n\t\tif (!uuid) {\n\t\t\tuuid = crypto.randomUUID()\n\t\t\tthis.uuids.set(value, uuid)\n\t\t\tthis.refs[uuid] = new WeakRef(value)\n\t\t\t// Register value for cleanup when garbage collected\n\t\t\tthis.registry.register(value, uuid, value)\n\t\t}\n\t\treturn this\n\t}\n\tdelete(value: K): boolean {\n\t\tconst uuid = this.uuids.get(value)\n\t\tif (!uuid) return false\n\t\tdelete this.refs[uuid]\n\t\tthis.uuids.delete(value)\n\t\tthis.registry.unregister(value)\n\t\treturn true\n\t}\n\n\tforEach(callbackfn: (value: K, value2: K, set: Set<K>) => void, thisArg?: any): void {\n\t\tfor (const value of this) callbackfn.call(thisArg ?? this, value, value, thisArg ?? this)\n\t}\n\n\thas(value: K): boolean {\n\t\treturn this.uuids.has(value)\n\t}\n\tget size(): number {\n\t\treturn [...this].length\n\t}\n\tentries(): SetIterator<[K, K]> {\n\t\treturn this.createIterator((key) => [key, key] as [K, K])\n\t}\n\tkeys(): SetIterator<K> {\n\t\treturn this.createIterator((key) => key)\n\t}\n\tvalues(): SetIterator<K> {\n\t\treturn this.createIterator((key) => key)\n\t}\n\t[Symbol.iterator](): SetIterator<K> {\n\t\treturn this.keys()\n\t}\n\treadonly [Symbol.toStringTag]: string = 'IterableWeakSet'\n\n\tunion<U>(other: ReadonlySetLike<U>): Set<K | U> {\n\t\tconst others = {\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn other.keys()\n\t\t\t},\n\t\t}\n\t\tconst that = this\n\t\treturn new Set(\n\t\t\t(function* () {\n\t\t\t\tyield* that\n\t\t\t\tfor (const value of others) if (!that.has(<K>(<unknown>value))) yield value\n\t\t\t})()\n\t\t)\n\t}\n\tintersection<U /**/>(other: ReadonlySetLike<U>): Set<K & U> {\n\t\tconst that = this\n\t\treturn new Set(\n\t\t\t(function* () {\n\t\t\t\tfor (const value of that) if (other.has(<U>(<unknown>value))) yield <K & U>value\n\t\t\t})()\n\t\t)\n\t}\n\tdifference<U>(other: ReadonlySetLike<U>): Set<K> {\n\t\tconst that = this\n\t\treturn new Set(\n\t\t\t(function* () {\n\t\t\t\tfor (const value of that) if (!other.has(<U>(<unknown>value))) yield <K>value\n\t\t\t})()\n\t\t)\n\t}\n\tsymmetricDifference<U>(other: ReadonlySetLike<U>): Set<K | U> {\n\t\tconst others = {\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn other.keys()\n\t\t\t},\n\t\t}\n\t\tconst that = this\n\t\treturn new Set(\n\t\t\t(function* () {\n\t\t\t\tfor (const value of that) if (!other.has(<U>(<unknown>value))) yield <K | U>value\n\t\t\t\tfor (const value of others) if (!that.has(<K>(<unknown>value))) yield <K | U>value\n\t\t\t})()\n\t\t)\n\t}\n\tisSubsetOf(other: ReadonlySetLike<unknown>): boolean {\n\t\tfor (const value of this) if (!other.has(value)) return false\n\t\treturn true\n\t}\n\tisSupersetOf(other: ReadonlySetLike<unknown>): boolean {\n\t\tconst others = {\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn other.keys()\n\t\t\t},\n\t\t}\n\t\tfor (const value of others) if (!this.has(<K>value)) return false\n\t\treturn true\n\t}\n\tisDisjointFrom(other: ReadonlySetLike<unknown>): boolean {\n\t\tfor (const value of this) if (other.has(value)) return false\n\t\treturn true\n\t}\n}\n","import { FoolProof, isConstructor } from './utils'\n\n/**\n * A mixin function that takes a base class and returns a new class with mixed-in functionality\n * @template Mixed - The functionality to be mixed in\n */\nexport type MixinFunction<Mixed> = <Base>(\n\tbase: new (...args: any[]) => Base\n) => new (\n\t...args: any[]\n) => Base & Mixed\n\n/**\n * A mixin class that can be used both as a base class and as a mixin function\n * @template Mixed - The functionality to be mixed in\n */\nexport type MixinClass<Mixed> = new (...args: any[]) => Mixed\n\n/**\n * Creates a mixin that can be used both as a class (extends) and as a function (mixin)\n *\n * This function supports:\n * - Using mixins as base classes: `class MyClass extends MyMixin`\n * - Using mixins as functions: `class MyClass extends MyMixin(SomeBase)`\n * - Composing mixins: `const Composed = MixinA(MixinB)`\n * - Type-safe property inference for all patterns\n *\n * @param mixinFunction - The function that creates the mixin\n * @param unwrapFunction - Optional function to unwrap reactive objects for method calls\n * @returns A mixin that can be used both as a class and as a function\n */\nexport function mixin<MixinFn extends (base: any) => new (...args: any[]) => any>(\n\tmixinFunction: MixinFn,\n\tunwrapFunction?: (obj: any) => any\n): (new (\n\t...args: any[]\n) => InstanceType<ReturnType<MixinFn>>) &\n\t(<Base>(\n\t\tbase: abstract new (...args: any[]) => Base\n\t) => new (\n\t\t...args: any[]\n\t) => InstanceType<ReturnType<MixinFn>> & Base) {\n\t/**\n\t * Cache for mixin results to ensure the same base class always returns the same mixed class\n\t */\n\tconst mixinCache = new WeakMap<new (...args: any[]) => any, new (...args: any[]) => any>()\n\n\t// Apply the mixin to Object as the base class\n\tconst MixedBase = mixinFunction(Object)\n\tmixinCache.set(Object, MixedBase)\n\n\t// Create the proxy that handles both constructor and function calls\n\treturn new Proxy(MixedBase, {\n\t\t// Handle `MixinClass(SomeBase)` - use as mixin function\n\t\tapply(_target, _thisArg, args) {\n\t\t\tif (args.length === 0) {\n\t\t\t\tthrow new Error('Mixin requires a base class')\n\t\t\t}\n\n\t\t\tconst baseClass = args[0]\n\t\t\tif (typeof baseClass !== 'function') {\n\t\t\t\tthrow new Error('Mixin requires a constructor function')\n\t\t\t}\n\n\t\t\t// Check if it's a valid constructor or a mixin\n\t\t\tif (\n\t\t\t\t!isConstructor(baseClass) &&\n\t\t\t\t!(baseClass && typeof baseClass === 'function' && baseClass.prototype)\n\t\t\t) {\n\t\t\t\tthrow new Error('Mixin requires a valid constructor')\n\t\t\t}\n\n\t\t\t// Check cache first\n\t\t\tconst cached = mixinCache.get(baseClass)\n\t\t\tif (cached) {\n\t\t\t\treturn cached\n\t\t\t}\n\n\t\t\tlet usedBase = baseClass\n\t\t\tif (unwrapFunction) {\n\t\t\t\t// Create a proxied base class that handles method unwrapping\n\t\t\t\tconst ProxiedBaseClass = class extends baseClass {}\n\n\t\t\t\t// Proxy the prototype methods to handle unwrapping\n\t\t\t\tconst originalPrototype = baseClass.prototype\n\t\t\t\tconst proxiedPrototype = new Proxy(originalPrototype, {\n\t\t\t\t\tget(target, prop, receiver) {\n\t\t\t\t\t\tconst value = FoolProof.get(target, prop, receiver)\n\n\t\t\t\t\t\t// Only wrap methods that are likely to access private fields\n\t\t\t\t\t\t// Skip symbols and special properties that the reactive system needs\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof value === 'function' &&\n\t\t\t\t\t\t\ttypeof prop === 'string' &&\n\t\t\t\t\t\t\t!['constructor', 'toString', 'valueOf'].includes(prop)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Return a wrapped version that uses unwrapped context\n\t\t\t\t\t\t\treturn function (this: any, ...args: any[]) {\n\t\t\t\t\t\t\t\t// Use the unwrapping function if provided, otherwise use this\n\t\t\t\t\t\t\t\tconst context = unwrapFunction(this as any)\n\t\t\t\t\t\t\t\treturn value.apply(context, args)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn value\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\t// Set the proxied prototype\n\t\t\t\tObject.setPrototypeOf(ProxiedBaseClass.prototype, proxiedPrototype)\n\t\t\t\tusedBase = ProxiedBaseClass\n\t\t\t}\n\n\t\t\t// Create the mixed class using the proxied base class\n\t\t\tconst mixedClass = mixinFunction(usedBase)\n\n\t\t\t// Cache the result\n\t\t\tmixinCache.set(baseClass, mixedClass)\n\n\t\t\treturn mixedClass\n\t\t},\n\t}) as MixinFn & (new (...args: any[]) => InstanceType<ReturnType<MixinFn>>)\n}\n","// biome-ignore-all lint/suspicious/noConfusingVoidType: Type 'void' is not assignable to type 'ScopedCallback | undefined'.\n// Argument of type '() => void' is not assignable to parameter of type '(dep: DependencyFunction) => ScopedCallback | undefined'.\n\nimport type { FunctionWrapper } from '../zone'\n\nexport type EffectAccessEvents = {\n\ttriggered(event: string, ...args: any[]): void\n}\n\n/**\n * Effect access passed to user callbacks within effects/watch\n * Provides functions to track dependencies and information about the effect execution\n */\nexport interface EffectAccess {\n\t/**\n\t * Tracks dependencies in the current effect context\n\t * Use this for normal dependency tracking within the effect\n\t * @example\n\t * ```typescript\n\t * effect(({ tracked }) => {\n\t * // In async context, use tracked to restore dependency tracking\n\t * await someAsyncOperation()\n\t * const value = tracked(() => state.count) // Tracks state.count in this effect\n\t * })\n\t * ```\n\t */\n\ttracked: FunctionWrapper\n\t/**\n\t * Tracks dependencies in the parent effect context\n\t * Use this when child effects should track dependencies in the parent,\n\t * allowing parent cleanup to manage child effects while dependencies trigger the parent\n\t * @example\n\t * ```typescript\n\t * effect(({ ascend }) => {\n\t * const length = inputs.length\n\t * if (length > 0) {\n\t * ascend(() => {\n\t * // Dependencies here are tracked in the parent effect\n\t * inputs.forEach(item => console.log(item))\n\t * })\n\t * }\n\t * })\n\t * ```\n\t */\n\tascend: FunctionWrapper\n\t/**\n\t * Indicates whether the effect is running as a reaction (i.e. not the first call)\n\t * - `false`: First execution when the effect is created\n\t * - `true`: Subsequent executions triggered by dependency changes\n\t * @example\n\t * ```typescript\n\t * effect(({ reaction }) => {\n\t * if (!reaction) {\n\t * console.log('Effect initialized')\n\t * // Setup code that should only run once\n\t * } else {\n\t * console.log('Effect re-ran due to dependency change')\n\t * // Code that runs on every update\n\t * }\n\t * })\n\t * ```\n\t */\n\treaction: boolean\n}\n// Zone-based async context preservation is implemented in zone.ts\n// It automatically preserves effect context across Promise boundaries (.then, .catch, .finally)\n\n/**\n * Base type for effect callbacks - simple function without additional properties\n */\nexport type ScopedCallback = () => void\n\n/**\n * Type for effect cleanup functions with stopped state tracking\n */\nexport type EffectCleanup = ScopedCallback & {\n\t[stopped]: boolean\n}\n\n// Debug type for stack frames\nexport type StackFrame = {\n functionName: string\n fileName: string\n lineNumber: number\n columnNumber: number\n raw: string\n}\n\nexport type EffectTracking = (obj: any, evolution: Evolution, prop: any, effect: EffectTrigger) => void\n\n/**\n * Centralized node for all effect metadata and relationships\n */\nexport interface EffectNode {\n // Graph relationships\n parent?: EffectTrigger\n children?: Set<EffectCleanup>\n\n // Lifecycle\n cleanup?: ScopedCallback\n stopped?: boolean\n \n // Error handling\n forwardThrow?: CatchFunction\n catchers?: CatchFunction[]\n\n // Debug / Metadata\n creationStack?: StackFrame[]\n dependencyHook?: (obj: any, prop: any) => void\n \n // Tracking\n trackers?: EffectTracking[]\n \n // Configuration\n isOpaque?: boolean\n}\n\n/**\n * Type for the `runEffect` function of an effect - argument-less function to call to trigger the effect\n */\nexport type EffectTrigger = ScopedCallback\n\n/**\n * Async execution mode for effects\n * - `cancel`: Cancel previous async execution when dependencies change (default)\n * - `queue`: Queue next execution to run after current completes\n * - `ignore`: Ignore new executions while async work is running\n */\nexport type AsyncExecutionMode = 'cancel' | 'queue' | 'ignore'\n\n/**\n * Options for effect creation\n */\nexport interface EffectOptions {\n\t/**\n\t * How to handle async effect executions when dependencies change\n\t * @default 'cancel'\n\t */\n\tasyncMode?: AsyncExecutionMode\n\t/**\n\t * If true, this effect is \"opaque\" to deep optimizations: it sees the object reference itself\n\t * and must be notified when it changes, regardless of deep content similarity.\n\t * Use this for effects that depend on object identity (like memoize).\n\t */\n\topaque?: boolean\n\t/**\n\t * Used for debugging purpose. Provides a callback to be called every time a dependency is created.\n\t */\n\tdependencyHook?: (obj: any, prop: any) => void\n\t/**\n\t * Used for debugging purpose. Provides a name for the effect.\n\t */\n\tname?: string\n}\n\n/**\n * Type for property evolution events\n */\nexport type PropEvolution = {\n\ttype: 'set' | 'del' | 'add' | 'invalidate'\n\tprop: any\n}\n\n/**\n * Type for collection operation evolution events\n */\nexport type BunchEvolution = {\n\ttype: 'bunch'\n\tmethod: string\n}\nexport type Evolution = PropEvolution | BunchEvolution\n\ntype State =\n\t| {\n\t\t\tevolution: Evolution\n\t\t\tnext: State\n\t }\n\t| {}\n\n// Track native reactivity\nconst nativeReactive = Symbol('native-reactive')\n\n/**\n * Symbol to mark individual objects as non-reactive\n */\nexport const nonReactiveMark = Symbol('non-reactive')\n/**\n * Symbol to mark class properties as non-reactive\n */\nexport const unreactiveProperties = Symbol('unreactive-properties')\n\n/**\n * Symbol representing all properties in reactive tracking\n */\nexport const allProps = Symbol('all-props')\n\n/**\n * Symbol for accessing projection information on reactive objects\n */\nexport const projectionInfo = Symbol('projection-info')\n\n/**\n * Symbol to check if an effect is stopped\n */\nexport const stopped = Symbol('stopped')\n\n/**\n * Symbol to access effect cleanup function\n */\nexport const cleanup = Symbol('cleanup')\n\nexport const forwardThrow = Symbol('throw')\n\nexport type EffectCloser = (error?: any) => void\n//biome-ignore lint/suspicious/noConfusingVoidType: We have to\nexport type CatchFunction = (error: any) => EffectCloser | undefined | void\n\n/**\n * Context for a running projection item effect\n */\nexport interface ProjectionContext {\n\tsource: any\n\tkey?: any\n\ttarget: any\n\tdepth: number\n\tparent?: ProjectionContext\n}\n\n// Symbol to mark functions with their root function\nconst rootFunction = Symbol('root-function')\n\n/**\n * Structured error codes for machine-readable diagnosis\n */\nexport enum ReactiveErrorCode {\n\tCycleDetected = 'CYCLE_DETECTED',\n\tMaxDepthExceeded = 'MAX_DEPTH_EXCEEDED',\n\tMaxReactionExceeded = 'MAX_REACTION_EXCEEDED',\n\tWriteInComputed = 'WRITE_IN_COMPUTED',\n\tTrackingError = 'TRACKING_ERROR',\n\tBrokenEffects = 'BROKEN_EFFECTS',\n}\n\nexport type CycleDebugInfo = {\n\tcode: ReactiveErrorCode.CycleDetected\n\tcycle: string[]\n\tdetails?: string\n}\n\nexport type MaxDepthDebugInfo = {\n\tcode: ReactiveErrorCode.MaxDepthExceeded\n\tdepth: number\n\tchain: string[]\n}\n\nexport type MaxReactionDebugInfo = {\n\tcode: ReactiveErrorCode.MaxReactionExceeded\n\tcount: number\n\teffect: string\n}\n\nexport type GenericDebugInfo = {\n\tcode: ReactiveErrorCode\n\tcausalChain?: string[]\n\tcreationStack?: string | any[]\n\tlineage?: any[]\n\t[key: string]: any\n}\n\nexport type ReactiveDebugInfo =\n\t| CycleDebugInfo\n\t| MaxDepthDebugInfo\n\t| MaxReactionDebugInfo\n\t| GenericDebugInfo\n\n/**\n * Error class for reactive system errors\n */\nexport class ReactiveError extends Error {\n\tconstructor(\n\t\tmessage: string,\n\t\tpublic debugInfo?: ReactiveDebugInfo\n\t) {\n\t\tsuper(message)\n\t\tthis.name = 'ReactiveError'\n\t}\n\n\tget code(): ReactiveErrorCode | undefined {\n\t\treturn this.debugInfo?.code\n\t}\n\n\tget cause(): any {\n\t\treturn (this.debugInfo as any)?.cause\n\t}\n}\n\n// biome-ignore-start lint/correctness/noUnusedFunctionParameters: Interface declaration with empty defaults\n/**\n * Global options for the reactive system\n */\nexport const options = {\n\t/**\n\t * Debug purpose: called when an effect is entered\n\t * @param effect - The effect that is entered\n\t */\n\tenter: (_effect: Function) => {},\n\t/**\n\t * Debug purpose: called when an effect is left\n\t * @param effect - The effect that is left\n\t */\n\tleave: (_effect: Function) => {},\n\t/**\n\t * Debug purpose: called when an effect is chained\n\t * @param target - The effect that is being triggered\n\t * @param caller - The effect that is calling the target\n\t */\n\tchain: (_targets: Function[], _caller?: Function) => {},\n\t/**\n\t * Debug purpose: called when an effect chain is started\n\t * @param target - The effect that is being triggered\n\t */\n\tbeginChain: (_targets: Function[]) => {},\n\t/**\n\t * Debug purpose: called when an effect chain is ended\n\t */\n\tendChain: () => {},\n\tgarbageCollected: (_fn: Function) => {},\n\t/**\n\t * Debug purpose: called when an object is touched\n\t * @param obj - The object that is touched\n\t * @param evolution - The type of change\n\t * @param props - The properties that changed\n\t * @param deps - The dependencies that changed\n\t */\n\ttouched: (_obj: any, _evolution: Evolution, _props?: any[], _deps?: Set<EffectTrigger>) => {},\n\t/**\n\t * Debug purpose: called when an effect is skipped because it's already running\n\t * @param effect - The effect that is already running\n\t * @param runningChain - The array of effects from the detected one to the currently running one\n\t */\n\tskipRunningEffect: (_effect: EffectTrigger) => {},\n\t/**\n\t * Debug purpose: maximum effect chain (like call stack max depth)\n\t * Used to prevent infinite loops\n\t * @default 100\n\t */\n\tmaxEffectChain: 100,\n\t/**\n\t * Maximum number of times an effect can be triggered by the same cause in a single batch\n\t * Used to detect aggressive re-computation or infinite loops\n\t * @default 10\n\t */\n\tmaxTriggerPerBatch: 10,\n\t/**\n\t * Debug purpose: maximum effect reaction (like call stack max depth)\n\t * Used to prevent infinite loops\n\t * @default 'throw'\n\t */\n\tmaxEffectReaction: 'throw' as 'throw' | 'debug' | 'warn',\n\t/**\n\t * Callback called when a memoization discrepancy is detected (debug only)\n\t * When defined, memoized functions will run a second time (untracked) to verify consistency.\n\t * If the untracked run returns a different value than the cached one, this callback is triggered.\n\t *\n\t * This is the primary tool for detecting missing reactive dependencies in computed values.\n\t *\n\t * @param cached - The value currently in the memoization cache\n\t * @param fresh - The value obtained by re-running the function untracked\n\t * @param fn - The memoized function itself\n\t * @param args - Arguments passed to the function\n\t *\n\t * @example\n\t * ```typescript\n\t * reactiveOptions.onMemoizationDiscrepancy = (cached, fresh, fn, args) => {\n\t * throw new Error(`Memoization discrepancy in ${fn.name}!`);\n\t * };\n\t * ```\n\t */\n\tonMemoizationDiscrepancy: undefined as\n\t\t| ((\n\t\t\t\tcached: any,\n\t\t\t\tfresh: any,\n\t\t\t\tfn: Function,\n\t\t\t\targs: any[],\n\t\t\t\tcause: 'calculation' | 'comparison'\n\t\t ) => void)\n\t\t| undefined,\n\t/**\n\t * How to handle cycles detected in effect batches.\n\t *\n\t * - `'production'` (Default): High-performance mode. Disables dependency graph maintenance and\n\t * Topological Sorting in favor of a simple FIFO queue. Use this for trustworthy, acyclic UI code.\n\t * Cycle detection is heuristic (uses maxEffectChain execution counts).\n\t *\n\t * - `'development'`: Maintains direct dependency graph for early cycle detection during edge creation.\n\t * Catches cycles before effects execute via DFS check when adding edges. Throws immediately with\n\t * basic path information. Good balance of debugging help with moderate overhead.\n\t *\n\t * - `'debug'`: Full diagnostic mode with transitive closures and topological sorting.\n\t * Provides detailed cycle path reporting. Highest overhead but most informative for bug hunting.\n\t *\n\t * @default 'production'\n\t */\n\tcycleHandling: 'development' as 'production' | 'development' | 'debug',\n\t/**\n\t * Internal flag used by memoization discrepancy detector to avoid counting calls in tests\n\t * @warning Do not modify this flag manually, this flag is given by the engine\n\t */\n\tisVerificationRun: false,\n\t/**\n\t * Maximum depth for deep watching traversal\n\t * Used to prevent infinite recursion in circular references\n\t * @default 100\n\t */\n\tmaxDeepWatchDepth: 100,\n\t/**\n\t * Only react on instance members modification (not inherited properties)\n\t * For instance, do not track class methods\n\t * @default true\n\t */\n\tinstanceMembers: true,\n\t/**\n\t * Ignore accessors (getters and setters) and only track direct properties\n\t * @default true\n\t */\n\tignoreAccessors: true,\n\t/**\n\t * Enable recursive touching when objects with the same prototype are replaced\n\t * When enabled, replacing an object with another of the same prototype triggers\n\t * recursive diffing instead of notifying parent effects\n\t * @default true\n\t */\n\trecursiveTouching: true,\n\t/**\n\t * Default async execution mode for effects that return Promises\n\t * - 'cancel': Cancel previous async execution when dependencies change (default, enables async zone)\n\t * - 'queue': Queue next execution to run after current completes (enables async zone)\n\t * - 'ignore': Ignore new executions while async work is running (enables async zone)\n\t * - false: Disable async zone and async mode handling (effects run concurrently)\n\t *\n\t * **When truthy:** Enables async zone (Promise.prototype wrapping) for automatic context\n\t * preservation in Promise callbacks. Warning: This modifies Promise.prototype globally.\n\t * Only enable if no other library modifies Promise.prototype.\n\t *\n\t * **When false:** Async zone is disabled. Use `tracked()` manually in Promise callbacks.\n\t *\n\t * Can be overridden per-effect via EffectOptions\n\t * @default 'cancel'\n\t */\n\tasyncMode: 'cancel' as AsyncExecutionMode | false,\n\t// biome-ignore lint/suspicious/noConsole: This is the whole point here\n\twarn: (...args: any[]) => console.warn(...args),\n\n\t/**\n\t * Configuration for the introspection system\n\t */\n\tintrospection: {\n\t\t/**\n\t\t * Whether to keep a history of mutations for debugging\n\t\t * @default false\n\t\t */\n\t\tenableHistory: false,\n\t\t/**\n\t\t * Number of mutations to keep in history\n\t\t * @default 50\n\t\t */\n\t\thistorySize: 50,\n\t},\n\n\t/**\n\t * Configuration for zone hooks - control which async APIs are hooked\n\t * Each option controls whether the corresponding async API is wrapped to preserve effect context\n\t * Only applies when asyncMode is enabled (truthy)\n\t * @deprecated Should take all when we made sure PIXI.create, Game.create, ... are -> .root()\n\t */\n\tzones: {\n\t\t/**\n\t\t * Hook setTimeout to preserve effect context\n\t\t * @default true\n\t\t */\n\t\tsetTimeout: true,\n\t\t/**\n\t\t * Hook setInterval to preserve effect context\n\t\t * @default true\n\t\t */\n\t\tsetInterval: true,\n\t\t/**\n\t\t * Hook requestAnimationFrame (runs in untracked context when hooked)\n\t\t * @default true\n\t\t */\n\t\trequestAnimationFrame: true,\n\t\t/**\n\t\t * Hook queueMicrotask to preserve effect context\n\t\t * @default true\n\t\t */\n\t\tqueueMicrotask: true,\n\t},\n}\n// biome-ignore-end lint/correctness/noUnusedFunctionParameters: Interface declaration with empty defaults\n\ntype CallableOption = {\n\t[K in keyof typeof options]: (typeof options)[K] extends ((...args: any[]) => any) | undefined\n\t\t? K\n\t\t: never\n}[keyof typeof options]\n\nexport function optionCall<K extends CallableOption>(\n\tname: K,\n\t...args: NonNullable<(typeof options)[K]> extends (...a: infer A) => unknown ? A : never\n): void {\n\tconst fn = options[name]\n\tif (typeof fn !== 'function') return\n\ttry {\n\t\t;(fn as Function)(...args)\n\t} catch (error) {\n\t\toptions.warn(`options.${name} threw`, error)\n\t}\n}\n\nexport { type State, nativeReactive, rootFunction }\n","import { type EffectCleanup, type EffectNode, type EffectTrigger, rootFunction } from './types'\n\n// Track which effects are watching which reactive objects for cleanup\nexport let effectToReactiveObjects = new WeakMap<EffectTrigger, Set<object>>()\n\n// Track effects per reactive object and property\nexport let watchers = new WeakMap<object, Map<any, Set<EffectTrigger>>>()\n\n// Track effect metadata and relationships\nexport let effectNodes = new WeakMap<EffectTrigger, EffectNode>()\n\nexport function getEffectNode(effect: EffectTrigger): EffectNode {\n let node = effectNodes.get(effect)\n if (!node) {\n node = {}\n effectNodes.set(effect, node)\n }\n return node\n}\n\n// Track reverse mapping to ensure unicity: One Root -> One Function\nlet reverseRoots = new WeakMap<any, WeakRef<Function>>()\n\nexport function resetRegistry() {\n\teffectToReactiveObjects = new WeakMap()\n\twatchers = new WeakMap()\n\teffectNodes = new WeakMap()\n\treverseRoots = new WeakMap()\n}\n\n/**\n * Marks a function with its root function for effect tracking\n * Enforces strict unicity: A root function can only identify ONE function.\n * @param fn - The function to mark\n * @param root - The root function\n * @returns The marked function\n */\nexport function markWithRoot<T extends Function>(fn: T, root: any): T {\n\t// Check for collision\n\tconst existingRef = reverseRoots.get(root)\n\tconst existing = existingRef?.deref()\n\n\tif (existing && existing !== fn) {\n\t\tconst rootName = root.name || 'anonymous'\n\t\tconst existingName = existing.name || 'anonymous'\n\t\tconst fnName = fn.name || 'anonymous'\n\t\tthrow new Error(\n\t\t\t`[reactive] Abusive Shared Root detected: Root '${rootName}' is already identifying function '${existingName}'. ` +\n\t\t\t\t`Cannot reuse it for '${fnName}'. Shared roots cause lost updates and broken identity logic.`\n\t\t)\n\t}\n\n\t// Always update the map so subsequent checks find this one\n\t// (Last writer wins for the check)\n\treverseRoots.set(root, new WeakRef(fn))\n\n\t// Mark fn with the new root\n\treturn Object.defineProperty(fn, rootFunction, {\n\t\tvalue: getRoot(root),\n\t\twritable: false,\n\t})\n}\n\n/**\n * Gets the root function of a function for effect tracking\n * @param fn - The function to get the root of\n * @returns The root function\n */\nexport function getRoot<T extends Function | undefined>(fn: T): T {\n\twhile (fn && rootFunction in fn) fn = fn[rootFunction] as T\n\treturn fn\n}\n","import { asyncHooks } from './async'\nimport { named, tag } from './utils'\n\ninterface InternalZoneUse<T> {\n\tenter(value?: T): unknown\n\tleave(entered: unknown): void\n}\nfunction isu<T>(z: AZone<T> | InternalZoneUse<T>): InternalZoneUse<T> {\n\treturn z as InternalZoneUse<T>\n}\nexport abstract class AZone<T> {\n\tabstract active?: T\n\tprotected enter(value?: T): unknown {\n\t\tconst prev = this.active\n\t\tthis.active = value\n\t\treturn prev\n\t}\n\tprotected leave(entered: unknown): void {\n\t\tthis.active = entered as T | undefined\n\t}\n\twith<R>(value: T | undefined, fn: () => R): R {\n\t\tconst entered = this.enter(value)\n\t\tlet res: R\n\t\ttry {\n\t\t\tres = fn()\n\t\t} finally {\n\t\t\tthis.leave(entered)\n\t\t}\n\t\t// [HACK]: Sanitization\n\t\t// See BROWSER_ASYNC_POLYFILL.md\n\t\treturn asyncHooks.sanitizePromise(res) as R\n\t}\n\troot<R>(fn: () => R): R {\n\t\tconst prev = this.enter()\n\t\ttry {\n\t\t\treturn fn()\n\t\t} finally {\n\t\t\tthis.leave(prev)\n\t\t}\n\t}\n\tget zoned(): FunctionWrapper {\n\t\tconst active = this.active\n\t\treturn named(`${this}@${active}`, (fn) => this.with(active, fn))\n\t}\n}\n\nexport type FunctionWrapper = <R>(fn: () => R) => R\n\nexport class Zone<T> extends AZone<T> {\n\tactive: T | undefined\n}\n\ntype HistoryValue<T> = { present: T | undefined; history: Set<T> }\nexport class ZoneHistory<T> extends AZone<HistoryValue<T>> {\n\tprivate history = new Set<T>()\n\tpublic readonly present: AZone<T>\n\tpublic has(value: T): boolean {\n\t\treturn this.history.has(value)\n\t}\n\tpublic some(predicate: (value: T) => boolean): boolean {\n\t\tfor (const value of this.history) if (predicate(value)) return true\n\t\treturn false\n\t}\n\tconstructor(private controlled: AZone<T> = new Zone<T>()) {\n\t\tsuper()\n\t\tconst self = this\n\t\tthis.present = Object.create(\n\t\t\tcontrolled,\n\t\t\tObject.getOwnPropertyDescriptors({\n\t\t\t\tget active() {\n\t\t\t\t\treturn controlled.active\n\t\t\t\t},\n\t\t\t\tset active(value: T | undefined) {\n\t\t\t\t\tcontrolled.active = value\n\t\t\t\t},\n\t\t\t\tenter(value?: T) {\n\t\t\t\t\tif (value && self.history.has(value))\n\t\t\t\t\t\tthrow new Error('ZoneHistory: re-entering historical zone')\n\t\t\t\t\tif (value !== undefined) self.history.add(value)\n\t\t\t\t\treturn { added: value, entered: isu(controlled).enter(value) }\n\t\t\t\t},\n\t\t\t\tleave(entered: { added: T | undefined; entered: unknown }) {\n\t\t\t\t\tif (entered.added !== undefined) self.history.delete(entered.added)\n\t\t\t\t\treturn isu(controlled).leave(entered.entered)\n\t\t\t\t},\n\t\t\t})\n\t\t)\n\t}\n\tget active() {\n\t\treturn { present: this.controlled.active, history: new Set(this.history) }\n\t}\n\tset active(value: HistoryValue<T> | undefined) {\n\t\tthis.history = value?.history ? new Set(value.history) : new Set()\n\t\tthis.controlled.active = value?.present\n\t}\n}\n\nexport class ZoneAggregator extends AZone<Map<AZone<unknown>, unknown>> {\n\t#zones = new Set<AZone<unknown>>()\n\tconstructor(...zones: AZone<unknown>[]) {\n\t\tsuper()\n\t\tfor (const z of zones) this.#zones.add(z)\n\t}\n\tget active(): Map<AZone<unknown>, unknown> | undefined {\n\t\tconst rv = new Map<AZone<unknown>, unknown>()\n\t\tfor (const z of this.#zones) if (z.active !== undefined) rv.set(z, z.active)\n\t\treturn rv\n\t}\n\tset active(value: Map<AZone<unknown>, unknown> | undefined) {\n\t\tfor (const z of this.#zones) z.active = value?.get(z)\n\t}\n\tenter(value?: Map<AZone<unknown>, unknown> | undefined) {\n\t\tconst entered = new Map<AZone<unknown>, unknown>()\n\t\tfor (const z of this.#zones) {\n\t\t\tconst v = value?.get(z)\n\t\t\tentered.set(z, isu(z).enter(v))\n\t\t}\n\t\treturn entered\n\t}\n\tleave(entered: Map<AZone<unknown>, unknown>): void {\n\t\tfor (const z of this.#zones) isu(z).leave(entered.get(z))\n\t}\n\tadd(z: AZone<unknown>) {\n\t\tthis.#zones.add(z)\n\t}\n\tdelete(z: AZone<unknown>) {\n\t\tthis.#zones.delete(z)\n\t}\n\tclear() {\n\t\tthis.#zones.clear()\n\t}\n}\n\nexport const asyncZone = tag('async', new ZoneAggregator())\nasyncHooks.addHook(() => {\n\tconst zone = asyncZone.active\n\treturn () => {\n\t\tconst prev = asyncZone.active\n\t\tasyncZone.active = zone\n\t\treturn () => (asyncZone.active = prev)\n\t}\n})\n","import { tag } from '../utils'\nimport { asyncZone, ZoneAggregator, ZoneHistory } from '../zone'\nimport { effect, untracked } from './effects'\nimport { getRoot } from './registry'\nimport {\n\tcleanup,\n\ttype EffectAccess,\n\ttype EffectTrigger,\n\ttype ScopedCallback,\n\tstopped,\n} from './types'\n\nexport const effectHistory = tag('effectHistory', new ZoneHistory<EffectTrigger>())\ntag('effectHistory.present', effectHistory.present)\nasyncZone.add(effectHistory)\n\n/**\n * Aggregator for zones that need to be tracked along effects.\n * ie. in each effect, the active zone of the given zoning will be the one active at effect's definition\n */\nexport const effectAggregator = tag('effectAggregator', new ZoneAggregator(effectHistory.present))\n\nexport function isRunning(effect: EffectTrigger): boolean {\n\tconst root = getRoot(effect)\n\treturn effectHistory.some((e) => getRoot(e) === root)\n}\n\nexport function getActiveEffect() {\n\treturn effectHistory.present.active\n}\n\n/**\n * ADD a cleanup function to an object using the cleanup symbol.\n * The cleanup function will be called when the object needs to be disposed.\n *\n * Note: most of the time, you don't need to use this function directly.\n * The main use if for the cleanup function to be stored with the object, as GC calls the cleanup function when the *function* is garbage collected.\n *\n * @param obj - The object to attach the cleanup function to\n * @param cleanupFn - The cleanup function to attach\n * @returns The object with the cleanup function attached\n */\nexport function cleanedBy<T extends object>(obj: T, cleanupFn: ScopedCallback) {\n\tconst oldCleanup = obj[cleanup]\n\treturn Object.defineProperty(obj, cleanup, {\n\t\tvalue: oldCleanup\n\t\t\t? Object.defineProperties(\n\t\t\t\t\t() => {\n\t\t\t\t\t\toldCleanup()\n\t\t\t\t\t\tcleanupFn()\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t[stopped]: { get: () => oldCleanup[stopped] || cleanupFn[stopped] },\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t: cleanupFn,\n\t\twritable: false,\n\t\tenumerable: false,\n\t\tconfigurable: true,\n\t}) as T & { [cleanup]: ScopedCallback }\n}\n\n//#region greedy caching\n\n/**\n * Creates a derived value that automatically recomputes when dependencies change\n * @param compute - Function that computes the derived value\n * @returns Object with value and cleanup function\n */\nexport function derived<T>(compute: (dep: EffectAccess) => T): {\n\tvalue: T\n\t[cleanup]: ScopedCallback\n} {\n\tconst rv = { value: undefined as unknown as T }\n\treturn cleanedBy(\n\t\trv,\n\t\tuntracked(() =>\n\t\t\teffect(function derivedEffect(access) {\n\t\t\t\trv.value = compute(access)\n\t\t\t})\n\t\t)\n\t)\n}\n","import { getActiveEffect } from '../src/reactive/effect-context'\nimport { getEffectNode, getRoot } from '../src/reactive/registry'\nimport { type EffectTrigger } from '../src/reactive/types'\n\nexport const effectMarker ={\n\tenter: 'effect:enter',\n\tleave: 'effect:leave'\n}\n\n/**\n * Structured stack frame\n */\nexport interface StackFrame {\n\tfunctionName: string\n\tfileName: string\n\tlineNumber: number\n\tcolumnNumber: number\n\traw: string\n}\n\n/**\n * Parses a single stack line into a structured frame.\n * @param line - A line from Error.stack\n */\nexport function parseStackLine(line: string): StackFrame | null {\n\t// Node.js format: \" at functionName (file:line:column)\"\n\t// or \" at file:line:column\"\n\tconst nodeMatch = line.match(/^\\s*at\\s+(?:(.+?)\\s+\\()?(?:(.+?):(\\d+):(\\d+))\\)?$/)\n\t\n\t// Browser format (Firefox/Safari): \"functionName@file:line:column\" or \"file:line:column\"\n\t// Chrome/Edge use Node-like format but without \"at\" sometimes or with different prefixes\n\tconst browserMatch = line.match(/(?:(.+?)(?:\\@|\\(?))?(?:(.+?):(\\d+):(\\d+))(?:\\@|\\)?)$/)\n\n\tconst match = nodeMatch || browserMatch\n\tif (!match) return null\n\n\tconst [, functionName = 'anonymous', fileName, lineNumber, columnNumber] = match\n\n\treturn {\n\t\tfunctionName: functionName.trim(),\n\t\tfileName,\n\t\tlineNumber: parseInt(lineNumber, 10),\n\t\tcolumnNumber: parseInt(columnNumber, 10),\n\t\traw: line.trim(),\n\t}\n}\n\nlet internalFile: string | undefined\n\n/**\n * Gets the current call stack\n * @param skipFrames - Number of frames to skip\n * @param error - Optional error to use as source of stack\n */\nexport function getStackFrame(error = new Error()): StackFrame[] {\n\tif (!error.stack) return []\n\n\tconst lines = error.stack.split('\\n')\n\n\tconst lastLine = lines.findIndex((line) => line.includes(effectMarker.enter))\n\tif (lastLine !== -1) lines.splice(lastLine)\n\tconst firstLine = lines.findLastIndex((line) => line.includes(effectMarker.leave))\n\tif (firstLine !== -1) lines.splice(0, firstLine+1)\n\telse {\n\t\t// Dynamically identify the library's internal files if not already done\n\t\tif (!internalFile && lines[1]) {\n\t\t\tconst selfFrame = parseStackLine(lines[1])\n\t\t\tif (selfFrame) {\n\t\t\t\tinternalFile = selfFrame.fileName\n\t\t\t}\n\t\t}\n\n\t\t// Skip \"Error\" line and requested frames\n\t\tconst frames: StackFrame[] = []\n\n\t\t// Determine the \"base\" directory of the library to skip other internal files\n\t\t// We look for \"src\" or \"dist\" to be more specific than just the project root\n\t\tconst srcIndex = internalFile ? internalFile.lastIndexOf('/src/') : -1\n\t\tconst distIndex = internalFile ? internalFile.lastIndexOf('/dist/') : -1\n\t\tconst libraryBase = internalFile ? (\n\t\t\tsrcIndex !== -1 ? internalFile.substring(0, srcIndex + 5) : \n\t\t\t(distIndex !== -1 ? internalFile.substring(0, distIndex + 6) : \n\t\t\tinternalFile.substring(0, internalFile.lastIndexOf('/') + 1))\n\t\t) : undefined\n\t\tlet l\n\t\tfor (l = 1; l < lines.length; l++) {\n\t\t\tconst frame = parseStackLine(lines[l])\n\t\t\tif (!frame) continue\n\n\t\t\t// Robust skipping: if we are still in the internal area, skip it.\n\t\t\tconst isInternal = /Lineage$/.test(frame.functionName) ||\n\t\t\t\tframe.functionName === 'eval' ||\n\t\t\t\t[`getStackFrame`, `captureLineage`].includes(frame.functionName)\n\n\t\t\tif (!isInternal) break\n\t\t}\n\t\tlines.splice(0, l)\n\t}\n\n\treturn lines.map(parseStackLine).filter(Boolean)\n}\n\n/**\n * Represents a segment in the effect lineage\n */\nexport interface LineageSegment {\n\teffectName: string\n\tstack: StackFrame[]\n}\n\n/**\n * Traces the lineage of the current execution through nested effects\n * @param effect - Starting effect (defaults to active effect)\n */\nexport function getLineage(effect?: EffectTrigger): LineageSegment[] {\n\tconst currentEffect = effect ?? getActiveEffect()\n\tconst currentStack = getStackFrame() // Robustly skips internal mutts frames\n\tconst segments: LineageSegment[] = []\n\n\tif (!currentEffect) {\n\t\tsegments.push({\n\t\t\teffectName: 'root',\n\t\t\tstack: filterNodeModules(currentStack),\n\t\t})\n\t\treturn segments\n\t}\n\n\tlet current: EffectTrigger | undefined = currentEffect\n\tlet lastStack = currentStack\n\n\twhile (current) {\n\t\tconst rootFn = getRoot(current)\n\t\tif(!rootFn.name) debugger\n\t\tconst effectName = rootFn.name || 'anonymous'\n\t\tconst filteredStack = filterNodeModules(lastStack)\n\t\tsegments.push({\n\t\t\teffectName,\n\t\t\tstack: filteredStack,\n\t\t})\n\n\t\t// Move to parent\n\t\tconst node = getEffectNode(current)\n\t\tconst parent = node.parent\n\t\tconst creationStack = getEffectNode(current).creationStack\n\t\t\n\t\tif (parent) {\n\t\t\tcurrent = parent\n\t\t\tlastStack = creationStack ?? []\n\t\t} else if (creationStack) {\n\t\t\tsegments.push({\n\t\t\t\teffectName: 'root',\n\t\t\t\tstack: filterNodeModules(creationStack),\n\t\t\t})\n\t\t\tbreak\n\t\t} else {\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn segments\n}\n/**\n * Filters out node_modules frames and groups them\n * @param frames - Array of stack frames\n */\nfunction filterNodeModules(frames: StackFrame[]): StackFrame[] {\n\tconst result: StackFrame[] = []\n\tlet inNodeModules = false\n\t\n\tfor (const frame of frames) {\n\t\tconst isNodeModule = frame.fileName.includes('/node_modules/')\n\t\t\n\t\tif (isNodeModule && !inNodeModules) {\n\t\t\t// Start of node_modules block\n\t\t\tinNodeModules = true\n\t\t\tresult.push({\n\t\t\t\tfunctionName: '...node_modules...',\n\t\t\t\tfileName: '[filtered]',\n\t\t\t\tlineNumber: 0,\n\t\t\t\tcolumnNumber: 0,\n\t\t\t\traw: ' at ...node_modules...'\n\t\t\t})\n\t\t} else if (!isNodeModule && inNodeModules) {\n\t\t\t// End of node_modules block\n\t\t\tinNodeModules = false\n\t\t\tresult.push(frame)\n\t\t} else if (!isNodeModule) {\n\t\t\t// Regular frame\n\t\t\tresult.push(frame)\n\t\t}\n\t\t// Skip frames inside node_modules\n\t}\n\t\n\treturn result\n}\n\n/**\n * Formats lineage segments into a single stack-like string\n * @param segments - Lineage segments\n */\nexport function formatLineage(segments: LineageSegment[]): string {\n\tconst result: string[] = []\n\tfor (let i = 0; i < segments.length; i++) {\n\t\tconst segment = segments[i]\n\t\tif (i > 0) {\n\t\t\tresult.push(` --- effect: ${segments[i - 1].effectName} ---`)\n\t\t}\n\t\tfor (const frame of segment.stack) {\n\t\t\tresult.push(` ${frame.raw}`)\n\t\t}\n\t}\n\treturn result.join('\\n')\n}\n\n/**\n * Logs lineage segments to console with grouping\n * @param segments - Lineage segments\n */\nexport function nodeLineage(segments: LineageSegment[]): void {\n\tconsole.groupCollapsed(`🦴 Effect Lineage Trace (${segments.length} segment${segments.length === 1 ? '' : 's'})`)\n\t\n\tfor (let i = 0; i < segments.length; i++) {\n\t\tconst segment = segments[i]\n\t\t\n\t\t// Add segment header\n\t\tconst isLast = i === segments.length - 1\n\t\tconst prefix = i === 0 ? '📍' : isLast ? '└─' : '├─'\n\t\t\n\t\tconsole.groupCollapsed(`${prefix} Effect: ${segment.effectName}`)\n\t\t\n\t\t// Add stack frames\n\t\tfor (let j = 0; j < segment.stack.length; j++) {\n\t\t\tconst frame = segment.stack[j]\n\t\t\tconst isLastFrame = j === segment.stack.length - 1\n\t\t\tconst framePrefix = isLastFrame ? '└─' : '├─'\n\t\t\t\n\t\t\tif (frame.functionName === '...node_modules...') {\n\t\t\t\tconsole.log(`%c${framePrefix} ${frame.functionName}`, 'color: #888; font-style: italic;')\n\t\t\t} else {\n\t\t\t\tconst fnStyle = frame.functionName === 'anonymous' ? 'color: #888;' : 'color: #1a7f37; font-weight: bold;'\n\t\t\t\tconst fileStyle = 'color: #0550ae;'\n\t\t\t\t\n\t\t\t\tconsole.log(\n\t\t\t\t\t`%c${framePrefix} %c${frame.functionName} %c(${frame.fileName}:${frame.lineNumber}:${frame.columnNumber})`,\n\t\t\t\t\t'color: #888;',\n\t\t\t\t\tfnStyle,\n\t\t\t\t\tfileStyle\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\t\n\t\tconsole.groupEnd()\n\t}\n\t\n\tconsole.groupEnd()\n}\n\n/**\n * Legacy version of nodeLineage that returns a formatted string (useful for comparison or logs)\n * @param segments - Lineage segments\n * @deprecated TODO: remove me and all the code running around\n */\nexport function nodeLineageLegacy(segments: LineageSegment[]): string {\n\t// ANSI color codes for Node.js terminal\n\tconst colors = {\n\t\treset: '\\x1b[0m',\n\t\tbright: '\\x1b[1m',\n\t\tdim: '\\x1b[2m',\n\t\tred: '\\x1b[31m',\n\t\tgreen: '\\x1b[32m',\n\t\tyellow: '\\x1b[33m',\n\t\tblue: '\\x1b[34m',\n\t\tmagenta: '\\x1b[35m',\n\t\tcyan: '\\x1b[36m',\n\t\twhite: '\\x1b[37m',\n\t\tgray: '\\x1b[90m',\n\t}\n\t\n\tconst result: string[] = []\n\t\n\tresult.push(`${colors.bright}${colors.cyan}🦴 Effect Lineage Trace (${segments.length} segments)${colors.reset}`)\n\t\n\tfor (let i = 0; i < segments.length; i++) {\n\t\tconst segment = segments[i]\n\t\tconst isLast = i === segments.length - 1\n\t\tconst prefix = i === 0 ? '📍' : isLast ? '└─' : '├─'\n\t\tconst connector = isLast ? ' ' : '│ '\n\t\t\n\t\tresult.push(`${colors.gray}${connector}${colors.reset}${colors.bright}${colors.magenta}${prefix} Effect: ${segment.effectName}${colors.reset}`)\n\t\t\n\t\tfor (let j = 0; j < segment.stack.length; j++) {\n\t\t\tconst frame = segment.stack[j]\n\t\t\tconst framePrefix = j === segment.stack.length - 1 ? ' └─' : ' ├─'\n\t\t\t\n\t\t\tif (frame.functionName === '...node_modules...') {\n\t\t\t\tresult.push(`${colors.gray} ${connector}${colors.reset}${colors.dim}${framePrefix} ${colors.yellow}${frame.functionName}${colors.reset}`)\n\t\t\t} else {\n\t\t\t\tconst fnColor = frame.functionName === 'anonymous' ? colors.gray : colors.green\n\t\t\t\tresult.push(`${colors.gray} ${connector}${colors.reset}${colors.dim}${framePrefix}${colors.reset} ${fnColor}${frame.functionName}${colors.reset} ${colors.gray}(${colors.reset}${colors.blue}${frame.fileName}:${frame.lineNumber}:${frame.columnNumber}${colors.reset}${colors.gray})${colors.reset}`)\n\t\t\t}\n\t\t}\n\t\tif (i < segments.length - 1) result.push('')\n\t}\n\t\n\treturn result.join('\\n')\n}\n\n/**\n * Captures and logs lineage to console\n */\nexport function captureNodeLineage(): void {\n\tnodeLineage(getLineage())\n}\n\n/**\n * Custom formatter for Chrome DevTools to render lineage data nicely.\n */\nexport const lineageFormatter = {\n\theader: (obj: any) => {\n\t\tif (obj && obj.__isLineage__) {\n\t\t\t// Try to detect DevTools theme - default to dark colors if uncertain\n\t\t\tconst isDark = typeof window !== 'undefined' && window.matchMedia?.('(prefers-color-scheme: dark)').matches\n\t\t\t\n\t\t\tconst headerColor = isDark ? '#cd9d5d' : '#704214'\n\t\t\t\n\t\t\treturn [\n\t\t\t\t'span',\n\t\t\t\t{ style: `color: ${headerColor}; font-weight: bold;` },\n\t\t\t\t`🦴 Effect Lineage (${obj.segments.length} segments)`,\n\t\t\t]\n\t\t}\n\t\treturn null\n\t},\n\thasBody: (obj: any) => obj && obj.__isLineage__,\n\tbody: (obj: any) => {\n\t\tif (!obj || !obj.__isLineage__) return null\n\t\tconst segments: LineageSegment[] = obj.segments\n\t\t\n\t\t// Try to detect DevTools theme\n\t\tconst isDark = typeof window !== 'undefined' && window.matchMedia?.('(prefers-color-scheme: dark)').matches\n\t\t\n\t\tconst colors = isDark ? {\n\t\t\tframeText: '#ccc',\n\t\t\tfunctionName: '#ffffff',\n\t\t\tfileLink: '#58a6ff',\n\t\t\tsegmentBg: '#2d2d2d',\n\t\t} : {\n\t\t\tframeText: '#555',\n\t\t\tfunctionName: '#222',\n\t\t\tfileLink: '#005cc5',\n\t\t\tsegmentBg: '#eee',\n\t\t}\n\t\t\n\t\tconst children = segments.map((segment, i) => {\n\t\t\tconst frames = segment.stack.map((frame) => [\n\t\t\t\t'div',\n\t\t\t\t{ style: `margin-left: 20px; color: ${colors.frameText}; font-family: monospace; font-size: 11px;` },\n\t\t\t\t['span', { style: `color: ${colors.functionName};` }, `at ${frame.functionName} `],\n\t\t\t\t['span', {}, `${frame.fileName}:${frame.lineNumber}:${frame.columnNumber}`],\n\t\t\t])\n\n\t\t\tconst segmentHeader = [\n\t\t\t\t'div',\n\t\t\t\t{ style: `margin-top: 5px; padding: 2px 5px; background: ${colors.segmentBg}; border-radius: 3px; font-weight: bold;` },\n\t\t\t\ti === 0 ? `📍 Current: ${segment.effectName}` : `↖ Effect: ${segment.effectName}`,\n\t\t\t]\n\n\t\t\treturn ['div', {}, segmentHeader, ...frames]\n\t\t})\n\n\t\treturn ['div', { style: 'padding: 5px; line-height: 1.4;' }, ...children]\n\t},\n}\n\n/**\n * Wraps lineage data in a way that the Chrome Formatter can recognize.\n */\nexport function wrapLineageForDebug(segments: LineageSegment[]) {\n\treturn {\n\t\t__isLineage__: true,\n\t\tsegments,\n\t\ttoString: () => formatLineage(segments),\n\t}\n}\n","import { batch } from './effects'\nimport type { EffectTrigger, Evolution } from './types'\n\n// Track which objects contain which other objects (back-references)\nexport const objectParents = new WeakMap<object, Set<{ parent: object; prop: PropertyKey }>>()\n\n// Track which objects have deep watchers\nexport const objectsWithDeepWatchers = new WeakSet<object>()\n\n// Track deep watchers per object\nexport const deepWatchers = new WeakMap<object, Set<EffectTrigger>>()\n\n// Track which effects are doing deep watching\nexport const effectToDeepWatchedObjects = new WeakMap<EffectTrigger, Set<object>>()\n\n/**\n * Add a back-reference from child to parent\n */\nexport function addBackReference(child: object, parent: object, prop: any) {\n\tlet parents = objectParents.get(child)\n\tif (!parents) {\n\t\tparents = new Set()\n\t\tobjectParents.set(child, parents)\n\t}\n\tparents.add({ parent, prop })\n}\n\n/**\n * Remove a back-reference from child to parent\n */\nexport function removeBackReference(child: object, parent: object, prop: any) {\n\tconst parents = objectParents.get(child)\n\tif (parents) {\n\t\tfor (const entry of parents) {\n\t\t\tif (entry.parent === parent && entry.prop === prop) {\n\t\t\t\tparents.delete(entry)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif (parents.size === 0) {\n\t\t\tobjectParents.delete(child)\n\t\t}\n\t}\n}\n\n/**\n * Check if an object needs back-references (has deep watchers or parents with deep watchers)\n */\nexport function needsBackReferences(obj: object): boolean {\n\t// Fast path: check if object itself has deep watchers\n\tif (objectsWithDeepWatchers.has(obj)) return true\n\t// Slow path: check if any parent has deep watchers (recursive)\n\treturn hasParentWithDeepWatchers(obj)\n}\n\n/**\n * Bubble up changes through the back-reference chain\n */\nexport function bubbleUpChange(changedObject: object, evolution: Evolution) {\n\tconst parents = objectParents.get(changedObject)\n\tif (!parents) return\n\n\tfor (const { parent } of parents) {\n\t\t// Trigger deep watchers on parent\n\t\tconst parentDeepWatchers = deepWatchers.get(parent)\n\t\tif (parentDeepWatchers) for (const watcher of parentDeepWatchers) batch(watcher)\n\n\t\t// Continue bubbling up\n\t\tbubbleUpChange(parent, evolution)\n\t}\n}\n\nfunction hasParentWithDeepWatchers(obj: object): boolean {\n\tconst parents = objectParents.get(obj)\n\tif (!parents) return false\n\n\tfor (const { parent } of parents) {\n\t\tif (objectsWithDeepWatchers.has(parent)) return true\n\t\tif (hasParentWithDeepWatchers(parent)) return true\n\t}\n\treturn false\n}\n","export const objectToProxy = new WeakMap<object, object>()\nexport const proxyToObject = new WeakMap<object, object>()\n\nexport function storeProxyRelationship(target: object, proxy: object) {\n\tobjectToProxy.set(target, proxy)\n\tproxyToObject.set(proxy, target)\n}\n\nexport function getExistingProxy<T extends object>(target: T): T | undefined {\n\treturn objectToProxy.get(target) as T | undefined\n}\n\nexport function trackProxyObject(proxy: object, target: object) {\n\tproxyToObject.set(proxy, target)\n}\n\nexport function unwrap<T>(obj: T): T {\n\tlet current = obj\n\twhile (current && typeof current === 'object' && current !== null && proxyToObject.has(current)) {\n\t\tcurrent = proxyToObject.get(current) as T\n\t}\n\treturn current\n}\n\nexport function isReactive(obj: any): boolean {\n\treturn proxyToObject.has(obj)\n}\n","import { recordTriggerLink } from '../../debug/debug'\nimport { bubbleUpChange, objectsWithDeepWatchers } from './deep-watch-state'\nimport { getActiveEffect, isRunning } from './effect-context'\nimport { batch, hasBatched, recordActivation } from './effects'\nimport { unwrap } from './proxy-state'\nimport { getEffectNode, watchers } from './registry'\nimport { allProps, type EffectTrigger, type Evolution, optionCall, type State } from './types'\n\nconst states = new WeakMap<object, State>()\n\nexport function addState(obj: any, evolution: Evolution) {\n\tobj = unwrap(obj)\n\tconst next = {}\n\tconst state = getState(obj)\n\tif (state) Object.assign(state, { evolution, next })\n\tstates.set(obj, next)\n}\n\n/**\n * Gets the current state of a reactive object for evolution tracking\n * @param obj - The reactive object\n * @returns The current state object\n */\nexport function getState(obj: any) {\n\tobj = unwrap(obj)\n\tlet state = states.get(obj)\n\tif (!state) {\n\t\tstate = {}\n\t\tstates.set(obj, state)\n\t}\n\treturn state\n}\n\nexport function collectEffects(\n\tobj: any,\n\tevolution: Evolution,\n\teffects: Set<EffectTrigger>,\n\tobjectWatchers: Map<any, Set<EffectTrigger>>,\n\t...keyChains: Iterable<any>[]\n) {\n\tconst sourceEffect = getActiveEffect()\n\tfor (const keys of keyChains)\n\t\tfor (const key of keys) {\n\t\t\tconst deps = objectWatchers.get(key)\n\t\t\t// console.log(`[DEBUG] collectEffects: checking ${String(key)}. Found deps: ${deps ? deps.size : 'none'}`)\n\t\t\tif (deps)\n\t\t\t\tfor (const effect of deps) {\n\t\t\t\t\t// console.log(`[DEBUG] collectEffects: found dependency ${effect.name || 'anonymous'} for ${String(key)}`)\n\t\t\t\t\tconst runningChain = isRunning(effect)\n\t\t\t\t\tif (runningChain) {\n\t\t\t\t\t\toptionCall('skipRunningEffect', effect)\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tif (!effects.has(effect)) {\n\t\t\t\t\t\teffects.add(effect)\n\t\t\t\t\t\tif (!hasBatched(effect)) recordActivation(effect, obj, evolution, key)\n\t\t\t\t\t}\n\t\t\t\t\trecordTriggerLink(sourceEffect, effect, obj, key, evolution)\n\t\t\t\t}\n\t\t}\n}\n\n/**\n * Triggers effects for a single property change\n * @param obj - The object that changed\n * @param evolution - The type of change\n * @param prop - The property that changed\n */\nexport function touched1(obj: any, evolution: Evolution, prop: any) {\n\ttouched(obj, evolution, [prop])\n}\n\n/**\n * Triggers effects for property changes\n * @param obj - The object that changed\n * @param evolution - The type of change\n * @param props - The properties that changed\n */\nexport function touched(obj: any, evolution: Evolution, props?: Iterable<any>) {\n\tobj = unwrap(obj)\n\taddState(obj, evolution)\n\tconst objectWatchers = watchers.get(obj)\n\tif (objectWatchers) {\n\t\t// Note: we have to collect effects to remove duplicates in the specific case when no batch is running\n\t\tconst effects = new Set<EffectTrigger>()\n\t\tif (props) collectEffects(obj, evolution, effects, objectWatchers, [allProps], props)\n\t\telse collectEffects(obj, evolution, effects, objectWatchers, objectWatchers.keys())\n\t\toptionCall('touched', obj, evolution, props as any[] | undefined, effects)\n\t\tbatch(Array.from(effects))\n\t}\n\n\t// Bubble up changes if this object has deep watchers\n\tif (objectsWithDeepWatchers.has(obj)) {\n\t\tbubbleUpChange(obj, evolution)\n\t}\n}\n\n/**\n * Triggers only opaque effects for property changes\n * Used by deep-touch to ensure opaque listeners are notified even when deep optimization is active\n */\nexport function touchedOpaque(obj: any, evolution: Evolution, prop: any) {\n\tobj = unwrap(obj)\n\tconst objectWatchers = watchers.get(obj)\n\tif (!objectWatchers) return\n\n\tconst deps = objectWatchers.get(prop)\n\tif (!deps) return\n\n\tconst effects = new Set<EffectTrigger>()\n\tconst sourceEffect = getActiveEffect()\n\n\tfor (const effect of deps) {\n\t\tconst node = getEffectNode(effect)\n\t\tif (!node.isOpaque) continue\n\n\t\tconst runningChain = isRunning(effect)\n\t\tif (runningChain) {\n\t\t\toptionCall('skipRunningEffect', effect)\n\t\t\tcontinue\n\t\t}\n\t\teffects.add(effect)\n\t\trecordActivation(effect, obj, evolution, prop)\n\t\trecordTriggerLink(sourceEffect, effect, obj, prop, evolution)\n\t}\n\n\tif (effects.size > 0) {\n\t\toptionCall('touched', obj, evolution, [prop], effects)\n\t\tbatch(Array.from(effects))\n\t}\n}\n","import { nativeReactive, nonReactiveMark } from './types'\n\nexport const nonReactiveObjects = new WeakSet<object>()\nexport const immutables = new Set<(tested: any) => boolean>()\nexport const absent = Symbol('absent')\n\nfunction markNonReactive<T extends object[]>(...obj: T): T[0] {\n\tfor (const o of obj) {\n\t\ttry {\n\t\t\tObject.defineProperty(o, nonReactiveMark, {\n\t\t\t\tvalue: true,\n\t\t\t\twritable: false,\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: false,\n\t\t\t})\n\t\t} catch {}\n\t\tif (!(nonReactiveMark in (o as object))) nonReactiveObjects.add(o as object)\n\t}\n\treturn obj[0]\n}\n\nexport function nonReactiveClass<T extends (new (...args: any[]) => any)[]>(...cls: T): T[0] {\n\tfor (const c of cls) if (c) (c.prototype as any)[nonReactiveMark] = true\n\treturn cls[0]\n}\n\nexport function isNonReactive(obj: any): boolean {\n\tif (obj === null || typeof obj !== 'object') return true\n\tif (nonReactiveObjects.has(obj)) return true\n\tif ((obj as any)[nonReactiveMark]) return true\n\tfor (const fn of immutables) if (fn(obj)) return true\n\treturn false\n}\n\nexport function registerNativeReactivity(\n\toriginalClass: new (...args: any[]) => any,\n\treactiveClass: new (...args: any[]) => any\n) {\n\toriginalClass.prototype[nativeReactive] = reactiveClass\n\tnonReactiveClass(reactiveClass)\n}\n\nnonReactiveClass(Date, RegExp, Error, Promise, Function)\nif (typeof window !== 'undefined') {\n\tmarkNonReactive(window, document)\n\tnonReactiveClass(Node, Element, HTMLElement, EventTarget)\n}\n\nexport { markNonReactive as nonReactive }\n","import { addState, collectEffects, touched1, touchedOpaque } from './change'\nimport { bubbleUpChange, objectsWithDeepWatchers } from './deep-watch-state'\nimport { batch } from './effects'\nimport { isNonReactive } from './non-reactive-state'\nimport { unwrap } from './proxy-state'\nimport { getEffectNode, watchers } from './registry'\nimport { allProps, type EffectCleanup, type EffectTrigger, type Evolution, optionCall, options } from './types'\n\nfunction isObject(value: any): value is object {\n\treturn typeof value === 'object' && value !== null\n}\n\nfunction isObjectLike(value: unknown): value is object {\n\treturn isObject(value)\n}\n\nfunction getPrototypeToken(value: any): object | null | undefined {\n\tif (!isObjectLike(value)) return undefined\n\tif (Array.isArray(value)) return Array.prototype\n\ttry {\n\t\treturn value.constructor\n\t} catch {\n\t\treturn undefined\n\t}\n}\n\nexport function shouldRecurseTouch(oldValue: any, newValue: any): boolean {\n\tif (oldValue === newValue) return false\n\tif (!isObjectLike(oldValue) || !isObjectLike(newValue)) return false\n\tif (isNonReactive(oldValue) || isNonReactive(newValue)) return false\n\treturn getPrototypeToken(oldValue) === getPrototypeToken(newValue)\n}\n\n/**\n * Centralized function to handle property change notifications with optional recursive touch\n * @param targetObj - The object whose property changed\n * @param prop - The property that changed\n * @param oldValue - The old value (before change)\n * @param newValue - The new value (after change)\n * @param hadProperty - Whether the property existed before (for add vs set)\n */\nexport function notifyPropertyChange(\n\ttargetObj: any,\n\tprop: any,\n\toldValue: any,\n\tnewValue: any,\n\thadProperty: boolean\n) {\n\tconst evolution: Evolution = { type: hadProperty ? 'set' : 'add', prop }\n\n\tif (\n\t\toptions.recursiveTouching &&\n\t\toldValue !== undefined &&\n\t\tshouldRecurseTouch(oldValue, newValue)\n\t) {\n\t\tconst unwrappedObj = unwrap(targetObj)\n\t\tconst origin = { obj: unwrappedObj, prop }\n\t\t// Deep touch: only notify nested property changes with origin filtering\n\t\t// Don't notify direct property change - the whole point is to avoid parent effects re-running\n\t\tdispatchNotifications(recursiveTouch(oldValue, newValue, new WeakMap(), [], origin))\n\n\t\t// Notify opaque listeners (like memoize) that always want to know about identity changes\n\t\ttouchedOpaque(targetObj, evolution, prop)\n\t} else {\n\t\ttouched1(targetObj, evolution, prop)\n\t}\n}\n\ntype VisitedPairs = WeakMap<object, WeakSet<object>>\ntype PendingNotification = {\n\ttarget: any\n\tevolution: Evolution\n\tprop: any\n\torigin?: { obj: object; prop: PropertyKey } // The property access that triggered this deep touch\n}\n\nfunction hasVisitedPair(visited: VisitedPairs, oldObj: object, newObj: object): boolean {\n\tlet mapped = visited.get(oldObj)\n\tif (!mapped) {\n\t\tmapped = new WeakSet<object>()\n\t\tvisited.set(oldObj, mapped)\n\t}\n\tif (mapped.has(newObj)) return true\n\tmapped.add(newObj)\n\treturn false\n}\n\nfunction collectObjectKeys(obj: any): Set<PropertyKey> {\n\tconst keys = new Set<PropertyKey>(Reflect.ownKeys(obj))\n\tlet proto = Object.getPrototypeOf(obj)\n\t// Continue walking while prototype exists and doesn't have its own constructor\n\t// This stops at Object.prototype (has own constructor) and class prototypes (have own constructor)\n\t// but continues for data prototypes (Object.create({}), Object.create(instance), etc.)\n\twhile (proto && !Object.hasOwn(proto, 'constructor')) {\n\t\tfor (const key of Reflect.ownKeys(proto)) keys.add(key)\n\t\tproto = Object.getPrototypeOf(proto)\n\t}\n\treturn keys\n}\n\nexport function recursiveTouch(\n\toldValue: any,\n\tnewValue: any,\n\tvisited: VisitedPairs = new WeakMap(),\n\tnotifications: PendingNotification[] = [],\n\torigin?: { obj: object; prop: PropertyKey }\n): PendingNotification[] {\n\tif (!shouldRecurseTouch(oldValue, newValue)) return notifications\n\tif (!isObjectLike(oldValue) || !isObjectLike(newValue)) return notifications\n\tif (hasVisitedPair(visited, oldValue, newValue)) return notifications\n\n\tif (Array.isArray(oldValue) && Array.isArray(newValue)) {\n\t\tdiffArrayElements(oldValue, newValue, visited, notifications, origin)\n\t\treturn notifications\n\t}\n\n\tdiffObjectProperties(oldValue, newValue, visited, notifications, origin)\n\treturn notifications\n}\n\nfunction diffArrayElements(\n\toldArray: any[] | readonly any[],\n\tnewArray: any[] | readonly any[],\n\t_visited: VisitedPairs,\n\tnotifications: PendingNotification[],\n\torigin?: { obj: object; prop: PropertyKey }\n) {\n\tconst local: PendingNotification[] = []\n\tconst oldLength = oldArray.length\n\tconst newLength = newArray.length\n\tconst max = Math.max(oldLength, newLength)\n\n\tfor (let index = 0; index < max; index++) {\n\t\tconst hasOld = index < oldLength\n\t\tconst hasNew = index < newLength\n\t\tif (hasOld && !hasNew) {\n\t\t\tlocal.push({ target: oldArray, evolution: { type: 'del', prop: index }, prop: index, origin })\n\t\t\tcontinue\n\t\t}\n\t\tif (!hasOld && hasNew) {\n\t\t\tlocal.push({ target: oldArray, evolution: { type: 'add', prop: index }, prop: index, origin })\n\t\t\tcontinue\n\t\t}\n\t\tif (!hasOld || !hasNew) continue\n\t\tconst oldEntry = unwrap(oldArray[index])\n\t\tconst newEntry = unwrap(newArray[index])\n\t\tif (!Object.is(oldEntry, newEntry)) {\n\t\t\tlocal.push({ target: oldArray, evolution: { type: 'set', prop: index }, prop: index, origin })\n\t\t}\n\t}\n\n\tif (oldLength !== newLength)\n\t\tlocal.push({\n\t\t\ttarget: oldArray,\n\t\t\tevolution: { type: 'set', prop: 'length' },\n\t\t\tprop: 'length',\n\t\t\torigin,\n\t\t})\n\n\tnotifications.push(...local)\n}\n\nfunction diffObjectProperties(\n\toldObj: any,\n\tnewObj: any,\n\tvisited: VisitedPairs,\n\tnotifications: PendingNotification[],\n\torigin?: { obj: object; prop: PropertyKey }\n) {\n\tconst oldKeys = collectObjectKeys(oldObj)\n\tconst newKeys = collectObjectKeys(newObj)\n\tconst local: PendingNotification[] = []\n\n\tfor (const key of oldKeys)\n\t\tif (!newKeys.has(key))\n\t\t\tlocal.push({ target: oldObj, evolution: { type: 'del', prop: key }, prop: key, origin })\n\n\tfor (const key of newKeys)\n\t\tif (!oldKeys.has(key))\n\t\t\tlocal.push({ target: oldObj, evolution: { type: 'add', prop: key }, prop: key, origin })\n\n\tfor (const key of newKeys) {\n\t\tif (!oldKeys.has(key)) continue\n\t\tconst oldEntry = unwrap((oldObj as any)[key])\n\t\tconst newEntry = unwrap((newObj as any)[key])\n\t\tif (shouldRecurseTouch(oldEntry, newEntry)) {\n\t\t\trecursiveTouch(oldEntry, newEntry, visited, notifications, origin)\n\t\t} else if (!Object.is(oldEntry, newEntry)) {\n\t\t\tlocal.push({ target: oldObj, evolution: { type: 'set', prop: key }, prop: key, origin })\n\t\t}\n\t}\n\n\tnotifications.push(...local)\n}\n\n/**\n * Checks if an effect or any of its ancestors is in the allowed set\n */\nfunction hasAncestorInSet(\n\teffect: EffectTrigger | EffectCleanup,\n\tallowedSet: Set<EffectTrigger | EffectCleanup>\n): boolean {\n\tlet current: EffectTrigger | EffectCleanup | undefined = effect\n\tconst visited = new WeakSet<EffectTrigger | EffectCleanup>()\n\twhile (current && !visited.has(current)) {\n\t\tvisited.add(current)\n\t\tif (allowedSet.has(current)) return true\n\t\tconst node = getEffectNode(current as EffectTrigger)\n\t\tcurrent = node.parent\n\t}\n\treturn false\n}\n\nexport function dispatchNotifications(notifications: PendingNotification[]) {\n\tif (!notifications.length) return\n\tconst combinedEffects = new Set<EffectTrigger>()\n\n\t// Extract origin from first notification (all should have the same origin from a single deep touch)\n\tconst origin = notifications[0]?.origin\n\tlet allowedEffects: Set<EffectTrigger> | undefined\n\n\t// If origin exists, compute allowed effects (those that depend on origin.obj[origin.prop])\n\tif (origin) {\n\t\tallowedEffects = new Set<EffectTrigger>()\n\t\tconst originWatchers = watchers.get(origin.obj)\n\t\tif (originWatchers) {\n\t\t\tconst originEffects = new Set<EffectTrigger>()\n\t\t\tcollectEffects(\n\t\t\t\torigin.obj,\n\t\t\t\t{ type: 'set', prop: origin.prop },\n\t\t\t\toriginEffects,\n\t\t\t\toriginWatchers,\n\t\t\t\t[allProps],\n\t\t\t\t[origin.prop]\n\t\t\t)\n\t\t\tfor (const effect of originEffects) allowedEffects.add(effect)\n\t\t}\n\t\t// If no allowed effects, skip all notifications (no one should be notified)\n\t\tif (allowedEffects.size === 0) return\n\t}\n\n\tfor (const { target, evolution, prop } of notifications) {\n\t\tif (!isObjectLike(target)) continue\n\t\tconst obj = unwrap(target)\n\t\taddState(obj, evolution)\n\t\tconst objectWatchers = watchers.get(obj)\n\t\tlet currentEffects: Set<EffectTrigger> | undefined\n\t\tconst propsArray = [prop]\n\t\tif (objectWatchers) {\n\t\t\t// console.log(`[DEBUG] dispatchNotifications: processing ${obj.constructor.name} (has watchers)`)\n\t\t\tcurrentEffects = new Set<EffectTrigger>()\n\t\t\tcollectEffects(obj, evolution, currentEffects, objectWatchers, [allProps], propsArray)\n\n\t\t\t// Filter effects by ancestor chain if origin exists\n\t\t\t// Include effects that either directly depend on origin or have an ancestor that does\n\t\t\tif (origin && allowedEffects) {\n\t\t\t\tconst filteredEffects = new Set<EffectTrigger>()\n\t\t\t\tfor (const effect of currentEffects) {\n\t\t\t\t\t// Check if effect itself is allowed OR has an ancestor that is allowed\n\t\t\t\t\tif (allowedEffects.has(effect) || hasAncestorInSet(effect, allowedEffects)) {\n\t\t\t\t\t\tfilteredEffects.add(effect)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcurrentEffects = filteredEffects\n\t\t\t}\n\n\t\t\tfor (const effect of currentEffects) combinedEffects.add(effect)\n\t\t}\n\t\toptionCall('touched', obj, evolution, propsArray, currentEffects)\n\t\tif (objectsWithDeepWatchers.has(obj)) bubbleUpChange(obj, evolution)\n\t}\n\tif (combinedEffects.size) batch([...combinedEffects])\n}\n","import { getActiveEffect } from './effect-context'\nimport { unwrap } from './proxy-state'\nimport { effectToReactiveObjects, watchers } from './registry'\nimport { allProps, type EffectTrigger } from './types'\n\n/**\n * Marks a property as a dependency of the current effect\n * @param obj - The object containing the property\n * @param prop - The property name (defaults to allProps)\n */\nexport function dependant(obj: any, prop: any = allProps) {\n\tobj = unwrap(obj)\n\tconst currentActiveEffect = getActiveEffect()\n\n\t// Early return if no active effect, tracking disabled, or invalid prop\n\tif (!currentActiveEffect || (typeof prop === 'symbol' && prop !== allProps)) return\n\n\tif ('dependencyHook' in currentActiveEffect) {\n\t\t// @ts-expect-error We declared it nowhere - it's okay as it's really internal and for edge-case debug purpose only\n\t\tcurrentActiveEffect.dependencyHook(obj, prop)\n\t}\n\tlet objectWatchers = watchers.get(obj)\n\tif (!objectWatchers) {\n\t\tobjectWatchers = new Map<PropertyKey, Set<EffectTrigger>>()\n\t\twatchers.set(obj, objectWatchers)\n\t}\n\tlet deps = objectWatchers.get(prop)\n\tif (!deps) {\n\t\tdeps = new Set<EffectTrigger>()\n\t\tobjectWatchers.set(prop, deps)\n\t}\n\tdeps.add(currentActiveEffect)\n\n\t// Track which reactive objects this effect is watching\n\tconst effectObjects = effectToReactiveObjects.get(currentActiveEffect)\n\tif (effectObjects) {\n\t\teffectObjects.add(obj)\n\t} else {\n\t\teffectToReactiveObjects.set(currentActiveEffect, new Set([obj]))\n\t}\n}\n","import { decorator } from '../decorator'\nimport { mixin } from '../mixins'\nimport { FoolProof, isOwnAccessor } from '../utils'\nimport { touched1 } from './change'\nimport { notifyPropertyChange } from './deep-touch'\nimport {\n\taddBackReference,\n\tbubbleUpChange,\n\tneedsBackReferences,\n\tobjectsWithDeepWatchers,\n\tremoveBackReference,\n} from './deep-watch-state'\nimport { untracked } from './effects'\nimport { absent, isNonReactive } from './non-reactive-state'\nimport {\n\tgetExistingProxy,\n\tproxyToObject,\n\tstoreProxyRelationship,\n\ttrackProxyObject,\n\tunwrap,\n} from './proxy-state'\nimport { dependant } from './tracking'\nimport {\n\tallProps,\n\tnativeReactive,\n\tnonReactiveMark,\n\toptions,\n\tReactiveError,\n\tReactiveErrorCode,\n\tunreactiveProperties,\n} from './types'\nexport const metaProtos = new WeakMap()\n\nconst hasReentry: any[] = []\nconst reactiveHandlers = {\n\t[Symbol.toStringTag]: 'MutTs Reactive',\n\tget(obj: any, prop: PropertyKey, receiver: any) {\n\t\tif (obj && typeof obj === 'object' && prop !== Symbol.toStringTag) {\n\t\t\tconst metaProto = metaProtos.get(obj.constructor)\n\t\t\tif (metaProto && Object.hasOwn(metaProto, prop)) {\n\t\t\t\tconst desc = Object.getOwnPropertyDescriptor(metaProto, prop)!\n\t\t\t\tif (desc.get) {\n\t\t\t\t\tif (!Object.hasOwn(obj, prop)) return desc.get.call(obj)\n\t\t\t\t\t// For own properties (e.g., array length): only override if writable/configurable\n\t\t\t\t\tconst ownDesc = Object.getOwnPropertyDescriptor(obj, prop)!\n\t\t\t\t\tif (ownDesc.configurable || ownDesc.writable || ownDesc.get)\n\t\t\t\t\t\treturn desc.get.call(obj)\n\t\t\t\t} else if (!Object.hasOwn(obj, prop))\n\t\t\t\t\treturn (...args: any[]) => desc.value.apply(obj, args)\n\t\t\t}\n\t\t}\n\t\tif (prop === nonReactiveMark) return false\n\t\tconst unwrappedObj = unwrap(obj)\n\t\t// Check if this property is marked as unreactive\n\t\tif (unwrappedObj[unreactiveProperties]?.has(prop) || typeof prop === 'symbol')\n\t\t\treturn FoolProof.get(obj, prop, receiver)\n\n\t\t// Check if property exists and if it's an own property (cached for later use)\n\t\tconst hasProp = Reflect.has(receiver, prop)\n\t\tconst isOwnProp = hasProp && Object.hasOwn(receiver, prop)\n\t\tconst isInheritedAccess = hasProp && !isOwnProp\n\n\t\t// For accessor properties, check the unwrapped object to see if it's an accessor\n\t\t// This ensures ignoreAccessors works correctly even after operations like Object.setPrototypeOf\n\t\tconst shouldIgnoreAccessor =\n\t\t\toptions.ignoreAccessors &&\n\t\t\tisOwnProp &&\n\t\t\t(isOwnAccessor(receiver, prop) || isOwnAccessor(unwrappedObj, prop))\n\n\t\t// Depend if...\n\t\tif (\n\t\t\t!hasProp ||\n\t\t\t(!(options.instanceMembers && isInheritedAccess && obj instanceof Object) &&\n\t\t\t\t!shouldIgnoreAccessor)\n\t\t)\n\t\t\tdependant(obj, prop)\n\n\t\t// Watch the whole prototype chain when requested or for null-proto objects\n\t\tif (isInheritedAccess && (!options.instanceMembers || !(obj instanceof Object))) {\n\t\t\tlet current = reactiveObject(Object.getPrototypeOf(obj))\n\t\t\twhile (current && current !== Object.prototype) {\n\t\t\t\tdependant(current, prop)\n\t\t\t\tif (Object.hasOwn(current, prop)) break\n\t\t\t\tlet next = reactiveObject(Object.getPrototypeOf(current))\n\t\t\t\tif (next === current) {\n\t\t\t\t\tnext = reactiveObject(Object.getPrototypeOf(unwrap(current)))\n\t\t\t\t}\n\t\t\t\tcurrent = next\n\t\t\t}\n\t\t}\n\t\tconst value = FoolProof.get(obj, prop, receiver)\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tconst reactiveValue = reactiveObject(value)\n\n\t\t\t// Only create back-references if this object needs them\n\t\t\tif (needsBackReferences(obj)) {\n\t\t\t\taddBackReference(reactiveValue, obj, prop)\n\t\t\t}\n\n\t\t\treturn reactiveValue\n\t\t}\n\t\treturn value\n\t},\n\tset(obj: any, prop: PropertyKey, value: any, receiver: any): boolean {\n\t\t// Read old value directly from unwrapped object to avoid triggering dependency tracking\n\t\tconst unwrappedObj = unwrap(obj)\n\t\tconst unwrappedReceiver = unwrap(receiver)\n\n\t\t// Check if this property is marked as unreactive\n\t\tif (unwrappedObj[unreactiveProperties]?.has(prop) || unwrappedObj !== unwrappedReceiver)\n\t\t\treturn FoolProof.set(obj, prop, value, receiver)\n\t\tconst newValue = unwrap(value)\n\t\t// metaProto setter dispatch (e.g., reactive array length)\n\t\tif (obj && typeof obj === 'object' && prop !== Symbol.toStringTag) {\n\t\t\tconst metaProto = obj.constructor && metaProtos.get(obj.constructor)\n\t\t\tif (metaProto && Object.hasOwn(metaProto, prop)) {\n\t\t\t\tconst desc = Object.getOwnPropertyDescriptor(metaProto, prop)!\n\t\t\t\tif (desc.set) {\n\t\t\t\t\tdesc.set.call(obj, newValue)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Read old value, using withEffect(undefined, ...) for getter-only accessors to avoid\n\t\t// breaking memoization dependency tracking during SET operations\n\t\tlet oldVal = absent\n\t\tif (Reflect.has(unwrappedReceiver, prop)) {\n\t\t\t// Check descriptor on both receiver and target to handle proxy cases\n\t\t\tconst receiverDesc = Object.getOwnPropertyDescriptor(unwrappedReceiver, prop)\n\t\t\tconst targetDesc = Object.getOwnPropertyDescriptor(unwrappedObj, prop)\n\t\t\tconst desc = receiverDesc || targetDesc\n\t\t\t// We *need* to use `receiver` and not `unwrappedObj` here, otherwise we break\n\t\t\t// the dependency tracking for memoized getters\n\t\t\tif (desc?.get && !desc?.set) {\n\t\t\t\toldVal = untracked(() => Reflect.get(unwrappedObj, prop, receiver))\n\t\t\t} else {\n\t\t\t\toldVal = untracked(() => Reflect.get(unwrappedObj, prop, receiver))\n\t\t\t}\n\t\t}\n\t\tif (objectsWithDeepWatchers.has(obj)) {\n\t\t\tif (typeof oldVal === 'object' && oldVal !== null) {\n\t\t\t\tremoveBackReference(oldVal, obj, prop)\n\t\t\t}\n\t\t\tif (typeof newValue === 'object' && newValue !== null) {\n\t\t\t\tconst reactiveValue = reactiveObject(newValue)\n\t\t\t\taddBackReference(reactiveValue, obj, prop)\n\t\t\t}\n\t\t}\n\n\t\tif (oldVal !== newValue) {\n\t\t\t// For getter-only accessors, Reflect.set() may fail, but we still return true\n\t\t\t// to avoid throwing errors. Only proceed with change notifications if set succeeded.\n\t\t\tif (FoolProof.set(obj, prop, newValue, receiver)) {\n\t\t\t\tnotifyPropertyChange(obj, prop, oldVal, newValue, oldVal !== absent)\n\t\t\t}\n\t\t}\n\t\treturn true\n\t},\n\thas(obj: any, prop: PropertyKey): boolean {\n\t\tif (hasReentry.includes(obj))\n\t\t\tthrow new ReactiveError(\n\t\t\t\t`[reactive] Circular dependency detected in 'has' check for property '${String(prop)}'`,\n\t\t\t\t{\n\t\t\t\t\tcode: ReactiveErrorCode.CycleDetected,\n\t\t\t\t\tcycle: [], // We don't have the full cycle here, but we know it involves obj\n\t\t\t\t}\n\t\t\t)\n\t\thasReentry.push(obj)\n\t\tdependant(obj, prop)\n\t\tconst rv = Reflect.has(obj, prop)\n\t\thasReentry.pop()\n\t\treturn rv\n\t},\n\tdeleteProperty(obj: any, prop: PropertyKey): boolean {\n\t\tif (!Object.hasOwn(obj, prop)) return false\n\n\t\tconst oldVal = (obj as any)[prop]\n\n\t\t// Remove back-references if this object has deep watchers\n\t\tif (objectsWithDeepWatchers.has(obj) && typeof oldVal === 'object' && oldVal !== null) {\n\t\t\tremoveBackReference(oldVal, obj, prop)\n\t\t}\n\n\t\tdelete (obj as any)[prop]\n\t\ttouched1(obj, { type: 'del', prop }, prop)\n\n\t\t// Bubble up changes if this object has deep watchers\n\t\tif (objectsWithDeepWatchers.has(obj)) {\n\t\t\tbubbleUpChange(obj, { type: 'del', prop })\n\t\t}\n\n\t\treturn true\n\t},\n\townKeys(obj: any): (string | symbol)[] {\n\t\tdependant(obj, allProps)\n\t\treturn Reflect.ownKeys(obj)\n\t},\n} as const\n\nconst reactiveClasses = new WeakSet<Function>()\n\n// Create the ReactiveBase mixin\n/**\n * Base mixin for reactive classes that provides proper constructor reactivity\n * Solves constructor reactivity issues in complex inheritance trees\n */\nexport const ReactiveBase = mixin((base) => {\n\tclass ReactiveMixin extends base {\n\t\tconstructor(...args: any[]) {\n\t\t\tsuper(...args)\n\t\t\t// Only apply reactive transformation if the class is marked with @reactive\n\t\t\t// This allows the mixin to work properly with method inheritance\n\t\t\t// biome-ignore lint/correctness/noConstructorReturn: This is the whole point here\n\t\t\treturn reactiveClasses.has(new.target) ? reactive(this) : this\n\t\t}\n\t}\n\treturn ReactiveMixin\n})\nfunction reactiveObject<T>(anyTarget: T): T {\n\tif (!anyTarget || typeof anyTarget !== 'object') return anyTarget\n\tconst target = anyTarget as any\n\t// If target is already a proxy, return it\n\tif (isNonReactive(target)) return target as T\n\tconst isProxy = proxyToObject.has(target)\n\tif (isProxy) return target as T\n\n\t// If we already have a proxy for this object, return it (optimized: get returns undefined if not found)\n\tconst existing = getExistingProxy(target)\n\tif (existing !== undefined) return existing as T\n\n\tconst proxied =\n\t\tnativeReactive in target && !(target instanceof target[nativeReactive])\n\t\t\t? new target[nativeReactive](target)\n\t\t\t: target\n\tif (proxied !== target) trackProxyObject(proxied, target)\n\tconst proxy = new Proxy(proxied, reactiveHandlers)\n\n\t// Store the relationships\n\tstoreProxyRelationship(target, proxy)\n\treturn proxy as T\n}\n\n/**\n * Main decorator for making classes reactive\n * Automatically makes class instances reactive when created\n */\nexport const reactive = decorator({\n\tclass(original) {\n\t\tif (original.prototype instanceof ReactiveBase) {\n\t\t\treactiveClasses.add(original)\n\t\t\treturn original\n\t\t}\n\n\t\tclass Reactive extends original {\n\t\t\tconstructor(...args: any[]) {\n\t\t\t\tsuper(...args)\n\t\t\t\tif (new.target !== Reactive && !reactiveClasses.has(new.target))\n\t\t\t\t\toptions.warn(\n\t\t\t\t\t\t`${(original as any).name} has been inherited by ${this.constructor.name} that is not reactive.\n@reactive decorator must be applied to the leaf class OR classes have to extend ReactiveBase.`\n\t\t\t\t\t)\n\t\t\t\t// biome-ignore lint/correctness/noConstructorReturn: This is the whole point here\n\t\t\t\treturn reactive(this)\n\t\t\t}\n\t\t}\n\t\tObject.defineProperty(Reactive, 'name', {\n\t\t\tvalue: `Reactive<${original.name}>`,\n\t\t})\n\t\treturn Reactive as any\n\t},\n\tget(original: any) {\n\t\treturn reactiveObject(original)\n\t},\n\tdefault: reactiveObject,\n})\n\n/**\n * Gets the original, non-reactive object from a reactive proxy\n * @param proxy - The reactive proxy\n * @returns The original object\n */\nexport { isReactive, objectToProxy, proxyToObject, unwrap } from './proxy-state'\n","import { effect } from '../src/reactive/effects'\nimport type { LineageSegment } from './lineage'\nimport { reactive } from '../src/reactive/proxy'\n\n/**\n * Displays a floating reactive panel in the browser showing the lineage of triggered effects.\n */\nexport function showLineagePanel() {\n\tif (typeof document === 'undefined') return\n\n\t// Detect color scheme preference\n\tconst isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches\n\t\n\t// Color schemes\n\tconst colors = isDarkMode ? {\n\t\tpanelBg: 'rgba(30, 30, 30, 0.95)',\n\t\tpanelBorder: '#444',\n\t\theaderBg: '#8B4513',\n\t\theaderText: '#ffffff',\n\t\tcloseBtn: '#ffffff',\n\t\tplaceholderText: '#999',\n\t\tsegmentBorder: '#8B4513',\n\t\ttitleText: '#ffffff',\n\t\tframeText: '#ccc',\n\t\tatText: '#888',\n\t\tlinkText: '#58a6ff',\n\t} : {\n\t\tpanelBg: 'rgba(255, 255, 255, 0.95)',\n\t\tpanelBorder: '#ddd',\n\t\theaderBg: '#704214',\n\t\theaderText: '#ffffff',\n\t\tcloseBtn: '#ffffff',\n\t\tplaceholderText: '#666',\n\t\tsegmentBorder: '#704214',\n\t\ttitleText: '#222',\n\t\tframeText: '#555',\n\t\tatText: '#999',\n\t\tlinkText: '#005cc5',\n\t}\n\n\tconst state = reactive({\n\t\tactiveLineage: [] as LineageSegment[],\n\t\tisVisible: true,\n\t})\n\n\t// Track the last triggered effect\n\t/* TODO: this is really not how effect triggers work - `onEffectTrigger` is called when \"this effect\" (here nothing) is triggered\n\tWhat we could try is to add events or such in zones... but it's really cosmetic and the whole panel is buggy - not worth doing yet (260206).\n\tonEffectTrigger((_obj, _evol, _prop, effectTrigger) => {\n\t\tstate.activeLineage = getLineage(effectTrigger)\n\t})*/\n\n\t// UI Creation\n\tconst panel = document.createElement('div')\n\tpanel.id = 'mutts-lineage-panel'\n\tObject.assign(panel.style, {\n\t\tposition: 'fixed',\n\t\tbottom: '20px',\n\t\tright: '20px',\n\t\twidth: '400px',\n\t\tmaxHeight: '80vh',\n\t\tbackgroundColor: colors.panelBg,\n\t\tbackdropFilter: 'blur(10px)',\n\t\tborder: `1px solid ${colors.panelBorder}`,\n\t\tborderRadius: '12px',\n\t\tboxShadow: '0 10px 25px rgba(0,0,0,0.15)',\n\t\tzIndex: '999999',\n\t\tfontFamily: 'Inter, system-ui, sans-serif',\n\t\tfontSize: '12px',\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'column',\n\t\toverflow: 'hidden',\n\t\ttransition: 'opacity 0.3s, transform 0.3s',\n\t})\n\n\tconst header = document.createElement('div')\n\tObject.assign(header.style, {\n\t\tpadding: '12px 16px',\n\t\tbackground: colors.headerBg,\n\t\tcolor: colors.headerText,\n\t\tfontWeight: '600',\n\t\tdisplay: 'flex',\n\t\tjustifyContent: 'space-between',\n\t\talignItems: 'center',\n\t\tcursor: 'grab',\n\t})\n\theader.innerHTML = '<span><span style=\"font-size: 14px; margin-right: 5px;\">🦴</span> Mutts Lineage</span>'\n\t\n\tconst closeBtn = document.createElement('button')\n\tcloseBtn.innerText = '×'\n\tObject.assign(closeBtn.style, {\n\t\tbackground: 'none',\n\t\tborder: 'none',\n\t\tcolor: colors.closeBtn,\n\t\tfontSize: '20px',\n\t\tcursor: 'pointer',\n\t\tpadding: '0 5px',\n\t})\n\tcloseBtn.onclick = () => {\n\t\tstate.isVisible = false\n\t}\n\theader.appendChild(closeBtn)\n\tpanel.appendChild(header)\n\n\tconst content = document.createElement('div')\n\tObject.assign(content.style, {\n\t\tpadding: '16px',\n\t\toverflowY: 'auto',\n\t\tflex: '1',\n\t})\n\tpanel.appendChild(content)\n\n\tdocument.body.appendChild(panel)\n\n\t// Reactivity: Update Visibility\n\teffect(() => {\n\t\tpanel.style.opacity = state.isVisible ? '1' : '0'\n\t\tpanel.style.pointerEvents = state.isVisible ? 'all' : 'none'\n\t\tpanel.style.transform = state.isVisible ? 'translateY(0)' : 'translateY(20px)'\n\t})\n\n\t// Reactivity: Update Content\n\teffect(() => {\n\t\tif (state.activeLineage.length === 0) {\n\t\t\tcontent.innerHTML = `<div style=\"color: ${colors.placeholderText}; font-style: italic; text-align: center; margin-top: 20px;\">No effect triggered yet...</div>`\n\t\t\treturn\n\t\t}\n\n\t\tcontent.innerHTML = ''\n\t\tstate.activeLineage.forEach((segment, i) => {\n\t\t\tconst segDiv = document.createElement('div')\n\t\t\tObject.assign(segDiv.style, {\n\t\t\t\tmarginBottom: '16px',\n\t\t\t\tborderLeft: `2px solid ${colors.segmentBorder}`,\n\t\t\t\tpaddingLeft: '12px',\n\t\t\t})\n\n\t\t\tconst title = document.createElement('div')\n\t\t\tObject.assign(title.style, {\n\t\t\t\tfontWeight: 'bold',\n\t\t\t\tmarginBottom: '6px',\n\t\t\t\tcolor: colors.titleText,\n\t\t\t})\n\t\t\ttitle.innerText = i === 0 ? `📍 Current: ${segment.effectName}` : `↖ Effect: ${segment.effectName}`\n\t\t\tsegDiv.appendChild(title)\n\n\t\t\tsegment.stack.forEach(frame => {\n\t\t\t\tconst frameDiv = document.createElement('div')\n\t\t\t\tObject.assign(frameDiv.style, {\n\t\t\t\t\tcolor: colors.frameText,\n\t\t\t\t\tmarginBottom: '3px',\n\t\t\t\t\tfontSize: '11px',\n\t\t\t\t\twhiteSpace: 'nowrap',\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\ttextOverflow: 'ellipsis',\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t})\n\t\t\t\tframeDiv.title = frame.raw\n\t\t\t\tframeDiv.innerHTML = `<span style=\"color: ${colors.atText}\">at</span> ${frame.functionName} <span style=\"color: ${colors.linkText}; text-decoration: underline;\">(${frame.fileName.split('/').pop()}:${frame.lineNumber})</span>`\n\t\t\t\tsegDiv.appendChild(frameDiv)\n\t\t\t})\n\n\t\t\tcontent.appendChild(segDiv)\n\t\t})\n\t})\n}\n","/**\n * Debug utilities for the reactivity system\n * - Captures effect metadata (names, parent relationships)\n * - Records cause → consequence edges with object/prop labels\n * - Provides graph data for tooling (DevTools panel, etc.)\n */\n\nimport { effect, raiseEffectTrackers } from '../src/reactive/effects'\nimport { effectToReactiveObjects, getEffectNode, getRoot, markWithRoot } from '../src/reactive/registry'\nimport { allProps, type EffectCleanup, type EffectTrigger, type Evolution, options } from '../src/reactive/types'\nimport { getStackFrame, getLineage, formatLineage, wrapLineageForDebug, lineageFormatter, nodeLineage, nodeLineageLegacy } from './lineage'\nimport { showLineagePanel } from './lineage-panel'\n\n/**\n * Log an error with detailed context if error logging is enabled\n */\nexport function logError(error: Error, context: 'throw' | 'catch', effect?: any) {\n\tif (!debugOptions.logErrors) return\n\t\n\tconst contextStr = context === 'throw' ? '🔴 Thrown' : '🟡 Caught'\n\t\n\tconsole.group(`${contextStr} Error: ${error.message}`)\n\tconsole.error('Error:', error)\n\t\n\t// Try to get effect name if available\n\tif (effect && typeof effect === 'object' && effect.name) {\n\t\tconsole.log('Effect:', effect.name)\n\t}\n\t\n\tconsole.groupEnd()\n}\n\n// Log initialization for debugging\n\nconst EXTERNAL_SOURCE = Symbol('external-source')\ntype SourceEffect = EffectTrigger | typeof EXTERNAL_SOURCE\n\nlet devtoolsEnabled = false\n\n// Registry for debugging (populated lazily when DevTools are enabled)\nconst debugEffectRegistry = new Set<EffectTrigger>()\nconst debugObjectRegistry = new Set<object>()\n\n// Human-friendly names\nconst effectNames = new WeakMap<EffectTrigger | EffectCleanup, string>()\nconst objectNames = new WeakMap<object, string>()\nlet effectCounter = 0\nlet objectCounter = 0\n\n// Debug options system\nexport const debugOptions = {\n\t/**\n\t * Whether DevTools are enabled\n\t */\n\tget enabled() {\n\t\treturn devtoolsEnabled\n\t},\n\tlogErrors: false\n}\n\n// Cause/consequence edges aggregated by (source, target, descriptor)\ninterface TriggerRecord {\n\tlabel: string\n\tobject: object\n\tprop: any\n\tevolution: Evolution\n\tcount: number\n\tlastTriggered: number\n}\n\nconst triggerGraph = new Map<SourceEffect, Map<EffectTrigger, Map<string, TriggerRecord>>>()\n\nexport type NodeKind = 'effect' | 'external' | 'state'\nexport type EdgeKind = 'cause' | 'dependency' | 'trigger'\n\nexport interface EffectNode {\n\tid: string\n\tlabel: string\n\ttype: NodeKind\n\tdepth: number\n\tparentId?: string\n\tdebugName?: string\n}\n\nexport interface ObjectNode {\n\tid: string\n\tlabel: string\n\ttype: NodeKind\n\tdebugName?: string\n}\n\nexport interface GraphEdge {\n\tid: string\n\tsource: string\n\ttarget: string\n\ttype: EdgeKind\n\tlabel: string\n\tcount?: number\n}\n\nexport interface ReactivityGraph {\n\tnodes: Array<EffectNode | ObjectNode>\n\tedges: GraphEdge[]\n\tmeta: {\n\t\tgeneratedAt: number\n\t\tdevtoolsEnabled: boolean\n\t}\n}\n\nfunction ensureEffectName(effect: EffectTrigger | EffectCleanup): string {\n\tlet name = effectNames.get(effect)\n\tif (!name) {\n\t\tconst root = getRoot(effect)\n\t\tname = root?.name?.trim() || `effect_${++effectCounter}`\n\t\teffectNames.set(effect, name)\n\t}\n\treturn name\n}\n\nfunction ensureObjectName(obj: object): string {\n\tlet name = objectNames.get(obj)\n\tif (!name) {\n\t\tconst ctorName = (obj as any)?.constructor?.name\n\t\tconst base = ctorName && ctorName !== 'Object' ? ctorName : 'object'\n\t\tname = `${base}_${++objectCounter}`\n\t\tobjectNames.set(obj, name)\n\t}\n\treturn name\n}\n\nfunction describeProp(obj: object, prop: any): string {\n\tconst objectName = ensureObjectName(obj)\n\tif (prop === allProps) return `${objectName}.*`\n\tif (typeof prop === 'symbol') return `${objectName}.${prop.description ?? prop.toString()}`\n\treturn `${objectName}.${String(prop)}`\n}\n\nfunction addEffectToRegistry(effect: EffectTrigger) {\n\tif (!effect || debugEffectRegistry.has(effect)) return\n\tdebugEffectRegistry.add(effect)\n\tconst deps = effectToReactiveObjects.get(effect)\n\tif (deps) {\n\t\tfor (const obj of deps) {\n\t\t\tdocumentObject(obj)\n\t\t}\n\t}\n}\n\nfunction documentObject(obj: object) {\n\tif (!debugObjectRegistry.has(obj)) {\n\t\tdbRegisterObject(obj)\n\t}\n}\n\nfunction dbRegisterObject(obj: object) {\n\tdebugObjectRegistry.add(obj)\n\tensureObjectName(obj)\n}\n\nfunction ensureParentChains(effects: Set<EffectTrigger>) {\n\tconst queue = Array.from(effects)\n\tfor (let i = 0; i < queue.length; i++) {\n\t\tconst effect = queue[i]\n\t\tconst parent = getEffectNode(effect).parent\n\t\tif (parent && !effects.has(parent)) {\n\t\t\teffects.add(parent)\n\t\t\tqueue.push(parent)\n\t\t}\n\t}\n}\n\nfunction ensureTriggerContainers(source: SourceEffect) {\n\tlet targetMap = triggerGraph.get(source)\n\tif (!targetMap) {\n\t\ttargetMap = new Map()\n\t\ttriggerGraph.set(source, targetMap)\n\t}\n\treturn targetMap\n}\n\nfunction ensureTriggerRecord(\n\tsource: SourceEffect,\n\ttarget: EffectTrigger,\n\tlabel: string,\n\tobj: object,\n\tprop: any,\n\tevolution: Evolution\n): TriggerRecord {\n\tconst targetMap = ensureTriggerContainers(source)\n\tlet labelMap = targetMap.get(target)\n\tif (!labelMap) {\n\t\tlabelMap = new Map()\n\t\ttargetMap.set(target, labelMap)\n\t}\n\tlet record = labelMap.get(label)\n\tif (!record) {\n\t\trecord = { label, object: obj, prop, evolution, count: 0, lastTriggered: Date.now() }\n\t\tlabelMap.set(label, record)\n\t}\n\treturn record\n}\n\n/**\n * Assign a debug-friendly name to an effect (shown in DevTools)\n */\nexport function setEffectName(effect: EffectTrigger | EffectCleanup, name: string) {\n\teffectNames.set(effect, name)\n}\n\n/**\n * Assign a debug-friendly name to a reactive object\n */\nexport function setObjectName(obj: object, name: string) {\n\tobjectNames.set(obj, name)\n\tdebugObjectRegistry.add(obj)\n}\n\n/**\n * Register an effect so it appears in the DevTools graph\n */\nexport function registerEffectForDebug(effect: EffectTrigger) {\n\tif (!effect || !devtoolsEnabled) return\n\taddEffectToRegistry(effect)\n}\n\n/**\n * Register a reactive object so it appears in the DevTools graph\n */\nexport function registerObjectForDebug(obj: object) {\n\tif (!devtoolsEnabled) return\n\tdocumentObject(obj)\n}\n\n/**\n * Records a cause → consequence relationship between effects.\n * @param source - The effect performing the write (undefined if external/user input)\n * @param target - The effect that re-ran because of the write\n * @param obj - The reactive object that changed\n * @param prop - The property that changed\n * @param evolution - The type of change (set/add/del/bunch)\n */\nexport function recordTriggerLink(\n\tsource: EffectTrigger | undefined,\n\ttarget: EffectTrigger,\n\tobj: object,\n\tprop: any,\n\tevolution: Evolution\n) {\n\traiseEffectTrackers(target, obj, evolution, prop)\n\tif (options.introspection.enableHistory) {\n\t\taddToMutationHistory(source, target, obj, prop, evolution)\n\t}\n\tif (!devtoolsEnabled) return\n\taddEffectToRegistry(target)\n\tif (source) addEffectToRegistry(source)\n\tconst descriptor = describeProp(obj, prop)\n\tconst record = ensureTriggerRecord(\n\t\tsource ?? EXTERNAL_SOURCE,\n\t\ttarget,\n\t\tdescriptor,\n\t\tobj,\n\t\tprop,\n\t\tevolution\n\t)\n\trecord.count += 1\n\trecord.lastTriggered = Date.now()\n\tdocumentObject(obj)\n}\n\n/**\n * Traces back the chain of triggers that led to a specific effect\n * @param effect The effect to trace back\n * @param limit Max depth\n */\nexport function getTriggerChain(effect: EffectTrigger, limit = 5): string[] {\n\tconst chain: string[] = []\n\tlet current = effect\n\tfor (let i = 0; i < limit; i++) {\n\t\t// Find who triggered 'current'\n\t\t// We need to reverse search the triggerGraph (source -> target)\n\t\t// This is expensive O(Edges) but okay for error reporting\n\t\tlet foundSource: EffectTrigger | undefined\n\t\tlet foundReason = ''\n\n\t\tsearch: for (const [source, targetMap] of triggerGraph) {\n\t\t\tfor (const [target, labelMap] of targetMap) {\n\t\t\t\tif (target === current) {\n\t\t\t\t\t// Found a source! Use the most recent trigger record\n\t\t\t\t\tlet lastTime = 0\n\t\t\t\t\tfor (const record of labelMap.values()) {\n\t\t\t\t\t\tif (record.lastTriggered > lastTime) {\n\t\t\t\t\t\t\tlastTime = record.lastTriggered\n\t\t\t\t\t\t\tfoundReason = record.label\n\t\t\t\t\t\t\tfoundSource = source === EXTERNAL_SOURCE ? undefined : (source as EffectTrigger)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (foundSource || foundReason) break search\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (foundSource) {\n\t\t\tchain.push(\n\t\t\t\t`${ensureEffectName(foundSource)} -> (${foundReason}) -> ${ensureEffectName(current)}`\n\t\t\t)\n\t\t\tcurrent = foundSource\n\t\t} else if (foundReason) {\n\t\t\tchain.push(`External -> (${foundReason}) -> ${ensureEffectName(current)}`)\n\t\t\tbreak\n\t\t} else {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn chain.reverse()\n}\n\nfunction buildEffectNodes(allEffects: Set<EffectTrigger>) {\n\tconst nodes: EffectNode[] = []\n\tconst nodeByEffect = new Map<EffectTrigger, EffectNode>()\n\n\tconst ordered = Array.from(allEffects)\n\tfor (const effect of ordered) {\n\t\tconst label = ensureEffectName(effect)\n\t\tconst node: EffectNode = {\n\t\t\tid: `effect_${nodes.length}`,\n\t\t\tlabel,\n\t\t\ttype: 'effect',\n\t\t\tdepth: 0,\n\t\t\tdebugName: label,\n\t\t}\n\t\tnodes.push(node)\n\t\tnodeByEffect.set(effect, node)\n\t}\n\n\tconst depthCache = new Map<EffectTrigger, number>()\n\tconst computeDepth = (effect: EffectTrigger | undefined): number => {\n\t\tif (!effect) return 0\n\t\tconst cached = depthCache.get(effect)\n\t\tif (cached !== undefined) return cached\n\t\tconst parent = getEffectNode(effect).parent\n\t\tconst depth = computeDepth(parent) + (parent ? 1 : 0)\n\t\tdepthCache.set(effect, depth)\n\t\treturn depth\n\t}\n\n\tfor (const [effect, node] of nodeByEffect) {\n\t\tnode.depth = computeDepth(effect)\n\t\tconst parent = getEffectNode(effect).parent\n\t\tif (parent) {\n\t\t\tconst parentNode = nodeByEffect.get(parent)\n\t\t\tif (parentNode) {\n\t\t\t\tnode.parentId = parentNode.id\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { nodes, nodeByEffect }\n}\n\n/**\n * Builds a graph representing current reactive state (effects, objects, and trigger edges)\n */\nexport function buildReactivityGraph(): ReactivityGraph {\n\tconst nodes: Array<EffectNode | ObjectNode> = []\n\tconst edges: GraphEdge[] = []\n\tconst nodeIds = new Map<EffectTrigger | EffectCleanup | object | SourceEffect, string>()\n\n\tconst allEffects = new Set<EffectTrigger>(debugEffectRegistry)\n\tensureParentChains(allEffects)\n\tconst { nodes: effectNodes, nodeByEffect } = buildEffectNodes(allEffects)\n\tfor (const node of effectNodes) nodes.push(node)\n\tfor (const [effect, node] of nodeByEffect) {\n\t\tnodeIds.set(effect, node.id)\n\t}\n\n\t// Object nodes (optional, used for dependency inspection)\n\tfor (const obj of debugObjectRegistry) {\n\t\tconst id = `object_${nodes.length}`\n\t\tnodes.push({ id, label: ensureObjectName(obj), type: 'state', debugName: objectNames.get(obj) })\n\t\tnodeIds.set(obj, id)\n\t}\n\n\t// External source node (user/system outside of effects)\n\tif (triggerGraph.has(EXTERNAL_SOURCE)) {\n\t\tconst externalId = `effect_external`\n\t\tnodes.push({ id: externalId, label: 'External', type: 'external', depth: 0 })\n\t\tnodeIds.set(EXTERNAL_SOURCE, externalId)\n\t}\n\n\t// Dependency edges (effect → object)\n\tfor (const effect of allEffects) {\n\t\tconst effectId = nodeIds.get(effect)\n\t\tif (!effectId) continue\n\t\tconst deps = effectToReactiveObjects.get(effect)\n\t\tif (!deps) continue\n\t\tfor (const obj of deps) {\n\t\t\tconst objId = nodeIds.get(obj)\n\t\t\tif (!objId) continue\n\t\t\tedges.push({\n\t\t\t\tid: `${effectId}->${objId}`,\n\t\t\t\tsource: effectId,\n\t\t\t\ttarget: objId,\n\t\t\t\ttype: 'dependency',\n\t\t\t\tlabel: 'depends',\n\t\t\t})\n\t\t}\n\t}\n\n\t// Cause edges (effect/object/prop → effect)\n\tfor (const [source, targetMap] of triggerGraph) {\n\t\tfor (const [targetEffect, labelMap] of targetMap) {\n\t\t\tconst targetId = nodeIds.get(targetEffect)\n\t\t\tif (!targetId) continue\n\t\t\tconst sourceId = nodeIds.get(source)\n\t\t\tif (!sourceId) continue\n\t\t\tfor (const record of labelMap.values()) {\n\t\t\t\tedges.push({\n\t\t\t\t\tid: `${sourceId}->${targetId}:${record.label}`,\n\t\t\t\t\tsource: sourceId,\n\t\t\t\t\ttarget: targetId,\n\t\t\t\t\ttype: 'cause',\n\t\t\t\t\tlabel: record.count > 1 ? `${record.label} (${record.count})` : record.label,\n\t\t\t\t\tcount: record.count,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tnodes,\n\t\tedges,\n\t\tmeta: {\n\t\t\tgeneratedAt: Date.now(),\n\t\t\tdevtoolsEnabled,\n\t\t},\n\t}\n}\n\n/**\n * Enables the DevTools bridge and exposes the debug API on window/global.\n * Call as early as possible in development builds.\n */\nexport function enableDevTools() {\n\tconst globalScope = (\n\t\ttypeof globalThis !== 'undefined'\n\t\t\t? globalThis\n\t\t\t: typeof window !== 'undefined'\n\t\t\t\t? window\n\t\t\t\t: typeof global !== 'undefined'\n\t\t\t\t\t? global\n\t\t\t\t\t: undefined\n\t) as any\n\tif (!globalScope) return\n\tif (devtoolsEnabled) return\n\tdevtoolsEnabled = true\n\n\tglobalScope.__MUTTS_DEVTOOLS__ = {\n\t\tgetGraph: buildReactivityGraph,\n\t\tnodeLineage(tag?: string) {\n\t\t\tnodeLineage(getLineage())\n\t\t\treturn '🦴 Effect Lineage Trace' + (tag ? ` (${tag})` : '')\n\t\t},\n\t\tnodeLineageLegacy() {\n\t\t\tconsole.groupCollapsed('nodeLineageLegacy')\n\t\t\tconsole.log(nodeLineageLegacy(getLineage()))\n\t\t\tconsole.groupEnd()\n\t\t},\n\t\tget browserLineage() {\n\t\t\treturn wrapLineageForDebug(getLineage())\n\t\t},\n\t\tgetLineage,\n\t\tcaptureLineage: getStackFrame,\n\t\tformatLineage,\n\t\tshowLineagePanel,\n\t\tsetEffectName,\n\t\tsetObjectName,\n\t\tregisterEffect: registerEffectForDebug,\n\t\tregisterObject: registerObjectForDebug,\n\t\t// Debug options for controlling runtime behavior\n\t\tdebug: debugOptions\n\t}\n\n\t// @ts-ignore - devtoolsFormatters is a Chrome-specific array\n\tif (globalScope.devtoolsFormatters) {\n\t\tglobalScope.devtoolsFormatters.push(lineageFormatter)\n\t} else {\n\t\tglobalScope.devtoolsFormatters = [lineageFormatter]\n\t}\n}\n\nexport function forceEnableGraphTracking() {\n\tdevtoolsEnabled = true\n}\n\nexport function isDevtoolsEnabled() {\n\treturn devtoolsEnabled\n}\n\n// --- Introspection API ---\n\n/**\n * Returns the raw dependency graph data structure.\n * This is useful for programmatic analysis of the reactive system.\n */\nexport function getDependencyGraph() {\n\treturn {\n\t\tnodes: buildReactivityGraph().nodes,\n\t\tedges: buildReactivityGraph().edges,\n\t}\n}\n\n/**\n * Returns a list of effects that depend on the given object.\n */\nexport function getDependents(obj: object): EffectTrigger[] {\n\tconst dependents: EffectTrigger[] = []\n\t// Scan the trigger graph for effects triggered by this object\n\t// This is O(E) where E is the number of edges, might need optimization for large graphs\n\t// but acceptable for introspection\n\tfor (const [_source, targetMap] of triggerGraph) {\n\t\tfor (const [targetEffect, labelMap] of targetMap) {\n\t\t\tfor (const record of labelMap.values()) {\n\t\t\t\tif (record.object === obj) {\n\t\t\t\t\tdependents.push(targetEffect)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Also check direct dependencies (dependency graph)\n\t// We don't have a direct obj -> effect map without walking all effects\n\t// unless we use `watchers` from tracking.ts but that's internal\n\treturn [...new Set(dependents)]\n}\n\n/**\n * Returns a list of objects that the given effect depends on.\n */\nexport function getDependencies(effect: EffectTrigger): object[] {\n\tconst deps = effectToReactiveObjects.get(effect)\n\treturn deps ? Array.from(deps) : []\n}\n\n// --- Mutation History ---\n\nexport interface MutationRecord {\n\tid: number\n\ttimestamp: number\n\tsource: string\n\ttarget: string\n\tobjectName: string\n\tprop: string\n\ttype: string\n}\n\nconst mutationHistory: MutationRecord[] = []\nlet mutationCounter = 0\n\nfunction addToMutationHistory(\n\tsource: EffectTrigger | undefined,\n\ttarget: EffectTrigger,\n\tobj: object,\n\tprop: any,\n\tevolution: Evolution\n) {\n\tconst record: MutationRecord = {\n\t\tid: ++mutationCounter,\n\t\ttimestamp: Date.now(),\n\t\tsource: source ? ensureEffectName(source) : 'External',\n\t\ttarget: ensureEffectName(target),\n\t\tobjectName: ensureObjectName(obj),\n\t\tprop: String(prop),\n\t\ttype: evolution.type,\n\t}\n\n\tmutationHistory.push(record)\n\tif (mutationHistory.length > options.introspection.historySize) {\n\t\tmutationHistory.shift()\n\t}\n}\n\n/**\n * Get the recent mutation history\n */\nexport function getMutationHistory(): MutationRecord[] {\n\treturn [...mutationHistory]\n}\n\n// --- Auto DevTools Initialization ---\n// Automatically enable devtools in development environments\n\n/**\n * Checks if we're in a development environment\n * Detection order:\n * 1. process.env.NODE_ENV (Node.js)\n * 2. import.meta.env.DEV (Vite)\n * 3. import.meta.env.PROD === false (Vite alternative)\n * 4. Assumes development if none of the above are set (safe default)\n */\nfunction isDevelopmentMode(): boolean {\n\t// Check for explicit production flag first\n\tif (typeof process !== 'undefined' && process.env?.NODE_ENV === 'production') {\n\t\treturn false\n\t}\n\t\n\t// Check for Vite's DEV flag\n\tif (typeof import.meta !== 'undefined') {\n\t\tconst meta = import.meta as any\n\t\tif (meta.env?.PROD === true) {\n\t\t\treturn false\n\t\t}\n\t\tif (meta.env?.DEV === true) {\n\t\t\treturn true\n\t\t}\n\t}\n\t\n\t// Check for custom global override\n\tif (typeof globalThis !== 'undefined' && '__MUTTS_DEV_MODE__' in globalThis) {\n\t\treturn (globalThis as any).__MUTTS_DEV_MODE__ !== false\n\t}\n\t\n\t// Default to development (safer to enable in dev than disable in prod)\n\treturn true\n}\n\n// Auto-enable devtools when the module loads in development\nif (isDevelopmentMode() && !devtoolsEnabled) {\n\tenableDevTools()\n\t\n\t// Optional: Log that devtools were enabled (only in development)\n\tif (typeof console !== 'undefined' && console.info) {\n\t\t// Do not log these in when mode === 'test'\n\t\tconsole.info('🦴 Mutts DevTools enabled automatically in development mode')\n\t}\n}\n","import { named } from '../utils'\nimport { getTriggerChain, isDevtoolsEnabled, registerEffectForDebug } from '../../debug/debug'\nimport { effectMarker, getStackFrame, type StackFrame } from '../../debug/lineage'\nimport { decorator } from '../decorator'\nimport { flavored, flavorOptions } from '../flavored'\nimport { IterableWeakSet } from '../iterableWeak'\nimport { effectAggregator, effectHistory, getActiveEffect } from './effect-context'\nimport { unwrap } from './proxy-state'\nimport {\n\teffectToReactiveObjects,\n\tgetEffectNode,\n\tgetRoot,\n\tmarkWithRoot,\n\tresetRegistry,\n\twatchers,\n} from './registry'\nimport {\n\ttype CatchFunction,\n\tcleanup as cleanupSymbol,\n\ttype EffectAccess,\n\ttype EffectCleanup,\n\ttype EffectCloser,\n\ttype EffectOptions,\n\ttype EffectTrigger,\n\ttype Evolution,\n\toptionCall,\n\toptions,\n\tReactiveError,\n\tReactiveErrorCode,\n\t// type AsyncExecutionMode,\n\ttype ScopedCallback,\n\tstopped,\n} from './types'\n\n/**\n * Finds a cycle in a sequence of functions by looking for the first repetition\n */\nfunction findCycleInChain(roots: Function[]): Function[] | null {\n\tconst seen = new Map<Function, number>()\n\tfor (let i = 0; i < roots.length; i++) {\n\t\tconst root = roots[i]\n\t\tif (seen.has(root)) {\n\t\t\treturn roots.slice(seen.get(root)!)\n\t\t}\n\t\tseen.set(root, i)\n\t}\n\treturn null\n}\n\n/**\n * Formats a list of function roots into a readable trace\n */\nfunction formatRoots(roots: Function[], limit = 20): string {\n\tconst names = roots.map((r) => r.name || '<anonymous>')\n\tif (names.length <= limit) return names.join(' → ')\n\tconst start = names.slice(0, 5)\n\tconst end = names.slice(-10)\n\treturn `${start.join(' → ')} ... (${names.length - 15} more) ... ${end.join(' → ')}`\n}\n\ntype EffectTracking = (obj: any, evolution: Evolution, prop: any, effect: EffectTrigger) => void\n\nexport interface ActivationRecord {\n\teffect: EffectTrigger\n\tobj: any\n\tevolution: Evolution\n\tprop: any\n\tbatchId: number\n}\n\n// Nested map structure for efficient counting and batch cleanup\n// batchId -> effect root -> obj -> prop -> count\nlet activationRegistry: Map<Function, Map<any, Map<any, number>>> | undefined\n\nexport const activationLog: Omit<ActivationRecord, 'batchId'>[] = new Array(100)\n\n/**\n * Returns the activation log containing recent effect activations for debugging.\n * The log is a circular buffer of the last 100 activations.\n *\n * @returns Array of activation records\n */\nexport function getActivationLog() {\n\treturn activationLog\n}\n\nexport function recordActivation(effect: EffectTrigger, obj: any, evolution: Evolution, prop: any) {\n\tconst root = getRoot(effect)\n\n\tif (!activationRegistry) return\n\tlet effectData = activationRegistry.get(root)\n\tif (!effectData) {\n\t\teffectData = new Map()\n\t\tactivationRegistry.set(root, effectData)\n\t}\n\tlet objData = effectData.get(obj)\n\tif (!objData) {\n\t\tobjData = new Map()\n\t\teffectData.set(obj, objData)\n\t}\n\tconst count = (objData.get(prop) ?? 0) + 1\n\tobjData.set(prop, count)\n\n\t// Keep a limited history for diagnostics\n\tactivationLog.unshift({\n\t\teffect,\n\t\tobj,\n\t\tevolution,\n\t\tprop,\n\t})\n\tactivationLog.pop()\n\n\tif (count >= options.maxTriggerPerBatch) {\n\t\tconst effectName = (root as any)?.name || 'anonymous'\n\t\tconst message = `Aggressive trigger detected: effect \"${effectName}\" triggered ${count} times in the batch by the same cause.`\n\t\tif (options.maxEffectReaction === 'throw') {\n\t\t\tthrow new ReactiveError(message, {\n\t\t\t\tcode: ReactiveErrorCode.MaxReactionExceeded,\n\t\t\t\tcount,\n\t\t\t\teffect: effectName,\n\t\t\t})\n\t\t}\n\t\toptions.warn(`[reactive] ${message}`)\n\t}\n}\n\n/**\n * Registers a debug callback that is called when the current effect is triggered by a dependency change\n *\n * This function is useful for debugging purposes as it pin-points exactly which reactive property\n * change triggered the effect. The callback receives information about:\n * - The object that changed\n * - The type of change (evolution)\n * - The specific property that changed\n *\n * **Note:** The tracker callback is automatically removed after being called once. If you need\n * to track multiple triggers, call `onEffectTrigger` again within the effect.\n *\n * @param onTouch - Callback function that receives (obj, evolution, prop) when the effect is triggered\n * @throws {Error} If called outside of an effect context\n *\n * @example\n * ```typescript\n * const state = reactive({ count: 0, name: 'John' })\n *\n * effect(() => {\n * // Register a tracker to see what triggers this effect\n * onEffectTrigger((obj, evolution, prop) => {\n * console.log(`Effect triggered by:`, {\n * object: obj,\n * change: evolution.type,\n * property: prop\n * })\n * })\n *\n * // Access reactive properties\n * console.log(state.count, state.name)\n * })\n *\n * state.count = 5\n * ```\n */\nexport function onEffectTrigger(onTouch: EffectTracking, effect?: EffectTrigger) {\n\teffect ??= getActiveEffect()\n\tif (!effect) throw new Error('Tracking an effect trigger while not in an effect')\n\tconst node = getEffectNode(effect)\n\tif (!node.trackers) node.trackers = [onTouch]\n\telse node.trackers.push(onTouch)\n}\n\nexport function raiseEffectTrackers(\n\teffect: EffectTrigger,\n\tobj: any,\n\tevolution: Evolution,\n\tprop: any\n) {\n\tconst node = getEffectNode(effect)\n\tconst trackers = node.trackers\n\tif (trackers) {\n\t\tfor (const tracker of trackers) tracker(obj, evolution, prop, effect)\n\t}\n}\nexport function onEffectThrow(onThrow: CatchFunction, effect?: EffectTrigger) {\n\teffect ??= getActiveEffect()\n\tif (!effect) throw new Error('Tracking an effect throw while not in an effect')\n\tconst node = getEffectNode(effect)\n\tif (!node.catchers) node.catchers = [onThrow]\n\telse node.catchers.push(onThrow)\n}\n\n// Dependency graph: tracks which effects trigger which other effects\n// Uses roots (Function) as keys for consistency\nlet effectTriggers = new WeakMap<Function, IterableWeakSet<Function>>()\nlet effectTriggeredBy = new WeakMap<Function, IterableWeakSet<Function>>()\n\n// Transitive closures: track all indirect relationships\n// causesClosure: for each effect, all effects that trigger it (directly or indirectly)\n// consequencesClosure: for each effect, all effects that it triggers (directly or indirectly)\nlet causesClosure = new WeakMap<Function, IterableWeakSet<Function>>()\nlet consequencesClosure = new WeakMap<Function, IterableWeakSet<Function>>()\n\n// Batch re-entrance depth and broken state\nlet batchDepth = 0\nlet broken = false\n\n// Debug: Capture where an effect was created\nexport const effectCreationStacks = new WeakMap<Function, StackFrame[]>()\n\n/**\n * Gets or creates an IterableWeakSet for a closure map\n */\nfunction getOrCreateClosure(\n\tclosure: WeakMap<Function, IterableWeakSet<Function>>,\n\troot: Function\n): IterableWeakSet<Function> {\n\tlet set = closure.get(root)\n\tif (!set) {\n\t\tset = new IterableWeakSet()\n\t\tclosure.set(root, set)\n\t}\n\treturn set\n}\n\n/**\n * Adds an edge to the dependency graph: callerRoot → targetRoot\n * Also maintains transitive closures\n * @param callerRoot - Root function of the effect that triggers\n * @param targetRoot - Root function of the effect being triggered\n */\nfunction addGraphEdge(callerRoot: Function, targetRoot: Function) {\n\tif (options.cycleHandling === 'production') return\n\t// Add to forward graph: callerRoot → targetRoot\n\tconst triggers = effectTriggers.get(callerRoot)\n\n\tif (!triggers) {\n\t\tconst newTriggers = new IterableWeakSet<Function>()\n\t\tnewTriggers.add(targetRoot)\n\t\teffectTriggers.set(callerRoot, newTriggers)\n\t} else {\n\t\ttriggers.add(targetRoot)\n\t}\n\n\t// Add to reverse graph: targetRoot ← callerRoot\n\tlet triggeredBy = effectTriggeredBy.get(targetRoot)\n\tif (!triggeredBy) {\n\t\ttriggeredBy = new IterableWeakSet()\n\t\teffectTriggeredBy.set(targetRoot, triggeredBy)\n\t}\n\ttriggeredBy.add(callerRoot)\n\n\t// Update transitive closures\n\t// When U→V is added, we need to propagate the relationship:\n\t// 1. Add U to causesClosure(V) and V to consequencesClosure(U) (direct relationship)\n\t// 2. For each X in causesClosure(U): add V to consequencesClosure(X) and X to causesClosure(V)\n\t// 3. For each Y in consequencesClosure(V): add U to causesClosure(Y) and Y to consequencesClosure(U)\n\t// Note: Self-loops (U→U) are not added to closures - if an effect appears in its own closure,\n\t// it means there's an indirect cycle that should be detected\n\n\t// Self-loops are explicitly ignored - an effect reading and writing the same property\n\t// (e.g., obj.prop++) should not create a dependency relationship or appear in closures\n\tif (callerRoot === targetRoot) {\n\t\treturn\n\t}\n\n\tconst uConsequences = getOrCreateClosure(consequencesClosure, callerRoot)\n\tconst vCauses = getOrCreateClosure(causesClosure, targetRoot)\n\n\t// 1. Add direct relationship\n\tuConsequences.add(targetRoot)\n\tvCauses.add(callerRoot)\n\n\t// 2. For each X in causesClosure(U): X→U→V means X→V\n\tconst uCausesSet = causesClosure.get(callerRoot)\n\tif (uCausesSet) {\n\t\tfor (const x of uCausesSet) {\n\t\t\t// Skip if this would create a self-loop\n\t\t\tif (x === targetRoot) continue\n\t\t\tconst xConsequences = getOrCreateClosure(consequencesClosure, x)\n\t\t\txConsequences.add(targetRoot)\n\t\t\tvCauses.add(x)\n\t\t}\n\t}\n\n\t// 3. For each Y in consequencesClosure(V): U→V→Y means U→Y\n\tconst vConsequencesSet = consequencesClosure.get(targetRoot)\n\tif (vConsequencesSet) {\n\t\tfor (const y of vConsequencesSet) {\n\t\t\t// Skip if this would create a self-loop\n\t\t\tif (y === callerRoot) continue\n\t\t\tconst yCauses = getOrCreateClosure(causesClosure, y)\n\t\t\tyCauses.add(callerRoot)\n\t\t\tuConsequences.add(y)\n\t\t}\n\t}\n\n\t// 4. Cross-product: for each X in causesClosure(U) and Y in consequencesClosure(V): X→Y\n\tif (uCausesSet?.size && vConsequencesSet?.size) {\n\t\tfor (const x of uCausesSet) {\n\t\t\tconst xConsequences = getOrCreateClosure(consequencesClosure, x)\n\t\t\tfor (const y of vConsequencesSet) {\n\t\t\t\t// Skip if this would create a self-loop\n\t\t\t\tif (x === y) continue\n\t\t\t\txConsequences.add(y)\n\t\t\t\tconst yCauses = getOrCreateClosure(causesClosure, y)\n\t\t\t\tyCauses.add(x)\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Checks if there's a path from start to end in the dependency graph, excluding a specific node\n * Uses BFS to find any path that doesn't go through the excluded node\n * @param start - Starting node\n * @param end - Target node\n * @param exclude - Node to exclude from the path\n * @returns true if a path exists without going through the excluded node\n */\nfunction hasPathExcluding(start: Function, end: Function, exclude: Function): boolean {\n\tif (start === end) return true\n\tif (start === exclude) return false\n\n\tconst visited = new Set<Function>()\n\tconst queue: Function[] = [start]\n\tvisited.add(start)\n\tvisited.add(exclude) // Pre-mark excluded node as visited to skip it\n\n\twhile (queue.length > 0) {\n\t\tconst current = queue.shift()!\n\t\tconst triggers = effectTriggers.get(current)\n\t\tif (!triggers) continue\n\n\t\tfor (const next of triggers) {\n\t\t\tif (next === end) return true\n\t\t\tif (!visited.has(next)) {\n\t\t\t\tvisited.add(next)\n\t\t\t\tqueue.push(next)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false\n}\n\n/**\n * Removes all edges involving the given effect from the dependency graph\n * Also cleans up transitive closures by propagating cleanup to all affected effects\n * Called when an effect is stopped/cleaned up\n * @param effect - The effect being cleaned up\n */\nfunction cleanupEffectFromGraph(effect: EffectTrigger) {\n\tif (options.cycleHandling === 'production') return\n\tconst root = getRoot(effect)\n\n\t// Get closures before removing direct edges (needed for propagation)\n\tconst rootCauses = causesClosure.get(root)\n\tconst rootConsequences = consequencesClosure.get(root)\n\n\t// Remove from effectTriggers (outgoing edges)\n\tconst triggers = effectTriggers.get(root)\n\tif (triggers) {\n\t\t// Remove this root from all targets' effectTriggeredBy sets\n\t\tfor (const targetRoot of triggers) {\n\t\t\tconst triggeredBy = effectTriggeredBy.get(targetRoot)\n\t\t\ttriggeredBy?.delete(root)\n\t\t}\n\t\teffectTriggers.delete(root)\n\t}\n\n\t// Remove from effectTriggeredBy (incoming edges)\n\tconst triggeredBy = effectTriggeredBy.get(root)\n\tif (triggeredBy) {\n\t\t// Remove this root from all sources' effectTriggers sets\n\t\tfor (const sourceRoot of triggeredBy) {\n\t\t\tconst triggers = effectTriggers.get(sourceRoot)\n\t\t\ttriggers?.delete(root)\n\t\t}\n\t\teffectTriggeredBy.delete(root)\n\t}\n\n\t// Propagate closure cleanup to all affected effects\n\t// When removing B from A → B → C:\n\t// - Remove B from causesClosure(C) and consequencesClosure(A)\n\t// - For each X in causesClosure(B): remove C from consequencesClosure(X) if B was the only path\n\t// - For each Y in consequencesClosure(B): remove A from causesClosure(Y) if B was the only path\n\t// - Remove transitive relationships that depended on B\n\n\tif (rootCauses) {\n\t\t// For each X that triggers root: remove root from X's consequences\n\t\t// Only remove root's consequences if no alternate path exists\n\t\tfor (const causeRoot of rootCauses) {\n\t\t\tconst causeConsequences = consequencesClosure.get(causeRoot)\n\t\t\tif (causeConsequences) {\n\t\t\t\t// Remove root itself (it's being cleaned up)\n\t\t\t\tcauseConsequences.delete(root)\n\t\t\t\t// Only remove consequences of root if there's no alternate path from causeRoot to them\n\t\t\t\tif (rootConsequences) {\n\t\t\t\t\tfor (const consequence of rootConsequences) {\n\t\t\t\t\t\t// Check if causeRoot can still reach consequence without going through root\n\t\t\t\t\t\tif (!hasPathExcluding(causeRoot, consequence, root)) {\n\t\t\t\t\t\t\tcauseConsequences.delete(consequence)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (rootConsequences) {\n\t\t// For each Y that root triggers: remove root from Y's causes\n\t\t// Only remove root's causes if no alternate path exists\n\t\tfor (const consequenceRoot of rootConsequences) {\n\t\t\tconst consequenceCauses = causesClosure.get(consequenceRoot)\n\t\t\tif (consequenceCauses) {\n\t\t\t\t// Remove root itself (it's being cleaned up)\n\t\t\t\tconsequenceCauses.delete(root)\n\t\t\t\t// Only remove causes of root if there's no alternate path from them to consequenceRoot\n\t\t\t\tif (rootCauses) {\n\t\t\t\t\tfor (const cause of rootCauses) {\n\t\t\t\t\t\t// Check if cause can still reach consequenceRoot without going through root\n\t\t\t\t\t\tif (!hasPathExcluding(cause, consequenceRoot, root)) {\n\t\t\t\t\t\t\tconsequenceCauses.delete(cause)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Cross-product cleanup: for each X in causesClosure(B) and Y in consequencesClosure(B),\n\t// remove X→Y if B was the only path connecting them\n\tif (rootCauses && rootConsequences) {\n\t\tfor (const x of rootCauses) {\n\t\t\tconst xConsequences = consequencesClosure.get(x)\n\t\t\tif (xConsequences) {\n\t\t\t\tfor (const y of rootConsequences) {\n\t\t\t\t\t// Check if there's still a path from X to Y without going through root\n\t\t\t\t\t// Use BFS to find any path that doesn't include root\n\t\t\t\t\tif (!hasPathExcluding(x, y, root)) {\n\t\t\t\t\t\txConsequences.delete(y)\n\t\t\t\t\t\tconst yCauses = causesClosure.get(y)\n\t\t\t\t\t\tyCauses?.delete(x)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Finally, delete the closures for this effect\n\tcausesClosure.delete(root)\n\tconsequencesClosure.delete(root)\n}\n\n// Batch queue structure - optimized with cached in-degrees\ninterface BatchQueue {\n\t// All effects in the current batch that still need to be executed (todos)\n\tall: Map<Function, EffectTrigger> // root → effect\n\t// Cached in-degrees for each effect in the batch (number of causes in batch)\n\tinDegrees: Map<Function, number> // root → in-degree count\n}\n\n// Track currently executing effects to prevent re-execution\n// These are all the effects triggered under `activeEffect`\nlet batchQueue: BatchQueue | undefined\nexport function hasBatched(effect: EffectTrigger) {\n\treturn batchQueue?.all.has(getRoot(effect))\n}\nconst batchCleanups = new Set<EffectCleanup>()\n\n/**\n * Computes and caches in-degrees for all effects in the batch\n * Called once when batch starts or when new effects are added\n */\nfunction computeAllInDegrees(batch: BatchQueue): void {\n\tif (options.cycleHandling === 'production') return\n\tconst activeEffect = getActiveEffect()\n\tconst activeRoot = activeEffect ? getRoot(activeEffect) : null\n\n\t// Reset all in-degrees\n\tbatch.inDegrees.clear()\n\n\tfor (const [root] of batch.all) {\n\t\tlet inDegree = 0\n\t\tconst causes = causesClosure.get(root)\n\t\tif (causes) {\n\t\t\tfor (const causeRoot of causes) {\n\t\t\t\t// Only count if it's in the batch and not the active/self effect\n\t\t\t\tif (batch.all.has(causeRoot) && causeRoot !== activeRoot && causeRoot !== root) {\n\t\t\t\t\tinDegree++\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbatch.inDegrees.set(root, inDegree)\n\t}\n}\n\n/**\n * Decrements in-degrees of all effects that depend on the executed effect\n * Called after an effect is executed to update the cached in-degrees\n */\nfunction decrementInDegreesForExecuted(batch: BatchQueue, executedRoot: Function): void {\n\t// Get all effects that this executed effect triggers\n\tconst consequences = consequencesClosure.get(executedRoot)\n\tif (!consequences) return\n\n\tfor (const consequenceRoot of consequences) {\n\t\t// Only update if it's still in the batch\n\t\tif (batch.all.has(consequenceRoot)) {\n\t\t\tconst currentDegree = batch.inDegrees.get(consequenceRoot) ?? 0\n\t\t\tif (currentDegree > 0) {\n\t\t\t\tbatch.inDegrees.set(consequenceRoot, currentDegree - 1)\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Finds a path from startRoot to endRoot in the dependency graph\n * Uses DFS to find the path through direct edges\n * @param startRoot - Starting effect root\n * @param endRoot - Target effect root\n * @param visited - Set of visited nodes (for recursion)\n * @param path - Current path being explored\n * @returns Path from startRoot to endRoot, or empty array if no path exists\n */\nfunction findPath(\n\tstartRoot: Function,\n\tendRoot: Function,\n\tvisited: Set<Function> = new Set(),\n\tpath: Function[] = []\n): Function[] {\n\tif (startRoot === endRoot) {\n\t\treturn [...path, endRoot]\n\t}\n\n\tif (visited.has(startRoot)) {\n\t\treturn []\n\t}\n\n\tvisited.add(startRoot)\n\tconst newPath = [...path, startRoot]\n\n\tconst triggers = effectTriggers.get(startRoot)\n\tif (triggers) {\n\t\tfor (const targetRoot of triggers) {\n\t\t\tconst result = findPath(targetRoot, endRoot, visited, newPath)\n\t\t\tif (result.length > 0) {\n\t\t\t\treturn result\n\t\t\t}\n\t\t}\n\t}\n\n\treturn []\n}\n\n/**\n * Gets the cycle path when adding an edge would create a cycle\n * @param callerRoot - Root of the effect that triggers\n * @param targetRoot - Root of the effect being triggered\n * @returns Array of effect roots forming the cycle, or empty array if no cycle\n */\nfunction getCyclePathForEdge(callerRoot: Function, targetRoot: Function): Function[] {\n\t// Find path from targetRoot back to callerRoot (this is the existing path)\n\t// Then adding callerRoot -> targetRoot completes the cycle\n\tconst path = findPath(targetRoot, callerRoot)\n\tif (path.length > 0) {\n\t\t// The cycle is: callerRoot -> targetRoot -> ... -> callerRoot\n\t\treturn [callerRoot, ...path]\n\t}\n\treturn []\n}\n\n/**\n * Checks if adding an edge would create a cycle\n * Uses causesClosure to check if callerRoot is already a cause of targetRoot\n * Self-loops (callerRoot === targetRoot) are explicitly ignored and return false\n *\n * **Note**: This is the primary optimization benefit of the transitive closure system.\n * It allows detecting cycles in O(1) time before they are executed.\n *\n * @param callerRoot - Root of the effect that triggers\n * @param targetRoot - Root of the effect being triggered\n * @returns true if adding this edge would create a cycle\n */\nfunction wouldCreateCycle(callerRoot: Function, targetRoot: Function): boolean {\n\t// Self-loops are explicitly ignored - an effect reading and writing the same property\n\t// (e.g., obj.prop++) should not create a dependency relationship\n\tif (callerRoot === targetRoot) {\n\t\treturn false\n\t}\n\n\t// Check if targetRoot already triggers callerRoot (directly or indirectly)\n\t// This would create a cycle: callerRoot -> targetRoot -> ... -> callerRoot\n\t// Using consequencesClosure: if targetRoot triggers callerRoot, then callerRoot is in consequencesClosure(targetRoot)\n\tconst targetConsequences = consequencesClosure.get(targetRoot)\n\tif (targetConsequences?.has(callerRoot)) {\n\t\treturn true // Cycle detected: targetRoot -> ... -> callerRoot, and we're adding callerRoot -> targetRoot\n\t}\n\n\treturn false\n}\n\n/**\n * Adds an effect to the batch queue\n * @param effect - The effect to add\n * @param caller - The active effect that triggered this one (optional)\n * @param immediate - If true, don't create edges in the dependency graph\n */\nfunction addToBatch(effect: EffectTrigger, caller?: EffectTrigger, immediate?: boolean) {\n\tconst node = getEffectNode(effect)\n\tnode.cleanup?.()\n\t// If the effect was stopped during cleanup (e.g. lazy memoization), don't add it to the batch\n\tif (node.stopped) {\n\t\t// console.log(`[DEBUG] addToBatch: ${effect.name} is stopped`)\n\t\treturn\n\t}\n\n\tif (!batchQueue) {\n\t\t// console.log(`[DEBUG] addToBatch: no batchQueue`)\n\t\treturn\n\t}\n\n\tconst root = getRoot(effect)\n\n\t// 1. Add to batch first (needed for cycle detection)\n\tif (options.cycleHandling === 'production') {\n\t\t// Production mode: FIFO (delete and re-add to move to end)\n\t\tif (batchQueue.all.has(root)) {\n\t\t\tbatchQueue.all.delete(root)\n\t\t}\n\t\tbatchQueue.all.set(root, effect)\n\t} else {\n\t\t// Dev/Debug mode: Set if not present (preserve order?)\n\t\t// actually, we might want to update it?\n\t\t// For now, simple set\n\t\tif (batchQueue.all.has(root)) {\n\t\t\t// console.log(`[DEBUG] ${root.name} already in batch`)\n\t\t\treturn\n\t\t}\n\t\tbatchQueue.all.set(root, effect)\n\t\t// console.log(`[DEBUG] ${root.name} added to batch`)\n\t}\n\n\t// batchQueue.all.set(root, effect)\n\t// console.log(`[DEBUG] addToBatch: ${root.name} added to batch`)\n\tif (caller && !immediate && options.cycleHandling !== 'production') {\n\t\tconst callerRoot = getRoot(caller)\n\t\t// const root = getRoot(effect) // Already have root\n\n\t\t// Check for cycle BEFORE adding edge\n\t\tif (wouldCreateCycle(callerRoot, root)) {\n\t\t\tconst cyclePath = getCyclePathForEdge(callerRoot, root)\n\t\t\tconst cycleMessage =\n\t\t\t\tcyclePath.length > 0\n\t\t\t\t\t? `Cycle detected: ${cyclePath.map((r) => r.name || r.toString()).join(' → ')}`\n\t\t\t\t\t: `Cycle detected: ${callerRoot.name || callerRoot.toString()} → ${root.name || root.toString()} (and back)`\n\n\t\t\tbatchQueue.all.delete(root)\n\t\t\tconst causalChain = getTriggerChain(effect)\n\t\t\tconst creationStack = getEffectNode(effect).creationStack\n\n\t\t\tthrow new ReactiveError(`[reactive] ${cycleMessage}`, {\n\t\t\t\tcode: ReactiveErrorCode.CycleDetected,\n\t\t\t\tcycle: cyclePath.map((r) => r.name || r.toString()),\n\t\t\t\tdetails: cycleMessage,\n\t\t\t\tcausalChain,\n\t\t\t\tcreationStack,\n\t\t\t})\n\t\t}\n\n\t\taddGraphEdge(callerRoot, root)\n\t}\n}\n\n/**\n * Adds a cleanup function to be called when the current batch of effects completes\n * @param cleanup - The cleanup function to add\n */\nexport function addBatchCleanup(cleanup: EffectCleanup) {\n\tif (!batchQueue) cleanup()\n\telse batchCleanups.add(cleanup)\n}\n\n/**\n * Semantic alias for `addBatchCleanup` - defers work to the end of the current reactive batch.\n *\n * Use this when an effect needs to perform an action that would modify state the effect depends on,\n * which would create a reactive cycle. The deferred callback runs after all effects complete.\n *\n * @param callback - The callback to defer until after the current batch completes\n *\n * @example\n * ```typescript\n * effect(() => {\n * processData()\n *\n * // Defer to avoid cycle (createMovement modifies state this effect reads)\n * defer(() => {\n * createMovement(data)\n * })\n * })\n * ```\n */\nexport const defer = addBatchCleanup\n\n/**\n * Gets a cycle path for debugging\n * Uses DFS to find cycles in the batch\n * @param batchQueue - The batch queue\n * @returns Array of effect roots forming a cycle\n */\nfunction getCyclePath(batchQueue: BatchQueue): Function[] {\n\t// If all effects have in-degree > 0, there must be a cycle\n\t// Use DFS to find it\n\tconst visited = new Set<Function>()\n\tconst recursionStack = new Set<Function>()\n\tconst path: Function[] = []\n\n\tfor (const [root] of batchQueue.all) {\n\t\tif (visited.has(root)) continue\n\t\tconst cycle = findCycle(root, visited, recursionStack, path, batchQueue)\n\t\tif (cycle.length > 0) {\n\t\t\treturn cycle\n\t\t}\n\t}\n\n\treturn []\n}\n\nfunction findCycle(\n\troot: Function,\n\tvisited: Set<Function>,\n\trecursionStack: Set<Function>,\n\tpath: Function[],\n\tbatchQueue: BatchQueue\n): Function[] {\n\tif (recursionStack.has(root)) {\n\t\t// Found a cycle! Return the path from the cycle start to root\n\t\tconst cycleStart = path.indexOf(root)\n\t\treturn path.slice(cycleStart).concat([root])\n\t}\n\n\tif (visited.has(root)) {\n\t\treturn []\n\t}\n\n\tvisited.add(root)\n\trecursionStack.add(root)\n\tpath.push(root)\n\n\t// Follow edges to effects in the batch\n\t// Use direct edges (effectTriggers) for cycle detection\n\tconst triggers = effectTriggers.get(root)\n\tif (triggers) {\n\t\tfor (const targetRoot of triggers) {\n\t\t\tif (batchQueue.all.has(targetRoot)) {\n\t\t\t\tconst cycle = findCycle(targetRoot, visited, recursionStack, path, batchQueue)\n\t\t\t\tif (cycle.length > 0) {\n\t\t\t\t\treturn cycle\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpath.pop()\n\trecursionStack.delete(root)\n\treturn []\n}\n\n/**\n * Executes the next effect in dependency order (using cached in-degrees)\n * Finds an effect with in-degree 0 and executes it\n * @returns The return value of the executed effect, or null if batch is complete\n */\nfunction executeNext(effectuatedRoots: Function[]): any {\n\t// Find an effect with in-degree 0 using cached values\n\tlet nextEffect: EffectTrigger | null = null\n\tlet nextRoot: Function | null = null\n\n\tif (options.cycleHandling === 'production') {\n\t\t// In flat mode, we just take the first effect in the queue (FIFO)\n\t\tconst first = batchQueue!.all.entries().next().value\n\t\tif (first) {\n\t\t\t;[nextRoot, nextEffect] = first\n\t\t}\n\t} else {\n\t\t// Find an effect with in-degree 0 (no dependencies in batch that still need execution)\n\t\t// Using cached in-degrees for O(n) lookup instead of O(n²)\n\t\tfor (const [root, effect] of batchQueue!.all) {\n\t\t\tconst inDegree = batchQueue!.inDegrees.get(root) ?? 0\n\t\t\t// console.log(`[DEBUG] executeNext: checking ${root.name}, inDegree: ${inDegree}`)\n\t\t\tif (inDegree === 0) {\n\t\t\t\tnextEffect = effect\n\t\t\t\tnextRoot = root\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!nextEffect) {\n\t\t// No effect with in-degree 0 - there must be a cycle\n\t\t// If all effects have dependencies, it means there's a circular dependency\n\t\tif (batchQueue!.all.size > 0) {\n\t\t\tlet cycle = getCyclePath(batchQueue!)\n\t\t\t// If we couldn't find a cycle path using direct edges, try using closures\n\t\t\t// (transitive relationships) - if all effects have in-degree > 0, there must be a cycle\n\t\t\tif (cycle.length === 0) {\n\t\t\t\t// Try to find a cycle using consequencesClosure (transitive relationships)\n\t\t\t\t// Note: Self-loops are ignored - we only look for cycles between different effects\n\t\t\t\tfor (const [root] of batchQueue!.all) {\n\t\t\t\t\tconst consequences = consequencesClosure.get(root)\n\t\t\t\t\tif (consequences) {\n\t\t\t\t\t\t// Check if any consequence in the batch also has root as a consequence\n\t\t\t\t\t\tfor (const consequence of consequences) {\n\t\t\t\t\t\t\t// Skip self-loops - they are ignored\n\t\t\t\t\t\t\tif (consequence === root) continue\n\t\t\t\t\t\t\tif (batchQueue!.all.has(consequence)) {\n\t\t\t\t\t\t\t\tconst consequenceConsequences = consequencesClosure.get(consequence)\n\t\t\t\t\t\t\t\tif (consequenceConsequences?.has(root)) {\n\t\t\t\t\t\t\t\t\t// Found cycle: root -> consequence -> root\n\t\t\t\t\t\t\t\t\tcycle = [root, consequence, root]\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (cycle.length > 0) break\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst cycleMessage =\n\t\t\t\tcycle.length > 0\n\t\t\t\t\t? `Cycle detected: ${cycle.map((r) => r.name || '<anonymous>').join(' → ')}`\n\t\t\t\t\t: 'Cycle detected in effect batch - all effects have dependencies that prevent execution'\n\n\t\t\tthrow new ReactiveError(`[reactive] ${cycleMessage}`, {\n\t\t\t\tcode: ReactiveErrorCode.CycleDetected,\n\t\t\t\tcycle: cycle.map((r) => r.name || r.toString()),\n\t\t\t\tdetails: cycleMessage,\n\t\t\t})\n\t\t}\n\t\treturn null // Batch complete\n\t}\n\n\teffectuatedRoots.push(getRoot(nextEffect))\n\t// Execute the effect\n\tconst result = nextEffect()\n\n\t// Remove from batch and update in-degrees of dependents\n\tbatchQueue!.all.delete(nextRoot!)\n\tbatchQueue!.inDegrees.delete(nextRoot!)\n\tdecrementInDegreesForExecuted(batchQueue!, nextRoot!)\n\n\treturn result\n}\n\n// Track which sub-effects have been executed to prevent infinite loops\n// These are all the effects triggered under `activeEffect` and all their sub-effects\nexport function batch(effect: EffectTrigger | EffectTrigger[], immediate?: 'immediate') {\n\tif (broken) {\n\t\tthrow new ReactiveError(\n\t\t\t'[reactive] Reactive system is broken after an unrecoverable error. Call reset() to recover.',\n\t\t\t{ code: ReactiveErrorCode.BrokenEffects }\n\t\t)\n\t}\n\tif (!Array.isArray(effect)) effect = [effect]\n\tconst roots = effect.map(getRoot)\n\n\tbatchDepth++\n\ttry {\n\tif (batchQueue) {\n\t\t// Nested batch - add to existing\n\t\toptions?.chain(roots, getRoot(getActiveEffect()))\n\t\tconst caller = getActiveEffect()\n\t\tfor (let i = 0; i < effect.length; i++) addToBatch(effect[i], caller, immediate === 'immediate')\n\t\tif (immediate) {\n\t\t\tconst firstReturn: { value?: any } = {}\n\t\t\t// Execute immediately (before batch returns)\n\t\t\tfor (let i = 0; i < effect.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tconst rv = effect[i]()\n\t\t\t\t\tif (rv !== undefined && !('value' in firstReturn)) firstReturn.value = rv\n\t\t\t\t} finally {\n\t\t\t\t\tconst root = getRoot(effect[i])\n\t\t\t\t\tbatchQueue.all.delete(root)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn firstReturn.value\n\t\t}\n\t\t// Otherwise, effects will be picked up in next executeNext() call\n\t} else {\n\t\t// New batch - initialize\n\t\tif (!activationRegistry) activationRegistry = new Map()\n\t\telse throw new Error('Batch already in progress')\n\t\toptionCall('beginChain', roots)\n\t\tbatchQueue = {\n\t\t\tall: new Map(),\n\t\t\tinDegrees: new Map(),\n\t\t}\n\n\t\tconst caller = getActiveEffect()\n\t\tconst effectuatedRoots: Function[] = []\n\t\tconst firstReturn: { value?: any } = {}\n\t\tlet success = false\n\n\t\ttry {\n\t\t\tif (immediate) {\n\t\t\t\t// Execute initial effects in providing order\n\t\t\t\tfor (let i = 0; i < effect.length; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst rv = effect[i]()\n\t\t\t\t\t\tif (rv !== undefined && !('value' in firstReturn)) firstReturn.value = rv\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tbatchQueue.all.delete(getRoot(effect[i]))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Add initial effects to batch and compute dependencies\n\t\t\t\tconst len = effect.length\n\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\taddToBatch(effect[i], caller, false)\n\t\t\t\t}\n\t\t\t\tcomputeAllInDegrees(batchQueue)\n\t\t\t}\n\n\t\t\t// Process the batch\n\t\t\twhile (batchQueue.all.size > 0 || batchCleanups.size > 0) {\n\t\t\t\tif (batchQueue.all.size > 0) {\n\t\t\t\t\tif (effectuatedRoots.length > options.maxEffectChain) {\n\t\t\t\t\t\tconst cycle = findCycleInChain(effectuatedRoots as any)\n\t\t\t\t\t\tconst trace = formatRoots(effectuatedRoots as any)\n\t\t\t\t\t\tconst message = cycle\n\t\t\t\t\t\t\t? `Max effect chain reached (cycle detected: ${formatRoots(cycle)})`\n\t\t\t\t\t\t\t: `Max effect chain reached (trace: ${trace})`\n\n\t\t\t\t\t\tconst queuedRoots = batchQueue ? Array.from(batchQueue.all.keys()) : []\n\t\t\t\t\t\tconst queued = queuedRoots.map((r) => r.name || '<anonymous>')\n\t\t\t\t\t\tconst debugInfo = {\n\t\t\t\t\t\t\tcode: ReactiveErrorCode.MaxDepthExceeded,\n\t\t\t\t\t\t\teffectuatedRoots,\n\t\t\t\t\t\t\tcycle,\n\t\t\t\t\t\t\ttrace,\n\t\t\t\t\t\t\tmaxEffectChain: options.maxEffectChain,\n\t\t\t\t\t\t\tqueued: queued.slice(0, 50),\n\t\t\t\t\t\t\tqueuedCount: queued.length,\n\t\t\t\t\t\t\t// Try to get causation for the last effect\n\t\t\t\t\t\t\tcausalChain:\n\t\t\t\t\t\t\t\teffectuatedRoots.length > 0\n\t\t\t\t\t\t\t\t\t? getTriggerChain(\n\t\t\t\t\t\t\t\t\t\t\tbatchQueue.all.get(effectuatedRoots[effectuatedRoots.length - 1])!\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t: [],\n\t\t\t\t\t\t}\n\t\t\t\t\t\tswitch (options.maxEffectReaction) {\n\t\t\t\t\t\t\tcase 'throw':\n\t\t\t\t\t\t\t\tthrow new ReactiveError(`[reactive] ${message}`, debugInfo)\n\t\t\t\t\t\t\tcase 'debug':\n\t\t\t\t\t\t\t\t// biome-ignore lint/suspicious/noDebugger: This is the whole point here\n\t\t\t\t\t\t\t\tdebugger\n\t\t\t\t\t\t\t\tthrow new ReactiveError(`[reactive] ${message}`, debugInfo)\n\t\t\t\t\t\t\tcase 'warn':\n\t\t\t\t\t\t\t\toptions.warn(\n\t\t\t\t\t\t\t\t\t`[reactive] ${message} (queued: ${queued.slice(0, 10).join(', ')}${queued.length > 10 ? ', …' : ''})`\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tconst rv = executeNext(effectuatedRoots)\n\t\t\t\t\tif (rv !== undefined && !('value' in firstReturn)) firstReturn.value = rv\n\t\t\t\t} else {\n\t\t\t\t\t// Process cleanups. If they trigger more effects, they will be caught in the next iteration.\n\t\t\t\t\tconst cleanups = Array.from(batchCleanups)\n\t\t\t\t\tbatchCleanups.clear()\n\t\t\t\t\tfor (const cleanup of cleanups) cleanup()\n\n\t\t\t\t\t// In immediate mode, we traditionally don't process recursive effects from cleanups.\n\t\t\t\t\t// If we want to keep that behavior: if (immediate) break\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tsuccess = true\n\t\t} finally {\n\t\t\tif (!success) panicThrow()\n\t\t\tactivationRegistry = undefined\n\t\t\tbatchQueue = undefined\n\t\t\tbatchCleanups.clear()\n\t\t\toptionCall('endChain')\n\t\t}\n\t\treturn firstReturn.value\n\t}\n\t} finally {\n\t\tbatchDepth--\n\t}\n}\n\nfunction panicThrow() {\n\tbroken = true\n}\n\n/**\n * Resets the reactive system to a consistent state.\n * Call this after an unrecoverable error has set the system to \"broken\".\n * This clears all batch state, effect dependency graphs, and watcher registrations.\n * All existing effects become orphaned and must be recreated.\n */\nexport function reset() {\n\tbroken = false\n\tbatchDepth = 0\n\tactivationRegistry = undefined\n\tbatchQueue = undefined\n\tbatchCleanups.clear()\n\teffectTriggers = new WeakMap()\n\teffectTriggeredBy = new WeakMap()\n\tcausesClosure = new WeakMap()\n\tconsequencesClosure = new WeakMap()\n\tresetRegistry()\n\teffectHistory.present.active = undefined\n}\n\nexport { reset as resetBatchQueueForTest }\n\n// Inject batch function to allow atomic game loops in requestAnimationFrame/setTimeout/...\n// Note: Automatic batching of async callbacks (setTimeout, Promise.then, etc.) is NOT implemented.\n// Rationale: (1) asyncHooks.addHook API doesn't support knowing when callbacks complete (needed for batching),\n// (2) hooking all callback-creating functions adds overhead without guaranteed benefit,\n// (3) incomplete coverage in Node (async_hooks misses user-land patterns).\n// Solution: Use explicit @atomic decorator or manual batch() calls where optimization is needed.\n\n/**\n * Decorator that makes methods atomic - batches all effects triggered within the method\n */\nexport const atomic = decorator({\n\tmethod(original) {\n\t\treturn function (this: any, ...args: any[]) {\n\t\t\tconst atomicEffect = () => original.apply(this, args)\n\t\t\t// Debug: helpful to have a name\n\t\t\tObject.defineProperty(atomicEffect, 'name', { value: `atomic(${original.name})` })\n\t\t\treturn batch(atomicEffect as EffectTrigger, 'immediate')\n\t\t}\n\t},\n\tdefault<Args extends any[], Return>(\n\t\toriginal: (...args: Args) => Return\n\t): (...args: Args) => Return {\n\t\treturn function (this: any, ...args: Args) {\n\t\t\tconst atomicEffect = () => original.apply(this, args)\n\t\t\t// Debug: helpful to have a name\n\t\t\tObject.defineProperty(atomicEffect, 'name', { value: `atomic(${original.name})` })\n\t\t\treturn batch(atomicEffect as EffectTrigger, 'immediate')\n\t\t}\n\t},\n})\n\nconst fr = new FinalizationRegistry<() => void>((f) => f())\n\n/**\n * @param fn - The effect function to run - provides the cleaner\n * @returns The cleanup function\n */\n/**\n * Creates a reactive effect that automatically re-runs when dependencies change\n * @param fn - The effect function that provides dependencies and may return a cleanup function or Promise\n * @param options - Options for effect execution\n * @returns A cleanup function to stop the effect\n */\nexport const effect = named(effectMarker.leave, flavored(\n\tfunction effect(\n\t\tfn: (access: EffectAccess) => EffectCloser | undefined | void | Promise<any>,\n\t\teffectOptions?: EffectOptions\n\t): EffectCleanup {\n\t\tif (effectOptions?.name) Object.defineProperty(fn, 'name', { value: effectOptions.name })\n\t\t// Use per-effect asyncMode or fall back to global option\n\t\tconst asyncMode = effectOptions?.asyncMode ?? options.asyncMode ?? 'cancel'\n\t\t\n\t\t// Create the effect function - naming it for debug\n\t\tconst runEffect: EffectTrigger = () => {\n\t\t\tconst node = getEffectNode(runEffect)\n\t\t\t// Clear previous dependencies\n\t\t\tif (node.cleanup) {\n\t\t\t\tconst prevCleanup = node.cleanup\n\t\t\t\tnode.cleanup = undefined\n\t\t\t\ttry {\n\t\t\t\t\tuntracked(() => prevCleanup())\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// If we want to report them, we could use options.warn or similar\n\t\t\t\t\toptions.warn('Error during effect cleanup', error)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle async modes when effect is retriggered\n\t\t\tif (runningPromise) {\n\t\t\t\tif (asyncMode === 'cancel' && cancelPrevious) {\n\t\t\t\t\t// Cancel previous execution\n\t\t\t\t\tcancelPrevious()\n\t\t\t\t\tcancelPrevious = null\n\t\t\t\t\trunningPromise = null\n\t\t\t\t} else if (asyncMode === 'ignore') {\n\t\t\t\t\t// Ignore new execution while async work is running\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t// Note: 'queue' mode not yet implemented\n\t\t\t}\n\n\t\t\t// The effect has been stopped after having been planned\n\t\t\tif (effectStopped) return\n\n\t\t\toptionCall('enter', getRoot(fn))\n\t\t\tlet reactionCleanup: EffectCloser | undefined\n\t\t\tlet result: any\n\t\t\tlet caught = 0\n\t\t\t\n\t\t\t// Default thrower (self)\n\t\t\tlet thrower: CatchFunction = (error: any) => {\n\t\t\t\tthrow error\n\t\t\t}\n\t\t\tnode.forwardThrow = thrower\n\n\t\t\tlet errorToThrow: Error | undefined\n\t\t\ttry {\n\t\t\t\tresult = tracked(named(effectMarker.enter, () => fn.call(null, access)))\n\t\t\t\toptionCall('leave', fn)\n\t\t\t\tif (\n\t\t\t\t\tresult &&\n\t\t\t\t\ttypeof result !== 'function' &&\n\t\t\t\t\t(typeof result !== 'object' || !('then' in result))\n\t\t\t\t)\n\t\t\t\t\tthrow new ReactiveError(`[reactive] Effect returned a non-function value: ${result}`)\n\t\t\t\t// Check if result is a Promise (async effect)\n\t\t\t\tif (result && typeof result === 'object' && typeof result.then === 'function') {\n\t\t\t\t\tconst originalPromise = result as Promise<any>\n\n\t\t\t\t\t// Create a cancellation promise that we can reject\n\t\t\t\t\tlet cancelReject: ((reason: any) => void) | null = null\n\t\t\t\t\tconst cancelPromise = new Promise<never>((_, reject) => {\n\t\t\t\t\t\tcancelReject = reject\n\t\t\t\t\t})\n\n\t\t\t\t\tconst cancelError = new ReactiveError(\n\t\t\t\t\t\t'[reactive] Effect canceled due to dependency change'\n\t\t\t\t\t)\n\n\t\t\t\t\t// Race between the actual promise and cancellation\n\t\t\t\t\t// If canceled, the race rejects, which will propagate through any promise chain\n\t\t\t\t\trunningPromise = Promise.race([originalPromise, cancelPromise])\n\n\t\t\t\t\t// Store the cancellation function\n\t\t\t\t\tcancelPrevious = () => {\n\t\t\t\t\t\tif (cancelReject) {\n\t\t\t\t\t\t\tcancelReject(cancelError)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Wrap the original promise chain so cancellation propagates\n\t\t\t\t\t// This ensures that when we cancel, the original promise's .catch() handlers are triggered\n\t\t\t\t\t// We do this by rejecting the race promise, which makes the original promise chain see the rejection\n\t\t\t\t\t// through the zone-wrapped .then()/.catch() handlers\n\t\t\t\t\trunningPromise = runningPromise.catch((error) => {\n\t\t\t\t\t\t// Propagate async errors to the effect's error handler\n\t\t\t\t\t\t// This ensures onEffectThrow handlers are triggered for async errors\n\t\t\t\t\t\tif (error !== cancelError) {\n\t\t\t\t\t\t\tthrower(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If thrower didn't throw (handled), we absorb the error.\n\t\t\t\t\t\t// If thrower threw (unhandled), it propagates as a new unhandled rejection, which is correct.\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\t// Synchronous result - treat as cleanup function\n\t\t\t\t\treactionCleanup = result as undefined | EffectCloser\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\t// catcher:self`\n\t\t\t\terrorToThrow = error\n\t\t\t} finally {\n\t\t\t\taccess.reaction = true\n\t\t\t}\n\n\t\t\t// Create cleanup function for next run\n\t\t\tnode.cleanup = () => {\n\t\t\t\tnode.cleanup = undefined\n\t\t\t\treactionCleanup?.()\n\t\t\t\treactionCleanup = undefined\n\t\t\t\tdelete node.trackers\n\t\t\t\tdelete node.catchers\n\t\t\t\t// Remove this effect from all reactive objects it's watching\n\t\t\t\tconst effectObjects = effectToReactiveObjects.get(runEffect)\n\t\t\t\tif (effectObjects) {\n\t\t\t\t\tfor (const reactiveObj of effectObjects) {\n\t\t\t\t\t\tconst objectWatchers = watchers.get(reactiveObj)\n\t\t\t\t\t\tif (objectWatchers) {\n\t\t\t\t\t\t\tfor (const [prop, deps] of objectWatchers.entries()) {\n\t\t\t\t\t\t\t\tdeps.delete(runEffect)\n\t\t\t\t\t\t\t\tif (deps.size === 0) {\n\t\t\t\t\t\t\t\t\tobjectWatchers.delete(prop)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (objectWatchers.size === 0) {\n\t\t\t\t\t\t\t\twatchers.delete(reactiveObj)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\teffectToReactiveObjects.delete(runEffect)\n\t\t\t\t}\n\t\t\t\t// Invoke all child stops (recursive via subEffectCleanup calling its own mainCleanup)\n\t\t\t\tconst children = node.children\n\t\t\t\tif (children) {\n\t\t\t\t\tfor (const childCleanup of children) childCleanup()\n\t\t\t\t\tdelete node.children\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Define bubbling thrower\n\t\t\tthrower = (error: any) => {\n\t\t\t\tconst catches = node.catchers\n\t\t\t\tif (catches)\n\t\t\t\t\twhile (caught < catches.length) {\n\t\t\t\t\t\treactionCleanup?.(error)\n\t\t\t\t\t\treactionCleanup = undefined\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treactionCleanup = catches[caught](error) as EffectCloser | undefined\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tcaught++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (parent) {\n\t\t\t\t\tconst parentNode = getEffectNode(parent)\n\t\t\t\t\tif (parentNode.forwardThrow) parentNode.forwardThrow(error)\n\t\t\t\t\telse throw error\n\t\t\t\t}\n\t\t\t\telse throw error\n\t\t\t}\n\t\t\t// Update the node's forwardThrow to the bubbling one\n\t\t\tnode.forwardThrow = thrower\n\n\t\t\tif (errorToThrow) thrower(errorToThrow)\n\t\t}\n\t\t\n\t\t// Initialize metadata node\n\t\tconst node = getEffectNode(runEffect)\n\t\t\n\t\tif (isDevtoolsEnabled()) {\n\t\t\tconst stack = getStackFrame() // Robustly skips internal mutts frames\n\t\t\tif (stack.length > 0) {\n\t\t\t\tnode.creationStack = stack\n\t\t\t}\n\t\t}\n\n\t\tlet cleanup: (() => void) | null = null\n\t\tconst tracked = named(effectMarker.leave, effectHistory.present.with(runEffect, () => named(effectMarker.leave, effectAggregator.zoned)))\n\t\tconst ascended = named(effectMarker.leave, effectHistory.zoned)\n\t\tconst parent = effectHistory.present.active\n\t\t// Set parent relationship in node\n\t\tnode.parent = parent\n\t\t\n\t\t// let thrower: CatchFunction | undefined // Moved inside runEffect\n\t\tlet effectStopped = false\n\t\tconst access: EffectAccess = {\n\t\t\ttracked,\n\t\t\tascend: named(effectMarker.leave, (fn) => ascended(named(effectMarker.enter, ()=> fn.call(null)))),\n\t\t\t//named(effectMarker.enter, (fn) => ascended(fn)),\n\t\t\treaction: false,\n\t\t}\n\t\tlet runningPromise: Promise<any> | null = null\n\t\tlet cancelPrevious: (() => void) | null = null\n\t\tif (effectOptions?.dependencyHook) {\n\t\t\tnode.dependencyHook = effectOptions.dependencyHook\n\t\t}\n\t\t// Mark the runEffect callback with the original function as its root\n\t\tmarkWithRoot(runEffect, fn)\n\t\tfunction augmentedRv(rv: ScopedCallback): EffectCleanup {\n\t\t\treturn Object.defineProperties(rv, {\n\t\t\t\t[stopped]: {\n\t\t\t\t\tget: () => effectStopped,\n\t\t\t\t},\n\t\t\t}) as EffectCleanup\n\t\t}\n\n\t\t// Register strict mode if enabled\n\t\tif (effectOptions?.opaque) {\n\t\t\tnode.isOpaque = true\n\t\t}\n\n\t\tif (isDevtoolsEnabled()) {\n\t\t\tregisterEffectForDebug(runEffect)\n\t\t}\n\n\t\t// Store parent relationship for hierarchy traversal - ALREADY DONE ABOVE via getEffectNode\n\n\t\tbatch(runEffect, 'immediate')\n\t\t// Only ROOT effects are registered for GC cleanup and zone tracking\n\t\tconst isRootEffect = !parent\n\n\t\tconst stopEffect = (): void => {\n\t\t\tif (effectStopped) return\n\t\t\teffectStopped = true\n\t\t\tnode.stopped = true\n\t\t\t// Cancel any running async work\n\t\t\tif (cancelPrevious) {\n\t\t\t\tcancelPrevious()\n\t\t\t\tcancelPrevious = null\n\t\t\t\trunningPromise = null\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tnode.cleanup?.()\n\t\t\t} catch (error) {\n\t\t\t\t// Cleanup errors should basically be ignored or at least not stop the world\n\t\t\t\t// If we want to report them, we could use options.warn or similar\n\t\t\t\toptions.warn('Error during effect cleanup', error)\n\t\t\t}\n\t\t\t// Clean up dependency graph edges\n\t\t\tcleanupEffectFromGraph(runEffect)\n\t\t\tfr.unregister(stopEffect)\n\t\t}\n\t\tif (isRootEffect) {\n\t\t\tconst callIfCollected = augmentedRv(() => stopEffect())\n\t\t\tfr.register(\n\t\t\t\tcallIfCollected,\n\t\t\t\t() => {\n\t\t\t\t\tstopEffect()\n\t\t\t\t\toptionCall('garbageCollected', fn)\n\t\t\t\t},\n\t\t\t\tstopEffect\n\t\t\t)\n\t\t\treturn callIfCollected\n\t\t}\n\t\t// Register this effect to be stopped when the parent effect is cleaned up\n\t\tif (parent) {\n\t\t\tconst parentNode = getEffectNode(parent)\n\t\t\tif (!parentNode.children) {\n\t\t\t\tparentNode.children = new Set()\n\t\t\t}\n\t\t\tconst children = parentNode.children\n\t\t\t\n\t\t\tconst subEffectCleanup = augmentedRv(() => {\n\t\t\t\tchildren.delete(subEffectCleanup)\n\t\t\t\t// Execute this child effect cleanup (which triggers its own mainCleanup)\n\t\t\t\tstopEffect()\n\t\t\t})\n\t\t\tchildren.add(subEffectCleanup)\n\t\t\treturn subEffectCleanup\n\t\t}\n\t\t// Should not be reachable given isRootEffect check, but for type safety\n\t\treturn augmentedRv(stopEffect)\n\t},\n\t{\n\t\tget opaque() {\n\t\t\treturn flavorOptions(this, { opaque: true }, 'opaque')\n\t\t},\n\t\tnamed(name: string) {\n\t\t\treturn flavorOptions(this, { name }, 'named')\n\t\t},\n\t}\n))\n\n/**\n * Executes a function without tracking dependencies but maintains parent cleanup relationship\n * Effects created inside will still be cleaned up when the parent effect is destroyed\n * @param fn - The function to execute\n */\nexport function untracked<T>(fn: () => T): T {\n\treturn effectHistory.present.root(fn)\n}\n\n/**\n * Executes a function from a virgin/root context - no parent effect, no tracking\n * Creates completely independent effects that won't be cleaned up by any parent\n * @param fn - The function to execute\n */\nexport function root<T>(fn: () => T): T {\n\treturn effectHistory.root(fn)\n}\n\n/**\n * Creates a bidirectional binding between a reactive value and a non-reactive external value\n * Prevents infinite loops by automatically suppressing circular notifications\n *\n * @param received - Function called when the reactive value changes (external setter)\n * @param get - Getter for the reactive value OR an object with `{ get, set }` properties\n * @param set - Setter for the reactive value (required if `get` is a function)\n * @returns A function to manually provide updates from the external side\n *\n * @example\n * ```typescript\n * const model = reactive({ value: '' })\n * const input = { value: '' }\n *\n * // Bidirectional binding\n * const provide = biDi(\n * (v) => input.value = v, // external setter\n * () => model.value, // reactive getter\n * (v) => model.value = v // reactive setter\n * )\n *\n * // External notification (e.g., from input event)\n * provide('new value') // Updates model.value, doesn't trigger circular loop\n * ```\n *\n * @example Using object syntax\n * ```typescript\n * const provide = biDi(\n * (v) => setHTMLValue(v),\n * { get: () => reactiveObj.value, set: (v) => reactiveObj.value = v }\n * )\n * ```\n */\nexport function biDi<T>(\n\treceived: (value: T) => void,\n\tvalue: { get: () => T; set: (value: T) => void }\n): (value: T) => void\nexport function biDi<T>(\n\treceived: (value: T) => void,\n\tget: () => T,\n\tset: (value: T) => void\n): (value: T) => void\nexport function biDi<T>(\n\treceived: (value: T) => void,\n\tget: (() => T) | { get: () => T; set: (value: T) => void },\n\tset?: (value: T) => void\n): (value: T) => void {\n\tif (typeof get !== 'function') {\n\t\tset = get.set\n\t\tget = get.get\n\t}\n\tlet programmaticallySetValue: any = Symbol()\n\teffect(\n\t\tmarkWithRoot(() => {\n\t\t\tconst newValue = get()\n\t\t\tif (unwrap(newValue) !== programmaticallySetValue) received(newValue)\n\t\t}, received)\n\t)\n\treturn set\n\t\t? atomic((value: T) => {\n\t\t\t\tprogrammaticallySetValue = unwrap(value)\n\t\t\t\tset(value)\n\t\t\t})\n\t\t: () => {}\n}\n"],"names":[],"mappings":"AAGA;AACO,MAAM,KAAK,GAAG,IAAI,GAAG;AAErB,MAAM,UAAU,GAAG;AACzB,IAAA,OAAO,CAAC,IAAU,EAAA;AACjB,QAAA,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;QACf,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAChC,CAAC;AACD;;;;AAIG;AACH,IAAA,e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