reactpy 2.0.0b2__py3-none-any.whl → 2.0.0b4__py3-none-any.whl

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.
Files changed (122) hide show
  1. reactpy/__init__.py +1 -3
  2. reactpy/_console/rewrite_keys.py +2 -4
  3. reactpy/core/component.py +1 -1
  4. reactpy/core/events.py +46 -15
  5. reactpy/core/hooks.py +8 -2
  6. reactpy/core/layout.py +3 -1
  7. reactpy/core/serve.py +3 -22
  8. reactpy/core/vdom.py +0 -1
  9. reactpy/executors/asgi/__init__.py +2 -2
  10. reactpy/executors/asgi/pyscript.py +2 -2
  11. reactpy/executors/utils.py +1 -3
  12. reactpy/pyscript/component_template.py +3 -6
  13. reactpy/pyscript/layout_handler.py +1 -1
  14. reactpy/pyscript/utils.py +1 -7
  15. reactpy/static/index.js +2 -2
  16. reactpy/static/index.js.map +12 -11
  17. reactpy/static/morphdom/morphdom-esm.js +5 -0
  18. reactpy/static/morphdom/morphdom-factory.js +5 -0
  19. reactpy/static/morphdom/morphdom-umd.js +5 -0
  20. reactpy/static/morphdom/morphdom-umd.min.js +1 -1
  21. reactpy/static/morphdom/morphdom.js +5 -0
  22. reactpy/static/pyscript/codemirror-BYspKCDy.js +2 -0
  23. reactpy/static/pyscript/codemirror-BYspKCDy.js.map +1 -0
  24. reactpy/static/pyscript/codemirror_commands-BLDaEdQ6.js +2 -0
  25. reactpy/static/pyscript/codemirror_commands-BLDaEdQ6.js.map +1 -0
  26. reactpy/static/pyscript/codemirror_lang-python-CkOVBHci.js +2 -0
  27. reactpy/static/pyscript/codemirror_lang-python-CkOVBHci.js.map +1 -0
  28. reactpy/static/pyscript/codemirror_language-DOkvasqm.js +2 -0
  29. reactpy/static/pyscript/codemirror_language-DOkvasqm.js.map +1 -0
  30. reactpy/static/pyscript/codemirror_state-BIAL8JKm.js +2 -0
  31. reactpy/static/pyscript/{codemirror_state-1UkzIAPK.js.map → codemirror_state-BIAL8JKm.js.map} +1 -1
  32. reactpy/static/pyscript/codemirror_view-Bt4sLgyA.js +2 -0
  33. reactpy/static/pyscript/codemirror_view-Bt4sLgyA.js.map +1 -0
  34. reactpy/static/pyscript/core-PTfg6inS.js +4 -0
  35. reactpy/static/pyscript/core-PTfg6inS.js.map +1 -0
  36. reactpy/static/pyscript/core.css +1 -1
  37. reactpy/static/pyscript/core.js +1 -1
  38. reactpy/static/pyscript/{deprecations-manager-B8Tz2RBD.js → deprecations-manager-DIDxhyRq.js} +2 -2
  39. reactpy/static/pyscript/{deprecations-manager-B8Tz2RBD.js.map → deprecations-manager-DIDxhyRq.js.map} +1 -1
  40. reactpy/static/pyscript/{donkey-83vCPSep.js → donkey-CLhmQOjG.js} +2 -2
  41. reactpy/static/pyscript/{donkey-83vCPSep.js.map → donkey-CLhmQOjG.js.map} +1 -1
  42. reactpy/static/pyscript/error-uzvvriog.js +2 -0
  43. reactpy/static/pyscript/{error-Bd5T9j4s.js.map → error-uzvvriog.js.map} +1 -1
  44. reactpy/static/pyscript/index-jZ1aOVVJ.js +2 -0
  45. reactpy/static/pyscript/index-jZ1aOVVJ.js.map +1 -0
  46. reactpy/static/pyscript/mpy-CnF17tqI.js +2 -0
  47. reactpy/static/pyscript/mpy-CnF17tqI.js.map +1 -0
  48. reactpy/static/pyscript/py-BZSSqcx3.js +2 -0
  49. reactpy/static/pyscript/{py-CdW1_TfR.js.map → py-BZSSqcx3.js.map} +1 -1
  50. reactpy/static/pyscript/py-editor-DZ0Dxzzk.js +2 -0
  51. reactpy/static/pyscript/py-editor-DZ0Dxzzk.js.map +1 -0
  52. reactpy/static/pyscript/py-game-bqieV522.js +2 -0
  53. reactpy/static/pyscript/py-game-bqieV522.js.map +1 -0
  54. reactpy/static/pyscript/py-terminal-DYY4WN57.js +2 -0
  55. reactpy/static/pyscript/{py-terminal-C3QERaDG.js.map → py-terminal-DYY4WN57.js.map} +1 -1
  56. reactpy/static/pyscript/service-worker.js +1 -0
  57. reactpy/static/pyscript/storage.js +1 -1
  58. reactpy/static/pyscript/storage.js.map +1 -1
  59. reactpy/static/pyscript/toml-BK2RWy-G.js +3 -0
  60. reactpy/static/pyscript/{toml-DiUM0_qs.js.map → toml-BK2RWy-G.js.map} +1 -1
  61. reactpy/static/pyscript/toml-Blg7Izee.js +3 -0
  62. reactpy/static/pyscript/toml-Blg7Izee.js.map +1 -0
  63. reactpy/static/pyscript/xterm-DrSYbXEP.js +2 -0
  64. reactpy/static/pyscript/xterm-DrSYbXEP.js.map +1 -0
  65. reactpy/static/pyscript/xterm-readline-CK_45Ygx.js +2 -0
  66. reactpy/static/pyscript/xterm-readline-CK_45Ygx.js.map +1 -0
  67. reactpy/static/pyscript/xterm.css +1 -1
  68. reactpy/static/pyscript/xterm_addon-fit--gyF3PcZ.js.map +1 -1
  69. reactpy/static/pyscript/xterm_addon-web-links-D95xh2la.js +2 -0
  70. reactpy/static/pyscript/xterm_addon-web-links-D95xh2la.js.map +1 -0
  71. reactpy/static/pyscript/zip-pccs084i.js +2 -0
  72. reactpy/static/pyscript/zip-pccs084i.js.map +1 -0
  73. reactpy/templatetags/__init__.py +2 -2
  74. reactpy/templatetags/jinja.py +1 -1
  75. reactpy/testing/backend.py +1 -1
  76. reactpy/types.py +16 -0
  77. reactpy/utils.py +5 -5
  78. reactpy/web/__init__.py +6 -0
  79. reactpy/web/module.py +320 -62
  80. reactpy/web/utils.py +1 -1
  81. reactpy/widgets.py +3 -25
  82. {reactpy-2.0.0b2.dist-info → reactpy-2.0.0b4.dist-info}/METADATA +2 -3
  83. reactpy-2.0.0b4.dist-info/RECORD +116 -0
  84. {reactpy-2.0.0b2.dist-info → reactpy-2.0.0b4.dist-info}/WHEEL +1 -1
  85. reactpy/static/pyscript/codemirror-DNtCVICy.js +0 -2
  86. reactpy/static/pyscript/codemirror-DNtCVICy.js.map +0 -1
  87. reactpy/static/pyscript/codemirror_commands-DvCG1qNv.js +0 -2
  88. reactpy/static/pyscript/codemirror_commands-DvCG1qNv.js.map +0 -1
  89. reactpy/static/pyscript/codemirror_lang-python-BgZ6XoEX.js +0 -2
  90. reactpy/static/pyscript/codemirror_lang-python-BgZ6XoEX.js.map +0 -1
  91. reactpy/static/pyscript/codemirror_language-ddx8nifT.js +0 -2
  92. reactpy/static/pyscript/codemirror_language-ddx8nifT.js.map +0 -1
  93. reactpy/static/pyscript/codemirror_state-1UkzIAPK.js +0 -2
  94. reactpy/static/pyscript/codemirror_view-C2ObO--u.js +0 -2
  95. reactpy/static/pyscript/codemirror_view-C2ObO--u.js.map +0 -1
  96. reactpy/static/pyscript/core-BsIVS0z4.js +0 -4
  97. reactpy/static/pyscript/core-BsIVS0z4.js.map +0 -1
  98. reactpy/static/pyscript/error-Bd5T9j4s.js +0 -2
  99. reactpy/static/pyscript/index-978lpDXp.js +0 -2
  100. reactpy/static/pyscript/index-978lpDXp.js.map +0 -1
  101. reactpy/static/pyscript/mpy-De_qSCIU.js +0 -2
  102. reactpy/static/pyscript/mpy-De_qSCIU.js.map +0 -1
  103. reactpy/static/pyscript/py-CdW1_TfR.js +0 -2
  104. reactpy/static/pyscript/py-editor-MNjBwLfD.js +0 -2
  105. reactpy/static/pyscript/py-editor-MNjBwLfD.js.map +0 -1
  106. reactpy/static/pyscript/py-game-Did5BuBI.js +0 -2
  107. reactpy/static/pyscript/py-game-Did5BuBI.js.map +0 -1
  108. reactpy/static/pyscript/py-terminal-C3QERaDG.js +0 -2
  109. reactpy/static/pyscript/toml-BLBSZ43A.js +0 -3
  110. reactpy/static/pyscript/toml-BLBSZ43A.js.map +0 -1
  111. reactpy/static/pyscript/toml-DiUM0_qs.js +0 -3
  112. reactpy/static/pyscript/xterm-7LwxAMsn.js +0 -2
  113. reactpy/static/pyscript/xterm-7LwxAMsn.js.map +0 -1
  114. reactpy/static/pyscript/xterm-readline-e8QPhSrm.js +0 -2
  115. reactpy/static/pyscript/xterm-readline-e8QPhSrm.js.map +0 -1
  116. reactpy/static/pyscript/xterm_addon-web-links-Cnej-nJ6.js +0 -2
  117. reactpy/static/pyscript/xterm_addon-web-links-Cnej-nJ6.js.map +0 -1
  118. reactpy/static/pyscript/zip-CFEEYRfx.js +0 -2
  119. reactpy/static/pyscript/zip-CFEEYRfx.js.map +0 -1
  120. reactpy-2.0.0b2.dist-info/RECORD +0 -115
  121. {reactpy-2.0.0b2.dist-info → reactpy-2.0.0b4.dist-info}/entry_points.txt +0 -0
  122. {reactpy-2.0.0b2.dist-info → reactpy-2.0.0b4.dist-info}/licenses/LICENSE +0 -0
reactpy/__init__.py CHANGED
@@ -18,16 +18,14 @@ from reactpy.core.hooks import (
18
18
  use_scope,
19
19
  use_state,
20
20
  )
21
- from reactpy.core.layout import Layout
22
21
  from reactpy.core.vdom import Vdom
23
22
  from reactpy.pyscript.components import pyscript_component
24
23
  from reactpy.utils import Ref, reactpy_to_string, string_to_reactpy
25
24
 
26
25
  __author__ = "The Reactive Python Team"
27
- __version__ = "2.0.0b2"
26
+ __version__ = "2.0.0b4"
28
27
 
