root commited on
Commit
e8a57cb
·
1 Parent(s): 4da93df

Working CHanges to revesion ; add preact support

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. app.py +11 -2
  2. docs/KNOWLEDGE_GRAPH.md +246 -0
  3. docs/REVISION_NOTES_PREACT.md +211 -0
  4. graph_routes.py +351 -0
  5. image_routes.py +95 -14
  6. knowledge_graph_routes.py +372 -0
  7. migrations/add_knowledge_graphs.py +38 -0
  8. node_modules/.package-lock.json +17 -0
  9. node_modules/preact/LICENSE +21 -0
  10. node_modules/preact/README.md +185 -0
  11. node_modules/preact/compat/client.d.ts +13 -0
  12. node_modules/preact/compat/client.js +21 -0
  13. node_modules/preact/compat/client.mjs +24 -0
  14. node_modules/preact/compat/dist/compat.js +2 -0
  15. node_modules/preact/compat/dist/compat.js.map +1 -0
  16. node_modules/preact/compat/dist/compat.mjs +2 -0
  17. node_modules/preact/compat/dist/compat.module.js +2 -0
  18. node_modules/preact/compat/dist/compat.module.js.map +1 -0
  19. node_modules/preact/compat/dist/compat.umd.js +2 -0
  20. node_modules/preact/compat/dist/compat.umd.js.map +1 -0
  21. node_modules/preact/compat/jsx-dev-runtime.js +3 -0
  22. node_modules/preact/compat/jsx-dev-runtime.mjs +3 -0
  23. node_modules/preact/compat/jsx-runtime.js +3 -0
  24. node_modules/preact/compat/jsx-runtime.mjs +3 -0
  25. node_modules/preact/compat/package.json +55 -0
  26. node_modules/preact/compat/scheduler.js +15 -0
  27. node_modules/preact/compat/scheduler.mjs +23 -0
  28. node_modules/preact/compat/server.browser.js +11 -0
  29. node_modules/preact/compat/server.js +36 -0
  30. node_modules/preact/compat/server.mjs +17 -0
  31. node_modules/preact/compat/src/Children.js +21 -0
  32. node_modules/preact/compat/src/PureComponent.js +16 -0
  33. node_modules/preact/compat/src/forwardRef.js +44 -0
  34. node_modules/preact/compat/src/hooks.js +67 -0
  35. node_modules/preact/compat/src/index.d.ts +351 -0
  36. node_modules/preact/compat/src/index.js +236 -0
  37. node_modules/preact/compat/src/internal.d.ts +48 -0
  38. node_modules/preact/compat/src/memo.js +31 -0
  39. node_modules/preact/compat/src/portals.js +78 -0
  40. node_modules/preact/compat/src/render.js +302 -0
  41. node_modules/preact/compat/src/suspense-list.d.ts +16 -0
  42. node_modules/preact/compat/src/suspense-list.js +127 -0
  43. node_modules/preact/compat/src/suspense.d.ts +19 -0
  44. node_modules/preact/compat/src/suspense.js +289 -0
  45. node_modules/preact/compat/src/util.js +33 -0
  46. node_modules/preact/compat/test-utils.js +1 -0
  47. node_modules/preact/compat/test-utils.mjs +1 -0
  48. node_modules/preact/debug/dist/debug.js +2 -0
  49. node_modules/preact/debug/dist/debug.js.map +1 -0
  50. node_modules/preact/debug/dist/debug.mjs +2 -0
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import os
2
  import sys
3
  import json
4
- from flask import Flask
5
  from flask_cors import CORS
6
  from flask_socketio import SocketIO
7
  from datetime import datetime, date
@@ -35,7 +35,11 @@ def humanize_datetime(dt_str):
35
  return dt_str # Return original string if parsing fails
36
 
37
  def create_app():
38
- app = Flask(__name__)
 
 
 
 
39
  CORS(app)
40
  socketio.init_app(app, cors_allowed_origins="*")
41
 
@@ -51,6 +55,7 @@ def create_app():
51
  app.config['PROCESSED_FOLDER'] = 'processed'
52
  app.config['OUTPUT_FOLDER'] = 'output'
53
  app.config['TEMP_FOLDER'] = 'tmp'
 
54
 
55
  # Ensure instance folders exist
56
  for folder in [app.config['UPLOAD_FOLDER'], app.config['PROCESSED_FOLDER'], app.config['OUTPUT_FOLDER'], app.config['TEMP_FOLDER']]:
@@ -76,6 +81,8 @@ def create_app():
76
  from camera_routes import camera_bp
77
  from drive_routes import drive_bp
78
  from qtab_routes import qtab_bp
 
 
79
 
80
  app.register_blueprint(main_bp)
81
  app.register_blueprint(json_bp)
@@ -89,6 +96,8 @@ def create_app():
89
  app.register_blueprint(camera_bp)
90
  app.register_blueprint(drive_bp)
91
  app.register_blueprint(qtab_bp)
 
 
92
 
93
  # Initialize socketio handlers for camera routes (after app creation to avoid circular import)
94
  from camera_routes import init_socketio_handlers
 
1
  import os
2
  import sys
3
  import json
4
+ from flask import Flask, render_template, render_template_string
5
  from flask_cors import CORS
6
  from flask_socketio import SocketIO
7
  from datetime import datetime, date
 
35
  return dt_str # Return original string if parsing fails
36
 
37
  def create_app():
38
+ app = Flask(
39
+ __name__,
40
+ template_folder='templates',
41
+ )
42
+
43
  CORS(app)
44
  socketio.init_app(app, cors_allowed_origins="*")
45
 
 
55
  app.config['PROCESSED_FOLDER'] = 'processed'
56
  app.config['OUTPUT_FOLDER'] = 'output'
57
  app.config['TEMP_FOLDER'] = 'tmp'
58
+ app.config['TEMPLATES_PREACT'] = os.path.join(app.root_path, 'templates_preact')
59
 
60
  # Ensure instance folders exist
61
  for folder in [app.config['UPLOAD_FOLDER'], app.config['PROCESSED_FOLDER'], app.config['OUTPUT_FOLDER'], app.config['TEMP_FOLDER']]:
 
81
  from camera_routes import camera_bp
82
  from drive_routes import drive_bp
83
  from qtab_routes import qtab_bp
84
+ from knowledge_graph_routes import knowledge_bp
85
+ from graph_routes import graph_bp
86
 
87
  app.register_blueprint(main_bp)
88
  app.register_blueprint(json_bp)
 
96
  app.register_blueprint(camera_bp)
97
  app.register_blueprint(drive_bp)
98
  app.register_blueprint(qtab_bp)
99
+ app.register_blueprint(knowledge_bp)
100
+ app.register_blueprint(graph_bp)
101
 
102
  # Initialize socketio handlers for camera routes (after app creation to avoid circular import)
103
  from camera_routes import init_socketio_handlers
