(str, context, type, targetElement)
| 2289 | return context instanceof Context; |
| 2290 | } |
| 2291 | resolveSymbol(str, context, type, targetElement) { |
| 2292 | if (str === "me" || str === "my" || str === "I") return context.me; |
| 2293 | if (str === "it" || str === "its") return context.beingTested ?? context.result; |
| 2294 | if (str === "result") return context.result; |
| 2295 | if (str === "you" || str === "your" || str === "yourself") return context.you; |
| 2296 | if (type === "global") { |
| 2297 | if (this.reactivity.isTracking) this.reactivity.trackGlobalSymbol(str); |
| 2298 | var val = this.#globalScope[str]; |
| 2299 | this.#trackMutation(val); |
| 2300 | return val; |
| 2301 | } |
| 2302 | if (type === "element") { |
| 2303 | if (this.reactivity.isTracking) this.reactivity.trackElementSymbol(str, context.meta.owner); |
| 2304 | var val = this.#getElementScope(context)[str]; |
| 2305 | this.#trackMutation(val); |
| 2306 | return val; |
| 2307 | } |
| 2308 | if (type === "inherited") { |
| 2309 | var inherited = this.#resolveInherited(str, context, targetElement); |
| 2310 | if (this.reactivity.isTracking) { |
| 2311 | var trackElement = inherited.element || targetElement || context.meta?.owner; |
| 2312 | if (trackElement) { |
| 2313 | this.reactivity.trackElementSymbol(str, trackElement); |
| 2314 | } |
| 2315 | } |
| 2316 | this.#trackMutation(inherited.value); |
| 2317 | return inherited.value; |
| 2318 | } |
| 2319 | if (context.meta?.context) { |
| 2320 | var fromMetaContext = context.meta.context[str]; |
| 2321 | if (typeof fromMetaContext !== "undefined") return fromMetaContext; |
| 2322 | if (context.meta.context.detail) { |
| 2323 | fromMetaContext = context.meta.context.detail[str]; |
| 2324 | if (typeof fromMetaContext !== "undefined") return fromMetaContext; |
| 2325 | } |
| 2326 | } |
| 2327 | var fromContext = this.#isHyperscriptContext(context) && !this.#isReservedWord(str) ? context.locals[str] : context[str]; |
| 2328 | if (typeof fromContext !== "undefined") return fromContext; |
| 2329 | var elementScope = this.#getElementScope(context); |
| 2330 | fromContext = elementScope[str]; |
| 2331 | if (typeof fromContext !== "undefined") { |
| 2332 | if (this.reactivity.isTracking) this.reactivity.trackElementSymbol(str, context.meta.owner); |
| 2333 | this.#trackMutation(fromContext); |
| 2334 | return fromContext; |
| 2335 | } |
| 2336 | if (this.reactivity.isTracking) this.reactivity.trackGlobalSymbol(str); |
| 2337 | var val = this.#globalScope[str]; |
| 2338 | this.#trackMutation(val); |
| 2339 | return val; |
| 2340 | } |
| 2341 | setSymbol(str, context, type, value, targetElement) { |
| 2342 | if (type === "global") { |
| 2343 | this.#globalScope[str] = value; |
no test coverage detected