django-cfg 1.4.86__py3-none-any.whl → 1.4.88__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of django-cfg might be problematic. Click here for more details.
- django_cfg/__init__.py +1 -1
- django_cfg/apps/dashboard/permissions.py +48 -0
- django_cfg/apps/dashboard/serializers/__init__.py +8 -1
- django_cfg/apps/dashboard/serializers/commands.py +29 -0
- django_cfg/apps/dashboard/services/commands_security.py +228 -0
- django_cfg/apps/dashboard/services/commands_service.py +208 -9
- django_cfg/apps/dashboard/views/commands_views.py +92 -4
- django_cfg/apps/frontend/views.py +35 -4
- django_cfg/modules/django_client/core/generator/typescript/templates/client/client.ts.jinja +18 -14
- django_cfg/modules/django_client/core/generator/typescript/templates/utils/http.ts.jinja +8 -3
- django_cfg/pyproject.toml +1 -1
- django_cfg/static/frontend/admin/404/index.html +1 -0
- django_cfg/static/frontend/admin/404.html +1 -1
- django_cfg/static/frontend/admin/500/index.html +1 -0
- django_cfg/static/frontend/admin/_next/static/D_d9HRw5Yn7BRHAX5q89_/_buildManifest.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/{19430.fe7bff7372f8a256.js → 19430.c4c95603c23c17fe.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/{43076.55dd23b6cd68edb0.js → 20695.a7d37b6c40ad3f58.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/43076-4be6a9794e9c3e8b.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/50314-5ec79b293c2283dd.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/94141-bc6d47f419b26b21.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/main-d4b1d5245e3e8c42.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/pages/{404-cf71cd7b3cb005e5.js → 404-9c41b6ebfe67f15e.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/{500-ff19c7842e3df415.js → 500-906d92e10e7e65fb.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/_app-1c0fff0f59a6d683.js +272 -0
- django_cfg/static/frontend/admin/_next/static/chunks/pages/{_error-87f3fdc2aa131e77.js → _error-2550e721b11b7946.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/{index-69f737d4802cc5b7.js → index-fe4802f9df0ac052.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{cookies-b39c7f22c066e2c6.js → cookies-97d279800f12aab4.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{privacy-5aedad0cf3a4f80f.js → privacy-1d5e6cd94689247e.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{security-dbd854d0d5d483e2.js → security-55e49700e7a01f5a.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/legal/{terms-f3e1d2b9e5edf12f.js → terms-14c02bb2d3198352.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private/centrifugo-44a8313fa040e9ad.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private/{profile-b8045f993287f1a7.js → profile-5cd57aac826857fd.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private/{ui-373fff8b42878e64.js → ui-383e7f474cf22a18.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private-d4ccbe1265cbd853.js +1 -0
- django_cfg/static/frontend/admin/_next/static/chunks/{webpack-7c456a65e96eb97e.js → webpack-5a92f81363b62aa7.js} +1 -1
- django_cfg/static/frontend/admin/_next/static/css/3063068f0d5a8a00.css +3 -0
- django_cfg/static/frontend/admin/_next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/21350d82a1f187e9-s.p.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- django_cfg/static/frontend/admin/{private/ui.html → auth/index.html} +1 -1
- django_cfg/static/frontend/admin/index.html +1 -1
- django_cfg/static/frontend/admin/legal/cookies/index.html +1 -0
- django_cfg/static/frontend/admin/legal/privacy/index.html +1 -0
- django_cfg/static/frontend/admin/legal/security/index.html +1 -0
- django_cfg/static/frontend/admin/legal/terms/index.html +1 -0
- django_cfg/static/frontend/admin/private/centrifugo/index.html +1 -0
- django_cfg/static/frontend/admin/private/index.html +1 -0
- django_cfg/static/frontend/admin/private/{profile.html → profile/index.html} +1 -1
- django_cfg/static/frontend/admin/private/ui/index.html +92 -0
- django_cfg/templates/admin/index.html +30 -44
- {django_cfg-1.4.86.dist-info → django_cfg-1.4.88.dist-info}/METADATA +1 -1
- {django_cfg-1.4.86.dist-info → django_cfg-1.4.88.dist-info}/RECORD +60 -55
- django_cfg/static/frontend/admin/500.html +0 -1
- django_cfg/static/frontend/admin/_next/static/chunks/23004-faae121bbfecc163.js +0 -1
- django_cfg/static/frontend/admin/_next/static/chunks/50314-3b9d15242191c8bc.js +0 -1
- django_cfg/static/frontend/admin/_next/static/chunks/main-f9b6d451d9991f19.js +0 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/_app-f62e5528fbcbb6b3.js +0 -272
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private/centrifugo-f24beb6ed3955aa8.js +0 -1
- django_cfg/static/frontend/admin/_next/static/chunks/pages/private-fe9faa86ecdb0ce6.js +0 -1
- django_cfg/static/frontend/admin/_next/static/css/5f9a37b6e6a72303.css +0 -3
- django_cfg/static/frontend/admin/_next/static/media/438aa629764e75f3-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/875ae681bfde4580-s.p.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/media/e857b654a2caa584-s.woff2 +0 -0
- django_cfg/static/frontend/admin/_next/static/wg0mGdXjT00H_1BUxoOSH/_buildManifest.js +0 -1
- django_cfg/static/frontend/admin/auth.html +0 -1
- django_cfg/static/frontend/admin/legal/cookies.html +0 -1
- django_cfg/static/frontend/admin/legal/privacy.html +0 -1
- django_cfg/static/frontend/admin/legal/security.html +0 -1
- django_cfg/static/frontend/admin/legal/terms.html +0 -1
- django_cfg/static/frontend/admin/private/centrifugo.html +0 -1
- django_cfg/static/frontend/admin/private.html +0 -1
- /django_cfg/static/frontend/admin/_next/static/{wg0mGdXjT00H_1BUxoOSH → D_d9HRw5Yn7BRHAX5q89_}/_ssgManifest.js +0 -0
- {django_cfg-1.4.86.dist-info → django_cfg-1.4.88.dist-info}/WHEEL +0 -0
- {django_cfg-1.4.86.dist-info → django_cfg-1.4.88.dist-info}/entry_points.txt +0 -0
- {django_cfg-1.4.86.dist-info → django_cfg-1.4.88.dist-info}/licenses/LICENSE +0 -0
|
@@ -4,19 +4,29 @@ Commands ViewSet
|
|
|
4
4
|
Endpoints for Django management commands:
|
|
5
5
|
- GET /commands/ - All available commands
|
|
6
6
|
- GET /commands/summary/ - Commands summary with statistics
|
|
7
|
+
- POST /commands/execute/ - Execute a command with streaming output
|
|
8
|
+
- GET /commands/{name}/help/ - Get help for a specific command
|
|
7
9
|
"""
|
|
8
10
|
|
|
11
|
+
import json
|
|
9
12
|
import logging
|
|
10
13
|
|
|
14
|
+
from django.http import StreamingHttpResponse
|
|
11
15
|
from drf_spectacular.utils import extend_schema
|
|
12
16
|
from rest_framework import status, viewsets
|
|
13
17
|
from rest_framework.authentication import BasicAuthentication, SessionAuthentication
|
|
14
18
|
from rest_framework.decorators import action
|
|
15
|
-
from rest_framework.permissions import IsAdminUser
|
|
16
19
|
from rest_framework.response import Response
|
|
20
|
+
from rest_framework_simplejwt.authentication import JWTAuthentication
|
|
17
21
|
|
|
22
|
+
from ..permissions import IsSuperAdmin
|
|
18
23
|
from ..services import CommandsService
|
|
19
|
-
from ..serializers import
|
|
24
|
+
from ..serializers import (
|
|
25
|
+
CommandSerializer,
|
|
26
|
+
CommandsSummarySerializer,
|
|
27
|
+
CommandExecuteRequestSerializer,
|
|
28
|
+
CommandHelpResponseSerializer,
|
|
29
|
+
)
|
|
20
30
|
|
|
21
31
|
logger = logging.getLogger(__name__)
|
|
22
32
|
|
|
@@ -28,8 +38,8 @@ class CommandsViewSet(viewsets.GenericViewSet):
|
|
|
28
38
|
Provides endpoints for Django management commands discovery.
|
|
29
39
|
"""
|
|
30
40
|
|
|
31
|
-
authentication_classes = [SessionAuthentication, BasicAuthentication]
|
|
32
|
-
permission_classes = [
|
|
41
|
+
authentication_classes = [JWTAuthentication, SessionAuthentication, BasicAuthentication]
|
|
42
|
+
permission_classes = [IsSuperAdmin] # Only superusers can access commands
|
|
33
43
|
serializer_class = CommandSerializer
|
|
34
44
|
pagination_class = None # Disable pagination for commands list
|
|
35
45
|
|
|
@@ -71,3 +81,81 @@ class CommandsViewSet(viewsets.GenericViewSet):
|
|
|
71
81
|
return Response({
|
|
72
82
|
'error': str(e)
|
|
73
83
|
}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
|
|
84
|
+
|
|
85
|
+
@extend_schema(
|
|
86
|
+
summary="Execute command",
|
|
87
|
+
description="Execute a Django management command and stream output in Server-Sent Events format",
|
|
88
|
+
request=CommandExecuteRequestSerializer,
|
|
89
|
+
responses={
|
|
90
|
+
200: {"description": "Command execution started (SSE stream)"},
|
|
91
|
+
400: {"description": "Invalid request"},
|
|
92
|
+
403: {"description": "Command not allowed"},
|
|
93
|
+
},
|
|
94
|
+
tags=["Dashboard - Commands"]
|
|
95
|
+
)
|
|
96
|
+
@action(detail=False, methods=['post'], url_path='execute', serializer_class=CommandExecuteRequestSerializer)
|
|
97
|
+
def execute(self, request):
|
|
98
|
+
"""Execute a Django management command with streaming output."""
|
|
99
|
+
try:
|
|
100
|
+
# Validate request data
|
|
101
|
+
serializer = CommandExecuteRequestSerializer(data=request.data)
|
|
102
|
+
if not serializer.is_valid():
|
|
103
|
+
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
|
104
|
+
|
|
105
|
+
command_name = serializer.validated_data['command']
|
|
106
|
+
args = serializer.validated_data.get('args', [])
|
|
107
|
+
options = serializer.validated_data.get('options', {})
|
|
108
|
+
|
|
109
|
+
# Create streaming response
|
|
110
|
+
def stream_execution():
|
|
111
|
+
"""Generator that streams command output as Server-Sent Events."""
|
|
112
|
+
commands_service = CommandsService()
|
|
113
|
+
|
|
114
|
+
for event in commands_service.execute_command(
|
|
115
|
+
command_name=command_name,
|
|
116
|
+
args=args,
|
|
117
|
+
options=options,
|
|
118
|
+
user=request.user
|
|
119
|
+
):
|
|
120
|
+
# Format as Server-Sent Event
|
|
121
|
+
yield f"data: {json.dumps(event)}\n\n"
|
|
122
|
+
|
|
123
|
+
response = StreamingHttpResponse(
|
|
124
|
+
stream_execution(),
|
|
125
|
+
content_type='text/event-stream'
|
|
126
|
+
)
|
|
127
|
+
response['Cache-Control'] = 'no-cache'
|
|
128
|
+
response['X-Accel-Buffering'] = 'no' # Disable nginx buffering
|
|
129
|
+
|
|
130
|
+
return response
|
|
131
|
+
|
|
132
|
+
except Exception as e:
|
|
133
|
+
logger.error(f"Command execution API error: {e}")
|
|
134
|
+
return Response({
|
|
135
|
+
'error': str(e)
|
|
136
|
+
}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
|
|
137
|
+
|
|
138
|
+
@extend_schema(
|
|
139
|
+
summary="Get command help",
|
|
140
|
+
description="Get detailed help text for a specific Django management command",
|
|
141
|
+
responses={200: CommandHelpResponseSerializer},
|
|
142
|
+
tags=["Dashboard - Commands"]
|
|
143
|
+
)
|
|
144
|
+
@action(detail=True, methods=['get'], url_path='help', serializer_class=CommandHelpResponseSerializer)
|
|
145
|
+
def help(self, request, pk=None):
|
|
146
|
+
"""Get help text for a specific command."""
|
|
147
|
+
try:
|
|
148
|
+
commands_service = CommandsService()
|
|
149
|
+
help_data = commands_service.get_command_help(pk)
|
|
150
|
+
|
|
151
|
+
if help_data.get('status') == 'error':
|
|
152
|
+
return Response(help_data, status=status.HTTP_404_NOT_FOUND)
|
|
153
|
+
|
|
154
|
+
return Response(help_data)
|
|
155
|
+
|
|
156
|
+
except Exception as e:
|
|
157
|
+
logger.error(f"Command help API error: {e}")
|
|
158
|
+
return Response({
|
|
159
|
+
'status': 'error',
|
|
160
|
+
'error': str(e)
|
|
161
|
+
}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
|
|
@@ -9,20 +9,32 @@ from pathlib import Path
|
|
|
9
9
|
from django.http import Http404, HttpResponse, FileResponse
|
|
10
10
|
from django.views.static import serve
|
|
11
11
|
from django.views import View
|
|
12
|
+
from django.views.decorators.clickjacking import xframe_options_exempt
|
|
13
|
+
from django.utils.decorators import method_decorator
|
|
12
14
|
from rest_framework_simplejwt.tokens import RefreshToken
|
|
13
15
|
|
|
14
16
|
logger = logging.getLogger(__name__)
|
|
15
17
|
|
|
16
18
|
|
|
19
|
+
@method_decorator(xframe_options_exempt, name='dispatch')
|
|
17
20
|
class NextJSStaticView(View):
|
|
18
21
|
"""
|
|
19
22
|
Serve Next.js static build files with automatic JWT token injection.
|
|
20
23
|
|
|
21
24
|
Features:
|
|
22
|
-
- Serves Next.js static export files
|
|
25
|
+
- Serves Next.js static export files like a static file server
|
|
23
26
|
- Automatically injects JWT tokens for authenticated users
|
|
24
27
|
- Tokens injected into HTML responses only
|
|
25
28
|
- Handles Next.js client-side routing (.html fallback)
|
|
29
|
+
- Automatically serves index.html for directory paths
|
|
30
|
+
- X-Frame-Options exempt to allow embedding in iframes
|
|
31
|
+
|
|
32
|
+
Path resolution examples:
|
|
33
|
+
- /cfg/admin/ → /cfg/admin/index.html
|
|
34
|
+
- /cfg/admin/private/ → /cfg/admin/private/index.html (if exists)
|
|
35
|
+
- /cfg/admin/private/ → /cfg/admin/private.html (fallback)
|
|
36
|
+
- /cfg/admin/tasks → /cfg/admin/tasks.html
|
|
37
|
+
- /cfg/admin/tasks → /cfg/admin/tasks/index.html (fallback)
|
|
26
38
|
"""
|
|
27
39
|
|
|
28
40
|
app_name = 'admin'
|
|
@@ -36,14 +48,27 @@ class NextJSStaticView(View):
|
|
|
36
48
|
if not base_dir.exists():
|
|
37
49
|
raise Http404(f"Frontend app '{self.app_name}' not found. Run 'make build-admin' to build it.")
|
|
38
50
|
|
|
51
|
+
original_path = path # Store for logging
|
|
52
|
+
|
|
39
53
|
# Default to index.html for root path
|
|
40
54
|
if not path or path == '/':
|
|
41
55
|
path = 'index.html'
|
|
56
|
+
logger.debug(f"Root path requested, serving: {path}")
|
|
42
57
|
|
|
43
|
-
# Handle trailing slash
|
|
44
|
-
# /private/ -> private.html
|
|
58
|
+
# Handle trailing slash - try multiple strategies like a static file server
|
|
45
59
|
if path.endswith('/') and path != '/':
|
|
46
|
-
|
|
60
|
+
path_without_slash = path.rstrip('/')
|
|
61
|
+
|
|
62
|
+
# Strategy 1: Try directory/index.html (most common for static servers)
|
|
63
|
+
index_path = path + 'index.html'
|
|
64
|
+
if (base_dir / index_path).exists():
|
|
65
|
+
path = index_path
|
|
66
|
+
# Strategy 2: Try path.html (Next.js static export behavior)
|
|
67
|
+
elif (base_dir / (path_without_slash + '.html')).exists():
|
|
68
|
+
path = path_without_slash + '.html'
|
|
69
|
+
# Strategy 3: Keep as directory path (will fail later if directory doesn't exist)
|
|
70
|
+
else:
|
|
71
|
+
path = index_path # Default to index.html in directory
|
|
47
72
|
|
|
48
73
|
# For routes without extension, try .html (Next.js static export behavior)
|
|
49
74
|
file_path = base_dir / path
|
|
@@ -52,6 +77,12 @@ class NextJSStaticView(View):
|
|
|
52
77
|
html_file = base_dir / html_path
|
|
53
78
|
if html_file.exists():
|
|
54
79
|
path = html_path
|
|
80
|
+
else:
|
|
81
|
+
# Try path/index.html as fallback
|
|
82
|
+
index_path = path + '/index.html'
|
|
83
|
+
index_file = base_dir / index_path
|
|
84
|
+
if index_file.exists():
|
|
85
|
+
path = index_path
|
|
55
86
|
|
|
56
87
|
# For HTML files, remove conditional GET headers to force full response
|
|
57
88
|
# This allows JWT token injection (can't inject into 304 Not Modified responses)
|
|
@@ -129,7 +129,9 @@ export class APIClient {
|
|
|
129
129
|
headers?: Record<string, string>;
|
|
130
130
|
}
|
|
131
131
|
): Promise<T> {
|
|
132
|
-
|
|
132
|
+
// Build URL - handle both absolute and relative paths
|
|
133
|
+
// When baseUrl is empty (static builds), path is used as-is (relative to current origin)
|
|
134
|
+
const url = this.baseUrl ? `${this.baseUrl}${path}` : path;
|
|
133
135
|
const startTime = Date.now();
|
|
134
136
|
|
|
135
137
|
// Build headers - start with custom headers from options
|
|
@@ -159,7 +161,7 @@ export class APIClient {
|
|
|
159
161
|
if (this.logger) {
|
|
160
162
|
this.logger.logRequest({
|
|
161
163
|
method,
|
|
162
|
-
url: url
|
|
164
|
+
url: url,
|
|
163
165
|
headers,
|
|
164
166
|
body: options?.formData || options?.body,
|
|
165
167
|
timestamp: startTime,
|
|
@@ -170,7 +172,7 @@ export class APIClient {
|
|
|
170
172
|
// Make request via HTTP adapter
|
|
171
173
|
const response = await this.httpClient.request<T>({
|
|
172
174
|
method,
|
|
173
|
-
url: url
|
|
175
|
+
url: url,
|
|
174
176
|
headers,
|
|
175
177
|
params: options?.params,
|
|
176
178
|
body: options?.body,
|
|
@@ -185,7 +187,7 @@ export class APIClient {
|
|
|
185
187
|
response.status,
|
|
186
188
|
response.statusText,
|
|
187
189
|
response.data,
|
|
188
|
-
url
|
|
190
|
+
url
|
|
189
191
|
);
|
|
190
192
|
|
|
191
193
|
// Log error
|
|
@@ -193,7 +195,7 @@ export class APIClient {
|
|
|
193
195
|
this.logger.logError(
|
|
194
196
|
{
|
|
195
197
|
method,
|
|
196
|
-
url: url
|
|
198
|
+
url: url,
|
|
197
199
|
headers,
|
|
198
200
|
body: options?.formData || options?.body,
|
|
199
201
|
timestamp: startTime,
|
|
@@ -215,7 +217,7 @@ export class APIClient {
|
|
|
215
217
|
this.logger.logResponse(
|
|
216
218
|
{
|
|
217
219
|
method,
|
|
218
|
-
url: url
|
|
220
|
+
url: url,
|
|
219
221
|
headers,
|
|
220
222
|
body: options?.formData || options?.body,
|
|
221
223
|
timestamp: startTime,
|
|
@@ -241,15 +243,15 @@ export class APIClient {
|
|
|
241
243
|
|
|
242
244
|
// Wrap other errors as NetworkError
|
|
243
245
|
const networkError = error instanceof Error
|
|
244
|
-
? new NetworkError(error.message, url
|
|
245
|
-
: new NetworkError('Unknown error', url
|
|
246
|
+
? new NetworkError(error.message, url, error)
|
|
247
|
+
: new NetworkError('Unknown error', url);
|
|
246
248
|
|
|
247
249
|
// Log network error
|
|
248
250
|
if (this.logger) {
|
|
249
251
|
this.logger.logError(
|
|
250
252
|
{
|
|
251
253
|
method,
|
|
252
|
-
url: url
|
|
254
|
+
url: url,
|
|
253
255
|
headers,
|
|
254
256
|
body: options?.formData || options?.body,
|
|
255
257
|
timestamp: startTime,
|
|
@@ -358,7 +360,9 @@ export class APIClient {
|
|
|
358
360
|
headers?: Record<string, string>;
|
|
359
361
|
}
|
|
360
362
|
): Promise<T> {
|
|
361
|
-
|
|
363
|
+
// Build URL - handle both absolute and relative paths
|
|
364
|
+
// When baseUrl is empty (static builds), path is used as-is (relative to current origin)
|
|
365
|
+
const url = this.baseUrl ? `${this.baseUrl}${path}` : path;
|
|
362
366
|
|
|
363
367
|
// Build headers - start with custom headers from options
|
|
364
368
|
const headers: Record<string, string> = {
|
|
@@ -387,7 +391,7 @@ export class APIClient {
|
|
|
387
391
|
// Make request via HTTP adapter
|
|
388
392
|
const response = await this.httpClient.request<T>({
|
|
389
393
|
method,
|
|
390
|
-
url: url
|
|
394
|
+
url: url,
|
|
391
395
|
headers,
|
|
392
396
|
params: options?.params,
|
|
393
397
|
body: options?.body,
|
|
@@ -400,7 +404,7 @@ export class APIClient {
|
|
|
400
404
|
response.status,
|
|
401
405
|
response.statusText,
|
|
402
406
|
response.data,
|
|
403
|
-
url
|
|
407
|
+
url
|
|
404
408
|
);
|
|
405
409
|
}
|
|
406
410
|
|
|
@@ -413,8 +417,8 @@ export class APIClient {
|
|
|
413
417
|
|
|
414
418
|
// Wrap other errors as NetworkError
|
|
415
419
|
throw error instanceof Error
|
|
416
|
-
? new NetworkError(error.message, url
|
|
417
|
-
: new NetworkError('Unknown error', url
|
|
420
|
+
? new NetworkError(error.message, url, error)
|
|
421
|
+
: new NetworkError('Unknown error', url);
|
|
418
422
|
}
|
|
419
423
|
}
|
|
420
424
|
|
|
@@ -39,13 +39,18 @@ export class FetchAdapter implements HttpClientAdapter {
|
|
|
39
39
|
const { method, url, headers, body, params, formData } = request;
|
|
40
40
|
|
|
41
41
|
// Build URL with query params
|
|
42
|
-
|
|
42
|
+
let finalUrl = url;
|
|
43
43
|
if (params) {
|
|
44
|
+
const searchParams = new URLSearchParams();
|
|
44
45
|
Object.entries(params).forEach(([key, value]) => {
|
|
45
46
|
if (value !== null && value !== undefined) {
|
|
46
|
-
|
|
47
|
+
searchParams.append(key, String(value));
|
|
47
48
|
}
|
|
48
49
|
});
|
|
50
|
+
const queryString = searchParams.toString();
|
|
51
|
+
if (queryString) {
|
|
52
|
+
finalUrl = url.includes('?') ? `${url}&${queryString}` : `${url}?${queryString}`;
|
|
53
|
+
}
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
// Build headers
|
|
@@ -65,7 +70,7 @@ export class FetchAdapter implements HttpClientAdapter {
|
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
// Make request
|
|
68
|
-
const response = await fetch(finalUrl
|
|
73
|
+
const response = await fetch(finalUrl, {
|
|
69
74
|
method,
|
|
70
75
|
headers: finalHeaders,
|
|
71
76
|
body: requestBody,
|
django_cfg/pyproject.toml
CHANGED
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "django-cfg"
|
|
7
|
-
version = "1.4.
|
|
7
|
+
version = "1.4.88"
|
|
8
8
|
description = "Django AI framework with built-in agents, type-safe Pydantic v2 configuration, and 8 enterprise apps. Replace settings.py, validate at startup, 90% less code. Production-ready AI workflows for Django."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
keywords = [ "django", "configuration", "pydantic", "settings", "type-safety", "pydantic-settings", "django-environ", "startup-validation", "ide-autocomplete", "ai-agents", "enterprise-django", "django-settings", "type-safe-config",]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">Django CFG</title><meta name="description" content="Django CFG Admin Panel" data-next-head=""/><link rel="icon" type="image/png" href="/cfg/admin/static/logos/192x192.png" data-next-head=""/><meta property="og:title" content="Django CFG" data-next-head=""/><meta property="og:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:type" content="website" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta name="twitter:title" content="Django CFG" data-next-head=""/><meta name="twitter:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><meta property="og:image:width" content="1200" data-next-head=""/><meta property="og:image:height" content="630" data-next-head=""/><meta property="og:image:type" content="image/png" data-next-head=""/><meta name="twitter:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><link rel="preload" href="/cfg/admin/_next/static/media/21350d82a1f187e9-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/media/e4af272ccee01ff0-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/css/3063068f0d5a8a00.css" as="style"/><link rel="stylesheet" href="/cfg/admin/_next/static/css/3063068f0d5a8a00.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/cfg/admin/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/cfg/admin/_next/static/chunks/webpack-5a92f81363b62aa7.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/framework-46f25b115ad0e595.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/main-d4b1d5245e3e8c42.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/_app-1c0fff0f59a6d683.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/404-9c41b6ebfe67f15e.js" defer=""></script><script src="/cfg/admin/_next/static/D_d9HRw5Yn7BRHAX5q89_/_buildManifest.js" defer=""></script><script src="/cfg/admin/_next/static/D_d9HRw5Yn7BRHAX5q89_/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style>html { font-family: 'Inter', 'Inter Fallback'; }</style><div class="p-6"><div class="min-h-screen flex items-center justify-center px-4"><div class="max-w-2xl w-full text-center space-y-8"><div class="relative"><h1 class="text-[12rem] font-bold leading-none text-muted/20 select-none" aria-hidden="true">404</h1></div><div class="flex justify-center py-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-question w-24 h-24 text-muted-foreground/50"><path d="M12 17h.01"></path><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z"></path><path d="M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"></path></svg></div><div class="space-y-4"><h2 class="text-4xl font-bold text-foreground">Page Not Found</h2><p class="text-lg text-muted-foreground max-w-md mx-auto">The page you're looking for doesn't exist or has been moved.</p></div><div class="flex flex-col sm:flex-row items-center justify-center gap-4 pt-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8 min-w-[140px]">Go Back</button><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-11 rounded-md px-8 min-w-[140px]">Go Home</button></div><div class="pt-8 text-sm text-muted-foreground"><p>Need help? Contact<!-- --> <a href="mailto:support@djangocfg.com" class="text-primary hover:underline">support</a></p></div></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[9999] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"D_d9HRw5Yn7BRHAX5q89_","assetPrefix":"/cfg/admin","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">Django CFG</title><meta name="description" content="Django CFG Admin Panel" data-next-head=""/><link rel="icon" type="image/png" href="/cfg/admin/static/logos/192x192.png" data-next-head=""/><meta property="og:title" content="Django CFG" data-next-head=""/><meta property="og:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:type" content="website" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta name="twitter:title" content="Django CFG" data-next-head=""/><meta name="twitter:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><meta property="og:image:width" content="1200" data-next-head=""/><meta property="og:image:height" content="630" data-next-head=""/><meta property="og:image:type" content="image/png" data-next-head=""/><meta name="twitter:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><link rel="preload" href="/cfg/admin/_next/static/media/875ae681bfde4580-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/media/4c9affa5bc8f420e-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" as="style"/><link rel="stylesheet" href="/cfg/admin/_next/static/css/5f9a37b6e6a72303.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/cfg/admin/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/cfg/admin/_next/static/chunks/webpack-7c456a65e96eb97e.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/framework-46f25b115ad0e595.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/main-f9b6d451d9991f19.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/_app-f62e5528fbcbb6b3.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/404-cf71cd7b3cb005e5.js" defer=""></script><script src="/cfg/admin/_next/static/wg0mGdXjT00H_1BUxoOSH/_buildManifest.js" defer=""></script><script src="/cfg/admin/_next/static/wg0mGdXjT00H_1BUxoOSH/_ssgManifest.js" defer=""></script></head><body><link rel="preload" as="image" href="/cfg/admin/static/logos/vector.svg"/><div id="__next"><style>html { font-family: 'Manrope', 'Manrope Fallback'; }</style><div class="min-h-screen flex flex-col"><nav class="sticky top-0 w-full border-b backdrop-blur-xl z-[100] bg-background/80 border-border/30 isolate"><div class="w-full px-4 sm:px-6 lg:px-8"><div class="flex items-center justify-between py-2 min-h-[40px]"><div class="flex items-center gap-6"><a class="flex items-center gap-3 group" href="/cfg/admin"><img src="/cfg/admin/static/logos/vector.svg" alt="Django CFG Logo" class="h-8 w-auto object-contain transition-transform duration-300 group-hover:scale-105"/><span class="text-xl font-bold transition-colors duration-300 text-foreground group-hover:text-primary">Django CFG</span></a><div class="flex items-center gap-1"><a class="inline-flex h-9 items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50" href="/cfg/admin">Home</a><div><button type="button" id="radix-«Rklr6»" aria-haspopup="menu" aria-expanded="false" data-state="closed" class="inline-flex h-9 items-center justify-center gap-1 rounded-md px-4 py-2 text-sm font-medium transition-colors focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground">Resources<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-180"><path d="m6 9 6 6 6-6"></path></svg></button></div><div><button type="button" id="radix-«Rslr6»" aria-haspopup="menu" aria-expanded="false" data-state="closed" class="inline-flex h-9 items-center justify-center gap-1 rounded-md px-4 py-2 text-sm font-medium transition-colors focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground">Security<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-180"><path d="m6 9 6 6 6-6"></path></svg></button></div></div></div><div class="flex items-center gap-2"><div class="flex items-center gap-3"><a class="inline-flex cursor-pointer items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 rounded-md px-3 text-sm h-9 gap-1.5" href="/cfg/admin/auth"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user w-4 h-4"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>Sign In</a></div></div></div></div></nav><main class="flex-1"><div class="min-h-screen flex items-center justify-center px-4"><div class="max-w-2xl w-full text-center space-y-8"><div class="relative"><h1 class="text-[12rem] font-bold leading-none text-muted/20 select-none" aria-hidden="true">404</h1></div><div class="flex justify-center py-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-question w-24 h-24 text-muted-foreground/50"><path d="M12 17h.01"></path><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z"></path><path d="M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"></path></svg></div><div class="space-y-4"><h2 class="text-4xl font-bold text-foreground">Page Not Found</h2><p class="text-lg text-muted-foreground max-w-md mx-auto">The page you're looking for doesn't exist or has been moved.</p></div><div class="flex flex-col sm:flex-row items-center justify-center gap-4 pt-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8 min-w-[140px]">Go Back</button><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-11 rounded-md px-8 min-w-[140px]">Go Home</button></div><div class="pt-8 text-sm text-muted-foreground"><p>Need help? Contact<!-- --> <a href="mailto:support@djangocfg.com" class="text-primary hover:underline">support</a></p></div></div></div></main><footer class="max-lg:hidden bg-background border-t border-border mt-auto"><div class="w-full px-8 lg:px-16 xl:px-24 py-12"><div class="flex flex-col gap-8"><div class="flex gap-8"><div class="space-y-4" style="width:30%;min-width:300px"><div class="flex items-center gap-2"><div class="w-8 h-8 flex items-center justify-center"><img src="/cfg/admin/static/logos/vector.svg" alt="Django CFG Logo" class="w-full h-full object-contain"/></div><span class="text-xl font-bold text-foreground">Django CFG</span></div><p class="text-muted-foreground text-sm leading-relaxed">Django CFG Admin Panel</p><div class="pt-2"><span class="inline-flex items-center gap-2 px-3 py-1.5 rounded-sm bg-primary/10 hover:bg-primary/15 border border-primary/20 text-xs font-medium text-primary transition-colors"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-car w-3.5 h-3.5" aria-hidden="true"><path d="M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2"></path><circle cx="7" cy="17" r="2"></circle><path d="M9 17h6"></path><circle cx="17" cy="17" r="2"></circle></svg>Django CFG</span></div></div><div class="grid grid-cols-2 md:grid-cols-4 gap-8 flex-1"><div><h3 class="text-sm font-semibold text-foreground mb-3">Legal</h3><ul class="space-y-2"><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/docs">Documentation</a></li><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/privacy">Privacy Policy</a></li><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/terms">Terms of Service</a></li><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/security">Security Policy</a></li><li><a class="text-muted-foreground hover:text-primary text-sm transition-colors" href="/cfg/admin/cookies">Cookie Policy</a></li></ul></div></div></div><div class="border-t border-border" style="margin-top:2rem;padding-top:2rem"><div class="flex justify-between items-center gap-4"><div class="text-xs text-muted-foreground">© <!-- -->2025<!-- --> <!-- -->Django CFG<!-- -->. All rights reserved.</div><div class="text-xs text-muted-foreground flex items-center gap-1">Made with ❤️ by<!-- --> <a href="https://reforms.ai" target="_blank" rel="noopener noreferrer" class="hover:text-primary transition-colors">ReformsAI</a></div><div class="flex flex-wrap items-center gap-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-semibold focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent h-auto w-auto p-1 text-muted-foreground hover:text-primary transition-colors" title="Package Versions" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-«R3rr6»" data-state="closed"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info h-3 w-3"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></button><a href="/docs" target="_blank" rel="noopener noreferrer" class="text-xs text-muted-foreground hover:text-primary transition-colors" title="Documentation">Docs</a><a class="text-xs text-muted-foreground hover:text-primary transition-colors" href="/cfg/admin/privacy">Privacy Policy</a><a class="text-xs text-muted-foreground hover:text-primary transition-colors" href="/cfg/admin/terms">Terms of Service</a><a class="text-xs text-muted-foreground hover:text-primary transition-colors" href="/cfg/admin/security">Security</a><a class="text-xs text-muted-foreground hover:text-primary transition-colors" href="/cfg/admin/cookies">Cookies</a></div></div></div></div></div></footer></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[9999] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"wg0mGdXjT00H_1BUxoOSH","assetPrefix":"/cfg/admin","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">Django CFG</title><meta name="description" content="Django CFG Admin Panel" data-next-head=""/><link rel="icon" type="image/png" href="/cfg/admin/static/logos/192x192.png" data-next-head=""/><meta property="og:title" content="Django CFG" data-next-head=""/><meta property="og:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:type" content="website" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta name="twitter:title" content="Django CFG" data-next-head=""/><meta name="twitter:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><meta property="og:image:width" content="1200" data-next-head=""/><meta property="og:image:height" content="630" data-next-head=""/><meta property="og:image:type" content="image/png" data-next-head=""/><meta name="twitter:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><link rel="preload" href="/cfg/admin/_next/static/media/21350d82a1f187e9-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/media/e4af272ccee01ff0-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/css/3063068f0d5a8a00.css" as="style"/><link rel="stylesheet" href="/cfg/admin/_next/static/css/3063068f0d5a8a00.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/cfg/admin/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/cfg/admin/_next/static/chunks/webpack-5a92f81363b62aa7.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/framework-46f25b115ad0e595.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/main-d4b1d5245e3e8c42.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/_app-1c0fff0f59a6d683.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/404-9c41b6ebfe67f15e.js" defer=""></script><script src="/cfg/admin/_next/static/D_d9HRw5Yn7BRHAX5q89_/_buildManifest.js" defer=""></script><script src="/cfg/admin/_next/static/D_d9HRw5Yn7BRHAX5q89_/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style>html { font-family: 'Inter', 'Inter Fallback'; }</style><div class="p-6"><div class="min-h-screen flex items-center justify-center px-4"><div class="max-w-2xl w-full text-center space-y-8"><div class="relative"><h1 class="text-[12rem] font-bold leading-none text-muted/20 select-none" aria-hidden="true">404</h1></div><div class="flex justify-center py-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-question w-24 h-24 text-muted-foreground/50"><path d="M12 17h.01"></path><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z"></path><path d="M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"></path></svg></div><div class="space-y-4"><h2 class="text-4xl font-bold text-foreground">Page Not Found</h2><p class="text-lg text-muted-foreground max-w-md mx-auto">The page you're looking for doesn't exist or has been moved.</p></div><div class="flex flex-col sm:flex-row items-center justify-center gap-4 pt-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8 min-w-[140px]">Go Back</button><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-11 rounded-md px-8 min-w-[140px]">Go Home</button></div><div class="pt-8 text-sm text-muted-foreground"><p>Need help? Contact<!-- --> <a href="mailto:support@djangocfg.com" class="text-primary hover:underline">support</a></p></div></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[9999] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"D_d9HRw5Yn7BRHAX5q89_","assetPrefix":"/cfg/admin","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">Django CFG</title><meta name="description" content="Django CFG Admin Panel" data-next-head=""/><link rel="icon" type="image/png" href="/cfg/admin/static/logos/192x192.png" data-next-head=""/><meta property="og:title" content="Django CFG" data-next-head=""/><meta property="og:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:type" content="website" data-next-head=""/><meta name="twitter:card" content="summary_large_image" data-next-head=""/><meta name="twitter:title" content="Django CFG" data-next-head=""/><meta name="twitter:description" content="Django CFG Admin Panel" data-next-head=""/><meta property="og:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><meta property="og:image:width" content="1200" data-next-head=""/><meta property="og:image:height" content="630" data-next-head=""/><meta property="og:image:type" content="image/png" data-next-head=""/><meta name="twitter:image" content="/cfg/admin//api/og?data=eyJ0aXRsZSI6IkRqYW5nbyBDRkciLCJzdWJ0aXRsZSI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwiLCJkZXNjcmlwdGlvbiI6IkRqYW5nbyBDRkcgQWRtaW4gUGFuZWwifQ==" data-next-head=""/><link rel="preload" href="/cfg/admin/_next/static/media/21350d82a1f187e9-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/media/e4af272ccee01ff0-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/cfg/admin/_next/static/css/3063068f0d5a8a00.css" as="style"/><link rel="stylesheet" href="/cfg/admin/_next/static/css/3063068f0d5a8a00.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/cfg/admin/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/cfg/admin/_next/static/chunks/webpack-5a92f81363b62aa7.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/framework-46f25b115ad0e595.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/main-d4b1d5245e3e8c42.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/_app-1c0fff0f59a6d683.js" defer=""></script><script src="/cfg/admin/_next/static/chunks/pages/500-906d92e10e7e65fb.js" defer=""></script><script src="/cfg/admin/_next/static/D_d9HRw5Yn7BRHAX5q89_/_buildManifest.js" defer=""></script><script src="/cfg/admin/_next/static/D_d9HRw5Yn7BRHAX5q89_/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style>html { font-family: 'Inter', 'Inter Fallback'; }</style><div class="p-6"><div class="min-h-screen flex items-center justify-center px-4"><div class="max-w-2xl w-full text-center space-y-8"><div class="relative"><h1 class="text-[12rem] font-bold leading-none text-muted/20 select-none" aria-hidden="true">500</h1></div><div class="flex justify-center py-8"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server-crash w-24 h-24 text-destructive/50"><path d="M6 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2"></path><path d="M6 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2"></path><path d="M6 6h.01"></path><path d="M6 18h.01"></path><path d="m13 6-4 6h6l-4 6"></path></svg></div><div class="space-y-4"><h2 class="text-4xl font-bold text-foreground">Server Error</h2><p class="text-lg text-muted-foreground max-w-md mx-auto">Something went wrong on our end. We're working to fix it.</p></div><div class="flex flex-col sm:flex-row items-center justify-center gap-4 pt-4"><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-11 rounded-md px-8 min-w-[140px]">Go Back</button><button class="inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-11 rounded-md px-8 min-w-[140px]">Go Home</button></div><div class="pt-8 text-sm text-muted-foreground"><p>Need help? Contact<!-- --> <a href="mailto:support@djangocfg.com" class="text-primary hover:underline">support</a></p></div></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[9999] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/500","query":{},"buildId":"D_d9HRw5Yn7BRHAX5q89_","assetPrefix":"/cfg/admin","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST=function(e,a,s,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:0,errorRate:1e-4,numBits:0,numHashes:s,bitArray:[]},__routerFilterDynamic:{numItems:e,errorRate:1e-4,numBits:e,numHashes:s,bitArray:[]},"/":["static/chunks/pages/index-fe4802f9df0ac052.js"],"/404":["static/chunks/pages/404-9c41b6ebfe67f15e.js"],"/500":["static/chunks/pages/500-906d92e10e7e65fb.js"],"/_error":["static/chunks/pages/_error-2550e721b11b7946.js"],"/auth":["static/chunks/pages/auth-a872607f98742e5a.js"],"/legal/cookies":["static/chunks/pages/legal/cookies-97d279800f12aab4.js"],"/legal/privacy":["static/chunks/pages/legal/privacy-1d5e6cd94689247e.js"],"/legal/security":["static/chunks/pages/legal/security-55e49700e7a01f5a.js"],"/legal/terms":["static/chunks/pages/legal/terms-14c02bb2d3198352.js"],"/private":["static/chunks/94141-bc6d47f419b26b21.js",t,"static/chunks/pages/private-d4ccbe1265cbd853.js"],"/private/centrifugo":["static/chunks/43076-4be6a9794e9c3e8b.js",t,"static/chunks/pages/private/centrifugo-44a8313fa040e9ad.js"],"/private/profile":["static/chunks/pages/private/profile-5cd57aac826857fd.js"],"/private/ui":["static/chunks/pages/private/ui-383e7f474cf22a18.js"],sortedPages:["/","/404","/500","/_app","/_error","/auth","/legal/cookies","/legal/privacy","/legal/security","/legal/terms","/private","/private/centrifugo","/private/profile","/private/ui"]}}(0,1e-4,NaN,"static/chunks/50314-5ec79b293c2283dd.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[19430],{
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[19430],{64192:(t,i,e)=>{e.r(i),e.d(i,{AudioProvider:()=>s});var h=e(83298);class s extends h.H{$$PROVIDER_TYPE="AUDIO";get type(){return"audio"}setup(t){super.setup(t),"audio"===this.type&&t.delegate.p("provider-setup",{detail:this})}get audio(){return this.j}}},83298:(t,i,e)=>{e.d(i,{H:()=>c});var h=e(60140),s=e(52598),a=e(56708),r=e(8334),n=e(88972),d=e(88347),l=e(95713),u=e(47707);class o{constructor(t,i){this.q=t,this.ph=i,this.Uh(),(0,s.QZ)(this.Vh.bind(this)),(0,r.zp)(this.Eh.bind(this))}ih=(0,n.EH)();Nh=!1;Qh=!1;Rh=!1;Oh=new d.R(this.Wh.bind(this));get j(){return this.q.media}get jg(){return this.ph.delegate}Eh(){this.Oh.P(),this.ih.empty()}Wh(){let t=this.q.currentTime;this.ph.$store.currentTime()!==t&&this.Mh(t)}Uh(){this.Lh("loadstart",this.ge),this.Lh("abort",this.Sh),this.Lh("emptied",this.Xh),this.Lh("error",this.Wb)}Yh(){this.Qh||(this.ih.add(this.Lh("loadeddata",this.Zh),this.Lh("loadedmetadata",this._h),this.Lh("canplay",this.Rb),this.Lh("canplaythrough",this.$h),this.Lh("durationchange",this.ai),this.Lh("play",this.bi),this.Lh("progress",this.ci),this.Lh("stalled",this.di),this.Lh("suspend",this.ei)),this.Qh=!0)}fi(){this.Rh||(this.ih.add(this.Lh("pause",this.gi),this.Lh("playing",this.hi),this.Lh("ratechange",this.ii),this.Lh("seeked",this.ji),this.Lh("seeking",this.ki),this.Lh("ended",this.li),this.Lh("volumechange",this.ac),this.Lh("waiting",this.mi)),this.Rh=!0)}ni=void 0;pi=void 0;Lh(t,i){return(0,h.k6)(this.j,t,i.bind(this))}qi(t){}Mh(t,i){this.jg.p("time-update",{detail:{currentTime:Math.min(t,this.ph.$store.seekableEnd()),played:this.j.played},trigger:i})}ge(t){if(3===this.j.networkState)return void this.Sh(t);this.Yh(),this.jg.p("load-start",{trigger:t})}Sh(t){this.jg.p("abort",{trigger:t})}Xh(){this.jg.p("emptied",{trigger:event})}Zh(t){this.jg.p("loaded-data",{trigger:t})}_h(t){this.Th(),this.fi(),this.jg.p("volume-change",{detail:{volume:this.j.volume,muted:this.j.muted}}),this.jg.p("loaded-metadata",{trigger:t}),u.I&&(0,a.i)(this.ph.$store.source())&&this.jg.lf(this.Ph(),t)}Ph(){return{duration:this.j.duration,buffered:this.j.buffered,seekable:this.j.seekable}}Th(){let t=!Number.isFinite(this.j.duration);this.jg.p("stream-type-change",{detail:t?"live":"on-demand"})}bi(t){this.ph.$store.canPlay&&this.jg.p("play",{trigger:t})}gi(t){(1!==this.j.readyState||this.Nh)&&(this.Nh=!1,this.Oh.P(),this.jg.p("pause",{trigger:t}))}Rb(t){this.jg.lf(this.Ph(),t)}$h(t){this.ph.$store.started()||this.jg.p("can-play-through",{trigger:t,detail:this.Ph()})}hi(t){this.Nh=!1,this.jg.p("playing",{trigger:t}),this.Oh.O()}di(t){this.jg.p("stalled",{trigger:t}),this.j.readyState<3&&(this.Nh=!0,this.jg.p("waiting",{trigger:t}))}mi(t){this.j.readyState<3&&(this.Nh=!0,this.jg.p("waiting",{trigger:t}))}li(t){this.Oh.P(),this.Mh(this.j.duration,t),this.jg.p("end",{trigger:t}),this.ph.$store.loop()?this.oi():this.jg.p("ended",{trigger:t})}Vh(){this.ph.$store.paused()&&(0,h.k6)(this.j,"timeupdate",this.Vb.bind(this))}Vb(t){this.Mh(this.j.currentTime,t)}ai(t){this.Th(),this.ph.$store.ended()&&this.Mh(this.j.duration,t),this.jg.p("duration-change",{detail:this.j.duration,trigger:t})}ac(t){this.jg.p("volume-change",{detail:{volume:this.j.volume,muted:this.j.muted},trigger:t})}ji(t){this.Mh(this.j.currentTime,t),this.jg.p("seeked",{detail:this.j.currentTime,trigger:t}),Math.trunc(this.j.currentTime)===Math.trunc(this.j.duration)&&(0,l.y)(this.j.duration)>(0,l.y)(this.j.currentTime)&&(this.Mh(this.j.duration,t),this.j.ended||this.ph.player.dispatchEvent(new h.vP("media-play-request",{trigger:t})))}ki(t){this.jg.p("seeking",{detail:this.j.currentTime,trigger:t})}ci(t){this.jg.p("progress",{detail:{buffered:this.j.buffered,seekable:this.j.seekable},trigger:t})}oi(){(0,s.gD)(this.j.controls)&&(this.j.controls=!1),this.ph.player.dispatchEvent(new h.vP("media-loop-request"))}ei(t){this.jg.p("suspend",{trigger:t})}ii(t){this.jg.p("rate-change",{detail:this.j.playbackRate,trigger:t})}Wb(t){let i=this.j.error;i&&this.jg.p("error",{detail:{message:i.message,code:i.code,mediaError:i},trigger:t})}}class g{constructor(t,i){this.q=t,this.ph=i,this.ri.onaddtrack=this.ti.bind(this),this.ri.onremovetrack=this.ui.bind(this),this.ri.onchange=this.vi.bind(this),(0,h.k6)(this.ph.audioTracks,"change",this.wi.bind(this))}get ri(){return this.q.media.audioTracks}ti(t){let i=t.track;if(""===i.label)return;let e={id:i.id+"",label:i.label,language:i.language,kind:i.kind,selected:!1};this.ph.audioTracks[u.N](e,t),i.enabled&&(e.selected=!0)}ui(t){let i=this.ph.audioTracks.getById(t.track.id);i&&this.ph.audioTracks[u.W](i,t)}vi(t){let i=this.si();if(!i)return;let e=this.ph.audioTracks.getById(i.id);e&&this.ph.audioTracks[u.L](e,!0,t)}si(){return Array.from(this.ri).find(t=>t.enabled)}wi(t){let{current:i}=t.detail;if(!i)return;let e=this.ri.getTrackById(i.id);if(e){let t=this.si();t&&(t.enabled=!1),e.enabled=!0}}}class c{constructor(t){this.j=t}setup(t){new o(this,t),"audioTracks"in this.media&&new g(this,t)}get type(){return""}get media(){return this.j}get paused(){return this.j.paused}get muted(){return this.j.muted}set muted(t){this.j.muted=t}get volume(){return this.j.volume}set volume(t){this.j.volume=t}get currentTime(){return this.j.currentTime}set currentTime(t){this.j.currentTime=t}get playsinline(){return this.j.hasAttribute("playsinline")}set playsinline(t){(0,h.Bq)(this.j,"playsinline",t)}get playbackRate(){return this.j.playbackRate}set playbackRate(t){this.j.playbackRate=t}async play(){return this.j.play()}async pause(){return this.j.pause()}async loadSource({src:t},i){this.j.preload=i,(0,a.b)(t)?this.j.srcObject=t:(this.j.srcObject=null,this.j.src=(0,s.Kg)(t)?t:window.URL.createObjectURL(t)),this.j.load()}}},88347:(t,i,e)=>{e.d(i,{H:()=>d,R:()=>n});var h=e(8334),s=e(52598),a=e(60140),r=e(47707);class n{constructor(t){this.jf=t}xi;O(){(0,s.b0)(this.xi)&&this.yi()}P(){(0,s.Et)(this.xi)&&window.cancelAnimationFrame(this.xi),this.xi=void 0}yi(){this.xi=window.requestAnimationFrame(()=>{(0,s.b0)(this.xi)||(this.jf(),this.yi())})}}class d{constructor(t){this.qa=t}ph;za=null;qh=null;nh={};oh=new Set;get instance(){return this.za}setup(t,i){this.ph=i;let e=(0,h.se)(i.$store.streamType).includes("live"),n=(0,h.se)(i.$store.streamType).includes("ll-");this.za=new t({lowLatencyMode:n,backBufferLength:n?4:e?8:void 0,renderTextTracksNatively:!1,...this.nh});let d=this.rh.bind(this);for(let i of Object.values(t.Events))this.za.on(i,d);for(let i of(this.za.on(t.Events.ERROR,this.Wb.bind(this)),this.oh))i(this.za);i.player.dispatchEvent(new a.vP("hls-instance",{detail:this.za})),this.za.attachMedia(this.qa),this.za.on(t.Events.AUDIO_TRACK_SWITCHED,this.sh.bind(this)),this.za.on(t.Events.LEVEL_SWITCHED,this.th.bind(this)),this.za.on(t.Events.LEVEL_LOADED,this.uh.bind(this)),this.za.on(t.Events.NON_NATIVE_TEXT_TRACKS_FOUND,this.vh.bind(this)),this.za.on(t.Events.CUES_PARSED,this.wh.bind(this)),i.qualities[r.F]=this.xh.bind(this),(0,a.k6)(i.qualities,"change",this.Pf.bind(this)),(0,a.k6)(i.audioTracks,"change",this.yh.bind(this)),this.qh=(0,s.QZ)(this.zh.bind(this))}zh(){if(!this.ph.$store.live())return;let t=new n(this.Ah.bind(this));return t.O(),t.P.bind(t)}Ah(){this.ph.$store.liveSyncPosition.set(this.za?.liveSyncPosition??1/0)}rh(t,i){this.ph.player.dispatchEvent(new a.vP((0,a.BW)(t),{detail:i}))}vh(t,i){let e=new a.vP(t,{detail:i}),h=-1;for(let t=0;t<i.tracks.length;t++){let s=i.tracks[t],a=s.subtitleTrack??s.closedCaptions,n=new r.G({id:`hls-${s.kind}${t}`,src:a?.url,label:s.label,language:a?.lang,kind:s.kind});n[r.H]=2,n[r.J]=()=>{"showing"===n.mode?(this.za.subtitleTrack=t,h=t):h===t&&(this.za.subtitleTrack=-1,h=-1)},s.default&&n.setMode("showing",e),this.ph.textTracks.add(n,e)}}wh(t,i){let e=this.ph.textTracks.getById(`hls-${i.track}`);if(!e)return;let h=new a.vP(t,{detail:i});for(let t of i.cues)t.positionAlign="auto",e.addCue(t,h)}sh(t,i){let e=this.ph.audioTracks[i.id];e&&this.ph.audioTracks[r.L](e,!0,new a.vP(t,{detail:i}))}th(t,i){let e=this.ph.qualities[i.level];e&&this.ph.qualities[r.L](e,!0,new a.vP(t,{detail:i}))}uh(t,i){if(this.ph.$store.canPlay())return;let{type:e,live:h,totalduration:s}=i.details,n=new a.vP(t,{detail:i});this.ph.delegate.p("stream-type-change",{detail:h?"EVENT"===e&&Number.isFinite(s)?"live:dvr":"live":"on-demand",trigger:n}),this.ph.delegate.p("duration-change",{detail:s,trigger:n});let d=this.za.media;for(let t of(-1===this.za.currentLevel&&this.ph.qualities[r.K](!0,n),this.za.audioTracks))this.ph.audioTracks[r.N]({id:t.id+"",label:t.name,language:t.lang||"",kind:"main"},n);for(let t of this.za.levels)this.ph.qualities[r.N]({width:t.width,height:t.height,codec:t.codecSet,bitrate:t.bitrate},n);d.dispatchEvent(new a.vP("canplay",{trigger:n}))}Wb(t,i){if(i.fatal)switch(i.type){case"networkError":this.za?.startLoad();break;case"mediaError":this.za?.recoverMediaError();break;default:this.za?.destroy(),this.za=null}}xh(){this.za&&(this.za.currentLevel=-1)}Pf(){let{qualities:t}=this.ph;this.za&&!t.auto&&(this.za[t.switch+"Level"]=t.selectedIndex,r.P&&(this.qa.currentTime=this.qa.currentTime))}yh(){let{audioTracks:t}=this.ph;this.za&&this.za.audioTrack!==t.selectedIndex&&(this.za.audioTrack=t.selectedIndex)}Jg(){this.ph&&(this.ph.qualities[r.F]=void 0),this.za?.destroy(),this.za=null,this.qh?.(),this.qh=null}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20695],{43076:(e,l,r)=>{r.r(l),r.d(l,{default:()=>i});var s=r(34226),a=r(94285),d=r(94513),h=(0,a.forwardRef)(({variant:e="branded",fallback:l,...r},a)=>(0,d.jsx)(s.h_,{fallback:l,...r,ref:a,children:"branded"===e&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{fill:"#01C853",d:"m6.578 11.063 5.475-2.235 5.294 2.295L12.037 3zm.014 2.482 5.46 3.075 5.573-3.075L12.105 21zm5.476-3.623 5.542 2.393-5.542 3-5.693-3.067 5.7-2.326z"})})||"mono"===e&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("path",{fill:"currentColor",d:"m6.577 11.063 5.476-2.235 5.294 2.295L12.037 3zm.015 2.482 5.46 3.075 5.573-3.075L12.105 21zm5.476-3.623 5.542 2.393-5.542 3-5.693-3.067 5.7-2.326z"})})||"background"===e&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("g",{clipPath:"url(#ethereum-classic__a)",children:[(0,d.jsx)("path",{fill:"#01C853",d:"M24 0H0v24h24z"}),(0,d.jsx)("path",{fill:"#fff",d:"m7.18 11.167 4.867-1.987 4.706 2.04L12.033 4zm.013 2.206 4.854 2.734L17 13.373 12.093 20zm4.867-3.22 4.927 2.127-4.927 2.667L7 12.22l5.067-2.067z"})]}),(0,d.jsx)("defs",{children:(0,d.jsx)("clipPath",{id:"ethereum-classic__a",children:(0,d.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]})}));h.displayName="NetworkEthereumClassic";var i=h}}]);
|