docs/KNOWLEDGE_GRAPH.md ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Knowledge Graph - Link PDF Pages to Questions
2
+
3
+ ## Overview
4
+
5
+ The Knowledge Graph feature allows you to visually link PDF pages to specific questions using an interactive node-based editor. Linked pages become accessible as revision notes.
6
+
7
+ ## Features
8
+
9
+ - **Visual Node Editor** - Drag-and-drop interface using React Flow
10
+ - **Link PDF Pages** - Connect any PDF page to any question
11
+ - **Revision Notes Integration** - Linked pages appear as revision notes
12
+ - **Auto-Save** - Links are saved to the existing database structure
13
+ - **Bidirectional Access** - Access linked pages from questions and vice versa
14
+
15
+ ## How to Use
16
+
17
+ ### 1. Open Graph Editor
18
+
19
+ From the Question Entry page (`/question_entry_v2/<session_id>`):
20
+
21
+ 1. Scroll to the "Generate PDF" section
22
+ 2. Click the **"Link PDF Pages to Questions"** button
23
+ 3. The graph editor opens in a new page
24
+
25
+ ### 2. Understanding the Interface
26
+
27
+ ```
28
+ ┌─────────────────────────────────────────────────────────────┐
29
+ │ [← Back] [Clear] [Save & Link] │
30
+ ├──────────┬──────────────────────────────────────────────────┤
31
+ │ │ │
32
+ │ PDF │ GRAPH CANVAS │
33
+ │ Pages │ │
34
+ │ Panel │ [Question Nodes] ←─── [Page Nodes] │
35
+ │ │ │
36
+ │ [Page1] │ │
37
+ │ [Page2] │ │
38
+ │ [Page3] │ │
39
+ │ │ │
40
+ └──────────┴──────────────────────────────────────────────────┘
41
+ ```
42
+
43
+ ### 3. Create Links
44
+
45
+ 1. **Drag a PDF page** from the left sidebar onto the canvas
46
+ 2. **Drag from the page node** to a question node to create a link
47
+ 3. **Repeat** for all pages you want to link
48
+ 4. Click **"Save & Link"** to save
49
+
50
+ ### 4. Access Linked Pages
51
+
52
+ After saving:
53
+
54
+ - Linked pages appear as revision notes for the connected questions
55
+ - Access them via the revision notes modal in Question Entry
56
+ - Pages are stored in the existing `images.note_json` and `images.note_filename` fields
57
+
58
+ ## Node Types
59
+
60
+ ### Question Node (Blue)
61
+ ```
62
+ ┌─────────────────────┐
63
+ │ ❓ Q12 │
64
+ │ 📗 Physics │
65
+ │ 📁 Mechanics │
66
+ │ ✅ Has Notes │
67
+ └─────────────────────┘
68
+ ```
69
+ - Shows question number, subject, chapter
70
+ - Green border indicates existing notes
71
+ - Connection point on the right
72
+
73
+ ### Page Node (Purple)
74
+ ```
75
+ ┌─────────────────────┐
76
+ │ 📄 Page 5 │
77
+ │ ┌─────────────────┐ │
78
+ │ │ Page Image │ │
79
+ │ └─────────────────┘ │
80
+ └─────────────────────┘
81
+ ```
82
+ - Shows PDF page thumbnail
83
+ - Connection point on the left
84
+ - Drag from sidebar to create
85
+
86
+ ## Data Structure
87
+
88
+ ### Saved Link Format
89
+
90
+ ```json
91
+ {
92
+ "type": "linked_page",
93
+ "source_page_id": 123,
94
+ "source_page_number": 5,
95
+ "source_filename": "upload_abc123.jpg",
96
+ "linked_at": "2026-03-17T10:30:00",
97
+ "original_note": null
98
+ }
99
+ ```
100
+
101
+ ### Database Schema
102
+
103
+ Links are stored in the existing `images` table:
104
+
105
+ | Column | Description |
106
+ |--------|-------------|
107
+ | `note_json` | JSON containing link data |
108
+ | `note_filename` | Reference to the linked page image |
109
+ | `session_id` | Session this belongs to |
110
+
111
+ ## API Endpoints
112
+
113
+ ### GET `/session/<session_id>/graph`
114
+ Open the graph editor for a session.
115
+
116
+ ### POST `/session/graph/save`
117
+ Save graph links.
118
+
119
+ **Request:**
120
+ ```json
121
+ {
122
+ "session_id": "abc123",
123
+ "links": [
124
+ {
125
+ "page_id": 5,
126
+ "question_image_id": 10,
127
+ "page_number": 5
128
+ }
129
+ ]
130
+ }
131
+ ```
132
+
133
+ **Response:**
134
+ ```json
135
+ {
136
+ "success": true,
137
+ "message": "Linked 1 pages to questions",
138
+ "links_count": 1
139
+ }
140
+ ```
141
+
142
+ ### GET `/session/graph/load/<session_id>`
143
+ Load existing graph links.
144
+
145
+ ### POST `/session/graph/delete/<session_id>`
146
+ Delete all graph links for a session.
147
+
148
+ ## Workflow Example
149
+
150
+ ### Scenario: Link difficult questions to reference pages
151
+
152
+ 1. **Upload PDF** with questions and solutions
153
+ 2. **Enter Question Entry** page
154
+ 3. **Click "Link PDF Pages to Questions"**
155
+ 4. **Drag solution page** (e.g., page 10) to Question 5
156
+ 5. **Drag another page** (e.g., page 15) to Question 8
157
+ 6. **Save & Link**
158
+ 7. **Return to Question Entry**
159
+ 8. **Click revision notes icon** on Question 5
160
+ 9. **See linked solution page** as a revision note!
161
+
162
+ ## Benefits
163
+
164
+ ✅ **Visual Organization** - See all connections at a glance
165
+ ✅ **Quick Reference** - Link solutions, formulas, diagrams
166
+ ✅ **Study Aid** - Create custom revision materials
167
+ ✅ **Flexible** - Link any page to any question
168
+ ✅ **Persistent** - Saved to database, survives page reloads
169
+
170
+ ## Tips & Tricks
171
+
172
+ ### Best Practices
173
+
174
+ 1. **Link solution pages** to their corresponding questions
175
+ 2. **Create formula sheets** by linking reference pages
176
+ 3. **Group related questions** by linking them to the same reference
177
+ 4. **Add diagrams** from appendix pages to relevant questions
178
+
179
+ ### Keyboard Shortcuts
180
+
181
+ - `Delete/Backspace` - Delete selected node or edge
182
+ - `Ctrl+C/V` - Copy/paste nodes (coming soon)
183
+ - `Mouse Wheel` - Zoom in/out
184
+ - `Right-click + Drag` - Pan canvas
185
+
186
+ ### Performance Tips
187
+
188
+ - Keep graphs under 100 nodes for best performance
189
+ - Use the MiniMap to navigate large graphs
190
+ - Clear unused nodes before saving
191
+
192
+ ## Troubleshooting
193
+
194
+ ### Page not showing in sidebar
195
+ - Ensure PDF was uploaded and processed
196
+ - Check that images exist in the database
197
+ - Refresh the page
198
+
199
+ ### Can't create connection
200
+ - Make sure you're dragging FROM page TO question
201
+ - Release mouse over the question node
202
+ - Check browser console for errors
203
+
204
+ ### Links not saving
205
+ - Ensure you clicked "Save & Link"
206
+ - Check network tab for failed requests
207
+ - Verify session ownership
208
+
209
+ ## Technical Details
210
+
211
+ ### Built With
212
+
213
+ - **React Flow** - Node-based graph editor
214
+ - **Preact** - Lightweight React alternative
215
+ - **Flask** - Python backend
216
+ - **SQLite** - Database storage
217
+
218
+ ### File Structure
219
+
220
+ ```
221
+ Report-Generator/
222
+ ├── templates/
223
+ │ ├── graph_editor.html # React Flow editor
224
+ │ └── question_entry_v2.html # Entry point
225
+ ├── graph_routes.py # Backend routes
226
+ └── docs/
227
+ └── KNOWLEDGE_GRAPH.md # This file
228
+ ```
229
+
230
+ ## Future Enhancements
231
+
232
+ - [ ] Export graph as image/PDF
233
+ - [ ] Import/export graph data
234
+ - [ ] Multi-session graphs
235
+ - [ ] Collaborative editing
236
+ - [ ] Auto-suggest links based on content
237
+ - [ ] Graph templates
238
+ - [ ] Search and filter nodes
239
+
240
+ ## Support
241
+
242
+ For issues or questions:
243
+ 1. Check browser console for errors
244
+ 2. Verify database integrity
245
+ 3. Review this documentation
246
+ 4. Report bugs with screenshots
docs/REVISION_NOTES_PREACT.md ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Revision Notes Preact Overhaul
2
+
3
+ ## Overview
4
+
5
+ Complete rewrite of the revision notes/annotation system using Preact (no build setup) with modern features and improved UX.
6
+
7
+ ## New Features
8
+
9
+ ### 1. **Image Upload & Reference Panel**
10
+ - Drag & drop image upload
11
+ - Multiple reference images support
12
+ - Image grid with selection
13
+ - Upload from file browser
14
+
15
+ ### 2. **Enhanced Toolbar**
16
+ - Modern glassmorphism design
17
+ - Tool selection: Pen, Marker, Eraser
18
+ - Color picker with 6 colors
19
+ - Adjustable brush size (1-30)
20
+ - Undo functionality
21
+ - Clear all with confirmation
22
+
23
+ ### 3. **History Panel**
24
+ - Visual history states
25
+ - Click to restore any previous state
26
+ - Up to 30 states stored
27
+
28
+ ### 4. **Improved Drawing**
29
+ - Unified pointer events (mouse, touch, pen)
30
+ - Smooth stroke rendering
31
+ - Pressure-sensitive stylus support (where available)
32
+ - Optimized canvas performance
33
+
34
+ ### 5. **Responsive Design**
35
+ - Full-screen modal
36
+ - Mobile-friendly touch controls
37
+ - Adaptive layout
38
+
39
+ ## File Structure
40
+
41
+ ```
42
+ templates/
43
+ ├── _revision_notes_preact.html # New Preact-based notes modal
44
+ └── question_entry_v2.html # Updated to use new notes
45
+
46
+ image_routes.py # Added upload endpoint
47
+ ```
48
+
49
+ ## Routes
50
+
51
+ ### Existing (Unchanged)
52
+ - `/save_note_json` - Save annotations
53
+ - `/get_note_json/<image_id>` - Load annotations
54
+ - `/delete_note` - Delete note
55
+ - `/toggle_note_in_pdf` - Include/exclude from PDF
56
+
57
+ ### New
58
+ - `/upload_note_reference` - Upload reference images
59
+
60
+ ## Usage
61
+
62
+ ### Opening the Notes Editor
63
+
64
+ ```javascript
65
+ openNotesModal(imageId, refImageUrl, sessionId, csrfToken);
66
+ ```
67
+
68
+ ### Example Button
69
+
70
+ ```html
71
+ <button onclick="openNotesModal('{{ image.id }}', '/image/processed/{{ image.processed_filename }}', '{{ session_id }}', '{{ csrf_token() }}')">
72
+ <i class="bi bi-pencil"></i> Edit Notes
73
+ </button>
74
+ ```
75
+
76
+ ## Component Architecture
77
+
78
+ ### Main Components
79
+
80
+ 1. **`NotesEditor`** - Main canvas and toolbar
81
+ 2. **`ToolButton`** - Reusable tool button
82
+ 3. **`ColorPicker`** - Color selection
83
+ 4. **`ReferencePanel`** - Image upload & references
84
+ 5. **`HistoryPanel`** - Undo history
85
+
86
+ ### State Management
87
+
88
+ Uses Preact hooks (`useState`, `useEffect`, `useCallback`) for reactive state.
89
+
90
+ ## Technical Details
91
+
92
+ ### Canvas Optimization
93
+
94
+ ```javascript
95
+ // Will-read-frequently for better performance
96
+ const ctx = canvas.getContext('2d', { willReadFrequently: false });
97
+
98
+ // Smooth rendering
99
+ ctx.lineCap = 'round';
100
+ ctx.lineJoin = 'round';
101
+ ctx.imageSmoothingEnabled = true;
102
+ ```
103
+
104
+ ### Pointer Events
105
+
106
+ Unified handling for all input types:
107
+
108
+ ```javascript
109
+ canvas.onpointerdown = handlePointerDown;
110
+ canvas.onpointermove = handlePointerMove;
111
+ canvas.onpointerup = handlePointerUp;
112
+ ```
113
+
114
+ ### Tool Modes
115
+
116
+ | Tool | Behavior | Opacity |
117
+ |------|----------|---------|
118
+ | Pen | Solid line | 100% |
119
+ | Marker | Thick line | 35% |
120
+ | Eraser | Large eraser | 100% |
121
+
122
+ ## Migration from Old System
123
+
124
+ ### Old Code
125
+ ```html
126
+ {% include '_revision_notes.html' %}
127
+ <script>
128
+ window.openNotesModal = function(id, ref) { ... };
129
+ </script>
130
+ ```
131
+
132
+ ### New Code
133
+ ```html
134
+ {% include '_revision_notes_preact.html' %}
135
+ <!-- Global functions automatically available -->
136
+ ```
137
+
138
+ ## Performance Improvements
139
+
140
+ 1. **Faster rendering** - Preact virtual DOM
141
+ 2. **Optimized canvas** - Reduced redraws
142
+ 3. **Lazy loading** - Images loaded on demand
143
+ 4. **Efficient history** - Max 30 states, auto-cleanup
144
+
145
+ ## Browser Support
146
+
147
+ - Chrome/Edge (recommended)
148
+ - Firefox
149
+ - Safari
150
+ - Mobile browsers (touch-optimized)
151
+
152
+ ## Future Enhancements
153
+
154
+ - [ ] Text annotations
155
+ - [ ] Shape tools (rectangle, circle, arrow)
156
+ - [ ] Freehand highlighter
157
+ - [ ] Export annotations as PDF
158
+ - [ ] Collaborative editing
159
+ - [ ] Voice notes
160
+ - [ ] OCR from reference images
161
+
162
+ ## Testing
163
+
164
+ Test the following scenarios:
165
+
166
+ 1. **Basic Drawing**
167
+ - Pen tool with different colors
168
+ - Marker transparency
169
+ - Eraser functionality
170
+
171
+ 2. **Image Upload**
172
+ - Drag & drop
173
+ - File browser
174
+ - Multiple images
175
+
176
+ 3. **History**
177
+ - Undo multiple times
178
+ - Restore old states
179
+
180
+ 4. **Save/Load**
181
+ - Save annotations
182
+ - Reload page
183
+ - Verify persistence
184
+
185
+ 5. **Mobile**
186
+ - Touch drawing
187
+ - Responsive layout
188
+ - Reference panel
189
+
190
+ ## Troubleshooting
191
+
192
+ ### Canvas not drawing
193
+ - Check browser console for errors
194
+ - Verify Preact loaded from CDN
195
+ - Ensure container has dimensions
196
+
197
+ ### Images not uploading
198
+ - Check file size limits
199
+ - Verify TEMP_FOLDER permissions
200
+ - Check CSRF token
201
+
202
+ ### History not working
203
+ - Ensure saveState() called after each stroke
204
+ - Check history array length
205
+
206
+ ## Credits
207
+
208
+ Built with:
209
+ - [Preact](https://preactjs.com/) - Fast 3KB React alternative
210
+ - [HTM](https://github.com/developit/htm) - Hyperscript Tagged Markup
211
+ - Bootstrap Icons - Icon library
graph_routes.py ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Graph Editor Routes
3
+ Links PDF pages to questions as revision notes
4
+ """
5
+
6
+ from flask import Blueprint, render_template, request, jsonify, current_app, url_for, redirect
7
+ from flask_login import login_required, current_user
8
+ from utils import get_db_connection, parse_note_payload, dump_note_payload
9
+ import os
10
+ import json
11
+ import fitz
12
+ from datetime import datetime
13
+ from werkzeug.utils import secure_filename
14
+
15
+ graph_bp = Blueprint('graph_bp', __name__)
16
+
17
+ ALLOWED_EXTENSIONS = {'pdf'}
18
+
19
+ def allowed_file(filename):
20
+ return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
21
+
22
+
23
+ @graph_bp.route('/session/<session_id>/graph')
24
+ @login_required
25
+ def graph_editor(session_id):
26
+ """Open graph editor for linking PDF pages to questions."""
27
+ conn = get_db_connection()
28
+
29
+ session = conn.execute(
30
+ "SELECT * FROM sessions WHERE id = ? AND user_id = ?",
31
+ (session_id, current_user.id)
32
+ ).fetchone()
33
+
34
+ if not session:
35
+ conn.close()
36
+ return redirect('/dashboard')
37
+
38
+ # Get question IMAGES (the cropped question images)
39
+ images = conn.execute("""
40
+ SELECT
41
+ i.id as image_id,
42
+ i.image_index,
43
+ i.filename,
44
+ i.processed_filename,
45
+ i.note_json,
46
+ q.id as question_id,
47
+ q.question_number,
48
+ q.subject,
49
+ q.chapter
50
+ FROM images i
51
+ LEFT JOIN questions q ON i.id = q.image_id
52
+ WHERE i.session_id = ? AND i.image_type = 'cropped'
53
+ ORDER BY i.image_index
54
+ """, (session_id,)).fetchall()
55
+
56
+ # Get PDF pages (solutions PDF pages stored with image_type='pdf_page')
57
+ pdf_pages = conn.execute("""
58
+ SELECT
59
+ id as image_id,
60
+ image_index as page_number,
61
+ filename,
62
+ processed_filename
63
+ FROM images
64
+ WHERE session_id = ? AND image_type = 'pdf_page'
65
+ ORDER BY image_index
66
+ """, (session_id,)).fetchall()
67
+
68
+ # Format PDF pages
69
+ pages_data = []
70
+ for page in pdf_pages:
71
+ page_dict = dict(page)
72
+ # Use processed_filename if available, else original
73
+ if page_dict.get('processed_filename'):
74
+ image_url = url_for('image_bp.serve_processed_image', filename=page_dict['processed_filename'])
75
+ elif page_dict.get('filename'):
76
+ image_url = url_for('main.serve_image', folder='uploads', filename=page_dict['filename'])
77
+ else:
78
+ image_url = f'/placeholder_page/{session_id}/{page_dict["page_number"]+1}'
79
+
80
+ pages_data.append({
81
+ 'image_id': page_dict['image_id'],
82
+ 'page_number': page_dict['page_number'] + 1,
83
+ 'image_url': image_url,
84
+ 'filename': page_dict['filename']
85
+ })
86
+
87
+ # Format question IMAGES with thumbnails
88
+ images_data = []
89
+ existing_links = []
90
+ for img in images:
91
+ img_dict = dict(img)
92
+ # Use processed_filename for thumbnail (the cropped question image)
93
+ thumb_url = None
94
+ if img_dict.get('processed_filename'):
95
+ thumb_url = url_for('image_bp.serve_processed_image', filename=img_dict['processed_filename'])
96
+ elif img_dict.get('filename'):
97
+ thumb_url = url_for('main.serve_image', folder='uploads', filename=img_dict['filename'])
98
+
99
+ note_payload = parse_note_payload(img_dict.get('note_json'))
100
+ linked_pages = note_payload.get('linked_pdf_pages', [])
101
+
102
+ images_data.append({
103
+ 'image_id': img_dict['image_id'],
104
+ 'question_number': img_dict.get('question_number'),
105
+ 'subject': img_dict.get('subject'),
106
+ 'chapter': img_dict.get('chapter'),
107
+ 'thumb_url': thumb_url,
108
+ 'question_id': img_dict.get('question_id'),
109
+ 'linked_page_ids': [page.get('source_page_id') for page in linked_pages if page.get('source_page_id')]
110
+ })
111
+
112
+ for linked_page in linked_pages:
113
+ if linked_page.get('source_page_id'):
114
+ existing_links.append({
115
+ 'question_image_id': img_dict['image_id'],
116
+ 'page_id': linked_page.get('source_page_id'),
117
+ 'page_number': linked_page.get('source_page_number')
118
+ })
119
+
120
+ conn.close()
121
+
122
+ return render_template('graph_editor.html',
123
+ session_id=session_id,
124
+ questions=images_data, # These are question IMAGES
125
+ pdf_pages=pages_data,
126
+ existing_links=existing_links)
127
+
128
+
129
+ @graph_bp.route('/session/graph/upload_pdf', methods=['POST'])
130
+ @login_required
131
+ def upload_pdf():
132
+ """Upload a solutions PDF and convert pages to images."""
133
+ try:
134
+ if 'pdf' not in request.files:
135
+ return jsonify({'error': 'No PDF file provided'}), 400
136
+
137
+ file = request.files['pdf']
138
+ session_id = request.form.get('session_id')
139
+
140
+ if not session_id or file.filename == '':
141
+ return jsonify({'error': 'Missing file or session_id'}), 400
142
+
143
+ if not allowed_file(file.filename):
144
+ return jsonify({'error': 'Only PDF files allowed'}), 400
145
+
146
+ conn = get_db_connection()
147
+ session = conn.execute("SELECT user_id FROM sessions WHERE id = ?", (session_id,)).fetchone()
148
+
149
+ if not session or session['user_id'] != current_user.id:
150
+ conn.close()
151
+ return jsonify({'error': 'Unauthorized'}), 403
152
+
153
+ existing_pages = conn.execute("""
154
+ SELECT id, filename, processed_filename
155
+ FROM images
156
+ WHERE session_id = ? AND image_type = 'pdf_page'
157
+ """, (session_id,)).fetchall()
158
+
159
+ for page in existing_pages:
160
+ for stored_name, folder in (
161
+ (page['processed_filename'], current_app.config['PROCESSED_FOLDER']),
162
+ (page['filename'], current_app.config['UPLOAD_FOLDER'])
163
+ ):
164
+ if stored_name:
165
+ stored_path = os.path.join(folder, stored_name)
166
+ if os.path.exists(stored_path):
167
+ try:
168
+ os.remove(stored_path)
169
+ except OSError:
170
+ current_app.logger.warning(f"Could not delete old graph asset: {stored_path}")
171
+
172
+ conn.execute("DELETE FROM images WHERE session_id = ? AND image_type = 'pdf_page'", (session_id,))
173
+
174
+ # Save uploaded PDF
175
+ pdf_filename = f"solutions_{session_id}_{secure_filename(file.filename)}"
176
+ pdf_path = os.path.join(current_app.config['UPLOAD_FOLDER'], pdf_filename)
177
+ file.save(pdf_path)
178
+
179
+ doc = fitz.open(pdf_path)
180
+ page_count = len(doc)
181
+ if page_count == 0:
182
+ doc.close()
183
+ conn.close()
184
+ return jsonify({'error': 'Uploaded PDF has no pages'}), 400
185
+
186
+ dpi = getattr(current_user, 'dpi', 150) or 150
187
+ rendered_pages = []
188
+
189
+ try:
190
+ for i, page in enumerate(doc):
191
+ pix = page.get_pixmap(dpi=dpi)
192
+ img_filename = f"solutions_{session_id}_page_{i + 1}.png"
193
+ img_path = os.path.join(current_app.config['PROCESSED_FOLDER'], img_filename)
194
+ pix.save(img_path)
195
+ rendered_pages.append(img_path)
196
+
197
+ conn.execute('''
198
+ INSERT INTO images (session_id, image_index, filename, processed_filename, image_type, original_name)
199
+ VALUES (?, ?, ?, ?, 'pdf_page', ?)
200
+ ''', (session_id, i, pdf_filename, img_filename, f'Solution Page {i + 1}'))
201
+ except Exception:
202
+ for rendered_path in rendered_pages:
203
+ if os.path.exists(rendered_path):
204
+ try:
205
+ os.remove(rendered_path)
206
+ except OSError:
207
+ current_app.logger.warning(f"Could not clean up rendered graph page: {rendered_path}")
208
+ raise
209
+ finally:
210
+ doc.close()
211
+
212
+ conn.commit()
213
+ conn.close()
214
+
215
+ # Redirect back to graph editor (will now have pages)
216
+ return jsonify({
217
+ 'success': True,
218
+ 'pdf_filename': pdf_filename,
219
+ 'redirect': f'/session/{session_id}/graph'
220
+ })
221
+
222
+ except Exception as e:
223
+ current_app.logger.error(f"Error uploading PDF: {e}")
224
+ return jsonify({'error': str(e)}), 500
225
+
226
+
227
+ @graph_bp.route('/session/graph/save', methods=['POST'])
228
+ @login_required
229
+ def save_graph():
230
+ """Save links between PDF pages and questions."""
231
+ try:
232
+ data = request.json
233
+ session_id = data.get('session_id')
234
+ links = data.get('links', [])
235
+
236
+ if not session_id:
237
+ return jsonify({'error': 'Session ID required'}), 400
238
+
239
+ conn = get_db_connection()
240
+ session = conn.execute("SELECT user_id FROM sessions WHERE id = ?", (session_id,)).fetchone()
241
+
242
+ if not session or session['user_id'] != current_user.id:
243
+ conn.close()
244
+ return jsonify({'error': 'Unauthorized'}), 403
245
+
246
+ grouped_links = {}
247
+ for link in links:
248
+ page_image_id = link.get('page_id')
249
+ question_image_id = link.get('question_image_id')
250
+ page_number = link.get('page_number')
251
+
252
+ if not page_image_id or not question_image_id:
253
+ continue
254
+
255
+ page_info = conn.execute("""
256
+ SELECT filename, processed_filename
257
+ FROM images
258
+ WHERE id = ? AND session_id = ?
259
+ """, (page_image_id, session_id)).fetchone()
260
+
261
+ if not page_info:
262
+ continue
263
+
264
+ grouped_links.setdefault(question_image_id, [])
265
+ grouped_links[question_image_id].append({
266
+ 'source_page_id': page_image_id,
267
+ 'source_page_number': page_number,
268
+ 'source_filename': page_info['filename'],
269
+ 'note_filename': page_info['processed_filename'],
270
+ 'linked_at': datetime.now().isoformat()
271
+ })
272
+
273
+ for question_image_id, linked_pages in grouped_links.items():
274
+ existing = conn.execute("""
275
+ SELECT note_json, note_filename
276
+ FROM images
277
+ WHERE id = ? AND session_id = ?
278
+ """, (question_image_id, session_id)).fetchone()
279
+
280
+ existing_payload = parse_note_payload(existing['note_json'] if existing else None)
281
+ existing_by_page = {
282
+ page['source_page_id']: page
283
+ for page in existing_payload['linked_pdf_pages']
284
+ if page.get('source_page_id')
285
+ }
286
+
287
+ for page in linked_pages:
288
+ existing_by_page[page['source_page_id']] = page
289
+
290
+ merged_pages = sorted(
291
+ existing_by_page.values(),
292
+ key=lambda page: (page.get('source_page_number') or 0, page.get('source_page_id') or 0)
293
+ )
294
+ primary_note_filename = merged_pages[0].get('note_filename') if merged_pages else (existing['note_filename'] if existing else None)
295
+ existing_linked_filenames = {
296
+ page.get('note_filename')
297
+ for page in existing_payload['linked_pdf_pages']
298
+ if page.get('note_filename')
299
+ }
300
+ should_update_note_filename = (
301
+ not existing
302
+ or not existing['note_filename']
303
+ or existing['note_filename'] in existing_linked_filenames
304
+ )
305
+
306
+ conn.execute("""
307
+ UPDATE images
308
+ SET note_json = ?,
309
+ note_filename = ?
310
+ WHERE id = ?
311
+ """, (
312
+ dump_note_payload(
313
+ existing['note_json'] if existing else None,
314
+ linked_pdf_pages=merged_pages,
315
+ annotation_json=existing_payload.get('annotation_json', {})
316
+ ),
317
+ primary_note_filename if should_update_note_filename else existing['note_filename'],
318
+ question_image_id
319
+ ))
320
+
321
+ conn.commit()
322
+ conn.close()
323
+
324
+ return jsonify({
325
+ 'success': True,
326
+ 'message': f'Linked {len(links)} pages to questions',
327
+ 'links_count': len(links)
328
+ })
329
+
330
+ except Exception as e:
331
+ current_app.logger.error(f"Error saving graph: {e}")
332
+ return jsonify({'error': str(e)}), 500
333
+
334
+
335
+ @graph_bp.route('/placeholder_page/<session_id>/<int:page_num>')
336
+ @login_required
337
+ def placeholder_page(session_id, page_num):
338
+ """Return a placeholder image for PDF pages."""
339
+ from flask import send_file
340
+ from PIL import Image, ImageDraw
341
+ import io
342
+
343
+ img = Image.new('RGB', (400, 500), color='#1e2130')
344
+ draw = ImageDraw.Draw(img)
345
+ draw.text((200, 250), f"Page {page_num}", fill='#64748b', anchor='mm')
346
+
347
+ buffer = io.BytesIO()
348
+ img.save(buffer, format='PNG')
349
+ buffer.seek(0)
350
+
351
+ return send_file(buffer, mimetype='image/png')
image_routes.py CHANGED
@@ -1,8 +1,9 @@
1
- from flask import Blueprint, send_from_directory, current_app, request, jsonify
2
  from flask_login import login_required, current_user
3
- from utils import get_db_connection
4
  import os
5
  import base64
 
6
  from datetime import datetime
7
 
8
  image_bp = Blueprint('image_bp', __name__)
@@ -28,24 +29,64 @@ def serve_neetprep_tmp_image(filename):
28
  current_app.logger.info(f"Serving /neetprep/tmp image: {filename}")
29
  return send_from_directory(current_app.config['TEMP_FOLDER'], filename)
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  @image_bp.route('/save_note_image', methods=['POST'])
32
  @login_required
33
  def save_note_image():
34
  try:
35
  if 'image' not in request.files:
36
  return jsonify({'error': 'No image file provided'}), 400
37
-
38
  file = request.files['image']
39
  image_id = request.form.get('image_id')
40
  session_id = request.form.get('session_id')
41
-
42
  if not image_id or not session_id:
43
  return jsonify({'error': 'Missing image_id or session_id'}), 400
44
 
45
  # Validate ownership
46
  conn = get_db_connection()
47
  img = conn.execute("SELECT i.id, s.user_id FROM images i JOIN sessions s ON i.session_id = s.id WHERE i.id = ?", (image_id,)).fetchone()
48
-
49
  if not img or img['user_id'] != current_user.id:
50
  conn.close()
51
  return jsonify({'error': 'Unauthorized or image not found'}), 403
@@ -112,7 +153,7 @@ def delete_note():
112
 
113
  conn = get_db_connection()
114
  img = conn.execute("""
115
- SELECT i.id, i.note_filename, s.user_id FROM images i
116
  JOIN sessions s ON i.session_id = s.id WHERE i.id = ?
117
  """, (image_id,)).fetchone()
118
 
@@ -121,7 +162,13 @@ def delete_note():
121
  return jsonify({'error': 'Unauthorized'}), 403
122
 
123
  # Delete the file if it exists
124
- if img['note_filename']:
 
 
 
 
 
 
125
  note_path = os.path.join(current_app.config['PROCESSED_FOLDER'], img['note_filename'])
126
  if os.path.exists(note_path):
127
  os.remove(note_path)
@@ -162,8 +209,31 @@ def save_note_json():
162
  conn.close()
163
  return jsonify({'error': 'Unauthorized'}), 403
164
 
165
- # Save JSON to database
166
- conn.execute("UPDATE images SET note_json = ? WHERE id = ?", (json_data, image_id))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
  # Save rasterized PNG if provided (needed for PDF generation and quiz display)
169
  if image_data and image_data.startswith('data:image/'):
@@ -191,11 +261,11 @@ def save_note_json():
191
  @image_bp.route('/get_note_json/<int:image_id>')
192
  @login_required
193
  def get_note_json(image_id):
194
- """Get revision notes as JSON."""
195
  try:
196
  conn = get_db_connection()
197
  img = conn.execute("""
198
- SELECT i.note_json, s.user_id FROM images i
199
  JOIN sessions s ON i.session_id = s.id WHERE i.id = ?
200
  """, (image_id,)).fetchone()
201
 
@@ -205,11 +275,22 @@ def get_note_json(image_id):
205
 
206
  conn.close()
207
 
208
- if img['note_json']:
209
- return jsonify({'success': True, 'json_data': img['note_json']})
 
 
 
 
 
 
 
 
 
 
 
210
  else:
211
  return jsonify({'success': False, 'error': 'No note found'}), 404
212
 
213
  except Exception as e:
214
  current_app.logger.error(f"Error getting note JSON: {e}")
215
- return jsonify({'error': str(e)}), 500
 
1
+ from flask import Blueprint, send_from_directory, current_app, request, jsonify, url_for
2
  from flask_login import login_required, current_user
3
+ from utils import get_db_connection, parse_note_payload, dump_note_payload
4
  import os
5
  import base64
6
+ import json
7
  from datetime import datetime
8
 
9
  image_bp = Blueprint('image_bp', __name__)
 
29
  current_app.logger.info(f"Serving /neetprep/tmp image: {filename}")
30
  return send_from_directory(current_app.config['TEMP_FOLDER'], filename)
31
 
32
+ @image_bp.route('/upload_note_reference', methods=['POST'])
33
+ @login_required
34
+ def upload_note_reference():
35
+ """Upload reference images for revision notes."""
36
+ try:
37
+ if 'image' not in request.files:
38
+ return jsonify({'error': 'No image file provided'}), 400
39
+
40
+ file = request.files['image']
41
+ session_id = request.form.get('session_id')
42
+ image_id = request.form.get('image_id')
43
+
44
+ if not session_id or not image_id:
45
+ return jsonify({'error': 'Missing session_id or image_id'}), 400
46
+
47
+ # Validate ownership
48
+ conn = get_db_connection()
49
+ session = conn.execute("SELECT user_id FROM sessions WHERE id = ?", (session_id,)).fetchone()
50
+
51
+ if not session or session['user_id'] != current_user.id:
52
+ conn.close()
53
+ return jsonify({'error': 'Unauthorized'}), 403
54
+
55
+ # Save uploaded image
56
+ filename = f"ref_{session_id}_{image_id}_{int(datetime.now().timestamp())}_{file.filename}"
57
+ save_path = os.path.join(current_app.config['TEMP_FOLDER'], filename)
58
+ file.save(save_path)
59
+
60
+ conn.close()
61
+
62
+ return jsonify({
63
+ 'success': True,
64
+ 'filename': filename,
65
+ 'url': url_for('image_bp.serve_tmp_image', filename=filename)
66
+ })
67
+
68
+ except Exception as e:
69
+ current_app.logger.error(f"Error uploading reference image: {e}")
70
+ return jsonify({'error': str(e)}), 500
71
+
72
  @image_bp.route('/save_note_image', methods=['POST'])
73
  @login_required
74
  def save_note_image():
75
  try:
76
  if 'image' not in request.files:
77
  return jsonify({'error': 'No image file provided'}), 400
78
+
79
  file = request.files['image']
80
  image_id = request.form.get('image_id')
81
  session_id = request.form.get('session_id')
82
+
83
  if not image_id or not session_id:
84
  return jsonify({'error': 'Missing image_id or session_id'}), 400
85
 
86
  # Validate ownership
87
  conn = get_db_connection()
88
  img = conn.execute("SELECT i.id, s.user_id FROM images i JOIN sessions s ON i.session_id = s.id WHERE i.id = ?", (image_id,)).fetchone()
89
+
90
  if not img or img['user_id'] != current_user.id:
91
  conn.close()
92
  return jsonify({'error': 'Unauthorized or image not found'}), 403
 
153
 
154
  conn = get_db_connection()
155
  img = conn.execute("""
156
+ SELECT i.id, i.note_filename, i.note_json, s.user_id FROM images i
157
  JOIN sessions s ON i.session_id = s.id WHERE i.id = ?
158
  """, (image_id,)).fetchone()
159
 
 
162
  return jsonify({'error': 'Unauthorized'}), 403
163
 
164
  # Delete the file if it exists
165
+ linked_note_filenames = {
166
+ page.get('note_filename')
167
+ for page in parse_note_payload(img['note_json']).get('linked_pdf_pages', [])
168
+ if page.get('note_filename')
169
+ }
170
+
171
+ if img['note_filename'] and img['note_filename'] not in linked_note_filenames:
172
  note_path = os.path.join(current_app.config['PROCESSED_FOLDER'], img['note_filename'])
173
  if os.path.exists(note_path):
174
  os.remove(note_path)
 
209
  conn.close()
210
  return jsonify({'error': 'Unauthorized'}), 403
211
 
212
+ existing_row = conn.execute("SELECT note_json FROM images WHERE id = ?", (image_id,)).fetchone()
213
+ existing_payload = parse_note_payload(existing_row['note_json'] if existing_row else None)
214
+
215
+ annotation_json = {}
216
+ if isinstance(json_data, str):
217
+ try:
218
+ parsed_json_data = json.loads(json_data)
219
+ if isinstance(parsed_json_data, dict):
220
+ annotation_json = parsed_json_data
221
+ except (TypeError, ValueError):
222
+ annotation_json = {}
223
+ elif isinstance(json_data, dict):
224
+ annotation_json = json_data
225
+
226
+ conn.execute(
227
+ "UPDATE images SET note_json = ? WHERE id = ?",
228
+ (
229
+ dump_note_payload(
230
+ existing_row['note_json'] if existing_row else None,
231
+ linked_pdf_pages=existing_payload.get('linked_pdf_pages', []),
232
+ annotation_json=annotation_json
233
+ ),
234
+ image_id
235
+ )
236
+ )
237
 
238
  # Save rasterized PNG if provided (needed for PDF generation and quiz display)
239
  if image_data and image_data.startswith('data:image/'):
 
261
  @image_bp.route('/get_note_json/<int:image_id>')
262
  @login_required
263
  def get_note_json(image_id):
264
+ """Get revision notes as JSON and image URL."""
265
  try:
266
  conn = get_db_connection()
267
  img = conn.execute("""
268
+ SELECT i.note_json, i.note_filename, s.user_id FROM images i
269
  JOIN sessions s ON i.session_id = s.id WHERE i.id = ?
270
  """, (image_id,)).fetchone()
271
 
 
275
 
276
  conn.close()
277
 
278
+ image_data = None
279
+ if img['note_filename']:
280
+ image_data = url_for('image_bp.serve_processed_image', filename=img['note_filename'])
281
+
282
+ parsed_payload = parse_note_payload(img['note_json'])
283
+
284
+ if img['note_json'] or image_data:
285
+ return jsonify({
286
+ 'success': True,
287
+ 'json_data': json.dumps(parsed_payload.get('annotation_json', {})),
288
+ 'image_data': image_data,
289
+ 'linked_pages': parsed_payload.get('linked_pdf_pages', [])
290
+ })
291
  else:
292
  return jsonify({'success': False, 'error': 'No note found'}), 404
293
 
294
  except Exception as e:
295
  current_app.logger.error(f"Error getting note JSON: {e}")
296
+ return jsonify({'error': str(e)}), 500
knowledge_graph_routes.py ADDED
@@ -0,0 +1,372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Knowledge Graph Routes
3
+ Node-based revision notes system using React Flow
4
+ """
5
+
6
+ from flask import Blueprint, render_template, request, jsonify, current_app, url_for
7
+ from flask_login import login_required, current_user
8
+ from utils import get_db_connection
9
+ import os
10
+ import json
11
+ import base64
12
+ from datetime import datetime
13
+ from werkzeug.utils import secure_filename
14
+
15
+ knowledge_bp = Blueprint('knowledge_bp', __name__)
16
+
17
+ # Allowed PDF extensions
18
+ ALLOWED_EXTENSIONS = {'pdf'}
19
+
20
+ def allowed_file(filename):
21
+ return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
22
+
23
+
24
+ @knowledge_bp.route('/knowledge_graph')
25
+ @login_required
26
+ def knowledge_graph_index():
27
+ """Main knowledge graph page."""
28
+ return render_template('knowledge_graph.html')
29
+
30
+
31
+ @knowledge_bp.route('/knowledge_graph/upload_pdf', methods=['POST'])
32
+ @login_required
33
+ def upload_pdf():
34
+ """
35
+ Upload PDF and create session with page images.
36
+ Returns session_id and page information for creating nodes.
37
+ """
38
+ try:
39
+ if 'pdf' not in request.files:
40
+ return jsonify({'error': 'No PDF file provided'}), 400
41
+
42
+ file = request.files['pdf']
43
+ if file.filename == '':
44
+ return jsonify({'error': 'No file selected'}), 400
45
+
46
+ if not allowed_file(file.filename):
47
+ return jsonify({'error': 'Only PDF files are allowed'}), 400
48
+
49
+ # Create session for this knowledge graph
50
+ conn = get_db_connection()
51
+ session_id = f"kg_{current_user.id}_{int(datetime.now().timestamp())}"
52
+
53
+ # Save session metadata
54
+ conn.execute("""
55
+ INSERT INTO sessions (id, user_id, original_filename, session_type, created_at)
56
+ VALUES (?, ?, ?, 'knowledge_graph', ?)
57
+ """, (session_id, current_user.id, secure_filename(file.filename), datetime.now()))
58
+
59
+ # Save PDF file
60
+ pdf_filename = f"{session_id}_{secure_filename(file.filename)}"
61
+ pdf_path = os.path.join(current_app.config['UPLOAD_FOLDER'], pdf_filename)
62
+ file.save(pdf_path)
63
+
64
+ conn.commit()
65
+
66
+ # TODO: Process PDF to extract pages
67
+ # For now, we'll create placeholder page nodes
68
+ # In production, use PyMuPDF or pdf2image to convert PDF pages to images
69
+
70
+ pages = []
71
+ # Placeholder: Create 5 dummy pages
72
+ # Replace this with actual PDF processing
73
+ for i in range(1, 6):
74
+ pages.append({
75
+ 'page_number': i,
76
+ 'image_url': f'/placeholder_page/{session_id}/{i}' # Placeholder route
77
+ })
78
+
79
+ conn.close()
80
+
81
+ return jsonify({
82
+ 'success': True,
83
+ 'session_id': session_id,
84
+ 'pdf_filename': pdf_filename,
85
+ 'pages': pages
86
+ })
87
+
88
+ except Exception as e:
89
+ current_app.logger.error(f"Error uploading PDF: {e}")
90
+ return jsonify({'error': str(e)}), 500
91
+
92
+
93
+ @knowledge_bp.route('/knowledge_graph/save', methods=['POST'])
94
+ @login_required
95
+ def save_graph():
96
+ """
97
+ Save the node graph (nodes and edges) to database.
98
+ """
99
+ try:
100
+ data = request.json
101
+ session_id = data.get('session_id')
102
+ nodes = data.get('nodes', [])
103
+ edges = data.get('edges', [])
104
+
105
+ if not session_id:
106
+ return jsonify({'error': 'Session ID required'}), 400
107
+
108
+ # Validate ownership
109
+ conn = get_db_connection()
110
+ session = conn.execute(
111
+ "SELECT user_id FROM sessions WHERE id = ? AND session_type = 'knowledge_graph'",
112
+ (session_id,)
113
+ ).fetchone()
114
+
115
+ if not session or session['user_id'] != current_user.id:
116
+ conn.close()
117
+ return jsonify({'error': 'Unauthorized'}), 403
118
+
119
+ # Save graph data as JSON
120
+ graph_data = {
121
+ 'nodes': nodes,
122
+ 'edges': edges,
123
+ 'saved_at': datetime.now().isoformat()
124
+ }
125
+
126
+ conn.execute("""
127
+ INSERT OR REPLACE INTO knowledge_graphs (session_id, graph_data, updated_at)
128
+ VALUES (?, ?, ?)
129
+ """, (session_id, json.dumps(graph_data), datetime.now()))
130
+
131
+ conn.commit()
132
+ conn.close()
133
+
134
+ return jsonify({
135
+ 'success': True,
136
+ 'message': 'Graph saved successfully'
137
+ })
138
+
139
+ except Exception as e:
140
+ current_app.logger.error(f"Error saving graph: {e}")
141
+ return jsonify({'error': str(e)}), 500
142
+
143
+
144
+ @knowledge_bp.route('/knowledge_graph/load/<session_id>')
145
+ @login_required
146
+ def load_graph(session_id):
147
+ """
148
+ Load a saved node graph.
149
+ """
150
+ try:
151
+ conn = get_db_connection()
152
+
153
+ # Validate ownership
154
+ session = conn.execute(
155
+ "SELECT user_id FROM sessions WHERE id = ? AND session_type = 'knowledge_graph'",
156
+ (session_id,)
157
+ ).fetchone()
158
+
159
+ if not session or session['user_id'] != current_user.id:
160
+ conn.close()
161
+ return jsonify({'error': 'Unauthorized'}), 403
162
+
163
+ # Load graph data
164
+ graph = conn.execute(
165
+ "SELECT graph_data FROM knowledge_graphs WHERE session_id = ?",
166
+ (session_id,)
167
+ ).fetchone()
168
+
169
+ conn.close()
170
+
171
+ if not graph or not graph['graph_data']:
172
+ return jsonify({
173
+ 'success': True,
174
+ 'nodes': [],
175
+ 'edges': []
176
+ })
177
+
178
+ graph_data = json.loads(graph['graph_data'])
179
+
180
+ return jsonify({
181
+ 'success': True,
182
+ 'nodes': graph_data.get('nodes', []),
183
+ 'edges': graph_data.get('edges', []),
184
+ 'saved_at': graph_data.get('saved_at')
185
+ })
186
+
187
+ except Exception as e:
188
+ current_app.logger.error(f"Error loading graph: {e}")
189
+ return jsonify({'error': str(e)}), 500
190
+
191
+
192
+ @knowledge_bp.route('/knowledge_graph/list')
193
+ @login_required
194
+ def list_graphs():
195
+ """
196
+ List all knowledge graphs for the current user.
197
+ """
198
+ try:
199
+ conn = get_db_connection()
200
+
201
+ graphs = conn.execute("""
202
+ SELECT s.id, s.original_filename, s.created_at, kg.updated_at
203
+ FROM sessions s
204
+ LEFT JOIN knowledge_graphs kg ON s.id = kg.session_id
205
+ WHERE s.user_id = ? AND s.session_type = 'knowledge_graph'
206
+ ORDER BY s.created_at DESC
207
+ """, (current_user.id,)).fetchall()
208
+
209
+ conn.close()
210
+
211
+ return jsonify({
212
+ 'success': True,
213
+ 'graphs': [dict(g) for g in graphs]
214
+ })
215
+
216
+ except Exception as e:
217
+ current_app.logger.error(f"Error listing graphs: {e}")
218
+ return jsonify({'error': str(e)}), 500
219
+
220
+
221
+ @knowledge_bp.route('/knowledge_graph/delete/<session_id>', methods=['POST'])
222
+ @login_required
223
+ def delete_graph(session_id):
224
+ """
225
+ Delete a knowledge graph.
226
+ """
227
+ try:
228
+ conn = get_db_connection()
229
+
230
+ # Validate ownership
231
+ session = conn.execute(
232
+ "SELECT user_id FROM sessions WHERE id = ? AND session_type = 'knowledge_graph'",
233
+ (session_id,)
234
+ ).fetchone()
235
+
236
+ if not session or session['user_id'] != current_user.id:
237
+ conn.close()
238
+ return jsonify({'error': 'Unauthorized'}), 403
239
+
240
+ # Delete graph data and session
241
+ conn.execute("DELETE FROM knowledge_graphs WHERE session_id = ?", (session_id,))
242
+ conn.execute("DELETE FROM sessions WHERE id = ?", (session_id,))
243
+
244
+ conn.commit()
245
+ conn.close()
246
+
247
+ return jsonify({
248
+ 'success': True,
249
+ 'message': 'Graph deleted successfully'
250
+ })
251
+
252
+ except Exception as e:
253
+ current_app.logger.error(f"Error deleting graph: {e}")
254
+ return jsonify({'error': str(e)}), 500
255
+
256
+
257
+ @knowledge_bp.route('/placeholder_page/<session_id>/<int:page_num>')
258
+ @login_required
259
+ def placeholder_page(session_id, page_num):
260
+ """
261
+ Placeholder route for page images.
262
+ Returns a simple placeholder image.
263
+ """
264
+ from flask import send_file
265
+ from PIL import Image, ImageDraw, ImageFont
266
+ import io
267
+
268
+ # Create a placeholder image
269
+ img = Image.new('RGB', (400, 500), color='#2b3035')
270
+ draw = ImageDraw.Draw(img)
271
+
272
+ # Draw text
273
+ text = f"Page {page_num}"
274
+ draw.text((200, 250), text, fill='#ffffff', anchor='mm')
275
+
276
+ # Save to buffer
277
+ buffer = io.BytesIO()
278
+ img.save(buffer, format='PNG')
279
+ buffer.seek(0)
280
+
281
+ return send_file(buffer, mimetype='image/png')
282
+
283
+
284
+ @knowledge_bp.route('/knowledge_graph/add_question', methods=['POST'])
285
+ @login_required
286
+ def add_question():
287
+ """
288
+ Add a question node from existing session data.
289
+ """
290
+ try:
291
+ data = request.json
292
+ session_id = data.get('session_id')
293
+ question_data = data.get('question', {})
294
+
295
+ # Validate and fetch question from database
296
+ conn = get_db_connection()
297
+ question = conn.execute("""
298
+ SELECT q.*, i.filename as image_filename
299
+ FROM questions q
300
+ LEFT JOIN images i ON q.image_id = i.id
301
+ WHERE q.session_id = ? AND q.id = ?
302
+ """, (session_id, question_data.get('id'))).fetchone()
303
+
304
+ if not question:
305
+ conn.close()
306
+ return jsonify({'error': 'Question not found'}), 404
307
+
308
+ conn.close()
309
+
310
+ # Return question data formatted for node creation
311
+ return jsonify({
312
+ 'success': True,
313
+ 'node': {
314
+ 'id': f"question-{question['id']}",
315
+ 'type': 'question',
316
+ 'data': {
317
+ 'number': question.get('question_number', '?'),
318
+ 'subject': question.get('subject', ''),
319
+ 'chapter': question.get('chapter', ''),
320
+ 'question_id': question['id']
321
+ }
322
+ }
323
+ })
324
+
325
+ except Exception as e:
326
+ current_app.logger.error(f"Error adding question: {e}")
327
+ return jsonify({'error': str(e)}), 500
328
+
329
+
330
+ @knowledge_bp.route('/knowledge_graph/add_note', methods=['POST'])
331
+ @login_required
332
+ def add_note():
333
+ """
334
+ Add a note node from existing revision notes.
335
+ """
336
+ try:
337
+ data = request.json
338
+ image_id = data.get('image_id')
339
+
340
+ conn = get_db_connection()
341
+
342
+ # Fetch note from database
343
+ image = conn.execute("""
344
+ SELECT note_json, note_filename
345
+ FROM images
346
+ WHERE id = ? AND note_json IS NOT NULL
347
+ """, (image_id,)).fetchone()
348
+
349
+ if not image:
350
+ conn.close()
351
+ return jsonify({'error': 'Note not found'}), 404
352
+
353
+ conn.close()
354
+
355
+ note_content = image['note_json'] or '{}'
356
+
357
+ return jsonify({
358
+ 'success': True,
359
+ 'node': {
360
+ 'id': f"note-{image_id}",
361
+ 'type': 'note',
362
+ 'data': {
363
+ 'content': note_content,
364
+ 'image_id': image_id,
365
+ 'note_image': image['note_filename']
366
+ }
367
+ }
368
+ })
369
+
370
+ except Exception as e:
371
+ current_app.logger.error(f"Error adding note: {e}")
372
+ return jsonify({'error': str(e)}), 500
migrations/add_knowledge_graphs.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Migration: Add knowledge_graphs table
3
+ Run: python3 < this file
4
+ """
5
+
6
+ import sqlite3
7
+ import os
8
+
9
+ DB_PATH = 'database.db'
10
+
11
+ def migrate():
12
+ conn = sqlite3.connect(DB_PATH)
13
+ cursor = conn.cursor()
14
+
15
+ # Create knowledge_graphs table
16
+ cursor.execute("""
17
+ CREATE TABLE IF NOT EXISTS knowledge_graphs (
18
+ session_id TEXT PRIMARY KEY,
19
+ graph_data TEXT,
20
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
21
+ updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
22
+ FOREIGN KEY (session_id) REFERENCES sessions(id) ON DELETE CASCADE
23
+ )
24
+ """)
25
+
26
+ # Add session_type index for faster lookups
27
+ cursor.execute("""
28
+ CREATE INDEX IF NOT EXISTS idx_sessions_type
29
+ ON sessions(session_type)
30
+ """)
31
+
32
+ conn.commit()
33
+ conn.close()
34
+
35
+ print("✓ Migration completed: knowledge_graphs table created")
36
+
37
+ if __name__ == '__main__':
38
+ migrate()
node_modules/.package-lock.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Report-Generator",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {
6
+ "node_modules/preact": {
7
+ "version": "10.29.0",
8
+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.29.0.tgz",
9
+ "integrity": "sha512-wSAGyk2bYR1c7t3SZ3jHcM6xy0lcBcDel6lODcs9ME6Th++Dx2KU+6D3HD8wMMKGA8Wpw7OMd3/4RGzYRpzwRg==",
10
+ "license": "MIT",
11
+ "funding": {
12
+ "type": "opencollective",
13
+ "url": "https://opencollective.com/preact"
14
+ }
15
+ }
16
+ }
17
+ }
node_modules/preact/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-present Jason Miller
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
node_modules/preact/README.md ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p align="center">
2
+ <a href="https://preactjs.com" target="_blank">
3
+
4
+ ![Preact](https://raw.githubusercontent.com/preactjs/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true 'Preact')
5
+
6
+ </a>
7
+ </p>
8
+ <p align="center">Fast <b>3kB</b> alternative to React with the same modern API.</p>
9
+
10
+ **All the power of Virtual DOM components, without the overhead:**
11
+
12
+ - Familiar React API & patterns: ES6 Class, hooks, and Functional Components
13
+ - Extensive React compatibility via a simple [preact/compat] alias
14
+ - Everything you need: JSX, <abbr title="Virtual DOM">VDOM</abbr>, [DevTools], <abbr title="Hot Module Replacement">HMR</abbr>, <abbr title="Server-Side Rendering">SSR</abbr>.
15
+ - Highly optimized diff algorithm and seamless hydration from Server Side Rendering
16
+ - Supports all modern browsers and IE11
17
+ - Transparent asynchronous rendering with a pluggable scheduler
18
+
19
+ ### 💁 More information at the [Preact Website ➞](https://preactjs.com)
20
+
21
+ <table border="0">
22
+ <tbody>
23
+ <tr>
24
+ <td>
25
+
26
+ [![npm](https://img.shields.io/npm/v/preact.svg)](https://www.npmjs.com/package/preact)
27
+ [![Preact Slack Community](https://img.shields.io/badge/Slack%20Community-preact.slack.com-blue)](https://chat.preactjs.com)
28
+ [![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)
29
+ [![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)
30
+
31
+ [![coveralls](https://img.shields.io/coveralls/preactjs/preact/main.svg)](https://coveralls.io/github/preactjs/preact)
32
+ [![gzip size](https://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip&label=gzip)](https://unpkg.com/preact/dist/preact.min.js)
33
+ [![brotli size](https://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=brotli&label=brotli)](https://unpkg.com/preact/dist/preact.min.js)
34
+
35
+ </td>
36
+ </tr>
37
+ </tbody>
38
+ </table>
39
+
40
+ You can find some awesome libraries in the [awesome-preact list](https://github.com/preactjs/awesome-preact) :sunglasses:
41
+
42
+ ---
43
+
44
+ ## Getting Started
45
+
46
+ > 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_
47
+
48
+ #### Tutorial: Building UI with Preact
49
+
50
+ With Preact, you create user interfaces by assembling trees of components and elements. Components are functions or classes that return a description of what their tree should output. These descriptions are typically written in [JSX](https://facebook.github.io/jsx/) (shown underneath), or [HTM](https://github.com/developit/htm) which leverages standard JavaScript Tagged Templates. Both syntaxes can express trees of elements with "props" (similar to HTML attributes) and children.
51
+
52
+ To get started using Preact, first look at the render() function. This function accepts a tree description and creates the structure described. Next, it appends this structure to a parent DOM element provided as the second argument. Future calls to render() will reuse the existing tree and update it in-place in the DOM. Internally, render() will calculate the difference from previous outputted structures in an attempt to perform as few DOM operations as possible.
53
+
54
+ ```js
55
+ import { h, render } from 'preact';
56
+ // Tells babel to use h for JSX. It's better to configure this globally.
57
+ // See https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#usage
58
+ // In tsconfig you can specify this with the jsxFactory
59
+ /** @jsx h */
60
+
61
+ // create our tree and append it to document.body:
62
+ render(
63
+ <main>
64
+ <h1>Hello</h1>
65
+ </main>,
66
+ document.body
67
+ );
68
+
69
+ // update the tree in-place:
70
+ render(
71
+ <main>
72
+ <h1>Hello World!</h1>
73
+ </main>,
74
+ document.body
75
+ );
76
+ // ^ this second invocation of render(...) will use a single DOM call to update the text of the <h1>
77
+ ```
78
+
79
+ Hooray! render() has taken our structure and output a User Interface! This approach demonstrates a simple case, but would be difficult to use as an application grows in complexity. Each change would be forced to calculate the difference between the current and updated structure for the entire application. Components can help here – by dividing the User Interface into nested Components each can calculate their difference from their mounted point. Here's an example:
80
+
81
+ ```js
82
+ import { render, h } from 'preact';
83
+ import { useState } from 'preact/hooks';
84
+
85
+ /** @jsx h */
86
+
87
+ const App = () => {
88
+ const [input, setInput] = useState('');
89
+
90
+ return (
91
+ <div>
92
+ <p>Do you agree to the statement: "Preact is awesome"?</p>
93
+ <input value={input} onInput={e => setInput(e.target.value)} />
94
+ </div>
95
+ );
96
+ };
97
+
98
+ render(<App />, document.body);
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Sponsors
104
+
105
+ Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]
106
+
107
+ <a href="https://opencollective.com/preact/sponsor/0/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/0/avatar.svg"></a>
108
+ <a href="https://opencollective.com/preact/sponsor/1/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/1/avatar.svg"></a>
109
+ <a href="https://opencollective.com/preact/sponsor/2/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/2/avatar.svg"></a>
110
+ <a href="https://opencollective.com/preact/sponsor/3/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/3/avatar.svg"></a>
111
+ <a href="https://opencollective.com/preact/sponsor/4/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/4/avatar.svg"></a>
112
+ <a href="https://snyk.co/preact" target="_blank"><img src="https://res.cloudinary.com/snyk/image/upload/snyk-marketingui/brand-logos/wordmark-logo-color.svg" width="192" height="64"></a>
113
+ <a href="https://opencollective.com/preact/sponsor/5/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/5/avatar.svg"></a>
114
+ <a href="https://opencollective.com/preact/sponsor/6/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/6/avatar.svg"></a>
115
+ <a href="https://opencollective.com/preact/sponsor/7/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/7/avatar.svg"></a>
116
+ <a href="https://opencollective.com/preact/sponsor/8/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/8/avatar.svg"></a>
117
+ <a href="https://opencollective.com/preact/sponsor/9/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/9/avatar.svg"></a>
118
+ <a href="https://opencollective.com/preact/sponsor/10/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/10/avatar.svg"></a>
119
+ <a href="https://opencollective.com/preact/sponsor/11/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/11/avatar.svg"></a>
120
+ <a href="https://opencollective.com/preact/sponsor/12/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/12/avatar.svg"></a>
121
+ <a href="https://opencollective.com/preact/sponsor/13/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/13/avatar.svg"></a>
122
+ <a href="https://opencollective.com/preact/sponsor/14/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/14/avatar.svg"></a>
123
+ <a href="https://opencollective.com/preact/sponsor/15/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/15/avatar.svg"></a>
124
+ <a href="https://github.com/guardian" target="_blank"> &nbsp; &nbsp; &nbsp; <img src="https://github.com/guardian.png" width="64" height="64"> &nbsp; &nbsp; &nbsp; </a>
125
+ <a href="https://opencollective.com/preact/sponsor/16/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/16/avatar.svg"></a>
126
+ <a href="https://opencollective.com/preact/sponsor/17/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/17/avatar.svg"></a>
127
+ <a href="https://opencollective.com/preact/sponsor/18/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/18/avatar.svg"></a>
128
+ <a href="https://opencollective.com/preact/sponsor/19/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/19/avatar.svg"></a>
129
+ <a href="https://opencollective.com/preact/sponsor/20/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/20/avatar.svg"></a>
130
+ <a href="https://opencollective.com/preact/sponsor/21/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/21/avatar.svg"></a>
131
+ <a href="https://opencollective.com/preact/sponsor/22/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/22/avatar.svg"></a>
132
+ <a href="https://opencollective.com/preact/sponsor/23/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/23/avatar.svg"></a>
133
+ <a href="https://opencollective.com/preact/sponsor/24/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/24/avatar.svg"></a>
134
+ <a href="https://opencollective.com/preact/sponsor/25/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/25/avatar.svg"></a>
135
+ <a href="https://opencollective.com/preact/sponsor/26/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/26/avatar.svg"></a>
136
+ <a href="https://opencollective.com/preact/sponsor/27/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/27/avatar.svg"></a>
137
+ <a href="https://opencollective.com/preact/sponsor/28/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/28/avatar.svg"></a>
138
+ <a href="https://opencollective.com/preact/sponsor/29/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/29/avatar.svg"></a>
139
+
140
+ ## Backers
141
+
142
+ Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]
143
+
144
+ <a href="https://opencollective.com/preact/backer/0/website" target="_blank"><img src="https://opencollective.com/preact/backer/0/avatar.svg"></a>
145
+ <a href="https://opencollective.com/preact/backer/1/website" target="_blank"><img src="https://opencollective.com/preact/backer/1/avatar.svg"></a>
146
+ <a href="https://opencollective.com/preact/backer/2/website" target="_blank"><img src="https://opencollective.com/preact/backer/2/avatar.svg"></a>
147
+ <a href="https://opencollective.com/preact/backer/3/website" target="_blank"><img src="https://opencollective.com/preact/backer/3/avatar.svg"></a>
148
+ <a href="https://opencollective.com/preact/backer/4/website" target="_blank"><img src="https://opencollective.com/preact/backer/4/avatar.svg"></a>
149
+ <a href="https://opencollective.com/preact/backer/5/website" target="_blank"><img src="https://opencollective.com/preact/backer/5/avatar.svg"></a>
150
+ <a href="https://opencollective.com/preact/backer/6/website" target="_blank"><img src="https://opencollective.com/preact/backer/6/avatar.svg"></a>
151
+ <a href="https://opencollective.com/preact/backer/7/website" target="_blank"><img src="https://opencollective.com/preact/backer/7/avatar.svg"></a>
152
+ <a href="https://opencollective.com/preact/backer/8/website" target="_blank"><img src="https://opencollective.com/preact/backer/8/avatar.svg"></a>
153
+ <a href="https://opencollective.com/preact/backer/9/website" target="_blank"><img src="https://opencollective.com/preact/backer/9/avatar.svg"></a>
154
+ <a href="https://opencollective.com/preact/backer/10/website" target="_blank"><img src="https://opencollective.com/preact/backer/10/avatar.svg"></a>
155
+ <a href="https://opencollective.com/preact/backer/11/website" target="_blank"><img src="https://opencollective.com/preact/backer/11/avatar.svg"></a>
156
+ <a href="https://opencollective.com/preact/backer/12/website" target="_blank"><img src="https://opencollective.com/preact/backer/12/avatar.svg"></a>
157
+ <a href="https://opencollective.com/preact/backer/13/website" target="_blank"><img src="https://opencollective.com/preact/backer/13/avatar.svg"></a>
158
+ <a href="https://opencollective.com/preact/backer/14/website" target="_blank"><img src="https://opencollective.com/preact/backer/14/avatar.svg"></a>
159
+ <a href="https://opencollective.com/preact/backer/15/website" target="_blank"><img src="https://opencollective.com/preact/backer/15/avatar.svg"></a>
160
+ <a href="https://opencollective.com/preact/backer/16/website" target="_blank"><img src="https://opencollective.com/preact/backer/16/avatar.svg"></a>
161
+ <a href="https://opencollective.com/preact/backer/17/website" target="_blank"><img src="https://opencollective.com/preact/backer/17/avatar.svg"></a>
162
+ <a href="https://opencollective.com/preact/backer/18/website" target="_blank"><img src="https://opencollective.com/preact/backer/18/avatar.svg"></a>
163
+ <a href="https://opencollective.com/preact/backer/19/website" target="_blank"><img src="https://opencollective.com/preact/backer/19/avatar.svg"></a>
164
+ <a href="https://opencollective.com/preact/backer/20/website" target="_blank"><img src="https://opencollective.com/preact/backer/20/avatar.svg"></a>
165
+ <a href="https://opencollective.com/preact/backer/21/website" target="_blank"><img src="https://opencollective.com/preact/backer/21/avatar.svg"></a>
166
+ <a href="https://opencollective.com/preact/backer/22/website" target="_blank"><img src="https://opencollective.com/preact/backer/22/avatar.svg"></a>
167
+ <a href="https://opencollective.com/preact/backer/23/website" target="_blank"><img src="https://opencollective.com/preact/backer/23/avatar.svg"></a>
168
+ <a href="https://opencollective.com/preact/backer/24/website" target="_blank"><img src="https://opencollective.com/preact/backer/24/avatar.svg"></a>
169
+ <a href="https://opencollective.com/preact/backer/25/website" target="_blank"><img src="https://opencollective.com/preact/backer/25/avatar.svg"></a>
170
+ <a href="https://opencollective.com/preact/backer/26/website" target="_blank"><img src="https://opencollective.com/preact/backer/26/avatar.svg"></a>
171
+ <a href="https://opencollective.com/preact/backer/27/website" target="_blank"><img src="https://opencollective.com/preact/backer/27/avatar.svg"></a>
172
+ <a href="https://opencollective.com/preact/backer/28/website" target="_blank"><img src="https://opencollective.com/preact/backer/28/avatar.svg"></a>
173
+ <a href="https://opencollective.com/preact/backer/29/website" target="_blank"><img src="https://opencollective.com/preact/backer/29/avatar.svg"></a>
174
+
175
+ ---
176
+
177
+ ## License
178
+
179
+ MIT
180
+
181
+ [![Preact](https://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)
182
+
183
+ [preact/compat]: https://github.com/preactjs/preact/tree/main/compat
184
+ [hyperscript]: https://github.com/dominictarr/hyperscript
185
+ [DevTools]: https://github.com/preactjs/preact-devtools
node_modules/preact/compat/client.d.ts ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Intentionally not using a relative path to take advantage of
2
+ // the TS version resolution mechanism
3
+ import * as preact from 'preact';
4
+
5
+ export function createRoot(container: preact.ContainerNode): {
6
+ render(children: preact.ComponentChild): void;
7
+ unmount(): void;
8
+ };
9
+
10
+ export function hydrateRoot(
11
+ container: preact.ContainerNode,
12
+ children: preact.ComponentChild
13
+ ): ReturnType<typeof createRoot>;
node_modules/preact/compat/client.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const { render, hydrate, unmountComponentAtNode } = require('preact/compat');
2
+
3
+ function createRoot(container) {
4
+ return {
5
+ // eslint-disable-next-line
6
+ render: function (children) {
7
+ render(children, container);
8
+ },
9
+ // eslint-disable-next-line
10
+ unmount: function () {
11
+ unmountComponentAtNode(container);
12
+ }
13
+ };
14
+ }
15
+
16
+ exports.createRoot = createRoot;
17
+
18
+ exports.hydrateRoot = function (container, children) {
19
+ hydrate(children, container);
20
+ return createRoot(container);
21
+ };
node_modules/preact/compat/client.mjs ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { render, hydrate, unmountComponentAtNode } from 'preact/compat';
2
+
3
+ export function createRoot(container) {
4
+ return {
5
+ // eslint-disable-next-line
6
+ render: function (children) {
7
+ render(children, container);
8
+ },
9
+ // eslint-disable-next-line
10
+ unmount: function () {
11
+ unmountComponentAtNode(container);
12
+ }
13
+ };
14
+ }
15
+
16
+ export function hydrateRoot(container, children) {
17
+ hydrate(children, container);
18
+ return createRoot(container);
19
+ }
20
+
21
+ export default {
22
+ createRoot,
23
+ hydrateRoot
24
+ };
node_modules/preact/compat/dist/compat.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ var n=require("preact"),t=require("preact/hooks");function e(n,t){for(var e in t)n[e]=t[e];return n}function r(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function u(n,e){var r=e(),u=t.useState({t:{__:r,u:e}}),i=u[0].t,c=u[1];return t.useLayoutEffect(function(){i.__=r,i.u=e,o(i)&&c({t:i})},[n,r,e]),t.useEffect(function(){return o(i)&&c({t:i}),n(function(){o(i)&&c({t:i})})},[n]),r}function o(n){try{return!((t=n.__)===(e=n.u())&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}var t,e}function i(n){n()}function c(n){return n}function l(){return[!1,i]}var f=t.useLayoutEffect;function a(n,t){this.props=n,this.context=t}function s(t,e){function u(n){var t=this.props.ref;return t!=n.ref&&t&&("function"==typeof t?t(null):t.current=null),e?!e(this.props,n)||t!=n.ref:r(this.props,n)}function o(e){return this.shouldComponentUpdate=u,n.createElement(t,e)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.__f=o.prototype.isReactComponent=!0,o.type=t,o}(a.prototype=new n.Component).isPureReactComponent=!0,a.prototype.shouldComponentUpdate=function(n,t){return r(this.props,n)||r(this.state,t)};var p=n.options.__b;n.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),p&&p(n)};var v="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function h(n){function t(t){var r=e({},t);return delete r.ref,n(r,t.ref||null)}return t.$$typeof=v,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var d=function(t,e){return null==t?null:n.toChildArray(n.toChildArray(t).map(e))},m={map:d,forEach:d,count:function(t){return t?n.toChildArray(t).length:0},only:function(t){var e=n.toChildArray(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:n.toChildArray},x=n.options.__e;n.options.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);x(n,t,e,r)};var b=n.options.unmount;function y(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=e({},n)).__c&&(n.__c.__P===r&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return y(n,t,r)})),n}function _(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return _(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function g(){this.__u=0,this.o=null,this.__b=null}function S(n){var t=n.__&&n.__.__c;return t&&t.__a&&t.__a(n)}function E(t){var e,r,u,o=null;function i(i){if(e||(e=t()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?n.createElement(o,i):null}return i.displayName="Lazy",i.__f=!0,i}function C(){this.i=null,this.l=null}n.options.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),b&&b(n)},(g.prototype=new n.Component).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=S(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(l):l())};e.__R=i;var c=e.__P;e.__P=null;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=_(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=c,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},g.prototype.componentWillUnmount=function(){this.o=[]},g.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),u=this.__v.__k[0].__c;this.__v.__k[0]=y(this.__b,r,u.__O=u.__P)}this.__b=null}var o=e.__a&&n.createElement(n.Fragment,null,t.fallback);return o&&(o.__u&=-33),[n.createElement(n.Fragment,null,e.__a?null:t.children),o]};var O=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function R(n){return this.getChildContext=function(){return n.context},n.children}function w(t){var e=this,r=t.p;if(e.componentWillUnmount=function(){n.render(null,e.v),e.v=null,e.p=null},e.p&&e.p!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.p=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.p.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.p.removeChild(n)}}}n.render(n.createElement(R,{context:e.context},t.__v),e.v)}function j(t,e){var r=n.createElement(w,{__v:t,p:e});return r.containerInfo=e,r}(C.prototype=new n.Component).__a=function(n){var t=this,e=S(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),O(t,n,r)):u()};e?e(o):o()}},C.prototype.render=function(t){this.i=null,this.l=new Map;var e=n.toChildArray(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.l.set(e[r],this.i=[1,0,this.i]);return t.children},C.prototype.componentDidUpdate=C.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){O(n,e,t)})};var I="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,k=/^(?: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]/,M=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,N=/[A-Z0-9]/g,T="undefined"!=typeof document,A=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function D(t,e,r){return null==e.__k&&(e.textContent=""),n.render(t,e),"function"==typeof r&&r(),t?t.__c:null}function L(t,e,r){return n.hydrate(t,e),"function"==typeof r&&r(),t?t.__c:null}n.Component.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(n.Component.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var U=n.options.event;n.options.event=function(n){return U&&(n=U(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var F,V={configurable:!0,get:function(){return this.class}},W=n.options.vnode;n.options.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,r=t.type,u={},o=-1==r.indexOf("-");for(var i in e){var c=e[i];if(!("value"===i&&"defaultValue"in e&&null==c||T&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===c?c="":"translate"===l&&"no"===c?c=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==r&&"textarea"!==r||A(e.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":M.test(i)&&(i=l):l=i="oninput":o&&k.test(i)?i=i.replace(N,"-$&").toLowerCase():null===c&&(c=void 0),"oninput"===l&&u[i=l]&&(i="oninputCapture"),u[i]=c}}"select"==r&&(u.multiple&&Array.isArray(u.value)&&(u.value=n.toChildArray(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),null!=u.defaultValue&&(u.value=n.toChildArray(e.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value}))),e.class&&!e.className?(u.class=e.class,Object.defineProperty(u,"className",V)):e.className&&(u.class=u.className=e.className),t.props=u}(t),t.$$typeof=I,W&&W(t)};var P=n.options.__r;n.options.__r=function(n){P&&P(n),F=n.__c};var z=n.options.diffed;n.options.diffed=function(n){z&&z(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value),F=null};var B={ReactCurrentDispatcher:{current:{readContext:function(n){return F.__n[n.__c].props.value},useCallback:t.useCallback,useContext:t.useContext,useDebugValue:t.useDebugValue,useDeferredValue:c,useEffect:t.useEffect,useId:t.useId,useImperativeHandle:t.useImperativeHandle,useInsertionEffect:f,useLayoutEffect:t.useLayoutEffect,useMemo:t.useMemo,useReducer:t.useReducer,useRef:t.useRef,useState:t.useState,useSyncExternalStore:u,useTransition:l}}};function H(t){return n.createElement.bind(null,t)}function q(n){return!!n&&n.$$typeof===I}function Z(t){return q(t)&&t.type===n.Fragment}function Y(n){return!!n&&"string"==typeof n.displayName&&0==n.displayName.indexOf("Memo(")}function $(t){return q(t)?n.cloneElement.apply(null,arguments):t}function G(t){return!!t.__k&&(n.render(null,t),!0)}function J(n){return n&&(n.base||1===n.nodeType&&n)||null}var K=function(n,t){return n(t)},Q=function(t,e){var r=n.options.debounceRendering;n.options.debounceRendering=function(n){return n()};var u=t(e);return n.options.debounceRendering=r,u},X=q,nn={useState:t.useState,useId:t.useId,useReducer:t.useReducer,useEffect:t.useEffect,useLayoutEffect:t.useLayoutEffect,useInsertionEffect:f,useTransition:l,useDeferredValue:c,useSyncExternalStore:u,startTransition:i,useRef:t.useRef,useImperativeHandle:t.useImperativeHandle,useMemo:t.useMemo,useCallback:t.useCallback,useContext:t.useContext,useDebugValue:t.useDebugValue,version:"18.3.1",Children:m,render:D,hydrate:L,unmountComponentAtNode:G,createPortal:j,createElement:n.createElement,createContext:n.createContext,createFactory:H,cloneElement:$,createRef:n.createRef,Fragment:n.Fragment,isValidElement:q,isElement:X,isFragment:Z,isMemo:Y,findDOMNode:J,Component:n.Component,PureComponent:a,memo:s,forwardRef:h,flushSync:Q,unstable_batchedUpdates:K,StrictMode:n.Fragment,Suspense:g,SuspenseList:C,lazy:E,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:B};Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return n.Component}}),Object.defineProperty(exports,"Fragment",{enumerable:!0,get:function(){return n.Fragment}}),Object.defineProperty(exports,"StrictMode",{enumerable:!0,get:function(){return n.Fragment}}),Object.defineProperty(exports,"createContext",{enumerable:!0,get:function(){return n.createContext}}),Object.defineProperty(exports,"createElement",{enumerable:!0,get:function(){return n.createElement}}),Object.defineProperty(exports,"createRef",{enumerable:!0,get:function(){return n.createRef}}),exports.Children=m,exports.PureComponent=a,exports.Suspense=g,exports.SuspenseList=C,exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,exports.cloneElement=$,exports.createFactory=H,exports.createPortal=j,exports.default=nn,exports.findDOMNode=J,exports.flushSync=Q,exports.forwardRef=h,exports.hydrate=L,exports.isElement=X,exports.isFragment=Z,exports.isMemo=Y,exports.isValidElement=q,exports.lazy=E,exports.memo=s,exports.render=D,exports.startTransition=i,exports.unmountComponentAtNode=G,exports.unstable_batchedUpdates=K,exports.useDeferredValue=c,exports.useInsertionEffect=f,exports.useSyncExternalStore=u,exports.useTransition=l,exports.version="18.3.1",Object.keys(t).forEach(function(n){"default"===n||exports.hasOwnProperty(n)||Object.defineProperty(exports,n,{enumerable:!0,get:function(){return t[n]}})});
2
+ //# sourceMappingURL=compat.js.map
node_modules/preact/compat/dist/compat.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"compat.js","sources":["../src/util.js","../src/hooks.js","../src/PureComponent.js","../src/memo.js","../src/forwardRef.js","../src/Children.js","../src/suspense.js","../src/suspense-list.js","../../src/constants.js","../src/portals.js","../src/render.js","../src/index.js"],"sourcesContent":["/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n\n/**\n * Check if two values are the same value\n * @param {*} x\n * @param {*} y\n * @returns {boolean}\n */\nexport function is(x, y) {\n\treturn (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\n","import { useState, useLayoutEffect, useEffect } from 'preact/hooks';\nimport { is } from './util';\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n * @typedef {{ _value: any; _getSnapshot: () => any }} Store\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\t/**\n\t * @typedef {{ _instance: Store }} StoreRef\n\t * @type {[StoreRef, (store: StoreRef) => void]}\n\t */\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (didSnapshotChange(_instance)) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\n/** @type {(inst: Store) => boolean} */\nfunction didSnapshotChange(inst) {\n\ttry {\n\t\treturn !is(inst._value, inst._getSnapshot());\n\t} catch (error) {\n\t\treturn true;\n\t}\n}\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p, c) {\n\tthis.props = p;\n\tthis.context = c;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function (props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { createElement } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Memoize a component, so that it only updates when the props actually have\n * changed. This was previously known as `React.pure`.\n * @param {import('./internal').FunctionComponent} c functional component\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\n * @returns {import('./internal').FunctionComponent}\n */\nexport function memo(c, comparer) {\n\tfunction shouldUpdate(nextProps) {\n\t\tlet ref = this.props.ref;\n\t\tif (ref != nextProps.ref && ref) {\n\t\t\ttypeof ref == 'function' ? ref(null) : (ref.current = null);\n\t\t}\n\n\t\treturn comparer\n\t\t\t? !comparer(this.props, nextProps) || ref != nextProps.ref\n\t\t\t: shallowDiffers(this.props, nextProps);\n\t}\n\n\tfunction Memoed(props) {\n\t\tthis.shouldComponentUpdate = shouldUpdate;\n\t\treturn createElement(c, props);\n\t}\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\n\tMemoed._forwarded = Memoed.prototype.isReactComponent = true;\n\tMemoed.type = c;\n\treturn Memoed;\n}\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = fn;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { toChildArray } from 'preact';\n\nconst mapFn = (children, fn) => {\n\tif (children == null) return null;\n\treturn toChildArray(toChildArray(children).map(fn));\n};\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nexport const Children = {\n\tmap: mapFn,\n\tforEach: mapFn,\n\tcount(children) {\n\t\treturn children ? toChildArray(children).length : 0;\n\t},\n\tonly(children) {\n\t\tconst normalized = toChildArray(children);\n\t\tif (normalized.length !== 1) throw 'Children.only';\n\t\treturn normalized[0];\n\t},\n\ttoArray: toChildArray\n};\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { MODE_HYDRATE } from '../../src/constants';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function (vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component) component._unmounted = true;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._flags & MODE_HYDRATE) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\n\t\t\tvnode._component._force = true;\n\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode && originalParent) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.appendChild(vnode._dom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode<any, any>} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function (promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved || c._unmounted) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\t// Store and null _parentDom to prevent setState/forceUpdate from\n\t// scheduling renders while suspended. Render would be a no-op anyway\n\t// since renderComponent checks _parentDom, but this avoids queue churn.\n\tconst originalParentDom = suspendingComponent._parentDom;\n\tsuspendingComponent._parentDom = null;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\t// Restore _parentDom before forceUpdate so render can proceed\n\t\t\t\tsuspended._parentDom = originalParentDom;\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tif (\n\t\t!c._pendingSuspensionCount++ &&\n\t\t!(suspendingVNode._flags & MODE_HYDRATE)\n\t) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function () {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function (props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._flags &= ~MODE_HYDRATE;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\tlet component = vnode._parent && vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component = null;\n\tlet error;\n\tlet resolved;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tif (exports) {\n\t\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t\t}\n\t\t\t\t\tresolved = true;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t\tresolved = true;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!resolved) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn component ? createElement(component, props) : null;\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function (child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function (props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate =\n\tSuspenseList.prototype.componentDidMount = function () {\n\t\t// Iterate through all children after mounting for two reasons:\n\t\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t\t// The nodes can now be completely consumed from the linked list.\n\t\t// 2. Handle nodes that might have gotten resolved between render and\n\t\t// componentDidMount.\n\t\tthis._map.forEach((node, child) => {\n\t\t\tresolve(this, child, node);\n\t\t});\n\t};\n","/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { createElement, render } from 'preact';\n\n/**\n * @param {import('../../src/index').RenderableProps<{ context: any }>} props\n */\nfunction ContextProvider(props) {\n\tthis.getChildContext = () => props.context;\n\treturn props.children;\n}\n\n/**\n * Portal component\n * @this {import('./internal').Component}\n * @param {object | null | undefined} props\n *\n * TODO: use createRoot() instead of fake root\n */\nfunction Portal(props) {\n\tconst _this = this;\n\tlet container = props._container;\n\n\t_this.componentWillUnmount = function () {\n\t\trender(null, _this._temp);\n\t\t_this._temp = null;\n\t\t_this._container = null;\n\t};\n\n\t// When we change container we should clear our old container and\n\t// indicate a new mount.\n\tif (_this._container && _this._container !== container) {\n\t\t_this.componentWillUnmount();\n\t}\n\n\tif (!_this._temp) {\n\t\t// Ensure the element has a mask for useId invocations\n\t\tlet root = _this._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\t_this._container = container;\n\n\t\t// Create a fake DOM parent node that manages a subset of `container`'s children:\n\t\t_this._temp = {\n\t\t\tnodeType: 1,\n\t\t\tparentNode: container,\n\t\t\tchildNodes: [],\n\t\t\t_children: { _mask: root._mask },\n\t\t\tcontains: () => true,\n\t\t\tnamespaceURI: container.namespaceURI,\n\t\t\tinsertBefore(child, before) {\n\t\t\t\tthis.childNodes.push(child);\n\t\t\t\t_this._container.insertBefore(child, before);\n\t\t\t},\n\t\t\tremoveChild(child) {\n\t\t\t\tthis.childNodes.splice(this.childNodes.indexOf(child) >>> 1, 1);\n\t\t\t\t_this._container.removeChild(child);\n\t\t\t}\n\t\t};\n\t}\n\n\t// Render our wrapping element into temp.\n\trender(\n\t\tcreateElement(ContextProvider, { context: _this.context }, props._vnode),\n\t\t_this._temp\n\t);\n}\n\n/**\n * Create a `Portal` to continue rendering the vnode tree at a different DOM node\n * @param {import('./internal').VNode} vnode The vnode to render\n * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.\n */\nexport function createPortal(vnode, container) {\n\tconst el = createElement(Portal, { _vnode: vnode, _container: container });\n\tel.containerInfo = container;\n\treturn el;\n}\n","import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\nimport {\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tuseEffect,\n\tuseId,\n\tuseImperativeHandle,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseReducer,\n\tuseRef,\n\tuseState\n} from 'preact/hooks';\nimport {\n\tuseDeferredValue,\n\tuseInsertionEffect,\n\tuseSyncExternalStore,\n\tuseTransition\n} from './index';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS =\n\t/^(?: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]/;\nconst ON_ANI = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;\nconst CAMEL_REPLACE = /[A-Z0-9]/g;\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/\n\t\t: /fil|che|ra/\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = true;\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\n\t\t}\n\t});\n});\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\n\te.persist = () => {};\n\te.isPropagationStopped = function isPropagationStopped() {\n\t\treturn this.cancelBubble;\n\t};\n\te.isDefaultPrevented = function isDefaultPrevented() {\n\t\treturn this.defaultPrevented;\n\t};\n\treturn (e.nativeEvent = e);\n};\n\nconst classNameDescriptorNonEnumberable = {\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nfunction handleDomVNode(vnode) {\n\tlet props = vnode.props,\n\t\ttype = vnode.type,\n\t\tnormalizedProps = {},\n\t\tisNonDashedType = type.indexOf('-') == -1;\n\n\tfor (let i in props) {\n\t\tlet value = props[i];\n\n\t\tif (\n\t\t\t(i === 'value' && 'defaultValue' in props && value == null) ||\n\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t(IS_DOM && i === 'children' && type === 'noscript') ||\n\t\t\ti === 'class' ||\n\t\t\ti === 'className'\n\t\t) {\n\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t// a default value\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet lowerCased = i.toLowerCase();\n\t\tif (i === 'defaultValue' && 'value' in props && props.value == null) {\n\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\ti = 'value';\n\t\t} else if (i === 'download' && value === true) {\n\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t// value will be used as the file name and the file will be called\n\t\t\t// \"true\" upon downloading it.\n\t\t\tvalue = '';\n\t\t} else if (lowerCased === 'translate' && value === 'no') {\n\t\t\tvalue = false;\n\t\t} else if (lowerCased[0] === 'o' && lowerCased[1] === 'n') {\n\t\t\tif (lowerCased === 'ondoubleclick') {\n\t\t\t\ti = 'ondblclick';\n\t\t\t} else if (\n\t\t\t\tlowerCased === 'onchange' &&\n\t\t\t\t(type === 'input' || type === 'textarea') &&\n\t\t\t\t!onChangeInputType(props.type)\n\t\t\t) {\n\t\t\t\tlowerCased = i = 'oninput';\n\t\t\t} else if (lowerCased === 'onfocus') {\n\t\t\t\ti = 'onfocusin';\n\t\t\t} else if (lowerCased === 'onblur') {\n\t\t\t\ti = 'onfocusout';\n\t\t\t} else if (ON_ANI.test(i)) {\n\t\t\t\ti = lowerCased;\n\t\t\t}\n\t\t} else if (isNonDashedType && CAMEL_PROPS.test(i)) {\n\t\t\ti = i.replace(CAMEL_REPLACE, '-$&').toLowerCase();\n\t\t} else if (value === null) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\t// Add support for onInput and onChange, see #3561\n\t\t// if we have an oninput prop already change it to oninputCapture\n\t\tif (lowerCased === 'oninput') {\n\t\t\ti = lowerCased;\n\t\t\tif (normalizedProps[i]) {\n\t\t\t\ti = 'oninputCapture';\n\t\t\t}\n\t\t}\n\n\t\tnormalizedProps[i] = value;\n\t}\n\n\tif (type == 'select') {\n\t\t// Add support for array select values: <select multiple value={[]} />\n\t\tif (normalizedProps.multiple && Array.isArray(normalizedProps.value)) {\n\t\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t\t});\n\t\t}\n\n\t\t// Adding support for defaultValue in select tag\n\t\tif (normalizedProps.defaultValue != null) {\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tif (normalizedProps.multiple) {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t\t} else {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t},\n\t\t\tuseCallback,\n\t\t\tuseContext,\n\t\t\tuseDebugValue,\n\t\t\tuseDeferredValue,\n\t\t\tuseEffect,\n\t\t\tuseId,\n\t\t\tuseImperativeHandle,\n\t\t\tuseInsertionEffect,\n\t\t\tuseLayoutEffect,\n\t\t\tuseMemo,\n\t\t\t// useMutableSource, // experimental-only and replaced by uSES, likely not worth supporting\n\t\t\tuseReducer,\n\t\t\tuseRef,\n\t\t\tuseState,\n\t\t\tuseSyncExternalStore,\n\t\t\tuseTransition\n\t\t}\n\t}\n};\n","import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment,\n\toptions\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport {\n\tuseInsertionEffect,\n\tstartTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tuseTransition\n} from './hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '18.3.1'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Check if the passed element is a Fragment node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isFragment(element) {\n\treturn isValidElement(element) && element.type === Fragment;\n}\n\n/**\n * Check if the passed element is a Memo node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isMemo(element) {\n\treturn (\n\t\t!!element &&\n\t\ttypeof element.displayName == 'string' &&\n\t\telement.displayName.indexOf('Memo(') == 0\n\t);\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => {\n\tconst prevDebounce = options.debounceRendering;\n\toptions.debounceRendering = cb => cb();\n\tconst res = callback(arg);\n\toptions.debounceRendering = prevDebounce;\n\treturn res;\n};\n\n// compat to react-is\nexport const isElement = isValidElement;\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tuseInsertionEffect,\n\tstartTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tuseTransition,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tFragment as StrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisElement,\n\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode: Fragment,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n"],"names":["assign","obj","props","i","shallowDiffers","a","b","useSyncExternalStore","subscribe","getSnapshot","value","_useState","useState","_instance","__","_getSnapshot","forceUpdate","useLayoutEffect","didSnapshotChange","useEffect","inst","x","y","error","startTransition","cb","useDeferredValue","val","useTransition","useInsertionEffect","PureComponent","p","c","this","context","memo","comparer","shouldUpdate","nextProps","ref","current","Memoed","shouldComponentUpdate","createElement","displayName","name","__f","prototype","isReactComponent","type","Component","isPureReactComponent","state","oldDiffHook","options","__b","vnode","REACT_FORWARD_SYMBOL","Symbol","for","forwardRef","fn","Forwarded","clone","$$typeof","render","mapFn","children","toChildArray","map","Children","forEach","count","length","only","normalized","toArray","oldCatchError","__e","newVNode","oldVNode","errorInfo","then","component","__c","__k","oldUnmount","unmount","detachedClone","detachedParent","parentDom","__H","effect","__P","child","removeOriginal","originalParent","__v","appendChild","Suspense","__u","_suspenders","suspended","__a","lazy","loader","prom","resolved","Lazy","exports","default","e","SuspenseList","_next","_map","__z","__R","promise","suspendingVNode","suspendingComponent","push","resolve","onResolved","onSuspensionComplete","originalParentDom","suspendedVNode","__O","setState","pop","componentWillUnmount","document","detachedComponent","fallback","Fragment","list","node","delete","revealOrder","size","ContextProvider","getChildContext","Portal","_this","container","_container","_temp","root","__m","nodeType","parentNode","childNodes","contains","namespaceURI","insertBefore","before","removeChild","splice","indexOf","createPortal","el","containerInfo","delegated","get","unsuspend","wrappedUnsuspend","Map","reverse","set","componentDidUpdate","componentDidMount","REACT_ELEMENT_TYPE","CAMEL_PROPS","ON_ANI","CAMEL_REPLACE","IS_DOM","onChangeInputType","test","parent","callback","textContent","preactRender","hydrate","preactHydrate","key","Object","defineProperty","configurable","v","writable","oldEventHook","event","persist","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","nativeEvent","currentComponent","classNameDescriptorNonEnumberable","class","oldVNodeHook","normalizedProps","isNonDashedType","lowerCased","toLowerCase","replace","undefined","multiple","Array","isArray","selected","defaultValue","className","handleDomVNode","oldBeforeRender","__r","oldDiffed","diffed","dom","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","readContext","__n","useCallback","useContext","useDebugValue","useId","useImperativeHandle","useMemo","useReducer","useRef","createFactory","bind","isValidElement","element","isFragment","isMemo","cloneElement","preactCloneElement","apply","arguments","unmountComponentAtNode","findDOMNode","base","unstable_batchedUpdates","arg","flushSync","prevDebounce","debounceRendering","res","isElement","version","createContext","createRef","StrictMode"],"mappings":"kDAOgB,SAAAA,EAAOC,EAAKC,GAC3B,IAAK,IAAIC,KAAKD,EAAOD,EAAIE,GAAKD,EAAMC,GACpC,OAA6BF,CAC9B,CAQO,SAASG,EAAeC,EAAGC,GACjC,IAAK,IAAIH,KAAKE,EAAG,GAAU,aAANF,KAAsBA,KAAKG,GAAI,OAAW,EAC/D,IAAK,IAAIH,KAAKG,EAAG,GAAU,aAANH,GAAoBE,EAAEF,KAAOG,EAAEH,GAAI,OAAW,EACnE,OAAO,CACR,CCdO,SAASI,EAAqBC,EAAWC,GAC/C,IAAMC,EAAQD,IAMdE,EAAqCC,EAAAA,SAAS,CAC7CC,EAAW,CAAEC,GAAQJ,EAAOK,EAAcN,KADlCI,EAASF,EAAA,GAATE,EAAaG,EAAWL,EAIjCM,GAqBA,OArBAA,EAAAA,gBAAgB,WACfJ,EAASC,GAAUJ,EACnBG,EAAUE,EAAeN,EAErBS,EAAkBL,IACrBG,EAAY,CAAEH,EAAAA,GAEhB,EAAG,CAACL,EAAWE,EAAOD,IAEtBU,EAASA,UAAC,WAKT,OAJID,EAAkBL,IACrBG,EAAY,CAAEH,EAAAA,IAGRL,EAAU,WACZU,EAAkBL,IACrBG,EAAY,CAAE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AAAA,EACAiB,UAAAA,EACAf,WAAAA,EACAC,OAAAA,EACAM,YAAAA,EACAhM,UAAAA,EAAAA,UACApB,cAAAA,EACAK,KAAAA,EACAyB,WAAAA,EACA0L,UAAAA,EACAF,wBAAAA,EACAU,WAAYzH,EAAQA,SACpBlC,SAAAA,EACAa,aAAAA,EACAR,KAAAA,EACAmH,mDAAAA,+tCA9Le"}
node_modules/preact/compat/dist/compat.mjs ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as c,cloneElement as f}from"preact";export{Component,Fragment,Fragment as StrictMode,createContext,createElement,createRef}from"preact";import{useState as a,useLayoutEffect as s,useEffect as h,useCallback as v,useContext as d,useDebugValue as m,useId as p,useImperativeHandle as y,useMemo as _,useReducer as b,useRef as S}from"preact/hooks";export*from"preact/hooks";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){var e=t(),r=a({t:{__:e,u:t}}),u=r[0].t,o=r[1];return s(function(){u.__=e,u.u=t,R(u)&&o({t:u})},[n,e,t]),h(function(){return R(u)&&o({t:u}),n(function(){R(u)&&o({t:u})})},[n]),e}function R(n){try{return!((t=n.__)===(e=n.u())&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}var t,e}function x(n){n()}function w(n){return n}function k(){return[!1,x]}var I=s;function M(n,t){this.props=n,this.context=t}function N(n,e){function r(n){var t=this.props.ref;return t!=n.ref&&t&&("function"==typeof t?t(null):t.current=null),e?!e(this.props,n)||t!=n.ref:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.__f=u.prototype.isReactComponent=!0,u.type=n,u}(M.prototype=new n).isPureReactComponent=!0,M.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var T=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),T&&T(n)};var A="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function D(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=A,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var F=function(n,t){return null==n?null:r(r(n).map(t))},L={map:F,forEach:F,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw"Children.only";return t[0]},toArray:r},O=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);O(n,t,e,r)};var U=e.unmount;function V(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return V(n,t,e)})),n}function W(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return W(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function P(){this.__u=0,this.o=null,this.__b=null}function j(n){var t=n.__&&n.__.__c;return t&&t.__a&&t.__a(n)}function z(n){var e,r,u,o=null;function i(i){if(e||(e=n()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?t(o,i):null}return i.displayName="Lazy",i.__f=!0,i}function B(){this.i=null,this.l=null}e.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),U&&U(n)},(P.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=j(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(c):c())};e.__R=i;var l=e.__P;e.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=W(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=l,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var H=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function Z(n){return this.getChildContext=function(){return n.context},n.children}function Y(n){var e=this,r=n.h;if(e.componentWillUnmount=function(){o(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.h.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}}o(t(Z,{context:e.context},n.__v),e.v)}function $(n,e){var r=t(Y,{__v:n,h:e});return r.containerInfo=e,r}(B.prototype=new n).__a=function(n){var t=this,e=j(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),H(t,n,r)):u()};e?e(o):o()}},B.prototype.render=function(n){this.i=null,this.l=new Map;var t=r(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){H(n,e,t)})};var q="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,G=/^(?: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]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q="undefined"!=typeof document,X=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function nn(n,t,e){return null==t.__k&&(t.textContent=""),o(n,t),"function"==typeof e&&e(),n?n.__c:null}function tn(n,t,e){return i(n,t),"function"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var en=e.event;e.event=function(n){return en&&(n=en(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var rn,un={configurable:!0,get:function(){return this.class}},on=e.vnode;e.vnode=function(n){"string"==typeof n.type&&function(n){var t=n.props,e=n.type,u={},o=-1==e.indexOf("-");for(var i in t){var l=t[i];if(!("value"===i&&"defaultValue"in t&&null==l||Q&&"children"===i&&"noscript"===e||"class"===i||"className"===i)){var c=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===l?l="":"translate"===c&&"no"===l?l=!1:"o"===c[0]&&"n"===c[1]?"ondoubleclick"===c?i="ondblclick":"onchange"!==c||"input"!==e&&"textarea"!==e||X(t.type)?"onfocus"===c?i="onfocusin":"onblur"===c?i="onfocusout":J.test(i)&&(i=c):c=i="oninput":o&&G.test(i)?i=i.replace(K,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===c&&u[i=c]&&(i="oninputCapture"),u[i]=l}}"select"==e&&(u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value}))),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,"className",un)):t.className&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=q,on&&on(n)};var ln=e.__r;e.__r=function(n){ln&&ln(n),rn=n.__c};var cn=e.diffed;e.diffed=function(n){cn&&cn(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value),rn=null};var fn={ReactCurrentDispatcher:{current:{readContext:function(n){return rn.__n[n.__c].props.value},useCallback:v,useContext:d,useDebugValue:m,useDeferredValue:w,useEffect:h,useId:p,useImperativeHandle:y,useInsertionEffect:I,useLayoutEffect:s,useMemo:_,useReducer:b,useRef:S,useState:a,useSyncExternalStore:C,useTransition:k}}},an="18.3.1";function sn(n){return t.bind(null,n)}function hn(n){return!!n&&n.$$typeof===q}function vn(n){return hn(n)&&n.type===u}function dn(n){return!!n&&"string"==typeof n.displayName&&0==n.displayName.indexOf("Memo(")}function mn(n){return hn(n)?f.apply(null,arguments):n}function pn(n){return!!n.__k&&(o(null,n),!0)}function yn(n){return n&&(n.base||1===n.nodeType&&n)||null}var _n=function(n,t){return n(t)},bn=function(n,t){var r=e.debounceRendering;e.debounceRendering=function(n){return n()};var u=n(t);return e.debounceRendering=r,u},Sn=hn,gn={useState:a,useId:p,useReducer:b,useEffect:h,useLayoutEffect:s,useInsertionEffect:I,useTransition:k,useDeferredValue:w,useSyncExternalStore:C,startTransition:x,useRef:S,useImperativeHandle:y,useMemo:_,useCallback:v,useContext:d,useDebugValue:m,version:"18.3.1",Children:L,render:nn,hydrate:tn,unmountComponentAtNode:pn,createPortal:$,createElement:t,createContext:l,createFactory:sn,cloneElement:mn,createRef:c,Fragment:u,isValidElement:hn,isElement:Sn,isFragment:vn,isMemo:dn,findDOMNode:yn,Component:n,PureComponent:M,memo:N,forwardRef:D,flushSync:bn,unstable_batchedUpdates:_n,StrictMode:u,Suspense:P,SuspenseList:B,lazy:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:fn};export{L as Children,M as PureComponent,P as Suspense,B as SuspenseList,fn as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mn as cloneElement,sn as createFactory,$ as createPortal,gn as default,yn as findDOMNode,bn as flushSync,D as forwardRef,tn as hydrate,Sn as isElement,vn as isFragment,dn as isMemo,hn as isValidElement,z as lazy,N as memo,nn as render,x as startTransition,pn as unmountComponentAtNode,_n as unstable_batchedUpdates,w as useDeferredValue,I as useInsertionEffect,C as useSyncExternalStore,k as useTransition,an as version};
2
+ //# sourceMappingURL=compat.module.js.map
node_modules/preact/compat/dist/compat.module.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as c,cloneElement as f}from"preact";export{Component,Fragment,Fragment as StrictMode,createContext,createElement,createRef}from"preact";import{useState as a,useLayoutEffect as s,useEffect as h,useCallback as v,useContext as d,useDebugValue as m,useId as p,useImperativeHandle as y,useMemo as _,useReducer as b,useRef as S}from"preact/hooks";export*from"preact/hooks";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){var e=t(),r=a({t:{__:e,u:t}}),u=r[0].t,o=r[1];return s(function(){u.__=e,u.u=t,R(u)&&o({t:u})},[n,e,t]),h(function(){return R(u)&&o({t:u}),n(function(){R(u)&&o({t:u})})},[n]),e}function R(n){try{return!((t=n.__)===(e=n.u())&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}var t,e}function x(n){n()}function w(n){return n}function k(){return[!1,x]}var I=s;function M(n,t){this.props=n,this.context=t}function N(n,e){function r(n){var t=this.props.ref;return t!=n.ref&&t&&("function"==typeof t?t(null):t.current=null),e?!e(this.props,n)||t!=n.ref:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.__f=u.prototype.isReactComponent=!0,u.type=n,u}(M.prototype=new n).isPureReactComponent=!0,M.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var T=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),T&&T(n)};var A="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function D(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=A,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var F=function(n,t){return null==n?null:r(r(n).map(t))},L={map:F,forEach:F,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw"Children.only";return t[0]},toArray:r},O=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);O(n,t,e,r)};var U=e.unmount;function V(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return V(n,t,e)})),n}function W(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return W(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function P(){this.__u=0,this.o=null,this.__b=null}function j(n){var t=n.__&&n.__.__c;return t&&t.__a&&t.__a(n)}function z(n){var e,r,u,o=null;function i(i){if(e||(e=n()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?t(o,i):null}return i.displayName="Lazy",i.__f=!0,i}function B(){this.i=null,this.l=null}e.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),U&&U(n)},(P.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=j(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(c):c())};e.__R=i;var l=e.__P;e.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=W(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=l,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var H=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function Z(n){return this.getChildContext=function(){return n.context},n.children}function Y(n){var e=this,r=n.h;if(e.componentWillUnmount=function(){o(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.h.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}}o(t(Z,{context:e.context},n.__v),e.v)}function $(n,e){var r=t(Y,{__v:n,h:e});return r.containerInfo=e,r}(B.prototype=new n).__a=function(n){var t=this,e=j(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),H(t,n,r)):u()};e?e(o):o()}},B.prototype.render=function(n){this.i=null,this.l=new Map;var t=r(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){H(n,e,t)})};var q="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,G=/^(?: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]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q="undefined"!=typeof document,X=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function nn(n,t,e){return null==t.__k&&(t.textContent=""),o(n,t),"function"==typeof e&&e(),n?n.__c:null}function tn(n,t,e){return i(n,t),"function"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var en=e.event;e.event=function(n){return en&&(n=en(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var rn,un={configurable:!0,get:function(){return this.class}},on=e.vnode;e.vnode=function(n){"string"==typeof n.type&&function(n){var t=n.props,e=n.type,u={},o=-1==e.indexOf("-");for(var i in t){var l=t[i];if(!("value"===i&&"defaultValue"in t&&null==l||Q&&"children"===i&&"noscript"===e||"class"===i||"className"===i)){var c=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===l?l="":"translate"===c&&"no"===l?l=!1:"o"===c[0]&&"n"===c[1]?"ondoubleclick"===c?i="ondblclick":"onchange"!==c||"input"!==e&&"textarea"!==e||X(t.type)?"onfocus"===c?i="onfocusin":"onblur"===c?i="onfocusout":J.test(i)&&(i=c):c=i="oninput":o&&G.test(i)?i=i.replace(K,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===c&&u[i=c]&&(i="oninputCapture"),u[i]=l}}"select"==e&&(u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value}))),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,"className",un)):t.className&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=q,on&&on(n)};var ln=e.__r;e.__r=function(n){ln&&ln(n),rn=n.__c};var cn=e.diffed;e.diffed=function(n){cn&&cn(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value),rn=null};var fn={ReactCurrentDispatcher:{current:{readContext:function(n){return rn.__n[n.__c].props.value},useCallback:v,useContext:d,useDebugValue:m,useDeferredValue:w,useEffect:h,useId:p,useImperativeHandle:y,useInsertionEffect:I,useLayoutEffect:s,useMemo:_,useReducer:b,useRef:S,useState:a,useSyncExternalStore:C,useTransition:k}}},an="18.3.1";function sn(n){return t.bind(null,n)}function hn(n){return!!n&&n.$$typeof===q}function vn(n){return hn(n)&&n.type===u}function dn(n){return!!n&&"string"==typeof n.displayName&&0==n.displayName.indexOf("Memo(")}function mn(n){return hn(n)?f.apply(null,arguments):n}function pn(n){return!!n.__k&&(o(null,n),!0)}function yn(n){return n&&(n.base||1===n.nodeType&&n)||null}var _n=function(n,t){return n(t)},bn=function(n,t){var r=e.debounceRendering;e.debounceRendering=function(n){return n()};var u=n(t);return e.debounceRendering=r,u},Sn=hn,gn={useState:a,useId:p,useReducer:b,useEffect:h,useLayoutEffect:s,useInsertionEffect:I,useTransition:k,useDeferredValue:w,useSyncExternalStore:C,startTransition:x,useRef:S,useImperativeHandle:y,useMemo:_,useCallback:v,useContext:d,useDebugValue:m,version:"18.3.1",Children:L,render:nn,hydrate:tn,unmountComponentAtNode:pn,createPortal:$,createElement:t,createContext:l,createFactory:sn,cloneElement:mn,createRef:c,Fragment:u,isValidElement:hn,isElement:Sn,isFragment:vn,isMemo:dn,findDOMNode:yn,Component:n,PureComponent:M,memo:N,forwardRef:D,flushSync:bn,unstable_batchedUpdates:_n,StrictMode:u,Suspense:P,SuspenseList:B,lazy:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:fn};export{L as Children,M as PureComponent,P as Suspense,B as SuspenseList,fn as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mn as cloneElement,sn as createFactory,$ as createPortal,gn as default,yn as findDOMNode,bn as flushSync,D as forwardRef,tn as hydrate,Sn as isElement,vn as isFragment,dn as isMemo,hn as isValidElement,z as lazy,N as memo,nn as render,x as startTransition,pn as unmountComponentAtNode,_n as unstable_batchedUpdates,w as useDeferredValue,I as useInsertionEffect,C as useSyncExternalStore,k as useTransition,an as version};
2
+ //# sourceMappingURL=compat.module.js.map
node_modules/preact/compat/dist/compat.module.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"compat.module.js","sources":["../src/util.js","../src/hooks.js","../src/PureComponent.js","../src/memo.js","../src/forwardRef.js","../src/Children.js","../src/suspense.js","../src/suspense-list.js","../../src/constants.js","../src/portals.js","../src/render.js","../src/index.js"],"sourcesContent":["/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n\n/**\n * Check if two values are the same value\n * @param {*} x\n * @param {*} y\n * @returns {boolean}\n */\nexport function is(x, y) {\n\treturn (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\n","import { useState, useLayoutEffect, useEffect } from 'preact/hooks';\nimport { is } from './util';\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n * @typedef {{ _value: any; _getSnapshot: () => any }} Store\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\t/**\n\t * @typedef {{ _instance: Store }} StoreRef\n\t * @type {[StoreRef, (store: StoreRef) => void]}\n\t */\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (didSnapshotChange(_instance)) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\n/** @type {(inst: Store) => boolean} */\nfunction didSnapshotChange(inst) {\n\ttry {\n\t\treturn !is(inst._value, inst._getSnapshot());\n\t} catch (error) {\n\t\treturn true;\n\t}\n}\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p, c) {\n\tthis.props = p;\n\tthis.context = c;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function (props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { createElement } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Memoize a component, so that it only updates when the props actually have\n * changed. This was previously known as `React.pure`.\n * @param {import('./internal').FunctionComponent} c functional component\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\n * @returns {import('./internal').FunctionComponent}\n */\nexport function memo(c, comparer) {\n\tfunction shouldUpdate(nextProps) {\n\t\tlet ref = this.props.ref;\n\t\tif (ref != nextProps.ref && ref) {\n\t\t\ttypeof ref == 'function' ? ref(null) : (ref.current = null);\n\t\t}\n\n\t\treturn comparer\n\t\t\t? !comparer(this.props, nextProps) || ref != nextProps.ref\n\t\t\t: shallowDiffers(this.props, nextProps);\n\t}\n\n\tfunction Memoed(props) {\n\t\tthis.shouldComponentUpdate = shouldUpdate;\n\t\treturn createElement(c, props);\n\t}\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\n\tMemoed._forwarded = Memoed.prototype.isReactComponent = true;\n\tMemoed.type = c;\n\treturn Memoed;\n}\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = fn;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { toChildArray } from 'preact';\n\nconst mapFn = (children, fn) => {\n\tif (children == null) return null;\n\treturn toChildArray(toChildArray(children).map(fn));\n};\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nexport const Children = {\n\tmap: mapFn,\n\tforEach: mapFn,\n\tcount(children) {\n\t\treturn children ? toChildArray(children).length : 0;\n\t},\n\tonly(children) {\n\t\tconst normalized = toChildArray(children);\n\t\tif (normalized.length !== 1) throw 'Children.only';\n\t\treturn normalized[0];\n\t},\n\ttoArray: toChildArray\n};\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { MODE_HYDRATE } from '../../src/constants';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function (vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component) component._unmounted = true;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._flags & MODE_HYDRATE) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\n\t\t\tvnode._component._force = true;\n\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode && originalParent) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.appendChild(vnode._dom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode<any, any>} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function (promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved || c._unmounted) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\t// Store and null _parentDom to prevent setState/forceUpdate from\n\t// scheduling renders while suspended. Render would be a no-op anyway\n\t// since renderComponent checks _parentDom, but this avoids queue churn.\n\tconst originalParentDom = suspendingComponent._parentDom;\n\tsuspendingComponent._parentDom = null;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\t// Restore _parentDom before forceUpdate so render can proceed\n\t\t\t\tsuspended._parentDom = originalParentDom;\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tif (\n\t\t!c._pendingSuspensionCount++ &&\n\t\t!(suspendingVNode._flags & MODE_HYDRATE)\n\t) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function () {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function (props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._flags &= ~MODE_HYDRATE;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\tlet component = vnode._parent && vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component = null;\n\tlet error;\n\tlet resolved;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tif (exports) {\n\t\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t\t}\n\t\t\t\t\tresolved = true;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t\tresolved = true;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!resolved) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn component ? createElement(component, props) : null;\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function (child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function (props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate =\n\tSuspenseList.prototype.componentDidMount = function () {\n\t\t// Iterate through all children after mounting for two reasons:\n\t\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t\t// The nodes can now be completely consumed from the linked list.\n\t\t// 2. Handle nodes that might have gotten resolved between render and\n\t\t// componentDidMount.\n\t\tthis._map.forEach((node, child) => {\n\t\t\tresolve(this, child, node);\n\t\t});\n\t};\n","/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { createElement, render } from 'preact';\n\n/**\n * @param {import('../../src/index').RenderableProps<{ context: any }>} props\n */\nfunction ContextProvider(props) {\n\tthis.getChildContext = () => props.context;\n\treturn props.children;\n}\n\n/**\n * Portal component\n * @this {import('./internal').Component}\n * @param {object | null | undefined} props\n *\n * TODO: use createRoot() instead of fake root\n */\nfunction Portal(props) {\n\tconst _this = this;\n\tlet container = props._container;\n\n\t_this.componentWillUnmount = function () {\n\t\trender(null, _this._temp);\n\t\t_this._temp = null;\n\t\t_this._container = null;\n\t};\n\n\t// When we change container we should clear our old container and\n\t// indicate a new mount.\n\tif (_this._container && _this._container !== container) {\n\t\t_this.componentWillUnmount();\n\t}\n\n\tif (!_this._temp) {\n\t\t// Ensure the element has a mask for useId invocations\n\t\tlet root = _this._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\t_this._container = container;\n\n\t\t// Create a fake DOM parent node that manages a subset of `container`'s children:\n\t\t_this._temp = {\n\t\t\tnodeType: 1,\n\t\t\tparentNode: container,\n\t\t\tchildNodes: [],\n\t\t\t_children: { _mask: root._mask },\n\t\t\tcontains: () => true,\n\t\t\tnamespaceURI: container.namespaceURI,\n\t\t\tinsertBefore(child, before) {\n\t\t\t\tthis.childNodes.push(child);\n\t\t\t\t_this._container.insertBefore(child, before);\n\t\t\t},\n\t\t\tremoveChild(child) {\n\t\t\t\tthis.childNodes.splice(this.childNodes.indexOf(child) >>> 1, 1);\n\t\t\t\t_this._container.removeChild(child);\n\t\t\t}\n\t\t};\n\t}\n\n\t// Render our wrapping element into temp.\n\trender(\n\t\tcreateElement(ContextProvider, { context: _this.context }, props._vnode),\n\t\t_this._temp\n\t);\n}\n\n/**\n * Create a `Portal` to continue rendering the vnode tree at a different DOM node\n * @param {import('./internal').VNode} vnode The vnode to render\n * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.\n */\nexport function createPortal(vnode, container) {\n\tconst el = createElement(Portal, { _vnode: vnode, _container: container });\n\tel.containerInfo = container;\n\treturn el;\n}\n","import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\nimport {\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tuseEffect,\n\tuseId,\n\tuseImperativeHandle,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseReducer,\n\tuseRef,\n\tuseState\n} from 'preact/hooks';\nimport {\n\tuseDeferredValue,\n\tuseInsertionEffect,\n\tuseSyncExternalStore,\n\tuseTransition\n} from './index';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS =\n\t/^(?: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]/;\nconst ON_ANI = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;\nconst CAMEL_REPLACE = /[A-Z0-9]/g;\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/\n\t\t: /fil|che|ra/\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = true;\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\n\t\t}\n\t});\n});\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\n\te.persist = () => {};\n\te.isPropagationStopped = function isPropagationStopped() {\n\t\treturn this.cancelBubble;\n\t};\n\te.isDefaultPrevented = function isDefaultPrevented() {\n\t\treturn this.defaultPrevented;\n\t};\n\treturn (e.nativeEvent = e);\n};\n\nconst classNameDescriptorNonEnumberable = {\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nfunction handleDomVNode(vnode) {\n\tlet props = vnode.props,\n\t\ttype = vnode.type,\n\t\tnormalizedProps = {},\n\t\tisNonDashedType = type.indexOf('-') == -1;\n\n\tfor (let i in props) {\n\t\tlet value = props[i];\n\n\t\tif (\n\t\t\t(i === 'value' && 'defaultValue' in props && value == null) ||\n\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t(IS_DOM && i === 'children' && type === 'noscript') ||\n\t\t\ti === 'class' ||\n\t\t\ti === 'className'\n\t\t) {\n\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t// a default value\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet lowerCased = i.toLowerCase();\n\t\tif (i === 'defaultValue' && 'value' in props && props.value == null) {\n\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\ti = 'value';\n\t\t} else if (i === 'download' && value === true) {\n\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t// value will be used as the file name and the file will be called\n\t\t\t// \"true\" upon downloading it.\n\t\t\tvalue = '';\n\t\t} else if (lowerCased === 'translate' && value === 'no') {\n\t\t\tvalue = false;\n\t\t} else if (lowerCased[0] === 'o' && lowerCased[1] === 'n') {\n\t\t\tif (lowerCased === 'ondoubleclick') {\n\t\t\t\ti = 'ondblclick';\n\t\t\t} else if (\n\t\t\t\tlowerCased === 'onchange' &&\n\t\t\t\t(type === 'input' || type === 'textarea') &&\n\t\t\t\t!onChangeInputType(props.type)\n\t\t\t) {\n\t\t\t\tlowerCased = i = 'oninput';\n\t\t\t} else if (lowerCased === 'onfocus') {\n\t\t\t\ti = 'onfocusin';\n\t\t\t} else if (lowerCased === 'onblur') {\n\t\t\t\ti = 'onfocusout';\n\t\t\t} else if (ON_ANI.test(i)) {\n\t\t\t\ti = lowerCased;\n\t\t\t}\n\t\t} else if (isNonDashedType && CAMEL_PROPS.test(i)) {\n\t\t\ti = i.replace(CAMEL_REPLACE, '-$&').toLowerCase();\n\t\t} else if (value === null) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\t// Add support for onInput and onChange, see #3561\n\t\t// if we have an oninput prop already change it to oninputCapture\n\t\tif (lowerCased === 'oninput') {\n\t\t\ti = lowerCased;\n\t\t\tif (normalizedProps[i]) {\n\t\t\t\ti = 'oninputCapture';\n\t\t\t}\n\t\t}\n\n\t\tnormalizedProps[i] = value;\n\t}\n\n\tif (type == 'select') {\n\t\t// Add support for array select values: <select multiple value={[]} />\n\t\tif (normalizedProps.multiple && Array.isArray(normalizedProps.value)) {\n\t\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t\t});\n\t\t}\n\n\t\t// Adding support for defaultValue in select tag\n\t\tif (normalizedProps.defaultValue != null) {\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tif (normalizedProps.multiple) {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t\t} else {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t},\n\t\t\tuseCallback,\n\t\t\tuseContext,\n\t\t\tuseDebugValue,\n\t\t\tuseDeferredValue,\n\t\t\tuseEffect,\n\t\t\tuseId,\n\t\t\tuseImperativeHandle,\n\t\t\tuseInsertionEffect,\n\t\t\tuseLayoutEffect,\n\t\t\tuseMemo,\n\t\t\t// useMutableSource, // experimental-only and replaced by uSES, likely not worth supporting\n\t\t\tuseReducer,\n\t\t\tuseRef,\n\t\t\tuseState,\n\t\t\tuseSyncExternalStore,\n\t\t\tuseTransition\n\t\t}\n\t}\n};\n","import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment,\n\toptions\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport {\n\tuseInsertionEffect,\n\tstartTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tuseTransition\n} from './hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '18.3.1'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Check if the passed element is a Fragment node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isFragment(element) {\n\treturn isValidElement(element) && element.type === Fragment;\n}\n\n/**\n * Check if the passed element is a Memo node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isMemo(element) {\n\treturn (\n\t\t!!element &&\n\t\ttypeof element.displayName == 'string' &&\n\t\telement.displayName.indexOf('Memo(') == 0\n\t);\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => {\n\tconst prevDebounce = options.debounceRendering;\n\toptions.debounceRendering = cb => cb();\n\tconst res = callback(arg);\n\toptions.debounceRendering = prevDebounce;\n\treturn res;\n};\n\n// compat to react-is\nexport const isElement = isValidElement;\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tuseInsertionEffect,\n\tstartTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tuseTransition,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tFragment as StrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisElement,\n\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode: Fragment,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n"],"names":["assign","obj","props","i","shallowDiffers","a","b","useSyncExternalStore","subscribe","getSnapshot","value","_useState","useState","_instance","__","_getSnapshot","forceUpdate","useLayoutEffect","didSnapshotChange","useEffect","inst","x","y","error","startTransition","cb","useDeferredValue","val","useTransition","useInsertionEffect","PureComponent","p","c","this","context","memo","comparer","shouldUpdate","nextProps","ref","current","Memoed","shouldComponentUpdate","createElement","displayName","name","__f","prototype","isReactComponent","type","Component","isPureReactComponent","state","oldDiffHook","options","__b","vnode","REACT_FORWARD_SYMBOL","Symbol","for","forwardRef","fn","Forwarded","clone","$$typeof","render","mapFn","children","toChildArray","map","Children","forEach","count","length","only","normalized","toArray","oldCatchError","__e","newVNode","oldVNode","errorInfo","then","component","__c","__k","oldUnmount","unmount","detachedClone","detachedParent","parentDom","__H","effect","__P","child","removeOriginal","originalParent","__v","appendChild","Suspense","__u","_suspenders","suspended","__a","lazy","loader","prom","resolved","Lazy","exports","default","e","SuspenseList","_next","_map","__z","__R","promise","suspendingVNode","suspendingComponent","push","resolve","onResolved","onSuspensionComplete","originalParentDom","suspendedVNode","__O","setState","pop","componentWillUnmount","document","detachedComponent","fallback","Fragment","list","node","delete","revealOrder","size","ContextProvider","getChildContext","Portal","_this","container","_container","_temp","root","__m","nodeType","parentNode","childNodes","contains","namespaceURI","insertBefore","before","removeChild","splice","indexOf","createPortal","el","containerInfo","delegated","get","unsuspend","wrappedUnsuspend","Map","reverse","set","componentDidUpdate","componentDidMount","REACT_ELEMENT_TYPE","CAMEL_PROPS","ON_ANI","CAMEL_REPLACE","IS_DOM","onChangeInputType","test","parent","callback","textContent","preactRender","hydrate","preactHydrate","key","Object","defineProperty","configurable","v","writable","oldEventHook","event","persist","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","nativeEvent","currentComponent","classNameDescriptorNonEnumberable","class","oldVNodeHook","normalizedProps","isNonDashedType","lowerCased","toLowerCase","replace","undefined","multiple","Array","isArray","selected","defaultValue","className","handleDomVNode","oldBeforeRender","__r","oldDiffed","diffed","dom","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","readContext","__n","useCallback","useContext","useDebugValue","useId","useImperativeHandle","useMemo","useReducer","useRef","version","createFactory","bind","isValidElement","element","isFragment","isMemo","cloneElement","preactCloneElement","apply","arguments","unmountComponentAtNode","findDOMNode","base","unstable_batchedUpdates","arg","flushSync","prevDebounce","debounceRendering","res","isElement","createContext","createRef","StrictMode"],"mappings":"2fAOgB,SAAAA,EAAOC,EAAKC,GAC3B,IAAK,IAAIC,KAAKD,EAAOD,EAAIE,GAAKD,EAAMC,GACpC,OAA6BF,CAC9B,CAQO,SAASG,E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A,EACAC,cAAAA,EACAM,QAnKe,SAoKfjK,SAAAA,EACAL,OAAAA,GACAoH,QAAAA,GACA6D,uBAAAA,GACApF,aAAAA,EACAnH,cAAAA,EACAiN,cAAAA,EACApB,cAAAA,GACAM,aAAAA,GACAe,UAAAA,EACAxH,SAAAA,EACAqG,eAAAA,GACAiB,UAAAA,GACAf,WAAAA,GACAC,OAAAA,GACAM,YAAAA,GACAjM,UAAAA,EACApB,cAAAA,EACAK,KAAAA,EACAyB,WAAAA,EACA2L,UAAAA,GACAF,wBAAAA,GACAS,WAAYzH,EACZlC,SAAAA,EACAa,aAAAA,EACAR,KAAAA,EACAmH,mDAAAA"}
node_modules/preact/compat/dist/compat.umd.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact"),require("preact/hooks")):"function"==typeof define&&define.amd?define(["exports","preact","preact/hooks"],t):t((n||self).preactCompat={},n.preact,n.preactHooks)}(this,function(n,t,e){function r(n,t){for(var e in t)n[e]=t[e];return n}function u(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function o(n,t){var r=t(),u=e.useState({t:{__:r,u:t}}),o=u[0].t,c=u[1];return e.useLayoutEffect(function(){o.__=r,o.u=t,i(o)&&c({t:o})},[n,r,t]),e.useEffect(function(){return i(o)&&c({t:o}),n(function(){i(o)&&c({t:o})})},[n]),r}function i(n){try{return!((t=n.__)===(e=n.u())&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}var t,e}function c(n){n()}function f(n){return n}function l(){return[!1,c]}var a=e.useLayoutEffect;function s(n,t){this.props=n,this.context=t}function h(n,e){function r(n){var t=this.props.ref;return t!=n.ref&&t&&("function"==typeof t?t(null):t.current=null),e?!e(this.props,n)||t!=n.ref:u(this.props,n)}function o(e){return this.shouldComponentUpdate=r,t.createElement(n,e)}return o.displayName="Memo("+(n.displayName||n.name)+")",o.__f=o.prototype.isReactComponent=!0,o.type=n,o}(s.prototype=new t.Component).isPureReactComponent=!0,s.prototype.shouldComponentUpdate=function(n,t){return u(this.props,n)||u(this.state,t)};var d=t.options.__b;t.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),d&&d(n)};var v="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function p(n){function t(t){var e=r({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=v,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var m=function(n,e){return null==n?null:t.toChildArray(t.toChildArray(n).map(e))},b={map:m,forEach:m,count:function(n){return n?t.toChildArray(n).length:0},only:function(n){var e=t.toChildArray(n);if(1!==e.length)throw"Children.only";return e[0]},toArray:t.toChildArray},y=t.options.__e;t.options.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);y(n,t,e,r)};var _=t.options.unmount;function g(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=r({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return g(n,t,e)})),n}function S(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return S(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function E(){this.__u=0,this.o=null,this.__b=null}function C(n){var t=n.__&&n.__.__c;return t&&t.__a&&t.__a(n)}function O(n){var e,r,u,o=null;function i(i){if(e||(e=n()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?t.createElement(o,i):null}return i.displayName="Lazy",i.__f=!0,i}function R(){this.i=null,this.l=null}t.options.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),_&&_(n)},(E.prototype=new t.Component).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=C(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(f):f())};e.__R=i;var c=e.__P;e.__P=null;var f=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=S(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=c,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},E.prototype.componentWillUnmount=function(){this.o=[]},E.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),u=this.__v.__k[0].__c;this.__v.__k[0]=g(this.__b,r,u.__O=u.__P)}this.__b=null}var o=e.__a&&t.createElement(t.Fragment,null,n.fallback);return o&&(o.__u&=-33),[t.createElement(t.Fragment,null,e.__a?null:n.children),o]};var x=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function w(n){return this.getChildContext=function(){return n.context},n.children}function j(n){var e=this,r=n.h;if(e.componentWillUnmount=function(){t.render(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.h.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}}t.render(t.createElement(w,{context:e.context},n.__v),e.v)}function k(n,e){var r=t.createElement(j,{__v:n,h:e});return r.containerInfo=e,r}(R.prototype=new t.Component).__a=function(n){var t=this,e=C(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),x(t,n,r)):u()};e?e(o):o()}},R.prototype.render=function(n){this.i=null,this.l=new Map;var e=t.toChildArray(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.l.set(e[r],this.i=[1,0,this.i]);return n.children},R.prototype.componentDidUpdate=R.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){x(n,e,t)})};var I="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,T=/^(?: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]/,M=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,N=/[A-Z0-9]/g,A="undefined"!=typeof document,D=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function L(n,e,r){return null==e.__k&&(e.textContent=""),t.render(n,e),"function"==typeof r&&r(),n?n.__c:null}function U(n,e,r){return t.hydrate(n,e),"function"==typeof r&&r(),n?n.__c:null}t.Component.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(t.Component.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var F=t.options.event;t.options.event=function(n){return F&&(n=F(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var V,W={configurable:!0,get:function(){return this.class}},P=t.options.vnode;t.options.vnode=function(n){"string"==typeof n.type&&function(n){var e=n.props,r=n.type,u={},o=-1==r.indexOf("-");for(var i in e){var c=e[i];if(!("value"===i&&"defaultValue"in e&&null==c||A&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var f=i.toLowerCase();"defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===c?c="":"translate"===f&&"no"===c?c=!1:"o"===f[0]&&"n"===f[1]?"ondoubleclick"===f?i="ondblclick":"onchange"!==f||"input"!==r&&"textarea"!==r||D(e.type)?"onfocus"===f?i="onfocusin":"onblur"===f?i="onfocusout":M.test(i)&&(i=f):f=i="oninput":o&&T.test(i)?i=i.replace(N,"-$&").toLowerCase():null===c&&(c=void 0),"oninput"===f&&u[i=f]&&(i="oninputCapture"),u[i]=c}}"select"==r&&(u.multiple&&Array.isArray(u.value)&&(u.value=t.toChildArray(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),null!=u.defaultValue&&(u.value=t.toChildArray(e.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value}))),e.class&&!e.className?(u.class=e.class,Object.defineProperty(u,"className",W)):e.className&&(u.class=u.className=e.className),n.props=u}(n),n.$$typeof=I,P&&P(n)};var z=t.options.__r;t.options.__r=function(n){z&&z(n),V=n.__c};var B=t.options.diffed;t.options.diffed=function(n){B&&B(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value),V=null};var H={ReactCurrentDispatcher:{current:{readContext:function(n){return V.__n[n.__c].props.value},useCallback:e.useCallback,useContext:e.useContext,useDebugValue:e.useDebugValue,useDeferredValue:f,useEffect:e.useEffect,useId:e.useId,useImperativeHandle:e.useImperativeHandle,useInsertionEffect:a,useLayoutEffect:e.useLayoutEffect,useMemo:e.useMemo,useReducer:e.useReducer,useRef:e.useRef,useState:e.useState,useSyncExternalStore:o,useTransition:l}}},q="18.3.1";function Z(n){return t.createElement.bind(null,n)}function Y(n){return!!n&&n.$$typeof===I}function $(n){return Y(n)&&n.type===t.Fragment}function G(n){return!!n&&"string"==typeof n.displayName&&0==n.displayName.indexOf("Memo(")}function J(n){return Y(n)?t.cloneElement.apply(null,arguments):n}function K(n){return!!n.__k&&(t.render(null,n),!0)}function Q(n){return n&&(n.base||1===n.nodeType&&n)||null}var X=function(n,t){return n(t)},nn=function(n,e){var r=t.options.debounceRendering;t.options.debounceRendering=function(n){return n()};var u=n(e);return t.options.debounceRendering=r,u},tn=Y,en={useState:e.useState,useId:e.useId,useReducer:e.useReducer,useEffect:e.useEffect,useLayoutEffect:e.useLayoutEffect,useInsertionEffect:a,useTransition:l,useDeferredValue:f,useSyncExternalStore:o,startTransition:c,useRef:e.useRef,useImperativeHandle:e.useImperativeHandle,useMemo:e.useMemo,useCallback:e.useCallback,useContext:e.useContext,useDebugValue:e.useDebugValue,version:q,Children:b,render:L,hydrate:U,unmountComponentAtNode:K,createPortal:k,createElement:t.createElement,createContext:t.createContext,createFactory:Z,cloneElement:J,createRef:t.createRef,Fragment:t.Fragment,isValidElement:Y,isElement:tn,isFragment:$,isMemo:G,findDOMNode:Q,Component:t.Component,PureComponent:s,memo:h,forwardRef:p,flushSync:nn,unstable_batchedUpdates:X,StrictMode:t.Fragment,Suspense:E,SuspenseList:R,lazy:O,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:H};Object.defineProperty(n,"Component",{enumerable:!0,get:function(){return t.Component}}),Object.defineProperty(n,"Fragment",{enumerable:!0,get:function(){return t.Fragment}}),Object.defineProperty(n,"StrictMode",{enumerable:!0,get:function(){return t.Fragment}}),Object.defineProperty(n,"createContext",{enumerable:!0,get:function(){return t.createContext}}),Object.defineProperty(n,"createElement",{enumerable:!0,get:function(){return t.createElement}}),Object.defineProperty(n,"createRef",{enumerable:!0,get:function(){return t.createRef}}),n.Children=b,n.PureComponent=s,n.Suspense=E,n.SuspenseList=R,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,n.cloneElement=J,n.createFactory=Z,n.createPortal=k,n.default=en,n.findDOMNode=Q,n.flushSync=nn,n.forwardRef=p,n.hydrate=U,n.isElement=tn,n.isFragment=$,n.isMemo=G,n.isValidElement=Y,n.lazy=O,n.memo=h,n.render=L,n.startTransition=c,n.unmountComponentAtNode=K,n.unstable_batchedUpdates=X,n.useDeferredValue=f,n.useInsertionEffect=a,n.useSyncExternalStore=o,n.useTransition=l,n.version=q,Object.keys(e).forEach(function(t){"default"===t||n.hasOwnProperty(t)||Object.defineProperty(n,t,{enumerable:!0,get:function(){return e[t]}})})});
2
+ //# sourceMappingURL=compat.umd.js.map
node_modules/preact/compat/dist/compat.umd.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"compat.umd.js","sources":["../src/util.js","../src/hooks.js","../src/PureComponent.js","../src/memo.js","../src/forwardRef.js","../src/Children.js","../src/suspense.js","../src/suspense-list.js","../../src/constants.js","../src/portals.js","../src/render.js","../src/index.js"],"sourcesContent":["/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n\n/**\n * Check if two values are the same value\n * @param {*} x\n * @param {*} y\n * @returns {boolean}\n */\nexport function is(x, y) {\n\treturn (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\n","import { useState, useLayoutEffect, useEffect } from 'preact/hooks';\nimport { is } from './util';\n\n/**\n * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84\n * on a high level this cuts out the warnings, ... and attempts a smaller implementation\n * @typedef {{ _value: any; _getSnapshot: () => any }} Store\n */\nexport function useSyncExternalStore(subscribe, getSnapshot) {\n\tconst value = getSnapshot();\n\n\t/**\n\t * @typedef {{ _instance: Store }} StoreRef\n\t * @type {[StoreRef, (store: StoreRef) => void]}\n\t */\n\tconst [{ _instance }, forceUpdate] = useState({\n\t\t_instance: { _value: value, _getSnapshot: getSnapshot }\n\t});\n\n\tuseLayoutEffect(() => {\n\t\t_instance._value = value;\n\t\t_instance._getSnapshot = getSnapshot;\n\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\t}, [subscribe, value, getSnapshot]);\n\n\tuseEffect(() => {\n\t\tif (didSnapshotChange(_instance)) {\n\t\t\tforceUpdate({ _instance });\n\t\t}\n\n\t\treturn subscribe(() => {\n\t\t\tif (didSnapshotChange(_instance)) {\n\t\t\t\tforceUpdate({ _instance });\n\t\t\t}\n\t\t});\n\t}, [subscribe]);\n\n\treturn value;\n}\n\n/** @type {(inst: Store) => boolean} */\nfunction didSnapshotChange(inst) {\n\ttry {\n\t\treturn !is(inst._value, inst._getSnapshot());\n\t} catch (error) {\n\t\treturn true;\n\t}\n}\n\nexport function startTransition(cb) {\n\tcb();\n}\n\nexport function useDeferredValue(val) {\n\treturn val;\n}\n\nexport function useTransition() {\n\treturn [false, startTransition];\n}\n\n// TODO: in theory this should be done after a VNode is diffed as we want to insert\n// styles/... before it attaches\nexport const useInsertionEffect = useLayoutEffect;\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p, c) {\n\tthis.props = p;\n\tthis.context = c;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function (props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { createElement } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Memoize a component, so that it only updates when the props actually have\n * changed. This was previously known as `React.pure`.\n * @param {import('./internal').FunctionComponent} c functional component\n * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function\n * @returns {import('./internal').FunctionComponent}\n */\nexport function memo(c, comparer) {\n\tfunction shouldUpdate(nextProps) {\n\t\tlet ref = this.props.ref;\n\t\tif (ref != nextProps.ref && ref) {\n\t\t\ttypeof ref == 'function' ? ref(null) : (ref.current = null);\n\t\t}\n\n\t\treturn comparer\n\t\t\t? !comparer(this.props, nextProps) || ref != nextProps.ref\n\t\t\t: shallowDiffers(this.props, nextProps);\n\t}\n\n\tfunction Memoed(props) {\n\t\tthis.shouldComponentUpdate = shouldUpdate;\n\t\treturn createElement(c, props);\n\t}\n\tMemoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';\n\tMemoed._forwarded = Memoed.prototype.isReactComponent = true;\n\tMemoed.type = c;\n\treturn Memoed;\n}\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = fn;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { toChildArray } from 'preact';\n\nconst mapFn = (children, fn) => {\n\tif (children == null) return null;\n\treturn toChildArray(toChildArray(children).map(fn));\n};\n\n// This API is completely unnecessary for Preact, so it's basically passthrough.\nexport const Children = {\n\tmap: mapFn,\n\tforEach: mapFn,\n\tcount(children) {\n\t\treturn children ? toChildArray(children).length : 0;\n\t},\n\tonly(children) {\n\t\tconst normalized = toChildArray(children);\n\t\tif (normalized.length !== 1) throw 'Children.only';\n\t\treturn normalized[0];\n\t},\n\ttoArray: toChildArray\n};\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { MODE_HYDRATE } from '../../src/constants';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function (vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component) component._unmounted = true;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._flags & MODE_HYDRATE) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\n\t\t\tvnode._component._force = true;\n\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode && originalParent) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.appendChild(vnode._dom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode<any, any>} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function (promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved || c._unmounted) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\t// Store and null _parentDom to prevent setState/forceUpdate from\n\t// scheduling renders while suspended. Render would be a no-op anyway\n\t// since renderComponent checks _parentDom, but this avoids queue churn.\n\tconst originalParentDom = suspendingComponent._parentDom;\n\tsuspendingComponent._parentDom = null;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\t// Restore _parentDom before forceUpdate so render can proceed\n\t\t\t\tsuspended._parentDom = originalParentDom;\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tif (\n\t\t!c._pendingSuspensionCount++ &&\n\t\t!(suspendingVNode._flags & MODE_HYDRATE)\n\t) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function () {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function (props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._flags &= ~MODE_HYDRATE;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\tlet component = vnode._parent && vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component = null;\n\tlet error;\n\tlet resolved;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tif (exports) {\n\t\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t\t}\n\t\t\t\t\tresolved = true;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t\tresolved = true;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!resolved) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn component ? createElement(component, props) : null;\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function (child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function (props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate =\n\tSuspenseList.prototype.componentDidMount = function () {\n\t\t// Iterate through all children after mounting for two reasons:\n\t\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t\t// The nodes can now be completely consumed from the linked list.\n\t\t// 2. Handle nodes that might have gotten resolved between render and\n\t\t// componentDidMount.\n\t\tthis._map.forEach((node, child) => {\n\t\t\tresolve(this, child, node);\n\t\t});\n\t};\n","/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { createElement, render } from 'preact';\n\n/**\n * @param {import('../../src/index').RenderableProps<{ context: any }>} props\n */\nfunction ContextProvider(props) {\n\tthis.getChildContext = () => props.context;\n\treturn props.children;\n}\n\n/**\n * Portal component\n * @this {import('./internal').Component}\n * @param {object | null | undefined} props\n *\n * TODO: use createRoot() instead of fake root\n */\nfunction Portal(props) {\n\tconst _this = this;\n\tlet container = props._container;\n\n\t_this.componentWillUnmount = function () {\n\t\trender(null, _this._temp);\n\t\t_this._temp = null;\n\t\t_this._container = null;\n\t};\n\n\t// When we change container we should clear our old container and\n\t// indicate a new mount.\n\tif (_this._container && _this._container !== container) {\n\t\t_this.componentWillUnmount();\n\t}\n\n\tif (!_this._temp) {\n\t\t// Ensure the element has a mask for useId invocations\n\t\tlet root = _this._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\t_this._container = container;\n\n\t\t// Create a fake DOM parent node that manages a subset of `container`'s children:\n\t\t_this._temp = {\n\t\t\tnodeType: 1,\n\t\t\tparentNode: container,\n\t\t\tchildNodes: [],\n\t\t\t_children: { _mask: root._mask },\n\t\t\tcontains: () => true,\n\t\t\tnamespaceURI: container.namespaceURI,\n\t\t\tinsertBefore(child, before) {\n\t\t\t\tthis.childNodes.push(child);\n\t\t\t\t_this._container.insertBefore(child, before);\n\t\t\t},\n\t\t\tremoveChild(child) {\n\t\t\t\tthis.childNodes.splice(this.childNodes.indexOf(child) >>> 1, 1);\n\t\t\t\t_this._container.removeChild(child);\n\t\t\t}\n\t\t};\n\t}\n\n\t// Render our wrapping element into temp.\n\trender(\n\t\tcreateElement(ContextProvider, { context: _this.context }, props._vnode),\n\t\t_this._temp\n\t);\n}\n\n/**\n * Create a `Portal` to continue rendering the vnode tree at a different DOM node\n * @param {import('./internal').VNode} vnode The vnode to render\n * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.\n */\nexport function createPortal(vnode, container) {\n\tconst el = createElement(Portal, { _vnode: vnode, _container: container });\n\tel.containerInfo = container;\n\treturn el;\n}\n","import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\nimport {\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tuseEffect,\n\tuseId,\n\tuseImperativeHandle,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseReducer,\n\tuseRef,\n\tuseState\n} from 'preact/hooks';\nimport {\n\tuseDeferredValue,\n\tuseInsertionEffect,\n\tuseSyncExternalStore,\n\tuseTransition\n} from './index';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS =\n\t/^(?: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]/;\nconst ON_ANI = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;\nconst CAMEL_REPLACE = /[A-Z0-9]/g;\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/\n\t\t: /fil|che|ra/\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = true;\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\n\t\t}\n\t});\n});\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\n\te.persist = () => {};\n\te.isPropagationStopped = function isPropagationStopped() {\n\t\treturn this.cancelBubble;\n\t};\n\te.isDefaultPrevented = function isDefaultPrevented() {\n\t\treturn this.defaultPrevented;\n\t};\n\treturn (e.nativeEvent = e);\n};\n\nconst classNameDescriptorNonEnumberable = {\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nfunction handleDomVNode(vnode) {\n\tlet props = vnode.props,\n\t\ttype = vnode.type,\n\t\tnormalizedProps = {},\n\t\tisNonDashedType = type.indexOf('-') == -1;\n\n\tfor (let i in props) {\n\t\tlet value = props[i];\n\n\t\tif (\n\t\t\t(i === 'value' && 'defaultValue' in props && value == null) ||\n\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t(IS_DOM && i === 'children' && type === 'noscript') ||\n\t\t\ti === 'class' ||\n\t\t\ti === 'className'\n\t\t) {\n\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t// a default value\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet lowerCased = i.toLowerCase();\n\t\tif (i === 'defaultValue' && 'value' in props && props.value == null) {\n\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\ti = 'value';\n\t\t} else if (i === 'download' && value === true) {\n\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t// value will be used as the file name and the file will be called\n\t\t\t// \"true\" upon downloading it.\n\t\t\tvalue = '';\n\t\t} else if (lowerCased === 'translate' && value === 'no') {\n\t\t\tvalue = false;\n\t\t} else if (lowerCased[0] === 'o' && lowerCased[1] === 'n') {\n\t\t\tif (lowerCased === 'ondoubleclick') {\n\t\t\t\ti = 'ondblclick';\n\t\t\t} else if (\n\t\t\t\tlowerCased === 'onchange' &&\n\t\t\t\t(type === 'input' || type === 'textarea') &&\n\t\t\t\t!onChangeInputType(props.type)\n\t\t\t) {\n\t\t\t\tlowerCased = i = 'oninput';\n\t\t\t} else if (lowerCased === 'onfocus') {\n\t\t\t\ti = 'onfocusin';\n\t\t\t} else if (lowerCased === 'onblur') {\n\t\t\t\ti = 'onfocusout';\n\t\t\t} else if (ON_ANI.test(i)) {\n\t\t\t\ti = lowerCased;\n\t\t\t}\n\t\t} else if (isNonDashedType && CAMEL_PROPS.test(i)) {\n\t\t\ti = i.replace(CAMEL_REPLACE, '-$&').toLowerCase();\n\t\t} else if (value === null) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\t// Add support for onInput and onChange, see #3561\n\t\t// if we have an oninput prop already change it to oninputCapture\n\t\tif (lowerCased === 'oninput') {\n\t\t\ti = lowerCased;\n\t\t\tif (normalizedProps[i]) {\n\t\t\t\ti = 'oninputCapture';\n\t\t\t}\n\t\t}\n\n\t\tnormalizedProps[i] = value;\n\t}\n\n\tif (type == 'select') {\n\t\t// Add support for array select values: <select multiple value={[]} />\n\t\tif (normalizedProps.multiple && Array.isArray(normalizedProps.value)) {\n\t\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t\t});\n\t\t}\n\n\t\t// Adding support for defaultValue in select tag\n\t\tif (normalizedProps.defaultValue != null) {\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tif (normalizedProps.multiple) {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t\t} else {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t},\n\t\t\tuseCallback,\n\t\t\tuseContext,\n\t\t\tuseDebugValue,\n\t\t\tuseDeferredValue,\n\t\t\tuseEffect,\n\t\t\tuseId,\n\t\t\tuseImperativeHandle,\n\t\t\tuseInsertionEffect,\n\t\t\tuseLayoutEffect,\n\t\t\tuseMemo,\n\t\t\t// useMutableSource, // experimental-only and replaced by uSES, likely not worth supporting\n\t\t\tuseReducer,\n\t\t\tuseRef,\n\t\t\tuseState,\n\t\t\tuseSyncExternalStore,\n\t\t\tuseTransition\n\t\t}\n\t}\n};\n","import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment,\n\toptions\n} from 'preact';\nimport {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport {\n\tuseInsertionEffect,\n\tstartTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tuseTransition\n} from './hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '18.3.1'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Check if the passed element is a Fragment node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isFragment(element) {\n\treturn isValidElement(element) && element.type === Fragment;\n}\n\n/**\n * Check if the passed element is a Memo node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isMemo(element) {\n\treturn (\n\t\t!!element &&\n\t\ttypeof element.displayName == 'string' &&\n\t\telement.displayName.indexOf('Memo(') == 0\n\t);\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array<import('./internal').ComponentChildren>} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => {\n\tconst prevDebounce = options.debounceRendering;\n\toptions.debounceRendering = cb => cb();\n\tconst res = callback(arg);\n\toptions.debounceRendering = prevDebounce;\n\treturn res;\n};\n\n// compat to react-is\nexport const isElement = isValidElement;\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tuseInsertionEffect,\n\tstartTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tuseTransition,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tFragment as StrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseId,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseInsertionEffect,\n\tuseTransition,\n\tuseDeferredValue,\n\tuseSyncExternalStore,\n\tstartTransition,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tisElement,\n\tisFragment,\n\tisMemo,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode: Fragment,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n"],"names":["assign","obj","props","i","shallowDiffers","a","b","useSyncExternalStore","subscribe","getSnapshot","value","_useState","useState","_instance","__","_getSnapshot","forceUpdate","useLayoutEffect","didSnapshotChange","useEffect","inst","x","y","error","startTransition","cb","useDeferredValue","val","useTransition","useInsertionEffect","PureComponent","p","c","this","context","memo","comparer","shouldUpdate","nextProps","ref","current","Memoed","shouldComponentUpdate","createElement","displayName","name","__f","prototype","isReactComponent","type","Component","isPureReactComponent","state","oldDiffHook","options","__b","vnode","REACT_FORWARD_SYMBOL","Symbol","for","forwardRef","fn","Forwarded","clone","$$typeof","render","mapFn","children","toChildArray","map","Children","forEach","count","length","only","normalized","toArray","oldCatchError","__e","newVNode","oldVNode","errorInfo","then","component","__c","__k","oldUnmount","unmount","detachedClone","detachedParent","parentDom","__H","effect","__P","child","removeOriginal","originalParent","__v","appendChild","Suspense","__u","_suspenders","suspended","__a","lazy","loader","prom","resolved","Lazy","exports","default","e","SuspenseList","_next","_map","__z","__R","promise","suspendingVNode","suspendingComponent","push","resolve","onResolved","onSuspensionComplete","originalParentDom","suspendedVNode","__O","setState","pop","componentWillUnmount","document","detachedComponent","fallback","Fragment","list","node","delete","revealOrder","size","ContextProvider","getChildContext","Portal","_this","container","_container","_temp","root","__m","nodeType","parentNode","childNodes","contains","namespaceURI","insertBefore","before","removeChild","splice","indexOf","createPortal","el","containerInfo","delegated","get","unsuspend","wrappedUnsuspend","Map","reverse","set","componentDidUpdate","componentDidMount","REACT_ELEMENT_TYPE","CAMEL_PROPS","ON_ANI","CAMEL_REPLACE","IS_DOM","onChangeInputType","test","parent","callback","textContent","preactRender","hydrate","preactHydrate","key","Object","defineProperty","configurable","v","writable","oldEventHook","event","persist","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","nativeEvent","currentComponent","classNameDescriptorNonEnumberable","class","oldVNodeHook","normalizedProps","isNonDashedType","lowerCased","toLowerCase","replace","undefined","multiple","Array","isArray","selected","defaultValue","className","handleDomVNode","oldBeforeRender","__r","oldDiffed","diffed","dom","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","readContext","__n","useCallback","useContext","useDebugValue","useId","useImperativeHandle","useMemo","useReducer","useRef","version","createFactory","bind","isValidElement","element","isFragment","isMemo","cloneElement","preactCloneElement","apply","arguments","unmountComponentAtNode","findDOMNode","base","unstable_batchedUpdates","arg","flushSync","prevDebounce","debounceRendering","res","isElement","createContext","createRef","StrictMode"],"mappings":"mUAOgB,SAAAA,EAAOC,EAAKC,GAC3B,IAAK,IAAIC,KAAKD,EAAOD,EAAIE,GAAKD,EAAMC,GACpC,OAA6BF,CAC9B,CAQO,SAASG,EAAeC,EAAGC,GACjC,IAAK,IAAIH,KAAKE,EAAG,GAAU,aAANF,KAAsBA,KAAKG,GAAI,OAAW,EAC/D,IAAK,IAAIH,KAAKG,EAAG,GAAU,aAANH,GAAoBE,EAAEF,KAAOG,EAAEH,GAAI,OAAW,EACnE,OAAO,CACR,CCdO,SAASI,EAAqBC,EAAWC,GAC/C,IAAMC,EAAQD,IAMdE,EAAqCC,EAAAA,SAAS,CAC7CC,EAAW,CAAEC,GAAQJ,EAAOK,EAAcN,KADlCI,EAASF,EAAA,GAATE,EAAaG,EAAWL,EAIjCM,GAqBA,OArBAA,EAAAA,gBAAgB,WACfJ,EAASC,GAAUJ,EACnBG,EAAUE,EAAeN,EAErBS,EAAkBL,IACrBG,EAAY,CAAEH,EAAAA,GAEhB,EAAG,CAACL,EAAWE,EAAOD,IAEtBU,EAASA,UAAC,WAKT,OAJID,EAAkBL,IACrBG,EAAY,CAAEH,EAAAA,IAGRL,EAAU,WACZU,EAAkBL,IACrBG,EAAY,CAAEH,EAAAA,GAEhB,EACD,EAAG,CAACL,IAEGE,CACR,CAGA,SAASQ,EAAkBE,GAC1B,IACC,SDhBiBC,ECgBND,EAAIN,ODhBKQ,ECgBIF,EAAKL,ODfJ,IAANM,GAAW,EAAIA,GAAM,EAAIC,IAAQD,GAAMA,GAAKC,GAAMA,ECkBtE,CAFE,MAAOC,GACR,OAAO,CACR,KDnBkBF,EAAGC,CCoBtB,CAEgB,SAAAE,EAAgBC,GAC/BA,GACD,CAEgB,SAAAC,EAAiBC,GAChC,OAAOA,CACR,CAEO,SAASC,IACf,MAAO,EAAC,EAAOJ,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8E,MAIrB,CAOA,SAASoG,EAAYhK,GACpB,OACEA,IACCA,EAAUiK,MAAgC,IAAvBjK,EAAUiE,UAAkBjE,IACjD,IAEF,CAUM,IAAAkK,EAA0B,SAACnE,EAAUoE,GAAQ,OAAApE,EAASoE,EAAI,EAU1DC,GAAY,SAACrE,EAAUoE,GAC5B,IAAME,EAAelM,UAAQmM,kBAC7BnM,EAAOA,QAACmM,kBAAoB,SAAAhO,GAAE,OAAIA,GAAI,EACtC,IAAMiO,EAAMxE,EAASoE,GAErB,OADAhM,UAAQmM,kBAAoBD,EACrBE,CACR,EAGaC,GAAYjB,KAwCV,CACd9N,SAAAA,EAAQA,SACRsN,MAAAA,EAAAA,MACAG,WAAAA,EAAAA,WACAlN,UAAAA,YACAF,gBAAAA,EAAeA,gBACfY,mBAAAA,EACAD,cAAAA,EACAF,iBAAAA,EACAnB,qBAAAA,EACAiB,gBAAAA,EACA8M,OAAAA,SACAH,oBAAAA,EAAAA,oBACAC,QAAAA,EAAOA,QACPL,YAAAA,EAAAA,YACAC,WAAAA,EAAUA,WACVC,cAAAA,gBACAM,QAAAA,EACAjK,SAAAA,EACAL,OAAAA,EACAoH,QAAAA,EACA6D,uBAAAA,EACApF,aAAAA,EACAnH,cAAAA,gBACAiN,cAAAA,EAAaA,cACbpB,cAAAA,EACAM,aAAAA,EACAe,UAAAA,YACAxH,SAAAA,EAAAA,SACAqG,eAAAA,EACAiB,UAAAA,GACAf,WAAAA,EACAC,OAAAA,EACAM,YAAAA,EACAjM,UAAAA,EAAAA,UACApB,cAAAA,EACAK,KAAAA,EACAyB,WAAAA,EACA2L,UAAAA,GACAF,wBAAAA,EACAS,WAAYzH,EAAQA,SACpBlC,SAAAA,EACAa,aAAAA,EACAR,KAAAA,EACAmH,mDAAAA"}
node_modules/preact/compat/jsx-dev-runtime.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ require('preact/compat');
2
+
3
+ module.exports = require('preact/jsx-runtime');
node_modules/preact/compat/jsx-dev-runtime.mjs ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import 'preact/compat';
2
+
3
+ export * from 'preact/jsx-runtime';
node_modules/preact/compat/jsx-runtime.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ require('preact/compat');
2
+
3
+ module.exports = require('preact/jsx-runtime');
node_modules/preact/compat/jsx-runtime.mjs ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import 'preact/compat';
2
+
3
+ export * from 'preact/jsx-runtime';
node_modules/preact/compat/package.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "preact-compat",
3
+ "amdName": "preactCompat",
4
+ "version": "4.0.0",
5
+ "private": true,
6
+ "description": "A React compatibility layer for Preact",
7
+ "main": "dist/compat.js",
8
+ "module": "dist/compat.module.js",
9
+ "umd:main": "dist/compat.umd.js",
10
+ "source": "src/index.js",
11
+ "types": "src/index.d.ts",
12
+ "license": "MIT",
13
+ "mangle": {
14
+ "regex": "^_"
15
+ },
16
+ "peerDependencies": {
17
+ "preact": "^10.0.0"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./src/index.d.ts",
22
+ "browser": "./dist/compat.module.js",
23
+ "umd": "./dist/compat.umd.js",
24
+ "import": "./dist/compat.mjs",
25
+ "require": "./dist/compat.js"
26
+ },
27
+ "./client": {
28
+ "types": "./client.d.ts",
29
+ "import": "./client.mjs",
30
+ "require": "./client.js"
31
+ },
32
+ "./server": {
33
+ "browser": "./server.browser.js",
34
+ "import": "./server.mjs",
35
+ "require": "./server.js"
36
+ },
37
+ "./jsx-runtime": {
38
+ "import": "./jsx-runtime.mjs",
39
+ "require": "./jsx-runtime.js"
40
+ },
41
+ "./jsx-dev-runtime": {
42
+ "import": "./jsx-dev-runtime.mjs",
43
+ "require": "./jsx-dev-runtime.js"
44
+ },
45
+ "./scheduler": {
46
+ "import": "./scheduler.mjs",
47
+ "require": "./scheduler.js"
48
+ },
49
+ "./test-utils": {
50
+ "import": "./test-utils.mjs",
51
+ "require": "./test-utils.js"
52
+ },
53
+ "./package.json": "./package.json"
54
+ }
55
+ }
node_modules/preact/compat/scheduler.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // see scheduler.mjs
2
+
3
+ function unstable_runWithPriority(priority, callback) {
4
+ return callback();
5
+ }
6
+
7
+ module.exports = {
8
+ unstable_ImmediatePriority: 1,
9
+ unstable_UserBlockingPriority: 2,
10
+ unstable_NormalPriority: 3,
11
+ unstable_LowPriority: 4,
12
+ unstable_IdlePriority: 5,
13
+ unstable_runWithPriority,
14
+ unstable_now: performance.now.bind(performance)
15
+ };
node_modules/preact/compat/scheduler.mjs ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* eslint-disable */
2
+
3
+ // This file includes experimental React APIs exported from the "scheduler"
4
+ // npm package. Despite being explicitely marked as unstable some libraries
5
+ // already make use of them. This file is not a full replacement for the
6
+ // scheduler package, but includes the necessary shims to make those libraries
7
+ // work with Preact.
8
+
9
+ export var unstable_ImmediatePriority = 1;
10
+ export var unstable_UserBlockingPriority = 2;
11
+ export var unstable_NormalPriority = 3;
12
+ export var unstable_LowPriority = 4;
13
+ export var unstable_IdlePriority = 5;
14
+
15
+ /**
16
+ * @param {number} priority
17
+ * @param {() => void} callback
18
+ */
19
+ export function unstable_runWithPriority(priority, callback) {
20
+ return callback();
21
+ }
22
+
23
+ export var unstable_now = performance.now.bind(performance);
node_modules/preact/compat/server.browser.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { renderToString } from 'preact-render-to-string';
2
+
3
+ export {
4
+ renderToString,
5
+ renderToString as renderToStaticMarkup
6
+ } from 'preact-render-to-string';
7
+
8
+ export default {
9
+ renderToString,
10
+ renderToStaticMarkup: renderToString
11
+ };
node_modules/preact/compat/server.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* eslint-disable */
2
+ var renderToString;
3
+ try {
4
+ const mod = require('preact-render-to-string');
5
+ renderToString = mod.default || mod.renderToString || mod;
6
+ } catch (e) {
7
+ throw Error(
8
+ 'renderToString() error: missing "preact-render-to-string" dependency.'
9
+ );
10
+ }
11
+
12
+ var renderToReadableStream;
13
+ try {
14
+ const mod = require('preact-render-to-string/stream');
15
+ renderToReadableStream = mod.default || mod.renderToReadableStream || mod;
16
+ } catch (e) {
17
+ throw Error(
18
+ 'renderToReadableStream() error: update "preact-render-to-string" dependency to at least 6.5.0.'
19
+ );
20
+ }
21
+ var renderToPipeableStream;
22
+ try {
23
+ const mod = require('preact-render-to-string/stream-node');
24
+ renderToPipeableStream = mod.default || mod.renderToPipeableStream || mod;
25
+ } catch (e) {
26
+ throw Error(
27
+ 'renderToPipeableStream() error: update "preact-render-to-string" dependency to at least 6.5.0.'
28
+ );
29
+ }
30
+
31
+ module.exports = {
32
+ renderToString: renderToString,
33
+ renderToStaticMarkup: renderToString,
34
+ renderToPipeableStream: renderToPipeableStream,
35
+ renderToReadableStream: renderToReadableStream
36
+ };
node_modules/preact/compat/server.mjs ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { renderToString } from 'preact-render-to-string';
2
+ import { renderToPipeableStream } from 'preact-render-to-string/stream-node';
3
+ import { renderToReadableStream } from 'preact-render-to-string/stream';
4
+
5
+ export {
6
+ renderToString,
7
+ renderToString as renderToStaticMarkup
8
+ } from 'preact-render-to-string';
9
+
10
+ export { renderToPipeableStream } from 'preact-render-to-string/stream-node';
11
+ export { renderToReadableStream } from 'preact-render-to-string/stream';
12
+ export default {
13
+ renderToString,
14
+ renderToStaticMarkup: renderToString,
15
+ renderToPipeableStream,
16
+ renderToReadableStream
17
+ };
node_modules/preact/compat/src/Children.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { toChildArray } from 'preact';
2
+
3
+ const mapFn = (children, fn) => {
4
+ if (children == null) return null;
5
+ return toChildArray(toChildArray(children).map(fn));
6
+ };
7
+
8
+ // This API is completely unnecessary for Preact, so it's basically passthrough.
9
+ export const Children = {
10
+ map: mapFn,
11
+ forEach: mapFn,
12
+ count(children) {
13
+ return children ? toChildArray(children).length : 0;
14
+ },
15
+ only(children) {
16
+ const normalized = toChildArray(children);
17
+ if (normalized.length !== 1) throw 'Children.only';
18
+ return normalized[0];
19
+ },
20
+ toArray: toChildArray
21
+ };
node_modules/preact/compat/src/PureComponent.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Component } from 'preact';
2
+ import { shallowDiffers } from './util';
3
+
4
+ /**
5
+ * Component class with a predefined `shouldComponentUpdate` implementation
6
+ */
7
+ export function PureComponent(p, c) {
8
+ this.props = p;
9
+ this.context = c;
10
+ }
11
+ PureComponent.prototype = new Component();
12
+ // Some third-party libraries check if this property is present
13
+ PureComponent.prototype.isPureReactComponent = true;
14
+ PureComponent.prototype.shouldComponentUpdate = function (props, state) {
15
+ return shallowDiffers(this.props, props) || shallowDiffers(this.state, state);
16
+ };
node_modules/preact/compat/src/forwardRef.js ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { options } from 'preact';
2
+ import { assign } from './util';
3
+
4
+ let oldDiffHook = options._diff;
5
+ options._diff = vnode => {
6
+ if (vnode.type && vnode.type._forwarded && vnode.ref) {
7
+ vnode.props.ref = vnode.ref;
8
+ vnode.ref = null;
9
+ }
10
+ if (oldDiffHook) oldDiffHook(vnode);
11
+ };
12
+
13
+ export const REACT_FORWARD_SYMBOL =
14
+ (typeof Symbol != 'undefined' &&
15
+ Symbol.for &&
16
+ Symbol.for('react.forward_ref')) ||
17
+ 0xf47;
18
+
19
+ /**
20
+ * Pass ref down to a child. This is mainly used in libraries with HOCs that
21
+ * wrap components. Using `forwardRef` there is an easy way to get a reference
22
+ * of the wrapped component instead of one of the wrapper itself.
23
+ * @param {import('./index').ForwardFn} fn
24
+ * @returns {import('./internal').FunctionComponent}
25
+ */
26
+ export function forwardRef(fn) {
27
+ function Forwarded(props) {
28
+ let clone = assign({}, props);
29
+ delete clone.ref;
30
+ return fn(clone, props.ref || null);
31
+ }
32
+
33
+ // mobx-react checks for this being present
34
+ Forwarded.$$typeof = REACT_FORWARD_SYMBOL;
35
+ // mobx-react heavily relies on implementation details.
36
+ // It expects an object here with a `render` property,
37
+ // and prototype.render will fail. Without this
38
+ // mobx-react throws.
39
+ Forwarded.render = fn;
40
+
41
+ Forwarded.prototype.isReactComponent = Forwarded._forwarded = true;
42
+ Forwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';
43
+ return Forwarded;
44
+ }
node_modules/preact/compat/src/hooks.js ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useState, useLayoutEffect, useEffect } from 'preact/hooks';
2
+ import { is } from './util';
3
+
4
+ /**
5
+ * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84
6
+ * on a high level this cuts out the warnings, ... and attempts a smaller implementation
7
+ * @typedef {{ _value: any; _getSnapshot: () => any }} Store
8
+ */
9
+ export function useSyncExternalStore(subscribe, getSnapshot) {
10
+ const value = getSnapshot();
11
+
12
+ /**
13
+ * @typedef {{ _instance: Store }} StoreRef
14
+ * @type {[StoreRef, (store: StoreRef) => void]}
15
+ */
16
+ const [{ _instance }, forceUpdate] = useState({
17
+ _instance: { _value: value, _getSnapshot: getSnapshot }
18
+ });
19
+
20
+ useLayoutEffect(() => {
21
+ _instance._value = value;
22
+ _instance._getSnapshot = getSnapshot;
23
+
24
+ if (didSnapshotChange(_instance)) {
25
+ forceUpdate({ _instance });
26
+ }
27
+ }, [subscribe, value, getSnapshot]);
28
+
29
+ useEffect(() => {
30
+ if (didSnapshotChange(_instance)) {
31
+ forceUpdate({ _instance });
32
+ }
33
+
34
+ return subscribe(() => {
35
+ if (didSnapshotChange(_instance)) {
36
+ forceUpdate({ _instance });
37
+ }
38
+ });
39
+ }, [subscribe]);
40
+
41
+ return value;
42
+ }
43
+
44
+ /** @type {(inst: Store) => boolean} */
45
+ function didSnapshotChange(inst) {
46
+ try {
47
+ return !is(inst._value, inst._getSnapshot());
48
+ } catch (error) {
49
+ return true;
50
+ }
51
+ }
52
+
53
+ export function startTransition(cb) {
54
+ cb();
55
+ }
56
+
57
+ export function useDeferredValue(val) {
58
+ return val;
59
+ }
60
+
61
+ export function useTransition() {
62
+ return [false, startTransition];
63
+ }
64
+
65
+ // TODO: in theory this should be done after a VNode is diffed as we want to insert
66
+ // styles/... before it attaches
67
+ export const useInsertionEffect = useLayoutEffect;
node_modules/preact/compat/src/index.d.ts ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as _hooks from '../../hooks';
2
+ // Intentionally not using a relative path to take advantage of
3
+ // the TS version resolution mechanism
4
+ import * as preact from 'preact';
5
+ import { JSXInternal } from '../../src/jsx';
6
+ import * as _Suspense from './suspense';
7
+ import * as _SuspenseList from './suspense-list';
8
+
9
+ // export default React;
10
+ export = React;
11
+ export as namespace React;
12
+ declare namespace React {
13
+ // Export JSX
14
+ export import JSX = JSXInternal;
15
+
16
+ // Hooks
17
+ export import CreateHandle = _hooks.CreateHandle;
18
+ export import EffectCallback = _hooks.EffectCallback;
19
+ export import Inputs = _hooks.Inputs;
20
+ export import PropRef = _hooks.PropRef;
21
+ export import Reducer = _hooks.Reducer;
22
+ export import Dispatch = _hooks.Dispatch;
23
+ export import SetStateAction = _hooks.StateUpdater;
24
+ export import useCallback = _hooks.useCallback;
25
+ export import useContext = _hooks.useContext;
26
+ export import useDebugValue = _hooks.useDebugValue;
27
+ export import useEffect = _hooks.useEffect;
28
+ export import useImperativeHandle = _hooks.useImperativeHandle;
29
+ export import useId = _hooks.useId;
30
+ export import useLayoutEffect = _hooks.useLayoutEffect;
31
+ export import useMemo = _hooks.useMemo;
32
+ export import useReducer = _hooks.useReducer;
33
+ export import useRef = _hooks.useRef;
34
+ export import useState = _hooks.useState;
35
+ // React 18 hooks
36
+ export import useInsertionEffect = _hooks.useLayoutEffect;
37
+ export function useTransition(): [false, typeof startTransition];
38
+ export function useDeferredValue<T = any>(val: T): T;
39
+ export function useSyncExternalStore<T>(
40
+ subscribe: (flush: () => void) => () => void,
41
+ getSnapshot: () => T
42
+ ): T;
43
+
44
+ // Preact Defaults
45
+ export import Context = preact.Context;
46
+ export import ContextType = preact.ContextType;
47
+ export import RefObject = preact.RefObject;
48
+ export import Component = preact.Component;
49
+ export import FunctionComponent = preact.FunctionComponent;
50
+ export import ComponentType = preact.ComponentType;
51
+ export import ComponentClass = preact.ComponentClass;
52
+ export import FC = preact.FunctionComponent;
53
+ export import createContext = preact.createContext;
54
+ export import Ref = preact.Ref;
55
+ export import createRef = preact.createRef;
56
+ export import Fragment = preact.Fragment;
57
+ export import createElement = preact.createElement;
58
+ export import cloneElement = preact.cloneElement;
59
+ export import ComponentProps = preact.ComponentProps;
60
+ export import ReactNode = preact.ComponentChild;
61
+ export import ReactElement = preact.VNode;
62
+ export import Consumer = preact.Consumer;
63
+ export import ErrorInfo = preact.ErrorInfo;
64
+ export import Key = preact.Key;
65
+
66
+ // Suspense
67
+ export import Suspense = _Suspense.Suspense;
68
+ export import lazy = _Suspense.lazy;
69
+ export import SuspenseList = _SuspenseList.SuspenseList;
70
+
71
+ // Compat
72
+ export import StrictMode = preact.Fragment;
73
+ export const version: string;
74
+ export function startTransition(cb: () => void): void;
75
+
76
+ // HTML
77
+ export interface HTMLAttributes<T extends EventTarget>
78
+ extends JSXInternal.HTMLAttributes<T> {}
79
+ export interface HTMLProps<T extends EventTarget>
80
+ extends JSXInternal.AllHTMLAttributes<T>,
81
+ preact.ClassAttributes<T> {}
82
+ export interface AllHTMLAttributes<T extends EventTarget>
83
+ extends JSXInternal.AllHTMLAttributes<T> {}
84
+ export import DetailedHTMLProps = JSXInternal.DetailedHTMLProps;
85
+ export import CSSProperties = JSXInternal.CSSProperties;
86
+
87
+ export interface SVGProps<T extends EventTarget>
88
+ extends JSXInternal.SVGAttributes<T>,
89
+ preact.ClassAttributes<T> {}
90
+
91
+ interface SVGAttributes<T extends EventTarget = SVGElement>
92
+ extends JSXInternal.SVGAttributes<T> {}
93
+
94
+ interface ReactSVG extends JSXInternal.IntrinsicSVGElements {}
95
+
96
+ export import AriaAttributes = JSXInternal.AriaAttributes;
97
+
98
+ export import HTMLAttributeReferrerPolicy = JSXInternal.HTMLAttributeReferrerPolicy;
99
+ export import HTMLAttributeAnchorTarget = JSXInternal.HTMLAttributeAnchorTarget;
100
+ export import HTMLInputTypeAttribute = JSXInternal.HTMLInputTypeAttribute;
101
+ export import HTMLAttributeCrossOrigin = JSXInternal.HTMLAttributeCrossOrigin;
102
+
103
+ export import AnchorHTMLAttributes = JSXInternal.AnchorHTMLAttributes;
104
+ export import AudioHTMLAttributes = JSXInternal.AudioHTMLAttributes;
105
+ export import AreaHTMLAttributes = JSXInternal.AreaHTMLAttributes;
106
+ export import BaseHTMLAttributes = JSXInternal.BaseHTMLAttributes;
107
+ export import BlockquoteHTMLAttributes = JSXInternal.BlockquoteHTMLAttributes;
108
+ export import ButtonHTMLAttributes = JSXInternal.ButtonHTMLAttributes;
109
+ export import CanvasHTMLAttributes = JSXInternal.CanvasHTMLAttributes;
110
+ export import ColHTMLAttributes = JSXInternal.ColHTMLAttributes;
111
+ export import ColgroupHTMLAttributes = JSXInternal.ColgroupHTMLAttributes;
112
+ export import DataHTMLAttributes = JSXInternal.DataHTMLAttributes;
113
+ export import DetailsHTMLAttributes = JSXInternal.DetailsHTMLAttributes;
114
+ export import DelHTMLAttributes = JSXInternal.DelHTMLAttributes;
115
+ export import DialogHTMLAttributes = JSXInternal.DialogHTMLAttributes;
116
+ export import EmbedHTMLAttributes = JSXInternal.EmbedHTMLAttributes;
117
+ export import FieldsetHTMLAttributes = JSXInternal.FieldsetHTMLAttributes;
118
+ export import FormHTMLAttributes = JSXInternal.FormHTMLAttributes;
119
+ export import IframeHTMLAttributes = JSXInternal.IframeHTMLAttributes;
120
+ export import ImgHTMLAttributes = JSXInternal.ImgHTMLAttributes;
121
+ export import InsHTMLAttributes = JSXInternal.InsHTMLAttributes;
122
+ export import InputHTMLAttributes = JSXInternal.InputHTMLAttributes;
123
+ export import KeygenHTMLAttributes = JSXInternal.KeygenHTMLAttributes;
124
+ export import LabelHTMLAttributes = JSXInternal.LabelHTMLAttributes;
125
+ export import LiHTMLAttributes = JSXInternal.LiHTMLAttributes;
126
+ export import LinkHTMLAttributes = JSXInternal.LinkHTMLAttributes;
127
+ export import MapHTMLAttributes = JSXInternal.MapHTMLAttributes;
128
+ export import MenuHTMLAttributes = JSXInternal.MenuHTMLAttributes;
129
+ export import MediaHTMLAttributes = JSXInternal.MediaHTMLAttributes;
130
+ export import MetaHTMLAttributes = JSXInternal.MetaHTMLAttributes;
131
+ export import MeterHTMLAttributes = JSXInternal.MeterHTMLAttributes;
132
+ export import QuoteHTMLAttributes = JSXInternal.QuoteHTMLAttributes;
133
+ export import ObjectHTMLAttributes = JSXInternal.ObjectHTMLAttributes;
134
+ export import OlHTMLAttributes = JSXInternal.OlHTMLAttributes;
135
+ export import OptgroupHTMLAttributes = JSXInternal.OptgroupHTMLAttributes;
136
+ export import OptionHTMLAttributes = JSXInternal.OptionHTMLAttributes;
137
+ export import OutputHTMLAttributes = JSXInternal.OutputHTMLAttributes;
138
+ export import ParamHTMLAttributes = JSXInternal.ParamHTMLAttributes;
139
+ export import ProgressHTMLAttributes = JSXInternal.ProgressHTMLAttributes;
140
+ export import SlotHTMLAttributes = JSXInternal.SlotHTMLAttributes;
141
+ export import ScriptHTMLAttributes = JSXInternal.ScriptHTMLAttributes;
142
+ export import SelectHTMLAttributes = JSXInternal.SelectHTMLAttributes;
143
+ export import SourceHTMLAttributes = JSXInternal.SourceHTMLAttributes;
144
+ export import StyleHTMLAttributes = JSXInternal.StyleHTMLAttributes;
145
+ export import TableHTMLAttributes = JSXInternal.TableHTMLAttributes;
146
+ export import TextareaHTMLAttributes = JSXInternal.TextareaHTMLAttributes;
147
+ export import TdHTMLAttributes = JSXInternal.TdHTMLAttributes;
148
+ export import ThHTMLAttributes = JSXInternal.ThHTMLAttributes;
149
+ export import TimeHTMLAttributes = JSXInternal.TimeHTMLAttributes;
150
+ export import TrackHTMLAttributes = JSXInternal.TrackHTMLAttributes;
151
+ export import VideoHTMLAttributes = JSXInternal.VideoHTMLAttributes;
152
+
153
+ // Events
154
+ export import TargetedEvent = JSXInternal.TargetedEvent;
155
+ export import ChangeEvent = JSXInternal.TargetedEvent;
156
+ export import ClipboardEvent = JSXInternal.TargetedClipboardEvent;
157
+ export import CompositionEvent = JSXInternal.TargetedCompositionEvent;
158
+ export import DragEvent = JSXInternal.TargetedDragEvent;
159
+ export import PointerEvent = JSXInternal.TargetedPointerEvent;
160
+ export import FocusEvent = JSXInternal.TargetedFocusEvent;
161
+ export import FormEvent = JSXInternal.TargetedEvent;
162
+ export import InvalidEvent = JSXInternal.TargetedEvent;
163
+ export import KeyboardEvent = JSXInternal.TargetedKeyboardEvent;
164
+ export import MouseEvent = JSXInternal.TargetedMouseEvent;
165
+ export import TouchEvent = JSXInternal.TargetedTouchEvent;
166
+ export import UIEvent = JSXInternal.TargetedUIEvent;
167
+ export import AnimationEvent = JSXInternal.TargetedAnimationEvent;
168
+ export import TransitionEvent = JSXInternal.TargetedTransitionEvent;
169
+
170
+ // Event Handler Types
171
+ export import EventHandler = JSXInternal.EventHandler;
172
+ export import ChangeEventHandler = JSXInternal.GenericEventHandler;
173
+ export import ClipboardEventHandler = JSXInternal.ClipboardEventHandler;
174
+ export import CompositionEventHandler = JSXInternal.CompositionEventHandler;
175
+ export import DragEventHandler = JSXInternal.DragEventHandler;
176
+ export import PointerEventHandler = JSXInternal.PointerEventHandler;
177
+ export import FocusEventHandler = JSXInternal.FocusEventHandler;
178
+ export import FormEventHandler = JSXInternal.GenericEventHandler;
179
+ export import InvalidEventHandler = JSXInternal.GenericEventHandler;
180
+ export import KeyboardEventHandler = JSXInternal.KeyboardEventHandler;
181
+ export import MouseEventHandler = JSXInternal.MouseEventHandler;
182
+ export import TouchEventHandler = JSXInternal.TouchEventHandler;
183
+ export import UIEventHandler = JSXInternal.UIEventHandler;
184
+ export import AnimationEventHandler = JSXInternal.AnimationEventHandler;
185
+ export import TransitionEventHandler = JSXInternal.TransitionEventHandler;
186
+
187
+ export function createPortal(
188
+ vnode: preact.ComponentChildren,
189
+ container: preact.ContainerNode
190
+ ): preact.VNode<any>;
191
+
192
+ export function render(
193
+ vnode: preact.ComponentChild,
194
+ parent: preact.ContainerNode,
195
+ callback?: () => void
196
+ ): Component | null;
197
+
198
+ export function hydrate(
199
+ vnode: preact.ComponentChild,
200
+ parent: preact.ContainerNode,
201
+ callback?: () => void
202
+ ): Component | null;
203
+
204
+ export function unmountComponentAtNode(
205
+ container: preact.ContainerNode
206
+ ): boolean;
207
+
208
+ export function createFactory(
209
+ type: preact.VNode<any>['type']
210
+ ): (
211
+ props?: any,
212
+ ...children: preact.ComponentChildren[]
213
+ ) => preact.VNode<any>;
214
+ export function isValidElement(element: any): boolean;
215
+ export function isFragment(element: any): boolean;
216
+ export function isMemo(element: any): boolean;
217
+ export function findDOMNode(
218
+ component: preact.Component | Element
219
+ ): Element | null;
220
+
221
+ export abstract class PureComponent<
222
+ P = {},
223
+ S = {},
224
+ SS = any
225
+ > extends preact.Component<P, S> {
226
+ isPureReactComponent: boolean;
227
+ }
228
+
229
+ export type MemoExoticComponent<C extends preact.FunctionalComponent<any>> =
230
+ preact.FunctionComponent<ComponentProps<C>> & {
231
+ readonly type: C;
232
+ };
233
+
234
+ export function memo<P = {}>(
235
+ component: preact.FunctionalComponent<P>,
236
+ comparer?: (prev: P, next: P) => boolean
237
+ ): preact.FunctionComponent<P>;
238
+ export function memo<C extends preact.FunctionalComponent<any>>(
239
+ component: C,
240
+ comparer?: (
241
+ prev: preact.ComponentProps<C>,
242
+ next: preact.ComponentProps<C>
243
+ ) => boolean
244
+ ): C;
245
+
246
+ export interface RefAttributes<R> extends preact.Attributes {
247
+ ref?: preact.Ref<R> | undefined;
248
+ }
249
+
250
+ /**
251
+ * @deprecated Please use `ForwardRefRenderFunction` instead.
252
+ */
253
+ export interface ForwardFn<P = {}, T = any> {
254
+ (props: P, ref: ForwardedRef<T>): preact.ComponentChild;
255
+ displayName?: string;
256
+ }
257
+
258
+ export interface ForwardRefRenderFunction<T = any, P = {}> {
259
+ (props: P, ref: ForwardedRef<T>): preact.ComponentChild;
260
+ displayName?: string;
261
+ }
262
+
263
+ export interface ForwardRefExoticComponent<P>
264
+ extends preact.FunctionComponent<P> {
265
+ defaultProps?: Partial<P> | undefined;
266
+ }
267
+
268
+ export function forwardRef<R, P = {}>(
269
+ fn: ForwardRefRenderFunction<R, P>
270
+ ): preact.FunctionalComponent<PropsWithoutRef<P> & { ref?: preact.Ref<R> }>;
271
+
272
+ export type PropsWithoutRef<P> = Omit<P, 'ref'>;
273
+
274
+ interface MutableRefObject<T> {
275
+ current: T;
276
+ }
277
+
278
+ export type ForwardedRef<T> =
279
+ | ((instance: T | null) => void)
280
+ | MutableRefObject<T | null>
281
+ | null;
282
+
283
+ export type ElementType<
284
+ P = any,
285
+ Tag extends keyof JSX.IntrinsicElements = keyof JSX.IntrinsicElements
286
+ > =
287
+ | { [K in Tag]: P extends JSX.IntrinsicElements[K] ? K : never }[Tag]
288
+ | ComponentType<P>;
289
+
290
+ export type ComponentPropsWithoutRef<T extends ElementType> = PropsWithoutRef<
291
+ ComponentProps<T>
292
+ >;
293
+
294
+ export type ComponentPropsWithRef<C extends ElementType> = C extends new (
295
+ props: infer P
296
+ ) => Component<any, any>
297
+ ? PropsWithoutRef<P> & RefAttributes<InstanceType<C>>
298
+ : ComponentProps<C>;
299
+
300
+ export type ElementRef<
301
+ C extends
302
+ | ForwardRefExoticComponent<any>
303
+ | { new (props: any): Component<any, any> }
304
+ | ((props: any) => ReactNode)
305
+ | keyof JSXInternal.IntrinsicElements
306
+ > = 'ref' extends keyof ComponentPropsWithRef<C>
307
+ ? NonNullable<ComponentPropsWithRef<C>['ref']> extends RefAttributes<
308
+ infer Instance
309
+ >['ref']
310
+ ? Instance
311
+ : never
312
+ : never;
313
+
314
+ export function flushSync<R>(fn: () => R): R;
315
+ export function flushSync<A, R>(fn: (a: A) => R, a: A): R;
316
+
317
+ export function unstable_batchedUpdates(
318
+ callback: (arg?: any) => void,
319
+ arg?: any
320
+ ): void;
321
+
322
+ export type PropsWithChildren<P = unknown> = P & {
323
+ children?: preact.ComponentChildren | undefined;
324
+ };
325
+
326
+ export const Children: {
327
+ map<T extends preact.ComponentChild, R>(
328
+ children: T | T[],
329
+ fn: (child: T, i: number) => R
330
+ ): R[];
331
+ forEach<T extends preact.ComponentChild>(
332
+ children: T | T[],
333
+ fn: (child: T, i: number) => void
334
+ ): void;
335
+ count: (children: preact.ComponentChildren) => number;
336
+ only: (children: preact.ComponentChildren) => preact.ComponentChild;
337
+ toArray: (children: preact.ComponentChildren) => preact.VNode<{}>[];
338
+ };
339
+
340
+ // scheduler
341
+ export const unstable_ImmediatePriority: number;
342
+ export const unstable_UserBlockingPriority: number;
343
+ export const unstable_NormalPriority: number;
344
+ export const unstable_LowPriority: number;
345
+ export const unstable_IdlePriority: number;
346
+ export function unstable_runWithPriority(
347
+ priority: number,
348
+ callback: () => void
349
+ ): void;
350
+ export const unstable_now: () => number;
351
+ }
node_modules/preact/compat/src/index.js ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ createElement,
3
+ render as preactRender,
4
+ cloneElement as preactCloneElement,
5
+ createRef,
6
+ Component,
7
+ createContext,
8
+ Fragment,
9
+ options
10
+ } from 'preact';
11
+ import {
12
+ useState,
13
+ useId,
14
+ useReducer,
15
+ useEffect,
16
+ useLayoutEffect,
17
+ useRef,
18
+ useImperativeHandle,
19
+ useMemo,
20
+ useCallback,
21
+ useContext,
22
+ useDebugValue
23
+ } from 'preact/hooks';
24
+ import {
25
+ useInsertionEffect,
26
+ startTransition,
27
+ useDeferredValue,
28
+ useSyncExternalStore,
29
+ useTransition
30
+ } from './hooks';
31
+ import { PureComponent } from './PureComponent';
32
+ import { memo } from './memo';
33
+ import { forwardRef } from './forwardRef';
34
+ import { Children } from './Children';
35
+ import { Suspense, lazy } from './suspense';
36
+ import { SuspenseList } from './suspense-list';
37
+ import { createPortal } from './portals';
38
+ import {
39
+ hydrate,
40
+ render,
41
+ REACT_ELEMENT_TYPE,
42
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
43
+ } from './render';
44
+
45
+ const version = '18.3.1'; // trick libraries to think we are react
46
+
47
+ /**
48
+ * Legacy version of createElement.
49
+ * @param {import('./internal').VNode["type"]} type The node name or Component constructor
50
+ */
51
+ function createFactory(type) {
52
+ return createElement.bind(null, type);
53
+ }
54
+
55
+ /**
56
+ * Check if the passed element is a valid (p)react node.
57
+ * @param {*} element The element to check
58
+ * @returns {boolean}
59
+ */
60
+ function isValidElement(element) {
61
+ return !!element && element.$$typeof === REACT_ELEMENT_TYPE;
62
+ }
63
+
64
+ /**
65
+ * Check if the passed element is a Fragment node.
66
+ * @param {*} element The element to check
67
+ * @returns {boolean}
68
+ */
69
+ function isFragment(element) {
70
+ return isValidElement(element) && element.type === Fragment;
71
+ }
72
+
73
+ /**
74
+ * Check if the passed element is a Memo node.
75
+ * @param {*} element The element to check
76
+ * @returns {boolean}
77
+ */
78
+ function isMemo(element) {
79
+ return (
80
+ !!element &&
81
+ typeof element.displayName == 'string' &&
82
+ element.displayName.indexOf('Memo(') == 0
83
+ );
84
+ }
85
+
86
+ /**
87
+ * Wrap `cloneElement` to abort if the passed element is not a valid element and apply
88
+ * all vnode normalizations.
89
+ * @param {import('./internal').VNode} element The vnode to clone
90
+ * @param {object} props Props to add when cloning
91
+ * @param {Array<import('./internal').ComponentChildren>} rest Optional component children
92
+ */
93
+ function cloneElement(element) {
94
+ if (!isValidElement(element)) return element;
95
+ return preactCloneElement.apply(null, arguments);
96
+ }
97
+
98
+ /**
99
+ * Remove a component tree from the DOM, including state and event handlers.
100
+ * @param {import('./internal').PreactElement} container
101
+ * @returns {boolean}
102
+ */
103
+ function unmountComponentAtNode(container) {
104
+ if (container._children) {
105
+ preactRender(null, container);
106
+ return true;
107
+ }
108
+ return false;
109
+ }
110
+
111
+ /**
112
+ * Get the matching DOM node for a component
113
+ * @param {import('./internal').Component} component
114
+ * @returns {import('./internal').PreactElement | null}
115
+ */
116
+ function findDOMNode(component) {
117
+ return (
118
+ (component &&
119
+ (component.base || (component.nodeType === 1 && component))) ||
120
+ null
121
+ );
122
+ }
123
+
124
+ /**
125
+ * Deprecated way to control batched rendering inside the reconciler, but we
126
+ * already schedule in batches inside our rendering code
127
+ * @template Arg
128
+ * @param {(arg: Arg) => void} callback function that triggers the updated
129
+ * @param {Arg} [arg] Optional argument that can be passed to the callback
130
+ */
131
+ // eslint-disable-next-line camelcase
132
+ const unstable_batchedUpdates = (callback, arg) => callback(arg);
133
+
134
+ /**
135
+ * In React, `flushSync` flushes the entire tree and forces a rerender.
136
+ * @template Arg
137
+ * @template Result
138
+ * @param {(arg: Arg) => Result} callback function that runs before the flush
139
+ * @param {Arg} [arg] Optional argument that can be passed to the callback
140
+ * @returns
141
+ */
142
+ const flushSync = (callback, arg) => {
143
+ const prevDebounce = options.debounceRendering;
144
+ options.debounceRendering = cb => cb();
145
+ const res = callback(arg);
146
+ options.debounceRendering = prevDebounce;
147
+ return res;
148
+ };
149
+
150
+ // compat to react-is
151
+ export const isElement = isValidElement;
152
+
153
+ export * from 'preact/hooks';
154
+ export {
155
+ version,
156
+ Children,
157
+ render,
158
+ hydrate,
159
+ unmountComponentAtNode,
160
+ createPortal,
161
+ createElement,
162
+ createContext,
163
+ createFactory,
164
+ cloneElement,
165
+ createRef,
166
+ Fragment,
167
+ isValidElement,
168
+ isFragment,
169
+ isMemo,
170
+ findDOMNode,
171
+ Component,
172
+ PureComponent,
173
+ memo,
174
+ forwardRef,
175
+ flushSync,
176
+ useInsertionEffect,
177
+ startTransition,
178
+ useDeferredValue,
179
+ useSyncExternalStore,
180
+ useTransition,
181
+ // eslint-disable-next-line camelcase
182
+ unstable_batchedUpdates,
183
+ Fragment as StrictMode,
184
+ Suspense,
185
+ SuspenseList,
186
+ lazy,
187
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
188
+ };
189
+
190
+ // React copies the named exports to the default one.
191
+ export default {
192
+ useState,
193
+ useId,
194
+ useReducer,
195
+ useEffect,
196
+ useLayoutEffect,
197
+ useInsertionEffect,
198
+ useTransition,
199
+ useDeferredValue,
200
+ useSyncExternalStore,
201
+ startTransition,
202
+ useRef,
203
+ useImperativeHandle,
204
+ useMemo,
205
+ useCallback,
206
+ useContext,
207
+ useDebugValue,
208
+ version,
209
+ Children,
210
+ render,
211
+ hydrate,
212
+ unmountComponentAtNode,
213
+ createPortal,
214
+ createElement,
215
+ createContext,
216
+ createFactory,
217
+ cloneElement,
218
+ createRef,
219
+ Fragment,
220
+ isValidElement,
221
+ isElement,
222
+ isFragment,
223
+ isMemo,
224
+ findDOMNode,
225
+ Component,
226
+ PureComponent,
227
+ memo,
228
+ forwardRef,
229
+ flushSync,
230
+ unstable_batchedUpdates,
231
+ StrictMode: Fragment,
232
+ Suspense,
233
+ SuspenseList,
234
+ lazy,
235
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
236
+ };
node_modules/preact/compat/src/internal.d.ts ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ Component as PreactComponent,
3
+ VNode as PreactVNode,
4
+ FunctionComponent as PreactFunctionComponent,
5
+ PreactElement
6
+ } from '../../src/internal';
7
+ import { SuspenseProps } from './suspense';
8
+
9
+ export { ComponentChildren } from '../..';
10
+
11
+ export { PreactElement };
12
+
13
+ export interface Component<P = {}, S = {}> extends PreactComponent<P, S> {
14
+ isReactComponent?: object;
15
+ isPureReactComponent?: true;
16
+ _patchedLifecycles?: true;
17
+
18
+ // Suspense internal properties
19
+ _childDidSuspend?(error: Promise<void>, suspendingVNode: VNode): void;
20
+ _suspended: (vnode: VNode) => (unsuspend: () => void) => void;
21
+ _onResolve?(): void;
22
+
23
+ // Portal internal properties
24
+ _temp: any;
25
+ _container: PreactElement;
26
+ }
27
+
28
+ export interface FunctionComponent<P = {}> extends PreactFunctionComponent<P> {
29
+ shouldComponentUpdate?(nextProps: Readonly<P>): boolean;
30
+ _forwarded?: boolean;
31
+ _patchedLifecycles?: true;
32
+ }
33
+
34
+ export interface VNode<T = any> extends PreactVNode<T> {
35
+ $$typeof?: symbol | string;
36
+ preactCompatNormalized?: boolean;
37
+ }
38
+
39
+ export interface SuspenseState {
40
+ _suspended?: null | VNode<any>;
41
+ }
42
+
43
+ export interface SuspenseComponent
44
+ extends PreactComponent<SuspenseProps, SuspenseState> {
45
+ _pendingSuspensionCount: number;
46
+ _suspenders: Component[];
47
+ _detachOnNextRender: null | VNode<any>;
48
+ }
node_modules/preact/compat/src/memo.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { createElement } from 'preact';
2
+ import { shallowDiffers } from './util';
3
+
4
+ /**
5
+ * Memoize a component, so that it only updates when the props actually have
6
+ * changed. This was previously known as `React.pure`.
7
+ * @param {import('./internal').FunctionComponent} c functional component
8
+ * @param {(prev: object, next: object) => boolean} [comparer] Custom equality function
9
+ * @returns {import('./internal').FunctionComponent}
10
+ */
11
+ export function memo(c, comparer) {
12
+ function shouldUpdate(nextProps) {
13
+ let ref = this.props.ref;
14
+ if (ref != nextProps.ref && ref) {
15
+ typeof ref == 'function' ? ref(null) : (ref.current = null);
16
+ }
17
+
18
+ return comparer
19
+ ? !comparer(this.props, nextProps) || ref != nextProps.ref
20
+ : shallowDiffers(this.props, nextProps);
21
+ }
22
+
23
+ function Memoed(props) {
24
+ this.shouldComponentUpdate = shouldUpdate;
25
+ return createElement(c, props);
26
+ }
27
+ Memoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';
28
+ Memoed._forwarded = Memoed.prototype.isReactComponent = true;
29
+ Memoed.type = c;
30
+ return Memoed;
31
+ }
node_modules/preact/compat/src/portals.js ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { createElement, render } from 'preact';
2
+
3
+ /**
4
+ * @param {import('../../src/index').RenderableProps<{ context: any }>} props
5
+ */
6
+ function ContextProvider(props) {
7
+ this.getChildContext = () => props.context;
8
+ return props.children;
9
+ }
10
+
11
+ /**
12
+ * Portal component
13
+ * @this {import('./internal').Component}
14
+ * @param {object | null | undefined} props
15
+ *
16
+ * TODO: use createRoot() instead of fake root
17
+ */
18
+ function Portal(props) {
19
+ const _this = this;
20
+ let container = props._container;
21
+
22
+ _this.componentWillUnmount = function () {
23
+ render(null, _this._temp);
24
+ _this._temp = null;
25
+ _this._container = null;
26
+ };
27
+
28
+ // When we change container we should clear our old container and
29
+ // indicate a new mount.
30
+ if (_this._container && _this._container !== container) {
31
+ _this.componentWillUnmount();
32
+ }
33
+
34
+ if (!_this._temp) {
35
+ // Ensure the element has a mask for useId invocations
36
+ let root = _this._vnode;
37
+ while (root !== null && !root._mask && root._parent !== null) {
38
+ root = root._parent;
39
+ }
40
+
41
+ _this._container = container;
42
+
43
+ // Create a fake DOM parent node that manages a subset of `container`'s children:
44
+ _this._temp = {
45
+ nodeType: 1,
46
+ parentNode: container,
47
+ childNodes: [],
48
+ _children: { _mask: root._mask },
49
+ contains: () => true,
50
+ namespaceURI: container.namespaceURI,
51
+ insertBefore(child, before) {
52
+ this.childNodes.push(child);
53
+ _this._container.insertBefore(child, before);
54
+ },
55
+ removeChild(child) {
56
+ this.childNodes.splice(this.childNodes.indexOf(child) >>> 1, 1);
57
+ _this._container.removeChild(child);
58
+ }
59
+ };
60
+ }
61
+
62
+ // Render our wrapping element into temp.
63
+ render(
64
+ createElement(ContextProvider, { context: _this.context }, props._vnode),
65
+ _this._temp
66
+ );
67
+ }
68
+
69
+ /**
70
+ * Create a `Portal` to continue rendering the vnode tree at a different DOM node
71
+ * @param {import('./internal').VNode} vnode The vnode to render
72
+ * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.
73
+ */
74
+ export function createPortal(vnode, container) {
75
+ const el = createElement(Portal, { _vnode: vnode, _container: container });
76
+ el.containerInfo = container;
77
+ return el;
78
+ }
node_modules/preact/compat/src/render.js ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ render as preactRender,
3
+ hydrate as preactHydrate,
4
+ options,
5
+ toChildArray,
6
+ Component
7
+ } from 'preact';
8
+ import {
9
+ useCallback,
10
+ useContext,
11
+ useDebugValue,
12
+ useEffect,
13
+ useId,
14
+ useImperativeHandle,
15
+ useLayoutEffect,
16
+ useMemo,
17
+ useReducer,
18
+ useRef,
19
+ useState
20
+ } from 'preact/hooks';
21
+ import {
22
+ useDeferredValue,
23
+ useInsertionEffect,
24
+ useSyncExternalStore,
25
+ useTransition
26
+ } from './index';
27
+
28
+ export const REACT_ELEMENT_TYPE =
29
+ (typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||
30
+ 0xeac7;
31
+
32
+ const CAMEL_PROPS =
33
+ /^(?: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]/;
34
+ const ON_ANI = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;
35
+ const CAMEL_REPLACE = /[A-Z0-9]/g;
36
+ const IS_DOM = typeof document !== 'undefined';
37
+
38
+ // Input types for which onchange should not be converted to oninput.
39
+ // type="file|checkbox|radio", plus "range" in IE11.
40
+ // (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches "range")
41
+ const onChangeInputType = type =>
42
+ (typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'
43
+ ? /fil|che|rad/
44
+ : /fil|che|ra/
45
+ ).test(type);
46
+
47
+ // Some libraries like `react-virtualized` explicitly check for this.
48
+ Component.prototype.isReactComponent = true;
49
+
50
+ // `UNSAFE_*` lifecycle hooks
51
+ // Preact only ever invokes the unprefixed methods.
52
+ // Here we provide a base "fallback" implementation that calls any defined UNSAFE_ prefixed method.
53
+ // - If a component defines its own `componentDidMount()` (including via defineProperty), use that.
54
+ // - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.
55
+ // - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.
56
+ // See https://github.com/preactjs/preact/issues/1941
57
+ [
58
+ 'componentWillMount',
59
+ 'componentWillReceiveProps',
60
+ 'componentWillUpdate'
61
+ ].forEach(key => {
62
+ Object.defineProperty(Component.prototype, key, {
63
+ configurable: true,
64
+ get() {
65
+ return this['UNSAFE_' + key];
66
+ },
67
+ set(v) {
68
+ Object.defineProperty(this, key, {
69
+ configurable: true,
70
+ writable: true,
71
+ value: v
72
+ });
73
+ }
74
+ });
75
+ });
76
+
77
+ /**
78
+ * Proxy render() since React returns a Component reference.
79
+ * @param {import('./internal').VNode} vnode VNode tree to render
80
+ * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into
81
+ * @param {() => void} [callback] Optional callback that will be called after rendering
82
+ * @returns {import('./internal').Component | null} The root component reference or null
83
+ */
84
+ export function render(vnode, parent, callback) {
85
+ // React destroys any existing DOM nodes, see #1727
86
+ // ...but only on the first render, see #1828
87
+ if (parent._children == null) {
88
+ parent.textContent = '';
89
+ }
90
+
91
+ preactRender(vnode, parent);
92
+ if (typeof callback == 'function') callback();
93
+
94
+ return vnode ? vnode._component : null;
95
+ }
96
+
97
+ export function hydrate(vnode, parent, callback) {
98
+ preactHydrate(vnode, parent);
99
+ if (typeof callback == 'function') callback();
100
+
101
+ return vnode ? vnode._component : null;
102
+ }
103
+
104
+ let oldEventHook = options.event;
105
+ options.event = e => {
106
+ if (oldEventHook) e = oldEventHook(e);
107
+
108
+ e.persist = () => {};
109
+ e.isPropagationStopped = function isPropagationStopped() {
110
+ return this.cancelBubble;
111
+ };
112
+ e.isDefaultPrevented = function isDefaultPrevented() {
113
+ return this.defaultPrevented;
114
+ };
115
+ return (e.nativeEvent = e);
116
+ };
117
+
118
+ const classNameDescriptorNonEnumberable = {
119
+ configurable: true,
120
+ get() {
121
+ return this.class;
122
+ }
123
+ };
124
+
125
+ function handleDomVNode(vnode) {
126
+ let props = vnode.props,
127
+ type = vnode.type,
128
+ normalizedProps = {},
129
+ isNonDashedType = type.indexOf('-') == -1;
130
+
131
+ for (let i in props) {
132
+ let value = props[i];
133
+
134
+ if (
135
+ (i === 'value' && 'defaultValue' in props && value == null) ||
136
+ // Emulate React's behavior of not rendering the contents of noscript tags on the client.
137
+ (IS_DOM && i === 'children' && type === 'noscript') ||
138
+ i === 'class' ||
139
+ i === 'className'
140
+ ) {
141
+ // Skip applying value if it is null/undefined and we already set
142
+ // a default value
143
+ continue;
144
+ }
145
+
146
+ let lowerCased = i.toLowerCase();
147
+ if (i === 'defaultValue' && 'value' in props && props.value == null) {
148
+ // `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.
149
+ // `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.
150
+ i = 'value';
151
+ } else if (i === 'download' && value === true) {
152
+ // Calling `setAttribute` with a truthy value will lead to it being
153
+ // passed as a stringified value, e.g. `download="true"`. React
154
+ // converts it to an empty string instead, otherwise the attribute
155
+ // value will be used as the file name and the file will be called
156
+ // "true" upon downloading it.
157
+ value = '';
158
+ } else if (lowerCased === 'translate' && value === 'no') {
159
+ value = false;
160
+ } else if (lowerCased[0] === 'o' && lowerCased[1] === 'n') {
161
+ if (lowerCased === 'ondoubleclick') {
162
+ i = 'ondblclick';
163
+ } else if (
164
+ lowerCased === 'onchange' &&
165
+ (type === 'input' || type === 'textarea') &&
166
+ !onChangeInputType(props.type)
167
+ ) {
168
+ lowerCased = i = 'oninput';
169
+ } else if (lowerCased === 'onfocus') {
170
+ i = 'onfocusin';
171
+ } else if (lowerCased === 'onblur') {
172
+ i = 'onfocusout';
173
+ } else if (ON_ANI.test(i)) {
174
+ i = lowerCased;
175
+ }
176
+ } else if (isNonDashedType && CAMEL_PROPS.test(i)) {
177
+ i = i.replace(CAMEL_REPLACE, '-$&').toLowerCase();
178
+ } else if (value === null) {
179
+ value = undefined;
180
+ }
181
+
182
+ // Add support for onInput and onChange, see #3561
183
+ // if we have an oninput prop already change it to oninputCapture
184
+ if (lowerCased === 'oninput') {
185
+ i = lowerCased;
186
+ if (normalizedProps[i]) {
187
+ i = 'oninputCapture';
188
+ }
189
+ }
190
+
191
+ normalizedProps[i] = value;
192
+ }
193
+
194
+ if (type == 'select') {
195
+ // Add support for array select values: <select multiple value={[]} />
196
+ if (normalizedProps.multiple && Array.isArray(normalizedProps.value)) {
197
+ // forEach() always returns undefined, which we abuse here to unset the value prop.
198
+ normalizedProps.value = toChildArray(props.children).forEach(child => {
199
+ child.props.selected =
200
+ normalizedProps.value.indexOf(child.props.value) != -1;
201
+ });
202
+ }
203
+
204
+ // Adding support for defaultValue in select tag
205
+ if (normalizedProps.defaultValue != null) {
206
+ normalizedProps.value = toChildArray(props.children).forEach(child => {
207
+ if (normalizedProps.multiple) {
208
+ child.props.selected =
209
+ normalizedProps.defaultValue.indexOf(child.props.value) != -1;
210
+ } else {
211
+ child.props.selected =
212
+ normalizedProps.defaultValue == child.props.value;
213
+ }
214
+ });
215
+ }
216
+ }
217
+
218
+ if (props.class && !props.className) {
219
+ normalizedProps.class = props.class;
220
+ Object.defineProperty(
221
+ normalizedProps,
222
+ 'className',
223
+ classNameDescriptorNonEnumberable
224
+ );
225
+ } else if (props.className) {
226
+ normalizedProps.class = normalizedProps.className = props.className;
227
+ }
228
+
229
+ vnode.props = normalizedProps;
230
+ }
231
+
232
+ let oldVNodeHook = options.vnode;
233
+ options.vnode = vnode => {
234
+ // only normalize props on Element nodes
235
+ if (typeof vnode.type === 'string') {
236
+ handleDomVNode(vnode);
237
+ }
238
+
239
+ vnode.$$typeof = REACT_ELEMENT_TYPE;
240
+
241
+ if (oldVNodeHook) oldVNodeHook(vnode);
242
+ };
243
+
244
+ // Only needed for react-relay
245
+ let currentComponent;
246
+ const oldBeforeRender = options._render;
247
+ options._render = function (vnode) {
248
+ if (oldBeforeRender) {
249
+ oldBeforeRender(vnode);
250
+ }
251
+ currentComponent = vnode._component;
252
+ };
253
+
254
+ const oldDiffed = options.diffed;
255
+ /** @type {(vnode: import('./internal').VNode) => void} */
256
+ options.diffed = function (vnode) {
257
+ if (oldDiffed) {
258
+ oldDiffed(vnode);
259
+ }
260
+
261
+ const props = vnode.props;
262
+ const dom = vnode._dom;
263
+
264
+ if (
265
+ dom != null &&
266
+ vnode.type === 'textarea' &&
267
+ 'value' in props &&
268
+ props.value !== dom.value
269
+ ) {
270
+ dom.value = props.value == null ? '' : props.value;
271
+ }
272
+
273
+ currentComponent = null;
274
+ };
275
+
276
+ // This is a very very private internal function for React it
277
+ // is used to sort-of do runtime dependency injection.
278
+ export const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
279
+ ReactCurrentDispatcher: {
280
+ current: {
281
+ readContext(context) {
282
+ return currentComponent._globalContext[context._id].props.value;
283
+ },
284
+ useCallback,
285
+ useContext,
286
+ useDebugValue,
287
+ useDeferredValue,
288
+ useEffect,
289
+ useId,
290
+ useImperativeHandle,
291
+ useInsertionEffect,
292
+ useLayoutEffect,
293
+ useMemo,
294
+ // useMutableSource, // experimental-only and replaced by uSES, likely not worth supporting
295
+ useReducer,
296
+ useRef,
297
+ useState,
298
+ useSyncExternalStore,
299
+ useTransition
300
+ }
301
+ }
302
+ };
node_modules/preact/compat/src/suspense-list.d.ts ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Intentionally not using a relative path to take advantage of
2
+ // the TS version resolution mechanism
3
+ import { Component, ComponentChild, ComponentChildren } from 'preact';
4
+
5
+ //
6
+ // SuspenseList
7
+ // -----------------------------------
8
+
9
+ export interface SuspenseListProps {
10
+ children?: ComponentChildren;
11
+ revealOrder?: 'forwards' | 'backwards' | 'together';
12
+ }
13
+
14
+ export class SuspenseList extends Component<SuspenseListProps> {
15
+ render(): ComponentChild;
16
+ }
node_modules/preact/compat/src/suspense-list.js ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Component, toChildArray } from 'preact';
2
+ import { suspended } from './suspense.js';
3
+
4
+ // Indexes to linked list nodes (nodes are stored as arrays to save bytes).
5
+ const SUSPENDED_COUNT = 0;
6
+ const RESOLVED_COUNT = 1;
7
+ const NEXT_NODE = 2;
8
+
9
+ // Having custom inheritance instead of a class here saves a lot of bytes.
10
+ export function SuspenseList() {
11
+ this._next = null;
12
+ this._map = null;
13
+ }
14
+
15
+ // Mark one of child's earlier suspensions as resolved.
16
+ // Some pending callbacks may become callable due to this
17
+ // (e.g. the last suspended descendant gets resolved when
18
+ // revealOrder === 'together'). Process those callbacks as well.
19
+ const resolve = (list, child, node) => {
20
+ if (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {
21
+ // The number a child (or any of its descendants) has been suspended
22
+ // matches the number of times it's been resolved. Therefore we
23
+ // mark the child as completely resolved by deleting it from ._map.
24
+ // This is used to figure out when *all* children have been completely
25
+ // resolved when revealOrder is 'together'.
26
+ list._map.delete(child);
27
+ }
28
+
29
+ // If revealOrder is falsy then we can do an early exit, as the
30
+ // callbacks won't get queued in the node anyway.
31
+ // If revealOrder is 'together' then also do an early exit
32
+ // if all suspended descendants have not yet been resolved.
33
+ if (
34
+ !list.props.revealOrder ||
35
+ (list.props.revealOrder[0] === 't' && list._map.size)
36
+ ) {
37
+ return;
38
+ }
39
+
40
+ // Walk the currently suspended children in order, calling their
41
+ // stored callbacks on the way. Stop if we encounter a child that
42
+ // has not been completely resolved yet.
43
+ node = list._next;
44
+ while (node) {
45
+ while (node.length > 3) {
46
+ node.pop()();
47
+ }
48
+ if (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {
49
+ break;
50
+ }
51
+ list._next = node = node[NEXT_NODE];
52
+ }
53
+ };
54
+
55
+ // Things we do here to save some bytes but are not proper JS inheritance:
56
+ // - call `new Component()` as the prototype
57
+ // - do not set `Suspense.prototype.constructor` to `Suspense`
58
+ SuspenseList.prototype = new Component();
59
+
60
+ SuspenseList.prototype._suspended = function (child) {
61
+ const list = this;
62
+ const delegated = suspended(list._vnode);
63
+
64
+ let node = list._map.get(child);
65
+ node[SUSPENDED_COUNT]++;
66
+
67
+ return unsuspend => {
68
+ const wrappedUnsuspend = () => {
69
+ if (!list.props.revealOrder) {
70
+ // Special case the undefined (falsy) revealOrder, as there
71
+ // is no need to coordinate a specific order or unsuspends.
72
+ unsuspend();
73
+ } else {
74
+ node.push(unsuspend);
75
+ resolve(list, child, node);
76
+ }
77
+ };
78
+ if (delegated) {
79
+ delegated(wrappedUnsuspend);
80
+ } else {
81
+ wrappedUnsuspend();
82
+ }
83
+ };
84
+ };
85
+
86
+ SuspenseList.prototype.render = function (props) {
87
+ this._next = null;
88
+ this._map = new Map();
89
+
90
+ const children = toChildArray(props.children);
91
+ if (props.revealOrder && props.revealOrder[0] === 'b') {
92
+ // If order === 'backwards' (or, well, anything starting with a 'b')
93
+ // then flip the child list around so that the last child will be
94
+ // the first in the linked list.
95
+ children.reverse();
96
+ }
97
+ // Build the linked list. Iterate through the children in reverse order
98
+ // so that `_next` points to the first linked list node to be resolved.
99
+ for (let i = children.length; i--; ) {
100
+ // Create a new linked list node as an array of form:
101
+ // [suspended_count, resolved_count, next_node]
102
+ // where suspended_count and resolved_count are numeric counters for
103
+ // keeping track how many times a node has been suspended and resolved.
104
+ //
105
+ // Note that suspended_count starts from 1 instead of 0, so we can block
106
+ // processing callbacks until componentDidMount has been called. In a sense
107
+ // node is suspended at least until componentDidMount gets called!
108
+ //
109
+ // Pending callbacks are added to the end of the node:
110
+ // [suspended_count, resolved_count, next_node, callback_0, callback_1, ...]
111
+ this._map.set(children[i], (this._next = [1, 0, this._next]));
112
+ }
113
+ return props.children;
114
+ };
115
+
116
+ SuspenseList.prototype.componentDidUpdate =
117
+ SuspenseList.prototype.componentDidMount = function () {
118
+ // Iterate through all children after mounting for two reasons:
119
+ // 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases
120
+ // each node[RELEASED_COUNT] by 1, therefore balancing the counters.
121
+ // The nodes can now be completely consumed from the linked list.
122
+ // 2. Handle nodes that might have gotten resolved between render and
123
+ // componentDidMount.
124
+ this._map.forEach((node, child) => {
125
+ resolve(this, child, node);
126
+ });
127
+ };
node_modules/preact/compat/src/suspense.d.ts ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Intentionally not using a relative path to take advantage of
2
+ // the TS version resolution mechanism
3
+ import { Component, ComponentChild, ComponentChildren } from 'preact';
4
+
5
+ //
6
+ // Suspense/lazy
7
+ // -----------------------------------
8
+ export function lazy<T>(
9
+ loader: () => Promise<{ default: T } | T>
10
+ ): T extends { default: infer U } ? U : T;
11
+
12
+ export interface SuspenseProps {
13
+ children?: ComponentChildren;
14
+ fallback: ComponentChildren;
15
+ }
16
+
17
+ export class Suspense extends Component<SuspenseProps> {
18
+ render(): ComponentChild;
19
+ }
node_modules/preact/compat/src/suspense.js ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Component, createElement, options, Fragment } from 'preact';
2
+ import { MODE_HYDRATE } from '../../src/constants';
3
+ import { assign } from './util';
4
+
5
+ const oldCatchError = options._catchError;
6
+ options._catchError = function (error, newVNode, oldVNode, errorInfo) {
7
+ if (error.then) {
8
+ /** @type {import('./internal').Component} */
9
+ let component;
10
+ let vnode = newVNode;
11
+
12
+ for (; (vnode = vnode._parent); ) {
13
+ if ((component = vnode._component) && component._childDidSuspend) {
14
+ if (newVNode._dom == null) {
15
+ newVNode._dom = oldVNode._dom;
16
+ newVNode._children = oldVNode._children;
17
+ }
18
+ // Don't call oldCatchError if we found a Suspense
19
+ return component._childDidSuspend(error, newVNode);
20
+ }
21
+ }
22
+ }
23
+ oldCatchError(error, newVNode, oldVNode, errorInfo);
24
+ };
25
+
26
+ const oldUnmount = options.unmount;
27
+ options.unmount = function (vnode) {
28
+ /** @type {import('./internal').Component} */
29
+ const component = vnode._component;
30
+ if (component) component._unmounted = true;
31
+ if (component && component._onResolve) {
32
+ component._onResolve();
33
+ }
34
+
35
+ // if the component is still hydrating
36
+ // most likely it is because the component is suspended
37
+ // we set the vnode.type as `null` so that it is not a typeof function
38
+ // so the unmount will remove the vnode._dom
39
+ if (component && vnode._flags & MODE_HYDRATE) {
40
+ vnode.type = null;
41
+ }
42
+
43
+ if (oldUnmount) oldUnmount(vnode);
44
+ };
45
+
46
+ function detachedClone(vnode, detachedParent, parentDom) {
47
+ if (vnode) {
48
+ if (vnode._component && vnode._component.__hooks) {
49
+ vnode._component.__hooks._list.forEach(effect => {
50
+ if (typeof effect._cleanup == 'function') effect._cleanup();
51
+ });
52
+
53
+ vnode._component.__hooks = null;
54
+ }
55
+
56
+ vnode = assign({}, vnode);
57
+ if (vnode._component != null) {
58
+ if (vnode._component._parentDom === parentDom) {
59
+ vnode._component._parentDom = detachedParent;
60
+ }
61
+
62
+ vnode._component._force = true;
63
+
64
+ vnode._component = null;
65
+ }
66
+
67
+ vnode._children =
68
+ vnode._children &&
69
+ vnode._children.map(child =>
70
+ detachedClone(child, detachedParent, parentDom)
71
+ );
72
+ }
73
+
74
+ return vnode;
75
+ }
76
+
77
+ function removeOriginal(vnode, detachedParent, originalParent) {
78
+ if (vnode && originalParent) {
79
+ vnode._original = null;
80
+ vnode._children =
81
+ vnode._children &&
82
+ vnode._children.map(child =>
83
+ removeOriginal(child, detachedParent, originalParent)
84
+ );
85
+
86
+ if (vnode._component) {
87
+ if (vnode._component._parentDom === detachedParent) {
88
+ if (vnode._dom) {
89
+ originalParent.appendChild(vnode._dom);
90
+ }
91
+ vnode._component._force = true;
92
+ vnode._component._parentDom = originalParent;
93
+ }
94
+ }
95
+ }
96
+
97
+ return vnode;
98
+ }
99
+
100
+ // having custom inheritance instead of a class here saves a lot of bytes
101
+ export function Suspense() {
102
+ // we do not call super here to golf some bytes...
103
+ this._pendingSuspensionCount = 0;
104
+ this._suspenders = null;
105
+ this._detachOnNextRender = null;
106
+ }
107
+
108
+ // Things we do here to save some bytes but are not proper JS inheritance:
109
+ // - call `new Component()` as the prototype
110
+ // - do not set `Suspense.prototype.constructor` to `Suspense`
111
+ Suspense.prototype = new Component();
112
+
113
+ /**
114
+ * @this {import('./internal').SuspenseComponent}
115
+ * @param {Promise} promise The thrown promise
116
+ * @param {import('./internal').VNode<any, any>} suspendingVNode The suspending component
117
+ */
118
+ Suspense.prototype._childDidSuspend = function (promise, suspendingVNode) {
119
+ const suspendingComponent = suspendingVNode._component;
120
+
121
+ /** @type {import('./internal').SuspenseComponent} */
122
+ const c = this;
123
+
124
+ if (c._suspenders == null) {
125
+ c._suspenders = [];
126
+ }
127
+ c._suspenders.push(suspendingComponent);
128
+
129
+ const resolve = suspended(c._vnode);
130
+
131
+ let resolved = false;
132
+ const onResolved = () => {
133
+ if (resolved || c._unmounted) return;
134
+
135
+ resolved = true;
136
+ suspendingComponent._onResolve = null;
137
+
138
+ if (resolve) {
139
+ resolve(onSuspensionComplete);
140
+ } else {
141
+ onSuspensionComplete();
142
+ }
143
+ };
144
+
145
+ suspendingComponent._onResolve = onResolved;
146
+
147
+ // Store and null _parentDom to prevent setState/forceUpdate from
148
+ // scheduling renders while suspended. Render would be a no-op anyway
149
+ // since renderComponent checks _parentDom, but this avoids queue churn.
150
+ const originalParentDom = suspendingComponent._parentDom;
151
+ suspendingComponent._parentDom = null;
152
+
153
+ const onSuspensionComplete = () => {
154
+ if (!--c._pendingSuspensionCount) {
155
+ // If the suspension was during hydration we don't need to restore the
156
+ // suspended children into the _children array
157
+ if (c.state._suspended) {
158
+ const suspendedVNode = c.state._suspended;
159
+ c._vnode._children[0] = removeOriginal(
160
+ suspendedVNode,
161
+ suspendedVNode._component._parentDom,
162
+ suspendedVNode._component._originalParentDom
163
+ );
164
+ }
165
+
166
+ c.setState({ _suspended: (c._detachOnNextRender = null) });
167
+
168
+ let suspended;
169
+ while ((suspended = c._suspenders.pop())) {
170
+ // Restore _parentDom before forceUpdate so render can proceed
171
+ suspended._parentDom = originalParentDom;
172
+ suspended.forceUpdate();
173
+ }
174
+ }
175
+ };
176
+
177
+ /**
178
+ * We do not set `suspended: true` during hydration because we want the actual markup
179
+ * to remain on screen and hydrate it when the suspense actually gets resolved.
180
+ * While in non-hydration cases the usual fallback -> component flow would occour.
181
+ */
182
+ if (
183
+ !c._pendingSuspensionCount++ &&
184
+ !(suspendingVNode._flags & MODE_HYDRATE)
185
+ ) {
186
+ c.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });
187
+ }
188
+ promise.then(onResolved, onResolved);
189
+ };
190
+
191
+ Suspense.prototype.componentWillUnmount = function () {
192
+ this._suspenders = [];
193
+ };
194
+
195
+ /**
196
+ * @this {import('./internal').SuspenseComponent}
197
+ * @param {import('./internal').SuspenseComponent["props"]} props
198
+ * @param {import('./internal').SuspenseState} state
199
+ */
200
+ Suspense.prototype.render = function (props, state) {
201
+ if (this._detachOnNextRender) {
202
+ // When the Suspense's _vnode was created by a call to createVNode
203
+ // (i.e. due to a setState further up in the tree)
204
+ // it's _children prop is null, in this case we "forget" about the parked vnodes to detach
205
+ if (this._vnode._children) {
206
+ const detachedParent = document.createElement('div');
207
+ const detachedComponent = this._vnode._children[0]._component;
208
+ this._vnode._children[0] = detachedClone(
209
+ this._detachOnNextRender,
210
+ detachedParent,
211
+ (detachedComponent._originalParentDom = detachedComponent._parentDom)
212
+ );
213
+ }
214
+
215
+ this._detachOnNextRender = null;
216
+ }
217
+
218
+ // Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:
219
+ /** @type {import('./internal').VNode} */
220
+ const fallback =
221
+ state._suspended && createElement(Fragment, null, props.fallback);
222
+ if (fallback) fallback._flags &= ~MODE_HYDRATE;
223
+
224
+ return [
225
+ createElement(Fragment, null, state._suspended ? null : props.children),
226
+ fallback
227
+ ];
228
+ };
229
+
230
+ /**
231
+ * Checks and calls the parent component's _suspended method, passing in the
232
+ * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified
233
+ * that one of its children/descendants suspended.
234
+ *
235
+ * The parent MAY return a callback. The callback will get called when the
236
+ * suspension resolves, notifying the parent of the fact.
237
+ * Moreover, the callback gets function `unsuspend` as a parameter. The resolved
238
+ * child descendant will not actually get unsuspended until `unsuspend` gets called.
239
+ * This is a way for the parent to delay unsuspending.
240
+ *
241
+ * If the parent does not return a callback then the resolved vnode
242
+ * gets unsuspended immediately when it resolves.
243
+ *
244
+ * @param {import('./internal').VNode} vnode
245
+ * @returns {((unsuspend: () => void) => void)?}
246
+ */
247
+ export function suspended(vnode) {
248
+ let component = vnode._parent && vnode._parent._component;
249
+ return component && component._suspended && component._suspended(vnode);
250
+ }
251
+
252
+ export function lazy(loader) {
253
+ let prom;
254
+ let component = null;
255
+ let error;
256
+ let resolved;
257
+
258
+ function Lazy(props) {
259
+ if (!prom) {
260
+ prom = loader();
261
+ prom.then(
262
+ exports => {
263
+ if (exports) {
264
+ component = exports.default || exports;
265
+ }
266
+ resolved = true;
267
+ },
268
+ e => {
269
+ error = e;
270
+ resolved = true;
271
+ }
272
+ );
273
+ }
274
+
275
+ if (error) {
276
+ throw error;
277
+ }
278
+
279
+ if (!resolved) {
280
+ throw prom;
281
+ }
282
+
283
+ return component ? createElement(component, props) : null;
284
+ }
285
+
286
+ Lazy.displayName = 'Lazy';
287
+ Lazy._forwarded = true;
288
+ return Lazy;
289
+ }
node_modules/preact/compat/src/util.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Assign properties from `props` to `obj`
3
+ * @template O, P The obj and props types
4
+ * @param {O} obj The object to copy properties to
5
+ * @param {P} props The object to copy properties from
6
+ * @returns {O & P}
7
+ */
8
+ export function assign(obj, props) {
9
+ for (let i in props) obj[i] = props[i];
10
+ return /** @type {O & P} */ (obj);
11
+ }
12
+
13
+ /**
14
+ * Check if two objects have a different shape
15
+ * @param {object} a
16
+ * @param {object} b
17
+ * @returns {boolean}
18
+ */
19
+ export function shallowDiffers(a, b) {
20
+ for (let i in a) if (i !== '__source' && !(i in b)) return true;
21
+ for (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;
22
+ return false;
23
+ }
24
+
25
+ /**
26
+ * Check if two values are the same value
27
+ * @param {*} x
28
+ * @param {*} y
29
+ * @returns {boolean}
30
+ */
31
+ export function is(x, y) {
32
+ return (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);
33
+ }
node_modules/preact/compat/test-utils.js ADDED
@@ -0,0 +1 @@
 
 
1
+ module.exports = require('preact/test-utils');
node_modules/preact/compat/test-utils.mjs ADDED
@@ -0,0 +1 @@
 
 
1
+ export * from 'preact/test-utils';
node_modules/preact/debug/dist/debug.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ var n=require("preact");require("preact/devtools");var e={};function t(e){return e.type===n.Fragment?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var o=[],r=[];function a(){return o.length>0?o[o.length-1]:null}var i=!0;function s(e){return"function"==typeof e.type&&e.type!=n.Fragment}function c(n){for(var e=[n],o=n;null!=o.__o;)e.push(o.__o),o=o.__o;return e.reduce(function(n,e){n+=" in "+t(e);var o=e.__source;return o?n+=" (at "+o.fileName+":"+o.lineNumber+")":i&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),i=!1,n+"\n"},"")}var l="function"==typeof WeakMap;function u(n){var e=[];return n.__k?(n.__k.forEach(function(n){n&&"function"==typeof n.type?e.push.apply(e,u(n)):n&&"string"==typeof n.type&&e.push(n.type)}),e):e}function f(n){return n?"function"==typeof n.type?null==n.__?null!=n.__e&&null!=n.__e.parentNode?n.__e.parentNode.localName:"":f(n.__):n.type:""}var d=n.Component.prototype.setState;function p(n){return"table"===n||"tfoot"===n||"tbody"===n||"thead"===n||"td"===n||"tr"===n||"th"===n}n.Component.prototype.setState=function(n,e){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+c(a())),d.call(this,n,e)};var h=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,v=n.Component.prototype.forceUpdate;function y(n){var e=n.props,o=t(n),r="";for(var a in e)if(e.hasOwnProperty(a)&&"children"!==a){var i=e[a];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),r+=" "+a+"="+JSON.stringify(i)}var s=e.children;return"<"+o+r+(s&&s.length?">..</"+o+">":" />")}n.Component.prototype.forceUpdate=function(n){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+c(a())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+c(this.__v)),v.call(this,n)},n.options.__m=function(n,e){var t=n.type,o=e.map(function(n){return n&&n.localName}).filter(Boolean);console.error('Expected a DOM node of type "'+t+'" but found "'+o.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+c(n))},function(){!function(){var e=n.options.__b,t=n.options.diffed,a=n.options.__,i=n.options.vnode,c=n.options.__r;n.options.diffed=function(n){s(n)&&r.pop(),o.pop(),t&&t(n)},n.options.__b=function(n){s(n)&&o.push(n),e&&e(n)},n.options.__=function(n,e){r=[],a&&a(n,e)},n.options.vnode=function(n){n.__o=r.length>0?r[r.length-1]:null,i&&i(n)},n.options.__r=function(n){s(n)&&r.push(n),c&&c(n)}}();var a=!1,i=n.options.__b,d=n.options.diffed,v=n.options.vnode,m=n.options.__r,b=n.options.__e,w=n.options.__,g=n.options.__h,E=l?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,k=[];n.options.__e=function(n,e,o,r){if(e&&e.__c&&"function"==typeof n.then){var a=n;n=new Error("Missing Suspense. The throwing component was: "+t(e));for(var i=e;i;i=i.__)if(i.__c&&i.__c.__c){n=a;break}if(n instanceof Error)throw n}try{(r=r||{}).componentStack=c(e),b(n,e,o,r),"function"!=typeof n.then&&setTimeout(function(){throw n})}catch(n){throw n}},n.options.__=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var o;switch(e.nodeType){case 1:case 11:case 9:o=!0;break;default:o=!1}if(!o){var r=t(n);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+e+" instead: render(<"+r+" />, "+e+");")}w&&w(n,e)},n.options.__b=function(n){var o=n.type;if(a=!0,void 0===o)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+y(n)+"\n\n"+c(n));if(null!=o&&"object"==typeof o){if(void 0!==o.__k&&void 0!==o.__e)throw new Error("Invalid type passed to createElement(): "+o+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+t(n)+" = "+y(o)+";\n let vnode = <My"+t(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+c(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(o)?"array":o))}if(void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+y(n)+"\n\n"+c(n));if("string"==typeof n.type)for(var r in n.props)if("o"===r[0]&&"n"===r[1]&&"function"!=typeof n.props[r]&&null!=n.props[r])throw new Error("Component's \""+r+'" property should be a function, but got ['+typeof n.props[r]+"] instead\n"+y(n)+"\n\n"+c(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&E&&!E.lazyPropTypes.has(n.type)){var s="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var l=n.type();E.lazyPropTypes.set(n.type,!0),console.warn(s+"Component wrapped in lazy() is "+t(l))}catch(n){console.warn(s+"We will log the wrapped component's name once it is loaded.")}}var u=n.props;n.type.__f&&delete(u=function(n,e){for(var t in e)n[t]=e[t];return n}({},u)).ref,function(n,t,o,r,a){Object.keys(n).forEach(function(o){var i;try{i=n[o](t,o,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){i=n}i&&!(i.message in e)&&(e[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(n.type.propTypes,u,0,t(n),function(){return c(n)})}i&&i(n)};var T,_=0;n.options.__r=function(n){m&&m(n),a=!0;var e=n.__c;if(e===T?_++:_=1,_>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+t(n));T=e},n.options.__h=function(n,e,t){if(!n||!a)throw new Error("Hook can only be invoked from render methods.");g&&g(n,e,t)};var O=function(n,e){return{get:function(){var t="get"+n+e;k&&k.indexOf(t)<0&&(k.push(t),console.warn("getting vnode."+n+" is deprecated, "+e))},set:function(){var t="set"+n+e;k&&k.indexOf(t)<0&&(k.push(t),console.warn("setting vnode."+n+" is not allowed, "+e))}}},I={nodeName:O("nodeName","use vnode.type"),attributes:O("attributes","use vnode.props"),children:O("children","use vnode.props.children")},x=Object.create({},I);n.options.vnode=function(n){var e=n.props;if(null!==n.type&&null!=e&&("__source"in e||"__self"in e)){var t=n.props={};for(var o in e){var r=e[o];"__source"===o?n.__source=r:"__self"===o?n.__self=r:t[o]=r}}n.__proto__=x,v&&v(n)},n.options.diffed=function(n){var e,o=n.type,r=n.__;if(n.__k&&n.__k.forEach(function(e){if("object"==typeof e&&e&&void 0===e.type){var t=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+t+"}.\n\n"+c(n))}}),n.__c===T&&(_=0),"string"==typeof o&&(p(o)||"p"===o||"a"===o||"button"===o)){var i=f(r);if(""!==i&&p(o))"table"===o&&"td"!==i&&p(i)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+y(n)+"\n\n"+c(n)):"thead"!==o&&"tfoot"!==o&&"tbody"!==o||"table"===i?"tr"===o&&"thead"!==i&&"tfoot"!==i&&"tbody"!==i?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+y(n)+"\n\n"+c(n)):"td"===o&&"tr"!==i?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+y(n)+"\n\n"+c(n)):"th"===o&&"tr"!==i&&console.error("Improper nesting of table. Your <th> should have a <tr>."+y(n)+"\n\n"+c(n)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+y(n)+"\n\n"+c(n));else if("p"===o){var s=u(n).filter(function(n){return h.test(n)});s.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+s.join(", ")+" as child-elements."+y(n)+"\n\n"+c(n))}else"a"!==o&&"button"!==o||-1!==u(n).indexOf(o)&&console.error("Improper nesting of interactive content. Your <"+o+"> should not have other "+("a"===o?"anchor":"button")+" tags as child-elements."+y(n)+"\n\n"+c(n))}if(a=!1,d&&d(n),null!=n.__k)for(var l=[],v=0;v<n.__k.length;v++){var m=n.__k[v];if(m&&null!=m.key){var b=m.key;if(-1!==l.indexOf(b)){console.error('Following component has two or more children with the same key attribute: "'+b+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+y(n)+"\n\n"+c(n));break}l.push(b)}}if(null!=n.__c&&null!=n.__c.__H){var w=n.__c.__H.__;if(w)for(var g=0;g<w.length;g+=1){var E=w[g];if(E.__H)for(var k=0;k<E.__H.length;k++)if((e=E.__H[k])!=e){var O=t(n);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+g+" in component "+O+" was called with NaN.")}}}}}(),exports.getCurrentVNode=a,exports.getDisplayName=t,exports.getOwnerStack=c,exports.resetPropWarnings=function(){e={}};
2
+ //# sourceMappingURL=debug.js.map
node_modules/preact/debug/dist/debug.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"debug.js","sources":["../src/check-props.js","../src/component-stack.js","../src/debug.js","../src/constants.js","../src/util.js","../src/index.js"],"sourcesContent":["const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nlet loggedTypeFailures = {};\n\n/**\n * Reset the history of which prop type warnings have been logged.\n */\nexport function resetPropWarnings() {\n\tloggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * Adapted from https://github.com/facebook/prop-types/blob/master/checkPropTypes.js\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n */\nexport function checkPropTypes(\n\ttypeSpecs,\n\tvalues,\n\tlocation,\n\tcomponentName,\n\tgetStack\n) {\n\tObject.keys(typeSpecs).forEach(typeSpecName => {\n\t\tlet error;\n\t\ttry {\n\t\t\terror = typeSpecs[typeSpecName](\n\t\t\t\tvalues,\n\t\t\t\ttypeSpecName,\n\t\t\t\tcomponentName,\n\t\t\t\tlocation,\n\t\t\t\tnull,\n\t\t\t\tReactPropTypesSecret\n\t\t\t);\n\t\t} catch (e) {\n\t\t\terror = e;\n\t\t}\n\t\tif (error && !(error.message in loggedTypeFailures)) {\n\t\t\tloggedTypeFailures[error.message] = true;\n\t\t\tconsole.error(\n\t\t\t\t`Failed ${location} type: ${error.message}${\n\t\t\t\t\t(getStack && `\\n${getStack()}`) || ''\n\t\t\t\t}`\n\t\t\t);\n\t\t}\n\t});\n}\n","import { options, Fragment } from 'preact';\n\n/**\n * Get human readable name of the component/dom node\n * @param {import('./internal').VNode} vnode\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function getDisplayName(vnode) {\n\tif (vnode.type === Fragment) {\n\t\treturn 'Fragment';\n\t} else if (typeof vnode.type == 'function') {\n\t\treturn vnode.type.displayName || vnode.type.name;\n\t} else if (typeof vnode.type == 'string') {\n\t\treturn vnode.type;\n\t}\n\n\treturn '#text';\n}\n\n/**\n * Used to keep track of the currently rendered `vnode` and print it\n * in debug messages.\n */\nlet renderStack = [];\n\n/**\n * Keep track of the current owners. An owner describes a component\n * which was responsible to render a specific `vnode`. This exclude\n * children that are passed via `props.children`, because they belong\n * to the parent owner.\n *\n * ```jsx\n * const Foo = props => <div>{props.children}</div> // div's owner is Foo\n * const Bar = props => {\n * return (\n * <Foo><span /></Foo> // Foo's owner is Bar, span's owner is Bar\n * )\n * }\n * ```\n *\n * Note: A `vnode` may be hoisted to the root scope due to compiler\n * optimiztions. In these cases the `_owner` will be different.\n */\nlet ownerStack = [];\n\n/**\n * Get the currently rendered `vnode`\n * @returns {import('./internal').VNode | null}\n */\nexport function getCurrentVNode() {\n\treturn renderStack.length > 0 ? renderStack[renderStack.length - 1] : null;\n}\n\n/**\n * If the user doesn't have `@babel/plugin-transform-react-jsx-source`\n * somewhere in his tool chain we can't print the filename and source\n * location of a component. In that case we just omit that, but we'll\n * print a helpful message to the console, notifying the user of it.\n */\nlet showJsxSourcePluginWarning = true;\n\n/**\n * Check if a `vnode` is a possible owner.\n * @param {import('./internal').VNode} vnode\n */\nfunction isPossibleOwner(vnode) {\n\treturn typeof vnode.type == 'function' && vnode.type != Fragment;\n}\n\n/**\n * Return the component stack that was captured up to this point.\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function getOwnerStack(vnode) {\n\tconst stack = [vnode];\n\tlet next = vnode;\n\twhile (next._owner != null) {\n\t\tstack.push(next._owner);\n\t\tnext = next._owner;\n\t}\n\n\treturn stack.reduce((acc, owner) => {\n\t\tacc += ` in ${getDisplayName(owner)}`;\n\n\t\tconst source = owner.__source;\n\t\tif (source) {\n\t\t\tacc += ` (at ${source.fileName}:${source.lineNumber})`;\n\t\t} else if (showJsxSourcePluginWarning) {\n\t\t\tconsole.warn(\n\t\t\t\t'Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.'\n\t\t\t);\n\t\t}\n\t\tshowJsxSourcePluginWarning = false;\n\n\t\treturn (acc += '\\n');\n\t}, '');\n}\n\n/**\n * Setup code to capture the component trace while rendering. Note that\n * we cannot simply traverse `vnode._parent` upwards, because we have some\n * debug messages for `this.setState` where the `vnode` is `undefined`.\n */\nexport function setupComponentStack() {\n\tlet oldDiff = options._diff;\n\tlet oldDiffed = options.diffed;\n\tlet oldRoot = options._root;\n\tlet oldVNode = options.vnode;\n\tlet oldRender = options._render;\n\n\toptions.diffed = vnode => {\n\t\tif (isPossibleOwner(vnode)) {\n\t\t\townerStack.pop();\n\t\t}\n\t\trenderStack.pop();\n\t\tif (oldDiffed) oldDiffed(vnode);\n\t};\n\n\toptions._diff = vnode => {\n\t\tif (isPossibleOwner(vnode)) {\n\t\t\trenderStack.push(vnode);\n\t\t}\n\t\tif (oldDiff) oldDiff(vnode);\n\t};\n\n\toptions._root = (vnode, parent) => {\n\t\townerStack = [];\n\t\tif (oldRoot) oldRoot(vnode, parent);\n\t};\n\n\toptions.vnode = vnode => {\n\t\tvnode._owner =\n\t\t\townerStack.length > 0 ? ownerStack[ownerStack.length - 1] : null;\n\t\tif (oldVNode) oldVNode(vnode);\n\t};\n\n\toptions._render = vnode => {\n\t\tif (isPossibleOwner(vnode)) {\n\t\t\townerStack.push(vnode);\n\t\t}\n\n\t\tif (oldRender) oldRender(vnode);\n\t};\n}\n","import { checkPropTypes } from './check-props';\nimport { options, Component } from 'preact';\nimport {\n\tELEMENT_NODE,\n\tDOCUMENT_NODE,\n\tDOCUMENT_FRAGMENT_NODE\n} from './constants';\nimport {\n\tgetOwnerStack,\n\tsetupComponentStack,\n\tgetCurrentVNode,\n\tgetDisplayName\n} from './component-stack';\nimport { assign, isNaN } from './util';\n\nconst isWeakMapSupported = typeof WeakMap == 'function';\n\n/**\n * @param {import('./internal').VNode} vnode\n * @returns {Array<string>}\n */\nfunction getDomChildren(vnode) {\n\tlet domChildren = [];\n\n\tif (!vnode._children) return domChildren;\n\n\tvnode._children.forEach(child => {\n\t\tif (child && typeof child.type === 'function') {\n\t\t\tdomChildren.push.apply(domChildren, getDomChildren(child));\n\t\t} else if (child && typeof child.type === 'string') {\n\t\t\tdomChildren.push(child.type);\n\t\t}\n\t});\n\n\treturn domChildren;\n}\n\n/**\n * @param {import('./internal').VNode} parent\n * @returns {string}\n */\nfunction getClosestDomNodeParentName(parent) {\n\tif (!parent) return '';\n\tif (typeof parent.type == 'function') {\n\t\tif (parent._parent == null) {\n\t\t\tif (parent._dom != null && parent._dom.parentNode != null) {\n\t\t\t\treturn parent._dom.parentNode.localName;\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\t\treturn getClosestDomNodeParentName(parent._parent);\n\t}\n\treturn /** @type {string} */ (parent.type);\n}\n\nexport function initDebug() {\n\tsetupComponentStack();\n\n\tlet hooksAllowed = false;\n\n\t/* eslint-disable no-console */\n\tlet oldBeforeDiff = options._diff;\n\tlet oldDiffed = options.diffed;\n\tlet oldVnode = options.vnode;\n\tlet oldRender = options._render;\n\tlet oldCatchError = options._catchError;\n\tlet oldRoot = options._root;\n\tlet oldHook = options._hook;\n\tconst warnedComponents = !isWeakMapSupported\n\t\t? null\n\t\t: {\n\t\t\t\tuseEffect: new WeakMap(),\n\t\t\t\tuseLayoutEffect: new WeakMap(),\n\t\t\t\tlazyPropTypes: new WeakMap()\n\t\t\t};\n\tconst deprecations = [];\n\n\toptions._catchError = (error, vnode, oldVNode, errorInfo) => {\n\t\tlet component = vnode && vnode._component;\n\t\tif (component && typeof error.then == 'function') {\n\t\t\tconst promise = error;\n\t\t\terror = new Error(\n\t\t\t\t`Missing Suspense. The throwing component was: ${getDisplayName(vnode)}`\n\t\t\t);\n\n\t\t\tlet parent = vnode;\n\t\t\tfor (; parent; parent = parent._parent) {\n\t\t\t\tif (parent._component && parent._component._childDidSuspend) {\n\t\t\t\t\terror = promise;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// We haven't recovered and we know at this point that there is no\n\t\t\t// Suspense component higher up in the tree\n\t\t\tif (error instanceof Error) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\terrorInfo = errorInfo || {};\n\t\t\terrorInfo.componentStack = getOwnerStack(vnode);\n\t\t\toldCatchError(error, vnode, oldVNode, errorInfo);\n\n\t\t\t// when an error was handled by an ErrorBoundary we will nonetheless emit an error\n\t\t\t// event on the window object. This is to make up for react compatibility in dev mode\n\t\t\t// and thus make the Next.js dev overlay work.\n\t\t\tif (typeof error.then != 'function') {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthrow error;\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tthrow e;\n\t\t}\n\t};\n\n\toptions._root = (vnode, parentNode) => {\n\t\tif (!parentNode) {\n\t\t\tthrow new Error(\n\t\t\t\t'Undefined parent passed to render(), this is the second argument.\\n' +\n\t\t\t\t\t'Check if the element is available in the DOM/has the correct id.'\n\t\t\t);\n\t\t}\n\n\t\tlet isValid;\n\t\tswitch (parentNode.nodeType) {\n\t\t\tcase ELEMENT_NODE:\n\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\tcase DOCUMENT_NODE:\n\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tisValid = false;\n\t\t}\n\n\t\tif (!isValid) {\n\t\t\tlet componentName = getDisplayName(vnode);\n\t\t\tthrow new Error(\n\t\t\t\t`Expected a valid HTML node as a second argument to render.\tReceived ${parentNode} instead: render(<${componentName} />, ${parentNode});`\n\t\t\t);\n\t\t}\n\n\t\tif (oldRoot) oldRoot(vnode, parentNode);\n\t};\n\n\toptions._diff = vnode => {\n\t\tlet { type } = vnode;\n\n\t\thooksAllowed = true;\n\n\t\tif (type === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t'Undefined component passed to createElement()\\n\\n' +\n\t\t\t\t\t'You likely forgot to export your component or might have mixed up default and named imports' +\n\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t);\n\t\t} else if (type != null && typeof type == 'object') {\n\t\t\tif (type._children !== undefined && type._dom !== undefined) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Invalid type passed to createElement(): ${type}\\n\\n` +\n\t\t\t\t\t\t'Did you accidentally pass a JSX literal as JSX twice?\\n\\n' +\n\t\t\t\t\t\t` let My${getDisplayName(vnode)} = ${serializeVNode(type)};\\n` +\n\t\t\t\t\t\t` let vnode = <My${getDisplayName(vnode)} />;\\n\\n` +\n\t\t\t\t\t\t'This usually happens when you export a JSX literal and not the component.' +\n\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthrow new Error(\n\t\t\t\t'Invalid type passed to createElement(): ' +\n\t\t\t\t\t(Array.isArray(type) ? 'array' : type)\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\tvnode.ref !== undefined &&\n\t\t\ttypeof vnode.ref != 'function' &&\n\t\t\ttypeof vnode.ref != 'object' &&\n\t\t\t!('$$typeof' in vnode) // allow string refs when preact-compat is installed\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t`Component's \"ref\" property should be a function, or an object created ` +\n\t\t\t\t\t`by createRef(), but got [${typeof vnode.ref}] instead\\n` +\n\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t);\n\t\t}\n\n\t\tif (typeof vnode.type == 'string') {\n\t\t\tfor (const key in vnode.props) {\n\t\t\t\tif (\n\t\t\t\t\tkey[0] === 'o' &&\n\t\t\t\t\tkey[1] === 'n' &&\n\t\t\t\t\ttypeof vnode.props[key] != 'function' &&\n\t\t\t\t\tvnode.props[key] != null\n\t\t\t\t) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Component's \"${key}\" property should be a function, ` +\n\t\t\t\t\t\t\t`but got [${typeof vnode.props[key]}] instead\\n` +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check prop-types if available\n\t\tif (typeof vnode.type == 'function' && vnode.type.propTypes) {\n\t\t\tif (\n\t\t\t\tvnode.type.displayName === 'Lazy' &&\n\t\t\t\twarnedComponents &&\n\t\t\t\t!warnedComponents.lazyPropTypes.has(vnode.type)\n\t\t\t) {\n\t\t\t\tconst m =\n\t\t\t\t\t'PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ';\n\t\t\t\ttry {\n\t\t\t\t\tconst lazyVNode = vnode.type();\n\t\t\t\t\twarnedComponents.lazyPropTypes.set(vnode.type, true);\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\tm + `Component wrapped in lazy() is ${getDisplayName(lazyVNode)}`\n\t\t\t\t\t);\n\t\t\t\t} catch (promise) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\tm + \"We will log the wrapped component's name once it is loaded.\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet values = vnode.props;\n\t\t\tif (vnode.type._forwarded) {\n\t\t\t\tvalues = assign({}, values);\n\t\t\t\tdelete values.ref;\n\t\t\t}\n\n\t\t\tcheckPropTypes(\n\t\t\t\tvnode.type.propTypes,\n\t\t\t\tvalues,\n\t\t\t\t'prop',\n\t\t\t\tgetDisplayName(vnode),\n\t\t\t\t() => getOwnerStack(vnode)\n\t\t\t);\n\t\t}\n\n\t\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n\t};\n\n\tlet renderCount = 0;\n\tlet currentComponent;\n\toptions._render = vnode => {\n\t\tif (oldRender) {\n\t\t\toldRender(vnode);\n\t\t}\n\t\thooksAllowed = true;\n\n\t\tconst nextComponent = vnode._component;\n\t\tif (nextComponent === currentComponent) {\n\t\t\trenderCount++;\n\t\t} else {\n\t\t\trenderCount = 1;\n\t\t}\n\n\t\tif (renderCount >= 25) {\n\t\t\tthrow new Error(\n\t\t\t\t`Too many re-renders. This is limited to prevent an infinite loop ` +\n\t\t\t\t\t`which may lock up your browser. The component causing this is: ${getDisplayName(\n\t\t\t\t\t\tvnode\n\t\t\t\t\t)}`\n\t\t\t);\n\t\t}\n\n\t\tcurrentComponent = nextComponent;\n\t};\n\n\toptions._hook = (comp, index, type) => {\n\t\tif (!comp || !hooksAllowed) {\n\t\t\tthrow new Error('Hook can only be invoked from render methods.');\n\t\t}\n\n\t\tif (oldHook) oldHook(comp, index, type);\n\t};\n\n\t// Ideally we'd want to print a warning once per component, but we\n\t// don't have access to the vnode that triggered it here. As a\n\t// compromise and to avoid flooding the console with warnings we\n\t// print each deprecation warning only once.\n\tconst warn = (property, message) => ({\n\t\tget() {\n\t\t\tconst key = 'get' + property + message;\n\t\t\tif (deprecations && deprecations.indexOf(key) < 0) {\n\t\t\t\tdeprecations.push(key);\n\t\t\t\tconsole.warn(`getting vnode.${property} is deprecated, ${message}`);\n\t\t\t}\n\t\t},\n\t\tset() {\n\t\t\tconst key = 'set' + property + message;\n\t\t\tif (deprecations && deprecations.indexOf(key) < 0) {\n\t\t\t\tdeprecations.push(key);\n\t\t\t\tconsole.warn(`setting vnode.${property} is not allowed, ${message}`);\n\t\t\t}\n\t\t}\n\t});\n\n\tconst deprecatedAttributes = {\n\t\tnodeName: warn('nodeName', 'use vnode.type'),\n\t\tattributes: warn('attributes', 'use vnode.props'),\n\t\tchildren: warn('children', 'use vnode.props.children')\n\t};\n\n\tconst deprecatedProto = Object.create({}, deprecatedAttributes);\n\n\toptions.vnode = vnode => {\n\t\tconst props = vnode.props;\n\t\tif (\n\t\t\tvnode.type !== null &&\n\t\t\tprops != null &&\n\t\t\t('__source' in props || '__self' in props)\n\t\t) {\n\t\t\tconst newProps = (vnode.props = {});\n\t\t\tfor (let i in props) {\n\t\t\t\tconst v = props[i];\n\t\t\t\tif (i === '__source') vnode.__source = v;\n\t\t\t\telse if (i === '__self') vnode.__self = v;\n\t\t\t\telse newProps[i] = v;\n\t\t\t}\n\t\t}\n\n\t\t// eslint-disable-next-line\n\t\tvnode.__proto__ = deprecatedProto;\n\t\tif (oldVnode) oldVnode(vnode);\n\t};\n\n\toptions.diffed = vnode => {\n\t\tconst { type, _parent: parent } = vnode;\n\t\t// Check if the user passed plain objects as children. Note that we cannot\n\t\t// move this check into `options.vnode` because components can receive\n\t\t// children in any shape they want (e.g.\n\t\t// `<MyJSONFormatter>{{ foo: 123, bar: \"abc\" }}</MyJSONFormatter>`).\n\t\t// Putting this check in `options.diffed` ensures that\n\t\t// `vnode._children` is set and that we only validate the children\n\t\t// that were actually rendered.\n\t\tif (vnode._children) {\n\t\t\tvnode._children.forEach(child => {\n\t\t\t\tif (typeof child === 'object' && child && child.type === undefined) {\n\t\t\t\t\tconst keys = Object.keys(child).join(',');\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Objects are not valid as a child. Encountered an object with the keys {${keys}}.` +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (vnode._component === currentComponent) {\n\t\t\trenderCount = 0;\n\t\t}\n\n\t\tif (\n\t\t\ttypeof type === 'string' &&\n\t\t\t(isTableElement(type) ||\n\t\t\t\ttype === 'p' ||\n\t\t\t\ttype === 'a' ||\n\t\t\t\ttype === 'button')\n\t\t) {\n\t\t\t// Avoid false positives when Preact only partially rendered the\n\t\t\t// HTML tree. Whilst we attempt to include the outer DOM in our\n\t\t\t// validation, this wouldn't work on the server for\n\t\t\t// `preact-render-to-string`. There we'd otherwise flood the terminal\n\t\t\t// with false positives, which we'd like to avoid.\n\t\t\tlet domParentName = getClosestDomNodeParentName(parent);\n\t\t\tif (domParentName !== '' && isTableElement(type)) {\n\t\t\t\tif (\n\t\t\t\t\ttype === 'table' &&\n\t\t\t\t\t// Tables can be nested inside each other if it's inside a cell.\n\t\t\t\t\t// See https://developer.mozilla.org/en-US/docs/Learn/HTML/Tables/Advanced#nesting_tables\n\t\t\t\t\tdomParentName !== 'td' &&\n\t\t\t\t\tisTableElement(domParentName)\n\t\t\t\t) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Improper nesting of table. Your <table> should not have a table-node parent.' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t} else if (\n\t\t\t\t\t(type === 'thead' || type === 'tfoot' || type === 'tbody') &&\n\t\t\t\t\tdomParentName !== 'table'\n\t\t\t\t) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent.' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t} else if (\n\t\t\t\t\ttype === 'tr' &&\n\t\t\t\t\tdomParentName !== 'thead' &&\n\t\t\t\t\tdomParentName !== 'tfoot' &&\n\t\t\t\t\tdomParentName !== 'tbody'\n\t\t\t\t) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent.' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t} else if (type === 'td' && domParentName !== 'tr') {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Improper nesting of table. Your <td> should have a <tr> parent.' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t} else if (type === 'th' && domParentName !== 'tr') {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Improper nesting of table. Your <th> should have a <tr>.' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else if (type === 'p') {\n\t\t\t\tlet illegalDomChildrenTypes = getDomChildren(vnode).filter(childType =>\n\t\t\t\t\tILLEGAL_PARAGRAPH_CHILD_ELEMENTS.test(childType)\n\t\t\t\t);\n\t\t\t\tif (illegalDomChildrenTypes.length) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Improper nesting of paragraph. Your <p> should not have ' +\n\t\t\t\t\t\t\tillegalDomChildrenTypes.join(', ') +\n\t\t\t\t\t\t\t' as child-elements.' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else if (type === 'a' || type === 'button') {\n\t\t\t\tif (getDomChildren(vnode).indexOf(type) !== -1) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t`Improper nesting of interactive content. Your <${type}>` +\n\t\t\t\t\t\t\t` should not have other ${type === 'a' ? 'anchor' : 'button'}` +\n\t\t\t\t\t\t\t' tags as child-elements.' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\thooksAllowed = false;\n\n\t\tif (oldDiffed) oldDiffed(vnode);\n\n\t\tif (vnode._children != null) {\n\t\t\tconst keys = [];\n\t\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\t\tconst child = vnode._children[i];\n\t\t\t\tif (!child || child.key == null) continue;\n\n\t\t\t\tconst key = child.key;\n\t\t\t\tif (keys.indexOf(key) !== -1) {\n\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t'Following component has two or more children with the ' +\n\t\t\t\t\t\t\t`same key attribute: \"${key}\". This may cause glitches and misbehavior ` +\n\t\t\t\t\t\t\t'in rendering process. Component: \\n\\n' +\n\t\t\t\t\t\t\tserializeVNode(vnode) +\n\t\t\t\t\t\t\t`\\n\\n${getOwnerStack(vnode)}`\n\t\t\t\t\t);\n\n\t\t\t\t\t// Break early to not spam the console\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tkeys.push(key);\n\t\t\t}\n\t\t}\n\n\t\tif (vnode._component != null && vnode._component.__hooks != null) {\n\t\t\t// Validate that none of the hooks in this component contain arguments that are NaN.\n\t\t\t// This is a common mistake that can be hard to debug, so we want to catch it early.\n\t\t\tconst hooks = vnode._component.__hooks._list;\n\t\t\tif (hooks) {\n\t\t\t\tfor (let i = 0; i < hooks.length; i += 1) {\n\t\t\t\t\tconst hook = hooks[i];\n\t\t\t\t\tif (hook._args) {\n\t\t\t\t\t\tfor (let j = 0; j < hook._args.length; j++) {\n\t\t\t\t\t\t\tconst arg = hook._args[j];\n\t\t\t\t\t\t\tif (isNaN(arg)) {\n\t\t\t\t\t\t\t\tconst componentName = getDisplayName(vnode);\n\t\t\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\t\t`Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index ${i} in component ${componentName} was called with NaN.`\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\nconst setState = Component.prototype.setState;\nComponent.prototype.setState = function (update, callback) {\n\tif (this._vnode == null) {\n\t\t// `this._vnode` will be `null` during componentWillMount. But it\n\t\t// is perfectly valid to call `setState` during cWM. So we\n\t\t// need an additional check to verify that we are dealing with a\n\t\t// call inside constructor.\n\t\tif (this.state == null) {\n\t\t\tconsole.warn(\n\t\t\t\t`Calling \"this.setState\" inside the constructor of a component is a ` +\n\t\t\t\t\t`no-op and might be a bug in your application. Instead, set ` +\n\t\t\t\t\t`\"this.state = {}\" directly.\\n\\n${getOwnerStack(getCurrentVNode())}`\n\t\t\t);\n\t\t}\n\t}\n\n\treturn setState.call(this, update, callback);\n};\n\nfunction isTableElement(type) {\n\treturn (\n\t\ttype === 'table' ||\n\t\ttype === 'tfoot' ||\n\t\ttype === 'tbody' ||\n\t\ttype === 'thead' ||\n\t\ttype === 'td' ||\n\t\ttype === 'tr' ||\n\t\ttype === 'th'\n\t);\n}\n\nconst ILLEGAL_PARAGRAPH_CHILD_ELEMENTS =\n\t/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/;\n\nconst forceUpdate = Component.prototype.forceUpdate;\nComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode == null) {\n\t\tconsole.warn(\n\t\t\t`Calling \"this.forceUpdate\" inside the constructor of a component is a ` +\n\t\t\t\t`no-op and might be a bug in your application.\\n\\n${getOwnerStack(\n\t\t\t\t\tgetCurrentVNode()\n\t\t\t\t)}`\n\t\t);\n\t} else if (this._parentDom == null) {\n\t\tconsole.warn(\n\t\t\t`Can't call \"this.forceUpdate\" on an unmounted component. This is a no-op, ` +\n\t\t\t\t`but it indicates a memory leak in your application. To fix, cancel all ` +\n\t\t\t\t`subscriptions and asynchronous tasks in the componentWillUnmount method.` +\n\t\t\t\t`\\n\\n${getOwnerStack(this._vnode)}`\n\t\t);\n\t}\n\treturn forceUpdate.call(this, callback);\n};\n\n/**\n * Serialize a vnode tree to a string\n * @param {import('./internal').VNode} vnode\n * @returns {string}\n */\nexport function serializeVNode(vnode) {\n\tlet { props } = vnode;\n\tlet name = getDisplayName(vnode);\n\n\tlet attrs = '';\n\tfor (let prop in props) {\n\t\tif (props.hasOwnProperty(prop) && prop !== 'children') {\n\t\t\tlet value = props[prop];\n\n\t\t\t// If it is an object but doesn't have toString(), use Object.toString\n\t\t\tif (typeof value == 'function') {\n\t\t\t\tvalue = `function ${value.displayName || value.name}() {}`;\n\t\t\t}\n\n\t\t\tvalue =\n\t\t\t\tObject(value) === value && !value.toString\n\t\t\t\t\t? Object.prototype.toString.call(value)\n\t\t\t\t\t: value + '';\n\n\t\t\tattrs += ` ${prop}=${JSON.stringify(value)}`;\n\t\t}\n\t}\n\n\tlet children = props.children;\n\treturn `<${name}${attrs}${\n\t\tchildren && children.length ? '>..</' + name + '>' : ' />'\n\t}`;\n}\n\noptions._hydrationMismatch = (newVNode, excessDomChildren) => {\n\tconst { type } = newVNode;\n\tconst availableTypes = excessDomChildren\n\t\t.map(child => child && child.localName)\n\t\t.filter(Boolean);\n\tconsole.error(\n\t\t`Expected a DOM node of type \"${type}\" but found \"${availableTypes.join(', ')}\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\\n\\n${getOwnerStack(newVNode)}`\n\t);\n};\n","export const ELEMENT_NODE = 1;\nexport const DOCUMENT_NODE = 9;\nexport const DOCUMENT_FRAGMENT_NODE = 11;\n","/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\nexport function isNaN(value) {\n\treturn value !== value;\n}\n","import { initDebug } from './debug';\nimport 'preact/devtools';\n\ninitDebug();\n\nexport { resetPropWarnings } from './check-props';\n\nexport {\n\tgetCurrentVNode,\n\tgetDisplayName,\n\tgetOwnerStack\n} from './component-stack';\n"],"names":["loggedTypeFailures","getDisplayName","vnode","type","Fragment","displayName","name","renderStack","ownerStack","getCurrentVNode","length","showJsxSourcePluginWarning","isPossibleOwner","getOwnerStack","stack","next","__o","push","reduce","acc","owner","source","__source","fileName","lineNumber","console","warn","isWeakMapSupported","WeakMap","getDomChildren","domChildren","__k","forEach","child","apply","getClosestDomNodeParentName","parent","__","__e","parentNode","localName","setState","Component","prototype","isTableElement","update","callback","this","__v","state","call","ILLEGAL_PARAGRAPH_CHILD_ELEMENTS","forceUpdate","serializeVNode","props","attrs","prop","hasOwnProperty","value","Object","toString","JSON","stringify","children","__P","options","__m","newVNode","excessDomChildren","availableTypes","map","filter","Boolean","error","join","oldDiff","__b","oldDiffed","diffed","oldRoot","oldVNode","oldRender","__r","pop","setupComponentStack","hooksAllowed","oldBeforeDiff","oldVnode","oldCatchError","oldHook","__h","warnedComponents","useEffect","useLayoutEffect","lazyPropTypes","deprecations","errorInfo","__c","then","promise","Error","componentStack","setTimeout","e","isValid","nodeType","componentName","undefined","Array","isArray","ref","key","propTypes","has","m","lazyVNode","set","values","__f","obj","i","assign","typeSpecs","location","getStack","keys","typeSpecName","message","checkPropTypes","currentComponent","renderCount","nextComponent","comp","index","property","get","indexOf","deprecatedAttributes","nodeName","attributes","deprecatedProto","create","newProps","v","__self","__proto__","domParentName","illegalDomChildrenTypes","childType","test","__H","hooks","hook","j","initDebug"],"mappings":"mDAAA,IAEIA,EAAqB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B/F,EAAK+F,IAAAqD,IAA6B,CAGjE,IAAMC,EAAQrJ,EAAK+F,IAAAqD,IAAAjH,GACnB,GAAIkH,EACH,IAAK,IAAI/B,EAAI,EAAGA,EAAI+B,EAAM7I,OAAQ8G,GAAK,EAAG,CACzC,IAAMgC,EAAOD,EAAM/B,GACnB,GAAIgC,EAAIF,IACP,IAAK,IAAIG,EAAI,EAAGA,EAAID,EAAIF,IAAO5I,OAAQ+I,IAEtC,IEtde/F,EFqdH8F,EAAIF,IAAOG,KEpdZ/F,EFqdK,CACf,IAAMgD,EAAgBzG,EAAeC,GACrCuB,QAAQC,KAAI,4GACiG8F,EAAC,iBAAiBd,EAC/H,wBACD,CAGH,CAEF,CACD,CACD,CG3eAgD,wGLIO,WACN1J,EAAqB,CAAA,CACtB"}
node_modules/preact/debug/dist/debug.mjs ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import{Fragment as n,options as e,Component as o}from"preact";import"preact/devtools";var t={};function r(){t={}}function a(e){return e.type===n?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var i=[],s=[];function c(){return i.length>0?i[i.length-1]:null}var l=!0;function u(e){return"function"==typeof e.type&&e.type!=n}function f(n){for(var e=[n],o=n;null!=o.__o;)e.push(o.__o),o=o.__o;return e.reduce(function(n,e){n+=" in "+a(e);var o=e.__source;return o?n+=" (at "+o.fileName+":"+o.lineNumber+")":l&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),l=!1,n+"\n"},"")}var d="function"==typeof WeakMap;function p(n){var e=[];return n.__k?(n.__k.forEach(function(n){n&&"function"==typeof n.type?e.push.apply(e,p(n)):n&&"string"==typeof n.type&&e.push(n.type)}),e):e}function h(n){return n?"function"==typeof n.type?null==n.__?null!=n.__e&&null!=n.__e.parentNode?n.__e.parentNode.localName:"":h(n.__):n.type:""}var v=o.prototype.setState;function y(n){return"table"===n||"tfoot"===n||"tbody"===n||"thead"===n||"td"===n||"tr"===n||"th"===n}o.prototype.setState=function(n,e){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+f(c())),v.call(this,n,e)};var m=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,b=o.prototype.forceUpdate;function w(n){var e=n.props,o=a(n),t="";for(var r in e)if(e.hasOwnProperty(r)&&"children"!==r){var i=e[r];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),t+=" "+r+"="+JSON.stringify(i)}var s=e.children;return"<"+o+t+(s&&s.length?">..</"+o+">":" />")}o.prototype.forceUpdate=function(n){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+f(c())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+f(this.__v)),b.call(this,n)},e.__m=function(n,e){var o=n.type,t=e.map(function(n){return n&&n.localName}).filter(Boolean);console.error('Expected a DOM node of type "'+o+'" but found "'+t.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+f(n))},function(){!function(){var n=e.__b,o=e.diffed,t=e.__,r=e.vnode,a=e.__r;e.diffed=function(n){u(n)&&s.pop(),i.pop(),o&&o(n)},e.__b=function(e){u(e)&&i.push(e),n&&n(e)},e.__=function(n,e){s=[],t&&t(n,e)},e.vnode=function(n){n.__o=s.length>0?s[s.length-1]:null,r&&r(n)},e.__r=function(n){u(n)&&s.push(n),a&&a(n)}}();var n=!1,o=e.__b,r=e.diffed,c=e.vnode,l=e.__r,v=e.__e,b=e.__,g=e.__h,E=d?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,k=[];e.__e=function(n,e,o,t){if(e&&e.__c&&"function"==typeof n.then){var r=n;n=new Error("Missing Suspense. The throwing component was: "+a(e));for(var i=e;i;i=i.__)if(i.__c&&i.__c.__c){n=r;break}if(n instanceof Error)throw n}try{(t=t||{}).componentStack=f(e),v(n,e,o,t),"function"!=typeof n.then&&setTimeout(function(){throw n})}catch(n){throw n}},e.__=function(n,e){if(!e)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var o;switch(e.nodeType){case 1:case 11:case 9:o=!0;break;default:o=!1}if(!o){var t=a(n);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+e+" instead: render(<"+t+" />, "+e+");")}b&&b(n,e)},e.__b=function(e){var r=e.type;if(n=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+w(e)+"\n\n"+f(e));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+a(e)+" = "+w(r)+";\n let vnode = <My"+a(e)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+f(e));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==e.ref&&"function"!=typeof e.ref&&"object"!=typeof e.ref&&!("$$typeof"in e))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof e.ref+"] instead\n"+w(e)+"\n\n"+f(e));if("string"==typeof e.type)for(var i in e.props)if("o"===i[0]&&"n"===i[1]&&"function"!=typeof e.props[i]&&null!=e.props[i])throw new Error("Component's \""+i+'" property should be a function, but got ['+typeof e.props[i]+"] instead\n"+w(e)+"\n\n"+f(e));if("function"==typeof e.type&&e.type.propTypes){if("Lazy"===e.type.displayName&&E&&!E.lazyPropTypes.has(e.type)){var s="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var c=e.type();E.lazyPropTypes.set(e.type,!0),console.warn(s+"Component wrapped in lazy() is "+a(c))}catch(n){console.warn(s+"We will log the wrapped component's name once it is loaded.")}}var l=e.props;e.type.__f&&delete(l=function(n,e){for(var o in e)n[o]=e[o];return n}({},l)).ref,function(n,e,o,r,a){Object.keys(n).forEach(function(o){var i;try{i=n[o](e,o,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(n){i=n}i&&!(i.message in t)&&(t[i.message]=!0,console.error("Failed prop type: "+i.message+(a&&"\n"+a()||"")))})}(e.type.propTypes,l,0,a(e),function(){return f(e)})}o&&o(e)};var T,_=0;e.__r=function(e){l&&l(e),n=!0;var o=e.__c;if(o===T?_++:_=1,_>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+a(e));T=o},e.__h=function(e,o,t){if(!e||!n)throw new Error("Hook can only be invoked from render methods.");g&&g(e,o,t)};var O=function(n,e){return{get:function(){var o="get"+n+e;k&&k.indexOf(o)<0&&(k.push(o),console.warn("getting vnode."+n+" is deprecated, "+e))},set:function(){var o="set"+n+e;k&&k.indexOf(o)<0&&(k.push(o),console.warn("setting vnode."+n+" is not allowed, "+e))}}},I={nodeName:O("nodeName","use vnode.type"),attributes:O("attributes","use vnode.props"),children:O("children","use vnode.props.children")},M=Object.create({},I);e.vnode=function(n){var e=n.props;if(null!==n.type&&null!=e&&("__source"in e||"__self"in e)){var o=n.props={};for(var t in e){var r=e[t];"__source"===t?n.__source=r:"__self"===t?n.__self=r:o[t]=r}}n.__proto__=M,c&&c(n)},e.diffed=function(e){var o,t=e.type,i=e.__;if(e.__k&&e.__k.forEach(function(n){if("object"==typeof n&&n&&void 0===n.type){var o=Object.keys(n).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+o+"}.\n\n"+f(e))}}),e.__c===T&&(_=0),"string"==typeof t&&(y(t)||"p"===t||"a"===t||"button"===t)){var s=h(i);if(""!==s&&y(t))"table"===t&&"td"!==s&&y(s)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+w(e)+"\n\n"+f(e)):"thead"!==t&&"tfoot"!==t&&"tbody"!==t||"table"===s?"tr"===t&&"thead"!==s&&"tfoot"!==s&&"tbody"!==s?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+w(e)+"\n\n"+f(e)):"td"===t&&"tr"!==s?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+w(e)+"\n\n"+f(e)):"th"===t&&"tr"!==s&&console.error("Improper nesting of table. Your <th> should have a <tr>."+w(e)+"\n\n"+f(e)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+w(e)+"\n\n"+f(e));else if("p"===t){var c=p(e).filter(function(n){return m.test(n)});c.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+c.join(", ")+" as child-elements."+w(e)+"\n\n"+f(e))}else"a"!==t&&"button"!==t||-1!==p(e).indexOf(t)&&console.error("Improper nesting of interactive content. Your <"+t+"> should not have other "+("a"===t?"anchor":"button")+" tags as child-elements."+w(e)+"\n\n"+f(e))}if(n=!1,r&&r(e),null!=e.__k)for(var l=[],u=0;u<e.__k.length;u++){var d=e.__k[u];if(d&&null!=d.key){var v=d.key;if(-1!==l.indexOf(v)){console.error('Following component has two or more children with the same key attribute: "'+v+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+w(e)+"\n\n"+f(e));break}l.push(v)}}if(null!=e.__c&&null!=e.__c.__H){var b=e.__c.__H.__;if(b)for(var g=0;g<b.length;g+=1){var E=b[g];if(E.__H)for(var k=0;k<E.__H.length;k++)if((o=E.__H[k])!=o){var O=a(e);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+g+" in component "+O+" was called with NaN.")}}}}}();export{c as getCurrentVNode,a as getDisplayName,f as getOwnerStack,r as resetPropWarnings};
2
+ //# sourceMappingURL=debug.module.js.map