29
28
  __all__ = [
30
- "Layout",
31
29
  "Ref",
32
30
  "Vdom",
33
31
  "component",
@@ -100,9 +100,7 @@ def log_could_not_rewrite(file: Path, tree: ast.AST) -> None:
100
100
  else:
101
101
  continue
102
102
 
103
- if (
104
- name == "vdom"
105
- or hasattr(html, name)
106
- and any(kw.arg == "key" for kw in node.keywords)
103
+ if name == "vdom" or (
104
+ hasattr(html, name) and any(kw.arg == "key" for kw in node.keywords)
107
105
  ):
108
106
  click.echo(f"Unable to rewrite usage at {file}:{node.lineno}")
reactpy/core/component.py CHANGED
@@ -34,7 +34,7 @@ def component(
34
34
  class Component:
35
35
  """An object for rending component models."""
36
36
 
37
- __slots__ = "__weakref__", "_func", "_args", "_kwargs", "_sig", "key", "type"
37
+ __slots__ = "__weakref__", "_args", "_func", "_kwargs", "_sig", "key", "type"
38
38
 
39
39
  def __init__(
40
40
  self,
reactpy/core/events.py CHANGED
@@ -1,8 +1,9 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import asyncio
4
+ import dis
4
5
  from collections.abc import Sequence
5
- from typing import Any, Callable, Literal, overload
6
+ from typing import Any, Callable, Literal, cast, overload
6
7
 
7
8
  from anyio import create_task_group
8
9
 
@@ -69,10 +70,7 @@ def event(
69
70
  prevent_default,
70
71
  )
71
72
 
72
- if function is not None:
73
- return setup(function)
74
- else:
75
- return setup
73
+ return setup(function) if function is not None else setup
76
74
 
77
75
 
78
76
  class EventHandler:
@@ -109,18 +107,47 @@ class EventHandler:
109
107
  self.stop_propagation = stop_propagation
110
108
  self.target = target
111
109
 
110
+ # Check if our `preventDefault` or `stopPropagation` methods were called
111
+ # by inspecting the function's bytecode
112
+ func_to_inspect = cast(Any, function)
113
+ while hasattr(func_to_inspect, "__wrapped__"):
114
+ func_to_inspect = func_to_inspect.__wrapped__
115
+
116
+ code = func_to_inspect.__code__
117
+ if code.co_argcount > 0:
118
+ event_arg_name = code.co_varnames[0]
119
+ last_was_event = False
120
+
121
+ for instr in dis.get_instructions(func_to_inspect):
122
+ if instr.opname == "LOAD_FAST" and instr.argval == event_arg_name:
123
+ last_was_event = True
124
+ continue
125
+
126
+ if last_was_event and instr.opname in (
127
+ "LOAD_METHOD",
128
+ "LOAD_ATTR",
129
+ ):
130
+ if instr.argval == "preventDefault":
131
+ self.prevent_default = True
132
+ elif instr.argval == "stopPropagation":
133
+ self.stop_propagation = True
134
+
135
+ last_was_event = False
136
+
137
+ __hash__ = None # type: ignore
138
+
112
139
  def __eq__(self, other: object) -> bool:
113
140
  undefined = object()
114
- for attr in (
115
- "function",
116
- "prevent_default",
117
- "stop_propagation",
118
- "target",
119
- ):
120
- if not attr.startswith("_"):
121
- if not getattr(other, attr, undefined) == getattr(self, attr):
122
- return False
123
- return True
141
+ return not any(
142
+ not attr.startswith("_")
143
+ and not getattr(other, attr, undefined) == getattr(self, attr)
144
+ for attr in (
145
+ "function",
146
+ "prevent_default",
147
+ "stop_propagation",
148
+ "target",
149
+ )
150
+ )
124
151
 
125
152
  def __repr__(self) -> str:
126
153
  public_names = [name for name in self.__slots__ if not name.startswith("_")]
@@ -146,17 +173,21 @@ def to_event_handler_function(
146
173
  async def wrapper(data: Sequence[Any]) -> None:
147
174
  await function(*data)
148
175
 
176
+ cast(Any, wrapper).__wrapped__ = function
177
+
149
178
  else:
150
179
 
151
180
  async def wrapper(data: Sequence[Any]) -> None:
152
181
  function(*data)
153
182
 
183
+ cast(Any, wrapper).__wrapped__ = function
154
184
  return wrapper
155
185
  elif not asyncio.iscoroutinefunction(function):
156
186
 
157
187
  async def wrapper(data: Sequence[Any]) -> None:
158
188
  function(data)
159
189
 
190
+ cast(Any, wrapper).__wrapped__ = function
160
191
  return wrapper
161
192
  else:
162
193
  return function
reactpy/core/hooks.py CHANGED
@@ -79,7 +79,7 @@ def use_state(initial_value: _Type | Callable[[], _Type]) -> State[_Type]:
79
79
 
80
80
 
81
81
  class _CurrentState(Generic[_Type]):
82
- __slots__ = "value", "dispatch"
82
+ __slots__ = "dispatch", "value"
83
83
 
84
84
  def __init__(
85
85
  self,
@@ -146,6 +146,12 @@ def use_effect(
146
146
  Returns:
147
147
  If not function is provided, a decorator. Otherwise ``None``.
148
148
  """
149
+ if asyncio.iscoroutinefunction(function):
150
+ raise TypeError(
151
+ "`use_effect` does not support async functions. "
152
+ "Use `use_async_effect` instead."
153
+ )
154
+
149
155
  hook = HOOK_STACK.current_hook()
150
156
  dependencies = _try_to_infer_closure_values(function, dependencies)
151
157
  memoize = use_memo(dependencies=dependencies)
@@ -534,7 +540,7 @@ def use_memo(
534
540
  class _Memo(Generic[_Type]):
535
541
  """Simple object for storing memoization data"""
536
542
 
537
- __slots__ = "value", "deps"
543
+ __slots__ = "deps", "value"
538
544
 
539
545
  value: _Type
540
546
  deps: Sequence[Any]
reactpy/core/layout.py CHANGED
@@ -40,6 +40,7 @@ from reactpy.core.vdom import validate_vdom_json
40
40
  from reactpy.types import (
41
41
  ComponentType,
42
42
  Context,
43
+ Event,
43
44
  EventHandlerDict,
44
45
  Key,
45
46
  LayoutEventMessage,
@@ -120,7 +121,8 @@ class Layout:
120
121
 
121
122
  if handler is not None:
122
123
  try:
123
- await handler.function(event["data"])
124
+ data = [Event(d) if isinstance(d, dict) else d for d in event["data"]]
125
+ await handler.function(data)
124
126
  except Exception:
125
127
  logger.exception(f"Failed to execute event handler {handler}")
126
128
  else:
reactpy/core/serve.py CHANGED
@@ -3,7 +3,6 @@ from __future__ import annotations
3
3
  from collections.abc import Awaitable
4
4
  from logging import getLogger
5
5
  from typing import Any, Callable
6
- from warnings import warn
7
6
 
8
7
  from anyio import create_task_group
9
8
  from anyio.abc import TaskGroup
@@ -25,16 +24,6 @@ The event will then trigger an :class:`reactpy.core.proto.EventHandlerType` in a
25
24
  """
26
25
 
27
26
 
28
- class Stop(BaseException):
29
- """Deprecated
30
-
31
- Stop serving changes and events
32
-
33
- Raising this error will tell dispatchers to gracefully exit. Typically this is
34
- called by code running inside a layout to tell it to stop rendering.
35
- """
36
-
37
-
38
27
  async def serve_layout(
39
28
  layout: LayoutType[
40
29
  LayoutUpdateMessage | dict[str, Any], LayoutEventMessage | dict[str, Any]
@@ -44,17 +33,9 @@ async def serve_layout(
44
33
  ) -> None:
45
34
  """Run a dispatch loop for a single view instance"""
46
35
  async with layout:
47
- try:
48
- async with create_task_group() as task_group:
49
- task_group.start_soon(_single_outgoing_loop, layout, send)
50
- task_group.start_soon(_single_incoming_loop, task_group, layout, recv)
51
- except Stop: # nocov
52
- warn(
53
- "The Stop exception is deprecated and will be removed in a future version",
54
- UserWarning,
55
- stacklevel=1,
56
- )
57
- logger.info(f"Stopped serving {layout}")
36
+ async with create_task_group() as task_group:
37
+ task_group.start_soon(_single_outgoing_loop, layout, send)
38
+ task_group.start_soon(_single_incoming_loop, task_group, layout, recv)
58
39
 
59
40
 
60
41
  async def _single_outgoing_loop(
reactpy/core/vdom.py CHANGED
@@ -217,7 +217,6 @@ def separate_attributes_and_children(
217
217
 
218
218
  _attributes: VdomAttributes
219
219
  children_or_iterables: Sequence[Any]
220
- # ruff: noqa: E721
221
220
  if type(values[0]) is dict:
222
221
  _attributes, *children_or_iterables = values
223
222
  else:
@@ -1,5 +1,5 @@
1
1
  from reactpy.executors.asgi.middleware import ReactPyMiddleware
2
- from reactpy.executors.asgi.pyscript import ReactPyPyscript
2
+ from reactpy.executors.asgi.pyscript import ReactPyCsr
3
3
  from reactpy.executors.asgi.standalone import ReactPy
4
4
 
5
- __all__ = ["ReactPy", "ReactPyMiddleware", "ReactPyPyscript"]
5
+ __all__ = ["ReactPy", "ReactPyCsr", "ReactPyMiddleware"]
@@ -20,7 +20,7 @@ from reactpy.pyscript.utils import pyscript_component_html, pyscript_setup_html
20
20
  from reactpy.types import ReactPyConfig, VdomDict
21
21
 
22
22
 
23
- class ReactPyPyscript(ReactPy):
23
+ class ReactPyCsr(ReactPy):
24
24
  def __init__(
25
25
  self,
26
26
  *file_paths: str | Path,
@@ -88,7 +88,7 @@ class ReactPyPyscript(ReactPy):
88
88
  class ReactPyPyscriptApp(ReactPyApp):
89
89
  """ReactPy's standalone ASGI application for Client-Side Rendering (CSR) via PyScript."""
90
90
 
91
- parent: ReactPyPyscript
91
+ parent: ReactPyCsr
92
92
  _index_html = ""
93
93
  _etag = ""
94
94
  _last_modified = ""
@@ -43,9 +43,7 @@ def vdom_head_to_html(head: VdomDict) -> str:
43
43
  if isinstance(head, dict) and head.get("tagName") == "head":
44
44
  return reactpy_to_string(head)
45
45
 
46
- raise ValueError(
47
- "Invalid head element! Element must be either `html.head` or a string."
48
- )
46
+ raise ValueError("Head element must be constructed with `html.head`.")
49
47
 
50
48
 
51
49
  def process_settings(settings: ReactPyConfig) -> None:
@@ -1,11 +1,8 @@
1
- # ruff: noqa: TC004, N802, N816, RUF006
1
+ # ruff: noqa: N816, RUF006
2
2
  # type: ignore
3
- from typing import TYPE_CHECKING
3
+ import asyncio
4
4
 
5
- if TYPE_CHECKING:
6
- import asyncio
7
-
8
- from reactpy.pyscript.layout_handler import ReactPyLayoutHandler
5
+ from reactpy.pyscript.layout_handler import ReactPyLayoutHandler
9
6
 
10
7
 
11
8
  # User component is inserted below by regex replacement
@@ -11,7 +11,7 @@ from reactpy.core.layout import Layout
11
11
 
12
12
 
13
13
  class ReactPyLayoutHandler:
14
- """Encapsulate the entire layout handler with a class to prevent overlapping
14
+ """Encapsulate the entire PyScript layout handler with a class to prevent overlapping
15
15
  variable names between user code.
16
16
 
17
17
  This code is designed to be run directly by PyScript, and is not intended to be run
reactpy/pyscript/utils.py CHANGED
@@ -13,8 +13,6 @@ from pathlib import Path
13
13
  from typing import TYPE_CHECKING, Any
14
14
  from uuid import uuid4
15
15
 
16
- import jsonpointer
17
-
18
16
  import reactpy
19
17
  from reactpy.config import REACTPY_DEBUG, REACTPY_PATH_PREFIX, REACTPY_WEB_MODULES_DIR
20
18
  from reactpy.types import VdomDict
@@ -116,11 +114,7 @@ def extend_pyscript_config(
116
114
 
117
115
  # Extends ReactPy's default PyScript config with user provided values.
118
116
  pyscript_config: dict[str, Any] = {
119
- "packages": [
120
- reactpy_version_string(),
121
- f"jsonpointer=={jsonpointer.__version__}",
122
- "ssl",
123
- ],
117
+ "packages": [reactpy_version_string(), "jsonpointer==3.*", "ssl"],
124
118
  "js_modules": {
125
119
  "main": {
126
120
  f"{REACTPY_PATH_PREFIX.current}static/morphdom/morphdom-esm.js": "morphdom"
reactpy/static/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var J4=Object.create;var{getPrototypeOf:G4,defineProperty:Z1,getOwnPropertyNames:X4}=Object;var Y4=Object.prototype.hasOwnProperty;var O4=(Q,Z,K)=>{K=Q!=null?J4(G4(Q)):{};let W=Z||!Q||!Q.__esModule?Z1(K,"default",{value:Q,enumerable:!0}):K;for(let $ of X4(Q))if(!Y4.call(W,$))Z1(W,$,{get:()=>Q[$],enumerable:!0});return W};var K1=(Q,Z)=>()=>(Z||Q((Z={exports:{}}).exports,Z),Z.exports);var J1=K1((M5,q1)=>{var N4=Object.prototype.hasOwnProperty,z4=Object.prototype.toString;q1.exports=function Q(Z,K,W){if(z4.call(K)!=="[object Function]")throw new TypeError("iterator must be a function");var $=Z.length;if($===+$)for(var q=0;q<$;q++)K.call(W,Z[q],q,Z);else for(var J in Z)if(N4.call(Z,J))K.call(W,Z[J],J,Z)}});var X1=K1((I5,G1)=>{var H4=J1();G1.exports=_;function _(Q,Z,K){if(arguments.length===3)return _.set(Q,Z,K);if(arguments.length===2)return _.get(Q,Z);var W=_.bind(_,Q);for(var $ in _)if(_.hasOwnProperty($))W[$]=_[$].bind(W,Q);return W}_.get=function Q(Z,K){var W=Array.isArray(K)?K:_.parse(K);for(var $=0;$<W.length;++$){var q=W[$];if(!(typeof Z=="object"&&(q in Z)))throw new Error("Invalid reference token: "+q);Z=Z[q]}return Z};_.set=function Q(Z,K,W){var $=Array.isArray(K)?K:_.parse(K),q=$[0];if($.length===0)throw Error("Can not set the root object");for(var J=0;J<$.length-1;++J){var X=$[J];if(typeof X!=="string"&&typeof X!=="number")X=String(X);if(X==="__proto__"||X==="constructor"||X==="prototype")continue;if(X==="-"&&Array.isArray(Z))X=Z.length;if(q=$[J+1],!(X in Z))if(q.match(/^(\d+|-)$/))Z[X]=[];else Z[X]={};Z=Z[X]}if(q==="-"&&Array.isArray(Z))q=Z.length;return Z[q]=W,this};_.remove=function(Q,Z){var K=Array.isArray(Z)?Z:_.parse(Z),W=K[K.length-1];if(W===void 0)throw new Error('Invalid JSON pointer for remove: "'+Z+'"');var $=_.get(Q,K.slice(0,-1));if(Array.isArray($)){var q=+W;if(W===""&&isNaN(q))throw new Error('Invalid array index: "'+W+'"');Array.prototype.splice.call($,q,1)}else delete $[W]};_.dict=function Q(Z,K){var W={};return _.walk(Z,function($,q){W[q]=$},K),W};_.walk=function Q(Z,K,W){var $=[];W=W||function(q){var J=Object.prototype.toString.call(q);return J==="[object Object]"||J==="[object Array]"},function q(J){H4(J,function(X,O){if($.push(String(O)),W(X))q(X);else K(X,_.compile($));$.pop()})}(Z)};_.has=function Q(Z,K){try{_.get(Z,K)}catch(W){return!1}return!0};_.escape=function Q(Z){return Z.toString().replace(/~/g,"~0").replace(/\//g,"~1")};_.unescape=function Q(Z){return Z.replace(/~1/g,"/").replace(/~0/g,"~")};_.parse=function Q(Z){if(Z==="")return[];if(Z.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+Z);return Z.substring(1).split(/\//).map(_.unescape)};_.compile=function Q(Z){if(Z.length===0)return"";return"/"+Z.map(_.escape).join("/")}});var w={log:(...Q)=>console.log("[ReactPy]",...Q),info:(...Q)=>console.info("[ReactPy]",...Q),warn:(...Q)=>console.warn("[ReactPy]",...Q),error:(...Q)=>console.error("[ReactPy]",...Q)};function W1(Q){let{interval:Z,maxInterval:K,maxRetries:W,backoffMultiplier:$}=Q,q=0,J=Z,X=!1,O=!1,Y={},z=()=>{if(O)return;Y.current=new WebSocket(Q.url),Y.current.onopen=()=>{if(X=!0,w.info("Connected!"),J=Z,q=0,Q.onOpen)Q.onOpen()},Y.current.onmessage=(G)=>{if(Q.onMessage)Q.onMessage(G)},Y.current.onclose=()=>{if(Q.onClose)Q.onClose();if(!X){w.info("Failed to connect!");return}if(w.info("Disconnected!"),q>=W){w.info("Connection max retries exhausted!");return}w.info(`Reconnecting in ${(J/1000).toPrecision(4)} seconds...`),setTimeout(z,J),J=V4(J,$,K),q++}};return Q.readyPromise.then(()=>w.info("Starting client...")).then(z),Y}function V4(Q,Z,K){return Math.min(Q*Z,K)}class $1{handlers={};ready;resolveReady;constructor(){this.resolveReady=()=>{},this.ready=new Promise((Q)=>this.resolveReady=Q)}onMessage(Q,Z){return(this.handlers[Q]||(this.handlers[Q]=[])).push(Z),this.resolveReady(void 0),()=>{this.handlers[Q]=this.handlers[Q].filter((K)=>K!==Z)}}handleIncoming(Q){if(!Q.type){w.warn("Received message without type",Q);return}let Z=this.handlers[Q.type];if(!Z){w.warn("Received message without handler",Q);return}Z.forEach((K)=>K(Q))}}class R0 extends $1{urls;socket;mountElement;constructor(Q){super();this.urls=Q.urls,this.mountElement=Q.mountElement,this.socket=W1({url:this.urls.componentUrl,readyPromise:this.ready,...Q.reconnectOptions,onMessage:(Z)=>this.handleIncoming(JSON.parse(Z.data))})}sendMessage(Q){this.socket.current?.send(JSON.stringify(Q))}loadModule(Q){return import(`${this.urls.jsModulesPath}${Q}`)}}var W4=O4(X1(),1);var e,N,N1,_4,h,Y1,z1,w0,H1,T0,x0,M0,_1,n={},B1=[],B4=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,X0=Array.isArray;function k(Q,Z){for(var K in Z)Q[K]=Z[K];return Q}function y0(Q){Q&&Q.parentNode&&Q.parentNode.removeChild(Q)}function x(Q,Z,K){var W,$,q,J={};for(q in Z)q=="key"?W=Z[q]:q=="ref"?$=Z[q]:J[q]=Z[q];if(arguments.length>2&&(J.children=arguments.length>3?e.call(arguments,2):K),typeof Q=="function"&&Q.defaultProps!=null)for(q in Q.defaultProps)J[q]===void 0&&(J[q]=Q.defaultProps[q]);return t(Q,J,W,$,null)}function t(Q,Z,K,W,$){var q={type:Q,props:Z,key:K,ref:W,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:$==null?++N1:$,__i:-1,__u:0};return $==null&&N.vnode!=null&&N.vnode(q),q}function C0(){return{current:null}}function M(Q){return Q.children}function I(Q,Z){this.props=Q,this.context=Z}function s(Q,Z){if(Z==null)return Q.__?s(Q.__,Q.__i+1):null;for(var K;Z<Q.__k.length;Z++)if((K=Q.__k[Z])!=null&&K.__e!=null)return K.__e;return typeof Q.type=="function"?s(Q):null}function D1(Q){var Z,K;if((Q=Q.__)!=null&&Q.__c!=null){for(Q.__e=Q.__c.base=null,Z=0;Z<Q.__k.length;Z++)if((K=Q.__k[Z])!=null&&K.__e!=null){Q.__e=Q.__c.base=K.__e;break}return D1(Q)}}function I0(Q){(!Q.__d&&(Q.__d=!0)&&h.push(Q)&&!G0.__r++||Y1!==N.debounceRendering)&&((Y1=N.debounceRendering)||z1)(G0)}function G0(){var Q,Z,K,W,$,q,J,X;for(h.sort(w0);Q=h.shift();)Q.__d&&(Z=h.length,W=void 0,q=($=(K=Q).__v).__e,J=[],X=[],K.__P&&((W=k({},$)).__v=$.__v+1,N.vnode&&N.vnode(W),j0(K.__P,W,$,K.__n,K.__P.namespaceURI,32&$.__u?[q]:null,J,q==null?s($):q,!!(32&$.__u),X),W.__v=$.__v,W.__.__k[W.__i]=W,F1(J,W,X),W.__e!=q&&D1(W)),h.length>Z&&h.sort(w0));G0.__r=0}function L1(Q,Z,K,W,$,q,J,X,O,Y,z){var G,H,V,U,y,P,B=W&&W.__k||B1,D=Z.length;for(O=D4(K,Z,B,O,D),G=0;G<D;G++)(V=K.__k[G])!=null&&(H=V.__i===-1?n:B[V.__i]||n,V.__i=G,P=j0(Q,V,H,$,q,J,X,O,Y,z),U=V.__e,V.ref&&H.ref!=V.ref&&(H.ref&&S0(H.ref,null,V),z.push(V.ref,V.__c||U,V)),y==null&&U!=null&&(y=U),4&V.__u||H.__k===V.__k?O=A1(V,O,Q):typeof V.type=="function"&&P!==void 0?O=P:U&&(O=U.nextSibling),V.__u&=-7);return K.__e=y,O}function D4(Q,Z,K,W,$){var q,J,X,O,Y,z=K.length,G=z,H=0;for(Q.__k=new Array($),q=0;q<$;q++)(J=Z[q])!=null&&typeof J!="boolean"&&typeof J!="function"?(O=q+H,(J=Q.__k[q]=typeof J=="string"||typeof J=="number"||typeof J=="bigint"||J.constructor==String?t(null,J,null,null,null):X0(J)?t(M,{children:J},null,null,null):J.constructor===void 0&&J.__b>0?t(J.type,J.props,J.key,J.ref?J.ref:null,J.__v):J).__=Q,J.__b=Q.__b+1,X=null,(Y=J.__i=L4(J,K,O,G))!==-1&&(G--,(X=K[Y])&&(X.__u|=2)),X==null||X.__v===null?(Y==-1&&H--,typeof J.type!="function"&&(J.__u|=4)):Y!=O&&(Y==O-1?H--:Y==O+1?H++:(Y>O?H--:H++,J.__u|=4))):Q.__k[q]=null;if(G)for(q=0;q<z;q++)(X=K[q])!=null&&(2&X.__u)==0&&(X.__e==W&&(W=s(X)),U1(X,X));return W}function A1(Q,Z,K){var W,$;if(typeof Q.type=="function"){for(W=Q.__k,$=0;W&&$<W.length;$++)W[$]&&(W[$].__=Q,Z=A1(W[$],Z,K));return Z}Q.__e!=Z&&(Z&&Q.type&&!K.contains(Z)&&(Z=s(Q)),K.insertBefore(Q.__e,Z||null),Z=Q.__e);do Z=Z&&Z.nextSibling;while(Z!=null&&Z.nodeType==8);return Z}function j(Q,Z){return Z=Z||[],Q==null||typeof Q=="boolean"||(X0(Q)?Q.some(function(K){j(K,Z)}):Z.push(Q)),Z}function L4(Q,Z,K,W){var $,q,J=Q.key,X=Q.type,O=Z[K];if(O===null||O&&J==O.key&&X===O.type&&(2&O.__u)==0)return K;if(W>(O!=null&&(2&O.__u)==0?1:0))for($=K-1,q=K+1;$>=0||q<Z.length;){if($>=0){if((O=Z[$])&&(2&O.__u)==0&&J==O.key&&X===O.type)return $;$--}if(q<Z.length){if((O=Z[q])&&(2&O.__u)==0&&J==O.key&&X===O.type)return q;q++}}return-1}function O1(Q,Z,K){Z[0]=="-"?Q.setProperty(Z,K==null?"":K):Q[Z]=K==null?"":typeof K!="number"||B4.test(Z)?K:K+"px"}function J0(Q,Z,K,W,$){var q;Q:if(Z=="style")if(typeof K=="string")Q.style.cssText=K;else{if(typeof W=="string"&&(Q.style.cssText=W=""),W)for(Z in W)K&&Z in K||O1(Q.style,Z,"");if(K)for(Z in K)W&&K[Z]===W[Z]||O1(Q.style,Z,K[Z])}else if(Z[0]=="o"&&Z[1]=="n")q=Z!=(Z=Z.replace(H1,"$1")),Z=Z.toLowerCase()in Q||Z=="onFocusOut"||Z=="onFocusIn"?Z.toLowerCase().slice(2):Z.slice(2),Q.l||(Q.l={}),Q.l[Z+q]=K,K?W?K.u=W.u:(K.u=T0,Q.addEventListener(Z,q?M0:x0,q)):Q.removeEventListener(Z,q?M0:x0,q);else{if($=="http://www.w3.org/2000/svg")Z=Z.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(Z!="width"&&Z!="height"&&Z!="href"&&Z!="list"&&Z!="form"&&Z!="tabIndex"&&Z!="download"&&Z!="rowSpan"&&Z!="colSpan"&&Z!="role"&&Z!="popover"&&Z in Q)try{Q[Z]=K==null?"":K;break Q}catch(J){}typeof K=="function"||(K==null||K===!1&&Z[4]!="-"?Q.removeAttribute(Z):Q.setAttribute(Z,Z=="popover"&&K==1?"":K))}}function V1(Q){return function(Z){if(this.l){var K=this.l[Z.type+Q];if(Z.t==null)Z.t=T0++;else if(Z.t<K.u)return;return K(N.event?N.event(Z):Z)}}}function j0(Q,Z,K,W,$,q,J,X,O,Y){var z,G,H,V,U,y,P,B,D,l,E,$0,r,Q1,q0,U0,P0,C=Z.type;if(Z.constructor!==void 0)return null;128&K.__u&&(O=!!(32&K.__u),q=[X=Z.__e=K.__e]),(z=N.__b)&&z(Z);Q:if(typeof C=="function")try{if(B=Z.props,D="prototype"in C&&C.prototype.render,l=(z=C.contextType)&&W[z.__c],E=z?l?l.props.value:z.__:W,K.__c?P=(G=Z.__c=K.__c).__=G.__E:(D?Z.__c=G=new C(B,E):(Z.__c=G=new I(B,E),G.constructor=C,G.render=F4),l&&l.sub(G),G.props=B,G.state||(G.state={}),G.context=E,G.__n=W,H=G.__d=!0,G.__h=[],G._sb=[]),D&&G.__s==null&&(G.__s=G.state),D&&C.getDerivedStateFromProps!=null&&(G.__s==G.state&&(G.__s=k({},G.__s)),k(G.__s,C.getDerivedStateFromProps(B,G.__s))),V=G.props,U=G.state,G.__v=Z,H)D&&C.getDerivedStateFromProps==null&&G.componentWillMount!=null&&G.componentWillMount(),D&&G.componentDidMount!=null&&G.__h.push(G.componentDidMount);else{if(D&&C.getDerivedStateFromProps==null&&B!==V&&G.componentWillReceiveProps!=null&&G.componentWillReceiveProps(B,E),!G.__e&&(G.shouldComponentUpdate!=null&&G.shouldComponentUpdate(B,G.__s,E)===!1||Z.__v==K.__v)){for(Z.__v!=K.__v&&(G.props=B,G.state=G.__s,G.__d=!1),Z.__e=K.__e,Z.__k=K.__k,Z.__k.some(function(o){o&&(o.__=Z)}),$0=0;$0<G._sb.length;$0++)G.__h.push(G._sb[$0]);G._sb=[],G.__h.length&&J.push(G);break Q}G.componentWillUpdate!=null&&G.componentWillUpdate(B,G.__s,E),D&&G.componentDidUpdate!=null&&G.__h.push(function(){G.componentDidUpdate(V,U,y)})}if(G.context=E,G.props=B,G.__P=Q,G.__e=!1,r=N.__r,Q1=0,D){for(G.state=G.__s,G.__d=!1,r&&r(Z),z=G.render(G.props,G.state,G.context),q0=0;q0<G._sb.length;q0++)G.__h.push(G._sb[q0]);G._sb=[]}else do G.__d=!1,r&&r(Z),z=G.render(G.props,G.state,G.context),G.state=G.__s;while(G.__d&&++Q1<25);G.state=G.__s,G.getChildContext!=null&&(W=k(k({},W),G.getChildContext())),D&&!H&&G.getSnapshotBeforeUpdate!=null&&(y=G.getSnapshotBeforeUpdate(V,U)),X=L1(Q,X0(U0=z!=null&&z.type===M&&z.key==null?z.props.children:z)?U0:[U0],Z,K,W,$,q,J,X,O,Y),G.base=Z.__e,Z.__u&=-161,G.__h.length&&J.push(G),P&&(G.__E=G.__=null)}catch(o){if(Z.__v=null,O||q!=null)if(o.then){for(Z.__u|=O?160:128;X&&X.nodeType==8&&X.nextSibling;)X=X.nextSibling;q[q.indexOf(X)]=null,Z.__e=X}else for(P0=q.length;P0--;)y0(q[P0]);else Z.__e=K.__e,Z.__k=K.__k;N.__e(o,Z,K)}else q==null&&Z.__v==K.__v?(Z.__k=K.__k,Z.__e=K.__e):X=Z.__e=A4(K.__e,Z,K,W,$,q,J,O,Y);return(z=N.diffed)&&z(Z),128&Z.__u?void 0:X}function F1(Q,Z,K){for(var W=0;W<K.length;W++)S0(K[W],K[++W],K[++W]);N.__c&&N.__c(Z,Q),Q.some(function($){try{Q=$.__h,$.__h=[],Q.some(function(q){q.call($)})}catch(q){N.__e(q,$.__v)}})}function A4(Q,Z,K,W,$,q,J,X,O){var Y,z,G,H,V,U,y,P=K.props,B=Z.props,D=Z.type;if(D=="svg"?$="http://www.w3.org/2000/svg":D=="math"?$="http://www.w3.org/1998/Math/MathML":$||($="http://www.w3.org/1999/xhtml"),q!=null){for(Y=0;Y<q.length;Y++)if((V=q[Y])&&"setAttribute"in V==!!D&&(D?V.localName==D:V.nodeType==3)){Q=V,q[Y]=null;break}}if(Q==null){if(D==null)return document.createTextNode(B);Q=document.createElementNS($,D,B.is&&B),X&&(N.__m&&N.__m(Z,q),X=!1),q=null}if(D===null)P===B||X&&Q.data===B||(Q.data=B);else{if(q=q&&e.call(Q.childNodes),P=K.props||n,!X&&q!=null)for(P={},Y=0;Y<Q.attributes.length;Y++)P[(V=Q.attributes[Y]).name]=V.value;for(Y in P)if(V=P[Y],Y=="children");else if(Y=="dangerouslySetInnerHTML")G=V;else if(!(Y in B)){if(Y=="value"&&"defaultValue"in B||Y=="checked"&&"defaultChecked"in B)continue;J0(Q,Y,null,V,$)}for(Y in B)V=B[Y],Y=="children"?H=V:Y=="dangerouslySetInnerHTML"?z=V:Y=="value"?U=V:Y=="checked"?y=V:X&&typeof V!="function"||P[Y]===V||J0(Q,Y,V,P[Y],$);if(z)X||G&&(z.__html===G.__html||z.__html===Q.innerHTML)||(Q.innerHTML=z.__html),Z.__k=[];else if(G&&(Q.innerHTML=""),L1(Q,X0(H)?H:[H],Z,K,W,D=="foreignObject"?"http://www.w3.org/1999/xhtml":$,q,J,q?q[0]:K.__k&&s(K,0),X,O),q!=null)for(Y=q.length;Y--;)y0(q[Y]);X||(Y="value",D=="progress"&&U==null?Q.removeAttribute("value"):U!==void 0&&(U!==Q[Y]||D=="progress"&&!U||D=="option"&&U!==P[Y])&&J0(Q,Y,U,P[Y],$),Y="checked",y!==void 0&&y!==Q[Y]&&J0(Q,Y,y,P[Y],$))}return Q}function S0(Q,Z,K){try{if(typeof Q=="function"){var W=typeof Q.__u=="function";W&&Q.__u(),W&&Z==null||(Q.__u=Q(Z))}else Q.current=Z}catch($){N.__e($,K)}}function U1(Q,Z,K){var W,$;if(N.unmount&&N.unmount(Q),(W=Q.ref)&&(W.current&&W.current!==Q.__e||S0(W,null,Z)),(W=Q.__c)!=null){if(W.componentWillUnmount)try{W.componentWillUnmount()}catch(q){N.__e(q,Z)}W.base=W.__P=null}if(W=Q.__k)for($=0;$<W.length;$++)W[$]&&U1(W[$],Z,K||typeof Q.type!="function");K||y0(Q.__e),Q.__c=Q.__=Q.__e=void 0}function F4(Q,Z,K){return this.constructor(Q,K)}function p(Q,Z,K){var W,$,q,J;Z==document&&(Z=document.documentElement),N.__&&N.__(Q,Z),$=(W=typeof K=="function")?null:K&&K.__k||Z.__k,q=[],J=[],j0(Z,Q=(!W&&K||Z).__k=x(M,null,[Q]),$||n,n,Z.namespaceURI,!W&&K?[K]:$?null:Z.firstChild?e.call(Z.childNodes):null,q,!W&&K?K:$?$.__e:Z.firstChild,W,J),F1(q,Q,J)}function k0(Q,Z){p(Q,Z,k0)}function P1(Q,Z,K){var W,$,q,J,X=k({},Q.props);for(q in Q.type&&Q.type.defaultProps&&(J=Q.type.defaultProps),Z)q=="key"?W=Z[q]:q=="ref"?$=Z[q]:X[q]=Z[q]===void 0&&J!==void 0?J[q]:Z[q];return arguments.length>2&&(X.children=arguments.length>3?e.call(arguments,2):K),t(Q.type,X,W||Q.key,$||Q.ref,null)}function Q0(Q,Z){var K={__c:Z="__cC"+_1++,__:Q,Consumer:function(W,$){return W.children($)},Provider:function(W){var $,q;return this.getChildContext||($=new Set,(q={})[Z]=this,this.getChildContext=function(){return q},this.componentWillUnmount=function(){$=null},this.shouldComponentUpdate=function(J){this.props.value!==J.value&&$.forEach(function(X){X.__e=!0,I0(X)})},this.sub=function(J){$.add(J);var X=J.componentWillUnmount;J.componentWillUnmount=function(){$&&$.delete(J),X&&X.call(J)}}),W.children}};return K.Provider.__=K.Consumer.contextType=K}e=B1.slice,N={__e:function(Q,Z,K,W){for(var $,q,J;Z=Z.__;)if(($=Z.__c)&&!$.__)try{if((q=$.constructor)&&q.getDerivedStateFromError!=null&&($.setState(q.getDerivedStateFromError(Q)),J=$.__d),$.componentDidCatch!=null&&($.componentDidCatch(Q,W||{}),J=$.__d),J)return $.__E=$}catch(X){Q=X}throw Q}},N1=0,_4=function(Q){return Q!=null&&Q.constructor==null},I.prototype.setState=function(Q,Z){var K;K=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=k({},this.state),typeof Q=="function"&&(Q=Q(k({},K),this.props)),Q&&k(K,Q),Q!=null&&this.__v&&(Z&&this._sb.push(Z),I0(this))},I.prototype.forceUpdate=function(Q){this.__v&&(this.__e=!0,Q&&this.__h.push(Q),I0(this))},I.prototype.render=M,h=[],z1=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,w0=function(Q,Z){return Q.__v.__b-Z.__v.__b},G0.__r=0,H1=/(PointerCapture)$|Capture$/i,T0=0,x0=V1(!1),M0=V1(!0),_1=0;var g,L,b0,R1,a=0,j1=[],A=N,w1=A.__b,x1=A.__r,M1=A.diffed,I1=A.__c,T1=A.unmount,y1=A.__;function c(Q,Z){A.__h&&A.__h(L,Q,a||Z),a=0;var K=L.__H||(L.__H={__:[],__h:[]});return Q>=K.__.length&&K.__.push({}),K.__[Q]}function f(Q){return a=1,O0(S1,Q)}function O0(Q,Z,K){var W=c(g++,2);if(W.t=Q,!W.__c&&(W.__=[K?K(Z):S1(void 0,Z),function(X){var O=W.__N?W.__N[0]:W.__[0],Y=W.t(O,X);O!==Y&&(W.__N=[Y,W.__[1]],W.__c.setState({}))}],W.__c=L,!L.u)){var $=function(X,O,Y){if(!W.__c.__H)return!0;var z=W.__c.__H.__.filter(function(H){return!!H.__c});if(z.every(function(H){return!H.__N}))return!q||q.call(this,X,O,Y);var G=W.__c.props!==X;return z.forEach(function(H){if(H.__N){var V=H.__[0];H.__=H.__N,H.__N=void 0,V!==H.__[0]&&(G=!0)}}),q&&q.call(this,X,O,Y)||G};L.u=!0;var{shouldComponentUpdate:q,componentWillUpdate:J}=L;L.componentWillUpdate=function(X,O,Y){if(this.__e){var z=q;q=void 0,$(X,O,Y),q=z}J&&J.call(this,X,O,Y)},L.shouldComponentUpdate=$}return W.__N||W.__}function d(Q,Z){var K=c(g++,3);!A.__s&&m0(K.__H,Z)&&(K.__=Q,K.i=Z,L.__H.__h.push(K))}function v(Q,Z){var K=c(g++,4);!A.__s&&m0(K.__H,Z)&&(K.__=Q,K.i=Z,L.__h.push(K))}function i(Q){return a=5,Z0(function(){return{current:Q}},[])}function g0(Q,Z,K){a=6,v(function(){return typeof Q=="function"?(Q(Z()),function(){return Q(null)}):Q?(Q.current=Z(),function(){return Q.current=null}):void 0},K==null?K:K.concat(Q))}function Z0(Q,Z){var K=c(g++,7);return m0(K.__H,Z)&&(K.__=Q(),K.__H=Z,K.__h=Q),K.__}function f0(Q,Z){return a=8,Z0(function(){return Q},Z)}function K0(Q){var Z=L.context[Q.__c],K=c(g++,9);return K.c=Q,Z?(K.__==null&&(K.__=!0,Z.sub(L)),Z.props.value):Q.__}function h0(Q,Z){A.useDebugValue&&A.useDebugValue(Z?Z(Q):Q)}function d0(){var Q=c(g++,11);if(!Q.__){for(var Z=L.__v;Z!==null&&!Z.__m&&Z.__!==null;)Z=Z.__;var K=Z.__m||(Z.__m=[0,0]);Q.__="P"+K[0]+"-"+K[1]++}return Q.__}function U4(){for(var Q;Q=j1.shift();)if(Q.__P&&Q.__H)try{Q.__H.__h.forEach(Y0),Q.__H.__h.forEach(E0),Q.__H.__h=[]}catch(Z){Q.__H.__h=[],A.__e(Z,Q.__v)}}A.__b=function(Q){L=null,w1&&w1(Q)},A.__=function(Q,Z){Q&&Z.__k&&Z.__k.__m&&(Q.__m=Z.__k.__m),y1&&y1(Q,Z)},A.__r=function(Q){x1&&x1(Q),g=0;var Z=(L=Q.__c).__H;Z&&(b0===L?(Z.__h=[],L.__h=[],Z.__.forEach(function(K){K.__N&&(K.__=K.__N),K.i=K.__N=void 0})):(Z.__h.forEach(Y0),Z.__h.forEach(E0),Z.__h=[],g=0)),b0=L},A.diffed=function(Q){M1&&M1(Q);var Z=Q.__c;Z&&Z.__H&&(Z.__H.__h.length&&(j1.push(Z)!==1&&R1===A.requestAnimationFrame||((R1=A.requestAnimationFrame)||P4)(U4)),Z.__H.__.forEach(function(K){K.i&&(K.__H=K.i),K.i=void 0})),b0=L=null},A.__c=function(Q,Z){Z.some(function(K){try{K.__h.forEach(Y0),K.__h=K.__h.filter(function(W){return!W.__||E0(W)})}catch(W){Z.some(function($){$.__h&&($.__h=[])}),Z=[],A.__e(W,K.__v)}}),I1&&I1(Q,Z)},A.unmount=function(Q){T1&&T1(Q);var Z,K=Q.__c;K&&K.__H&&(K.__H.__.forEach(function(W){try{Y0(W)}catch($){Z=$}}),K.__H=void 0,Z&&A.__e(Z,K.__v))};var C1=typeof requestAnimationFrame=="function";function P4(Q){var Z,K=function(){clearTimeout(W),C1&&cancelAnimationFrame(Z),setTimeout(Q)},W=setTimeout(K,100);C1&&(Z=requestAnimationFrame(K))}function Y0(Q){var Z=L,K=Q.__c;typeof K=="function"&&(Q.__c=void 0,K()),L=Z}function E0(Q){var Z=L;Q.__c=Q.__(),L=Z}function m0(Q,Z){return!Q||Q.length!==Z.length||Z.some(function(K,W){return K!==Q[W]})}function S1(Q,Z){return typeof Z=="function"?Z(Q):Z}function s1(Q,Z){for(var K in Z)Q[K]=Z[K];return Q}function p0(Q,Z){for(var K in Q)if(K!=="__source"&&!(K in Z))return!0;for(var W in Z)if(W!=="__source"&&Q[W]!==Z[W])return!0;return!1}function p1(Q,Z){var K=Z(),W=f({t:{__:K,u:Z}}),$=W[0].t,q=W[1];return v(function(){$.__=K,$.u=Z,s0($)&&q({t:$})},[Q,K,Z]),d(function(){return s0($)&&q({t:$}),Q(function(){s0($)&&q({t:$})})},[Q]),K}function s0(Q){var Z,K,W=Q.u,$=Q.__;try{var q=W();return!((Z=$)===(K=q)&&(Z!==0||1/Z==1/K)||Z!=Z&&K!=K)}catch(J){return!0}}function a1(Q){Q()}function c1(Q){return Q}function v1(){return[!1,a1]}var i1=v;function a0(Q,Z){this.props=Q,this.context=Z}function R4(Q,Z){function K($){var q=this.props.ref,J=q==$.ref;return!J&&q&&(q.call?q(null):q.current=null),Z?!Z(this.props,$)||!J:p0(this.props,$)}function W($){return this.shouldComponentUpdate=K,x(Q,$)}return W.displayName="Memo("+(Q.displayName||Q.name)+")",W.prototype.isReactComponent=!0,W.__f=!0,W}(a0.prototype=new I).isPureReactComponent=!0,a0.prototype.shouldComponentUpdate=function(Q,Z){return p0(this.props,Q)||p0(this.state,Z)};var k1=N.__b;N.__b=function(Q){Q.type&&Q.type.__f&&Q.ref&&(Q.props.ref=Q.ref,Q.ref=null),k1&&k1(Q)};var w4=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function x4(Q){function Z(K){var W=s1({},K);return delete W.ref,Q(W,K.ref||null)}return Z.$$typeof=w4,Z.render=Z,Z.prototype.isReactComponent=Z.__f=!0,Z.displayName="ForwardRef("+(Q.displayName||Q.name)+")",Z}var b1=function(Q,Z){return Q==null?null:j(j(Q).map(Z))},M4={map:b1,forEach:b1,count:function(Q){return Q?j(Q).length:0},only:function(Q){var Z=j(Q);if(Z.length!==1)throw"Children.only";return Z[0]},toArray:j},I4=N.__e;N.__e=function(Q,Z,K,W){if(Q.then){for(var $,q=Z;q=q.__;)if(($=q.__c)&&$.__c)return Z.__e==null&&(Z.__e=K.__e,Z.__k=K.__k),$.__c(Q,Z)}I4(Q,Z,K,W)};var E1=N.unmount;function u1(Q,Z,K){return Q&&(Q.__c&&Q.__c.__H&&(Q.__c.__H.__.forEach(function(W){typeof W.__c=="function"&&W.__c()}),Q.__c.__H=null),(Q=s1({},Q)).__c!=null&&(Q.__c.__P===K&&(Q.__c.__P=Z),Q.__c=null),Q.__k=Q.__k&&Q.__k.map(function(W){return u1(W,Z,K)})),Q}function l1(Q,Z,K){return Q&&K&&(Q.__v=null,Q.__k=Q.__k&&Q.__k.map(function(W){return l1(W,Z,K)}),Q.__c&&Q.__c.__P===Z&&(Q.__e&&K.appendChild(Q.__e),Q.__c.__e=!0,Q.__c.__P=K)),Q}function V0(){this.__u=0,this.o=null,this.__b=null}function r1(Q){var Z=Q.__.__c;return Z&&Z.__a&&Z.__a(Q)}function T4(Q){var Z,K,W;function $(q){if(Z||(Z=Q()).then(function(J){K=J.default||J},function(J){W=J}),W)throw W;if(!K)throw Z;return x(K,q)}return $.displayName="Lazy",$.__f=!0,$}function W0(){this.i=null,this.l=null}N.unmount=function(Q){var Z=Q.__c;Z&&Z.__R&&Z.__R(),Z&&32&Q.__u&&(Q.type=null),E1&&E1(Q)},(V0.prototype=new I).__c=function(Q,Z){var K=Z.__c,W=this;W.o==null&&(W.o=[]),W.o.push(K);var $=r1(W.__v),q=!1,J=function(){q||(q=!0,K.__R=null,$?$(X):X())};K.__R=J;var X=function(){if(!--W.__u){if(W.state.__a){var O=W.state.__a;W.__v.__k[0]=l1(O,O.__c.__P,O.__c.__O)}var Y;for(W.setState({__a:W.__b=null});Y=W.o.pop();)Y.forceUpdate()}};W.__u++||32&Z.__u||W.setState({__a:W.__b=W.__v.__k[0]}),Q.then(J,J)},V0.prototype.componentWillUnmount=function(){this.o=[]},V0.prototype.render=function(Q,Z){if(this.__b){if(this.__v.__k){var K=document.createElement("div"),W=this.__v.__k[0].__c;this.__v.__k[0]=u1(this.__b,K,W.__O=W.__P)}this.__b=null}var $=Z.__a&&x(M,null,Q.fallback);return $&&($.__u&=-33),[x(M,null,Z.__a?null:Q.children),$]};var g1=function(Q,Z,K){if(++K[1]===K[0]&&Q.l.delete(Z),Q.props.revealOrder&&(Q.props.revealOrder[0]!=="t"||!Q.l.size))for(K=Q.i;K;){for(;K.length>3;)K.pop()();if(K[1]<K[0])break;Q.i=K=K[2]}};function y4(Q){return this.getChildContext=function(){return Q.context},Q.children}function C4(Q){var Z=this,K=Q.h;Z.componentWillUnmount=function(){p(null,Z.v),Z.v=null,Z.h=null},Z.h&&Z.h!==K&&Z.componentWillUnmount(),Z.v||(Z.h=K,Z.v={nodeType:1,parentNode:K,childNodes:[],contains:function(){return!0},appendChild:function(W){this.childNodes.push(W),Z.h.appendChild(W)},insertBefore:function(W,$){this.childNodes.push(W),Z.h.insertBefore(W,$)},removeChild:function(W){this.childNodes.splice(this.childNodes.indexOf(W)>>>1,1),Z.h.removeChild(W)}}),p(x(y4,{context:Z.context},Q.__v),Z.v)}function j4(Q,Z){var K=x(C4,{__v:Q,h:Z});return K.containerInfo=Z,K}(W0.prototype=new I).__a=function(Q){var Z=this,K=r1(Z.__v),W=Z.l.get(Q);return W[0]++,function($){var q=function(){Z.props.revealOrder?(W.push($),g1(Z,Q,W)):$()};K?K(q):q()}},W0.prototype.render=function(Q){this.i=null,this.l=new Map;var Z=j(Q.children);Q.revealOrder&&Q.revealOrder[0]==="b"&&Z.reverse();for(var K=Z.length;K--;)this.l.set(Z[K],this.i=[1,0,this.i]);return Q.children},W0.prototype.componentDidUpdate=W0.prototype.componentDidMount=function(){var Q=this;this.l.forEach(function(Z,K){g1(Q,K,Z)})};var o1=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,S4=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,k4=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,b4=/[A-Z0-9]/g,E4=typeof document!="undefined",g4=function(Q){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(Q)};function f4(Q,Z,K){return Z.__k==null&&(Z.textContent=""),p(Q,Z),typeof K=="function"&&K(),Q?Q.__c:null}function h4(Q,Z,K){return k0(Q,Z),typeof K=="function"&&K(),Q?Q.__c:null}I.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(Q){Object.defineProperty(I.prototype,Q,{configurable:!0,get:function(){return this["UNSAFE_"+Q]},set:function(Z){Object.defineProperty(this,Q,{configurable:!0,writable:!0,value:Z})}})});var f1=N.event;function d4(){}function m4(){return this.cancelBubble}function s4(){return this.defaultPrevented}N.event=function(Q){return f1&&(Q=f1(Q)),Q.persist=d4,Q.isPropagationStopped=m4,Q.isDefaultPrevented=s4,Q.nativeEvent=Q};var c0,p4={enumerable:!1,configurable:!0,get:function(){return this.class}},h1=N.vnode;N.vnode=function(Q){typeof Q.type=="string"&&function(Z){var{props:K,type:W}=Z,$={},q=W.indexOf("-")===-1;for(var J in K){var X=K[J];if(!(J==="value"&&("defaultValue"in K)&&X==null||E4&&J==="children"&&W==="noscript"||J==="class"||J==="className")){var O=J.toLowerCase();J==="defaultValue"&&"value"in K&&K.value==null?J="value":J==="download"&&X===!0?X="":O==="translate"&&X==="no"?X=!1:O[0]==="o"&&O[1]==="n"?O==="ondoubleclick"?J="ondblclick":O!=="onchange"||W!=="input"&&W!=="textarea"||g4(K.type)?O==="onfocus"?J="onfocusin":O==="onblur"?J="onfocusout":k4.test(J)&&(J=O):O=J="oninput":q&&S4.test(J)?J=J.replace(b4,"-$&").toLowerCase():X===null&&(X=void 0),O==="oninput"&&$[J=O]&&(J="oninputCapture"),$[J]=X}}W=="select"&&$.multiple&&Array.isArray($.value)&&($.value=j(K.children).forEach(function(Y){Y.props.selected=$.value.indexOf(Y.props.value)!=-1})),W=="select"&&$.defaultValue!=null&&($.value=j(K.children).forEach(function(Y){Y.props.selected=$.multiple?$.defaultValue.indexOf(Y.props.value)!=-1:$.defaultValue==Y.props.value})),K.class&&!K.className?($.class=K.class,Object.defineProperty($,"className",p4)):(K.className&&!K.class||K.class&&K.className)&&($.class=$.className=K.className),Z.props=$}(Q),Q.$$typeof=o1,h1&&h1(Q)};var d1=N.__r;N.__r=function(Q){d1&&d1(Q),c0=Q.__c};var m1=N.diffed;N.diffed=function(Q){m1&&m1(Q);var{props:Z,__e:K}=Q;K!=null&&Q.type==="textarea"&&"value"in Z&&Z.value!==K.value&&(K.value=Z.value==null?"":Z.value),c0=null};var a4={ReactCurrentDispatcher:{current:{readContext:function(Q){return c0.__n[Q.__c].props.value},useCallback:f0,useContext:K0,useDebugValue:h0,useDeferredValue:c1,useEffect:d,useId:d0,useImperativeHandle:g0,useInsertionEffect:i1,useLayoutEffect:v,useMemo:Z0,useReducer:O0,useRef:i,useState:f,useSyncExternalStore:p1,useTransition:v1}}};function c4(Q){return x.bind(null,Q)}function N0(Q){return!!Q&&Q.$$typeof===o1}function v4(Q){return N0(Q)&&Q.type===M}function i4(Q){return!!Q&&!!Q.displayName&&(typeof Q.displayName=="string"||Q.displayName instanceof String)&&Q.displayName.startsWith("Memo(")}function u4(Q){return N0(Q)?P1.apply(null,arguments):Q}function l4(Q){return!!Q.__k&&(p(null,Q),!0)}function r4(Q){return Q&&(Q.base||Q.nodeType===1&&Q)||null}var o4=function(Q,Z){return Q(Z)},t4=function(Q,Z){return Q(Z)},n4=M,e4=N0,F={useState:f,useId:d0,useReducer:O0,useEffect:d,useLayoutEffect:v,useInsertionEffect:i1,useTransition:v1,useDeferredValue:c1,useSyncExternalStore:p1,startTransition:a1,useRef:i,useImperativeHandle:g0,useMemo:Z0,useCallback:f0,useContext:K0,useDebugValue:h0,version:"18.3.1",Children:M4,render:f4,hydrate:h4,unmountComponentAtNode:l4,createPortal:j4,createElement:x,createContext:Q0,createFactory:c4,cloneElement:u4,createRef:C0,Fragment:M,isValidElement:N0,isElement:e4,isFragment:v4,isMemo:i4,findDOMNode:r4,Component:I,PureComponent:a0,memo:R4,forwardRef:x4,flushSync:t4,unstable_batchedUpdates:o4,StrictMode:n4,Suspense:V0,SuspenseList:W0,lazy:T4,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:a4};function o0(Q){return Q.type in n1?n1[Q.type](Q):b(Q)}var b=(Q)=>({bubbles:Q.bubbles,composed:Q.composed,currentTarget:S(Q.currentTarget),defaultPrevented:Q.defaultPrevented,eventPhase:Q.eventPhase,isTrusted:Q.isTrusted,target:S(Q.target),timeStamp:Q.timeStamp,type:Q.type,selection:Y5(window.getSelection())}),v0=(Q)=>({...b(Q),clipboardData:t0(Q.clipboardData)}),i0=(Q)=>({...u(Q),data:Q.data}),Q5=(Q)=>({...u(Q),data:Q.data,inputType:Q.inputType,dataTransfer:t0(Q.dataTransfer),isComposing:Q.isComposing}),u0=(Q)=>({...u(Q),code:Q.code,isComposing:Q.isComposing,altKey:Q.altKey,ctrlKey:Q.ctrlKey,key:Q.key,location:Q.location,metaKey:Q.metaKey,repeat:Q.repeat,shiftKey:Q.shiftKey}),R=(Q)=>({...b(Q),altKey:Q.altKey,button:Q.button,buttons:Q.buttons,clientX:Q.clientX,clientY:Q.clientY,ctrlKey:Q.ctrlKey,metaKey:Q.metaKey,pageX:Q.pageX,pageY:Q.pageY,screenX:Q.screenX,screenY:Q.screenY,shiftKey:Q.shiftKey,movementX:Q.movementX,movementY:Q.movementY,offsetX:Q.offsetX,offsetY:Q.offsetY,x:Q.x,y:Q.y,relatedTarget:S(Q.relatedTarget)}),z0=(Q)=>({...u(Q),altKey:Q.altKey,ctrlKey:Q.ctrlKey,metaKey:Q.metaKey,shiftKey:Q.shiftKey,touches:Array.from(Q.touches).map(l0),changedTouches:Array.from(Q.changedTouches).map(l0),targetTouches:Array.from(Q.targetTouches).map(l0)}),u=(Q)=>({...b(Q),detail:Q.detail}),H0=(Q)=>({...b(Q),animationName:Q.animationName,pseudoElement:Q.pseudoElement,elapsedTime:Q.elapsedTime}),_0=(Q)=>({...b(Q),propertyName:Q.propertyName,pseudoElement:Q.pseudoElement,elapsedTime:Q.elapsedTime}),B0=(Q)=>({...u(Q),relatedTarget:S(Q.relatedTarget)}),Z5=(Q)=>({...b(Q),absolute:Q.absolute,alpha:Q.alpha,beta:Q.beta,gamma:Q.gamma}),m=(Q)=>({...R(Q),dataTransfer:t0(Q.dataTransfer)}),t1=(Q)=>({...b(Q),gamepad:q5(Q.gamepad)}),T=(Q)=>({...R(Q),pointerId:Q.pointerId,width:Q.width,height:Q.height,pressure:Q.pressure,tiltX:Q.tiltX,tiltY:Q.tiltY,pointerType:Q.pointerType,isPrimary:Q.isPrimary,tangentialPressure:Q.tangentialPressure,twist:Q.twist}),K5=(Q)=>({...R(Q),deltaMode:Q.deltaMode,deltaX:Q.deltaX,deltaY:Q.deltaY,deltaZ:Q.deltaZ}),W5=(Q)=>({...b(Q),submitter:S(Q.submitter)}),n1={animationcancel:H0,animationend:H0,animationiteration:H0,animationstart:H0,beforeinput:Q5,compositionend:i0,compositionstart:i0,compositionupdate:i0,copy:v0,cut:v0,paste:v0,deviceorientation:Z5,drag:m,dragend:m,dragenter:m,dragleave:m,dragover:m,dragstart:m,drop:m,error:u,blur:B0,focus:B0,focusin:B0,focusout:B0,gamepadconnected:t1,gamepaddisconnected:t1,keydown:u0,keypress:u0,keyup:u0,auxclick:R,click:R,dblclick:R,contextmenu:R,mousedown:R,mouseenter:R,mouseleave:R,mousemove:R,mouseout:R,mouseover:R,mouseup:R,scroll:R,gotpointercapture:T,lostpointercapture:T,pointercancel:T,pointerdown:T,pointerenter:T,pointerleave:T,pointerlockchange:T,pointerlockerror:T,pointermove:T,pointerout:T,pointerover:T,pointerup:T,submit:W5,touchcancel:z0,touchend:z0,touchmove:z0,touchstart:z0,transitioncancel:_0,transitionend:_0,transitionrun:_0,transitionstart:_0,wheel:K5};function S(Q){if(!Q||!("tagName"in Q))return null;let Z=Q;return{...$5(Z),...Z.tagName in r0?r0[Z.tagName](Z):{}}}var $5=(Q)=>({tagName:Q.tagName,boundingClientRect:{...Q.getBoundingClientRect()}}),e1=(Q)=>({currentTime:Q.currentTime,duration:Q.duration,ended:Q.ended,error:Q.error,seeking:Q.seeking,volume:Q.volume}),r0={AUDIO:e1,BUTTON:(Q)=>({value:Q.value}),DATA:(Q)=>({value:Q.value}),DATALIST:(Q)=>({options:Array.from(Q.options).map(r0.OPTION)}),DIALOG:(Q)=>({returnValue:Q.returnValue}),FIELDSET:(Q)=>({elements:Array.from(Q.elements).map(S)}),FORM:(Q)=>({elements:Array.from(Q.elements).map(S)}),INPUT:(Q)=>({value:Q.value}),METER:(Q)=>({value:Q.value}),OPTION:(Q)=>({value:Q.value}),OUTPUT:(Q)=>({value:Q.value}),PROGRESS:(Q)=>({value:Q.value}),SELECT:(Q)=>({value:Q.value}),TEXTAREA:(Q)=>({value:Q.value}),VIDEO:e1},q5=(Q)=>({axes:Array.from(Q.axes),buttons:Array.from(Q.buttons).map(J5),connected:Q.connected,id:Q.id,index:Q.index,mapping:Q.mapping,timestamp:Q.timestamp,hapticActuators:Array.from(Q.hapticActuators).map(G5)}),J5=(Q)=>({pressed:Q.pressed,touched:Q.touched,value:Q.value}),G5=(Q)=>({type:Q.type}),X5=(Q)=>({lastModified:Q.lastModified,name:Q.name,size:Q.size,type:Q.type});function t0(Q){if(!Q)return null;let{dropEffect:Z,effectAllowed:K,files:W,items:$,types:q}=Q;return{dropEffect:Z,effectAllowed:K,files:Array.from(W).map(X5),items:Array.from($).map((J)=>({kind:J.kind,type:J.type})),types:Array.from(q)}}function Y5(Q){if(!Q)return null;let{type:Z,anchorNode:K,anchorOffset:W,focusNode:$,focusOffset:q,isCollapsed:J,rangeCount:X}=Q;if(Z==="None")return null;return{type:Z,anchorNode:S(K),anchorOffset:W,focusNode:S($),focusOffset:q,isCollapsed:J,rangeCount:X,selectedText:Q.toString()}}function l0({identifier:Q,pageX:Z,pageY:K,screenX:W,screenY:$,clientX:q,clientY:J,force:X,radiusX:O,radiusY:Y,rotationAngle:z,target:G}){return{identifier:Q,pageX:Z,pageY:K,screenX:W,screenY:$,clientX:q,clientY:J,force:X,radiusX:O,radiusY:Y,rotationAngle:z,target:S(G)}}async function Q4(Q,Z){let K;if(Q.sourceType==="URL")K=await import(Q.source);else K=await Z.loadModule(Q.source);if(typeof K.bind!=="function")throw new Error(`${Q.source} did not export a function 'bind'`);return(W)=>{let $=K.bind(W,{sendMessage:Z.sendMessage,onMessage:Z.onMessage});if(!(typeof $.create==="function"&&typeof $.render==="function"&&typeof $.unmount==="function"))return w.error(`${Q.source} returned an impropper binding`),null;return{render:(q)=>$.render(Z4({client:Z,module:K,binding:$,model:q,currentImportSource:Q})),unmount:$.unmount}}}function Z4(Q){let Z;if(Q.model.importSource){if(!V5(Q.currentImportSource,Q.model.importSource))return w.error("Parent element import source "+D0(Q.currentImportSource)+" does not match child's import source "+D0(Q.model.importSource)),null;else if(Z=O5(Q.module,Q.model.tagName,Q.model.importSource),!Z)return null}else Z=Q.model.tagName;return Q.binding.create(Z,A0(Q.model,Q.client),L0(Q.model,(K)=>Z4({...Q,model:K})))}function O5(Q,Z,K){let W=Z.split("."),$=null;for(let q=0;q<W.length;q++){let J=W[q];if($=q==0?Q[J]:$[J],!$){if(q==0)w.error("Module from source "+D0(K)+` does not export ${J}`);else console.error(`Component ${W.slice(0,q).join(".")} from source `+D0(K)+` does not have subcomponent ${J}`);break}}return $}function V5(Q,Z){return Q.source===Z.source&&Q.sourceType===Z.sourceType}function D0(Q){return JSON.stringify({source:Q.source,sourceType:Q.sourceType})}function L0(Q,Z){if(!Q.children)return[];else return Q.children.map((K)=>{switch(typeof K){case"object":return Z(K);case"string":return K}})}function A0(Q,Z){return Object.fromEntries(Object.entries({...Q.attributes,...Object.fromEntries(Object.entries(Q.eventHandlers||{}).map(([K,W])=>N5(Z,K,W))),...Object.fromEntries(Object.entries(Q.inlineJavaScript||{}).map(([K,W])=>z5(K,W)))}))}function N5(Q,Z,{target:K,preventDefault:W,stopPropagation:$}){let q=function(...J){let X=Array.from(J).map((O)=>{if(!(typeof O==="object"&&O.nativeEvent))return O;let Y=O;if(W)Y.preventDefault();if($)Y.stopPropagation();return o0(Y.nativeEvent)});Q.sendMessage({type:"layout-event",data:X,target:K})};return q.isHandler=!0,[Z,q]}function z5(name,inlineJavaScript){let wrappedExecutable=function(...args){function handleExecution(...args){let evalResult=eval(inlineJavaScript);if(typeof evalResult=="function")return evalResult(...args)}if(args.length>0&&args[0]instanceof Event)return handleExecution.call(args[0].currentTarget,...args);else return handleExecution(...args)};return wrappedExecutable.isHandler=!1,[name,wrappedExecutable]}var F0=Q0(null);function $4(Q){let Z=f({tagName:""})[0],K=B5();return d(()=>Q.client.onMessage("layout-update",({path:W,model:$})=>{if(W==="")Object.assign(Z,$);else W4.set(Z,W,$);K()}),[Z,Q.client]),F.createElement(F0.Provider,{value:Q.client},F.createElement(e0,{model:Z}))}function e0({model:Q}){if(Q.error!==void 0)if(Q.error)return F.createElement("pre",null,Q.error);else return null;let Z;if(Q.tagName in K4)Z=K4[Q.tagName];else if(Q.importSource)Z=_5;else Z=q4;return F.createElement(Z,{model:Q})}function q4({model:Q}){let Z=F.useContext(F0);return x(Q.tagName===""?M:Q.tagName,A0(Q,Z),...L0(Q,(K)=>{return F.createElement(e0,{model:K,key:K.key})}))}function n0({model:Q}){let Z=K0(F0),K=A0(Q,Z),[W,$]=F.useState(K.value);F.useEffect(()=>$(K.value),[K.value]);let q=K.onChange;if(typeof q==="function")K.onChange=(J)=>{if(J.target)$(J.target.value);q(J)};return x(Q.tagName,{...K,value:W},...L0(Q,(J)=>F.createElement(e0,{model:J,key:J.key})))}function H5({model:Q}){let Z=i(null);return F.useEffect(()=>{if(!Z.current)return;let K=document.createElement("script");for(let[$,q]of Object.entries(Q.attributes||{}))K.setAttribute($,q);let W=Q?.children?.filter(($)=>typeof $=="string")[0];if(W)K.appendChild(document.createTextNode(W));return Z.current.appendChild(K),()=>{Z.current?.removeChild(K)}},[Q.key]),F.createElement("div",{ref:Z})}function _5({model:Q}){let Z=Q.importSource,K=D5(Q);if(!Z)return null;let W=Z.fallback;if(!Z)if(!W)return null;else if(typeof W==="string")return F.createElement("span",null,W);else return F.createElement(q4,{model:W});else return F.createElement("span",{ref:K})}function B5(){let[,Q]=f(!1);return()=>Q((Z)=>!Z)}function D5(Q){let Z=Q.importSource,K=JSON.stringify(Z),W=i(null),$=F.useContext(F0),[q,J]=f(null);return F.useEffect(()=>{let X=!1;if(Z)Q4(Z,$).then((O)=>{if(!X&&W.current)J(O(W.current))});return()=>{if(X=!0,q&&Z&&!Z.unmountBeforeUpdate)q.unmount()}},[$,K,J,W.current]),d(()=>{if(!(q&&Z))return;if(q.render(Q),Z.unmountBeforeUpdate)return q.unmount}),W}var K4={input:n0,script:H5,select:n0,textarea:n0};function L5(Q){let K=`${`ws${window.location.protocol==="https:"?"s":""}:`}//${window.location.host}`,W=new URL(`${K}${Q.pathPrefix}${Q.componentPath||""}`);if(W.searchParams.append("http_pathname",window.location.pathname),window.location.search)W.searchParams.append("http_query_string",window.location.search);let $=new R0({urls:{componentUrl:W,jsModulesPath:`${window.location.origin}${Q.pathPrefix}modules/`},reconnectOptions:{interval:Q.reconnectInterval||750,maxInterval:Q.reconnectMaxInterval||60000,maxRetries:Q.reconnectMaxRetries||150,backoffMultiplier:Q.reconnectBackoffMultiplier||1.25},mountElement:Q.mountElement});F.render(F.createElement($4,{client:$}),Q.mountElement)}export{L5 as mountReactPy};
1
+ var C1=Object.create;var{getPrototypeOf:N1,defineProperty:I0,getOwnPropertyNames:S1}=Object;var g1=Object.prototype.hasOwnProperty;var j1=(X,Y,Z)=>{Z=X!=null?C1(N1(X)):{};let K=Y||!X||!X.__esModule?I0(Z,"default",{value:X,enumerable:!0}):Z;for(let Q of S1(X))if(!g1.call(K,Q))I0(K,Q,{get:()=>X[Q],enumerable:!0});return K};var C0=(X,Y)=>()=>(Y||X((Y={exports:{}}).exports,Y),Y.exports);var u0=C0((N4,i0)=>{var c1=Object.prototype.hasOwnProperty,s1=Object.prototype.toString;i0.exports=function(Y,Z,K){if(s1.call(Z)!=="[object Function]")throw TypeError("iterator must be a function");var Q=Y.length;if(Q===+Q)for(var G=0;G<Q;G++)Z.call(K,Y[G],G,Y);else for(var W in Y)if(c1.call(Y,W))Z.call(K,Y[W],W,Y)}});var r0=C0((S4,l0)=>{var p1=u0();l0.exports=B;function B(X,Y,Z){if(arguments.length===3)return B.set(X,Y,Z);if(arguments.length===2)return B.get(X,Y);var K=B.bind(B,X);for(var Q in B)if(B.hasOwnProperty(Q))K[Q]=B[Q].bind(K,X);return K}B.get=function(Y,Z){var K=Array.isArray(Z)?Z:B.parse(Z);for(var Q=0;Q<K.length;++Q){var G=K[Q];if(!(typeof Y=="object"&&(G in Y)))throw Error("Invalid reference token: "+G);Y=Y[G]}return Y};B.set=function(Y,Z,K){var Q=Array.isArray(Z)?Z:B.parse(Z),G=Q[0];if(Q.length===0)throw Error("Can not set the root object");for(var W=0;W<Q.length-1;++W){var q=Q[W];if(typeof q!=="string"&&typeof q!=="number")q=String(q);if(q==="__proto__"||q==="constructor"||q==="prototype")continue;if(q==="-"&&Array.isArray(Y))q=Y.length;if(G=Q[W+1],!(q in Y))if(G.match(/^(\d+|-)$/))Y[q]=[];else Y[q]={};Y=Y[q]}if(G==="-"&&Array.isArray(Y))G=Y.length;return Y[G]=K,this};B.remove=function(X,Y){var Z=Array.isArray(Y)?Y:B.parse(Y),K=Z[Z.length-1];if(K===void 0)throw Error('Invalid JSON pointer for remove: "'+Y+'"');var Q=B.get(X,Z.slice(0,-1));if(Array.isArray(Q)){var G=+K;if(K===""&&isNaN(G))throw Error('Invalid array index: "'+K+'"');Array.prototype.splice.call(Q,G,1)}else delete Q[K]};B.dict=function(Y,Z){var K={};return B.walk(Y,function(Q,G){K[G]=Q},Z),K};B.walk=function(Y,Z,K){var Q=[];K=K||function(G){var W=Object.prototype.toString.call(G);return W==="[object Object]"||W==="[object Array]"},function G(W){p1(W,function(q,F){if(Q.push(String(F)),K(q))G(q);else Z(q,B.compile(Q));Q.pop()})}(Y)};B.has=function(Y,Z){try{B.get(Y,Z)}catch(K){return!1}return!0};B.escape=function(Y){return Y.toString().replace(/~/g,"~0").replace(/\//g,"~1")};B.unescape=function(Y){return Y.replace(/~1/g,"/").replace(/~0/g,"~")};B.parse=function(Y){if(Y==="")return[];if(Y.charAt(0)!=="/")throw Error("Invalid JSON pointer: "+Y);return Y.substring(1).split(/\//).map(B.unescape)};B.compile=function(Y){if(Y.length===0)return"";return"/"+Y.map(B.escape).join("/")}});var M={log:(...X)=>console.log("[ReactPy]",...X),info:(...X)=>console.info("[ReactPy]",...X),warn:(...X)=>console.warn("[ReactPy]",...X),error:(...X)=>console.error("[ReactPy]",...X)};function N0(X){let{interval:Y,maxInterval:Z,maxRetries:K,backoffMultiplier:Q}=X,G=0,W=Y,q=!1,F=!1,$={},z=()=>{if(F)return;$.current=new WebSocket(X.url),$.current.onopen=()=>{if(q=!0,M.info("Connected!"),W=Y,G=0,X.onOpen)X.onOpen()},$.current.onmessage=(J)=>{if(X.onMessage)X.onMessage(J)},$.current.onclose=()=>{if(X.onClose)X.onClose();if(!q){M.info("Failed to connect!");return}if(M.info("Disconnected!"),G>=K){M.info("Connection max retries exhausted!");return}M.info(`Reconnecting in ${(W/1000).toPrecision(4)} seconds...`),setTimeout(z,W),W=y1(W,Q,Z),G++}};return X.readyPromise.then(()=>M.info("Starting client...")).then(z),$}function y1(X,Y,Z){return Math.min(X*Y,Z)}class S0{handlers={};ready;resolveReady;constructor(){this.resolveReady=()=>{},this.ready=new Promise((X)=>this.resolveReady=X)}onMessage(X,Y){return(this.handlers[X]||(this.handlers[X]=[])).push(Y),this.resolveReady(void 0),()=>{this.handlers[X]=this.handlers[X].filter((Z)=>Z!==Y)}}handleIncoming(X){if(!X.type){M.warn("Received message without type",X);return}let Y=this.handlers[X.type];if(!Y){M.warn("Received message without handler",X);return}Y.forEach((Z)=>Z(X))}}class F0 extends S0{urls;socket;mountElement;constructor(X){super();this.urls=X.urls,this.mountElement=X.mountElement,this.socket=N0({url:this.urls.componentUrl,readyPromise:this.ready,...X.reconnectOptions,onMessage:async({data:Y})=>this.handleIncoming(JSON.parse(Y))})}sendMessage(X){this.socket.current?.send(JSON.stringify(X))}loadModule(X){return import(`${this.urls.jsModulesPath}${X}`)}}var n,H,b0,b1,b,g0,f0,v0,x0,B0,H0,z0,k0,s={},h0=[],f1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,p=Array.isArray;function C(X,Y){for(var Z in Y)X[Z]=Y[Z];return X}function w0(X){X&&X.parentNode&&X.parentNode.removeChild(X)}function S(X,Y,Z){var K,Q,G,W={};for(G in Y)G=="key"?K=Y[G]:G=="ref"?Q=Y[G]:W[G]=Y[G];if(arguments.length>2&&(W.children=arguments.length>3?n.call(arguments,2):Z),typeof X=="function"&&X.defaultProps!=null)for(G in X.defaultProps)W[G]===void 0&&(W[G]=X.defaultProps[G]);return o(X,W,K,Q,null)}function o(X,Y,Z,K,Q){var G={type:X,props:Y,key:Z,ref:K,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:Q==null?++b0:Q,__i:-1,__u:0};return Q==null&&H.vnode!=null&&H.vnode(G),G}function E(X){return X.children}function T(X,Y){this.props=X,this.context=Y}function x(X,Y){if(Y==null)return X.__?x(X.__,X.__i+1):null;for(var Z;Y<X.__k.length;Y++)if((Z=X.__k[Y])!=null&&Z.__e!=null)return Z.__e;return typeof X.type=="function"?x(X):null}function d0(X){var Y,Z;if((X=X.__)!=null&&X.__c!=null){for(X.__e=X.__c.base=null,Y=0;Y<X.__k.length;Y++)if((Z=X.__k[Y])!=null&&Z.__e!=null){X.__e=X.__c.base=Z.__e;break}return d0(X)}}function V0(X){(!X.__d&&(X.__d=!0)&&b.push(X)&&!t.__r++||g0!=H.debounceRendering)&&((g0=H.debounceRendering)||f0)(t)}function t(){for(var X,Y,Z,K,Q,G,W,q=1;b.length;)b.length>q&&b.sort(v0),X=b.shift(),q=b.length,X.__d&&(Z=void 0,K=void 0,Q=(K=(Y=X).__v).__e,G=[],W=[],Y.__P&&((Z=C({},K)).__v=K.__v+1,H.vnode&&H.vnode(Z),U0(Y.__P,Z,K,Y.__n,Y.__P.namespaceURI,32&K.__u?[Q]:null,G,Q==null?x(K):Q,!!(32&K.__u),W),Z.__v=K.__v,Z.__.__k[Z.__i]=Z,s0(G,Z,W),K.__e=K.__=null,Z.__e!=Q&&d0(Z)));t.__r=0}function m0(X,Y,Z,K,Q,G,W,q,F,$,z){var J,A,V,P,D,O,U,w=K&&K.__k||h0,N=Y.length;for(F=v1(Z,Y,w,F,N),J=0;J<N;J++)(V=Z.__k[J])!=null&&(A=V.__i==-1?s:w[V.__i]||s,V.__i=J,O=U0(X,V,A,Q,G,W,q,F,$,z),P=V.__e,V.ref&&A.ref!=V.ref&&(A.ref&&R0(A.ref,null,V),z.push(V.ref,V.__c||P,V)),D==null&&P!=null&&(D=P),(U=!!(4&V.__u))||A.__k===V.__k?F=c0(V,F,X,U):typeof V.type=="function"&&O!==void 0?F=O:P&&(F=P.nextSibling),V.__u&=-7);return Z.__e=D,F}function v1(X,Y,Z,K,Q){var G,W,q,F,$,z=Z.length,J=z,A=0;for(X.__k=Array(Q),G=0;G<Q;G++)(W=Y[G])!=null&&typeof W!="boolean"&&typeof W!="function"?(typeof W=="string"||typeof W=="number"||typeof W=="bigint"||W.constructor==String?W=X.__k[G]=o(null,W,null,null,null):p(W)?W=X.__k[G]=o(E,{children:W},null,null,null):W.constructor==null&&W.__b>0?W=X.__k[G]=o(W.type,W.props,W.key,W.ref?W.ref:null,W.__v):X.__k[G]=W,F=G+A,W.__=X,W.__b=X.__b+1,($=W.__i=x1(W,Z,F,J))!=-1&&(J--,(q=Z[$])&&(q.__u|=2)),q==null||q.__v==null?($==-1&&(Q>z?A--:Q<z&&A++),typeof W.type!="function"&&(W.__u|=4)):$!=F&&($==F-1?A--:$==F+1?A++:($>F?A--:A++,W.__u|=4))):X.__k[G]=null;if(J)for(G=0;G<z;G++)(q=Z[G])!=null&&(2&q.__u)==0&&(q.__e==K&&(K=x(q)),a0(q,q));return K}function c0(X,Y,Z,K){var Q,G;if(typeof X.type=="function"){for(Q=X.__k,G=0;Q&&G<Q.length;G++)Q[G]&&(Q[G].__=X,Y=c0(Q[G],Y,Z,K));return Y}X.__e!=Y&&(K&&(Y&&X.type&&!Y.parentNode&&(Y=x(X)),Z.insertBefore(X.__e,Y||null)),Y=X.__e);do Y=Y&&Y.nextSibling;while(Y!=null&&Y.nodeType==8);return Y}function a(X,Y){return Y=Y||[],X==null||typeof X=="boolean"||(p(X)?X.some(function(Z){a(Z,Y)}):Y.push(X)),Y}function x1(X,Y,Z,K){var Q,G,W,q=X.key,F=X.type,$=Y[Z],z=$!=null&&(2&$.__u)==0;if($===null&&q==null||z&&q==$.key&&F==$.type)return Z;if(K>(z?1:0)){for(Q=Z-1,G=Z+1;Q>=0||G<Y.length;)if(($=Y[W=Q>=0?Q--:G++])!=null&&(2&$.__u)==0&&q==$.key&&F==$.type)return W}return-1}function j0(X,Y,Z){Y[0]=="-"?X.setProperty(Y,Z==null?"":Z):X[Y]=Z==null?"":typeof Z!="number"||f1.test(Y)?Z:Z+"px"}function r(X,Y,Z,K,Q){var G,W;X:if(Y=="style")if(typeof Z=="string")X.style.cssText=Z;else{if(typeof K=="string"&&(X.style.cssText=K=""),K)for(Y in K)Z&&Y in Z||j0(X.style,Y,"");if(Z)for(Y in Z)K&&Z[Y]==K[Y]||j0(X.style,Y,Z[Y])}else if(Y[0]=="o"&&Y[1]=="n")G=Y!=(Y=Y.replace(x0,"$1")),W=Y.toLowerCase(),Y=W in X||Y=="onFocusOut"||Y=="onFocusIn"?W.slice(2):Y.slice(2),X.l||(X.l={}),X.l[Y+G]=Z,Z?K?Z.u=K.u:(Z.u=B0,X.addEventListener(Y,G?z0:H0,G)):X.removeEventListener(Y,G?z0:H0,G);else{if(Q=="http://www.w3.org/2000/svg")Y=Y.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(Y!="width"&&Y!="height"&&Y!="href"&&Y!="list"&&Y!="form"&&Y!="tabIndex"&&Y!="download"&&Y!="rowSpan"&&Y!="colSpan"&&Y!="role"&&Y!="popover"&&Y in X)try{X[Y]=Z==null?"":Z;break X}catch(q){}typeof Z=="function"||(Z==null||Z===!1&&Y[4]!="-"?X.removeAttribute(Y):X.setAttribute(Y,Y=="popover"&&Z==1?"":Z))}}function y0(X){return function(Y){if(this.l){var Z=this.l[Y.type+X];if(Y.t==null)Y.t=B0++;else if(Y.t<Z.u)return;return Z(H.event?H.event(Y):Y)}}}function U0(X,Y,Z,K,Q,G,W,q,F,$){var z,J,A,V,P,D,O,U,w,N,y,u,m,T0,l,c,$0,I=Y.type;if(Y.constructor!=null)return null;128&Z.__u&&(F=!!(32&Z.__u),G=[q=Y.__e=Z.__e]),(z=H.__b)&&z(Y);X:if(typeof I=="function")try{if(U=Y.props,w="prototype"in I&&I.prototype.render,N=(z=I.contextType)&&K[z.__c],y=z?N?N.props.value:z.__:K,Z.__c?O=(J=Y.__c=Z.__c).__=J.__E:(w?Y.__c=J=new I(U,y):(Y.__c=J=new T(U,y),J.constructor=I,J.render=h1),N&&N.sub(J),J.state||(J.state={}),J.__n=K,A=J.__d=!0,J.__h=[],J._sb=[]),w&&J.__s==null&&(J.__s=J.state),w&&I.getDerivedStateFromProps!=null&&(J.__s==J.state&&(J.__s=C({},J.__s)),C(J.__s,I.getDerivedStateFromProps(U,J.__s))),V=J.props,P=J.state,J.__v=Y,A)w&&I.getDerivedStateFromProps==null&&J.componentWillMount!=null&&J.componentWillMount(),w&&J.componentDidMount!=null&&J.__h.push(J.componentDidMount);else{if(w&&I.getDerivedStateFromProps==null&&U!==V&&J.componentWillReceiveProps!=null&&J.componentWillReceiveProps(U,y),Y.__v==Z.__v||!J.__e&&J.shouldComponentUpdate!=null&&J.shouldComponentUpdate(U,J.__s,y)===!1){for(Y.__v!=Z.__v&&(J.props=U,J.state=J.__s,J.__d=!1),Y.__e=Z.__e,Y.__k=Z.__k,Y.__k.some(function(v){v&&(v.__=Y)}),u=0;u<J._sb.length;u++)J.__h.push(J._sb[u]);J._sb=[],J.__h.length&&W.push(J);break X}J.componentWillUpdate!=null&&J.componentWillUpdate(U,J.__s,y),w&&J.componentDidUpdate!=null&&J.__h.push(function(){J.componentDidUpdate(V,P,D)})}if(J.context=y,J.props=U,J.__P=X,J.__e=!1,m=H.__r,T0=0,w){for(J.state=J.__s,J.__d=!1,m&&m(Y),z=J.render(J.props,J.state,J.context),l=0;l<J._sb.length;l++)J.__h.push(J._sb[l]);J._sb=[]}else do J.__d=!1,m&&m(Y),z=J.render(J.props,J.state,J.context),J.state=J.__s;while(J.__d&&++T0<25);J.state=J.__s,J.getChildContext!=null&&(K=C(C({},K),J.getChildContext())),w&&!A&&J.getSnapshotBeforeUpdate!=null&&(D=J.getSnapshotBeforeUpdate(V,P)),c=z,z!=null&&z.type===E&&z.key==null&&(c=p0(z.props.children)),q=m0(X,p(c)?c:[c],Y,Z,K,Q,G,W,q,F,$),J.base=Y.__e,Y.__u&=-161,J.__h.length&&W.push(J),O&&(J.__E=J.__=null)}catch(v){if(Y.__v=null,F||G!=null)if(v.then){for(Y.__u|=F?160:128;q&&q.nodeType==8&&q.nextSibling;)q=q.nextSibling;G[G.indexOf(q)]=null,Y.__e=q}else{for($0=G.length;$0--;)w0(G[$0]);A0(Y)}else Y.__e=Z.__e,Y.__k=Z.__k,v.then||A0(Y);H.__e(v,Y,Z)}else G==null&&Y.__v==Z.__v?(Y.__k=Z.__k,Y.__e=Z.__e):q=Y.__e=k1(Z.__e,Y,Z,K,Q,G,W,F,$);return(z=H.diffed)&&z(Y),128&Y.__u?void 0:q}function A0(X){X&&X.__c&&(X.__c.__e=!0),X&&X.__k&&X.__k.forEach(A0)}function s0(X,Y,Z){for(var K=0;K<Z.length;K++)R0(Z[K],Z[++K],Z[++K]);H.__c&&H.__c(Y,X),X.some(function(Q){try{X=Q.__h,Q.__h=[],X.some(function(G){G.call(Q)})}catch(G){H.__e(G,Q.__v)}})}function p0(X){return typeof X!="object"||X==null||X.__b&&X.__b>0?X:p(X)?X.map(p0):C({},X)}function k1(X,Y,Z,K,Q,G,W,q,F){var $,z,J,A,V,P,D,O=Z.props||s,U=Y.props,w=Y.type;if(w=="svg"?Q="http://www.w3.org/2000/svg":w=="math"?Q="http://www.w3.org/1998/Math/MathML":Q||(Q="http://www.w3.org/1999/xhtml"),G!=null){for($=0;$<G.length;$++)if((V=G[$])&&"setAttribute"in V==!!w&&(w?V.localName==w:V.nodeType==3)){X=V,G[$]=null;break}}if(X==null){if(w==null)return document.createTextNode(U);X=document.createElementNS(Q,w,U.is&&U),q&&(H.__m&&H.__m(Y,G),q=!1),G=null}if(w==null)O===U||q&&X.data==U||(X.data=U);else{if(G=G&&n.call(X.childNodes),!q&&G!=null)for(O={},$=0;$<X.attributes.length;$++)O[(V=X.attributes[$]).name]=V.value;for($ in O)if(V=O[$],$=="children");else if($=="dangerouslySetInnerHTML")J=V;else if(!($ in U)){if($=="value"&&"defaultValue"in U||$=="checked"&&"defaultChecked"in U)continue;r(X,$,null,V,Q)}for($ in U)V=U[$],$=="children"?A=V:$=="dangerouslySetInnerHTML"?z=V:$=="value"?P=V:$=="checked"?D=V:q&&typeof V!="function"||O[$]===V||r(X,$,V,O[$],Q);if(z)q||J&&(z.__html==J.__html||z.__html==X.innerHTML)||(X.innerHTML=z.__html),Y.__k=[];else if(J&&(X.innerHTML=""),m0(Y.type=="template"?X.content:X,p(A)?A:[A],Y,Z,K,w=="foreignObject"?"http://www.w3.org/1999/xhtml":Q,G,W,G?G[0]:Z.__k&&x(Z,0),q,F),G!=null)for($=G.length;$--;)w0(G[$]);q||($="value",w=="progress"&&P==null?X.removeAttribute("value"):P!=null&&(P!==X[$]||w=="progress"&&!P||w=="option"&&P!=O[$])&&r(X,$,P,O[$],Q),$="checked",D!=null&&D!=X[$]&&r(X,$,D,O[$],Q))}return X}function R0(X,Y,Z){try{if(typeof X=="function"){var K=typeof X.__u=="function";K&&X.__u(),K&&Y==null||(X.__u=X(Y))}else X.current=Y}catch(Q){H.__e(Q,Z)}}function a0(X,Y,Z){var K,Q;if(H.unmount&&H.unmount(X),(K=X.ref)&&(K.current&&K.current!=X.__e||R0(K,null,Y)),(K=X.__c)!=null){if(K.componentWillUnmount)try{K.componentWillUnmount()}catch(G){H.__e(G,Y)}K.base=K.__P=null}if(K=X.__k)for(Q=0;Q<K.length;Q++)K[Q]&&a0(K[Q],Y,Z||typeof X.type!="function");Z||w0(X.__e),X.__c=X.__=X.__e=void 0}function h1(X,Y,Z){return this.constructor(X,Z)}function L0(X,Y,Z){var K,Q,G,W;Y==document&&(Y=document.documentElement),H.__&&H.__(X,Y),Q=(K=typeof Z=="function")?null:Z&&Z.__k||Y.__k,G=[],W=[],U0(Y,X=(!K&&Z||Y).__k=S(E,null,[X]),Q||s,s,Y.namespaceURI,!K&&Z?[Z]:Q?null:Y.firstChild?n.call(Y.childNodes):null,G,!K&&Z?Z:Q?Q.__e:Y.firstChild,K,W),s0(G,X,W)}function e(X){function Y(Z){var K,Q;return this.getChildContext||(K=new Set,(Q={})[Y.__c]=this,this.getChildContext=function(){return Q},this.componentWillUnmount=function(){K=null},this.shouldComponentUpdate=function(G){this.props.value!=G.value&&K.forEach(function(W){W.__e=!0,V0(W)})},this.sub=function(G){K.add(G);var W=G.componentWillUnmount;G.componentWillUnmount=function(){K&&K.delete(G),W&&W.call(G)}}),Z.children}return Y.__c="__cC"+k0++,Y.__=X,Y.Provider=Y.__l=(Y.Consumer=function(Z,K){return Z.children(K)}).contextType=Y,Y}n=h0.slice,H={__e:function(X,Y,Z,K){for(var Q,G,W;Y=Y.__;)if((Q=Y.__c)&&!Q.__)try{if((G=Q.constructor)&&G.getDerivedStateFromError!=null&&(Q.setState(G.getDerivedStateFromError(X)),W=Q.__d),Q.componentDidCatch!=null&&(Q.componentDidCatch(X,K||{}),W=Q.__d),W)return Q.__E=Q}catch(q){X=q}throw X}},b0=0,b1=function(X){return X!=null&&X.constructor==null},T.prototype.setState=function(X,Y){var Z;Z=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=C({},this.state),typeof X=="function"&&(X=X(C({},Z),this.props)),X&&C(Z,X),X!=null&&this.__v&&(Y&&this._sb.push(Y),V0(this))},T.prototype.forceUpdate=function(X){this.__v&&(this.__e=!0,X&&this.__h.push(X),V0(this))},T.prototype.render=E,b=[],f0=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,v0=function(X,Y){return X.__v.__b-Y.__v.__b},t.__r=0,x0=/(PointerCapture)$|Capture$/i,B0=0,H0=y0(!1),z0=y0(!0),k0=0;var m1=0;function _(X,Y,Z,K,Q,G){Y||(Y={});var W,q,F=Y;if("ref"in F)for(q in F={},Y)q=="ref"?W=Y[q]:F[q]=Y[q];var $={type:X,props:F,key:Z,ref:W,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--m1,__i:-1,__u:0,__source:Q,__self:G};if(typeof X=="function"&&(W=X.defaultProps))for(q in W)F[q]===void 0&&(F[q]=W[q]);return H.vnode&&H.vnode($),$}var z1=j1(r0(),1);var k,R,P0,o0,Y0=0,Q1=[],L=H,t0=L.__b,n0=L.__r,e0=L.diffed,X1=L.__c,Y1=L.unmount,Z1=L.__;function Z0(X,Y){L.__h&&L.__h(R,X,Y0||Y),Y0=0;var Z=R.__H||(R.__H={__:[],__h:[]});return X>=Z.__.length&&Z.__.push({}),Z.__[X]}function h(X){return Y0=1,G1(J1,X)}function G1(X,Y,Z){var K=Z0(k++,2);if(K.t=X,!K.__c&&(K.__=[Z?Z(Y):J1(void 0,Y),function(q){var F=K.__N?K.__N[0]:K.__[0],$=K.t(F,q);F!==$&&(K.__N=[$,K.__[1]],K.__c.setState({}))}],K.__c=R,!R.__f)){var Q=function(q,F,$){if(!K.__c.__H)return!0;var z=K.__c.__H.__.filter(function(A){return!!A.__c});if(z.every(function(A){return!A.__N}))return!G||G.call(this,q,F,$);var J=K.__c.props!==q;return z.forEach(function(A){if(A.__N){var V=A.__[0];A.__=A.__N,A.__N=void 0,V!==A.__[0]&&(J=!0)}}),G&&G.call(this,q,F,$)||J};R.__f=!0;var{shouldComponentUpdate:G,componentWillUpdate:W}=R;R.componentWillUpdate=function(q,F,$){if(this.__e){var z=G;G=void 0,Q(q,F,$),G=z}W&&W.call(this,q,F,$)},R.shouldComponentUpdate=Q}return K.__N||K.__}function f(X,Y){var Z=Z0(k++,3);!L.__s&&q1(Z.__H,Y)&&(Z.__=X,Z.u=Y,R.__H.__h.push(Z))}function K0(X){return Y0=5,W1(function(){return{current:X}},[])}function W1(X,Y){var Z=Z0(k++,7);return q1(Z.__H,Y)&&(Z.__=X(),Z.__H=Y,Z.__h=X),Z.__}function i(X){var Y=R.context[X.__c],Z=Z0(k++,9);return Z.c=X,Y?(Z.__==null&&(Z.__=!0,Y.sub(R)),Y.props.value):X.__}function a1(){for(var X;X=Q1.shift();)if(X.__P&&X.__H)try{X.__H.__h.forEach(X0),X.__H.__h.forEach(O0),X.__H.__h=[]}catch(Y){X.__H.__h=[],L.__e(Y,X.__v)}}L.__b=function(X){R=null,t0&&t0(X)},L.__=function(X,Y){X&&Y.__k&&Y.__k.__m&&(X.__m=Y.__k.__m),Z1&&Z1(X,Y)},L.__r=function(X){n0&&n0(X),k=0;var Y=(R=X.__c).__H;Y&&(P0===R?(Y.__h=[],R.__h=[],Y.__.forEach(function(Z){Z.__N&&(Z.__=Z.__N),Z.u=Z.__N=void 0})):(Y.__h.forEach(X0),Y.__h.forEach(O0),Y.__h=[],k=0)),P0=R},L.diffed=function(X){e0&&e0(X);var Y=X.__c;Y&&Y.__H&&(Y.__H.__h.length&&(Q1.push(Y)!==1&&o0===L.requestAnimationFrame||((o0=L.requestAnimationFrame)||i1)(a1)),Y.__H.__.forEach(function(Z){Z.u&&(Z.__H=Z.u),Z.u=void 0})),P0=R=null},L.__c=function(X,Y){Y.some(function(Z){try{Z.__h.forEach(X0),Z.__h=Z.__h.filter(function(K){return!K.__||O0(K)})}catch(K){Y.some(function(Q){Q.__h&&(Q.__h=[])}),Y=[],L.__e(K,Z.__v)}}),X1&&X1(X,Y)},L.unmount=function(X){Y1&&Y1(X);var Y,Z=X.__c;Z&&Z.__H&&(Z.__H.__.forEach(function(K){try{X0(K)}catch(Q){Y=Q}}),Z.__H=void 0,Y&&L.__e(Y,Z.__v))};var K1=typeof requestAnimationFrame=="function";function i1(X){var Y,Z=function(){clearTimeout(K),K1&&cancelAnimationFrame(Y),setTimeout(X)},K=setTimeout(Z,35);K1&&(Y=requestAnimationFrame(Z))}function X0(X){var Y=R,Z=X.__c;typeof Z=="function"&&(X.__c=void 0,Z()),R=Y}function O0(X){var Y=R;X.__c=X.__(),R=Y}function q1(X,Y){return!X||X.length!==Y.length||Y.some(function(Z,K){return Z!==X[K]})}function J1(X,Y){return typeof Y=="function"?Y(X):Y}var g={__stop__:!0};function M0(X,Y=10){if(!X||typeof X!=="object")return console.warn("eventToObject: Expected an object input, received:",X),X;let Z=new WeakSet;Z.add(X);let K={};for(let Q in X)try{if(d(X[Q],Q))continue;else if(typeof X[Q]==="object"){let G=j(X[Q],Y,Z);if(G!==g)K[Q]=G}else K[Q]=X[Q]}catch{continue}if(typeof window<"u"&&window.Event&&X instanceof window.Event)K.selection=u1(Y,Z);return K}function u1(X,Y){if(typeof window>"u"||!window.getSelection)return null;let Z=window.getSelection();if(!Z)return null;return{type:Z.type,anchorNode:Z.anchorNode?j(Z.anchorNode,X,Y):null,anchorOffset:Z.anchorOffset,focusNode:Z.focusNode?j(Z.focusNode,X,Y):null,focusOffset:Z.focusOffset,isCollapsed:Z.isCollapsed,rangeCount:Z.rangeCount,selectedText:Z.toString()}}function j(X,Y,Z){let K=Y-1;if(K<=0&&typeof X==="object")return g;if(!X||typeof X!=="object")return X;if(Z.has(X))return g;Z.add(X);try{if(Array.isArray(X)||typeof X?.length==="number"&&typeof X[Symbol.iterator]==="function"&&!Object.prototype.toString.call(X).includes("Map")&&!(X instanceof CSSStyleDeclaration))return l1(X,K,Z);return r1(X,K,Z)}finally{Z.delete(X)}}function l1(X,Y,Z){let K=[];for(let Q=0;Q<X.length;Q++)if(d(X[Q]))continue;else if(typeof X[Q]==="object"){let G=j(X[Q],Y,Z);if(G!==g)K.push(G)}else K.push(X[Q]);return K}function r1(X,Y,Z){let K={};for(let q in X)try{if(d(X[q],q,X))continue;else if(typeof X[q]==="object"){let F=j(X[q],Y,Z);if(F!==g)K[q]=F}else K[q]=X[q]}catch{continue}if(X&&typeof X==="object"&&"dataset"in X&&!Object.prototype.hasOwnProperty.call(K,"dataset")){let q=X.dataset;if(!d(q,"dataset",X)){let F=j(q,Y,Z);if(F!==g)K.dataset=F}}let Q=["value","checked","files","type","name"];for(let q of Q)if(X&&typeof X==="object"&&q in X&&!Object.prototype.hasOwnProperty.call(K,q)){let F=X[q];if(!d(F,q,X))if(typeof F==="object"){let $=q==="files"?Math.max(Y,3):Y,z=j(F,$,Z);if(z!==g)K[q]=z}else K[q]=F}let G=typeof window<"u"?window:void 0,W=G?G.HTMLFormElement:typeof HTMLFormElement<"u"?HTMLFormElement:void 0;if(W&&X instanceof W&&X.elements)for(let q=0;q<X.elements.length;q++){let F=X.elements[q];if(F.name&&!Object.prototype.hasOwnProperty.call(K,F.name)&&!d(F,F.name,X))if(typeof F==="object"){let $=j(F,Y,Z);if($!==g)K[F.name]=$}else K[F.name]=F}return K}function d(X,Y="",Z=void 0){return X===null||X===void 0||Y.startsWith("__")||Y.length>0&&/^[A-Z_]+$/.test(Y)||typeof X==="function"||X instanceof CSSStyleSheet||X instanceof Window||X instanceof Document||Y==="view"||Y==="size"||Y==="length"||Z instanceof CSSStyleDeclaration&&X===""||typeof Node<"u"&&Z instanceof Node&&(Y==="parentNode"||Y==="parentElement"||Y==="ownerDocument"||Y==="getRootNode"||Y==="childNodes"||Y==="children"||Y==="firstChild"||Y==="lastChild"||Y==="previousSibling"||Y==="nextSibling"||Y==="previousElementSibling"||Y==="nextElementSibling"||Y==="innerHTML"||Y==="outerHTML"||Y==="offsetParent"||Y==="offsetWidth"||Y==="offsetHeight"||Y==="offsetLeft"||Y==="offsetTop"||Y==="clientTop"||Y==="clientLeft"||Y==="clientWidth"||Y==="clientHeight"||Y==="scrollWidth"||Y==="scrollHeight"||Y==="scrollTop"||Y==="scrollLeft")}async function $1(X,Y){let Z;if(X.sourceType==="URL")Z=await import(X.source);else Z=await Y.loadModule(X.source);if(typeof Z.bind!=="function")throw Error(`${X.source} did not export a function 'bind'`);return(K)=>{let Q=Z.bind(K,{sendMessage:Y.sendMessage,onMessage:Y.onMessage});if(!(typeof Q.create==="function"&&typeof Q.render==="function"&&typeof Q.unmount==="function"))return M.error(`${X.source} returned an impropper binding`),null;return{render:(G)=>Q.render(F1({client:Y,module:Z,binding:Q,model:G,currentImportSource:X})),unmount:Q.unmount}}}function F1(X){let Y;if(X.model.importSource){if(!t1(X.currentImportSource,X.model.importSource))return M.error("Parent element import source "+Q0(X.currentImportSource)+" does not match child's import source "+Q0(X.model.importSource)),null;else if(Y=o1(X.module,X.model.tagName,X.model.importSource),!Y)return null}else Y=X.model.tagName;return X.binding.create(Y,W0(X.model,X.client),G0(X.model,(Z)=>F1({...X,model:Z})))}function o1(X,Y,Z){let K=Y.split("."),Q=null;for(let G=0;G<K.length;G++){let W=K[G];if(Q=G==0?X[W]:Q[W],!Q){if(G==0)M.error("Module from source "+Q0(Z)+` does not export ${W}`);else console.error(`Component ${K.slice(0,G).join(".")} from source `+Q0(Z)+` does not have subcomponent ${W}`);break}}return Q}function t1(X,Y){return X.source===Y.source&&X.sourceType===Y.sourceType}function Q0(X){return JSON.stringify({source:X.source,sourceType:X.sourceType})}function G0(X,Y){if(!X.children)return[];else return X.children.map((Z)=>{switch(typeof Z){case"object":return Y(Z);case"string":return Z}})}function W0(X,Y){return Object.fromEntries(Object.entries({...X.attributes,...Object.fromEntries(Object.entries(X.eventHandlers||{}).map(([Z,K])=>n1(Y,Z,K))),...Object.fromEntries(Object.entries(X.inlineJavaScript||{}).map(([Z,K])=>e1(Z,K)))}))}function n1(X,Y,{target:Z,preventDefault:K,stopPropagation:Q}){let G=function(...W){let q=Array.from(W).map((F)=>{let $=F;if(K)$.preventDefault();if(Q)$.stopPropagation();if(typeof $==="object")return M0($);else return $});X.sendMessage({type:"layout-event",data:q,target:Z})};return G.isHandler=!0,[Y,G]}function e1(name,inlineJavaScript){let wrappedExecutable=function(...args){function handleExecution(...args){let evalResult=eval(inlineJavaScript);if(typeof evalResult=="function")return evalResult(...args)}if(args.length>0&&args[0]instanceof Event)return handleExecution.call(args[0].currentTarget,...args);else return handleExecution(...args)};return wrappedExecutable.isHandler=!1,[name,wrappedExecutable]}var q0=e(null);function V1(X){let Y=h({tagName:""})[0],Z=Z4();return f(()=>X.client.onMessage("layout-update",({path:K,model:Q})=>{if(K==="")Object.assign(Y,Q);else z1.set(Y,K,Q);Z()}),[Y,X.client]),_(q0.Provider,{value:X.client,children:_(E0,{model:Y})})}function E0({model:X}){if(X.error!==void 0)if(X.error)return _("pre",{children:X.error});else return null;let Y;if(X.tagName in H1)Y=H1[X.tagName];else if(X.importSource)Y=Y4;else Y=A1;return _(Y,{model:X})}function A1({model:X}){let Y=i(q0);return S(X.tagName===""?E:X.tagName,W0(X,Y),...G0(X,(Z)=>{return _(E0,{model:Z},Z.key)}))}function _0({model:X}){let Y=i(q0),Z=W0(X,Y),[K,Q]=h(Z.value);f(()=>Q(Z.value),[Z.value]);let G=Z.onChange;if(typeof G==="function")Z.onChange=(W)=>{if(W.target)Q(W.target.value);G(W)};return S(X.tagName,{...Z,value:K},...G0(X,(W)=>_(E0,{model:W},W.key)))}function X4({model:X}){let Y=K0(null);return f(()=>{if(!Y.current)return;let Z=document.createElement("script");for(let[Q,G]of Object.entries(X.attributes||{}))Z.setAttribute(Q,G);let K=X?.children?.filter((Q)=>typeof Q=="string")[0];if(K)Z.appendChild(document.createTextNode(K));return Y.current.appendChild(Z),()=>{Y.current?.removeChild(Z)}},[X.key]),_("div",{ref:Y})}function Y4({model:X}){let Y=X.importSource,Z=K4(X);if(!Y)return null;let K=Y.fallback;if(!Y)if(!K)return null;else if(typeof K==="string")return _("span",{children:K});else return _(A1,{model:K});else return _("span",{ref:Z})}function Z4(){let[,X]=h(!1);return()=>X((Y)=>!Y)}function K4(X){let Y=X.importSource,Z=JSON.stringify(Y),K=K0(null),Q=i(q0),[G,W]=h(null);return f(()=>{let q=!1;if(Y)$1(Y,Q).then((F)=>{if(!q&&K.current)W(F(K.current))});return()=>{if(q=!0,G&&Y&&!Y.unmountBeforeUpdate)G.unmount()}},[Q,Z,W,K.current]),f(()=>{if(!(G&&Y))return;if(G.render(X),Y.unmountBeforeUpdate)return G.unmount}),K}var H1={input:_0,script:X4,select:_0,textarea:_0};function Q4(X){let Z=`${`ws${window.location.protocol==="https:"?"s":""}:`}//${window.location.host}`,K=new URL(`${Z}${X.pathPrefix}${X.componentPath||""}`);if(K.searchParams.append("http_pathname",window.location.pathname),window.location.search)K.searchParams.append("http_query_string",window.location.search);let Q=new F0({urls:{componentUrl:K,jsModulesPath:`${window.location.origin}${X.pathPrefix}modules/`},reconnectOptions:{interval:X.reconnectInterval||750,maxInterval:X.reconnectMaxInterval||60000,maxRetries:X.reconnectMaxRetries||150,backoffMultiplier:X.reconnectBackoffMultiplier||1.25},mountElement:X.mountElement});L0(_(V1,{client:Q}),X.mountElement)}function W4(X,Y){for(var Z in Y)X[Z]=Y[Z];return X}function B1(X,Y){for(var Z in X)if(Z!=="__source"&&!(Z in Y))return!0;for(var K in Y)if(K!=="__source"&&X[K]!==Y[K])return!0;return!1}function w1(X,Y){this.props=X,this.context=Y}(w1.prototype=new T).isPureReactComponent=!0,w1.prototype.shouldComponentUpdate=function(X,Y){return B1(this.props,X)||B1(this.state,Y)};var U1=H.__b;H.__b=function(X){X.type&&X.type.__f&&X.ref&&(X.props.ref=X.ref,X.ref=null),U1&&U1(X)};var q4=H.__e;H.__e=function(X,Y,Z,K){if(X.then){for(var Q,G=Y;G=G.__;)if((Q=G.__c)&&Q.__c)return Y.__e==null&&(Y.__e=Z.__e,Y.__k=Z.__k),Q.__c(X,Y)}q4(X,Y,Z,K)};var R1=H.unmount;function E1(X,Y,Z){return X&&(X.__c&&X.__c.__H&&(X.__c.__H.__.forEach(function(K){typeof K.__c=="function"&&K.__c()}),X.__c.__H=null),(X=W4({},X)).__c!=null&&(X.__c.__P===Z&&(X.__c.__P=Y),X.__c.__e=!0,X.__c=null),X.__k=X.__k&&X.__k.map(function(K){return E1(K,Y,Z)})),X}function D1(X,Y,Z){return X&&Z&&(X.__v=null,X.__k=X.__k&&X.__k.map(function(K){return D1(K,Y,Z)}),X.__c&&X.__c.__P===Y&&(X.__e&&Z.appendChild(X.__e),X.__c.__e=!0,X.__c.__P=Z)),X}function D0(){this.__u=0,this.o=null,this.__b=null}function T1(X){var Y=X.__.__c;return Y&&Y.__a&&Y.__a(X)}function J0(){this.i=null,this.l=null}H.unmount=function(X){var Y=X.__c;Y&&Y.__R&&Y.__R(),Y&&32&X.__u&&(X.type=null),R1&&R1(X)},(D0.prototype=new T).__c=function(X,Y){var Z=Y.__c,K=this;K.o==null&&(K.o=[]),K.o.push(Z);var Q=T1(K.__v),G=!1,W=function(){G||(G=!0,Z.__R=null,Q?Q(q):q())};Z.__R=W;var q=function(){if(!--K.__u){if(K.state.__a){var F=K.state.__a;K.__v.__k[0]=D1(F,F.__c.__P,F.__c.__O)}var $;for(K.setState({__a:K.__b=null});$=K.o.pop();)$.forceUpdate()}};K.__u++||32&Y.__u||K.setState({__a:K.__b=K.__v.__k[0]}),X.then(W,W)},D0.prototype.componentWillUnmount=function(){this.o=[]},D0.prototype.render=function(X,Y){if(this.__b){if(this.__v.__k){var Z=document.createElement("div"),K=this.__v.__k[0].__c;this.__v.__k[0]=E1(this.__b,Z,K.__O=K.__P)}this.__b=null}var Q=Y.__a&&S(E,null,X.fallback);return Q&&(Q.__u&=-33),[S(E,null,Y.__a?null:X.children),Q]};var L1=function(X,Y,Z){if(++Z[1]===Z[0]&&X.l.delete(Y),X.props.revealOrder&&(X.props.revealOrder[0]!=="t"||!X.l.size))for(Z=X.i;Z;){for(;Z.length>3;)Z.pop()();if(Z[1]<Z[0])break;X.i=Z=Z[2]}};(J0.prototype=new T).__a=function(X){var Y=this,Z=T1(Y.__v),K=Y.l.get(X);return K[0]++,function(Q){var G=function(){Y.props.revealOrder?(K.push(Q),L1(Y,X,K)):Q()};Z?Z(G):G()}},J0.prototype.render=function(X){this.i=null,this.l=new Map;var Y=a(X.children);X.revealOrder&&X.revealOrder[0]==="b"&&Y.reverse();for(var Z=Y.length;Z--;)this.l.set(Y[Z],this.i=[1,0,this.i]);return X.children},J0.prototype.componentDidUpdate=J0.prototype.componentDidMount=function(){var X=this;this.l.forEach(function(Y,Z){L1(X,Z,Y)})};var J4=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,$4=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,F4=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,H4=/[A-Z0-9]/g,z4=typeof document<"u",V4=function(X){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(X)};T.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(X){Object.defineProperty(T.prototype,X,{configurable:!0,get:function(){return this["UNSAFE_"+X]},set:function(Y){Object.defineProperty(this,X,{configurable:!0,writable:!0,value:Y})}})});var P1=H.event;function A4(){}function B4(){return this.cancelBubble}function w4(){return this.defaultPrevented}H.event=function(X){return P1&&(X=P1(X)),X.persist=A4,X.isPropagationStopped=B4,X.isDefaultPrevented=w4,X.nativeEvent=X};var I1,U4={enumerable:!1,configurable:!0,get:function(){return this.class}},O1=H.vnode;H.vnode=function(X){typeof X.type=="string"&&function(Y){var{props:Z,type:K}=Y,Q={},G=K.indexOf("-")===-1;for(var W in Z){var q=Z[W];if(!(W==="value"&&("defaultValue"in Z)&&q==null||z4&&W==="children"&&K==="noscript"||W==="class"||W==="className")){var F=W.toLowerCase();W==="defaultValue"&&"value"in Z&&Z.value==null?W="value":W==="download"&&q===!0?q="":F==="translate"&&q==="no"?q=!1:F[0]==="o"&&F[1]==="n"?F==="ondoubleclick"?W="ondblclick":F!=="onchange"||K!=="input"&&K!=="textarea"||V4(Z.type)?F==="onfocus"?W="onfocusin":F==="onblur"?W="onfocusout":F4.test(W)&&(W=F):F=W="oninput":G&&$4.test(W)?W=W.replace(H4,"-$&").toLowerCase():q===null&&(q=void 0),F==="oninput"&&Q[W=F]&&(W="oninputCapture"),Q[W]=q}}K=="select"&&Q.multiple&&Array.isArray(Q.value)&&(Q.value=a(Z.children).forEach(function($){$.props.selected=Q.value.indexOf($.props.value)!=-1})),K=="select"&&Q.defaultValue!=null&&(Q.value=a(Z.children).forEach(function($){$.props.selected=Q.multiple?Q.defaultValue.indexOf($.props.value)!=-1:Q.defaultValue==$.props.value})),Z.class&&!Z.className?(Q.class=Z.class,Object.defineProperty(Q,"className",U4)):(Z.className&&!Z.class||Z.class&&Z.className)&&(Q.class=Q.className=Z.className),Y.props=Q}(X),X.$$typeof=J4,O1&&O1(X)};var M1=H.__r;H.__r=function(X){M1&&M1(X),I1=X.__c};var _1=H.diffed;H.diffed=function(X){_1&&_1(X);var{props:Y,__e:Z}=X;Z!=null&&X.type==="textarea"&&"value"in Y&&Y.value!==Z.value&&(Z.value=Y.value==null?"":Y.value),I1=null};export{Q4 as mountReactPy};
2
2
 
3
- //# debugId=1110D314F80BE48C64756E2164756E21
3
+ //# debugId=A2365124B281ED7A64756E2164756E21
4
4
  //# sourceMappingURL=index.js.map