@hakit/core
Version:
A collection of React hooks and helpers for Home Assistant to easily communicate with the Home Assistant WebSocket API.
1 lines • 37.3 kB
Source Map (JSON)
{"version":3,"file":"Provider-Dxd1Q51u.cjs","sources":["../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../../../node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","../../../node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js","../../../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js","../../../node_modules/zustand/esm/vanilla/shallow.mjs","../../../node_modules/zustand/esm/react/shallow.mjs","../src/HassConnect/Provider.tsx"],"sourcesContent":["'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isDevelopment = false;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n });\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar hasOwn = {}.hasOwnProperty;\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n\n var newProps = {};\n\n for (var _key in props) {\n if (hasOwn.call(props, _key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var _key2 in props) {\n if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (!isDevelopment )) {\n newProps[_key2] = props[_key2];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isDevelopment as i, useTheme as u, withEmotionCache as w };\n","import * as ReactJSXRuntime from 'react/jsx-runtime';\nimport { h as hasOwn, E as Emotion, c as createEmotionProps } from '../../dist/emotion-element-f0de968e.browser.esm.js';\nimport 'react';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\nimport '@emotion/utils';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\n\nvar Fragment = ReactJSXRuntime.Fragment;\nvar jsx = function jsx(type, props, key) {\n if (!hasOwn.call(props, 'css')) {\n return ReactJSXRuntime.jsx(type, props, key);\n }\n\n return ReactJSXRuntime.jsx(Emotion, createEmotionProps(type, props), key);\n};\nvar jsxs = function jsxs(type, props, key) {\n if (!hasOwn.call(props, 'css')) {\n return ReactJSXRuntime.jsxs(type, props, key);\n }\n\n return ReactJSXRuntime.jsxs(Emotion, createEmotionProps(type, props), key);\n};\n\nexport { Fragment, jsx, jsxs };\n","const isIterable = (obj) => Symbol.iterator in obj;\nconst hasIterableEntries = (value) => (\n // HACK: avoid checking entries type\n \"entries\" in value\n);\nconst compareEntries = (valueA, valueB) => {\n const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());\n const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());\n if (mapA.size !== mapB.size) {\n return false;\n }\n for (const [key, value] of mapA) {\n if (!Object.is(value, mapB.get(key))) {\n return false;\n }\n }\n return true;\n};\nconst compareIterables = (valueA, valueB) => {\n const iteratorA = valueA[Symbol.iterator]();\n const iteratorB = valueB[Symbol.iterator]();\n let nextA = iteratorA.next();\n let nextB = iteratorB.next();\n while (!nextA.done && !nextB.done) {\n if (!Object.is(nextA.value, nextB.value)) {\n return false;\n }\n nextA = iteratorA.next();\n nextB = iteratorB.next();\n }\n return !!nextA.done && !!nextB.done;\n};\nfunction shallow(valueA, valueB) {\n if (Object.is(valueA, valueB)) {\n return true;\n }\n if (typeof valueA !== \"object\" || valueA === null || typeof valueB !== \"object\" || valueB === null) {\n return false;\n }\n if (Object.getPrototypeOf(valueA) !== Object.getPrototypeOf(valueB)) {\n return false;\n }\n if (isIterable(valueA) && isIterable(valueB)) {\n if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {\n return compareEntries(valueA, valueB);\n }\n return compareIterables(valueA, valueB);\n }\n return compareEntries(\n { entries: () => Object.entries(valueA) },\n { entries: () => Object.entries(valueB) }\n );\n}\n\nexport { shallow };\n","import React from 'react';\nimport { shallow } from 'zustand/vanilla/shallow';\n\nfunction useShallow(selector) {\n const prev = React.useRef(void 0);\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","import { useEffect, useCallback, useRef, useMemo } from \"react\";\n// types\nimport type { UnsubscribeFunc } from \"home-assistant-js-websocket\";\n// methods\nimport {\n subscribeEntities,\n callService as _callService,\n getStates as _getStates,\n getServices as _getServices,\n getConfig as _getConfig,\n getUser as _getUser,\n subscribeConfig,\n} from \"home-assistant-js-websocket\";\nimport { isArray, snakeCase } from \"lodash\";\nimport { SnakeOrCamelDomains, DomainService, Locales, CallServiceArgs, Route, ServiceResponse } from \"@typings\";\nimport { loadTokens, clearTokens } from \"./token-storage\";\nimport { HassContext, type HassContextProps, useInternalStore } from \"./HassContext\";\nimport { useStore } from \"../hooks/useStore\";\nimport { useShallow } from \"zustand/shallow\";\nimport { handleSuspendResume, type HandleSuspendResumeOptions } from \"./handleSuspendResume\";\nimport { callApi } from \"./callApi\";\nimport { handleError, tryConnection } from \"./tryConnection\";\n\nexport interface HassProviderProps {\n /** components to render once authenticated, this accepts a child function which will pass if it is ready or not */\n children: (ready: boolean) => React.ReactNode;\n /** the home assistant url */\n hassUrl: string;\n /** if you provide a hassToken you will bypass the login screen altogether - @see https://developers.home-assistant.io/docs/auth_api/#long-lived-access-token */\n hassToken?: string;\n /** the language of the UI to use, this will also control the values used within the `localize` function or `useLocale` / `useLocales` hooks, by default this is retrieved from your home assistant instance. */\n locale?: Locales;\n /** location to render portals @default document.body */\n portalRoot?: HTMLElement;\n /** Will tell the various features like breakpoints, modals and resize events which window to match media on, if serving within an iframe it'll potentially be running in the wrong window */\n windowContext?: Window;\n /** A method to render any error states with a react wrapper of your choosing, useful if you want to change styles */\n renderError?: (children: React.ReactNode) => React.ReactNode;\n /** options to provide to the handleResume functionality for the HA web socket connection */\n handleResumeOptions?: HandleSuspendResumeOptions;\n}\n\nconst getAllEntities = () => useInternalStore.getState().entities;\nconst getConnection = () => useInternalStore.getState().connection;\n\nexport function HassProvider({\n children,\n hassUrl,\n hassToken,\n portalRoot,\n windowContext,\n renderError = (children) => children,\n handleResumeOptions,\n}: HassProviderProps) {\n const entityUnsubscribe = useRef<UnsubscribeFunc | null>(null);\n const authenticated = useRef(false);\n const configUnsubscribe = useRef<UnsubscribeFunc | null>(null);\n const {\n hash: _hash,\n ready,\n error,\n cannotConnect,\n setError,\n } = useInternalStore(\n useShallow((s) => ({\n hash: s.hash,\n routes: s.routes,\n ready: s.ready, // ready is set internally in the store when we have entities (setEntities does this)\n error: s.error,\n cannotConnect: s.cannotConnect,\n auth: s.auth,\n setError: s.setError,\n })),\n );\n const getStates = useCallback(async () => {\n const connection = getConnection();\n return connection === null ? null : await _getStates(connection);\n }, []);\n const getServices = useCallback(async () => {\n const connection = getConnection();\n return connection === null ? null : await _getServices(connection);\n }, []);\n const getConfig = useCallback(async () => {\n const connection = getConnection();\n return connection === null ? null : await _getConfig(connection);\n }, []);\n const getUser = useCallback(async () => {\n const connection = getConnection();\n return connection === null ? null : await _getUser(connection);\n }, []);\n\n useEffect(() => {\n const { setPortalRoot } = useInternalStore.getState();\n if (portalRoot) setPortalRoot(portalRoot);\n }, [portalRoot]);\n\n useEffect(() => {\n const { setWindowContext } = useInternalStore.getState();\n if (windowContext) setWindowContext(windowContext);\n }, [windowContext]);\n\n const reset = useCallback(() => {\n const {\n setAuth,\n setUser,\n setCannotConnect,\n setConfig,\n setConnection,\n setEntities,\n setError,\n setReady,\n setRoutes,\n setConnectionStatus,\n } = useInternalStore.getState();\n // when the hassUrl changes, reset some properties and re-authenticate\n setAuth(null);\n setRoutes([]);\n setReady(false);\n setConnection(null);\n setEntities({});\n setConfig(null);\n setError(null);\n setCannotConnect(false);\n setUser(null);\n setConnectionStatus(\"pending\");\n authenticated.current = false;\n if (configUnsubscribe.current) {\n configUnsubscribe.current();\n configUnsubscribe.current = null;\n }\n if (entityUnsubscribe.current) {\n entityUnsubscribe.current();\n entityUnsubscribe.current = null;\n }\n }, []);\n\n const logout = useCallback(async () => {\n const { setError } = useInternalStore.getState();\n try {\n reset();\n clearTokens();\n if (location) location.reload();\n } catch (err: unknown) {\n console.error(\"Error:\", err);\n setError(\"Unable to log out!\");\n }\n }, [reset]);\n\n const handleConnect = useCallback(async () => {\n const { setError, setUser, setCannotConnect, setAuth, setConnection, setEntities, setConfig, setConnectionStatus } =\n useInternalStore.getState();\n\n // this will trigger on first mount\n const response = await tryConnection(hassUrl, hassToken);\n if (response.type === \"error\") {\n authenticated.current = false;\n setError(response.error);\n } else if (response.type === \"failed\") {\n authenticated.current = false;\n setCannotConnect(true);\n } else if (response.type === \"success\") {\n const { connection, auth } = response;\n // store a reference to the authentication object\n setAuth(auth);\n // store the connection to pass to the provider\n setConnection(connection);\n entityUnsubscribe.current = subscribeEntities(connection, ($entities) => {\n setEntities($entities);\n });\n configUnsubscribe.current = subscribeConfig(connection, (newConfig) => {\n setConfig(newConfig);\n });\n _getUser(connection).then((user) => {\n setUser(user);\n });\n const { onStatusChange, ...rest } = handleResumeOptions || {};\n // return the cleanup function\n return handleSuspendResume(connection, {\n suspendWhenHidden: true,\n hiddenDelayMs: 300_000, // 5 minutes\n debug: false,\n onStatusChange: (status) => {\n setConnectionStatus(status);\n onStatusChange?.(status);\n },\n ...rest,\n });\n }\n }, [hassUrl, hassToken, handleResumeOptions]);\n\n useEffect(() => {\n const { setHassUrl } = useInternalStore.getState();\n setHassUrl(hassUrl);\n }, [hassUrl]);\n\n const joinHassUrl = useCallback((path: string) => {\n const { connection } = useInternalStore.getState();\n return connection ? new URL(path, connection?.options.auth?.data.hassUrl).toString() : \"\";\n }, []);\n\n useEffect(() => {\n const { setHash } = useInternalStore.getState();\n if (location.hash === \"\") return;\n if (location.hash.replace(\"#\", \"\") === _hash) return;\n setHash(location.hash);\n }, [_hash]);\n\n useEffect(() => {\n function onHashChange() {\n const { routes, setRoutes, setHash } = useInternalStore.getState();\n setRoutes(\n routes.map((route) => {\n if (route.hash === location.hash.replace(\"#\", \"\")) {\n return {\n ...route,\n active: true,\n };\n }\n return {\n ...route,\n active: false,\n };\n }),\n );\n setHash(location.hash);\n }\n window.addEventListener(\"hashchange\", onHashChange);\n return () => {\n window.removeEventListener(\"hashchange\", onHashChange);\n };\n }, []);\n\n const addRoute = useCallback((route: Omit<Route, \"active\">) => {\n const { routes, setRoutes } = useInternalStore.getState();\n const exists = routes.find((_route) => _route.hash === route.hash) !== undefined;\n if (!exists && typeof window !== \"undefined\") {\n // if the current has value is the same as the hash, we're active\n const hashWithoutPound = window.location.hash.replace(\"#\", \"\");\n const active = hashWithoutPound !== \"\" && hashWithoutPound === route.hash;\n setRoutes([\n ...routes,\n {\n ...route,\n active,\n } satisfies Route,\n ]);\n }\n }, []);\n\n const getRoute = useCallback((hash: string) => {\n const routes = useInternalStore.getState().routes;\n const route = routes.find((route) => route.hash === hash);\n return route || null;\n }, []);\n\n const callService = useCallback(\n async <ResponseType extends object, T extends SnakeOrCamelDomains, M extends DomainService<T>, R extends boolean>({\n domain,\n service,\n serviceData,\n target: _target,\n returnResponse,\n }: CallServiceArgs<T, M, R>): Promise<R extends true ? ServiceResponse<ResponseType> : void> => {\n const { connection, ready } = useInternalStore.getState();\n const target =\n typeof _target === \"string\" || isArray(_target)\n ? {\n entity_id: _target,\n }\n : _target;\n if (typeof service !== \"string\") {\n throw new Error(\"service must be a string\");\n }\n if (connection && ready) {\n try {\n const result = await _callService(\n connection,\n snakeCase(domain),\n snakeCase(service),\n // purposely cast here as we know it's correct\n serviceData as object,\n target,\n returnResponse,\n );\n if (returnResponse) {\n // Return the result if returnResponse is true\n return result as R extends true ? ServiceResponse<ResponseType> : never;\n }\n // Otherwise, return void\n return undefined as R extends true ? never : void;\n } catch (e) {\n // TODO - raise error to client here\n console.log(\"Error:\", e);\n }\n }\n return undefined as R extends true ? never : void;\n },\n [],\n );\n\n useEffect(() => {\n // on unmount, reset the store\n return () => {\n reset();\n };\n }, [reset]);\n\n // then wrap the whole connect routine so it’s stable too\n const connectOnce = useCallback(async () => {\n try {\n if (authenticated.current) reset();\n authenticated.current = true;\n handleResumeOptions?.onStatusChange?.(\"pending\");\n await handleConnect();\n } catch (e) {\n const message = handleError(e);\n setError(`Unable to connect to Home Assistant, please check the URL: \"${message}\"`);\n }\n }, [reset, handleConnect, setError, handleResumeOptions]);\n\n // run it once after mount\n useEffect(() => {\n connectOnce();\n }, [connectOnce]);\n\n const contextValue = useMemo<HassContextProps>(\n () => ({\n useStore,\n logout,\n addRoute,\n getRoute,\n getStates,\n getServices,\n getConfig,\n getUser,\n callApi,\n getAllEntities,\n callService: callService as HassContextProps[\"callService\"],\n joinHassUrl,\n }),\n [logout, addRoute, getRoute, getStates, getServices, getConfig, getUser, callService, joinHassUrl],\n );\n\n if (cannotConnect) {\n return renderError(\n <p>\n Unable to connect to ${loadTokens(hassUrl)!.hassUrl}, refresh the page and try again, or <a onClick={logout}>Logout</a>.\n </p>,\n );\n }\n return <HassContext.Provider value={contextValue}>{error === null ? children(ready) : renderError(error)}</HassContext.Provider>;\n}\n"],"names":["reactIs","require$$0","REACT_STATICS","KNOWN_STATICS","FORWARD_REF_STATICS","MEMO_STATICS","TYPE_STATICS","getStatics","component","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","keys","targetStatics","sourceStatics","i","key","descriptor","hoistNonReactStatics_cjs","syncFallback","create","useInsertionEffect","React","useInsertionEffectAlwaysWithSyncFallback","EmotionCacheContext","createCache","withEmotionCache","func","forwardRef","props","ref","cache","useContext","ThemeContext","hasOwn","typePropName","createEmotionProps","type","newProps","_key","Insertion","_ref","serialized","isStringTag","registerStyles","insertStyles","Emotion","cssProp","WrappedComponent","registeredStyles","className","getRegisteredStyles","serializeStyles","_key2","Emotion$1","Fragment","ReactJSXRuntime","jsx","jsxs","isIterable","obj","hasIterableEntries","value","compareEntries","valueA","valueB","mapA","mapB","compareIterables","iteratorA","iteratorB","nextA","nextB","shallow","useShallow","selector","prev","state","next","getAllEntities","useInternalStore","getConnection","HassProvider","children","hassUrl","hassToken","portalRoot","windowContext","renderError","handleResumeOptions","entityUnsubscribe","useRef","authenticated","configUnsubscribe","_hash","ready","error","cannotConnect","setError","s","getStates","useCallback","connection","_getStates","getServices","_getServices","getConfig","_getConfig","getUser","_getUser","useEffect","setPortalRoot","setWindowContext","reset","setAuth","setUser","setCannotConnect","setConfig","setConnection","setEntities","setReady","setRoutes","setConnectionStatus","logout","clearTokens","err","handleConnect","response","tryConnection","auth","subscribeEntities","$entities","subscribeConfig","newConfig","user","onStatusChange","rest","handleSuspendResume","status","setHassUrl","joinHassUrl","path","setHash","onHashChange","routes","route","addRoute","_route","hashWithoutPound","active","getRoute","hash","callService","domain","service","serviceData","_target","returnResponse","target","isArray","result","_callService","snakeCase","e","connectOnce","message","handleError","contextValue","useMemo","useStore","callApi","loadTokens","HassContext"],"mappings":"61BAEA,IAAIA,EAAUC,GAMVC,EAAgB,CAClB,kBAAmB,GACnB,YAAa,GACb,aAAc,GACd,aAAc,GACd,YAAa,GACb,gBAAiB,GACj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